@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/checkbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sources":["../../components/checkbox/checkbox_constants.js","../../components/checkbox/checkbox.vue"],"sourcesContent":["export const CHECKBOX_INPUT_VALIDATION_CLASSES = {\n error: 'd-checkbox--error',\n warning: 'd-checkbox--warning',\n success: 'd-checkbox--success',\n};\n\nexport default {\n CHECKBOX_INPUT_VALIDATION_CLASSES,\n};\n","<template>\n <div>\n <label>\n <div :class=\"['d-checkbox-group', { 'd-checkbox-group--disabled': internalDisabled }]\">\n <div class=\"d-checkbox__input\">\n <input\n type=\"checkbox\"\n :checked=\"internalChecked\"\n :name=\"internalName\"\n :value=\"value\"\n :disabled=\"internalDisabled\"\n :class=\"['d-checkbox', inputValidationClass, inputClass]\"\n v-bind=\"$attrs\"\n :indeterminate.prop=\"internalIndeterminate\"\n v-on=\"inputListeners\"\n >\n </div>\n <div\n v-if=\"hasLabelOrDescription\"\n class=\"d-checkbox__copy d-checkbox__label\"\n data-qa=\"checkbox-label-description-container\"\n >\n <div\n v-if=\"hasLabel\"\n :class=\"labelClass\"\n v-bind=\"labelChildProps\"\n data-qa=\"checkbox-label\"\n >\n <!-- @slot slot for Checkbox Label -->\n <slot>{{ label }}</slot>\n </div>\n <div\n v-if=\"hasDescription\"\n :class=\"['d-description', descriptionClass]\"\n v-bind=\"descriptionChildProps\"\n data-qa=\"checkbox-description\"\n >\n <!-- @slot slot for Checkbox Description -->\n <slot name=\"description\">{{ description }}</slot>\n </div>\n <dt-validation-messages\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n v-bind=\"messagesChildProps\"\n data-qa=\"dt-checkbox-validation-messages\"\n />\n </div>\n </div>\n </label>\n </div>\n</template>\n\n<script>\n// Imports\nimport {\n InputMixin,\n CheckableMixin,\n GroupableMixin,\n MessagesMixin,\n} from '@/common/mixins/input';\nimport { CHECKBOX_INPUT_VALIDATION_CLASSES } from './checkbox_constants';\nimport { DtValidationMessages } from '../validation_messages';\n\n/**\n * Checkboxes are control elements that allow the user to make a selection.They are typically used in a\n * Checkbox Group which allows the user to make one or more selections from a list of options.\n * @see https://dialtone.dialpad.com/components/checkbox.html\n */\nexport default {\n name: 'DtCheckbox',\n\n components: { DtValidationMessages },\n\n mixins: [InputMixin, CheckableMixin, GroupableMixin, MessagesMixin],\n\n inheritAttrs: false,\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {Boolean}\n */\n 'input',\n\n /**\n * Native input focusin event\n *\n * @event focusin\n * @type {FocusEvent}\n */\n 'focusin',\n\n /**\n * Native input focusout event\n *\n * @event focusout\n * @type {FocusEvent}\n */\n 'focusout',\n ],\n\n computed: {\n inputValidationClass () {\n return CHECKBOX_INPUT_VALIDATION_CLASSES[this.internalValidationState];\n },\n\n checkboxGroupValueChecked () {\n return this.groupContext?.selectedValues?.includes(this.value) ?? false;\n },\n\n hasLabel () {\n return !!(this.$slots.default || this.label);\n },\n\n hasDescription () {\n return !!(this.$slots.description || this.description);\n },\n\n hasLabelOrDescription () {\n return this.hasLabel || this.hasDescription;\n },\n\n inputListeners () {\n return {\n /* TODO\n Check if any usages of this component leverage $listeners and either remove if unused or scope the removal\n and migration prior to upgrading to Vue 3.x\n */\n ...this.$listeners,\n /*\n * Override input listener to as no-op. Prevents parent input listeners from being passed through\n * onto the input element which will result in the handler being called twice\n * (once on the input element and once by the emitted input event by the change listener).\n */\n input: () => {},\n change: event => this.emitValue(event.target),\n };\n },\n },\n\n watch: {\n checkboxGroupValueChecked: {\n immediate: true,\n handler (newCheckboxGroupValueChecked) {\n if (this.hasGroup) {\n // update internal value when the checkbox group value changes\n this.internalChecked = newCheckboxGroupValueChecked;\n }\n },\n },\n },\n\n mounted () {\n this.runValidations();\n },\n\n methods: {\n emitValue (target) {\n let { value, checked } = target;\n // Expected: Indeterminate -> unchecked. We need to manually set DOM property `checked` to false\n // and update this.internalIndeterminate.\n if (this.internalIndeterminate) {\n checked = false;\n this.internalIndeterminate = false;\n target.checked = false;\n }\n // update provided value if injected\n this.setGroupValue(value, checked);\n\n // emit the state of the checkbox\n this.$emit('input', checked);\n },\n\n runValidations () {\n this.validateInputLabels(this.hasLabel, this.$attrs['aria-label']);\n },\n },\n};\n</script>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"checkbox.js","sources":["../../components/checkbox/checkbox_constants.js","../../components/checkbox/checkbox.vue"],"sourcesContent":["export const CHECKBOX_INPUT_VALIDATION_CLASSES = {\n error: 'd-checkbox--error',\n warning: 'd-checkbox--warning',\n success: 'd-checkbox--success',\n};\n\nexport default {\n CHECKBOX_INPUT_VALIDATION_CLASSES,\n};\n","<template>\n <div>\n <label>\n <div :class=\"['d-checkbox-group', { 'd-checkbox-group--disabled': internalDisabled }]\">\n <div class=\"d-checkbox__input\">\n <input\n type=\"checkbox\"\n :checked=\"internalChecked\"\n :name=\"internalName\"\n :value=\"value\"\n :disabled=\"internalDisabled\"\n :class=\"['d-checkbox', inputValidationClass, inputClass]\"\n v-bind=\"$attrs\"\n :indeterminate.prop=\"internalIndeterminate\"\n v-on=\"inputListeners\"\n >\n </div>\n <div\n v-if=\"hasLabelOrDescription\"\n class=\"d-checkbox__copy d-checkbox__label\"\n data-qa=\"checkbox-label-description-container\"\n >\n <div\n v-if=\"hasLabel\"\n :class=\"labelClass\"\n v-bind=\"labelChildProps\"\n data-qa=\"checkbox-label\"\n >\n <!-- @slot slot for Checkbox Label -->\n <slot>{{ label }}</slot>\n </div>\n <div\n v-if=\"hasDescription\"\n :class=\"['d-description', descriptionClass]\"\n v-bind=\"descriptionChildProps\"\n data-qa=\"checkbox-description\"\n >\n <!-- @slot slot for Checkbox Description -->\n <slot name=\"description\">{{ description }}</slot>\n </div>\n <dt-validation-messages\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n v-bind=\"messagesChildProps\"\n data-qa=\"dt-checkbox-validation-messages\"\n />\n </div>\n </div>\n </label>\n </div>\n</template>\n\n<script>\n// Imports\nimport {\n InputMixin,\n CheckableMixin,\n GroupableMixin,\n MessagesMixin,\n} from '@/common/mixins/input';\nimport { CHECKBOX_INPUT_VALIDATION_CLASSES } from './checkbox_constants';\nimport { DtValidationMessages } from '../validation_messages';\n\n/**\n * Checkboxes are control elements that allow the user to make a selection.They are typically used in a\n * Checkbox Group which allows the user to make one or more selections from a list of options.\n * @see https://dialtone.dialpad.com/components/checkbox.html\n */\nexport default {\n name: 'DtCheckbox',\n\n components: { DtValidationMessages },\n\n mixins: [InputMixin, CheckableMixin, GroupableMixin, MessagesMixin],\n\n inheritAttrs: false,\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {Boolean}\n */\n 'input',\n\n /**\n * Native input focusin event\n *\n * @event focusin\n * @type {FocusEvent}\n */\n 'focusin',\n\n /**\n * Native input focusout event\n *\n * @event focusout\n * @type {FocusEvent}\n */\n 'focusout',\n ],\n\n computed: {\n inputValidationClass () {\n return CHECKBOX_INPUT_VALIDATION_CLASSES[this.internalValidationState];\n },\n\n checkboxGroupValueChecked () {\n return this.groupContext?.selectedValues?.includes(this.value) ?? false;\n },\n\n hasLabel () {\n return !!(this.$slots.default || this.label);\n },\n\n hasDescription () {\n return !!(this.$slots.description || this.description);\n },\n\n hasLabelOrDescription () {\n return this.hasLabel || this.hasDescription;\n },\n\n inputListeners () {\n return {\n /* TODO\n Check if any usages of this component leverage $listeners and either remove if unused or scope the removal\n and migration prior to upgrading to Vue 3.x\n */\n ...this.$listeners,\n /*\n * Override input listener to as no-op. Prevents parent input listeners from being passed through\n * onto the input element which will result in the handler being called twice\n * (once on the input element and once by the emitted input event by the change listener).\n */\n input: () => {},\n change: event => this.emitValue(event.target),\n };\n },\n },\n\n watch: {\n checkboxGroupValueChecked: {\n immediate: true,\n handler (newCheckboxGroupValueChecked) {\n if (this.hasGroup) {\n // update internal value when the checkbox group value changes\n this.internalChecked = newCheckboxGroupValueChecked;\n }\n },\n },\n },\n\n mounted () {\n this.runValidations();\n },\n\n methods: {\n emitValue (target) {\n let { value, checked } = target;\n // Expected: Indeterminate -> unchecked. We need to manually set DOM property `checked` to false\n // and update this.internalIndeterminate.\n if (this.internalIndeterminate) {\n checked = false;\n this.internalIndeterminate = false;\n target.checked = false;\n }\n // update provided value if injected\n this.setGroupValue(value, checked);\n\n // emit the state of the checkbox\n this.$emit('input', checked);\n },\n\n runValidations () {\n this.validateInputLabels(this.hasLabel, this.$attrs['aria-label']);\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;;;AAAO,MAAM,oCAAoC;AAAA,EAC/C,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AACX;ACiEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,qBAAA;AAAA,EAEA,QAAA,CAAA,YAAA,gBAAA,gBAAA,aAAA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,uBAAA;AACA,aAAA,kCAAA,KAAA,uBAAA;AAAA,IACA;AAAA,IAEA,4BAAA;;AACA,eAAA,gBAAA,iBAAA,mBAAA,mBAAA,mBAAA,SAAA,KAAA,WAAA;AAAA,IACA;AAAA,IAEA,WAAA;AACA,aAAA,CAAA,EAAA,KAAA,OAAA,WAAA,KAAA;AAAA,IACA;AAAA,IAEA,iBAAA;AACA,aAAA,CAAA,EAAA,KAAA,OAAA,eAAA,KAAA;AAAA,IACA;AAAA,IAEA,wBAAA;AACA,aAAA,KAAA,YAAA,KAAA;AAAA,IACA;AAAA,IAEA,iBAAA;AACA,aAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAKA,GAAA,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAMA,OAAA,MAAA;AAAA,QAAA;AAAA,QACA,QAAA,WAAA,KAAA,UAAA,MAAA,MAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,2BAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAA,8BAAA;AACA,YAAA,KAAA,UAAA;AAEA,eAAA,kBAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,SAAA,eAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,UAAA,QAAA;AACA,UAAA,EAAA,OAAA,QAAA,IAAA;AAGA,UAAA,KAAA,uBAAA;AACA,kBAAA;AACA,aAAA,wBAAA;AACA,eAAA,UAAA;AAAA,MACA;AAEA,WAAA,cAAA,OAAA,OAAA;AAGA,WAAA,MAAA,SAAA,OAAA;AAAA,IACA;AAAA,IAEA,iBAAA;AACA,WAAA,oBAAA,KAAA,UAAA,KAAA,OAAA,YAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const common_utils = require("../common/utils.cjs");
|
|
4
|
+
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-1aBeR4AK.js");
|
|
5
|
+
const lib_button = require("./button.cjs");
|
|
6
|
+
const lib_icon = require("./icon.cjs");
|
|
7
|
+
require("../common/constants.cjs");
|
|
8
|
+
require("vue");
|
|
9
|
+
require("../chunks/link_constants-Huj7D_hm.js");
|
|
10
|
+
require("@dialpad/dialtone-icons/vue2");
|
|
11
|
+
require("../chunks/icon_constants-QYpmdE0R.js");
|
|
12
|
+
require("@dialpad/dialtone-icons/icons.json");
|
|
13
|
+
const CHIP_SIZE_MODIFIERS = {
|
|
14
|
+
xs: "d-chip__label--xs",
|
|
15
|
+
sm: "d-chip__label--sm",
|
|
16
|
+
md: ""
|
|
17
|
+
};
|
|
18
|
+
const CHIP_CLOSE_BUTTON_SIZE_MODIFIERS = {
|
|
19
|
+
xs: "d-chip__close--xs",
|
|
20
|
+
sm: "d-chip__close--sm",
|
|
21
|
+
md: ""
|
|
22
|
+
};
|
|
23
|
+
const CHIP_ICON_SIZES = {
|
|
24
|
+
xs: "200",
|
|
25
|
+
sm: "200",
|
|
26
|
+
md: "200"
|
|
27
|
+
};
|
|
28
|
+
const _sfc_main = {
|
|
29
|
+
name: "DtChip",
|
|
30
|
+
components: {
|
|
31
|
+
DtButton: lib_button.DtButton,
|
|
32
|
+
DtIcon: lib_icon.DtIcon
|
|
33
|
+
},
|
|
34
|
+
props: {
|
|
35
|
+
/**
|
|
36
|
+
* A set of props to be passed into the modal's close button. Requires an 'ariaLabel' property.
|
|
37
|
+
*/
|
|
38
|
+
closeButtonProps: {
|
|
39
|
+
type: Object,
|
|
40
|
+
default: function() {
|
|
41
|
+
return { ariaLabel: "close" };
|
|
42
|
+
},
|
|
43
|
+
validator: (props) => {
|
|
44
|
+
return !!props.ariaLabel;
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
/**
|
|
48
|
+
* Hides the close button on the chip
|
|
49
|
+
* @values true, false
|
|
50
|
+
*/
|
|
51
|
+
hideClose: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: false
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* The size of the chip.
|
|
57
|
+
* @values xs, sm, md
|
|
58
|
+
*/
|
|
59
|
+
size: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: "md",
|
|
62
|
+
validator: (s) => Object.keys(CHIP_SIZE_MODIFIERS).includes(s)
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* The interactivity of the chip.
|
|
66
|
+
* Makes chip clickable, apply hover/focus/active style, emit keyboard events etc.
|
|
67
|
+
* @values true, false
|
|
68
|
+
*/
|
|
69
|
+
interactive: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: true
|
|
72
|
+
},
|
|
73
|
+
/**
|
|
74
|
+
* Id to use for the dialog's aria-labelledby.
|
|
75
|
+
*/
|
|
76
|
+
id: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: function() {
|
|
79
|
+
return common_utils.getUniqueString();
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
/**
|
|
83
|
+
* Descriptive label for the chip content.
|
|
84
|
+
* If this prop is unset the content in the default slot will be used as an aria-label.
|
|
85
|
+
*/
|
|
86
|
+
ariaLabel: {
|
|
87
|
+
type: String,
|
|
88
|
+
default: ""
|
|
89
|
+
},
|
|
90
|
+
/**
|
|
91
|
+
* Additional class name for the chip element.
|
|
92
|
+
*/
|
|
93
|
+
contentClass: {
|
|
94
|
+
type: [String, Array, Object],
|
|
95
|
+
default: ""
|
|
96
|
+
},
|
|
97
|
+
/**
|
|
98
|
+
* Additional class name for the span element.
|
|
99
|
+
*/
|
|
100
|
+
labelClass: {
|
|
101
|
+
type: [String, Array, Object],
|
|
102
|
+
default: ""
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
emits: [
|
|
106
|
+
/**
|
|
107
|
+
* Native chip click event
|
|
108
|
+
*
|
|
109
|
+
* @event click
|
|
110
|
+
* @type {PointerEvent | KeyboardEvent}
|
|
111
|
+
*/
|
|
112
|
+
"click",
|
|
113
|
+
/**
|
|
114
|
+
* Close button click event
|
|
115
|
+
*
|
|
116
|
+
* @event close
|
|
117
|
+
*/
|
|
118
|
+
"close",
|
|
119
|
+
/**
|
|
120
|
+
* Native chip key up event
|
|
121
|
+
*
|
|
122
|
+
* @event keyup
|
|
123
|
+
* @type {KeyboardEvent}
|
|
124
|
+
*/
|
|
125
|
+
"keyup"
|
|
126
|
+
],
|
|
127
|
+
data() {
|
|
128
|
+
return {
|
|
129
|
+
isActive: false
|
|
130
|
+
};
|
|
131
|
+
},
|
|
132
|
+
computed: {
|
|
133
|
+
chipListeners() {
|
|
134
|
+
return {
|
|
135
|
+
...this.$listeners,
|
|
136
|
+
click: (event) => {
|
|
137
|
+
if (this.interactive)
|
|
138
|
+
this.$emit("click", event);
|
|
139
|
+
},
|
|
140
|
+
keyup: (event) => {
|
|
141
|
+
var _a;
|
|
142
|
+
if (((_a = event.code) == null ? void 0 : _a.toLowerCase()) === "delete") {
|
|
143
|
+
this.onClose();
|
|
144
|
+
} else {
|
|
145
|
+
this.$emit("keyup", event);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
},
|
|
150
|
+
closeButtonIconSize() {
|
|
151
|
+
return CHIP_ICON_SIZES[this.size];
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
methods: {
|
|
155
|
+
chipClasses() {
|
|
156
|
+
return [
|
|
157
|
+
this.$attrs["grouped-chip"] ? "d-chip" : "d-chip__label",
|
|
158
|
+
CHIP_SIZE_MODIFIERS[this.size],
|
|
159
|
+
this.labelClass
|
|
160
|
+
];
|
|
161
|
+
},
|
|
162
|
+
chipCloseButtonClasses() {
|
|
163
|
+
return [
|
|
164
|
+
"d-chip__close",
|
|
165
|
+
CHIP_CLOSE_BUTTON_SIZE_MODIFIERS[this.size]
|
|
166
|
+
];
|
|
167
|
+
},
|
|
168
|
+
onClose() {
|
|
169
|
+
if (!this.hideClose) {
|
|
170
|
+
this.$emit("close");
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
var _sfc_render = function render() {
|
|
176
|
+
var _vm = this, _c = _vm._self._c;
|
|
177
|
+
return _c("span", { staticClass: "d-chip" }, [_c(_vm.interactive ? "button" : "span", _vm._g({ tag: "component", class: _vm.chipClasses(), attrs: { "id": _vm.id, "type": _vm.interactive && "button", "data-qa": "dt-chip", "aria-labelledby": _vm.ariaLabel ? void 0 : `${_vm.id}-content`, "aria-label": _vm.ariaLabel } }, _vm.chipListeners), [_vm.$slots.icon ? _c("span", { staticClass: "d-chip__icon", attrs: { "data-qa": "dt-chip-icon" } }, [_vm._t("icon")], 2) : _vm.$slots.avatar ? _c("span", { attrs: { "data-qa": "dt-chip-avatar" } }, [_vm._t("avatar")], 2) : _vm._e(), _vm.$slots.default ? _c("span", { class: ["d-chip__text", _vm.contentClass], attrs: { "id": `${_vm.id}-content`, "data-qa": "dt-chip-label" } }, [_vm._t("default")], 2) : _vm._e()]), !_vm.hideClose ? _c("dt-button", _vm._b({ class: _vm.chipCloseButtonClasses(), attrs: { "data-qa": "dt-chip-close", "aria-label": _vm.closeButtonProps.ariaLabel }, on: { "click": function($event) {
|
|
178
|
+
return _vm.$emit("close");
|
|
179
|
+
} }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
180
|
+
return [_c("dt-icon", { attrs: { "name": "close", "size": _vm.closeButtonIconSize } })];
|
|
181
|
+
}, proxy: true }], null, false, 1192647893) }, "dt-button", _vm.closeButtonProps, false)) : _vm._e()], 1);
|
|
182
|
+
};
|
|
183
|
+
var _sfc_staticRenderFns = [];
|
|
184
|
+
var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
185
|
+
_sfc_main,
|
|
186
|
+
_sfc_render,
|
|
187
|
+
_sfc_staticRenderFns,
|
|
188
|
+
false,
|
|
189
|
+
null,
|
|
190
|
+
null,
|
|
191
|
+
null,
|
|
192
|
+
null
|
|
193
|
+
);
|
|
194
|
+
const DtChip = __component__.exports;
|
|
195
|
+
exports.CHIP_CLOSE_BUTTON_SIZE_MODIFIERS = CHIP_CLOSE_BUTTON_SIZE_MODIFIERS;
|
|
196
|
+
exports.CHIP_ICON_SIZES = CHIP_ICON_SIZES;
|
|
197
|
+
exports.CHIP_SIZE_MODIFIERS = CHIP_SIZE_MODIFIERS;
|
|
198
|
+
exports.DtChip = DtChip;
|
|
199
|
+
//# sourceMappingURL=chip.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip.cjs","sources":["../../components/chip/chip_constants.js","../../components/chip/chip.vue"],"sourcesContent":["export const CHIP_SIZE_MODIFIERS = {\n xs: 'd-chip__label--xs',\n sm: 'd-chip__label--sm',\n md: '',\n};\n\nexport const CHIP_CLOSE_BUTTON_SIZE_MODIFIERS = {\n xs: 'd-chip__close--xs',\n sm: 'd-chip__close--sm',\n md: '',\n};\n\nexport const CHIP_ICON_SIZES = {\n xs: '200',\n sm: '200',\n md: '200',\n};\n\nexport default {\n CHIP_SIZE_MODIFIERS,\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n};\n","<template>\n <span class=\"d-chip\">\n <component\n :is=\"interactive ? 'button' : 'span'\"\n :id=\"id\"\n :type=\"interactive && 'button'\"\n :class=\"chipClasses()\"\n data-qa=\"dt-chip\"\n :aria-labelledby=\"ariaLabel ? undefined : `${id}-content`\"\n :aria-label=\"ariaLabel\"\n v-on=\"chipListeners\"\n >\n <span\n v-if=\"$slots.icon\"\n data-qa=\"dt-chip-icon\"\n class=\"d-chip__icon\"\n >\n <!-- @slot slot for Chip icon -->\n <slot name=\"icon\" />\n </span>\n <span\n v-else-if=\"$slots.avatar\"\n data-qa=\"dt-chip-avatar\"\n >\n <!-- @slot slot for Chip avatar -->\n <slot name=\"avatar\" />\n </span>\n <span\n v-if=\"$slots.default\"\n :id=\"`${id}-content`\"\n data-qa=\"dt-chip-label\"\n :class=\"['d-chip__text', contentClass]\"\n >\n <!-- @slot slot for Content within chip -->\n <slot />\n </span>\n </component>\n <dt-button\n v-if=\"!hideClose\"\n v-bind=\"closeButtonProps\"\n :class=\"chipCloseButtonClasses()\"\n data-qa=\"dt-chip-close\"\n :aria-label=\"closeButtonProps.ariaLabel\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n :size=\"closeButtonIconSize\"\n />\n </template>\n </dt-button>\n </span>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\nimport {\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n} from './chip_constants';\nimport { getUniqueString } from '@/common/utils';\n\n/**\n * A chip is a compact UI element that provides brief, descriptive information about an element.\n * It is terse, ideally one word. It is important a button is identifiable, consistent, and\n * communicates its actions clearly, and is appropriately sized to its action.\n * @see https://dialtone.dialpad.com/components/chip.html\n */\nexport default {\n name: 'DtChip',\n\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n /**\n * A set of props to be passed into the modal's close button. Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: function () { return { ariaLabel: 'close' }; },\n validator: (props) => {\n return !!props.ariaLabel;\n },\n },\n\n /**\n * Hides the close button on the chip\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The size of the chip.\n * @values xs, sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(CHIP_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * The interactivity of the chip.\n * Makes chip clickable, apply hover/focus/active style, emit keyboard events etc.\n * @values true, false\n */\n interactive: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n id: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Descriptive label for the chip content.\n * If this prop is unset the content in the default slot will be used as an aria-label.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the chip element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the span element.\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native chip click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native chip key up event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n ],\n\n data () {\n return {\n isActive: false,\n };\n },\n\n computed: {\n chipListeners () {\n return {\n ...this.$listeners,\n click: event => {\n if (this.interactive) this.$emit('click', event);\n },\n\n keyup: event => {\n if (event.code?.toLowerCase() === 'delete') {\n this.onClose();\n } else {\n this.$emit('keyup', event);\n }\n },\n };\n },\n\n closeButtonIconSize () {\n return CHIP_ICON_SIZES[this.size];\n },\n },\n\n methods: {\n chipClasses () {\n return [\n this.$attrs['grouped-chip'] ? 'd-chip' : 'd-chip__label',\n CHIP_SIZE_MODIFIERS[this.size],\n this.labelClass,\n ];\n },\n\n chipCloseButtonClasses () {\n return [\n 'd-chip__close',\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS[this.size],\n ];\n },\n\n onClose () {\n if (!this.hideClose) {\n this.$emit('close');\n }\n },\n },\n};\n</script>\n"],"names":["DtButton","DtIcon","getUniqueString"],"mappings":"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"}
|
package/dist/lib/chip.js
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
import { getUniqueString
|
|
2
|
-
import {
|
|
3
|
-
import { DtButton
|
|
4
|
-
import { DtIcon
|
|
5
|
-
import "
|
|
1
|
+
import { getUniqueString } from "../common/utils.js";
|
|
2
|
+
import { normalizeComponent } from "../chunks/_plugin-vue2_normalizer-sOSkiPF3.js";
|
|
3
|
+
import { DtButton } from "./button.js";
|
|
4
|
+
import { DtIcon } from "./icon.js";
|
|
5
|
+
import "../common/constants.js";
|
|
6
6
|
import "vue";
|
|
7
|
-
import "../chunks/link_constants-
|
|
7
|
+
import "../chunks/link_constants-nWVlXQBs.js";
|
|
8
8
|
import "@dialpad/dialtone-icons/vue2";
|
|
9
|
-
import "../chunks/icon_constants-
|
|
9
|
+
import "../chunks/icon_constants-Dy4MEUJL.js";
|
|
10
10
|
import "@dialpad/dialtone-icons/icons.json";
|
|
11
|
-
|
|
12
|
-
const a = {
|
|
11
|
+
const CHIP_SIZE_MODIFIERS = {
|
|
13
12
|
xs: "d-chip__label--xs",
|
|
14
13
|
sm: "d-chip__label--sm",
|
|
15
14
|
md: ""
|
|
16
|
-
}
|
|
15
|
+
};
|
|
16
|
+
const CHIP_CLOSE_BUTTON_SIZE_MODIFIERS = {
|
|
17
17
|
xs: "d-chip__close--xs",
|
|
18
18
|
sm: "d-chip__close--sm",
|
|
19
19
|
md: ""
|
|
20
|
-
}
|
|
20
|
+
};
|
|
21
|
+
const CHIP_ICON_SIZES = {
|
|
21
22
|
xs: "200",
|
|
22
23
|
sm: "200",
|
|
23
24
|
md: "200"
|
|
24
|
-
}
|
|
25
|
+
};
|
|
26
|
+
const _sfc_main = {
|
|
25
27
|
name: "DtChip",
|
|
26
28
|
components: {
|
|
27
|
-
DtButton
|
|
28
|
-
DtIcon
|
|
29
|
+
DtButton,
|
|
30
|
+
DtIcon
|
|
29
31
|
},
|
|
30
32
|
props: {
|
|
31
33
|
/**
|
|
@@ -36,7 +38,9 @@ const a = {
|
|
|
36
38
|
default: function() {
|
|
37
39
|
return { ariaLabel: "close" };
|
|
38
40
|
},
|
|
39
|
-
validator: (
|
|
41
|
+
validator: (props) => {
|
|
42
|
+
return !!props.ariaLabel;
|
|
43
|
+
}
|
|
40
44
|
},
|
|
41
45
|
/**
|
|
42
46
|
* Hides the close button on the chip
|
|
@@ -44,7 +48,7 @@ const a = {
|
|
|
44
48
|
*/
|
|
45
49
|
hideClose: {
|
|
46
50
|
type: Boolean,
|
|
47
|
-
default:
|
|
51
|
+
default: false
|
|
48
52
|
},
|
|
49
53
|
/**
|
|
50
54
|
* The size of the chip.
|
|
@@ -53,7 +57,7 @@ const a = {
|
|
|
53
57
|
size: {
|
|
54
58
|
type: String,
|
|
55
59
|
default: "md",
|
|
56
|
-
validator: (
|
|
60
|
+
validator: (s) => Object.keys(CHIP_SIZE_MODIFIERS).includes(s)
|
|
57
61
|
},
|
|
58
62
|
/**
|
|
59
63
|
* The interactivity of the chip.
|
|
@@ -62,7 +66,7 @@ const a = {
|
|
|
62
66
|
*/
|
|
63
67
|
interactive: {
|
|
64
68
|
type: Boolean,
|
|
65
|
-
default:
|
|
69
|
+
default: true
|
|
66
70
|
},
|
|
67
71
|
/**
|
|
68
72
|
* Id to use for the dialog's aria-labelledby.
|
|
@@ -70,7 +74,7 @@ const a = {
|
|
|
70
74
|
id: {
|
|
71
75
|
type: String,
|
|
72
76
|
default: function() {
|
|
73
|
-
return
|
|
77
|
+
return getUniqueString();
|
|
74
78
|
}
|
|
75
79
|
},
|
|
76
80
|
/**
|
|
@@ -120,67 +124,76 @@ const a = {
|
|
|
120
124
|
],
|
|
121
125
|
data() {
|
|
122
126
|
return {
|
|
123
|
-
isActive:
|
|
127
|
+
isActive: false
|
|
124
128
|
};
|
|
125
129
|
},
|
|
126
130
|
computed: {
|
|
127
131
|
chipListeners() {
|
|
128
132
|
return {
|
|
129
133
|
...this.$listeners,
|
|
130
|
-
click: (
|
|
131
|
-
this.interactive
|
|
134
|
+
click: (event) => {
|
|
135
|
+
if (this.interactive)
|
|
136
|
+
this.$emit("click", event);
|
|
132
137
|
},
|
|
133
|
-
keyup: (
|
|
134
|
-
var
|
|
135
|
-
((
|
|
138
|
+
keyup: (event) => {
|
|
139
|
+
var _a;
|
|
140
|
+
if (((_a = event.code) == null ? void 0 : _a.toLowerCase()) === "delete") {
|
|
141
|
+
this.onClose();
|
|
142
|
+
} else {
|
|
143
|
+
this.$emit("keyup", event);
|
|
144
|
+
}
|
|
136
145
|
}
|
|
137
146
|
};
|
|
138
147
|
},
|
|
139
148
|
closeButtonIconSize() {
|
|
140
|
-
return
|
|
149
|
+
return CHIP_ICON_SIZES[this.size];
|
|
141
150
|
}
|
|
142
151
|
},
|
|
143
152
|
methods: {
|
|
144
153
|
chipClasses() {
|
|
145
154
|
return [
|
|
146
155
|
this.$attrs["grouped-chip"] ? "d-chip" : "d-chip__label",
|
|
147
|
-
|
|
156
|
+
CHIP_SIZE_MODIFIERS[this.size],
|
|
148
157
|
this.labelClass
|
|
149
158
|
];
|
|
150
159
|
},
|
|
151
160
|
chipCloseButtonClasses() {
|
|
152
161
|
return [
|
|
153
162
|
"d-chip__close",
|
|
154
|
-
|
|
163
|
+
CHIP_CLOSE_BUTTON_SIZE_MODIFIERS[this.size]
|
|
155
164
|
];
|
|
156
165
|
},
|
|
157
166
|
onClose() {
|
|
158
|
-
this.hideClose
|
|
167
|
+
if (!this.hideClose) {
|
|
168
|
+
this.$emit("close");
|
|
169
|
+
}
|
|
159
170
|
}
|
|
160
171
|
}
|
|
161
172
|
};
|
|
162
|
-
var
|
|
163
|
-
var
|
|
164
|
-
return
|
|
165
|
-
return
|
|
166
|
-
} }, scopedSlots:
|
|
167
|
-
return [
|
|
168
|
-
}, proxy:
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
173
|
+
var _sfc_render = function render() {
|
|
174
|
+
var _vm = this, _c = _vm._self._c;
|
|
175
|
+
return _c("span", { staticClass: "d-chip" }, [_c(_vm.interactive ? "button" : "span", _vm._g({ tag: "component", class: _vm.chipClasses(), attrs: { "id": _vm.id, "type": _vm.interactive && "button", "data-qa": "dt-chip", "aria-labelledby": _vm.ariaLabel ? void 0 : `${_vm.id}-content`, "aria-label": _vm.ariaLabel } }, _vm.chipListeners), [_vm.$slots.icon ? _c("span", { staticClass: "d-chip__icon", attrs: { "data-qa": "dt-chip-icon" } }, [_vm._t("icon")], 2) : _vm.$slots.avatar ? _c("span", { attrs: { "data-qa": "dt-chip-avatar" } }, [_vm._t("avatar")], 2) : _vm._e(), _vm.$slots.default ? _c("span", { class: ["d-chip__text", _vm.contentClass], attrs: { "id": `${_vm.id}-content`, "data-qa": "dt-chip-label" } }, [_vm._t("default")], 2) : _vm._e()]), !_vm.hideClose ? _c("dt-button", _vm._b({ class: _vm.chipCloseButtonClasses(), attrs: { "data-qa": "dt-chip-close", "aria-label": _vm.closeButtonProps.ariaLabel }, on: { "click": function($event) {
|
|
176
|
+
return _vm.$emit("close");
|
|
177
|
+
} }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
178
|
+
return [_c("dt-icon", { attrs: { "name": "close", "size": _vm.closeButtonIconSize } })];
|
|
179
|
+
}, proxy: true }], null, false, 1192647893) }, "dt-button", _vm.closeButtonProps, false)) : _vm._e()], 1);
|
|
180
|
+
};
|
|
181
|
+
var _sfc_staticRenderFns = [];
|
|
182
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
183
|
+
_sfc_main,
|
|
184
|
+
_sfc_render,
|
|
185
|
+
_sfc_staticRenderFns,
|
|
186
|
+
false,
|
|
174
187
|
null,
|
|
175
188
|
null,
|
|
176
189
|
null,
|
|
177
190
|
null
|
|
178
191
|
);
|
|
179
|
-
const
|
|
192
|
+
const DtChip = __component__.exports;
|
|
180
193
|
export {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
194
|
+
CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,
|
|
195
|
+
CHIP_ICON_SIZES,
|
|
196
|
+
CHIP_SIZE_MODIFIERS,
|
|
197
|
+
DtChip
|
|
185
198
|
};
|
|
186
199
|
//# sourceMappingURL=chip.js.map
|
package/dist/lib/chip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.js","sources":["../../components/chip/chip_constants.js","../../components/chip/chip.vue"],"sourcesContent":["export const CHIP_SIZE_MODIFIERS = {\n xs: 'd-chip__label--xs',\n sm: 'd-chip__label--sm',\n md: '',\n};\n\nexport const CHIP_CLOSE_BUTTON_SIZE_MODIFIERS = {\n xs: 'd-chip__close--xs',\n sm: 'd-chip__close--sm',\n md: '',\n};\n\nexport const CHIP_ICON_SIZES = {\n xs: '200',\n sm: '200',\n md: '200',\n};\n\nexport default {\n CHIP_SIZE_MODIFIERS,\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n};\n","<template>\n <span class=\"d-chip\">\n <component\n :is=\"interactive ? 'button' : 'span'\"\n :id=\"id\"\n :type=\"interactive && 'button'\"\n :class=\"chipClasses()\"\n data-qa=\"dt-chip\"\n :aria-labelledby=\"ariaLabel ? undefined : `${id}-content`\"\n :aria-label=\"ariaLabel\"\n v-on=\"chipListeners\"\n >\n <span\n v-if=\"$slots.icon\"\n data-qa=\"dt-chip-icon\"\n class=\"d-chip__icon\"\n >\n <!-- @slot slot for Chip icon -->\n <slot name=\"icon\" />\n </span>\n <span\n v-else-if=\"$slots.avatar\"\n data-qa=\"dt-chip-avatar\"\n >\n <!-- @slot slot for Chip avatar -->\n <slot name=\"avatar\" />\n </span>\n <span\n v-if=\"$slots.default\"\n :id=\"`${id}-content`\"\n data-qa=\"dt-chip-label\"\n :class=\"['d-chip__text', contentClass]\"\n >\n <!-- @slot slot for Content within chip -->\n <slot />\n </span>\n </component>\n <dt-button\n v-if=\"!hideClose\"\n v-bind=\"closeButtonProps\"\n :class=\"chipCloseButtonClasses()\"\n data-qa=\"dt-chip-close\"\n :aria-label=\"closeButtonProps.ariaLabel\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n :size=\"closeButtonIconSize\"\n />\n </template>\n </dt-button>\n </span>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\nimport {\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n} from './chip_constants';\nimport { getUniqueString } from '@/common/utils';\n\n/**\n * A chip is a compact UI element that provides brief, descriptive information about an element.\n * It is terse, ideally one word. It is important a button is identifiable, consistent, and\n * communicates its actions clearly, and is appropriately sized to its action.\n * @see https://dialtone.dialpad.com/components/chip.html\n */\nexport default {\n name: 'DtChip',\n\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n /**\n * A set of props to be passed into the modal's close button. Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: function () { return { ariaLabel: 'close' }; },\n validator: (props) => {\n return !!props.ariaLabel;\n },\n },\n\n /**\n * Hides the close button on the chip\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The size of the chip.\n * @values xs, sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(CHIP_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * The interactivity of the chip.\n * Makes chip clickable, apply hover/focus/active style, emit keyboard events etc.\n * @values true, false\n */\n interactive: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n id: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Descriptive label for the chip content.\n * If this prop is unset the content in the default slot will be used as an aria-label.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the chip element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the span element.\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native chip click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native chip key up event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n ],\n\n data () {\n return {\n isActive: false,\n };\n },\n\n computed: {\n chipListeners () {\n return {\n ...this.$listeners,\n click: event => {\n if (this.interactive) this.$emit('click', event);\n },\n\n keyup: event => {\n if (event.code?.toLowerCase() === 'delete') {\n this.onClose();\n } else {\n this.$emit('keyup', event);\n }\n },\n };\n },\n\n closeButtonIconSize () {\n return CHIP_ICON_SIZES[this.size];\n },\n },\n\n methods: {\n chipClasses () {\n return [\n this.$attrs['grouped-chip'] ? 'd-chip' : 'd-chip__label',\n CHIP_SIZE_MODIFIERS[this.size],\n this.labelClass,\n ];\n },\n\n chipCloseButtonClasses () {\n return [\n 'd-chip__close',\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS[this.size],\n ];\n },\n\n onClose () {\n if (!this.hideClose) {\n this.$emit('close');\n }\n },\n },\n};\n</script>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"chip.js","sources":["../../components/chip/chip_constants.js","../../components/chip/chip.vue"],"sourcesContent":["export const CHIP_SIZE_MODIFIERS = {\n xs: 'd-chip__label--xs',\n sm: 'd-chip__label--sm',\n md: '',\n};\n\nexport const CHIP_CLOSE_BUTTON_SIZE_MODIFIERS = {\n xs: 'd-chip__close--xs',\n sm: 'd-chip__close--sm',\n md: '',\n};\n\nexport const CHIP_ICON_SIZES = {\n xs: '200',\n sm: '200',\n md: '200',\n};\n\nexport default {\n CHIP_SIZE_MODIFIERS,\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n};\n","<template>\n <span class=\"d-chip\">\n <component\n :is=\"interactive ? 'button' : 'span'\"\n :id=\"id\"\n :type=\"interactive && 'button'\"\n :class=\"chipClasses()\"\n data-qa=\"dt-chip\"\n :aria-labelledby=\"ariaLabel ? undefined : `${id}-content`\"\n :aria-label=\"ariaLabel\"\n v-on=\"chipListeners\"\n >\n <span\n v-if=\"$slots.icon\"\n data-qa=\"dt-chip-icon\"\n class=\"d-chip__icon\"\n >\n <!-- @slot slot for Chip icon -->\n <slot name=\"icon\" />\n </span>\n <span\n v-else-if=\"$slots.avatar\"\n data-qa=\"dt-chip-avatar\"\n >\n <!-- @slot slot for Chip avatar -->\n <slot name=\"avatar\" />\n </span>\n <span\n v-if=\"$slots.default\"\n :id=\"`${id}-content`\"\n data-qa=\"dt-chip-label\"\n :class=\"['d-chip__text', contentClass]\"\n >\n <!-- @slot slot for Content within chip -->\n <slot />\n </span>\n </component>\n <dt-button\n v-if=\"!hideClose\"\n v-bind=\"closeButtonProps\"\n :class=\"chipCloseButtonClasses()\"\n data-qa=\"dt-chip-close\"\n :aria-label=\"closeButtonProps.ariaLabel\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n :size=\"closeButtonIconSize\"\n />\n </template>\n </dt-button>\n </span>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\nimport {\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n} from './chip_constants';\nimport { getUniqueString } from '@/common/utils';\n\n/**\n * A chip is a compact UI element that provides brief, descriptive information about an element.\n * It is terse, ideally one word. It is important a button is identifiable, consistent, and\n * communicates its actions clearly, and is appropriately sized to its action.\n * @see https://dialtone.dialpad.com/components/chip.html\n */\nexport default {\n name: 'DtChip',\n\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n /**\n * A set of props to be passed into the modal's close button. Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: function () { return { ariaLabel: 'close' }; },\n validator: (props) => {\n return !!props.ariaLabel;\n },\n },\n\n /**\n * Hides the close button on the chip\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The size of the chip.\n * @values xs, sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(CHIP_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * The interactivity of the chip.\n * Makes chip clickable, apply hover/focus/active style, emit keyboard events etc.\n * @values true, false\n */\n interactive: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n id: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Descriptive label for the chip content.\n * If this prop is unset the content in the default slot will be used as an aria-label.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the chip element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the span element.\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native chip click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native chip key up event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n ],\n\n data () {\n return {\n isActive: false,\n };\n },\n\n computed: {\n chipListeners () {\n return {\n ...this.$listeners,\n click: event => {\n if (this.interactive) this.$emit('click', event);\n },\n\n keyup: event => {\n if (event.code?.toLowerCase() === 'delete') {\n this.onClose();\n } else {\n this.$emit('keyup', event);\n }\n },\n };\n },\n\n closeButtonIconSize () {\n return CHIP_ICON_SIZES[this.size];\n },\n },\n\n methods: {\n chipClasses () {\n return [\n this.$attrs['grouped-chip'] ? 'd-chip' : 'd-chip__label',\n CHIP_SIZE_MODIFIERS[this.size],\n this.labelClass,\n ];\n },\n\n chipCloseButtonClasses () {\n return [\n 'd-chip__close',\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS[this.size],\n ];\n },\n\n onClose () {\n if (!this.hideClose) {\n this.$emit('close');\n }\n },\n },\n};\n</script>\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-1aBeR4AK.js");
|
|
4
|
+
const _sfc_main = {
|
|
5
|
+
name: "DtCodeblock",
|
|
6
|
+
props: {
|
|
7
|
+
text: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: true
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
var _sfc_render = function render() {
|
|
14
|
+
var _vm = this, _c = _vm._self._c;
|
|
15
|
+
return _c("pre", [_vm._v(" "), _c("code", { staticClass: "d-codeblock" }, [_vm._v(_vm._s(_vm.text))]), _vm._v("\n")]);
|
|
16
|
+
};
|
|
17
|
+
var _sfc_staticRenderFns = [];
|
|
18
|
+
var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
19
|
+
_sfc_main,
|
|
20
|
+
_sfc_render,
|
|
21
|
+
_sfc_staticRenderFns,
|
|
22
|
+
false,
|
|
23
|
+
null,
|
|
24
|
+
null,
|
|
25
|
+
null,
|
|
26
|
+
null
|
|
27
|
+
);
|
|
28
|
+
const codeblock = __component__.exports;
|
|
29
|
+
exports.DtCodeblock = codeblock;
|
|
30
|
+
//# sourceMappingURL=codeblock.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codeblock.cjs","sources":["../../components/codeblock/codeblock.vue"],"sourcesContent":["<template>\n <pre>\n <code\n class=\"d-codeblock\"\n >{{ text }}</code>\n </pre>\n</template>\n\n<script>\nexport default {\n name: 'DtCodeblock',\n\n props: {\n text: {\n type: String,\n required: true,\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;AASA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
|
package/dist/lib/codeblock.js
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
1
|
+
import { normalizeComponent } from "../chunks/_plugin-vue2_normalizer-sOSkiPF3.js";
|
|
2
|
+
const _sfc_main = {
|
|
3
3
|
name: "DtCodeblock",
|
|
4
4
|
props: {
|
|
5
5
|
text: {
|
|
6
6
|
type: String,
|
|
7
|
-
required:
|
|
7
|
+
required: true
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
var _sfc_render = function render() {
|
|
12
|
+
var _vm = this, _c = _vm._self._c;
|
|
13
|
+
return _c("pre", [_vm._v(" "), _c("code", { staticClass: "d-codeblock" }, [_vm._v(_vm._s(_vm.text))]), _vm._v("\n")]);
|
|
14
|
+
};
|
|
15
|
+
var _sfc_staticRenderFns = [];
|
|
16
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
17
|
+
_sfc_main,
|
|
18
|
+
_sfc_render,
|
|
19
|
+
_sfc_staticRenderFns,
|
|
20
|
+
false,
|
|
20
21
|
null,
|
|
21
22
|
null,
|
|
22
23
|
null,
|
|
23
24
|
null
|
|
24
25
|
);
|
|
25
|
-
const
|
|
26
|
+
const codeblock = __component__.exports;
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
+
codeblock as DtCodeblock
|
|
28
29
|
};
|
|
29
30
|
//# sourceMappingURL=codeblock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeblock.js","sources":["../../components/codeblock/codeblock.vue"],"sourcesContent":["<template>\n <pre>\n <code\n class=\"d-codeblock\"\n >{{ text }}</code>\n </pre>\n</template>\n\n<script>\nexport default {\n name: 'DtCodeblock',\n\n props: {\n text: {\n type: String,\n required: true,\n },\n },\n};\n</script>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"codeblock.js","sources":["../../components/codeblock/codeblock.vue"],"sourcesContent":["<template>\n <pre>\n <code\n class=\"d-codeblock\"\n >{{ text }}</code>\n </pre>\n</template>\n\n<script>\nexport default {\n name: 'DtCodeblock',\n\n props: {\n text: {\n type: String,\n required: true,\n },\n },\n};\n</script>\n"],"names":[],"mappings":";AASA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
|