@dialpad/dialtone-vue 2.127.0 → 2.127.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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-DUr1xHR0.js +442 -0
- package/dist/chunks/{index-2jPosQBn.js.map → index-DUr1xHR0.js.map} +1 -1
- package/dist/chunks/index-IA-Z8fgm.js +441 -0
- package/dist/chunks/{index-nIyl_PL6.js.map → index-IA-Z8fgm.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
package/dist/lib/notice.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { DtNoticeIcon, DtNoticeContent, DtNoticeAction } from "../chunks/notice_action-IRUoLX2d.js";
|
|
2
|
+
import { NOTICE_ROLES, NOTICE_KINDS } from "../chunks/notice_constants-7Qt2CQEY.js";
|
|
3
|
+
import { SrOnlyCloseButtonMixin } from "../chunks/sr_only_close_button-81bHIpPu.js";
|
|
4
|
+
import { normalizeComponent } from "../chunks/_plugin-vue2_normalizer-sOSkiPF3.js";
|
|
5
5
|
import "./icon.js";
|
|
6
6
|
import "@dialpad/dialtone-icons/vue2";
|
|
7
|
-
import "../chunks/icon_constants-
|
|
7
|
+
import "../chunks/icon_constants-Dy4MEUJL.js";
|
|
8
8
|
import "@dialpad/dialtone-icons/icons.json";
|
|
9
9
|
import "./button.js";
|
|
10
10
|
import "vue";
|
|
11
|
-
import "../chunks/link_constants-
|
|
12
|
-
const
|
|
11
|
+
import "../chunks/link_constants-nWVlXQBs.js";
|
|
12
|
+
const _sfc_main = {
|
|
13
13
|
name: "DtNotice",
|
|
14
14
|
components: {
|
|
15
|
-
DtNoticeIcon
|
|
16
|
-
DtNoticeContent
|
|
17
|
-
DtNoticeAction
|
|
15
|
+
DtNoticeIcon,
|
|
16
|
+
DtNoticeContent,
|
|
17
|
+
DtNoticeAction
|
|
18
18
|
},
|
|
19
|
-
mixins: [
|
|
19
|
+
mixins: [SrOnlyCloseButtonMixin],
|
|
20
20
|
props: {
|
|
21
21
|
/**
|
|
22
22
|
* Sets an ID on the title element of the component. Useful for aria-describedby
|
|
@@ -50,8 +50,8 @@ const d = {
|
|
|
50
50
|
role: {
|
|
51
51
|
type: String,
|
|
52
52
|
default: "status",
|
|
53
|
-
validate(
|
|
54
|
-
return
|
|
53
|
+
validate(role) {
|
|
54
|
+
return NOTICE_ROLES.includes(role);
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
/**
|
|
@@ -61,7 +61,7 @@ const d = {
|
|
|
61
61
|
*/
|
|
62
62
|
important: {
|
|
63
63
|
type: Boolean,
|
|
64
|
-
default:
|
|
64
|
+
default: false
|
|
65
65
|
},
|
|
66
66
|
/**
|
|
67
67
|
* Severity level of the notice, sets the icon and background
|
|
@@ -70,8 +70,8 @@ const d = {
|
|
|
70
70
|
kind: {
|
|
71
71
|
type: String,
|
|
72
72
|
default: "base",
|
|
73
|
-
validate(
|
|
74
|
-
return
|
|
73
|
+
validate(kind) {
|
|
74
|
+
return NOTICE_KINDS.includes(kind);
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
/**
|
|
@@ -87,7 +87,7 @@ const d = {
|
|
|
87
87
|
*/
|
|
88
88
|
hideClose: {
|
|
89
89
|
type: Boolean,
|
|
90
|
-
default:
|
|
90
|
+
default: false
|
|
91
91
|
},
|
|
92
92
|
/**
|
|
93
93
|
* Hides the icon from the notice
|
|
@@ -95,7 +95,7 @@ const d = {
|
|
|
95
95
|
*/
|
|
96
96
|
hideIcon: {
|
|
97
97
|
type: Boolean,
|
|
98
|
-
default:
|
|
98
|
+
default: false
|
|
99
99
|
},
|
|
100
100
|
/**
|
|
101
101
|
* Hides the action from the notice
|
|
@@ -103,7 +103,7 @@ const d = {
|
|
|
103
103
|
*/
|
|
104
104
|
hideAction: {
|
|
105
105
|
type: Boolean,
|
|
106
|
-
default:
|
|
106
|
+
default: false
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
emits: [
|
|
@@ -116,42 +116,45 @@ const d = {
|
|
|
116
116
|
],
|
|
117
117
|
computed: {
|
|
118
118
|
noticeClass() {
|
|
119
|
+
const noticeKinds = {
|
|
120
|
+
error: "d-notice--error",
|
|
121
|
+
info: "d-notice--info",
|
|
122
|
+
success: "d-notice--success",
|
|
123
|
+
warning: "d-notice--warning",
|
|
124
|
+
base: "d-notice--base"
|
|
125
|
+
};
|
|
119
126
|
return [
|
|
120
127
|
"d-notice",
|
|
121
|
-
|
|
122
|
-
error: "d-notice--error",
|
|
123
|
-
info: "d-notice--info",
|
|
124
|
-
success: "d-notice--success",
|
|
125
|
-
warning: "d-notice--warning",
|
|
126
|
-
base: "d-notice--base"
|
|
127
|
-
}[this.kind],
|
|
128
|
+
noticeKinds[this.kind],
|
|
128
129
|
{ "d-notice--important": this.important }
|
|
129
130
|
];
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
133
|
};
|
|
133
|
-
var
|
|
134
|
-
var
|
|
135
|
-
return
|
|
136
|
-
return [
|
|
137
|
-
}, proxy:
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
134
|
+
var _sfc_render = function render() {
|
|
135
|
+
var _vm = this, _c = _vm._self._c;
|
|
136
|
+
return _c("aside", { class: _vm.noticeClass, attrs: { "data-qa": "notice" } }, [!_vm.hideIcon ? _c("dt-notice-icon", { attrs: { "kind": _vm.kind } }, [_vm._t("icon")], 2) : _vm._e(), _c("dt-notice-content", _vm._g({ attrs: { "title-id": _vm.titleId, "content-id": _vm.contentId, "title": _vm.title, "role": _vm.role }, scopedSlots: _vm._u([{ key: "titleOverride", fn: function() {
|
|
137
|
+
return [_vm._t("titleOverride")];
|
|
138
|
+
}, proxy: true }], null, true) }, _vm.$listeners), [_vm._t("default")], 2), _c("dt-notice-action", _vm._g({ attrs: { "hide-action": _vm.hideAction, "hide-close": _vm.hideClose, "close-button-props": _vm.closeButtonProps, "visually-hidden-close": _vm.visuallyHiddenClose, "visually-hidden-close-label": _vm.visuallyHiddenCloseLabel } }, _vm.$listeners), [_vm._t("action")], 2)], 1);
|
|
139
|
+
};
|
|
140
|
+
var _sfc_staticRenderFns = [];
|
|
141
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
142
|
+
_sfc_main,
|
|
143
|
+
_sfc_render,
|
|
144
|
+
_sfc_staticRenderFns,
|
|
145
|
+
false,
|
|
143
146
|
null,
|
|
144
147
|
null,
|
|
145
148
|
null,
|
|
146
149
|
null
|
|
147
150
|
);
|
|
148
|
-
const
|
|
151
|
+
const notice = __component__.exports;
|
|
149
152
|
export {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
notice as DtNotice,
|
|
154
|
+
DtNoticeAction,
|
|
155
|
+
DtNoticeContent,
|
|
156
|
+
DtNoticeIcon,
|
|
157
|
+
NOTICE_KINDS,
|
|
158
|
+
NOTICE_ROLES
|
|
156
159
|
};
|
|
157
160
|
//# sourceMappingURL=notice.js.map
|
package/dist/lib/notice.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notice.js","sources":["../../components/notice/notice.vue"],"sourcesContent":["<template>\n <aside\n :class=\"noticeClass\"\n data-qa=\"notice\"\n >\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 v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need\n to override with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the notice -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n :close-button-props=\"closeButtonProps\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n v-on=\"$listeners\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </aside>\n</template>\n\n<script>\nimport DtNoticeIcon from './notice_icon.vue';\nimport DtNoticeContent from './notice_content.vue';\nimport DtNoticeAction from './notice_action.vue';\nimport { NOTICE_KINDS, NOTICE_ROLES } from './notice_constants';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\n/**\n * A notice is an informational and assistive message that appears inline with content.\n * @see https://dialtone.dialpad.com/components/notice.html\n */\nexport default {\n name: 'DtNotice',\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: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the notice. This can be left blank to remove the title from the notice entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the notice. 'status' is used to communicate a message. 'alert' is used to communicate an\n * important message that does not contain any interactive elements. 'alertdialog' is used to communicate an\n * important message that does contain interactive elements.\n * @values alert, alertdialog, status\n */\n role: {\n type: String,\n default: 'status',\n validate (role) {\n return NOTICE_ROLES.includes(role);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * This will also change the aria role from status to alert.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Severity level of the notice, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Props for the notice close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the notice\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 emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n ],\n\n computed: {\n noticeClass () {\n const noticeKinds = {\n error: 'd-notice--error',\n info: 'd-notice--info',\n success: 'd-notice--success',\n warning: 'd-notice--warning',\n base: 'd-notice--base',\n };\n return [\n 'd-notice',\n noticeKinds[this.kind],\n { 'd-notice--important': this.important },\n ];\n },\n },\n};\n</script>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"notice.js","sources":["../../components/notice/notice.vue"],"sourcesContent":["<template>\n <aside\n :class=\"noticeClass\"\n data-qa=\"notice\"\n >\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 v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need\n to override with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the notice -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n :close-button-props=\"closeButtonProps\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n v-on=\"$listeners\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </aside>\n</template>\n\n<script>\nimport DtNoticeIcon from './notice_icon.vue';\nimport DtNoticeContent from './notice_content.vue';\nimport DtNoticeAction from './notice_action.vue';\nimport { NOTICE_KINDS, NOTICE_ROLES } from './notice_constants';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\n/**\n * A notice is an informational and assistive message that appears inline with content.\n * @see https://dialtone.dialpad.com/components/notice.html\n */\nexport default {\n name: 'DtNotice',\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: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the notice. This can be left blank to remove the title from the notice entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the notice. 'status' is used to communicate a message. 'alert' is used to communicate an\n * important message that does not contain any interactive elements. 'alertdialog' is used to communicate an\n * important message that does contain interactive elements.\n * @values alert, alertdialog, status\n */\n role: {\n type: String,\n default: 'status',\n validate (role) {\n return NOTICE_ROLES.includes(role);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * This will also change the aria role from status to alert.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Severity level of the notice, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Props for the notice close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the notice\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 emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n ],\n\n computed: {\n noticeClass () {\n const noticeKinds = {\n error: 'd-notice--error',\n info: 'd-notice--info',\n success: 'd-notice--success',\n warning: 'd-notice--warning',\n base: 'd-notice--base',\n };\n return [\n 'd-notice',\n noticeKinds[this.kind],\n { 'd-notice--important': this.important },\n ];\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;AAoDA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,QAAA,CAAA,sBAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,SAAA,MAAA;AACA,eAAA,aAAA,SAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,SAAA,MAAA;AACA,eAAA,aAAA,SAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,OAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,cAAA;AACA,YAAA,cAAA;AAAA,QACA,OAAA;AAAA,QACA,MAAA;AAAA,QACA,SAAA;AAAA,QACA,SAAA;AAAA,QACA,MAAA;AAAA,MACA;AACA,aAAA;AAAA,QACA;AAAA,QACA,YAAA,KAAA,IAAA;AAAA,QACA,EAAA,uBAAA,KAAA,UAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;"}
|
package/dist/lib/pagination.cjs
CHANGED
|
@@ -1,2 +1,153 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-1aBeR4AK.js");
|
|
4
|
+
const lib_button = require("./button.cjs");
|
|
5
|
+
const lib_icon = require("./icon.cjs");
|
|
6
|
+
require("vue");
|
|
7
|
+
require("../chunks/link_constants-Huj7D_hm.js");
|
|
8
|
+
require("@dialpad/dialtone-icons/vue2");
|
|
9
|
+
require("../chunks/icon_constants-QYpmdE0R.js");
|
|
10
|
+
require("@dialpad/dialtone-icons/icons.json");
|
|
11
|
+
const _sfc_main = {
|
|
12
|
+
name: "DtPagination",
|
|
13
|
+
components: {
|
|
14
|
+
DtButton: lib_button.DtButton,
|
|
15
|
+
DtIcon: lib_icon.DtIcon
|
|
16
|
+
},
|
|
17
|
+
props: {
|
|
18
|
+
/**
|
|
19
|
+
* Descriptive label for the pagination content.
|
|
20
|
+
*/
|
|
21
|
+
ariaLabel: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: true
|
|
24
|
+
},
|
|
25
|
+
/**
|
|
26
|
+
* The total number of the pages
|
|
27
|
+
*/
|
|
28
|
+
totalPages: {
|
|
29
|
+
type: Number,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
/**
|
|
33
|
+
* Descriptive label for the previous button.
|
|
34
|
+
*/
|
|
35
|
+
prevAriaLabel: {
|
|
36
|
+
type: String,
|
|
37
|
+
required: true
|
|
38
|
+
},
|
|
39
|
+
/**
|
|
40
|
+
* Descriptive label for the next button.
|
|
41
|
+
*/
|
|
42
|
+
nextAriaLabel: {
|
|
43
|
+
type: String,
|
|
44
|
+
required: true
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* A method that will be called to get the aria label of each page.
|
|
48
|
+
*/
|
|
49
|
+
pageNumberAriaLabel: {
|
|
50
|
+
type: Function,
|
|
51
|
+
required: true
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* The active current page in the list of pages, defaults to the first page
|
|
55
|
+
*/
|
|
56
|
+
activePage: {
|
|
57
|
+
type: Number,
|
|
58
|
+
default: 1
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* Determines the max pages to be shown in the list. Using an odd number is recommended.
|
|
62
|
+
* If an even number is given, then it will be rounded down to the nearest odd number to always
|
|
63
|
+
* keep current page in the middle when current page is in the mid-range.
|
|
64
|
+
*/
|
|
65
|
+
maxVisible: {
|
|
66
|
+
type: Number,
|
|
67
|
+
default: 5
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
emits: [
|
|
71
|
+
/**
|
|
72
|
+
* Page change event
|
|
73
|
+
*
|
|
74
|
+
* @event change
|
|
75
|
+
* @type {Number}
|
|
76
|
+
*/
|
|
77
|
+
"change"
|
|
78
|
+
],
|
|
79
|
+
data() {
|
|
80
|
+
return {
|
|
81
|
+
currentPage: this.activePage
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
computed: {
|
|
85
|
+
isFirstPage() {
|
|
86
|
+
return this.currentPage === 1;
|
|
87
|
+
},
|
|
88
|
+
isLastPage() {
|
|
89
|
+
return this.currentPage === this.totalPages;
|
|
90
|
+
},
|
|
91
|
+
pages() {
|
|
92
|
+
if (this.maxVisible === 0) {
|
|
93
|
+
return [];
|
|
94
|
+
}
|
|
95
|
+
if (this.totalPages <= this.maxVisible) {
|
|
96
|
+
return this.range(1, this.totalPages);
|
|
97
|
+
}
|
|
98
|
+
const start = this.maxVisible - 1;
|
|
99
|
+
const end = this.totalPages - start + 1;
|
|
100
|
+
if (this.currentPage < start) {
|
|
101
|
+
return [...this.range(1, start), "...", this.totalPages];
|
|
102
|
+
}
|
|
103
|
+
if (this.currentPage > end) {
|
|
104
|
+
return [1, "...", ...this.range(end, this.totalPages)];
|
|
105
|
+
}
|
|
106
|
+
const total = this.maxVisible - (3 - this.maxVisible % 2);
|
|
107
|
+
const centerIndex = Math.floor(total / 2);
|
|
108
|
+
const left = this.currentPage - centerIndex;
|
|
109
|
+
const right = this.currentPage + centerIndex;
|
|
110
|
+
return [1, "...", ...this.range(left, right), "...", this.totalPages];
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
methods: {
|
|
114
|
+
range(from, to) {
|
|
115
|
+
const range = [];
|
|
116
|
+
from = from > 0 ? from : 1;
|
|
117
|
+
for (let i = from; i <= to; i++) {
|
|
118
|
+
range.push(i);
|
|
119
|
+
}
|
|
120
|
+
return range;
|
|
121
|
+
},
|
|
122
|
+
changePage(page) {
|
|
123
|
+
this.currentPage = page;
|
|
124
|
+
this.$emit("change", this.currentPage);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
var _sfc_render = function render() {
|
|
129
|
+
var _vm = this, _c = _vm._self._c;
|
|
130
|
+
return _c("nav", { staticClass: "d-pagination", attrs: { "aria-label": _vm.ariaLabel } }, [_c("dt-button", { staticClass: "d-pagination__button", class: _vm.isFirstPage ? "d-fc-black-300 d-bgc-transparent" : "d-fc-tertiary", attrs: { "data-qa": "dt-pagination-prev", "aria-label": _vm.prevAriaLabel, "kind": _vm.isFirstPage ? "default" : "muted", "importance": _vm.isFirstPage ? "primary" : "clear", "disabled": _vm.isFirstPage }, on: { "click": function($event) {
|
|
131
|
+
return _vm.changePage(_vm.currentPage - 1);
|
|
132
|
+
} } }, [_c("template", { slot: "icon" }, [_c("dt-icon", { attrs: { "name": "chevron-left", "size": "300" } })], 1)], 2), _vm._l(_vm.pages, function(page, index) {
|
|
133
|
+
return _c("div", { key: `page-${page}-${index}`, class: { "d-pagination__separator": isNaN(Number(page)) } }, [isNaN(Number(page)) ? _c("div", { staticClass: "d-pagination__separator-icon", attrs: { "data-qa": "dt-pagination-separator" } }, [_c("dt-icon", { attrs: { "name": "more-horizontal", "size": "300" } })], 1) : _c("dt-button", { attrs: { "aria-label": _vm.pageNumberAriaLabel(page), "kind": _vm.currentPage === page ? "default" : "muted", "importance": _vm.currentPage === page ? "primary" : "clear", "label-class": "" }, on: { "click": function($event) {
|
|
134
|
+
return _vm.changePage(page);
|
|
135
|
+
} } }, [_vm._v(" " + _vm._s(page) + " ")])], 1);
|
|
136
|
+
}), _c("dt-button", { staticClass: "d-pagination__button", class: _vm.isLastPage ? "d-fc-black-300 d-bgc-transparent" : "d-fc-tertiary", attrs: { "data-qa": "dt-pagination-next", "aria-label": _vm.nextAriaLabel, "disabled": _vm.isLastPage, "kind": "muted", "importance": _vm.isLastPage ? "primary" : "clear" }, on: { "click": function($event) {
|
|
137
|
+
return _vm.changePage(_vm.currentPage + 1);
|
|
138
|
+
} } }, [_c("template", { slot: "icon" }, [_c("dt-icon", { attrs: { "name": "chevron-right", "size": "300" } })], 1)], 2)], 2);
|
|
139
|
+
};
|
|
140
|
+
var _sfc_staticRenderFns = [];
|
|
141
|
+
var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
142
|
+
_sfc_main,
|
|
143
|
+
_sfc_render,
|
|
144
|
+
_sfc_staticRenderFns,
|
|
145
|
+
false,
|
|
146
|
+
null,
|
|
147
|
+
null,
|
|
148
|
+
null,
|
|
149
|
+
null
|
|
150
|
+
);
|
|
151
|
+
const pagination = __component__.exports;
|
|
152
|
+
exports.DtPagination = pagination;
|
|
2
153
|
//# sourceMappingURL=pagination.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.cjs","sources":["../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n :kind=\"isFirstPage ? 'default' : 'muted'\"\n :importance=\"isFirstPage ? 'primary' : 'clear'\"\n :disabled=\"isFirstPage\"\n :class=\"isFirstPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"chevron-left\"\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon\n name=\"more-horizontal\"\n size=\"300\"\n />\n <!-- … -->\n </div>\n <!-- eslint-enable vue/no-bare-strings-in-template -->\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n :importance=\"isLastPage ? 'primary' : 'clear'\"\n :class=\"isLastPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"chevron-right\"\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * Descriptive label for the previous button.\n */\n prevAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the next button.\n */\n nextAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * A method that will be called to get the aria label of each page.\n */\n pageNumberAriaLabel: {\n type: Function,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n const start = this.maxVisible - 1;\n const end = this.totalPages - start + 1;\n\n if (this.currentPage < start) {\n return [...this.range(1, start), '...', this.totalPages];\n }\n\n if (this.currentPage > end) {\n return [1, '...', ...this.range(end, this.totalPages)];\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n const left = this.currentPage - centerIndex;\n const right = this.currentPage + centerIndex;\n return [1, '...', ...this.range(left, right), '...', this.totalPages];\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":["
|
|
1
|
+
{"version":3,"file":"pagination.cjs","sources":["../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n :kind=\"isFirstPage ? 'default' : 'muted'\"\n :importance=\"isFirstPage ? 'primary' : 'clear'\"\n :disabled=\"isFirstPage\"\n :class=\"isFirstPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"chevron-left\"\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon\n name=\"more-horizontal\"\n size=\"300\"\n />\n <!-- … -->\n </div>\n <!-- eslint-enable vue/no-bare-strings-in-template -->\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n :importance=\"isLastPage ? 'primary' : 'clear'\"\n :class=\"isLastPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"chevron-right\"\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * Descriptive label for the previous button.\n */\n prevAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the next button.\n */\n nextAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * A method that will be called to get the aria label of each page.\n */\n pageNumberAriaLabel: {\n type: Function,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n const start = this.maxVisible - 1;\n const end = this.totalPages - start + 1;\n\n if (this.currentPage < start) {\n return [...this.range(1, start), '...', this.totalPages];\n }\n\n if (this.currentPage > end) {\n return [1, '...', ...this.range(end, this.totalPages)];\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n const left = this.currentPage - centerIndex;\n const right = this.currentPage + centerIndex;\n return [1, '...', ...this.range(left, right), '...', this.totalPages];\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":["DtButton","DtIcon"],"mappings":";;;;;;;;;;AA+EA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA,WAAA;AAAA,IACA,QAAAC,SAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,aAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,cAAA;AACA,aAAA,KAAA,gBAAA;AAAA,IACA;AAAA,IAEA,aAAA;AACA,aAAA,KAAA,gBAAA,KAAA;AAAA,IACA;AAAA,IAEA,QAAA;AACA,UAAA,KAAA,eAAA,GAAA;AACA,eAAA;MACA;AACA,UAAA,KAAA,cAAA,KAAA,YAAA;AACA,eAAA,KAAA,MAAA,GAAA,KAAA,UAAA;AAAA,MACA;AAEA,YAAA,QAAA,KAAA,aAAA;AACA,YAAA,MAAA,KAAA,aAAA,QAAA;AAEA,UAAA,KAAA,cAAA,OAAA;AACA,eAAA,CAAA,GAAA,KAAA,MAAA,GAAA,KAAA,GAAA,OAAA,KAAA,UAAA;AAAA,MACA;AAEA,UAAA,KAAA,cAAA,KAAA;AACA,eAAA,CAAA,GAAA,OAAA,GAAA,KAAA,MAAA,KAAA,KAAA,UAAA,CAAA;AAAA,MACA;AAGA,YAAA,QAAA,KAAA,cAAA,IAAA,KAAA,aAAA;AACA,YAAA,cAAA,KAAA,MAAA,QAAA,CAAA;AACA,YAAA,OAAA,KAAA,cAAA;AACA,YAAA,QAAA,KAAA,cAAA;AACA,aAAA,CAAA,GAAA,OAAA,GAAA,KAAA,MAAA,MAAA,KAAA,GAAA,OAAA,KAAA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,MAAA,MAAA,IAAA;AACA,YAAA,QAAA,CAAA;AACA,aAAA,OAAA,IAAA,OAAA;AACA,eAAA,IAAA,MAAA,KAAA,IAAA,KAAA;AACA,cAAA,KAAA,CAAA;AAAA,MACA;AACA,aAAA;AAAA,IACA;AAAA,IAEA,WAAA,MAAA;AACA,WAAA,cAAA;AACA,WAAA,MAAA,UAAA,KAAA,WAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/lib/pagination.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DtButton
|
|
3
|
-
import { DtIcon
|
|
1
|
+
import { normalizeComponent } from "../chunks/_plugin-vue2_normalizer-sOSkiPF3.js";
|
|
2
|
+
import { DtButton } from "./button.js";
|
|
3
|
+
import { DtIcon } from "./icon.js";
|
|
4
4
|
import "vue";
|
|
5
|
-
import "../chunks/link_constants-
|
|
5
|
+
import "../chunks/link_constants-nWVlXQBs.js";
|
|
6
6
|
import "@dialpad/dialtone-icons/vue2";
|
|
7
|
-
import "../chunks/icon_constants-
|
|
7
|
+
import "../chunks/icon_constants-Dy4MEUJL.js";
|
|
8
8
|
import "@dialpad/dialtone-icons/icons.json";
|
|
9
|
-
const
|
|
9
|
+
const _sfc_main = {
|
|
10
10
|
name: "DtPagination",
|
|
11
11
|
components: {
|
|
12
|
-
DtButton
|
|
13
|
-
DtIcon
|
|
12
|
+
DtButton,
|
|
13
|
+
DtIcon
|
|
14
14
|
},
|
|
15
15
|
props: {
|
|
16
16
|
/**
|
|
@@ -18,35 +18,35 @@ const l = {
|
|
|
18
18
|
*/
|
|
19
19
|
ariaLabel: {
|
|
20
20
|
type: String,
|
|
21
|
-
required:
|
|
21
|
+
required: true
|
|
22
22
|
},
|
|
23
23
|
/**
|
|
24
24
|
* The total number of the pages
|
|
25
25
|
*/
|
|
26
26
|
totalPages: {
|
|
27
27
|
type: Number,
|
|
28
|
-
required:
|
|
28
|
+
required: true
|
|
29
29
|
},
|
|
30
30
|
/**
|
|
31
31
|
* Descriptive label for the previous button.
|
|
32
32
|
*/
|
|
33
33
|
prevAriaLabel: {
|
|
34
34
|
type: String,
|
|
35
|
-
required:
|
|
35
|
+
required: true
|
|
36
36
|
},
|
|
37
37
|
/**
|
|
38
38
|
* Descriptive label for the next button.
|
|
39
39
|
*/
|
|
40
40
|
nextAriaLabel: {
|
|
41
41
|
type: String,
|
|
42
|
-
required:
|
|
42
|
+
required: true
|
|
43
43
|
},
|
|
44
44
|
/**
|
|
45
45
|
* A method that will be called to get the aria label of each page.
|
|
46
46
|
*/
|
|
47
47
|
pageNumberAriaLabel: {
|
|
48
48
|
type: Function,
|
|
49
|
-
required:
|
|
49
|
+
required: true
|
|
50
50
|
},
|
|
51
51
|
/**
|
|
52
52
|
* The active current page in the list of pages, defaults to the first page
|
|
@@ -87,55 +87,67 @@ const l = {
|
|
|
87
87
|
return this.currentPage === this.totalPages;
|
|
88
88
|
},
|
|
89
89
|
pages() {
|
|
90
|
-
if (this.maxVisible === 0)
|
|
90
|
+
if (this.maxVisible === 0) {
|
|
91
91
|
return [];
|
|
92
|
-
|
|
92
|
+
}
|
|
93
|
+
if (this.totalPages <= this.maxVisible) {
|
|
93
94
|
return this.range(1, this.totalPages);
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if (this.currentPage
|
|
98
|
-
return [1, "...",
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
}
|
|
96
|
+
const start = this.maxVisible - 1;
|
|
97
|
+
const end = this.totalPages - start + 1;
|
|
98
|
+
if (this.currentPage < start) {
|
|
99
|
+
return [...this.range(1, start), "...", this.totalPages];
|
|
100
|
+
}
|
|
101
|
+
if (this.currentPage > end) {
|
|
102
|
+
return [1, "...", ...this.range(end, this.totalPages)];
|
|
103
|
+
}
|
|
104
|
+
const total = this.maxVisible - (3 - this.maxVisible % 2);
|
|
105
|
+
const centerIndex = Math.floor(total / 2);
|
|
106
|
+
const left = this.currentPage - centerIndex;
|
|
107
|
+
const right = this.currentPage + centerIndex;
|
|
108
|
+
return [1, "...", ...this.range(left, right), "...", this.totalPages];
|
|
101
109
|
}
|
|
102
110
|
},
|
|
103
111
|
methods: {
|
|
104
|
-
range(
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
for (let
|
|
108
|
-
|
|
109
|
-
|
|
112
|
+
range(from, to) {
|
|
113
|
+
const range = [];
|
|
114
|
+
from = from > 0 ? from : 1;
|
|
115
|
+
for (let i = from; i <= to; i++) {
|
|
116
|
+
range.push(i);
|
|
117
|
+
}
|
|
118
|
+
return range;
|
|
110
119
|
},
|
|
111
|
-
changePage(
|
|
112
|
-
this.currentPage =
|
|
120
|
+
changePage(page) {
|
|
121
|
+
this.currentPage = page;
|
|
122
|
+
this.$emit("change", this.currentPage);
|
|
113
123
|
}
|
|
114
124
|
}
|
|
115
125
|
};
|
|
116
|
-
var
|
|
117
|
-
var
|
|
118
|
-
return
|
|
119
|
-
return
|
|
120
|
-
} } }, [
|
|
121
|
-
return
|
|
122
|
-
return
|
|
123
|
-
} } }, [
|
|
124
|
-
}),
|
|
125
|
-
return
|
|
126
|
-
} } }, [
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
126
|
+
var _sfc_render = function render() {
|
|
127
|
+
var _vm = this, _c = _vm._self._c;
|
|
128
|
+
return _c("nav", { staticClass: "d-pagination", attrs: { "aria-label": _vm.ariaLabel } }, [_c("dt-button", { staticClass: "d-pagination__button", class: _vm.isFirstPage ? "d-fc-black-300 d-bgc-transparent" : "d-fc-tertiary", attrs: { "data-qa": "dt-pagination-prev", "aria-label": _vm.prevAriaLabel, "kind": _vm.isFirstPage ? "default" : "muted", "importance": _vm.isFirstPage ? "primary" : "clear", "disabled": _vm.isFirstPage }, on: { "click": function($event) {
|
|
129
|
+
return _vm.changePage(_vm.currentPage - 1);
|
|
130
|
+
} } }, [_c("template", { slot: "icon" }, [_c("dt-icon", { attrs: { "name": "chevron-left", "size": "300" } })], 1)], 2), _vm._l(_vm.pages, function(page, index) {
|
|
131
|
+
return _c("div", { key: `page-${page}-${index}`, class: { "d-pagination__separator": isNaN(Number(page)) } }, [isNaN(Number(page)) ? _c("div", { staticClass: "d-pagination__separator-icon", attrs: { "data-qa": "dt-pagination-separator" } }, [_c("dt-icon", { attrs: { "name": "more-horizontal", "size": "300" } })], 1) : _c("dt-button", { attrs: { "aria-label": _vm.pageNumberAriaLabel(page), "kind": _vm.currentPage === page ? "default" : "muted", "importance": _vm.currentPage === page ? "primary" : "clear", "label-class": "" }, on: { "click": function($event) {
|
|
132
|
+
return _vm.changePage(page);
|
|
133
|
+
} } }, [_vm._v(" " + _vm._s(page) + " ")])], 1);
|
|
134
|
+
}), _c("dt-button", { staticClass: "d-pagination__button", class: _vm.isLastPage ? "d-fc-black-300 d-bgc-transparent" : "d-fc-tertiary", attrs: { "data-qa": "dt-pagination-next", "aria-label": _vm.nextAriaLabel, "disabled": _vm.isLastPage, "kind": "muted", "importance": _vm.isLastPage ? "primary" : "clear" }, on: { "click": function($event) {
|
|
135
|
+
return _vm.changePage(_vm.currentPage + 1);
|
|
136
|
+
} } }, [_c("template", { slot: "icon" }, [_c("dt-icon", { attrs: { "name": "chevron-right", "size": "300" } })], 1)], 2)], 2);
|
|
137
|
+
};
|
|
138
|
+
var _sfc_staticRenderFns = [];
|
|
139
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
140
|
+
_sfc_main,
|
|
141
|
+
_sfc_render,
|
|
142
|
+
_sfc_staticRenderFns,
|
|
143
|
+
false,
|
|
132
144
|
null,
|
|
133
145
|
null,
|
|
134
146
|
null,
|
|
135
147
|
null
|
|
136
148
|
);
|
|
137
|
-
const
|
|
149
|
+
const pagination = __component__.exports;
|
|
138
150
|
export {
|
|
139
|
-
|
|
151
|
+
pagination as DtPagination
|
|
140
152
|
};
|
|
141
153
|
//# sourceMappingURL=pagination.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","sources":["../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n :kind=\"isFirstPage ? 'default' : 'muted'\"\n :importance=\"isFirstPage ? 'primary' : 'clear'\"\n :disabled=\"isFirstPage\"\n :class=\"isFirstPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"chevron-left\"\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon\n name=\"more-horizontal\"\n size=\"300\"\n />\n <!-- … -->\n </div>\n <!-- eslint-enable vue/no-bare-strings-in-template -->\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n :importance=\"isLastPage ? 'primary' : 'clear'\"\n :class=\"isLastPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"chevron-right\"\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * Descriptive label for the previous button.\n */\n prevAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the next button.\n */\n nextAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * A method that will be called to get the aria label of each page.\n */\n pageNumberAriaLabel: {\n type: Function,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n const start = this.maxVisible - 1;\n const end = this.totalPages - start + 1;\n\n if (this.currentPage < start) {\n return [...this.range(1, start), '...', this.totalPages];\n }\n\n if (this.currentPage > end) {\n return [1, '...', ...this.range(end, this.totalPages)];\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n const left = this.currentPage - centerIndex;\n const right = this.currentPage + centerIndex;\n return [1, '...', ...this.range(left, right), '...', this.totalPages];\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"pagination.js","sources":["../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n :kind=\"isFirstPage ? 'default' : 'muted'\"\n :importance=\"isFirstPage ? 'primary' : 'clear'\"\n :disabled=\"isFirstPage\"\n :class=\"isFirstPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"chevron-left\"\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon\n name=\"more-horizontal\"\n size=\"300\"\n />\n <!-- … -->\n </div>\n <!-- eslint-enable vue/no-bare-strings-in-template -->\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n :importance=\"isLastPage ? 'primary' : 'clear'\"\n :class=\"isLastPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"chevron-right\"\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * Descriptive label for the previous button.\n */\n prevAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the next button.\n */\n nextAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * A method that will be called to get the aria label of each page.\n */\n pageNumberAriaLabel: {\n type: Function,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n const start = this.maxVisible - 1;\n const end = this.totalPages - start + 1;\n\n if (this.currentPage < start) {\n return [...this.range(1, start), '...', this.totalPages];\n }\n\n if (this.currentPage > end) {\n return [1, '...', ...this.range(end, this.totalPages)];\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n const left = this.currentPage - centerIndex;\n const right = this.currentPage + centerIndex;\n return [1, '...', ...this.range(left, right), '...', this.totalPages];\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;;;;AA+EA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,aAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,cAAA;AACA,aAAA,KAAA,gBAAA;AAAA,IACA;AAAA,IAEA,aAAA;AACA,aAAA,KAAA,gBAAA,KAAA;AAAA,IACA;AAAA,IAEA,QAAA;AACA,UAAA,KAAA,eAAA,GAAA;AACA,eAAA;MACA;AACA,UAAA,KAAA,cAAA,KAAA,YAAA;AACA,eAAA,KAAA,MAAA,GAAA,KAAA,UAAA;AAAA,MACA;AAEA,YAAA,QAAA,KAAA,aAAA;AACA,YAAA,MAAA,KAAA,aAAA,QAAA;AAEA,UAAA,KAAA,cAAA,OAAA;AACA,eAAA,CAAA,GAAA,KAAA,MAAA,GAAA,KAAA,GAAA,OAAA,KAAA,UAAA;AAAA,MACA;AAEA,UAAA,KAAA,cAAA,KAAA;AACA,eAAA,CAAA,GAAA,OAAA,GAAA,KAAA,MAAA,KAAA,KAAA,UAAA,CAAA;AAAA,MACA;AAGA,YAAA,QAAA,KAAA,cAAA,IAAA,KAAA,aAAA;AACA,YAAA,cAAA,KAAA,MAAA,QAAA,CAAA;AACA,YAAA,OAAA,KAAA,cAAA;AACA,YAAA,QAAA,KAAA,cAAA;AACA,aAAA,CAAA,GAAA,OAAA,GAAA,KAAA,MAAA,MAAA,KAAA,GAAA,OAAA,KAAA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,MAAA,MAAA,IAAA;AACA,YAAA,QAAA,CAAA;AACA,aAAA,OAAA,IAAA,OAAA;AACA,eAAA,IAAA,MAAA,KAAA,IAAA,KAAA;AACA,cAAA,KAAA,CAAA;AAAA,MACA;AACA,aAAA;AAAA,IACA;AAAA,IAEA,WAAA,MAAA;AACA,WAAA,cAAA;AACA,WAAA,MAAA,UAAA,KAAA,WAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|