a85ba5c0f0a3a9ddceff538496897a50310c8c37efadbb167a5ba894d6059f0cd63eeba36dec496fd71a26089c7ad4e1b6fac67557a73b8c8c3f6f7ea51bc0 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. var trigger = require('../../tooltip/src/trigger.js');
  4. var popper = require('../../popper/src/popper.js');
  5. var runtime = require('../../../utils/vue/props/runtime.js');
  6. var aria = require('../../../constants/aria.js');
  7. var content = require('../../tooltip/src/content.js');
  8. var icon = require('../../../utils/vue/icon.js');
  9. var collection = require('../../collection/src/collection.js');
  10. const dropdownProps = runtime.buildProps({
  11. trigger: trigger.useTooltipTriggerProps.trigger,
  12. triggerKeys: {
  13. type: runtime.definePropType(Array),
  14. default: () => [
  15. aria.EVENT_CODE.enter,
  16. aria.EVENT_CODE.numpadEnter,
  17. aria.EVENT_CODE.space,
  18. aria.EVENT_CODE.down
  19. ]
  20. },
  21. virtualTriggering: trigger.useTooltipTriggerProps.virtualTriggering,
  22. virtualRef: trigger.useTooltipTriggerProps.virtualRef,
  23. effect: {
  24. ...content.useTooltipContentProps.effect,
  25. default: "light"
  26. },
  27. type: {
  28. type: runtime.definePropType(String)
  29. },
  30. placement: {
  31. type: runtime.definePropType(String),
  32. default: "bottom"
  33. },
  34. popperOptions: {
  35. type: runtime.definePropType(Object),
  36. default: () => ({})
  37. },
  38. id: String,
  39. size: {
  40. type: String,
  41. default: ""
  42. },
  43. splitButton: Boolean,
  44. hideOnClick: {
  45. type: Boolean,
  46. default: true
  47. },
  48. loop: {
  49. type: Boolean,
  50. default: true
  51. },
  52. showArrow: {
  53. type: Boolean,
  54. default: true
  55. },
  56. showTimeout: {
  57. type: Number,
  58. default: 150
  59. },
  60. hideTimeout: {
  61. type: Number,
  62. default: 150
  63. },
  64. tabindex: {
  65. type: runtime.definePropType([Number, String]),
  66. default: 0
  67. },
  68. maxHeight: {
  69. type: runtime.definePropType([Number, String]),
  70. default: ""
  71. },
  72. popperClass: {
  73. type: String,
  74. default: ""
  75. },
  76. disabled: Boolean,
  77. role: {
  78. type: String,
  79. values: popper.roleTypes,
  80. default: "menu"
  81. },
  82. buttonProps: {
  83. type: runtime.definePropType(Object)
  84. },
  85. teleported: content.useTooltipContentProps.teleported,
  86. persistent: {
  87. type: Boolean,
  88. default: true
  89. }
  90. });
  91. const dropdownItemProps = runtime.buildProps({
  92. command: {
  93. type: [Object, String, Number],
  94. default: () => ({})
  95. },
  96. disabled: Boolean,
  97. divided: Boolean,
  98. textValue: String,
  99. icon: {
  100. type: icon.iconPropType
  101. }
  102. });
  103. const dropdownMenuProps = runtime.buildProps({
  104. onKeydown: { type: runtime.definePropType(Function) }
  105. });
  106. const FIRST_KEYS = [
  107. aria.EVENT_CODE.down,
  108. aria.EVENT_CODE.pageDown,
  109. aria.EVENT_CODE.home
  110. ];
  111. const LAST_KEYS = [aria.EVENT_CODE.up, aria.EVENT_CODE.pageUp, aria.EVENT_CODE.end];
  112. const FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];
  113. const {
  114. ElCollection,
  115. ElCollectionItem,
  116. COLLECTION_INJECTION_KEY,
  117. COLLECTION_ITEM_INJECTION_KEY
  118. } = collection.createCollectionWithScope("Dropdown");
  119. exports.DROPDOWN_COLLECTION_INJECTION_KEY = COLLECTION_INJECTION_KEY;
  120. exports.DROPDOWN_COLLECTION_ITEM_INJECTION_KEY = COLLECTION_ITEM_INJECTION_KEY;
  121. exports.ElCollection = ElCollection;
  122. exports.ElCollectionItem = ElCollectionItem;
  123. exports.FIRST_KEYS = FIRST_KEYS;
  124. exports.FIRST_LAST_KEYS = FIRST_LAST_KEYS;
  125. exports.LAST_KEYS = LAST_KEYS;
  126. exports.dropdownItemProps = dropdownItemProps;
  127. exports.dropdownMenuProps = dropdownMenuProps;
  128. exports.dropdownProps = dropdownProps;
  129. //# sourceMappingURL=dropdown.js.map