@element-plus/nightly 0.0.20241205 → 0.0.20241206
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.full.js +6 -12
- 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 +6 -12
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/alert/src/alert2.mjs +4 -10
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +21 -53
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +53 -21
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/index.mjs +4 -4
- package/es/components/pagination/src/components/next.mjs +18 -35
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next2.mjs +35 -18
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/popover/index.mjs +2 -2
- package/es/components/popover/src/popover.mjs +64 -110
- package/es/components/popover/src/popover.mjs.map +1 -1
- package/es/components/popover/src/popover2.mjs +110 -64
- package/es/components/popover/src/popover2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +1 -1
- package/es/components/radio/src/radio-group.mjs +1 -1
- package/es/components/radio/src/radio.mjs +32 -73
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio2.mjs +73 -32
- package/es/components/radio/src/radio2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip/src/trigger.mjs +72 -14
- package/es/components/tooltip/src/trigger.mjs.map +1 -1
- package/es/components/tooltip/src/trigger2.mjs +14 -72
- package/es/components/tooltip/src/trigger2.mjs.map +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/hooks/use-focus-controller/index.mjs +1 -1
- package/es/hooks/use-lockscreen/index.mjs +1 -1
- package/es/index.mjs +4 -4
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/alert/src/alert2.js +4 -10
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +22 -53
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +53 -22
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/index.js +4 -4
- package/lib/components/pagination/src/components/next.js +18 -35
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next2.js +35 -18
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/popover/index.js +2 -2
- package/lib/components/popover/src/popover.js +65 -110
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popover/src/popover2.js +110 -65
- package/lib/components/popover/src/popover2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +1 -1
- package/lib/components/radio/src/radio-group.js +1 -1
- package/lib/components/radio/src/radio.js +34 -73
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio2.js +73 -34
- package/lib/components/radio/src/radio2.js.map +1 -1
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip/src/trigger.js +72 -14
- package/lib/components/tooltip/src/trigger.js.map +1 -1
- package/lib/components/tooltip/src/trigger2.js +14 -72
- package/lib/components/tooltip/src/trigger2.js.map +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/hooks/use-focus-controller/index.js +1 -1
- package/lib/hooks/use-lockscreen/index.js +1 -1
- package/lib/index.js +4 -4
- 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
- package/es/components/form/mocks/mock-data.d.ts +0 -13
- package/lib/components/form/mocks/mock-data.d.ts +0 -13
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"radio.js","sources":["../../../../../../packages/components/radio/src/radio.
|
1
|
+
{"version":3,"file":"radio.js","sources":["../../../../../../packages/components/radio/src/radio.ts"],"sourcesContent":["import { buildProps, isBoolean, isNumber, isString } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport type { ExtractPropTypes } from 'vue'\nimport type Radio from './radio.vue'\n\nexport const radioPropsBase = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number, Boolean],\n default: undefined,\n },\n /**\n * @description size of the Radio\n */\n size: useSizeProp,\n /**\n * @description whether Radio is disabled\n */\n disabled: Boolean,\n /**\n * @description the label of Radio\n */\n label: {\n type: [String, Number, Boolean],\n default: undefined,\n },\n /**\n * @description the value of Radio\n */\n value: {\n type: [String, Number, Boolean],\n default: undefined,\n },\n /**\n * @description native `name` attribute\n */\n name: {\n type: String,\n default: undefined,\n },\n})\n\nexport const radioProps = buildProps({\n ...radioPropsBase,\n /**\n * @description whether to add a border around Radio\n */\n border: Boolean,\n} as const)\n\nexport const radioEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | number | boolean | undefined) =>\n isString(val) || isNumber(val) || isBoolean(val),\n [CHANGE_EVENT]: (val: string | number | boolean | undefined) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\n\nexport type RadioProps = ExtractPropTypes<typeof radioProps>\nexport type RadioEmits = typeof radioEmits\nexport type RadioInstance = InstanceType<typeof Radio>\n"],"names":["buildProps","useSizeProp","UPDATE_MODEL_EVENT","isString","isNumber","isBoolean","CHANGE_EVENT"],"mappings":";;;;;;;;;;AAGY,MAAC,cAAc,GAAGA,kBAAU,CAAC;AACzC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAGD,kBAAU,CAAC;AACrC,EAAE,GAAG,cAAc;AACnB,EAAE,MAAM,EAAE,OAAO;AACjB,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,CAACE,wBAAkB,GAAG,CAAC,GAAG,KAAKC,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC,IAAIC,eAAS,CAAC,GAAG,CAAC;AACjF,EAAE,CAACC,kBAAY,GAAG,CAAC,GAAG,KAAKH,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC,IAAIC,eAAS,CAAC,GAAG,CAAC;AAC3E;;;;;;"}
|
@@ -2,42 +2,81 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
7
|
-
var
|
8
|
-
var
|
9
|
-
var
|
5
|
+
var vue = require('vue');
|
6
|
+
var radio = require('./radio.js');
|
7
|
+
var useRadio = require('./use-radio.js');
|
8
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
9
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
10
10
|
|
11
|
-
const
|
12
|
-
|
13
|
-
type: [String, Number, Boolean],
|
14
|
-
default: void 0
|
15
|
-
},
|
16
|
-
size: index.useSizeProp,
|
17
|
-
disabled: Boolean,
|
18
|
-
label: {
|
19
|
-
type: [String, Number, Boolean],
|
20
|
-
default: void 0
|
21
|
-
},
|
22
|
-
value: {
|
23
|
-
type: [String, Number, Boolean],
|
24
|
-
default: void 0
|
25
|
-
},
|
26
|
-
name: {
|
27
|
-
type: String,
|
28
|
-
default: void 0
|
29
|
-
}
|
11
|
+
const __default__ = vue.defineComponent({
|
12
|
+
name: "ElRadio"
|
30
13
|
});
|
31
|
-
const
|
32
|
-
...
|
33
|
-
|
14
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
15
|
+
...__default__,
|
16
|
+
props: radio.radioProps,
|
17
|
+
emits: radio.radioEmits,
|
18
|
+
setup(__props, { emit }) {
|
19
|
+
const props = __props;
|
20
|
+
const ns = index.useNamespace("radio");
|
21
|
+
const { radioRef, radioGroup, focus, size, disabled, modelValue, actualValue } = useRadio.useRadio(props, emit);
|
22
|
+
function handleChange() {
|
23
|
+
vue.nextTick(() => emit("change", modelValue.value));
|
24
|
+
}
|
25
|
+
return (_ctx, _cache) => {
|
26
|
+
var _a;
|
27
|
+
return vue.openBlock(), vue.createElementBlock("label", {
|
28
|
+
class: vue.normalizeClass([
|
29
|
+
vue.unref(ns).b(),
|
30
|
+
vue.unref(ns).is("disabled", vue.unref(disabled)),
|
31
|
+
vue.unref(ns).is("focus", vue.unref(focus)),
|
32
|
+
vue.unref(ns).is("bordered", _ctx.border),
|
33
|
+
vue.unref(ns).is("checked", vue.unref(modelValue) === vue.unref(actualValue)),
|
34
|
+
vue.unref(ns).m(vue.unref(size))
|
35
|
+
])
|
36
|
+
}, [
|
37
|
+
vue.createElementVNode("span", {
|
38
|
+
class: vue.normalizeClass([
|
39
|
+
vue.unref(ns).e("input"),
|
40
|
+
vue.unref(ns).is("disabled", vue.unref(disabled)),
|
41
|
+
vue.unref(ns).is("checked", vue.unref(modelValue) === vue.unref(actualValue))
|
42
|
+
])
|
43
|
+
}, [
|
44
|
+
vue.withDirectives(vue.createElementVNode("input", {
|
45
|
+
ref_key: "radioRef",
|
46
|
+
ref: radioRef,
|
47
|
+
"onUpdate:modelValue": ($event) => vue.isRef(modelValue) ? modelValue.value = $event : null,
|
48
|
+
class: vue.normalizeClass(vue.unref(ns).e("original")),
|
49
|
+
value: vue.unref(actualValue),
|
50
|
+
name: _ctx.name || ((_a = vue.unref(radioGroup)) == null ? void 0 : _a.name),
|
51
|
+
disabled: vue.unref(disabled),
|
52
|
+
checked: vue.unref(modelValue) === vue.unref(actualValue),
|
53
|
+
type: "radio",
|
54
|
+
onFocus: ($event) => focus.value = true,
|
55
|
+
onBlur: ($event) => focus.value = false,
|
56
|
+
onChange: handleChange,
|
57
|
+
onClick: vue.withModifiers(() => {
|
58
|
+
}, ["stop"])
|
59
|
+
}, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [
|
60
|
+
[vue.vModelRadio, vue.unref(modelValue)]
|
61
|
+
]),
|
62
|
+
vue.createElementVNode("span", {
|
63
|
+
class: vue.normalizeClass(vue.unref(ns).e("inner"))
|
64
|
+
}, null, 2)
|
65
|
+
], 2),
|
66
|
+
vue.createElementVNode("span", {
|
67
|
+
class: vue.normalizeClass(vue.unref(ns).e("label")),
|
68
|
+
onKeydown: vue.withModifiers(() => {
|
69
|
+
}, ["stop"])
|
70
|
+
}, [
|
71
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
72
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
|
73
|
+
])
|
74
|
+
], 42, ["onKeydown"])
|
75
|
+
], 2);
|
76
|
+
};
|
77
|
+
}
|
34
78
|
});
|
35
|
-
|
36
|
-
[event.UPDATE_MODEL_EVENT]: (val) => shared.isString(val) || types.isNumber(val) || types.isBoolean(val),
|
37
|
-
[event.CHANGE_EVENT]: (val) => shared.isString(val) || types.isNumber(val) || types.isBoolean(val)
|
38
|
-
};
|
79
|
+
var Radio = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "radio.vue"]]);
|
39
80
|
|
40
|
-
exports
|
41
|
-
exports.radioProps = radioProps;
|
42
|
-
exports.radioPropsBase = radioPropsBase;
|
81
|
+
exports["default"] = Radio;
|
43
82
|
//# sourceMappingURL=radio2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"radio2.js","sources":["../../../../../../packages/components/radio/src/radio.
|
1
|
+
{"version":3,"file":"radio2.js","sources":["../../../../../../packages/components/radio/src/radio.vue"],"sourcesContent":["<template>\n <label\n :class=\"[\n ns.b(),\n ns.is('disabled', disabled),\n ns.is('focus', focus),\n ns.is('bordered', border),\n ns.is('checked', modelValue === actualValue),\n ns.m(size),\n ]\"\n >\n <span\n :class=\"[\n ns.e('input'),\n ns.is('disabled', disabled),\n ns.is('checked', modelValue === actualValue),\n ]\"\n >\n <input\n ref=\"radioRef\"\n v-model=\"modelValue\"\n :class=\"ns.e('original')\"\n :value=\"actualValue\"\n :name=\"name || radioGroup?.name\"\n :disabled=\"disabled\"\n :checked=\"modelValue === actualValue\"\n type=\"radio\"\n @focus=\"focus = true\"\n @blur=\"focus = false\"\n @change=\"handleChange\"\n @click.stop\n />\n <span :class=\"ns.e('inner')\" />\n </span>\n <span :class=\"ns.e('label')\" @keydown.stop>\n <slot>\n {{ label }}\n </slot>\n </span>\n </label>\n</template>\n\n<script lang=\"ts\" setup>\nimport { nextTick } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { radioEmits, radioProps } from './radio'\nimport { useRadio } from './use-radio'\n\ndefineOptions({\n name: 'ElRadio',\n})\n\nconst props = defineProps(radioProps)\nconst emit = defineEmits(radioEmits)\n\nconst ns = useNamespace('radio')\nconst { radioRef, radioGroup, focus, size, disabled, modelValue, actualValue } =\n useRadio(props, emit)\n\nfunction handleChange() {\n nextTick(() => emit('change', modelValue.value))\n}\n</script>\n"],"names":["useNamespace","useRadio","nextTick"],"mappings":";;;;;;;;;;uCAgDc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAKA,mBAAa,OAAO,CAAA,CAAA;AAC/B,IAAM,MAAA,EAAE,QAAU,EAAA,UAAA,EAAY,KAAO,EAAA,IAAA,EAAM,QAAU,EAAA,UAAA,EAAY,WAAY,EAAA,GAC3EC,iBAAS,CAAA,KAAA,EAAO,IAAI,CAAA,CAAA;AAEtB,IAAA,SAAS,YAAe,GAAA;AACtB,MAAAC,YAAA,CAAS,MAAM,IAAA,CAAK,QAAU,EAAA,UAAA,CAAW,KAAK,CAAC,CAAA,CAAA;AAAA,KACjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
var tooltip$1 = require('./src/tooltip2.js');
|
6
6
|
var tooltip = require('./src/tooltip.js');
|
7
|
-
var trigger = require('./src/
|
7
|
+
var trigger = require('./src/trigger2.js');
|
8
8
|
var content = require('./src/content.js');
|
9
9
|
var constants = require('./src/constants.js');
|
10
10
|
var install = require('../../utils/vue/install.js');
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var content = require('./content.js');
|
6
|
-
var trigger = require('./
|
6
|
+
var trigger = require('./trigger2.js');
|
7
7
|
var popper = require('../../popper/src/popper.js');
|
8
8
|
var arrow = require('../../popper/src/arrow.js');
|
9
9
|
var index = require('../../../hooks/use-model-toggle/index.js');
|
@@ -6,7 +6,7 @@ var vue = require('vue');
|
|
6
6
|
var index$3 = require('../../popper/index.js');
|
7
7
|
var constants = require('./constants.js');
|
8
8
|
var tooltip = require('./tooltip.js');
|
9
|
-
var trigger = require('./
|
9
|
+
var trigger = require('./trigger.js');
|
10
10
|
var content = require('./content2.js');
|
11
11
|
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
12
12
|
var index = require('../../../hooks/use-popper-container/index.js');
|
@@ -2,22 +2,80 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
|
7
|
-
var
|
5
|
+
var vue = require('vue');
|
6
|
+
require('../../popper/index.js');
|
7
|
+
var constants = require('./constants.js');
|
8
|
+
var trigger = require('./trigger2.js');
|
9
|
+
var utils = require('./utils.js');
|
10
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
11
|
+
var trigger$1 = require('../../popper/src/trigger2.js');
|
12
|
+
var event = require('../../../utils/dom/event.js');
|
13
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
8
14
|
|
9
|
-
const
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
}
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
const __default__ = vue.defineComponent({
|
16
|
+
name: "ElTooltipTrigger"
|
17
|
+
});
|
18
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
19
|
+
...__default__,
|
20
|
+
props: trigger.useTooltipTriggerProps,
|
21
|
+
setup(__props, { expose }) {
|
22
|
+
const props = __props;
|
23
|
+
const ns = index.useNamespace("tooltip");
|
24
|
+
const { controlled, id, open, onOpen, onClose, onToggle } = vue.inject(constants.TOOLTIP_INJECTION_KEY, void 0);
|
25
|
+
const triggerRef = vue.ref(null);
|
26
|
+
const stopWhenControlledOrDisabled = () => {
|
27
|
+
if (vue.unref(controlled) || props.disabled) {
|
28
|
+
return true;
|
29
|
+
}
|
30
|
+
};
|
31
|
+
const trigger = vue.toRef(props, "trigger");
|
32
|
+
const onMouseenter = event.composeEventHandlers(stopWhenControlledOrDisabled, utils.whenTrigger(trigger, "hover", onOpen));
|
33
|
+
const onMouseleave = event.composeEventHandlers(stopWhenControlledOrDisabled, utils.whenTrigger(trigger, "hover", onClose));
|
34
|
+
const onClick = event.composeEventHandlers(stopWhenControlledOrDisabled, utils.whenTrigger(trigger, "click", (e) => {
|
35
|
+
if (e.button === 0) {
|
36
|
+
onToggle(e);
|
37
|
+
}
|
38
|
+
}));
|
39
|
+
const onFocus = event.composeEventHandlers(stopWhenControlledOrDisabled, utils.whenTrigger(trigger, "focus", onOpen));
|
40
|
+
const onBlur = event.composeEventHandlers(stopWhenControlledOrDisabled, utils.whenTrigger(trigger, "focus", onClose));
|
41
|
+
const onContextMenu = event.composeEventHandlers(stopWhenControlledOrDisabled, utils.whenTrigger(trigger, "contextmenu", (e) => {
|
42
|
+
e.preventDefault();
|
43
|
+
onToggle(e);
|
44
|
+
}));
|
45
|
+
const onKeydown = event.composeEventHandlers(stopWhenControlledOrDisabled, (e) => {
|
46
|
+
const { code } = e;
|
47
|
+
if (props.triggerKeys.includes(code)) {
|
48
|
+
e.preventDefault();
|
49
|
+
onToggle(e);
|
50
|
+
}
|
51
|
+
});
|
52
|
+
expose({
|
53
|
+
triggerRef
|
54
|
+
});
|
55
|
+
return (_ctx, _cache) => {
|
56
|
+
return vue.openBlock(), vue.createBlock(vue.unref(trigger$1["default"]), {
|
57
|
+
id: vue.unref(id),
|
58
|
+
"virtual-ref": _ctx.virtualRef,
|
59
|
+
open: vue.unref(open),
|
60
|
+
"virtual-triggering": _ctx.virtualTriggering,
|
61
|
+
class: vue.normalizeClass(vue.unref(ns).e("trigger")),
|
62
|
+
onBlur: vue.unref(onBlur),
|
63
|
+
onClick: vue.unref(onClick),
|
64
|
+
onContextmenu: vue.unref(onContextMenu),
|
65
|
+
onFocus: vue.unref(onFocus),
|
66
|
+
onMouseenter: vue.unref(onMouseenter),
|
67
|
+
onMouseleave: vue.unref(onMouseleave),
|
68
|
+
onKeydown: vue.unref(onKeydown)
|
69
|
+
}, {
|
70
|
+
default: vue.withCtx(() => [
|
71
|
+
vue.renderSlot(_ctx.$slots, "default")
|
72
|
+
]),
|
73
|
+
_: 3
|
74
|
+
}, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]);
|
75
|
+
};
|
19
76
|
}
|
20
77
|
});
|
78
|
+
var ElTooltipTrigger = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "trigger.vue"]]);
|
21
79
|
|
22
|
-
exports
|
80
|
+
exports["default"] = ElTooltipTrigger;
|
23
81
|
//# sourceMappingURL=trigger.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"trigger.js","sources":["../../../../../../packages/components/tooltip/src/trigger.
|
1
|
+
{"version":3,"file":"trigger.js","sources":["../../../../../../packages/components/tooltip/src/trigger.vue"],"sourcesContent":["<template>\n <el-popper-trigger\n :id=\"id\"\n :virtual-ref=\"virtualRef\"\n :open=\"open\"\n :virtual-triggering=\"virtualTriggering\"\n :class=\"ns.e('trigger')\"\n @blur=\"onBlur\"\n @click=\"onClick\"\n @contextmenu=\"onContextMenu\"\n @focus=\"onFocus\"\n @mouseenter=\"onMouseenter\"\n @mouseleave=\"onMouseleave\"\n @keydown=\"onKeydown\"\n >\n <slot />\n </el-popper-trigger>\n</template>\n<script lang=\"ts\" setup>\nimport { inject, ref, toRef, unref } from 'vue'\nimport { ElPopperTrigger } from '@element-plus/components/popper'\nimport { composeEventHandlers } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { TOOLTIP_INJECTION_KEY } from './constants'\nimport { useTooltipTriggerProps } from './trigger'\nimport { whenTrigger } from './utils'\nimport type { OnlyChildExpose } from '@element-plus/components/slot'\n\ndefineOptions({\n name: 'ElTooltipTrigger',\n})\n\nconst props = defineProps(useTooltipTriggerProps)\n\nconst ns = useNamespace('tooltip')\nconst { controlled, id, open, onOpen, onClose, onToggle } = inject(\n TOOLTIP_INJECTION_KEY,\n undefined\n)!\n\nconst triggerRef = ref<OnlyChildExpose | null>(null)\n\nconst stopWhenControlledOrDisabled = () => {\n if (unref(controlled) || props.disabled) {\n return true\n }\n}\nconst trigger = toRef(props, 'trigger')\nconst onMouseenter = composeEventHandlers(\n stopWhenControlledOrDisabled,\n whenTrigger(trigger, 'hover', onOpen)\n)\nconst onMouseleave = composeEventHandlers(\n stopWhenControlledOrDisabled,\n whenTrigger(trigger, 'hover', onClose)\n)\nconst onClick = composeEventHandlers(\n stopWhenControlledOrDisabled,\n whenTrigger(trigger, 'click', (e) => {\n // distinguish left click\n if ((e as MouseEvent).button === 0) {\n onToggle(e)\n }\n })\n)\n\nconst onFocus = composeEventHandlers(\n stopWhenControlledOrDisabled,\n whenTrigger(trigger, 'focus', onOpen)\n)\n\nconst onBlur = composeEventHandlers(\n stopWhenControlledOrDisabled,\n whenTrigger(trigger, 'focus', onClose)\n)\n\nconst onContextMenu = composeEventHandlers(\n stopWhenControlledOrDisabled,\n whenTrigger(trigger, 'contextmenu', (e: Event) => {\n e.preventDefault()\n onToggle(e)\n })\n)\n\nconst onKeydown = composeEventHandlers(\n stopWhenControlledOrDisabled,\n (e: KeyboardEvent) => {\n const { code } = e\n if (props.triggerKeys.includes(code)) {\n e.preventDefault()\n onToggle(e)\n }\n }\n)\n\ndefineExpose({\n /**\n * @description trigger element\n */\n triggerRef,\n})\n</script>\n"],"names":["useNamespace","inject","TOOLTIP_INJECTION_KEY","ref","unref","toRef","composeEventHandlers","whenTrigger","_openBlock","_createBlock","_unref","ElPopperTrigger","_normalizeClass","_withCtx","_renderSlot","_export_sfc"],"mappings":"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"}
|
@@ -2,80 +2,22 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
require('
|
7
|
-
var
|
8
|
-
var trigger = require('./trigger.js');
|
9
|
-
var utils = require('./utils.js');
|
10
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
11
|
-
var trigger$1 = require('../../popper/src/trigger2.js');
|
12
|
-
var event = require('../../../utils/dom/event.js');
|
13
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
5
|
+
var trigger = require('../../popper/src/trigger.js');
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
7
|
+
var aria = require('../../../constants/aria.js');
|
14
8
|
|
15
|
-
const
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
const triggerRef = vue.ref(null);
|
26
|
-
const stopWhenControlledOrDisabled = () => {
|
27
|
-
if (vue.unref(controlled) || props.disabled) {
|
28
|
-
return true;
|
29
|
-
}
|
30
|
-
};
|
31
|
-
const trigger = vue.toRef(props, "trigger");
|
32
|
-
const onMouseenter = event.composeEventHandlers(stopWhenControlledOrDisabled, utils.whenTrigger(trigger, "hover", onOpen));
|
33
|
-
const onMouseleave = event.composeEventHandlers(stopWhenControlledOrDisabled, utils.whenTrigger(trigger, "hover", onClose));
|
34
|
-
const onClick = event.composeEventHandlers(stopWhenControlledOrDisabled, utils.whenTrigger(trigger, "click", (e) => {
|
35
|
-
if (e.button === 0) {
|
36
|
-
onToggle(e);
|
37
|
-
}
|
38
|
-
}));
|
39
|
-
const onFocus = event.composeEventHandlers(stopWhenControlledOrDisabled, utils.whenTrigger(trigger, "focus", onOpen));
|
40
|
-
const onBlur = event.composeEventHandlers(stopWhenControlledOrDisabled, utils.whenTrigger(trigger, "focus", onClose));
|
41
|
-
const onContextMenu = event.composeEventHandlers(stopWhenControlledOrDisabled, utils.whenTrigger(trigger, "contextmenu", (e) => {
|
42
|
-
e.preventDefault();
|
43
|
-
onToggle(e);
|
44
|
-
}));
|
45
|
-
const onKeydown = event.composeEventHandlers(stopWhenControlledOrDisabled, (e) => {
|
46
|
-
const { code } = e;
|
47
|
-
if (props.triggerKeys.includes(code)) {
|
48
|
-
e.preventDefault();
|
49
|
-
onToggle(e);
|
50
|
-
}
|
51
|
-
});
|
52
|
-
expose({
|
53
|
-
triggerRef
|
54
|
-
});
|
55
|
-
return (_ctx, _cache) => {
|
56
|
-
return vue.openBlock(), vue.createBlock(vue.unref(trigger$1["default"]), {
|
57
|
-
id: vue.unref(id),
|
58
|
-
"virtual-ref": _ctx.virtualRef,
|
59
|
-
open: vue.unref(open),
|
60
|
-
"virtual-triggering": _ctx.virtualTriggering,
|
61
|
-
class: vue.normalizeClass(vue.unref(ns).e("trigger")),
|
62
|
-
onBlur: vue.unref(onBlur),
|
63
|
-
onClick: vue.unref(onClick),
|
64
|
-
onContextmenu: vue.unref(onContextMenu),
|
65
|
-
onFocus: vue.unref(onFocus),
|
66
|
-
onMouseenter: vue.unref(onMouseenter),
|
67
|
-
onMouseleave: vue.unref(onMouseleave),
|
68
|
-
onKeydown: vue.unref(onKeydown)
|
69
|
-
}, {
|
70
|
-
default: vue.withCtx(() => [
|
71
|
-
vue.renderSlot(_ctx.$slots, "default")
|
72
|
-
]),
|
73
|
-
_: 3
|
74
|
-
}, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]);
|
75
|
-
};
|
9
|
+
const useTooltipTriggerProps = runtime.buildProps({
|
10
|
+
...trigger.popperTriggerProps,
|
11
|
+
disabled: Boolean,
|
12
|
+
trigger: {
|
13
|
+
type: runtime.definePropType([String, Array]),
|
14
|
+
default: "hover"
|
15
|
+
},
|
16
|
+
triggerKeys: {
|
17
|
+
type: runtime.definePropType(Array),
|
18
|
+
default: () => [aria.EVENT_CODE.enter, aria.EVENT_CODE.numpadEnter, aria.EVENT_CODE.space]
|
76
19
|
}
|
77
20
|
});
|
78
|
-
var ElTooltipTrigger = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "trigger.vue"]]);
|
79
21
|
|
80
|
-
exports
|
22
|
+
exports.useTooltipTriggerProps = useTooltipTriggerProps;
|
81
23
|
//# sourceMappingURL=trigger2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"trigger2.js","sources":["../../../../../../packages/components/tooltip/src/trigger.
|
1
|
+
{"version":3,"file":"trigger2.js","sources":["../../../../../../packages/components/tooltip/src/trigger.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { popperTriggerProps } from '@element-plus/components/popper'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport type TooltipTriggerType = 'hover' | 'focus' | 'click' | 'contextmenu'\n\nexport const useTooltipTriggerProps = buildProps({\n ...popperTriggerProps,\n /**\n * @description whether Tooltip is disabled\n */\n disabled: Boolean,\n /**\n * @description How should the tooltip be triggered (to show)\n */\n trigger: {\n type: definePropType<Arrayable<TooltipTriggerType>>([String, Array]),\n default: 'hover',\n },\n /**\n * @description When you click the mouse to focus on the trigger element, you can define a set of keyboard codes to control the display of tooltip through the keyboard\n */\n triggerKeys: {\n type: definePropType<string[]>(Array),\n default: () => [EVENT_CODE.enter, EVENT_CODE.numpadEnter, EVENT_CODE.space],\n },\n} as const)\n\nexport type ElTooltipTriggerProps = ExtractPropTypes<\n typeof useTooltipTriggerProps\n>\n"],"names":["buildProps","popperTriggerProps","definePropType","EVENT_CODE"],"mappings":";;;;;;;;AAGY,MAAC,sBAAsB,GAAGA,kBAAU,CAAC;AACjD,EAAE,GAAGC,0BAAkB;AACvB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACzC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAEA,sBAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,CAACC,eAAU,CAAC,KAAK,EAAEA,eAAU,CAAC,WAAW,EAAEA,eAAU,CAAC,KAAK,CAAC;AAC/E,GAAG;AACH,CAAC;;;;"}
|
@@ -3,8 +3,8 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var core = require('@vueuse/core');
|
6
|
-
var types = require('../../utils/types.js');
|
7
6
|
var shared = require('@vue/shared');
|
7
|
+
var types = require('../../utils/types.js');
|
8
8
|
|
9
9
|
const nodeList = /* @__PURE__ */ new Map();
|
10
10
|
if (core.isClient) {
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
var vue = require('vue');
|
6
6
|
var core = require('@vueuse/core');
|
7
|
-
var shared = require('@vue/shared');
|
8
7
|
var types = require('../../utils/types.js');
|
8
|
+
var shared = require('@vue/shared');
|
9
9
|
|
10
10
|
function useFocusController(target, {
|
11
11
|
beforeFocus,
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var vue = require('vue');
|
6
6
|
var index = require('../use-namespace/index.js');
|
7
7
|
var error = require('../../utils/error.js');
|
8
|
+
var core = require('@vueuse/core');
|
8
9
|
var style = require('../../utils/dom/style.js');
|
9
10
|
var scroll = require('../../utils/dom/scroll.js');
|
10
|
-
var core = require('@vueuse/core');
|
11
11
|
|
12
12
|
const useLockscreen = (trigger, options = {}) => {
|
13
13
|
if (!vue.isRef(trigger)) {
|
package/lib/index.js
CHANGED
@@ -13,7 +13,7 @@ var autocomplete = require('./components/autocomplete/src/autocomplete.js');
|
|
13
13
|
var index$2 = require('./components/autocomplete/index.js');
|
14
14
|
var avatar = require('./components/avatar/src/avatar.js');
|
15
15
|
var index$3 = require('./components/avatar/index.js');
|
16
|
-
var backtop = require('./components/backtop/src/
|
16
|
+
var backtop = require('./components/backtop/src/backtop.js');
|
17
17
|
var index$4 = require('./components/backtop/index.js');
|
18
18
|
var badge = require('./components/badge/src/badge.js');
|
19
19
|
var index$5 = require('./components/badge/index.js');
|
@@ -124,7 +124,7 @@ var content = require('./components/popper/src/content2.js');
|
|
124
124
|
var index$G = require('./components/popper/index.js');
|
125
125
|
var progress = require('./components/progress/src/progress.js');
|
126
126
|
var index$H = require('./components/progress/index.js');
|
127
|
-
var radio = require('./components/radio/src/
|
127
|
+
var radio = require('./components/radio/src/radio.js');
|
128
128
|
var radioGroup = require('./components/radio/src/radio-group.js');
|
129
129
|
var radioButton = require('./components/radio/src/radio-button.js');
|
130
130
|
var constants$b = require('./components/radio/src/constants.js');
|
@@ -191,7 +191,7 @@ var index$$ = require('./components/time-select/index.js');
|
|
191
191
|
var timelineItem = require('./components/timeline/src/timeline-item.js');
|
192
192
|
var index$10 = require('./components/timeline/index.js');
|
193
193
|
var tooltip = require('./components/tooltip/src/tooltip.js');
|
194
|
-
var trigger$2 = require('./components/tooltip/src/
|
194
|
+
var trigger$2 = require('./components/tooltip/src/trigger2.js');
|
195
195
|
var content$2 = require('./components/tooltip/src/content.js');
|
196
196
|
var constants$i = require('./components/tooltip/src/constants.js');
|
197
197
|
var index$11 = require('./components/tooltip/index.js');
|
@@ -232,7 +232,7 @@ var index$1e = require('./components/message/index.js');
|
|
232
232
|
var index$1f = require('./components/message-box/index.js');
|
233
233
|
var notification = require('./components/notification/src/notification.js');
|
234
234
|
var index$1g = require('./components/notification/index.js');
|
235
|
-
var popover = require('./components/popover/src/
|
235
|
+
var popover = require('./components/popover/src/popover.js');
|
236
236
|
var index$1h = require('./components/popover/index.js');
|
237
237
|
var aria = require('./constants/aria.js');
|
238
238
|
var date = require('./constants/date.js');
|
package/lib/version.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export declare const version = "0.0.
|
1
|
+
export declare const version = "0.0.20241206";
|
package/lib/version.js
CHANGED
package/lib/version.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20241206'\n"],"names":[],"mappings":";;;;AAAY,MAAC,OAAO,GAAG;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@element-plus/nightly",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.20241206",
|
4
4
|
"description": "A Component Library for Vue 3",
|
5
5
|
"keywords": [
|
6
6
|
"element-plus",
|
@@ -112,5 +112,5 @@
|
|
112
112
|
"not ie 11",
|
113
113
|
"not op_mini all"
|
114
114
|
],
|
115
|
-
"gitHead": "
|
115
|
+
"gitHead": "ea3cfc97c73d9b6502189645b9153717448bfe38"
|
116
116
|
}
|