@dialpad/dialtone-vue 2.126.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-IaLNHmVd.js.map +1 -0
- 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-OpYAAKwF.js.map → icon_constants-Dy4MEUJL.js.map} +1 -1
- package/dist/chunks/icon_constants-QYpmdE0R.js +16 -0
- package/dist/chunks/icon_constants-QYpmdE0R.js.map +1 -0
- package/dist/chunks/index-DUr1xHR0.js +442 -0
- package/dist/chunks/{index-nIyl_PL6.js.map → index-DUr1xHR0.js.map} +1 -1
- package/dist/chunks/index-IA-Z8fgm.js +441 -0
- package/dist/chunks/index-IA-Z8fgm.js.map +1 -0
- package/dist/chunks/{input-1tm09l_-.js → input-6kbd8Pju.js} +83 -60
- package/dist/chunks/{input-1tm09l_-.js.map → input-6kbd8Pju.js.map} +1 -1
- package/dist/chunks/input-Axw-wFj2.js +295 -0
- package/dist/chunks/input-Axw-wFj2.js.map +1 -0
- 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-qVZaS5Bb.js.map +1 -0
- package/dist/chunks/keyboard_list_navigation-ScXhrxya.js +284 -0
- package/dist/chunks/{keyboard_list_navigation-F0O8nht0.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-fJnl_Iox.js.map +1 -0
- package/dist/chunks/link_constants-Huj7D_hm.js +22 -0
- package/dist/chunks/{link_constants-vIUB92L4.js.map → link_constants-Huj7D_hm.js.map} +1 -1
- package/dist/chunks/link_constants-nWVlXQBs.js +23 -0
- package/dist/chunks/link_constants-nWVlXQBs.js.map +1 -0
- package/dist/chunks/list_item_constants-EiqkqZvP.js +13 -0
- package/dist/chunks/{list_item_constants-LTUc74pD.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-u1xcN9Dd.js.map +1 -0
- package/dist/chunks/modal-VgxXAQFP.js +105 -0
- package/dist/chunks/{modal-VuMFkZFH.js.map → modal-VgxXAQFP.js.map} +1 -1
- package/dist/chunks/modal-XOr4kiNZ.js +106 -0
- package/dist/chunks/modal-XOr4kiNZ.js.map +1 -0
- package/dist/chunks/notice_action-IRUoLX2d.js +196 -0
- package/dist/chunks/{notice_action-9NmtQRai.js.map → notice_action-IRUoLX2d.js.map} +1 -1
- package/dist/chunks/notice_action-P6uDyE9x.js +195 -0
- package/dist/chunks/notice_action-P6uDyE9x.js.map +1 -0
- package/dist/chunks/notice_constants-7Qt2CQEY.js +7 -0
- package/dist/chunks/{notice_constants-c--hBFQw.js.map → notice_constants-7Qt2CQEY.js.map} +1 -1
- package/dist/chunks/notice_constants-UXo9e3bS.js +6 -0
- package/dist/chunks/notice_constants-UXo9e3bS.js.map +1 -0
- package/dist/chunks/popover_constants-JwBF9h1Z.js +143 -0
- package/dist/chunks/{popover_constants-qjlEkroB.js.map → popover_constants-JwBF9h1Z.js.map} +1 -1
- package/dist/chunks/popover_constants-Qkpb0yh2.js +144 -0
- package/dist/chunks/popover_constants-Qkpb0yh2.js.map +1 -0
- package/dist/chunks/sr_only_close_button-81bHIpPu.js +95 -0
- package/dist/chunks/{sr_only_close_button-JGole5Xi.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-ZaGdAHz7.js.map +1 -0
- package/dist/chunks/stack_constants-HraCekPm.js +15 -0
- package/dist/chunks/{stack_constants-u7tNqGtc.js.map → stack_constants-HraCekPm.js.map} +1 -1
- package/dist/chunks/stack_constants-SMzMWnAQ.js +14 -0
- package/dist/chunks/stack_constants-SMzMWnAQ.js.map +1 -0
- package/dist/chunks/tab-FcsV5VmK.js +386 -0
- package/dist/chunks/tab-FcsV5VmK.js.map +1 -0
- 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/common/constants.cjs.map +1 -0
- 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/common/dates.cjs.map +1 -0
- 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/common/mixins.cjs.map +1 -0
- package/dist/common/mixins.js +17 -0
- package/dist/common/utils.cjs +237 -0
- package/dist/common/utils.cjs.map +1 -0
- 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/common/validators.cjs.map +1 -0
- package/dist/common/validators.js +23 -0
- package/dist/{lib → common}/validators.js.map +1 -1
- package/dist/component-documentation.json +1 -1
- package/dist/dialtone-vue.cjs +373 -0
- package/dist/dialtone-vue.cjs.map +1 -0
- package/dist/dialtone-vue.js +325 -324
- package/dist/dialtone-vue.js.map +1 -1
- package/dist/lib/attachment-carousel.cjs +261 -0
- package/dist/lib/attachment-carousel.cjs.map +1 -0
- package/dist/lib/attachment-carousel.js +96 -85
- package/dist/lib/attachment-carousel.js.map +1 -1
- package/dist/lib/avatar.cjs +400 -0
- package/dist/lib/avatar.cjs.map +1 -0
- package/dist/lib/avatar.js +111 -80
- package/dist/lib/avatar.js.map +1 -1
- package/dist/lib/badge.cjs +183 -0
- package/dist/lib/badge.cjs.map +1 -0
- package/dist/lib/badge.js +53 -39
- package/dist/lib/badge.js.map +1 -1
- package/dist/lib/banner.cjs +210 -0
- package/dist/lib/banner.cjs.map +1 -0
- package/dist/lib/banner.js +58 -48
- package/dist/lib/banner.js.map +1 -1
- package/dist/lib/breadcrumbs.cjs +147 -0
- package/dist/lib/breadcrumbs.cjs.map +1 -0
- package/dist/lib/breadcrumbs.js +57 -48
- package/dist/lib/breadcrumbs.js.map +1 -1
- package/dist/lib/button-group.cjs +48 -0
- package/dist/lib/button-group.cjs.map +1 -0
- package/dist/lib/button-group.js +21 -18
- package/dist/lib/button-group.js.map +1 -1
- package/dist/lib/button.cjs +350 -0
- package/dist/lib/button.cjs.map +1 -0
- package/dist/lib/button.js +98 -76
- package/dist/lib/button.js.map +1 -1
- package/dist/lib/callbar-button-with-popover.cjs +250 -0
- package/dist/lib/callbar-button-with-popover.cjs.map +1 -0
- package/dist/lib/callbar-button-with-popover.js +66 -51
- package/dist/lib/callbar-button-with-popover.js.map +1 -1
- package/dist/lib/callbar-button.cjs +183 -0
- package/dist/lib/callbar-button.cjs.map +1 -0
- package/dist/lib/callbar-button.js +42 -34
- package/dist/lib/callbar-button.js.map +1 -1
- package/dist/lib/callbox.cjs +147 -0
- package/dist/lib/callbox.cjs.map +1 -0
- package/dist/lib/callbox.js +38 -33
- package/dist/lib/callbox.js.map +1 -1
- package/dist/lib/card.cjs +74 -0
- package/dist/lib/card.cjs.map +1 -0
- package/dist/lib/card.js +22 -20
- package/dist/lib/card.js.map +1 -1
- package/dist/lib/checkbox-group.cjs +130 -0
- package/dist/lib/checkbox-group.cjs.map +1 -0
- package/dist/lib/checkbox-group.js +42 -29
- package/dist/lib/checkbox-group.js.map +1 -1
- package/dist/lib/checkbox.cjs +128 -0
- package/dist/lib/checkbox.cjs.map +1 -0
- package/dist/lib/checkbox.js +46 -35
- package/dist/lib/checkbox.js.map +1 -1
- package/dist/lib/chip.cjs +199 -0
- package/dist/lib/chip.cjs.map +1 -0
- package/dist/lib/chip.js +59 -46
- package/dist/lib/chip.js.map +1 -1
- package/dist/lib/codeblock.cjs +30 -0
- package/dist/lib/codeblock.cjs.map +1 -0
- package/dist/lib/codeblock.js +15 -14
- package/dist/lib/codeblock.js.map +1 -1
- package/dist/lib/collapsible.cjs +335 -0
- package/dist/lib/collapsible.cjs.map +1 -0
- package/dist/lib/collapsible.js +91 -69
- package/dist/lib/collapsible.js.map +1 -1
- package/dist/lib/combobox-multi-select.cjs +520 -0
- package/dist/lib/combobox-multi-select.cjs.map +1 -0
- 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 +385 -0
- package/dist/lib/combobox-with-popover.cjs.map +1 -0
- package/dist/lib/combobox-with-popover.js +131 -87
- package/dist/lib/combobox-with-popover.js.map +1 -1
- package/dist/lib/combobox.cjs +19 -0
- package/dist/lib/combobox.cjs.map +1 -0
- package/dist/lib/combobox.js +9 -9
- package/dist/lib/contact-info.cjs +146 -0
- package/dist/lib/contact-info.cjs.map +1 -0
- package/dist/lib/contact-info.js +34 -33
- package/dist/lib/contact-info.js.map +1 -1
- package/dist/lib/contact-row.cjs +206 -0
- package/dist/lib/contact-row.cjs.map +1 -0
- package/dist/lib/contact-row.js +42 -39
- package/dist/lib/contact-row.js.map +1 -1
- package/dist/lib/datepicker.cjs +663 -0
- package/dist/lib/datepicker.cjs.map +1 -0
- package/dist/lib/datepicker.js +330 -219
- package/dist/lib/datepicker.js.map +1 -1
- package/dist/lib/description-list.cjs +115 -0
- package/dist/lib/description-list.cjs.map +1 -0
- package/dist/lib/description-list.js +51 -19
- package/dist/lib/description-list.js.map +1 -1
- package/dist/lib/dropdown.cjs +46 -0
- package/dist/lib/dropdown.cjs.map +1 -0
- package/dist/lib/dropdown.js +27 -26
- package/dist/lib/dropdown.js.map +1 -1
- package/dist/lib/editor.cjs +556 -0
- package/dist/lib/editor.cjs.map +1 -0
- package/dist/lib/editor.js +191 -162
- package/dist/lib/editor.js.map +1 -1
- package/dist/lib/emoji-picker.cjs +1064 -0
- package/dist/lib/emoji-picker.cjs.map +1 -0
- package/dist/lib/emoji-picker.js +638 -375
- package/dist/lib/emoji-picker.js.map +1 -1
- package/dist/lib/emoji-row.cjs +89 -0
- package/dist/lib/emoji-row.cjs.map +1 -0
- package/dist/lib/emoji-row.js +46 -40
- package/dist/lib/emoji-row.js.map +1 -1
- package/dist/lib/emoji-text-wrapper.cjs +110 -0
- package/dist/lib/emoji-text-wrapper.cjs.map +1 -0
- package/dist/lib/emoji-text-wrapper.js +49 -35
- package/dist/lib/emoji-text-wrapper.js.map +1 -1
- package/dist/lib/emoji.cjs +146 -0
- package/dist/lib/emoji.cjs.map +1 -0
- package/dist/lib/emoji.js +140 -5
- package/dist/lib/emoji.js.map +1 -1
- package/dist/lib/feed-item-row.cjs +214 -0
- package/dist/lib/feed-item-row.cjs.map +1 -0
- package/dist/lib/feed-item-row.js +71 -64
- package/dist/lib/feed-item-row.js.map +1 -1
- package/dist/lib/feed-pill.cjs +150 -0
- package/dist/lib/feed-pill.cjs.map +1 -0
- package/dist/lib/feed-pill.js +60 -52
- package/dist/lib/feed-pill.js.map +1 -1
- package/dist/lib/general-row.cjs +406 -0
- package/dist/lib/general-row.cjs.map +1 -0
- package/dist/lib/general-row.js +133 -106
- package/dist/lib/general-row.js.map +1 -1
- package/dist/lib/group-row.cjs +118 -0
- package/dist/lib/group-row.cjs.map +1 -0
- package/dist/lib/group-row.js +34 -31
- package/dist/lib/group-row.js.map +1 -1
- package/dist/lib/grouped-chip.cjs +46 -0
- package/dist/lib/grouped-chip.cjs.map +1 -0
- package/dist/lib/grouped-chip.js +28 -27
- package/dist/lib/grouped-chip.js.map +1 -1
- package/dist/lib/hovercard.cjs +228 -0
- package/dist/lib/hovercard.cjs.map +1 -0
- package/dist/lib/hovercard.js +98 -64
- package/dist/lib/hovercard.js.map +1 -1
- package/dist/lib/icon.cjs +60 -0
- package/dist/lib/icon.cjs.map +1 -0
- package/dist/lib/icon.js +22 -44
- package/dist/lib/icon.js.map +1 -1
- package/dist/lib/image-viewer.cjs +191 -0
- package/dist/lib/image-viewer.cjs.map +1 -0
- package/dist/lib/image-viewer.js +83 -63
- package/dist/lib/image-viewer.js.map +1 -1
- package/dist/lib/input-group.cjs +92 -0
- package/dist/lib/input-group.cjs.map +1 -0
- package/dist/lib/input-group.js +29 -27
- package/dist/lib/input-group.js.map +1 -1
- package/dist/lib/input.cjs +493 -0
- package/dist/lib/input.cjs.map +1 -0
- package/dist/lib/input.js +127 -89
- package/dist/lib/input.js.map +1 -1
- package/dist/lib/item-layout.cjs +41 -0
- package/dist/lib/item-layout.cjs.map +1 -0
- package/dist/lib/item-layout.js +15 -13
- package/dist/lib/item-layout.js.map +1 -1
- package/dist/lib/ivr-node.cjs +210 -0
- package/dist/lib/ivr-node.cjs.map +1 -0
- package/dist/lib/ivr-node.js +115 -100
- package/dist/lib/ivr-node.js.map +1 -1
- package/dist/lib/keyboard-shortcut.cjs +107 -0
- package/dist/lib/keyboard-shortcut.cjs.map +1 -0
- package/dist/lib/keyboard-shortcut.js +42 -35
- package/dist/lib/keyboard-shortcut.js.map +1 -1
- package/dist/lib/lazy-show.cjs +81 -0
- package/dist/lib/lazy-show.cjs.map +1 -0
- package/dist/lib/lazy-show.js +20 -16
- package/dist/lib/lazy-show.js.map +1 -1
- package/dist/lib/link.cjs +71 -0
- package/dist/lib/link.cjs.map +1 -0
- package/dist/lib/link.js +22 -20
- package/dist/lib/link.js.map +1 -1
- package/dist/lib/list-item-group.cjs +61 -0
- package/dist/lib/list-item-group.cjs.map +1 -0
- 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 +205 -0
- package/dist/lib/list-item.cjs.map +1 -0
- package/dist/lib/list-item.js +67 -57
- package/dist/lib/list-item.js.map +1 -1
- package/dist/lib/message-input.cjs +555 -0
- package/dist/lib/message-input.cjs.map +1 -0
- package/dist/lib/message-input.js +211 -147
- package/dist/lib/message-input.js.map +1 -1
- package/dist/lib/modal.cjs +351 -0
- package/dist/lib/modal.cjs.map +1 -0
- package/dist/lib/modal.js +118 -91
- package/dist/lib/modal.js.map +1 -1
- package/dist/lib/notice.cjs +160 -0
- package/dist/lib/notice.cjs.map +1 -0
- package/dist/lib/notice.js +46 -44
- package/dist/lib/notice.js.map +1 -1
- package/dist/lib/pagination.cjs +153 -0
- package/dist/lib/pagination.cjs.map +1 -0
- package/dist/lib/pagination.js +60 -49
- package/dist/lib/pagination.js.map +1 -1
- package/dist/lib/popover.cjs +957 -0
- package/dist/lib/popover.cjs.map +1 -0
- package/dist/lib/popover.js +401 -222
- package/dist/lib/popover.js.map +1 -1
- package/dist/lib/presence.cjs +66 -0
- package/dist/lib/presence.cjs.map +1 -0
- package/dist/lib/presence.js +32 -26
- package/dist/lib/presence.js.map +1 -1
- package/dist/lib/radio-group.cjs +99 -0
- package/dist/lib/radio-group.cjs.map +1 -0
- package/dist/lib/radio-group.js +24 -22
- package/dist/lib/radio-group.js.map +1 -1
- package/dist/lib/radio.cjs +119 -0
- package/dist/lib/radio.cjs.map +1 -0
- package/dist/lib/radio.js +43 -35
- package/dist/lib/radio.js.map +1 -1
- package/dist/lib/rich-text-editor.cjs +1139 -0
- package/dist/lib/rich-text-editor.cjs.map +1 -0
- package/dist/lib/rich-text-editor.js +611 -392
- package/dist/lib/rich-text-editor.js.map +1 -1
- package/dist/lib/root-layout.cjs +131 -0
- package/dist/lib/root-layout.cjs.map +1 -0
- package/dist/lib/root-layout.js +28 -24
- package/dist/lib/root-layout.js.map +1 -1
- package/dist/lib/select-menu.cjs +283 -0
- package/dist/lib/select-menu.cjs.map +1 -0
- package/dist/lib/select-menu.js +101 -61
- package/dist/lib/select-menu.js.map +1 -1
- package/dist/lib/settings-menu-button.cjs +66 -0
- package/dist/lib/settings-menu-button.cjs.map +1 -0
- package/dist/lib/settings-menu-button.js +26 -25
- package/dist/lib/settings-menu-button.js.map +1 -1
- package/dist/lib/skeleton.cjs +613 -0
- package/dist/lib/skeleton.cjs.map +1 -0
- package/dist/lib/skeleton.js +174 -135
- package/dist/lib/skeleton.js.map +1 -1
- package/dist/lib/stack.cjs +128 -0
- package/dist/lib/stack.cjs.map +1 -0
- package/dist/lib/stack.js +66 -56
- package/dist/lib/stack.js.map +1 -1
- package/dist/lib/tabs.cjs +100 -0
- package/dist/lib/tabs.cjs.map +1 -0
- package/dist/lib/tabs.js +42 -35
- package/dist/lib/tabs.js.map +1 -1
- package/dist/lib/time-pill.cjs +48 -0
- package/dist/lib/time-pill.cjs.map +1 -0
- package/dist/lib/time-pill.js +21 -16
- package/dist/lib/time-pill.js.map +1 -1
- package/dist/lib/toast.cjs +248 -0
- package/dist/lib/toast.cjs.map +1 -0
- package/dist/lib/toast.js +78 -56
- package/dist/lib/toast.js.map +1 -1
- package/dist/lib/toggle.cjs +178 -0
- package/dist/lib/toggle.cjs.map +1 -0
- package/dist/lib/toggle.js +46 -37
- package/dist/lib/toggle.js.map +1 -1
- package/dist/lib/tooltip-directive.cjs +88 -0
- package/dist/lib/tooltip-directive.cjs.map +1 -0
- package/dist/lib/tooltip-directive.js +55 -41
- package/dist/lib/tooltip-directive.js.map +1 -1
- package/dist/lib/tooltip.cjs +437 -0
- package/dist/lib/tooltip.cjs.map +1 -0
- package/dist/lib/tooltip.js +152 -90
- package/dist/lib/tooltip.js.map +1 -1
- package/dist/lib/top-banner-info.cjs +64 -0
- package/dist/lib/top-banner-info.cjs.map +1 -0
- 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 +64 -0
- package/dist/lib/unread-pill.cjs.map +1 -0
- package/dist/lib/unread-pill.js +25 -22
- package/dist/lib/unread-pill.js.map +1 -1
- package/dist/lib/validation-messages.cjs +86 -0
- package/dist/lib/validation-messages.cjs.map +1 -0
- 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/avatar/avatar.vue.d.ts +1 -1
- package/dist/types/components/button/button.vue.d.ts +2 -2
- package/dist/types/components/card/card.vue.d.ts +1 -1
- package/dist/types/components/chip/chip.vue.d.ts +1 -1
- package/dist/types/components/collapsible/collapsible.vue.d.ts +2 -2
- package/dist/types/components/combobox/combobox.vue.d.ts +1 -1
- package/dist/types/components/dropdown/dropdown.vue.d.ts +1 -1
- package/dist/types/components/emoji/emoji.vue.d.ts +1 -1
- package/dist/types/components/icon/icon.vue.d.ts +2 -22
- package/dist/types/components/icon/icon.vue.d.ts.map +1 -1
- package/dist/types/components/list_item_group/list_item_group.vue.d.ts +1 -1
- package/dist/types/components/modal/modal.vue.d.ts +2 -2
- package/dist/types/components/popover/popover_header_footer.vue.d.ts +1 -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/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +91 -1
- package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/types/components/skeleton/skeleton-list-item.vue.d.ts +1 -1
- package/dist/types/components/skeleton/skeleton-paragraph.vue.d.ts +3 -3
- package/dist/types/components/skeleton/skeleton-shape.vue.d.ts +2 -2
- package/dist/types/components/skeleton/skeleton-text.vue.d.ts +2 -2
- package/dist/types/components/skeleton/skeleton.vue.d.ts +1 -1
- package/dist/types/components/tooltip/tooltip.vue.d.ts +2 -2
- package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
- package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
- package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +2 -2
- package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +90 -0
- package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
- package/dist/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +1 -1
- package/package.json +37 -35
- 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_constants-EUcDxBrX.js +0 -9
- package/dist/chunks/dropdown_constants-EUcDxBrX.js.map +0 -1
- 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/keyboard_list_navigation-F0O8nht0.js +0 -197
- package/dist/chunks/link_constants-vIUB92L4.js +0 -16
- package/dist/chunks/list_item_constants-LTUc74pD.js +0 -13
- package/dist/chunks/modal-VuMFkZFH.js +0 -82
- package/dist/chunks/notice_action-9NmtQRai.js +0 -182
- package/dist/chunks/notice_constants-c--hBFQw.js +0 -6
- package/dist/chunks/popover_constants-qjlEkroB.js +0 -114
- package/dist/chunks/sr_only_close_button-JGole5Xi.js +0 -86
- package/dist/chunks/stack_constants-u7tNqGtc.js +0 -13
- package/dist/chunks/tab-Qm9LVkYj.js +0 -346
- package/dist/lib/dates.js +0 -57
- package/dist/lib/mixins.js +0 -17
- package/dist/lib/utils.js +0 -175
- package/dist/lib/validators.js +0 -12
- /package/dist/{lib → common}/mixins.js.map +0 -0
package/dist/lib/notice.js
CHANGED
|
@@ -1,23 +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
|
-
import "./skeleton.js";
|
|
10
9
|
import "./button.js";
|
|
11
10
|
import "vue";
|
|
12
|
-
import "../chunks/link_constants-
|
|
13
|
-
const
|
|
11
|
+
import "../chunks/link_constants-nWVlXQBs.js";
|
|
12
|
+
const _sfc_main = {
|
|
14
13
|
name: "DtNotice",
|
|
15
14
|
components: {
|
|
16
|
-
DtNoticeIcon
|
|
17
|
-
DtNoticeContent
|
|
18
|
-
DtNoticeAction
|
|
15
|
+
DtNoticeIcon,
|
|
16
|
+
DtNoticeContent,
|
|
17
|
+
DtNoticeAction
|
|
19
18
|
},
|
|
20
|
-
mixins: [
|
|
19
|
+
mixins: [SrOnlyCloseButtonMixin],
|
|
21
20
|
props: {
|
|
22
21
|
/**
|
|
23
22
|
* Sets an ID on the title element of the component. Useful for aria-describedby
|
|
@@ -51,8 +50,8 @@ const d = {
|
|
|
51
50
|
role: {
|
|
52
51
|
type: String,
|
|
53
52
|
default: "status",
|
|
54
|
-
validate(
|
|
55
|
-
return
|
|
53
|
+
validate(role) {
|
|
54
|
+
return NOTICE_ROLES.includes(role);
|
|
56
55
|
}
|
|
57
56
|
},
|
|
58
57
|
/**
|
|
@@ -62,7 +61,7 @@ const d = {
|
|
|
62
61
|
*/
|
|
63
62
|
important: {
|
|
64
63
|
type: Boolean,
|
|
65
|
-
default:
|
|
64
|
+
default: false
|
|
66
65
|
},
|
|
67
66
|
/**
|
|
68
67
|
* Severity level of the notice, sets the icon and background
|
|
@@ -71,8 +70,8 @@ const d = {
|
|
|
71
70
|
kind: {
|
|
72
71
|
type: String,
|
|
73
72
|
default: "base",
|
|
74
|
-
validate(
|
|
75
|
-
return
|
|
73
|
+
validate(kind) {
|
|
74
|
+
return NOTICE_KINDS.includes(kind);
|
|
76
75
|
}
|
|
77
76
|
},
|
|
78
77
|
/**
|
|
@@ -88,7 +87,7 @@ const d = {
|
|
|
88
87
|
*/
|
|
89
88
|
hideClose: {
|
|
90
89
|
type: Boolean,
|
|
91
|
-
default:
|
|
90
|
+
default: false
|
|
92
91
|
},
|
|
93
92
|
/**
|
|
94
93
|
* Hides the icon from the notice
|
|
@@ -96,7 +95,7 @@ const d = {
|
|
|
96
95
|
*/
|
|
97
96
|
hideIcon: {
|
|
98
97
|
type: Boolean,
|
|
99
|
-
default:
|
|
98
|
+
default: false
|
|
100
99
|
},
|
|
101
100
|
/**
|
|
102
101
|
* Hides the action from the notice
|
|
@@ -104,7 +103,7 @@ const d = {
|
|
|
104
103
|
*/
|
|
105
104
|
hideAction: {
|
|
106
105
|
type: Boolean,
|
|
107
|
-
default:
|
|
106
|
+
default: false
|
|
108
107
|
}
|
|
109
108
|
},
|
|
110
109
|
emits: [
|
|
@@ -117,42 +116,45 @@ const d = {
|
|
|
117
116
|
],
|
|
118
117
|
computed: {
|
|
119
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
|
+
};
|
|
120
126
|
return [
|
|
121
127
|
"d-notice",
|
|
122
|
-
|
|
123
|
-
error: "d-notice--error",
|
|
124
|
-
info: "d-notice--info",
|
|
125
|
-
success: "d-notice--success",
|
|
126
|
-
warning: "d-notice--warning",
|
|
127
|
-
base: "d-notice--base"
|
|
128
|
-
}[this.kind],
|
|
128
|
+
noticeKinds[this.kind],
|
|
129
129
|
{ "d-notice--important": this.important }
|
|
130
130
|
];
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
|
-
var
|
|
135
|
-
var
|
|
136
|
-
return
|
|
137
|
-
return [
|
|
138
|
-
}, proxy:
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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,
|
|
144
146
|
null,
|
|
145
147
|
null,
|
|
146
148
|
null,
|
|
147
149
|
null
|
|
148
150
|
);
|
|
149
|
-
const
|
|
151
|
+
const notice = __component__.exports;
|
|
150
152
|
export {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
notice as DtNotice,
|
|
154
|
+
DtNoticeAction,
|
|
155
|
+
DtNoticeContent,
|
|
156
|
+
DtNoticeIcon,
|
|
157
|
+
NOTICE_KINDS,
|
|
158
|
+
NOTICE_ROLES
|
|
157
159
|
};
|
|
158
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;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,153 @@
|
|
|
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;
|
|
153
|
+
//# sourceMappingURL=pagination.cjs.map
|
|
@@ -0,0 +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":["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,17 +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
|
-
|
|
10
|
-
const l = {
|
|
9
|
+
const _sfc_main = {
|
|
11
10
|
name: "DtPagination",
|
|
12
11
|
components: {
|
|
13
|
-
DtButton
|
|
14
|
-
DtIcon
|
|
12
|
+
DtButton,
|
|
13
|
+
DtIcon
|
|
15
14
|
},
|
|
16
15
|
props: {
|
|
17
16
|
/**
|
|
@@ -19,35 +18,35 @@ const l = {
|
|
|
19
18
|
*/
|
|
20
19
|
ariaLabel: {
|
|
21
20
|
type: String,
|
|
22
|
-
required:
|
|
21
|
+
required: true
|
|
23
22
|
},
|
|
24
23
|
/**
|
|
25
24
|
* The total number of the pages
|
|
26
25
|
*/
|
|
27
26
|
totalPages: {
|
|
28
27
|
type: Number,
|
|
29
|
-
required:
|
|
28
|
+
required: true
|
|
30
29
|
},
|
|
31
30
|
/**
|
|
32
31
|
* Descriptive label for the previous button.
|
|
33
32
|
*/
|
|
34
33
|
prevAriaLabel: {
|
|
35
34
|
type: String,
|
|
36
|
-
required:
|
|
35
|
+
required: true
|
|
37
36
|
},
|
|
38
37
|
/**
|
|
39
38
|
* Descriptive label for the next button.
|
|
40
39
|
*/
|
|
41
40
|
nextAriaLabel: {
|
|
42
41
|
type: String,
|
|
43
|
-
required:
|
|
42
|
+
required: true
|
|
44
43
|
},
|
|
45
44
|
/**
|
|
46
45
|
* A method that will be called to get the aria label of each page.
|
|
47
46
|
*/
|
|
48
47
|
pageNumberAriaLabel: {
|
|
49
48
|
type: Function,
|
|
50
|
-
required:
|
|
49
|
+
required: true
|
|
51
50
|
},
|
|
52
51
|
/**
|
|
53
52
|
* The active current page in the list of pages, defaults to the first page
|
|
@@ -88,55 +87,67 @@ const l = {
|
|
|
88
87
|
return this.currentPage === this.totalPages;
|
|
89
88
|
},
|
|
90
89
|
pages() {
|
|
91
|
-
if (this.maxVisible === 0)
|
|
90
|
+
if (this.maxVisible === 0) {
|
|
92
91
|
return [];
|
|
93
|
-
|
|
92
|
+
}
|
|
93
|
+
if (this.totalPages <= this.maxVisible) {
|
|
94
94
|
return this.range(1, this.totalPages);
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
if (this.currentPage
|
|
99
|
-
return [1, "...",
|
|
100
|
-
|
|
101
|
-
|
|
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];
|
|
102
109
|
}
|
|
103
110
|
},
|
|
104
111
|
methods: {
|
|
105
|
-
range(
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
for (let
|
|
109
|
-
|
|
110
|
-
|
|
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;
|
|
111
119
|
},
|
|
112
|
-
changePage(
|
|
113
|
-
this.currentPage =
|
|
120
|
+
changePage(page) {
|
|
121
|
+
this.currentPage = page;
|
|
122
|
+
this.$emit("change", this.currentPage);
|
|
114
123
|
}
|
|
115
124
|
}
|
|
116
125
|
};
|
|
117
|
-
var
|
|
118
|
-
var
|
|
119
|
-
return
|
|
120
|
-
return
|
|
121
|
-
} } }, [
|
|
122
|
-
return
|
|
123
|
-
return
|
|
124
|
-
} } }, [
|
|
125
|
-
}),
|
|
126
|
-
return
|
|
127
|
-
} } }, [
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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,
|
|
133
144
|
null,
|
|
134
145
|
null,
|
|
135
146
|
null,
|
|
136
147
|
null
|
|
137
148
|
);
|
|
138
|
-
const
|
|
149
|
+
const pagination = __component__.exports;
|
|
139
150
|
export {
|
|
140
|
-
|
|
151
|
+
pagination as DtPagination
|
|
141
152
|
};
|
|
142
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;;;;;;;;;;;;;;;;;;;;;;;;;"}
|