@element-plus/nightly 0.0.20241121 → 0.0.20241122
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +1 -1
- package/dist/index.full.js +19 -16
- package/dist/index.full.min.js +13 -13
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +5 -5
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +19 -16
- 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/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.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/calendar/src/date-table2.mjs +9 -4
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/cascader/src/cascader2.mjs +2 -2
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/checkbox/index.mjs +2 -2
- package/es/components/checkbox/src/checkbox-group.mjs +73 -30
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-group2.mjs +30 -73
- package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
- package/es/components/index.mjs +5 -5
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/content.mjs +93 -137
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content2.mjs +137 -93
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/select/src/select2.mjs +3 -4
- package/es/components/select/src/select2.mjs.map +1 -1
- package/es/components/select-v2/src/select.mjs +3 -4
- package/es/components/select-v2/src/select.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton-item.mjs +23 -18
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +18 -23
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +72 -229
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +229 -72
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/tooltip/src/content.mjs +1 -1
- package/es/components/tooltip/src/content2.mjs +1 -1
- package/es/components/tree-select/src/tree-select.mjs +1 -1
- package/es/components/tree-select/src/tree-select.mjs.map +1 -1
- package/es/index.mjs +5 -5
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/calendar/src/date-table2.js +8 -3
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/cascader/src/cascader2.js +2 -2
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/checkbox/index.js +2 -2
- package/lib/components/checkbox/src/checkbox-group.js +73 -31
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-group2.js +31 -73
- package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
- package/lib/components/index.js +5 -5
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/content.js +98 -137
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content2.js +137 -98
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/select/src/select2.js +3 -4
- package/lib/components/select/src/select2.js.map +1 -1
- package/lib/components/select-v2/src/select.js +3 -4
- package/lib/components/select-v2/src/select.js.map +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton-item.js +23 -18
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +18 -23
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +72 -228
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +228 -72
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/tooltip/src/content.js +1 -1
- package/lib/components/tooltip/src/content2.js +1 -1
- package/lib/components/tree-select/src/tree-select.js +1 -1
- package/lib/components/tree-select/src/tree-select.js.map +1 -1
- package/lib/index.js +5 -5
- 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/el-button.css +1 -1
- package/theme-chalk/el-cascader.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/cascader.scss +18 -4
- package/theme-chalk/src/common/var.scss +42 -1
- package/web-types.json +1 -1
@@ -1,37 +1,80 @@
|
|
1
|
+
import { defineComponent, nextTick, computed, provide, toRefs, watch, openBlock, createBlock, resolveDynamicComponent, unref, normalizeClass, withCtx, renderSlot } from 'vue';
|
2
|
+
import { pick } from 'lodash-unified';
|
1
3
|
import '../../../constants/index.mjs';
|
2
|
-
import '../../../hooks/index.mjs';
|
3
4
|
import '../../../utils/index.mjs';
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import {
|
5
|
+
import '../../../hooks/index.mjs';
|
6
|
+
import '../../form/index.mjs';
|
7
|
+
import { checkboxGroupProps, checkboxGroupEmits } from './checkbox-group2.mjs';
|
8
|
+
import { checkboxGroupContextKey } from './constants.mjs';
|
9
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
10
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
11
|
+
import { useFormItem, useFormItemInputId } from '../../form/src/hooks/use-form-item.mjs';
|
7
12
|
import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
8
|
-
import {
|
13
|
+
import { debugWarn } from '../../../utils/error.mjs';
|
9
14
|
|
10
|
-
const
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
15
|
+
const __default__ = defineComponent({
|
16
|
+
name: "ElCheckboxGroup"
|
17
|
+
});
|
18
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
19
|
+
...__default__,
|
20
|
+
props: checkboxGroupProps,
|
21
|
+
emits: checkboxGroupEmits,
|
22
|
+
setup(__props, { emit }) {
|
23
|
+
const props = __props;
|
24
|
+
const ns = useNamespace("checkbox");
|
25
|
+
const { formItem } = useFormItem();
|
26
|
+
const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
|
27
|
+
formItemContext: formItem
|
28
|
+
});
|
29
|
+
const changeEvent = async (value) => {
|
30
|
+
emit(UPDATE_MODEL_EVENT, value);
|
31
|
+
await nextTick();
|
32
|
+
emit("change", value);
|
33
|
+
};
|
34
|
+
const modelValue = computed({
|
35
|
+
get() {
|
36
|
+
return props.modelValue;
|
37
|
+
},
|
38
|
+
set(val) {
|
39
|
+
changeEvent(val);
|
40
|
+
}
|
41
|
+
});
|
42
|
+
provide(checkboxGroupContextKey, {
|
43
|
+
...pick(toRefs(props), [
|
44
|
+
"size",
|
45
|
+
"min",
|
46
|
+
"max",
|
47
|
+
"disabled",
|
48
|
+
"validateEvent",
|
49
|
+
"fill",
|
50
|
+
"textColor"
|
51
|
+
]),
|
52
|
+
modelValue,
|
53
|
+
changeEvent
|
54
|
+
});
|
55
|
+
watch(() => props.modelValue, () => {
|
56
|
+
if (props.validateEvent) {
|
57
|
+
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
|
58
|
+
}
|
59
|
+
});
|
60
|
+
return (_ctx, _cache) => {
|
61
|
+
var _a;
|
62
|
+
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
63
|
+
id: unref(groupId),
|
64
|
+
class: normalizeClass(unref(ns).b("group")),
|
65
|
+
role: "group",
|
66
|
+
"aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "checkbox-group" : void 0,
|
67
|
+
"aria-labelledby": unref(isLabeledByFormItem) ? (_a = unref(formItem)) == null ? void 0 : _a.labelId : void 0
|
68
|
+
}, {
|
69
|
+
default: withCtx(() => [
|
70
|
+
renderSlot(_ctx.$slots, "default")
|
71
|
+
]),
|
72
|
+
_: 3
|
73
|
+
}, 8, ["id", "class", "aria-label", "aria-labelledby"]);
|
74
|
+
};
|
75
|
+
}
|
30
76
|
});
|
31
|
-
|
32
|
-
[UPDATE_MODEL_EVENT]: (val) => isArray(val),
|
33
|
-
change: (val) => isArray(val)
|
34
|
-
};
|
77
|
+
var CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "checkbox-group.vue"]]);
|
35
78
|
|
36
|
-
export {
|
79
|
+
export { CheckboxGroup as default };
|
37
80
|
//# sourceMappingURL=checkbox-group.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"checkbox-group.mjs","sources":["../../../../../../packages/components/checkbox/src/checkbox-group.
|
1
|
+
{"version":3,"file":"checkbox-group.mjs","sources":["../../../../../../packages/components/checkbox/src/checkbox-group.vue"],"sourcesContent":["<template>\n <component\n :is=\"tag\"\n :id=\"groupId\"\n :class=\"ns.b('group')\"\n role=\"group\"\n :aria-label=\"\n !isLabeledByFormItem ? ariaLabel || 'checkbox-group' : undefined\n \"\n :aria-labelledby=\"isLabeledByFormItem ? formItem?.labelId : undefined\"\n >\n <slot />\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, nextTick, provide, toRefs, watch } from 'vue'\nimport { pick } from 'lodash-unified'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { debugWarn } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormItem, useFormItemInputId } from '@element-plus/components/form'\nimport { checkboxGroupEmits, checkboxGroupProps } from './checkbox-group'\nimport { checkboxGroupContextKey } from './constants'\n\nimport type { CheckboxGroupValueType } from './checkbox-group'\n\ndefineOptions({\n name: 'ElCheckboxGroup',\n})\n\nconst props = defineProps(checkboxGroupProps)\nconst emit = defineEmits(checkboxGroupEmits)\nconst ns = useNamespace('checkbox')\n\nconst { formItem } = useFormItem()\nconst { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst changeEvent = async (value: CheckboxGroupValueType) => {\n emit(UPDATE_MODEL_EVENT, value)\n await nextTick()\n emit('change', value)\n}\n\nconst modelValue = computed({\n get() {\n return props.modelValue\n },\n set(val: CheckboxGroupValueType) {\n changeEvent(val)\n },\n})\n\nprovide(checkboxGroupContextKey, {\n ...pick(toRefs(props), [\n 'size',\n 'min',\n 'max',\n 'disabled',\n 'validateEvent',\n 'fill',\n 'textColor',\n ]),\n modelValue,\n changeEvent,\n})\n\nwatch(\n () => props.modelValue,\n () => {\n if (props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n }\n)\n</script>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent"],"mappings":";;;;;;;;;;;;;;mCA2Bc,CAAA;AAAA,EACZ,IAAM,EAAA,iBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAElC,IAAM,MAAA,EAAE,QAAS,EAAA,GAAI,WAAY,EAAA,CAAA;AACjC,IAAA,MAAM,EAAE,OAAS,EAAA,OAAA,EAAS,mBAAoB,EAAA,GAAI,mBAAmB,KAAO,EAAA;AAAA,MAC1E,eAAiB,EAAA,QAAA;AAAA,KAClB,CAAA,CAAA;AAED,IAAM,MAAA,WAAA,GAAc,OAAO,KAAkC,KAAA;AAC3D,MAAA,IAAA,CAAK,oBAAoB,KAAK,CAAA,CAAA;AAC9B,MAAA,MAAM,QAAS,EAAA,CAAA;AACf,MAAA,IAAA,CAAK,UAAU,KAAK,CAAA,CAAA;AAAA,KACtB,CAAA;AAEA,IAAA,MAAM,aAAa,QAAS,CAAA;AAAA,MAC1B,GAAM,GAAA;AACJ,QAAA,OAAO,KAAM,CAAA,UAAA,CAAA;AAAA,OACf;AAAA,MACA,IAAI,GAA6B,EAAA;AAC/B,QAAA,WAAA,CAAY,GAAG,CAAA,CAAA;AAAA,OACjB;AAAA,KACD,CAAA,CAAA;AAED,IAAA,OAAA,CAAQ,uBAAyB,EAAA;AAAA,MAC/B,GAAG,IAAA,CAAK,MAAO,CAAA,KAAK,CAAG,EAAA;AAAA,QACrB,MAAA;AAAA,QACA,KAAA;AAAA,QACA,KAAA;AAAA,QACA,UAAA;AAAA,QACA,eAAA;AAAA,QACA,MAAA;AAAA,QACA,WAAA;AAAA,OACD,CAAA;AAAA,MACD,UAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAA,KAAA,CAAA,MAAA,KAAA,CAAA,UAAA,EAAA,MAAA;AAAA,MACE,SAAY,CAAA,aAAA,EAAA;AAAA,QACN,QAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,QAAA,CAAA,QAAA,CAAA,QAAA,CAAA,CAAA,KAAA,CAAA,CAAA,GAAA,KAAA,SAAA,CAAA,GAAA,CAAA,CAAA,CAAA;AACJ,OAAA;AACE,KAAU,CAAA,CAAA;AAAgD,IAC5D,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACF,IAAA,EAAA,CAAA;AAAA,MACF,OAAAA,SAAA,EAAA,EAAAC,WAAA,CAAAC,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,EAAA;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,80 +1,37 @@
|
|
1
|
-
import { defineComponent, nextTick, computed, provide, toRefs, watch, openBlock, createBlock, resolveDynamicComponent, unref, normalizeClass, withCtx, renderSlot } from 'vue';
|
2
|
-
import { pick } from 'lodash-unified';
|
3
1
|
import '../../../constants/index.mjs';
|
4
|
-
import '../../../utils/index.mjs';
|
5
2
|
import '../../../hooks/index.mjs';
|
6
|
-
import '
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import
|
10
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
11
|
-
import { useFormItem, useFormItemInputId } from '../../form/src/hooks/use-form-item.mjs';
|
3
|
+
import '../../../utils/index.mjs';
|
4
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
5
|
+
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
6
|
+
import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
|
12
7
|
import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
13
|
-
import {
|
8
|
+
import { isArray } from '@vue/shared';
|
14
9
|
|
15
|
-
const
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
get() {
|
36
|
-
return props.modelValue;
|
37
|
-
},
|
38
|
-
set(val) {
|
39
|
-
changeEvent(val);
|
40
|
-
}
|
41
|
-
});
|
42
|
-
provide(checkboxGroupContextKey, {
|
43
|
-
...pick(toRefs(props), [
|
44
|
-
"size",
|
45
|
-
"min",
|
46
|
-
"max",
|
47
|
-
"disabled",
|
48
|
-
"validateEvent",
|
49
|
-
"fill",
|
50
|
-
"textColor"
|
51
|
-
]),
|
52
|
-
modelValue,
|
53
|
-
changeEvent
|
54
|
-
});
|
55
|
-
watch(() => props.modelValue, () => {
|
56
|
-
if (props.validateEvent) {
|
57
|
-
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
|
58
|
-
}
|
59
|
-
});
|
60
|
-
return (_ctx, _cache) => {
|
61
|
-
var _a;
|
62
|
-
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
63
|
-
id: unref(groupId),
|
64
|
-
class: normalizeClass(unref(ns).b("group")),
|
65
|
-
role: "group",
|
66
|
-
"aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "checkbox-group" : void 0,
|
67
|
-
"aria-labelledby": unref(isLabeledByFormItem) ? (_a = unref(formItem)) == null ? void 0 : _a.labelId : void 0
|
68
|
-
}, {
|
69
|
-
default: withCtx(() => [
|
70
|
-
renderSlot(_ctx.$slots, "default")
|
71
|
-
]),
|
72
|
-
_: 3
|
73
|
-
}, 8, ["id", "class", "aria-label", "aria-labelledby"]);
|
74
|
-
};
|
75
|
-
}
|
10
|
+
const checkboxGroupProps = buildProps({
|
11
|
+
modelValue: {
|
12
|
+
type: definePropType(Array),
|
13
|
+
default: () => []
|
14
|
+
},
|
15
|
+
disabled: Boolean,
|
16
|
+
min: Number,
|
17
|
+
max: Number,
|
18
|
+
size: useSizeProp,
|
19
|
+
fill: String,
|
20
|
+
textColor: String,
|
21
|
+
tag: {
|
22
|
+
type: String,
|
23
|
+
default: "div"
|
24
|
+
},
|
25
|
+
validateEvent: {
|
26
|
+
type: Boolean,
|
27
|
+
default: true
|
28
|
+
},
|
29
|
+
...useAriaProps(["ariaLabel"])
|
76
30
|
});
|
77
|
-
|
31
|
+
const checkboxGroupEmits = {
|
32
|
+
[UPDATE_MODEL_EVENT]: (val) => isArray(val),
|
33
|
+
change: (val) => isArray(val)
|
34
|
+
};
|
78
35
|
|
79
|
-
export {
|
36
|
+
export { checkboxGroupEmits, checkboxGroupProps };
|
80
37
|
//# sourceMappingURL=checkbox-group2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"checkbox-group2.mjs","sources":["../../../../../../packages/components/checkbox/src/checkbox-group.
|
1
|
+
{"version":3,"file":"checkbox-group2.mjs","sources":["../../../../../../packages/components/checkbox/src/checkbox-group.ts"],"sourcesContent":["import { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport { buildProps, definePropType, isArray } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type checkboxGroup from './checkbox-group.vue'\nimport type { CheckboxValueType } from './checkbox'\n\nexport type CheckboxGroupValueType = Exclude<CheckboxValueType, boolean>[]\n\nexport const checkboxGroupProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType<CheckboxGroupValueType>(Array),\n default: () => [],\n },\n /**\n * @description whether the nesting checkboxes are disabled\n */\n disabled: Boolean,\n /**\n * @description minimum number of checkbox checked\n */\n min: Number,\n /**\n * @description maximum number of checkbox checked\n */\n max: Number,\n /**\n * @description size of checkbox\n */\n size: useSizeProp,\n /**\n * @description border and background color when button is active\n */\n fill: String,\n /**\n * @description font color when button is active\n */\n textColor: String,\n /**\n * @description element tag of the checkbox group\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\n\nexport const checkboxGroupEmits = {\n [UPDATE_MODEL_EVENT]: (val: CheckboxGroupValueType) => isArray(val),\n change: (val: CheckboxValueType[]) => isArray(val),\n}\n\nexport type CheckboxGroupProps = ExtractPropTypes<typeof checkboxGroupProps>\nexport type CheckboxGroupEmits = typeof checkboxGroupEmits\nexport type CheckboxGroupInstance = InstanceType<typeof checkboxGroup>\n"],"names":[],"mappings":";;;;;;;;;AAGY,MAAC,kBAAkB,GAAG,UAAU,CAAC;AAC7C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,GAAG,EAAE,MAAM;AACb,EAAE,GAAG,EAAE,MAAM;AACb,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,GAAG,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAG;AAClC,EAAE,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC;AAC7C,EAAE,MAAM,EAAE,CAAC,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC;AAC/B;;;;"}
|
package/es/components/index.mjs
CHANGED
@@ -100,7 +100,7 @@ export { cascaderEmits, cascaderProps } from './cascader/src/cascader.mjs';
|
|
100
100
|
export { CASCADER_PANEL_INJECTION_KEY } from './cascader-panel/src/types.mjs';
|
101
101
|
export { CommonProps, DefaultProps, useCascaderConfig } from './cascader-panel/src/config.mjs';
|
102
102
|
export { checkTagEmits, checkTagProps } from './check-tag/src/check-tag.mjs';
|
103
|
-
export { checkboxGroupEmits, checkboxGroupProps } from './checkbox/src/checkbox-
|
103
|
+
export { checkboxGroupEmits, checkboxGroupProps } from './checkbox/src/checkbox-group2.mjs';
|
104
104
|
export { checkboxEmits, checkboxProps } from './checkbox/src/checkbox.mjs';
|
105
105
|
export { checkboxGroupContextKey } from './checkbox/src/constants.mjs';
|
106
106
|
export { colProps } from './col/src/col.mjs';
|
@@ -147,12 +147,12 @@ export { elPaginationKey } from './pagination/src/constants.mjs';
|
|
147
147
|
export { popconfirmEmits, popconfirmProps } from './popconfirm/src/popconfirm.mjs';
|
148
148
|
export { Effect, popperProps, roleTypes, usePopperProps } from './popper/src/popper.mjs';
|
149
149
|
export { popperTriggerProps, usePopperTriggerProps } from './popper/src/trigger.mjs';
|
150
|
-
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './popper/src/
|
150
|
+
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './popper/src/content.mjs';
|
151
151
|
export { popperArrowProps, usePopperArrowProps } from './popper/src/arrow.mjs';
|
152
152
|
export { POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY } from './popper/src/constants.mjs';
|
153
153
|
export { default as ElPopperArrow } from './popper/src/arrow2.mjs';
|
154
154
|
export { default as ElPopperTrigger } from './popper/src/trigger2.mjs';
|
155
|
-
export { default as ElPopperContent } from './popper/src/
|
155
|
+
export { default as ElPopperContent } from './popper/src/content2.mjs';
|
156
156
|
export { progressProps } from './progress/src/progress.mjs';
|
157
157
|
export { radioEmits, radioProps, radioPropsBase } from './radio/src/radio.mjs';
|
158
158
|
export { radioGroupEmits, radioGroupProps } from './radio/src/radio-group.mjs';
|
@@ -169,7 +169,7 @@ export { scrollbarContextKey } from './scrollbar/src/constants.mjs';
|
|
169
169
|
export { selectGroupKey, selectKey } from './select/src/token.mjs';
|
170
170
|
export { selectV2InjectionKey } from './select-v2/src/token.mjs';
|
171
171
|
export { skeletonProps } from './skeleton/src/skeleton.mjs';
|
172
|
-
export { skeletonItemProps } from './skeleton/src/skeleton-
|
172
|
+
export { skeletonItemProps } from './skeleton/src/skeleton-item2.mjs';
|
173
173
|
export { sliderEmits, sliderProps } from './slider/src/slider.mjs';
|
174
174
|
export { sliderContextKey } from './slider/src/constants.mjs';
|
175
175
|
export { spaceProps } from './space/src/space.mjs';
|
@@ -178,7 +178,7 @@ export { useSpace } from './space/src/use-space.mjs';
|
|
178
178
|
export { statisticProps } from './statistic/src/statistic.mjs';
|
179
179
|
export { stepProps } from './steps/src/item.mjs';
|
180
180
|
export { stepsEmits, stepsProps } from './steps/src/steps.mjs';
|
181
|
-
export { switchEmits, switchProps } from './switch/src/
|
181
|
+
export { switchEmits, switchProps } from './switch/src/switch.mjs';
|
182
182
|
export { Alignment as TableV2Alignment, FixedDir as TableV2FixedDir, SortOrder as TableV2SortOrder } from './table-v2/src/constants.mjs';
|
183
183
|
export { default as TableV2 } from './table-v2/src/table-v2.mjs';
|
184
184
|
export { placeholderSign as TableV2Placeholder } from './table-v2/src/private.mjs';
|
@@ -2,10 +2,10 @@ import '../../utils/index.mjs';
|
|
2
2
|
import Popper from './src/popper2.mjs';
|
3
3
|
export { default as ElPopperArrow } from './src/arrow2.mjs';
|
4
4
|
export { default as ElPopperTrigger } from './src/trigger2.mjs';
|
5
|
-
export { default as ElPopperContent } from './src/
|
5
|
+
export { default as ElPopperContent } from './src/content2.mjs';
|
6
6
|
export { Effect, popperProps, roleTypes, usePopperProps } from './src/popper.mjs';
|
7
7
|
export { popperTriggerProps, usePopperTriggerProps } from './src/trigger.mjs';
|
8
|
-
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './src/
|
8
|
+
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './src/content.mjs';
|
9
9
|
export { popperArrowProps, usePopperArrowProps } from './src/arrow.mjs';
|
10
10
|
export { POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY } from './src/constants.mjs';
|
11
11
|
import { withInstall } from '../../utils/vue/install.mjs';
|
@@ -1,143 +1,99 @@
|
|
1
|
-
import {
|
2
|
-
import { isNil } from 'lodash-unified';
|
1
|
+
import { placements } from '@popperjs/core';
|
3
2
|
import '../../../utils/index.mjs';
|
4
|
-
import '
|
5
|
-
import '
|
6
|
-
import {
|
7
|
-
import { popperContentProps, popperContentEmits } from './content2.mjs';
|
8
|
-
import './composables/index.mjs';
|
9
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
10
|
-
import { usePopperContentFocusTrap } from './composables/use-focus-trap.mjs';
|
11
|
-
import { usePopperContent } from './composables/use-content.mjs';
|
12
|
-
import { usePopperContentDOM } from './composables/use-content-dom.mjs';
|
13
|
-
import { formItemContextKey } from '../../form/src/constants.mjs';
|
14
|
-
import { NOOP } from '@vue/shared';
|
15
|
-
import { isElement } from '../../../utils/types.mjs';
|
16
|
-
import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
|
3
|
+
import '../../../hooks/index.mjs';
|
4
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
5
|
+
import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
|
17
6
|
|
18
|
-
const
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
const formItemContext = inject(formItemContextKey, void 0);
|
50
|
-
const arrowOffset = ref();
|
51
|
-
provide(POPPER_CONTENT_INJECTION_KEY, {
|
52
|
-
arrowStyle,
|
53
|
-
arrowRef,
|
54
|
-
arrowOffset
|
55
|
-
});
|
56
|
-
if (formItemContext) {
|
57
|
-
provide(formItemContextKey, {
|
58
|
-
...formItemContext,
|
59
|
-
addInputId: NOOP,
|
60
|
-
removeInputId: NOOP
|
61
|
-
});
|
62
|
-
}
|
63
|
-
let triggerTargetAriaStopWatch = void 0;
|
64
|
-
const updatePopper = (shouldUpdateZIndex = true) => {
|
65
|
-
update();
|
66
|
-
shouldUpdateZIndex && updateZIndex();
|
67
|
-
};
|
68
|
-
const togglePopperAlive = () => {
|
69
|
-
updatePopper(false);
|
70
|
-
if (props.visible && props.focusOnShow) {
|
71
|
-
trapped.value = true;
|
72
|
-
} else if (props.visible === false) {
|
73
|
-
trapped.value = false;
|
74
|
-
}
|
75
|
-
};
|
76
|
-
onMounted(() => {
|
77
|
-
watch(() => props.triggerTargetEl, (triggerTargetEl, prevTriggerTargetEl) => {
|
78
|
-
triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
|
79
|
-
triggerTargetAriaStopWatch = void 0;
|
80
|
-
const el = unref(triggerTargetEl || contentRef.value);
|
81
|
-
const prevEl = unref(prevTriggerTargetEl || contentRef.value);
|
82
|
-
if (isElement(el)) {
|
83
|
-
triggerTargetAriaStopWatch = watch([role, () => props.ariaLabel, ariaModal, () => props.id], (watches) => {
|
84
|
-
;
|
85
|
-
["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => {
|
86
|
-
isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
|
87
|
-
});
|
88
|
-
}, { immediate: true });
|
89
|
-
}
|
90
|
-
if (prevEl !== el && isElement(prevEl)) {
|
91
|
-
;
|
92
|
-
["role", "aria-label", "aria-modal", "id"].forEach((key) => {
|
93
|
-
prevEl.removeAttribute(key);
|
94
|
-
});
|
95
|
-
}
|
96
|
-
}, { immediate: true });
|
97
|
-
watch(() => props.visible, togglePopperAlive, { immediate: true });
|
98
|
-
});
|
99
|
-
onBeforeUnmount(() => {
|
100
|
-
triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
|
101
|
-
triggerTargetAriaStopWatch = void 0;
|
102
|
-
});
|
103
|
-
expose({
|
104
|
-
popperContentRef: contentRef,
|
105
|
-
popperInstanceRef: instanceRef,
|
106
|
-
updatePopper,
|
107
|
-
contentStyle
|
108
|
-
});
|
109
|
-
return (_ctx, _cache) => {
|
110
|
-
return openBlock(), createElementBlock("div", mergeProps({
|
111
|
-
ref_key: "contentRef",
|
112
|
-
ref: contentRef
|
113
|
-
}, unref(contentAttrs), {
|
114
|
-
style: unref(contentStyle),
|
115
|
-
class: unref(contentClass),
|
116
|
-
tabindex: "-1",
|
117
|
-
onMouseenter: (e) => _ctx.$emit("mouseenter", e),
|
118
|
-
onMouseleave: (e) => _ctx.$emit("mouseleave", e)
|
119
|
-
}), [
|
120
|
-
createVNode(unref(ElFocusTrap), {
|
121
|
-
trapped: unref(trapped),
|
122
|
-
"trap-on-focus-in": true,
|
123
|
-
"focus-trap-el": unref(contentRef),
|
124
|
-
"focus-start-el": unref(focusStartRef),
|
125
|
-
onFocusAfterTrapped: unref(onFocusAfterTrapped),
|
126
|
-
onFocusAfterReleased: unref(onFocusAfterReleased),
|
127
|
-
onFocusin: unref(onFocusInTrap),
|
128
|
-
onFocusoutPrevented: unref(onFocusoutPrevented),
|
129
|
-
onReleaseRequested: unref(onReleaseRequested)
|
130
|
-
}, {
|
131
|
-
default: withCtx(() => [
|
132
|
-
renderSlot(_ctx.$slots, "default")
|
133
|
-
]),
|
134
|
-
_: 3
|
135
|
-
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
|
136
|
-
], 16, ["onMouseenter", "onMouseleave"]);
|
137
|
-
};
|
7
|
+
const POSITIONING_STRATEGIES = ["fixed", "absolute"];
|
8
|
+
const popperCoreConfigProps = buildProps({
|
9
|
+
boundariesPadding: {
|
10
|
+
type: Number,
|
11
|
+
default: 0
|
12
|
+
},
|
13
|
+
fallbackPlacements: {
|
14
|
+
type: definePropType(Array),
|
15
|
+
default: void 0
|
16
|
+
},
|
17
|
+
gpuAcceleration: {
|
18
|
+
type: Boolean,
|
19
|
+
default: true
|
20
|
+
},
|
21
|
+
offset: {
|
22
|
+
type: Number,
|
23
|
+
default: 12
|
24
|
+
},
|
25
|
+
placement: {
|
26
|
+
type: String,
|
27
|
+
values: placements,
|
28
|
+
default: "bottom"
|
29
|
+
},
|
30
|
+
popperOptions: {
|
31
|
+
type: definePropType(Object),
|
32
|
+
default: () => ({})
|
33
|
+
},
|
34
|
+
strategy: {
|
35
|
+
type: String,
|
36
|
+
values: POSITIONING_STRATEGIES,
|
37
|
+
default: "absolute"
|
138
38
|
}
|
139
39
|
});
|
140
|
-
|
40
|
+
const popperContentProps = buildProps({
|
41
|
+
...popperCoreConfigProps,
|
42
|
+
id: String,
|
43
|
+
style: {
|
44
|
+
type: definePropType([String, Array, Object])
|
45
|
+
},
|
46
|
+
className: {
|
47
|
+
type: definePropType([String, Array, Object])
|
48
|
+
},
|
49
|
+
effect: {
|
50
|
+
type: definePropType(String),
|
51
|
+
default: "dark"
|
52
|
+
},
|
53
|
+
visible: Boolean,
|
54
|
+
enterable: {
|
55
|
+
type: Boolean,
|
56
|
+
default: true
|
57
|
+
},
|
58
|
+
pure: Boolean,
|
59
|
+
focusOnShow: {
|
60
|
+
type: Boolean,
|
61
|
+
default: false
|
62
|
+
},
|
63
|
+
trapping: {
|
64
|
+
type: Boolean,
|
65
|
+
default: false
|
66
|
+
},
|
67
|
+
popperClass: {
|
68
|
+
type: definePropType([String, Array, Object])
|
69
|
+
},
|
70
|
+
popperStyle: {
|
71
|
+
type: definePropType([String, Array, Object])
|
72
|
+
},
|
73
|
+
referenceEl: {
|
74
|
+
type: definePropType(Object)
|
75
|
+
},
|
76
|
+
triggerTargetEl: {
|
77
|
+
type: definePropType(Object)
|
78
|
+
},
|
79
|
+
stopPopperMouseEvent: {
|
80
|
+
type: Boolean,
|
81
|
+
default: true
|
82
|
+
},
|
83
|
+
virtualTriggering: Boolean,
|
84
|
+
zIndex: Number,
|
85
|
+
...useAriaProps(["ariaLabel"])
|
86
|
+
});
|
87
|
+
const popperContentEmits = {
|
88
|
+
mouseenter: (evt) => evt instanceof MouseEvent,
|
89
|
+
mouseleave: (evt) => evt instanceof MouseEvent,
|
90
|
+
focus: () => true,
|
91
|
+
blur: () => true,
|
92
|
+
close: () => true
|
93
|
+
};
|
94
|
+
const usePopperCoreConfigProps = popperCoreConfigProps;
|
95
|
+
const usePopperContentProps = popperContentProps;
|
96
|
+
const usePopperContentEmits = popperContentEmits;
|
141
97
|
|
142
|
-
export {
|
98
|
+
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps };
|
143
99
|
//# sourceMappingURL=content.mjs.map
|