@element-plus/nightly 0.0.20241122 → 0.0.20241124
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.full.js +26 -12
- package/dist/index.full.min.js +15 -15
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +15 -15
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +26 -13
- 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/autocomplete/src/autocomplete.vue.d.ts +2 -2
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/src/card.mjs +43 -21
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +21 -43
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/checkbox/index.mjs +2 -2
- package/es/components/checkbox/src/checkbox-group.mjs +30 -73
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-group2.mjs +73 -30
- package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker.d.ts +12 -11
- package/es/components/date-picker/src/date-picker.mjs.map +1 -1
- package/es/components/index.mjs +6 -6
- package/es/components/input/src/input.vue.d.ts +1 -1
- package/es/components/input/src/input2.mjs +4 -4
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown.mjs +167 -15
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +15 -167
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention.vue.d.ts +2 -2
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item.mjs +97 -14
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +14 -97
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/segmented/index.mjs +2 -2
- package/es/components/segmented/src/segmented.mjs +169 -34
- package/es/components/segmented/src/segmented.mjs.map +1 -1
- package/es/components/segmented/src/segmented2.mjs +34 -169
- package/es/components/segmented/src/segmented2.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton-item.mjs +18 -23
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +23 -18
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +1 -1
- package/es/components/time-picker/index.mjs +1 -1
- package/es/components/time-picker/src/common/picker.mjs +5 -5
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/time-picker/src/utils.d.ts +2 -0
- package/es/components/time-picker/src/utils.mjs +4 -1
- package/es/components/time-picker/src/utils.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel.vue.d.ts +1 -0
- package/es/components/transfer/src/transfer-panel2.mjs +6 -2
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer.vue.d.ts +4 -0
- package/es/components/transfer/src/transfer2.mjs +6 -0
- package/es/components/transfer/src/transfer2.mjs.map +1 -1
- package/es/index.mjs +6 -6
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +2 -2
- package/lib/components/card/index.js +2 -2
- package/lib/components/card/src/card.js +43 -21
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card2.js +21 -43
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/checkbox/index.js +2 -2
- package/lib/components/checkbox/src/checkbox-group.js +31 -73
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-group2.js +73 -31
- package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
- package/lib/components/date-picker/src/date-picker.d.ts +12 -11
- package/lib/components/date-picker/src/date-picker.js.map +1 -1
- package/lib/components/index.js +6 -5
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/src/input.vue.d.ts +1 -1
- package/lib/components/input/src/input2.js +4 -4
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown.js +167 -16
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +16 -167
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention.vue.d.ts +2 -2
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item.js +97 -15
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +15 -97
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/segmented/index.js +2 -2
- package/lib/components/segmented/src/segmented.js +168 -34
- package/lib/components/segmented/src/segmented.js.map +1 -1
- package/lib/components/segmented/src/segmented2.js +34 -168
- package/lib/components/segmented/src/segmented2.js.map +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton-item.js +18 -23
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +23 -18
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +1 -1
- package/lib/components/time-picker/index.js +1 -0
- package/lib/components/time-picker/index.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.js +4 -4
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/time-picker/src/utils.d.ts +2 -0
- package/lib/components/time-picker/src/utils.js +4 -0
- package/lib/components/time-picker/src/utils.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel.vue.d.ts +1 -0
- package/lib/components/transfer/src/transfer-panel2.js +6 -2
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer.vue.d.ts +4 -0
- package/lib/components/transfer/src/transfer2.js +6 -0
- package/lib/components/transfer/src/transfer2.js.map +1 -1
- package/lib/index.js +6 -5
- package/lib/index.js.map +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,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-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.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;;;;"}
|
@@ -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-group.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-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.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,IA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F,OAAAA,SAAA,EAAA,EAAAC,WAAA,CAAAC,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,EAAA;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { type DateModelType, type SingleOrRange } from '@element-plus/nightly/es/components/time-picker';
|
1
2
|
declare const _default: import("vue").DefineComponent<{
|
2
3
|
readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => import("./date-picker.type").IDatePickerType) | ((new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => import("./date-picker.type").IDatePickerType))[], unknown, unknown, "date", boolean>;
|
3
4
|
readonly showNow: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
@@ -42,13 +43,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
42
43
|
__epPropKey: true;
|
43
44
|
};
|
44
45
|
readonly id: {
|
45
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | [string, string]) | (() =>
|
46
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | [string, string]) | (() => SingleOrRange<string>) | ((new (...args: any[]) => string | [string, string]) | (() => SingleOrRange<string>))[], unknown, unknown>>;
|
46
47
|
readonly required: false;
|
47
48
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
48
49
|
__epPropKey: true;
|
49
50
|
};
|
50
51
|
readonly name: {
|
51
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | [string, string]) | (() =>
|
52
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | [string, string]) | (() => SingleOrRange<string>) | ((new (...args: any[]) => string | [string, string]) | (() => SingleOrRange<string>))[], unknown, unknown>>;
|
52
53
|
readonly required: false;
|
53
54
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
54
55
|
__epPropKey: true;
|
@@ -77,18 +78,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
77
78
|
readonly disabled: BooleanConstructor;
|
78
79
|
readonly placeholder: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
79
80
|
readonly popperOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("@popperjs/core").Options>) | (() => Partial<import("@popperjs/core").Options>) | ((new (...args: any[]) => Partial<import("@popperjs/core").Options>) | (() => Partial<import("@popperjs/core").Options>))[], unknown, unknown, () => {}, boolean>;
|
80
|
-
readonly modelValue: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => string | number | string[] | Date | [
|
81
|
+
readonly modelValue: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => string | number | string[] | Date | [DateModelType, DateModelType]) | (() => import("@element-plus/nightly/es/components/time-picker").ModelValueType) | ((new (...args: any[]) => string | number | string[] | Date | [DateModelType, DateModelType]) | (() => import("@element-plus/nightly/es/components/time-picker").ModelValueType))[], unknown, unknown, "", boolean>;
|
81
82
|
readonly rangeSeparator: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "-", boolean>;
|
82
83
|
readonly startPlaceholder: StringConstructor;
|
83
84
|
readonly endPlaceholder: StringConstructor;
|
84
85
|
readonly defaultValue: {
|
85
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() =>
|
86
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => SingleOrRange<Date>))[], unknown, unknown>>;
|
86
87
|
readonly required: false;
|
87
88
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
88
89
|
__epPropKey: true;
|
89
90
|
};
|
90
91
|
readonly defaultTime: {
|
91
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() =>
|
92
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => SingleOrRange<Date>))[], unknown, unknown>>;
|
92
93
|
readonly required: false;
|
93
94
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
94
95
|
__epPropKey: true;
|
@@ -138,13 +139,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
138
139
|
__epPropKey: true;
|
139
140
|
};
|
140
141
|
readonly id: {
|
141
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | [string, string]) | (() =>
|
142
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | [string, string]) | (() => SingleOrRange<string>) | ((new (...args: any[]) => string | [string, string]) | (() => SingleOrRange<string>))[], unknown, unknown>>;
|
142
143
|
readonly required: false;
|
143
144
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
144
145
|
__epPropKey: true;
|
145
146
|
};
|
146
147
|
readonly name: {
|
147
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | [string, string]) | (() =>
|
148
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | [string, string]) | (() => SingleOrRange<string>) | ((new (...args: any[]) => string | [string, string]) | (() => SingleOrRange<string>))[], unknown, unknown>>;
|
148
149
|
readonly required: false;
|
149
150
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
150
151
|
__epPropKey: true;
|
@@ -173,18 +174,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
173
174
|
readonly disabled: BooleanConstructor;
|
174
175
|
readonly placeholder: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
175
176
|
readonly popperOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("@popperjs/core").Options>) | (() => Partial<import("@popperjs/core").Options>) | ((new (...args: any[]) => Partial<import("@popperjs/core").Options>) | (() => Partial<import("@popperjs/core").Options>))[], unknown, unknown, () => {}, boolean>;
|
176
|
-
readonly modelValue: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => string | number | string[] | Date | [
|
177
|
+
readonly modelValue: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => string | number | string[] | Date | [DateModelType, DateModelType]) | (() => import("@element-plus/nightly/es/components/time-picker").ModelValueType) | ((new (...args: any[]) => string | number | string[] | Date | [DateModelType, DateModelType]) | (() => import("@element-plus/nightly/es/components/time-picker").ModelValueType))[], unknown, unknown, "", boolean>;
|
177
178
|
readonly rangeSeparator: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "-", boolean>;
|
178
179
|
readonly startPlaceholder: StringConstructor;
|
179
180
|
readonly endPlaceholder: StringConstructor;
|
180
181
|
readonly defaultValue: {
|
181
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() =>
|
182
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => SingleOrRange<Date>))[], unknown, unknown>>;
|
182
183
|
readonly required: false;
|
183
184
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
184
185
|
__epPropKey: true;
|
185
186
|
};
|
186
187
|
readonly defaultTime: {
|
187
|
-
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() =>
|
188
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => SingleOrRange<Date>))[], unknown, unknown>>;
|
188
189
|
readonly required: false;
|
189
190
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
190
191
|
__epPropKey: true;
|
@@ -196,7 +197,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
196
197
|
readonly disabled: boolean;
|
197
198
|
readonly type: import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => import("./date-picker.type").IDatePickerType) | ((new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => import("./date-picker.type").IDatePickerType))[], unknown, unknown>;
|
198
199
|
readonly placeholder: string;
|
199
|
-
readonly modelValue: import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | string[] | Date | [
|
200
|
+
readonly modelValue: import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | string[] | Date | [DateModelType, DateModelType]) | (() => import("@element-plus/nightly/es/components/time-picker").ModelValueType) | ((new (...args: any[]) => string | number | string[] | Date | [DateModelType, DateModelType]) | (() => import("@element-plus/nightly/es/components/time-picker").ModelValueType))[], unknown, unknown>;
|
200
201
|
readonly placement: import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => "top" | "bottom" | "left" | "right" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement) | ((new (...args: any[]) => "top" | "bottom" | "left" | "right" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement))[], import("@popperjs/core").Placement, unknown>;
|
201
202
|
readonly tabindex: import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>;
|
202
203
|
readonly valueOnClear: import("@element-plus/nightly/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor, BooleanConstructor, FunctionConstructor], unknown, unknown>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"date-picker.mjs","sources":["../../../../../../packages/components/date-picker/src/date-picker.tsx"],"sourcesContent":["import { defineComponent, provide, reactive, ref, toRef } from 'vue'\nimport dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js'\nimport advancedFormat from 'dayjs/plugin/advancedFormat.js'\nimport localeData from 'dayjs/plugin/localeData.js'\nimport weekOfYear from 'dayjs/plugin/weekOfYear.js'\nimport weekYear from 'dayjs/plugin/weekYear.js'\nimport dayOfYear from 'dayjs/plugin/dayOfYear.js'\nimport isSameOrAfter from 'dayjs/plugin/isSameOrAfter.js'\nimport isSameOrBefore from 'dayjs/plugin/isSameOrBefore.js'\nimport { useNamespace } from '@element-plus/hooks'\nimport {\n CommonPicker,\n DEFAULT_FORMATS_DATE,\n DEFAULT_FORMATS_DATEPICKER,\n} from '@element-plus/components/time-picker'\nimport { ROOT_PICKER_INJECTION_KEY } from './constants'\n\nimport { datePickerProps } from './props/date-picker'\nimport { getPanel } from './panel-utils'\nimport type { DatePickerExpose } from './instance'\n\ndayjs.extend(localeData)\ndayjs.extend(advancedFormat)\ndayjs.extend(customParseFormat)\ndayjs.extend(weekOfYear)\ndayjs.extend(weekYear)\ndayjs.extend(dayOfYear)\ndayjs.extend(isSameOrAfter)\ndayjs.extend(isSameOrBefore)\n\nexport default defineComponent({\n name: 'ElDatePicker',\n install: null,\n props: datePickerProps,\n emits: ['update:modelValue'],\n setup(props, { expose, emit, slots }) {\n const ns = useNamespace('picker-panel')\n\n provide('ElPopperOptions', reactive(toRef(props, 'popperOptions')))\n provide(ROOT_PICKER_INJECTION_KEY, {\n slots,\n pickerNs: ns,\n })\n\n const commonPicker = ref<InstanceType<typeof CommonPicker>>()\n const refProps: DatePickerExpose = {\n focus: () => {\n commonPicker.value?.focus()\n },\n blur: () => {\n commonPicker.value?.blur()\n },\n handleOpen: () => {\n commonPicker.value?.handleOpen()\n },\n handleClose: () => {\n commonPicker.value?.handleClose()\n },\n }\n\n expose(refProps)\n\n const onModelValueUpdated = (val:
|
1
|
+
{"version":3,"file":"date-picker.mjs","sources":["../../../../../../packages/components/date-picker/src/date-picker.tsx"],"sourcesContent":["import { defineComponent, provide, reactive, ref, toRef } from 'vue'\nimport dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js'\nimport advancedFormat from 'dayjs/plugin/advancedFormat.js'\nimport localeData from 'dayjs/plugin/localeData.js'\nimport weekOfYear from 'dayjs/plugin/weekOfYear.js'\nimport weekYear from 'dayjs/plugin/weekYear.js'\nimport dayOfYear from 'dayjs/plugin/dayOfYear.js'\nimport isSameOrAfter from 'dayjs/plugin/isSameOrAfter.js'\nimport isSameOrBefore from 'dayjs/plugin/isSameOrBefore.js'\nimport { useNamespace } from '@element-plus/hooks'\nimport {\n CommonPicker,\n DEFAULT_FORMATS_DATE,\n DEFAULT_FORMATS_DATEPICKER,\n type DateModelType,\n type SingleOrRange,\n} from '@element-plus/components/time-picker'\nimport { ROOT_PICKER_INJECTION_KEY } from './constants'\n\nimport { datePickerProps } from './props/date-picker'\nimport { getPanel } from './panel-utils'\nimport type { DatePickerExpose } from './instance'\n\ndayjs.extend(localeData)\ndayjs.extend(advancedFormat)\ndayjs.extend(customParseFormat)\ndayjs.extend(weekOfYear)\ndayjs.extend(weekYear)\ndayjs.extend(dayOfYear)\ndayjs.extend(isSameOrAfter)\ndayjs.extend(isSameOrBefore)\n\nexport default defineComponent({\n name: 'ElDatePicker',\n install: null,\n props: datePickerProps,\n emits: ['update:modelValue'],\n setup(props, { expose, emit, slots }) {\n const ns = useNamespace('picker-panel')\n\n provide('ElPopperOptions', reactive(toRef(props, 'popperOptions')))\n provide(ROOT_PICKER_INJECTION_KEY, {\n slots,\n pickerNs: ns,\n })\n\n const commonPicker = ref<InstanceType<typeof CommonPicker>>()\n const refProps: DatePickerExpose = {\n focus: () => {\n commonPicker.value?.focus()\n },\n blur: () => {\n commonPicker.value?.blur()\n },\n handleOpen: () => {\n commonPicker.value?.handleOpen()\n },\n handleClose: () => {\n commonPicker.value?.handleClose()\n },\n }\n\n expose(refProps)\n\n const onModelValueUpdated = (val: SingleOrRange<DateModelType> | null) => {\n emit('update:modelValue', val)\n }\n\n return () => {\n // since props always have all defined keys on it, {format, ...props} will always overwrite format\n // pick props.format or provide default value here before spreading\n const format =\n props.format ??\n (DEFAULT_FORMATS_DATEPICKER[props.type] || DEFAULT_FORMATS_DATE)\n\n const Component = getPanel(props.type)\n\n return (\n <CommonPicker\n {...props}\n format={format}\n type={props.type}\n ref={commonPicker}\n onUpdate:modelValue={onModelValueUpdated}\n >\n {{\n default: (scopedProps: /**FIXME: remove any type */ any) => (\n <Component {...scopedProps}>\n {{\n 'prev-month': slots['prev-month'],\n 'next-month': slots['next-month'],\n 'prev-year': slots['prev-year'],\n 'next-year': slots['next-year'],\n }}\n </Component>\n ),\n 'range-separator': slots['range-separator'],\n }}\n </CommonPicker>\n )\n }\n },\n})\n"],"names":["dayjs","extend","localeData","advancedFormat","customParseFormat","weekOfYear","weekYear","dayOfYear","isSameOrAfter","isSameOrBefore","defineComponent","name","install","props","datePickerProps","emits","expose","emit","slots","provide","reactive","pickerNs","commonPicker","focus","blur","handleOpen","handleClose","refProps","onModelValueUpdated","format","DEFAULT_FORMATS_DATEPIC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UAKH,WAAaA,EAAAA,KAAK,CAAC,WAAD,CALf;UAMH,WAAaA,EAAAA,KAAK,CAAC,WAAD,CAAA;SAf9B,CAAA;QAmBM,iBAAmBA,EAAAA,KAAK,CAAC,iBAAD,CAAA;AAnB9B,OAAA,CAAA,CAAA;KATF,CAAA;AAiCD,GAAA;;;;;"}
|
package/es/components/index.mjs
CHANGED
@@ -92,7 +92,7 @@ export { breadcrumbKey } from './breadcrumb/src/constants.mjs';
|
|
92
92
|
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './button/src/button.mjs';
|
93
93
|
export { buttonGroupContextKey } from './button/src/constants.mjs';
|
94
94
|
export { calendarEmits, calendarProps } from './calendar/src/calendar.mjs';
|
95
|
-
export { cardProps } from './card/src/
|
95
|
+
export { cardProps } from './card/src/card2.mjs';
|
96
96
|
export { carouselEmits, carouselProps } from './carousel/src/carousel.mjs';
|
97
97
|
export { carouselItemProps } from './carousel/src/carousel-item.mjs';
|
98
98
|
export { CAROUSEL_ITEM_NAME, carouselContextKey } from './carousel/src/constants.mjs';
|
@@ -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-group.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';
|
@@ -137,7 +137,7 @@ export { inputEmits, inputProps } from './input/src/input.mjs';
|
|
137
137
|
export { inputNumberEmits, inputNumberProps } from './input-number/src/input-number.mjs';
|
138
138
|
export { linkEmits, linkProps } from './link/src/link.mjs';
|
139
139
|
export { menuEmits, menuProps } from './menu/src/menu.mjs';
|
140
|
-
export { menuItemEmits, menuItemProps } from './menu/src/menu-
|
140
|
+
export { menuItemEmits, menuItemProps } from './menu/src/menu-item2.mjs';
|
141
141
|
export { menuItemGroupProps } from './menu/src/menu-item-group.mjs';
|
142
142
|
export { subMenuProps } from './menu/src/sub-menu.mjs';
|
143
143
|
export { overlayEmits, overlayProps } from './overlay/src/overlay.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-item.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';
|
@@ -192,7 +192,7 @@ export { tabPaneProps } from './tabs/src/tab-pane.mjs';
|
|
192
192
|
export { tabsRootContextKey } from './tabs/src/constants.mjs';
|
193
193
|
export { tagEmits, tagProps } from './tag/src/tag.mjs';
|
194
194
|
export { textProps } from './text/src/text.mjs';
|
195
|
-
export { buildTimeList, dateEquals, extractDateFormat, extractTimeFormat, formatter, makeList, parseDate, rangeArr, valueEquals } from './time-picker/src/utils.mjs';
|
195
|
+
export { buildTimeList, dateEquals, dayOrDaysToDate, extractDateFormat, extractTimeFormat, formatter, makeList, parseDate, rangeArr, valueEquals } from './time-picker/src/utils.mjs';
|
196
196
|
export { DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME, timeUnits } from './time-picker/src/constants.mjs';
|
197
197
|
export { timePickerDefaultProps, timePickerRngeTriggerProps } from './time-picker/src/common/props.mjs';
|
198
198
|
export { default as CommonPicker } from './time-picker/src/common/picker.mjs';
|
@@ -219,7 +219,7 @@ export { tourEmits, tourProps } from './tour/src/tour.mjs';
|
|
219
219
|
export { tourStepEmits, tourStepProps } from './tour/src/step.mjs';
|
220
220
|
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './tour/src/content.mjs';
|
221
221
|
export { anchorEmits, anchorProps } from './anchor/src/anchor.mjs';
|
222
|
-
export { segmentedEmits, segmentedProps } from './segmented/src/
|
222
|
+
export { segmentedEmits, segmentedProps } from './segmented/src/segmented2.mjs';
|
223
223
|
export { mentionEmits, mentionProps } from './mention/src/mention.mjs';
|
224
224
|
export { vLoading as ElLoadingDirective, vLoading } from './loading/src/directive.mjs';
|
225
225
|
export { Loading as ElLoadingService } from './loading/src/service.mjs';
|
@@ -103,7 +103,7 @@ declare const __VLS_component: import("vue").DefineComponent<{
|
|
103
103
|
/** @description is input composing */
|
104
104
|
isComposing: import("vue").Ref<boolean>;
|
105
105
|
/** @description HTML input element native method */
|
106
|
-
focus: () =>
|
106
|
+
focus: () => void | undefined;
|
107
107
|
/** @description HTML input element native method */
|
108
108
|
blur: () => void | undefined;
|
109
109
|
/** @description HTML input element native method */
|
@@ -183,13 +183,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
183
183
|
handleCompositionEnd
|
184
184
|
} = useComposition({ emit, afterComposition: handleInput });
|
185
185
|
const handlePasswordVisible = () => {
|
186
|
+
recordCursor();
|
186
187
|
passwordVisible.value = !passwordVisible.value;
|
187
|
-
|
188
|
+
setTimeout(setCursor);
|
188
189
|
};
|
189
|
-
const focus =
|
190
|
+
const focus = () => {
|
190
191
|
var _a;
|
191
|
-
|
192
|
-
(_a = _ref.value) == null ? void 0 : _a.focus();
|
192
|
+
return (_a = _ref.value) == null ? void 0 : _a.focus();
|
193
193
|
};
|
194
194
|
const blur = () => {
|
195
195
|
var _a;
|