@dialpad/dialtone 9.86.1 → 9.87.0
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/README.md +0 -16
- package/dist/css/dialtone-default-theme.css +1133 -4
- package/dist/css/dialtone-default-theme.min.css +1 -1
- package/dist/css/dialtone.css +1133 -4
- package/dist/css/dialtone.min.css +1 -1
- package/dist/tokens/doc.json +11269 -11269
- package/dist/vue2/_virtual/_plugin-vue2_normalizer.cjs +0 -3
- package/dist/vue2/_virtual/_plugin-vue2_normalizer.cjs.map +1 -1
- package/dist/vue2/_virtual/_plugin-vue2_normalizer.js +0 -3
- package/dist/vue2/_virtual/_plugin-vue2_normalizer.js.map +1 -1
- package/dist/vue2/common/sr_only_close_button.vue.cjs +1 -4
- package/dist/vue2/common/sr_only_close_button.vue.cjs.map +1 -1
- package/dist/vue2/common/sr_only_close_button.vue.js +1 -4
- 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/avatar/avatar.vue.cjs +1 -4
- package/dist/vue2/components/avatar/avatar.vue.cjs.map +1 -1
- package/dist/vue2/components/avatar/avatar.vue.js +1 -4
- package/dist/vue2/components/avatar/avatar.vue.js.map +1 -1
- package/dist/vue2/components/badge/badge.vue.cjs +1 -4
- package/dist/vue2/components/badge/badge.vue.cjs.map +1 -1
- package/dist/vue2/components/badge/badge.vue.js +1 -4
- package/dist/vue2/components/badge/badge.vue.js.map +1 -1
- package/dist/vue2/components/banner/banner.vue.cjs +1 -4
- package/dist/vue2/components/banner/banner.vue.cjs.map +1 -1
- package/dist/vue2/components/banner/banner.vue.js +1 -4
- package/dist/vue2/components/banner/banner.vue.js.map +1 -1
- package/dist/vue2/components/breadcrumbs/breadcrumb_item.vue.cjs +1 -4
- package/dist/vue2/components/breadcrumbs/breadcrumb_item.vue.cjs.map +1 -1
- package/dist/vue2/components/breadcrumbs/breadcrumb_item.vue.js +1 -4
- package/dist/vue2/components/breadcrumbs/breadcrumb_item.vue.js.map +1 -1
- package/dist/vue2/components/breadcrumbs/breadcrumbs.vue.cjs +1 -4
- package/dist/vue2/components/breadcrumbs/breadcrumbs.vue.cjs.map +1 -1
- package/dist/vue2/components/breadcrumbs/breadcrumbs.vue.js +1 -4
- package/dist/vue2/components/breadcrumbs/breadcrumbs.vue.js.map +1 -1
- package/dist/vue2/components/button/button.vue.cjs +1 -4
- package/dist/vue2/components/button/button.vue.cjs.map +1 -1
- package/dist/vue2/components/button/button.vue.js +1 -4
- package/dist/vue2/components/button/button.vue.js.map +1 -1
- package/dist/vue2/components/button_group/button_group.vue.cjs +1 -4
- package/dist/vue2/components/button_group/button_group.vue.cjs.map +1 -1
- package/dist/vue2/components/button_group/button_group.vue.js +1 -4
- package/dist/vue2/components/button_group/button_group.vue.js.map +1 -1
- package/dist/vue2/components/card/card.vue.cjs +1 -4
- package/dist/vue2/components/card/card.vue.cjs.map +1 -1
- package/dist/vue2/components/card/card.vue.js +1 -4
- package/dist/vue2/components/card/card.vue.js.map +1 -1
- package/dist/vue2/components/checkbox/checkbox.vue.cjs +1 -4
- package/dist/vue2/components/checkbox/checkbox.vue.cjs.map +1 -1
- package/dist/vue2/components/checkbox/checkbox.vue.js +1 -4
- package/dist/vue2/components/checkbox/checkbox.vue.js.map +1 -1
- package/dist/vue2/components/checkbox_group/checkbox_group.vue.cjs +1 -4
- package/dist/vue2/components/checkbox_group/checkbox_group.vue.cjs.map +1 -1
- package/dist/vue2/components/checkbox_group/checkbox_group.vue.js +1 -4
- package/dist/vue2/components/checkbox_group/checkbox_group.vue.js.map +1 -1
- package/dist/vue2/components/chip/chip.vue.cjs +1 -4
- package/dist/vue2/components/chip/chip.vue.cjs.map +1 -1
- package/dist/vue2/components/chip/chip.vue.js +1 -4
- package/dist/vue2/components/chip/chip.vue.js.map +1 -1
- package/dist/vue2/components/codeblock/codeblock.vue.cjs +1 -4
- package/dist/vue2/components/codeblock/codeblock.vue.cjs.map +1 -1
- package/dist/vue2/components/codeblock/codeblock.vue.js +1 -4
- package/dist/vue2/components/codeblock/codeblock.vue.js.map +1 -1
- package/dist/vue2/components/collapsible/collapsible.vue.cjs +1 -4
- package/dist/vue2/components/collapsible/collapsible.vue.cjs.map +1 -1
- package/dist/vue2/components/collapsible/collapsible.vue.js +1 -4
- package/dist/vue2/components/collapsible/collapsible.vue.js.map +1 -1
- package/dist/vue2/components/collapsible/collapsible_lazy_show.vue.cjs +1 -4
- package/dist/vue2/components/collapsible/collapsible_lazy_show.vue.cjs.map +1 -1
- package/dist/vue2/components/collapsible/collapsible_lazy_show.vue.js +1 -4
- package/dist/vue2/components/collapsible/collapsible_lazy_show.vue.js.map +1 -1
- package/dist/vue2/components/combobox/combobox.vue.cjs +1 -4
- package/dist/vue2/components/combobox/combobox.vue.cjs.map +1 -1
- package/dist/vue2/components/combobox/combobox.vue.js +1 -4
- package/dist/vue2/components/combobox/combobox.vue.js.map +1 -1
- package/dist/vue2/components/combobox/combobox_empty-list.vue.cjs +1 -4
- package/dist/vue2/components/combobox/combobox_empty-list.vue.cjs.map +1 -1
- package/dist/vue2/components/combobox/combobox_empty-list.vue.js +1 -4
- package/dist/vue2/components/combobox/combobox_empty-list.vue.js.map +1 -1
- package/dist/vue2/components/combobox/combobox_loading-list.vue.cjs +1 -4
- package/dist/vue2/components/combobox/combobox_loading-list.vue.cjs.map +1 -1
- package/dist/vue2/components/combobox/combobox_loading-list.vue.js +1 -4
- package/dist/vue2/components/combobox/combobox_loading-list.vue.js.map +1 -1
- package/dist/vue2/components/datepicker/datepicker.vue.cjs +1 -4
- package/dist/vue2/components/datepicker/datepicker.vue.cjs.map +1 -1
- package/dist/vue2/components/datepicker/datepicker.vue.js +1 -4
- package/dist/vue2/components/datepicker/datepicker.vue.js.map +1 -1
- package/dist/vue2/components/datepicker/modules/calendar.vue.cjs +1 -4
- package/dist/vue2/components/datepicker/modules/calendar.vue.cjs.map +1 -1
- package/dist/vue2/components/datepicker/modules/calendar.vue.js +1 -4
- package/dist/vue2/components/datepicker/modules/calendar.vue.js.map +1 -1
- package/dist/vue2/components/datepicker/modules/month-year-picker.vue.cjs +1 -4
- 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 +1 -4
- package/dist/vue2/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
- package/dist/vue2/components/description_list/description_list.vue.cjs +1 -4
- package/dist/vue2/components/description_list/description_list.vue.cjs.map +1 -1
- package/dist/vue2/components/description_list/description_list.vue.js +1 -4
- package/dist/vue2/components/description_list/description_list.vue.js.map +1 -1
- package/dist/vue2/components/dropdown/dropdown.vue.cjs +1 -4
- package/dist/vue2/components/dropdown/dropdown.vue.cjs.map +1 -1
- package/dist/vue2/components/dropdown/dropdown.vue.js +1 -4
- package/dist/vue2/components/dropdown/dropdown.vue.js.map +1 -1
- package/dist/vue2/components/dropdown/dropdown_separator.vue.cjs +1 -4
- package/dist/vue2/components/dropdown/dropdown_separator.vue.cjs.map +1 -1
- package/dist/vue2/components/dropdown/dropdown_separator.vue.js +1 -4
- package/dist/vue2/components/dropdown/dropdown_separator.vue.js.map +1 -1
- package/dist/vue2/components/emoji/emoji.vue.cjs +1 -4
- package/dist/vue2/components/emoji/emoji.vue.cjs.map +1 -1
- package/dist/vue2/components/emoji/emoji.vue.js +1 -4
- package/dist/vue2/components/emoji/emoji.vue.js.map +1 -1
- package/dist/vue2/components/emoji_picker/emoji_picker.vue.cjs +1 -4
- package/dist/vue2/components/emoji_picker/emoji_picker.vue.cjs.map +1 -1
- package/dist/vue2/components/emoji_picker/emoji_picker.vue.js +1 -4
- package/dist/vue2/components/emoji_picker/emoji_picker.vue.js.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_description.vue.cjs +1 -4
- package/dist/vue2/components/emoji_picker/modules/emoji_description.vue.cjs.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_description.vue.js +1 -4
- package/dist/vue2/components/emoji_picker/modules/emoji_description.vue.js.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs +1 -4
- 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 +1 -4
- package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_selector.vue.cjs +1 -4
- package/dist/vue2/components/emoji_picker/modules/emoji_selector.vue.cjs.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_selector.vue.js +1 -4
- package/dist/vue2/components/emoji_picker/modules/emoji_selector.vue.js.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_skin_selector.vue.cjs +1 -4
- package/dist/vue2/components/emoji_picker/modules/emoji_skin_selector.vue.cjs.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_skin_selector.vue.js +1 -4
- package/dist/vue2/components/emoji_picker/modules/emoji_skin_selector.vue.js.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs +1 -4
- 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 +1 -4
- package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
- package/dist/vue2/components/emoji_text_wrapper/emoji_text_wrapper.vue.cjs +1 -4
- package/dist/vue2/components/emoji_text_wrapper/emoji_text_wrapper.vue.cjs.map +1 -1
- package/dist/vue2/components/emoji_text_wrapper/emoji_text_wrapper.vue.js +1 -4
- package/dist/vue2/components/emoji_text_wrapper/emoji_text_wrapper.vue.js.map +1 -1
- package/dist/vue2/components/empty_state/empty_state.vue.cjs +1 -4
- package/dist/vue2/components/empty_state/empty_state.vue.cjs.map +1 -1
- package/dist/vue2/components/empty_state/empty_state.vue.js +1 -4
- package/dist/vue2/components/empty_state/empty_state.vue.js.map +1 -1
- package/dist/vue2/components/hovercard/hovercard.vue.cjs +1 -4
- package/dist/vue2/components/hovercard/hovercard.vue.cjs.map +1 -1
- package/dist/vue2/components/hovercard/hovercard.vue.js +1 -4
- package/dist/vue2/components/hovercard/hovercard.vue.js.map +1 -1
- package/dist/vue2/components/icon/icon.vue.cjs +1 -4
- package/dist/vue2/components/icon/icon.vue.cjs.map +1 -1
- package/dist/vue2/components/icon/icon.vue.js +1 -4
- package/dist/vue2/components/icon/icon.vue.js.map +1 -1
- package/dist/vue2/components/illustration/illustration.vue.cjs +1 -4
- package/dist/vue2/components/illustration/illustration.vue.cjs.map +1 -1
- package/dist/vue2/components/illustration/illustration.vue.js +1 -4
- package/dist/vue2/components/illustration/illustration.vue.js.map +1 -1
- package/dist/vue2/components/image_viewer/image_viewer.vue.cjs +1 -4
- package/dist/vue2/components/image_viewer/image_viewer.vue.cjs.map +1 -1
- package/dist/vue2/components/image_viewer/image_viewer.vue.js +1 -4
- package/dist/vue2/components/image_viewer/image_viewer.vue.js.map +1 -1
- package/dist/vue2/components/input/input.vue.cjs +1 -4
- package/dist/vue2/components/input/input.vue.cjs.map +1 -1
- package/dist/vue2/components/input/input.vue.js +1 -4
- package/dist/vue2/components/input/input.vue.js.map +1 -1
- package/dist/vue2/components/input_group/input_group.vue.cjs +1 -4
- package/dist/vue2/components/input_group/input_group.vue.cjs.map +1 -1
- package/dist/vue2/components/input_group/input_group.vue.js +1 -4
- package/dist/vue2/components/input_group/input_group.vue.js.map +1 -1
- package/dist/vue2/components/item_layout/item_layout.vue.cjs +2 -5
- package/dist/vue2/components/item_layout/item_layout.vue.cjs.map +1 -1
- package/dist/vue2/components/item_layout/item_layout.vue.js +2 -5
- package/dist/vue2/components/item_layout/item_layout.vue.js.map +1 -1
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +1 -4
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.cjs.map +1 -1
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.js +1 -4
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.js.map +1 -1
- package/dist/vue2/components/lazy_show/lazy_show.vue.cjs +1 -4
- package/dist/vue2/components/lazy_show/lazy_show.vue.cjs.map +1 -1
- package/dist/vue2/components/lazy_show/lazy_show.vue.js +1 -4
- package/dist/vue2/components/lazy_show/lazy_show.vue.js.map +1 -1
- package/dist/vue2/components/link/link.vue.cjs +1 -4
- package/dist/vue2/components/link/link.vue.cjs.map +1 -1
- package/dist/vue2/components/link/link.vue.js +1 -4
- package/dist/vue2/components/link/link.vue.js.map +1 -1
- package/dist/vue2/components/list_item/list_item.vue.cjs +1 -4
- package/dist/vue2/components/list_item/list_item.vue.cjs.map +1 -1
- package/dist/vue2/components/list_item/list_item.vue.js +1 -4
- package/dist/vue2/components/list_item/list_item.vue.js.map +1 -1
- package/dist/vue2/components/list_item_group/list_item_group.vue.cjs +1 -4
- package/dist/vue2/components/list_item_group/list_item_group.vue.cjs.map +1 -1
- package/dist/vue2/components/list_item_group/list_item_group.vue.js +1 -4
- package/dist/vue2/components/list_item_group/list_item_group.vue.js.map +1 -1
- package/dist/vue2/components/modal/modal.vue.cjs +1 -4
- package/dist/vue2/components/modal/modal.vue.cjs.map +1 -1
- package/dist/vue2/components/modal/modal.vue.js +1 -4
- package/dist/vue2/components/modal/modal.vue.js.map +1 -1
- package/dist/vue2/components/notice/notice.vue.cjs +1 -4
- package/dist/vue2/components/notice/notice.vue.cjs.map +1 -1
- package/dist/vue2/components/notice/notice.vue.js +1 -4
- package/dist/vue2/components/notice/notice.vue.js.map +1 -1
- package/dist/vue2/components/notice/notice_action.vue.cjs +1 -4
- package/dist/vue2/components/notice/notice_action.vue.cjs.map +1 -1
- package/dist/vue2/components/notice/notice_action.vue.js +1 -4
- package/dist/vue2/components/notice/notice_action.vue.js.map +1 -1
- package/dist/vue2/components/notice/notice_content.vue.cjs +1 -4
- package/dist/vue2/components/notice/notice_content.vue.cjs.map +1 -1
- package/dist/vue2/components/notice/notice_content.vue.js +1 -4
- package/dist/vue2/components/notice/notice_content.vue.js.map +1 -1
- package/dist/vue2/components/notice/notice_icon.vue.cjs +1 -4
- package/dist/vue2/components/notice/notice_icon.vue.cjs.map +1 -1
- package/dist/vue2/components/notice/notice_icon.vue.js +1 -4
- package/dist/vue2/components/notice/notice_icon.vue.js.map +1 -1
- package/dist/vue2/components/pagination/pagination.vue.cjs +1 -4
- package/dist/vue2/components/pagination/pagination.vue.cjs.map +1 -1
- package/dist/vue2/components/pagination/pagination.vue.js +1 -4
- package/dist/vue2/components/pagination/pagination.vue.js.map +1 -1
- package/dist/vue2/components/popover/popover.vue.cjs +1 -4
- package/dist/vue2/components/popover/popover.vue.cjs.map +1 -1
- package/dist/vue2/components/popover/popover.vue.js +1 -4
- package/dist/vue2/components/popover/popover.vue.js.map +1 -1
- package/dist/vue2/components/popover/popover_header_footer.vue.cjs +1 -4
- package/dist/vue2/components/popover/popover_header_footer.vue.cjs.map +1 -1
- package/dist/vue2/components/popover/popover_header_footer.vue.js +1 -4
- package/dist/vue2/components/popover/popover_header_footer.vue.js.map +1 -1
- package/dist/vue2/components/presence/presence.vue.cjs +1 -4
- package/dist/vue2/components/presence/presence.vue.cjs.map +1 -1
- package/dist/vue2/components/presence/presence.vue.js +1 -4
- package/dist/vue2/components/presence/presence.vue.js.map +1 -1
- package/dist/vue2/components/radio/radio.vue.cjs +1 -4
- package/dist/vue2/components/radio/radio.vue.cjs.map +1 -1
- package/dist/vue2/components/radio/radio.vue.js +1 -4
- package/dist/vue2/components/radio/radio.vue.js.map +1 -1
- package/dist/vue2/components/radio_group/radio_group.vue.cjs +1 -4
- package/dist/vue2/components/radio_group/radio_group.vue.cjs.map +1 -1
- package/dist/vue2/components/radio_group/radio_group.vue.js +1 -4
- package/dist/vue2/components/radio_group/radio_group.vue.js.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/channels/ChannelComponent.vue.cjs +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/channels/ChannelComponent.vue.cjs.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/channels/ChannelComponent.vue.js +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/channels/ChannelComponent.vue.js.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/channels/ChannelSuggestion.vue.cjs +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/channels/ChannelSuggestion.vue.cjs.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/channels/ChannelSuggestion.vue.js +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/channels/ChannelSuggestion.vue.js.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.cjs +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.cjs.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.js +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.js.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/emoji/EmojiSuggestion.vue.cjs +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/emoji/EmojiSuggestion.vue.cjs.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/emoji/EmojiSuggestion.vue.js +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/emoji/EmojiSuggestion.vue.js.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/mentions/MentionComponent.vue.cjs +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/mentions/MentionComponent.vue.cjs.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/mentions/MentionComponent.vue.js +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/mentions/MentionComponent.vue.js.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.cjs +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.cjs.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.js +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.js.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.cjs +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.cjs.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.js +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.js.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.cjs +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.cjs.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.js +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.js.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.cjs +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.cjs.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.js +1 -4
- package/dist/vue2/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.js.map +1 -1
- package/dist/vue2/components/rich_text_editor/rich_text_editor.vue.cjs +43 -27
- package/dist/vue2/components/rich_text_editor/rich_text_editor.vue.cjs.map +1 -1
- package/dist/vue2/components/rich_text_editor/rich_text_editor.vue.js +43 -27
- package/dist/vue2/components/rich_text_editor/rich_text_editor.vue.js.map +1 -1
- package/dist/vue2/components/root_layout/root_layout.vue.cjs +1 -4
- package/dist/vue2/components/root_layout/root_layout.vue.cjs.map +1 -1
- package/dist/vue2/components/root_layout/root_layout.vue.js +1 -4
- package/dist/vue2/components/root_layout/root_layout.vue.js.map +1 -1
- package/dist/vue2/components/select_menu/select_menu.vue.cjs +1 -4
- package/dist/vue2/components/select_menu/select_menu.vue.cjs.map +1 -1
- package/dist/vue2/components/select_menu/select_menu.vue.js +1 -4
- package/dist/vue2/components/select_menu/select_menu.vue.js.map +1 -1
- package/dist/vue2/components/skeleton/skeleton-list-item.vue.cjs +1 -4
- package/dist/vue2/components/skeleton/skeleton-list-item.vue.cjs.map +1 -1
- package/dist/vue2/components/skeleton/skeleton-list-item.vue.js +1 -4
- package/dist/vue2/components/skeleton/skeleton-list-item.vue.js.map +1 -1
- package/dist/vue2/components/skeleton/skeleton-paragraph.vue.cjs +1 -4
- package/dist/vue2/components/skeleton/skeleton-paragraph.vue.cjs.map +1 -1
- package/dist/vue2/components/skeleton/skeleton-paragraph.vue.js +1 -4
- package/dist/vue2/components/skeleton/skeleton-paragraph.vue.js.map +1 -1
- package/dist/vue2/components/skeleton/skeleton-shape.vue.cjs +1 -4
- package/dist/vue2/components/skeleton/skeleton-shape.vue.cjs.map +1 -1
- package/dist/vue2/components/skeleton/skeleton-shape.vue.js +1 -4
- package/dist/vue2/components/skeleton/skeleton-shape.vue.js.map +1 -1
- package/dist/vue2/components/skeleton/skeleton-text.vue.cjs +1 -4
- package/dist/vue2/components/skeleton/skeleton-text.vue.cjs.map +1 -1
- package/dist/vue2/components/skeleton/skeleton-text.vue.js +1 -4
- package/dist/vue2/components/skeleton/skeleton-text.vue.js.map +1 -1
- package/dist/vue2/components/skeleton/skeleton.vue.cjs +1 -4
- package/dist/vue2/components/skeleton/skeleton.vue.cjs.map +1 -1
- package/dist/vue2/components/skeleton/skeleton.vue.js +1 -4
- package/dist/vue2/components/skeleton/skeleton.vue.js.map +1 -1
- package/dist/vue2/components/split_button/split_button-alpha.vue.cjs +1 -4
- package/dist/vue2/components/split_button/split_button-alpha.vue.cjs.map +1 -1
- package/dist/vue2/components/split_button/split_button-alpha.vue.js +1 -4
- package/dist/vue2/components/split_button/split_button-alpha.vue.js.map +1 -1
- package/dist/vue2/components/split_button/split_button-omega.vue.cjs +1 -4
- package/dist/vue2/components/split_button/split_button-omega.vue.cjs.map +1 -1
- package/dist/vue2/components/split_button/split_button-omega.vue.js +1 -4
- package/dist/vue2/components/split_button/split_button-omega.vue.js.map +1 -1
- package/dist/vue2/components/split_button/split_button.vue.cjs +1 -4
- package/dist/vue2/components/split_button/split_button.vue.cjs.map +1 -1
- package/dist/vue2/components/split_button/split_button.vue.js +1 -4
- package/dist/vue2/components/split_button/split_button.vue.js.map +1 -1
- package/dist/vue2/components/stack/stack.vue.cjs +1 -4
- package/dist/vue2/components/stack/stack.vue.cjs.map +1 -1
- package/dist/vue2/components/stack/stack.vue.js +1 -4
- package/dist/vue2/components/stack/stack.vue.js.map +1 -1
- package/dist/vue2/components/tab/tab.vue.cjs +1 -4
- package/dist/vue2/components/tab/tab.vue.cjs.map +1 -1
- package/dist/vue2/components/tab/tab.vue.js +1 -4
- package/dist/vue2/components/tab/tab.vue.js.map +1 -1
- package/dist/vue2/components/tab/tab_group.vue.cjs +1 -4
- package/dist/vue2/components/tab/tab_group.vue.cjs.map +1 -1
- package/dist/vue2/components/tab/tab_group.vue.js +1 -4
- package/dist/vue2/components/tab/tab_group.vue.js.map +1 -1
- package/dist/vue2/components/tab/tab_panel.vue.cjs +1 -4
- package/dist/vue2/components/tab/tab_panel.vue.cjs.map +1 -1
- package/dist/vue2/components/tab/tab_panel.vue.js +1 -4
- package/dist/vue2/components/tab/tab_panel.vue.js.map +1 -1
- package/dist/vue2/components/toast/toast.vue.cjs +1 -4
- package/dist/vue2/components/toast/toast.vue.cjs.map +1 -1
- package/dist/vue2/components/toast/toast.vue.js +1 -4
- package/dist/vue2/components/toast/toast.vue.js.map +1 -1
- package/dist/vue2/components/toggle/toggle.vue.cjs +1 -4
- package/dist/vue2/components/toggle/toggle.vue.cjs.map +1 -1
- package/dist/vue2/components/toggle/toggle.vue.js +1 -4
- package/dist/vue2/components/toggle/toggle.vue.js.map +1 -1
- package/dist/vue2/components/tooltip/tooltip.vue.cjs +1 -4
- package/dist/vue2/components/tooltip/tooltip.vue.cjs.map +1 -1
- package/dist/vue2/components/tooltip/tooltip.vue.js +1 -4
- package/dist/vue2/components/tooltip/tooltip.vue.js.map +1 -1
- package/dist/vue2/components/validation_messages/validation_messages.vue.cjs +1 -4
- package/dist/vue2/components/validation_messages/validation_messages.vue.cjs.map +1 -1
- package/dist/vue2/components/validation_messages/validation_messages.vue.js +1 -4
- package/dist/vue2/components/validation_messages/validation_messages.vue.js.map +1 -1
- package/dist/vue2/recipes/buttons/callbar_button/callbar_button.vue.cjs +34 -12
- package/dist/vue2/recipes/buttons/callbar_button/callbar_button.vue.cjs.map +1 -1
- package/dist/vue2/recipes/buttons/callbar_button/callbar_button.vue.js +34 -12
- package/dist/vue2/recipes/buttons/callbar_button/callbar_button.vue.js.map +1 -1
- package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +31 -11
- 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 +31 -11
- 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 +6 -10
- 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 +6 -10
- package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.js.map +1 -1
- package/dist/vue2/recipes/chips/grouped_chip/grouped_chip.vue.cjs +3 -7
- package/dist/vue2/recipes/chips/grouped_chip/grouped_chip.vue.cjs.map +1 -1
- package/dist/vue2/recipes/chips/grouped_chip/grouped_chip.vue.js +3 -7
- package/dist/vue2/recipes/chips/grouped_chip/grouped_chip.vue.js.map +1 -1
- package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +9 -10
- package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
- package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +9 -10
- package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
- package/dist/vue2/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.cjs +1 -4
- package/dist/vue2/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.cjs.map +1 -1
- package/dist/vue2/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.js +1 -4
- package/dist/vue2/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +4 -8
- 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 +4 -8
- 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 +2 -6
- 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 +2 -6
- package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.cjs +2 -6
- package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.js +2 -6
- package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs +22 -26
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.js +22 -26
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/emoji_row/emoji_row.vue.cjs +8 -9
- package/dist/vue2/recipes/conversation_view/emoji_row/emoji_row.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/emoji_row/emoji_row.vue.js +8 -9
- package/dist/vue2/recipes/conversation_view/emoji_row/emoji_row.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.cjs +7 -11
- package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.js +7 -11
- package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill_constants.cjs +3 -3
- package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill_constants.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill_constants.js +3 -3
- package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill_constants.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +10 -14
- package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +10 -14
- package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row_constants.cjs +2 -2
- package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row_constants.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row_constants.js +2 -2
- package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row_constants.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.cjs +4 -8
- package/dist/vue2/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.js +4 -8
- package/dist/vue2/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.cjs +13 -17
- package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.js +13 -17
- package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/time_pill/time_pill.vue.cjs +2 -6
- package/dist/vue2/recipes/conversation_view/time_pill/time_pill.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/time_pill/time_pill.vue.js +2 -6
- package/dist/vue2/recipes/conversation_view/time_pill/time_pill.vue.js.map +1 -1
- package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +3 -7
- 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 +3 -7
- package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
- package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.cjs +3 -7
- package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
- package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.js +3 -7
- package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
- package/dist/vue2/recipes/leftbar/callbox/callbox.vue.cjs +4 -8
- package/dist/vue2/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
- package/dist/vue2/recipes/leftbar/callbox/callbox.vue.js +4 -8
- package/dist/vue2/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
- package/dist/vue2/recipes/leftbar/callbox/callbox_constants.cjs +4 -4
- package/dist/vue2/recipes/leftbar/callbox/callbox_constants.cjs.map +1 -1
- package/dist/vue2/recipes/leftbar/callbox/callbox_constants.js +4 -4
- package/dist/vue2/recipes/leftbar/callbox/callbox_constants.js.map +1 -1
- package/dist/vue2/recipes/leftbar/contact_centers_row/contact_centers_row.vue.cjs +12 -16
- package/dist/vue2/recipes/leftbar/contact_centers_row/contact_centers_row.vue.cjs.map +1 -1
- package/dist/vue2/recipes/leftbar/contact_centers_row/contact_centers_row.vue.js +12 -16
- package/dist/vue2/recipes/leftbar/contact_centers_row/contact_centers_row.vue.js.map +1 -1
- package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.cjs +2 -5
- package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.cjs.map +1 -1
- package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.js +2 -5
- package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.js.map +1 -1
- package/dist/vue2/recipes/leftbar/general_row/general_row.vue.cjs +28 -32
- 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 +28 -32
- package/dist/vue2/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
- package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +2 -5
- 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 +2 -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 +1 -4
- 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 +1 -4
- 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 +2 -6
- 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 +2 -6
- package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.js.map +1 -1
- package/dist/vue2/recipes/notices/top_banner_info/top_banner_info.vue.cjs +2 -6
- package/dist/vue2/recipes/notices/top_banner_info/top_banner_info.vue.cjs.map +1 -1
- package/dist/vue2/recipes/notices/top_banner_info/top_banner_info.vue.js +2 -6
- package/dist/vue2/recipes/notices/top_banner_info/top_banner_info.vue.js.map +1 -1
- package/dist/vue2/types/common/emoji/index.d.ts +1904 -16
- package/dist/vue2/types/common/emoji/index.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +11 -1
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +27 -0
- package/dist/vue2/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +27 -0
- package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +4 -4
- package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +2 -2
- package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts +6 -6
- package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/dist/vue3/common/emoji.cjs +1 -1
- package/dist/vue3/common/emoji.cjs.map +1 -1
- package/dist/vue3/common/emoji.js +1 -1
- package/dist/vue3/common/emoji.js.map +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/components/item_layout/item_layout.vue.cjs +7 -7
- package/dist/vue3/components/item_layout/item_layout.vue.cjs.map +1 -1
- package/dist/vue3/components/item_layout/item_layout.vue.js +7 -7
- package/dist/vue3/components/item_layout/item_layout.vue.js.map +1 -1
- package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.cjs +41 -22
- package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.js +41 -22
- package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.js.map +1 -1
- package/dist/vue3/recipes/buttons/callbar_button/callbar_button.vue.cjs +35 -8
- package/dist/vue3/recipes/buttons/callbar_button/callbar_button.vue.cjs.map +1 -1
- package/dist/vue3/recipes/buttons/callbar_button/callbar_button.vue.js +36 -9
- package/dist/vue3/recipes/buttons/callbar_button/callbar_button.vue.js.map +1 -1
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +35 -9
- 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 +35 -9
- 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 +7 -8
- 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 +7 -8
- package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.js.map +1 -1
- package/dist/vue3/recipes/chips/grouped_chip/grouped_chip.vue.cjs +3 -4
- package/dist/vue3/recipes/chips/grouped_chip/grouped_chip.vue.cjs.map +1 -1
- package/dist/vue3/recipes/chips/grouped_chip/grouped_chip.vue.js +3 -4
- package/dist/vue3/recipes/chips/grouped_chip/grouped_chip.vue.js.map +1 -1
- package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +13 -11
- package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
- package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +13 -11
- package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +4 -5
- 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 +4 -5
- 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 +5 -6
- 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 +5 -6
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.cjs +3 -4
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.js +3 -4
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs +23 -23
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.js +23 -23
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/emoji_row/emoji_row.vue.cjs +8 -6
- package/dist/vue3/recipes/conversation_view/emoji_row/emoji_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/emoji_row/emoji_row.vue.js +8 -6
- package/dist/vue3/recipes/conversation_view/emoji_row/emoji_row.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.cjs +14 -15
- package/dist/vue3/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.js +14 -15
- package/dist/vue3/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_pill/feed_item_pill_constants.cjs +3 -3
- package/dist/vue3/recipes/conversation_view/feed_item_pill/feed_item_pill_constants.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_pill/feed_item_pill_constants.js +3 -3
- package/dist/vue3/recipes/conversation_view/feed_item_pill/feed_item_pill_constants.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +28 -29
- 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 +28 -29
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row_constants.cjs +2 -2
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row_constants.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row_constants.js +2 -2
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row_constants.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.cjs +4 -5
- package/dist/vue3/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.js +4 -5
- package/dist/vue3/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs +21 -22
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js +21 -22
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/time_pill/time_pill.vue.cjs +2 -3
- package/dist/vue3/recipes/conversation_view/time_pill/time_pill.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/time_pill/time_pill.vue.js +2 -3
- package/dist/vue3/recipes/conversation_view/time_pill/time_pill.vue.js.map +1 -1
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +4 -5
- 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 +4 -5
- 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 +10 -11
- 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 +10 -11
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs +24 -25
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js +24 -25
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/callbox/callbox_constants.cjs +4 -4
- package/dist/vue3/recipes/leftbar/callbox/callbox_constants.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/callbox/callbox_constants.js +4 -4
- package/dist/vue3/recipes/leftbar/callbox/callbox_constants.js.map +1 -1
- package/dist/vue3/recipes/leftbar/contact_centers_row/contact_centers_row.vue.cjs +26 -27
- package/dist/vue3/recipes/leftbar/contact_centers_row/contact_centers_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/contact_centers_row/contact_centers_row.vue.js +26 -27
- package/dist/vue3/recipes/leftbar/contact_centers_row/contact_centers_row.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs +7 -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 +7 -7
- 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 +41 -43
- 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 +42 -44
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +1 -1
- 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 +1 -1
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.cjs +3 -4
- 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 +3 -4
- package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.js.map +1 -1
- package/dist/vue3/recipes/notices/top_banner_info/top_banner_info.vue.cjs +4 -5
- package/dist/vue3/recipes/notices/top_banner_info/top_banner_info.vue.cjs.map +1 -1
- package/dist/vue3/recipes/notices/top_banner_info/top_banner_info.vue.js +4 -5
- package/dist/vue3/recipes/notices/top_banner_info/top_banner_info.vue.js.map +1 -1
- package/dist/vue3/types/common/emoji/index.d.ts +1905 -17
- package/dist/vue3/types/common/emoji/index.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +11 -1
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +27 -0
- package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +27 -0
- package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/chips/grouped_chip/grouped_chip.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +4 -4
- package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +2 -2
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +6 -6
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/package.json +10 -10
- package/dist/vue2/style.css +0 -1424
- package/dist/vue3/style.css +0 -1427
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.vue.cjs","sources":["../../../components/tooltip/tooltip.vue"],"sourcesContent":["<template>\n <div data-qa=\"dt-tooltip-container\">\n <!-- disabling as the below events are for capturing events from interactive\n elements within the span rather than on the span itself -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <span\n v-if=\"!externalAnchor\"\n ref=\"anchor\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-on=\"$listeners\"\n >\n <!-- In case when transitionend event doesn't work correct (for ex. tooltip component with custom trigger) -->\n <!-- after-leave event can be used instead of transitionend -->\n <!-- @slot Slot for the content, defaults to message prop -->\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n</template>\n\n<script>\nimport {\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_DIRECTIONS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_DELAY_MS,\n} from './tooltip_constants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../popover/popover_constants';\nimport { flushPromises, getUniqueString } from '@/common/utils';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/popover/tippy_utils';\n\n/**\n * A tooltip is a floating label that briefly explains an action, function, or an element.\n * Its content is exclusively text and shouldn't be vital information for users.\n * If richer media is desired, consider using a popover instead.\n * @see https://dialtone.dialpad.com/components/tooltip.html\n */\nexport default {\n name: 'DtTooltip',\n\n props: {\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\"\n * if defined, otherwise it will automatically position to a new location\n * as it sees best fit. See\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => ['auto'],\n },\n\n /**\n * If true, applies inverted styles to the tooltip\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the tooltip from its reference element\n * by the specified number of pixels. See\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, 12],\n },\n\n /**\n * The direction the popover displays relative to the anchor. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'top',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * If the tooltip sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: true,\n validator: (sticky) => {\n return TOOLTIP_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Sets the element to which the tooltip is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Additional css classes for the tooltip content element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * A provided message for the tooltip content\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Controls whether hover/focus causes the tooltip to appear.\n * Cannot be combined with the show prop. show value will be ignored.\n * by default this is true, if you override with false, the tooltip will never show up.\n */\n enabled: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.\n * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n show: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Whether the tooltip should have a transition effect (fade).\n */\n transition: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the tooltip will have a delay when being focused or moused over.\n * @values true, false\n */\n delay: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Set a custom theme on the tooltip. See https://atomiks.github.io/tippyjs/v6/themes/\n */\n theme: {\n type: String,\n default: null,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Emitted when tooltip is shown or hidden\n *\n * @event shown\n * @type {Boolean}\n */\n 'shown',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n tip: null,\n\n inTimer: null,\n\n // Internal state for whether the tooltip is shown. Changing the prop\n // will update this.\n internalShow: false,\n\n // this is where the placement currently is, this can be different than\n // the placement prop when there is not enough available room for the tip\n // to display and it uses a fallback placement.\n currentPlacement: this.placement,\n };\n },\n\n computed: {\n // eslint-disable-next-line complexity\n tippyProps () {\n return {\n offset: this.offset,\n delay: this.delay ? TOOLTIP_DELAY_MS : false,\n placement: this.placement,\n sticky: this.sticky,\n theme: this.inverted ? 'inverted' : this.theme,\n animation: this.transition ? 'fade' : false,\n // onShown only triggers when transition is truthy\n onShown: (tooltipInstance) => this.onShow(tooltipInstance, 'onShown'),\n // onShown will always be called, but it will be called before the animation is complete\n onShow: (tooltipInstance) => this.onShow(tooltipInstance, 'onShow'),\n onHidden: this.onHide,\n\n popperOptions: getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n hasHideModifierEnabled: true,\n onChangePlacement: this.onChangePlacement,\n }),\n };\n },\n\n anchor () {\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: {\n handler: 'setProps',\n deep: true,\n },\n\n show: {\n handler: function (show) {\n if (show !== null && this.enabled) {\n this.internalShow = show;\n }\n },\n\n immediate: true,\n },\n\n internalShow (value) {\n if (value) {\n this.setProps();\n this.tip.show();\n } else {\n this.tip.hide();\n }\n },\n\n sticky (sticky) {\n this.tip.setProps({\n sticky,\n });\n },\n },\n\n async mounted () {\n if (!this.enabled && this.show != null) {\n console.warn('Tooltip: You cannot use both the enabled and show props at the same time.');\n console.warn('The show prop will be ignored.');\n }\n\n this.tip = createTippy(this.anchor, this.initOptions());\n if (this.externalAnchor) {\n await flushPromises();\n this.addExternalAnchorEventListeners();\n }\n },\n\n beforeDestroy () {\n this.externalAnchor && this.removeExternalAnchorEventListeners();\n\n if (this.anchor?._tippy) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (this.$el.getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 651 when\n // anchor of popover is within a drawer.\n this.$el.closest('.d-zi-drawer')) {\n return 651;\n } else {\n return 400;\n }\n },\n\n hasVisibleFocus () {\n return this.anchor.matches(':focus-visible');\n },\n\n onEnterAnchor (e) {\n if (!this.enabled) return;\n if (this.delay && this.inTimer === null) {\n this.inTimer = setTimeout(() => {\n this.triggerShow(e);\n }, TOOLTIP_DELAY_MS);\n } else {\n this.triggerShow(e);\n }\n },\n\n triggerShow (e) {\n if (e.type === 'focusin') {\n // only show tooltips on visible focus when triggered via focus.\n // when the user is using the mouse they only want tooltips to display\n // on mouseover.\n //\n // Example: anchor of a popover is a button with tooltip.\n // closing it with the mouse would trigger the tooltip to display as\n // the anchor is focused on close. Not what we want.\n if (this.show === null && this.hasVisibleFocus()) {\n this.internalShow = true;\n }\n } else {\n if (this.show === null) this.internalShow = true;\n }\n },\n\n onLeaveAnchor (e) {\n if (e.type === 'keydown' && e.code !== 'Escape') return;\n\n clearTimeout(this.inTimer);\n this.inTimer = null;\n this.triggerHide();\n },\n\n triggerHide () {\n if (this.show === null) this.internalShow = false;\n },\n\n onChangePlacement (placement) {\n this.currentPlacement = placement;\n },\n\n onHide () {\n this.tip?.unmount();\n this.$emit('shown', false);\n if (this.show !== null) {\n this.$emit('update:show', false);\n }\n },\n\n onShow (tooltipInstance, callingMethod) {\n if (!this.tooltipHasContent(tooltipInstance)) {\n return false;\n }\n if (this.transition && callingMethod === 'onShow') {\n return;\n }\n this.$emit('shown', true);\n if (this.show !== null) {\n this.$emit('update:show', true);\n }\n },\n\n setProps () {\n if (this.tip && this.tip.setProps) {\n this.tip.setProps({\n ...this.tippyProps,\n // these need to be set here rather than in tippyProps because they are non-reactive\n appendTo: this.appendTo === 'body' ? this.anchor?.getRootNode()?.querySelector('body') : this.appendTo,\n zIndex: this.calculateAnchorZindex(),\n });\n }\n },\n\n onMount () {\n this.setProps();\n },\n\n tooltipHasContent (tooltipInstance) {\n // don't show tooltip when no content\n if (tooltipInstance.props.content.textContent.trim().length === 0) {\n return false;\n }\n return true;\n },\n\n // set initial options here. If any of the options need to dynamically change, they should be put in\n // tippyProps instead.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><path d=\"M 14.5,7 8,0 1.5,7 Z\"/></svg>',\n // transition duration - same as our custom fade delay in dialtone-globals.less\n duration: 180,\n interactive: false,\n trigger: 'manual',\n hideOnClick: false,\n // disable tooltip from displaying on touch devices\n touch: false,\n onMount: this.onMount,\n showOnCreate: this.internalShow,\n popperOptions: getPopperOptions({\n hasHideModifierEnabled: true,\n }),\n };\n },\n\n addExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n removeExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n },\n};\n</script>\n"],"names":["getUniqueString","TOOLTIP_DIRECTIONS","TOOLTIP_STICKY_VALUES","POPOVER_APPEND_TO_VALUES","TOOLTIP_KIND_MODIFIERS","TOOLTIP_DELAY_MS","getPopperOptions","getAnchor","createTippy","flushPromises"],"mappings":";;;;;;;AAkEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAA,aAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAeA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AA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;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"tooltip.vue.cjs","sources":["../../../components/tooltip/tooltip.vue"],"sourcesContent":["<template>\n <div data-qa=\"dt-tooltip-container\">\n <!-- disabling as the below events are for capturing events from interactive\n elements within the span rather than on the span itself -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <span\n v-if=\"!externalAnchor\"\n ref=\"anchor\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-on=\"$listeners\"\n >\n <!-- In case when transitionend event doesn't work correct (for ex. tooltip component with custom trigger) -->\n <!-- after-leave event can be used instead of transitionend -->\n <!-- @slot Slot for the content, defaults to message prop -->\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n</template>\n\n<script>\nimport {\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_DIRECTIONS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_DELAY_MS,\n} from './tooltip_constants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../popover/popover_constants';\nimport { flushPromises, getUniqueString } from '@/common/utils';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/popover/tippy_utils';\n\n/**\n * A tooltip is a floating label that briefly explains an action, function, or an element.\n * Its content is exclusively text and shouldn't be vital information for users.\n * If richer media is desired, consider using a popover instead.\n * @see https://dialtone.dialpad.com/components/tooltip.html\n */\nexport default {\n name: 'DtTooltip',\n\n props: {\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\"\n * if defined, otherwise it will automatically position to a new location\n * as it sees best fit. See\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => ['auto'],\n },\n\n /**\n * If true, applies inverted styles to the tooltip\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the tooltip from its reference element\n * by the specified number of pixels. See\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, 12],\n },\n\n /**\n * The direction the popover displays relative to the anchor. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'top',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * If the tooltip sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: true,\n validator: (sticky) => {\n return TOOLTIP_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Sets the element to which the tooltip is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Additional css classes for the tooltip content element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * A provided message for the tooltip content\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Controls whether hover/focus causes the tooltip to appear.\n * Cannot be combined with the show prop. show value will be ignored.\n * by default this is true, if you override with false, the tooltip will never show up.\n */\n enabled: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.\n * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n show: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Whether the tooltip should have a transition effect (fade).\n */\n transition: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the tooltip will have a delay when being focused or moused over.\n * @values true, false\n */\n delay: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Set a custom theme on the tooltip. See https://atomiks.github.io/tippyjs/v6/themes/\n */\n theme: {\n type: String,\n default: null,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Emitted when tooltip is shown or hidden\n *\n * @event shown\n * @type {Boolean}\n */\n 'shown',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n tip: null,\n\n inTimer: null,\n\n // Internal state for whether the tooltip is shown. Changing the prop\n // will update this.\n internalShow: false,\n\n // this is where the placement currently is, this can be different than\n // the placement prop when there is not enough available room for the tip\n // to display and it uses a fallback placement.\n currentPlacement: this.placement,\n };\n },\n\n computed: {\n // eslint-disable-next-line complexity\n tippyProps () {\n return {\n offset: this.offset,\n delay: this.delay ? TOOLTIP_DELAY_MS : false,\n placement: this.placement,\n sticky: this.sticky,\n theme: this.inverted ? 'inverted' : this.theme,\n animation: this.transition ? 'fade' : false,\n // onShown only triggers when transition is truthy\n onShown: (tooltipInstance) => this.onShow(tooltipInstance, 'onShown'),\n // onShown will always be called, but it will be called before the animation is complete\n onShow: (tooltipInstance) => this.onShow(tooltipInstance, 'onShow'),\n onHidden: this.onHide,\n\n popperOptions: getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n hasHideModifierEnabled: true,\n onChangePlacement: this.onChangePlacement,\n }),\n };\n },\n\n anchor () {\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: {\n handler: 'setProps',\n deep: true,\n },\n\n show: {\n handler: function (show) {\n if (show !== null && this.enabled) {\n this.internalShow = show;\n }\n },\n\n immediate: true,\n },\n\n internalShow (value) {\n if (value) {\n this.setProps();\n this.tip.show();\n } else {\n this.tip.hide();\n }\n },\n\n sticky (sticky) {\n this.tip.setProps({\n sticky,\n });\n },\n },\n\n async mounted () {\n if (!this.enabled && this.show != null) {\n console.warn('Tooltip: You cannot use both the enabled and show props at the same time.');\n console.warn('The show prop will be ignored.');\n }\n\n this.tip = createTippy(this.anchor, this.initOptions());\n if (this.externalAnchor) {\n await flushPromises();\n this.addExternalAnchorEventListeners();\n }\n },\n\n beforeDestroy () {\n this.externalAnchor && this.removeExternalAnchorEventListeners();\n\n if (this.anchor?._tippy) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (this.$el.getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 651 when\n // anchor of popover is within a drawer.\n this.$el.closest('.d-zi-drawer')) {\n return 651;\n } else {\n return 400;\n }\n },\n\n hasVisibleFocus () {\n return this.anchor.matches(':focus-visible');\n },\n\n onEnterAnchor (e) {\n if (!this.enabled) return;\n if (this.delay && this.inTimer === null) {\n this.inTimer = setTimeout(() => {\n this.triggerShow(e);\n }, TOOLTIP_DELAY_MS);\n } else {\n this.triggerShow(e);\n }\n },\n\n triggerShow (e) {\n if (e.type === 'focusin') {\n // only show tooltips on visible focus when triggered via focus.\n // when the user is using the mouse they only want tooltips to display\n // on mouseover.\n //\n // Example: anchor of a popover is a button with tooltip.\n // closing it with the mouse would trigger the tooltip to display as\n // the anchor is focused on close. Not what we want.\n if (this.show === null && this.hasVisibleFocus()) {\n this.internalShow = true;\n }\n } else {\n if (this.show === null) this.internalShow = true;\n }\n },\n\n onLeaveAnchor (e) {\n if (e.type === 'keydown' && e.code !== 'Escape') return;\n\n clearTimeout(this.inTimer);\n this.inTimer = null;\n this.triggerHide();\n },\n\n triggerHide () {\n if (this.show === null) this.internalShow = false;\n },\n\n onChangePlacement (placement) {\n this.currentPlacement = placement;\n },\n\n onHide () {\n this.tip?.unmount();\n this.$emit('shown', false);\n if (this.show !== null) {\n this.$emit('update:show', false);\n }\n },\n\n onShow (tooltipInstance, callingMethod) {\n if (!this.tooltipHasContent(tooltipInstance)) {\n return false;\n }\n if (this.transition && callingMethod === 'onShow') {\n return;\n }\n this.$emit('shown', true);\n if (this.show !== null) {\n this.$emit('update:show', true);\n }\n },\n\n setProps () {\n if (this.tip && this.tip.setProps) {\n this.tip.setProps({\n ...this.tippyProps,\n // these need to be set here rather than in tippyProps because they are non-reactive\n appendTo: this.appendTo === 'body' ? this.anchor?.getRootNode()?.querySelector('body') : this.appendTo,\n zIndex: this.calculateAnchorZindex(),\n });\n }\n },\n\n onMount () {\n this.setProps();\n },\n\n tooltipHasContent (tooltipInstance) {\n // don't show tooltip when no content\n if (tooltipInstance.props.content.textContent.trim().length === 0) {\n return false;\n }\n return true;\n },\n\n // set initial options here. If any of the options need to dynamically change, they should be put in\n // tippyProps instead.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><path d=\"M 14.5,7 8,0 1.5,7 Z\"/></svg>',\n // transition duration - same as our custom fade delay in dialtone-globals.less\n duration: 180,\n interactive: false,\n trigger: 'manual',\n hideOnClick: false,\n // disable tooltip from displaying on touch devices\n touch: false,\n onMount: this.onMount,\n showOnCreate: this.internalShow,\n popperOptions: getPopperOptions({\n hasHideModifierEnabled: true,\n }),\n };\n },\n\n addExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n removeExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n },\n};\n</script>\n"],"names":["getUniqueString","TOOLTIP_DIRECTIONS","TOOLTIP_STICKY_VALUES","POPOVER_APPEND_TO_VALUES","TOOLTIP_KIND_MODIFIERS","TOOLTIP_DELAY_MS","getPopperOptions","getAnchor","createTippy","flushPromises"],"mappings":";;;;;;;AAkEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAA,aAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;A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,CAAA,UAAA,KAAA,cAAA,KAAA;AAAA,MACA,CAAA;AACA,OAAA,YAAA,cAAA,SAAA,EAAA,QAAA,cAAA;;AACA,mBAAA,WAAA,mBAAA,oBAAA,UAAA,CAAA,UAAA,KAAA,cAAA,KAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -424,10 +424,7 @@ var _sfc_staticRenderFns = [];
|
|
|
424
424
|
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
425
425
|
_sfc_main,
|
|
426
426
|
_sfc_render,
|
|
427
|
-
_sfc_staticRenderFns
|
|
428
|
-
false,
|
|
429
|
-
null,
|
|
430
|
-
null
|
|
427
|
+
_sfc_staticRenderFns
|
|
431
428
|
);
|
|
432
429
|
const DtTooltip = __component__.exports;
|
|
433
430
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.vue.js","sources":["../../../components/tooltip/tooltip.vue"],"sourcesContent":["<template>\n <div data-qa=\"dt-tooltip-container\">\n <!-- disabling as the below events are for capturing events from interactive\n elements within the span rather than on the span itself -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <span\n v-if=\"!externalAnchor\"\n ref=\"anchor\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-on=\"$listeners\"\n >\n <!-- In case when transitionend event doesn't work correct (for ex. tooltip component with custom trigger) -->\n <!-- after-leave event can be used instead of transitionend -->\n <!-- @slot Slot for the content, defaults to message prop -->\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n</template>\n\n<script>\nimport {\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_DIRECTIONS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_DELAY_MS,\n} from './tooltip_constants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../popover/popover_constants';\nimport { flushPromises, getUniqueString } from '@/common/utils';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/popover/tippy_utils';\n\n/**\n * A tooltip is a floating label that briefly explains an action, function, or an element.\n * Its content is exclusively text and shouldn't be vital information for users.\n * If richer media is desired, consider using a popover instead.\n * @see https://dialtone.dialpad.com/components/tooltip.html\n */\nexport default {\n name: 'DtTooltip',\n\n props: {\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\"\n * if defined, otherwise it will automatically position to a new location\n * as it sees best fit. See\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => ['auto'],\n },\n\n /**\n * If true, applies inverted styles to the tooltip\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the tooltip from its reference element\n * by the specified number of pixels. See\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, 12],\n },\n\n /**\n * The direction the popover displays relative to the anchor. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'top',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * If the tooltip sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: true,\n validator: (sticky) => {\n return TOOLTIP_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Sets the element to which the tooltip is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Additional css classes for the tooltip content element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * A provided message for the tooltip content\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Controls whether hover/focus causes the tooltip to appear.\n * Cannot be combined with the show prop. show value will be ignored.\n * by default this is true, if you override with false, the tooltip will never show up.\n */\n enabled: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.\n * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n show: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Whether the tooltip should have a transition effect (fade).\n */\n transition: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the tooltip will have a delay when being focused or moused over.\n * @values true, false\n */\n delay: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Set a custom theme on the tooltip. See https://atomiks.github.io/tippyjs/v6/themes/\n */\n theme: {\n type: String,\n default: null,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Emitted when tooltip is shown or hidden\n *\n * @event shown\n * @type {Boolean}\n */\n 'shown',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n tip: null,\n\n inTimer: null,\n\n // Internal state for whether the tooltip is shown. Changing the prop\n // will update this.\n internalShow: false,\n\n // this is where the placement currently is, this can be different than\n // the placement prop when there is not enough available room for the tip\n // to display and it uses a fallback placement.\n currentPlacement: this.placement,\n };\n },\n\n computed: {\n // eslint-disable-next-line complexity\n tippyProps () {\n return {\n offset: this.offset,\n delay: this.delay ? TOOLTIP_DELAY_MS : false,\n placement: this.placement,\n sticky: this.sticky,\n theme: this.inverted ? 'inverted' : this.theme,\n animation: this.transition ? 'fade' : false,\n // onShown only triggers when transition is truthy\n onShown: (tooltipInstance) => this.onShow(tooltipInstance, 'onShown'),\n // onShown will always be called, but it will be called before the animation is complete\n onShow: (tooltipInstance) => this.onShow(tooltipInstance, 'onShow'),\n onHidden: this.onHide,\n\n popperOptions: getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n hasHideModifierEnabled: true,\n onChangePlacement: this.onChangePlacement,\n }),\n };\n },\n\n anchor () {\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: {\n handler: 'setProps',\n deep: true,\n },\n\n show: {\n handler: function (show) {\n if (show !== null && this.enabled) {\n this.internalShow = show;\n }\n },\n\n immediate: true,\n },\n\n internalShow (value) {\n if (value) {\n this.setProps();\n this.tip.show();\n } else {\n this.tip.hide();\n }\n },\n\n sticky (sticky) {\n this.tip.setProps({\n sticky,\n });\n },\n },\n\n async mounted () {\n if (!this.enabled && this.show != null) {\n console.warn('Tooltip: You cannot use both the enabled and show props at the same time.');\n console.warn('The show prop will be ignored.');\n }\n\n this.tip = createTippy(this.anchor, this.initOptions());\n if (this.externalAnchor) {\n await flushPromises();\n this.addExternalAnchorEventListeners();\n }\n },\n\n beforeDestroy () {\n this.externalAnchor && this.removeExternalAnchorEventListeners();\n\n if (this.anchor?._tippy) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (this.$el.getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 651 when\n // anchor of popover is within a drawer.\n this.$el.closest('.d-zi-drawer')) {\n return 651;\n } else {\n return 400;\n }\n },\n\n hasVisibleFocus () {\n return this.anchor.matches(':focus-visible');\n },\n\n onEnterAnchor (e) {\n if (!this.enabled) return;\n if (this.delay && this.inTimer === null) {\n this.inTimer = setTimeout(() => {\n this.triggerShow(e);\n }, TOOLTIP_DELAY_MS);\n } else {\n this.triggerShow(e);\n }\n },\n\n triggerShow (e) {\n if (e.type === 'focusin') {\n // only show tooltips on visible focus when triggered via focus.\n // when the user is using the mouse they only want tooltips to display\n // on mouseover.\n //\n // Example: anchor of a popover is a button with tooltip.\n // closing it with the mouse would trigger the tooltip to display as\n // the anchor is focused on close. Not what we want.\n if (this.show === null && this.hasVisibleFocus()) {\n this.internalShow = true;\n }\n } else {\n if (this.show === null) this.internalShow = true;\n }\n },\n\n onLeaveAnchor (e) {\n if (e.type === 'keydown' && e.code !== 'Escape') return;\n\n clearTimeout(this.inTimer);\n this.inTimer = null;\n this.triggerHide();\n },\n\n triggerHide () {\n if (this.show === null) this.internalShow = false;\n },\n\n onChangePlacement (placement) {\n this.currentPlacement = placement;\n },\n\n onHide () {\n this.tip?.unmount();\n this.$emit('shown', false);\n if (this.show !== null) {\n this.$emit('update:show', false);\n }\n },\n\n onShow (tooltipInstance, callingMethod) {\n if (!this.tooltipHasContent(tooltipInstance)) {\n return false;\n }\n if (this.transition && callingMethod === 'onShow') {\n return;\n }\n this.$emit('shown', true);\n if (this.show !== null) {\n this.$emit('update:show', true);\n }\n },\n\n setProps () {\n if (this.tip && this.tip.setProps) {\n this.tip.setProps({\n ...this.tippyProps,\n // these need to be set here rather than in tippyProps because they are non-reactive\n appendTo: this.appendTo === 'body' ? this.anchor?.getRootNode()?.querySelector('body') : this.appendTo,\n zIndex: this.calculateAnchorZindex(),\n });\n }\n },\n\n onMount () {\n this.setProps();\n },\n\n tooltipHasContent (tooltipInstance) {\n // don't show tooltip when no content\n if (tooltipInstance.props.content.textContent.trim().length === 0) {\n return false;\n }\n return true;\n },\n\n // set initial options here. If any of the options need to dynamically change, they should be put in\n // tippyProps instead.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><path d=\"M 14.5,7 8,0 1.5,7 Z\"/></svg>',\n // transition duration - same as our custom fade delay in dialtone-globals.less\n duration: 180,\n interactive: false,\n trigger: 'manual',\n hideOnClick: false,\n // disable tooltip from displaying on touch devices\n touch: false,\n onMount: this.onMount,\n showOnCreate: this.internalShow,\n popperOptions: getPopperOptions({\n hasHideModifierEnabled: true,\n }),\n };\n },\n\n addExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n removeExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;AAkEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAeA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,GAAA,EAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAiBA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA,WAAA;AACA,eAAA,mBAAA,SAAA,SAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAiBA,QAAA;AAAA,MACA,MAAA,CAAA,SAAA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,WAAA;AACA,eAAA,sBAAA,SAAA,MAAA;AAAA,MACA;AAAA,IACA;AAAA;A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CAAA,UAAA,KAAA,cAAA,KAAA;AAAA,MACA,CAAA;AACA,OAAA,YAAA,cAAA,SAAA,EAAA,QAAA,cAAA;;AACA,mBAAA,WAAA,mBAAA,iBAAA,UAAA,CAAA,UAAA,KAAA,cAAA,KAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,IAEA,qCAAA;AACA,OAAA,WAAA,YAAA,EAAA,QAAA,cAAA;;AACA,mBAAA,WAAA,mBAAA,oBAAA,UAAA,CAAA,UAAA,KAAA,cAAA,KAAA;AAAA,MACA,CAAA;AACA,OAAA,YAAA,cAAA,SAAA,EAAA,QAAA,cAAA;;AACA,mBAAA,WAAA,mBAAA,oBAAA,UAAA,CAAA,UAAA,KAAA,cAAA,KAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"tooltip.vue.js","sources":["../../../components/tooltip/tooltip.vue"],"sourcesContent":["<template>\n <div data-qa=\"dt-tooltip-container\">\n <!-- disabling as the below events are for capturing events from interactive\n elements within the span rather than on the span itself -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <span\n v-if=\"!externalAnchor\"\n ref=\"anchor\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-on=\"$listeners\"\n >\n <!-- In case when transitionend event doesn't work correct (for ex. tooltip component with custom trigger) -->\n <!-- after-leave event can be used instead of transitionend -->\n <!-- @slot Slot for the content, defaults to message prop -->\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n</template>\n\n<script>\nimport {\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_DIRECTIONS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_DELAY_MS,\n} from './tooltip_constants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../popover/popover_constants';\nimport { flushPromises, getUniqueString } from '@/common/utils';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/popover/tippy_utils';\n\n/**\n * A tooltip is a floating label that briefly explains an action, function, or an element.\n * Its content is exclusively text and shouldn't be vital information for users.\n * If richer media is desired, consider using a popover instead.\n * @see https://dialtone.dialpad.com/components/tooltip.html\n */\nexport default {\n name: 'DtTooltip',\n\n props: {\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\"\n * if defined, otherwise it will automatically position to a new location\n * as it sees best fit. See\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => ['auto'],\n },\n\n /**\n * If true, applies inverted styles to the tooltip\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the tooltip from its reference element\n * by the specified number of pixels. See\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, 12],\n },\n\n /**\n * The direction the popover displays relative to the anchor. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'top',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * If the tooltip sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: true,\n validator: (sticky) => {\n return TOOLTIP_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Sets the element to which the tooltip is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Additional css classes for the tooltip content element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * A provided message for the tooltip content\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Controls whether hover/focus causes the tooltip to appear.\n * Cannot be combined with the show prop. show value will be ignored.\n * by default this is true, if you override with false, the tooltip will never show up.\n */\n enabled: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.\n * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n show: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Whether the tooltip should have a transition effect (fade).\n */\n transition: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the tooltip will have a delay when being focused or moused over.\n * @values true, false\n */\n delay: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Set a custom theme on the tooltip. See https://atomiks.github.io/tippyjs/v6/themes/\n */\n theme: {\n type: String,\n default: null,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Emitted when tooltip is shown or hidden\n *\n * @event shown\n * @type {Boolean}\n */\n 'shown',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n tip: null,\n\n inTimer: null,\n\n // Internal state for whether the tooltip is shown. Changing the prop\n // will update this.\n internalShow: false,\n\n // this is where the placement currently is, this can be different than\n // the placement prop when there is not enough available room for the tip\n // to display and it uses a fallback placement.\n currentPlacement: this.placement,\n };\n },\n\n computed: {\n // eslint-disable-next-line complexity\n tippyProps () {\n return {\n offset: this.offset,\n delay: this.delay ? TOOLTIP_DELAY_MS : false,\n placement: this.placement,\n sticky: this.sticky,\n theme: this.inverted ? 'inverted' : this.theme,\n animation: this.transition ? 'fade' : false,\n // onShown only triggers when transition is truthy\n onShown: (tooltipInstance) => this.onShow(tooltipInstance, 'onShown'),\n // onShown will always be called, but it will be called before the animation is complete\n onShow: (tooltipInstance) => this.onShow(tooltipInstance, 'onShow'),\n onHidden: this.onHide,\n\n popperOptions: getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n hasHideModifierEnabled: true,\n onChangePlacement: this.onChangePlacement,\n }),\n };\n },\n\n anchor () {\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: {\n handler: 'setProps',\n deep: true,\n },\n\n show: {\n handler: function (show) {\n if (show !== null && this.enabled) {\n this.internalShow = show;\n }\n },\n\n immediate: true,\n },\n\n internalShow (value) {\n if (value) {\n this.setProps();\n this.tip.show();\n } else {\n this.tip.hide();\n }\n },\n\n sticky (sticky) {\n this.tip.setProps({\n sticky,\n });\n },\n },\n\n async mounted () {\n if (!this.enabled && this.show != null) {\n console.warn('Tooltip: You cannot use both the enabled and show props at the same time.');\n console.warn('The show prop will be ignored.');\n }\n\n this.tip = createTippy(this.anchor, this.initOptions());\n if (this.externalAnchor) {\n await flushPromises();\n this.addExternalAnchorEventListeners();\n }\n },\n\n beforeDestroy () {\n this.externalAnchor && this.removeExternalAnchorEventListeners();\n\n if (this.anchor?._tippy) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (this.$el.getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 651 when\n // anchor of popover is within a drawer.\n this.$el.closest('.d-zi-drawer')) {\n return 651;\n } else {\n return 400;\n }\n },\n\n hasVisibleFocus () {\n return this.anchor.matches(':focus-visible');\n },\n\n onEnterAnchor (e) {\n if (!this.enabled) return;\n if (this.delay && this.inTimer === null) {\n this.inTimer = setTimeout(() => {\n this.triggerShow(e);\n }, TOOLTIP_DELAY_MS);\n } else {\n this.triggerShow(e);\n }\n },\n\n triggerShow (e) {\n if (e.type === 'focusin') {\n // only show tooltips on visible focus when triggered via focus.\n // when the user is using the mouse they only want tooltips to display\n // on mouseover.\n //\n // Example: anchor of a popover is a button with tooltip.\n // closing it with the mouse would trigger the tooltip to display as\n // the anchor is focused on close. Not what we want.\n if (this.show === null && this.hasVisibleFocus()) {\n this.internalShow = true;\n }\n } else {\n if (this.show === null) this.internalShow = true;\n }\n },\n\n onLeaveAnchor (e) {\n if (e.type === 'keydown' && e.code !== 'Escape') return;\n\n clearTimeout(this.inTimer);\n this.inTimer = null;\n this.triggerHide();\n },\n\n triggerHide () {\n if (this.show === null) this.internalShow = false;\n },\n\n onChangePlacement (placement) {\n this.currentPlacement = placement;\n },\n\n onHide () {\n this.tip?.unmount();\n this.$emit('shown', false);\n if (this.show !== null) {\n this.$emit('update:show', false);\n }\n },\n\n onShow (tooltipInstance, callingMethod) {\n if (!this.tooltipHasContent(tooltipInstance)) {\n return false;\n }\n if (this.transition && callingMethod === 'onShow') {\n return;\n }\n this.$emit('shown', true);\n if (this.show !== null) {\n this.$emit('update:show', true);\n }\n },\n\n setProps () {\n if (this.tip && this.tip.setProps) {\n this.tip.setProps({\n ...this.tippyProps,\n // these need to be set here rather than in tippyProps because they are non-reactive\n appendTo: this.appendTo === 'body' ? this.anchor?.getRootNode()?.querySelector('body') : this.appendTo,\n zIndex: this.calculateAnchorZindex(),\n });\n }\n },\n\n onMount () {\n this.setProps();\n },\n\n tooltipHasContent (tooltipInstance) {\n // don't show tooltip when no content\n if (tooltipInstance.props.content.textContent.trim().length === 0) {\n return false;\n }\n return true;\n },\n\n // set initial options here. If any of the options need to dynamically change, they should be put in\n // tippyProps instead.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><path d=\"M 14.5,7 8,0 1.5,7 Z\"/></svg>',\n // transition duration - same as our custom fade delay in dialtone-globals.less\n duration: 180,\n interactive: false,\n trigger: 'manual',\n hideOnClick: false,\n // disable tooltip from displaying on touch devices\n touch: false,\n onMount: this.onMount,\n showOnCreate: this.internalShow,\n popperOptions: getPopperOptions({\n hasHideModifierEnabled: true,\n }),\n };\n },\n\n addExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n removeExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;AAkEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAeA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,GAAA,EAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAiBA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA,WAAA;AACA,eAAA,mBAAA,SAAA,SAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAiBA,QAAA;AAAA,MACA,MAAA,CAAA,SAAA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,WAAA;AACA,eAAA,sBAAA,SAAA,MAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AAA;AAAA,MACA,CAAA;AACA,OAAA,YAAA,cAAA,SAAA,EAAA,QAAA,cAAA;;AACA,mBAAA,WAAA,mBAAA,iBAAA,UAAA,CAAA,UAAA,KAAA,cAAA,KAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,IAEA,qCAAA;AACA,OAAA,WAAA,YAAA,EAAA,QAAA,cAAA;;AACA,mBAAA,WAAA,mBAAA,oBAAA,UAAA,CAAA,UAAA,KAAA,cAAA,KAAA;AAAA,MACA,CAAA;AACA,OAAA,YAAA,cAAA,SAAA,EAAA,QAAA,cAAA;;AACA,mBAAA,WAAA,mBAAA,oBAAA,UAAA,CAAA,UAAA,KAAA,cAAA,KAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -72,10 +72,7 @@ var _sfc_staticRenderFns = [];
|
|
|
72
72
|
var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.default(
|
|
73
73
|
_sfc_main,
|
|
74
74
|
_sfc_render,
|
|
75
|
-
_sfc_staticRenderFns
|
|
76
|
-
false,
|
|
77
|
-
null,
|
|
78
|
-
null
|
|
75
|
+
_sfc_staticRenderFns
|
|
79
76
|
);
|
|
80
77
|
const DtValidationMessages = __component__.exports;
|
|
81
78
|
exports.default = DtValidationMessages;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation_messages.vue.cjs","sources":["../../../components/validation_messages/validation_messages.vue"],"sourcesContent":["<template>\n <div\n v-if=\"showMessages && !isFilteredValidationMessagesEmpty\"\n class=\"base-input__messages d-validation-message__container\"\n data-qa=\"validation-messages-container\"\n >\n <div\n v-for=\"({ message, type }, index) in filteredValidationMessages\"\n :key=\"getMessageKey(type, index)\"\n role=\"status\"\n aria-live=\"polite\"\n data-qa=\"validation-message\"\n :class=\"[\n 'base-input__message',\n 'd-validation-message',\n messageTypeClass(type),\n ]\"\n >\n <p v-html=\"message\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { validationMessageValidator } from '@/common/validators';\nimport {\n getUniqueString,\n filterFormattedMessages,\n getValidationState,\n} from '@/common/utils';\n\n/**\n * Validation messages are used to convey information to the user about the current state of the input element.\n * These messages can have an error, warning or success type.\n * @see https://dialtone.dialpad.com/components/validation_messages.html\n */\nexport default {\n name: 'DtValidationMessages',\n\n props: {\n /**\n * The id of the validation message\n */\n id: {\n type: String,\n default () {\n return getUniqueString();\n },\n },\n\n /**\n * Array of validation messages. Each message has the following structure:\n * `{ message: \"Some informative message\", type: \"error|warning|success\"}`\n */\n validationMessages: {\n type: Array,\n default: () => [],\n validator: messages => validationMessageValidator(messages),\n },\n\n /**\n * Show Validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n },\n\n computed: {\n isFilteredValidationMessagesEmpty () {\n return this.filteredValidationMessages.length === 0;\n },\n\n filteredValidationMessages () {\n return filterFormattedMessages(this.validationMessages);\n },\n\n validationState () {\n return getValidationState(this.validationMessages);\n },\n },\n\n methods: {\n getMessageKey (type, index) {\n return `validation-message-${type}-${index}-${this.id}`;\n },\n\n messageTypeClass (type) {\n const messageTypesClasses = {\n error: 'base-input__message--error d-validation-message--error',\n warning: 'base-input__message--warning d-validation-message--warning',\n success: 'base-input__message--success d-validation-message--success',\n };\n\n return messageTypesClasses[type];\n },\n },\n};\n</script>\n"],"names":["getUniqueString","validationMessageValidator","filterFormattedMessages","getValidationState"],"mappings":";;;;;AAoCA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AACA,eAAAA,aAAA,gBAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,MACA,WAAA,cAAAC,kBAAA,2BAAA,QAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,oCAAA;AACA,aAAA,KAAA,2BAAA,WAAA;AAAA,IACA;AAAA,IAEA,6BAAA;AACA,aAAAC,aAAA,wBAAA,KAAA,kBAAA;AAAA,IACA;AAAA,IAEA,kBAAA;AACA,aAAAC,aAAA,mBAAA,KAAA,kBAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,cAAA,MAAA,OAAA;AACA,aAAA,sBAAA,IAAA,IAAA,KAAA,IAAA,KAAA,EAAA;AAAA,IACA;AAAA,IAEA,iBAAA,MAAA;AACA,YAAA,sBAAA;AAAA,QACA,OAAA;AAAA,QACA,SAAA;AAAA,QACA,SAAA;AAAA,MACA;AAEA,aAAA,oBAAA,IAAA;AAAA,IACA;AAAA,EACA;AACA
|
|
1
|
+
{"version":3,"file":"validation_messages.vue.cjs","sources":["../../../components/validation_messages/validation_messages.vue"],"sourcesContent":["<template>\n <div\n v-if=\"showMessages && !isFilteredValidationMessagesEmpty\"\n class=\"base-input__messages d-validation-message__container\"\n data-qa=\"validation-messages-container\"\n >\n <div\n v-for=\"({ message, type }, index) in filteredValidationMessages\"\n :key=\"getMessageKey(type, index)\"\n role=\"status\"\n aria-live=\"polite\"\n data-qa=\"validation-message\"\n :class=\"[\n 'base-input__message',\n 'd-validation-message',\n messageTypeClass(type),\n ]\"\n >\n <p v-html=\"message\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { validationMessageValidator } from '@/common/validators';\nimport {\n getUniqueString,\n filterFormattedMessages,\n getValidationState,\n} from '@/common/utils';\n\n/**\n * Validation messages are used to convey information to the user about the current state of the input element.\n * These messages can have an error, warning or success type.\n * @see https://dialtone.dialpad.com/components/validation_messages.html\n */\nexport default {\n name: 'DtValidationMessages',\n\n props: {\n /**\n * The id of the validation message\n */\n id: {\n type: String,\n default () {\n return getUniqueString();\n },\n },\n\n /**\n * Array of validation messages. Each message has the following structure:\n * `{ message: \"Some informative message\", type: \"error|warning|success\"}`\n */\n validationMessages: {\n type: Array,\n default: () => [],\n validator: messages => validationMessageValidator(messages),\n },\n\n /**\n * Show Validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n },\n\n computed: {\n isFilteredValidationMessagesEmpty () {\n return this.filteredValidationMessages.length === 0;\n },\n\n filteredValidationMessages () {\n return filterFormattedMessages(this.validationMessages);\n },\n\n validationState () {\n return getValidationState(this.validationMessages);\n },\n },\n\n methods: {\n getMessageKey (type, index) {\n return `validation-message-${type}-${index}-${this.id}`;\n },\n\n messageTypeClass (type) {\n const messageTypesClasses = {\n error: 'base-input__message--error d-validation-message--error',\n warning: 'base-input__message--warning d-validation-message--warning',\n success: 'base-input__message--success d-validation-message--success',\n };\n\n return messageTypesClasses[type];\n },\n },\n};\n</script>\n"],"names":["getUniqueString","validationMessageValidator","filterFormattedMessages","getValidationState"],"mappings":";;;;;AAoCA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AACA,eAAAA,aAAA,gBAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,MACA,WAAA,cAAAC,kBAAA,2BAAA,QAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,oCAAA;AACA,aAAA,KAAA,2BAAA,WAAA;AAAA,IACA;AAAA,IAEA,6BAAA;AACA,aAAAC,aAAA,wBAAA,KAAA,kBAAA;AAAA,IACA;AAAA,IAEA,kBAAA;AACA,aAAAC,aAAA,mBAAA,KAAA,kBAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,cAAA,MAAA,OAAA;AACA,aAAA,sBAAA,IAAA,IAAA,KAAA,IAAA,KAAA,EAAA;AAAA,IACA;AAAA,IAEA,iBAAA,MAAA;AACA,YAAA,sBAAA;AAAA,QACA,OAAA;AAAA,QACA,SAAA;AAAA,QACA,SAAA;AAAA,MACA;AAEA,aAAA,oBAAA,IAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -70,10 +70,7 @@ var _sfc_staticRenderFns = [];
|
|
|
70
70
|
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
71
71
|
_sfc_main,
|
|
72
72
|
_sfc_render,
|
|
73
|
-
_sfc_staticRenderFns
|
|
74
|
-
false,
|
|
75
|
-
null,
|
|
76
|
-
null
|
|
73
|
+
_sfc_staticRenderFns
|
|
77
74
|
);
|
|
78
75
|
const DtValidationMessages = __component__.exports;
|
|
79
76
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation_messages.vue.js","sources":["../../../components/validation_messages/validation_messages.vue"],"sourcesContent":["<template>\n <div\n v-if=\"showMessages && !isFilteredValidationMessagesEmpty\"\n class=\"base-input__messages d-validation-message__container\"\n data-qa=\"validation-messages-container\"\n >\n <div\n v-for=\"({ message, type }, index) in filteredValidationMessages\"\n :key=\"getMessageKey(type, index)\"\n role=\"status\"\n aria-live=\"polite\"\n data-qa=\"validation-message\"\n :class=\"[\n 'base-input__message',\n 'd-validation-message',\n messageTypeClass(type),\n ]\"\n >\n <p v-html=\"message\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { validationMessageValidator } from '@/common/validators';\nimport {\n getUniqueString,\n filterFormattedMessages,\n getValidationState,\n} from '@/common/utils';\n\n/**\n * Validation messages are used to convey information to the user about the current state of the input element.\n * These messages can have an error, warning or success type.\n * @see https://dialtone.dialpad.com/components/validation_messages.html\n */\nexport default {\n name: 'DtValidationMessages',\n\n props: {\n /**\n * The id of the validation message\n */\n id: {\n type: String,\n default () {\n return getUniqueString();\n },\n },\n\n /**\n * Array of validation messages. Each message has the following structure:\n * `{ message: \"Some informative message\", type: \"error|warning|success\"}`\n */\n validationMessages: {\n type: Array,\n default: () => [],\n validator: messages => validationMessageValidator(messages),\n },\n\n /**\n * Show Validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n },\n\n computed: {\n isFilteredValidationMessagesEmpty () {\n return this.filteredValidationMessages.length === 0;\n },\n\n filteredValidationMessages () {\n return filterFormattedMessages(this.validationMessages);\n },\n\n validationState () {\n return getValidationState(this.validationMessages);\n },\n },\n\n methods: {\n getMessageKey (type, index) {\n return `validation-message-${type}-${index}-${this.id}`;\n },\n\n messageTypeClass (type) {\n const messageTypesClasses = {\n error: 'base-input__message--error d-validation-message--error',\n warning: 'base-input__message--warning d-validation-message--warning',\n success: 'base-input__message--success d-validation-message--success',\n };\n\n return messageTypesClasses[type];\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;AAoCA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AACA,eAAA,gBAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,MACA,WAAA,cAAA,2BAAA,QAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,oCAAA;AACA,aAAA,KAAA,2BAAA,WAAA;AAAA,IACA;AAAA,IAEA,6BAAA;AACA,aAAA,wBAAA,KAAA,kBAAA;AAAA,IACA;AAAA,IAEA,kBAAA;AACA,aAAA,mBAAA,KAAA,kBAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,cAAA,MAAA,OAAA;AACA,aAAA,sBAAA,IAAA,IAAA,KAAA,IAAA,KAAA,EAAA;AAAA,IACA;AAAA,IAEA,iBAAA,MAAA;AACA,YAAA,sBAAA;AAAA,QACA,OAAA;AAAA,QACA,SAAA;AAAA,QACA,SAAA;AAAA,MACA;AAEA,aAAA,oBAAA,IAAA;AAAA,IACA;AAAA,EACA;AACA
|
|
1
|
+
{"version":3,"file":"validation_messages.vue.js","sources":["../../../components/validation_messages/validation_messages.vue"],"sourcesContent":["<template>\n <div\n v-if=\"showMessages && !isFilteredValidationMessagesEmpty\"\n class=\"base-input__messages d-validation-message__container\"\n data-qa=\"validation-messages-container\"\n >\n <div\n v-for=\"({ message, type }, index) in filteredValidationMessages\"\n :key=\"getMessageKey(type, index)\"\n role=\"status\"\n aria-live=\"polite\"\n data-qa=\"validation-message\"\n :class=\"[\n 'base-input__message',\n 'd-validation-message',\n messageTypeClass(type),\n ]\"\n >\n <p v-html=\"message\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { validationMessageValidator } from '@/common/validators';\nimport {\n getUniqueString,\n filterFormattedMessages,\n getValidationState,\n} from '@/common/utils';\n\n/**\n * Validation messages are used to convey information to the user about the current state of the input element.\n * These messages can have an error, warning or success type.\n * @see https://dialtone.dialpad.com/components/validation_messages.html\n */\nexport default {\n name: 'DtValidationMessages',\n\n props: {\n /**\n * The id of the validation message\n */\n id: {\n type: String,\n default () {\n return getUniqueString();\n },\n },\n\n /**\n * Array of validation messages. Each message has the following structure:\n * `{ message: \"Some informative message\", type: \"error|warning|success\"}`\n */\n validationMessages: {\n type: Array,\n default: () => [],\n validator: messages => validationMessageValidator(messages),\n },\n\n /**\n * Show Validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n },\n\n computed: {\n isFilteredValidationMessagesEmpty () {\n return this.filteredValidationMessages.length === 0;\n },\n\n filteredValidationMessages () {\n return filterFormattedMessages(this.validationMessages);\n },\n\n validationState () {\n return getValidationState(this.validationMessages);\n },\n },\n\n methods: {\n getMessageKey (type, index) {\n return `validation-message-${type}-${index}-${this.id}`;\n },\n\n messageTypeClass (type) {\n const messageTypesClasses = {\n error: 'base-input__message--error d-validation-message--error',\n warning: 'base-input__message--warning d-validation-message--warning',\n success: 'base-input__message--success d-validation-message--success',\n };\n\n return messageTypesClasses[type];\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;AAoCA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AACA,eAAA,gBAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,MACA,WAAA,cAAA,2BAAA,QAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,oCAAA;AACA,aAAA,KAAA,2BAAA,WAAA;AAAA,IACA;AAAA,IAEA,6BAAA;AACA,aAAA,wBAAA,KAAA,kBAAA;AAAA,IACA;AAAA,IAEA,kBAAA;AACA,aAAA,mBAAA,KAAA,kBAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,cAAA,MAAA,OAAA;AACA,aAAA,sBAAA,IAAA,IAAA,KAAA,IAAA,KAAA,EAAA;AAAA,IACA;AAAA,IAEA,iBAAA,MAAA;AACA,YAAA,sBAAA;AAAA,QACA,OAAA;AAAA,QACA,SAAA;AAAA,QACA,SAAA;AAAA,MACA;AAEA,aAAA,oBAAA,IAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const callbar_button_constants = require("./callbar_button_constants.cjs");
|
|
4
4
|
const common_utils = require("../../../common/utils.cjs");
|
|
5
|
-
;/* empty css */
|
|
6
5
|
const _pluginVue2_normalizer = require("../../../_virtual/_plugin-vue2_normalizer.cjs");
|
|
7
6
|
const button = require("../../../components/button/button.vue.cjs");
|
|
8
7
|
const tooltip = require("../../../components/tooltip/tooltip.vue.cjs");
|
|
@@ -97,6 +96,30 @@ const _sfc_main = {
|
|
|
97
96
|
importance: {
|
|
98
97
|
type: String,
|
|
99
98
|
default: ""
|
|
99
|
+
},
|
|
100
|
+
/**
|
|
101
|
+
* Whether the tooltip has an inverted background color.
|
|
102
|
+
* @values true, false
|
|
103
|
+
*/
|
|
104
|
+
invertedTooltip: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: false
|
|
107
|
+
},
|
|
108
|
+
/**
|
|
109
|
+
* Use this if you would like to manually override the logic for when the tooltip shows.
|
|
110
|
+
* Otherwise it will just show on hover/focus.
|
|
111
|
+
* @values null, true, false
|
|
112
|
+
*/
|
|
113
|
+
showTooltip: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
default: null
|
|
116
|
+
},
|
|
117
|
+
/**
|
|
118
|
+
* The message that displays in the tooltip. This will be overridden by the tooltip slot.
|
|
119
|
+
*/
|
|
120
|
+
tooltipText: {
|
|
121
|
+
type: String,
|
|
122
|
+
default: void 0
|
|
100
123
|
}
|
|
101
124
|
},
|
|
102
125
|
emits: [
|
|
@@ -112,12 +135,12 @@ const _sfc_main = {
|
|
|
112
135
|
callbarButtonClass() {
|
|
113
136
|
return [
|
|
114
137
|
this.buttonClass,
|
|
115
|
-
"
|
|
138
|
+
"d-recipe-callbar-button",
|
|
116
139
|
"d-px0",
|
|
117
140
|
{
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
141
|
+
"d-recipe-callbar-button--circle": this.circle,
|
|
142
|
+
"d-recipe-callbar-button--active": this.active,
|
|
143
|
+
"d-recipe-callbar-button--danger": this.danger,
|
|
121
144
|
"d-btn--disabled d-bgc-transparent": this.disabled,
|
|
122
145
|
"d-fc-primary": !this.disabled
|
|
123
146
|
}
|
|
@@ -155,20 +178,19 @@ const _sfc_main = {
|
|
|
155
178
|
};
|
|
156
179
|
var _sfc_render = function render() {
|
|
157
180
|
var _vm = this, _c = _vm._self._c;
|
|
158
|
-
return _c("dt-tooltip", { attrs: { "id": _vm.id, "offset": [0, 24] }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
|
|
159
|
-
return [_c("span", { class: { "
|
|
181
|
+
return _c("dt-tooltip", { attrs: { "id": _vm.id, "inverted": _vm.invertedTooltip, "show": _vm.showTooltip, "offset": [0, 24] }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
|
|
182
|
+
return [_c("span", { class: { "d-recipe-callbar-button--disabled": _vm.disabled } }, [_c("dt-button", _vm._g(_vm._b({ class: _vm.callbarButtonClass, attrs: { "importance": _vm.buttonImportance, "kind": "muted", "icon-position": "top", "aria-disabled": _vm.disabled, "aria-label": _vm.ariaLabel, "label-class": _vm.callbarButtonTextClass, "width": _vm.buttonWidth }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
160
183
|
return [_vm._t("icon")];
|
|
161
184
|
}, proxy: true }], null, true) }, "dt-button", _vm.$attrs, false), _vm.callbarButtonListeners), [_vm._t("default")], 2)], 1)];
|
|
162
|
-
}, proxy: true }], null, true) }, [_vm._t("tooltip"
|
|
185
|
+
}, proxy: true }], null, true) }, [_vm._t("tooltip", function() {
|
|
186
|
+
return [_vm._v(" " + _vm._s(_vm.tooltipText) + " ")];
|
|
187
|
+
})], 2);
|
|
163
188
|
};
|
|
164
189
|
var _sfc_staticRenderFns = [];
|
|
165
190
|
var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.default(
|
|
166
191
|
_sfc_main,
|
|
167
192
|
_sfc_render,
|
|
168
|
-
_sfc_staticRenderFns
|
|
169
|
-
false,
|
|
170
|
-
null,
|
|
171
|
-
null
|
|
193
|
+
_sfc_staticRenderFns
|
|
172
194
|
);
|
|
173
195
|
const DtRecipeCallbarButton = __component__.exports;
|
|
174
196
|
exports.default = DtRecipeCallbarButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callbar_button.vue.cjs","sources":["../../../../recipes/buttons/callbar_button/callbar_button.vue"],"sourcesContent":["<template>\n <dt-tooltip\n :id=\"id\"\n :offset=\"[0, 24]\"\n >\n <template #anchor>\n <span\n :class=\"{ '
|
|
1
|
+
{"version":3,"file":"callbar_button.vue.cjs","sources":["../../../../recipes/buttons/callbar_button/callbar_button.vue"],"sourcesContent":["<template>\n <dt-tooltip\n :id=\"id\"\n :inverted=\"invertedTooltip\"\n :show=\"showTooltip\"\n :offset=\"[0, 24]\"\n >\n <template #anchor>\n <span\n :class=\"{ 'd-recipe-callbar-button--disabled': disabled }\"\n >\n <dt-button\n :importance=\"buttonImportance\"\n kind=\"muted\"\n icon-position=\"top\"\n :aria-disabled=\"disabled\"\n :aria-label=\"ariaLabel\"\n :label-class=\"callbarButtonTextClass\"\n :width=\"buttonWidth\"\n :class=\"callbarButtonClass\"\n v-bind=\"$attrs\"\n v-on=\"callbarButtonListeners\"\n >\n <slot />\n <template #icon>\n <slot name=\"icon\" />\n </template>\n </dt-button>\n </span>\n </template>\n <slot name=\"tooltip\">\n {{ tooltipText }}\n </slot>\n </dt-tooltip>\n</template>\n\n<script>\nimport { CALLBAR_BUTTON_VALID_WIDTH_SIZE } from './callbar_button_constants';\nimport { DtButton } from '@/components/button';\nimport { DtTooltip } from '@/components/tooltip';\nimport utils from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButton',\n\n components: { DtButton, DtTooltip },\n\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 * 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 * 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 * Whether the button is a circle or not.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n circle: {\n type: Boolean,\n default: false,\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 * 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 * The fill and outline of the button associated with its visual importance.\n * @values clear, outlined, primary\n */\n importance: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n },\n\n emits: [\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n computed: {\n callbarButtonClass () {\n return [\n this.buttonClass,\n 'd-recipe-callbar-button',\n 'd-px0',\n {\n 'd-recipe-callbar-button--circle': this.circle,\n 'd-recipe-callbar-button--active': this.active,\n 'd-recipe-callbar-button--danger': this.danger,\n 'd-btn--disabled d-bgc-transparent': this.disabled,\n 'd-fc-primary': !this.disabled,\n }];\n },\n\n callbarButtonTextClass () {\n return [\n 'd-fs-100 lg:d-d-none md:d-d-none sm:d-d-none',\n this.textClass,\n ];\n },\n\n buttonWidth () {\n switch (this.buttonWidthSize) {\n case 'sm':\n return '4.5rem';\n case 'md':\n return '6rem';\n default:\n return '8.4rem';\n }\n },\n\n buttonImportance () {\n if (this.importance) {\n return this.importance;\n }\n return this.circle ? 'outlined' : 'clear';\n },\n\n callbarButtonListeners () {\n return {\n ...this.$listeners,\n click: (event) => this.$emit('click', event),\n };\n },\n },\n};\n</script>\n"],"names":["DtButton","DtTooltip","utils","this","CALLBAR_BUTTON_VALID_WIDTH_SIZE"],"mappings":";;;;;;;AA0CA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,UAAAA,OAAA,SAAA,WAAAC,gBAAA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AACA,eAAAC,aAAAA,QAAA;MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,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,iBAAA;AAAA,QACA,KAAA;AACA,iBAAA;AAAA,QACA,KAAA;AACA,iBAAA;AAAA,QACA;AACA,iBAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,mBAAA;AACA,UAAA,KAAA,YAAA;AACA,eAAA,KAAA;AAAA,MACA;AACA,aAAA,KAAA,SAAA,aAAA;AAAA,IACA;AAAA,IAEA,yBAAA;AACA,aAAA;AAAA,QACA,GAAA,KAAA;AAAA,QACA,OAAA,CAAA,UAAA,KAAA,MAAA,SAAA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CALLBAR_BUTTON_VALID_WIDTH_SIZE } from "./callbar_button_constants.js";
|
|
2
2
|
import utils from "../../../common/utils.js";
|
|
3
|
-
/* empty css */
|
|
4
3
|
import normalizeComponent from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
5
4
|
import DtButton from "../../../components/button/button.vue.js";
|
|
6
5
|
import DtTooltip from "../../../components/tooltip/tooltip.vue.js";
|
|
@@ -95,6 +94,30 @@ const _sfc_main = {
|
|
|
95
94
|
importance: {
|
|
96
95
|
type: String,
|
|
97
96
|
default: ""
|
|
97
|
+
},
|
|
98
|
+
/**
|
|
99
|
+
* Whether the tooltip has an inverted background color.
|
|
100
|
+
* @values true, false
|
|
101
|
+
*/
|
|
102
|
+
invertedTooltip: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
default: false
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* Use this if you would like to manually override the logic for when the tooltip shows.
|
|
108
|
+
* Otherwise it will just show on hover/focus.
|
|
109
|
+
* @values null, true, false
|
|
110
|
+
*/
|
|
111
|
+
showTooltip: {
|
|
112
|
+
type: Boolean,
|
|
113
|
+
default: null
|
|
114
|
+
},
|
|
115
|
+
/**
|
|
116
|
+
* The message that displays in the tooltip. This will be overridden by the tooltip slot.
|
|
117
|
+
*/
|
|
118
|
+
tooltipText: {
|
|
119
|
+
type: String,
|
|
120
|
+
default: void 0
|
|
98
121
|
}
|
|
99
122
|
},
|
|
100
123
|
emits: [
|
|
@@ -110,12 +133,12 @@ const _sfc_main = {
|
|
|
110
133
|
callbarButtonClass() {
|
|
111
134
|
return [
|
|
112
135
|
this.buttonClass,
|
|
113
|
-
"
|
|
136
|
+
"d-recipe-callbar-button",
|
|
114
137
|
"d-px0",
|
|
115
138
|
{
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
139
|
+
"d-recipe-callbar-button--circle": this.circle,
|
|
140
|
+
"d-recipe-callbar-button--active": this.active,
|
|
141
|
+
"d-recipe-callbar-button--danger": this.danger,
|
|
119
142
|
"d-btn--disabled d-bgc-transparent": this.disabled,
|
|
120
143
|
"d-fc-primary": !this.disabled
|
|
121
144
|
}
|
|
@@ -153,20 +176,19 @@ const _sfc_main = {
|
|
|
153
176
|
};
|
|
154
177
|
var _sfc_render = function render() {
|
|
155
178
|
var _vm = this, _c = _vm._self._c;
|
|
156
|
-
return _c("dt-tooltip", { attrs: { "id": _vm.id, "offset": [0, 24] }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
|
|
157
|
-
return [_c("span", { class: { "
|
|
179
|
+
return _c("dt-tooltip", { attrs: { "id": _vm.id, "inverted": _vm.invertedTooltip, "show": _vm.showTooltip, "offset": [0, 24] }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
|
|
180
|
+
return [_c("span", { class: { "d-recipe-callbar-button--disabled": _vm.disabled } }, [_c("dt-button", _vm._g(_vm._b({ class: _vm.callbarButtonClass, attrs: { "importance": _vm.buttonImportance, "kind": "muted", "icon-position": "top", "aria-disabled": _vm.disabled, "aria-label": _vm.ariaLabel, "label-class": _vm.callbarButtonTextClass, "width": _vm.buttonWidth }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
158
181
|
return [_vm._t("icon")];
|
|
159
182
|
}, proxy: true }], null, true) }, "dt-button", _vm.$attrs, false), _vm.callbarButtonListeners), [_vm._t("default")], 2)], 1)];
|
|
160
|
-
}, proxy: true }], null, true) }, [_vm._t("tooltip"
|
|
183
|
+
}, proxy: true }], null, true) }, [_vm._t("tooltip", function() {
|
|
184
|
+
return [_vm._v(" " + _vm._s(_vm.tooltipText) + " ")];
|
|
185
|
+
})], 2);
|
|
161
186
|
};
|
|
162
187
|
var _sfc_staticRenderFns = [];
|
|
163
188
|
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
164
189
|
_sfc_main,
|
|
165
190
|
_sfc_render,
|
|
166
|
-
_sfc_staticRenderFns
|
|
167
|
-
false,
|
|
168
|
-
null,
|
|
169
|
-
null
|
|
191
|
+
_sfc_staticRenderFns
|
|
170
192
|
);
|
|
171
193
|
const DtRecipeCallbarButton = __component__.exports;
|
|
172
194
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callbar_button.vue.js","sources":["../../../../recipes/buttons/callbar_button/callbar_button.vue"],"sourcesContent":["<template>\n <dt-tooltip\n :id=\"id\"\n :offset=\"[0, 24]\"\n >\n <template #anchor>\n <span\n :class=\"{ '
|
|
1
|
+
{"version":3,"file":"callbar_button.vue.js","sources":["../../../../recipes/buttons/callbar_button/callbar_button.vue"],"sourcesContent":["<template>\n <dt-tooltip\n :id=\"id\"\n :inverted=\"invertedTooltip\"\n :show=\"showTooltip\"\n :offset=\"[0, 24]\"\n >\n <template #anchor>\n <span\n :class=\"{ 'd-recipe-callbar-button--disabled': disabled }\"\n >\n <dt-button\n :importance=\"buttonImportance\"\n kind=\"muted\"\n icon-position=\"top\"\n :aria-disabled=\"disabled\"\n :aria-label=\"ariaLabel\"\n :label-class=\"callbarButtonTextClass\"\n :width=\"buttonWidth\"\n :class=\"callbarButtonClass\"\n v-bind=\"$attrs\"\n v-on=\"callbarButtonListeners\"\n >\n <slot />\n <template #icon>\n <slot name=\"icon\" />\n </template>\n </dt-button>\n </span>\n </template>\n <slot name=\"tooltip\">\n {{ tooltipText }}\n </slot>\n </dt-tooltip>\n</template>\n\n<script>\nimport { CALLBAR_BUTTON_VALID_WIDTH_SIZE } from './callbar_button_constants';\nimport { DtButton } from '@/components/button';\nimport { DtTooltip } from '@/components/tooltip';\nimport utils from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButton',\n\n components: { DtButton, DtTooltip },\n\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 * 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 * 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 * Whether the button is a circle or not.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n circle: {\n type: Boolean,\n default: false,\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 * 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 * The fill and outline of the button associated with its visual importance.\n * @values clear, outlined, primary\n */\n importance: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n },\n\n emits: [\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n computed: {\n callbarButtonClass () {\n return [\n this.buttonClass,\n 'd-recipe-callbar-button',\n 'd-px0',\n {\n 'd-recipe-callbar-button--circle': this.circle,\n 'd-recipe-callbar-button--active': this.active,\n 'd-recipe-callbar-button--danger': this.danger,\n 'd-btn--disabled d-bgc-transparent': this.disabled,\n 'd-fc-primary': !this.disabled,\n }];\n },\n\n callbarButtonTextClass () {\n return [\n 'd-fs-100 lg:d-d-none md:d-d-none sm:d-d-none',\n this.textClass,\n ];\n },\n\n buttonWidth () {\n switch (this.buttonWidthSize) {\n case 'sm':\n return '4.5rem';\n case 'md':\n return '6rem';\n default:\n return '8.4rem';\n }\n },\n\n buttonImportance () {\n if (this.importance) {\n return this.importance;\n }\n return this.circle ? 'outlined' : 'clear';\n },\n\n callbarButtonListeners () {\n return {\n ...this.$listeners,\n click: (event) => this.$emit('click', event),\n };\n },\n },\n};\n</script>\n"],"names":["this"],"mappings":";;;;;AA0CA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,UAAA,UAAA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AACA,eAAA,MAAA;MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAA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