@element-plus/nightly 0.0.20231225 → 0.0.20231227
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +2084 -817
- package/dist/index.full.min.js +22 -22
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +22 -22
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2081 -818
- 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 +6 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.js.map +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.min.mjs.map +1 -1
- package/dist/locale/de.mjs +6 -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 +6 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.js.map +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.min.mjs.map +1 -1
- package/dist/locale/en.mjs +6 -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 +6 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.js.map +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.min.mjs.map +1 -1
- package/dist/locale/eu.mjs +6 -1
- package/dist/locale/fa.js +6 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.js.map +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.min.mjs.map +1 -1
- package/dist/locale/fa.mjs +6 -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 +6 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.js.map +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.min.mjs.map +1 -1
- package/dist/locale/ja.mjs +6 -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 +6 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.js.map +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.min.mjs.map +1 -1
- package/dist/locale/ko.mjs +6 -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 +6 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.js.map +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.min.mjs.map +1 -1
- package/dist/locale/lt.mjs +6 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +6 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.js.map +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.min.mjs.map +1 -1
- package/dist/locale/pl.mjs +6 -1
- package/dist/locale/pt-br.js +6 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.js.map +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.min.mjs.map +1 -1
- package/dist/locale/pt-br.mjs +6 -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 +6 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.js.map +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.min.mjs.map +1 -1
- package/dist/locale/ru.mjs +6 -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 +6 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.js.map +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.min.mjs.map +1 -1
- package/dist/locale/sv.mjs +6 -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 +6 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.js.map +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.min.mjs.map +1 -1
- package/dist/locale/th.mjs +6 -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 +6 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.js.map +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.min.mjs.map +1 -1
- package/dist/locale/uk.mjs +6 -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 +6 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.js.map +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.min.mjs.map +1 -1
- package/dist/locale/vi.mjs +6 -1
- package/dist/locale/zh-cn.js +6 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.js.map +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.min.mjs.map +1 -1
- package/dist/locale/zh-cn.mjs +6 -1
- package/dist/locale/zh-tw.js +6 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.js.map +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.min.mjs.map +1 -1
- package/dist/locale/zh-tw.mjs +6 -1
- package/es/component.mjs +4 -1
- package/es/component.mjs.map +1 -1
- package/es/components/carousel/index.d.ts +6 -0
- package/es/components/carousel/src/carousel-item.vue.d.ts +3 -0
- package/es/components/carousel/src/carousel-item2.mjs +12 -11
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item.mjs.map +1 -1
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +4 -2
- package/es/components/index.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +9 -66
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button2.mjs +66 -9
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/tour/index.d.ts +7626 -0
- package/es/components/tour/index.mjs +13 -0
- package/es/components/tour/index.mjs.map +1 -0
- package/es/components/tour/src/content.d.ts +15 -0
- package/es/components/tour/src/content.mjs +49 -0
- package/es/components/tour/src/content.mjs.map +1 -0
- package/es/components/tour/src/content.vue.d.ts +95 -0
- package/es/components/tour/src/content2.mjs +65 -0
- package/es/components/tour/src/content2.mjs.map +1 -0
- package/es/components/tour/src/helper.d.ts +37 -0
- package/es/components/tour/src/helper.mjs +234 -0
- package/es/components/tour/src/helper.mjs.map +1 -0
- package/es/components/tour/src/mask.d.ts +15 -0
- package/es/components/tour/src/mask.mjs +24 -0
- package/es/components/tour/src/mask.mjs.map +1 -0
- package/es/components/tour/src/mask.vue.d.ts +68 -0
- package/es/components/tour/src/mask2.mjs +117 -0
- package/es/components/tour/src/mask2.mjs.map +1 -0
- package/es/components/tour/src/step.d.ts +62 -0
- package/es/components/tour/src/step.mjs +48 -0
- package/es/components/tour/src/step.mjs.map +1 -0
- package/es/components/tour/src/step.vue.d.ts +545 -0
- package/es/components/tour/src/step2.mjs +163 -0
- package/es/components/tour/src/step2.mjs.map +1 -0
- package/es/components/tour/src/steps.d.ts +19 -0
- package/es/components/tour/src/steps.mjs +52 -0
- package/es/components/tour/src/steps.mjs.map +1 -0
- package/es/components/tour/src/tour.d.ts +55 -0
- package/es/components/tour/src/tour.mjs +75 -0
- package/es/components/tour/src/tour.mjs.map +1 -0
- package/es/components/tour/src/tour.vue.d.ts +6535 -0
- package/es/components/tour/src/tour2.mjs +152 -0
- package/es/components/tour/src/tour2.mjs.map +1 -0
- package/es/components/tour/src/types.d.ts +32 -0
- package/es/components/tour/src/types.mjs +2 -0
- package/es/components/tour/src/types.mjs.map +1 -0
- package/es/components/tour/style/css.d.ts +3 -0
- package/es/components/tour/style/css.mjs +4 -0
- package/es/components/tour/style/css.mjs.map +1 -0
- package/es/components/tour/style/index.d.ts +3 -0
- package/es/components/tour/style/index.mjs +4 -0
- package/es/components/tour/style/index.mjs.map +1 -0
- package/es/components/tour-step/style/css.d.ts +0 -0
- package/es/components/tour-step/style/css.mjs +2 -0
- package/es/components/tour-step/style/css.mjs.map +1 -0
- package/es/components/tour-step/style/index.d.ts +0 -0
- package/es/components/tour-step/style/index.mjs +2 -0
- package/es/components/tour-step/style/index.mjs.map +1 -0
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-content.mjs +33 -194
- package/es/components/upload/src/upload-content.mjs.map +1 -1
- package/es/components/upload/src/upload-content2.mjs +194 -33
- package/es/components/upload/src/upload-content2.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/index.mjs +4 -2
- package/es/index.mjs.map +1 -1
- package/es/locale/lang/de.d.ts +5 -0
- package/es/locale/lang/de.mjs +5 -0
- package/es/locale/lang/de.mjs.map +1 -1
- package/es/locale/lang/en.d.ts +5 -0
- package/es/locale/lang/en.mjs +5 -0
- package/es/locale/lang/en.mjs.map +1 -1
- package/es/locale/lang/eu.d.ts +5 -0
- package/es/locale/lang/eu.mjs +5 -0
- package/es/locale/lang/eu.mjs.map +1 -1
- package/es/locale/lang/fa.d.ts +5 -0
- package/es/locale/lang/fa.mjs +5 -0
- package/es/locale/lang/fa.mjs.map +1 -1
- package/es/locale/lang/ja.d.ts +5 -0
- package/es/locale/lang/ja.mjs +5 -0
- package/es/locale/lang/ja.mjs.map +1 -1
- package/es/locale/lang/ko.d.ts +5 -0
- package/es/locale/lang/ko.mjs +5 -0
- package/es/locale/lang/ko.mjs.map +1 -1
- package/es/locale/lang/lt.d.ts +5 -0
- package/es/locale/lang/lt.mjs +5 -0
- package/es/locale/lang/lt.mjs.map +1 -1
- package/es/locale/lang/pl.d.ts +5 -0
- package/es/locale/lang/pl.mjs +5 -0
- package/es/locale/lang/pl.mjs.map +1 -1
- package/es/locale/lang/pt-br.d.ts +5 -0
- package/es/locale/lang/pt-br.mjs +5 -0
- package/es/locale/lang/pt-br.mjs.map +1 -1
- package/es/locale/lang/ru.d.ts +5 -0
- package/es/locale/lang/ru.mjs +5 -0
- package/es/locale/lang/ru.mjs.map +1 -1
- package/es/locale/lang/sv.d.ts +5 -0
- package/es/locale/lang/sv.mjs +5 -0
- package/es/locale/lang/sv.mjs.map +1 -1
- package/es/locale/lang/th.d.ts +5 -0
- package/es/locale/lang/th.mjs +5 -0
- package/es/locale/lang/th.mjs.map +1 -1
- package/es/locale/lang/uk.d.ts +5 -0
- package/es/locale/lang/uk.mjs +5 -0
- package/es/locale/lang/uk.mjs.map +1 -1
- package/es/locale/lang/vi.d.ts +5 -0
- package/es/locale/lang/vi.mjs +5 -0
- package/es/locale/lang/vi.mjs.map +1 -1
- package/es/locale/lang/zh-cn.d.ts +5 -0
- package/es/locale/lang/zh-cn.mjs +5 -0
- package/es/locale/lang/zh-cn.mjs.map +1 -1
- package/es/locale/lang/zh-tw.d.ts +5 -0
- package/es/locale/lang/zh-tw.mjs +5 -0
- package/es/locale/lang/zh-tw.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/component.js +4 -1
- package/lib/component.js.map +1 -1
- package/lib/components/carousel/index.d.ts +6 -0
- package/lib/components/carousel/src/carousel-item.vue.d.ts +3 -0
- package/lib/components/carousel/src/carousel-item2.js +12 -11
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/collapse/src/collapse-item.js.map +1 -1
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +21 -15
- package/lib/components/index.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +9 -66
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button2.js +66 -9
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/tour/index.d.ts +7626 -0
- package/lib/components/tour/index.js +21 -0
- package/lib/components/tour/index.js.map +1 -0
- package/lib/components/tour/src/content.d.ts +15 -0
- package/lib/components/tour/src/content.js +54 -0
- package/lib/components/tour/src/content.js.map +1 -0
- package/lib/components/tour/src/content.vue.d.ts +95 -0
- package/lib/components/tour/src/content2.js +69 -0
- package/lib/components/tour/src/content2.js.map +1 -0
- package/lib/components/tour/src/helper.d.ts +37 -0
- package/lib/components/tour/src/helper.js +242 -0
- package/lib/components/tour/src/helper.js.map +1 -0
- package/lib/components/tour/src/mask.d.ts +15 -0
- package/lib/components/tour/src/mask.js +28 -0
- package/lib/components/tour/src/mask.js.map +1 -0
- package/lib/components/tour/src/mask.vue.d.ts +68 -0
- package/lib/components/tour/src/mask2.js +121 -0
- package/lib/components/tour/src/mask2.js.map +1 -0
- package/lib/components/tour/src/step.d.ts +62 -0
- package/lib/components/tour/src/step.js +53 -0
- package/lib/components/tour/src/step.js.map +1 -0
- package/lib/components/tour/src/step.vue.d.ts +545 -0
- package/lib/components/tour/src/step2.js +167 -0
- package/lib/components/tour/src/step2.js.map +1 -0
- package/lib/components/tour/src/steps.d.ts +19 -0
- package/lib/components/tour/src/steps.js +56 -0
- package/lib/components/tour/src/steps.js.map +1 -0
- package/lib/components/tour/src/tour.d.ts +55 -0
- package/lib/components/tour/src/tour.js +80 -0
- package/lib/components/tour/src/tour.js.map +1 -0
- package/lib/components/tour/src/tour.vue.d.ts +6535 -0
- package/lib/components/tour/src/tour2.js +156 -0
- package/lib/components/tour/src/tour2.js.map +1 -0
- package/lib/components/tour/src/types.d.ts +32 -0
- package/lib/components/tour/src/types.js +3 -0
- package/lib/components/tour/src/types.js.map +1 -0
- package/lib/components/tour/style/css.d.ts +3 -0
- package/lib/components/tour/style/css.js +7 -0
- package/lib/components/tour/style/css.js.map +1 -0
- package/lib/components/tour/style/index.d.ts +3 -0
- package/lib/components/tour/style/index.js +7 -0
- package/lib/components/tour/style/index.js.map +1 -0
- package/lib/components/tour-step/style/css.d.ts +0 -0
- package/lib/components/tour-step/style/css.js +3 -0
- package/lib/components/tour-step/style/css.js.map +1 -0
- package/lib/components/tour-step/style/index.d.ts +0 -0
- package/lib/components/tour-step/style/index.js +3 -0
- package/lib/components/tour-step/style/index.js.map +1 -0
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-content.js +31 -192
- package/lib/components/upload/src/upload-content.js.map +1 -1
- package/lib/components/upload/src/upload-content2.js +192 -31
- package/lib/components/upload/src/upload-content2.js.map +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/index.js +112 -106
- package/lib/index.js.map +1 -1
- package/lib/locale/lang/de.d.ts +5 -0
- package/lib/locale/lang/de.js +5 -0
- package/lib/locale/lang/de.js.map +1 -1
- package/lib/locale/lang/en.d.ts +5 -0
- package/lib/locale/lang/en.js +5 -0
- package/lib/locale/lang/en.js.map +1 -1
- package/lib/locale/lang/eu.d.ts +5 -0
- package/lib/locale/lang/eu.js +5 -0
- package/lib/locale/lang/eu.js.map +1 -1
- package/lib/locale/lang/fa.d.ts +5 -0
- package/lib/locale/lang/fa.js +5 -0
- package/lib/locale/lang/fa.js.map +1 -1
- package/lib/locale/lang/ja.d.ts +5 -0
- package/lib/locale/lang/ja.js +5 -0
- package/lib/locale/lang/ja.js.map +1 -1
- package/lib/locale/lang/ko.d.ts +5 -0
- package/lib/locale/lang/ko.js +5 -0
- package/lib/locale/lang/ko.js.map +1 -1
- package/lib/locale/lang/lt.d.ts +5 -0
- package/lib/locale/lang/lt.js +5 -0
- package/lib/locale/lang/lt.js.map +1 -1
- package/lib/locale/lang/pl.d.ts +5 -0
- package/lib/locale/lang/pl.js +5 -0
- package/lib/locale/lang/pl.js.map +1 -1
- package/lib/locale/lang/pt-br.d.ts +5 -0
- package/lib/locale/lang/pt-br.js +5 -0
- package/lib/locale/lang/pt-br.js.map +1 -1
- package/lib/locale/lang/ru.d.ts +5 -0
- package/lib/locale/lang/ru.js +5 -0
- package/lib/locale/lang/ru.js.map +1 -1
- package/lib/locale/lang/sv.d.ts +5 -0
- package/lib/locale/lang/sv.js +5 -0
- package/lib/locale/lang/sv.js.map +1 -1
- package/lib/locale/lang/th.d.ts +5 -0
- package/lib/locale/lang/th.js +5 -0
- package/lib/locale/lang/th.js.map +1 -1
- package/lib/locale/lang/uk.d.ts +5 -0
- package/lib/locale/lang/uk.js +5 -0
- package/lib/locale/lang/uk.js.map +1 -1
- package/lib/locale/lang/vi.d.ts +5 -0
- package/lib/locale/lang/vi.js +5 -0
- package/lib/locale/lang/vi.js.map +1 -1
- package/lib/locale/lang/zh-cn.d.ts +5 -0
- package/lib/locale/lang/zh-cn.js +5 -0
- package/lib/locale/lang/zh-cn.js.map +1 -1
- package/lib/locale/lang/zh-tw.d.ts +5 -0
- package/lib/locale/lang/zh-tw.js +5 -0
- package/lib/locale/lang/zh-tw.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/tags.json +1 -1
- package/theme-chalk/el-tour.css +1 -0
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/common/var.scss +20 -0
- package/theme-chalk/src/index.scss +1 -0
- package/theme-chalk/src/tour.scss +166 -0
- package/web-types.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import '../../utils/index.mjs';
|
|
2
|
+
import Tour from './src/tour2.mjs';
|
|
3
|
+
import TourStep from './src/step2.mjs';
|
|
4
|
+
export { tourEmits, tourProps } from './src/tour.mjs';
|
|
5
|
+
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
|
6
|
+
|
|
7
|
+
const ElTour = withInstall(Tour, {
|
|
8
|
+
TourStep
|
|
9
|
+
});
|
|
10
|
+
const ElTourStep = withNoopInstall(TourStep);
|
|
11
|
+
|
|
12
|
+
export { ElTour, ElTourStep, ElTour as default };
|
|
13
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/tour/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Tour from './src/tour.vue'\nimport TourStep from './src/step.vue'\n\nexport const ElTour = withInstall(Tour, {\n TourStep,\n})\nexport const ElTourStep = withNoopInstall(TourStep)\nexport default ElTour\n\nexport * from './src/tour'\n\nexport type { TourMask, TourGap, TourBtnProps } from './src/types'\n"],"names":[],"mappings":";;;;;;AAGY,MAAC,MAAM,GAAG,WAAW,CAAC,IAAI,EAAE;AACxC,EAAE,QAAQ;AACV,CAAC,EAAE;AACS,MAAC,UAAU,GAAG,eAAe,CAAC,QAAQ;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
import type { Placement, Strategy, VirtualElement } from '@floating-ui/dom';
|
|
3
|
+
export declare const tourContentProps: {
|
|
4
|
+
placement: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => Placement & {}) | (() => Placement) | ((new (...args: any[]) => Placement & {}) | (() => Placement))[], "top" | "bottom" | "right" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end", unknown, string, boolean>;
|
|
5
|
+
reference: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => HTMLElement | VirtualElement) | (() => HTMLElement | VirtualElement | null) | ((new (...args: any[]) => HTMLElement | VirtualElement) | (() => HTMLElement | VirtualElement | null))[], unknown, unknown, null, boolean>;
|
|
6
|
+
strategy: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => Strategy & {}) | (() => Strategy) | ((new (...args: any[]) => Strategy & {}) | (() => Strategy))[], "fixed" | "absolute", unknown, string, boolean>;
|
|
7
|
+
offset: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
8
|
+
showArrow: BooleanConstructor;
|
|
9
|
+
zIndex: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
10
|
+
};
|
|
11
|
+
export declare type TourContentProps = ExtractPropTypes<typeof tourContentProps>;
|
|
12
|
+
export declare const tourContentEmits: {
|
|
13
|
+
close: () => boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare type TourContentEmits = typeof tourContentEmits;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
3
|
+
|
|
4
|
+
const tourStrategies = ["absolute", "fixed"];
|
|
5
|
+
const tourPlacements = [
|
|
6
|
+
"top-start",
|
|
7
|
+
"top-end",
|
|
8
|
+
"top",
|
|
9
|
+
"bottom-start",
|
|
10
|
+
"bottom-end",
|
|
11
|
+
"bottom",
|
|
12
|
+
"left-start",
|
|
13
|
+
"left-end",
|
|
14
|
+
"left",
|
|
15
|
+
"right-start",
|
|
16
|
+
"right-end",
|
|
17
|
+
"right"
|
|
18
|
+
];
|
|
19
|
+
const tourContentProps = buildProps({
|
|
20
|
+
placement: {
|
|
21
|
+
type: definePropType(String),
|
|
22
|
+
values: tourPlacements,
|
|
23
|
+
default: "bottom"
|
|
24
|
+
},
|
|
25
|
+
reference: {
|
|
26
|
+
type: definePropType(Object),
|
|
27
|
+
default: null
|
|
28
|
+
},
|
|
29
|
+
strategy: {
|
|
30
|
+
type: definePropType(String),
|
|
31
|
+
values: tourStrategies,
|
|
32
|
+
default: "absolute"
|
|
33
|
+
},
|
|
34
|
+
offset: {
|
|
35
|
+
type: Number,
|
|
36
|
+
default: 10
|
|
37
|
+
},
|
|
38
|
+
showArrow: Boolean,
|
|
39
|
+
zIndex: {
|
|
40
|
+
type: Number,
|
|
41
|
+
default: 2001
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
const tourContentEmits = {
|
|
45
|
+
close: () => true
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { tourContentEmits, tourContentProps };
|
|
49
|
+
//# sourceMappingURL=content.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.mjs","sources":["../../../../../../packages/components/tour/src/content.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Placement, Strategy, VirtualElement } from '@floating-ui/dom'\n\nconst tourStrategies = ['absolute', 'fixed'] as const\n\nconst tourPlacements = [\n 'top-start',\n 'top-end',\n 'top',\n 'bottom-start',\n 'bottom-end',\n 'bottom',\n 'left-start',\n 'left-end',\n 'left',\n 'right-start',\n 'right-end',\n 'right',\n] as const\n\nexport const tourContentProps = buildProps({\n /**\n * @description position of the guide card relative to the target element\n */\n placement: {\n type: definePropType<Placement>(String),\n values: tourPlacements,\n default: 'bottom',\n },\n /**\n * @description the reference dom\n */\n reference: {\n type: definePropType<HTMLElement | VirtualElement | null>(Object),\n default: null,\n },\n /**\n * @description position strategy of the content\n */\n strategy: {\n type: definePropType<Strategy>(String),\n values: tourStrategies,\n default: 'absolute',\n },\n /**\n * @description offset of the arrow\n */\n offset: {\n type: Number,\n default: 10,\n },\n /**\n * @description @description whether to show the arrow\n */\n showArrow: Boolean,\n /**\n * @description content's zIndex\n */\n zIndex: {\n type: Number,\n default: 2001,\n },\n})\n\nexport type TourContentProps = ExtractPropTypes<typeof tourContentProps>\n\nexport const tourContentEmits = {\n close: () => true,\n}\nexport type TourContentEmits = typeof tourContentEmits\n"],"names":[],"mappings":";;;AACA,MAAM,cAAc,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAC7C,MAAM,cAAc,GAAG;AACvB,EAAE,WAAW;AACb,EAAE,SAAS;AACX,EAAE,KAAK;AACP,EAAE,cAAc;AAChB,EAAE,YAAY;AACd,EAAE,QAAQ;AACV,EAAE,YAAY;AACd,EAAE,UAAU;AACZ,EAAE,MAAM;AACR,EAAE,aAAa;AACf,EAAE,WAAW;AACb,EAAE,OAAO;AACT,CAAC,CAAC;AACU,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,OAAO,EAAE,UAAU;AACvB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,gBAAgB,GAAG;AAChC,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB;;;;"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
placement: import("../../../utils").EpPropFinalized<(new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement) | ((new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement))[], "top" | "bottom" | "right" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end", unknown, string, boolean>;
|
|
3
|
+
reference: import("../../../utils").EpPropFinalized<(new (...args: any[]) => HTMLElement | import("@floating-ui/dom").VirtualElement) | (() => HTMLElement | import("@floating-ui/dom").VirtualElement | null) | ((new (...args: any[]) => HTMLElement | import("@floating-ui/dom").VirtualElement) | (() => HTMLElement | import("@floating-ui/dom").VirtualElement | null))[], unknown, unknown, null, boolean>;
|
|
4
|
+
strategy: import("../../../utils").EpPropFinalized<(new (...args: any[]) => import("@floating-ui/core").Strategy & {}) | (() => import("@floating-ui/core").Strategy) | ((new (...args: any[]) => import("@floating-ui/core").Strategy & {}) | (() => import("@floating-ui/core").Strategy))[], "fixed" | "absolute", unknown, string, boolean>;
|
|
5
|
+
offset: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
6
|
+
showArrow: BooleanConstructor;
|
|
7
|
+
zIndex: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
8
|
+
}, {
|
|
9
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
placement: import("../../../utils").EpPropFinalized<(new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement) | ((new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement))[], "top" | "bottom" | "right" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end", unknown, string, boolean>;
|
|
11
|
+
reference: import("../../../utils").EpPropFinalized<(new (...args: any[]) => HTMLElement | import("@floating-ui/dom").VirtualElement) | (() => HTMLElement | import("@floating-ui/dom").VirtualElement | null) | ((new (...args: any[]) => HTMLElement | import("@floating-ui/dom").VirtualElement) | (() => HTMLElement | import("@floating-ui/dom").VirtualElement | null))[], unknown, unknown, null, boolean>;
|
|
12
|
+
strategy: import("../../../utils").EpPropFinalized<(new (...args: any[]) => import("@floating-ui/core").Strategy & {}) | (() => import("@floating-ui/core").Strategy) | ((new (...args: any[]) => import("@floating-ui/core").Strategy & {}) | (() => import("@floating-ui/core").Strategy))[], "fixed" | "absolute", unknown, string, boolean>;
|
|
13
|
+
offset: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
14
|
+
showArrow: BooleanConstructor;
|
|
15
|
+
zIndex: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
16
|
+
}>> & {
|
|
17
|
+
onClose?: (() => any) | undefined;
|
|
18
|
+
}>>;
|
|
19
|
+
emit: (event: "close") => void;
|
|
20
|
+
placement: import("vue").Ref<import("../../../utils").EpPropMergeType<(new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement) | ((new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement))[], "top" | "bottom" | "right" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end", unknown>>;
|
|
21
|
+
strategy: import("vue").Ref<import("../../../utils").EpPropMergeType<(new (...args: any[]) => import("@floating-ui/core").Strategy & {}) | (() => import("@floating-ui/core").Strategy) | ((new (...args: any[]) => import("@floating-ui/core").Strategy & {}) | (() => import("@floating-ui/core").Strategy))[], "fixed" | "absolute", unknown>>;
|
|
22
|
+
contentRef: import("vue").Ref<HTMLElement | null>;
|
|
23
|
+
arrowRef: import("vue").Ref<HTMLElement | null>;
|
|
24
|
+
contentStyle: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
25
|
+
arrowStyle: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
26
|
+
side: import("vue").ComputedRef<string>;
|
|
27
|
+
ns: {
|
|
28
|
+
namespace: import("vue").ComputedRef<string>;
|
|
29
|
+
b: (blockSuffix?: string) => string;
|
|
30
|
+
e: (element?: string | undefined) => string;
|
|
31
|
+
m: (modifier?: string | undefined) => string;
|
|
32
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
33
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
34
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
35
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
36
|
+
is: {
|
|
37
|
+
(name: string, state: boolean | undefined): string;
|
|
38
|
+
(name: string): string;
|
|
39
|
+
};
|
|
40
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
41
|
+
cssVarName: (name: string) => string;
|
|
42
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
43
|
+
cssVarBlockName: (name: string) => string;
|
|
44
|
+
};
|
|
45
|
+
onCloseRequested: () => void;
|
|
46
|
+
ElFocusTrap: import("vue").DefineComponent<{
|
|
47
|
+
loop: BooleanConstructor;
|
|
48
|
+
trapped: BooleanConstructor;
|
|
49
|
+
focusTrapEl: import("vue").PropType<HTMLElement>;
|
|
50
|
+
focusStartEl: {
|
|
51
|
+
type: import("vue").PropType<HTMLElement | "first" | "container">;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
}, {
|
|
55
|
+
onKeydown: (e: KeyboardEvent) => void;
|
|
56
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focusAfterTrapped" | "focusAfterReleased" | "focusin" | "focusout" | "focusout-prevented" | "release-requested")[], "focusAfterTrapped" | "focusAfterReleased" | "focusin" | "focusout" | "focusout-prevented" | "release-requested", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
57
|
+
loop: BooleanConstructor;
|
|
58
|
+
trapped: BooleanConstructor;
|
|
59
|
+
focusTrapEl: import("vue").PropType<HTMLElement>;
|
|
60
|
+
focusStartEl: {
|
|
61
|
+
type: import("vue").PropType<HTMLElement | "first" | "container">;
|
|
62
|
+
default: string;
|
|
63
|
+
};
|
|
64
|
+
}>> & {
|
|
65
|
+
onFocusAfterReleased?: ((...args: any[]) => any) | undefined;
|
|
66
|
+
onFocusAfterTrapped?: ((...args: any[]) => any) | undefined;
|
|
67
|
+
onFocusin?: ((...args: any[]) => any) | undefined;
|
|
68
|
+
onFocusout?: ((...args: any[]) => any) | undefined;
|
|
69
|
+
"onFocusout-prevented"?: ((...args: any[]) => any) | undefined;
|
|
70
|
+
"onRelease-requested"?: ((...args: any[]) => any) | undefined;
|
|
71
|
+
}, {
|
|
72
|
+
trapped: boolean;
|
|
73
|
+
loop: boolean;
|
|
74
|
+
focusStartEl: HTMLElement | "first" | "container";
|
|
75
|
+
}>;
|
|
76
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
77
|
+
close: () => boolean;
|
|
78
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
79
|
+
placement: import("../../../utils").EpPropFinalized<(new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement) | ((new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement))[], "top" | "bottom" | "right" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end", unknown, string, boolean>;
|
|
80
|
+
reference: import("../../../utils").EpPropFinalized<(new (...args: any[]) => HTMLElement | import("@floating-ui/dom").VirtualElement) | (() => HTMLElement | import("@floating-ui/dom").VirtualElement | null) | ((new (...args: any[]) => HTMLElement | import("@floating-ui/dom").VirtualElement) | (() => HTMLElement | import("@floating-ui/dom").VirtualElement | null))[], unknown, unknown, null, boolean>;
|
|
81
|
+
strategy: import("../../../utils").EpPropFinalized<(new (...args: any[]) => import("@floating-ui/core").Strategy & {}) | (() => import("@floating-ui/core").Strategy) | ((new (...args: any[]) => import("@floating-ui/core").Strategy & {}) | (() => import("@floating-ui/core").Strategy))[], "fixed" | "absolute", unknown, string, boolean>;
|
|
82
|
+
offset: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
83
|
+
showArrow: BooleanConstructor;
|
|
84
|
+
zIndex: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
85
|
+
}>> & {
|
|
86
|
+
onClose?: (() => any) | undefined;
|
|
87
|
+
}, {
|
|
88
|
+
zIndex: number;
|
|
89
|
+
offset: number;
|
|
90
|
+
placement: import("../../../utils").EpPropMergeType<(new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement) | ((new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement))[], "top" | "bottom" | "right" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end", unknown>;
|
|
91
|
+
strategy: import("../../../utils").EpPropMergeType<(new (...args: any[]) => import("@floating-ui/core").Strategy & {}) | (() => import("@floating-ui/core").Strategy) | ((new (...args: any[]) => import("@floating-ui/core").Strategy & {}) | (() => import("@floating-ui/core").Strategy))[], "fixed" | "absolute", unknown>;
|
|
92
|
+
showArrow: boolean;
|
|
93
|
+
reference: import("../../../utils").EpPropMergeType<(new (...args: any[]) => HTMLElement | import("@floating-ui/dom").VirtualElement) | (() => HTMLElement | import("@floating-ui/dom").VirtualElement | null) | ((new (...args: any[]) => HTMLElement | import("@floating-ui/dom").VirtualElement) | (() => HTMLElement | import("@floating-ui/dom").VirtualElement | null))[], unknown, unknown>;
|
|
94
|
+
}>;
|
|
95
|
+
export default _default;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { defineComponent, ref, toRef, computed, inject, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, createVNode, withCtx, renderSlot, createCommentVNode } from 'vue';
|
|
2
|
+
import '../../focus-trap/index.mjs';
|
|
3
|
+
import { tourContentProps, tourContentEmits } from './content.mjs';
|
|
4
|
+
import { useFloating, tourKey } from './helper.mjs';
|
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
+
import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
|
|
7
|
+
|
|
8
|
+
const _hoisted_1 = ["data-side"];
|
|
9
|
+
const __default__ = defineComponent({
|
|
10
|
+
name: "ElTourContent"
|
|
11
|
+
});
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
...__default__,
|
|
14
|
+
props: tourContentProps,
|
|
15
|
+
emits: tourContentEmits,
|
|
16
|
+
setup(__props, { emit }) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const placement = ref(props.placement);
|
|
19
|
+
const strategy = ref(props.strategy);
|
|
20
|
+
const contentRef = ref(null);
|
|
21
|
+
const arrowRef = ref(null);
|
|
22
|
+
const { contentStyle, arrowStyle } = useFloating(toRef(props, "reference"), contentRef, arrowRef, placement, strategy, toRef(props, "offset"), toRef(props, "zIndex"), toRef(props, "showArrow"));
|
|
23
|
+
const side = computed(() => {
|
|
24
|
+
return placement.value.split("-")[0];
|
|
25
|
+
});
|
|
26
|
+
const { ns } = inject(tourKey);
|
|
27
|
+
const onCloseRequested = () => {
|
|
28
|
+
emit("close");
|
|
29
|
+
};
|
|
30
|
+
return (_ctx, _cache) => {
|
|
31
|
+
return openBlock(), createElementBlock("div", {
|
|
32
|
+
ref_key: "contentRef",
|
|
33
|
+
ref: contentRef,
|
|
34
|
+
style: normalizeStyle(unref(contentStyle)),
|
|
35
|
+
class: normalizeClass(unref(ns).e("content")),
|
|
36
|
+
"data-side": unref(side),
|
|
37
|
+
tabindex: "-1"
|
|
38
|
+
}, [
|
|
39
|
+
createVNode(unref(ElFocusTrap), {
|
|
40
|
+
loop: "",
|
|
41
|
+
trapped: "",
|
|
42
|
+
"focus-start-el": "container",
|
|
43
|
+
"focus-trap-el": contentRef.value || void 0,
|
|
44
|
+
onReleaseRequested: onCloseRequested
|
|
45
|
+
}, {
|
|
46
|
+
default: withCtx(() => [
|
|
47
|
+
renderSlot(_ctx.$slots, "default")
|
|
48
|
+
]),
|
|
49
|
+
_: 3
|
|
50
|
+
}, 8, ["focus-trap-el"]),
|
|
51
|
+
_ctx.showArrow ? (openBlock(), createElementBlock("span", {
|
|
52
|
+
key: 0,
|
|
53
|
+
ref_key: "arrowRef",
|
|
54
|
+
ref: arrowRef,
|
|
55
|
+
style: normalizeStyle(unref(arrowStyle)),
|
|
56
|
+
class: normalizeClass(unref(ns).e("arrow"))
|
|
57
|
+
}, null, 6)) : createCommentVNode("v-if", true)
|
|
58
|
+
], 14, _hoisted_1);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
var ElTourContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
|
|
63
|
+
|
|
64
|
+
export { ElTourContent as default };
|
|
65
|
+
//# sourceMappingURL=content2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/tour/src/content.vue"],"sourcesContent":["<template>\n <div\n ref=\"contentRef\"\n :style=\"contentStyle\"\n :class=\"ns.e('content')\"\n :data-side=\"side\"\n tabindex=\"-1\"\n >\n <el-focus-trap\n loop\n trapped\n focus-start-el=\"container\"\n :focus-trap-el=\"contentRef || undefined\"\n @release-requested=\"onCloseRequested\"\n >\n <slot />\n </el-focus-trap>\n <span\n v-if=\"showArrow\"\n ref=\"arrowRef\"\n :style=\"arrowStyle\"\n :class=\"ns.e('arrow')\"\n />\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { computed, inject, ref, toRef } from 'vue'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport { tourContentEmits, tourContentProps } from './content'\nimport { tourKey, useFloating } from './helper'\n\ndefineOptions({\n name: 'ElTourContent',\n})\n\nconst props = defineProps(tourContentProps)\nconst emit = defineEmits(tourContentEmits)\n\nconst placement = ref(props.placement)\nconst strategy = ref(props.strategy)\nconst contentRef = ref<HTMLElement | null>(null)\nconst arrowRef = ref<HTMLElement | null>(null)\n\nconst { contentStyle, arrowStyle } = useFloating(\n toRef(props, 'reference'),\n contentRef,\n arrowRef,\n placement,\n strategy,\n toRef(props, 'offset'),\n toRef(props, 'zIndex'),\n toRef(props, 'showArrow')\n)\n\nconst side = computed(() => {\n return placement.value.split('-')[0]\n})\n\nconst { ns } = inject(tourKey)!\n\nconst onCloseRequested = () => {\n emit('close')\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;mCA+Bc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,SAAA,GAAY,GAAI,CAAA,KAAA,CAAM,SAAS,CAAA,CAAA;AACrC,IAAM,MAAA,QAAA,GAAW,GAAI,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AACnC,IAAM,MAAA,UAAA,GAAa,IAAwB,IAAI,CAAA,CAAA;AAC/C,IAAM,MAAA,QAAA,GAAW,IAAwB,IAAI,CAAA,CAAA;AAE7C,IAAM,MAAA,EAAE,cAAc,UAAe,EAAA,GAAA,WAAA,CACnC,MAAM,KAAO,EAAA,WAAW,CACxB,EAAA,UAAA,EACA,QACA,EAAA,SAAA,EACA,UACA,KAAM,CAAA,KAAA,EAAO,QAAQ,CAAA,EACrB,KAAM,CAAA,KAAA,EAAO,QAAQ,CACrB,EAAA,KAAA,CAAM,KAAO,EAAA,WAAW,CAC1B,CAAA,CAAA;AAEA,IAAM,MAAA,IAAA,GAAO,SAAS,MAAM;AAC1B,MAAA,OAAO,SAAU,CAAA,KAAA,CAAM,KAAM,CAAA,GAAG,CAAE,CAAA,CAAA,CAAA,CAAA;AAAA,KACnC,CAAA,CAAA;AAED,IAAM,MAAA,EAAE,EAAO,EAAA,GAAA,MAAA,CAAO,OAAO,CAAA,CAAA;AAE7B,IAAA,MAAM,mBAAmB,MAAM;AAC7B,MAAA,IAAA,CAAK,OAAO,CAAA,CAAA;AAAA,KACd,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { CSSProperties, Component, ComputedRef, InjectionKey, Ref, SetupContext, VNode } from 'vue';
|
|
2
|
+
import type { UseNamespaceReturn } from '@element-plus/nightly/es/hooks';
|
|
3
|
+
import type { TourGap, TourMask } from './types';
|
|
4
|
+
import type { Placement, Strategy, VirtualElement } from '@floating-ui/dom';
|
|
5
|
+
export declare const useTarget: (target: Ref<HTMLElement | null | undefined>, open: Ref<boolean>, gap: Ref<TourGap>, mergedMask: Ref<TourMask>, scrollIntoViewOptions: Ref<boolean | ScrollIntoViewOptions>) => {
|
|
6
|
+
mergedPosInfo: ComputedRef<{
|
|
7
|
+
left: number;
|
|
8
|
+
top: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
radius: number;
|
|
12
|
+
} | null>;
|
|
13
|
+
triggerTarget: ComputedRef<HTMLElement | {
|
|
14
|
+
getBoundingClientRect(): DOMRect;
|
|
15
|
+
} | undefined>;
|
|
16
|
+
};
|
|
17
|
+
export interface TourContext {
|
|
18
|
+
current: Ref<number>;
|
|
19
|
+
total: ComputedRef<number>;
|
|
20
|
+
showClose: Ref<boolean>;
|
|
21
|
+
closeIcon: Ref<string | Component>;
|
|
22
|
+
mergedType: Ref<'default' | 'primary' | undefined>;
|
|
23
|
+
ns: UseNamespaceReturn;
|
|
24
|
+
slots: SetupContext['slots'];
|
|
25
|
+
updateModelValue(modelValue: boolean): void;
|
|
26
|
+
onClose(): void;
|
|
27
|
+
onFinish(): void;
|
|
28
|
+
onChange(): void;
|
|
29
|
+
}
|
|
30
|
+
export declare const tourKey: InjectionKey<TourContext>;
|
|
31
|
+
export declare function isSameSteps(a: any[], b: any[]): boolean;
|
|
32
|
+
export declare const getNormalizedProps: (node: VNode, booleanKeys: string[]) => Record<string, any>;
|
|
33
|
+
export declare const useFloating: (referenceRef: Ref<HTMLElement | VirtualElement | null>, contentRef: Ref<HTMLElement | null>, arrowRef: Ref<HTMLElement | null>, placement: Ref<Placement | undefined>, strategy: Ref<Strategy>, offset: Ref<number>, zIndex: Ref<number>, showArrow: Ref<boolean>) => {
|
|
34
|
+
update: () => Promise<void>;
|
|
35
|
+
contentStyle: ComputedRef<CSSProperties>;
|
|
36
|
+
arrowStyle: ComputedRef<CSSProperties>;
|
|
37
|
+
};
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { ref, onMounted, watch, onBeforeUnmount, computed, isVNode, camelize, unref, watchEffect } from 'vue';
|
|
2
|
+
import { offset, flip, shift, arrow, computePosition, autoUpdate, detectOverflow } from '@floating-ui/dom';
|
|
3
|
+
import '../../../utils/index.mjs';
|
|
4
|
+
import { isArray, hasOwn } from '@vue/shared';
|
|
5
|
+
import { isClient } from '@vueuse/core';
|
|
6
|
+
import { keysOf } from '../../../utils/objects.mjs';
|
|
7
|
+
|
|
8
|
+
const useTarget = (target, open, gap, mergedMask, scrollIntoViewOptions) => {
|
|
9
|
+
const posInfo = ref(null);
|
|
10
|
+
const updatePosInfo = () => {
|
|
11
|
+
if (!target.value || !open.value) {
|
|
12
|
+
posInfo.value = null;
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (!isInViewPort(target.value) && open.value) {
|
|
16
|
+
target.value.scrollIntoView(scrollIntoViewOptions.value);
|
|
17
|
+
}
|
|
18
|
+
const { left, top, width, height } = target.value.getBoundingClientRect();
|
|
19
|
+
posInfo.value = {
|
|
20
|
+
left,
|
|
21
|
+
top,
|
|
22
|
+
width,
|
|
23
|
+
height,
|
|
24
|
+
radius: 0
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
onMounted(() => {
|
|
28
|
+
watch([open, target], () => {
|
|
29
|
+
updatePosInfo();
|
|
30
|
+
}, {
|
|
31
|
+
immediate: true
|
|
32
|
+
});
|
|
33
|
+
window.addEventListener("resize", updatePosInfo);
|
|
34
|
+
});
|
|
35
|
+
onBeforeUnmount(() => {
|
|
36
|
+
window.removeEventListener("resize", updatePosInfo);
|
|
37
|
+
});
|
|
38
|
+
const getGapOffset = (index) => {
|
|
39
|
+
var _a;
|
|
40
|
+
return (_a = isArray(gap.value.offset) ? gap.value.offset[index] : gap.value.offset) != null ? _a : 6;
|
|
41
|
+
};
|
|
42
|
+
const mergedPosInfo = computed(() => {
|
|
43
|
+
var _a;
|
|
44
|
+
if (!posInfo.value)
|
|
45
|
+
return posInfo.value;
|
|
46
|
+
const gapOffsetX = getGapOffset(0);
|
|
47
|
+
const gapOffsetY = getGapOffset(1);
|
|
48
|
+
const gapRadius = ((_a = gap.value) == null ? void 0 : _a.radius) || 2;
|
|
49
|
+
return {
|
|
50
|
+
left: posInfo.value.left - gapOffsetX,
|
|
51
|
+
top: posInfo.value.top - gapOffsetY,
|
|
52
|
+
width: posInfo.value.width + gapOffsetX * 2,
|
|
53
|
+
height: posInfo.value.height + gapOffsetY * 2,
|
|
54
|
+
radius: gapRadius
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
const triggerTarget = computed(() => {
|
|
58
|
+
if (!mergedMask.value || !target.value || !window.DOMRect) {
|
|
59
|
+
return target.value || void 0;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
getBoundingClientRect() {
|
|
63
|
+
var _a, _b, _c, _d;
|
|
64
|
+
return window.DOMRect.fromRect({
|
|
65
|
+
width: ((_a = mergedPosInfo.value) == null ? void 0 : _a.width) || 0,
|
|
66
|
+
height: ((_b = mergedPosInfo.value) == null ? void 0 : _b.height) || 0,
|
|
67
|
+
x: ((_c = mergedPosInfo.value) == null ? void 0 : _c.left) || 0,
|
|
68
|
+
y: ((_d = mergedPosInfo.value) == null ? void 0 : _d.top) || 0
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
return {
|
|
74
|
+
mergedPosInfo,
|
|
75
|
+
triggerTarget
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
const tourKey = Symbol("ElTour");
|
|
79
|
+
function isInViewPort(element) {
|
|
80
|
+
const viewWidth = window.innerWidth || document.documentElement.clientWidth;
|
|
81
|
+
const viewHeight = window.innerHeight || document.documentElement.clientHeight;
|
|
82
|
+
const { top, right, bottom, left } = element.getBoundingClientRect();
|
|
83
|
+
return top >= 0 && left >= 0 && right <= viewWidth && bottom <= viewHeight;
|
|
84
|
+
}
|
|
85
|
+
const isSameProps = (a, b) => {
|
|
86
|
+
if (Object.keys(a).length !== Object.keys(b).length)
|
|
87
|
+
return false;
|
|
88
|
+
for (const key in a) {
|
|
89
|
+
if (a[key] !== b[key]) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return true;
|
|
94
|
+
};
|
|
95
|
+
function isSameSteps(a, b) {
|
|
96
|
+
if (a.length !== b.length)
|
|
97
|
+
return false;
|
|
98
|
+
for (const [index] of a.entries()) {
|
|
99
|
+
if (isSameProps(a[index], b[index])) {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
const getNormalizedProps = (node, booleanKeys) => {
|
|
106
|
+
var _a;
|
|
107
|
+
if (!isVNode(node)) {
|
|
108
|
+
return {};
|
|
109
|
+
}
|
|
110
|
+
const raw = node.props || {};
|
|
111
|
+
const type = ((_a = node.type) == null ? void 0 : _a.props) || {};
|
|
112
|
+
const props = {};
|
|
113
|
+
Object.keys(type).forEach((key) => {
|
|
114
|
+
if (hasOwn(type[key], "default")) {
|
|
115
|
+
props[key] = type[key].default;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
Object.keys(raw).forEach((key) => {
|
|
119
|
+
const cameKey = camelize(key);
|
|
120
|
+
props[cameKey] = raw[key];
|
|
121
|
+
if (booleanKeys.includes(cameKey) && props[cameKey] === "") {
|
|
122
|
+
props[cameKey] = true;
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
return props;
|
|
126
|
+
};
|
|
127
|
+
const useFloating = (referenceRef, contentRef, arrowRef, placement, strategy, offset$1, zIndex, showArrow) => {
|
|
128
|
+
const x = ref();
|
|
129
|
+
const y = ref();
|
|
130
|
+
const middlewareData = ref({});
|
|
131
|
+
const states = {
|
|
132
|
+
x,
|
|
133
|
+
y,
|
|
134
|
+
placement,
|
|
135
|
+
strategy,
|
|
136
|
+
middlewareData
|
|
137
|
+
};
|
|
138
|
+
const middleware = computed(() => {
|
|
139
|
+
const _middleware = [
|
|
140
|
+
offset(unref(offset$1)),
|
|
141
|
+
flip(),
|
|
142
|
+
shift(),
|
|
143
|
+
overflowMiddleware()
|
|
144
|
+
];
|
|
145
|
+
if (unref(showArrow) && unref(arrowRef)) {
|
|
146
|
+
_middleware.push(arrow({
|
|
147
|
+
element: unref(arrowRef)
|
|
148
|
+
}));
|
|
149
|
+
}
|
|
150
|
+
return _middleware;
|
|
151
|
+
});
|
|
152
|
+
const update = async () => {
|
|
153
|
+
if (!isClient)
|
|
154
|
+
return;
|
|
155
|
+
const referenceEl = unref(referenceRef);
|
|
156
|
+
const contentEl = unref(contentRef);
|
|
157
|
+
if (!referenceEl || !contentEl)
|
|
158
|
+
return;
|
|
159
|
+
const data = await computePosition(referenceEl, contentEl, {
|
|
160
|
+
placement: unref(placement),
|
|
161
|
+
strategy: unref(strategy),
|
|
162
|
+
middleware: unref(middleware)
|
|
163
|
+
});
|
|
164
|
+
keysOf(states).forEach((key) => {
|
|
165
|
+
states[key].value = data[key];
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
const contentStyle = computed(() => {
|
|
169
|
+
if (!unref(referenceRef)) {
|
|
170
|
+
return {
|
|
171
|
+
position: "fixed",
|
|
172
|
+
top: "50%",
|
|
173
|
+
left: "50%",
|
|
174
|
+
transform: "translate3d(-50%, -50%, 0)",
|
|
175
|
+
maxWidth: "100vw",
|
|
176
|
+
zIndex: unref(zIndex)
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
const { overflow } = unref(middlewareData);
|
|
180
|
+
return {
|
|
181
|
+
position: unref(strategy),
|
|
182
|
+
zIndex: unref(zIndex),
|
|
183
|
+
top: unref(y) != null ? `${unref(y)}px` : "",
|
|
184
|
+
left: unref(x) != null ? `${unref(x)}px` : "",
|
|
185
|
+
maxWidth: (overflow == null ? void 0 : overflow.maxWidth) ? `${overflow == null ? void 0 : overflow.maxWidth}px` : ""
|
|
186
|
+
};
|
|
187
|
+
});
|
|
188
|
+
const arrowStyle = computed(() => {
|
|
189
|
+
if (!unref(showArrow))
|
|
190
|
+
return {};
|
|
191
|
+
const { arrow: arrow2 } = unref(middlewareData);
|
|
192
|
+
return {
|
|
193
|
+
left: (arrow2 == null ? void 0 : arrow2.x) != null ? `${arrow2 == null ? void 0 : arrow2.x}px` : "",
|
|
194
|
+
top: (arrow2 == null ? void 0 : arrow2.y) != null ? `${arrow2 == null ? void 0 : arrow2.y}px` : ""
|
|
195
|
+
};
|
|
196
|
+
});
|
|
197
|
+
let cleanup;
|
|
198
|
+
onMounted(() => {
|
|
199
|
+
cleanup = autoUpdate(unref(referenceRef), unref(contentRef), update);
|
|
200
|
+
watchEffect(() => {
|
|
201
|
+
update();
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
onBeforeUnmount(() => {
|
|
205
|
+
cleanup && cleanup();
|
|
206
|
+
});
|
|
207
|
+
return {
|
|
208
|
+
update,
|
|
209
|
+
contentStyle,
|
|
210
|
+
arrowStyle
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
const overflowMiddleware = () => {
|
|
214
|
+
return {
|
|
215
|
+
name: "overflow",
|
|
216
|
+
async fn(state) {
|
|
217
|
+
const overflow = await detectOverflow(state);
|
|
218
|
+
let overWidth = 0;
|
|
219
|
+
if (overflow.left > 0)
|
|
220
|
+
overWidth = overflow.left;
|
|
221
|
+
if (overflow.right > 0)
|
|
222
|
+
overWidth = overflow.right;
|
|
223
|
+
const floatingWidth = state.rects.floating.width;
|
|
224
|
+
return {
|
|
225
|
+
data: {
|
|
226
|
+
maxWidth: floatingWidth - overWidth
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
export { getNormalizedProps, isSameSteps, tourKey, useFloating, useTarget };
|
|
234
|
+
//# sourceMappingURL=helper.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.mjs","sources":["../../../../../../packages/components/tour/src/helper.ts"],"sourcesContent":["import {\n camelize,\n computed,\n isVNode,\n onBeforeUnmount,\n onMounted,\n ref,\n unref,\n watch,\n watchEffect,\n} from 'vue'\nimport {\n arrow,\n autoUpdate,\n computePosition,\n detectOverflow,\n flip,\n offset as offsetMiddelware,\n shift,\n} from '@floating-ui/dom'\nimport { hasOwn, isArray, isClient, keysOf } from '@element-plus/utils'\n\nimport type {\n CSSProperties,\n Component,\n ComputedRef,\n InjectionKey,\n Ref,\n SetupContext,\n VNode,\n} from 'vue'\nimport type { UseNamespaceReturn } from '@element-plus/hooks'\nimport type { PosInfo, TourGap, TourMask } from './types'\nimport type {\n ComputePositionReturn,\n Middleware,\n Placement,\n Strategy,\n VirtualElement,\n} from '@floating-ui/dom'\n\nexport const useTarget = (\n target: Ref<HTMLElement | null | undefined>,\n open: Ref<boolean>,\n gap: Ref<TourGap>,\n mergedMask: Ref<TourMask>,\n scrollIntoViewOptions: Ref<boolean | ScrollIntoViewOptions>\n) => {\n const posInfo: Ref<PosInfo | null> = ref(null)\n\n const updatePosInfo = () => {\n if (!target.value || !open.value) {\n posInfo.value = null\n return\n }\n if (!isInViewPort(target.value) && open.value) {\n target.value.scrollIntoView(scrollIntoViewOptions.value)\n }\n const { left, top, width, height } = target.value.getBoundingClientRect()\n posInfo.value = {\n left,\n top,\n width,\n height,\n radius: 0,\n }\n }\n\n onMounted(() => {\n watch(\n [open, target],\n () => {\n updatePosInfo()\n },\n {\n immediate: true,\n }\n )\n window.addEventListener('resize', updatePosInfo)\n })\n\n onBeforeUnmount(() => {\n window.removeEventListener('resize', updatePosInfo)\n })\n\n const getGapOffset = (index: number) =>\n (isArray(gap.value.offset) ? gap.value.offset[index] : gap.value.offset) ??\n 6\n\n const mergedPosInfo = computed(() => {\n if (!posInfo.value) return posInfo.value\n\n const gapOffsetX = getGapOffset(0)\n const gapOffsetY = getGapOffset(1)\n const gapRadius = gap.value?.radius || 2\n\n return {\n left: posInfo.value.left - gapOffsetX,\n top: posInfo.value.top - gapOffsetY,\n width: posInfo.value.width + gapOffsetX * 2,\n height: posInfo.value.height + gapOffsetY * 2,\n radius: gapRadius,\n }\n })\n\n const triggerTarget = computed(() => {\n if (!mergedMask.value || !target.value || !window.DOMRect) {\n return target.value || undefined\n }\n\n return {\n getBoundingClientRect() {\n return window.DOMRect.fromRect({\n width: mergedPosInfo.value?.width || 0,\n height: mergedPosInfo.value?.height || 0,\n x: mergedPosInfo.value?.left || 0,\n y: mergedPosInfo.value?.top || 0,\n })\n },\n }\n })\n\n return {\n mergedPosInfo,\n triggerTarget,\n }\n}\n\nexport interface TourContext {\n current: Ref<number>\n total: ComputedRef<number>\n showClose: Ref<boolean>\n closeIcon: Ref<string | Component>\n mergedType: Ref<'default' | 'primary' | undefined>\n ns: UseNamespaceReturn\n slots: SetupContext['slots']\n updateModelValue(modelValue: boolean): void\n onClose(): void\n onFinish(): void\n onChange(): void\n}\n\nexport const tourKey: InjectionKey<TourContext> = Symbol('ElTour')\n\nfunction isInViewPort(element: HTMLElement) {\n const viewWidth = window.innerWidth || document.documentElement.clientWidth\n const viewHeight = window.innerHeight || document.documentElement.clientHeight\n const { top, right, bottom, left } = element.getBoundingClientRect()\n\n return top >= 0 && left >= 0 && right <= viewWidth && bottom <= viewHeight\n}\n\nconst isSameProps = (a: Record<string, any>, b: Record<string, any>) => {\n if (Object.keys(a).length !== Object.keys(b).length) return false\n for (const key in a) {\n if (a[key] !== b[key]) {\n return false\n }\n }\n return true\n}\n\nexport function isSameSteps(a: any[], b: any[]) {\n if (a.length !== b.length) return false\n for (const [index] of a.entries()) {\n if (isSameProps(a[index], b[index])) {\n return false\n }\n }\n return true\n}\n\nexport const getNormalizedProps = (node: VNode, booleanKeys: string[]) => {\n if (!isVNode(node)) {\n return {}\n }\n\n const raw = node.props || {}\n const type = (node.type as any)?.props || {}\n const props: Record<string, any> = {}\n Object.keys(type).forEach((key) => {\n if (hasOwn(type[key], 'default')) {\n props[key] = type[key].default\n }\n })\n\n Object.keys(raw).forEach((key) => {\n const cameKey = camelize(key)\n props[cameKey] = raw[key]\n if (booleanKeys.includes(cameKey) && props[cameKey] === '') {\n props[cameKey] = true\n }\n })\n\n return props\n}\n\nexport const useFloating = (\n referenceRef: Ref<HTMLElement | VirtualElement | null>,\n contentRef: Ref<HTMLElement | null>,\n arrowRef: Ref<HTMLElement | null>,\n placement: Ref<Placement | undefined>,\n strategy: Ref<Strategy>,\n offset: Ref<number>,\n zIndex: Ref<number>,\n showArrow: Ref<boolean>\n) => {\n const x = ref<number>()\n const y = ref<number>()\n const middlewareData = ref<ComputePositionReturn['middlewareData']>({})\n\n const states = {\n x,\n y,\n placement,\n strategy,\n middlewareData,\n } as const\n\n const middleware = computed(() => {\n const _middleware: Middleware[] = [\n offsetMiddelware(unref(offset)),\n flip(),\n shift(),\n overflowMiddleware(),\n ]\n\n if (unref(showArrow) && unref(arrowRef)) {\n _middleware.push(\n arrow({\n element: unref(arrowRef)!,\n })\n )\n }\n return _middleware\n })\n\n const update = async () => {\n if (!isClient) return\n\n const referenceEl = unref(referenceRef)\n const contentEl = unref(contentRef)\n if (!referenceEl || !contentEl) return\n\n const data = await computePosition(referenceEl, contentEl, {\n placement: unref(placement),\n strategy: unref(strategy),\n middleware: unref(middleware),\n })\n\n keysOf(states).forEach((key) => {\n states[key].value = data[key]\n })\n }\n\n const contentStyle = computed<CSSProperties>(() => {\n if (!unref(referenceRef)) {\n return {\n position: 'fixed',\n top: '50%',\n left: '50%',\n transform: 'translate3d(-50%, -50%, 0)',\n maxWidth: '100vw',\n zIndex: unref(zIndex),\n }\n }\n\n const { overflow } = unref(middlewareData)\n\n return {\n position: unref(strategy),\n zIndex: unref(zIndex),\n top: unref(y) != null ? `${unref(y)}px` : '',\n left: unref(x) != null ? `${unref(x)}px` : '',\n maxWidth: overflow?.maxWidth ? `${overflow?.maxWidth}px` : '',\n }\n })\n\n const arrowStyle = computed<CSSProperties>(() => {\n if (!unref(showArrow)) return {}\n\n const { arrow } = unref(middlewareData)\n return {\n left: arrow?.x != null ? `${arrow?.x}px` : '',\n top: arrow?.y != null ? `${arrow?.y}px` : '',\n }\n })\n\n let cleanup: any\n onMounted(() => {\n cleanup = autoUpdate(unref(referenceRef)!, unref(contentRef)!, update)\n\n watchEffect(() => {\n update()\n })\n })\n\n onBeforeUnmount(() => {\n cleanup && cleanup()\n })\n\n return {\n update,\n contentStyle,\n arrowStyle,\n }\n}\n\nconst overflowMiddleware = (): Middleware => {\n return {\n name: 'overflow',\n async fn(state) {\n const overflow = await detectOverflow(state)\n let overWidth = 0\n if (overflow.left > 0) overWidth = overflow.left\n if (overflow.right > 0) overWidth = overflow.right\n const floatingWidth = state.rects.floating.width\n return {\n data: {\n maxWidth: floatingWidth - overWidth,\n },\n }\n },\n }\n}\n"],"names":["offset","offsetMiddelware"],"mappings":";;;;;;;AAqBY,MAAC,SAAS,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,qBAAqB,KAAK;AACnF,EAAE,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;AAC5B,EAAE,MAAM,aAAa,GAAG,MAAM;AAC9B,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AACtC,MAAM,OAAO,CAAC,KAAK,GAAG,IAAI,CA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C,KAAK,GAAG,CAAC;AAC5B,QAAQ,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC;AACnC,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;AACvD,MAAM,OAAO;AACb,QAAQ,IAAI,EAAE;AACd,UAAU,QAAQ,EAAE,aAAa,GAAG,SAAS;AAC7C,SAAS;AACT,OAAO,CAAC;AACR,KAAK;AACL,GAAG,CAAC;AACJ,CAAC;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
import type { PosInfo } from './types';
|
|
3
|
+
export declare const maskProps: {
|
|
4
|
+
zIndex: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
5
|
+
visible: BooleanConstructor;
|
|
6
|
+
fill: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
7
|
+
pos: {
|
|
8
|
+
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => PosInfo) | (() => PosInfo | null) | ((new (...args: any[]) => PosInfo) | (() => PosInfo | null))[], unknown, unknown>>;
|
|
9
|
+
readonly required: false;
|
|
10
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
11
|
+
__epPropKey: true;
|
|
12
|
+
};
|
|
13
|
+
targetAreaClickable: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
14
|
+
};
|
|
15
|
+
export declare type MaskProps = ExtractPropTypes<typeof maskProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
3
|
+
|
|
4
|
+
const maskProps = buildProps({
|
|
5
|
+
zIndex: {
|
|
6
|
+
type: Number,
|
|
7
|
+
default: 1001
|
|
8
|
+
},
|
|
9
|
+
visible: Boolean,
|
|
10
|
+
fill: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: "rgba(0,0,0,0.5)"
|
|
13
|
+
},
|
|
14
|
+
pos: {
|
|
15
|
+
type: definePropType(Object)
|
|
16
|
+
},
|
|
17
|
+
targetAreaClickable: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: true
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export { maskProps };
|
|
24
|
+
//# sourceMappingURL=mask.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mask.mjs","sources":["../../../../../../packages/components/tour/src/mask.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { PosInfo } from './types'\n\nexport const maskProps = buildProps({\n /**\n * @description mask's zIndex\n */\n zIndex: {\n type: Number,\n default: 1001,\n },\n /**\n * @description whether to show the mask\n */\n visible: Boolean,\n /**\n * @description mask's fill\n */\n fill: {\n type: String,\n default: 'rgba(0,0,0,0.5)',\n },\n /***\n * @description mask's transparent space position\n */\n pos: {\n type: definePropType<PosInfo | null>(Object),\n },\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable: {\n type: Boolean,\n default: true,\n },\n})\n\nexport type MaskProps = ExtractPropTypes<typeof maskProps>\n"],"names":[],"mappings":";;;AACY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,iBAAiB;AAC9B,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,mBAAmB,EAAE;AACvB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC;;;;"}
|