@dialpad/dialtone 9.72.0 → 9.73.0-beta.1
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/tokens/doc.json +9610 -9610
- package/dist/vue2/common/sr_only_close_button.vue.cjs +3 -3
- package/dist/vue2/common/sr_only_close_button.vue.cjs.map +1 -1
- package/dist/vue2/common/sr_only_close_button.vue.js +3 -3
- package/dist/vue2/common/sr_only_close_button.vue.js.map +1 -1
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/components/badge/badge.vue.cjs +13 -34
- package/dist/vue2/components/badge/badge.vue.cjs.map +1 -1
- package/dist/vue2/components/badge/badge.vue.js +13 -34
- package/dist/vue2/components/badge/badge.vue.js.map +1 -1
- package/dist/vue2/components/chip/chip.vue.cjs +4 -4
- package/dist/vue2/components/chip/chip.vue.cjs.map +1 -1
- package/dist/vue2/components/chip/chip.vue.js +4 -4
- package/dist/vue2/components/chip/chip.vue.js.map +1 -1
- package/dist/vue2/components/collapsible/collapsible.vue.cjs +4 -3
- package/dist/vue2/components/collapsible/collapsible.vue.cjs.map +1 -1
- package/dist/vue2/components/collapsible/collapsible.vue.js +4 -3
- package/dist/vue2/components/collapsible/collapsible.vue.js.map +1 -1
- package/dist/vue2/components/datepicker/modules/month-year-picker.vue.cjs +14 -6
- package/dist/vue2/components/datepicker/modules/month-year-picker.vue.cjs.map +1 -1
- package/dist/vue2/components/datepicker/modules/month-year-picker.vue.js +14 -6
- package/dist/vue2/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs +6 -5
- package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js +6 -5
- package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs +23 -14
- package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js +23 -14
- package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
- package/dist/vue2/components/empty_state/empty_state.vue.cjs +20 -80
- package/dist/vue2/components/empty_state/empty_state.vue.cjs.map +1 -1
- package/dist/vue2/components/empty_state/empty_state.vue.js +21 -81
- package/dist/vue2/components/empty_state/empty_state.vue.js.map +1 -1
- package/dist/vue2/components/empty_state/empty_state_constants.cjs +18 -0
- package/dist/vue2/components/empty_state/empty_state_constants.cjs.map +1 -1
- package/dist/vue2/components/empty_state/empty_state_constants.js +18 -0
- package/dist/vue2/components/empty_state/empty_state_constants.js.map +1 -1
- package/dist/vue2/components/illustration/illustration.vue.cjs +2 -2
- package/dist/vue2/components/illustration/illustration.vue.js +2 -2
- package/dist/vue2/components/image_viewer/image_viewer.vue.cjs +4 -4
- package/dist/vue2/components/image_viewer/image_viewer.vue.cjs.map +1 -1
- package/dist/vue2/components/image_viewer/image_viewer.vue.js +4 -4
- package/dist/vue2/components/image_viewer/image_viewer.vue.js.map +1 -1
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +24 -9
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.cjs.map +1 -1
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.js +22 -7
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.js.map +1 -1
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.cjs +8 -14
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.cjs.map +1 -1
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.js +9 -15
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.js.map +1 -1
- package/dist/vue2/components/list_item/list_item.vue.cjs +3 -3
- package/dist/vue2/components/list_item/list_item.vue.cjs.map +1 -1
- package/dist/vue2/components/list_item/list_item.vue.js +3 -3
- package/dist/vue2/components/list_item/list_item.vue.js.map +1 -1
- package/dist/vue2/components/modal/modal.vue.cjs +4 -4
- package/dist/vue2/components/modal/modal.vue.cjs.map +1 -1
- package/dist/vue2/components/modal/modal.vue.js +4 -4
- package/dist/vue2/components/modal/modal.vue.js.map +1 -1
- package/dist/vue2/components/notice/notice_action.vue.cjs +4 -4
- package/dist/vue2/components/notice/notice_action.vue.cjs.map +1 -1
- package/dist/vue2/components/notice/notice_action.vue.js +4 -4
- package/dist/vue2/components/notice/notice_action.vue.js.map +1 -1
- package/dist/vue2/components/notice/notice_icon.vue.cjs +12 -8
- package/dist/vue2/components/notice/notice_icon.vue.cjs.map +1 -1
- package/dist/vue2/components/notice/notice_icon.vue.js +12 -8
- package/dist/vue2/components/notice/notice_icon.vue.js.map +1 -1
- package/dist/vue2/components/pagination/pagination.vue.cjs +11 -5
- package/dist/vue2/components/pagination/pagination.vue.cjs.map +1 -1
- package/dist/vue2/components/pagination/pagination.vue.js +11 -5
- package/dist/vue2/components/pagination/pagination.vue.js.map +1 -1
- package/dist/vue2/components/popover/popover_header_footer.vue.cjs +4 -4
- package/dist/vue2/components/popover/popover_header_footer.vue.cjs.map +1 -1
- package/dist/vue2/components/popover/popover_header_footer.vue.js +4 -4
- package/dist/vue2/components/popover/popover_header_footer.vue.js.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/emoji/emoji.cjs +38 -40
- package/dist/vue2/components/rich_text_editor/extensions/emoji/emoji.cjs.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/emoji/emoji.js +40 -42
- package/dist/vue2/components/rich_text_editor/extensions/emoji/emoji.js.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/emoji/index.cjs +3 -1
- package/dist/vue2/components/rich_text_editor/extensions/emoji/index.cjs.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/emoji/index.js +1 -0
- package/dist/vue2/components/rich_text_editor/extensions/emoji/suggestion.cjs +0 -4
- package/dist/vue2/components/rich_text_editor/extensions/emoji/suggestion.cjs.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/emoji/suggestion.js +0 -4
- package/dist/vue2/components/rich_text_editor/extensions/emoji/suggestion.js.map +1 -1
- package/dist/vue2/dialtone-vue.cjs +0 -3
- package/dist/vue2/dialtone-vue.cjs.map +1 -1
- package/dist/vue2/dialtone-vue.js +2 -5
- package/dist/vue2/lib/general-row.cjs +0 -1
- package/dist/vue2/lib/general-row.cjs.map +1 -1
- package/dist/vue2/lib/general-row.js +1 -2
- package/dist/vue2/lib/keyboard-shortcut.cjs +0 -2
- package/dist/vue2/lib/keyboard-shortcut.cjs.map +1 -1
- package/dist/vue2/lib/keyboard-shortcut.js +2 -4
- package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +5 -5
- package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
- package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +5 -5
- package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
- package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.cjs +25 -5
- package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.cjs.map +1 -1
- package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.js +26 -6
- package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +5 -4
- package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +5 -4
- package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +3 -3
- package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +3 -3
- package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs +35 -22
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.js +35 -22
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs +3 -3
- package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js +3 -3
- package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js.map +1 -1
- package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +6 -6
- package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
- package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.js +6 -6
- package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
- package/dist/vue2/recipes/leftbar/general_row/general_row.vue.cjs +8 -7
- package/dist/vue2/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
- package/dist/vue2/recipes/leftbar/general_row/general_row.vue.js +8 -7
- package/dist/vue2/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
- package/dist/vue2/recipes/leftbar/general_row/general_row_constants.cjs +0 -17
- package/dist/vue2/recipes/leftbar/general_row/general_row_constants.cjs.map +1 -1
- package/dist/vue2/recipes/leftbar/general_row/general_row_constants.js +0 -17
- package/dist/vue2/recipes/leftbar/general_row/general_row_constants.js.map +1 -1
- package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +36 -4
- package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
- package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +37 -5
- package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
- package/dist/vue2/recipes/leftbar/group_row/group_row.vue.cjs +3 -3
- package/dist/vue2/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
- package/dist/vue2/recipes/leftbar/group_row/group_row.vue.js +3 -3
- package/dist/vue2/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
- package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.cjs +4 -3
- package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.cjs.map +1 -1
- package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.js +4 -3
- package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.js.map +1 -1
- package/dist/vue2/style.css +62 -62
- package/dist/vue2/types/components/badge/badge.vue.d.ts +16 -45
- package/dist/vue2/types/components/badge/badge.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts +1 -67
- package/dist/vue2/types/components/empty_state/empty_state_constants.d.ts +27 -0
- package/dist/vue2/types/components/keyboard_shortcut/index.d.ts +1 -1
- package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +7 -15
- package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts +0 -11
- package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts.map +1 -1
- package/dist/vue2/types/components/modal/modal.vue.d.ts +4 -6
- package/dist/vue2/types/components/modal/modal.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/notice/notice_action.vue.d.ts +5 -4
- package/dist/vue2/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/notice/notice_icon.vue.d.ts +1 -1
- package/dist/vue2/types/components/notice/notice_icon.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/pagination/pagination.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/channels/channel.d.ts +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/channels/channel.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/emoji/emoji.d.ts +0 -2
- package/dist/vue2/types/components/rich_text_editor/extensions/emoji/emoji.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/emoji/index.d.ts +1 -0
- package/dist/vue2/types/components/rich_text_editor/extensions/emoji/index.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/mentions/mention.d.ts +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/mentions/mention.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/slash_command/slash_command.d.ts +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/slash_command/slash_command.d.ts.map +1 -1
- package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +8 -8
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/general_row/general_row_constants.d.ts +0 -6
- package/dist/vue2/types/recipes/leftbar/general_row/general_row_constants.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/general_row/index.d.ts +1 -1
- package/dist/vue2/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +1 -1
- package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
- package/dist/vue3/common/sr_only_close_button.vue.cjs +4 -4
- package/dist/vue3/common/sr_only_close_button.vue.cjs.map +1 -1
- package/dist/vue3/common/sr_only_close_button.vue.js +4 -4
- package/dist/vue3/common/sr_only_close_button.vue.js.map +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/components/avatar/avatar.vue.cjs +30 -41
- package/dist/vue3/components/avatar/avatar.vue.cjs.map +1 -1
- package/dist/vue3/components/avatar/avatar.vue.js +32 -43
- package/dist/vue3/components/avatar/avatar.vue.js.map +1 -1
- package/dist/vue3/components/badge/badge.vue.cjs +22 -39
- package/dist/vue3/components/badge/badge.vue.cjs.map +1 -1
- package/dist/vue3/components/badge/badge.vue.js +23 -40
- package/dist/vue3/components/badge/badge.vue.js.map +1 -1
- package/dist/vue3/components/chip/chip.vue.cjs +4 -7
- package/dist/vue3/components/chip/chip.vue.cjs.map +1 -1
- package/dist/vue3/components/chip/chip.vue.js +4 -7
- package/dist/vue3/components/chip/chip.vue.js.map +1 -1
- package/dist/vue3/components/collapsible/collapsible.vue.cjs +12 -6
- package/dist/vue3/components/collapsible/collapsible.vue.cjs.map +1 -1
- package/dist/vue3/components/collapsible/collapsible.vue.js +12 -6
- package/dist/vue3/components/collapsible/collapsible.vue.js.map +1 -1
- package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs +5 -17
- package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs.map +1 -1
- package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js +5 -17
- package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
- package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs +4 -9
- package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
- package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js +5 -10
- package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
- package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs +11 -14
- package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
- package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js +12 -15
- package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
- package/dist/vue3/components/empty_state/empty_state.vue.cjs +19 -92
- package/dist/vue3/components/empty_state/empty_state.vue.cjs.map +1 -1
- package/dist/vue3/components/empty_state/empty_state.vue.js +20 -93
- package/dist/vue3/components/empty_state/empty_state.vue.js.map +1 -1
- package/dist/vue3/components/empty_state/empty_state_constants.cjs +18 -0
- package/dist/vue3/components/empty_state/empty_state_constants.cjs.map +1 -1
- package/dist/vue3/components/empty_state/empty_state_constants.js +18 -0
- package/dist/vue3/components/empty_state/empty_state_constants.js.map +1 -1
- package/dist/vue3/components/illustration/illustration.vue.cjs +2 -2
- package/dist/vue3/components/illustration/illustration.vue.js +2 -2
- package/dist/vue3/components/image_viewer/image_viewer.vue.cjs +4 -5
- package/dist/vue3/components/image_viewer/image_viewer.vue.cjs.map +1 -1
- package/dist/vue3/components/image_viewer/image_viewer.vue.js +4 -5
- package/dist/vue3/components/image_viewer/image_viewer.vue.js.map +1 -1
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +24 -11
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.cjs.map +1 -1
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.js +23 -10
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.js.map +1 -1
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.cjs +8 -14
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.cjs.map +1 -1
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.js +9 -15
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.js.map +1 -1
- package/dist/vue3/components/list_item/list_item.vue.cjs +4 -5
- package/dist/vue3/components/list_item/list_item.vue.cjs.map +1 -1
- package/dist/vue3/components/list_item/list_item.vue.js +4 -5
- package/dist/vue3/components/list_item/list_item.vue.js.map +1 -1
- package/dist/vue3/components/modal/modal.vue.cjs +4 -7
- package/dist/vue3/components/modal/modal.vue.cjs.map +1 -1
- package/dist/vue3/components/modal/modal.vue.js +4 -7
- package/dist/vue3/components/modal/modal.vue.js.map +1 -1
- package/dist/vue3/components/notice/notice_action.vue.cjs +4 -7
- package/dist/vue3/components/notice/notice_action.vue.cjs.map +1 -1
- package/dist/vue3/components/notice/notice_action.vue.js +4 -7
- package/dist/vue3/components/notice/notice_action.vue.js.map +1 -1
- package/dist/vue3/components/notice/notice_icon.vue.cjs +12 -12
- package/dist/vue3/components/notice/notice_icon.vue.cjs.map +1 -1
- package/dist/vue3/components/notice/notice_icon.vue.js +13 -13
- package/dist/vue3/components/notice/notice_icon.vue.js.map +1 -1
- package/dist/vue3/components/pagination/pagination.vue.cjs +10 -15
- package/dist/vue3/components/pagination/pagination.vue.cjs.map +1 -1
- package/dist/vue3/components/pagination/pagination.vue.js +10 -15
- package/dist/vue3/components/pagination/pagination.vue.js.map +1 -1
- package/dist/vue3/components/popover/popover_header_footer.vue.cjs +4 -7
- package/dist/vue3/components/popover/popover_header_footer.vue.cjs.map +1 -1
- package/dist/vue3/components/popover/popover_header_footer.vue.js +4 -7
- package/dist/vue3/components/popover/popover_header_footer.vue.js.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/emoji/emoji.cjs +38 -40
- package/dist/vue3/components/rich_text_editor/extensions/emoji/emoji.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/emoji/emoji.js +40 -42
- package/dist/vue3/components/rich_text_editor/extensions/emoji/emoji.js.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/emoji/index.cjs +3 -1
- package/dist/vue3/components/rich_text_editor/extensions/emoji/index.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/emoji/index.js +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/emoji/suggestion.cjs +0 -4
- package/dist/vue3/components/rich_text_editor/extensions/emoji/suggestion.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/emoji/suggestion.js +0 -4
- package/dist/vue3/components/rich_text_editor/extensions/emoji/suggestion.js.map +1 -1
- package/dist/vue3/dialtone-vue.cjs +0 -3
- package/dist/vue3/dialtone-vue.cjs.map +1 -1
- package/dist/vue3/dialtone-vue.js +2 -5
- package/dist/vue3/lib/general-row.cjs +0 -1
- package/dist/vue3/lib/general-row.cjs.map +1 -1
- package/dist/vue3/lib/general-row.js +1 -2
- package/dist/vue3/lib/keyboard-shortcut.cjs +0 -2
- package/dist/vue3/lib/keyboard-shortcut.cjs.map +1 -1
- package/dist/vue3/lib/keyboard-shortcut.js +2 -4
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +4 -5
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +4 -5
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
- package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.cjs +27 -11
- package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.cjs.map +1 -1
- package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.js +29 -13
- package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +7 -11
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +7 -11
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +4 -7
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +4 -7
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs +33 -25
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.js +34 -26
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +14 -7
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +15 -8
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs +4 -6
- package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js +4 -6
- package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js.map +1 -1
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +6 -12
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js +6 -12
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs +27 -7
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js +28 -8
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs +13 -4
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js +14 -5
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs +13 -7
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js +14 -8
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs +9 -13
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js +9 -13
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/general_row_constants.cjs +0 -17
- package/dist/vue3/recipes/leftbar/general_row/general_row_constants.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/general_row_constants.js +0 -17
- package/dist/vue3/recipes/leftbar/general_row/general_row_constants.js.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +39 -11
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +41 -13
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs +4 -7
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js +4 -7
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.cjs +11 -6
- package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.js +12 -7
- package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.js.map +1 -1
- package/dist/vue3/style.css +111 -111
- package/dist/vue3/types/components/avatar/avatar.vue.d.ts +6 -34
- package/dist/vue3/types/components/avatar/avatar.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/badge/badge.vue.d.ts +17 -34
- package/dist/vue3/types/components/badge/badge.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/chip/chip.vue.d.ts +1 -1
- package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts +1 -1
- package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/empty_state/empty_state.vue.d.ts +4 -0
- package/dist/vue3/types/components/empty_state/empty_state.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/empty_state/empty_state_constants.d.ts +27 -0
- package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/input/input.vue.d.ts +1 -1
- package/dist/vue3/types/components/keyboard_shortcut/index.d.ts +1 -1
- package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +210 -15
- package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts +0 -11
- package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts.map +1 -1
- package/dist/vue3/types/components/list_item/list_item.vue.d.ts +2 -8
- package/dist/vue3/types/components/list_item/list_item.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/notice/notice_action.vue.d.ts +5 -4
- package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/notice/notice_icon.vue.d.ts +30 -1
- package/dist/vue3/types/components/notice/notice_icon.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/channels/channel.d.ts +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/channels/channel.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/emoji/emoji.d.ts +0 -2
- package/dist/vue3/types/components/rich_text_editor/extensions/emoji/emoji.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/emoji/index.d.ts +1 -0
- package/dist/vue3/types/components/rich_text_editor/extensions/emoji/index.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/mentions/mention.d.ts +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/mentions/mention.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/slash_command/slash_command.d.ts +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/slash_command/slash_command.d.ts.map +1 -1
- package/dist/vue3/types/components/split_button/split_button-omega.vue.d.ts +1 -1
- package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +30 -1
- package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +240 -8
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +0 -1
- package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +3 -3
- package/dist/vue3/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -1
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/general_row_constants.d.ts +0 -6
- package/dist/vue3/types/recipes/leftbar/general_row/general_row_constants.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/index.d.ts +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +30 -1
- package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
- package/package.json +26 -26
- package/dist/vue3/common/storybook_utils.cjs +0 -8
- package/dist/vue3/common/storybook_utils.cjs.map +0 -1
- package/dist/vue3/common/storybook_utils.js +0 -8
- package/dist/vue3/common/storybook_utils.js.map +0 -1
- package/dist/vue3/types/common/storybook_utils.d.ts +0 -25
- package/dist/vue3/types/common/storybook_utils.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion.cjs","sources":["../../../../../components/rich_text_editor/extensions/emoji/suggestion.js"],"sourcesContent":["import { markRaw } from 'vue';\nimport { VueRenderer } from '@tiptap/vue-3';\nimport { emojisIndexed } from '@dialpad/dialtone-emojis';\n\nimport SuggestionList from '../suggestion/SuggestionList.vue';\nimport EmojiSuggestion from './EmojiSuggestion.vue';\n\nimport tippy from 'tippy.js';\nimport hideOnEsc from '../tippy_plugins/hide_on_esc';\n\nexport default {\n items: ({ query }) => {\n if (query.length < 2) {\n return [];\n }\n const emojiList = Object.values(emojisIndexed);\n const filteredEmoji = emojiList.filter(function (item) {\n if (item.shortname.substring(1, item.shortname.length - 1).startsWith(query.toLowerCase())) {\n return true;\n }\n return false;\n });\n return filteredEmoji.map(item => { return { code: item.shortname }; });\n },\n\n command: ({ editor, range, props }) => {\n // increase range.to by one when the next node is of type \"text\"\n // and starts with a space character\n const nodeAfter = editor.view.state.selection.$to.nodeAfter;\n const overrideSpace = nodeAfter?.text?.startsWith(' ');\n\n if (overrideSpace) {\n range.to += 1;\n }\n\n editor\n .chain()\n .focus()\n .insertContentAt(range, [\n {\n type: 'emoji',\n attrs: props,\n },\n
|
|
1
|
+
{"version":3,"file":"suggestion.cjs","sources":["../../../../../components/rich_text_editor/extensions/emoji/suggestion.js"],"sourcesContent":["import { markRaw } from 'vue';\nimport { VueRenderer } from '@tiptap/vue-3';\nimport { emojisIndexed } from '@dialpad/dialtone-emojis';\n\nimport SuggestionList from '../suggestion/SuggestionList.vue';\nimport EmojiSuggestion from './EmojiSuggestion.vue';\n\nimport tippy from 'tippy.js';\nimport hideOnEsc from '../tippy_plugins/hide_on_esc';\n\nexport default {\n items: ({ query }) => {\n if (query.length < 2) {\n return [];\n }\n const emojiList = Object.values(emojisIndexed);\n const filteredEmoji = emojiList.filter(function (item) {\n if (item.shortname.substring(1, item.shortname.length - 1).startsWith(query.toLowerCase())) {\n return true;\n }\n return false;\n });\n return filteredEmoji.map(item => { return { code: item.shortname }; });\n },\n\n command: ({ editor, range, props }) => {\n // increase range.to by one when the next node is of type \"text\"\n // and starts with a space character\n const nodeAfter = editor.view.state.selection.$to.nodeAfter;\n const overrideSpace = nodeAfter?.text?.startsWith(' ');\n\n if (overrideSpace) {\n range.to += 1;\n }\n\n editor\n .chain()\n .focus()\n .insertContentAt(range, [\n {\n type: 'emoji',\n attrs: props,\n },\n ])\n .run();\n\n window.getSelection()?.collapseToEnd();\n },\n\n render: () => {\n let component;\n let popup;\n let popupIsOpen = false;\n\n return {\n onStart: props => {\n component = new VueRenderer(SuggestionList, {\n props: {\n itemComponent: markRaw(EmojiSuggestion),\n itemType: 'emoji',\n ...props,\n },\n editor: props.editor,\n });\n\n if (!props.clientRect) {\n return;\n }\n\n popup = tippy('body', {\n getReferenceClientRect: props.clientRect,\n appendTo: () => document.body,\n content: component.element,\n showOnCreate: false,\n onShow: () => { popupIsOpen = true; },\n onHidden: () => { popupIsOpen = false; },\n interactive: true,\n trigger: 'manual',\n placement: 'top-start',\n zIndex: 650,\n plugins: [hideOnEsc],\n });\n\n if (props.items.length > 0) {\n popup?.[0].show();\n }\n },\n\n onUpdate (props) {\n component?.updateProps(props);\n\n if (props.items.length > 0) {\n popup?.[0].show();\n } else {\n popup?.[0].hide();\n }\n popup?.[0].setProps({\n getReferenceClientRect: props.clientRect,\n });\n },\n\n onKeyDown (props) {\n if (popupIsOpen) {\n return component?.ref?.onKeyDown(props);\n }\n },\n\n onExit () {\n popup?.[0].destroy();\n popup = null;\n component?.destroy();\n component = null;\n },\n };\n },\n};\n"],"names":["emojisIndexed","VueRenderer","markRaw","hideOnEsc"],"mappings":";;;;;;;;AAUA,MAAe,oBAAA;AAAA,EACb,OAAO,CAAC,EAAE,YAAY;AACpB,QAAI,MAAM,SAAS,GAAG;AACpB,aAAO;IACR;AACD,UAAM,YAAY,OAAO,OAAOA,eAAa,aAAA;AAC7C,UAAM,gBAAgB,UAAU,OAAO,SAAU,MAAM;AACrD,UAAI,KAAK,UAAU,UAAU,GAAG,KAAK,UAAU,SAAS,CAAC,EAAE,WAAW,MAAM,YAAa,CAAA,GAAG;AAC1F,eAAO;AAAA,MACR;AACD,aAAO;AAAA,IACb,CAAK;AACD,WAAO,cAAc,IAAI,UAAQ;AAAE,aAAO,EAAE,MAAM,KAAK;IAAY,CAAE;AAAA,EACtE;AAAA,EAED,SAAS,C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,GAAG;AAAA,QACZ;AACD,uCAAQ,GAAG,SAAS;AAAA,UAClB,wBAAwB,MAAM;AAAA,QACxC;AAAA,MACO;AAAA,MAED,UAAW,OAAO;;AAChB,YAAI,aAAa;AACf,kBAAO,4CAAW,QAAX,mBAAgB,UAAU;AAAA,QAClC;AAAA,MACF;AAAA,MAED,SAAU;AACR,uCAAQ,GAAG;AACX,gBAAQ;AACR,+CAAW;AACX,oBAAY;AAAA,MACb;AAAA,IACP;AAAA,EACG;AACH;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion.js","sources":["../../../../../components/rich_text_editor/extensions/emoji/suggestion.js"],"sourcesContent":["import { markRaw } from 'vue';\nimport { VueRenderer } from '@tiptap/vue-3';\nimport { emojisIndexed } from '@dialpad/dialtone-emojis';\n\nimport SuggestionList from '../suggestion/SuggestionList.vue';\nimport EmojiSuggestion from './EmojiSuggestion.vue';\n\nimport tippy from 'tippy.js';\nimport hideOnEsc from '../tippy_plugins/hide_on_esc';\n\nexport default {\n items: ({ query }) => {\n if (query.length < 2) {\n return [];\n }\n const emojiList = Object.values(emojisIndexed);\n const filteredEmoji = emojiList.filter(function (item) {\n if (item.shortname.substring(1, item.shortname.length - 1).startsWith(query.toLowerCase())) {\n return true;\n }\n return false;\n });\n return filteredEmoji.map(item => { return { code: item.shortname }; });\n },\n\n command: ({ editor, range, props }) => {\n // increase range.to by one when the next node is of type \"text\"\n // and starts with a space character\n const nodeAfter = editor.view.state.selection.$to.nodeAfter;\n const overrideSpace = nodeAfter?.text?.startsWith(' ');\n\n if (overrideSpace) {\n range.to += 1;\n }\n\n editor\n .chain()\n .focus()\n .insertContentAt(range, [\n {\n type: 'emoji',\n attrs: props,\n },\n
|
|
1
|
+
{"version":3,"file":"suggestion.js","sources":["../../../../../components/rich_text_editor/extensions/emoji/suggestion.js"],"sourcesContent":["import { markRaw } from 'vue';\nimport { VueRenderer } from '@tiptap/vue-3';\nimport { emojisIndexed } from '@dialpad/dialtone-emojis';\n\nimport SuggestionList from '../suggestion/SuggestionList.vue';\nimport EmojiSuggestion from './EmojiSuggestion.vue';\n\nimport tippy from 'tippy.js';\nimport hideOnEsc from '../tippy_plugins/hide_on_esc';\n\nexport default {\n items: ({ query }) => {\n if (query.length < 2) {\n return [];\n }\n const emojiList = Object.values(emojisIndexed);\n const filteredEmoji = emojiList.filter(function (item) {\n if (item.shortname.substring(1, item.shortname.length - 1).startsWith(query.toLowerCase())) {\n return true;\n }\n return false;\n });\n return filteredEmoji.map(item => { return { code: item.shortname }; });\n },\n\n command: ({ editor, range, props }) => {\n // increase range.to by one when the next node is of type \"text\"\n // and starts with a space character\n const nodeAfter = editor.view.state.selection.$to.nodeAfter;\n const overrideSpace = nodeAfter?.text?.startsWith(' ');\n\n if (overrideSpace) {\n range.to += 1;\n }\n\n editor\n .chain()\n .focus()\n .insertContentAt(range, [\n {\n type: 'emoji',\n attrs: props,\n },\n ])\n .run();\n\n window.getSelection()?.collapseToEnd();\n },\n\n render: () => {\n let component;\n let popup;\n let popupIsOpen = false;\n\n return {\n onStart: props => {\n component = new VueRenderer(SuggestionList, {\n props: {\n itemComponent: markRaw(EmojiSuggestion),\n itemType: 'emoji',\n ...props,\n },\n editor: props.editor,\n });\n\n if (!props.clientRect) {\n return;\n }\n\n popup = tippy('body', {\n getReferenceClientRect: props.clientRect,\n appendTo: () => document.body,\n content: component.element,\n showOnCreate: false,\n onShow: () => { popupIsOpen = true; },\n onHidden: () => { popupIsOpen = false; },\n interactive: true,\n trigger: 'manual',\n placement: 'top-start',\n zIndex: 650,\n plugins: [hideOnEsc],\n });\n\n if (props.items.length > 0) {\n popup?.[0].show();\n }\n },\n\n onUpdate (props) {\n component?.updateProps(props);\n\n if (props.items.length > 0) {\n popup?.[0].show();\n } else {\n popup?.[0].hide();\n }\n popup?.[0].setProps({\n getReferenceClientRect: props.clientRect,\n });\n },\n\n onKeyDown (props) {\n if (popupIsOpen) {\n return component?.ref?.onKeyDown(props);\n }\n },\n\n onExit () {\n popup?.[0].destroy();\n popup = null;\n component?.destroy();\n component = null;\n },\n };\n },\n};\n"],"names":[],"mappings":";;;;;;;AAUA,MAAe,oBAAA;AAAA,EACb,OAAO,CAAC,EAAE,YAAY;AACpB,QAAI,MAAM,SAAS,GAAG;AACpB,aAAO;IACR;AACD,UAAM,YAAY,OAAO,OAAO,aAAa;AAC7C,UAAM,gBAAgB,UAAU,OAAO,SAAU,MAAM;AACrD,UAAI,KAAK,UAAU,UAAU,GAAG,KAAK,UAAU,SAAS,CAAC,EAAE,WAAW,MAAM,YAAa,CAAA,GAAG;AAC1F,eAAO;AAAA,MACR;AACD,aAAO;AAAA,IACb,CAAK;AACD,WAAO,cAAc,IAAI,UAAQ;AAAE,aAAO,EAAE,MAAM,KAAK;IAAY,CAAE;AAAA,EACtE;AAAA,EAED,SAAS,CAAC,EAAE,QAAQ,OAAO,MAAK,MAAO;;AAGrC,UAAM,YAAY,OAAO,KAAK,MAAM,UAAU,IAAI;AAClD,UAAM,iBAAgB,4CAAW,SAAX,mBAAiB,WAAW;AAElD,QAAI,eAAe;AACjB,YAAM,MAAM;AAAA,IACb;AAED,WACG,MAAO,EACP,MAAO,EACP,gBAAgB,OAAO;AAAA,MACtB;AAAA,QACE,MAAM;AAAA,QACN,OAAO;AAAA,MACR;AAAA,IACT,CAAO,EACA;AAEH,iBAAO,mBAAP,mBAAuB;AAAA,EACxB;AAAA,EAED,QAAQ,MAAM;AACZ,QAAI;AACJ,QAAI;AACJ,QAAI,cAAc;AAElB,WAAO;AAAA,MACL,SAAS,WAAS;AAChB,oBAAY,IAAI,YAAY,gBAAgB;AAAA,UAC1C,OAAO;AAAA,YACL,eAAe,QAAQ,eAAe;AAAA,YACtC,UAAU;AAAA,YACV,GAAG;AAAA,UACJ;AAAA,UACD,QAAQ,MAAM;AAAA,QACxB,CAAS;AAED,YAAI,CAAC,MAAM,YAAY;AACrB;AAAA,QACD;AAED,gBAAQ,MAAM,QAAQ;AAAA,UACpB,wBAAwB,MAAM;AAAA,UAC9B,UAAU,MAAM,SAAS;AAAA,UACzB,SAAS,UAAU;AAAA,UACnB,cAAc;AAAA,UACd,QAAQ,MAAM;AAAE,0BAAc;AAAA,UAAO;AAAA,UACrC,UAAU,MAAM;AAAE,0BAAc;AAAA,UAAQ;AAAA,UACxC,aAAa;AAAA,UACb,SAAS;AAAA,UACT,WAAW;AAAA,UACX,QAAQ;AAAA,UACR,SAAS,CAAC,SAAS;AAAA,QAC7B,CAAS;AAED,YAAI,MAAM,MAAM,SAAS,GAAG;AAC1B,yCAAQ,GAAG;AAAA,QACZ;AAAA,MACF;AAAA,MAED,SAAU,OAAO;AACf,+CAAW,YAAY;AAEvB,YAAI,MAAM,MAAM,SAAS,GAAG;AAC1B,yCAAQ,GAAG;AAAA,QACrB,OAAe;AACL,yCAAQ,GAAG;AAAA,QACZ;AACD,uCAAQ,GAAG,SAAS;AAAA,UAClB,wBAAwB,MAAM;AAAA,QACxC;AAAA,MACO;AAAA,MAED,UAAW,OAAO;;AAChB,YAAI,aAAa;AACf,kBAAO,4CAAW,QAAX,mBAAgB,UAAU;AAAA,QAClC;AAAA,MACF;AAAA,MAED,SAAU;AACR,uCAAQ,GAAG;AACX,gBAAQ;AACR,+CAAW;AACX,oBAAY;AAAA,MACb;AAAA,IACP;AAAA,EACG;AACH;"}
|
|
@@ -266,8 +266,6 @@ exports.DtInputGroup = input_group$1;
|
|
|
266
266
|
exports.DtItemLayout = item_layout;
|
|
267
267
|
exports.DtKeyboardShortcut = keyboard_shortcut;
|
|
268
268
|
exports.SHORTCUTS_ALIASES_LIST = keyboard_shortcut_constants.SHORTCUTS_ALIASES_LIST;
|
|
269
|
-
exports.SHORTCUTS_ICON_ALIASES = keyboard_shortcut_constants.SHORTCUTS_ICON_ALIASES;
|
|
270
|
-
exports.SHORTCUTS_ICON_SEPARATOR = keyboard_shortcut_constants.SHORTCUTS_ICON_SEPARATOR;
|
|
271
269
|
exports.DtLazyShow = lazy_show;
|
|
272
270
|
exports.DtLink = link;
|
|
273
271
|
exports.LINK_KIND_MODIFIERS = link_constants.LINK_KIND_MODIFIERS;
|
|
@@ -393,7 +391,6 @@ exports.DtRecipeContactRow = contact_row;
|
|
|
393
391
|
exports.DtRecipeGeneralRow = general_row;
|
|
394
392
|
exports.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS = general_row_constants.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS;
|
|
395
393
|
exports.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR = general_row_constants.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR;
|
|
396
|
-
exports.LEFTBAR_GENERAL_ROW_ICON_MAPPING = general_row_constants.LEFTBAR_GENERAL_ROW_ICON_MAPPING;
|
|
397
394
|
exports.LEFTBAR_GENERAL_ROW_ICON_SIZES = general_row_constants.LEFTBAR_GENERAL_ROW_ICON_SIZES;
|
|
398
395
|
exports.LEFTBAR_GENERAL_ROW_TYPES = general_row_constants.LEFTBAR_GENERAL_ROW_TYPES;
|
|
399
396
|
exports.DtRecipeGroupRow = group_row;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialtone-vue.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialtone-vue.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -51,7 +51,7 @@ import { INPUT_SIZES, INPUT_TYPES } from "./components/input/input_constants.js"
|
|
|
51
51
|
import { default as default30 } from "./components/input_group/input_group.vue.js";
|
|
52
52
|
import { default as default31 } from "./components/item_layout/item_layout.vue.js";
|
|
53
53
|
import { default as default32 } from "./components/keyboard_shortcut/keyboard_shortcut.vue.js";
|
|
54
|
-
import { SHORTCUTS_ALIASES_LIST
|
|
54
|
+
import { SHORTCUTS_ALIASES_LIST } from "./components/keyboard_shortcut/keyboard_shortcut_constants.js";
|
|
55
55
|
import { default as default33 } from "./components/lazy_show/lazy_show.vue.js";
|
|
56
56
|
import { default as default34 } from "./components/link/link.vue.js";
|
|
57
57
|
import { LINK_KIND_MODIFIERS, LINK_VARIANTS, getLinkKindModifier } from "./components/link/link_constants.js";
|
|
@@ -129,7 +129,7 @@ import { CALLBOX_BADGE_COLORS, CALLBOX_BORDER_COLORS } from "./recipes/leftbar/c
|
|
|
129
129
|
import { default as default83 } from "./recipes/leftbar/contact_centers_row/contact_centers_row.vue.js";
|
|
130
130
|
import { default as default84 } from "./recipes/leftbar/contact_row/contact_row.vue.js";
|
|
131
131
|
import { default as default85 } from "./recipes/leftbar/general_row/general_row.vue.js";
|
|
132
|
-
import { LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS, LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR,
|
|
132
|
+
import { LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS, LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR, LEFTBAR_GENERAL_ROW_ICON_SIZES, LEFTBAR_GENERAL_ROW_TYPES } from "./recipes/leftbar/general_row/general_row_constants.js";
|
|
133
133
|
import { default as default86 } from "./recipes/leftbar/group_row/group_row.vue.js";
|
|
134
134
|
import { default as default87 } from "./recipes/leftbar/unread_pill/unread_pill.vue.js";
|
|
135
135
|
import { UNREAD_PILL_DIRECTIONS, UNREAD_PILL_KINDS } from "./recipes/leftbar/unread_pill/unread_pill_constants.js";
|
|
@@ -292,7 +292,6 @@ export {
|
|
|
292
292
|
LABEL_SIZES,
|
|
293
293
|
LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS,
|
|
294
294
|
LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR,
|
|
295
|
-
LEFTBAR_GENERAL_ROW_ICON_MAPPING,
|
|
296
295
|
LEFTBAR_GENERAL_ROW_ICON_SIZES,
|
|
297
296
|
LEFTBAR_GENERAL_ROW_TYPES,
|
|
298
297
|
LINK_KIND_MODIFIERS,
|
|
@@ -324,8 +323,6 @@ export {
|
|
|
324
323
|
SELECT_SIZE_MODIFIERS,
|
|
325
324
|
SELECT_STATE_MODIFIERS,
|
|
326
325
|
SHORTCUTS_ALIASES_LIST,
|
|
327
|
-
SHORTCUTS_ICON_ALIASES,
|
|
328
|
-
SHORTCUTS_ICON_SEPARATOR,
|
|
329
326
|
SKELETON_HEADING_HEIGHTS,
|
|
330
327
|
SKELETON_RIPPLE_DURATION,
|
|
331
328
|
SKELETON_SHAPES,
|
|
@@ -5,7 +5,6 @@ const general_row_constants = require("../recipes/leftbar/general_row/general_ro
|
|
|
5
5
|
exports.DtRecipeGeneralRow = general_row;
|
|
6
6
|
exports.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS = general_row_constants.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS;
|
|
7
7
|
exports.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR = general_row_constants.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR;
|
|
8
|
-
exports.LEFTBAR_GENERAL_ROW_ICON_MAPPING = general_row_constants.LEFTBAR_GENERAL_ROW_ICON_MAPPING;
|
|
9
8
|
exports.LEFTBAR_GENERAL_ROW_ICON_SIZES = general_row_constants.LEFTBAR_GENERAL_ROW_ICON_SIZES;
|
|
10
9
|
exports.LEFTBAR_GENERAL_ROW_TYPES = general_row_constants.LEFTBAR_GENERAL_ROW_TYPES;
|
|
11
10
|
//# sourceMappingURL=general-row.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"general-row.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"general-row.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { default as default2 } from "../recipes/leftbar/general_row/general_row.vue.js";
|
|
2
|
-
import { LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS, LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR,
|
|
2
|
+
import { LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS, LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR, LEFTBAR_GENERAL_ROW_ICON_SIZES, LEFTBAR_GENERAL_ROW_TYPES } from "../recipes/leftbar/general_row/general_row_constants.js";
|
|
3
3
|
export {
|
|
4
4
|
default2 as DtRecipeGeneralRow,
|
|
5
5
|
LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS,
|
|
6
6
|
LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR,
|
|
7
|
-
LEFTBAR_GENERAL_ROW_ICON_MAPPING,
|
|
8
7
|
LEFTBAR_GENERAL_ROW_ICON_SIZES,
|
|
9
8
|
LEFTBAR_GENERAL_ROW_TYPES
|
|
10
9
|
};
|
|
@@ -4,6 +4,4 @@ const keyboard_shortcut = require("../components/keyboard_shortcut/keyboard_shor
|
|
|
4
4
|
const keyboard_shortcut_constants = require("../components/keyboard_shortcut/keyboard_shortcut_constants.cjs");
|
|
5
5
|
exports.DtKeyboardShortcut = keyboard_shortcut;
|
|
6
6
|
exports.SHORTCUTS_ALIASES_LIST = keyboard_shortcut_constants.SHORTCUTS_ALIASES_LIST;
|
|
7
|
-
exports.SHORTCUTS_ICON_ALIASES = keyboard_shortcut_constants.SHORTCUTS_ICON_ALIASES;
|
|
8
|
-
exports.SHORTCUTS_ICON_SEPARATOR = keyboard_shortcut_constants.SHORTCUTS_ICON_SEPARATOR;
|
|
9
7
|
//# sourceMappingURL=keyboard-shortcut.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-shortcut.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"keyboard-shortcut.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { default as default2 } from "../components/keyboard_shortcut/keyboard_shortcut.vue.js";
|
|
2
|
-
import { SHORTCUTS_ALIASES_LIST
|
|
2
|
+
import { SHORTCUTS_ALIASES_LIST } from "../components/keyboard_shortcut/keyboard_shortcut_constants.js";
|
|
3
3
|
export {
|
|
4
4
|
default2 as DtKeyboardShortcut,
|
|
5
|
-
SHORTCUTS_ALIASES_LIST
|
|
6
|
-
SHORTCUTS_ICON_ALIASES,
|
|
7
|
-
SHORTCUTS_ICON_SEPARATOR
|
|
5
|
+
SHORTCUTS_ALIASES_LIST
|
|
8
6
|
};
|
|
9
7
|
//# sourceMappingURL=keyboard-shortcut.js.map
|
package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
const vue3 = require("@dialpad/dialtone-icons/vue3");
|
|
2
3
|
const common_utils = require("../../../common/utils.cjs");
|
|
3
4
|
const vue = require("vue");
|
|
4
5
|
;/* empty css */
|
|
@@ -6,11 +7,10 @@ const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-he
|
|
|
6
7
|
const callbar_button = require("../callbar_button/callbar_button.vue.cjs");
|
|
7
8
|
const popover = require("../../../components/popover/popover.vue.cjs");
|
|
8
9
|
const button = require("../../../components/button/button.vue.cjs");
|
|
9
|
-
const icon = require("../../../components/icon/icon.vue.cjs");
|
|
10
10
|
const callbar_button_constants = require("../callbar_button/callbar_button_constants.cjs");
|
|
11
11
|
const _sfc_main = {
|
|
12
12
|
name: "DtRecipeCallbarButtonWithPopover",
|
|
13
|
-
components: { DtRecipeCallbarButton: callbar_button, DtPopover: popover, DtButton: button,
|
|
13
|
+
components: { DtRecipeCallbarButton: callbar_button, DtPopover: popover, DtButton: button, DtIconChevronUp: vue3.DtIconChevronUp },
|
|
14
14
|
/* inheritAttrs: false is generally an option we want to set on library
|
|
15
15
|
components. This allows any attributes passed in that are not recognized
|
|
16
16
|
as props to be passed down to another element or component using v-bind:$attrs
|
|
@@ -243,7 +243,7 @@ const _sfc_main = {
|
|
|
243
243
|
const _hoisted_1 = { class: "dt-recipe--callbar-button-with-popover" };
|
|
244
244
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
245
245
|
const _component_dt_recipe_callbar_button = vue.resolveComponent("dt-recipe-callbar-button");
|
|
246
|
-
const
|
|
246
|
+
const _component_dt_icon_chevron_up = vue.resolveComponent("dt-icon-chevron-up");
|
|
247
247
|
const _component_dt_button = vue.resolveComponent("dt-button");
|
|
248
248
|
const _component_dt_popover = vue.resolveComponent("dt-popover");
|
|
249
249
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
@@ -301,8 +301,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
301
301
|
onClick: $options.arrowClick
|
|
302
302
|
}, {
|
|
303
303
|
icon: vue.withCtx(() => [
|
|
304
|
-
vue.createVNode(
|
|
305
|
-
name: "chevron-up",
|
|
304
|
+
vue.createVNode(_component_dt_icon_chevron_up, {
|
|
306
305
|
class: "dt-recipe--callbar-button-with-popover--arrow__icon",
|
|
307
306
|
size: "200"
|
|
308
307
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callbar_button_with_popover.vue.cjs","sources":["../../../../recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-popover\"\n >\n <dt-recipe-callbar-button\n :aria-label=\"ariaLabel\"\n :disabled=\"disabled\"\n :active=\"active\"\n :danger=\"danger\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :text-class=\"textClass\"\n class=\"dt-recipe--callbar-button-with-popover--main-button\"\n @click=\"buttonClick\"\n >\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n <slot />\n </dt-recipe-callbar-button>\n <dt-popover\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :open=\"open\"\n :placement=\"placement\"\n :initial-focus-element=\"initialFocusElement\"\n :show-close-button=\"showCloseButton\"\n :offset=\"offset\"\n padding=\"none\"\n class=\"dt-recipe--callbar-button-with-popover--popover-wrapper\"\n :dialog-class=\"['dt-recipe--callbar-button-with-popover--popover', contentClass]\"\n header-class=\"d-d-flex d-ai-center d-fw-normal d-px12\"\n v-bind=\"$attrs\"\n :open-popover=\"showPopover\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n circle\n importance=\"clear\"\n size=\"lg\"\n :class=\"['dt-recipe--callbar-button-with-popover--arrow',\n { 'dt-recipe--callbar-button-with-popover--arrow--large': !isCompactMode }]\"\n width=\"2rem\"\n :aria-label=\"arrowButtonLabel\"\n :active=\"open\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon\n name=\"chevron-up\"\n class=\"dt-recipe--callbar-button-with-popover--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n <template #headerContent>\n <slot name=\"headerContent\" />\n </template>\n <template #footerContent>\n <slot name=\"footerContent\" />\n </template>\n </dt-popover>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtPopover } from '@/components/popover';\nimport { DtIcon } from '@/components/icon';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithPopover',\n\n components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIcon },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Aria label for the arrow. Cannot be empty.\n */\n arrowButtonLabel: {\n type: String,\n required: true,\n validator: (label) => {\n return !!label;\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * @values 'bottom', 'bottom-start', 'bottom-end',\n * 'right', 'right-start', 'right-end',\n * 'left', 'left-start', 'left-end',\n * 'top', 'top-start', 'top-end'\n * @default 'top'\n */\n placement: {\n type: String,\n default: 'top',\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 16],\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: String,\n default: 'first',\n },\n\n /**\n * Determines visibility for close button\n */\n showCloseButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Forces showing the arrow, even if the button is disabled.\n * default is false\n * @values true, false\n */\n forceShowArrow: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * We need this declaration because of how Vue3 informs the component about a listener.\n * Spoiler alert: it doesn't.\n * Vue3 intends to work as a real pub-sub, meaning the publisher has not a clue of who the subscribers are.\n * This makes it impossible from the regular declaration (emits: ['click']) to check whether\n * we actually have a click handler or not.\n * We're hacking it by adding an onClick prop: https://github.com/vuejs/core/issues/5220\n */\n /* eslint-disable-next-line vue/no-unused-properties */\n onClick: {\n type: Function,\n default: null,\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Additional class name for the popover content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * To auto open the modal popover.\n */\n openPopover: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal popover is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showPopover () {\n if (!this.openPopover || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openPopover;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the popover\n // the same as if the arrow was clicked.\n if (!this.$props.onClick) {\n this.arrowClick(ev);\n } else {\n this.$emit('click', ev);\n }\n },\n\n onModalIsOpened (isOpened) {\n this.open = isOpened;\n this.$emit('opened', isOpened);\n },\n },\n\n};\n</script>\n\n<style lang=\"less\">\n.dt-recipe--callbar-button-with-popover--arrow {\n margin-top: var(--dt-space-350-negative);\n margin-left: calc(var(--dt-space-300-negative) * 5);\n width: var(--dt-size-500);\n height: var(--dt-size-500);\n padding: var(--dt-space-400);\n border-radius: var(--dt-size-300);\n\n &.d-btn--active {\n background: var(--dt-color-surface-moderate-opaque);\n }\n\n &--large {\n margin-left: var(--dt-space-550-negative);\n }\n\n &__icon {\n color: var(--dt-color-black-800);\n }\n}\n\n.dt-recipe--callbar-button-with-popover--popover {\n .d-popover__header {\n background: var(--dt-color-surface-contrast);\n color: var(--dt-color-foreground-primary-inverted);\n\n .d-btn {\n color: var(--dt-color-foreground-primary-inverted);\n }\n }\n}\n\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected::after,\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected:hover::after {\n --tab--bgc: var(--dt-color-surface-contrast);\n}\n.dt-recipe--callbar-button-with-popover--button .tab-group {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.dt-recipe--callbar-button-with-popover--button .tab-content {\n flex: 1 1 100%;\n overflow-y: auto;\n}\n\n.dt-recipe--callbar-button-with-popover {\n display: flex;\n align-items: center;\n}\n</style>\n"],"names":["DtRecipeCallbarButton","DtPopover","DtButton","DtIcon","utils","this","CALLBAR_BUTTON_VALID_WIDTH_SIZE","_openBlock","_createElementBlock","_createVNode","_renderSlot","_createBlock","_mergeProps","_normalizeClass"],"mappings":";;;;;;;;;;AAiFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAA,uBAAEA,gBAAqB,WAAEC,SAAWC,UAAAA,QAAUC,QAAAA,KAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAMlE,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAOC,aAAAA,QAAM;MACd;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,UAAU;AACpB,eAAO,SAASC,SAAK,OAAO;AAAA,MAC7B;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,WAAW,CAAC,UAAU;AACpB,eAAO,CAAC,CAAC;AAAA,MACV;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaD,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS,MAAM,CAAC,GAAG,EAAE;AAAA,IACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,qBAAqB;AAAA,MACnB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,iB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/callbar_button_with_popover.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-popover\"\n >\n <dt-recipe-callbar-button\n :aria-label=\"ariaLabel\"\n :disabled=\"disabled\"\n :active=\"active\"\n :danger=\"danger\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :text-class=\"textClass\"\n class=\"dt-recipe--callbar-button-with-popover--main-button\"\n @click=\"buttonClick\"\n >\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n <slot />\n </dt-recipe-callbar-button>\n <dt-popover\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :open=\"open\"\n :placement=\"placement\"\n :initial-focus-element=\"initialFocusElement\"\n :show-close-button=\"showCloseButton\"\n :offset=\"offset\"\n padding=\"none\"\n class=\"dt-recipe--callbar-button-with-popover--popover-wrapper\"\n :dialog-class=\"['dt-recipe--callbar-button-with-popover--popover', contentClass]\"\n header-class=\"d-d-flex d-ai-center d-fw-normal d-px12\"\n v-bind=\"$attrs\"\n :open-popover=\"showPopover\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n circle\n importance=\"clear\"\n size=\"lg\"\n :class=\"['dt-recipe--callbar-button-with-popover--arrow',\n { 'dt-recipe--callbar-button-with-popover--arrow--large': !isCompactMode }]\"\n width=\"2rem\"\n :aria-label=\"arrowButtonLabel\"\n :active=\"open\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon-chevron-up\n class=\"dt-recipe--callbar-button-with-popover--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n <template #headerContent>\n <slot name=\"headerContent\" />\n </template>\n <template #footerContent>\n <slot name=\"footerContent\" />\n </template>\n </dt-popover>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtPopover } from '@/components/popover';\nimport { DtIconChevronUp } from '@dialpad/dialtone-icons/vue3';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithPopover',\n\n components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIconChevronUp },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Aria label for the arrow. Cannot be empty.\n */\n arrowButtonLabel: {\n type: String,\n required: true,\n validator: (label) => {\n return !!label;\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * @values 'bottom', 'bottom-start', 'bottom-end',\n * 'right', 'right-start', 'right-end',\n * 'left', 'left-start', 'left-end',\n * 'top', 'top-start', 'top-end'\n * @default 'top'\n */\n placement: {\n type: String,\n default: 'top',\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 16],\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: String,\n default: 'first',\n },\n\n /**\n * Determines visibility for close button\n */\n showCloseButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Forces showing the arrow, even if the button is disabled.\n * default is false\n * @values true, false\n */\n forceShowArrow: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * We need this declaration because of how Vue3 informs the component about a listener.\n * Spoiler alert: it doesn't.\n * Vue3 intends to work as a real pub-sub, meaning the publisher has not a clue of who the subscribers are.\n * This makes it impossible from the regular declaration (emits: ['click']) to check whether\n * we actually have a click handler or not.\n * We're hacking it by adding an onClick prop: https://github.com/vuejs/core/issues/5220\n */\n /* eslint-disable-next-line vue/no-unused-properties */\n onClick: {\n type: Function,\n default: null,\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Additional class name for the popover content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * To auto open the modal popover.\n */\n openPopover: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal popover is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showPopover () {\n if (!this.openPopover || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openPopover;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the popover\n // the same as if the arrow was clicked.\n if (!this.$props.onClick) {\n this.arrowClick(ev);\n } else {\n this.$emit('click', ev);\n }\n },\n\n onModalIsOpened (isOpened) {\n this.open = isOpened;\n this.$emit('opened', isOpened);\n },\n },\n\n};\n</script>\n\n<style lang=\"less\">\n.dt-recipe--callbar-button-with-popover--arrow {\n margin-top: var(--dt-space-350-negative);\n margin-left: calc(var(--dt-space-300-negative) * 5);\n width: var(--dt-size-500);\n height: var(--dt-size-500);\n padding: var(--dt-space-400);\n border-radius: var(--dt-size-300);\n\n &.d-btn--active {\n background: var(--dt-color-surface-moderate-opaque);\n }\n\n &--large {\n margin-left: var(--dt-space-550-negative);\n }\n\n &__icon {\n color: var(--dt-color-black-800);\n }\n}\n\n.dt-recipe--callbar-button-with-popover--popover {\n .d-popover__header {\n background: var(--dt-color-surface-contrast);\n color: var(--dt-color-foreground-primary-inverted);\n\n .d-btn {\n color: var(--dt-color-foreground-primary-inverted);\n }\n }\n}\n\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected::after,\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected:hover::after {\n --tab--bgc: var(--dt-color-surface-contrast);\n}\n.dt-recipe--callbar-button-with-popover--button .tab-group {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.dt-recipe--callbar-button-with-popover--button .tab-content {\n flex: 1 1 100%;\n overflow-y: auto;\n}\n\n.dt-recipe--callbar-button-with-popover {\n display: flex;\n align-items: center;\n}\n</style>\n"],"names":["DtRecipeCallbarButton","DtPopover","DtButton","DtIconChevronUp","utils","this","CALLBAR_BUTTON_VALID_WIDTH_SIZE","_openBlock","_createElementBlock","_createVNode","_renderSlot","_createBlock","_mergeProps","_normalizeClass"],"mappings":";;;;;;;;;;AAgFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAA,uBAAEA,gBAAqB,WAAEC,SAAWC,UAAAA,QAAUC,iBAAAA,KAAAA,gBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3E,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAOC,aAAAA,QAAM;MACd;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,UAAU;AACpB,eAAO,SAASC,SAAK,OAAO;AAAA,MAC7B;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,WAAW,CAAC,UAAU;AACpB,eAAO,CAAC,CAAC;AAAA,MACV;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaD,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS,MAAM,CAAC,GAAG,EAAE;AAAA,IACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,qBAAqB;AAAA,MACnB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;A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EzB,MAAQ;AAAA,QAARA,eAAQ,KAAA,QAAA,SAAA;AAAA;;;IAGF,SAAe,mBADvBH,IAAAA,aAAAI,IAAAA,YA8Ca,uBA9CbC,eA8Ca;AAAA;MA5CV,IAAI,OAAE;AAAA,MACN,OAAO;AAAA,MACP,MAAM,MAAI;AAAA,MACV,WAAW,OAAS;AAAA,MACpB,yBAAuB,OAAmB;AAAA,MAC1C,qBAAmB,OAAe;AAAA,MAClC,QAAQ,OAAM;AAAA,MACf,SAAQ;AAAA,MACR,OAAM;AAAA,MACL,oEAAkE,OAAY,YAAA;AAAA,MAC/E,gBAAa;AAAA,OACL,KAAM,QAAA;AAAA,MACb,gBAAc,SAAW;AAAA,MACzB,UAAQ,SAAe;AAAA;MAEb,oBACT,MAiBY;AAAA,QAjBZH,IAAAA,YAiBY,sBAAA;AAAA,UAhBV,QAAA;AAAA,UACA,YAAW;AAAA,UACX,MAAK;AAAA,UACJ,OAAKI,IAAA,eAAA;AAAA,YAAA;AAAA,uEAAkI,SAAa,cAAA;AAAA,UAAA,CAAA;AAAA,UAErJ,OAAM;AAAA,UACL,cAAY,OAAgB;AAAA,UAC5B,QAAQ,MAAI;AAAA,UACZ,SAAO,SAAU;AAAA;UAEP,kBACT,MAGE;AAAA,YAHFJ,IAAAA,YAGE,+BAAA;AAAA,cAFA,OAAM;AAAA,cACN,MAAK;AAAA;;;;;MAKF,qBACT,MAAuB;AAAA,QAAvBC,eAAuB,KAAA,QAAA,SAAA;AAAA;MAEd,2BACT,MAA6B;AAAA,QAA7BA,eAA6B,KAAA,QAAA,eAAA;AAAA;MAEpB,2BACT,MAA6B;AAAA,QAA7BA,eAA6B,KAAA,QAAA,eAAA;AAAA;;;;;;;"}
|
package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DtIconChevronUp } from "@dialpad/dialtone-icons/vue3";
|
|
1
2
|
import utils from "../../../common/utils.js";
|
|
2
3
|
import { resolveComponent, openBlock, createElementBlock, createVNode, withCtx, renderSlot, createBlock, mergeProps, normalizeClass, createCommentVNode } from "vue";
|
|
3
4
|
/* empty css */
|
|
@@ -5,11 +6,10 @@ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
5
6
|
import DtRecipeCallbarButton from "../callbar_button/callbar_button.vue.js";
|
|
6
7
|
import DtPopover from "../../../components/popover/popover.vue.js";
|
|
7
8
|
import DtButton from "../../../components/button/button.vue.js";
|
|
8
|
-
import DtIcon from "../../../components/icon/icon.vue.js";
|
|
9
9
|
import { CALLBAR_BUTTON_VALID_WIDTH_SIZE } from "../callbar_button/callbar_button_constants.js";
|
|
10
10
|
const _sfc_main = {
|
|
11
11
|
name: "DtRecipeCallbarButtonWithPopover",
|
|
12
|
-
components: { DtRecipeCallbarButton, DtPopover, DtButton,
|
|
12
|
+
components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIconChevronUp },
|
|
13
13
|
/* inheritAttrs: false is generally an option we want to set on library
|
|
14
14
|
components. This allows any attributes passed in that are not recognized
|
|
15
15
|
as props to be passed down to another element or component using v-bind:$attrs
|
|
@@ -242,7 +242,7 @@ const _sfc_main = {
|
|
|
242
242
|
const _hoisted_1 = { class: "dt-recipe--callbar-button-with-popover" };
|
|
243
243
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
244
244
|
const _component_dt_recipe_callbar_button = resolveComponent("dt-recipe-callbar-button");
|
|
245
|
-
const
|
|
245
|
+
const _component_dt_icon_chevron_up = resolveComponent("dt-icon-chevron-up");
|
|
246
246
|
const _component_dt_button = resolveComponent("dt-button");
|
|
247
247
|
const _component_dt_popover = resolveComponent("dt-popover");
|
|
248
248
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
@@ -300,8 +300,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
300
300
|
onClick: $options.arrowClick
|
|
301
301
|
}, {
|
|
302
302
|
icon: withCtx(() => [
|
|
303
|
-
createVNode(
|
|
304
|
-
name: "chevron-up",
|
|
303
|
+
createVNode(_component_dt_icon_chevron_up, {
|
|
305
304
|
class: "dt-recipe--callbar-button-with-popover--arrow__icon",
|
|
306
305
|
size: "200"
|
|
307
306
|
})
|
package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callbar_button_with_popover.vue.js","sources":["../../../../recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-popover\"\n >\n <dt-recipe-callbar-button\n :aria-label=\"ariaLabel\"\n :disabled=\"disabled\"\n :active=\"active\"\n :danger=\"danger\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :text-class=\"textClass\"\n class=\"dt-recipe--callbar-button-with-popover--main-button\"\n @click=\"buttonClick\"\n >\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n <slot />\n </dt-recipe-callbar-button>\n <dt-popover\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :open=\"open\"\n :placement=\"placement\"\n :initial-focus-element=\"initialFocusElement\"\n :show-close-button=\"showCloseButton\"\n :offset=\"offset\"\n padding=\"none\"\n class=\"dt-recipe--callbar-button-with-popover--popover-wrapper\"\n :dialog-class=\"['dt-recipe--callbar-button-with-popover--popover', contentClass]\"\n header-class=\"d-d-flex d-ai-center d-fw-normal d-px12\"\n v-bind=\"$attrs\"\n :open-popover=\"showPopover\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n circle\n importance=\"clear\"\n size=\"lg\"\n :class=\"['dt-recipe--callbar-button-with-popover--arrow',\n { 'dt-recipe--callbar-button-with-popover--arrow--large': !isCompactMode }]\"\n width=\"2rem\"\n :aria-label=\"arrowButtonLabel\"\n :active=\"open\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon\n name=\"chevron-up\"\n class=\"dt-recipe--callbar-button-with-popover--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n <template #headerContent>\n <slot name=\"headerContent\" />\n </template>\n <template #footerContent>\n <slot name=\"footerContent\" />\n </template>\n </dt-popover>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtPopover } from '@/components/popover';\nimport { DtIcon } from '@/components/icon';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithPopover',\n\n components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIcon },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Aria label for the arrow. Cannot be empty.\n */\n arrowButtonLabel: {\n type: String,\n required: true,\n validator: (label) => {\n return !!label;\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * @values 'bottom', 'bottom-start', 'bottom-end',\n * 'right', 'right-start', 'right-end',\n * 'left', 'left-start', 'left-end',\n * 'top', 'top-start', 'top-end'\n * @default 'top'\n */\n placement: {\n type: String,\n default: 'top',\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 16],\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: String,\n default: 'first',\n },\n\n /**\n * Determines visibility for close button\n */\n showCloseButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Forces showing the arrow, even if the button is disabled.\n * default is false\n * @values true, false\n */\n forceShowArrow: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * We need this declaration because of how Vue3 informs the component about a listener.\n * Spoiler alert: it doesn't.\n * Vue3 intends to work as a real pub-sub, meaning the publisher has not a clue of who the subscribers are.\n * This makes it impossible from the regular declaration (emits: ['click']) to check whether\n * we actually have a click handler or not.\n * We're hacking it by adding an onClick prop: https://github.com/vuejs/core/issues/5220\n */\n /* eslint-disable-next-line vue/no-unused-properties */\n onClick: {\n type: Function,\n default: null,\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Additional class name for the popover content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * To auto open the modal popover.\n */\n openPopover: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal popover is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showPopover () {\n if (!this.openPopover || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openPopover;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the popover\n // the same as if the arrow was clicked.\n if (!this.$props.onClick) {\n this.arrowClick(ev);\n } else {\n this.$emit('click', ev);\n }\n },\n\n onModalIsOpened (isOpened) {\n this.open = isOpened;\n this.$emit('opened', isOpened);\n },\n },\n\n};\n</script>\n\n<style lang=\"less\">\n.dt-recipe--callbar-button-with-popover--arrow {\n margin-top: var(--dt-space-350-negative);\n margin-left: calc(var(--dt-space-300-negative) * 5);\n width: var(--dt-size-500);\n height: var(--dt-size-500);\n padding: var(--dt-space-400);\n border-radius: var(--dt-size-300);\n\n &.d-btn--active {\n background: var(--dt-color-surface-moderate-opaque);\n }\n\n &--large {\n margin-left: var(--dt-space-550-negative);\n }\n\n &__icon {\n color: var(--dt-color-black-800);\n }\n}\n\n.dt-recipe--callbar-button-with-popover--popover {\n .d-popover__header {\n background: var(--dt-color-surface-contrast);\n color: var(--dt-color-foreground-primary-inverted);\n\n .d-btn {\n color: var(--dt-color-foreground-primary-inverted);\n }\n }\n}\n\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected::after,\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected:hover::after {\n --tab--bgc: var(--dt-color-surface-contrast);\n}\n.dt-recipe--callbar-button-with-popover--button .tab-group {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.dt-recipe--callbar-button-with-popover--button .tab-content {\n flex: 1 1 100%;\n overflow-y: auto;\n}\n\n.dt-recipe--callbar-button-with-popover {\n display: flex;\n align-items: center;\n}\n</style>\n"],"names":["this","_openBlock","_createElementBlock","_createVNode","_renderSlot","_createBlock","_mergeProps","_normalizeClass"],"mappings":";;;;;;;;;AAiFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAE,uBAAuB,WAAW,UAAU,OAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAMlE,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAO,MAAM;MACd;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,UAAU;AACpB,eAAO,SAASA,SAAK,OAAO;AAAA,MAC7B;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,WAAW,CAAC,UAAU;AACpB,eAAO,CAAC,CAAC;AAAA,MACV;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaD,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS,MAAM,CAAC,GAAG,EAAE;AAAA,IACtB;AAAA;AAAA;AAAA;AAAA;AAAA;A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version":3,"file":"callbar_button_with_popover.vue.js","sources":["../../../../recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-popover\"\n >\n <dt-recipe-callbar-button\n :aria-label=\"ariaLabel\"\n :disabled=\"disabled\"\n :active=\"active\"\n :danger=\"danger\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :text-class=\"textClass\"\n class=\"dt-recipe--callbar-button-with-popover--main-button\"\n @click=\"buttonClick\"\n >\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n <slot />\n </dt-recipe-callbar-button>\n <dt-popover\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :open=\"open\"\n :placement=\"placement\"\n :initial-focus-element=\"initialFocusElement\"\n :show-close-button=\"showCloseButton\"\n :offset=\"offset\"\n padding=\"none\"\n class=\"dt-recipe--callbar-button-with-popover--popover-wrapper\"\n :dialog-class=\"['dt-recipe--callbar-button-with-popover--popover', contentClass]\"\n header-class=\"d-d-flex d-ai-center d-fw-normal d-px12\"\n v-bind=\"$attrs\"\n :open-popover=\"showPopover\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n circle\n importance=\"clear\"\n size=\"lg\"\n :class=\"['dt-recipe--callbar-button-with-popover--arrow',\n { 'dt-recipe--callbar-button-with-popover--arrow--large': !isCompactMode }]\"\n width=\"2rem\"\n :aria-label=\"arrowButtonLabel\"\n :active=\"open\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon-chevron-up\n class=\"dt-recipe--callbar-button-with-popover--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n <template #headerContent>\n <slot name=\"headerContent\" />\n </template>\n <template #footerContent>\n <slot name=\"footerContent\" />\n </template>\n </dt-popover>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtPopover } from '@/components/popover';\nimport { DtIconChevronUp } from '@dialpad/dialtone-icons/vue3';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithPopover',\n\n components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIconChevronUp },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Aria label for the arrow. Cannot be empty.\n */\n arrowButtonLabel: {\n type: String,\n required: true,\n validator: (label) => {\n return !!label;\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * @values 'bottom', 'bottom-start', 'bottom-end',\n * 'right', 'right-start', 'right-end',\n * 'left', 'left-start', 'left-end',\n * 'top', 'top-start', 'top-end'\n * @default 'top'\n */\n placement: {\n type: String,\n default: 'top',\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 16],\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: String,\n default: 'first',\n },\n\n /**\n * Determines visibility for close button\n */\n showCloseButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Forces showing the arrow, even if the button is disabled.\n * default is false\n * @values true, false\n */\n forceShowArrow: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * We need this declaration because of how Vue3 informs the component about a listener.\n * Spoiler alert: it doesn't.\n * Vue3 intends to work as a real pub-sub, meaning the publisher has not a clue of who the subscribers are.\n * This makes it impossible from the regular declaration (emits: ['click']) to check whether\n * we actually have a click handler or not.\n * We're hacking it by adding an onClick prop: https://github.com/vuejs/core/issues/5220\n */\n /* eslint-disable-next-line vue/no-unused-properties */\n onClick: {\n type: Function,\n default: null,\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Additional class name for the popover content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * To auto open the modal popover.\n */\n openPopover: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal popover is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showPopover () {\n if (!this.openPopover || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openPopover;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the popover\n // the same as if the arrow was clicked.\n if (!this.$props.onClick) {\n this.arrowClick(ev);\n } else {\n this.$emit('click', ev);\n }\n },\n\n onModalIsOpened (isOpened) {\n this.open = isOpened;\n this.$emit('opened', isOpened);\n },\n },\n\n};\n</script>\n\n<style lang=\"less\">\n.dt-recipe--callbar-button-with-popover--arrow {\n margin-top: var(--dt-space-350-negative);\n margin-left: calc(var(--dt-space-300-negative) * 5);\n width: var(--dt-size-500);\n height: var(--dt-size-500);\n padding: var(--dt-space-400);\n border-radius: var(--dt-size-300);\n\n &.d-btn--active {\n background: var(--dt-color-surface-moderate-opaque);\n }\n\n &--large {\n margin-left: var(--dt-space-550-negative);\n }\n\n &__icon {\n color: var(--dt-color-black-800);\n }\n}\n\n.dt-recipe--callbar-button-with-popover--popover {\n .d-popover__header {\n background: var(--dt-color-surface-contrast);\n color: var(--dt-color-foreground-primary-inverted);\n\n .d-btn {\n color: var(--dt-color-foreground-primary-inverted);\n }\n }\n}\n\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected::after,\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected:hover::after {\n --tab--bgc: var(--dt-color-surface-contrast);\n}\n.dt-recipe--callbar-button-with-popover--button .tab-group {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.dt-recipe--callbar-button-with-popover--button .tab-content {\n flex: 1 1 100%;\n overflow-y: auto;\n}\n\n.dt-recipe--callbar-button-with-popover {\n display: flex;\n align-items: center;\n}\n</style>\n"],"names":["this","_openBlock","_createElementBlock","_createVNode","_renderSlot","_createBlock","_mergeProps","_normalizeClass"],"mappings":";;;;;;;;;AAgFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAE,uBAAuB,WAAW,UAAU,gBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3E,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAO,MAAM;MACd;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,UAAU;AACpB,eAAO,SAASA,SAAK,OAAO;AAAA,MAC7B;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,WAAW,CAAC,UAAU;AACpB,eAAO,CAAC,CAAC;AAAA,MACV;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaD,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS,MAAM,CAAC,GAAG,EAAE;AAAA,IACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,qBAAqB;AAAA,MACnB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;A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,aAAAI,YA8Ca,uBA9CbC,WA8Ca;AAAA;MA5CV,IAAI,OAAE;AAAA,MACN,OAAO;AAAA,MACP,MAAM,MAAI;AAAA,MACV,WAAW,OAAS;AAAA,MACpB,yBAAuB,OAAmB;AAAA,MAC1C,qBAAmB,OAAe;AAAA,MAClC,QAAQ,OAAM;AAAA,MACf,SAAQ;AAAA,MACR,OAAM;AAAA,MACL,oEAAkE,OAAY,YAAA;AAAA,MAC/E,gBAAa;AAAA,OACL,KAAM,QAAA;AAAA,MACb,gBAAc,SAAW;AAAA,MACzB,UAAQ,SAAe;AAAA;MAEb,gBACT,MAiBY;AAAA,QAjBZH,YAiBY,sBAAA;AAAA,UAhBV,QAAA;AAAA,UACA,YAAW;AAAA,UACX,MAAK;AAAA,UACJ,OAAKI,eAAA;AAAA,YAAA;AAAA,uEAAkI,SAAa,cAAA;AAAA,UAAA,CAAA;AAAA,UAErJ,OAAM;AAAA,UACL,cAAY,OAAgB;AAAA,UAC5B,QAAQ,MAAI;AAAA,UACZ,SAAO,SAAU;AAAA;UAEP,cACT,MAGE;AAAA,YAHFJ,YAGE,+BAAA;AAAA,cAFA,OAAM;AAAA,cACN,MAAK;AAAA;;;;;MAKF,iBACT,MAAuB;AAAA,QAAvBC,WAAuB,KAAA,QAAA,SAAA;AAAA;MAEd,uBACT,MAA6B;AAAA,QAA7BA,WAA6B,KAAA,QAAA,eAAA;AAAA;MAEpB,uBACT,MAA6B;AAAA,QAA7BA,WAA6B,KAAA,QAAA,eAAA;AAAA;;;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
const vue3 = require("@dialpad/dialtone-icons/vue3");
|
|
2
3
|
const ivr_node_constants = require("./ivr_node_constants.cjs");
|
|
3
4
|
const vue = require("vue");
|
|
4
5
|
;/* empty css */
|
|
@@ -6,14 +7,33 @@ const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-he
|
|
|
6
7
|
const card = require("../../../components/card/card.vue.cjs");
|
|
7
8
|
const button = require("../../../components/button/button.vue.cjs");
|
|
8
9
|
const dropdown = require("../../../components/dropdown/dropdown.vue.cjs");
|
|
9
|
-
const
|
|
10
|
+
const typeToIcon = /* @__PURE__ */ new Map([
|
|
11
|
+
[ivr_node_constants.IVR_NODE_PROMPT_MENU, vue3.DtIconKeypad],
|
|
12
|
+
[ivr_node_constants.IVR_NODE_PROMPT_COLLECT, vue3.DtIconDialer],
|
|
13
|
+
[ivr_node_constants.IVR_NODE_PROMPT_PLAY, vue3.DtIconVolume2],
|
|
14
|
+
[ivr_node_constants.IVR_NODE_EXPERT, vue3.DtIconExpertNode],
|
|
15
|
+
[ivr_node_constants.IVR_NODE_BRANCH, vue3.DtIconBranch],
|
|
16
|
+
[ivr_node_constants.IVR_NODE_GO_TO, vue3.DtIconCallMerge],
|
|
17
|
+
[ivr_node_constants.IVR_NODE_ASSIGN, vue3.DtIconChevronsRight],
|
|
18
|
+
[ivr_node_constants.IVR_NODE_TRANSFER, vue3.DtIconTransfer],
|
|
19
|
+
[ivr_node_constants.IVR_NODE_HANGUP, vue3.DtIconPhoneHangUp]
|
|
20
|
+
]);
|
|
10
21
|
const _sfc_main = {
|
|
11
22
|
name: "DtRecipeIvrNode",
|
|
12
23
|
components: {
|
|
13
24
|
DtCard: card,
|
|
14
25
|
DtButton: button,
|
|
15
26
|
DtDropdown: dropdown,
|
|
16
|
-
|
|
27
|
+
DtIconKeypad: vue3.DtIconKeypad,
|
|
28
|
+
DtIconDialer: vue3.DtIconDialer,
|
|
29
|
+
DtIconVolume2: vue3.DtIconVolume2,
|
|
30
|
+
DtIconExpertNode: vue3.DtIconExpertNode,
|
|
31
|
+
DtIconBranch: vue3.DtIconBranch,
|
|
32
|
+
DtIconCallMerge: vue3.DtIconCallMerge,
|
|
33
|
+
DtIconChevronsRight: vue3.DtIconChevronsRight,
|
|
34
|
+
DtIconTransfer: vue3.DtIconTransfer,
|
|
35
|
+
DtIconPhoneHangUp: vue3.DtIconPhoneHangUp,
|
|
36
|
+
DtIconMoreVertical: vue3.DtIconMoreVertical
|
|
17
37
|
},
|
|
18
38
|
props: {
|
|
19
39
|
/**
|
|
@@ -73,7 +93,7 @@ const _sfc_main = {
|
|
|
73
93
|
};
|
|
74
94
|
},
|
|
75
95
|
nodeIcon() {
|
|
76
|
-
return
|
|
96
|
+
return typeToIcon.get(this.nodeType);
|
|
77
97
|
},
|
|
78
98
|
headerColor() {
|
|
79
99
|
const { normal, selected } = ivr_node_constants.IVR_NODE_COLOR_MAPPING[this.nodeType];
|
|
@@ -96,8 +116,8 @@ const _hoisted_2 = {
|
|
|
96
116
|
};
|
|
97
117
|
const _hoisted_3 = { class: "ivr_node__dropdown-list" };
|
|
98
118
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
99
|
-
const _component_dt_icon = vue.resolveComponent("dt-icon");
|
|
100
119
|
const _component_dt_button = vue.resolveComponent("dt-button");
|
|
120
|
+
const _component_dt_icon_more_vertical = vue.resolveComponent("dt-icon-more-vertical");
|
|
101
121
|
const _component_dt_dropdown = vue.resolveComponent("dt-dropdown");
|
|
102
122
|
const _component_dt_card = vue.resolveComponent("dt-card");
|
|
103
123
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: "ivr_node" }, vue.toHandlers($options.nodeListeners, true)), [
|
|
@@ -137,11 +157,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
137
157
|
"data-qa": "dt-ivr-node-icon"
|
|
138
158
|
}, {
|
|
139
159
|
icon: vue.withCtx(() => [
|
|
140
|
-
vue.
|
|
141
|
-
name: $options.nodeIcon,
|
|
160
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($options.nodeIcon), {
|
|
142
161
|
size: "200",
|
|
143
162
|
class: vue.normalizeClass(["", { "ivr_node__goto_icon": $options.isGotoNode }])
|
|
144
|
-
}, null, 8, ["
|
|
163
|
+
}, null, 8, ["class"]))
|
|
145
164
|
]),
|
|
146
165
|
_: 1
|
|
147
166
|
}, 8, ["aria-label"]),
|
|
@@ -160,10 +179,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
160
179
|
onClick: vue.withModifiers($options.openMenu, ["stop", "prevent"])
|
|
161
180
|
}, {
|
|
162
181
|
icon: vue.withCtx(() => [
|
|
163
|
-
vue.createVNode(
|
|
164
|
-
name: "more-vertical",
|
|
165
|
-
size: "200"
|
|
166
|
-
})
|
|
182
|
+
vue.createVNode(_component_dt_icon_more_vertical, { size: "200" })
|
|
167
183
|
]),
|
|
168
184
|
_: 1
|
|
169
185
|
}, 8, ["aria-label", "onClick"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ivr_node.vue.cjs","sources":["../../../../recipes/cards/ivr_node/ivr_node.vue"],"sourcesContent":["<template>\n <div\n class=\"ivr_node\"\n v-on=\"nodeListeners\"\n >\n <div\n v-if=\"dtmfKey\"\n data-qa=\"dt-top-connector-dtmf\"\n class=\"ivr-connector ivr-connector--dtmf\"\n :class=\"{ 'ivr-connector--dtmf--selected': isSelected }\"\n >\n {{ dtmfKey }}\n </div>\n <slot\n v-if=\"$slots.connector\"\n name=\"connector\"\n />\n <div\n v-if=\"!dtmfKey && !$slots.connector\"\n data-qa=\"dt-top-connector\"\n class=\"ivr-connector\"\n :class=\"{ 'ivr-connector--selected': isSelected }\"\n />\n <dt-card\n content-class=\"d-bt d-bc-black-300 d-px12 d-pt8 d-pb12\"\n :container-class=\"[\n 'd-w100p',\n { 'd-ba d-bar8 d-baw4': isSelected },\n headerColor,\n ]\"\n :header-class=\"[\n 'd-mtn1',\n 'd-bt',\n 'd-btw4',\n 'd-p0',\n headerColor,\n { 'd-btr4': !isSelected },\n ]\"\n >\n <template #header>\n <!-- node label and icon section on left of the header -->\n <div class=\"ivr_node__header-left\">\n <dt-button\n :aria-label=\"nodeType\"\n importance=\"clear\"\n kind=\"muted\"\n data-qa=\"dt-ivr-node-icon\"\n >\n <template #icon>\n <dt-icon\n :name=\"nodeIcon\"\n size=\"200\"\n :class=\"['', { 'ivr_node__goto_icon': isGotoNode }]\"\n />\n </template>\n </dt-button>\n <p\n class=\"ivr_node__label\"\n data-qa=\"ivr-node-label\"\n >\n {{ nodeLabel }}\n </p>\n </div>\n <!-- node menu for actions like edit, copy, delete -->\n <dt-dropdown\n v-model:open=\"isOpen\"\n placement=\"bottom\"\n >\n <template #anchor>\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-label=\"menuButtonAriaLabel\"\n @click.stop.prevent=\"openMenu\"\n >\n <template #icon>\n <dt-icon\n name=\"more-vertical\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #list=\"{ close }\">\n <div class=\"ivr_node__dropdown-list\">\n <slot\n name=\"menuItems\"\n :close=\"close\"\n />\n </div>\n </template>\n </dt-dropdown>\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n </dt-card>\n </div>\n</template>\n\n<script>\nimport { DtCard } from '@/components/card';\nimport { DtButton } from '@/components/button';\nimport { DtDropdown } from '@/components/dropdown';\nimport { DtIcon } from '@/components/icon';\nimport {\n IVR_NODE_ICON_TYPES, IVR_NODE_COLOR_MAPPING, IVR_NODE_GO_TO,\n} from './ivr_node_constants';\n\nexport default {\n name: 'DtRecipeIvrNode',\n\n components: {\n DtCard,\n DtButton,\n DtDropdown,\n DtIcon,\n },\n\n props: {\n\n /**\n * type of IVR Node.\n */\n nodeType: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the node name.\n */\n\n nodeLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Selected state of the node\n */\n isSelected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Translated aria-label for header menu button\n */\n menuButtonAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * DTMF input\n */\n dtmfKey: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Add node click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n data () {\n return {\n isOpen: false,\n };\n },\n\n computed: {\n nodeListeners () {\n return {\n click: (e) => this.$emit('click', e),\n };\n },\n\n nodeIcon () {\n return IVR_NODE_ICON_TYPES[this.nodeType];\n },\n\n headerColor () {\n const { normal, selected } = IVR_NODE_COLOR_MAPPING[this.nodeType];\n return this.isSelected ? selected : normal;\n },\n\n isGotoNode () {\n return this.nodeType === IVR_NODE_GO_TO;\n },\n },\n\n methods: {\n openMenu () {\n this.isOpen = true;\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.ivr_node {\n width: 280px;\n display: flex;\n flex-direction: column;\n align-items: center;\n cursor: pointer;\n\n &__header-left {\n display: flex;\n align-items: center;\n }\n\n &__label {\n font-size: var(--dt-font-size-200);\n font-weight: var(--dt-font-weight-bold);\n }\n\n &__dropdown-list {\n width: var(--dt-size-825);\n }\n}\n\n.ivr_node__goto_icon {\n transform: rotate(90deg);\n}\n\n.ivr-connector {\n z-index: var(--zi-base);\n display: flex;\n justify-content: center;\n align-items: center;\n border-color: var(--dt-color-purple-600);\n background-color: var(--dt-color-purple-600);\n width: var(--dt-size-400);\n height: var(--dt-size-400);\n border-radius: var(--dt-size-radius-circle);\n margin-bottom: var(--dt-space-300-negative);\n\n &--selected {\n margin-bottom: var(--dt-space-400-negative);\n }\n\n &.ivr-connector--dtmf {\n width: var(--dt-size-550);\n height: var(--dt-size-550);\n margin-bottom: var(--dt-space-450-negative);\n color: var(--dt-color-neutral-white);\n font-size: var(--dt-font-size-200);\n\n &--selected {\n margin-bottom: var(--dt-space-500-negative);\n }\n }\n}\n</style>\n"],"names":["DtCard","DtButton","DtDropdown","DtIcon","IVR_NODE_ICON_TYPES","IVR_NODE_COLOR_MAPPING","IVR_NODE_GO_TO","_createElementBlock","_mergeProps","_toHandlers","_normalizeClass","_renderSlot","_createVNode","_createElementVNode","_toDisplayString","_withCtx"],"mappings":";;;;;;;;;AA6GA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,QAA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Y;AAAA,YAZZA,IAAAA,YAYY,sBAAA;AAAA,cAXV,YAAW;AAAA,cACX,MAAK;AAAA,cACJ,cAAY,OAAmB;AAAA,cAC/B,2BAAoB,SAAQ,UAAA,CAAA,QAAA,SAAA,CAAA;AAAA;cAElB,kBACT,MAGE;AAAA,gBAHFA,IAAAA,YAGE,oBAAA;AAAA,kBAFA,MAAK;AAAA,kBACL,MAAK;AAAA;;;;;UAKF,MAAIG,IAAA,QACb,CAKM,EANW,YAAK;AAAA,YACtBF,IAAA,mBAKM,OALN,YAKM;AAAA,cAJJF,IAGE,WAAA,KAAA,QAAA,aAAA,EADC,OAAY;AAAA;;;;;MAMZ,qBACT,MAAuB;AAAA,QAAvBA,eAAuB,KAAA,QAAA,SAAA;AAAA;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ivr_node.vue.cjs","sources":["../../../../recipes/cards/ivr_node/ivr_node.vue"],"sourcesContent":["<template>\n <div\n class=\"ivr_node\"\n v-on=\"nodeListeners\"\n >\n <div\n v-if=\"dtmfKey\"\n data-qa=\"dt-top-connector-dtmf\"\n class=\"ivr-connector ivr-connector--dtmf\"\n :class=\"{ 'ivr-connector--dtmf--selected': isSelected }\"\n >\n {{ dtmfKey }}\n </div>\n <slot\n v-if=\"$slots.connector\"\n name=\"connector\"\n />\n <div\n v-if=\"!dtmfKey && !$slots.connector\"\n data-qa=\"dt-top-connector\"\n class=\"ivr-connector\"\n :class=\"{ 'ivr-connector--selected': isSelected }\"\n />\n <dt-card\n content-class=\"d-bt d-bc-black-300 d-px12 d-pt8 d-pb12\"\n :container-class=\"[\n 'd-w100p',\n { 'd-ba d-bar8 d-baw4': isSelected },\n headerColor,\n ]\"\n :header-class=\"[\n 'd-mtn1',\n 'd-bt',\n 'd-btw4',\n 'd-p0',\n headerColor,\n { 'd-btr4': !isSelected },\n ]\"\n >\n <template #header>\n <!-- node label and icon section on left of the header -->\n <div class=\"ivr_node__header-left\">\n <dt-button\n :aria-label=\"nodeType\"\n importance=\"clear\"\n kind=\"muted\"\n data-qa=\"dt-ivr-node-icon\"\n >\n <template #icon>\n <component\n :is=\"nodeIcon\"\n size=\"200\"\n :class=\"['', { 'ivr_node__goto_icon': isGotoNode }]\"\n />\n </template>\n </dt-button>\n <p\n class=\"ivr_node__label\"\n data-qa=\"ivr-node-label\"\n >\n {{ nodeLabel }}\n </p>\n </div>\n <!-- node menu for actions like edit, copy, delete -->\n <dt-dropdown\n v-model:open=\"isOpen\"\n placement=\"bottom\"\n >\n <template #anchor>\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-label=\"menuButtonAriaLabel\"\n @click.stop.prevent=\"openMenu\"\n >\n <template #icon>\n <dt-icon-more-vertical size=\"200\" />\n </template>\n </dt-button>\n </template>\n <template #list=\"{ close }\">\n <div class=\"ivr_node__dropdown-list\">\n <slot\n name=\"menuItems\"\n :close=\"close\"\n />\n </div>\n </template>\n </dt-dropdown>\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n </dt-card>\n </div>\n</template>\n\n<script>\nimport { DtCard } from '@/components/card';\nimport { DtButton } from '@/components/button';\nimport { DtDropdown } from '@/components/dropdown';\nimport {\n DtIconKeypad,\n DtIconDialer,\n DtIconVolume2,\n DtIconExpertNode,\n DtIconBranch,\n DtIconCallMerge,\n DtIconChevronsRight,\n DtIconTransfer,\n DtIconPhoneHangUp,\n DtIconMoreVertical,\n} from '@dialpad/dialtone-icons/vue3';\nimport {\n IVR_NODE_COLOR_MAPPING,\n IVR_NODE_PROMPT_MENU,\n IVR_NODE_PROMPT_COLLECT,\n IVR_NODE_PROMPT_PLAY,\n IVR_NODE_EXPERT,\n IVR_NODE_BRANCH,\n IVR_NODE_GO_TO,\n IVR_NODE_ASSIGN,\n IVR_NODE_TRANSFER,\n IVR_NODE_HANGUP,\n} from './ivr_node_constants';\n\nconst typeToIcon = new Map([\n [IVR_NODE_PROMPT_MENU, DtIconKeypad],\n [IVR_NODE_PROMPT_COLLECT, DtIconDialer],\n [IVR_NODE_PROMPT_PLAY, DtIconVolume2],\n [IVR_NODE_EXPERT, DtIconExpertNode],\n [IVR_NODE_BRANCH, DtIconBranch],\n [IVR_NODE_GO_TO, DtIconCallMerge],\n [IVR_NODE_ASSIGN, DtIconChevronsRight],\n [IVR_NODE_TRANSFER, DtIconTransfer],\n [IVR_NODE_HANGUP, DtIconPhoneHangUp],\n]);\n\nexport default {\n name: 'DtRecipeIvrNode',\n\n components: {\n DtCard,\n DtButton,\n DtDropdown,\n DtIconKeypad,\n DtIconDialer,\n DtIconVolume2,\n DtIconExpertNode,\n DtIconBranch,\n DtIconCallMerge,\n DtIconChevronsRight,\n DtIconTransfer,\n DtIconPhoneHangUp,\n DtIconMoreVertical,\n },\n\n props: {\n\n /**\n * type of IVR Node.\n */\n nodeType: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the node name.\n */\n\n nodeLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Selected state of the node\n */\n isSelected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Translated aria-label for header menu button\n */\n menuButtonAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * DTMF input\n */\n dtmfKey: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Add node click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n data () {\n return {\n isOpen: false,\n };\n },\n\n computed: {\n nodeListeners () {\n return {\n click: (e) => this.$emit('click', e),\n };\n },\n\n nodeIcon () {\n return typeToIcon.get(this.nodeType);\n },\n\n headerColor () {\n const { normal, selected } = IVR_NODE_COLOR_MAPPING[this.nodeType];\n return this.isSelected ? selected : normal;\n },\n\n isGotoNode () {\n return this.nodeType === IVR_NODE_GO_TO;\n },\n },\n\n methods: {\n openMenu () {\n this.isOpen = true;\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.ivr_node {\n width: 280px;\n display: flex;\n flex-direction: column;\n align-items: center;\n cursor: pointer;\n\n &__header-left {\n display: flex;\n align-items: center;\n }\n\n &__label {\n font-size: var(--dt-font-size-200);\n font-weight: var(--dt-font-weight-bold);\n }\n\n &__dropdown-list {\n width: var(--dt-size-825);\n }\n}\n\n.ivr_node__goto_icon {\n transform: rotate(90deg);\n}\n\n.ivr-connector {\n z-index: var(--zi-base);\n display: flex;\n justify-content: center;\n align-items: center;\n border-color: var(--dt-color-purple-600);\n background-color: var(--dt-color-purple-600);\n width: var(--dt-size-400);\n height: var(--dt-size-400);\n border-radius: var(--dt-size-radius-circle);\n margin-bottom: var(--dt-space-300-negative);\n\n &--selected {\n margin-bottom: var(--dt-space-400-negative);\n }\n\n &.ivr-connector--dtmf {\n width: var(--dt-size-550);\n height: var(--dt-size-550);\n margin-bottom: var(--dt-space-450-negative);\n color: var(--dt-color-neutral-white);\n font-size: var(--dt-font-size-200);\n\n &--selected {\n margin-bottom: var(--dt-space-500-negative);\n }\n }\n}\n</style>\n"],"names":["IVR_NODE_PROMPT_MENU","DtIconKeypad","IVR_NODE_PROMPT_COLLECT","DtIconDialer","IVR_NODE_PROMPT_PLAY","DtIconVolume2","IVR_NODE_EXPERT","DtIconExpertNode","IVR_NODE_BRANCH","DtIconBranch","IVR_NODE_GO_TO","DtIconCallMerge","IVR_NODE_ASSIGN","DtIconChevronsRight","IVR_NODE_TRANSFER","DtIconTransfer","IVR_NODE_HANGUP","DtIconPhoneHangUp","DtCard","DtButton","DtDropdown","DtIconMoreVertical","IVR_NODE_COLOR_MAPPING","_createElementBlock","_mergeProps","_toHandlers","_normalizeClass","_renderSlot","_createVNode","_createElementVNode","_openBlock","_createBlock","_resolveDynamicComponent","_toDisplayString","_withCtx"],"mappings":";;;;;;;;;AA8HA,MAAM,aAAa,oBAAI,IAAI;AAAA,EACzB,CAACA,mBAAAA,sBAAsBC,KAAAA,YAAY;AAAA,EACnC,CAACC,mBAAAA,yBAAyBC,KAAAA,YAAY;AAAA,EACtC,CAACC,mBAAAA,sBAAsBC,KAAAA,aAAa;AAAA,EACpC,CAACC,mBAAAA,iBAAiBC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