You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
2.5 KiB
100 lines
2.5 KiB
'use strict';
|
|
|
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
|
var aria = require('../../../utils/aria.js');
|
|
var props = require('../../../utils/props.js');
|
|
require('../../collection/index.js');
|
|
require('../../tooltip/index.js');
|
|
var tooltip = require('../../tooltip/src/tooltip2.js');
|
|
var collection = require('../../collection/src/collection.js');
|
|
|
|
const dropdownProps = {
|
|
trigger: tooltip.useTooltipTriggerProps.trigger,
|
|
effect: {
|
|
...tooltip.useTooltipContentProps.effect,
|
|
default: "light"
|
|
},
|
|
...props.buildProps({
|
|
type: {
|
|
type: props.definePropType(String)
|
|
},
|
|
placement: {
|
|
type: props.definePropType(String),
|
|
default: "bottom"
|
|
},
|
|
size: {
|
|
type: String,
|
|
default: ""
|
|
},
|
|
splitButton: Boolean,
|
|
hideOnClick: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
loop: {
|
|
type: Boolean
|
|
},
|
|
showTimeout: {
|
|
type: Number,
|
|
default: 150
|
|
},
|
|
hideTimeout: {
|
|
type: Number,
|
|
default: 150
|
|
},
|
|
tabindex: {
|
|
type: props.definePropType([Number, String]),
|
|
default: 0
|
|
},
|
|
maxHeight: {
|
|
type: props.definePropType([Number, String]),
|
|
default: ""
|
|
},
|
|
popperClass: {
|
|
type: String,
|
|
default: ""
|
|
}
|
|
})
|
|
};
|
|
const dropdownItemProps = props.buildProps({
|
|
command: {
|
|
type: [Object, String, Number],
|
|
default: () => ({})
|
|
},
|
|
disabled: Boolean,
|
|
divided: Boolean,
|
|
textValue: String,
|
|
icon: {
|
|
type: props.definePropType([String, Object])
|
|
}
|
|
});
|
|
const dropdownMenuProps = props.buildProps({
|
|
onKeydown: { type: props.definePropType(Function) }
|
|
});
|
|
const FIRST_KEYS = [
|
|
aria.EVENT_CODE.down,
|
|
aria.EVENT_CODE.pageDown,
|
|
aria.EVENT_CODE.home
|
|
];
|
|
const LAST_KEYS = [aria.EVENT_CODE.up, aria.EVENT_CODE.pageUp, aria.EVENT_CODE.end];
|
|
const FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];
|
|
const {
|
|
ElCollection,
|
|
ElCollectionItem,
|
|
COLLECTION_INJECTION_KEY,
|
|
COLLECTION_ITEM_INJECTION_KEY
|
|
} = collection.createCollectionWithScope("Dropdown");
|
|
|
|
exports.DROPDOWN_COLLECTION_INJECTION_KEY = COLLECTION_INJECTION_KEY;
|
|
exports.DROPDOWN_COLLECTION_ITEM_INJECTION_KEY = COLLECTION_ITEM_INJECTION_KEY;
|
|
exports.ElCollection = ElCollection;
|
|
exports.ElCollectionItem = ElCollectionItem;
|
|
exports.FIRST_KEYS = FIRST_KEYS;
|
|
exports.FIRST_LAST_KEYS = FIRST_LAST_KEYS;
|
|
exports.LAST_KEYS = LAST_KEYS;
|
|
exports.dropdownItemProps = dropdownItemProps;
|
|
exports.dropdownMenuProps = dropdownMenuProps;
|
|
exports.dropdownProps = dropdownProps;
|
|
//# sourceMappingURL=dropdown.js.map
|