@dialpad/dialtone-vue 2.127.0 → 2.127.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/_plugin-vue2_normalizer-1aBeR4AK.js +59 -0
- package/dist/chunks/_plugin-vue2_normalizer-1aBeR4AK.js.map +1 -0
- package/dist/chunks/_plugin-vue2_normalizer-sOSkiPF3.js +60 -0
- package/dist/chunks/_plugin-vue2_normalizer-sOSkiPF3.js.map +1 -0
- package/dist/chunks/{dropdown-SMWaTWyF.js → dropdown-DTtcQEFC.js} +131 -84
- package/dist/chunks/{dropdown-SMWaTWyF.js.map → dropdown-DTtcQEFC.js.map} +1 -1
- package/dist/chunks/dropdown-IaLNHmVd.js +403 -0
- package/dist/chunks/{dropdown-zhMEz3bn.js.map → dropdown-IaLNHmVd.js.map} +1 -1
- package/dist/chunks/dropdown_constants-2pGCXy7m.js +8 -0
- package/dist/chunks/dropdown_constants-2pGCXy7m.js.map +1 -0
- package/dist/chunks/dropdown_constants-w1MXGC3Z.js +9 -0
- package/dist/chunks/dropdown_constants-w1MXGC3Z.js.map +1 -0
- package/dist/chunks/{icon_constants-OpYAAKwF.js → icon_constants-Dy4MEUJL.js} +7 -6
- package/dist/chunks/{icon_constants-2S_OSQ1t.js.map → icon_constants-Dy4MEUJL.js.map} +1 -1
- package/dist/chunks/icon_constants-QYpmdE0R.js +16 -0
- package/dist/chunks/{icon_constants-OpYAAKwF.js.map → icon_constants-QYpmdE0R.js.map} +1 -1
- package/dist/chunks/index-eJ-WWRdf.js +442 -0
- package/dist/chunks/{index-2jPosQBn.js.map → index-eJ-WWRdf.js.map} +1 -1
- package/dist/chunks/index-gj1jEXP4.js +441 -0
- package/dist/chunks/{index-nIyl_PL6.js.map → index-gj1jEXP4.js.map} +1 -1
- package/dist/chunks/{input-1tm09l_-.js → input-6kbd8Pju.js} +83 -60
- package/dist/chunks/{input-o-fc1X4b.js.map → input-6kbd8Pju.js.map} +1 -1
- package/dist/chunks/input-Axw-wFj2.js +295 -0
- package/dist/chunks/{input-1tm09l_-.js.map → input-Axw-wFj2.js.map} +1 -1
- package/dist/chunks/input_group-m3cWYUfI.js +143 -0
- package/dist/chunks/{input_group-zcAq3DQl.js.map → input_group-m3cWYUfI.js.map} +1 -1
- package/dist/chunks/{input_group-zcAq3DQl.js → input_group-qVZaS5Bb.js} +27 -24
- package/dist/chunks/{input_group-j2gTtc1C.js.map → input_group-qVZaS5Bb.js.map} +1 -1
- package/dist/chunks/keyboard_list_navigation-ScXhrxya.js +284 -0
- package/dist/chunks/{keyboard_list_navigation-N74Bpdq7.js.map → keyboard_list_navigation-ScXhrxya.js.map} +1 -1
- package/dist/chunks/keyboard_list_navigation-fJnl_Iox.js +283 -0
- package/dist/chunks/{keyboard_list_navigation-F0O8nht0.js.map → keyboard_list_navigation-fJnl_Iox.js.map} +1 -1
- package/dist/chunks/link_constants-Huj7D_hm.js +22 -0
- package/dist/chunks/{link_constants-Kn6kP4i1.js.map → link_constants-Huj7D_hm.js.map} +1 -1
- package/dist/chunks/link_constants-nWVlXQBs.js +23 -0
- package/dist/chunks/{link_constants-vIUB92L4.js.map → link_constants-nWVlXQBs.js.map} +1 -1
- package/dist/chunks/list_item_constants-EiqkqZvP.js +13 -0
- package/dist/chunks/{list_item_constants-Tsz5CO1m.js.map → list_item_constants-EiqkqZvP.js.map} +1 -1
- package/dist/chunks/list_item_constants-u1xcN9Dd.js +14 -0
- package/dist/chunks/{list_item_constants-LTUc74pD.js.map → list_item_constants-u1xcN9Dd.js.map} +1 -1
- package/dist/chunks/modal-VgxXAQFP.js +105 -0
- package/dist/chunks/{modal-qEzlo0Sj.js.map → modal-VgxXAQFP.js.map} +1 -1
- package/dist/chunks/modal-XOr4kiNZ.js +106 -0
- package/dist/chunks/{modal-VuMFkZFH.js.map → modal-XOr4kiNZ.js.map} +1 -1
- package/dist/chunks/notice_action-IRUoLX2d.js +196 -0
- package/dist/chunks/{notice_action-u3ZKIhit.js.map → notice_action-IRUoLX2d.js.map} +1 -1
- package/dist/chunks/notice_action-P6uDyE9x.js +195 -0
- package/dist/chunks/{notice_action-9NmtQRai.js.map → notice_action-P6uDyE9x.js.map} +1 -1
- package/dist/chunks/notice_constants-7Qt2CQEY.js +7 -0
- package/dist/chunks/{notice_constants-mC6al2Dm.js.map → notice_constants-7Qt2CQEY.js.map} +1 -1
- package/dist/chunks/notice_constants-UXo9e3bS.js +6 -0
- package/dist/chunks/{notice_constants-c--hBFQw.js.map → notice_constants-UXo9e3bS.js.map} +1 -1
- package/dist/chunks/popover_constants-JwBF9h1Z.js +143 -0
- package/dist/chunks/{popover_constants-hOEhklvr.js.map → popover_constants-JwBF9h1Z.js.map} +1 -1
- package/dist/chunks/popover_constants-Qkpb0yh2.js +144 -0
- package/dist/chunks/{popover_constants-qjlEkroB.js.map → popover_constants-Qkpb0yh2.js.map} +1 -1
- package/dist/chunks/sr_only_close_button-81bHIpPu.js +95 -0
- package/dist/chunks/{sr_only_close_button-ErijKGYR.js.map → sr_only_close_button-81bHIpPu.js.map} +1 -1
- package/dist/chunks/sr_only_close_button-ZaGdAHz7.js +94 -0
- package/dist/chunks/{sr_only_close_button-JGole5Xi.js.map → sr_only_close_button-ZaGdAHz7.js.map} +1 -1
- package/dist/chunks/stack_constants-HraCekPm.js +15 -0
- package/dist/chunks/{stack_constants-m9Ickqw0.js.map → stack_constants-HraCekPm.js.map} +1 -1
- package/dist/chunks/stack_constants-SMzMWnAQ.js +14 -0
- package/dist/chunks/{stack_constants-u7tNqGtc.js.map → stack_constants-SMzMWnAQ.js.map} +1 -1
- package/dist/chunks/tab-FcsV5VmK.js +386 -0
- package/dist/chunks/{tab-7hJQSLFx.js.map → tab-FcsV5VmK.js.map} +1 -1
- package/dist/chunks/tab-V4cb44Ry.js +387 -0
- package/dist/chunks/{tab-Qm9LVkYj.js.map → tab-V4cb44Ry.js.map} +1 -1
- package/dist/common/constants.cjs +60 -0
- package/dist/{lib → common}/constants.cjs.map +1 -1
- package/dist/{lib → common}/constants.js +25 -18
- package/dist/{lib → common}/constants.js.map +1 -1
- package/dist/common/dates.cjs +72 -0
- package/dist/{lib → common}/dates.cjs.map +1 -1
- package/dist/common/dates.js +72 -0
- package/dist/{lib → common}/dates.js.map +1 -1
- package/dist/common/emoji.cjs +163 -0
- package/dist/common/emoji.cjs.map +1 -0
- package/dist/common/emoji.js +168 -0
- package/dist/common/emoji.js.map +1 -0
- package/dist/common/mixins.cjs +17 -0
- package/dist/{lib → common}/mixins.cjs.map +1 -1
- package/dist/common/mixins.js +17 -0
- package/dist/common/utils.cjs +237 -0
- package/dist/{lib → common}/utils.cjs.map +1 -1
- package/dist/common/utils.js +237 -0
- package/dist/{lib → common}/utils.js.map +1 -1
- package/dist/common/validators.cjs +23 -0
- package/dist/{lib → common}/validators.cjs.map +1 -1
- package/dist/common/validators.js +23 -0
- package/dist/{lib → common}/validators.js.map +1 -1
- package/dist/dialtone-vue.cjs +372 -1
- package/dist/dialtone-vue.cjs.map +1 -1
- package/dist/dialtone-vue.js +325 -324
- package/dist/dialtone-vue.js.map +1 -1
- package/dist/lib/attachment-carousel.cjs +260 -1
- package/dist/lib/attachment-carousel.cjs.map +1 -1
- package/dist/lib/attachment-carousel.js +96 -84
- package/dist/lib/attachment-carousel.js.map +1 -1
- package/dist/lib/avatar.cjs +399 -1
- package/dist/lib/avatar.cjs.map +1 -1
- package/dist/lib/avatar.js +111 -79
- package/dist/lib/avatar.js.map +1 -1
- package/dist/lib/badge.cjs +182 -1
- package/dist/lib/badge.cjs.map +1 -1
- package/dist/lib/badge.js +53 -38
- package/dist/lib/badge.js.map +1 -1
- package/dist/lib/banner.cjs +209 -2
- package/dist/lib/banner.cjs.map +1 -1
- package/dist/lib/banner.js +58 -47
- package/dist/lib/banner.js.map +1 -1
- package/dist/lib/breadcrumbs.cjs +146 -1
- package/dist/lib/breadcrumbs.cjs.map +1 -1
- package/dist/lib/breadcrumbs.js +57 -48
- package/dist/lib/breadcrumbs.js.map +1 -1
- package/dist/lib/button-group.cjs +47 -1
- package/dist/lib/button-group.cjs.map +1 -1
- package/dist/lib/button-group.js +21 -18
- package/dist/lib/button-group.js.map +1 -1
- package/dist/lib/button.cjs +349 -1
- package/dist/lib/button.cjs.map +1 -1
- package/dist/lib/button.js +98 -76
- package/dist/lib/button.js.map +1 -1
- package/dist/lib/callbar-button-with-popover.cjs +249 -1
- package/dist/lib/callbar-button-with-popover.cjs.map +1 -1
- package/dist/lib/callbar-button-with-popover.js +66 -50
- package/dist/lib/callbar-button-with-popover.js.map +1 -1
- package/dist/lib/callbar-button.cjs +182 -1
- package/dist/lib/callbar-button.cjs.map +1 -1
- package/dist/lib/callbar-button.js +42 -34
- package/dist/lib/callbar-button.js.map +1 -1
- package/dist/lib/callbox.cjs +146 -1
- package/dist/lib/callbox.cjs.map +1 -1
- package/dist/lib/callbox.js +38 -32
- package/dist/lib/callbox.js.map +1 -1
- package/dist/lib/card.cjs +73 -1
- package/dist/lib/card.cjs.map +1 -1
- package/dist/lib/card.js +22 -20
- package/dist/lib/card.js.map +1 -1
- package/dist/lib/checkbox-group.cjs +129 -1
- package/dist/lib/checkbox-group.cjs.map +1 -1
- package/dist/lib/checkbox-group.js +42 -29
- package/dist/lib/checkbox-group.js.map +1 -1
- package/dist/lib/checkbox.cjs +127 -1
- package/dist/lib/checkbox.cjs.map +1 -1
- package/dist/lib/checkbox.js +46 -35
- package/dist/lib/checkbox.js.map +1 -1
- package/dist/lib/chip.cjs +198 -1
- package/dist/lib/chip.cjs.map +1 -1
- package/dist/lib/chip.js +59 -45
- package/dist/lib/chip.js.map +1 -1
- package/dist/lib/codeblock.cjs +29 -2
- package/dist/lib/codeblock.cjs.map +1 -1
- package/dist/lib/codeblock.js +15 -14
- package/dist/lib/codeblock.js.map +1 -1
- package/dist/lib/collapsible.cjs +334 -1
- package/dist/lib/collapsible.cjs.map +1 -1
- package/dist/lib/collapsible.js +91 -68
- package/dist/lib/collapsible.js.map +1 -1
- package/dist/lib/combobox-multi-select.cjs +519 -1
- package/dist/lib/combobox-multi-select.cjs.map +1 -1
- package/dist/lib/combobox-multi-select.js +223 -136
- package/dist/lib/combobox-multi-select.js.map +1 -1
- package/dist/lib/combobox-with-popover.cjs +384 -1
- package/dist/lib/combobox-with-popover.cjs.map +1 -1
- package/dist/lib/combobox-with-popover.js +130 -86
- package/dist/lib/combobox-with-popover.js.map +1 -1
- package/dist/lib/combobox.cjs +18 -1
- package/dist/lib/combobox.cjs.map +1 -1
- package/dist/lib/combobox.js +9 -9
- package/dist/lib/contact-info.cjs +145 -1
- package/dist/lib/contact-info.cjs.map +1 -1
- package/dist/lib/contact-info.js +34 -32
- package/dist/lib/contact-info.js.map +1 -1
- package/dist/lib/contact-row.cjs +205 -1
- package/dist/lib/contact-row.cjs.map +1 -1
- package/dist/lib/contact-row.js +42 -39
- package/dist/lib/contact-row.js.map +1 -1
- package/dist/lib/datepicker.cjs +662 -1
- package/dist/lib/datepicker.cjs.map +1 -1
- package/dist/lib/datepicker.js +330 -218
- package/dist/lib/datepicker.js.map +1 -1
- package/dist/lib/description-list.cjs +114 -1
- package/dist/lib/description-list.cjs.map +1 -1
- package/dist/lib/description-list.js +51 -19
- package/dist/lib/description-list.js.map +1 -1
- package/dist/lib/dropdown.cjs +45 -1
- package/dist/lib/dropdown.cjs.map +1 -1
- package/dist/lib/dropdown.js +27 -25
- package/dist/lib/dropdown.js.map +1 -1
- package/dist/lib/editor.cjs +555 -1
- package/dist/lib/editor.cjs.map +1 -1
- package/dist/lib/editor.js +191 -162
- package/dist/lib/editor.js.map +1 -1
- package/dist/lib/emoji-picker.cjs +1063 -1
- package/dist/lib/emoji-picker.cjs.map +1 -1
- package/dist/lib/emoji-picker.js +638 -374
- package/dist/lib/emoji-picker.js.map +1 -1
- package/dist/lib/emoji-row.cjs +88 -1
- package/dist/lib/emoji-row.cjs.map +1 -1
- package/dist/lib/emoji-row.js +46 -40
- package/dist/lib/emoji-row.js.map +1 -1
- package/dist/lib/emoji-text-wrapper.cjs +109 -1
- package/dist/lib/emoji-text-wrapper.cjs.map +1 -1
- package/dist/lib/emoji-text-wrapper.js +49 -35
- package/dist/lib/emoji-text-wrapper.js.map +1 -1
- package/dist/lib/emoji.cjs +145 -1
- package/dist/lib/emoji.cjs.map +1 -1
- package/dist/lib/emoji.js +140 -5
- package/dist/lib/emoji.js.map +1 -1
- package/dist/lib/feed-item-row.cjs +213 -1
- package/dist/lib/feed-item-row.cjs.map +1 -1
- package/dist/lib/feed-item-row.js +71 -63
- package/dist/lib/feed-item-row.js.map +1 -1
- package/dist/lib/feed-pill.cjs +149 -1
- package/dist/lib/feed-pill.cjs.map +1 -1
- package/dist/lib/feed-pill.js +60 -51
- package/dist/lib/feed-pill.js.map +1 -1
- package/dist/lib/general-row.cjs +405 -1
- package/dist/lib/general-row.cjs.map +1 -1
- package/dist/lib/general-row.js +133 -106
- package/dist/lib/general-row.js.map +1 -1
- package/dist/lib/group-row.cjs +117 -1
- package/dist/lib/group-row.cjs.map +1 -1
- package/dist/lib/group-row.js +33 -30
- package/dist/lib/group-row.js.map +1 -1
- package/dist/lib/grouped-chip.cjs +45 -1
- package/dist/lib/grouped-chip.cjs.map +1 -1
- package/dist/lib/grouped-chip.js +28 -26
- package/dist/lib/grouped-chip.js.map +1 -1
- package/dist/lib/hovercard.cjs +227 -1
- package/dist/lib/hovercard.cjs.map +1 -1
- package/dist/lib/hovercard.js +98 -63
- package/dist/lib/hovercard.js.map +1 -1
- package/dist/lib/icon.cjs +59 -1
- package/dist/lib/icon.cjs.map +1 -1
- package/dist/lib/icon.js +22 -20
- package/dist/lib/icon.js.map +1 -1
- package/dist/lib/image-viewer.cjs +190 -1
- package/dist/lib/image-viewer.cjs.map +1 -1
- package/dist/lib/image-viewer.js +83 -62
- package/dist/lib/image-viewer.js.map +1 -1
- package/dist/lib/input-group.cjs +91 -1
- package/dist/lib/input-group.cjs.map +1 -1
- package/dist/lib/input-group.js +29 -27
- package/dist/lib/input-group.js.map +1 -1
- package/dist/lib/input.cjs +492 -1
- package/dist/lib/input.cjs.map +1 -1
- package/dist/lib/input.js +127 -89
- package/dist/lib/input.js.map +1 -1
- package/dist/lib/item-layout.cjs +40 -1
- package/dist/lib/item-layout.cjs.map +1 -1
- package/dist/lib/item-layout.js +15 -13
- package/dist/lib/item-layout.js.map +1 -1
- package/dist/lib/ivr-node.cjs +209 -1
- package/dist/lib/ivr-node.cjs.map +1 -1
- package/dist/lib/ivr-node.js +115 -99
- package/dist/lib/ivr-node.js.map +1 -1
- package/dist/lib/keyboard-shortcut.cjs +106 -1
- package/dist/lib/keyboard-shortcut.cjs.map +1 -1
- package/dist/lib/keyboard-shortcut.js +42 -34
- package/dist/lib/keyboard-shortcut.js.map +1 -1
- package/dist/lib/lazy-show.cjs +80 -1
- package/dist/lib/lazy-show.cjs.map +1 -1
- package/dist/lib/lazy-show.js +20 -16
- package/dist/lib/lazy-show.js.map +1 -1
- package/dist/lib/link.cjs +70 -1
- package/dist/lib/link.cjs.map +1 -1
- package/dist/lib/link.js +22 -20
- package/dist/lib/link.js.map +1 -1
- package/dist/lib/list-item-group.cjs +60 -1
- package/dist/lib/list-item-group.cjs.map +1 -1
- package/dist/lib/list-item-group.js +19 -17
- package/dist/lib/list-item-group.js.map +1 -1
- package/dist/lib/list-item.cjs +204 -1
- package/dist/lib/list-item.cjs.map +1 -1
- package/dist/lib/list-item.js +67 -56
- package/dist/lib/list-item.js.map +1 -1
- package/dist/lib/message-input.cjs +554 -1
- package/dist/lib/message-input.cjs.map +1 -1
- package/dist/lib/message-input.js +174 -152
- package/dist/lib/message-input.js.map +1 -1
- package/dist/lib/modal.cjs +350 -2
- package/dist/lib/modal.cjs.map +1 -1
- package/dist/lib/modal.js +118 -90
- package/dist/lib/modal.js.map +1 -1
- package/dist/lib/notice.cjs +159 -1
- package/dist/lib/notice.cjs.map +1 -1
- package/dist/lib/notice.js +46 -43
- package/dist/lib/notice.js.map +1 -1
- package/dist/lib/pagination.cjs +152 -1
- package/dist/lib/pagination.cjs.map +1 -1
- package/dist/lib/pagination.js +60 -48
- package/dist/lib/pagination.js.map +1 -1
- package/dist/lib/popover.cjs +956 -1
- package/dist/lib/popover.cjs.map +1 -1
- package/dist/lib/popover.js +401 -221
- package/dist/lib/popover.js.map +1 -1
- package/dist/lib/presence.cjs +65 -1
- package/dist/lib/presence.cjs.map +1 -1
- package/dist/lib/presence.js +32 -26
- package/dist/lib/presence.js.map +1 -1
- package/dist/lib/radio-group.cjs +98 -1
- package/dist/lib/radio-group.cjs.map +1 -1
- package/dist/lib/radio-group.js +24 -22
- package/dist/lib/radio-group.js.map +1 -1
- package/dist/lib/radio.cjs +118 -1
- package/dist/lib/radio.cjs.map +1 -1
- package/dist/lib/radio.js +43 -35
- package/dist/lib/radio.js.map +1 -1
- package/dist/lib/rich-text-editor.cjs +1138 -1
- package/dist/lib/rich-text-editor.cjs.map +1 -1
- package/dist/lib/rich-text-editor.js +574 -387
- package/dist/lib/rich-text-editor.js.map +1 -1
- package/dist/lib/root-layout.cjs +130 -1
- package/dist/lib/root-layout.cjs.map +1 -1
- package/dist/lib/root-layout.js +28 -24
- package/dist/lib/root-layout.js.map +1 -1
- package/dist/lib/select-menu.cjs +282 -1
- package/dist/lib/select-menu.cjs.map +1 -1
- package/dist/lib/select-menu.js +101 -61
- package/dist/lib/select-menu.js.map +1 -1
- package/dist/lib/settings-menu-button.cjs +65 -1
- package/dist/lib/settings-menu-button.cjs.map +1 -1
- package/dist/lib/settings-menu-button.js +26 -24
- package/dist/lib/settings-menu-button.js.map +1 -1
- package/dist/lib/skeleton.cjs +612 -1
- package/dist/lib/skeleton.cjs.map +1 -1
- package/dist/lib/skeleton.js +174 -135
- package/dist/lib/skeleton.js.map +1 -1
- package/dist/lib/stack.cjs +127 -1
- package/dist/lib/stack.cjs.map +1 -1
- package/dist/lib/stack.js +66 -56
- package/dist/lib/stack.js.map +1 -1
- package/dist/lib/tabs.cjs +99 -1
- package/dist/lib/tabs.cjs.map +1 -1
- package/dist/lib/tabs.js +42 -35
- package/dist/lib/tabs.js.map +1 -1
- package/dist/lib/time-pill.cjs +47 -1
- package/dist/lib/time-pill.cjs.map +1 -1
- package/dist/lib/time-pill.js +21 -16
- package/dist/lib/time-pill.js.map +1 -1
- package/dist/lib/toast.cjs +247 -1
- package/dist/lib/toast.cjs.map +1 -1
- package/dist/lib/toast.js +78 -55
- package/dist/lib/toast.js.map +1 -1
- package/dist/lib/toggle.cjs +177 -1
- package/dist/lib/toggle.cjs.map +1 -1
- package/dist/lib/toggle.js +46 -37
- package/dist/lib/toggle.js.map +1 -1
- package/dist/lib/tooltip-directive.cjs +87 -1
- package/dist/lib/tooltip-directive.cjs.map +1 -1
- package/dist/lib/tooltip-directive.js +55 -41
- package/dist/lib/tooltip-directive.js.map +1 -1
- package/dist/lib/tooltip.cjs +436 -1
- package/dist/lib/tooltip.cjs.map +1 -1
- package/dist/lib/tooltip.js +152 -90
- package/dist/lib/tooltip.js.map +1 -1
- package/dist/lib/top-banner-info.cjs +63 -1
- package/dist/lib/top-banner-info.cjs.map +1 -1
- package/dist/lib/top-banner-info.js +22 -18
- package/dist/lib/top-banner-info.js.map +1 -1
- package/dist/lib/unread-pill.cjs +63 -1
- package/dist/lib/unread-pill.cjs.map +1 -1
- package/dist/lib/unread-pill.js +25 -21
- package/dist/lib/unread-pill.js.map +1 -1
- package/dist/lib/validation-messages.cjs +85 -1
- package/dist/lib/validation-messages.cjs.map +1 -1
- package/dist/lib/validation-messages.js +32 -29
- package/dist/lib/validation-messages.js.map +1 -1
- package/dist/style.css +1214 -1
- package/dist/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +2 -2
- package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +2 -2
- package/package.json +31 -30
- package/dist/chunks/_plugin-vue2_normalizer-ZK80B3OL.js +0 -2
- package/dist/chunks/_plugin-vue2_normalizer-ZK80B3OL.js.map +0 -1
- package/dist/chunks/_plugin-vue2_normalizer-u6G_3nkj.js +0 -33
- package/dist/chunks/_plugin-vue2_normalizer-u6G_3nkj.js.map +0 -1
- package/dist/chunks/dropdown-zhMEz3bn.js +0 -2
- package/dist/chunks/dropdown_constants-EUcDxBrX.js +0 -9
- package/dist/chunks/dropdown_constants-EUcDxBrX.js.map +0 -1
- package/dist/chunks/dropdown_constants-KHFvVI2L.js +0 -2
- package/dist/chunks/dropdown_constants-KHFvVI2L.js.map +0 -1
- package/dist/chunks/icon_constants-2S_OSQ1t.js +0 -2
- package/dist/chunks/index-2jPosQBn.js +0 -3
- package/dist/chunks/index-YkSDT8-g.js +0 -244
- package/dist/chunks/index-YkSDT8-g.js.map +0 -1
- package/dist/chunks/index-nIyl_PL6.js +0 -372
- package/dist/chunks/index-sdfB7Aok.js +0 -2
- package/dist/chunks/index-sdfB7Aok.js.map +0 -1
- package/dist/chunks/input-o-fc1X4b.js +0 -2
- package/dist/chunks/input_group-j2gTtc1C.js +0 -2
- package/dist/chunks/keyboard_list_navigation-F0O8nht0.js +0 -197
- package/dist/chunks/keyboard_list_navigation-N74Bpdq7.js +0 -2
- package/dist/chunks/link_constants-Kn6kP4i1.js +0 -2
- package/dist/chunks/link_constants-vIUB92L4.js +0 -16
- package/dist/chunks/list_item_constants-LTUc74pD.js +0 -13
- package/dist/chunks/list_item_constants-Tsz5CO1m.js +0 -2
- package/dist/chunks/modal-VuMFkZFH.js +0 -82
- package/dist/chunks/modal-qEzlo0Sj.js +0 -2
- package/dist/chunks/notice_action-9NmtQRai.js +0 -182
- package/dist/chunks/notice_action-u3ZKIhit.js +0 -2
- package/dist/chunks/notice_constants-c--hBFQw.js +0 -6
- package/dist/chunks/notice_constants-mC6al2Dm.js +0 -2
- package/dist/chunks/popover_constants-hOEhklvr.js +0 -2
- package/dist/chunks/popover_constants-qjlEkroB.js +0 -114
- package/dist/chunks/sr_only_close_button-ErijKGYR.js +0 -3
- package/dist/chunks/sr_only_close_button-JGole5Xi.js +0 -86
- package/dist/chunks/stack_constants-m9Ickqw0.js +0 -2
- package/dist/chunks/stack_constants-u7tNqGtc.js +0 -13
- package/dist/chunks/tab-7hJQSLFx.js +0 -2
- package/dist/chunks/tab-Qm9LVkYj.js +0 -346
- package/dist/lib/constants.cjs +0 -2
- package/dist/lib/dates.cjs +0 -2
- package/dist/lib/dates.js +0 -57
- package/dist/lib/mixins.cjs +0 -2
- package/dist/lib/mixins.js +0 -17
- package/dist/lib/utils.cjs +0 -2
- package/dist/lib/utils.js +0 -175
- package/dist/lib/validators.cjs +0 -2
- package/dist/lib/validators.js +0 -12
- /package/dist/{lib → common}/mixins.js.map +0 -0
|
@@ -1,2 +1,250 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const common_utils = require("../common/utils.cjs");
|
|
4
|
+
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-1aBeR4AK.js");
|
|
5
|
+
const lib_callbarButton = require("./callbar-button.cjs");
|
|
6
|
+
const lib_popover = require("./popover.cjs");
|
|
7
|
+
const lib_button = require("./button.cjs");
|
|
8
|
+
const lib_icon = require("./icon.cjs");
|
|
9
|
+
require("../common/constants.cjs");
|
|
10
|
+
require("vue");
|
|
11
|
+
require("./tooltip.cjs");
|
|
12
|
+
require("../chunks/popover_constants-JwBF9h1Z.js");
|
|
13
|
+
require("tippy.js");
|
|
14
|
+
require("./lazy-show.cjs");
|
|
15
|
+
require("@linusborg/vue-simple-portal");
|
|
16
|
+
require("../chunks/modal-VgxXAQFP.js");
|
|
17
|
+
require("../chunks/sr_only_close_button-ZaGdAHz7.js");
|
|
18
|
+
require("../chunks/link_constants-Huj7D_hm.js");
|
|
19
|
+
require("@dialpad/dialtone-icons/vue2");
|
|
20
|
+
require("../chunks/icon_constants-QYpmdE0R.js");
|
|
21
|
+
require("@dialpad/dialtone-icons/icons.json");
|
|
22
|
+
const _sfc_main = {
|
|
23
|
+
name: "DtRecipeCallbarButtonWithPopover",
|
|
24
|
+
components: { DtRecipeCallbarButton: lib_callbarButton.DtRecipeCallbarButton, DtPopover: lib_popover.DtPopover, DtButton: lib_button.DtButton, DtIcon: lib_icon.DtIcon },
|
|
25
|
+
/* inheritAttrs: false is generally an option we want to set on library
|
|
26
|
+
components. This allows any attributes passed in that are not recognized
|
|
27
|
+
as props to be passed down to another element or component using v-bind:$attrs
|
|
28
|
+
more info: https://vuejs.org/v2/api/#inheritAttrs */
|
|
29
|
+
inheritAttrs: false,
|
|
30
|
+
props: {
|
|
31
|
+
/**
|
|
32
|
+
* Id for the item.
|
|
33
|
+
*/
|
|
34
|
+
id: {
|
|
35
|
+
type: String,
|
|
36
|
+
default() {
|
|
37
|
+
return common_utils.default.getUniqueString();
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* Aria label for the button. If empty, it takes its value from the default slot.
|
|
42
|
+
*/
|
|
43
|
+
ariaLabel: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: null,
|
|
46
|
+
validator: (label) => {
|
|
47
|
+
return label || (void 0).$slots.default;
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* Aria label for the arrow. Cannot be empty.
|
|
52
|
+
*/
|
|
53
|
+
arrowButtonLabel: {
|
|
54
|
+
type: String,
|
|
55
|
+
required: true,
|
|
56
|
+
validator: (label) => {
|
|
57
|
+
return !!label;
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* The direction the popover displays relative to the anchor.
|
|
62
|
+
* @values 'bottom', 'bottom-start', 'bottom-end',
|
|
63
|
+
* 'right', 'right-start', 'right-end',
|
|
64
|
+
* 'left', 'left-start', 'left-end',
|
|
65
|
+
* 'top', 'top-start', 'top-end'
|
|
66
|
+
* @default 'top'
|
|
67
|
+
*/
|
|
68
|
+
placement: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: "top"
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* The element that is focused when the popover is opened. This can be an
|
|
74
|
+
* HTMLElement within the popover, a string starting with '#' which will
|
|
75
|
+
* find the element by ID. 'first' which will automatically focus
|
|
76
|
+
* the first element, or 'dialog' which will focus the dialog window itself.
|
|
77
|
+
* If the dialog is modal this prop cannot be 'none'.
|
|
78
|
+
*/
|
|
79
|
+
initialFocusElement: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: "first"
|
|
82
|
+
},
|
|
83
|
+
/**
|
|
84
|
+
* Determines visibility for close button
|
|
85
|
+
*/
|
|
86
|
+
showCloseButton: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: true
|
|
89
|
+
},
|
|
90
|
+
/**
|
|
91
|
+
* Determines whether the button should be disabled
|
|
92
|
+
* default is false.
|
|
93
|
+
* @values true, false
|
|
94
|
+
*/
|
|
95
|
+
disabled: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: false
|
|
98
|
+
},
|
|
99
|
+
/**
|
|
100
|
+
* Forces showing the arrow, even if the button is disabled.
|
|
101
|
+
* default is false
|
|
102
|
+
* @values true, false
|
|
103
|
+
*/
|
|
104
|
+
forceShowArrow: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: false
|
|
107
|
+
},
|
|
108
|
+
/**
|
|
109
|
+
* Determines whether the button should have active styling
|
|
110
|
+
* default is false.
|
|
111
|
+
* @values true, false
|
|
112
|
+
* @see https://dialtone.dialpad.com/components/button/
|
|
113
|
+
*/
|
|
114
|
+
active: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: false
|
|
117
|
+
},
|
|
118
|
+
/**
|
|
119
|
+
* Determines whether the button should have danger styling
|
|
120
|
+
* default is false.
|
|
121
|
+
* @values true, false
|
|
122
|
+
* @see https://dialtone.dialpad.com/components/button/
|
|
123
|
+
*/
|
|
124
|
+
danger: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
default: false
|
|
127
|
+
},
|
|
128
|
+
/**
|
|
129
|
+
* Additional class name for the button wrapper element.
|
|
130
|
+
*/
|
|
131
|
+
buttonClass: {
|
|
132
|
+
type: [String, Array, Object],
|
|
133
|
+
default: ""
|
|
134
|
+
},
|
|
135
|
+
/**
|
|
136
|
+
* Additional class name for the button text.
|
|
137
|
+
*/
|
|
138
|
+
textClass: {
|
|
139
|
+
type: [String, Array, Object],
|
|
140
|
+
default: ""
|
|
141
|
+
},
|
|
142
|
+
/*
|
|
143
|
+
* Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.
|
|
144
|
+
*/
|
|
145
|
+
buttonWidthSize: {
|
|
146
|
+
type: String,
|
|
147
|
+
default: "xl",
|
|
148
|
+
validator: (size) => lib_callbarButton.CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size)
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
* Additional class name for the popover content wrapper element.
|
|
152
|
+
*/
|
|
153
|
+
contentClass: {
|
|
154
|
+
type: [String, Array, Object],
|
|
155
|
+
default: ""
|
|
156
|
+
},
|
|
157
|
+
/**
|
|
158
|
+
* To auto open the modal popover.
|
|
159
|
+
*/
|
|
160
|
+
openPopover: {
|
|
161
|
+
type: Boolean,
|
|
162
|
+
default: false
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
emits: [
|
|
166
|
+
/**
|
|
167
|
+
* Emitted when the arrow is clicked
|
|
168
|
+
*/
|
|
169
|
+
"arrow-click",
|
|
170
|
+
/**
|
|
171
|
+
* Native click event
|
|
172
|
+
*
|
|
173
|
+
* @event click
|
|
174
|
+
* @type {PointerEvent | KeyboardEvent}
|
|
175
|
+
*/
|
|
176
|
+
"click",
|
|
177
|
+
/**
|
|
178
|
+
* Emitted when modal popover is opened or closed.
|
|
179
|
+
*/
|
|
180
|
+
"opened"
|
|
181
|
+
],
|
|
182
|
+
data() {
|
|
183
|
+
return {
|
|
184
|
+
open: false
|
|
185
|
+
};
|
|
186
|
+
},
|
|
187
|
+
computed: {
|
|
188
|
+
showArrowButton() {
|
|
189
|
+
return this.forceShowArrow || !this.disabled;
|
|
190
|
+
},
|
|
191
|
+
isCompactMode() {
|
|
192
|
+
return this.buttonWidthSize === "sm" || this.buttonWidthSize === "md";
|
|
193
|
+
},
|
|
194
|
+
showPopover() {
|
|
195
|
+
if (!this.openPopover || this.open) {
|
|
196
|
+
this.syncOpenState();
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
return this.toggleOpen();
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
methods: {
|
|
203
|
+
arrowClick(ev) {
|
|
204
|
+
this.$emit("arrow-click", ev);
|
|
205
|
+
return this.toggleOpen();
|
|
206
|
+
},
|
|
207
|
+
toggleOpen() {
|
|
208
|
+
return this.open = !this.open;
|
|
209
|
+
},
|
|
210
|
+
syncOpenState() {
|
|
211
|
+
this.open = this.openPopover;
|
|
212
|
+
},
|
|
213
|
+
buttonClick(ev) {
|
|
214
|
+
if (!this.$listeners.click) {
|
|
215
|
+
this.arrowClick(ev);
|
|
216
|
+
} else {
|
|
217
|
+
this.$emit("click", ev);
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
onModalIsOpened(isOpened) {
|
|
221
|
+
this.open = isOpened;
|
|
222
|
+
this.$emit("opened", isOpened);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
var _sfc_render = function render() {
|
|
227
|
+
var _vm = this, _c = _vm._self._c;
|
|
228
|
+
return _c("div", { staticClass: "dt-recipe--callbar-button-with-popover" }, [_c("dt-recipe-callbar-button", { staticClass: "dt-recipe--callbar-button-with-popover--main-button", attrs: { "aria-label": _vm.ariaLabel, "disabled": _vm.disabled, "active": _vm.active, "danger": _vm.danger, "button-class": _vm.buttonClass, "button-width-size": _vm.buttonWidthSize, "text-class": _vm.textClass }, on: { "click": _vm.buttonClick } }, [_vm._t("icon", null, { "slot": "icon" }), _vm._t("tooltip", null, { "slot": "tooltip" }), _vm._t("default")], 2), _vm.showArrowButton ? _c("dt-popover", _vm._b({ staticClass: "dt-recipe--callbar-button-with-popover--popover-wrapper", attrs: { "id": _vm.id, "modal": false, "open": _vm.open, "placement": _vm.placement, "initial-focus-element": _vm.initialFocusElement, "show-close-button": _vm.showCloseButton, "offset": [0, 16], "padding": "none", "dialog-class": ["dt-recipe--callbar-button-with-popover--popover", _vm.contentClass], "header-class": "d-d-flex d-ai-center d-fw-normal d-px12", "open-popover": _vm.showPopover }, on: { "opened": _vm.onModalIsOpened }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
|
|
229
|
+
return [_c("dt-button", { class: [
|
|
230
|
+
"dt-recipe--callbar-button-with-popover--arrow",
|
|
231
|
+
{ "dt-recipe--callbar-button-with-popover--arrow--large": !_vm.isCompactMode }
|
|
232
|
+
], attrs: { "circle": "", "importance": "clear", "size": "lg", "width": "2rem", "aria-label": _vm.arrowButtonLabel, "active": _vm.open }, on: { "click": _vm.arrowClick }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
233
|
+
return [_c("dt-icon", { staticClass: "dt-recipe--callbar-button-with-popover--arrow__icon", attrs: { "name": "chevron-up", "size": "200" } })];
|
|
234
|
+
}, proxy: true }], null, false, 982444464) })];
|
|
235
|
+
}, proxy: true }], null, false, 3818376870) }, "dt-popover", _vm.$attrs, false), [_vm._t("content", null, { "slot": "content" }), _vm._t("headerContent", null, { "slot": "headerContent" }), _vm._t("footerContent", null, { "slot": "footerContent" })], 2) : _vm._e()], 1);
|
|
236
|
+
};
|
|
237
|
+
var _sfc_staticRenderFns = [];
|
|
238
|
+
var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
239
|
+
_sfc_main,
|
|
240
|
+
_sfc_render,
|
|
241
|
+
_sfc_staticRenderFns,
|
|
242
|
+
false,
|
|
243
|
+
null,
|
|
244
|
+
null,
|
|
245
|
+
null,
|
|
246
|
+
null
|
|
247
|
+
);
|
|
248
|
+
const callbar_button_with_popover = __component__.exports;
|
|
249
|
+
exports.DtRecipeCallbarButtonWithPopover = callbar_button_with_popover;
|
|
2
250
|
//# sourceMappingURL=callbar-button-with-popover.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callbar-button-with-popover.cjs","sources":["../../recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-popover\"\n >\n <dt-recipe-callbar-button\n :aria-label=\"ariaLabel\"\n :disabled=\"disabled\"\n :active=\"active\"\n :danger=\"danger\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :text-class=\"textClass\"\n class=\"dt-recipe--callbar-button-with-popover--main-button\"\n @click=\"buttonClick\"\n >\n <slot\n slot=\"icon\"\n name=\"icon\"\n />\n <slot\n slot=\"tooltip\"\n name=\"tooltip\"\n />\n <slot />\n </dt-recipe-callbar-button>\n <dt-popover\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :open=\"open\"\n :placement=\"placement\"\n :initial-focus-element=\"initialFocusElement\"\n :show-close-button=\"showCloseButton\"\n :offset=\"[0, 16]\"\n padding=\"none\"\n class=\"dt-recipe--callbar-button-with-popover--popover-wrapper\"\n :dialog-class=\"['dt-recipe--callbar-button-with-popover--popover', contentClass]\"\n header-class=\"d-d-flex d-ai-center d-fw-normal d-px12\"\n v-bind=\"$attrs\"\n :open-popover=\"showPopover\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n circle\n importance=\"clear\"\n size=\"lg\"\n :class=\"['dt-recipe--callbar-button-with-popover--arrow',\n { 'dt-recipe--callbar-button-with-popover--arrow--large': !isCompactMode }]\"\n width=\"2rem\"\n :aria-label=\"arrowButtonLabel\"\n :active=\"open\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon\n name=\"chevron-up\"\n class=\"dt-recipe--callbar-button-with-popover--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <slot\n slot=\"content\"\n name=\"content\"\n />\n <slot\n slot=\"headerContent\"\n name=\"headerContent\"\n />\n <slot\n slot=\"footerContent\"\n name=\"footerContent\"\n />\n </dt-popover>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtPopover } from '@/components/popover';\nimport { DtIcon } from '@/components/icon';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithPopover',\n\n components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIcon },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Aria label for the arrow. Cannot be empty.\n */\n arrowButtonLabel: {\n type: String,\n required: true,\n validator: (label) => {\n return !!label;\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * @values 'bottom', 'bottom-start', 'bottom-end',\n * 'right', 'right-start', 'right-end',\n * 'left', 'left-start', 'left-end',\n * 'top', 'top-start', 'top-end'\n * @default 'top'\n */\n placement: {\n type: String,\n default: 'top',\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: String,\n default: 'first',\n },\n\n /**\n * Determines visibility for close button\n */\n showCloseButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Forces showing the arrow, even if the button is disabled.\n * default is false\n * @values true, false\n */\n forceShowArrow: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Additional class name for the popover content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * To auto open the modal popover.\n */\n openPopover: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal popover is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showPopover () {\n if (!this.openPopover || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openPopover;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the popover\n // the same as if the arrow was clicked.\n if (!this.$listeners.click) {\n this.arrowClick(ev);\n } else {\n this.$emit('click', ev);\n }\n },\n\n onModalIsOpened (isOpened) {\n this.open = isOpened;\n this.$emit('opened', isOpened);\n },\n },\n\n};\n</script>\n\n<style lang=\"less\">\n.dt-recipe--callbar-button-with-popover--arrow {\n margin-top: var(--dt-space-350-negative);\n margin-left: calc(var(--dt-space-300-negative) * 5);\n width: var(--dt-size-500);\n height: var(--dt-size-500);\n padding: var(--dt-space-400);\n border-radius: var(--dt-size-300);\n\n &.d-btn--active {\n background: var(--dt-color-surface-moderate-opaque);\n }\n\n &--large {\n margin-left: var(--dt-space-550-negative);\n }\n\n &__icon {\n color: var(--dt-color-black-800);\n }\n}\n\n.dt-recipe--callbar-button-with-popover--popover {\n .d-popover__header {\n background: var(--dt-color-surface-contrast);\n color: var(--dt-color-foreground-primary-inverted);\n\n .d-btn {\n color: var(--dt-color-foreground-primary-inverted);\n }\n }\n}\n\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected::after,\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected:hover::after {\n --tab--bgc: var(--dt-color-surface-contrast);\n}\n.dt-recipe--callbar-button-with-popover--button .tab-group {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.dt-recipe--callbar-button-with-popover--button .tab-content {\n flex: 1 1 100%;\n overflow-y: auto;\n}\n\n.dt-recipe--callbar-button-with-popover {\n display: flex;\n align-items: center;\n}\n</style>\n"],"names":["_sfc_main","DtRecipeCallbarButton","DtPopover","DtButton","DtIcon","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","ev","isOpened"],"mappings":"yvBAsFA,MAAAA,EAAA,CACA,KAAA,mCAEA,WAAA,CAAA,sBAAAC,EAAA,sBAAA,UAAAC,YAAAC,SAAAA,EAAAA,SAAAC,OAAAA,EAAAA,MAAA,EAMA,aAAA,GAEA,MAAA,CAIA,GAAA,CACA,KAAA,OACA,SAAA,CACA,OAAAC,EAAAA,QAAA,iBACA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,MAGA,KAAA,MAAA,QAAAA,CAAA,EAFA,KAAA,WAAAA,CAAA,CAIA,EAEA,gBAAAC,EAAA,CACA,KAAA,KAAAA,EACA,KAAA,MAAA,SAAAA,CAAA,CACA,CACA,CAEA"}
|
|
1
|
+
{"version":3,"file":"callbar-button-with-popover.cjs","sources":["../../recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-popover\"\n >\n <dt-recipe-callbar-button\n :aria-label=\"ariaLabel\"\n :disabled=\"disabled\"\n :active=\"active\"\n :danger=\"danger\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :text-class=\"textClass\"\n class=\"dt-recipe--callbar-button-with-popover--main-button\"\n @click=\"buttonClick\"\n >\n <slot\n slot=\"icon\"\n name=\"icon\"\n />\n <slot\n slot=\"tooltip\"\n name=\"tooltip\"\n />\n <slot />\n </dt-recipe-callbar-button>\n <dt-popover\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :open=\"open\"\n :placement=\"placement\"\n :initial-focus-element=\"initialFocusElement\"\n :show-close-button=\"showCloseButton\"\n :offset=\"[0, 16]\"\n padding=\"none\"\n class=\"dt-recipe--callbar-button-with-popover--popover-wrapper\"\n :dialog-class=\"['dt-recipe--callbar-button-with-popover--popover', contentClass]\"\n header-class=\"d-d-flex d-ai-center d-fw-normal d-px12\"\n v-bind=\"$attrs\"\n :open-popover=\"showPopover\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n circle\n importance=\"clear\"\n size=\"lg\"\n :class=\"['dt-recipe--callbar-button-with-popover--arrow',\n { 'dt-recipe--callbar-button-with-popover--arrow--large': !isCompactMode }]\"\n width=\"2rem\"\n :aria-label=\"arrowButtonLabel\"\n :active=\"open\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon\n name=\"chevron-up\"\n class=\"dt-recipe--callbar-button-with-popover--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <slot\n slot=\"content\"\n name=\"content\"\n />\n <slot\n slot=\"headerContent\"\n name=\"headerContent\"\n />\n <slot\n slot=\"footerContent\"\n name=\"footerContent\"\n />\n </dt-popover>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtPopover } from '@/components/popover';\nimport { DtIcon } from '@/components/icon';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithPopover',\n\n components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIcon },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Aria label for the arrow. Cannot be empty.\n */\n arrowButtonLabel: {\n type: String,\n required: true,\n validator: (label) => {\n return !!label;\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * @values 'bottom', 'bottom-start', 'bottom-end',\n * 'right', 'right-start', 'right-end',\n * 'left', 'left-start', 'left-end',\n * 'top', 'top-start', 'top-end'\n * @default 'top'\n */\n placement: {\n type: String,\n default: 'top',\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: String,\n default: 'first',\n },\n\n /**\n * Determines visibility for close button\n */\n showCloseButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Forces showing the arrow, even if the button is disabled.\n * default is false\n * @values true, false\n */\n forceShowArrow: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Additional class name for the popover content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * To auto open the modal popover.\n */\n openPopover: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal popover is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showPopover () {\n if (!this.openPopover || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openPopover;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the popover\n // the same as if the arrow was clicked.\n if (!this.$listeners.click) {\n this.arrowClick(ev);\n } else {\n this.$emit('click', ev);\n }\n },\n\n onModalIsOpened (isOpened) {\n this.open = isOpened;\n this.$emit('opened', isOpened);\n },\n },\n\n};\n</script>\n\n<style lang=\"less\">\n.dt-recipe--callbar-button-with-popover--arrow {\n margin-top: var(--dt-space-350-negative);\n margin-left: calc(var(--dt-space-300-negative) * 5);\n width: var(--dt-size-500);\n height: var(--dt-size-500);\n padding: var(--dt-space-400);\n border-radius: var(--dt-size-300);\n\n &.d-btn--active {\n background: var(--dt-color-surface-moderate-opaque);\n }\n\n &--large {\n margin-left: var(--dt-space-550-negative);\n }\n\n &__icon {\n color: var(--dt-color-black-800);\n }\n}\n\n.dt-recipe--callbar-button-with-popover--popover {\n .d-popover__header {\n background: var(--dt-color-surface-contrast);\n color: var(--dt-color-foreground-primary-inverted);\n\n .d-btn {\n color: var(--dt-color-foreground-primary-inverted);\n }\n }\n}\n\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected::after,\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected:hover::after {\n --tab--bgc: var(--dt-color-surface-contrast);\n}\n.dt-recipe--callbar-button-with-popover--button .tab-group {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.dt-recipe--callbar-button-with-popover--button .tab-content {\n flex: 1 1 100%;\n overflow-y: auto;\n}\n\n.dt-recipe--callbar-button-with-popover {\n display: flex;\n align-items: center;\n}\n</style>\n"],"names":["DtRecipeCallbarButton","DtPopover","DtButton","DtIcon","utils","this","CALLBAR_BUTTON_VALID_WIDTH_SIZE"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsFA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,uBAAAA,kBAAA,uBAAA,WAAAC,uBAAAC,UAAAA,WAAAA,UAAAC,QAAAA,S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A,EAAA;AAAA,MACA,OAAA;AACA,aAAA,MAAA,SAAA,EAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,gBAAA,UAAA;AACA,WAAA,OAAA;AACA,WAAA,MAAA,UAAA,QAAA;AAAA,IACA;AAAA,EACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { DtRecipeCallbarButton
|
|
4
|
-
import { DtPopover
|
|
5
|
-
import { DtButton
|
|
6
|
-
import { DtIcon
|
|
7
|
-
import "
|
|
1
|
+
import utils from "../common/utils.js";
|
|
2
|
+
import { normalizeComponent } from "../chunks/_plugin-vue2_normalizer-sOSkiPF3.js";
|
|
3
|
+
import { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from "./callbar-button.js";
|
|
4
|
+
import { DtPopover } from "./popover.js";
|
|
5
|
+
import { DtButton } from "./button.js";
|
|
6
|
+
import { DtIcon } from "./icon.js";
|
|
7
|
+
import "../common/constants.js";
|
|
8
8
|
import "vue";
|
|
9
9
|
import "./tooltip.js";
|
|
10
|
-
import "../chunks/popover_constants-
|
|
10
|
+
import "../chunks/popover_constants-Qkpb0yh2.js";
|
|
11
11
|
import "tippy.js";
|
|
12
12
|
import "./lazy-show.js";
|
|
13
13
|
import "@linusborg/vue-simple-portal";
|
|
14
|
-
import "../chunks/modal-
|
|
15
|
-
import "../chunks/sr_only_close_button-
|
|
16
|
-
import "../chunks/link_constants-
|
|
14
|
+
import "../chunks/modal-XOr4kiNZ.js";
|
|
15
|
+
import "../chunks/sr_only_close_button-81bHIpPu.js";
|
|
16
|
+
import "../chunks/link_constants-nWVlXQBs.js";
|
|
17
17
|
import "@dialpad/dialtone-icons/vue2";
|
|
18
|
-
import "../chunks/icon_constants-
|
|
18
|
+
import "../chunks/icon_constants-Dy4MEUJL.js";
|
|
19
19
|
import "@dialpad/dialtone-icons/icons.json";
|
|
20
|
-
const
|
|
20
|
+
const _sfc_main = {
|
|
21
21
|
name: "DtRecipeCallbarButtonWithPopover",
|
|
22
|
-
components: { DtRecipeCallbarButton
|
|
22
|
+
components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIcon },
|
|
23
23
|
/* inheritAttrs: false is generally an option we want to set on library
|
|
24
24
|
components. This allows any attributes passed in that are not recognized
|
|
25
25
|
as props to be passed down to another element or component using v-bind:$attrs
|
|
26
26
|
more info: https://vuejs.org/v2/api/#inheritAttrs */
|
|
27
|
-
inheritAttrs:
|
|
27
|
+
inheritAttrs: false,
|
|
28
28
|
props: {
|
|
29
29
|
/**
|
|
30
30
|
* Id for the item.
|
|
@@ -32,7 +32,7 @@ const c = {
|
|
|
32
32
|
id: {
|
|
33
33
|
type: String,
|
|
34
34
|
default() {
|
|
35
|
-
return
|
|
35
|
+
return utils.getUniqueString();
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
/**
|
|
@@ -41,15 +41,19 @@ const c = {
|
|
|
41
41
|
ariaLabel: {
|
|
42
42
|
type: String,
|
|
43
43
|
default: null,
|
|
44
|
-
validator: (
|
|
44
|
+
validator: (label) => {
|
|
45
|
+
return label || (void 0).$slots.default;
|
|
46
|
+
}
|
|
45
47
|
},
|
|
46
48
|
/**
|
|
47
49
|
* Aria label for the arrow. Cannot be empty.
|
|
48
50
|
*/
|
|
49
51
|
arrowButtonLabel: {
|
|
50
52
|
type: String,
|
|
51
|
-
required:
|
|
52
|
-
validator: (
|
|
53
|
+
required: true,
|
|
54
|
+
validator: (label) => {
|
|
55
|
+
return !!label;
|
|
56
|
+
}
|
|
53
57
|
},
|
|
54
58
|
/**
|
|
55
59
|
* The direction the popover displays relative to the anchor.
|
|
@@ -79,7 +83,7 @@ const c = {
|
|
|
79
83
|
*/
|
|
80
84
|
showCloseButton: {
|
|
81
85
|
type: Boolean,
|
|
82
|
-
default:
|
|
86
|
+
default: true
|
|
83
87
|
},
|
|
84
88
|
/**
|
|
85
89
|
* Determines whether the button should be disabled
|
|
@@ -88,7 +92,7 @@ const c = {
|
|
|
88
92
|
*/
|
|
89
93
|
disabled: {
|
|
90
94
|
type: Boolean,
|
|
91
|
-
default:
|
|
95
|
+
default: false
|
|
92
96
|
},
|
|
93
97
|
/**
|
|
94
98
|
* Forces showing the arrow, even if the button is disabled.
|
|
@@ -97,7 +101,7 @@ const c = {
|
|
|
97
101
|
*/
|
|
98
102
|
forceShowArrow: {
|
|
99
103
|
type: Boolean,
|
|
100
|
-
default:
|
|
104
|
+
default: false
|
|
101
105
|
},
|
|
102
106
|
/**
|
|
103
107
|
* Determines whether the button should have active styling
|
|
@@ -107,7 +111,7 @@ const c = {
|
|
|
107
111
|
*/
|
|
108
112
|
active: {
|
|
109
113
|
type: Boolean,
|
|
110
|
-
default:
|
|
114
|
+
default: false
|
|
111
115
|
},
|
|
112
116
|
/**
|
|
113
117
|
* Determines whether the button should have danger styling
|
|
@@ -117,7 +121,7 @@ const c = {
|
|
|
117
121
|
*/
|
|
118
122
|
danger: {
|
|
119
123
|
type: Boolean,
|
|
120
|
-
default:
|
|
124
|
+
default: false
|
|
121
125
|
},
|
|
122
126
|
/**
|
|
123
127
|
* Additional class name for the button wrapper element.
|
|
@@ -139,7 +143,7 @@ const c = {
|
|
|
139
143
|
buttonWidthSize: {
|
|
140
144
|
type: String,
|
|
141
145
|
default: "xl",
|
|
142
|
-
validator: (
|
|
146
|
+
validator: (size) => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size)
|
|
143
147
|
},
|
|
144
148
|
/**
|
|
145
149
|
* Additional class name for the popover content wrapper element.
|
|
@@ -153,7 +157,7 @@ const c = {
|
|
|
153
157
|
*/
|
|
154
158
|
openPopover: {
|
|
155
159
|
type: Boolean,
|
|
156
|
-
default:
|
|
160
|
+
default: false
|
|
157
161
|
}
|
|
158
162
|
},
|
|
159
163
|
emits: [
|
|
@@ -175,7 +179,7 @@ const c = {
|
|
|
175
179
|
],
|
|
176
180
|
data() {
|
|
177
181
|
return {
|
|
178
|
-
open:
|
|
182
|
+
open: false
|
|
179
183
|
};
|
|
180
184
|
},
|
|
181
185
|
computed: {
|
|
@@ -186,12 +190,17 @@ const c = {
|
|
|
186
190
|
return this.buttonWidthSize === "sm" || this.buttonWidthSize === "md";
|
|
187
191
|
},
|
|
188
192
|
showPopover() {
|
|
189
|
-
|
|
193
|
+
if (!this.openPopover || this.open) {
|
|
194
|
+
this.syncOpenState();
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
return this.toggleOpen();
|
|
190
198
|
}
|
|
191
199
|
},
|
|
192
200
|
methods: {
|
|
193
|
-
arrowClick(
|
|
194
|
-
|
|
201
|
+
arrowClick(ev) {
|
|
202
|
+
this.$emit("arrow-click", ev);
|
|
203
|
+
return this.toggleOpen();
|
|
195
204
|
},
|
|
196
205
|
toggleOpen() {
|
|
197
206
|
return this.open = !this.open;
|
|
@@ -199,36 +208,43 @@ const c = {
|
|
|
199
208
|
syncOpenState() {
|
|
200
209
|
this.open = this.openPopover;
|
|
201
210
|
},
|
|
202
|
-
buttonClick(
|
|
203
|
-
this.$listeners.click
|
|
211
|
+
buttonClick(ev) {
|
|
212
|
+
if (!this.$listeners.click) {
|
|
213
|
+
this.arrowClick(ev);
|
|
214
|
+
} else {
|
|
215
|
+
this.$emit("click", ev);
|
|
216
|
+
}
|
|
204
217
|
},
|
|
205
|
-
onModalIsOpened(
|
|
206
|
-
this.open =
|
|
218
|
+
onModalIsOpened(isOpened) {
|
|
219
|
+
this.open = isOpened;
|
|
220
|
+
this.$emit("opened", isOpened);
|
|
207
221
|
}
|
|
208
222
|
}
|
|
209
223
|
};
|
|
210
|
-
var
|
|
211
|
-
var
|
|
212
|
-
return
|
|
213
|
-
return [
|
|
224
|
+
var _sfc_render = function render() {
|
|
225
|
+
var _vm = this, _c = _vm._self._c;
|
|
226
|
+
return _c("div", { staticClass: "dt-recipe--callbar-button-with-popover" }, [_c("dt-recipe-callbar-button", { staticClass: "dt-recipe--callbar-button-with-popover--main-button", attrs: { "aria-label": _vm.ariaLabel, "disabled": _vm.disabled, "active": _vm.active, "danger": _vm.danger, "button-class": _vm.buttonClass, "button-width-size": _vm.buttonWidthSize, "text-class": _vm.textClass }, on: { "click": _vm.buttonClick } }, [_vm._t("icon", null, { "slot": "icon" }), _vm._t("tooltip", null, { "slot": "tooltip" }), _vm._t("default")], 2), _vm.showArrowButton ? _c("dt-popover", _vm._b({ staticClass: "dt-recipe--callbar-button-with-popover--popover-wrapper", attrs: { "id": _vm.id, "modal": false, "open": _vm.open, "placement": _vm.placement, "initial-focus-element": _vm.initialFocusElement, "show-close-button": _vm.showCloseButton, "offset": [0, 16], "padding": "none", "dialog-class": ["dt-recipe--callbar-button-with-popover--popover", _vm.contentClass], "header-class": "d-d-flex d-ai-center d-fw-normal d-px12", "open-popover": _vm.showPopover }, on: { "opened": _vm.onModalIsOpened }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
|
|
227
|
+
return [_c("dt-button", { class: [
|
|
214
228
|
"dt-recipe--callbar-button-with-popover--arrow",
|
|
215
|
-
{ "dt-recipe--callbar-button-with-popover--arrow--large": !
|
|
216
|
-
], attrs: { circle: "", importance: "clear", size: "lg", width: "2rem", "aria-label":
|
|
217
|
-
return [
|
|
218
|
-
}, proxy:
|
|
219
|
-
}, proxy:
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
229
|
+
{ "dt-recipe--callbar-button-with-popover--arrow--large": !_vm.isCompactMode }
|
|
230
|
+
], attrs: { "circle": "", "importance": "clear", "size": "lg", "width": "2rem", "aria-label": _vm.arrowButtonLabel, "active": _vm.open }, on: { "click": _vm.arrowClick }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
231
|
+
return [_c("dt-icon", { staticClass: "dt-recipe--callbar-button-with-popover--arrow__icon", attrs: { "name": "chevron-up", "size": "200" } })];
|
|
232
|
+
}, proxy: true }], null, false, 982444464) })];
|
|
233
|
+
}, proxy: true }], null, false, 3818376870) }, "dt-popover", _vm.$attrs, false), [_vm._t("content", null, { "slot": "content" }), _vm._t("headerContent", null, { "slot": "headerContent" }), _vm._t("footerContent", null, { "slot": "footerContent" })], 2) : _vm._e()], 1);
|
|
234
|
+
};
|
|
235
|
+
var _sfc_staticRenderFns = [];
|
|
236
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
237
|
+
_sfc_main,
|
|
238
|
+
_sfc_render,
|
|
239
|
+
_sfc_staticRenderFns,
|
|
240
|
+
false,
|
|
225
241
|
null,
|
|
226
242
|
null,
|
|
227
243
|
null,
|
|
228
244
|
null
|
|
229
245
|
);
|
|
230
|
-
const
|
|
246
|
+
const callbar_button_with_popover = __component__.exports;
|
|
231
247
|
export {
|
|
232
|
-
|
|
248
|
+
callbar_button_with_popover as DtRecipeCallbarButtonWithPopover
|
|
233
249
|
};
|
|
234
250
|
//# sourceMappingURL=callbar-button-with-popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callbar-button-with-popover.js","sources":["../../recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-popover\"\n >\n <dt-recipe-callbar-button\n :aria-label=\"ariaLabel\"\n :disabled=\"disabled\"\n :active=\"active\"\n :danger=\"danger\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :text-class=\"textClass\"\n class=\"dt-recipe--callbar-button-with-popover--main-button\"\n @click=\"buttonClick\"\n >\n <slot\n slot=\"icon\"\n name=\"icon\"\n />\n <slot\n slot=\"tooltip\"\n name=\"tooltip\"\n />\n <slot />\n </dt-recipe-callbar-button>\n <dt-popover\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :open=\"open\"\n :placement=\"placement\"\n :initial-focus-element=\"initialFocusElement\"\n :show-close-button=\"showCloseButton\"\n :offset=\"[0, 16]\"\n padding=\"none\"\n class=\"dt-recipe--callbar-button-with-popover--popover-wrapper\"\n :dialog-class=\"['dt-recipe--callbar-button-with-popover--popover', contentClass]\"\n header-class=\"d-d-flex d-ai-center d-fw-normal d-px12\"\n v-bind=\"$attrs\"\n :open-popover=\"showPopover\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n circle\n importance=\"clear\"\n size=\"lg\"\n :class=\"['dt-recipe--callbar-button-with-popover--arrow',\n { 'dt-recipe--callbar-button-with-popover--arrow--large': !isCompactMode }]\"\n width=\"2rem\"\n :aria-label=\"arrowButtonLabel\"\n :active=\"open\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon\n name=\"chevron-up\"\n class=\"dt-recipe--callbar-button-with-popover--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <slot\n slot=\"content\"\n name=\"content\"\n />\n <slot\n slot=\"headerContent\"\n name=\"headerContent\"\n />\n <slot\n slot=\"footerContent\"\n name=\"footerContent\"\n />\n </dt-popover>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtPopover } from '@/components/popover';\nimport { DtIcon } from '@/components/icon';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithPopover',\n\n components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIcon },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Aria label for the arrow. Cannot be empty.\n */\n arrowButtonLabel: {\n type: String,\n required: true,\n validator: (label) => {\n return !!label;\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * @values 'bottom', 'bottom-start', 'bottom-end',\n * 'right', 'right-start', 'right-end',\n * 'left', 'left-start', 'left-end',\n * 'top', 'top-start', 'top-end'\n * @default 'top'\n */\n placement: {\n type: String,\n default: 'top',\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: String,\n default: 'first',\n },\n\n /**\n * Determines visibility for close button\n */\n showCloseButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Forces showing the arrow, even if the button is disabled.\n * default is false\n * @values true, false\n */\n forceShowArrow: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Additional class name for the popover content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * To auto open the modal popover.\n */\n openPopover: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal popover is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showPopover () {\n if (!this.openPopover || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openPopover;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the popover\n // the same as if the arrow was clicked.\n if (!this.$listeners.click) {\n this.arrowClick(ev);\n } else {\n this.$emit('click', ev);\n }\n },\n\n onModalIsOpened (isOpened) {\n this.open = isOpened;\n this.$emit('opened', isOpened);\n },\n },\n\n};\n</script>\n\n<style lang=\"less\">\n.dt-recipe--callbar-button-with-popover--arrow {\n margin-top: var(--dt-space-350-negative);\n margin-left: calc(var(--dt-space-300-negative) * 5);\n width: var(--dt-size-500);\n height: var(--dt-size-500);\n padding: var(--dt-space-400);\n border-radius: var(--dt-size-300);\n\n &.d-btn--active {\n background: var(--dt-color-surface-moderate-opaque);\n }\n\n &--large {\n margin-left: var(--dt-space-550-negative);\n }\n\n &__icon {\n color: var(--dt-color-black-800);\n }\n}\n\n.dt-recipe--callbar-button-with-popover--popover {\n .d-popover__header {\n background: var(--dt-color-surface-contrast);\n color: var(--dt-color-foreground-primary-inverted);\n\n .d-btn {\n color: var(--dt-color-foreground-primary-inverted);\n }\n }\n}\n\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected::after,\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected:hover::after {\n --tab--bgc: var(--dt-color-surface-contrast);\n}\n.dt-recipe--callbar-button-with-popover--button .tab-group {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.dt-recipe--callbar-button-with-popover--button .tab-content {\n flex: 1 1 100%;\n overflow-y: auto;\n}\n\n.dt-recipe--callbar-button-with-popover {\n display: flex;\n align-items: center;\n}\n</style>\n"],"names":["_sfc_main","DtRecipeCallbarButton","DtPopover","DtButton","DtIcon","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","ev","isOpened"],"mappings":";;;;;;;;;;;;;;;;;;;AAsFA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,uBAAAC,GAAA,WAAAC,GAAA,UAAAC,GAAA,QAAAC,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AACA,eAAAC,EAAA;MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MACAA,KAAAC,SAAA,OAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA,IAKA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA,CAAAD,MACA,CAAA,CAAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,UAAA;AAAA,MACA,M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A,cAAA;AACA,aAAA,CAAA,KAAA,eAAA,KAAA,QACA,KAAA,cAAA,GACA,MAGA,KAAA;IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,WAAAE,GAAA;AACA,kBAAA,MAAA,eAAAA,CAAA,GACA,KAAA;IACA;AAAA,IAEA,aAAA;AACA,aAAA,KAAA,OAAA,CAAA,KAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,WAAA,OAAA,KAAA;AAAA,IACA;AAAA,IAEA,YAAAA,GAAA;AAGA,MAAA,KAAA,WAAA,QAGA,KAAA,MAAA,SAAAA,CAAA,IAFA,KAAA,WAAAA,CAAA;AAAA,IAIA;AAAA,IAEA,gBAAAC,GAAA;AACA,WAAA,OAAAA,GACA,KAAA,MAAA,UAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAEA;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"callbar-button-with-popover.js","sources":["../../recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-popover\"\n >\n <dt-recipe-callbar-button\n :aria-label=\"ariaLabel\"\n :disabled=\"disabled\"\n :active=\"active\"\n :danger=\"danger\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :text-class=\"textClass\"\n class=\"dt-recipe--callbar-button-with-popover--main-button\"\n @click=\"buttonClick\"\n >\n <slot\n slot=\"icon\"\n name=\"icon\"\n />\n <slot\n slot=\"tooltip\"\n name=\"tooltip\"\n />\n <slot />\n </dt-recipe-callbar-button>\n <dt-popover\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :open=\"open\"\n :placement=\"placement\"\n :initial-focus-element=\"initialFocusElement\"\n :show-close-button=\"showCloseButton\"\n :offset=\"[0, 16]\"\n padding=\"none\"\n class=\"dt-recipe--callbar-button-with-popover--popover-wrapper\"\n :dialog-class=\"['dt-recipe--callbar-button-with-popover--popover', contentClass]\"\n header-class=\"d-d-flex d-ai-center d-fw-normal d-px12\"\n v-bind=\"$attrs\"\n :open-popover=\"showPopover\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n circle\n importance=\"clear\"\n size=\"lg\"\n :class=\"['dt-recipe--callbar-button-with-popover--arrow',\n { 'dt-recipe--callbar-button-with-popover--arrow--large': !isCompactMode }]\"\n width=\"2rem\"\n :aria-label=\"arrowButtonLabel\"\n :active=\"open\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon\n name=\"chevron-up\"\n class=\"dt-recipe--callbar-button-with-popover--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <slot\n slot=\"content\"\n name=\"content\"\n />\n <slot\n slot=\"headerContent\"\n name=\"headerContent\"\n />\n <slot\n slot=\"footerContent\"\n name=\"footerContent\"\n />\n </dt-popover>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtPopover } from '@/components/popover';\nimport { DtIcon } from '@/components/icon';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithPopover',\n\n components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIcon },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Aria label for the arrow. Cannot be empty.\n */\n arrowButtonLabel: {\n type: String,\n required: true,\n validator: (label) => {\n return !!label;\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * @values 'bottom', 'bottom-start', 'bottom-end',\n * 'right', 'right-start', 'right-end',\n * 'left', 'left-start', 'left-end',\n * 'top', 'top-start', 'top-end'\n * @default 'top'\n */\n placement: {\n type: String,\n default: 'top',\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: String,\n default: 'first',\n },\n\n /**\n * Determines visibility for close button\n */\n showCloseButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Forces showing the arrow, even if the button is disabled.\n * default is false\n * @values true, false\n */\n forceShowArrow: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Additional class name for the popover content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * To auto open the modal popover.\n */\n openPopover: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal popover is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showPopover () {\n if (!this.openPopover || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openPopover;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the popover\n // the same as if the arrow was clicked.\n if (!this.$listeners.click) {\n this.arrowClick(ev);\n } else {\n this.$emit('click', ev);\n }\n },\n\n onModalIsOpened (isOpened) {\n this.open = isOpened;\n this.$emit('opened', isOpened);\n },\n },\n\n};\n</script>\n\n<style lang=\"less\">\n.dt-recipe--callbar-button-with-popover--arrow {\n margin-top: var(--dt-space-350-negative);\n margin-left: calc(var(--dt-space-300-negative) * 5);\n width: var(--dt-size-500);\n height: var(--dt-size-500);\n padding: var(--dt-space-400);\n border-radius: var(--dt-size-300);\n\n &.d-btn--active {\n background: var(--dt-color-surface-moderate-opaque);\n }\n\n &--large {\n margin-left: var(--dt-space-550-negative);\n }\n\n &__icon {\n color: var(--dt-color-black-800);\n }\n}\n\n.dt-recipe--callbar-button-with-popover--popover {\n .d-popover__header {\n background: var(--dt-color-surface-contrast);\n color: var(--dt-color-foreground-primary-inverted);\n\n .d-btn {\n color: var(--dt-color-foreground-primary-inverted);\n }\n }\n}\n\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected::after,\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected:hover::after {\n --tab--bgc: var(--dt-color-surface-contrast);\n}\n.dt-recipe--callbar-button-with-popover--button .tab-group {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.dt-recipe--callbar-button-with-popover--button .tab-content {\n flex: 1 1 100%;\n overflow-y: auto;\n}\n\n.dt-recipe--callbar-button-with-popover {\n display: flex;\n align-items: center;\n}\n</style>\n"],"names":["this"],"mappings":";;;;;;;;;;;;;;;;;;;AAsFA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,uBAAA,WAAA,UAAA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AACA,eAAA,MAAA;MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,UAAA;AACA,eAAA,SAAAA,SAAA,OAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA,CAAA,UAAA;AACA,eAAA,CAAA,CAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAA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