@dialpad/dialtone 9.123.2 → 9.125.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 +12 -5
- package/dist/css/dialtone-default-theme.css +414 -77
- package/dist/css/dialtone-default-theme.min.css +1 -1
- package/dist/css/dialtone-docs.json +1 -1
- package/dist/css/dialtone.css +188 -68
- package/dist/css/dialtone.min.css +1 -1
- package/dist/css/svg/spot/playlist.svg +1 -0
- package/dist/css/vue/spot/SpotPlaylist.vue +3 -0
- package/dist/tokens/doc.json +24348 -24348
- package/dist/vue2/common/mixins/index.cjs +1 -1
- package/dist/vue2/common/mixins/index.js +10 -10
- package/dist/vue2/common/mixins/localization.cjs +2 -0
- package/dist/vue2/common/mixins/localization.cjs.map +1 -0
- package/dist/vue2/common/mixins/localization.js +10 -0
- package/dist/vue2/common/mixins/localization.js.map +1 -0
- package/dist/vue2/common/utils/index.cjs +1 -1
- package/dist/vue2/common/utils/index.cjs.map +1 -1
- package/dist/vue2/common/utils/index.js +43 -39
- package/dist/vue2/common/utils/index.js.map +1 -1
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/dialtone-vue.cjs +1 -1
- package/dist/vue2/dialtone-vue.js +341 -340
- package/dist/vue2/dialtone-vue.js.map +1 -1
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs +1 -1
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.js +61 -86
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.js.map +1 -1
- package/dist/vue2/lib/banner/banner.cjs +2 -2
- package/dist/vue2/lib/banner/banner.cjs.map +1 -1
- package/dist/vue2/lib/banner/banner.js +25 -33
- package/dist/vue2/lib/banner/banner.js.map +1 -1
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs +1 -1
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.js +14 -12
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.js.map +1 -1
- package/dist/vue2/lib/button/button.cjs +1 -1
- package/dist/vue2/lib/button/button.cjs.map +1 -1
- package/dist/vue2/lib/button/button.js +11 -9
- package/dist/vue2/lib/button/button.js.map +1 -1
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +19 -25
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js +18 -21
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
- package/dist/vue2/lib/chip/chip.cjs +1 -1
- package/dist/vue2/lib/chip/chip.cjs.map +1 -1
- package/dist/vue2/lib/chip/chip.js +24 -29
- package/dist/vue2/lib/chip/chip.js.map +1 -1
- package/dist/vue2/lib/combobox/combobox-constants.cjs +1 -1
- package/dist/vue2/lib/combobox/combobox-constants.cjs.map +1 -1
- package/dist/vue2/lib/combobox/combobox-constants.js +2 -2
- package/dist/vue2/lib/combobox/combobox-constants.js.map +1 -1
- package/dist/vue2/lib/combobox/combobox-empty-list.cjs.map +1 -1
- package/dist/vue2/lib/combobox/combobox-empty-list.js.map +1 -1
- package/dist/vue2/lib/combobox/combobox-loading-list.cjs.map +1 -1
- package/dist/vue2/lib/combobox/combobox-loading-list.js.map +1 -1
- package/dist/vue2/lib/combobox/combobox.cjs +2 -2
- package/dist/vue2/lib/combobox/combobox.cjs.map +1 -1
- package/dist/vue2/lib/combobox/combobox.js +12 -12
- package/dist/vue2/lib/combobox/combobox.js.map +1 -1
- package/dist/vue2/lib/combobox/index.cjs +1 -1
- package/dist/vue2/lib/combobox/index.js +3 -3
- package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
- package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
- package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js +19 -20
- package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
- package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
- package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
- package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js +22 -24
- package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs +1 -1
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.js +40 -36
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.js.map +1 -1
- package/dist/vue2/lib/contact-row/contact-row.cjs +1 -1
- package/dist/vue2/lib/contact-row/contact-row.cjs.map +1 -1
- package/dist/vue2/lib/contact-row/contact-row.js +11 -25
- package/dist/vue2/lib/contact-row/contact-row.js.map +1 -1
- package/dist/vue2/lib/datepicker/datepicker-constants.cjs +1 -1
- package/dist/vue2/lib/datepicker/datepicker-constants.cjs.map +1 -1
- package/dist/vue2/lib/datepicker/datepicker-constants.js +2 -3
- package/dist/vue2/lib/datepicker/datepicker-constants.js.map +1 -1
- package/dist/vue2/lib/datepicker/datepicker.cjs +1 -1
- package/dist/vue2/lib/datepicker/datepicker.cjs.map +1 -1
- package/dist/vue2/lib/datepicker/datepicker.js +143 -229
- package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
- package/dist/vue2/lib/datepicker/utils.cjs +1 -1
- package/dist/vue2/lib/datepicker/utils.cjs.map +1 -1
- package/dist/vue2/lib/datepicker/utils.js +12 -11
- package/dist/vue2/lib/datepicker/utils.js.map +1 -1
- package/dist/vue2/lib/description-list/description-list.cjs +1 -1
- package/dist/vue2/lib/description-list/description-list.cjs.map +1 -1
- package/dist/vue2/lib/description-list/description-list.js +8 -8
- package/dist/vue2/lib/description-list/description-list.js.map +1 -1
- package/dist/vue2/lib/dropdown/dropdown.cjs +1 -1
- package/dist/vue2/lib/dropdown/dropdown.cjs.map +1 -1
- package/dist/vue2/lib/dropdown/dropdown.js +48 -50
- package/dist/vue2/lib/dropdown/dropdown.js.map +1 -1
- package/dist/vue2/lib/editor/editor.cjs +1 -1
- package/dist/vue2/lib/editor/editor.cjs.map +1 -1
- package/dist/vue2/lib/editor/editor.js +78 -87
- package/dist/vue2/lib/editor/editor.js.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker-constants.cjs +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker-constants.js +6 -19
- package/dist/vue2/lib/emoji-picker/emoji-picker-constants.js.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker.cjs +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker.js +106 -145
- package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
- package/dist/vue2/lib/emoji-picker/index.cjs +1 -1
- package/dist/vue2/lib/emoji-picker/index.js +6 -7
- package/dist/vue2/lib/emoji-row/emoji-row-constants.cjs +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row-constants.cjs.map +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row-constants.js +5 -7
- package/dist/vue2/lib/emoji-row/emoji-row-constants.js.map +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row.cjs +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row.cjs.map +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row.js +31 -22
- package/dist/vue2/lib/emoji-row/emoji-row.js.map +1 -1
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs +1 -1
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.js +20 -22
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.js.map +1 -1
- package/dist/vue2/lib/general-row/general-row.cjs +1 -1
- package/dist/vue2/lib/general-row/general-row.cjs.map +1 -1
- package/dist/vue2/lib/general-row/general-row.js +63 -52
- package/dist/vue2/lib/general-row/general-row.js.map +1 -1
- package/dist/vue2/lib/group-row/group-row.cjs +1 -1
- package/dist/vue2/lib/group-row/group-row.cjs.map +1 -1
- package/dist/vue2/lib/group-row/group-row.js +43 -32
- package/dist/vue2/lib/group-row/group-row.js.map +1 -1
- package/dist/vue2/lib/icon/icon-constants.cjs.map +1 -1
- package/dist/vue2/lib/icon/icon-constants.js.map +1 -1
- package/dist/vue2/lib/icon/icon.cjs +1 -1
- package/dist/vue2/lib/icon/icon.cjs.map +1 -1
- package/dist/vue2/lib/icon/icon.js +12 -8
- package/dist/vue2/lib/icon/icon.js.map +1 -1
- package/dist/vue2/lib/image-viewer/image-viewer.cjs +1 -1
- package/dist/vue2/lib/image-viewer/image-viewer.cjs.map +1 -1
- package/dist/vue2/lib/image-viewer/image-viewer.js +30 -31
- package/dist/vue2/lib/image-viewer/image-viewer.js.map +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node-constants.cjs +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node-constants.cjs.map +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node-constants.js +24 -24
- package/dist/vue2/lib/ivr-node/ivr-node-constants.js.map +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node.cjs +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node.cjs.map +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node.js +38 -36
- package/dist/vue2/lib/ivr-node/ivr-node.js.map +1 -1
- package/dist/vue2/lib/message-input/message-input-link.cjs +1 -1
- package/dist/vue2/lib/message-input/message-input-link.cjs.map +1 -1
- package/dist/vue2/lib/message-input/message-input-link.js +48 -23
- package/dist/vue2/lib/message-input/message-input-link.js.map +1 -1
- package/dist/vue2/lib/message-input/message-input-topbar.cjs +1 -1
- package/dist/vue2/lib/message-input/message-input-topbar.cjs.map +1 -1
- package/dist/vue2/lib/message-input/message-input-topbar.js +50 -22
- package/dist/vue2/lib/message-input/message-input-topbar.js.map +1 -1
- package/dist/vue2/lib/message-input/message-input.cjs +1 -1
- package/dist/vue2/lib/message-input/message-input.cjs.map +1 -1
- package/dist/vue2/lib/message-input/message-input.js +112 -143
- package/dist/vue2/lib/message-input/message-input.js.map +1 -1
- package/dist/vue2/lib/modal/modal.cjs +1 -2
- package/dist/vue2/lib/modal/modal.cjs.map +1 -1
- package/dist/vue2/lib/modal/modal.js +25 -42
- package/dist/vue2/lib/modal/modal.js.map +1 -1
- package/dist/vue2/lib/notice/notice-action.cjs +1 -1
- package/dist/vue2/lib/notice/notice-action.cjs.map +1 -1
- package/dist/vue2/lib/notice/notice-action.js +19 -26
- package/dist/vue2/lib/notice/notice-action.js.map +1 -1
- package/dist/vue2/lib/notice/notice.cjs +1 -1
- package/dist/vue2/lib/notice/notice.cjs.map +1 -1
- package/dist/vue2/lib/notice/notice.js +18 -27
- package/dist/vue2/lib/notice/notice.js.map +1 -1
- package/dist/vue2/lib/pagination/pagination.cjs +1 -1
- package/dist/vue2/lib/pagination/pagination.cjs.map +1 -1
- package/dist/vue2/lib/pagination/pagination.js +49 -58
- package/dist/vue2/lib/pagination/pagination.js.map +1 -1
- package/dist/vue2/lib/popover/popover-header-footer.cjs +1 -1
- package/dist/vue2/lib/popover/popover-header-footer.cjs.map +1 -1
- package/dist/vue2/lib/popover/popover-header-footer.js +24 -26
- package/dist/vue2/lib/popover/popover-header-footer.js.map +1 -1
- package/dist/vue2/lib/popover/popover.cjs +1 -1
- package/dist/vue2/lib/popover/popover.cjs.map +1 -1
- package/dist/vue2/lib/popover/popover.js +26 -35
- package/dist/vue2/lib/popover/popover.js.map +1 -1
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +5 -5
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +330 -320
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/vue2/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
- package/dist/vue2/lib/settings-menu-button/settings-menu-button.js.map +1 -1
- package/dist/vue2/lib/time-pill/time-pill.cjs.map +1 -1
- package/dist/vue2/lib/time-pill/time-pill.js.map +1 -1
- package/dist/vue2/lib/toast/toast.cjs +1 -1
- package/dist/vue2/lib/toast/toast.cjs.map +1 -1
- package/dist/vue2/lib/toast/toast.js +64 -97
- package/dist/vue2/lib/toast/toast.js.map +1 -1
- package/dist/vue2/lib/unread-pill/unread-pill.cjs +1 -1
- package/dist/vue2/lib/unread-pill/unread-pill.cjs.map +1 -1
- package/dist/vue2/lib/unread-pill/unread-pill.js +27 -18
- package/dist/vue2/lib/unread-pill/unread-pill.js.map +1 -1
- package/dist/vue2/localization/en-US.cjs +185 -0
- package/dist/vue2/localization/en-US.cjs.map +1 -0
- package/dist/vue2/localization/en-US.js +188 -0
- package/dist/vue2/localization/en-US.js.map +1 -0
- package/dist/vue2/localization/es-LA.cjs +169 -0
- package/dist/vue2/localization/es-LA.cjs.map +1 -0
- package/dist/vue2/localization/es-LA.js +172 -0
- package/dist/vue2/localization/es-LA.js.map +1 -0
- package/dist/vue2/localization/index.cjs +1176 -0
- package/dist/vue2/localization/index.cjs.map +1 -0
- package/dist/vue2/localization/index.js +1239 -0
- package/dist/vue2/localization/index.js.map +1 -0
- package/dist/vue2/node_modules/@tiptap/vue-2.cjs.map +1 -1
- package/dist/vue2/node_modules/@tiptap/vue-2.js.map +1 -1
- package/dist/vue2/shared/sr_only_close_button.cjs +1 -1
- package/dist/vue2/shared/sr_only_close_button.cjs.map +1 -1
- package/dist/vue2/shared/sr_only_close_button.js +19 -22
- package/dist/vue2/shared/sr_only_close_button.js.map +1 -1
- package/dist/vue2/types/common/mixins/index.d.ts +1 -1
- package/dist/vue2/types/common/mixins/localization.d.ts +8 -0
- package/dist/vue2/types/common/mixins/localization.d.ts.map +1 -0
- package/dist/vue2/types/common/sr_only_close_button.vue.d.ts +7 -13
- package/dist/vue2/types/common/sr_only_close_button.vue.d.ts.map +1 -1
- package/dist/vue2/types/common/utils/index.d.ts +1 -0
- package/dist/vue2/types/common/utils/index.d.ts.map +1 -1
- package/dist/vue2/types/components/banner/banner.vue.d.ts +0 -33
- package/dist/vue2/types/components/banner/banner.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/breadcrumbs/breadcrumbs.vue.d.ts +5 -1
- package/dist/vue2/types/components/button/button.vue.d.ts +6 -2
- package/dist/vue2/types/components/chip/chip.vue.d.ts +8 -18
- package/dist/vue2/types/components/combobox/combobox_constants.d.ts +2 -2
- package/dist/vue2/types/components/combobox/index.d.ts +1 -1
- package/dist/vue2/types/components/datepicker/datepicker.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/datepicker/datepicker_constants.d.ts +0 -1
- package/dist/vue2/types/components/datepicker/datepicker_constants.d.ts.map +1 -1
- package/dist/vue2/types/components/datepicker/modules/calendar.vue.d.ts +5 -17
- package/dist/vue2/types/components/datepicker/modules/month-year-picker.vue.d.ts +8 -48
- package/dist/vue2/types/components/datepicker/utils.d.ts +1 -0
- package/dist/vue2/types/components/datepicker/utils.d.ts.map +1 -1
- package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts +0 -24
- package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/emoji_picker/emoji_picker.vue.d.ts +5 -1
- package/dist/vue2/types/components/emoji_picker/emoji_picker_constants.d.ts +0 -13
- package/dist/vue2/types/components/icon/icon.vue.d.ts +1 -0
- package/dist/vue2/types/components/icon/icon_constants.d.ts.map +1 -1
- package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts +5 -8
- package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/modal/modal.vue.d.ts +3 -33
- package/dist/vue2/types/components/notice/notice.vue.d.ts +1 -34
- package/dist/vue2/types/components/notice/notice.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/notice/notice_action.vue.d.ts +3 -31
- package/dist/vue2/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/pagination/pagination.vue.d.ts +9 -26
- package/dist/vue2/types/components/pagination/pagination.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/popover/popover.vue.d.ts +0 -33
- package/dist/vue2/types/components/popover/popover.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/popover/popover_header_footer.vue.d.ts +8 -11
- package/dist/vue2/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +15 -2
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +1 -43
- package/dist/vue2/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/toast/layouts/toast_layout_default.vue.d.ts +1 -34
- package/dist/vue2/types/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/toast/toast.vue.d.ts +3 -111
- package/dist/vue2/types/components/toast/toast.vue.d.ts.map +1 -1
- package/dist/vue2/types/index.d.ts +1 -0
- package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +7 -13
- package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +7 -12
- package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +8 -10
- package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/cards/ivr_node/ivr_node_constants.d.ts +7 -7
- package/dist/vue2/types/recipes/cards/ivr_node/ivr_node_constants.d.ts.map +1 -1
- package/dist/vue2/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -25
- package/dist/vue2/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -25
- package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +5 -41
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +8 -26
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +2 -2
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +20 -61
- 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 +6 -1
- package/dist/vue2/types/recipes/conversation_view/emoji_row/emoji_row_constants.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +9 -12
- package/dist/vue2/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +8 -2
- package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +15 -90
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +14 -2
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +14 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +10 -11
- package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -18
- package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts +21 -37
- package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/group_row/group_row.vue.d.ts +9 -18
- package/dist/vue2/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +7 -1
- package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js +3 -2
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
- package/package.json +4 -3
- package/dist/vue2/common/mixins/sr-only-close-button.cjs +0 -3
- package/dist/vue2/common/mixins/sr-only-close-button.cjs.map +0 -1
- package/dist/vue2/common/mixins/sr-only-close-button.js +0 -44
- package/dist/vue2/common/mixins/sr-only-close-button.js.map +0 -1
- package/dist/vue2/lib/contact-row/contact-row-constants.cjs +0 -2
- package/dist/vue2/lib/contact-row/contact-row-constants.cjs.map +0 -1
- package/dist/vue2/lib/contact-row/contact-row-constants.js +0 -5
- package/dist/vue2/lib/contact-row/contact-row-constants.js.map +0 -1
- package/dist/vue2/lib/emoji/emoji-constants.cjs +0 -2
- package/dist/vue2/lib/emoji/emoji-constants.cjs.map +0 -1
- package/dist/vue2/lib/emoji/emoji-constants.js +0 -5
- package/dist/vue2/lib/emoji/emoji-constants.js.map +0 -1
- package/dist/vue2/lib/group-row/group-row-constants.cjs +0 -2
- package/dist/vue2/lib/group-row/group-row-constants.cjs.map +0 -1
- package/dist/vue2/lib/group-row/group-row-constants.js +0 -8
- package/dist/vue2/lib/group-row/group-row-constants.js.map +0 -1
- package/dist/vue2/lib/time-pill/time-pill-constants.cjs +0 -2
- package/dist/vue2/lib/time-pill/time-pill-constants.cjs.map +0 -1
- package/dist/vue2/lib/time-pill/time-pill-constants.js +0 -8
- package/dist/vue2/lib/time-pill/time-pill-constants.js.map +0 -1
- package/dist/vue2/types/common/mixins/sr_only_close_button.d.ts +0 -30
- package/dist/vue2/types/common/mixins/sr_only_close_button.d.ts.map +0 -1
- package/dist/vue2/types/components/emoji/emoji_constants.d.ts +0 -3
- package/dist/vue2/types/components/emoji/emoji_constants.d.ts.map +0 -1
- package/dist/vue2/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts +0 -6
- package/dist/vue2/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts.map +0 -1
- package/dist/vue2/types/recipes/leftbar/contact_row/contact_row_constants.d.ts +0 -3
- package/dist/vue2/types/recipes/leftbar/contact_row/contact_row_constants.d.ts.map +0 -1
- package/dist/vue2/types/recipes/leftbar/group_row/group_row_constants.d.ts +0 -6
- package/dist/vue2/types/recipes/leftbar/group_row/group_row_constants.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./toast-constants.cjs"),a=require("../../common/utils/index.cjs"),s=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),c=require("../notice/notice-icon.cjs"),l=require("../notice/notice-content.cjs"),u=require("../notice/notice-action.cjs"),_=require("../notice/notice-constants.cjs"),i=require("@dialpad/dialtone-icons/vue2"),f=require("../icon/icon-constants.cjs"),p={name:"ToastLayoutDefault",components:{DtNoticeIcon:c.default,DtNoticeContent:l.default,DtNoticeAction:u.default},props:{isShown:{type:Boolean,default:!1},titleId:{type:String,default(){return a.default.getUniqueString()}},contentId:{type:String,default(){return a.default.getUniqueString()}},title:{type:String,default:""},message:{type:String,default:""},role:{type:String,default:"status",validator:e=>o.TOAST_ROLES.includes(e)},kind:{type:String,default:"base",validator:e=>_.NOTICE_KINDS.includes(e)},important:{type:Boolean,default:!1},hideClose:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1},hideAction:{type:Boolean,default:!1}},computed:{kindClass(){return{error:"d-toast--error",info:"d-toast--info",success:"d-toast--success",warning:"d-toast--warning",base:"d-toast--base"}[this.kind]}}};var h=function(){var t=this,n=t._self._c;return t.isShown?n("div",{class:["d-toast",t.kindClass,{"d-toast--important":t.important}],attrs:{"data-qa":"dt-toast","aria-hidden":(!t.isShown).toString()}},[n("div",{staticClass:"d-toast__dialog"},[t.hideIcon?t._e():n("dt-notice-icon",t._g({attrs:{kind:t.kind}},t.$listeners),[t._t("icon")],2),n("dt-notice-content",t._g({attrs:{"title-id":t.titleId,"content-id":t.contentId,title:t.title,role:t.role},scopedSlots:t._u([{key:"titleOverride",fn:function(){return[t._t("titleOverride")]},proxy:!0}],null,!0)},t.$listeners),[t._t("default",function(){return[t._v(" "+t._s(t.message)+" ")]})],2),n("dt-notice-action",t._g({attrs:{"hide-action":t.hideAction,"hide-close":t.hideClose}},t.$listeners),[t._t("action")],2)],1)]):t._e()},g=[],m=s.n(p,h,g);const r=m.exports,S=new Map([["info",i.DtIconInfo],["success",i.DtIconInfo],["warning",i.DtIconAlertTriangle],["error",i.DtIconInfo],["base",i.DtIconBell],["gradient",i.DtIconSparkle]]),y={name:"DtToastLayoutAlternateIcon",components:{DtIconInfo:i.DtIconInfo,DtIconAlertTriangle:i.DtIconAlertTriangle,DtIconBell:i.DtIconBell,DtIconSparkle:i.DtIconSparkle},props:{kind:{type:String,default:"base",validator(e){return o.TOAST_ALTERNATE_KINDS.includes(e)}},size:{type:String,default:"400",validator:e=>Object.keys(f.ICON_SIZE_MODIFIERS).includes(e)}},computed:{defaultIcon(){return S.get(this.kind)}}};var I=function(){var t=this,n=t._self._c;return n("div",{staticClass:"d-toast-layout-alternate__icon",attrs:{"aria-hidden":"true"}},[t._t("default",function(){return[t.defaultIcon?n(t.defaultIcon,{tag:"component",attrs:{size:t.size}}):t._e()]})],2)},v=[],T=s.n(y,I,v);const D=T.exports,k={name:"ToastLayoutAlternate",components:{DtNoticeAction:u.default,DtNoticeContent:l.default,DtToastLayoutAlternateIcon:D},props:{isShown:{type:Boolean,default:!1},titleId:{type:String,default(){return a.default.getUniqueString()}},contentId:{type:String,default(){return a.default.getUniqueString()}},title:{type:String,default:""},message:{type:String,default:""},role:{type:String,default:"status",validator:e=>o.TOAST_ROLES.includes(e)},kind:{type:String,default:"base",validator:e=>o.TOAST_ALTERNATE_KINDS.includes(e)},hideClose:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1}},computed:{kindClass(){return{error:"d-toast-alternate--error",info:"d-toast-alternate--info",success:"d-toast-alternate--success",warning:"d-toast-alternate--warning",gradient:"d-toast-alternate--gradient"}[this.kind]}}};var C=function(){var t=this,n=t._self._c;return t.isShown?n("div",{class:["d-toast-alternate",t.kindClass],attrs:{"data-qa":"dt-toast","aria-hidden":(!t.isShown).toString()}},[n("div",{staticClass:"d-toast-alternate__dialog"},[n("div",{staticClass:"d-toast-alternate__header"},[t.hideIcon?t._e():n("dt-toast-layout-alternate-icon",t._g({attrs:{kind:t.kind,size:"200"}},t.$listeners),[t._t("icon")],2),n("dt-notice-content",t._g({attrs:{"title-id":t.titleId,"content-id":t.contentId,title:t.title,role:t.role},scopedSlots:t._u([{key:"titleOverride",fn:function(){return[t._t("titleOverride")]},proxy:!0}],null,!0)},t.$listeners)),n("dt-notice-action",t._g({attrs:{"hide-action":!0,"hide-close":t.hideClose,"button-size":"xs"}},t.$listeners))],1),n("div",{staticClass:"d-toast-alternate__content"},[t._t("default",function(){return[t._v(" "+t._s(t.message)+" ")]})],2)])]):t._e()},A=[],w=s.n(k,C,A);const d=w.exports,O={name:"DtToast",components:{ToastLayoutDefault:r,ToastLayoutAlternate:d},props:{titleId:{type:String,default:void 0},contentId:{type:String,default:void 0},title:{type:String,default:void 0},message:{type:String,default:void 0},role:{type:String,default:"status"},kind:{type:String,default:void 0},important:{type:Boolean,default:!1},show:{type:Boolean,default:!1},hideClose:{type:Boolean,default:void 0},hideIcon:{type:Boolean,default:void 0},hideAction:{type:Boolean,default:void 0},duration:{type:Number,default:null,validator:e=>e>=o.TOAST_MIN_DURATION},layout:{type:String,default:"default",validator:e=>o.TOAST_LAYOUTS.includes(e)}},emits:["close","update:show"],data(){return{isShown:!1,minDuration:o.TOAST_MIN_DURATION}},computed:{shouldSetTimeout(){return!!this.duration&&this.duration>=this.minDuration},selectedLayout(){return this.layout==="alternate"?d:r}},watch:{show:{handler:function(e){this.isShown=e,e?this.setTimeout():clearTimeout(this.displayTimer)},immediate:!0}},destroyed(){this.shouldSetTimeout&&clearTimeout(this.displayTimer)},methods:{setTimeout(){this.shouldSetTimeout&&(this.displayTimer=setTimeout(()=>{this.isShown=!1,this.$emit("update:show",!1)},this.duration))},handleClose(){this.isShown=!1,this.$emit("update:show",!1)}}};var $=function(){var t=this,n=t._self._c;return n(t.selectedLayout,t._g({tag:"component",attrs:{"is-shown":t.isShown,"title-id":t.titleId,"content-id":t.contentId,title:t.title,message:t.message,role:t.role,kind:t.kind,important:t.important,"hide-close":t.hideClose,"hide-icon":t.hideIcon,"hide-action":t.hideAction},on:{close:t.handleClose},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("icon")]},proxy:!0},{key:"titleOverride",fn:function(){return[t._t("titleOverride")]},proxy:!0},{key:"action",fn:function(){return[t._t("action")]},proxy:!0}],null,!0)},t.$listeners),[t._t("default",function(){return[t._v(" "+t._s(t.message)+" ")]})],2)},b=[],N=s.n(O,$,b);const B=N.exports;exports.default=B;
|
|
2
2
|
//# sourceMappingURL=toast.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.cjs","sources":["../../../components/toast/layouts/toast_layout_default.vue","../../../components/toast/layouts/toast_layout_alternate_icon.vue","../../../components/toast/layouts/toast_layout_alternate.vue","../../../components/toast/toast.vue"],"sourcesContent":["<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-on=\"$listeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n :close-button-props=\"closeButtonProps\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n v-on=\"$listeners\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport { TOAST_ROLES } from '../toast_constants.js';\nexport default {\n name: 'ToastLayoutDefault',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast--error',\n info: 'd-toast--info',\n success: 'd-toast--success',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n },\n};\n</script>\n","<template>\n <div\n aria-hidden=\"true\"\n class=\"d-toast-layout-alternate__icon\"\n >\n <slot>\n <component\n :is=\"defaultIcon\"\n v-if=\"defaultIcon\"\n :size=\"size\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n} from '@dialpad/dialtone-icons/vue2';\nimport { TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nimport { ICON_SIZE_MODIFIERS } from '@/components/icon/icon_constants.js';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['success', DtIconInfo],\n ['warning', DtIconAlertTriangle],\n ['error', DtIconInfo],\n ['base', DtIconBell],\n ['gradient', DtIconSparkle],\n]);\n\nexport default {\n name: 'DtToastLayoutAlternateIcon',\n components: {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator (kind) {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n size: {\n type: String,\n default: '400',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n","<!-- eslint-disable vue/no-bare-strings-in-template -->\n<!-- stub for the new alternate toast layout -->\n<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast-alternate',\n kindClass,\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast-alternate__dialog\">\n <div class=\"d-toast-alternate__header\">\n <dt-toast-layout-alternate-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n size=\"200\"\n v-on=\"$listeners\"\n >\n <slot name=\"icon\" />\n </dt-toast-layout-alternate-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <slot name=\"titleOverride\" />\n </template>\n </dt-notice-content>\n\n <!-- Close Button -->\n <dt-notice-action\n :hide-action=\"true\"\n :hide-close=\"hideClose\"\n button-size=\"xs\"\n :close-button-props=\"closeButtonProps\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n v-on=\"$listeners\"\n />\n </div>\n <!-- Content Section -->\n <div class=\"d-toast-alternate__content\">\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport DtToastLayoutAlternateIcon from './toast_layout_alternate_icon.vue';\nimport { DtNoticeAction, DtNoticeContent } from '@/components/notice';\nimport { TOAST_ROLES, TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nexport default {\n name: 'ToastLayoutAlternate',\n\n components: {\n DtNoticeAction,\n DtNoticeContent,\n DtToastLayoutAlternateIcon,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast-alternate--error',\n info: 'd-toast-alternate--info',\n success: 'd-toast-alternate--success',\n warning: 'd-toast-alternate--warning',\n gradient: 'd-toast-alternate--gradient',\n };\n\n return kindClasses[this.kind];\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"selectedLayout\"\n :is-shown=\"isShown\"\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :message=\"message\"\n :role=\"role\"\n :kind=\"kind\"\n :important=\"important\"\n :close-button-props=\"closeButtonProps\"\n :hide-close=\"hideClose\"\n :hide-icon=\"hideIcon\"\n :hide-action=\"hideAction\"\n v-on=\"$listeners\"\n @close=\"handleClose\"\n >\n <!-- @slot Slot for custom icon -->\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <template #action>\n <slot name=\"action\" />\n </template>\n </component>\n</template>\n\n<script>\nimport { TOAST_MIN_DURATION, TOAST_LAYOUTS } from './toast_constants.js';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport ToastLayoutDefault from './layouts/toast_layout_default.vue';\nimport ToastLayoutAlternate from './layouts/toast_layout_alternate.vue';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n name: 'DtToast',\n\n components: {\n ToastLayoutDefault,\n ToastLayoutAlternate,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: undefined,\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n },\n\n /**\n * Severity level of the toast, could be different depending on which toast layout is used.\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: undefined,\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `.sync` modifier with this prop to update\n * the data in your component.\n * Supports .sync modifier\n * @values true, false\n */\n show: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: undefined,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n\n /**\n * The layout / styling you wish to use for the toast.\n * @values default, alternate\n */\n layout: {\n type: String,\n default: 'default',\n validator: (layout) => {\n return TOAST_LAYOUTS.includes(layout);\n },\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n\n selectedLayout () {\n return this.layout === 'alternate' ? ToastLayoutAlternate : ToastLayoutDefault;\n },\n },\n\n watch: {\n show: {\n handler: function (show) {\n this.isShown = show;\n if (show) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n destroyed () {\n if (this.shouldSetTimeout) {\n clearTimeout(this.displayTimer);\n }\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:show', false);\n }, this.duration);\n }\n },\n\n handleClose () {\n this.isShown = false;\n this.$emit('update:show', false);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","SrOnlyCloseButtonMixin","utils","role","TOAST_ROLES","kind","NOTICE_KINDS","kindToIcon","DtIconInfo","DtIconAlertTriangle","DtIconBell","DtIconSparkle","TOAST_ALTERNATE_KINDS","s","ICON_SIZE_MODIFIERS","DtToastLayoutAlternateIcon","ToastLayoutDefault","ToastLayoutAlternate","duration","TOAST_MIN_DURATION","layout","TOAST_LAYOUTS","show"],"mappings":"yiBAyDAA,EAAA,CACA,KAAA,qBAEA,WAAA,CACA,aAAAC,EAAA,QACA,gBAAAC,EAAA,QACA,eAAAC,EAAA,OACA,EAEA,OAAA,CAAAC,EAAAA,OAAA,EAEA,MAAA,CACA,QAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,QAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAC,UAAA,gBAAA,CAAA,CACA,EAMA,UAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAA,UAAA,gBAAA,CAAA,CACA,EAKA,MAAA,CACA,KAAA,OACA,QAAA,EACA,EAKA,QAAA,CACA,KAAA,OACA,QAAA,EACA,EAOA,KAAA,CACA,KAAA,OACA,QAAA,SACA,UAAAC,GACAC,EAAA,YAAA,SAAAD,CAAA,CAEA,EAMA,KAAA,CACA,KAAA,OACA,QAAA,OACA,UAAAE,GACAC,EAAA,aAAA,SAAAD,CAAA,CAEA,EAMA,UAAA,CACA,KAAA,QACA,QAAA,EACA,EAKA,iBAAA,CACA,KAAA,OACA,QAAA,KAAA,CAAA,EACA,EAMA,UAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,SAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,WAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,EAEA,SAAA,CACA,WAAA,CASA,MARA,CACA,MAAA,iBACA,KAAA,gBACA,QAAA,mBACA,QAAA,mBACA,KAAA,eACA,EAEA,KAAA,IAAA,CACA,CACA,CACA,y7BCtKAE,EAAA,IAAA,IAAA,CACA,CAAA,OAAAC,EA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EAAA,CACA,KAAA,QAAAA,EACAA,EACA,KAAA,WAAA,EAEA,aAAA,KAAA,YAAA,CAEA,EAEA,UAAA,EACA,CACA,EAEA,WAAA,CACA,KAAA,kBACA,aAAA,KAAA,YAAA,CAEA,EAEA,QAAA,CACA,YAAA,CACA,KAAA,mBACA,KAAA,aAAA,WAAA,IAAA,CACA,KAAA,QAAA,GACA,KAAA,MAAA,cAAA,EAAA,CACA,EAAA,KAAA,QAAA,EAEA,EAEA,aAAA,CACA,KAAA,QAAA,GACA,KAAA,MAAA,cAAA,EAAA,CACA,CACA,CACA"}
|
|
1
|
+
{"version":3,"file":"toast.cjs","sources":["../../../components/toast/layouts/toast_layout_default.vue","../../../components/toast/layouts/toast_layout_alternate_icon.vue","../../../components/toast/layouts/toast_layout_alternate.vue","../../../components/toast/toast.vue"],"sourcesContent":["<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-on=\"$listeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n v-on=\"$listeners\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport { TOAST_ROLES } from '../toast_constants.js';\nexport default {\n name: 'ToastLayoutDefault',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast--error',\n info: 'd-toast--info',\n success: 'd-toast--success',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n },\n};\n</script>\n","<template>\n <div\n aria-hidden=\"true\"\n class=\"d-toast-layout-alternate__icon\"\n >\n <slot>\n <component\n :is=\"defaultIcon\"\n v-if=\"defaultIcon\"\n :size=\"size\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n} from '@dialpad/dialtone-icons/vue2';\nimport { TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nimport { ICON_SIZE_MODIFIERS } from '@/components/icon/icon_constants.js';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['success', DtIconInfo],\n ['warning', DtIconAlertTriangle],\n ['error', DtIconInfo],\n ['base', DtIconBell],\n ['gradient', DtIconSparkle],\n]);\n\nexport default {\n name: 'DtToastLayoutAlternateIcon',\n components: {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator (kind) {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n size: {\n type: String,\n default: '400',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n","<!-- eslint-disable vue/no-bare-strings-in-template -->\n<!-- stub for the new alternate toast layout -->\n<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast-alternate',\n kindClass,\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast-alternate__dialog\">\n <div class=\"d-toast-alternate__header\">\n <dt-toast-layout-alternate-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n size=\"200\"\n v-on=\"$listeners\"\n >\n <slot name=\"icon\" />\n </dt-toast-layout-alternate-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <slot name=\"titleOverride\" />\n </template>\n </dt-notice-content>\n\n <!-- Close Button -->\n <dt-notice-action\n :hide-action=\"true\"\n :hide-close=\"hideClose\"\n button-size=\"xs\"\n v-on=\"$listeners\"\n />\n </div>\n <!-- Content Section -->\n <div class=\"d-toast-alternate__content\">\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport DtToastLayoutAlternateIcon from './toast_layout_alternate_icon.vue';\nimport { DtNoticeAction, DtNoticeContent } from '@/components/notice';\nimport { TOAST_ROLES, TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nexport default {\n name: 'ToastLayoutAlternate',\n\n components: {\n DtNoticeAction,\n DtNoticeContent,\n DtToastLayoutAlternateIcon,\n },\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast-alternate--error',\n info: 'd-toast-alternate--info',\n success: 'd-toast-alternate--success',\n warning: 'd-toast-alternate--warning',\n gradient: 'd-toast-alternate--gradient',\n };\n\n return kindClasses[this.kind];\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"selectedLayout\"\n :is-shown=\"isShown\"\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :message=\"message\"\n :role=\"role\"\n :kind=\"kind\"\n :important=\"important\"\n :hide-close=\"hideClose\"\n :hide-icon=\"hideIcon\"\n :hide-action=\"hideAction\"\n v-on=\"$listeners\"\n @close=\"handleClose\"\n >\n <!-- @slot Slot for custom icon -->\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <template #action>\n <slot name=\"action\" />\n </template>\n </component>\n</template>\n\n<script>\nimport { TOAST_MIN_DURATION, TOAST_LAYOUTS } from './toast_constants.js';\nimport ToastLayoutDefault from './layouts/toast_layout_default.vue';\nimport ToastLayoutAlternate from './layouts/toast_layout_alternate.vue';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n name: 'DtToast',\n\n components: {\n ToastLayoutDefault,\n ToastLayoutAlternate,\n },\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: undefined,\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n },\n\n /**\n * Severity level of the toast, could be different depending on which toast layout is used.\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: undefined,\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `.sync` modifier with this prop to update\n * the data in your component.\n * Supports .sync modifier\n * @values true, false\n */\n show: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n\n /**\n * The layout / styling you wish to use for the toast.\n * @values default, alternate\n */\n layout: {\n type: String,\n default: 'default',\n validator: (layout) => {\n return TOAST_LAYOUTS.includes(layout);\n },\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n\n selectedLayout () {\n return this.layout === 'alternate' ? ToastLayoutAlternate : ToastLayoutDefault;\n },\n },\n\n watch: {\n show: {\n handler: function (show) {\n this.isShown = show;\n if (show) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n destroyed () {\n if (this.shouldSetTimeout) {\n clearTimeout(this.displayTimer);\n }\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:show', false);\n }, this.duration);\n }\n },\n\n handleClose () {\n this.isShown = false;\n this.$emit('update:show', false);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","utils","role","TOAST_ROLES","kind","NOTICE_KINDS","kindToIcon","DtIconInfo","DtIconAlertTriangle","DtIconBell","DtIconSparkle","TOAST_ALTERNATE_KINDS","s","ICON_SIZE_MODIFIERS","DtToastLayoutAlternateIcon","ToastLayoutDefault","ToastLayoutAlternate","duration","TOAST_MIN_DURATION","layout","TOAST_LAYOUTS","show"],"mappings":"+eAqDAA,EAAA,CACA,KAAA,qBAEA,WAAA,CACA,aAAAC,EAAA,QACA,gBAAAC,EAAA,QACA,eAAAC,EAAA,OACA,EAEA,MAAA,CACA,QAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,QAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAC,UAAA,gBAAA,CAAA,CACA,EAMA,UAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAA,UAAA,gBAAA,CAAA,CACA,EAKA,MAAA,CACA,KAAA,OAC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OAAA,CACA,KAAA,OACA,QAAA,UACA,UAAAC,GACAC,EAAA,cAAA,SAAAD,CAAA,CAEA,CACA,EAEA,MAAA,CAMA,QAOA,aACA,EAEA,MAAA,CACA,MAAA,CACA,QAAA,GACA,YAAAD,EAAA,kBACA,CACA,EAEA,SAAA,CACA,kBAAA,CACA,MAAA,CAAA,CAAA,KAAA,UAAA,KAAA,UAAA,KAAA,WACA,EAEA,gBAAA,CACA,OAAA,KAAA,SAAA,YAAAF,EAAAD,CACA,CACA,EAEA,MAAA,CACA,KAAA,CACA,QAAA,SAAAM,EAAA,CACA,KAAA,QAAAA,EACAA,EACA,KAAA,WAAA,EAEA,aAAA,KAAA,YAAA,CAEA,EAEA,UAAA,EACA,CACA,EAEA,WAAA,CACA,KAAA,kBACA,aAAA,KAAA,YAAA,CAEA,EAEA,QAAA,CACA,YAAA,CACA,KAAA,mBACA,KAAA,aAAA,WAAA,IAAA,CACA,KAAA,QAAA,GACA,KAAA,MAAA,cAAA,EAAA,CACA,EAAA,KAAA,QAAA,EAEA,EAEA,aAAA,CACA,KAAA,QAAA,GACA,KAAA,MAAA,cAAA,EAAA,CACA,CACA,CACA"}
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import { TOAST_ROLES as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import f from "../notice/notice-
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
const I = {
|
|
1
|
+
import { TOAST_ROLES as l, TOAST_ALTERNATE_KINDS as u, TOAST_MIN_DURATION as s, TOAST_LAYOUTS as h } from "./toast-constants.js";
|
|
2
|
+
import o from "../../common/utils/index.js";
|
|
3
|
+
import { n as a } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
|
|
4
|
+
import y from "../notice/notice-icon.js";
|
|
5
|
+
import c from "../notice/notice-content.js";
|
|
6
|
+
import f from "../notice/notice-action.js";
|
|
7
|
+
import { NOTICE_KINDS as g } from "../notice/notice-constants.js";
|
|
8
|
+
import { DtIconInfo as i, DtIconAlertTriangle as _, DtIconBell as p, DtIconSparkle as m } from "@dialpad/dialtone-icons/vue2";
|
|
9
|
+
import { ICON_SIZE_MODIFIERS as S } from "../icon/icon-constants.js";
|
|
10
|
+
const v = {
|
|
12
11
|
name: "ToastLayoutDefault",
|
|
13
12
|
components: {
|
|
14
|
-
DtNoticeIcon:
|
|
15
|
-
DtNoticeContent:
|
|
16
|
-
DtNoticeAction:
|
|
13
|
+
DtNoticeIcon: y,
|
|
14
|
+
DtNoticeContent: c,
|
|
15
|
+
DtNoticeAction: f
|
|
17
16
|
},
|
|
18
|
-
mixins: [a],
|
|
19
17
|
props: {
|
|
20
18
|
isShown: {
|
|
21
19
|
type: Boolean,
|
|
@@ -28,7 +26,7 @@ const I = {
|
|
|
28
26
|
titleId: {
|
|
29
27
|
type: String,
|
|
30
28
|
default() {
|
|
31
|
-
return
|
|
29
|
+
return o.getUniqueString();
|
|
32
30
|
}
|
|
33
31
|
},
|
|
34
32
|
/**
|
|
@@ -38,7 +36,7 @@ const I = {
|
|
|
38
36
|
contentId: {
|
|
39
37
|
type: String,
|
|
40
38
|
default() {
|
|
41
|
-
return
|
|
39
|
+
return o.getUniqueString();
|
|
42
40
|
}
|
|
43
41
|
},
|
|
44
42
|
/**
|
|
@@ -63,7 +61,7 @@ const I = {
|
|
|
63
61
|
role: {
|
|
64
62
|
type: String,
|
|
65
63
|
default: "status",
|
|
66
|
-
validator: (e) =>
|
|
64
|
+
validator: (e) => l.includes(e)
|
|
67
65
|
},
|
|
68
66
|
/**
|
|
69
67
|
* Severity level of the toast, sets the icon and background
|
|
@@ -72,7 +70,7 @@ const I = {
|
|
|
72
70
|
kind: {
|
|
73
71
|
type: String,
|
|
74
72
|
default: "base",
|
|
75
|
-
validator: (e) =>
|
|
73
|
+
validator: (e) => g.includes(e)
|
|
76
74
|
},
|
|
77
75
|
/**
|
|
78
76
|
* Used in scenarios where the message needs to visually dominate the screen.
|
|
@@ -82,13 +80,6 @@ const I = {
|
|
|
82
80
|
type: Boolean,
|
|
83
81
|
default: !1
|
|
84
82
|
},
|
|
85
|
-
/**
|
|
86
|
-
* Props for the toast close button.
|
|
87
|
-
*/
|
|
88
|
-
closeButtonProps: {
|
|
89
|
-
type: Object,
|
|
90
|
-
default: () => ({})
|
|
91
|
-
},
|
|
92
83
|
/**
|
|
93
84
|
* Hides the close button from the toast
|
|
94
85
|
* @values true, false
|
|
@@ -126,7 +117,7 @@ const I = {
|
|
|
126
117
|
}
|
|
127
118
|
}
|
|
128
119
|
};
|
|
129
|
-
var
|
|
120
|
+
var I = function() {
|
|
130
121
|
var t = this, n = t._self._c;
|
|
131
122
|
return t.isShown ? n("div", { class: [
|
|
132
123
|
"d-toast",
|
|
@@ -136,26 +127,26 @@ var T = function() {
|
|
|
136
127
|
return [t._t("titleOverride")];
|
|
137
128
|
}, proxy: !0 }], null, !0) }, t.$listeners), [t._t("default", function() {
|
|
138
129
|
return [t._v(" " + t._s(t.message) + " ")];
|
|
139
|
-
})], 2), n("dt-notice-action", t._g({ attrs: { "hide-action": t.hideAction, "hide-close": t.hideClose
|
|
140
|
-
},
|
|
130
|
+
})], 2), n("dt-notice-action", t._g({ attrs: { "hide-action": t.hideAction, "hide-close": t.hideClose } }, t.$listeners), [t._t("action")], 2)], 1)]) : t._e();
|
|
131
|
+
}, T = [], k = /* @__PURE__ */ a(
|
|
132
|
+
v,
|
|
141
133
|
I,
|
|
142
|
-
T
|
|
143
|
-
C
|
|
134
|
+
T
|
|
144
135
|
);
|
|
145
|
-
const
|
|
146
|
-
["info",
|
|
147
|
-
["success",
|
|
136
|
+
const r = k.exports, C = /* @__PURE__ */ new Map([
|
|
137
|
+
["info", i],
|
|
138
|
+
["success", i],
|
|
148
139
|
["warning", _],
|
|
149
|
-
["error",
|
|
150
|
-
["base",
|
|
151
|
-
["gradient",
|
|
152
|
-
]),
|
|
140
|
+
["error", i],
|
|
141
|
+
["base", p],
|
|
142
|
+
["gradient", m]
|
|
143
|
+
]), w = {
|
|
153
144
|
name: "DtToastLayoutAlternateIcon",
|
|
154
145
|
components: {
|
|
155
|
-
DtIconInfo:
|
|
146
|
+
DtIconInfo: i,
|
|
156
147
|
DtIconAlertTriangle: _,
|
|
157
|
-
DtIconBell:
|
|
158
|
-
DtIconSparkle:
|
|
148
|
+
DtIconBell: p,
|
|
149
|
+
DtIconSparkle: m
|
|
159
150
|
},
|
|
160
151
|
props: {
|
|
161
152
|
/**
|
|
@@ -166,39 +157,38 @@ const l = k.exports, w = /* @__PURE__ */ new Map([
|
|
|
166
157
|
type: String,
|
|
167
158
|
default: "base",
|
|
168
159
|
validator(e) {
|
|
169
|
-
return
|
|
160
|
+
return u.includes(e);
|
|
170
161
|
}
|
|
171
162
|
},
|
|
172
163
|
size: {
|
|
173
164
|
type: String,
|
|
174
165
|
default: "400",
|
|
175
|
-
validator: (e) => Object.keys(
|
|
166
|
+
validator: (e) => Object.keys(S).includes(e)
|
|
176
167
|
}
|
|
177
168
|
},
|
|
178
169
|
computed: {
|
|
179
170
|
defaultIcon() {
|
|
180
|
-
return
|
|
171
|
+
return C.get(this.kind);
|
|
181
172
|
}
|
|
182
173
|
}
|
|
183
174
|
};
|
|
184
|
-
var
|
|
175
|
+
var $ = function() {
|
|
185
176
|
var t = this, n = t._self._c;
|
|
186
177
|
return n("div", { staticClass: "d-toast-layout-alternate__icon", attrs: { "aria-hidden": "true" } }, [t._t("default", function() {
|
|
187
178
|
return [t.defaultIcon ? n(t.defaultIcon, { tag: "component", attrs: { size: t.size } }) : t._e()];
|
|
188
179
|
})], 2);
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
180
|
+
}, A = [], D = /* @__PURE__ */ a(
|
|
181
|
+
w,
|
|
182
|
+
$,
|
|
183
|
+
A
|
|
193
184
|
);
|
|
194
|
-
const
|
|
185
|
+
const O = D.exports, B = {
|
|
195
186
|
name: "ToastLayoutAlternate",
|
|
196
187
|
components: {
|
|
197
|
-
DtNoticeAction:
|
|
198
|
-
DtNoticeContent:
|
|
199
|
-
DtToastLayoutAlternateIcon:
|
|
188
|
+
DtNoticeAction: f,
|
|
189
|
+
DtNoticeContent: c,
|
|
190
|
+
DtToastLayoutAlternateIcon: O
|
|
200
191
|
},
|
|
201
|
-
mixins: [a],
|
|
202
192
|
props: {
|
|
203
193
|
isShown: {
|
|
204
194
|
type: Boolean,
|
|
@@ -211,7 +201,7 @@ const A = b.exports, D = {
|
|
|
211
201
|
titleId: {
|
|
212
202
|
type: String,
|
|
213
203
|
default() {
|
|
214
|
-
return
|
|
204
|
+
return o.getUniqueString();
|
|
215
205
|
}
|
|
216
206
|
},
|
|
217
207
|
/**
|
|
@@ -221,7 +211,7 @@ const A = b.exports, D = {
|
|
|
221
211
|
contentId: {
|
|
222
212
|
type: String,
|
|
223
213
|
default() {
|
|
224
|
-
return
|
|
214
|
+
return o.getUniqueString();
|
|
225
215
|
}
|
|
226
216
|
},
|
|
227
217
|
/**
|
|
@@ -246,7 +236,7 @@ const A = b.exports, D = {
|
|
|
246
236
|
role: {
|
|
247
237
|
type: String,
|
|
248
238
|
default: "status",
|
|
249
|
-
validator: (e) =>
|
|
239
|
+
validator: (e) => l.includes(e)
|
|
250
240
|
},
|
|
251
241
|
/**
|
|
252
242
|
* Severity level of the toast, sets the icon and background
|
|
@@ -255,22 +245,7 @@ const A = b.exports, D = {
|
|
|
255
245
|
kind: {
|
|
256
246
|
type: String,
|
|
257
247
|
default: "base",
|
|
258
|
-
validator: (e) =>
|
|
259
|
-
},
|
|
260
|
-
/**
|
|
261
|
-
* Used in scenarios where the message needs to visually dominate the screen.
|
|
262
|
-
* @values true, false
|
|
263
|
-
*/
|
|
264
|
-
important: {
|
|
265
|
-
type: Boolean,
|
|
266
|
-
default: !1
|
|
267
|
-
},
|
|
268
|
-
/**
|
|
269
|
-
* Props for the toast close button.
|
|
270
|
-
*/
|
|
271
|
-
closeButtonProps: {
|
|
272
|
-
type: Object,
|
|
273
|
-
default: () => ({})
|
|
248
|
+
validator: (e) => u.includes(e)
|
|
274
249
|
},
|
|
275
250
|
/**
|
|
276
251
|
* Hides the close button from the toast
|
|
@@ -308,21 +283,20 @@ var x = function() {
|
|
|
308
283
|
t.kindClass
|
|
309
284
|
], attrs: { "data-qa": "dt-toast", "aria-hidden": (!t.isShown).toString() } }, [n("div", { staticClass: "d-toast-alternate__dialog" }, [n("div", { staticClass: "d-toast-alternate__header" }, [t.hideIcon ? t._e() : n("dt-toast-layout-alternate-icon", t._g({ attrs: { kind: t.kind, size: "200" } }, t.$listeners), [t._t("icon")], 2), n("dt-notice-content", t._g({ attrs: { "title-id": t.titleId, "content-id": t.contentId, title: t.title, role: t.role }, scopedSlots: t._u([{ key: "titleOverride", fn: function() {
|
|
310
285
|
return [t._t("titleOverride")];
|
|
311
|
-
}, proxy: !0 }], null, !0) }, t.$listeners)), n("dt-notice-action", t._g({ attrs: { "hide-action": !0, "hide-close": t.hideClose, "button-size": "xs"
|
|
286
|
+
}, proxy: !0 }], null, !0) }, t.$listeners)), n("dt-notice-action", t._g({ attrs: { "hide-action": !0, "hide-close": t.hideClose, "button-size": "xs" } }, t.$listeners))], 1), n("div", { staticClass: "d-toast-alternate__content" }, [t._t("default", function() {
|
|
312
287
|
return [t._v(" " + t._s(t.message) + " ")];
|
|
313
288
|
})], 2)])]) : t._e();
|
|
314
|
-
}, L = [], N = /* @__PURE__ */
|
|
315
|
-
|
|
289
|
+
}, L = [], N = /* @__PURE__ */ a(
|
|
290
|
+
B,
|
|
316
291
|
x,
|
|
317
292
|
L
|
|
318
293
|
);
|
|
319
|
-
const d = N.exports,
|
|
294
|
+
const d = N.exports, b = {
|
|
320
295
|
name: "DtToast",
|
|
321
296
|
components: {
|
|
322
|
-
ToastLayoutDefault:
|
|
297
|
+
ToastLayoutDefault: r,
|
|
323
298
|
ToastLayoutAlternate: d
|
|
324
299
|
},
|
|
325
|
-
mixins: [a],
|
|
326
300
|
props: {
|
|
327
301
|
/**
|
|
328
302
|
* Sets an ID on the title element of the component. Useful for aria-describedby
|
|
@@ -390,13 +364,6 @@ const d = N.exports, R = {
|
|
|
390
364
|
type: Boolean,
|
|
391
365
|
default: !1
|
|
392
366
|
},
|
|
393
|
-
/**
|
|
394
|
-
* Props for the toast close button.
|
|
395
|
-
*/
|
|
396
|
-
closeButtonProps: {
|
|
397
|
-
type: Object,
|
|
398
|
-
default: void 0
|
|
399
|
-
},
|
|
400
367
|
/**
|
|
401
368
|
* Hides the close button from the toast
|
|
402
369
|
* @values true, false
|
|
@@ -429,7 +396,7 @@ const d = N.exports, R = {
|
|
|
429
396
|
duration: {
|
|
430
397
|
type: Number,
|
|
431
398
|
default: null,
|
|
432
|
-
validator: (e) => e >=
|
|
399
|
+
validator: (e) => e >= s
|
|
433
400
|
},
|
|
434
401
|
/**
|
|
435
402
|
* The layout / styling you wish to use for the toast.
|
|
@@ -438,7 +405,7 @@ const d = N.exports, R = {
|
|
|
438
405
|
layout: {
|
|
439
406
|
type: String,
|
|
440
407
|
default: "default",
|
|
441
|
-
validator: (e) =>
|
|
408
|
+
validator: (e) => h.includes(e)
|
|
442
409
|
}
|
|
443
410
|
},
|
|
444
411
|
emits: [
|
|
@@ -458,7 +425,7 @@ const d = N.exports, R = {
|
|
|
458
425
|
data() {
|
|
459
426
|
return {
|
|
460
427
|
isShown: !1,
|
|
461
|
-
minDuration:
|
|
428
|
+
minDuration: s
|
|
462
429
|
};
|
|
463
430
|
},
|
|
464
431
|
computed: {
|
|
@@ -466,7 +433,7 @@ const d = N.exports, R = {
|
|
|
466
433
|
return !!this.duration && this.duration >= this.minDuration;
|
|
467
434
|
},
|
|
468
435
|
selectedLayout() {
|
|
469
|
-
return this.layout === "alternate" ? d :
|
|
436
|
+
return this.layout === "alternate" ? d : r;
|
|
470
437
|
}
|
|
471
438
|
},
|
|
472
439
|
watch: {
|
|
@@ -491,9 +458,9 @@ const d = N.exports, R = {
|
|
|
491
458
|
}
|
|
492
459
|
}
|
|
493
460
|
};
|
|
494
|
-
var
|
|
461
|
+
var R = function() {
|
|
495
462
|
var t = this, n = t._self._c;
|
|
496
|
-
return n(t.selectedLayout, t._g({ tag: "component", attrs: { "is-shown": t.isShown, "title-id": t.titleId, "content-id": t.contentId, title: t.title, message: t.message, role: t.role, kind: t.kind, important: t.important, "
|
|
463
|
+
return n(t.selectedLayout, t._g({ tag: "component", attrs: { "is-shown": t.isShown, "title-id": t.titleId, "content-id": t.contentId, title: t.title, message: t.message, role: t.role, kind: t.kind, important: t.important, "hide-close": t.hideClose, "hide-icon": t.hideIcon, "hide-action": t.hideAction }, on: { close: t.handleClose }, scopedSlots: t._u([{ key: "icon", fn: function() {
|
|
497
464
|
return [t._t("icon")];
|
|
498
465
|
}, proxy: !0 }, { key: "titleOverride", fn: function() {
|
|
499
466
|
return [t._t("titleOverride")];
|
|
@@ -502,13 +469,13 @@ var q = function() {
|
|
|
502
469
|
}, proxy: !0 }], null, !0) }, t.$listeners), [t._t("default", function() {
|
|
503
470
|
return [t._v(" " + t._s(t.message) + " ")];
|
|
504
471
|
})], 2);
|
|
505
|
-
},
|
|
472
|
+
}, q = [], z = /* @__PURE__ */ a(
|
|
473
|
+
b,
|
|
506
474
|
R,
|
|
507
|
-
q
|
|
508
|
-
z
|
|
475
|
+
q
|
|
509
476
|
);
|
|
510
|
-
const
|
|
477
|
+
const H = z.exports;
|
|
511
478
|
export {
|
|
512
|
-
|
|
479
|
+
H as default
|
|
513
480
|
};
|
|
514
481
|
//# sourceMappingURL=toast.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.js","sources":["../../../components/toast/layouts/toast_layout_default.vue","../../../components/toast/layouts/toast_layout_alternate_icon.vue","../../../components/toast/layouts/toast_layout_alternate.vue","../../../components/toast/toast.vue"],"sourcesContent":["<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-on=\"$listeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n :close-button-props=\"closeButtonProps\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n v-on=\"$listeners\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport { TOAST_ROLES } from '../toast_constants.js';\nexport default {\n name: 'ToastLayoutDefault',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast--error',\n info: 'd-toast--info',\n success: 'd-toast--success',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n },\n};\n</script>\n","<template>\n <div\n aria-hidden=\"true\"\n class=\"d-toast-layout-alternate__icon\"\n >\n <slot>\n <component\n :is=\"defaultIcon\"\n v-if=\"defaultIcon\"\n :size=\"size\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n} from '@dialpad/dialtone-icons/vue2';\nimport { TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nimport { ICON_SIZE_MODIFIERS } from '@/components/icon/icon_constants.js';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['success', DtIconInfo],\n ['warning', DtIconAlertTriangle],\n ['error', DtIconInfo],\n ['base', DtIconBell],\n ['gradient', DtIconSparkle],\n]);\n\nexport default {\n name: 'DtToastLayoutAlternateIcon',\n components: {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator (kind) {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n size: {\n type: String,\n default: '400',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n","<!-- eslint-disable vue/no-bare-strings-in-template -->\n<!-- stub for the new alternate toast layout -->\n<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast-alternate',\n kindClass,\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast-alternate__dialog\">\n <div class=\"d-toast-alternate__header\">\n <dt-toast-layout-alternate-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n size=\"200\"\n v-on=\"$listeners\"\n >\n <slot name=\"icon\" />\n </dt-toast-layout-alternate-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <slot name=\"titleOverride\" />\n </template>\n </dt-notice-content>\n\n <!-- Close Button -->\n <dt-notice-action\n :hide-action=\"true\"\n :hide-close=\"hideClose\"\n button-size=\"xs\"\n :close-button-props=\"closeButtonProps\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n v-on=\"$listeners\"\n />\n </div>\n <!-- Content Section -->\n <div class=\"d-toast-alternate__content\">\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport DtToastLayoutAlternateIcon from './toast_layout_alternate_icon.vue';\nimport { DtNoticeAction, DtNoticeContent } from '@/components/notice';\nimport { TOAST_ROLES, TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nexport default {\n name: 'ToastLayoutAlternate',\n\n components: {\n DtNoticeAction,\n DtNoticeContent,\n DtToastLayoutAlternateIcon,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast-alternate--error',\n info: 'd-toast-alternate--info',\n success: 'd-toast-alternate--success',\n warning: 'd-toast-alternate--warning',\n gradient: 'd-toast-alternate--gradient',\n };\n\n return kindClasses[this.kind];\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"selectedLayout\"\n :is-shown=\"isShown\"\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :message=\"message\"\n :role=\"role\"\n :kind=\"kind\"\n :important=\"important\"\n :close-button-props=\"closeButtonProps\"\n :hide-close=\"hideClose\"\n :hide-icon=\"hideIcon\"\n :hide-action=\"hideAction\"\n v-on=\"$listeners\"\n @close=\"handleClose\"\n >\n <!-- @slot Slot for custom icon -->\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <template #action>\n <slot name=\"action\" />\n </template>\n </component>\n</template>\n\n<script>\nimport { TOAST_MIN_DURATION, TOAST_LAYOUTS } from './toast_constants.js';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport ToastLayoutDefault from './layouts/toast_layout_default.vue';\nimport ToastLayoutAlternate from './layouts/toast_layout_alternate.vue';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n name: 'DtToast',\n\n components: {\n ToastLayoutDefault,\n ToastLayoutAlternate,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: undefined,\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n },\n\n /**\n * Severity level of the toast, could be different depending on which toast layout is used.\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: undefined,\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `.sync` modifier with this prop to update\n * the data in your component.\n * Supports .sync modifier\n * @values true, false\n */\n show: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: undefined,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n\n /**\n * The layout / styling you wish to use for the toast.\n * @values default, alternate\n */\n layout: {\n type: String,\n default: 'default',\n validator: (layout) => {\n return TOAST_LAYOUTS.includes(layout);\n },\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n\n selectedLayout () {\n return this.layout === 'alternate' ? ToastLayoutAlternate : ToastLayoutDefault;\n },\n },\n\n watch: {\n show: {\n handler: function (show) {\n this.isShown = show;\n if (show) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n destroyed () {\n if (this.shouldSetTimeout) {\n clearTimeout(this.displayTimer);\n }\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:show', false);\n }, this.duration);\n }\n },\n\n handleClose () {\n this.isShown = false;\n this.$emit('update:show', false);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","SrOnlyCloseButtonMixin","utils","role","TOAST_ROLES","kind","NOTICE_KINDS","kindToIcon","DtIconInfo","DtIconAlertTriangle","DtIconBell","DtIconSparkle","TOAST_ALTERNATE_KINDS","s","ICON_SIZE_MODIFIERS","DtToastLayoutAlternateIcon","ToastLayoutDefault","ToastLayoutAlternate","duration","TOAST_MIN_DURATION","layout","TOAST_LAYOUTS","show"],"mappings":";;;;;;;;;;AAyDA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,cAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,OAAA;AAAA,IACA,SAAA;AAAA,MAC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A,MACA,WAAA,CAAAiB,MACAA,KAAAC;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MACAC,EAAA,SAAAD,CAAA;AAAA,IAEA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,SAAA;AAAA,MACA,aAAAD;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,mBAAA;AACA,aAAA,CAAA,CAAA,KAAA,YAAA,KAAA,YAAA,KAAA;AAAA,IACA;AAAA,IAEA,iBAAA;AACA,aAAA,KAAA,WAAA,cAAAF,IAAAD;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,MACA,SAAA,SAAAM,GAAA;AACA,aAAA,UAAAA,GACAA,IACA,KAAA,WAAA,IAEA,aAAA,KAAA,YAAA;AAAA,MAEA;AAAA,MAEA,WAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,YAAA;AACA,IAAA,KAAA,oBACA,aAAA,KAAA,YAAA;AAAA,EAEA;AAAA,EAEA,SAAA;AAAA,IACA,aAAA;AACA,MAAA,KAAA,qBACA,KAAA,eAAA,WAAA,MAAA;AACA,aAAA,UAAA,IACA,KAAA,MAAA,eAAA,EAAA;AAAA,MACA,GAAA,KAAA,QAAA;AAAA,IAEA;AAAA,IAEA,cAAA;AACA,WAAA,UAAA,IACA,KAAA,MAAA,eAAA,EAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"toast.js","sources":["../../../components/toast/layouts/toast_layout_default.vue","../../../components/toast/layouts/toast_layout_alternate_icon.vue","../../../components/toast/layouts/toast_layout_alternate.vue","../../../components/toast/toast.vue"],"sourcesContent":["<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-on=\"$listeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n v-on=\"$listeners\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport { TOAST_ROLES } from '../toast_constants.js';\nexport default {\n name: 'ToastLayoutDefault',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast--error',\n info: 'd-toast--info',\n success: 'd-toast--success',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n },\n};\n</script>\n","<template>\n <div\n aria-hidden=\"true\"\n class=\"d-toast-layout-alternate__icon\"\n >\n <slot>\n <component\n :is=\"defaultIcon\"\n v-if=\"defaultIcon\"\n :size=\"size\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n} from '@dialpad/dialtone-icons/vue2';\nimport { TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nimport { ICON_SIZE_MODIFIERS } from '@/components/icon/icon_constants.js';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['success', DtIconInfo],\n ['warning', DtIconAlertTriangle],\n ['error', DtIconInfo],\n ['base', DtIconBell],\n ['gradient', DtIconSparkle],\n]);\n\nexport default {\n name: 'DtToastLayoutAlternateIcon',\n components: {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator (kind) {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n size: {\n type: String,\n default: '400',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n","<!-- eslint-disable vue/no-bare-strings-in-template -->\n<!-- stub for the new alternate toast layout -->\n<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast-alternate',\n kindClass,\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast-alternate__dialog\">\n <div class=\"d-toast-alternate__header\">\n <dt-toast-layout-alternate-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n size=\"200\"\n v-on=\"$listeners\"\n >\n <slot name=\"icon\" />\n </dt-toast-layout-alternate-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <slot name=\"titleOverride\" />\n </template>\n </dt-notice-content>\n\n <!-- Close Button -->\n <dt-notice-action\n :hide-action=\"true\"\n :hide-close=\"hideClose\"\n button-size=\"xs\"\n v-on=\"$listeners\"\n />\n </div>\n <!-- Content Section -->\n <div class=\"d-toast-alternate__content\">\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport DtToastLayoutAlternateIcon from './toast_layout_alternate_icon.vue';\nimport { DtNoticeAction, DtNoticeContent } from '@/components/notice';\nimport { TOAST_ROLES, TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nexport default {\n name: 'ToastLayoutAlternate',\n\n components: {\n DtNoticeAction,\n DtNoticeContent,\n DtToastLayoutAlternateIcon,\n },\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast-alternate--error',\n info: 'd-toast-alternate--info',\n success: 'd-toast-alternate--success',\n warning: 'd-toast-alternate--warning',\n gradient: 'd-toast-alternate--gradient',\n };\n\n return kindClasses[this.kind];\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"selectedLayout\"\n :is-shown=\"isShown\"\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :message=\"message\"\n :role=\"role\"\n :kind=\"kind\"\n :important=\"important\"\n :hide-close=\"hideClose\"\n :hide-icon=\"hideIcon\"\n :hide-action=\"hideAction\"\n v-on=\"$listeners\"\n @close=\"handleClose\"\n >\n <!-- @slot Slot for custom icon -->\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <template #action>\n <slot name=\"action\" />\n </template>\n </component>\n</template>\n\n<script>\nimport { TOAST_MIN_DURATION, TOAST_LAYOUTS } from './toast_constants.js';\nimport ToastLayoutDefault from './layouts/toast_layout_default.vue';\nimport ToastLayoutAlternate from './layouts/toast_layout_alternate.vue';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n name: 'DtToast',\n\n components: {\n ToastLayoutDefault,\n ToastLayoutAlternate,\n },\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: undefined,\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n },\n\n /**\n * Severity level of the toast, could be different depending on which toast layout is used.\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: undefined,\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `.sync` modifier with this prop to update\n * the data in your component.\n * Supports .sync modifier\n * @values true, false\n */\n show: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n\n /**\n * The layout / styling you wish to use for the toast.\n * @values default, alternate\n */\n layout: {\n type: String,\n default: 'default',\n validator: (layout) => {\n return TOAST_LAYOUTS.includes(layout);\n },\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n\n selectedLayout () {\n return this.layout === 'alternate' ? ToastLayoutAlternate : ToastLayoutDefault;\n },\n },\n\n watch: {\n show: {\n handler: function (show) {\n this.isShown = show;\n if (show) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n destroyed () {\n if (this.shouldSetTimeout) {\n clearTimeout(this.displayTimer);\n }\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:show', false);\n }, this.duration);\n }\n },\n\n handleClose () {\n this.isShown = false;\n this.$emit('update:show', false);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","utils","role","TOAST_ROLES","kind","NOTICE_KINDS","kindToIcon","DtIconInfo","DtIconAlertTriangle","DtIconBell","DtIconSparkle","TOAST_ALTERNATE_KINDS","s","ICON_SIZE_MODIFIERS","DtToastLayoutAlternateIcon","ToastLayoutDefault","ToastLayoutAlternate","duration","TOAST_MIN_DURATION","layout","TOAST_LAYOUTS","show"],"mappings":";;;;;;;;;AAqDA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,cAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAC,EAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAA,EAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MACAC,EAAA,SAAAD,CAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;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;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("@dialpad/dialtone-icons/vue2"),i=require("./unread-pill-constants.cjs"),a=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),l={name:"DtRecipeUnreadPill",components:{DtIconArrowUp:n.DtIconArrowUp,DtIconArrowDown:n.DtIconArrowDown},props:{kind:{type:String,required:!0,validator:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("@dialpad/dialtone-icons/vue2"),i=require("./unread-pill-constants.cjs"),a=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),o=require("../../common/mixins/localization.cjs"),l={name:"DtRecipeUnreadPill",components:{DtIconArrowUp:n.DtIconArrowUp,DtIconArrowDown:n.DtIconArrowDown},mixins:[o.default],props:{kind:{type:String,required:!0,validator:t=>i.UNREAD_PILL_KINDS.includes(t)},direction:{type:String,required:!0,validator:t=>i.UNREAD_PILL_DIRECTIONS.includes(t)}},emits:["click"],computed:{text(){return this.kind==="mentions"?this.i18n.$t("DIALTONE_UNREAD_PILL_MENTIONS_TEXT"):this.i18n.$t("DIALTONE_UNREAD_PILL_MESSAGES_TEXT")}}};var s=function(){var e=this,r=e._self._c;return r("button",e._g({class:["d-recipe-leftbar-unread-pill",`d-recipe-leftbar-unread-pill-${e.kind}`],attrs:{type:"button","data-qa":"dt-recipe-leftbar-unread-pill"}},e.$listeners),[e.direction==="up"?r("dt-icon-arrow-up",{attrs:{size:"300"}}):r("dt-icon-arrow-down",{attrs:{size:"300"}}),r("span",{attrs:{"data-qa":"dt-recipe-leftbar-unread-pill__label"}},[e._t("default",function(){return[e._v(" "+e._s(e.text)+" ")]})],2)],1)},_=[],c=a.n(l,s,_);const u=c.exports;exports.default=u;
|
|
2
2
|
//# sourceMappingURL=unread-pill.cjs.map
|