@element-plus/nightly 0.0.20240824 → 0.0.20240825
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +2 -2
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2 -2
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/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/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb.mjs +38 -11
- package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb2.mjs +11 -38
- package/es/components/breadcrumb/src/breadcrumb2.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/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse.mjs +18 -28
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +28 -18
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.mjs +26 -89
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content2.mjs +89 -26
- package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -1
- package/es/components/dialog/src/dialog2.mjs +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +27 -181
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +181 -27
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form.mjs +153 -54
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form2.mjs +54 -153
- package/es/components/form/src/form2.mjs.map +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +233 -64
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +64 -233
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/index.mjs +7 -7
- package/es/components/input-number/index.mjs +2 -2
- package/es/components/input-number/src/input-number.mjs +329 -60
- package/es/components/input-number/src/input-number.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +60 -329
- package/es/components/input-number/src/input-number2.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/mention2.mjs +1 -1
- package/es/index.mjs +7 -7
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb.js +38 -11
- package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb2.js +11 -38
- package/lib/components/breadcrumb/src/breadcrumb2.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/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse.js +20 -28
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +28 -20
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.js +26 -88
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/dialog/src/dialog-content2.js +88 -26
- package/lib/components/dialog/src/dialog-content2.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +1 -1
- package/lib/components/dialog/src/dialog2.js +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +28 -181
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +181 -28
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form.js +152 -55
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form2.js +55 -152
- package/lib/components/form/src/form2.js.map +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +232 -64
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +64 -232
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/index.js +7 -7
- package/lib/components/input-number/index.js +2 -2
- package/lib/components/input-number/src/input-number.js +327 -59
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +59 -327
- package/lib/components/input-number/src/input-number2.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/mention2.js +1 -1
- package/lib/index.js +7 -7
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-group.js","sources":["../../../../../../packages/components/checkbox/src/checkbox-group.
|
|
1
|
+
{"version":3,"file":"checkbox-group.js","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":["useNamespace","useFormItem","useFormItemInputId","UPDATE_MODEL_EVENT","nextTick","computed","provide","checkboxGroupContextKey","pick","toRefs","watch","debugWarn"],"mappings":";;;;;;;;;;;;;;;;;;uCA2Bc,CAAA;AAAA,EACZ,IAAM,EAAA,iBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,UAAU,CAAA,CAAA;AAElC,IAAM,MAAA,EAAE,aAAaC,uBAAY,EAAA,CAAA;AACjC,IAAA,MAAM,EAAE,OAAA,EAAS,OAAS,EAAA,mBAAA,EAAA,GAAwBC,+BAAmB,KAAO,EAAA;AAAA,MAC1E,eAAiB,EAAA,QAAA;AAAA,KAClB,CAAA,CAAA;AAED,IAAM,MAAA,WAAA,GAAc,OAAO,KAAkC,KAAA;AAC3D,MAAA,IAAA,CAAKC,0BAAoB,KAAK,CAAA,CAAA;AAC9B,MAAA,MAAMC,YAAS,EAAA,CAAA;AACf,MAAA,IAAA,CAAK,UAAU,KAAK,CAAA,CAAA;AAAA,KACtB,CAAA;AAEA,IAAA,MAAM,aAAaC,YAAS,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,IAAAC,WAAA,CAAQC,iCAAyB,EAAA;AAAA,MAC/B,GAAGC,kBAAA,CAAKC,UAAO,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,IACEC,SAAA,CAAA,MAAM,KAAM,CAAA,UAAA,EACZ,MAAM;AACJ,MAAA,IAAI,MAAM,aAAe,EAAA;AACvB,QAAU,QAAA,IAAA,IAAA,GAAS,SAAU,QAAO,CAAQ,QAAA,CAAA,QAAU,OAAI,CAAA,CAAA,GAAA,KAAAC,eAAA,CAAA,GAAA,CAAA,CAAA,CAAA;AAAA,OAC5D;AAAA,KAEJ,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,83 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var lodashUnified = require('lodash-unified');
|
|
7
5
|
require('../../../constants/index.js');
|
|
8
|
-
require('../../../utils/index.js');
|
|
9
6
|
require('../../../hooks/index.js');
|
|
10
|
-
require('
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
15
|
-
var useFormItem = require('../../form/src/hooks/use-form-item.js');
|
|
7
|
+
require('../../../utils/index.js');
|
|
8
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
9
|
+
var index = require('../../../hooks/use-size/index.js');
|
|
10
|
+
var index$1 = require('../../../hooks/use-aria/index.js');
|
|
16
11
|
var event = require('../../../constants/event.js');
|
|
17
|
-
var
|
|
12
|
+
var shared = require('@vue/shared');
|
|
18
13
|
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
get() {
|
|
40
|
-
return props.modelValue;
|
|
41
|
-
},
|
|
42
|
-
set(val) {
|
|
43
|
-
changeEvent(val);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
vue.provide(constants.checkboxGroupContextKey, {
|
|
47
|
-
...lodashUnified.pick(vue.toRefs(props), [
|
|
48
|
-
"size",
|
|
49
|
-
"min",
|
|
50
|
-
"max",
|
|
51
|
-
"disabled",
|
|
52
|
-
"validateEvent",
|
|
53
|
-
"fill",
|
|
54
|
-
"textColor"
|
|
55
|
-
]),
|
|
56
|
-
modelValue,
|
|
57
|
-
changeEvent
|
|
58
|
-
});
|
|
59
|
-
vue.watch(() => props.modelValue, () => {
|
|
60
|
-
if (props.validateEvent) {
|
|
61
|
-
formItem == null ? void 0 : formItem.validate("change").catch((err) => error.debugWarn(err));
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
return (_ctx, _cache) => {
|
|
65
|
-
var _a;
|
|
66
|
-
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), {
|
|
67
|
-
id: vue.unref(groupId),
|
|
68
|
-
class: vue.normalizeClass(vue.unref(ns).b("group")),
|
|
69
|
-
role: "group",
|
|
70
|
-
"aria-label": !vue.unref(isLabeledByFormItem) ? _ctx.ariaLabel || "checkbox-group" : void 0,
|
|
71
|
-
"aria-labelledby": vue.unref(isLabeledByFormItem) ? (_a = vue.unref(formItem)) == null ? void 0 : _a.labelId : void 0
|
|
72
|
-
}, {
|
|
73
|
-
default: vue.withCtx(() => [
|
|
74
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
75
|
-
]),
|
|
76
|
-
_: 3
|
|
77
|
-
}, 8, ["id", "class", "aria-label", "aria-labelledby"]);
|
|
78
|
-
};
|
|
79
|
-
}
|
|
14
|
+
const checkboxGroupProps = runtime.buildProps({
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: runtime.definePropType(Array),
|
|
17
|
+
default: () => []
|
|
18
|
+
},
|
|
19
|
+
disabled: Boolean,
|
|
20
|
+
min: Number,
|
|
21
|
+
max: Number,
|
|
22
|
+
size: index.useSizeProp,
|
|
23
|
+
fill: String,
|
|
24
|
+
textColor: String,
|
|
25
|
+
tag: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "div"
|
|
28
|
+
},
|
|
29
|
+
validateEvent: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: true
|
|
32
|
+
},
|
|
33
|
+
...index$1.useAriaProps(["ariaLabel"])
|
|
80
34
|
});
|
|
81
|
-
|
|
35
|
+
const checkboxGroupEmits = {
|
|
36
|
+
[event.UPDATE_MODEL_EVENT]: (val) => shared.isArray(val),
|
|
37
|
+
change: (val) => shared.isArray(val)
|
|
38
|
+
};
|
|
82
39
|
|
|
83
|
-
exports
|
|
40
|
+
exports.checkboxGroupEmits = checkboxGroupEmits;
|
|
41
|
+
exports.checkboxGroupProps = checkboxGroupProps;
|
|
84
42
|
//# sourceMappingURL=checkbox-group2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-group2.js","sources":["../../../../../../packages/components/checkbox/src/checkbox-group.
|
|
1
|
+
{"version":3,"file":"checkbox-group2.js","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":["buildProps","definePropType","useSizeProp","useAriaProps","UPDATE_MODEL_EVENT","isArray"],"mappings":";;;;;;;;;;;;;AAGY,MAAC,kBAAkB,GAAGA,kBAAU,CAAC;AAC7C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAEC,sBAAc,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,EAAEC,iBAAW;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,GAAGC,oBAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAG;AAClC,EAAE,CAACC,wBAAkB,GAAG,CAAC,GAAG,KAAKC,cAAO,CAAC,GAAG,CAAC;AAC7C,EAAE,MAAM,EAAE,CAAC,GAAG,KAAKA,cAAO,CAAC,GAAG,CAAC;AAC/B;;;;;"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var collapse$1 = require('./src/
|
|
6
|
+
var collapse$1 = require('./src/collapse2.js');
|
|
7
7
|
var collapseItem$1 = require('./src/collapse-item2.js');
|
|
8
|
-
var collapse = require('./src/
|
|
8
|
+
var collapse = require('./src/collapse.js');
|
|
9
9
|
var collapseItem = require('./src/collapse-item.js');
|
|
10
10
|
var constants = require('./src/constants.js');
|
|
11
11
|
var install = require('../../utils/vue/install.js');
|
|
@@ -2,36 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
var
|
|
5
|
+
require('../../../utils/index.js');
|
|
6
|
+
require('../../../constants/index.js');
|
|
7
|
+
var types = require('../../../utils/types.js');
|
|
8
|
+
var shared = require('@vue/shared');
|
|
9
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
10
|
+
var typescript = require('../../../utils/typescript.js');
|
|
11
|
+
var event = require('../../../constants/event.js');
|
|
9
12
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
emits: collapse.collapseEmits,
|
|
17
|
-
setup(__props, { expose, emit }) {
|
|
18
|
-
const props = __props;
|
|
19
|
-
const { activeNames, setActiveNames } = useCollapse.useCollapse(props, emit);
|
|
20
|
-
const { rootKls } = useCollapse.useCollapseDOM();
|
|
21
|
-
expose({
|
|
22
|
-
activeNames,
|
|
23
|
-
setActiveNames
|
|
24
|
-
});
|
|
25
|
-
return (_ctx, _cache) => {
|
|
26
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
27
|
-
class: vue.normalizeClass(vue.unref(rootKls))
|
|
28
|
-
}, [
|
|
29
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
30
|
-
], 2);
|
|
31
|
-
};
|
|
13
|
+
const emitChangeFn = (value) => types.isNumber(value) || shared.isString(value) || shared.isArray(value);
|
|
14
|
+
const collapseProps = runtime.buildProps({
|
|
15
|
+
accordion: Boolean,
|
|
16
|
+
modelValue: {
|
|
17
|
+
type: runtime.definePropType([Array, String, Number]),
|
|
18
|
+
default: () => typescript.mutable([])
|
|
32
19
|
}
|
|
33
20
|
});
|
|
34
|
-
|
|
21
|
+
const collapseEmits = {
|
|
22
|
+
[event.UPDATE_MODEL_EVENT]: emitChangeFn,
|
|
23
|
+
[event.CHANGE_EVENT]: emitChangeFn
|
|
24
|
+
};
|
|
35
25
|
|
|
36
|
-
exports
|
|
26
|
+
exports.collapseEmits = collapseEmits;
|
|
27
|
+
exports.collapseProps = collapseProps;
|
|
28
|
+
exports.emitChangeFn = emitChangeFn;
|
|
37
29
|
//# sourceMappingURL=collapse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapse.js","sources":["../../../../../../packages/components/collapse/src/collapse.
|
|
1
|
+
{"version":3,"file":"collapse.js","sources":["../../../../../../packages/components/collapse/src/collapse.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isArray,\n isNumber,\n isString,\n mutable,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Arrayable } from '@element-plus/utils'\n\nexport type CollapseActiveName = string | number\nexport type CollapseModelValue = Arrayable<CollapseActiveName>\n\nexport const emitChangeFn = (value: CollapseModelValue) =>\n isNumber(value) || isString(value) || isArray(value)\n\nexport const collapseProps = buildProps({\n /**\n * @description whether to activate accordion mode\n */\n accordion: Boolean,\n /**\n * @description currently active panel, the type is `string` in accordion mode, otherwise it is `array`\n */\n modelValue: {\n type: definePropType<CollapseModelValue>([Array, String, Number]),\n default: () => mutable([] as const),\n },\n} as const)\nexport type CollapseProps = ExtractPropTypes<typeof collapseProps>\n\nexport const collapseEmits = {\n [UPDATE_MODEL_EVENT]: emitChangeFn,\n [CHANGE_EVENT]: emitChangeFn,\n}\nexport type CollapseEmits = typeof collapseEmits\n"],"names":["isNumber","isString","isArray","buildProps","definePropType","mutable","UPDATE_MODEL_EVENT","CHANGE_EVENT"],"mappings":";;;;;;;;;;;;AASY,MAAC,YAAY,GAAG,CAAC,KAAK,KAAKA,cAAQ,CAAC,KAAK,CAAC,IAAIC,eAAQ,CAAC,KAAK,CAAC,IAAIC,cAAO,CAAC,KAAK,EAAE;AAChF,MAAC,aAAa,GAAGC,kBAAU,CAAC;AACxC,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACjD,IAAI,OAAO,EAAE,MAAMC,kBAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAACC,wBAAkB,GAAG,YAAY;AACpC,EAAE,CAACC,kBAAY,GAAG,YAAY;AAC9B;;;;;;"}
|
|
@@ -2,28 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
require('
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
10
|
-
var typescript = require('../../../utils/typescript.js');
|
|
11
|
-
var event = require('../../../constants/event.js');
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var collapse = require('./collapse.js');
|
|
7
|
+
var useCollapse = require('./use-collapse.js');
|
|
8
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
12
9
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
const __default__ = vue.defineComponent({
|
|
11
|
+
name: "ElCollapse"
|
|
12
|
+
});
|
|
13
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
14
|
+
...__default__,
|
|
15
|
+
props: collapse.collapseProps,
|
|
16
|
+
emits: collapse.collapseEmits,
|
|
17
|
+
setup(__props, { expose, emit }) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const { activeNames, setActiveNames } = useCollapse.useCollapse(props, emit);
|
|
20
|
+
const { rootKls } = useCollapse.useCollapseDOM();
|
|
21
|
+
expose({
|
|
22
|
+
activeNames,
|
|
23
|
+
setActiveNames
|
|
24
|
+
});
|
|
25
|
+
return (_ctx, _cache) => {
|
|
26
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
27
|
+
class: vue.normalizeClass(vue.unref(rootKls))
|
|
28
|
+
}, [
|
|
29
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
30
|
+
], 2);
|
|
31
|
+
};
|
|
19
32
|
}
|
|
20
33
|
});
|
|
21
|
-
|
|
22
|
-
[event.UPDATE_MODEL_EVENT]: emitChangeFn,
|
|
23
|
-
[event.CHANGE_EVENT]: emitChangeFn
|
|
24
|
-
};
|
|
34
|
+
var Collapse = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "collapse.vue"]]);
|
|
25
35
|
|
|
26
|
-
exports
|
|
27
|
-
exports.collapseProps = collapseProps;
|
|
28
|
-
exports.emitChangeFn = emitChangeFn;
|
|
36
|
+
exports["default"] = Collapse;
|
|
29
37
|
//# sourceMappingURL=collapse2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapse2.js","sources":["../../../../../../packages/components/collapse/src/collapse.
|
|
1
|
+
{"version":3,"file":"collapse2.js","sources":["../../../../../../packages/components/collapse/src/collapse.vue"],"sourcesContent":["<template>\n <div :class=\"rootKls\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { collapseEmits, collapseProps } from './collapse'\nimport { useCollapse, useCollapseDOM } from './use-collapse'\n\ndefineOptions({\n name: 'ElCollapse',\n})\nconst props = defineProps(collapseProps)\nconst emit = defineEmits(collapseEmits)\n\nconst { activeNames, setActiveNames } = useCollapse(props, emit)\n\nconst { rootKls } = useCollapseDOM()\n\ndefineExpose({\n /** @description active names */\n activeNames,\n /** @description set active names */\n setActiveNames,\n})\n</script>\n"],"names":["useCollapse","useCollapseDOM"],"mappings":";;;;;;;;;uCAUc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,EAAE,WAAA,EAAa,cAAmB,EAAA,GAAAA,uBAAA,CAAY,OAAO,IAAI,CAAA,CAAA;AAE/D,IAAM,MAAA,EAAE,YAAYC,0BAAe,EAAA,CAAA;AAEnC,IAAa,MAAA,CAAA;AAAA,MAEX,WAAA;AAAA,MAEA,cAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;"}
|
|
@@ -2,98 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var index$2 = require('../../icon/index.js');
|
|
7
|
-
require('../../focus-trap/index.js');
|
|
8
|
-
require('../../../hooks/index.js');
|
|
9
5
|
require('../../../utils/index.js');
|
|
10
|
-
var
|
|
11
|
-
var dialogContent = require('./dialog-content2.js');
|
|
12
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
13
|
-
var index = require('../../../hooks/use-locale/index.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
14
7
|
var icon = require('../../../utils/vue/icon.js');
|
|
15
|
-
var tokens = require('../../focus-trap/src/tokens.js');
|
|
16
|
-
var refs = require('../../../utils/vue/refs.js');
|
|
17
|
-
var index$1 = require('../../../hooks/use-draggable/index.js');
|
|
18
8
|
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const overflow = vue.computed(() => props.overflow);
|
|
40
|
-
const { resetPosition } = index$1.useDraggable(dialogRef, headerRef, draggable, overflow);
|
|
41
|
-
expose({
|
|
42
|
-
resetPosition
|
|
43
|
-
});
|
|
44
|
-
return (_ctx, _cache) => {
|
|
45
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
46
|
-
ref: vue.unref(composedDialogRef),
|
|
47
|
-
class: vue.normalizeClass(vue.unref(dialogKls)),
|
|
48
|
-
style: vue.normalizeStyle(vue.unref(style)),
|
|
49
|
-
tabindex: "-1"
|
|
50
|
-
}, [
|
|
51
|
-
vue.createElementVNode("header", {
|
|
52
|
-
ref_key: "headerRef",
|
|
53
|
-
ref: headerRef,
|
|
54
|
-
class: vue.normalizeClass([vue.unref(ns).e("header"), { "show-close": _ctx.showClose }])
|
|
55
|
-
}, [
|
|
56
|
-
vue.renderSlot(_ctx.$slots, "header", {}, () => [
|
|
57
|
-
vue.createElementVNode("span", {
|
|
58
|
-
role: "heading",
|
|
59
|
-
"aria-level": _ctx.ariaLevel,
|
|
60
|
-
class: vue.normalizeClass(vue.unref(ns).e("title"))
|
|
61
|
-
}, vue.toDisplayString(_ctx.title), 11, ["aria-level"])
|
|
62
|
-
]),
|
|
63
|
-
_ctx.showClose ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
64
|
-
key: 0,
|
|
65
|
-
"aria-label": vue.unref(t)("el.dialog.close"),
|
|
66
|
-
class: vue.normalizeClass(vue.unref(ns).e("headerbtn")),
|
|
67
|
-
type: "button",
|
|
68
|
-
onClick: ($event) => _ctx.$emit("close")
|
|
69
|
-
}, [
|
|
70
|
-
vue.createVNode(vue.unref(index$2.ElIcon), {
|
|
71
|
-
class: vue.normalizeClass(vue.unref(ns).e("close"))
|
|
72
|
-
}, {
|
|
73
|
-
default: vue.withCtx(() => [
|
|
74
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.closeIcon || vue.unref(Close))))
|
|
75
|
-
]),
|
|
76
|
-
_: 1
|
|
77
|
-
}, 8, ["class"])
|
|
78
|
-
], 10, ["aria-label", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
79
|
-
], 2),
|
|
80
|
-
vue.createElementVNode("div", {
|
|
81
|
-
id: vue.unref(bodyId),
|
|
82
|
-
class: vue.normalizeClass(vue.unref(ns).e("body"))
|
|
83
|
-
}, [
|
|
84
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
85
|
-
], 10, ["id"]),
|
|
86
|
-
_ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("footer", {
|
|
87
|
-
key: 0,
|
|
88
|
-
class: vue.normalizeClass(vue.unref(ns).e("footer"))
|
|
89
|
-
}, [
|
|
90
|
-
vue.renderSlot(_ctx.$slots, "footer")
|
|
91
|
-
], 2)) : vue.createCommentVNode("v-if", true)
|
|
92
|
-
], 6);
|
|
93
|
-
};
|
|
9
|
+
const dialogContentProps = runtime.buildProps({
|
|
10
|
+
center: Boolean,
|
|
11
|
+
alignCenter: Boolean,
|
|
12
|
+
closeIcon: {
|
|
13
|
+
type: icon.iconPropType
|
|
14
|
+
},
|
|
15
|
+
draggable: Boolean,
|
|
16
|
+
overflow: Boolean,
|
|
17
|
+
fullscreen: Boolean,
|
|
18
|
+
showClose: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: true
|
|
21
|
+
},
|
|
22
|
+
title: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ""
|
|
25
|
+
},
|
|
26
|
+
ariaLevel: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "2"
|
|
94
29
|
}
|
|
95
30
|
});
|
|
96
|
-
|
|
31
|
+
const dialogContentEmits = {
|
|
32
|
+
close: () => true
|
|
33
|
+
};
|
|
97
34
|
|
|
98
|
-
exports
|
|
35
|
+
exports.dialogContentEmits = dialogContentEmits;
|
|
36
|
+
exports.dialogContentProps = dialogContentProps;
|
|
99
37
|
//# sourceMappingURL=dialog-content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-content.js","sources":["../../../../../../packages/components/dialog/src/dialog-content.
|
|
1
|
+
{"version":3,"file":"dialog-content.js","sources":["../../../../../../packages/components/dialog/src/dialog-content.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\n\nexport const dialogContentProps = buildProps({\n /**\n * @description whether to align the header and footer in center\n */\n center: Boolean,\n /**\n * @description whether to align the dialog both horizontally and vertically\n */\n alignCenter: Boolean,\n /**\n * @description custom close icon, default is Close\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description enable dragging feature for Dialog\n */\n draggable: Boolean,\n /**\n * @description draggable Dialog can overflow the viewport\n */\n overflow: Boolean,\n /**\n * @description whether the Dialog takes up full screen\n */\n fullscreen: Boolean,\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description title of Dialog. Can also be passed with a named slot (see the following table)\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description header's aria-level attribute\n */\n ariaLevel: {\n type: String,\n default: '2',\n },\n} as const)\n\nexport const dialogContentEmits = {\n close: () => true,\n}\n"],"names":["buildProps","iconPropType"],"mappings":";;;;;;;;AACY,MAAC,kBAAkB,GAAGA,kBAAU,CAAC;AAC7C,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,WAAW,EAAE,OAAO;AACtB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEC,iBAAY;AACtB,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAG;AAClC,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB;;;;;"}
|
|
@@ -2,36 +2,98 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index$2 = require('../../icon/index.js');
|
|
7
|
+
require('../../focus-trap/index.js');
|
|
8
|
+
require('../../../hooks/index.js');
|
|
5
9
|
require('../../../utils/index.js');
|
|
6
|
-
var
|
|
10
|
+
var constants = require('./constants.js');
|
|
11
|
+
var dialogContent = require('./dialog-content.js');
|
|
12
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
13
|
+
var index = require('../../../hooks/use-locale/index.js');
|
|
7
14
|
var icon = require('../../../utils/vue/icon.js');
|
|
15
|
+
var tokens = require('../../focus-trap/src/tokens.js');
|
|
16
|
+
var refs = require('../../../utils/vue/refs.js');
|
|
17
|
+
var index$1 = require('../../../hooks/use-draggable/index.js');
|
|
8
18
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
const __default__ = vue.defineComponent({ name: "ElDialogContent" });
|
|
20
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
21
|
+
...__default__,
|
|
22
|
+
props: dialogContent.dialogContentProps,
|
|
23
|
+
emits: dialogContent.dialogContentEmits,
|
|
24
|
+
setup(__props, { expose }) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const { t } = index.useLocale();
|
|
27
|
+
const { Close } = icon.CloseComponents;
|
|
28
|
+
const { dialogRef, headerRef, bodyId, ns, style } = vue.inject(constants.dialogInjectionKey);
|
|
29
|
+
const { focusTrapRef } = vue.inject(tokens.FOCUS_TRAP_INJECTION_KEY);
|
|
30
|
+
const dialogKls = vue.computed(() => [
|
|
31
|
+
ns.b(),
|
|
32
|
+
ns.is("fullscreen", props.fullscreen),
|
|
33
|
+
ns.is("draggable", props.draggable),
|
|
34
|
+
ns.is("align-center", props.alignCenter),
|
|
35
|
+
{ [ns.m("center")]: props.center }
|
|
36
|
+
]);
|
|
37
|
+
const composedDialogRef = refs.composeRefs(focusTrapRef, dialogRef);
|
|
38
|
+
const draggable = vue.computed(() => props.draggable);
|
|
39
|
+
const overflow = vue.computed(() => props.overflow);
|
|
40
|
+
const { resetPosition } = index$1.useDraggable(dialogRef, headerRef, draggable, overflow);
|
|
41
|
+
expose({
|
|
42
|
+
resetPosition
|
|
43
|
+
});
|
|
44
|
+
return (_ctx, _cache) => {
|
|
45
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
46
|
+
ref: vue.unref(composedDialogRef),
|
|
47
|
+
class: vue.normalizeClass(vue.unref(dialogKls)),
|
|
48
|
+
style: vue.normalizeStyle(vue.unref(style)),
|
|
49
|
+
tabindex: "-1"
|
|
50
|
+
}, [
|
|
51
|
+
vue.createElementVNode("header", {
|
|
52
|
+
ref_key: "headerRef",
|
|
53
|
+
ref: headerRef,
|
|
54
|
+
class: vue.normalizeClass([vue.unref(ns).e("header"), { "show-close": _ctx.showClose }])
|
|
55
|
+
}, [
|
|
56
|
+
vue.renderSlot(_ctx.$slots, "header", {}, () => [
|
|
57
|
+
vue.createElementVNode("span", {
|
|
58
|
+
role: "heading",
|
|
59
|
+
"aria-level": _ctx.ariaLevel,
|
|
60
|
+
class: vue.normalizeClass(vue.unref(ns).e("title"))
|
|
61
|
+
}, vue.toDisplayString(_ctx.title), 11, ["aria-level"])
|
|
62
|
+
]),
|
|
63
|
+
_ctx.showClose ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
64
|
+
key: 0,
|
|
65
|
+
"aria-label": vue.unref(t)("el.dialog.close"),
|
|
66
|
+
class: vue.normalizeClass(vue.unref(ns).e("headerbtn")),
|
|
67
|
+
type: "button",
|
|
68
|
+
onClick: ($event) => _ctx.$emit("close")
|
|
69
|
+
}, [
|
|
70
|
+
vue.createVNode(vue.unref(index$2.ElIcon), {
|
|
71
|
+
class: vue.normalizeClass(vue.unref(ns).e("close"))
|
|
72
|
+
}, {
|
|
73
|
+
default: vue.withCtx(() => [
|
|
74
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.closeIcon || vue.unref(Close))))
|
|
75
|
+
]),
|
|
76
|
+
_: 1
|
|
77
|
+
}, 8, ["class"])
|
|
78
|
+
], 10, ["aria-label", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
79
|
+
], 2),
|
|
80
|
+
vue.createElementVNode("div", {
|
|
81
|
+
id: vue.unref(bodyId),
|
|
82
|
+
class: vue.normalizeClass(vue.unref(ns).e("body"))
|
|
83
|
+
}, [
|
|
84
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
85
|
+
], 10, ["id"]),
|
|
86
|
+
_ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("footer", {
|
|
87
|
+
key: 0,
|
|
88
|
+
class: vue.normalizeClass(vue.unref(ns).e("footer"))
|
|
89
|
+
}, [
|
|
90
|
+
vue.renderSlot(_ctx.$slots, "footer")
|
|
91
|
+
], 2)) : vue.createCommentVNode("v-if", true)
|
|
92
|
+
], 6);
|
|
93
|
+
};
|
|
29
94
|
}
|
|
30
95
|
});
|
|
31
|
-
|
|
32
|
-
close: () => true
|
|
33
|
-
};
|
|
96
|
+
var ElDialogContent = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "dialog-content.vue"]]);
|
|
34
97
|
|
|
35
|
-
exports
|
|
36
|
-
exports.dialogContentProps = dialogContentProps;
|
|
98
|
+
exports["default"] = ElDialogContent;
|
|
37
99
|
//# sourceMappingURL=dialog-content2.js.map
|