@dialpad/dialtone 9.65.1 → 9.66.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/dist/tokens/doc.json +17176 -17176
- package/dist/vue2/chunks/{dropdown-6UoczdUY.js → dropdown-YdCyJ5Dq.js} +77 -41
- package/dist/vue2/chunks/{dropdown-6UoczdUY.js.map → dropdown-YdCyJ5Dq.js.map} +1 -1
- package/dist/vue2/chunks/{dropdown-pHxnQPzT.js → dropdown-mjrYu_mK.js} +77 -41
- package/dist/vue2/chunks/{dropdown-pHxnQPzT.js.map → dropdown-mjrYu_mK.js.map} +1 -1
- package/dist/vue2/chunks/dropdown_constants-2pGCXy7m.js.map +1 -1
- package/dist/vue2/chunks/dropdown_constants-w1MXGC3Z.js.map +1 -1
- package/dist/vue2/chunks/{icon_constants-Dy4MEUJL.js → icon_constants-TdxqLsS2.js} +3 -2
- package/dist/vue2/chunks/icon_constants-TdxqLsS2.js.map +1 -0
- package/dist/vue2/chunks/{icon_constants-QYpmdE0R.js → icon_constants-VEA0wI5C.js} +3 -2
- package/dist/vue2/chunks/icon_constants-VEA0wI5C.js.map +1 -0
- package/dist/vue2/chunks/{index-gj1jEXP4.js → index-DyqUqjvI.js} +122 -87
- package/dist/vue2/chunks/{index-gj1jEXP4.js.map → index-DyqUqjvI.js.map} +1 -1
- package/dist/vue2/chunks/{index-anN_sx1F.js → index-NYFNZeHH.js} +5 -13
- package/dist/vue2/chunks/{index-anN_sx1F.js.map → index-NYFNZeHH.js.map} +1 -1
- package/dist/vue2/chunks/{index-ODod4Oj_.js → index-i65YVk-U.js} +5 -13
- package/dist/vue2/chunks/{index-ODod4Oj_.js.map → index-i65YVk-U.js.map} +1 -1
- package/dist/vue2/chunks/{index-eJ-WWRdf.js → index-mBWay1Qb.js} +122 -87
- package/dist/vue2/chunks/{index-eJ-WWRdf.js.map → index-mBWay1Qb.js.map} +1 -1
- package/dist/vue2/chunks/{input-Axw-wFj2.js → input-Hqw33WBe.js} +3 -9
- package/dist/vue2/chunks/{input-Axw-wFj2.js.map → input-Hqw33WBe.js.map} +1 -1
- package/dist/vue2/chunks/{input-6kbd8Pju.js → input-PhJeBN6r.js} +3 -9
- package/dist/vue2/chunks/{input-6kbd8Pju.js.map → input-PhJeBN6r.js.map} +1 -1
- package/dist/vue2/chunks/{input_group-qVZaS5Bb.js → input_group-ZI7aVGEp.js} +4 -2
- package/dist/vue2/chunks/{input_group-m3cWYUfI.js.map → input_group-ZI7aVGEp.js.map} +1 -1
- package/dist/vue2/chunks/{input_group-m3cWYUfI.js → input_group-pE6ec9R3.js} +4 -2
- package/dist/vue2/chunks/{input_group-qVZaS5Bb.js.map → input_group-pE6ec9R3.js.map} +1 -1
- package/dist/vue2/chunks/{keyboard_list_navigation-ScXhrxya.js → keyboard_list_navigation-YIqTuw1W.js} +6 -5
- package/dist/vue2/chunks/{keyboard_list_navigation-fJnl_Iox.js.map → keyboard_list_navigation-YIqTuw1W.js.map} +1 -1
- package/dist/vue2/chunks/{keyboard_list_navigation-fJnl_Iox.js → keyboard_list_navigation-x3D6RcC7.js} +6 -5
- package/dist/vue2/chunks/{keyboard_list_navigation-ScXhrxya.js.map → keyboard_list_navigation-x3D6RcC7.js.map} +1 -1
- package/dist/vue2/chunks/link_constants-AfTWrr-n.js.map +1 -1
- package/dist/vue2/chunks/link_constants-x8NwdqmA.js.map +1 -1
- package/dist/vue2/chunks/list_item_constants-EiqkqZvP.js.map +1 -1
- package/dist/vue2/chunks/list_item_constants-u1xcN9Dd.js.map +1 -1
- package/dist/vue2/chunks/{modal-XOr4kiNZ.js → modal-8X6poIZW.js} +4 -2
- package/dist/{vue3/chunks/modal-XOr4kiNZ.js.map → vue2/chunks/modal-8X6poIZW.js.map} +1 -1
- package/dist/vue2/chunks/{modal-VgxXAQFP.js → modal-OaWxzqNt.js} +4 -2
- package/dist/vue2/chunks/{modal-VgxXAQFP.js.map → modal-OaWxzqNt.js.map} +1 -1
- package/dist/vue2/chunks/{notice_action-IRUoLX2d.js → notice_action-qQr3K2TC.js} +71 -46
- package/dist/vue2/chunks/{notice_action-IRUoLX2d.js.map → notice_action-qQr3K2TC.js.map} +1 -1
- package/dist/vue2/chunks/{notice_action-P6uDyE9x.js → notice_action-tEvvMg7Q.js} +71 -46
- package/dist/vue2/chunks/{notice_action-P6uDyE9x.js.map → notice_action-tEvvMg7Q.js.map} +1 -1
- package/dist/vue2/chunks/notice_constants-7Qt2CQEY.js.map +1 -1
- package/dist/vue2/chunks/notice_constants-UXo9e3bS.js.map +1 -1
- package/dist/vue2/chunks/{popover_constants-WsOUIY-m.js → popover_constants-6YkPPbnk.js} +26 -47
- package/dist/vue2/chunks/{popover_constants-WsOUIY-m.js.map → popover_constants-6YkPPbnk.js.map} +1 -1
- package/dist/vue2/chunks/{popover_constants-XnGWXaxX.js → popover_constants-h9MD6WUt.js} +26 -47
- package/dist/{vue3/chunks/popover_constants-WsOUIY-m.js.map → vue2/chunks/popover_constants-h9MD6WUt.js.map} +1 -1
- package/dist/vue2/chunks/{sr_only_close_button-ZaGdAHz7.js → sr_only_close_button-2Q9Ny1Nc.js} +24 -18
- package/dist/vue2/chunks/{sr_only_close_button-ZaGdAHz7.js.map → sr_only_close_button-2Q9Ny1Nc.js.map} +1 -1
- package/dist/vue2/chunks/{sr_only_close_button-81bHIpPu.js → sr_only_close_button-IjMVfBDE.js} +24 -18
- package/dist/vue2/chunks/{sr_only_close_button-81bHIpPu.js.map → sr_only_close_button-IjMVfBDE.js.map} +1 -1
- package/dist/vue2/chunks/stack_constants-HraCekPm.js.map +1 -1
- package/dist/vue2/chunks/stack_constants-SMzMWnAQ.js.map +1 -1
- package/dist/vue2/chunks/{tab-FcsV5VmK.js → tab-79yMX6m6.js} +86 -68
- package/dist/vue2/chunks/{tab-V4cb44Ry.js.map → tab-79yMX6m6.js.map} +1 -1
- package/dist/vue2/chunks/{tab-V4cb44Ry.js → tab-muPOS7JE.js} +86 -68
- package/dist/vue2/chunks/{tab-FcsV5VmK.js.map → tab-muPOS7JE.js.map} +1 -1
- package/dist/vue2/common/constants.cjs.map +1 -1
- package/dist/vue2/common/constants.js.map +1 -1
- package/dist/vue2/common/dates.cjs +3 -1
- package/dist/vue2/common/dates.cjs.map +1 -1
- package/dist/vue2/common/dates.js +3 -1
- package/dist/vue2/common/dates.js.map +1 -1
- package/dist/vue2/common/emoji.cjs +1 -1
- package/dist/vue2/common/emoji.js +1 -1
- package/dist/vue2/common/mixins.cjs +3 -3
- package/dist/vue2/common/mixins.js +3 -3
- package/dist/vue2/common/utils.cjs +8 -44
- package/dist/vue2/common/utils.cjs.map +1 -1
- package/dist/vue2/common/utils.js +8 -44
- package/dist/vue2/common/utils.js.map +1 -1
- package/dist/vue2/common/validators.cjs.map +1 -1
- package/dist/vue2/common/validators.js.map +1 -1
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/dialtone-vue.cjs +12 -12
- package/dist/vue2/dialtone-vue.js +12 -12
- package/dist/vue2/lib/attachment-carousel.cjs +172 -48
- package/dist/vue2/lib/attachment-carousel.cjs.map +1 -1
- package/dist/vue2/lib/attachment-carousel.js +172 -48
- package/dist/vue2/lib/attachment-carousel.js.map +1 -1
- package/dist/vue2/lib/avatar.cjs +75 -58
- package/dist/vue2/lib/avatar.cjs.map +1 -1
- package/dist/vue2/lib/avatar.js +75 -58
- package/dist/vue2/lib/avatar.js.map +1 -1
- package/dist/vue2/lib/badge.cjs +31 -20
- package/dist/vue2/lib/badge.cjs.map +1 -1
- package/dist/vue2/lib/badge.js +31 -20
- package/dist/vue2/lib/badge.js.map +1 -1
- package/dist/vue2/lib/banner.cjs +53 -29
- package/dist/vue2/lib/banner.cjs.map +1 -1
- package/dist/vue2/lib/banner.js +53 -29
- package/dist/vue2/lib/banner.js.map +1 -1
- package/dist/vue2/lib/breadcrumbs.cjs +36 -30
- package/dist/vue2/lib/breadcrumbs.cjs.map +1 -1
- package/dist/vue2/lib/breadcrumbs.js +36 -30
- package/dist/vue2/lib/breadcrumbs.js.map +1 -1
- package/dist/vue2/lib/button-group.cjs +7 -14
- package/dist/vue2/lib/button-group.cjs.map +1 -1
- package/dist/vue2/lib/button-group.js +7 -14
- package/dist/vue2/lib/button-group.js.map +1 -1
- package/dist/vue2/lib/button.cjs +55 -62
- package/dist/vue2/lib/button.cjs.map +1 -1
- package/dist/vue2/lib/button.js +55 -62
- package/dist/vue2/lib/button.js.map +1 -1
- package/dist/vue2/lib/callbar-button-with-popover.cjs +91 -23
- package/dist/vue2/lib/callbar-button-with-popover.cjs.map +1 -1
- package/dist/vue2/lib/callbar-button-with-popover.js +91 -23
- package/dist/vue2/lib/callbar-button-with-popover.js.map +1 -1
- package/dist/vue2/lib/callbar-button.cjs +49 -33
- package/dist/vue2/lib/callbar-button.cjs.map +1 -1
- package/dist/vue2/lib/callbar-button.js +49 -33
- package/dist/vue2/lib/callbar-button.js.map +1 -1
- package/dist/vue2/lib/callbox.cjs +78 -15
- package/dist/vue2/lib/callbox.cjs.map +1 -1
- package/dist/vue2/lib/callbox.js +78 -15
- package/dist/vue2/lib/callbox.js.map +1 -1
- package/dist/vue2/lib/card.cjs +16 -23
- package/dist/vue2/lib/card.cjs.map +1 -1
- package/dist/vue2/lib/card.js +16 -23
- package/dist/vue2/lib/card.js.map +1 -1
- package/dist/vue2/lib/checkbox-group.cjs +3 -15
- package/dist/vue2/lib/checkbox-group.cjs.map +1 -1
- package/dist/vue2/lib/checkbox-group.js +3 -15
- package/dist/vue2/lib/checkbox-group.js.map +1 -1
- package/dist/vue2/lib/checkbox.cjs +52 -16
- package/dist/vue2/lib/checkbox.cjs.map +1 -1
- package/dist/vue2/lib/checkbox.js +52 -16
- package/dist/vue2/lib/checkbox.js.map +1 -1
- package/dist/vue2/lib/chip.cjs +58 -26
- package/dist/vue2/lib/chip.cjs.map +1 -1
- package/dist/vue2/lib/chip.js +58 -26
- package/dist/vue2/lib/chip.js.map +1 -1
- package/dist/vue2/lib/codeblock.cjs +4 -11
- package/dist/vue2/lib/codeblock.cjs.map +1 -1
- package/dist/vue2/lib/codeblock.js +4 -11
- package/dist/vue2/lib/codeblock.js.map +1 -1
- package/dist/vue2/lib/collapsible.cjs +91 -34
- package/dist/vue2/lib/collapsible.cjs.map +1 -1
- package/dist/vue2/lib/collapsible.js +91 -34
- package/dist/vue2/lib/collapsible.js.map +1 -1
- package/dist/vue2/lib/combobox-multi-select.cjs +131 -38
- package/dist/vue2/lib/combobox-multi-select.cjs.map +1 -1
- package/dist/vue2/lib/combobox-multi-select.js +131 -38
- package/dist/vue2/lib/combobox-multi-select.js.map +1 -1
- package/dist/vue2/lib/combobox-with-popover.cjs +130 -39
- package/dist/vue2/lib/combobox-with-popover.cjs.map +1 -1
- package/dist/vue2/lib/combobox-with-popover.js +130 -39
- package/dist/vue2/lib/combobox-with-popover.js.map +1 -1
- package/dist/vue2/lib/combobox.cjs +3 -3
- package/dist/vue2/lib/combobox.js +3 -3
- package/dist/vue2/lib/contact-centers-row.cjs +86 -29
- package/dist/vue2/lib/contact-centers-row.cjs.map +1 -1
- package/dist/vue2/lib/contact-centers-row.js +86 -29
- package/dist/vue2/lib/contact-centers-row.js.map +1 -1
- package/dist/vue2/lib/contact-info.cjs +95 -24
- package/dist/vue2/lib/contact-info.cjs.map +1 -1
- package/dist/vue2/lib/contact-info.js +95 -24
- package/dist/vue2/lib/contact-info.js.map +1 -1
- package/dist/vue2/lib/contact-row.cjs +61 -18
- package/dist/vue2/lib/contact-row.cjs.map +1 -1
- package/dist/vue2/lib/contact-row.js +61 -18
- package/dist/vue2/lib/contact-row.js.map +1 -1
- package/dist/vue2/lib/datepicker.cjs +361 -102
- package/dist/vue2/lib/datepicker.cjs.map +1 -1
- package/dist/vue2/lib/datepicker.js +361 -102
- package/dist/vue2/lib/datepicker.js.map +1 -1
- package/dist/vue2/lib/description-list.cjs +11 -12
- package/dist/vue2/lib/description-list.cjs.map +1 -1
- package/dist/vue2/lib/description-list.js +11 -12
- package/dist/vue2/lib/description-list.js.map +1 -1
- package/dist/vue2/lib/dropdown.cjs +13 -17
- package/dist/vue2/lib/dropdown.cjs.map +1 -1
- package/dist/vue2/lib/dropdown.js +13 -17
- package/dist/vue2/lib/dropdown.js.map +1 -1
- package/dist/vue2/lib/editor.cjs +409 -109
- package/dist/vue2/lib/editor.cjs.map +1 -1
- package/dist/vue2/lib/editor.js +409 -109
- package/dist/vue2/lib/editor.js.map +1 -1
- package/dist/vue2/lib/emoji-picker.cjs +512 -234
- package/dist/vue2/lib/emoji-picker.cjs.map +1 -1
- package/dist/vue2/lib/emoji-picker.js +512 -234
- package/dist/vue2/lib/emoji-picker.js.map +1 -1
- package/dist/vue2/lib/emoji-row.cjs +69 -31
- package/dist/vue2/lib/emoji-row.cjs.map +1 -1
- package/dist/vue2/lib/emoji-row.js +69 -31
- package/dist/vue2/lib/emoji-row.js.map +1 -1
- package/dist/vue2/lib/emoji-text-wrapper.cjs +14 -22
- package/dist/vue2/lib/emoji-text-wrapper.cjs.map +1 -1
- package/dist/vue2/lib/emoji-text-wrapper.js +14 -22
- package/dist/vue2/lib/emoji-text-wrapper.js.map +1 -1
- package/dist/vue2/lib/emoji.cjs +40 -13
- package/dist/vue2/lib/emoji.cjs.map +1 -1
- package/dist/vue2/lib/emoji.js +40 -13
- package/dist/vue2/lib/emoji.js.map +1 -1
- package/dist/vue2/lib/empty-state.cjs +27 -12
- package/dist/vue2/lib/empty-state.cjs.map +1 -1
- package/dist/vue2/lib/empty-state.js +27 -12
- package/dist/vue2/lib/empty-state.js.map +1 -1
- package/dist/vue2/lib/feed-item-row.cjs +106 -27
- package/dist/vue2/lib/feed-item-row.cjs.map +1 -1
- package/dist/vue2/lib/feed-item-row.js +106 -27
- package/dist/vue2/lib/feed-item-row.js.map +1 -1
- package/dist/vue2/lib/feed-pill.cjs +90 -35
- package/dist/vue2/lib/feed-pill.cjs.map +1 -1
- package/dist/vue2/lib/feed-pill.js +90 -35
- package/dist/vue2/lib/feed-pill.js.map +1 -1
- package/dist/vue2/lib/general-row.cjs +184 -75
- package/dist/vue2/lib/general-row.cjs.map +1 -1
- package/dist/vue2/lib/general-row.js +184 -75
- package/dist/vue2/lib/general-row.js.map +1 -1
- package/dist/vue2/lib/group-row.cjs +27 -16
- package/dist/vue2/lib/group-row.cjs.map +1 -1
- package/dist/vue2/lib/group-row.js +27 -16
- package/dist/vue2/lib/group-row.js.map +1 -1
- package/dist/vue2/lib/grouped-chip.cjs +68 -20
- package/dist/vue2/lib/grouped-chip.cjs.map +1 -1
- package/dist/vue2/lib/grouped-chip.js +68 -20
- package/dist/vue2/lib/grouped-chip.js.map +1 -1
- package/dist/vue2/lib/hovercard.cjs +71 -41
- package/dist/vue2/lib/hovercard.cjs.map +1 -1
- package/dist/vue2/lib/hovercard.js +71 -41
- package/dist/vue2/lib/hovercard.js.map +1 -1
- package/dist/vue2/lib/icon.cjs +10 -12
- package/dist/vue2/lib/icon.cjs.map +1 -1
- package/dist/vue2/lib/icon.js +10 -12
- package/dist/vue2/lib/icon.js.map +1 -1
- package/dist/vue2/lib/illustration.cjs +9 -12
- package/dist/vue2/lib/illustration.cjs.map +1 -1
- package/dist/vue2/lib/illustration.js +9 -12
- package/dist/vue2/lib/illustration.js.map +1 -1
- package/dist/vue2/lib/image-viewer.cjs +98 -23
- package/dist/vue2/lib/image-viewer.cjs.map +1 -1
- package/dist/vue2/lib/image-viewer.js +98 -23
- package/dist/vue2/lib/image-viewer.js.map +1 -1
- package/dist/vue2/lib/input-group.cjs +24 -14
- package/dist/vue2/lib/input-group.cjs.map +1 -1
- package/dist/vue2/lib/input-group.js +24 -14
- package/dist/vue2/lib/input-group.js.map +1 -1
- package/dist/vue2/lib/input.cjs +108 -40
- package/dist/vue2/lib/input.cjs.map +1 -1
- package/dist/vue2/lib/input.js +108 -40
- package/dist/vue2/lib/input.js.map +1 -1
- package/dist/vue2/lib/item-layout.cjs +42 -11
- package/dist/vue2/lib/item-layout.cjs.map +1 -1
- package/dist/vue2/lib/item-layout.js +42 -11
- package/dist/vue2/lib/item-layout.js.map +1 -1
- package/dist/vue2/lib/ivr-node.cjs +135 -47
- package/dist/vue2/lib/ivr-node.cjs.map +1 -1
- package/dist/vue2/lib/ivr-node.js +135 -47
- package/dist/vue2/lib/ivr-node.js.map +1 -1
- package/dist/vue2/lib/keyboard-shortcut.cjs +35 -23
- package/dist/vue2/lib/keyboard-shortcut.cjs.map +1 -1
- package/dist/vue2/lib/keyboard-shortcut.js +35 -23
- package/dist/vue2/lib/keyboard-shortcut.js.map +1 -1
- package/dist/vue2/lib/lazy-show.cjs +15 -11
- package/dist/vue2/lib/lazy-show.cjs.map +1 -1
- package/dist/vue2/lib/lazy-show.js +15 -11
- package/dist/vue2/lib/lazy-show.js.map +1 -1
- package/dist/vue2/lib/link.cjs +9 -15
- package/dist/vue2/lib/link.cjs.map +1 -1
- package/dist/vue2/lib/link.js +9 -15
- package/dist/vue2/lib/link.js.map +1 -1
- package/dist/vue2/lib/list-item-group.cjs +17 -11
- package/dist/vue2/lib/list-item-group.cjs.map +1 -1
- package/dist/vue2/lib/list-item-group.js +17 -11
- package/dist/vue2/lib/list-item-group.js.map +1 -1
- package/dist/vue2/lib/list-item.cjs +42 -23
- package/dist/vue2/lib/list-item.cjs.map +1 -1
- package/dist/vue2/lib/list-item.js +42 -23
- package/dist/vue2/lib/list-item.js.map +1 -1
- package/dist/vue2/lib/message-input.cjs +360 -97
- package/dist/vue2/lib/message-input.cjs.map +1 -1
- package/dist/vue2/lib/message-input.js +360 -97
- package/dist/vue2/lib/message-input.js.map +1 -1
- package/dist/vue2/lib/modal.cjs +94 -36
- package/dist/vue2/lib/modal.cjs.map +1 -1
- package/dist/vue2/lib/modal.js +94 -36
- package/dist/vue2/lib/modal.js.map +1 -1
- package/dist/vue2/lib/notice.cjs +40 -21
- package/dist/vue2/lib/notice.cjs.map +1 -1
- package/dist/vue2/lib/notice.js +40 -21
- package/dist/vue2/lib/notice.js.map +1 -1
- package/dist/vue2/lib/pagination.cjs +81 -20
- package/dist/vue2/lib/pagination.cjs.map +1 -1
- package/dist/vue2/lib/pagination.js +81 -20
- package/dist/vue2/lib/pagination.js.map +1 -1
- package/dist/vue2/lib/popover.cjs +194 -75
- package/dist/vue2/lib/popover.cjs.map +1 -1
- package/dist/vue2/lib/popover.js +195 -76
- package/dist/vue2/lib/popover.js.map +1 -1
- package/dist/vue2/lib/presence.cjs +23 -22
- package/dist/vue2/lib/presence.cjs.map +1 -1
- package/dist/vue2/lib/presence.js +23 -22
- package/dist/vue2/lib/presence.js.map +1 -1
- package/dist/vue2/lib/radio-group.cjs +2 -11
- package/dist/vue2/lib/radio-group.cjs.map +1 -1
- package/dist/vue2/lib/radio-group.js +2 -11
- package/dist/vue2/lib/radio-group.js.map +1 -1
- package/dist/vue2/lib/radio.cjs +47 -15
- package/dist/vue2/lib/radio.cjs.map +1 -1
- package/dist/vue2/lib/radio.js +47 -15
- package/dist/vue2/lib/radio.js.map +1 -1
- package/dist/vue2/lib/rich-text-editor.cjs +336 -317
- package/dist/vue2/lib/rich-text-editor.cjs.map +1 -1
- package/dist/vue2/lib/rich-text-editor.js +336 -317
- package/dist/vue2/lib/rich-text-editor.js.map +1 -1
- package/dist/vue2/lib/root-layout.cjs +33 -15
- package/dist/vue2/lib/root-layout.cjs.map +1 -1
- package/dist/vue2/lib/root-layout.js +33 -15
- package/dist/vue2/lib/root-layout.js.map +1 -1
- package/dist/vue2/lib/scrollbar-directive.cjs.map +1 -1
- package/dist/vue2/lib/scrollbar-directive.js.map +1 -1
- package/dist/vue2/lib/select-menu.cjs +52 -33
- package/dist/vue2/lib/select-menu.cjs.map +1 -1
- package/dist/vue2/lib/select-menu.js +52 -33
- package/dist/vue2/lib/select-menu.js.map +1 -1
- package/dist/vue2/lib/settings-menu-button.cjs +42 -16
- package/dist/vue2/lib/settings-menu-button.cjs.map +1 -1
- package/dist/vue2/lib/settings-menu-button.js +42 -16
- package/dist/vue2/lib/settings-menu-button.js.map +1 -1
- package/dist/vue2/lib/skeleton.cjs +118 -93
- package/dist/vue2/lib/skeleton.cjs.map +1 -1
- package/dist/vue2/lib/skeleton.js +118 -93
- package/dist/vue2/lib/skeleton.js.map +1 -1
- package/dist/vue2/lib/split-button.cjs +164 -64
- package/dist/vue2/lib/split-button.cjs.map +1 -1
- package/dist/vue2/lib/split-button.js +164 -64
- package/dist/vue2/lib/split-button.js.map +1 -1
- package/dist/vue2/lib/stack.cjs +21 -33
- package/dist/vue2/lib/stack.cjs.map +1 -1
- package/dist/vue2/lib/stack.js +21 -33
- package/dist/vue2/lib/stack.js.map +1 -1
- package/dist/vue2/lib/tabs.cjs +20 -13
- package/dist/vue2/lib/tabs.cjs.map +1 -1
- package/dist/vue2/lib/tabs.js +20 -13
- package/dist/vue2/lib/tabs.js.map +1 -1
- package/dist/vue2/lib/time-pill.cjs +8 -11
- package/dist/vue2/lib/time-pill.cjs.map +1 -1
- package/dist/vue2/lib/time-pill.js +8 -11
- package/dist/vue2/lib/time-pill.js.map +1 -1
- package/dist/vue2/lib/toast.cjs +42 -21
- package/dist/vue2/lib/toast.cjs.map +1 -1
- package/dist/vue2/lib/toast.js +42 -21
- package/dist/vue2/lib/toast.js.map +1 -1
- package/dist/vue2/lib/toggle.cjs +28 -24
- package/dist/vue2/lib/toggle.cjs.map +1 -1
- package/dist/vue2/lib/toggle.js +28 -24
- package/dist/vue2/lib/toggle.js.map +1 -1
- package/dist/vue2/lib/tooltip-directive.cjs +32 -26
- package/dist/vue2/lib/tooltip-directive.cjs.map +1 -1
- package/dist/vue2/lib/tooltip-directive.js +32 -26
- package/dist/vue2/lib/tooltip-directive.js.map +1 -1
- package/dist/vue2/lib/tooltip.cjs +31 -21
- package/dist/vue2/lib/tooltip.cjs.map +1 -1
- package/dist/vue2/lib/tooltip.js +32 -22
- package/dist/vue2/lib/tooltip.js.map +1 -1
- package/dist/vue2/lib/top-banner-info.cjs +18 -21
- package/dist/vue2/lib/top-banner-info.cjs.map +1 -1
- package/dist/vue2/lib/top-banner-info.js +18 -21
- package/dist/vue2/lib/top-banner-info.js.map +1 -1
- package/dist/vue2/lib/unread-pill.cjs +18 -12
- package/dist/vue2/lib/unread-pill.cjs.map +1 -1
- package/dist/vue2/lib/unread-pill.js +18 -12
- package/dist/vue2/lib/unread-pill.js.map +1 -1
- package/dist/vue2/lib/validation-messages.cjs +23 -16
- package/dist/vue2/lib/validation-messages.cjs.map +1 -1
- package/dist/vue2/lib/validation-messages.js +23 -16
- package/dist/vue2/lib/validation-messages.js.map +1 -1
- package/dist/vue2/types/common/emoji/index.d.ts +2 -59236
- package/dist/vue2/types/common/emoji/index.d.ts.map +1 -1
- package/dist/vue2/types/components/button/button.vue.d.ts +1 -1
- package/dist/vue2/types/components/chip/chip.vue.d.ts +1 -1
- package/dist/vue2/types/components/combobox/combobox.vue.d.ts +1 -1
- package/dist/vue2/types/components/icon/icon.vue.d.ts +2 -2
- package/dist/vue2/types/components/icon/icon_constants.d.ts +1 -1
- package/dist/vue2/types/components/icon/icon_constants.d.ts.map +1 -1
- package/dist/vue2/types/components/illustration/illustration.vue.d.ts +2 -2
- package/dist/vue2/types/components/illustration/illustration_constants.d.ts +1 -1
- package/dist/vue2/types/components/illustration/illustration_constants.d.ts.map +1 -1
- package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts +21 -0
- package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/input/input.vue.d.ts +1 -1
- package/dist/vue2/types/components/modal/modal.vue.d.ts +1 -1
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +1 -1
- package/dist/vue2/types/components/split_button/split_button-alpha.vue.d.ts +1 -1
- package/dist/vue2/types/components/toast/toast.vue.d.ts +1 -1
- package/dist/vue2/types/components/tooltip/tooltip.vue.d.ts +1 -1
- package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -1
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +1 -1
- package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -1
- package/dist/vue3/chunks/{dropdown-oA-_Gotg.js → dropdown-6HXkh24e.js} +40 -45
- package/dist/vue3/chunks/{dropdown-p-Azgwov.js.map → dropdown-6HXkh24e.js.map} +1 -1
- package/dist/vue3/chunks/{dropdown-p-Azgwov.js → dropdown-QNvAb160.js} +40 -45
- package/dist/vue3/chunks/{dropdown-oA-_Gotg.js.map → dropdown-QNvAb160.js.map} +1 -1
- package/dist/vue3/chunks/dropdown_constants-2pGCXy7m.js.map +1 -1
- package/dist/vue3/chunks/dropdown_constants-w1MXGC3Z.js.map +1 -1
- package/dist/vue3/chunks/{icon_constants-QYpmdE0R.js → icon_constants-bvhFNOPu.js} +3 -2
- package/dist/vue3/chunks/icon_constants-bvhFNOPu.js.map +1 -0
- package/dist/vue3/chunks/{icon_constants-Dy4MEUJL.js → icon_constants-gIQj4mf7.js} +3 -2
- package/dist/vue3/chunks/icon_constants-gIQj4mf7.js.map +1 -0
- package/dist/vue3/chunks/{index-b_MgDylR.js → index-T15rAIdX.js} +71 -84
- package/dist/vue3/chunks/{index-b_MgDylR.js.map → index-T15rAIdX.js.map} +1 -1
- package/dist/vue3/chunks/{index-GVD15GIB.js → index-dfdrE-3M.js} +3 -12
- package/dist/vue3/chunks/{index-GVD15GIB.js.map → index-dfdrE-3M.js.map} +1 -1
- package/dist/vue3/chunks/{index-lu2o2f4r.js → index-fEp0B-5Z.js} +3 -12
- package/dist/vue3/chunks/{index-lu2o2f4r.js.map → index-fEp0B-5Z.js.map} +1 -1
- package/dist/vue3/chunks/{index-4qgKeErp.js → index-ouh7Bvm-.js} +71 -84
- package/dist/vue3/chunks/{index-4qgKeErp.js.map → index-ouh7Bvm-.js.map} +1 -1
- package/dist/vue3/chunks/{input-NmYDD5bn.js → input-HIysg24t.js} +3 -9
- package/dist/vue3/chunks/{input-NmYDD5bn.js.map → input-HIysg24t.js.map} +1 -1
- package/dist/vue3/chunks/{input-ttnte8zB.js → input-dLLo3Wtg.js} +3 -9
- package/dist/vue3/chunks/{input-ttnte8zB.js.map → input-dLLo3Wtg.js.map} +1 -1
- package/dist/vue3/chunks/{input_group-jWnq2DJT.js → input_group-hV1WT2it.js} +4 -2
- package/dist/vue3/chunks/{input_group-jWnq2DJT.js.map → input_group-hV1WT2it.js.map} +1 -1
- package/dist/vue3/chunks/{input_group-M-D25pOJ.js → input_group-rE6nhye8.js} +4 -2
- package/dist/vue3/chunks/{input_group-M-D25pOJ.js.map → input_group-rE6nhye8.js.map} +1 -1
- package/dist/vue3/chunks/{keyboard_list_navigation-ScXhrxya.js → keyboard_list_navigation-YIqTuw1W.js} +6 -5
- package/dist/vue3/chunks/{keyboard_list_navigation-fJnl_Iox.js.map → keyboard_list_navigation-YIqTuw1W.js.map} +1 -1
- package/dist/vue3/chunks/{keyboard_list_navigation-fJnl_Iox.js → keyboard_list_navigation-x3D6RcC7.js} +6 -5
- package/dist/vue3/chunks/{keyboard_list_navigation-ScXhrxya.js.map → keyboard_list_navigation-x3D6RcC7.js.map} +1 -1
- package/dist/vue3/chunks/link_constants-AfTWrr-n.js.map +1 -1
- package/dist/vue3/chunks/link_constants-x8NwdqmA.js.map +1 -1
- package/dist/vue3/chunks/list_item_constants-EiqkqZvP.js.map +1 -1
- package/dist/vue3/chunks/list_item_constants-u1xcN9Dd.js.map +1 -1
- package/dist/vue3/chunks/{modal-XOr4kiNZ.js → modal-8X6poIZW.js} +4 -2
- package/dist/vue3/chunks/{modal-VgxXAQFP.js.map → modal-8X6poIZW.js.map} +1 -1
- package/dist/vue3/chunks/{modal-VgxXAQFP.js → modal-OaWxzqNt.js} +4 -2
- package/dist/{vue2/chunks/modal-XOr4kiNZ.js.map → vue3/chunks/modal-OaWxzqNt.js.map} +1 -1
- package/dist/vue3/chunks/{notice_action-WTucGhvr.js → notice_action-3ed0uIMN.js} +40 -61
- package/dist/vue3/chunks/{notice_action-p-ePanW_.js.map → notice_action-3ed0uIMN.js.map} +1 -1
- package/dist/vue3/chunks/{notice_action-p-ePanW_.js → notice_action-e08Lw5W6.js} +40 -61
- package/dist/vue3/chunks/{notice_action-WTucGhvr.js.map → notice_action-e08Lw5W6.js.map} +1 -1
- package/dist/vue3/chunks/notice_constants-7Qt2CQEY.js.map +1 -1
- package/dist/vue3/chunks/notice_constants-UXo9e3bS.js.map +1 -1
- package/dist/vue3/chunks/{popover_constants-WsOUIY-m.js → popover_constants-6YkPPbnk.js} +26 -47
- package/dist/{vue2/chunks/popover_constants-XnGWXaxX.js.map → vue3/chunks/popover_constants-6YkPPbnk.js.map} +1 -1
- package/dist/vue3/chunks/{popover_constants-XnGWXaxX.js → popover_constants-h9MD6WUt.js} +26 -47
- package/dist/vue3/chunks/{popover_constants-XnGWXaxX.js.map → popover_constants-h9MD6WUt.js.map} +1 -1
- package/dist/vue3/chunks/{sr_only_close_button-3EdsV-dH.js → sr_only_close_button-Ji3Zlts6.js} +4 -4
- package/dist/vue3/chunks/{sr_only_close_button-3EdsV-dH.js.map → sr_only_close_button-Ji3Zlts6.js.map} +1 -1
- package/dist/vue3/chunks/{sr_only_close_button-xGrHFjwA.js → sr_only_close_button-gKr0Vlbz.js} +4 -4
- package/dist/vue3/chunks/{sr_only_close_button-xGrHFjwA.js.map → sr_only_close_button-gKr0Vlbz.js.map} +1 -1
- package/dist/vue3/chunks/stack_constants-HraCekPm.js.map +1 -1
- package/dist/vue3/chunks/stack_constants-SMzMWnAQ.js.map +1 -1
- package/dist/vue3/chunks/{tab-qc3f42Yp.js → tab-X7IvNGTl.js} +46 -49
- package/dist/vue3/chunks/{tab-qc3f42Yp.js.map → tab-X7IvNGTl.js.map} +1 -1
- package/dist/vue3/chunks/{tab-RTDgnD9-.js → tab-aD6t0MNo.js} +46 -49
- package/dist/vue3/chunks/{tab-RTDgnD9-.js.map → tab-aD6t0MNo.js.map} +1 -1
- package/dist/vue3/common/constants.cjs.map +1 -1
- package/dist/vue3/common/constants.js.map +1 -1
- package/dist/vue3/common/dates.cjs +3 -1
- package/dist/vue3/common/dates.cjs.map +1 -1
- package/dist/vue3/common/dates.js +3 -1
- package/dist/vue3/common/dates.js.map +1 -1
- package/dist/vue3/common/emoji.cjs +1 -1
- package/dist/vue3/common/emoji.js +1 -1
- package/dist/vue3/common/mixins.cjs +3 -3
- package/dist/vue3/common/mixins.js +3 -3
- package/dist/vue3/common/utils.cjs +11 -45
- package/dist/vue3/common/utils.cjs.map +1 -1
- package/dist/vue3/common/utils.js +11 -45
- package/dist/vue3/common/utils.js.map +1 -1
- package/dist/vue3/common/validators.cjs.map +1 -1
- package/dist/vue3/common/validators.js.map +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/dialtone-vue.cjs +12 -12
- package/dist/vue3/dialtone-vue.js +12 -12
- package/dist/vue3/lib/attachment-carousel.cjs +87 -108
- package/dist/vue3/lib/attachment-carousel.cjs.map +1 -1
- package/dist/vue3/lib/attachment-carousel.js +87 -108
- package/dist/vue3/lib/attachment-carousel.js.map +1 -1
- package/dist/vue3/lib/avatar.cjs +56 -88
- package/dist/vue3/lib/avatar.cjs.map +1 -1
- package/dist/vue3/lib/avatar.js +56 -88
- package/dist/vue3/lib/avatar.js.map +1 -1
- package/dist/vue3/lib/badge.cjs +15 -31
- package/dist/vue3/lib/badge.cjs.map +1 -1
- package/dist/vue3/lib/badge.js +15 -31
- package/dist/vue3/lib/badge.js.map +1 -1
- package/dist/vue3/lib/banner.cjs +38 -56
- package/dist/vue3/lib/banner.cjs.map +1 -1
- package/dist/vue3/lib/banner.js +38 -56
- package/dist/vue3/lib/banner.js.map +1 -1
- package/dist/vue3/lib/breadcrumbs.cjs +25 -36
- package/dist/vue3/lib/breadcrumbs.cjs.map +1 -1
- package/dist/vue3/lib/breadcrumbs.js +25 -36
- package/dist/vue3/lib/breadcrumbs.js.map +1 -1
- package/dist/vue3/lib/button-group.cjs +2 -7
- package/dist/vue3/lib/button-group.cjs.map +1 -1
- package/dist/vue3/lib/button-group.js +2 -7
- package/dist/vue3/lib/button-group.js.map +1 -1
- package/dist/vue3/lib/button.cjs +44 -69
- package/dist/vue3/lib/button.cjs.map +1 -1
- package/dist/vue3/lib/button.js +44 -69
- package/dist/vue3/lib/button.js.map +1 -1
- package/dist/vue3/lib/callbar-button-with-popover.cjs +68 -81
- package/dist/vue3/lib/callbar-button-with-popover.cjs.map +1 -1
- package/dist/vue3/lib/callbar-button-with-popover.js +68 -81
- package/dist/vue3/lib/callbar-button-with-popover.js.map +1 -1
- package/dist/vue3/lib/callbar-button.cjs +32 -45
- package/dist/vue3/lib/callbar-button.cjs.map +1 -1
- package/dist/vue3/lib/callbar-button.js +32 -45
- package/dist/vue3/lib/callbar-button.js.map +1 -1
- package/dist/vue3/lib/callbox.cjs +38 -57
- package/dist/vue3/lib/callbox.cjs.map +1 -1
- package/dist/vue3/lib/callbox.js +38 -57
- package/dist/vue3/lib/callbox.js.map +1 -1
- package/dist/vue3/lib/card.cjs +13 -33
- package/dist/vue3/lib/card.cjs.map +1 -1
- package/dist/vue3/lib/card.js +13 -33
- package/dist/vue3/lib/card.js.map +1 -1
- package/dist/vue3/lib/checkbox-group.cjs +2 -5
- package/dist/vue3/lib/checkbox-group.cjs.map +1 -1
- package/dist/vue3/lib/checkbox-group.js +2 -5
- package/dist/vue3/lib/checkbox-group.js.map +1 -1
- package/dist/vue3/lib/checkbox.cjs +41 -45
- package/dist/vue3/lib/checkbox.cjs.map +1 -1
- package/dist/vue3/lib/checkbox.js +41 -45
- package/dist/vue3/lib/checkbox.js.map +1 -1
- package/dist/vue3/lib/chip.cjs +38 -53
- package/dist/vue3/lib/chip.cjs.map +1 -1
- package/dist/vue3/lib/chip.js +38 -53
- package/dist/vue3/lib/chip.js.map +1 -1
- package/dist/vue3/lib/codeblock.cjs +4 -6
- package/dist/vue3/lib/codeblock.cjs.map +1 -1
- package/dist/vue3/lib/codeblock.js +4 -6
- package/dist/vue3/lib/codeblock.js.map +1 -1
- package/dist/vue3/lib/collapsible.cjs +62 -76
- package/dist/vue3/lib/collapsible.cjs.map +1 -1
- package/dist/vue3/lib/collapsible.js +62 -76
- package/dist/vue3/lib/collapsible.js.map +1 -1
- package/dist/vue3/lib/combobox-multi-select.cjs +75 -88
- package/dist/vue3/lib/combobox-multi-select.cjs.map +1 -1
- package/dist/vue3/lib/combobox-multi-select.js +75 -88
- package/dist/vue3/lib/combobox-multi-select.js.map +1 -1
- package/dist/vue3/lib/combobox-with-popover.cjs +77 -85
- package/dist/vue3/lib/combobox-with-popover.cjs.map +1 -1
- package/dist/vue3/lib/combobox-with-popover.js +77 -85
- package/dist/vue3/lib/combobox-with-popover.js.map +1 -1
- package/dist/vue3/lib/combobox.cjs +3 -3
- package/dist/vue3/lib/combobox.js +3 -3
- package/dist/vue3/lib/contact-centers-row.cjs +65 -89
- package/dist/vue3/lib/contact-centers-row.cjs.map +1 -1
- package/dist/vue3/lib/contact-centers-row.js +65 -89
- package/dist/vue3/lib/contact-centers-row.js.map +1 -1
- package/dist/vue3/lib/contact-info.cjs +58 -73
- package/dist/vue3/lib/contact-info.cjs.map +1 -1
- package/dist/vue3/lib/contact-info.js +58 -73
- package/dist/vue3/lib/contact-info.js.map +1 -1
- package/dist/vue3/lib/contact-row.cjs +37 -47
- package/dist/vue3/lib/contact-row.cjs.map +1 -1
- package/dist/vue3/lib/contact-row.js +37 -47
- package/dist/vue3/lib/contact-row.js.map +1 -1
- package/dist/vue3/lib/datepicker.cjs +267 -263
- package/dist/vue3/lib/datepicker.cjs.map +1 -1
- package/dist/vue3/lib/datepicker.js +267 -263
- package/dist/vue3/lib/datepicker.js.map +1 -1
- package/dist/vue3/lib/description-list.cjs +9 -14
- package/dist/vue3/lib/description-list.cjs.map +1 -1
- package/dist/vue3/lib/description-list.js +9 -14
- package/dist/vue3/lib/description-list.js.map +1 -1
- package/dist/vue3/lib/dropdown.cjs +6 -6
- package/dist/vue3/lib/dropdown.cjs.map +1 -1
- package/dist/vue3/lib/dropdown.js +6 -6
- package/dist/vue3/lib/dropdown.js.map +1 -1
- package/dist/vue3/lib/editor.cjs +312 -249
- package/dist/vue3/lib/editor.cjs.map +1 -1
- package/dist/vue3/lib/editor.js +312 -249
- package/dist/vue3/lib/editor.js.map +1 -1
- package/dist/vue3/lib/emoji-picker.cjs +387 -419
- package/dist/vue3/lib/emoji-picker.cjs.map +1 -1
- package/dist/vue3/lib/emoji-picker.js +387 -419
- package/dist/vue3/lib/emoji-picker.js.map +1 -1
- package/dist/vue3/lib/emoji-row.cjs +59 -69
- package/dist/vue3/lib/emoji-row.cjs.map +1 -1
- package/dist/vue3/lib/emoji-row.js +59 -69
- package/dist/vue3/lib/emoji-row.js.map +1 -1
- package/dist/vue3/lib/emoji-text-wrapper.cjs +13 -12
- package/dist/vue3/lib/emoji-text-wrapper.cjs.map +1 -1
- package/dist/vue3/lib/emoji-text-wrapper.js +13 -12
- package/dist/vue3/lib/emoji-text-wrapper.js.map +1 -1
- package/dist/vue3/lib/emoji.cjs +19 -23
- package/dist/vue3/lib/emoji.cjs.map +1 -1
- package/dist/vue3/lib/emoji.js +19 -23
- package/dist/vue3/lib/emoji.js.map +1 -1
- package/dist/vue3/lib/empty-state.cjs +20 -30
- package/dist/vue3/lib/empty-state.cjs.map +1 -1
- package/dist/vue3/lib/empty-state.js +20 -30
- package/dist/vue3/lib/empty-state.js.map +1 -1
- package/dist/vue3/lib/feed-item-row.cjs +43 -74
- package/dist/vue3/lib/feed-item-row.cjs.map +1 -1
- package/dist/vue3/lib/feed-item-row.js +43 -74
- package/dist/vue3/lib/feed-item-row.js.map +1 -1
- package/dist/vue3/lib/feed-pill.cjs +45 -55
- package/dist/vue3/lib/feed-pill.cjs.map +1 -1
- package/dist/vue3/lib/feed-pill.js +45 -55
- package/dist/vue3/lib/feed-pill.js.map +1 -1
- package/dist/vue3/lib/general-row.cjs +115 -165
- package/dist/vue3/lib/general-row.cjs.map +1 -1
- package/dist/vue3/lib/general-row.js +115 -165
- package/dist/vue3/lib/general-row.js.map +1 -1
- package/dist/vue3/lib/group-row.cjs +7 -9
- package/dist/vue3/lib/group-row.cjs.map +1 -1
- package/dist/vue3/lib/group-row.js +7 -9
- package/dist/vue3/lib/group-row.js.map +1 -1
- package/dist/vue3/lib/grouped-chip.cjs +27 -48
- package/dist/vue3/lib/grouped-chip.cjs.map +1 -1
- package/dist/vue3/lib/grouped-chip.js +27 -48
- package/dist/vue3/lib/grouped-chip.js.map +1 -1
- package/dist/vue3/lib/hovercard.cjs +25 -33
- package/dist/vue3/lib/hovercard.cjs.map +1 -1
- package/dist/vue3/lib/hovercard.js +25 -33
- package/dist/vue3/lib/hovercard.js.map +1 -1
- package/dist/vue3/lib/icon.cjs +1 -1
- package/dist/vue3/lib/icon.cjs.map +1 -1
- package/dist/vue3/lib/icon.js +1 -1
- package/dist/vue3/lib/icon.js.map +1 -1
- package/dist/vue3/lib/illustration.cjs +2 -1
- package/dist/vue3/lib/illustration.cjs.map +1 -1
- package/dist/vue3/lib/illustration.js +2 -1
- package/dist/vue3/lib/illustration.js.map +1 -1
- package/dist/vue3/lib/image-viewer.cjs +62 -66
- package/dist/vue3/lib/image-viewer.cjs.map +1 -1
- package/dist/vue3/lib/image-viewer.js +62 -66
- package/dist/vue3/lib/image-viewer.js.map +1 -1
- package/dist/vue3/lib/input-group.cjs +15 -19
- package/dist/vue3/lib/input-group.cjs.map +1 -1
- package/dist/vue3/lib/input-group.js +15 -19
- package/dist/vue3/lib/input-group.js.map +1 -1
- package/dist/vue3/lib/input.cjs +76 -104
- package/dist/vue3/lib/input.cjs.map +1 -1
- package/dist/vue3/lib/input.js +76 -104
- package/dist/vue3/lib/input.js.map +1 -1
- package/dist/vue3/lib/item-layout.cjs +10 -27
- package/dist/vue3/lib/item-layout.cjs.map +1 -1
- package/dist/vue3/lib/item-layout.js +10 -27
- package/dist/vue3/lib/item-layout.js.map +1 -1
- package/dist/vue3/lib/ivr-node.cjs +80 -89
- package/dist/vue3/lib/ivr-node.cjs.map +1 -1
- package/dist/vue3/lib/ivr-node.js +80 -89
- package/dist/vue3/lib/ivr-node.js.map +1 -1
- package/dist/vue3/lib/keyboard-shortcut.cjs +26 -31
- package/dist/vue3/lib/keyboard-shortcut.cjs.map +1 -1
- package/dist/vue3/lib/keyboard-shortcut.js +26 -31
- package/dist/vue3/lib/keyboard-shortcut.js.map +1 -1
- package/dist/vue3/lib/lazy-show.cjs +6 -8
- package/dist/vue3/lib/lazy-show.cjs.map +1 -1
- package/dist/vue3/lib/lazy-show.js +6 -8
- package/dist/vue3/lib/lazy-show.js.map +1 -1
- package/dist/vue3/lib/link.cjs +2 -7
- package/dist/vue3/lib/link.cjs.map +1 -1
- package/dist/vue3/lib/link.js +2 -7
- package/dist/vue3/lib/link.js.map +1 -1
- package/dist/vue3/lib/list-item-group.cjs +7 -14
- package/dist/vue3/lib/list-item-group.cjs.map +1 -1
- package/dist/vue3/lib/list-item-group.js +7 -14
- package/dist/vue3/lib/list-item-group.js.map +1 -1
- package/dist/vue3/lib/list-item.cjs +24 -25
- package/dist/vue3/lib/list-item.cjs.map +1 -1
- package/dist/vue3/lib/list-item.js +24 -25
- package/dist/vue3/lib/list-item.js.map +1 -1
- package/dist/vue3/lib/message-input.cjs +227 -264
- package/dist/vue3/lib/message-input.cjs.map +1 -1
- package/dist/vue3/lib/message-input.js +227 -264
- package/dist/vue3/lib/message-input.js.map +1 -1
- package/dist/vue3/lib/modal.cjs +59 -99
- package/dist/vue3/lib/modal.cjs.map +1 -1
- package/dist/vue3/lib/modal.js +59 -99
- package/dist/vue3/lib/modal.js.map +1 -1
- package/dist/vue3/lib/notice.cjs +33 -46
- package/dist/vue3/lib/notice.cjs.map +1 -1
- package/dist/vue3/lib/notice.js +33 -46
- package/dist/vue3/lib/notice.js.map +1 -1
- package/dist/vue3/lib/pagination.cjs +49 -61
- package/dist/vue3/lib/pagination.cjs.map +1 -1
- package/dist/vue3/lib/pagination.js +49 -61
- package/dist/vue3/lib/pagination.js.map +1 -1
- package/dist/vue3/lib/popover.cjs +133 -156
- package/dist/vue3/lib/popover.cjs.map +1 -1
- package/dist/vue3/lib/popover.js +134 -157
- package/dist/vue3/lib/popover.js.map +1 -1
- package/dist/vue3/lib/presence.cjs +9 -17
- package/dist/vue3/lib/presence.cjs.map +1 -1
- package/dist/vue3/lib/presence.js +9 -17
- package/dist/vue3/lib/presence.js.map +1 -1
- package/dist/vue3/lib/radio-group.cjs +1 -1
- package/dist/vue3/lib/radio-group.cjs.map +1 -1
- package/dist/vue3/lib/radio-group.js +1 -1
- package/dist/vue3/lib/radio-group.js.map +1 -1
- package/dist/vue3/lib/radio.cjs +34 -41
- package/dist/vue3/lib/radio.cjs.map +1 -1
- package/dist/vue3/lib/radio.js +34 -41
- package/dist/vue3/lib/radio.js.map +1 -1
- package/dist/vue3/lib/rich-text-editor.cjs +292 -288
- package/dist/vue3/lib/rich-text-editor.cjs.map +1 -1
- package/dist/vue3/lib/rich-text-editor.js +292 -288
- package/dist/vue3/lib/rich-text-editor.js.map +1 -1
- package/dist/vue3/lib/root-layout.cjs +24 -39
- package/dist/vue3/lib/root-layout.cjs.map +1 -1
- package/dist/vue3/lib/root-layout.js +24 -39
- package/dist/vue3/lib/root-layout.js.map +1 -1
- package/dist/vue3/lib/scrollbar-directive.cjs.map +1 -1
- package/dist/vue3/lib/scrollbar-directive.js.map +1 -1
- package/dist/vue3/lib/scroller.cjs +100 -83
- package/dist/vue3/lib/scroller.cjs.map +1 -1
- package/dist/vue3/lib/scroller.js +100 -83
- package/dist/vue3/lib/scroller.js.map +1 -1
- package/dist/vue3/lib/select-menu.cjs +40 -67
- package/dist/vue3/lib/select-menu.cjs.map +1 -1
- package/dist/vue3/lib/select-menu.js +40 -67
- package/dist/vue3/lib/select-menu.js.map +1 -1
- package/dist/vue3/lib/settings-menu-button.cjs +10 -16
- package/dist/vue3/lib/settings-menu-button.cjs.map +1 -1
- package/dist/vue3/lib/settings-menu-button.js +10 -16
- package/dist/vue3/lib/settings-menu-button.js.map +1 -1
- package/dist/vue3/lib/skeleton.cjs +74 -93
- package/dist/vue3/lib/skeleton.cjs.map +1 -1
- package/dist/vue3/lib/skeleton.js +74 -93
- package/dist/vue3/lib/skeleton.js.map +1 -1
- package/dist/vue3/lib/split-button.cjs +68 -74
- package/dist/vue3/lib/split-button.cjs.map +1 -1
- package/dist/vue3/lib/split-button.js +68 -74
- package/dist/vue3/lib/split-button.js.map +1 -1
- package/dist/vue3/lib/stack.cjs +18 -26
- package/dist/vue3/lib/stack.cjs.map +1 -1
- package/dist/vue3/lib/stack.js +18 -26
- package/dist/vue3/lib/stack.js.map +1 -1
- package/dist/vue3/lib/tabs.cjs +3 -7
- package/dist/vue3/lib/tabs.cjs.map +1 -1
- package/dist/vue3/lib/tabs.js +3 -7
- package/dist/vue3/lib/tabs.js.map +1 -1
- package/dist/vue3/lib/time-pill.cjs.map +1 -1
- package/dist/vue3/lib/time-pill.js.map +1 -1
- package/dist/vue3/lib/toast.cjs +35 -51
- package/dist/vue3/lib/toast.cjs.map +1 -1
- package/dist/vue3/lib/toast.js +35 -51
- package/dist/vue3/lib/toast.js.map +1 -1
- package/dist/vue3/lib/toggle.cjs +24 -34
- package/dist/vue3/lib/toggle.cjs.map +1 -1
- package/dist/vue3/lib/toggle.js +24 -34
- package/dist/vue3/lib/toggle.js.map +1 -1
- package/dist/vue3/lib/tooltip-directive.cjs +26 -19
- package/dist/vue3/lib/tooltip-directive.cjs.map +1 -1
- package/dist/vue3/lib/tooltip-directive.js +26 -19
- package/dist/vue3/lib/tooltip-directive.js.map +1 -1
- package/dist/vue3/lib/tooltip.cjs +21 -32
- package/dist/vue3/lib/tooltip.cjs.map +1 -1
- package/dist/vue3/lib/tooltip.js +22 -33
- package/dist/vue3/lib/tooltip.js.map +1 -1
- package/dist/vue3/lib/top-banner-info.cjs +8 -23
- package/dist/vue3/lib/top-banner-info.cjs.map +1 -1
- package/dist/vue3/lib/top-banner-info.js +8 -23
- package/dist/vue3/lib/top-banner-info.js.map +1 -1
- package/dist/vue3/lib/unread-pill.cjs +8 -11
- package/dist/vue3/lib/unread-pill.cjs.map +1 -1
- package/dist/vue3/lib/unread-pill.js +8 -11
- package/dist/vue3/lib/unread-pill.js.map +1 -1
- package/dist/vue3/lib/validation-messages.cjs +14 -17
- package/dist/vue3/lib/validation-messages.cjs.map +1 -1
- package/dist/vue3/lib/validation-messages.js +14 -17
- package/dist/vue3/lib/validation-messages.js.map +1 -1
- package/dist/vue3/types/components/button/button.vue.d.ts +1 -1
- package/dist/vue3/types/components/chip/chip.vue.d.ts +1 -1
- package/dist/vue3/types/components/combobox/combobox.vue.d.ts +1 -1
- package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts +1 -1
- package/dist/vue3/types/components/icon/icon.vue.d.ts +2 -2
- package/dist/vue3/types/components/icon/icon_constants.d.ts +1 -1
- package/dist/vue3/types/components/icon/icon_constants.d.ts.map +1 -1
- package/dist/vue3/types/components/illustration/illustration_constants.d.ts +1 -1
- package/dist/vue3/types/components/illustration/illustration_constants.d.ts.map +1 -1
- package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts +21 -0
- package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/input/input.vue.d.ts +1 -1
- package/dist/vue3/types/components/modal/modal.vue.d.ts +1 -1
- package/dist/vue3/types/components/notice/notice.vue.d.ts +1 -1
- package/dist/vue3/types/components/radio/radio.vue.d.ts +1 -1
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +1 -1
- package/dist/vue3/types/components/scroller/modules/scroller_item.vue.d.ts +1 -1
- package/dist/vue3/types/components/split_button/split_button-alpha.vue.d.ts +1 -1
- package/dist/vue3/types/components/tabs/tab.vue.d.ts +1 -1
- package/dist/vue3/types/components/toast/toast.vue.d.ts +2 -2
- package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -1
- package/package.json +3 -3
- package/dist/vue2/chunks/icon_constants-Dy4MEUJL.js.map +0 -1
- package/dist/vue2/chunks/icon_constants-QYpmdE0R.js.map +0 -1
- package/dist/vue3/chunks/icon_constants-Dy4MEUJL.js.map +0 -1
- package/dist/vue3/chunks/icon_constants-QYpmdE0R.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.cjs","sources":["../../components/tabs/tab_panel.vue"],"sourcesContent":["<template>\n <div\n v-show=\"!hidePanel\"\n :id=\"`dt-panel-${id}`\"\n role=\"tabpanel\"\n :tabindex=\"isFirstElementFocusable ? -1 : 0\"\n :aria-labelledby=\"`dt-tab-${tabId}`\"\n :aria-hidden=\"`${hidePanel}`\"\n :class=\"tabPanelClass\"\n data-qa=\"dt-tab-panel\"\n >\n <!-- @slot Default slot for Tab Panel -->\n <slot />\n </div>\n</template>\n\n<script>\nimport Modal from '@/common/mixins/modal';\n\n/**\n * Tabs allow users to navigation between grouped content in different views while within the same page context.\n * @see https://dialtone.dialpad.com/components/tabs.html\n */\nexport default {\n name: 'DtTabPanel',\n\n mixins: [Modal],\n\n inject: ['groupContext'],\n\n props: {\n /**\n * Id of the panel\n */\n id: {\n type: String,\n required: true,\n },\n\n /**\n * Id of the associated tab\n */\n tabId: {\n type: String,\n required: true,\n },\n\n /**\n * If true, hides the tab content\n * @values true, false\n */\n hidden: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Used to customize the tab element\n */\n tabPanelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n data () {\n return {\n isFirstElementFocusable: false,\n };\n },\n\n computed: {\n hidePanel () {\n return this.groupContext.selected !== this.id || this.hidden;\n },\n },\n\n async mounted () {\n const firstFocusableElement = await this.getFirstFocusableElement(this.$el);\n\n if (!firstFocusableElement) {\n this.isFirstElementFocusable = false;\n } else {\n // If the first focusable element isn't the first element in the panel,\n // then we need to set the panel tabindex to 0.\n // See notes in https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/\n this.isFirstElementFocusable = this.isFirstElementOfPanel(firstFocusableElement);\n }\n },\n\n methods: {\n isFirstElementOfPanel (element) {\n let current = element;\n let isFirstElement = true;\n\n while (current) {\n if (current.previousElementSibling !== null) {\n isFirstElement = false;\n break;\n }\n current = current.parentNode !== this.$el ? current.parentNode : null;\n }\n\n return isFirstElement;\n },\n },\n};\n</script>\n"],"names":["Modal","_createElementBlock","_renderSlot"],"mappings":";;;;;;;;;;AAuBA,
|
|
1
|
+
{"version":3,"file":"tabs.cjs","sources":["../../components/tabs/tab_panel.vue"],"sourcesContent":["<template>\n <div\n v-show=\"!hidePanel\"\n :id=\"`dt-panel-${id}`\"\n role=\"tabpanel\"\n :tabindex=\"isFirstElementFocusable ? -1 : 0\"\n :aria-labelledby=\"`dt-tab-${tabId}`\"\n :aria-hidden=\"`${hidePanel}`\"\n :class=\"tabPanelClass\"\n data-qa=\"dt-tab-panel\"\n >\n <!-- @slot Default slot for Tab Panel -->\n <slot />\n </div>\n</template>\n\n<script>\nimport Modal from '@/common/mixins/modal';\n\n/**\n * Tabs allow users to navigation between grouped content in different views while within the same page context.\n * @see https://dialtone.dialpad.com/components/tabs.html\n */\nexport default {\n name: 'DtTabPanel',\n\n mixins: [Modal],\n\n inject: ['groupContext'],\n\n props: {\n /**\n * Id of the panel\n */\n id: {\n type: String,\n required: true,\n },\n\n /**\n * Id of the associated tab\n */\n tabId: {\n type: String,\n required: true,\n },\n\n /**\n * If true, hides the tab content\n * @values true, false\n */\n hidden: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Used to customize the tab element\n */\n tabPanelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n data () {\n return {\n isFirstElementFocusable: false,\n };\n },\n\n computed: {\n hidePanel () {\n return this.groupContext.selected !== this.id || this.hidden;\n },\n },\n\n async mounted () {\n const firstFocusableElement = await this.getFirstFocusableElement(this.$el);\n\n if (!firstFocusableElement) {\n this.isFirstElementFocusable = false;\n } else {\n // If the first focusable element isn't the first element in the panel,\n // then we need to set the panel tabindex to 0.\n // See notes in https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/\n this.isFirstElementFocusable = this.isFirstElementOfPanel(firstFocusableElement);\n }\n },\n\n methods: {\n isFirstElementOfPanel (element) {\n let current = element;\n let isFirstElement = true;\n\n while (current) {\n if (current.previousElementSibling !== null) {\n isFirstElement = false;\n break;\n }\n current = current.parentNode !== this.$el ? current.parentNode : null;\n }\n\n return isFirstElement;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","name","mixins","Modal","inject","props","id","type","String","required","tabId","hidden","Boolean","default","tabPanelClass","Array","Object","data","isFirstElementFocusable","computed","hidePanel","groupContext","selected","mounted","firstFocusableElement","getFirstFocusableElement","$el","isFirstElementOfPanel","methods","element","current","isFirstElement","previousElementSibling","parentNode","_createElementBlock","$props","role","tabindex","$data","$options","class","_renderSlot","_ctx","$slots"],"mappings":";;;;;;;;;;AAuBA,MAAKA,YAAU;AAAA,EACbC,MAAM;AAAA,EAENC,QAAQ,CAACC,MAAAA,KAAK;AAAA,EAEdC,QAAQ,CAAC,cAAc;AAAA,EAEvBC,OAAO;AAAA;AAAA;AAAA;AAAA,IAILC,IAAI;AAAA,MACFC,MAAMC;AAAAA,MACNC,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKDC,OAAO;AAAA,MACLH,MAAMC;AAAAA,MACNC,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA,IAMDE,QAAQ;AAAA,MACNJ,MAAMK;AAAAA,MACNC,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKDC,eAAe;AAAA,MACbP,MAAM,CAACC,QAAQO,OAAOC,MAAM;AAAA,MAC5BH,SAAS;AAAA,IACX;AAAA,EACD;AAAA,EAEDI,OAAQ;AACN,WAAO;AAAA,MACLC,yBAAyB;AAAA;EAE5B;AAAA,EAEDC,UAAU;AAAA,IACRC,YAAa;AACX,aAAO,KAAKC,aAAaC,aAAa,KAAKhB,MAAM,KAAKK;AAAAA,IACxD;AAAA,EACD;AAAA,EAED,MAAMY,UAAW;AACf,UAAMC,wBAAwB,MAAM,KAAKC,yBAAyB,KAAKC,GAAG;AAE1E,QAAI,CAACF,uBAAuB;AAC1B,WAAKN,0BAA0B;AAAA,IACjC,OAAO;AAIL,WAAKA,0BAA0B,KAAKS,sBAAsBH,qBAAqB;AAAA,IACjF;AAAA,EACD;AAAA,EAEDI,SAAS;AAAA,IACPD,sBAAuBE,SAAS;AAC9B,UAAIC,UAAUD;AACd,UAAIE,iBAAiB;AAErB,aAAOD,SAAS;AACd,YAAIA,QAAQE,2BAA2B,MAAM;AAC3CD,2BAAiB;AACjB;AAAA,QACF;AACAD,kBAAUA,QAAQG,eAAe,KAAKP,MAAMI,QAAQG,aAAa;AAAA,MACnE;AAEA,aAAOF;AAAAA,IACT;AAAA,EACF;AACF;;;8CAzGEG,IAAAA,mBAYM,OAAA;AAAA,IAVH5B,gBAAgB6B,OAAE7B,EAAA;AAAA,IACnB8B,MAAK;AAAA,IACJC,UAAUC,MAAuBpB,0BAAA,KAAA;AAAA,IACjC,6BAA2BiB,OAAKzB,KAAA;AAAA,IAChC,kBAAgB6B,SAASnB,SAAA;AAAA,IACzBoB,0BAAOL,OAAarB,aAAA;AAAA,IACrB,WAAQ;AAAA,MAGR2B,IAAQ,WAAAC,KAAAC,QAAA,SAAA,CAAA,mCAVCJ,SAASnB,SAAA,CAAA;;;;;;;;;;"}
|
package/dist/vue3/lib/tabs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DtTab, DtTabGroup, TAB_IMPORTANCE_MODIFIERS, TAB_LIST_IMPORTANCE_MODIFIERS, TAB_LIST_KIND_MODIFIERS, TAB_LIST_SIZES } from "../chunks/tab-
|
|
2
|
-
import { Modal } from "../chunks/modal-
|
|
1
|
+
import { DtTab, DtTabGroup, TAB_IMPORTANCE_MODIFIERS, TAB_LIST_IMPORTANCE_MODIFIERS, TAB_LIST_KIND_MODIFIERS, TAB_LIST_SIZES } from "../chunks/tab-aD6t0MNo.js";
|
|
2
|
+
import { Modal } from "../chunks/modal-8X6poIZW.js";
|
|
3
3
|
import { withDirectives, openBlock, createElementBlock, normalizeClass, renderSlot, vShow } from "vue";
|
|
4
4
|
import { _export_sfc } from "../chunks/_plugin-vue_export-helper-caHeSgYY.js";
|
|
5
5
|
import "./button.js";
|
|
@@ -84,11 +84,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
84
84
|
"aria-hidden": `${$options.hidePanel}`,
|
|
85
85
|
class: normalizeClass($props.tabPanelClass),
|
|
86
86
|
"data-qa": "dt-tab-panel"
|
|
87
|
-
}, [
|
|
88
|
-
renderSlot(_ctx.$slots, "default")
|
|
89
|
-
], 10, _hoisted_1)), [
|
|
90
|
-
[vShow, !$options.hidePanel]
|
|
91
|
-
]);
|
|
87
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1)), [[vShow, !$options.hidePanel]]);
|
|
92
88
|
}
|
|
93
89
|
const tab_panel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
94
90
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","sources":["../../components/tabs/tab_panel.vue"],"sourcesContent":["<template>\n <div\n v-show=\"!hidePanel\"\n :id=\"`dt-panel-${id}`\"\n role=\"tabpanel\"\n :tabindex=\"isFirstElementFocusable ? -1 : 0\"\n :aria-labelledby=\"`dt-tab-${tabId}`\"\n :aria-hidden=\"`${hidePanel}`\"\n :class=\"tabPanelClass\"\n data-qa=\"dt-tab-panel\"\n >\n <!-- @slot Default slot for Tab Panel -->\n <slot />\n </div>\n</template>\n\n<script>\nimport Modal from '@/common/mixins/modal';\n\n/**\n * Tabs allow users to navigation between grouped content in different views while within the same page context.\n * @see https://dialtone.dialpad.com/components/tabs.html\n */\nexport default {\n name: 'DtTabPanel',\n\n mixins: [Modal],\n\n inject: ['groupContext'],\n\n props: {\n /**\n * Id of the panel\n */\n id: {\n type: String,\n required: true,\n },\n\n /**\n * Id of the associated tab\n */\n tabId: {\n type: String,\n required: true,\n },\n\n /**\n * If true, hides the tab content\n * @values true, false\n */\n hidden: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Used to customize the tab element\n */\n tabPanelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n data () {\n return {\n isFirstElementFocusable: false,\n };\n },\n\n computed: {\n hidePanel () {\n return this.groupContext.selected !== this.id || this.hidden;\n },\n },\n\n async mounted () {\n const firstFocusableElement = await this.getFirstFocusableElement(this.$el);\n\n if (!firstFocusableElement) {\n this.isFirstElementFocusable = false;\n } else {\n // If the first focusable element isn't the first element in the panel,\n // then we need to set the panel tabindex to 0.\n // See notes in https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/\n this.isFirstElementFocusable = this.isFirstElementOfPanel(firstFocusableElement);\n }\n },\n\n methods: {\n isFirstElementOfPanel (element) {\n let current = element;\n let isFirstElement = true;\n\n while (current) {\n if (current.previousElementSibling !== null) {\n isFirstElement = false;\n break;\n }\n current = current.parentNode !== this.$el ? current.parentNode : null;\n }\n\n return isFirstElement;\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_renderSlot"],"mappings":";;;;;;;;AAuBA,
|
|
1
|
+
{"version":3,"file":"tabs.js","sources":["../../components/tabs/tab_panel.vue"],"sourcesContent":["<template>\n <div\n v-show=\"!hidePanel\"\n :id=\"`dt-panel-${id}`\"\n role=\"tabpanel\"\n :tabindex=\"isFirstElementFocusable ? -1 : 0\"\n :aria-labelledby=\"`dt-tab-${tabId}`\"\n :aria-hidden=\"`${hidePanel}`\"\n :class=\"tabPanelClass\"\n data-qa=\"dt-tab-panel\"\n >\n <!-- @slot Default slot for Tab Panel -->\n <slot />\n </div>\n</template>\n\n<script>\nimport Modal from '@/common/mixins/modal';\n\n/**\n * Tabs allow users to navigation between grouped content in different views while within the same page context.\n * @see https://dialtone.dialpad.com/components/tabs.html\n */\nexport default {\n name: 'DtTabPanel',\n\n mixins: [Modal],\n\n inject: ['groupContext'],\n\n props: {\n /**\n * Id of the panel\n */\n id: {\n type: String,\n required: true,\n },\n\n /**\n * Id of the associated tab\n */\n tabId: {\n type: String,\n required: true,\n },\n\n /**\n * If true, hides the tab content\n * @values true, false\n */\n hidden: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Used to customize the tab element\n */\n tabPanelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n data () {\n return {\n isFirstElementFocusable: false,\n };\n },\n\n computed: {\n hidePanel () {\n return this.groupContext.selected !== this.id || this.hidden;\n },\n },\n\n async mounted () {\n const firstFocusableElement = await this.getFirstFocusableElement(this.$el);\n\n if (!firstFocusableElement) {\n this.isFirstElementFocusable = false;\n } else {\n // If the first focusable element isn't the first element in the panel,\n // then we need to set the panel tabindex to 0.\n // See notes in https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/\n this.isFirstElementFocusable = this.isFirstElementOfPanel(firstFocusableElement);\n }\n },\n\n methods: {\n isFirstElementOfPanel (element) {\n let current = element;\n let isFirstElement = true;\n\n while (current) {\n if (current.previousElementSibling !== null) {\n isFirstElement = false;\n break;\n }\n current = current.parentNode !== this.$el ? current.parentNode : null;\n }\n\n return isFirstElement;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","name","mixins","Modal","inject","props","id","type","String","required","tabId","hidden","Boolean","default","tabPanelClass","Array","Object","data","isFirstElementFocusable","computed","hidePanel","groupContext","selected","mounted","firstFocusableElement","getFirstFocusableElement","$el","isFirstElementOfPanel","methods","element","current","isFirstElement","previousElementSibling","parentNode","_createElementBlock","$props","role","tabindex","$data","$options","class","_renderSlot","_ctx","$slots"],"mappings":";;;;;;;;AAuBA,MAAKA,YAAU;AAAA,EACbC,MAAM;AAAA,EAENC,QAAQ,CAACC,KAAK;AAAA,EAEdC,QAAQ,CAAC,cAAc;AAAA,EAEvBC,OA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B,KAAA;AAAA,IAChC,kBAAgB6B,SAASnB,SAAA;AAAA,IACzBoB,sBAAOL,OAAarB,aAAA;AAAA,IACrB,WAAQ;AAAA,MAGR2B,WAAQC,KAAAC,QAAA,SAAA,CAAA,+BAVCJ,SAASnB,SAAA,CAAA;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-pill.cjs","sources":["../../recipes/conversation_view/time_pill/time_pill.vue"],"sourcesContent":["<template>\n <time\n data-qa=\"dt-time-pill\"\n :dateTime=\"dateTime\"\n class=\"dt-time-pill\"\n >\n {{ dateTimeDisplay }}\n </time>\n</template>\n\n<script>\nimport {} from './time_pill_constants';\n\nexport default {\n name: 'DtRecipeTimePill',\n\n props: {\n /**\n * Date time display value\n */\n dateTimeDisplay: {\n type: String,\n required: true,\n },\n\n /**\n * Machine-readable attribute\n * Accepts a string value of YYYY-MM-DD or YYYY-MM-DDThh:mm:ssTZD\n */\n dateTime: {\n type: String,\n required: true,\n validator: (t) => {\n // Since this will only ever be used in the context of a date, we're rejecting non date inputs\n const x = new Date(t);\n if (x instanceof Date && !isNaN(x)) {\n return true;\n }\n return false;\n },\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-time-pill {\n border: var(--dt-size-100) solid;\n border-radius: var(--dt-size-radius-pill);\n border-width: var(--dt-size-100);\n --bco: 100%;\n border-color: var(--dt-color-black-300);\n padding-left: var(--dt-space-500);\n padding-right: var(--dt-space-500);\n padding-top: var(--dt-space-300);\n padding-bottom: var(--dt-space-300);\n font-size: var(--dt-font-size-100);\n}\n</style>\n"],"names":["_createElementBlock"],"mappings":";;;;AAaA,
|
|
1
|
+
{"version":3,"file":"time-pill.cjs","sources":["../../recipes/conversation_view/time_pill/time_pill.vue"],"sourcesContent":["<template>\n <time\n data-qa=\"dt-time-pill\"\n :dateTime=\"dateTime\"\n class=\"dt-time-pill\"\n >\n {{ dateTimeDisplay }}\n </time>\n</template>\n\n<script>\nimport {} from './time_pill_constants';\n\nexport default {\n name: 'DtRecipeTimePill',\n\n props: {\n /**\n * Date time display value\n */\n dateTimeDisplay: {\n type: String,\n required: true,\n },\n\n /**\n * Machine-readable attribute\n * Accepts a string value of YYYY-MM-DD or YYYY-MM-DDThh:mm:ssTZD\n */\n dateTime: {\n type: String,\n required: true,\n validator: (t) => {\n // Since this will only ever be used in the context of a date, we're rejecting non date inputs\n const x = new Date(t);\n if (x instanceof Date && !isNaN(x)) {\n return true;\n }\n return false;\n },\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-time-pill {\n border: var(--dt-size-100) solid;\n border-radius: var(--dt-size-radius-pill);\n border-width: var(--dt-size-100);\n --bco: 100%;\n border-color: var(--dt-color-black-300);\n padding-left: var(--dt-space-500);\n padding-right: var(--dt-space-500);\n padding-top: var(--dt-space-300);\n padding-bottom: var(--dt-space-300);\n font-size: var(--dt-font-size-100);\n}\n</style>\n"],"names":["_sfc_main","name","props","dateTimeDisplay","type","String","required","dateTime","validator","t","x","Date","isNaN","_createElementBlock","$props","class","_hoisted_1"],"mappings":";;;;AAaA,MAAKA,YAAU;AAAA,EACbC,MAAM;AAAA,EAENC,OAAO;AAAA;AAAA;AAAA;AAAA,IAILC,iBAAiB;AAAA,MACfC,MAAMC;AAAAA,MACNC,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA,IAMDC,UAAU;AAAA,MACRH,MAAMC;AAAAA,MACNC,UAAU;AAAA,MACVE,WAAYC,OAAM;AAEhB,cAAMC,IAAI,IAAIC,KAAKF,CAAC;AACpB,YAAIC,aAAaC,QAAQ,CAACC,MAAMF,CAAC,GAAG;AAClC,iBAAO;AAAA,QACT;AACA,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;;;0BAzCEG,IAMO,mBAAA,QAAA;AAAA,IALL,WAAQ;AAAA,IACPN,UAAUO,OAAQP;AAAAA,IACnBQ,OAAM;AAAA,yBAEHD,OAAeX,eAAA,GAAA,GAAAa,UAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-pill.js","sources":["../../recipes/conversation_view/time_pill/time_pill.vue"],"sourcesContent":["<template>\n <time\n data-qa=\"dt-time-pill\"\n :dateTime=\"dateTime\"\n class=\"dt-time-pill\"\n >\n {{ dateTimeDisplay }}\n </time>\n</template>\n\n<script>\nimport {} from './time_pill_constants';\n\nexport default {\n name: 'DtRecipeTimePill',\n\n props: {\n /**\n * Date time display value\n */\n dateTimeDisplay: {\n type: String,\n required: true,\n },\n\n /**\n * Machine-readable attribute\n * Accepts a string value of YYYY-MM-DD or YYYY-MM-DDThh:mm:ssTZD\n */\n dateTime: {\n type: String,\n required: true,\n validator: (t) => {\n // Since this will only ever be used in the context of a date, we're rejecting non date inputs\n const x = new Date(t);\n if (x instanceof Date && !isNaN(x)) {\n return true;\n }\n return false;\n },\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-time-pill {\n border: var(--dt-size-100) solid;\n border-radius: var(--dt-size-radius-pill);\n border-width: var(--dt-size-100);\n --bco: 100%;\n border-color: var(--dt-color-black-300);\n padding-left: var(--dt-space-500);\n padding-right: var(--dt-space-500);\n padding-top: var(--dt-space-300);\n padding-bottom: var(--dt-space-300);\n font-size: var(--dt-font-size-100);\n}\n</style>\n"],"names":["_createElementBlock"],"mappings":";;AAaA,
|
|
1
|
+
{"version":3,"file":"time-pill.js","sources":["../../recipes/conversation_view/time_pill/time_pill.vue"],"sourcesContent":["<template>\n <time\n data-qa=\"dt-time-pill\"\n :dateTime=\"dateTime\"\n class=\"dt-time-pill\"\n >\n {{ dateTimeDisplay }}\n </time>\n</template>\n\n<script>\nimport {} from './time_pill_constants';\n\nexport default {\n name: 'DtRecipeTimePill',\n\n props: {\n /**\n * Date time display value\n */\n dateTimeDisplay: {\n type: String,\n required: true,\n },\n\n /**\n * Machine-readable attribute\n * Accepts a string value of YYYY-MM-DD or YYYY-MM-DDThh:mm:ssTZD\n */\n dateTime: {\n type: String,\n required: true,\n validator: (t) => {\n // Since this will only ever be used in the context of a date, we're rejecting non date inputs\n const x = new Date(t);\n if (x instanceof Date && !isNaN(x)) {\n return true;\n }\n return false;\n },\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-time-pill {\n border: var(--dt-size-100) solid;\n border-radius: var(--dt-size-radius-pill);\n border-width: var(--dt-size-100);\n --bco: 100%;\n border-color: var(--dt-color-black-300);\n padding-left: var(--dt-space-500);\n padding-right: var(--dt-space-500);\n padding-top: var(--dt-space-300);\n padding-bottom: var(--dt-space-300);\n font-size: var(--dt-font-size-100);\n}\n</style>\n"],"names":["_sfc_main","name","props","dateTimeDisplay","type","String","required","dateTime","validator","t","x","Date","isNaN","_createElementBlock","$props","class","_hoisted_1"],"mappings":";;AAaA,MAAKA,YAAU;AAAA,EACbC,MAAM;AAAA,EAENC,OAAO;AAAA;AAAA;AAAA;AAAA,IAILC,iBAAiB;AAAA,MACfC,MAAMC;AAAAA,MACNC,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA,IAMDC,UAAU;AAAA,MACRH,MAAMC;AAAAA,MACNC,UAAU;AAAA,MACVE,WAAYC,OAAM;AAEhB,cAAMC,IAAI,IAAIC,KAAKF,CAAC;AACpB,YAAIC,aAAaC,QAAQ,CAACC,MAAMF,CAAC,GAAG;AAClC,iBAAO;AAAA,QACT;AACA,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;;;sBAzCEG,mBAMO,QAAA;AAAA,IALL,WAAQ;AAAA,IACPN,UAAUO,OAAQP;AAAAA,IACnBQ,OAAM;AAAA,qBAEHD,OAAeX,eAAA,GAAA,GAAAa,UAAA;;;"}
|
package/dist/vue3/lib/toast.cjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const common_utils = require("../common/utils.cjs");
|
|
4
|
-
const sr_only_close_button = require("../chunks/sr_only_close_button-
|
|
4
|
+
const sr_only_close_button = require("../chunks/sr_only_close_button-gKr0Vlbz.js");
|
|
5
5
|
const vue = require("vue");
|
|
6
6
|
const _pluginVue_exportHelper = require("../chunks/_plugin-vue_export-helper-fhnQq0tA.js");
|
|
7
|
-
const notice_action = require("../chunks/notice_action-
|
|
7
|
+
const notice_action = require("../chunks/notice_action-3ed0uIMN.js");
|
|
8
8
|
const notice_constants = require("../chunks/notice_constants-UXo9e3bS.js");
|
|
9
9
|
require("../common/constants.cjs");
|
|
10
10
|
require("./icon.cjs");
|
|
11
11
|
require("@dialpad/dialtone-icons/vue3");
|
|
12
|
-
require("../chunks/icon_constants-
|
|
12
|
+
require("../chunks/icon_constants-bvhFNOPu.js");
|
|
13
13
|
require("@dialpad/dialtone-icons/icons.json");
|
|
14
14
|
require("./button.cjs");
|
|
15
15
|
require("../chunks/link_constants-x8NwdqmA.js");
|
|
@@ -218,62 +218,46 @@ const _sfc_main = {
|
|
|
218
218
|
}
|
|
219
219
|
};
|
|
220
220
|
const _hoisted_1 = ["aria-hidden"];
|
|
221
|
-
const _hoisted_2 = {
|
|
221
|
+
const _hoisted_2 = {
|
|
222
|
+
class: "d-toast__dialog"
|
|
223
|
+
};
|
|
222
224
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
223
225
|
const _component_dt_notice_icon = vue.resolveComponent("dt-notice-icon");
|
|
224
226
|
const _component_dt_notice_content = vue.resolveComponent("dt-notice-content");
|
|
225
227
|
const _component_dt_notice_action = vue.resolveComponent("dt-notice-action");
|
|
226
228
|
return $data.isShown ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
227
229
|
key: 0,
|
|
228
|
-
class: vue.normalizeClass([
|
|
229
|
-
"d-toast"
|
|
230
|
-
|
|
231
|
-
{ "d-toast--important": $props.important }
|
|
232
|
-
]),
|
|
230
|
+
class: vue.normalizeClass(["d-toast", $options.kindClass, {
|
|
231
|
+
"d-toast--important": $props.important
|
|
232
|
+
}]),
|
|
233
233
|
"data-qa": "dt-toast",
|
|
234
234
|
"aria-hidden": (!$data.isShown).toString()
|
|
235
|
-
}, [
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}, 8, ["title-id", "content-id", "title", "role"]),
|
|
262
|
-
vue.createVNode(_component_dt_notice_action, {
|
|
263
|
-
"hide-action": $props.hideAction,
|
|
264
|
-
"hide-close": $props.hideClose,
|
|
265
|
-
"close-button-props": $props.closeButtonProps,
|
|
266
|
-
"visually-hidden-close": _ctx.visuallyHiddenClose,
|
|
267
|
-
"visually-hidden-close-label": _ctx.visuallyHiddenCloseLabel,
|
|
268
|
-
onClose: $options.closeToast
|
|
269
|
-
}, {
|
|
270
|
-
default: vue.withCtx(() => [
|
|
271
|
-
vue.renderSlot(_ctx.$slots, "action")
|
|
272
|
-
]),
|
|
273
|
-
_: 3
|
|
274
|
-
}, 8, ["hide-action", "hide-close", "close-button-props", "visually-hidden-close", "visually-hidden-close-label", "onClose"])
|
|
275
|
-
])
|
|
276
|
-
], 10, _hoisted_1)) : vue.createCommentVNode("", true);
|
|
235
|
+
}, [vue.createElementVNode("div", _hoisted_2, [!$props.hideIcon ? (vue.openBlock(), vue.createBlock(_component_dt_notice_icon, {
|
|
236
|
+
key: 0,
|
|
237
|
+
kind: $props.kind
|
|
238
|
+
}, {
|
|
239
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "icon")]),
|
|
240
|
+
_: 3
|
|
241
|
+
}, 8, ["kind"])) : vue.createCommentVNode("", true), vue.createVNode(_component_dt_notice_content, {
|
|
242
|
+
"title-id": $props.titleId,
|
|
243
|
+
"content-id": $props.contentId,
|
|
244
|
+
title: $props.title,
|
|
245
|
+
role: $props.role
|
|
246
|
+
}, {
|
|
247
|
+
titleOverride: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "titleOverride")]),
|
|
248
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default", {}, () => [vue.createTextVNode(vue.toDisplayString($props.message), 1)])]),
|
|
249
|
+
_: 3
|
|
250
|
+
}, 8, ["title-id", "content-id", "title", "role"]), vue.createVNode(_component_dt_notice_action, {
|
|
251
|
+
"hide-action": $props.hideAction,
|
|
252
|
+
"hide-close": $props.hideClose,
|
|
253
|
+
"close-button-props": $props.closeButtonProps,
|
|
254
|
+
"visually-hidden-close": _ctx.visuallyHiddenClose,
|
|
255
|
+
"visually-hidden-close-label": _ctx.visuallyHiddenCloseLabel,
|
|
256
|
+
onClose: $options.closeToast
|
|
257
|
+
}, {
|
|
258
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "action")]),
|
|
259
|
+
_: 3
|
|
260
|
+
}, 8, ["hide-action", "hide-close", "close-button-props", "visually-hidden-close", "visually-hidden-close-label", "onClose"])])], 10, _hoisted_1)) : vue.createCommentVNode("", true);
|
|
277
261
|
}
|
|
278
262
|
const toast = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
279
263
|
exports.DtToast = toast;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.cjs","sources":["../../components/toast/toast_constants.js","../../components/toast/toast.vue"],"sourcesContent":["export const TOAST_ROLES = ['status', 'alert'];\nexport const TOAST_MIN_DURATION = 6000;\n\nexport default {\n TOAST_ROLES,\n TOAST_MIN_DURATION,\n};\n","<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 >\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 >\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 @close=\"closeToast\"\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 { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport utils from '@/common/utils';\nimport { TOAST_ROLES, TOAST_MIN_DURATION } from './toast_constants.js';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\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 DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\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 () { 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 * 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 `v-model` with this prop to update\n * the data in your component.\n * Supports v-model\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: () => ({}),\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 * 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 emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\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 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 shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\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 unmounted () {\n clearTimeout(this.displayTimer);\n },\n\n methods: {\n closeToast (event) {\n this.$emit('update:show', false);\n this.$emit('close', event);\n },\n\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};\n</script>\n"],"names":["DtNoticeIcon","DtNoticeContent","DtNoticeAction","SrOnlyCloseButtonMixin","utils","NOTICE_KINDS","_createElementBlock","_normalizeClass","_createElementVNode","_createBlock","_renderSlot","_createVNode"],"mappings":";;;;;;;;;;;;;;;AAAY,MAAC,cAAc,CAAC,UAAU,OAAO;AACjC,MAAC,qBAAqB;AC4DlC,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,kBACVA,cAAY;AAAA,IACZ,iBAAAC,cAAe;AAAA,IACf,gBAAAC,cAAc;AAAA,EACf;AAAA,EAED,QAAQ,CAACC,qBAAAA,sBAAsB;AAAA,EAE/B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,SAAS;AAAA,MACP,MAAM;AAAA,MACN,UAAW;AAAE,eAAOC,qBAAM,gBAAiB;AAAA,MAAG;AAAA,IAC/C;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,UAAW;AAAE,eAAOA,qBAAM,gBAAiB;AAAA,MAAG;AAAA,IAC/C;AAAA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,WAAQ;AAAA,IACP,gBAAW,CAAI,MAAO,SAAE,SAAQ;AAAA;IAEjCC,IAAA,mBAmCM,OAnCN,YAmCM;AAAA,OAjCK,OAAQ,6BADjBC,IAMiB,YAAA,2BAAA;AAAA;QAJd,MAAM,OAAI;AAAA;6BAGX,MAAoB;AAAA,UAApBC,eAAoB,KAAA,QAAA,MAAA;AAAA;;;MAEtBC,IAAAA,YAeoB,8BAAA;AAAA,QAdjB,YAAU,OAAO;AAAA,QACjB,cAAY,OAAS;AAAA,QACrB,OAAO,OAAK;AAAA,QACZ,MAAM,OAAI;AAAA;QAEA,2BAGT,MAA6B;AAAA,UAA7BD,eAA6B,KAAA,QAAA,eAAA;AAAA;6BAG/B,MAEO;AAAA,UAFPA,IAAAA,WAEO,4BAFP,MAEO;AAAA,oDADF,OAAO,OAAA,GAAA,CAAA;AAAA;;;;MAGdC,IAAAA,YAUmB,6BAAA;AAAA,QAThB,eAAa,OAAU;AAAA,QACvB,cAAY,OAAS;AAAA,QACrB,sBAAoB,OAAgB;AAAA,QACpC,yBAAuB,KAAmB;AAAA,QAC1C,+BAA6B,KAAwB;AAAA,QACrD,SAAO,SAAU;AAAA;6BAGlB,MAAsB;AAAA,UAAtBD,eAAsB,KAAA,QAAA,QAAA;AAAA;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"toast.cjs","sources":["../../components/toast/toast_constants.js","../../components/toast/toast.vue"],"sourcesContent":["export const TOAST_ROLES = ['status', 'alert'];\nexport const TOAST_MIN_DURATION = 6000;\n\nexport default {\n TOAST_ROLES,\n TOAST_MIN_DURATION,\n};\n","<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 >\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 >\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 @close=\"closeToast\"\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 { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport utils from '@/common/utils';\nimport { TOAST_ROLES, TOAST_MIN_DURATION } from './toast_constants.js';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\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 DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\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 () { 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 * 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 `v-model` with this prop to update\n * the data in your component.\n * Supports v-model\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: () => ({}),\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 * 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 emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\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 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 shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\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 unmounted () {\n clearTimeout(this.displayTimer);\n },\n\n methods: {\n closeToast (event) {\n this.$emit('update:show', false);\n this.$emit('close', event);\n },\n\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};\n</script>\n"],"names":["TOAST_ROLES","TOAST_MIN_DURATION","_sfc_main","name","components","DtNoticeIcon","DtNoticeContent","DtNoticeAction","mixins","SrOnlyCloseButtonMixin","props","titleId","type","String","default","utils","getUniqueString","contentId","title","message","role","validator","includes","kind","NOTICE_KINDS","important","Boolean","show","closeButtonProps","Object","hideClose","hideIcon","hideAction","duration","Number","emits","data","isShown","minDuration","computed","kindClass","kindClasses","error","info","success","warning","base","shouldSetTimeout","watch","handler","setTimeout","clearTimeout","displayTimer","immediate","unmounted","methods","closeToast","event","$emit","_hoisted_2","class","$data","_createElementBlock","_normalizeClass","$options","$props","toString","_createElementVNode","_createBlock","_component_dt_notice_icon","_renderSlot","_ctx","$slots","_createVNode","_component_dt_notice_content","titleOverride","_component_dt_notice_action","visuallyHiddenClose","visuallyHiddenCloseLabel","onClose"],"mappings":";;;;;;;;;;;;;;;MAAaA,cAAc,CAAC,UAAU,OAAO;AACtC,MAAMC,qBAAqB;AC4DlC,MAAKC,YAAU;AAAA,EACbC,MAAM;AAAA,EAENC,YAAY;AAAA,kBACVC,cAAY;AAAA,qBACZC,cAAe;AAAA,IACfC,gBAAAA,cAAAA;AAAAA,EACD;AAAA,EAEDC,QAAQ,CAACC,qBAAAA,sBAAsB;AAAA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ACrDC,SAAOf,SAAUR;AAAAA;yBAGlB,MAAsB,CAAtBc,IAAAA,WAAsBC,KAAAC,QAAA,QAAA,CAAA;;;;;;;;"}
|
package/dist/vue3/lib/toast.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import utils from "../common/utils.js";
|
|
2
|
-
import { SrOnlyCloseButtonMixin } from "../chunks/sr_only_close_button-
|
|
2
|
+
import { SrOnlyCloseButtonMixin } from "../chunks/sr_only_close_button-Ji3Zlts6.js";
|
|
3
3
|
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, withCtx, renderSlot, createCommentVNode, createVNode, createTextVNode, toDisplayString } from "vue";
|
|
4
4
|
import { _export_sfc } from "../chunks/_plugin-vue_export-helper-caHeSgYY.js";
|
|
5
|
-
import { DtNoticeIcon, DtNoticeContent, DtNoticeAction } from "../chunks/notice_action-
|
|
5
|
+
import { DtNoticeIcon, DtNoticeContent, DtNoticeAction } from "../chunks/notice_action-e08Lw5W6.js";
|
|
6
6
|
import { NOTICE_KINDS } from "../chunks/notice_constants-7Qt2CQEY.js";
|
|
7
7
|
import "../common/constants.js";
|
|
8
8
|
import "./icon.js";
|
|
9
9
|
import "@dialpad/dialtone-icons/vue3";
|
|
10
|
-
import "../chunks/icon_constants-
|
|
10
|
+
import "../chunks/icon_constants-gIQj4mf7.js";
|
|
11
11
|
import "@dialpad/dialtone-icons/icons.json";
|
|
12
12
|
import "./button.js";
|
|
13
13
|
import "../chunks/link_constants-AfTWrr-n.js";
|
|
@@ -216,62 +216,46 @@ const _sfc_main = {
|
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
218
|
const _hoisted_1 = ["aria-hidden"];
|
|
219
|
-
const _hoisted_2 = {
|
|
219
|
+
const _hoisted_2 = {
|
|
220
|
+
class: "d-toast__dialog"
|
|
221
|
+
};
|
|
220
222
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
221
223
|
const _component_dt_notice_icon = resolveComponent("dt-notice-icon");
|
|
222
224
|
const _component_dt_notice_content = resolveComponent("dt-notice-content");
|
|
223
225
|
const _component_dt_notice_action = resolveComponent("dt-notice-action");
|
|
224
226
|
return $data.isShown ? (openBlock(), createElementBlock("div", {
|
|
225
227
|
key: 0,
|
|
226
|
-
class: normalizeClass([
|
|
227
|
-
"d-toast"
|
|
228
|
-
|
|
229
|
-
{ "d-toast--important": $props.important }
|
|
230
|
-
]),
|
|
228
|
+
class: normalizeClass(["d-toast", $options.kindClass, {
|
|
229
|
+
"d-toast--important": $props.important
|
|
230
|
+
}]),
|
|
231
231
|
"data-qa": "dt-toast",
|
|
232
232
|
"aria-hidden": (!$data.isShown).toString()
|
|
233
|
-
}, [
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}, 8, ["title-id", "content-id", "title", "role"]),
|
|
260
|
-
createVNode(_component_dt_notice_action, {
|
|
261
|
-
"hide-action": $props.hideAction,
|
|
262
|
-
"hide-close": $props.hideClose,
|
|
263
|
-
"close-button-props": $props.closeButtonProps,
|
|
264
|
-
"visually-hidden-close": _ctx.visuallyHiddenClose,
|
|
265
|
-
"visually-hidden-close-label": _ctx.visuallyHiddenCloseLabel,
|
|
266
|
-
onClose: $options.closeToast
|
|
267
|
-
}, {
|
|
268
|
-
default: withCtx(() => [
|
|
269
|
-
renderSlot(_ctx.$slots, "action")
|
|
270
|
-
]),
|
|
271
|
-
_: 3
|
|
272
|
-
}, 8, ["hide-action", "hide-close", "close-button-props", "visually-hidden-close", "visually-hidden-close-label", "onClose"])
|
|
273
|
-
])
|
|
274
|
-
], 10, _hoisted_1)) : createCommentVNode("", true);
|
|
233
|
+
}, [createElementVNode("div", _hoisted_2, [!$props.hideIcon ? (openBlock(), createBlock(_component_dt_notice_icon, {
|
|
234
|
+
key: 0,
|
|
235
|
+
kind: $props.kind
|
|
236
|
+
}, {
|
|
237
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "icon")]),
|
|
238
|
+
_: 3
|
|
239
|
+
}, 8, ["kind"])) : createCommentVNode("", true), createVNode(_component_dt_notice_content, {
|
|
240
|
+
"title-id": $props.titleId,
|
|
241
|
+
"content-id": $props.contentId,
|
|
242
|
+
title: $props.title,
|
|
243
|
+
role: $props.role
|
|
244
|
+
}, {
|
|
245
|
+
titleOverride: withCtx(() => [renderSlot(_ctx.$slots, "titleOverride")]),
|
|
246
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString($props.message), 1)])]),
|
|
247
|
+
_: 3
|
|
248
|
+
}, 8, ["title-id", "content-id", "title", "role"]), createVNode(_component_dt_notice_action, {
|
|
249
|
+
"hide-action": $props.hideAction,
|
|
250
|
+
"hide-close": $props.hideClose,
|
|
251
|
+
"close-button-props": $props.closeButtonProps,
|
|
252
|
+
"visually-hidden-close": _ctx.visuallyHiddenClose,
|
|
253
|
+
"visually-hidden-close-label": _ctx.visuallyHiddenCloseLabel,
|
|
254
|
+
onClose: $options.closeToast
|
|
255
|
+
}, {
|
|
256
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "action")]),
|
|
257
|
+
_: 3
|
|
258
|
+
}, 8, ["hide-action", "hide-close", "close-button-props", "visually-hidden-close", "visually-hidden-close-label", "onClose"])])], 10, _hoisted_1)) : createCommentVNode("", true);
|
|
275
259
|
}
|
|
276
260
|
const toast = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
277
261
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.js","sources":["../../components/toast/toast_constants.js","../../components/toast/toast.vue"],"sourcesContent":["export const TOAST_ROLES = ['status', 'alert'];\nexport const TOAST_MIN_DURATION = 6000;\n\nexport default {\n TOAST_ROLES,\n TOAST_MIN_DURATION,\n};\n","<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 >\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 >\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 @close=\"closeToast\"\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 { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport utils from '@/common/utils';\nimport { TOAST_ROLES, TOAST_MIN_DURATION } from './toast_constants.js';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\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 DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\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 () { 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 * 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 `v-model` with this prop to update\n * the data in your component.\n * Supports v-model\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: () => ({}),\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 * 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 emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\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 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 shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\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 unmounted () {\n clearTimeout(this.displayTimer);\n },\n\n methods: {\n closeToast (event) {\n this.$emit('update:show', false);\n this.$emit('close', event);\n },\n\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};\n</script>\n"],"names":["_createElementBlock","_normalizeClass","_createElementVNode","_createBlock","_renderSlot","_createVNode"],"mappings":";;;;;;;;;;;;;AAAY,MAAC,cAAc,CAAC,UAAU,OAAO;AACjC,MAAC,qBAAqB;AC4DlC,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,QAAQ,CAAC,sBAAsB;AAAA,EAE/B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,SAAS;AAAA,MACP,MAAM;AAAA,MACN,UAAW;AAAE,eAAO,MAAM,gBAAiB;AAAA,MA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AiB;;;;;SATtB,MAAO,wBADfA,mBA8CM,OAAA;AAAA;IA5CH,OAAKC,eAAA;AAAA;MAA2B,SAAS;AAAA,8BAAgC,OAAS,UAAA;AAAA;IAKnF,WAAQ;AAAA,IACP,gBAAW,CAAI,MAAO,SAAE,SAAQ;AAAA;IAEjCC,mBAmCM,OAnCN,YAmCM;AAAA,OAjCK,OAAQ,yBADjBC,YAMiB,2BAAA;AAAA;QAJd,MAAM,OAAI;AAAA;yBAGX,MAAoB;AAAA,UAApBC,WAAoB,KAAA,QAAA,MAAA;AAAA;;;MAEtBC,YAeoB,8BAAA;AAAA,QAdjB,YAAU,OAAO;AAAA,QACjB,cAAY,OAAS;AAAA,QACrB,OAAO,OAAK;AAAA,QACZ,MAAM,OAAI;AAAA;QAEA,uBAGT,MAA6B;AAAA,UAA7BD,WAA6B,KAAA,QAAA,eAAA;AAAA;yBAG/B,MAEO;AAAA,UAFPA,WAEO,4BAFP,MAEO;AAAA,4CADF,OAAO,OAAA,GAAA,CAAA;AAAA;;;;MAGdC,YAUmB,6BAAA;AAAA,QAThB,eAAa,OAAU;AAAA,QACvB,cAAY,OAAS;AAAA,QACrB,sBAAoB,OAAgB;AAAA,QACpC,yBAAuB,KAAmB;AAAA,QAC1C,+BAA6B,KAAwB;AAAA,QACrD,SAAO,SAAU;AAAA;yBAGlB,MAAsB;AAAA,UAAtBD,WAAsB,KAAA,QAAA,QAAA;AAAA;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"toast.js","sources":["../../components/toast/toast_constants.js","../../components/toast/toast.vue"],"sourcesContent":["export const TOAST_ROLES = ['status', 'alert'];\nexport const TOAST_MIN_DURATION = 6000;\n\nexport default {\n TOAST_ROLES,\n TOAST_MIN_DURATION,\n};\n","<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 >\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 >\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 @close=\"closeToast\"\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 { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport utils from '@/common/utils';\nimport { TOAST_ROLES, TOAST_MIN_DURATION } from './toast_constants.js';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\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 DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\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 () { 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 * 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 `v-model` with this prop to update\n * the data in your component.\n * Supports v-model\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: () => ({}),\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 * 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 emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\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 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 shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\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 unmounted () {\n clearTimeout(this.displayTimer);\n },\n\n methods: {\n closeToast (event) {\n this.$emit('update:show', false);\n this.$emit('close', event);\n },\n\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};\n</script>\n"],"names":["TOAST_ROLES","TOAST_MIN_DURATION","_sfc_main","name","components","DtNoticeIcon","DtNoticeContent","DtNoticeAction","mixins","SrOnlyCloseButtonMixin","props","titleId","type","String","default","utils","getUniqueString","contentId","title","message","role","validator","includes","kind","NOTICE_KINDS","important","Boolean","show","closeButtonProps","Object","hideClose","hideIcon","hideAction","duration","Number","emits","data","isShown","minDuration","computed","kindClass","kindClasses","error","info","success","warning","base","shouldSetTimeout","watch","handler","setTimeout","clearTimeout","displayTimer","immediate","unmounted","methods","closeToast","event","$emit","_hoisted_2","class","$data","_createElementBlock","_normalizeClass","$options","$props","toString","_createElementVNode","_createBlock","_component_dt_notice_icon","_renderSlot","_ctx","$slots","_createVNode","_component_dt_notice_content","titleOverride","_component_dt_notice_action","visuallyHiddenClose","visuallyHiddenCloseLabel","onClose"],"mappings":";;;;;;;;;;;;;MAAaA,cAAc,CAAC,UAAU,OAAO;AACtC,MAAMC,qBAAqB;AC4DlC,MAAKC,YAAU;AAAA,EACbC,MAAM;AAAA,EAENC,YAAY;AAAA,IACVC;AAAAA,IACAC;AAAAA,IACAC;AA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GlB,MAAsB,CAAtBc,WAAsBC,KAAAC,QAAA,QAAA,CAAA;;;;;"}
|
package/dist/vue3/lib/toggle.cjs
CHANGED
|
@@ -115,15 +115,11 @@ const _sfc_main = {
|
|
|
115
115
|
return this.isIndeterminate ? "checkbox" : "switch";
|
|
116
116
|
},
|
|
117
117
|
toggleClasses() {
|
|
118
|
-
return [
|
|
119
|
-
"d-toggle",
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"d-toggle--disabled": this.disabled,
|
|
124
|
-
"d-toggle--indeterminate": this.isIndeterminate
|
|
125
|
-
}
|
|
126
|
-
];
|
|
118
|
+
return ["d-toggle", TOGGLE_SIZE_MODIFIERS[this.size], {
|
|
119
|
+
"d-toggle--checked": this.internalChecked === true,
|
|
120
|
+
"d-toggle--disabled": this.disabled,
|
|
121
|
+
"d-toggle--indeterminate": this.isIndeterminate
|
|
122
|
+
}];
|
|
127
123
|
}
|
|
128
124
|
},
|
|
129
125
|
watch: {
|
|
@@ -149,15 +145,14 @@ const _sfc_main = {
|
|
|
149
145
|
},
|
|
150
146
|
validateInputLabels(hasLabel, ariaLabel) {
|
|
151
147
|
if (!hasLabel && !ariaLabel) {
|
|
152
|
-
vue.warn(
|
|
153
|
-
"You must provide an aria-label when there is no label passed",
|
|
154
|
-
this
|
|
155
|
-
);
|
|
148
|
+
vue.warn("You must provide an aria-label when there is no label passed", this);
|
|
156
149
|
}
|
|
157
150
|
}
|
|
158
151
|
}
|
|
159
152
|
};
|
|
160
|
-
const _hoisted_1 = {
|
|
153
|
+
const _hoisted_1 = {
|
|
154
|
+
class: "d-toggle-wrapper"
|
|
155
|
+
};
|
|
161
156
|
const _hoisted_2 = ["for"];
|
|
162
157
|
const _hoisted_3 = ["id", "role", "aria-checked", "disabled", "aria-disabled"];
|
|
163
158
|
const _hoisted_4 = {
|
|
@@ -165,26 +160,21 @@ const _hoisted_4 = {
|
|
|
165
160
|
class: "d-toggle__inner"
|
|
166
161
|
};
|
|
167
162
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
168
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
class: $options.toggleClasses
|
|
184
|
-
}, $options.inputListeners), [
|
|
185
|
-
$props.showIcon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4)) : vue.createCommentVNode("", true)
|
|
186
|
-
], 16, _hoisted_3)
|
|
187
|
-
]);
|
|
163
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [$data.hasSlotContent(_ctx.$slots.default) ? (vue.openBlock(), vue.createElementBlock("label", vue.mergeProps({
|
|
164
|
+
key: 0,
|
|
165
|
+
class: $props.labelClass,
|
|
166
|
+
for: $props.id
|
|
167
|
+
}, $props.labelChildProps, {
|
|
168
|
+
"data-qa": "toggle-label"
|
|
169
|
+
}), [vue.renderSlot(_ctx.$slots, "default")], 16, _hoisted_2)) : vue.createCommentVNode("", true), vue.createElementVNode("button", vue.mergeProps({
|
|
170
|
+
id: $props.id,
|
|
171
|
+
role: $options.toggleRole,
|
|
172
|
+
type: "button",
|
|
173
|
+
"aria-checked": $data.internalChecked.toString(),
|
|
174
|
+
disabled: $props.disabled,
|
|
175
|
+
"aria-disabled": $props.disabled.toString(),
|
|
176
|
+
class: $options.toggleClasses
|
|
177
|
+
}, $options.inputListeners), [$props.showIcon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4)) : vue.createCommentVNode("", true)], 16, _hoisted_3)]);
|
|
188
178
|
}
|
|
189
179
|
const toggle = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
190
180
|
exports.DtToggle = toggle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.cjs","sources":["../../components/toggle/toggle_constants.js","../../components/toggle/toggle.vue"],"sourcesContent":["export const TOGGLE_SIZE_MODIFIERS = {\n sm: 'd-toggle--small',\n md: '',\n};\n\nexport const TOGGLE_CHECKED_VALUES = [false, true, 'mixed'];\n\nexport default {\n TOGGLE_SIZE_MODIFIERS,\n TOGGLE_CHECKED_VALUES,\n};\n","<template>\n <div class=\"d-toggle-wrapper\">\n <label\n v-if=\"hasSlotContent($slots.default)\"\n :class=\"labelClass\"\n :for=\"id\"\n v-bind=\"labelChildProps\"\n data-qa=\"toggle-label\"\n >\n <!-- @slot Slot for the main content -->\n <slot />\n </label>\n <button\n :id=\"id\"\n :role=\"toggleRole\"\n type=\"button\"\n :aria-checked=\"internalChecked.toString()\"\n :disabled=\"disabled\"\n :aria-disabled=\"disabled.toString()\"\n :class=\"toggleClasses\"\n v-bind=\"inputListeners\"\n >\n <span\n v-if=\"showIcon\"\n class=\"d-toggle__inner\"\n />\n </button>\n </div>\n</template>\n\n<script>\nimport { warn } from 'vue';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport { TOGGLE_CHECKED_VALUES, TOGGLE_SIZE_MODIFIERS } from '@/components/toggle/toggle_constants';\n\n/**\n * A toggle (or \"switch\") is a button control element that allows the user to make a binary (on/off) selection.\n * @see https://dialtone.dialpad.com/components/toggle.html\n */\nexport default {\n\n name: 'DtToggle',\n\n inheritAttrs: false,\n\n model: {\n prop: 'checked',\n event: 'change',\n },\n\n props: {\n\n /**\n * The id of the toggle\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Disables the toggle interactions\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Value of the toggle\n * @model checked\n * @values true, false, 'mixed'\n */\n checked: {\n type: [Boolean, String],\n default: false,\n validator: (v) => TOGGLE_CHECKED_VALUES.includes(v),\n },\n\n /**\n * Whether the component toggles on click. If you set this to false it means you will handle the toggling manually\n * via the checked prop or v-model. Change events will still be triggered.\n * @values true, false\n */\n toggleOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The size of the toggle.\n * @values sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(TOGGLE_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Shows the icon\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n emits: [\n /**\n * Toggle change event\n *\n * @event change\n * @type {Boolean}\n * @model change\n */\n 'change',\n ],\n\n data () {\n return {\n internalChecked: this.checked,\n hasSlotContent,\n };\n },\n\n computed: {\n inputListeners () {\n return {\n ...this.$attrs,\n onClick: _ => this.toggleCheckedValue(),\n };\n },\n\n isIndeterminate () {\n return this.internalChecked === 'mixed';\n },\n\n toggleRole () {\n return this.isIndeterminate ? 'checkbox' : 'switch';\n },\n\n toggleClasses () {\n return [\n 'd-toggle',\n TOGGLE_SIZE_MODIFIERS[this.size],\n {\n 'd-toggle--checked': this.internalChecked === true,\n 'd-toggle--disabled': this.disabled,\n 'd-toggle--indeterminate': this.isIndeterminate,\n },\n ];\n },\n },\n\n watch: {\n checked (newChecked) {\n this.internalChecked = newChecked;\n },\n },\n\n mounted () {\n this.runValidations();\n },\n\n methods: {\n toggleCheckedValue () {\n this.$emit('change', !this.internalChecked);\n\n if (this.toggleOnClick) {\n this.internalChecked = !this.internalChecked;\n }\n },\n\n hasSlotLabel () {\n return !!(this.$slots.default);\n },\n\n runValidations () {\n this.validateInputLabels(this.hasSlotLabel(), this.$attrs['aria-label']);\n },\n\n validateInputLabels (hasLabel, ariaLabel) {\n if (!hasLabel && !ariaLabel) {\n warn(\n 'You must provide an aria-label when there is no label passed',\n this,\n );\n }\n },\n },\n};\n</script>\n"],"names":["getUniqueString","hasSlotContent","warn","_openBlock","_createElementBlock","_mergeProps","_renderSlot","_createElementVNode"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"toggle.cjs","sources":["../../components/toggle/toggle_constants.js","../../components/toggle/toggle.vue"],"sourcesContent":["export const TOGGLE_SIZE_MODIFIERS = {\n sm: 'd-toggle--small',\n md: '',\n};\n\nexport const TOGGLE_CHECKED_VALUES = [false, true, 'mixed'];\n\nexport default {\n TOGGLE_SIZE_MODIFIERS,\n TOGGLE_CHECKED_VALUES,\n};\n","<template>\n <div class=\"d-toggle-wrapper\">\n <label\n v-if=\"hasSlotContent($slots.default)\"\n :class=\"labelClass\"\n :for=\"id\"\n v-bind=\"labelChildProps\"\n data-qa=\"toggle-label\"\n >\n <!-- @slot Slot for the main content -->\n <slot />\n </label>\n <button\n :id=\"id\"\n :role=\"toggleRole\"\n type=\"button\"\n :aria-checked=\"internalChecked.toString()\"\n :disabled=\"disabled\"\n :aria-disabled=\"disabled.toString()\"\n :class=\"toggleClasses\"\n v-bind=\"inputListeners\"\n >\n <span\n v-if=\"showIcon\"\n class=\"d-toggle__inner\"\n />\n </button>\n </div>\n</template>\n\n<script>\nimport { warn } from 'vue';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport { TOGGLE_CHECKED_VALUES, TOGGLE_SIZE_MODIFIERS } from '@/components/toggle/toggle_constants';\n\n/**\n * A toggle (or \"switch\") is a button control element that allows the user to make a binary (on/off) selection.\n * @see https://dialtone.dialpad.com/components/toggle.html\n */\nexport default {\n\n name: 'DtToggle',\n\n inheritAttrs: false,\n\n model: {\n prop: 'checked',\n event: 'change',\n },\n\n props: {\n\n /**\n * The id of the toggle\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Disables the toggle interactions\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Value of the toggle\n * @model checked\n * @values true, false, 'mixed'\n */\n checked: {\n type: [Boolean, String],\n default: false,\n validator: (v) => TOGGLE_CHECKED_VALUES.includes(v),\n },\n\n /**\n * Whether the component toggles on click. If you set this to false it means you will handle the toggling manually\n * via the checked prop or v-model. Change events will still be triggered.\n * @values true, false\n */\n toggleOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The size of the toggle.\n * @values sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(TOGGLE_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Shows the icon\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n emits: [\n /**\n * Toggle change event\n *\n * @event change\n * @type {Boolean}\n * @model change\n */\n 'change',\n ],\n\n data () {\n return {\n internalChecked: this.checked,\n hasSlotContent,\n };\n },\n\n computed: {\n inputListeners () {\n return {\n ...this.$attrs,\n onClick: _ => this.toggleCheckedValue(),\n };\n },\n\n isIndeterminate () {\n return this.internalChecked === 'mixed';\n },\n\n toggleRole () {\n return this.isIndeterminate ? 'checkbox' : 'switch';\n },\n\n toggleClasses () {\n return [\n 'd-toggle',\n TOGGLE_SIZE_MODIFIERS[this.size],\n {\n 'd-toggle--checked': this.internalChecked === true,\n 'd-toggle--disabled': this.disabled,\n 'd-toggle--indeterminate': this.isIndeterminate,\n },\n ];\n },\n },\n\n watch: {\n checked (newChecked) {\n this.internalChecked = newChecked;\n },\n },\n\n mounted () {\n this.runValidations();\n },\n\n methods: {\n toggleCheckedValue () {\n this.$emit('change', !this.internalChecked);\n\n if (this.toggleOnClick) {\n this.internalChecked = !this.internalChecked;\n }\n },\n\n hasSlotLabel () {\n return !!(this.$slots.default);\n },\n\n runValidations () {\n this.validateInputLabels(this.hasSlotLabel(), this.$attrs['aria-label']);\n },\n\n validateInputLabels (hasLabel, ariaLabel) {\n if (!hasLabel && !ariaLabel) {\n warn(\n 'You must provide an aria-label when there is no label passed',\n this,\n );\n }\n },\n },\n};\n</script>\n"],"names":["TOGGLE_SIZE_MODIFIERS","sm","md","TOGGLE_CHECKED_VALUES","_sfc_main","name","inheritAttrs","model","prop","event","props","id","type","String","default","getUniqueString","disabled","Boolean","checked","validator","v","includes","toggleOnClick","size","s","Object","keys","showIcon","labelClass","Array","labelChildProps","emits","data","internalChecked","hasSlotContent","computed","inputListeners","$attrs","onClick","_","toggleCheckedValue","isIndeterminate","toggleRole","toggleClasses","watch","newChecked","mounted","runValidations","methods","$emit","hasSlotLabel","$slots","validateInputLabels","hasLabel","ariaLabel","warn","_hoisted_1","class","_openBlock","_createElementBlock","$data","_ctx","_mergeProps","$props","for","_renderSlot","_createElementVNode","role","$options","toString","_hoisted_4"],"mappings":";;;;;;AAAO,MAAMA,wBAAwB;AAAA,EACnCC,IAAI;AAAA,EACJC,IAAI;AACN;AAEO,MAAMC,wBAAwB,CAAC,OAAO,MAAM,OAAO;ACkC1D,MAAKC,YAAU;AAAA,EAEbC,MAAM;AAAA,EAENC,cAAc;AAAA,EAEdC,OAAO;AAAA,IACLC,MAAM;AAAA,IACNC,OAAO;AAAA,EACR;AAAA,EAEDC,OAAO;AAAA;AAAA;AAAA;AAAA,IAKLC,IAAI;AAAA,MACFC,MAAMC;AAAAA,MACNC,UAAW;AAAE,eAAOC,aAAe,gBAAA;AAAA,MAAI;AAAA,IACxC;AAAA;AAAA;AAAA;AAAA;AAAA,IAMDC,UAAU;AAAA,MACRJ,MAAMK;AAAAA,MACNH,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAODI,SAAS;AAAA,MACPN,MAAM,CAACK,SAASJ,MAAM;AAAA,MACtBC,SAAS;AAAA,MACTK,WAAYC,OAAMjB,sBAAsBkB,SAASD,CAAC;AAAA,IACnD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAODE,eAAe;AAAA,MACbV,MAAMK;AAAAA,MACNH,SAAS;AAAA,IACV;AAAA;AA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