@dialpad/dialtone-vue 3.151.2 → 3.152.0-beta.2
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/dist/common/sr_only_close_button.vue.cjs +4 -4
- package/dist/common/sr_only_close_button.vue.cjs.map +1 -1
- package/dist/common/sr_only_close_button.vue.js +4 -4
- package/dist/common/sr_only_close_button.vue.js.map +1 -1
- package/dist/component-documentation.json +1 -1
- package/dist/components/avatar/avatar.vue.cjs +30 -41
- package/dist/components/avatar/avatar.vue.cjs.map +1 -1
- package/dist/components/avatar/avatar.vue.js +32 -43
- package/dist/components/avatar/avatar.vue.js.map +1 -1
- package/dist/components/badge/badge.vue.cjs +22 -39
- package/dist/components/badge/badge.vue.cjs.map +1 -1
- package/dist/components/badge/badge.vue.js +23 -40
- package/dist/components/badge/badge.vue.js.map +1 -1
- package/dist/components/chip/chip.vue.cjs +4 -7
- package/dist/components/chip/chip.vue.cjs.map +1 -1
- package/dist/components/chip/chip.vue.js +4 -7
- package/dist/components/chip/chip.vue.js.map +1 -1
- package/dist/components/collapsible/collapsible.vue.cjs +12 -6
- package/dist/components/collapsible/collapsible.vue.cjs.map +1 -1
- package/dist/components/collapsible/collapsible.vue.js +12 -6
- package/dist/components/collapsible/collapsible.vue.js.map +1 -1
- package/dist/components/datepicker/modules/month-year-picker.vue.cjs +5 -17
- package/dist/components/datepicker/modules/month-year-picker.vue.cjs.map +1 -1
- package/dist/components/datepicker/modules/month-year-picker.vue.js +5 -17
- package/dist/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
- package/dist/components/emoji_picker/modules/emoji_search.vue.cjs +4 -9
- package/dist/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
- package/dist/components/emoji_picker/modules/emoji_search.vue.js +5 -10
- package/dist/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
- package/dist/components/emoji_picker/modules/emoji_tabset.vue.cjs +11 -14
- package/dist/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
- package/dist/components/emoji_picker/modules/emoji_tabset.vue.js +12 -15
- package/dist/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
- package/dist/components/empty_state/empty_state.vue.cjs +19 -92
- package/dist/components/empty_state/empty_state.vue.cjs.map +1 -1
- package/dist/components/empty_state/empty_state.vue.js +20 -93
- package/dist/components/empty_state/empty_state.vue.js.map +1 -1
- package/dist/components/empty_state/empty_state_constants.cjs +18 -0
- package/dist/components/empty_state/empty_state_constants.cjs.map +1 -1
- package/dist/components/empty_state/empty_state_constants.js +18 -0
- package/dist/components/empty_state/empty_state_constants.js.map +1 -1
- package/dist/components/icon/icon.vue.cjs +2 -2
- package/dist/components/icon/icon.vue.js +2 -2
- package/dist/components/illustration/illustration.vue.cjs +2 -2
- package/dist/components/illustration/illustration.vue.js +2 -2
- package/dist/components/image_viewer/image_viewer.vue.cjs +4 -5
- package/dist/components/image_viewer/image_viewer.vue.cjs.map +1 -1
- package/dist/components/image_viewer/image_viewer.vue.js +4 -5
- package/dist/components/image_viewer/image_viewer.vue.js.map +1 -1
- package/dist/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +24 -11
- package/dist/components/keyboard_shortcut/keyboard_shortcut.vue.cjs.map +1 -1
- package/dist/components/keyboard_shortcut/keyboard_shortcut.vue.js +23 -10
- package/dist/components/keyboard_shortcut/keyboard_shortcut.vue.js.map +1 -1
- package/dist/components/keyboard_shortcut/keyboard_shortcut_constants.cjs +8 -14
- package/dist/components/keyboard_shortcut/keyboard_shortcut_constants.cjs.map +1 -1
- package/dist/components/keyboard_shortcut/keyboard_shortcut_constants.js +9 -15
- package/dist/components/keyboard_shortcut/keyboard_shortcut_constants.js.map +1 -1
- package/dist/components/list_item/list_item.vue.cjs +4 -5
- package/dist/components/list_item/list_item.vue.cjs.map +1 -1
- package/dist/components/list_item/list_item.vue.js +4 -5
- package/dist/components/list_item/list_item.vue.js.map +1 -1
- package/dist/components/modal/modal.vue.cjs +4 -7
- package/dist/components/modal/modal.vue.cjs.map +1 -1
- package/dist/components/modal/modal.vue.js +4 -7
- package/dist/components/modal/modal.vue.js.map +1 -1
- package/dist/components/notice/notice_action.vue.cjs +4 -7
- package/dist/components/notice/notice_action.vue.cjs.map +1 -1
- package/dist/components/notice/notice_action.vue.js +4 -7
- package/dist/components/notice/notice_action.vue.js.map +1 -1
- package/dist/components/notice/notice_icon.vue.cjs +12 -12
- package/dist/components/notice/notice_icon.vue.cjs.map +1 -1
- package/dist/components/notice/notice_icon.vue.js +13 -13
- package/dist/components/notice/notice_icon.vue.js.map +1 -1
- package/dist/components/pagination/pagination.vue.cjs +10 -15
- package/dist/components/pagination/pagination.vue.cjs.map +1 -1
- package/dist/components/pagination/pagination.vue.js +10 -15
- package/dist/components/pagination/pagination.vue.js.map +1 -1
- package/dist/components/popover/popover_header_footer.vue.cjs +4 -7
- package/dist/components/popover/popover_header_footer.vue.cjs.map +1 -1
- package/dist/components/popover/popover_header_footer.vue.js +4 -7
- package/dist/components/popover/popover_header_footer.vue.js.map +1 -1
- package/dist/dialtone-vue.cjs +0 -3
- package/dist/dialtone-vue.cjs.map +1 -1
- package/dist/dialtone-vue.js +2 -5
- package/dist/lib/general-row.cjs +0 -1
- package/dist/lib/general-row.cjs.map +1 -1
- package/dist/lib/general-row.js +1 -2
- package/dist/lib/keyboard-shortcut.cjs +0 -2
- package/dist/lib/keyboard-shortcut.cjs.map +1 -1
- package/dist/lib/keyboard-shortcut.js +2 -4
- package/dist/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +4 -5
- package/dist/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
- package/dist/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +4 -5
- package/dist/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
- package/dist/recipes/cards/ivr_node/ivr_node.vue.cjs +27 -11
- package/dist/recipes/cards/ivr_node/ivr_node.vue.cjs.map +1 -1
- package/dist/recipes/cards/ivr_node/ivr_node.vue.js +29 -13
- package/dist/recipes/cards/ivr_node/ivr_node.vue.js.map +1 -1
- package/dist/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +7 -11
- package/dist/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
- package/dist/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +7 -11
- package/dist/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
- package/dist/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +4 -7
- package/dist/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
- package/dist/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +4 -7
- package/dist/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
- package/dist/recipes/conversation_view/editor/editor.vue.cjs +33 -25
- package/dist/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
- package/dist/recipes/conversation_view/editor/editor.vue.js +34 -26
- package/dist/recipes/conversation_view/editor/editor.vue.js.map +1 -1
- package/dist/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +14 -7
- package/dist/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
- package/dist/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +15 -8
- package/dist/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
- package/dist/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs +23 -25
- package/dist/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs.map +1 -1
- package/dist/recipes/conversation_view/feed_pill/feed_item_pill.vue.js +24 -26
- package/dist/recipes/conversation_view/feed_pill/feed_item_pill.vue.js.map +1 -1
- package/dist/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs +8 -12
- package/dist/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs.map +1 -1
- package/dist/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js +8 -12
- package/dist/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js.map +1 -1
- package/dist/recipes/conversation_view/message_input/message_input.vue.cjs +29 -18
- package/dist/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
- package/dist/recipes/conversation_view/message_input/message_input.vue.js +29 -18
- package/dist/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
- package/dist/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +6 -12
- package/dist/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
- package/dist/recipes/header/settings_menu_button/settings_menu_button.vue.js +6 -12
- package/dist/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
- package/dist/recipes/item_layout/contact_info/contact_info.vue.cjs +33 -13
- package/dist/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
- package/dist/recipes/item_layout/contact_info/contact_info.vue.js +34 -14
- package/dist/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
- package/dist/recipes/leftbar/callbox/callbox.vue.cjs +13 -4
- package/dist/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
- package/dist/recipes/leftbar/callbox/callbox.vue.js +14 -5
- package/dist/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
- package/dist/recipes/leftbar/contact_row/contact_row.vue.cjs +13 -7
- package/dist/recipes/leftbar/contact_row/contact_row.vue.cjs.map +1 -1
- package/dist/recipes/leftbar/contact_row/contact_row.vue.js +14 -8
- package/dist/recipes/leftbar/contact_row/contact_row.vue.js.map +1 -1
- package/dist/recipes/leftbar/general_row/general_row.vue.cjs +9 -13
- package/dist/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
- package/dist/recipes/leftbar/general_row/general_row.vue.js +9 -13
- package/dist/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
- package/dist/recipes/leftbar/general_row/general_row_constants.cjs +0 -17
- package/dist/recipes/leftbar/general_row/general_row_constants.cjs.map +1 -1
- package/dist/recipes/leftbar/general_row/general_row_constants.js +0 -17
- package/dist/recipes/leftbar/general_row/general_row_constants.js.map +1 -1
- package/dist/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +39 -11
- package/dist/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
- package/dist/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +41 -13
- package/dist/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
- package/dist/recipes/leftbar/group_row/group_row.vue.cjs +4 -7
- package/dist/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
- package/dist/recipes/leftbar/group_row/group_row.vue.js +4 -7
- package/dist/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
- package/dist/recipes/leftbar/unread_pill/unread_pill.vue.cjs +11 -6
- package/dist/recipes/leftbar/unread_pill/unread_pill.vue.cjs.map +1 -1
- package/dist/recipes/leftbar/unread_pill/unread_pill.vue.js +12 -7
- package/dist/recipes/leftbar/unread_pill/unread_pill.vue.js.map +1 -1
- package/dist/style.css +127 -124
- package/dist/types/components/avatar/avatar.vue.d.ts +5 -33
- package/dist/types/components/avatar/avatar.vue.d.ts.map +1 -1
- package/dist/types/components/badge/badge.vue.d.ts +17 -34
- package/dist/types/components/badge/badge.vue.d.ts.map +1 -1
- package/dist/types/components/chip/chip.vue.d.ts +1 -1
- package/dist/types/components/collapsible/collapsible.vue.d.ts +1 -1
- package/dist/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
- package/dist/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
- package/dist/types/components/empty_state/empty_state.vue.d.ts +4 -0
- package/dist/types/components/empty_state/empty_state.vue.d.ts.map +1 -1
- package/dist/types/components/empty_state/empty_state_constants.d.ts +27 -0
- package/dist/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
- package/dist/types/components/keyboard_shortcut/index.d.ts +1 -1
- package/dist/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +210 -15
- package/dist/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
- package/dist/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts +0 -11
- package/dist/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts.map +1 -1
- package/dist/types/components/list_item/list_item.vue.d.ts +2 -8
- package/dist/types/components/list_item/list_item.vue.d.ts.map +1 -1
- package/dist/types/components/notice/notice_action.vue.d.ts +5 -4
- package/dist/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/types/components/notice/notice_icon.vue.d.ts +30 -1
- package/dist/types/components/notice/notice_icon.vue.d.ts.map +1 -1
- package/dist/types/components/pagination/pagination.vue.d.ts.map +1 -1
- package/dist/types/components/split_button/split_button-omega.vue.d.ts +1 -1
- package/dist/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
- package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
- package/dist/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +30 -1
- package/dist/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts +240 -8
- package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +0 -1
- package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts +31 -16
- package/dist/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +4 -6
- package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +3 -16
- package/dist/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
- package/dist/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
- package/dist/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -1
- package/dist/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
- package/dist/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
- package/dist/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/dist/types/recipes/leftbar/general_row/general_row_constants.d.ts +0 -6
- package/dist/types/recipes/leftbar/general_row/general_row_constants.d.ts.map +1 -1
- package/dist/types/recipes/leftbar/general_row/index.d.ts +1 -1
- package/dist/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +30 -1
- package/dist/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/common/storybook_utils.cjs +0 -8
- package/dist/common/storybook_utils.cjs.map +0 -1
- package/dist/common/storybook_utils.js +0 -8
- package/dist/common/storybook_utils.js.map +0 -1
- package/dist/types/common/storybook_utils.d.ts +0 -25
- package/dist/types/common/storybook_utils.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image_viewer.vue.js","sources":["../../../components/image_viewer/image_viewer.vue"],"sourcesContent":["<template>\n <div>\n <dt-button\n data-qa=\"dt-image-viewer-preview\"\n class=\"d-image-viewer__preview-button\"\n :aria-label=\"ariaLabel\"\n importance=\"clear\"\n @click=\"openModal\"\n >\n <img\n :class=\"imageButtonClass\"\n :src=\"imageSrc\"\n :alt=\"imageAlt\"\n >\n </dt-button>\n <Teleport\n v-if=\"isOpen\"\n :to=\"appendTo\"\n >\n <div\n :aria-hidden=\"!isOpen ? 'true' : 'false'\"\n class=\"d-modal\"\n data-qa=\"dt-modal\"\n v-on=\"modalListeners\"\n @mouseover=\"showCloseButton = true\"\n @mouseleave=\"showCloseButton = false\"\n @focusin=\" showCloseButton = true\"\n @focusout=\" showCloseButton = false\"\n >\n <div\n data-qa=\"dt-image-viewer-full\"\n class=\"d-image-viewer__full\"\n role=\"dialog\"\n aria-modal=\"true\"\n >\n <img\n class=\"d-image-viewer__full__image\"\n :src=\"imageSrc\"\n :alt=\"imageAlt\"\n >\n </div>\n <transition name=\"fade\">\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"closeImage\"\n data-qa=\"dt-image-viewer-close-btn\"\n class=\"d-modal__close\"\n circle\n size=\"lg\"\n importance=\"clear\"\n kind=\"inverted\"\n :aria-label=\"closeAriaLabel\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon\n class=\"d-image-viewer__close-button\"\n
|
|
1
|
+
{"version":3,"file":"image_viewer.vue.js","sources":["../../../components/image_viewer/image_viewer.vue"],"sourcesContent":["<template>\n <div>\n <dt-button\n data-qa=\"dt-image-viewer-preview\"\n class=\"d-image-viewer__preview-button\"\n :aria-label=\"ariaLabel\"\n importance=\"clear\"\n @click=\"openModal\"\n >\n <img\n :class=\"imageButtonClass\"\n :src=\"imageSrc\"\n :alt=\"imageAlt\"\n >\n </dt-button>\n <Teleport\n v-if=\"isOpen\"\n :to=\"appendTo\"\n >\n <div\n :aria-hidden=\"!isOpen ? 'true' : 'false'\"\n class=\"d-modal\"\n data-qa=\"dt-modal\"\n v-on=\"modalListeners\"\n @mouseover=\"showCloseButton = true\"\n @mouseleave=\"showCloseButton = false\"\n @focusin=\" showCloseButton = true\"\n @focusout=\" showCloseButton = false\"\n >\n <div\n data-qa=\"dt-image-viewer-full\"\n class=\"d-image-viewer__full\"\n role=\"dialog\"\n aria-modal=\"true\"\n >\n <img\n class=\"d-image-viewer__full__image\"\n :src=\"imageSrc\"\n :alt=\"imageAlt\"\n >\n </div>\n <transition name=\"fade\">\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"closeImage\"\n data-qa=\"dt-image-viewer-close-btn\"\n class=\"d-modal__close\"\n circle\n size=\"lg\"\n importance=\"clear\"\n kind=\"inverted\"\n :aria-label=\"closeAriaLabel\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon-close\n class=\"d-image-viewer__close-button\"\n size=\"400\"\n />\n </template>\n </dt-button>\n </transition>\n </div>\n </Teleport>\n </div>\n</template>\n\n<script>\nimport Modal from '@/common/mixins/modal';\nimport { EVENT_KEYNAMES } from '@/common/constants';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue3';\nimport { DtButton } from '@/components/button';\n\nexport default {\n name: 'DtImageViewer',\n\n components: {\n DtButton,\n DtIconClose,\n },\n\n mixins: [Modal],\n\n props: {\n /**\n * By default the portal appends to the body of the root parent. We can modify\n * this behaviour by passing an appendTo prop that points to an id or an html tag from the root of the parent.\n * The appendTo prop expects a CSS selector string or an actual DOM node.\n * type: string | HTMLElement, default: 'body'\n */\n appendTo: {\n type: String,\n default: 'body',\n },\n\n /**\n * Controls whether the image modal is shown. Leaving this null will have the image modal\n * trigger on click by default.\n * If you set this value, the default trigger behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * URL of the image to be shown\n */\n imageSrc: {\n type: String,\n required: true,\n },\n\n /**\n * Alt text of image\n */\n imageAlt: {\n type: String,\n required: true,\n },\n\n /**\n * Image Class\n */\n imageButtonClass: {\n type: String,\n required: false,\n default: '',\n },\n\n /**\n * Aria label\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Aria label for close button\n */\n closeAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n ],\n\n data () {\n return {\n showCloseButton: true,\n isOpen: false,\n };\n },\n\n computed: {\n modalListeners () {\n return {\n click: event => {\n (event.target === event.currentTarget) && this.close();\n },\n\n keydown: event => {\n switch (event.code) {\n case EVENT_KEYNAMES.esc:\n case EVENT_KEYNAMES.escape:\n this.close();\n break;\n case EVENT_KEYNAMES.tab:\n this.trapFocus(event);\n break;\n }\n },\n };\n },\n },\n\n watch: {\n isOpen: {\n immediate: true,\n handler (isShowing) {\n if (isShowing) {\n // Set a reference to the previously-active element, to which we'll return focus on modal close.\n this.previousActiveElement = document.activeElement;\n } else {\n // Modal is being hidden, so return focus to the previously active element before clearing the reference.\n this.previousActiveElement?.focus();\n this.previousActiveElement = null;\n }\n },\n },\n\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n },\n\n methods: {\n openModal () {\n // Has custom control passed in\n if (this.open !== null) {\n return;\n }\n this.isOpen = true;\n this.showCloseButton = true;\n this.$emit('opened', true);\n\n setTimeout(() => {\n this.focusAfterOpen();\n });\n },\n\n close () {\n this.isOpen = false;\n this.$emit('opened', false);\n\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n focusAfterOpen () {\n this.$refs.closeImage?.$el.focus();\n },\n\n trapFocus (e) {\n if (this.isOpen) {\n this.focusTrappedTabPress(e);\n }\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_createVNode","_createElementVNode","_createBlock","_Teleport","_mergeProps","_toHandlers","_Transition"],"mappings":";;;;;;AAyEA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,EACD;AAAA,EAED,QAAQ,CAAC,KAAK;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,UAAU;AAA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;QAE3BJ,mBAWM,OAXN,YAWM;AAAA,UALJA,mBAIC,OAAA;AAAA,YAHC,OAAM;AAAA,YACL,KAAK,OAAQ;AAAA,YACb,KAAK,OAAQ;AAAA;;QAGlBD,YAoBaM,YAAA,EApBD,MAAK,OAAM,GAAA;AAAA,2BACrB,MAkBY;AAAA,YAjBJ,MAAe,gCADvBJ,YAkBY,sBAAA;AAAA;cAhBV,KAAI;AAAA,cACJ,WAAQ;AAAA,cACR,OAAM;AAAA,cACN,QAAA;AAAA,cACA,MAAK;AAAA,cACL,YAAW;AAAA,cACX,MAAK;AAAA,cACJ,cAAY,OAAc;AAAA,cAC1B,SAAO,SAAK;AAAA;cAEF,cACT,MAGE;AAAA,gBAHFF,YAGE,0BAAA;AAAA,kBAFA,OAAM;AAAA,kBACN,MAAK;AAAA;;;;;;;;;;;;"}
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
2
|
+
const vue3 = require("@dialpad/dialtone-icons/vue3");
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.cjs");
|
|
5
|
-
const
|
|
5
|
+
const SHORTCUTS_ICON_ALIASES = {
|
|
6
|
+
"{win}": vue3.DtIconLayoutGrid,
|
|
7
|
+
"{arrow-right}": vue3.DtIconArrowRight,
|
|
8
|
+
"{arrow-left}": vue3.DtIconArrowLeft,
|
|
9
|
+
"{arrow-up}": vue3.DtIconArrowUp,
|
|
10
|
+
"{arrow-down}": vue3.DtIconArrowDown,
|
|
11
|
+
"{cmd}": vue3.DtIconCommand
|
|
12
|
+
};
|
|
6
13
|
const _sfc_main = {
|
|
7
14
|
name: "DtKeyboardShortcut",
|
|
8
15
|
components: {
|
|
9
|
-
|
|
16
|
+
DtIconLayoutGrid: vue3.DtIconLayoutGrid,
|
|
17
|
+
DtIconArrowRight: vue3.DtIconArrowRight,
|
|
18
|
+
DtIconArrowLeft: vue3.DtIconArrowLeft,
|
|
19
|
+
DtIconArrowUp: vue3.DtIconArrowUp,
|
|
20
|
+
DtIconArrowDown: vue3.DtIconArrowDown,
|
|
21
|
+
DtIconCommand: vue3.DtIconCommand,
|
|
22
|
+
DtIconPlus: vue3.DtIconPlus
|
|
10
23
|
},
|
|
11
24
|
props: {
|
|
12
25
|
/**
|
|
@@ -35,20 +48,22 @@ const _sfc_main = {
|
|
|
35
48
|
},
|
|
36
49
|
data() {
|
|
37
50
|
return {
|
|
38
|
-
SHORTCUTS_ICON_ALIASES: keyboard_shortcut_constants.SHORTCUTS_ICON_ALIASES,
|
|
39
51
|
separator: /\+/gi
|
|
40
52
|
};
|
|
41
53
|
},
|
|
42
54
|
computed: {
|
|
43
55
|
icons() {
|
|
44
|
-
return {
|
|
56
|
+
return {
|
|
57
|
+
...SHORTCUTS_ICON_ALIASES,
|
|
58
|
+
"{plus}": vue3.DtIconPlus
|
|
59
|
+
};
|
|
45
60
|
},
|
|
46
61
|
shortcutWithSeparator() {
|
|
47
62
|
return this.shortcut.replace(this.separator, "{plus}");
|
|
48
63
|
},
|
|
49
64
|
formattedShortcut() {
|
|
50
|
-
return Object.keys(
|
|
51
|
-
return result.replace(new RegExp("{" + key + "}", "gi"),
|
|
65
|
+
return Object.keys(SHORTCUTS_ICON_ALIASES).reduce((result, key) => {
|
|
66
|
+
return result.replace(new RegExp("{" + key + "}", "gi"), SHORTCUTS_ICON_ALIASES[key]);
|
|
52
67
|
}, this.shortcutWithSeparator);
|
|
53
68
|
},
|
|
54
69
|
// Splits any icon based aliases into their own array items.
|
|
@@ -65,7 +80,6 @@ const _hoisted_1 = {
|
|
|
65
80
|
};
|
|
66
81
|
const _hoisted_2 = ["innerHTML"];
|
|
67
82
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
68
|
-
const _component_dt_icon = vue.resolveComponent("dt-icon");
|
|
69
83
|
return vue.openBlock(), vue.createElementBlock("kbd", {
|
|
70
84
|
class: vue.normalizeClass([
|
|
71
85
|
"d-keyboard-shortcut",
|
|
@@ -75,16 +89,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
75
89
|
$props.screenReaderText ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1, vue.toDisplayString($props.screenReaderText), 1)) : vue.createCommentVNode("", true),
|
|
76
90
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.formattedShortcutSplit, (item, i) => {
|
|
77
91
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
78
|
-
$options.icons[item] ? (vue.openBlock(), vue.createBlock(
|
|
92
|
+
$options.icons[item] ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($options.icons[item]), {
|
|
79
93
|
key: `${i}-${item}`,
|
|
80
|
-
name: $options.icons[item],
|
|
81
94
|
size: "100",
|
|
82
95
|
"aria-hidden": "true",
|
|
83
96
|
class: vue.normalizeClass([
|
|
84
97
|
"d-keyboard-shortcut__icon",
|
|
85
98
|
{ "d-keyboard-shortcut__icon--inverted": $props.inverted }
|
|
86
99
|
])
|
|
87
|
-
}, null, 8, ["
|
|
100
|
+
}, null, 8, ["class"])) : (vue.openBlock(), vue.createElementBlock("span", {
|
|
88
101
|
key: `${i}-${item}`,
|
|
89
102
|
"aria-hidden": "true",
|
|
90
103
|
class: vue.normalizeClass([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard_shortcut.vue.cjs","sources":["../../../components/keyboard_shortcut/keyboard_shortcut.vue"],"sourcesContent":["<!-- eslint-disable vue/no-v-html -->\n<template>\n <kbd\n :class=\"[\n 'd-keyboard-shortcut',\n { 'd-keyboard-shortcut--inverted': inverted },\n ]\"\n >\n <span\n v-if=\"screenReaderText\"\n class=\"d-keyboard-shortcut--sr-only\"\n >\n {{ screenReaderText }}\n </span>\n <template\n v-for=\"(item, i) in formattedShortcutSplit\"\n >\n <
|
|
1
|
+
{"version":3,"file":"keyboard_shortcut.vue.cjs","sources":["../../../components/keyboard_shortcut/keyboard_shortcut.vue"],"sourcesContent":["<!-- eslint-disable vue/no-v-html -->\n<template>\n <kbd\n :class=\"[\n 'd-keyboard-shortcut',\n { 'd-keyboard-shortcut--inverted': inverted },\n ]\"\n >\n <span\n v-if=\"screenReaderText\"\n class=\"d-keyboard-shortcut--sr-only\"\n >\n {{ screenReaderText }}\n </span>\n <template\n v-for=\"(item, i) in formattedShortcutSplit\"\n >\n <component\n v-if=\"icons[item]\"\n :key=\"`${i}-${item}`\"\n :is=\"icons[item]\"\n size=\"100\"\n aria-hidden=\"true\"\n :class=\"[\n 'd-keyboard-shortcut__icon',\n { 'd-keyboard-shortcut__icon--inverted': inverted },\n ]\"\n />\n <span\n v-else\n :key=\"`${i}-${item}`\"\n aria-hidden=\"true\"\n :class=\"[\n 'd-keyboard-shortcut__item',\n { 'd-keyboard-shortcut__item--inverted': inverted },\n ]\"\n v-html=\"item\"\n />\n </template>\n </kbd>\n</template>\n\n<script>\nimport {\n DtIconLayoutGrid,\n DtIconArrowRight,\n DtIconArrowLeft,\n DtIconArrowUp,\n DtIconArrowDown,\n DtIconCommand,\n DtIconPlus,\n} from '@dialpad/dialtone-icons/vue3';\n\nconst SHORTCUTS_ICON_ALIASES = {\n '{win}': DtIconLayoutGrid,\n '{arrow-right}': DtIconArrowRight,\n '{arrow-left}': DtIconArrowLeft,\n '{arrow-up}': DtIconArrowUp,\n '{arrow-down}': DtIconArrowDown,\n '{cmd}': DtIconCommand,\n};\n\n/**\n * This component displays a visual representation of a keyboard shortcut to the user.\n * @see https://dialtone.dialpad.com/components/keyboard_shortcut.html\n */\nexport default {\n name: 'DtKeyboardShortcut',\n\n components: {\n DtIconLayoutGrid,\n DtIconArrowRight,\n DtIconArrowLeft,\n DtIconArrowUp,\n DtIconArrowDown,\n DtIconCommand,\n DtIconPlus,\n },\n\n props: {\n /**\n * If true, applies inverted styles.\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Include any of these tokens in your string to render the corresponding symbol:\n * {cmd} {win} {arrow-right} {arrow-left} {arrow-up} {arrow-down}\n */\n shortcut: {\n type: String,\n required: true,\n },\n\n /**\n * Text entered here will be read by assistive technology. If null this component will be ignored by AT.\n */\n screenReaderText: {\n type: String,\n default: null,\n },\n },\n\n data () {\n return {\n separator: /\\+/gi,\n };\n },\n\n computed: {\n icons () {\n return {\n ...SHORTCUTS_ICON_ALIASES,\n '{plus}': DtIconPlus,\n };\n },\n\n shortcutWithSeparator () {\n return this.shortcut.replace(this.separator, '{plus}');\n },\n\n formattedShortcut () {\n return Object.keys(SHORTCUTS_ICON_ALIASES).reduce((result, key) => {\n return result.replace(new RegExp('{' + key + '}', 'gi'), SHORTCUTS_ICON_ALIASES[key]);\n }, this.shortcutWithSeparator);\n },\n\n // Splits any icon based aliases into their own array items.\n formattedShortcutSplit () {\n const iconAliasString = Object.keys(this.icons).join('|');\n\n /*\n The regexp splits a given string with icon alias and is filtered by empty strings after:\n if {win} is our delimiter AKA shortcut icon alias\n '{win} + D K + {win}' returned value will be [{win}, ' ', '{plus}', ' D K ', '{plus}', ' ', {win}]\n */\n const regex = new RegExp(`(${iconAliasString})`, 'gi');\n return this.formattedShortcut.split(regex).filter(Boolean);\n },\n },\n};\n</script>\n"],"names":["DtIconLayoutGrid","DtIconArrowRight","DtIconArrowLeft","DtIconArrowUp","DtIconArrowDown","DtIconCommand","DtIconPlus","_createElementBlock","_normalizeClass","_toDisplayString","_openBlock","_Fragment","_renderList","_createBlock","_resolveDynamicComponent"],"mappings":";;;;AAqDA,MAAM,yBAAyB;AAAA,EAC7B,SAASA,KAAgB;AAAA,EACzB,iBAAiBC,KAAgB;AAAA,EACjC,gBAAgBC,KAAe;AAAA,EAC/B,cAAcC,KAAa;AAAA,EAC3B,gBAAgBC,KAAe;AAAA,EAC/B,SAASC,KAAa;AACxB;AAMA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,kBAAAL,KAAgB;AAAA,IACh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,qCADxBD,IAKO,mBAAA,QALP,YAKOE,IAAAA,gBADF,OAAgB,gBAAA,GAAA,CAAA;KAErBC,IAAAA,UAAA,IAAA,GAAAH,IAAA,mBAwBWI,cAvBW,MAAAC,IAAA,WAAA,SAAA,wBAAZ,CAAA,MAAM,MAAC;;QAGP,SAAA,MAAM,IAAI,sBADlBC,IAAAA,YAUEC,IAAA,wBAPK,SAAK,MAAC,IAAI,CAAA,GAAA;AAAA,UADd,KAAG,GAAK,CAAC,IAAI,IAAI;AAAA,UAElB,MAAK;AAAA,UACL,eAAY;AAAA,UACX,OAAKN,IAAAA,eAAA;AAAA;qDAA8F,OAAQ,SAAA;AAAA;oDAK9GD,IASE,mBAAA,QAAA;AAAA,UAPC,KAAG,GAAK,CAAC,IAAI,IAAI;AAAA,UAClB,eAAY;AAAA,UACX,OAAKC,IAAAA,eAAA;AAAA;qDAA8F,OAAQ,SAAA;AAAA;UAI5G,WAAQ;AAAA;;;;;;;"}
|
|
@@ -1,11 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { DtIconLayoutGrid, DtIconArrowRight, DtIconArrowLeft, DtIconArrowUp, DtIconArrowDown, DtIconCommand, DtIconPlus } from "@dialpad/dialtone-icons/vue3";
|
|
2
|
+
import { openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, Fragment, renderList, createBlock, resolveDynamicComponent } from "vue";
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
|
|
4
|
+
const SHORTCUTS_ICON_ALIASES = {
|
|
5
|
+
"{win}": DtIconLayoutGrid,
|
|
6
|
+
"{arrow-right}": DtIconArrowRight,
|
|
7
|
+
"{arrow-left}": DtIconArrowLeft,
|
|
8
|
+
"{arrow-up}": DtIconArrowUp,
|
|
9
|
+
"{arrow-down}": DtIconArrowDown,
|
|
10
|
+
"{cmd}": DtIconCommand
|
|
11
|
+
};
|
|
5
12
|
const _sfc_main = {
|
|
6
13
|
name: "DtKeyboardShortcut",
|
|
7
14
|
components: {
|
|
8
|
-
|
|
15
|
+
DtIconLayoutGrid,
|
|
16
|
+
DtIconArrowRight,
|
|
17
|
+
DtIconArrowLeft,
|
|
18
|
+
DtIconArrowUp,
|
|
19
|
+
DtIconArrowDown,
|
|
20
|
+
DtIconCommand,
|
|
21
|
+
DtIconPlus
|
|
9
22
|
},
|
|
10
23
|
props: {
|
|
11
24
|
/**
|
|
@@ -34,13 +47,15 @@ const _sfc_main = {
|
|
|
34
47
|
},
|
|
35
48
|
data() {
|
|
36
49
|
return {
|
|
37
|
-
SHORTCUTS_ICON_ALIASES,
|
|
38
50
|
separator: /\+/gi
|
|
39
51
|
};
|
|
40
52
|
},
|
|
41
53
|
computed: {
|
|
42
54
|
icons() {
|
|
43
|
-
return {
|
|
55
|
+
return {
|
|
56
|
+
...SHORTCUTS_ICON_ALIASES,
|
|
57
|
+
"{plus}": DtIconPlus
|
|
58
|
+
};
|
|
44
59
|
},
|
|
45
60
|
shortcutWithSeparator() {
|
|
46
61
|
return this.shortcut.replace(this.separator, "{plus}");
|
|
@@ -64,7 +79,6 @@ const _hoisted_1 = {
|
|
|
64
79
|
};
|
|
65
80
|
const _hoisted_2 = ["innerHTML"];
|
|
66
81
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
67
|
-
const _component_dt_icon = resolveComponent("dt-icon");
|
|
68
82
|
return openBlock(), createElementBlock("kbd", {
|
|
69
83
|
class: normalizeClass([
|
|
70
84
|
"d-keyboard-shortcut",
|
|
@@ -74,16 +88,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
74
88
|
$props.screenReaderText ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString($props.screenReaderText), 1)) : createCommentVNode("", true),
|
|
75
89
|
(openBlock(true), createElementBlock(Fragment, null, renderList($options.formattedShortcutSplit, (item, i) => {
|
|
76
90
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
77
|
-
$options.icons[item] ? (openBlock(), createBlock(
|
|
91
|
+
$options.icons[item] ? (openBlock(), createBlock(resolveDynamicComponent($options.icons[item]), {
|
|
78
92
|
key: `${i}-${item}`,
|
|
79
|
-
name: $options.icons[item],
|
|
80
93
|
size: "100",
|
|
81
94
|
"aria-hidden": "true",
|
|
82
95
|
class: normalizeClass([
|
|
83
96
|
"d-keyboard-shortcut__icon",
|
|
84
97
|
{ "d-keyboard-shortcut__icon--inverted": $props.inverted }
|
|
85
98
|
])
|
|
86
|
-
}, null, 8, ["
|
|
99
|
+
}, null, 8, ["class"])) : (openBlock(), createElementBlock("span", {
|
|
87
100
|
key: `${i}-${item}`,
|
|
88
101
|
"aria-hidden": "true",
|
|
89
102
|
class: normalizeClass([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard_shortcut.vue.js","sources":["../../../components/keyboard_shortcut/keyboard_shortcut.vue"],"sourcesContent":["<!-- eslint-disable vue/no-v-html -->\n<template>\n <kbd\n :class=\"[\n 'd-keyboard-shortcut',\n { 'd-keyboard-shortcut--inverted': inverted },\n ]\"\n >\n <span\n v-if=\"screenReaderText\"\n class=\"d-keyboard-shortcut--sr-only\"\n >\n {{ screenReaderText }}\n </span>\n <template\n v-for=\"(item, i) in formattedShortcutSplit\"\n >\n <
|
|
1
|
+
{"version":3,"file":"keyboard_shortcut.vue.js","sources":["../../../components/keyboard_shortcut/keyboard_shortcut.vue"],"sourcesContent":["<!-- eslint-disable vue/no-v-html -->\n<template>\n <kbd\n :class=\"[\n 'd-keyboard-shortcut',\n { 'd-keyboard-shortcut--inverted': inverted },\n ]\"\n >\n <span\n v-if=\"screenReaderText\"\n class=\"d-keyboard-shortcut--sr-only\"\n >\n {{ screenReaderText }}\n </span>\n <template\n v-for=\"(item, i) in formattedShortcutSplit\"\n >\n <component\n v-if=\"icons[item]\"\n :key=\"`${i}-${item}`\"\n :is=\"icons[item]\"\n size=\"100\"\n aria-hidden=\"true\"\n :class=\"[\n 'd-keyboard-shortcut__icon',\n { 'd-keyboard-shortcut__icon--inverted': inverted },\n ]\"\n />\n <span\n v-else\n :key=\"`${i}-${item}`\"\n aria-hidden=\"true\"\n :class=\"[\n 'd-keyboard-shortcut__item',\n { 'd-keyboard-shortcut__item--inverted': inverted },\n ]\"\n v-html=\"item\"\n />\n </template>\n </kbd>\n</template>\n\n<script>\nimport {\n DtIconLayoutGrid,\n DtIconArrowRight,\n DtIconArrowLeft,\n DtIconArrowUp,\n DtIconArrowDown,\n DtIconCommand,\n DtIconPlus,\n} from '@dialpad/dialtone-icons/vue3';\n\nconst SHORTCUTS_ICON_ALIASES = {\n '{win}': DtIconLayoutGrid,\n '{arrow-right}': DtIconArrowRight,\n '{arrow-left}': DtIconArrowLeft,\n '{arrow-up}': DtIconArrowUp,\n '{arrow-down}': DtIconArrowDown,\n '{cmd}': DtIconCommand,\n};\n\n/**\n * This component displays a visual representation of a keyboard shortcut to the user.\n * @see https://dialtone.dialpad.com/components/keyboard_shortcut.html\n */\nexport default {\n name: 'DtKeyboardShortcut',\n\n components: {\n DtIconLayoutGrid,\n DtIconArrowRight,\n DtIconArrowLeft,\n DtIconArrowUp,\n DtIconArrowDown,\n DtIconCommand,\n DtIconPlus,\n },\n\n props: {\n /**\n * If true, applies inverted styles.\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Include any of these tokens in your string to render the corresponding symbol:\n * {cmd} {win} {arrow-right} {arrow-left} {arrow-up} {arrow-down}\n */\n shortcut: {\n type: String,\n required: true,\n },\n\n /**\n * Text entered here will be read by assistive technology. If null this component will be ignored by AT.\n */\n screenReaderText: {\n type: String,\n default: null,\n },\n },\n\n data () {\n return {\n separator: /\\+/gi,\n };\n },\n\n computed: {\n icons () {\n return {\n ...SHORTCUTS_ICON_ALIASES,\n '{plus}': DtIconPlus,\n };\n },\n\n shortcutWithSeparator () {\n return this.shortcut.replace(this.separator, '{plus}');\n },\n\n formattedShortcut () {\n return Object.keys(SHORTCUTS_ICON_ALIASES).reduce((result, key) => {\n return result.replace(new RegExp('{' + key + '}', 'gi'), SHORTCUTS_ICON_ALIASES[key]);\n }, this.shortcutWithSeparator);\n },\n\n // Splits any icon based aliases into their own array items.\n formattedShortcutSplit () {\n const iconAliasString = Object.keys(this.icons).join('|');\n\n /*\n The regexp splits a given string with icon alias and is filtered by empty strings after:\n if {win} is our delimiter AKA shortcut icon alias\n '{win} + D K + {win}' returned value will be [{win}, ' ', '{plus}', ' D K ', '{plus}', ' ', {win}]\n */\n const regex = new RegExp(`(${iconAliasString})`, 'gi');\n return this.formattedShortcut.split(regex).filter(Boolean);\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_normalizeClass","_toDisplayString","_openBlock","_Fragment","_renderList","_createBlock","_resolveDynamicComponent"],"mappings":";;;AAqDA,MAAM,yBAAyB;AAAA,EAC7B,SAAS;AAAA,EACT,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,SAAS;AACX;AAMA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EAED,OAAQ;AACN,WAAO;AAAA,MACL,WAAW;AAAA;EAEd;AAAA,EAED,UAAU;AAAA,IACR,QAAS;AACP,aAAO;AAAA,QACL,GAAG;AAAA,QACH,UAAU;AAAA;IAEb;AAAA,IAED,wBAAyB;AACvB,aAAO,KA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
|
|
3
|
-
const
|
|
4
|
-
"{win}"
|
|
5
|
-
"{arrow-right}"
|
|
6
|
-
"{arrow-left}"
|
|
7
|
-
"{arrow-up}"
|
|
8
|
-
"{arrow-down}"
|
|
9
|
-
"{cmd}"
|
|
10
|
-
|
|
11
|
-
const SHORTCUTS_ICON_SEPARATOR = {
|
|
12
|
-
"{plus}": "plus"
|
|
13
|
-
};
|
|
14
|
-
const SHORTCUTS_ALIASES_LIST = Object.keys(SHORTCUTS_ICON_ALIASES);
|
|
3
|
+
const SHORTCUTS_ALIASES_LIST = [
|
|
4
|
+
"{win}",
|
|
5
|
+
"{arrow-right}",
|
|
6
|
+
"{arrow-left}",
|
|
7
|
+
"{arrow-up}",
|
|
8
|
+
"{arrow-down}",
|
|
9
|
+
"{cmd}"
|
|
10
|
+
];
|
|
15
11
|
exports.SHORTCUTS_ALIASES_LIST = SHORTCUTS_ALIASES_LIST;
|
|
16
|
-
exports.SHORTCUTS_ICON_ALIASES = SHORTCUTS_ICON_ALIASES;
|
|
17
|
-
exports.SHORTCUTS_ICON_SEPARATOR = SHORTCUTS_ICON_SEPARATOR;
|
|
18
12
|
//# sourceMappingURL=keyboard_shortcut_constants.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard_shortcut_constants.cjs","sources":["../../../components/keyboard_shortcut/keyboard_shortcut_constants.js"],"sourcesContent":["export const
|
|
1
|
+
{"version":3,"file":"keyboard_shortcut_constants.cjs","sources":["../../../components/keyboard_shortcut/keyboard_shortcut_constants.js"],"sourcesContent":["export const SHORTCUTS_ALIASES_LIST = [\n '{win}',\n '{arrow-right}',\n '{arrow-left}',\n '{arrow-up}',\n '{arrow-down}',\n '{cmd}',\n];\n"],"names":[],"mappings":";;AAAY,MAAC,yBAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;;"}
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
const
|
|
2
|
-
"{win}"
|
|
3
|
-
"{arrow-right}"
|
|
4
|
-
"{arrow-left}"
|
|
5
|
-
"{arrow-up}"
|
|
6
|
-
"{arrow-down}"
|
|
7
|
-
"{cmd}"
|
|
8
|
-
|
|
9
|
-
const SHORTCUTS_ICON_SEPARATOR = {
|
|
10
|
-
"{plus}": "plus"
|
|
11
|
-
};
|
|
12
|
-
const SHORTCUTS_ALIASES_LIST = Object.keys(SHORTCUTS_ICON_ALIASES);
|
|
1
|
+
const SHORTCUTS_ALIASES_LIST = [
|
|
2
|
+
"{win}",
|
|
3
|
+
"{arrow-right}",
|
|
4
|
+
"{arrow-left}",
|
|
5
|
+
"{arrow-up}",
|
|
6
|
+
"{arrow-down}",
|
|
7
|
+
"{cmd}"
|
|
8
|
+
];
|
|
13
9
|
export {
|
|
14
|
-
SHORTCUTS_ALIASES_LIST
|
|
15
|
-
SHORTCUTS_ICON_ALIASES,
|
|
16
|
-
SHORTCUTS_ICON_SEPARATOR
|
|
10
|
+
SHORTCUTS_ALIASES_LIST
|
|
17
11
|
};
|
|
18
12
|
//# sourceMappingURL=keyboard_shortcut_constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard_shortcut_constants.js","sources":["../../../components/keyboard_shortcut/keyboard_shortcut_constants.js"],"sourcesContent":["export const
|
|
1
|
+
{"version":3,"file":"keyboard_shortcut_constants.js","sources":["../../../components/keyboard_shortcut/keyboard_shortcut_constants.js"],"sourcesContent":["export const SHORTCUTS_ALIASES_LIST = [\n '{win}',\n '{arrow-right}',\n '{arrow-left}',\n '{arrow-up}',\n '{arrow-down}',\n '{cmd}',\n];\n"],"names":[],"mappings":"AAAY,MAAC,yBAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const list_item_constants = require("./list_item_constants.cjs");
|
|
3
3
|
const common_utils = require("../../common/utils.cjs");
|
|
4
|
+
const vue3 = require("@dialpad/dialtone-icons/vue3");
|
|
4
5
|
const vue = require("vue");
|
|
5
6
|
;/* empty css */
|
|
6
7
|
const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.cjs");
|
|
7
8
|
const item_layout = require("../item_layout/item_layout.vue.cjs");
|
|
8
|
-
const icon = require("../icon/icon.vue.cjs");
|
|
9
9
|
const ROLES = ["listitem", "menuitem", "option"];
|
|
10
10
|
const _sfc_main = {
|
|
11
11
|
name: "DtListItem",
|
|
12
12
|
components: {
|
|
13
13
|
DtItemLayout: item_layout,
|
|
14
|
-
|
|
14
|
+
DtIconCheck: vue3.DtIconCheck
|
|
15
15
|
},
|
|
16
16
|
/**
|
|
17
17
|
* Value provided from keyboard_list_navigation.js using id prop.
|
|
@@ -168,7 +168,7 @@ const _sfc_main = {
|
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
171
|
-
const
|
|
171
|
+
const _component_dt_icon_check = vue.resolveComponent("dt-icon-check");
|
|
172
172
|
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.elementType), vue.mergeProps({
|
|
173
173
|
id: $props.id,
|
|
174
174
|
class: ["dt-list-item", {
|
|
@@ -193,8 +193,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
193
193
|
$props.selected ? {
|
|
194
194
|
name: "selected",
|
|
195
195
|
fn: vue.withCtx(() => [
|
|
196
|
-
vue.createVNode(
|
|
197
|
-
name: "check",
|
|
196
|
+
vue.createVNode(_component_dt_icon_check, {
|
|
198
197
|
size: "400",
|
|
199
198
|
class: "dt-list-item--selected-icon"
|
|
200
199
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list_item.vue.cjs","sources":["../../../components/list_item/list_item.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <component\n :is=\"elementType\"\n :id=\"id\"\n :class=\"['dt-list-item', {\n 'dt-list-item--focusable': isFocusable,\n 'dt-list-item--highlighted': isHighlighted,\n 'dt-list-item--static': !isHoverable,\n }]\"\n :tabindex=\"isFocusable ? 0 : -1\"\n :role=\"role\"\n :aria-selected=\"role === 'listitem' ? undefined : isHighlighted\"\n v-on=\"listItemListeners\"\n >\n <component\n :is=\"listItemType\"\n v-if=\"listItemType\"\n >\n <template\n v-for=\"(_, slotName) in $slots\"\n #[slotName]\n >\n <!-- @slot named slots for custom list items -->\n <slot :name=\"slotName\" />\n </template>\n <template\n v-if=\"selected\"\n #selected\n >\n <dt-icon
|
|
1
|
+
{"version":3,"file":"list_item.vue.cjs","sources":["../../../components/list_item/list_item.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <component\n :is=\"elementType\"\n :id=\"id\"\n :class=\"['dt-list-item', {\n 'dt-list-item--focusable': isFocusable,\n 'dt-list-item--highlighted': isHighlighted,\n 'dt-list-item--static': !isHoverable,\n }]\"\n :tabindex=\"isFocusable ? 0 : -1\"\n :role=\"role\"\n :aria-selected=\"role === 'listitem' ? undefined : isHighlighted\"\n v-on=\"listItemListeners\"\n >\n <component\n :is=\"listItemType\"\n v-if=\"listItemType\"\n >\n <template\n v-for=\"(_, slotName) in $slots\"\n #[slotName]\n >\n <!-- @slot named slots for custom list items -->\n <slot :name=\"slotName\" />\n </template>\n <template\n v-if=\"selected\"\n #selected\n >\n <dt-icon-check\n size=\"400\"\n class=\"dt-list-item--selected-icon\"\n />\n </template>\n </component>\n <!-- @slot slot for the main content -->\n <slot v-else />\n </component>\n</template>\n\n<script>\nimport {\n LIST_ITEM_TYPES,\n LIST_ITEM_NAVIGATION_TYPES,\n} from './list_item_constants';\nimport utils from '@/common/utils';\nimport { DtIconCheck } from '@dialpad/dialtone-icons/vue3';\nimport { DtItemLayout } from '@/components/item_layout';\n\nconst ROLES = ['listitem', 'menuitem', 'option'];\n\n/**\n * A list item is an element that can be used to represent individual items in a list.\n * @see https://dialtone.dialpad.com/components/list_item.html\n */\nexport default {\n name: 'DtListItem',\n\n components: {\n DtItemLayout,\n DtIconCheck,\n },\n\n /**\n * Value provided from keyboard_list_navigation.js using id prop.\n */\n inject: {\n highlightId: { default: null },\n },\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * String to use for the item's role.\n */\n role: {\n type: String,\n default: 'listitem',\n validator: (role) => (ROLES).includes(role),\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n elementType: {\n type: String,\n default: 'li',\n },\n\n /**\n * The type of child list item to use.\n * @values default, custom\n */\n type: {\n type: String,\n default: LIST_ITEM_TYPES.DEFAULT,\n validator: (t) => Object.values(LIST_ITEM_TYPES).includes(t),\n },\n\n /**\n * The type of navigation that this component should support.\n * - \"arrow-keys\" for items that are navigated with UP/DOWN keys.\n * - \"tab\" for items that are navigated using the TAB key.\n * - \"none\" for static items that are not interactive.\n * @values arrow-keys, tab, none\n */\n navigationType: {\n type: String,\n default: LIST_ITEM_NAVIGATION_TYPES.NONE,\n validator: (t) => Object.values(LIST_ITEM_NAVIGATION_TYPES).includes(t),\n },\n\n /**\n * Applies selected styles to the list item\n */\n selected: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Key down event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Native mouse move event\n *\n * @event mousemove\n * @type {MouseEvent}\n */\n 'mousemove',\n\n /**\n * Native mouse leave event\n *\n * @event mouseleave\n * @type {MouseEvent}\n */\n 'mouseleave',\n\n /**\n * Mouse down event\n *\n * @event mousedown\n */\n 'mousedown',\n ],\n\n data () {\n return {\n injected: false,\n mouseHighlighted: false,\n };\n },\n\n computed: {\n listItemType () {\n switch (this.type) {\n case LIST_ITEM_TYPES.DEFAULT:\n return DtItemLayout;\n default:\n return null;\n }\n },\n\n listItemListeners () {\n return {\n keydown: event => {\n if (['enter', 'space'].includes(event.code.toLowerCase())) {\n this.onClick(event);\n }\n this.$emit('keydown', event);\n },\n\n mousemove: event => {\n this.onMouseHover(event);\n this.$emit('mousemove', event);\n },\n\n mouseleave: event => {\n this.onMouseLeave(event);\n this.$emit('mouseleave', event);\n },\n };\n },\n\n /**\n * For keyboard navigation, whether this item is currently highlighted.\n * An injected highlightId will override the default mouseover highlight.\n */\n isHighlighted () {\n if (this.isHoverable) {\n return this.highlightId && this.highlightId() ? this.id === this.highlightId() : this.mouseHighlighted;\n }\n return false;\n },\n\n isFocusable () {\n // Navigation type has to be set to \"tab\".\n return this.navigationType === LIST_ITEM_NAVIGATION_TYPES.TAB;\n },\n\n /**\n * Whether to apply hover styles.\n */\n isHoverable () {\n return this.navigationType !== LIST_ITEM_NAVIGATION_TYPES.NONE;\n },\n },\n\n methods: {\n onClick (e) {\n // disabled as we do not want to override native click\n // eslint-disable-next-line vue/require-explicit-emits\n this.$emit('click', e);\n },\n\n onMouseHover () {\n this.mouseHighlighted = true;\n },\n\n onMouseLeave () {\n this.mouseHighlighted = false;\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-list-item {\n list-style: none;\n background-color: var(--dt-action-color-background-muted-default);\n\n &:not(.dt-list-item--static) {\n cursor: pointer;\n border-radius: var(--dt-size-radius-300);\n }\n\n &--focusable:focus,\n &--focusable:focus-within,\n &--highlighted {\n background-color: var(--dt-action-color-background-muted-hover);\n }\n\n &--highlighted:active {\n background-color: var(--dt-action-color-background-muted-active);\n }\n\n &--selected-icon {\n margin-left: var(--dt-space-400);\n }\n\n :focus-visible {\n outline: none;\n box-shadow: var(--dt-shadow-focus);\n }\n}\n</style>\n"],"names":["DtItemLayout","DtIconCheck","utils","LIST_ITEM_TYPES","LIST_ITEM_NAVIGATION_TYPES","_createBlock","_resolveDynamicComponent","_mergeProps","_toHandlers","_openBlock","_createSlots","_renderSlot","_createVNode"],"mappings":";;;;;;;;AAkDA,MAAM,QAAQ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ADlBC,eAoCY;AAAA,IAlCT,IAAI,OAAE;AAAA,IACN,OAAK,CAAA,gBAAA;AAAA,iCAAsD,SAAW;AAAA,mCAAqC,SAAa;AAAA,+BAAiC,SAAW;AAAA;IAKpK,UAAU,SAAW,cAAA,IAAA;AAAA,IACrB,MAAM,OAAI;AAAA,IACV,iBAAe,OAAA,SAAsB,aAAA,SAAY,SAAa;AAAA,EAC/D,GAAAC,eAAM,SAAiB,iBAAA,CAAA,GAAA;AAAA,yBAEvB,MAoBY;AAAA,MAlBJ,SAAY,gBAFpBC,IAAAA,UAAA,GAAAJ,IAAA,YAoBYC,4BAnBL,SAAY,YAAA,GAAA,EAAA,KAAA,EAAA,GAAAI,IAAAA,YAAA,EAAA,GAAA,EAAA,GAAA;AAAA,uBAIS,KAAM,QAAA,CAAtB,GAAG,aAAQ;;kBAClB;AAAA,4BAGD,MAAyB;AAAA,cAAzBC,eAAyB,aAAZ,QAAQ;AAAA;;;QAGf,OAAQ;gBACb;AAAA,0BAED,MAGE;AAAA,YAHFC,IAAAA,YAGE,0BAAA;AAAA,cAFA,MAAK;AAAA,cACL,OAAM;AAAA;;;;mBAKZD,IAAe,WAAA,KAAA,QAAA,WAAA,EAAA,KAAA,GAAA;AAAA;;;;;;"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { LIST_ITEM_TYPES, LIST_ITEM_NAVIGATION_TYPES } from "./list_item_constants.js";
|
|
2
2
|
import utils from "../../common/utils.js";
|
|
3
|
+
import { DtIconCheck } from "@dialpad/dialtone-icons/vue3";
|
|
3
4
|
import { resolveComponent, openBlock, createBlock, resolveDynamicComponent, mergeProps, toHandlers, withCtx, createSlots, renderList, renderSlot, createVNode } from "vue";
|
|
4
5
|
/* empty css */
|
|
5
6
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
6
7
|
import DtItemLayout from "../item_layout/item_layout.vue.js";
|
|
7
|
-
import DtIcon from "../icon/icon.vue.js";
|
|
8
8
|
const ROLES = ["listitem", "menuitem", "option"];
|
|
9
9
|
const _sfc_main = {
|
|
10
10
|
name: "DtListItem",
|
|
11
11
|
components: {
|
|
12
12
|
DtItemLayout,
|
|
13
|
-
|
|
13
|
+
DtIconCheck
|
|
14
14
|
},
|
|
15
15
|
/**
|
|
16
16
|
* Value provided from keyboard_list_navigation.js using id prop.
|
|
@@ -167,7 +167,7 @@ const _sfc_main = {
|
|
|
167
167
|
}
|
|
168
168
|
};
|
|
169
169
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
170
|
-
const
|
|
170
|
+
const _component_dt_icon_check = resolveComponent("dt-icon-check");
|
|
171
171
|
return openBlock(), createBlock(resolveDynamicComponent($props.elementType), mergeProps({
|
|
172
172
|
id: $props.id,
|
|
173
173
|
class: ["dt-list-item", {
|
|
@@ -192,8 +192,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
192
192
|
$props.selected ? {
|
|
193
193
|
name: "selected",
|
|
194
194
|
fn: withCtx(() => [
|
|
195
|
-
createVNode(
|
|
196
|
-
name: "check",
|
|
195
|
+
createVNode(_component_dt_icon_check, {
|
|
197
196
|
size: "400",
|
|
198
197
|
class: "dt-list-item--selected-icon"
|
|
199
198
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list_item.vue.js","sources":["../../../components/list_item/list_item.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <component\n :is=\"elementType\"\n :id=\"id\"\n :class=\"['dt-list-item', {\n 'dt-list-item--focusable': isFocusable,\n 'dt-list-item--highlighted': isHighlighted,\n 'dt-list-item--static': !isHoverable,\n }]\"\n :tabindex=\"isFocusable ? 0 : -1\"\n :role=\"role\"\n :aria-selected=\"role === 'listitem' ? undefined : isHighlighted\"\n v-on=\"listItemListeners\"\n >\n <component\n :is=\"listItemType\"\n v-if=\"listItemType\"\n >\n <template\n v-for=\"(_, slotName) in $slots\"\n #[slotName]\n >\n <!-- @slot named slots for custom list items -->\n <slot :name=\"slotName\" />\n </template>\n <template\n v-if=\"selected\"\n #selected\n >\n <dt-icon
|
|
1
|
+
{"version":3,"file":"list_item.vue.js","sources":["../../../components/list_item/list_item.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <component\n :is=\"elementType\"\n :id=\"id\"\n :class=\"['dt-list-item', {\n 'dt-list-item--focusable': isFocusable,\n 'dt-list-item--highlighted': isHighlighted,\n 'dt-list-item--static': !isHoverable,\n }]\"\n :tabindex=\"isFocusable ? 0 : -1\"\n :role=\"role\"\n :aria-selected=\"role === 'listitem' ? undefined : isHighlighted\"\n v-on=\"listItemListeners\"\n >\n <component\n :is=\"listItemType\"\n v-if=\"listItemType\"\n >\n <template\n v-for=\"(_, slotName) in $slots\"\n #[slotName]\n >\n <!-- @slot named slots for custom list items -->\n <slot :name=\"slotName\" />\n </template>\n <template\n v-if=\"selected\"\n #selected\n >\n <dt-icon-check\n size=\"400\"\n class=\"dt-list-item--selected-icon\"\n />\n </template>\n </component>\n <!-- @slot slot for the main content -->\n <slot v-else />\n </component>\n</template>\n\n<script>\nimport {\n LIST_ITEM_TYPES,\n LIST_ITEM_NAVIGATION_TYPES,\n} from './list_item_constants';\nimport utils from '@/common/utils';\nimport { DtIconCheck } from '@dialpad/dialtone-icons/vue3';\nimport { DtItemLayout } from '@/components/item_layout';\n\nconst ROLES = ['listitem', 'menuitem', 'option'];\n\n/**\n * A list item is an element that can be used to represent individual items in a list.\n * @see https://dialtone.dialpad.com/components/list_item.html\n */\nexport default {\n name: 'DtListItem',\n\n components: {\n DtItemLayout,\n DtIconCheck,\n },\n\n /**\n * Value provided from keyboard_list_navigation.js using id prop.\n */\n inject: {\n highlightId: { default: null },\n },\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * String to use for the item's role.\n */\n role: {\n type: String,\n default: 'listitem',\n validator: (role) => (ROLES).includes(role),\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n elementType: {\n type: String,\n default: 'li',\n },\n\n /**\n * The type of child list item to use.\n * @values default, custom\n */\n type: {\n type: String,\n default: LIST_ITEM_TYPES.DEFAULT,\n validator: (t) => Object.values(LIST_ITEM_TYPES).includes(t),\n },\n\n /**\n * The type of navigation that this component should support.\n * - \"arrow-keys\" for items that are navigated with UP/DOWN keys.\n * - \"tab\" for items that are navigated using the TAB key.\n * - \"none\" for static items that are not interactive.\n * @values arrow-keys, tab, none\n */\n navigationType: {\n type: String,\n default: LIST_ITEM_NAVIGATION_TYPES.NONE,\n validator: (t) => Object.values(LIST_ITEM_NAVIGATION_TYPES).includes(t),\n },\n\n /**\n * Applies selected styles to the list item\n */\n selected: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Key down event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Native mouse move event\n *\n * @event mousemove\n * @type {MouseEvent}\n */\n 'mousemove',\n\n /**\n * Native mouse leave event\n *\n * @event mouseleave\n * @type {MouseEvent}\n */\n 'mouseleave',\n\n /**\n * Mouse down event\n *\n * @event mousedown\n */\n 'mousedown',\n ],\n\n data () {\n return {\n injected: false,\n mouseHighlighted: false,\n };\n },\n\n computed: {\n listItemType () {\n switch (this.type) {\n case LIST_ITEM_TYPES.DEFAULT:\n return DtItemLayout;\n default:\n return null;\n }\n },\n\n listItemListeners () {\n return {\n keydown: event => {\n if (['enter', 'space'].includes(event.code.toLowerCase())) {\n this.onClick(event);\n }\n this.$emit('keydown', event);\n },\n\n mousemove: event => {\n this.onMouseHover(event);\n this.$emit('mousemove', event);\n },\n\n mouseleave: event => {\n this.onMouseLeave(event);\n this.$emit('mouseleave', event);\n },\n };\n },\n\n /**\n * For keyboard navigation, whether this item is currently highlighted.\n * An injected highlightId will override the default mouseover highlight.\n */\n isHighlighted () {\n if (this.isHoverable) {\n return this.highlightId && this.highlightId() ? this.id === this.highlightId() : this.mouseHighlighted;\n }\n return false;\n },\n\n isFocusable () {\n // Navigation type has to be set to \"tab\".\n return this.navigationType === LIST_ITEM_NAVIGATION_TYPES.TAB;\n },\n\n /**\n * Whether to apply hover styles.\n */\n isHoverable () {\n return this.navigationType !== LIST_ITEM_NAVIGATION_TYPES.NONE;\n },\n },\n\n methods: {\n onClick (e) {\n // disabled as we do not want to override native click\n // eslint-disable-next-line vue/require-explicit-emits\n this.$emit('click', e);\n },\n\n onMouseHover () {\n this.mouseHighlighted = true;\n },\n\n onMouseLeave () {\n this.mouseHighlighted = false;\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-list-item {\n list-style: none;\n background-color: var(--dt-action-color-background-muted-default);\n\n &:not(.dt-list-item--static) {\n cursor: pointer;\n border-radius: var(--dt-size-radius-300);\n }\n\n &--focusable:focus,\n &--focusable:focus-within,\n &--highlighted {\n background-color: var(--dt-action-color-background-muted-hover);\n }\n\n &--highlighted:active {\n background-color: var(--dt-action-color-background-muted-active);\n }\n\n &--selected-icon {\n margin-left: var(--dt-space-400);\n }\n\n :focus-visible {\n outline: none;\n box-shadow: var(--dt-shadow-focus);\n }\n}\n</style>\n"],"names":["_createBlock","_resolveDynamicComponent","_mergeProps","_toHandlers","_openBlock","_createSlots","_renderSlot","_createVNode"],"mappings":";;;;;;;AAkDA,MAAM,QAAQ,CAAC,YAAY,YAAY,QAAQ;AAM/C,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,EACD;AAAA;AAAA;AAAA;AAAA,EAKD,QAAQ;AAAA,IACN,aAAa,EAAE,SAAS,KAAM;AAAA,EAC/B;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AAAE,eAAO,MAAM,gBAAiB;AAAA,MAAG;AAAA,IAC/C;AAAA;AAAA;AAAA;AAAA,IAKD,MAAM;AAAA,MACJ,MAAM;AA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,KAAM,QAAA,CAAtB,GAAG,aAAQ;;kBAClB;AAAA,wBAGD,MAAyB;AAAA,cAAzBC,WAAyB,aAAZ,QAAQ;AAAA;;;QAGf,OAAQ;gBACb;AAAA,sBAED,MAGE;AAAA,YAHFC,YAGE,0BAAA;AAAA,cAFA,MAAK;AAAA,cACL,OAAM;AAAA;;;;mBAKZD,WAAe,KAAA,QAAA,WAAA,EAAA,KAAA,GAAA;AAAA;;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
const vue3 = require("@dialpad/dialtone-icons/vue3");
|
|
2
3
|
const modal$1 = require("../../common/mixins/modal.cjs");
|
|
3
4
|
const modal_constants = require("./modal_constants.cjs");
|
|
4
5
|
const common_utils = require("../../common/utils.cjs");
|
|
@@ -9,14 +10,13 @@ const vue = require("vue");
|
|
|
9
10
|
const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.cjs");
|
|
10
11
|
const lazy_show = require("../lazy_show/lazy_show.vue.cjs");
|
|
11
12
|
const button = require("../button/button.vue.cjs");
|
|
12
|
-
const icon = require("../icon/icon.vue.cjs");
|
|
13
13
|
const notice_constants = require("../notice/notice_constants.cjs");
|
|
14
14
|
const _sfc_main = {
|
|
15
15
|
name: "DtModal",
|
|
16
16
|
components: {
|
|
17
17
|
DtLazyShow: lazy_show,
|
|
18
18
|
DtButton: button,
|
|
19
|
-
|
|
19
|
+
DtIconClose: vue3.DtIconClose,
|
|
20
20
|
SrOnlyCloseButton: sr_only_close_button
|
|
21
21
|
},
|
|
22
22
|
mixins: [modal$1, sr_only_close_button$1],
|
|
@@ -308,7 +308,7 @@ const _hoisted_4 = {
|
|
|
308
308
|
class: "d-modal__footer"
|
|
309
309
|
};
|
|
310
310
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
311
|
-
const
|
|
311
|
+
const _component_dt_icon_close = vue.resolveComponent("dt-icon-close");
|
|
312
312
|
const _component_dt_button = vue.resolveComponent("dt-button");
|
|
313
313
|
const _component_sr_only_close_button = vue.resolveComponent("sr-only-close-button");
|
|
314
314
|
const _component_dt_lazy_show = vue.resolveComponent("dt-lazy-show");
|
|
@@ -396,10 +396,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
396
396
|
"aria-label": $props.closeButtonProps.ariaLabel
|
|
397
397
|
}, $props.closeButtonProps, { onClick: $options.close }), {
|
|
398
398
|
icon: vue.withCtx(() => [
|
|
399
|
-
vue.createVNode(
|
|
400
|
-
name: "close",
|
|
401
|
-
size: "400"
|
|
402
|
-
})
|
|
399
|
+
vue.createVNode(_component_dt_icon_close, { size: "400" })
|
|
403
400
|
]),
|
|
404
401
|
_: 1
|
|
405
402
|
}, 16, ["aria-label", "onClick"])) : vue.createCommentVNode("", true),
|