@element-plus/nightly 0.0.20241121 → 0.0.20241122
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +1 -1
- package/dist/index.full.js +19 -16
- package/dist/index.full.min.js +13 -13
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +5 -5
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +19 -16
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/calendar/src/date-table2.mjs +9 -4
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/cascader/src/cascader2.mjs +2 -2
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/checkbox/index.mjs +2 -2
- package/es/components/checkbox/src/checkbox-group.mjs +73 -30
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-group2.mjs +30 -73
- package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
- package/es/components/index.mjs +5 -5
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/content.mjs +93 -137
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content2.mjs +137 -93
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/select/src/select2.mjs +3 -4
- package/es/components/select/src/select2.mjs.map +1 -1
- package/es/components/select-v2/src/select.mjs +3 -4
- package/es/components/select-v2/src/select.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton-item.mjs +23 -18
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +18 -23
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +72 -229
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +229 -72
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/tooltip/src/content.mjs +1 -1
- package/es/components/tooltip/src/content2.mjs +1 -1
- package/es/components/tree-select/src/tree-select.mjs +1 -1
- package/es/components/tree-select/src/tree-select.mjs.map +1 -1
- package/es/index.mjs +5 -5
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/calendar/src/date-table2.js +8 -3
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/cascader/src/cascader2.js +2 -2
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/checkbox/index.js +2 -2
- package/lib/components/checkbox/src/checkbox-group.js +73 -31
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-group2.js +31 -73
- package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
- package/lib/components/index.js +5 -5
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/content.js +98 -137
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content2.js +137 -98
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/select/src/select2.js +3 -4
- package/lib/components/select/src/select2.js.map +1 -1
- package/lib/components/select-v2/src/select.js +3 -4
- package/lib/components/select-v2/src/select.js.map +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton-item.js +23 -18
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +18 -23
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +72 -228
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +228 -72
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/tooltip/src/content.js +1 -1
- package/lib/components/tooltip/src/content2.js +1 -1
- package/lib/components/tree-select/src/tree-select.js +1 -1
- package/lib/components/tree-select/src/tree-select.js.map +1 -1
- package/lib/index.js +5 -5
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/theme-chalk/el-button.css +1 -1
- package/theme-chalk/el-cascader.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/cascader.scss +18 -4
- package/theme-chalk/src/common/var.scss +42 -1
- package/web-types.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"checkbox-group2.js","sources":["../../../../../../packages/components/checkbox/src/checkbox-group.
|
1
|
+
{"version":3,"file":"checkbox-group2.js","sources":["../../../../../../packages/components/checkbox/src/checkbox-group.ts"],"sourcesContent":["import { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport { buildProps, definePropType, isArray } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type checkboxGroup from './checkbox-group.vue'\nimport type { CheckboxValueType } from './checkbox'\n\nexport type CheckboxGroupValueType = Exclude<CheckboxValueType, boolean>[]\n\nexport const checkboxGroupProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType<CheckboxGroupValueType>(Array),\n default: () => [],\n },\n /**\n * @description whether the nesting checkboxes are disabled\n */\n disabled: Boolean,\n /**\n * @description minimum number of checkbox checked\n */\n min: Number,\n /**\n * @description maximum number of checkbox checked\n */\n max: Number,\n /**\n * @description size of checkbox\n */\n size: useSizeProp,\n /**\n * @description border and background color when button is active\n */\n fill: String,\n /**\n * @description font color when button is active\n */\n textColor: String,\n /**\n * @description element tag of the checkbox group\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\n\nexport const checkboxGroupEmits = {\n [UPDATE_MODEL_EVENT]: (val: CheckboxGroupValueType) => isArray(val),\n change: (val: CheckboxValueType[]) => isArray(val),\n}\n\nexport type CheckboxGroupProps = ExtractPropTypes<typeof checkboxGroupProps>\nexport type CheckboxGroupEmits = typeof checkboxGroupEmits\nexport type CheckboxGroupInstance = InstanceType<typeof checkboxGroup>\n"],"names":["buildProps","definePropType","useSizeProp","useAriaProps","UPDATE_MODEL_EVENT","isArray"],"mappings":";;;;;;;;;;;;;AAGY,MAAC,kBAAkB,GAAGA,kBAAU,CAAC;AAC7C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAEC,sBAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,GAAG,EAAE,MAAM;AACb,EAAE,GAAG,EAAE,MAAM;AACb,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,GAAGC,oBAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAG;AAClC,EAAE,CAACC,wBAAkB,GAAG,CAAC,GAAG,KAAKC,cAAO,CAAC,GAAG,CAAC;AAC7C,EAAE,MAAM,EAAE,CAAC,GAAG,KAAKA,cAAO,CAAC,GAAG,CAAC;AAC/B;;;;;"}
|
package/lib/components/index.js
CHANGED
@@ -104,7 +104,7 @@ var cascader = require('./cascader/src/cascader.js');
|
|
104
104
|
var types = require('./cascader-panel/src/types.js');
|
105
105
|
var config = require('./cascader-panel/src/config.js');
|
106
106
|
var checkTag = require('./check-tag/src/check-tag.js');
|
107
|
-
var checkboxGroup = require('./checkbox/src/checkbox-
|
107
|
+
var checkboxGroup = require('./checkbox/src/checkbox-group2.js');
|
108
108
|
var checkbox = require('./checkbox/src/checkbox.js');
|
109
109
|
var constants$3 = require('./checkbox/src/constants.js');
|
110
110
|
var col = require('./col/src/col.js');
|
@@ -151,12 +151,12 @@ var constants$9 = require('./pagination/src/constants.js');
|
|
151
151
|
var popconfirm = require('./popconfirm/src/popconfirm.js');
|
152
152
|
var popper = require('./popper/src/popper.js');
|
153
153
|
var trigger$1 = require('./popper/src/trigger.js');
|
154
|
-
var content$1 = require('./popper/src/
|
154
|
+
var content$1 = require('./popper/src/content.js');
|
155
155
|
var arrow$1 = require('./popper/src/arrow.js');
|
156
156
|
var constants$a = require('./popper/src/constants.js');
|
157
157
|
var arrow = require('./popper/src/arrow2.js');
|
158
158
|
var trigger = require('./popper/src/trigger2.js');
|
159
|
-
var content = require('./popper/src/
|
159
|
+
var content = require('./popper/src/content2.js');
|
160
160
|
var progress = require('./progress/src/progress.js');
|
161
161
|
var radio = require('./radio/src/radio.js');
|
162
162
|
var radioGroup = require('./radio/src/radio-group.js');
|
@@ -173,7 +173,7 @@ var constants$d = require('./scrollbar/src/constants.js');
|
|
173
173
|
var token = require('./select/src/token.js');
|
174
174
|
var token$1 = require('./select-v2/src/token.js');
|
175
175
|
var skeleton = require('./skeleton/src/skeleton.js');
|
176
|
-
var skeletonItem = require('./skeleton/src/skeleton-
|
176
|
+
var skeletonItem = require('./skeleton/src/skeleton-item2.js');
|
177
177
|
var slider = require('./slider/src/slider.js');
|
178
178
|
var constants$e = require('./slider/src/constants.js');
|
179
179
|
var space = require('./space/src/space.js');
|
@@ -182,7 +182,7 @@ var useSpace = require('./space/src/use-space.js');
|
|
182
182
|
var statistic = require('./statistic/src/statistic.js');
|
183
183
|
var item$1 = require('./steps/src/item.js');
|
184
184
|
var steps = require('./steps/src/steps.js');
|
185
|
-
var _switch = require('./switch/src/
|
185
|
+
var _switch = require('./switch/src/switch.js');
|
186
186
|
var constants$f = require('./table-v2/src/constants.js');
|
187
187
|
var tableV2 = require('./table-v2/src/table-v2.js');
|
188
188
|
var _private = require('./table-v2/src/private.js');
|
@@ -6,10 +6,10 @@ require('../../utils/index.js');
|
|
6
6
|
var popper$1 = require('./src/popper2.js');
|
7
7
|
var arrow = require('./src/arrow2.js');
|
8
8
|
var trigger = require('./src/trigger2.js');
|
9
|
-
var content = require('./src/
|
9
|
+
var content = require('./src/content2.js');
|
10
10
|
var popper = require('./src/popper.js');
|
11
11
|
var trigger$1 = require('./src/trigger.js');
|
12
|
-
var content$1 = require('./src/
|
12
|
+
var content$1 = require('./src/content.js');
|
13
13
|
var arrow$1 = require('./src/arrow.js');
|
14
14
|
var constants = require('./src/constants.js');
|
15
15
|
var install = require('../../utils/vue/install.js');
|
@@ -2,146 +2,107 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var lodashUnified = require('lodash-unified');
|
5
|
+
var core = require('@popperjs/core');
|
7
6
|
require('../../../utils/index.js');
|
8
|
-
require('
|
9
|
-
require('
|
10
|
-
var
|
11
|
-
var content = require('./content2.js');
|
12
|
-
require('./composables/index.js');
|
13
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
14
|
-
var useFocusTrap = require('./composables/use-focus-trap.js');
|
15
|
-
var useContent = require('./composables/use-content.js');
|
16
|
-
var useContentDom = require('./composables/use-content-dom.js');
|
17
|
-
var constants = require('../../form/src/constants.js');
|
18
|
-
var shared = require('@vue/shared');
|
19
|
-
var types = require('../../../utils/types.js');
|
20
|
-
var focusTrap = require('../../focus-trap/src/focus-trap.js');
|
7
|
+
require('../../../hooks/index.js');
|
8
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
9
|
+
var index = require('../../../hooks/use-aria/index.js');
|
21
10
|
|
22
|
-
const
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
const formItemContext = vue.inject(constants.formItemContextKey, void 0);
|
54
|
-
const arrowOffset = vue.ref();
|
55
|
-
vue.provide(constants$1.POPPER_CONTENT_INJECTION_KEY, {
|
56
|
-
arrowStyle,
|
57
|
-
arrowRef,
|
58
|
-
arrowOffset
|
59
|
-
});
|
60
|
-
if (formItemContext) {
|
61
|
-
vue.provide(constants.formItemContextKey, {
|
62
|
-
...formItemContext,
|
63
|
-
addInputId: shared.NOOP,
|
64
|
-
removeInputId: shared.NOOP
|
65
|
-
});
|
66
|
-
}
|
67
|
-
let triggerTargetAriaStopWatch = void 0;
|
68
|
-
const updatePopper = (shouldUpdateZIndex = true) => {
|
69
|
-
update();
|
70
|
-
shouldUpdateZIndex && updateZIndex();
|
71
|
-
};
|
72
|
-
const togglePopperAlive = () => {
|
73
|
-
updatePopper(false);
|
74
|
-
if (props.visible && props.focusOnShow) {
|
75
|
-
trapped.value = true;
|
76
|
-
} else if (props.visible === false) {
|
77
|
-
trapped.value = false;
|
78
|
-
}
|
79
|
-
};
|
80
|
-
vue.onMounted(() => {
|
81
|
-
vue.watch(() => props.triggerTargetEl, (triggerTargetEl, prevTriggerTargetEl) => {
|
82
|
-
triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
|
83
|
-
triggerTargetAriaStopWatch = void 0;
|
84
|
-
const el = vue.unref(triggerTargetEl || contentRef.value);
|
85
|
-
const prevEl = vue.unref(prevTriggerTargetEl || contentRef.value);
|
86
|
-
if (types.isElement(el)) {
|
87
|
-
triggerTargetAriaStopWatch = vue.watch([role, () => props.ariaLabel, ariaModal, () => props.id], (watches) => {
|
88
|
-
;
|
89
|
-
["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => {
|
90
|
-
lodashUnified.isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
|
91
|
-
});
|
92
|
-
}, { immediate: true });
|
93
|
-
}
|
94
|
-
if (prevEl !== el && types.isElement(prevEl)) {
|
95
|
-
;
|
96
|
-
["role", "aria-label", "aria-modal", "id"].forEach((key) => {
|
97
|
-
prevEl.removeAttribute(key);
|
98
|
-
});
|
99
|
-
}
|
100
|
-
}, { immediate: true });
|
101
|
-
vue.watch(() => props.visible, togglePopperAlive, { immediate: true });
|
102
|
-
});
|
103
|
-
vue.onBeforeUnmount(() => {
|
104
|
-
triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
|
105
|
-
triggerTargetAriaStopWatch = void 0;
|
106
|
-
});
|
107
|
-
expose({
|
108
|
-
popperContentRef: contentRef,
|
109
|
-
popperInstanceRef: instanceRef,
|
110
|
-
updatePopper,
|
111
|
-
contentStyle
|
112
|
-
});
|
113
|
-
return (_ctx, _cache) => {
|
114
|
-
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
115
|
-
ref_key: "contentRef",
|
116
|
-
ref: contentRef
|
117
|
-
}, vue.unref(contentAttrs), {
|
118
|
-
style: vue.unref(contentStyle),
|
119
|
-
class: vue.unref(contentClass),
|
120
|
-
tabindex: "-1",
|
121
|
-
onMouseenter: (e) => _ctx.$emit("mouseenter", e),
|
122
|
-
onMouseleave: (e) => _ctx.$emit("mouseleave", e)
|
123
|
-
}), [
|
124
|
-
vue.createVNode(vue.unref(focusTrap["default"]), {
|
125
|
-
trapped: vue.unref(trapped),
|
126
|
-
"trap-on-focus-in": true,
|
127
|
-
"focus-trap-el": vue.unref(contentRef),
|
128
|
-
"focus-start-el": vue.unref(focusStartRef),
|
129
|
-
onFocusAfterTrapped: vue.unref(onFocusAfterTrapped),
|
130
|
-
onFocusAfterReleased: vue.unref(onFocusAfterReleased),
|
131
|
-
onFocusin: vue.unref(onFocusInTrap),
|
132
|
-
onFocusoutPrevented: vue.unref(onFocusoutPrevented),
|
133
|
-
onReleaseRequested: vue.unref(onReleaseRequested)
|
134
|
-
}, {
|
135
|
-
default: vue.withCtx(() => [
|
136
|
-
vue.renderSlot(_ctx.$slots, "default")
|
137
|
-
]),
|
138
|
-
_: 3
|
139
|
-
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
|
140
|
-
], 16, ["onMouseenter", "onMouseleave"]);
|
141
|
-
};
|
11
|
+
const POSITIONING_STRATEGIES = ["fixed", "absolute"];
|
12
|
+
const popperCoreConfigProps = runtime.buildProps({
|
13
|
+
boundariesPadding: {
|
14
|
+
type: Number,
|
15
|
+
default: 0
|
16
|
+
},
|
17
|
+
fallbackPlacements: {
|
18
|
+
type: runtime.definePropType(Array),
|
19
|
+
default: void 0
|
20
|
+
},
|
21
|
+
gpuAcceleration: {
|
22
|
+
type: Boolean,
|
23
|
+
default: true
|
24
|
+
},
|
25
|
+
offset: {
|
26
|
+
type: Number,
|
27
|
+
default: 12
|
28
|
+
},
|
29
|
+
placement: {
|
30
|
+
type: String,
|
31
|
+
values: core.placements,
|
32
|
+
default: "bottom"
|
33
|
+
},
|
34
|
+
popperOptions: {
|
35
|
+
type: runtime.definePropType(Object),
|
36
|
+
default: () => ({})
|
37
|
+
},
|
38
|
+
strategy: {
|
39
|
+
type: String,
|
40
|
+
values: POSITIONING_STRATEGIES,
|
41
|
+
default: "absolute"
|
142
42
|
}
|
143
43
|
});
|
144
|
-
|
44
|
+
const popperContentProps = runtime.buildProps({
|
45
|
+
...popperCoreConfigProps,
|
46
|
+
id: String,
|
47
|
+
style: {
|
48
|
+
type: runtime.definePropType([String, Array, Object])
|
49
|
+
},
|
50
|
+
className: {
|
51
|
+
type: runtime.definePropType([String, Array, Object])
|
52
|
+
},
|
53
|
+
effect: {
|
54
|
+
type: runtime.definePropType(String),
|
55
|
+
default: "dark"
|
56
|
+
},
|
57
|
+
visible: Boolean,
|
58
|
+
enterable: {
|
59
|
+
type: Boolean,
|
60
|
+
default: true
|
61
|
+
},
|
62
|
+
pure: Boolean,
|
63
|
+
focusOnShow: {
|
64
|
+
type: Boolean,
|
65
|
+
default: false
|
66
|
+
},
|
67
|
+
trapping: {
|
68
|
+
type: Boolean,
|
69
|
+
default: false
|
70
|
+
},
|
71
|
+
popperClass: {
|
72
|
+
type: runtime.definePropType([String, Array, Object])
|
73
|
+
},
|
74
|
+
popperStyle: {
|
75
|
+
type: runtime.definePropType([String, Array, Object])
|
76
|
+
},
|
77
|
+
referenceEl: {
|
78
|
+
type: runtime.definePropType(Object)
|
79
|
+
},
|
80
|
+
triggerTargetEl: {
|
81
|
+
type: runtime.definePropType(Object)
|
82
|
+
},
|
83
|
+
stopPopperMouseEvent: {
|
84
|
+
type: Boolean,
|
85
|
+
default: true
|
86
|
+
},
|
87
|
+
virtualTriggering: Boolean,
|
88
|
+
zIndex: Number,
|
89
|
+
...index.useAriaProps(["ariaLabel"])
|
90
|
+
});
|
91
|
+
const popperContentEmits = {
|
92
|
+
mouseenter: (evt) => evt instanceof MouseEvent,
|
93
|
+
mouseleave: (evt) => evt instanceof MouseEvent,
|
94
|
+
focus: () => true,
|
95
|
+
blur: () => true,
|
96
|
+
close: () => true
|
97
|
+
};
|
98
|
+
const usePopperCoreConfigProps = popperCoreConfigProps;
|
99
|
+
const usePopperContentProps = popperContentProps;
|
100
|
+
const usePopperContentEmits = popperContentEmits;
|
145
101
|
|
146
|
-
exports
|
102
|
+
exports.popperContentEmits = popperContentEmits;
|
103
|
+
exports.popperContentProps = popperContentProps;
|
104
|
+
exports.popperCoreConfigProps = popperCoreConfigProps;
|
105
|
+
exports.usePopperContentEmits = usePopperContentEmits;
|
106
|
+
exports.usePopperContentProps = usePopperContentProps;
|
107
|
+
exports.usePopperCoreConfigProps = usePopperCoreConfigProps;
|
147
108
|
//# sourceMappingURL=content.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"content.js","sources":["../../../../../../packages/components/popper/src/content.
|
1
|
+
{"version":3,"file":"content.js","sources":["../../../../../../packages/components/popper/src/content.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { buildProps, definePropType } from '@element-plus/utils'\nimport { useAriaProps } from '@element-plus/hooks'\n\nimport type { PopperEffect } from './popper'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Options, Placement } from '@popperjs/core'\nimport type { Measurable } from './constants'\nimport type Content from './content.vue'\n\ntype ClassObjectType = Record<string, boolean>\ntype ClassType = string | ClassObjectType | ClassType[]\n\nconst POSITIONING_STRATEGIES = ['fixed', 'absolute'] as const\n\nexport interface CreatePopperInstanceParams {\n referenceEl: Measurable\n popperContentEl: HTMLElement\n arrowEl: HTMLElement | undefined\n}\n\nexport const popperCoreConfigProps = buildProps({\n boundariesPadding: {\n type: Number,\n default: 0,\n },\n fallbackPlacements: {\n type: definePropType<Placement[]>(Array),\n default: undefined,\n },\n gpuAcceleration: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the Tooltip\n */\n offset: {\n type: Number,\n default: 12,\n },\n /**\n * @description position of Tooltip\n */\n placement: {\n type: String,\n values: placements,\n default: 'bottom',\n },\n /**\n * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n */\n popperOptions: {\n type: definePropType<Partial<Options>>(Object),\n default: () => ({}),\n },\n strategy: {\n type: String,\n values: POSITIONING_STRATEGIES,\n default: 'absolute',\n },\n} as const)\nexport type PopperCoreConfigProps = ExtractPropTypes<\n typeof popperCoreConfigProps\n>\n\nexport const popperContentProps = buildProps({\n ...popperCoreConfigProps,\n id: String,\n style: {\n type: definePropType<StyleValue>([String, Array, Object]),\n },\n className: {\n type: definePropType<ClassType>([String, Array, Object]),\n },\n effect: {\n type: definePropType<PopperEffect | string>(String),\n default: 'dark',\n },\n visible: Boolean,\n enterable: {\n type: Boolean,\n default: true,\n },\n pure: Boolean,\n focusOnShow: {\n type: Boolean,\n default: false,\n },\n trapping: {\n type: Boolean,\n default: false,\n },\n popperClass: {\n type: definePropType<ClassType>([String, Array, Object]),\n },\n popperStyle: {\n type: definePropType<StyleValue>([String, Array, Object]),\n },\n referenceEl: {\n type: definePropType<HTMLElement>(Object),\n },\n triggerTargetEl: {\n type: definePropType<HTMLElement>(Object),\n },\n stopPopperMouseEvent: {\n type: Boolean,\n default: true,\n },\n virtualTriggering: Boolean,\n zIndex: Number,\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport type PopperContentProps = ExtractPropTypes<typeof popperContentProps>\n\nexport const popperContentEmits = {\n mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,\n mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,\n focus: () => true,\n blur: () => true,\n close: () => true,\n}\nexport type PopperContentEmits = typeof popperContentEmits\n\nexport type PopperContentInstance = InstanceType<typeof Content>\n\n/** @deprecated use `popperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport const usePopperCoreConfigProps = popperCoreConfigProps\n\n/** @deprecated use `popperContentProps` instead, and it will be deprecated in the next major version */\nexport const usePopperContentProps = popperContentProps\n\n/** @deprecated use `popperContentEmits` instead, and it will be deprecated in the next major version */\nexport const usePopperContentEmits = popperContentEmits\n\n/** @deprecated use `PopperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperCoreConfigProps = PopperCoreConfigProps\n\n/** @deprecated use `PopperContentProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperContentProps = PopperContentProps\n\n/** @deprecated use `PopperContentInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowContent = PopperContentInstance\n"],"names":["buildProps","definePropType","placements","useAriaProps"],"mappings":"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"}
|
@@ -2,107 +2,146 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
5
|
+
var vue = require('vue');
|
6
|
+
var lodashUnified = require('lodash-unified');
|
6
7
|
require('../../../utils/index.js');
|
7
|
-
require('
|
8
|
-
|
9
|
-
var
|
8
|
+
require('../../focus-trap/index.js');
|
9
|
+
require('../../form/index.js');
|
10
|
+
var constants$1 = require('./constants.js');
|
11
|
+
var content = require('./content.js');
|
12
|
+
require('./composables/index.js');
|
13
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
14
|
+
var useFocusTrap = require('./composables/use-focus-trap.js');
|
15
|
+
var useContent = require('./composables/use-content.js');
|
16
|
+
var useContentDom = require('./composables/use-content-dom.js');
|
17
|
+
var constants = require('../../form/src/constants.js');
|
18
|
+
var shared = require('@vue/shared');
|
19
|
+
var types = require('../../../utils/types.js');
|
20
|
+
var focusTrap = require('../../focus-trap/src/focus-trap.js');
|
10
21
|
|
11
|
-
const
|
12
|
-
|
13
|
-
boundariesPadding: {
|
14
|
-
type: Number,
|
15
|
-
default: 0
|
16
|
-
},
|
17
|
-
fallbackPlacements: {
|
18
|
-
type: runtime.definePropType(Array),
|
19
|
-
default: void 0
|
20
|
-
},
|
21
|
-
gpuAcceleration: {
|
22
|
-
type: Boolean,
|
23
|
-
default: true
|
24
|
-
},
|
25
|
-
offset: {
|
26
|
-
type: Number,
|
27
|
-
default: 12
|
28
|
-
},
|
29
|
-
placement: {
|
30
|
-
type: String,
|
31
|
-
values: core.placements,
|
32
|
-
default: "bottom"
|
33
|
-
},
|
34
|
-
popperOptions: {
|
35
|
-
type: runtime.definePropType(Object),
|
36
|
-
default: () => ({})
|
37
|
-
},
|
38
|
-
strategy: {
|
39
|
-
type: String,
|
40
|
-
values: POSITIONING_STRATEGIES,
|
41
|
-
default: "absolute"
|
42
|
-
}
|
22
|
+
const __default__ = vue.defineComponent({
|
23
|
+
name: "ElPopperContent"
|
43
24
|
});
|
44
|
-
const
|
45
|
-
...
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
25
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
26
|
+
...__default__,
|
27
|
+
props: content.popperContentProps,
|
28
|
+
emits: content.popperContentEmits,
|
29
|
+
setup(__props, { expose, emit }) {
|
30
|
+
const props = __props;
|
31
|
+
const {
|
32
|
+
focusStartRef,
|
33
|
+
trapped,
|
34
|
+
onFocusAfterReleased,
|
35
|
+
onFocusAfterTrapped,
|
36
|
+
onFocusInTrap,
|
37
|
+
onFocusoutPrevented,
|
38
|
+
onReleaseRequested
|
39
|
+
} = useFocusTrap.usePopperContentFocusTrap(props, emit);
|
40
|
+
const { attributes, arrowRef, contentRef, styles, instanceRef, role, update } = useContent.usePopperContent(props);
|
41
|
+
const {
|
42
|
+
ariaModal,
|
43
|
+
arrowStyle,
|
44
|
+
contentAttrs,
|
45
|
+
contentClass,
|
46
|
+
contentStyle,
|
47
|
+
updateZIndex
|
48
|
+
} = useContentDom.usePopperContentDOM(props, {
|
49
|
+
styles,
|
50
|
+
attributes,
|
51
|
+
role
|
52
|
+
});
|
53
|
+
const formItemContext = vue.inject(constants.formItemContextKey, void 0);
|
54
|
+
const arrowOffset = vue.ref();
|
55
|
+
vue.provide(constants$1.POPPER_CONTENT_INJECTION_KEY, {
|
56
|
+
arrowStyle,
|
57
|
+
arrowRef,
|
58
|
+
arrowOffset
|
59
|
+
});
|
60
|
+
if (formItemContext) {
|
61
|
+
vue.provide(constants.formItemContextKey, {
|
62
|
+
...formItemContext,
|
63
|
+
addInputId: shared.NOOP,
|
64
|
+
removeInputId: shared.NOOP
|
65
|
+
});
|
66
|
+
}
|
67
|
+
let triggerTargetAriaStopWatch = void 0;
|
68
|
+
const updatePopper = (shouldUpdateZIndex = true) => {
|
69
|
+
update();
|
70
|
+
shouldUpdateZIndex && updateZIndex();
|
71
|
+
};
|
72
|
+
const togglePopperAlive = () => {
|
73
|
+
updatePopper(false);
|
74
|
+
if (props.visible && props.focusOnShow) {
|
75
|
+
trapped.value = true;
|
76
|
+
} else if (props.visible === false) {
|
77
|
+
trapped.value = false;
|
78
|
+
}
|
79
|
+
};
|
80
|
+
vue.onMounted(() => {
|
81
|
+
vue.watch(() => props.triggerTargetEl, (triggerTargetEl, prevTriggerTargetEl) => {
|
82
|
+
triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
|
83
|
+
triggerTargetAriaStopWatch = void 0;
|
84
|
+
const el = vue.unref(triggerTargetEl || contentRef.value);
|
85
|
+
const prevEl = vue.unref(prevTriggerTargetEl || contentRef.value);
|
86
|
+
if (types.isElement(el)) {
|
87
|
+
triggerTargetAriaStopWatch = vue.watch([role, () => props.ariaLabel, ariaModal, () => props.id], (watches) => {
|
88
|
+
;
|
89
|
+
["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => {
|
90
|
+
lodashUnified.isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
|
91
|
+
});
|
92
|
+
}, { immediate: true });
|
93
|
+
}
|
94
|
+
if (prevEl !== el && types.isElement(prevEl)) {
|
95
|
+
;
|
96
|
+
["role", "aria-label", "aria-modal", "id"].forEach((key) => {
|
97
|
+
prevEl.removeAttribute(key);
|
98
|
+
});
|
99
|
+
}
|
100
|
+
}, { immediate: true });
|
101
|
+
vue.watch(() => props.visible, togglePopperAlive, { immediate: true });
|
102
|
+
});
|
103
|
+
vue.onBeforeUnmount(() => {
|
104
|
+
triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
|
105
|
+
triggerTargetAriaStopWatch = void 0;
|
106
|
+
});
|
107
|
+
expose({
|
108
|
+
popperContentRef: contentRef,
|
109
|
+
popperInstanceRef: instanceRef,
|
110
|
+
updatePopper,
|
111
|
+
contentStyle
|
112
|
+
});
|
113
|
+
return (_ctx, _cache) => {
|
114
|
+
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
115
|
+
ref_key: "contentRef",
|
116
|
+
ref: contentRef
|
117
|
+
}, vue.unref(contentAttrs), {
|
118
|
+
style: vue.unref(contentStyle),
|
119
|
+
class: vue.unref(contentClass),
|
120
|
+
tabindex: "-1",
|
121
|
+
onMouseenter: (e) => _ctx.$emit("mouseenter", e),
|
122
|
+
onMouseleave: (e) => _ctx.$emit("mouseleave", e)
|
123
|
+
}), [
|
124
|
+
vue.createVNode(vue.unref(focusTrap["default"]), {
|
125
|
+
trapped: vue.unref(trapped),
|
126
|
+
"trap-on-focus-in": true,
|
127
|
+
"focus-trap-el": vue.unref(contentRef),
|
128
|
+
"focus-start-el": vue.unref(focusStartRef),
|
129
|
+
onFocusAfterTrapped: vue.unref(onFocusAfterTrapped),
|
130
|
+
onFocusAfterReleased: vue.unref(onFocusAfterReleased),
|
131
|
+
onFocusin: vue.unref(onFocusInTrap),
|
132
|
+
onFocusoutPrevented: vue.unref(onFocusoutPrevented),
|
133
|
+
onReleaseRequested: vue.unref(onReleaseRequested)
|
134
|
+
}, {
|
135
|
+
default: vue.withCtx(() => [
|
136
|
+
vue.renderSlot(_ctx.$slots, "default")
|
137
|
+
]),
|
138
|
+
_: 3
|
139
|
+
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
|
140
|
+
], 16, ["onMouseenter", "onMouseleave"]);
|
141
|
+
};
|
142
|
+
}
|
90
143
|
});
|
91
|
-
|
92
|
-
mouseenter: (evt) => evt instanceof MouseEvent,
|
93
|
-
mouseleave: (evt) => evt instanceof MouseEvent,
|
94
|
-
focus: () => true,
|
95
|
-
blur: () => true,
|
96
|
-
close: () => true
|
97
|
-
};
|
98
|
-
const usePopperCoreConfigProps = popperCoreConfigProps;
|
99
|
-
const usePopperContentProps = popperContentProps;
|
100
|
-
const usePopperContentEmits = popperContentEmits;
|
144
|
+
var ElPopperContent = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "content.vue"]]);
|
101
145
|
|
102
|
-
exports
|
103
|
-
exports.popperContentProps = popperContentProps;
|
104
|
-
exports.popperCoreConfigProps = popperCoreConfigProps;
|
105
|
-
exports.usePopperContentEmits = usePopperContentEmits;
|
106
|
-
exports.usePopperContentProps = usePopperContentProps;
|
107
|
-
exports.usePopperCoreConfigProps = usePopperCoreConfigProps;
|
146
|
+
exports["default"] = ElPopperContent;
|
108
147
|
//# sourceMappingURL=content2.js.map
|