@dialpad/dialtone-vue 3.219.0 → 3.220.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{attachment_carousel-CouFqFMw.js → attachment_carousel-1qxTI-NN.js} +5 -5
- package/dist/attachment_carousel-1qxTI-NN.js.map +1 -0
- package/dist/attachment_carousel-wnZS3vEt.cjs +2 -0
- package/dist/attachment_carousel-wnZS3vEt.cjs.map +1 -0
- package/dist/{combobox-DgClbLOg.js → combobox-BQBKrDTW.js} +36 -35
- package/dist/combobox-BQBKrDTW.js.map +1 -0
- package/dist/combobox-Da7wBh3G.cjs +3 -0
- package/dist/combobox-Da7wBh3G.cjs.map +1 -0
- package/dist/common/composables/useIndicatorAnimation.cjs +2 -0
- package/dist/common/composables/useIndicatorAnimation.cjs.map +1 -0
- package/dist/common/composables/useIndicatorAnimation.d.ts +18 -0
- package/dist/common/composables/useIndicatorAnimation.d.ts.map +1 -0
- package/dist/common/composables/useIndicatorAnimation.js +78 -0
- package/dist/common/composables/useIndicatorAnimation.js.map +1 -0
- package/dist/common/constants/index.cjs +1 -1
- package/dist/common/constants/index.cjs.map +1 -1
- package/dist/common/constants/index.d.ts +27 -21
- package/dist/common/constants/index.d.ts.map +1 -1
- package/dist/common/constants/index.js +25 -14
- package/dist/common/constants/index.js.map +1 -1
- package/dist/common/constants/sizes.cjs +2 -0
- package/dist/common/constants/sizes.cjs.map +1 -0
- package/dist/common/constants/sizes.d.ts +22 -0
- package/dist/common/constants/sizes.d.ts.map +1 -0
- package/dist/common/constants/sizes.js +19 -0
- package/dist/common/constants/sizes.js.map +1 -0
- package/dist/common/mixins/index.cjs +1 -1
- package/dist/common/mixins/index.d.ts +1 -0
- package/dist/common/mixins/index.js +2 -1
- package/dist/common/mixins/input.cjs +1 -1
- package/dist/common/mixins/input.cjs.map +1 -1
- package/dist/common/mixins/input.d.ts +27 -33
- package/dist/common/mixins/input.d.ts.map +1 -1
- package/dist/common/mixins/input.js +0 -8
- package/dist/common/mixins/input.js.map +1 -1
- package/dist/common/mixins/mode.cjs +2 -0
- package/dist/common/mixins/mode.cjs.map +1 -0
- package/dist/common/mixins/mode.d.ts +25 -0
- package/dist/common/mixins/mode.d.ts.map +1 -0
- package/dist/common/mixins/mode.js +62 -0
- package/dist/common/mixins/mode.js.map +1 -0
- package/dist/common/mode_constants.d.ts +37 -0
- package/dist/common/mode_constants.d.ts.map +1 -0
- package/dist/common/sr_only_close_button.vue.d.ts +53 -7
- package/dist/common/sr_only_close_button.vue.d.ts.map +1 -1
- package/dist/common/utils/index.cjs +1 -1
- package/dist/common/utils/index.cjs.map +1 -1
- package/dist/common/utils/index.d.ts +2 -8
- package/dist/common/utils/index.d.ts.map +1 -1
- package/dist/common/utils/index.js +79 -88
- package/dist/common/utils/index.js.map +1 -1
- package/dist/component-documentation.json +1 -1
- package/dist/components/avatar/avatar.vue.d.ts +85 -27
- package/dist/components/avatar/avatar.vue.d.ts.map +1 -1
- package/dist/components/avatar/avatar_constants.d.ts +86 -29
- package/dist/components/avatar/avatar_constants.d.ts.map +1 -1
- package/dist/components/avatar/index.d.ts +1 -1
- package/dist/components/badge/badge.vue.d.ts +1 -1
- package/dist/components/badge/badge.vue.d.ts.map +1 -1
- package/dist/components/badge/badge_constants.d.ts +1 -1
- package/dist/components/banner/banner.vue.d.ts +269 -34
- package/dist/components/banner/banner.vue.d.ts.map +1 -1
- package/dist/components/box/box.vue.d.ts +73 -0
- package/dist/components/box/box.vue.d.ts.map +1 -0
- package/dist/components/box/box_constants.d.ts +11 -0
- package/dist/components/box/box_constants.d.ts.map +1 -0
- package/dist/components/box/index.d.ts +3 -0
- package/dist/components/box/index.d.ts.map +1 -0
- package/dist/components/box/validators.d.ts +11 -0
- package/dist/components/box/validators.d.ts.map +1 -0
- package/dist/components/breadcrumbs/breadcrumb_item.vue.d.ts +26 -17
- package/dist/components/breadcrumbs/breadcrumb_item.vue.d.ts.map +1 -1
- package/dist/components/breadcrumbs/breadcrumbs.vue.d.ts +25 -16
- package/dist/components/button/button.vue.d.ts +53 -7
- package/dist/components/button/button.vue.d.ts.map +1 -1
- package/dist/components/button/button_constants.d.ts +29 -20
- package/dist/components/button/button_constants.d.ts.map +1 -1
- package/dist/components/card/card.vue.d.ts +0 -9
- package/dist/components/card/card.vue.d.ts.map +1 -1
- package/dist/components/checkbox/checkbox.vue.d.ts +183 -10
- package/dist/components/checkbox/checkbox.vue.d.ts.map +1 -1
- package/dist/components/checkbox/checkbox_constants.d.ts +2 -2
- package/dist/components/checkbox_group/checkbox_group.vue.d.ts +142 -0
- package/dist/components/chip/chip.vue.d.ts +62 -16
- package/dist/components/chip/chip.vue.d.ts.map +1 -1
- package/dist/components/chip/chip_constants.d.ts +24 -21
- package/dist/components/chip/chip_constants.d.ts.map +1 -1
- package/dist/components/codeblock/codeblock.vue.d.ts +25 -2
- package/dist/components/codeblock/codeblock.vue.d.ts.map +1 -1
- package/dist/components/codeblock/codeblock_constants.d.ts +9 -0
- package/dist/components/codeblock/codeblock_constants.d.ts.map +1 -0
- package/dist/components/collapsible/collapsible.vue.d.ts +53 -7
- package/dist/components/collapsible/collapsible.vue.d.ts.map +1 -1
- package/dist/components/combobox/combobox.vue.d.ts +113 -38
- package/dist/components/combobox/combobox.vue.d.ts.map +1 -1
- package/dist/components/combobox/combobox_empty-list.vue.d.ts +40 -7
- package/dist/components/combobox/combobox_empty-list.vue.d.ts.map +1 -1
- package/dist/components/combobox/combobox_loading-list.vue.d.ts +64 -22
- package/dist/components/combobox/combobox_loading-list.vue.d.ts.map +1 -1
- package/dist/components/combobox_multi_select/combobox_multi_select_constants.d.ts +16 -13
- package/dist/components/combobox_multi_select/combobox_multi_select_constants.d.ts.map +1 -1
- package/dist/components/combobox_with_popover/combobox_with_popover.vue.d.ts +399 -93
- package/dist/components/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
- package/dist/components/datepicker/modules/month-year-picker.vue.d.ts.map +1 -1
- package/dist/components/dropdown/dropdown.vue.d.ts +175 -19
- package/dist/components/dropdown/dropdown.vue.d.ts.map +1 -1
- package/dist/components/emoji/emoji.vue.d.ts +24 -15
- package/dist/components/emoji_picker/emoji_picker.vue.d.ts +204 -22
- package/dist/components/emoji_picker/modules/emoji_search.vue.d.ts +204 -22
- package/dist/components/emoji_picker/modules/emoji_search.vue.d.ts.map +1 -1
- package/dist/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
- package/dist/components/emoji_text_wrapper/emoji_text_wrapper.vue.d.ts +24 -15
- package/dist/components/emoji_text_wrapper/emoji_text_wrapper.vue.d.ts.map +1 -1
- package/dist/components/empty_state/empty_state.vue.d.ts.map +1 -1
- package/dist/components/empty_state/empty_state_constants.d.ts +52 -31
- package/dist/components/empty_state/empty_state_constants.d.ts.map +1 -1
- package/dist/components/filter_pill/filter_pill.vue.d.ts +4491 -0
- package/dist/components/filter_pill/filter_pill.vue.d.ts.map +1 -0
- package/dist/components/filter_pill/index.d.ts +2 -0
- package/dist/components/filter_pill/index.d.ts.map +1 -0
- package/dist/components/hovercard/hovercard.vue.d.ts +380 -41
- package/dist/components/hovercard/hovercard.vue.d.ts.map +1 -1
- package/dist/components/image_viewer/image_viewer.vue.d.ts +131 -14
- package/dist/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
- package/dist/components/input/input.vue.d.ts +195 -19
- package/dist/components/input/input.vue.d.ts.map +1 -1
- package/dist/components/input/input_constants.d.ts +46 -48
- package/dist/components/input/input_constants.d.ts.map +1 -1
- package/dist/components/input_group/input_group.vue.d.ts +142 -0
- package/dist/components/input_group/input_group.vue.d.ts.map +1 -1
- package/dist/components/item_layout/item_layout.vue.d.ts +37 -6
- package/dist/components/item_layout/item_layout.vue.d.ts.map +1 -1
- package/dist/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +142 -0
- package/dist/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
- package/dist/components/link/index.d.ts +1 -1
- package/dist/components/link/link.vue.d.ts +25 -6
- package/dist/components/link/link_constants.d.ts +4 -4
- package/dist/components/link/link_constants.d.ts.map +1 -1
- package/dist/components/list_item/list_item.vue.d.ts +40 -7
- package/dist/components/list_item/list_item.vue.d.ts.map +1 -1
- package/dist/components/modal/modal.vue.d.ts +292 -97
- package/dist/components/modal/modal.vue.d.ts.map +1 -1
- package/dist/components/modal/modal_constants.d.ts +7 -6
- package/dist/components/mode_island/index.d.ts +3 -0
- package/dist/components/mode_island/index.d.ts.map +1 -0
- package/dist/components/mode_island/mode_island.vue.d.ts +3 -0
- package/dist/components/mode_island/mode_island.vue.d.ts.map +1 -0
- package/dist/components/mode_island/mode_island_constants.d.ts +10 -0
- package/dist/components/mode_island/mode_island_constants.d.ts.map +1 -0
- package/dist/components/mode_island/utils.d.ts +12 -0
- package/dist/components/mode_island/utils.d.ts.map +1 -0
- package/dist/components/mode_island/validators.d.ts +6 -0
- package/dist/components/mode_island/validators.d.ts.map +1 -0
- package/dist/components/motion_text/motion_text_constants.d.ts +27 -23
- package/dist/components/motion_text/motion_text_constants.d.ts.map +1 -1
- package/dist/components/notice/notice.vue.d.ts +269 -34
- package/dist/components/notice/notice.vue.d.ts.map +1 -1
- package/dist/components/notice/notice_action.vue.d.ts +112 -20
- package/dist/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/components/notice/notice_constants.d.ts.map +1 -1
- package/dist/components/notice/notice_content.vue.d.ts +144 -1
- package/dist/components/notice/notice_content.vue.d.ts.map +1 -1
- package/dist/components/notice/notice_icon.vue.d.ts +2 -2
- package/dist/components/notice/notice_icon.vue.d.ts.map +1 -1
- package/dist/components/pagination/pagination.vue.d.ts +56 -10
- package/dist/components/pagination/pagination.vue.d.ts.map +1 -1
- package/dist/components/popover/popover.vue.d.ts +163 -18
- package/dist/components/popover/popover.vue.d.ts.map +1 -1
- package/dist/components/popover/popover_header_footer.vue.d.ts +62 -7
- package/dist/components/popover/popover_header_footer.vue.d.ts.map +1 -1
- package/dist/components/radio/radio.vue.d.ts +178 -6
- package/dist/components/radio/radio.vue.d.ts.map +1 -1
- package/dist/components/radio/radio_constants.d.ts +2 -2
- package/dist/components/radio_group/radio_group.vue.d.ts +142 -0
- package/dist/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +25 -6
- package/dist/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts.map +1 -1
- package/dist/components/rich_text_editor/extensions/channels/ChannelSuggestion.vue.d.ts.map +1 -1
- package/dist/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +24 -15
- package/dist/components/rich_text_editor/extensions/emoji/EmojiSuggestion.vue.d.ts +24 -15
- package/dist/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +25 -6
- package/dist/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts +227 -27
- package/dist/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts.map +1 -1
- package/dist/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.d.ts +144 -1
- package/dist/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.d.ts.map +1 -1
- package/dist/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts +40 -7
- package/dist/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts.map +1 -1
- package/dist/components/rich_text_editor/extensions/variable/VariableComponent.vue.d.ts +411 -44
- package/dist/components/rich_text_editor/extensions/variable/VariableComponent.vue.d.ts.map +1 -1
- package/dist/components/rich_text_editor/rich_text_editor.vue.d.ts +59 -13
- package/dist/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/components/root_layout/root_layout_constants.d.ts +2 -0
- package/dist/components/root_layout/root_layout_constants.d.ts.map +1 -1
- package/dist/components/scroller/modules/core_scroller.vue.d.ts +2 -2
- package/dist/components/scroller/modules/dynamic_scroller.vue.d.ts +12 -12
- package/dist/components/scroller/scroller.vue.d.ts +18 -18
- package/dist/components/segmented_control/index.d.ts +4 -0
- package/dist/components/segmented_control/index.d.ts.map +1 -0
- package/dist/components/segmented_control/segmented_control.vue.d.ts +226 -0
- package/dist/components/segmented_control/segmented_control.vue.d.ts.map +1 -0
- package/dist/components/segmented_control/segmented_control_constants.d.ts +41 -0
- package/dist/components/segmented_control/segmented_control_constants.d.ts.map +1 -0
- package/dist/components/segmented_control/segmented_control_item.vue.d.ts +35 -0
- package/dist/components/segmented_control/segmented_control_item.vue.d.ts.map +1 -0
- package/dist/components/select_menu/select_menu.vue.d.ts +189 -31
- package/dist/components/select_menu/select_menu.vue.d.ts.map +1 -1
- package/dist/components/select_menu/select_menu_constants.d.ts +14 -9
- package/dist/components/select_menu/select_menu_constants.d.ts.map +1 -1
- package/dist/components/skeleton/skeleton-list-item.vue.d.ts +13 -10
- package/dist/components/skeleton/skeleton-paragraph.vue.d.ts +3 -0
- package/dist/components/skeleton/skeleton-shape.vue.d.ts +5 -5
- package/dist/components/skeleton/skeleton-text.vue.d.ts +3 -0
- package/dist/components/skeleton/skeleton.vue.d.ts +24 -15
- package/dist/components/skeleton/skeleton_constants.d.ts +18 -13
- package/dist/components/skeleton/skeleton_constants.d.ts.map +1 -1
- package/dist/components/split_button/{split_button-omega.vue.d.ts → split_button-end.vue.d.ts} +64 -13
- package/dist/components/split_button/{split_button-omega.vue.d.ts.map → split_button-end.vue.d.ts.map} +1 -1
- package/dist/components/split_button/{split_button-alpha.vue.d.ts → split_button-start.vue.d.ts} +125 -11
- package/dist/components/split_button/split_button-start.vue.d.ts.map +1 -0
- package/dist/components/split_button/split_button.vue.d.ts +602 -78
- package/dist/components/split_button/split_button.vue.d.ts.map +1 -1
- package/dist/components/split_button/split_button_constants.d.ts +12 -7
- package/dist/components/split_button/split_button_constants.d.ts.map +1 -1
- package/dist/components/stack/stack_constants.d.ts.map +1 -1
- package/dist/components/tab/index.d.ts +1 -1
- package/dist/components/tab/tab.vue.d.ts +86 -11
- package/dist/components/tab/tab.vue.d.ts.map +1 -1
- package/dist/components/tab/tab_group.vue.d.ts +125 -10
- package/dist/components/tab/tab_group.vue.d.ts.map +1 -1
- package/dist/components/tab/tabs_constants.d.ts +23 -5
- package/dist/components/tab/tabs_constants.d.ts.map +1 -1
- package/dist/components/text/index.d.ts +3 -0
- package/dist/components/text/index.d.ts.map +1 -0
- package/dist/components/text/text.vue.d.ts +145 -0
- package/dist/components/text/text.vue.d.ts.map +1 -0
- package/dist/components/text/text_constants.d.ts +93 -0
- package/dist/components/text/text_constants.d.ts.map +1 -0
- package/dist/components/toast/layouts/toast_layout_alternate.vue.d.ts +264 -29
- package/dist/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
- package/dist/components/toast/layouts/toast_layout_alternate_icon.vue.d.ts +2 -2
- package/dist/components/toast/layouts/toast_layout_alternate_icon.vue.d.ts.map +1 -1
- package/dist/components/toast/layouts/toast_layout_default.vue.d.ts +267 -32
- package/dist/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
- package/dist/components/toast/toast.vue.d.ts +1125 -185
- package/dist/components/toast/toast.vue.d.ts.map +1 -1
- package/dist/components/toggle/toggle.vue.d.ts +19 -19
- package/dist/components/toggle/toggle.vue.d.ts.map +1 -1
- package/dist/components/toggle/toggle_constants.d.ts +6 -4
- package/dist/components/toggle/toggle_constants.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.vue.d.ts +31 -5
- package/dist/components/tooltip/tooltip.vue.d.ts.map +1 -1
- package/dist/{datepicker-LVDRC6Lf.js → datepicker-B2nhxiCg.js} +20 -24
- package/dist/datepicker-B2nhxiCg.js.map +1 -0
- package/dist/datepicker-CZrNL0Yn.cjs +2 -0
- package/dist/datepicker-CZrNL0Yn.cjs.map +1 -0
- package/dist/dialtone-vue.cjs +1 -1
- package/dist/dialtone-vue.css +1 -1
- package/dist/dialtone-vue.js +170 -150
- package/dist/directives/focusgroup_directive/focusgroup.d.ts +6 -0
- package/dist/directives/focusgroup_directive/focusgroup.d.ts.map +1 -0
- package/dist/directives/focusgroup_directive/focusgroup_constants.d.ts +74 -0
- package/dist/directives/focusgroup_directive/focusgroup_constants.d.ts.map +1 -0
- package/dist/directives/focusgroup_directive/focusgroup_utils.d.ts +15 -0
- package/dist/directives/focusgroup_directive/focusgroup_utils.d.ts.map +1 -0
- package/dist/directives/focusgroup_directive/index.d.ts +2 -0
- package/dist/directives/focusgroup_directive/index.d.ts.map +1 -0
- package/dist/directives/focustrap_directive/focustrap.d.ts +6 -0
- package/dist/directives/focustrap_directive/focustrap.d.ts.map +1 -0
- package/dist/directives/focustrap_directive/focustrap_constants.d.ts +7 -0
- package/dist/directives/focustrap_directive/focustrap_constants.d.ts.map +1 -0
- package/dist/directives/focustrap_directive/focustrap_utils.d.ts +5 -0
- package/dist/directives/focustrap_directive/focustrap_utils.d.ts.map +1 -0
- package/dist/directives/focustrap_directive/index.d.ts +2 -0
- package/dist/directives/focustrap_directive/index.d.ts.map +1 -0
- package/dist/directives/mode_directive/index.d.ts +2 -0
- package/dist/directives/mode_directive/index.d.ts.map +1 -0
- package/dist/directives/mode_directive/mode.d.ts +6 -0
- package/dist/directives/mode_directive/mode.d.ts.map +1 -0
- package/dist/directives/tooltip_directive/tooltip.d.ts.map +1 -1
- package/dist/emoji_picker-BQW4qRFg.cjs +2 -0
- package/dist/emoji_picker-BQW4qRFg.cjs.map +1 -0
- package/dist/{emoji_picker-tVHfpHDk.js → emoji_picker-BjgAohQy.js} +9 -8
- package/dist/emoji_picker-BjgAohQy.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/lib/attachment-carousel/attachment-carousel.cjs +1 -1
- package/dist/lib/attachment-carousel/attachment-carousel.js +1 -1
- package/dist/lib/attachment-carousel/index.cjs +1 -1
- package/dist/lib/attachment-carousel/index.js +1 -1
- package/dist/lib/avatar/avatar-constants.cjs +1 -1
- package/dist/lib/avatar/avatar-constants.cjs.map +1 -1
- package/dist/lib/avatar/avatar-constants.js +111 -24
- package/dist/lib/avatar/avatar-constants.js.map +1 -1
- package/dist/lib/avatar/avatar.cjs +1 -1
- package/dist/lib/avatar/avatar.cjs.map +1 -1
- package/dist/lib/avatar/avatar.js +145 -84
- package/dist/lib/avatar/avatar.js.map +1 -1
- package/dist/lib/avatar/index.cjs +1 -1
- package/dist/lib/avatar/index.js +3 -3
- package/dist/lib/badge/badge-constants.cjs +1 -1
- package/dist/lib/badge/badge-constants.cjs.map +1 -1
- package/dist/lib/badge/badge-constants.js +1 -1
- package/dist/lib/badge/badge-constants.js.map +1 -1
- package/dist/lib/badge/badge.cjs +1 -1
- package/dist/lib/badge/badge.cjs.map +1 -1
- package/dist/lib/badge/badge.js +26 -14
- package/dist/lib/badge/badge.js.map +1 -1
- package/dist/lib/banner/banner.cjs +2 -2
- package/dist/lib/banner/banner.cjs.map +1 -1
- package/dist/lib/banner/banner.js +17 -16
- package/dist/lib/banner/banner.js.map +1 -1
- package/dist/lib/box/box-constants.cjs +2 -0
- package/dist/lib/box/box-constants.cjs.map +1 -0
- package/dist/lib/box/box-constants.js +103 -0
- package/dist/lib/box/box-constants.js.map +1 -0
- package/dist/lib/box/box.cjs +2 -0
- package/dist/lib/box/box.cjs.map +1 -0
- package/dist/lib/box/box.js +229 -0
- package/dist/lib/box/box.js.map +1 -0
- package/dist/lib/box/index.cjs +1 -0
- package/dist/lib/box/index.js +3 -0
- package/dist/lib/box/validators.cjs +2 -0
- package/dist/lib/box/validators.cjs.map +1 -0
- package/dist/lib/box/validators.js +7 -0
- package/dist/lib/box/validators.js.map +1 -0
- package/dist/lib/breadcrumbs/breadcrumb-item.cjs +1 -1
- package/dist/lib/breadcrumbs/breadcrumb-item.cjs.map +1 -1
- package/dist/lib/breadcrumbs/breadcrumb-item.js +29 -38
- package/dist/lib/breadcrumbs/breadcrumb-item.js.map +1 -1
- package/dist/lib/breadcrumbs/breadcrumbs.cjs +1 -1
- package/dist/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
- package/dist/lib/breadcrumbs/breadcrumbs.js +6 -6
- package/dist/lib/breadcrumbs/breadcrumbs.js.map +1 -1
- package/dist/lib/button/button-constants.cjs +1 -1
- package/dist/lib/button/button-constants.cjs.map +1 -1
- package/dist/lib/button/button-constants.js +17 -3
- package/dist/lib/button/button-constants.js.map +1 -1
- package/dist/lib/button/button.cjs +1 -1
- package/dist/lib/button/button.cjs.map +1 -1
- package/dist/lib/button/button.js +98 -15
- package/dist/lib/button/button.js.map +1 -1
- package/dist/lib/button-group/button-group.cjs.map +1 -1
- package/dist/lib/button-group/button-group.js.map +1 -1
- package/dist/lib/callbar-button/callbar-button.cjs +1 -1
- package/dist/lib/callbar-button/callbar-button.cjs.map +1 -1
- package/dist/lib/callbar-button/callbar-button.js +26 -27
- package/dist/lib/callbar-button/callbar-button.js.map +1 -1
- package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
- package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
- package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +45 -36
- package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
- package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
- package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
- package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.js +47 -38
- package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
- package/dist/lib/callbox/callbox.cjs +1 -1
- package/dist/lib/callbox/callbox.cjs.map +1 -1
- package/dist/lib/callbox/callbox.js +4 -4
- package/dist/lib/callbox/callbox.js.map +1 -1
- package/dist/lib/card/card.cjs +1 -1
- package/dist/lib/card/card.cjs.map +1 -1
- package/dist/lib/card/card.js +10 -18
- package/dist/lib/card/card.js.map +1 -1
- package/dist/lib/checkbox/checkbox-constants.cjs +1 -1
- package/dist/lib/checkbox/checkbox-constants.cjs.map +1 -1
- package/dist/lib/checkbox/checkbox-constants.js +2 -2
- package/dist/lib/checkbox/checkbox-constants.js.map +1 -1
- package/dist/lib/checkbox/checkbox.cjs +1 -1
- package/dist/lib/checkbox/checkbox.cjs.map +1 -1
- package/dist/lib/checkbox/checkbox.js +79 -28
- package/dist/lib/checkbox/checkbox.js.map +1 -1
- package/dist/lib/checkbox-group/checkboxes-decorator.cjs +1 -1
- package/dist/lib/checkbox-group/checkboxes-decorator.cjs.map +1 -1
- package/dist/lib/checkbox-group/checkboxes-decorator.js +0 -1
- package/dist/lib/checkbox-group/checkboxes-decorator.js.map +1 -1
- package/dist/lib/chip/chip-constants.cjs +1 -1
- package/dist/lib/chip/chip-constants.cjs.map +1 -1
- package/dist/lib/chip/chip-constants.js +9 -0
- package/dist/lib/chip/chip-constants.js.map +1 -1
- package/dist/lib/chip/chip.cjs +1 -1
- package/dist/lib/chip/chip.cjs.map +1 -1
- package/dist/lib/chip/chip.js +13 -13
- package/dist/lib/chip/chip.js.map +1 -1
- package/dist/lib/codeblock/codeblock-constants.cjs +2 -0
- package/dist/lib/codeblock/codeblock-constants.cjs.map +1 -0
- package/dist/lib/codeblock/codeblock-constants.js +20 -0
- package/dist/lib/codeblock/codeblock-constants.js.map +1 -0
- package/dist/lib/codeblock/codeblock.cjs +1 -2
- package/dist/lib/codeblock/codeblock.cjs.map +1 -1
- package/dist/lib/codeblock/codeblock.js +25 -14
- package/dist/lib/codeblock/codeblock.js.map +1 -1
- package/dist/lib/collapsible/collapsible.cjs +1 -1
- package/dist/lib/collapsible/collapsible.cjs.map +1 -1
- package/dist/lib/collapsible/collapsible.js +1 -1
- package/dist/lib/collapsible/collapsible.js.map +1 -1
- package/dist/lib/combobox/combobox.cjs +1 -1
- package/dist/lib/combobox/combobox.js +1 -1
- package/dist/lib/combobox/index.cjs +1 -1
- package/dist/lib/combobox/index.js +1 -1
- package/dist/lib/combobox-multi-select/combobox-multi-select-constants.cjs +1 -1
- package/dist/lib/combobox-multi-select/combobox-multi-select-constants.cjs.map +1 -1
- package/dist/lib/combobox-multi-select/combobox-multi-select-constants.js +6 -0
- package/dist/lib/combobox-multi-select/combobox-multi-select-constants.js.map +1 -1
- package/dist/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
- package/dist/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
- package/dist/lib/combobox-multi-select/combobox-multi-select.js +34 -33
- package/dist/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
- package/dist/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
- package/dist/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
- package/dist/lib/combobox-with-popover/combobox-with-popover.js +51 -46
- package/dist/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
- package/dist/lib/contact-centers-row/contact-centers-row.cjs +1 -1
- package/dist/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
- package/dist/lib/contact-centers-row/contact-centers-row.js +51 -45
- package/dist/lib/contact-centers-row/contact-centers-row.js.map +1 -1
- package/dist/lib/contact-info/contact-info.cjs +1 -1
- package/dist/lib/contact-info/contact-info.cjs.map +1 -1
- package/dist/lib/contact-info/contact-info.js +8 -8
- package/dist/lib/contact-info/contact-info.js.map +1 -1
- package/dist/lib/contact-row/contact-row.cjs +1 -1
- package/dist/lib/contact-row/contact-row.cjs.map +1 -1
- package/dist/lib/contact-row/contact-row.js +3 -3
- package/dist/lib/contact-row/contact-row.js.map +1 -1
- package/dist/lib/datepicker/datepicker.cjs +1 -1
- package/dist/lib/datepicker/datepicker.js +1 -1
- package/dist/lib/datepicker/index.cjs +1 -1
- package/dist/lib/datepicker/index.js +1 -1
- package/dist/lib/description-list/description-list.cjs +1 -1
- package/dist/lib/description-list/description-list.cjs.map +1 -1
- package/dist/lib/description-list/description-list.js +1 -1
- package/dist/lib/description-list/description-list.js.map +1 -1
- package/dist/lib/dropdown/dropdown-constants.cjs +1 -1
- package/dist/lib/dropdown/dropdown-constants.cjs.map +1 -1
- package/dist/lib/dropdown/dropdown-constants.js +2 -2
- package/dist/lib/dropdown/dropdown-constants.js.map +1 -1
- package/dist/lib/dropdown/dropdown-list.cjs +1 -1
- package/dist/lib/dropdown/dropdown-list.cjs.map +1 -1
- package/dist/lib/dropdown/dropdown-list.js +28 -16
- package/dist/lib/dropdown/dropdown-list.js.map +1 -1
- package/dist/lib/dropdown/dropdown.cjs +1 -1
- package/dist/lib/dropdown/dropdown.cjs.map +1 -1
- package/dist/lib/dropdown/dropdown.js +30 -26
- package/dist/lib/dropdown/dropdown.js.map +1 -1
- package/dist/lib/editor/EditorToolbarButton.cjs +1 -1
- package/dist/lib/editor/EditorToolbarButton.cjs.map +1 -1
- package/dist/lib/editor/EditorToolbarButton.js +1 -1
- package/dist/lib/editor/EditorToolbarButton.js.map +1 -1
- package/dist/lib/editor/EditorToolbarDropdownButton.cjs +1 -1
- package/dist/lib/editor/EditorToolbarDropdownButton.cjs.map +1 -1
- package/dist/lib/editor/EditorToolbarDropdownButton.js +1 -1
- package/dist/lib/editor/EditorToolbarDropdownButton.js.map +1 -1
- package/dist/lib/editor/EditorToolbarPopoverButton.cjs +1 -1
- package/dist/lib/editor/EditorToolbarPopoverButton.cjs.map +1 -1
- package/dist/lib/editor/EditorToolbarPopoverButton.js +1 -1
- package/dist/lib/editor/EditorToolbarPopoverButton.js.map +1 -1
- package/dist/lib/editor/editor.cjs +1 -1
- package/dist/lib/editor/editor.cjs.map +1 -1
- package/dist/lib/editor/editor.js +134 -135
- package/dist/lib/editor/editor.js.map +1 -1
- package/dist/lib/emoji-picker/emoji-picker.cjs +1 -1
- package/dist/lib/emoji-picker/emoji-picker.js +1 -1
- package/dist/lib/emoji-picker/index.cjs +1 -1
- package/dist/lib/emoji-picker/index.js +1 -1
- package/dist/lib/emoji-row/emoji-row.cjs +1 -1
- package/dist/lib/emoji-row/emoji-row.cjs.map +1 -1
- package/dist/lib/emoji-row/emoji-row.js +1 -1
- package/dist/lib/emoji-row/emoji-row.js.map +1 -1
- package/dist/lib/emoji-text-wrapper/emoji-text-wrapper.cjs.map +1 -1
- package/dist/lib/emoji-text-wrapper/emoji-text-wrapper.js.map +1 -1
- package/dist/lib/empty-state/empty-state-constants.cjs +1 -1
- package/dist/lib/empty-state/empty-state-constants.cjs.map +1 -1
- package/dist/lib/empty-state/empty-state-constants.js +37 -9
- package/dist/lib/empty-state/empty-state-constants.js.map +1 -1
- package/dist/lib/empty-state/empty-state.cjs +1 -1
- package/dist/lib/empty-state/empty-state.cjs.map +1 -1
- package/dist/lib/empty-state/empty-state.js +46 -26
- package/dist/lib/empty-state/empty-state.js.map +1 -1
- package/dist/lib/feed-item-pill/feed-item-pill.cjs +1 -1
- package/dist/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
- package/dist/lib/feed-item-pill/feed-item-pill.js +40 -42
- package/dist/lib/feed-item-pill/feed-item-pill.js.map +1 -1
- package/dist/lib/feed-item-row/feed-item-row.cjs +1 -1
- package/dist/lib/feed-item-row/feed-item-row.cjs.map +1 -1
- package/dist/lib/feed-item-row/feed-item-row.js +3 -3
- package/dist/lib/feed-item-row/feed-item-row.js.map +1 -1
- package/dist/lib/filter-pill/filter-pill.cjs +2 -0
- package/dist/lib/filter-pill/filter-pill.cjs.map +1 -0
- package/dist/lib/filter-pill/filter-pill.js +433 -0
- package/dist/lib/filter-pill/filter-pill.js.map +1 -0
- package/dist/lib/filter-pill/index.cjs +1 -0
- package/dist/lib/filter-pill/index.js +2 -0
- package/dist/lib/focusgroup-directive/focusgroup-constants.cjs +2 -0
- package/dist/lib/focusgroup-directive/focusgroup-constants.cjs.map +1 -0
- package/dist/lib/focusgroup-directive/focusgroup-constants.js +77 -0
- package/dist/lib/focusgroup-directive/focusgroup-constants.js.map +1 -0
- package/dist/lib/focusgroup-directive/focusgroup-utils.cjs +2 -0
- package/dist/lib/focusgroup-directive/focusgroup-utils.cjs.map +1 -0
- package/dist/lib/focusgroup-directive/focusgroup-utils.js +33 -0
- package/dist/lib/focusgroup-directive/focusgroup-utils.js.map +1 -0
- package/dist/lib/focusgroup-directive/focusgroup.cjs +2 -0
- package/dist/lib/focusgroup-directive/focusgroup.cjs.map +1 -0
- package/dist/lib/focusgroup-directive/focusgroup.js +143 -0
- package/dist/lib/focusgroup-directive/focusgroup.js.map +1 -0
- package/dist/lib/focusgroup-directive/index.cjs +1 -0
- package/dist/lib/focusgroup-directive/index.js +2 -0
- package/dist/lib/focustrap-directive/focustrap-constants.cjs +2 -0
- package/dist/lib/focustrap-directive/focustrap-constants.cjs.map +1 -0
- package/dist/lib/focustrap-directive/focustrap-constants.js +10 -0
- package/dist/lib/focustrap-directive/focustrap-constants.js.map +1 -0
- package/dist/lib/focustrap-directive/focustrap-utils.cjs +2 -0
- package/dist/lib/focustrap-directive/focustrap-utils.cjs.map +1 -0
- package/dist/lib/focustrap-directive/focustrap-utils.js +19 -0
- package/dist/lib/focustrap-directive/focustrap-utils.js.map +1 -0
- package/dist/lib/focustrap-directive/focustrap.cjs +2 -0
- package/dist/lib/focustrap-directive/focustrap.cjs.map +1 -0
- package/dist/lib/focustrap-directive/focustrap.js +96 -0
- package/dist/lib/focustrap-directive/focustrap.js.map +1 -0
- package/dist/lib/focustrap-directive/index.cjs +1 -0
- package/dist/lib/focustrap-directive/index.js +2 -0
- package/dist/lib/general-row/general-row.cjs +1 -1
- package/dist/lib/general-row/general-row.cjs.map +1 -1
- package/dist/lib/general-row/general-row.js +105 -61
- package/dist/lib/general-row/general-row.js.map +1 -1
- package/dist/lib/general-row/leftbar-general-row-icon.cjs +1 -1
- package/dist/lib/general-row/leftbar-general-row-icon.cjs.map +1 -1
- package/dist/lib/general-row/leftbar-general-row-icon.js +1 -1
- package/dist/lib/general-row/leftbar-general-row-icon.js.map +1 -1
- package/dist/lib/group-row/group-row.cjs +1 -1
- package/dist/lib/group-row/group-row.cjs.map +1 -1
- package/dist/lib/group-row/group-row.js +2 -2
- package/dist/lib/group-row/group-row.js.map +1 -1
- package/dist/lib/grouped-chip/grouped-chip.cjs +1 -1
- package/dist/lib/grouped-chip/grouped-chip.cjs.map +1 -1
- package/dist/lib/grouped-chip/grouped-chip.js +9 -9
- package/dist/lib/grouped-chip/grouped-chip.js.map +1 -1
- package/dist/lib/hovercard/hovercard.cjs +1 -1
- package/dist/lib/hovercard/hovercard.cjs.map +1 -1
- package/dist/lib/hovercard/hovercard.js +28 -24
- package/dist/lib/hovercard/hovercard.js.map +1 -1
- package/dist/lib/icon/icon.cjs +1 -1
- package/dist/lib/icon/icon.cjs.map +1 -1
- package/dist/lib/icon/icon.js +1 -1
- package/dist/lib/icon/icon.js.map +1 -1
- package/dist/lib/illustration/illustration.cjs +1 -1
- package/dist/lib/illustration/illustration.cjs.map +1 -1
- package/dist/lib/illustration/illustration.js +1 -1
- package/dist/lib/illustration/illustration.js.map +1 -1
- package/dist/lib/image-viewer/image-viewer.cjs +1 -1
- package/dist/lib/image-viewer/image-viewer.cjs.map +1 -1
- package/dist/lib/image-viewer/image-viewer.js +32 -31
- package/dist/lib/image-viewer/image-viewer.js.map +1 -1
- package/dist/lib/input/input-constants.cjs +1 -1
- package/dist/lib/input/input-constants.cjs.map +1 -1
- package/dist/lib/input/input-constants.js +25 -11
- package/dist/lib/input/input-constants.js.map +1 -1
- package/dist/lib/input/input.cjs +1 -1
- package/dist/lib/input/input.cjs.map +1 -1
- package/dist/lib/input/input.js +161 -79
- package/dist/lib/input/input.js.map +1 -1
- package/dist/lib/input-group/input-group.cjs +1 -1
- package/dist/lib/input-group/input-group.cjs.map +1 -1
- package/dist/lib/input-group/input-group.js +25 -15
- package/dist/lib/input-group/input-group.js.map +1 -1
- package/dist/lib/item-layout/item-layout.cjs +3 -3
- package/dist/lib/item-layout/item-layout.cjs.map +1 -1
- package/dist/lib/item-layout/item-layout.js +35 -12
- package/dist/lib/item-layout/item-layout.js.map +1 -1
- package/dist/lib/ivr-node/ivr-node.cjs +1 -1
- package/dist/lib/ivr-node/ivr-node.cjs.map +1 -1
- package/dist/lib/ivr-node/ivr-node.js +1 -1
- package/dist/lib/ivr-node/ivr-node.js.map +1 -1
- package/dist/lib/keyboard-shortcut/keyboard-shortcut.cjs +1 -1
- package/dist/lib/keyboard-shortcut/keyboard-shortcut.cjs.map +1 -1
- package/dist/lib/keyboard-shortcut/keyboard-shortcut.js +48 -38
- package/dist/lib/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/dist/lib/kitchen-sink/kitchen-sink-view.cjs +2 -0
- package/dist/lib/kitchen-sink/kitchen-sink-view.cjs.map +1 -0
- package/dist/lib/kitchen-sink/kitchen-sink-view.js +205 -0
- package/dist/lib/kitchen-sink/kitchen-sink-view.js.map +1 -0
- package/dist/lib/link/index.cjs +1 -1
- package/dist/lib/link/index.js +2 -2
- package/dist/lib/link/link-constants.cjs +1 -1
- package/dist/lib/link/link-constants.cjs.map +1 -1
- package/dist/lib/link/link-constants.js +7 -7
- package/dist/lib/link/link-constants.js.map +1 -1
- package/dist/lib/link/link.cjs +1 -1
- package/dist/lib/link/link.cjs.map +1 -1
- package/dist/lib/link/link.js +17 -2
- package/dist/lib/link/link.js.map +1 -1
- package/dist/lib/list-item/list-item.cjs +1 -1
- package/dist/lib/list-item/list-item.cjs.map +1 -1
- package/dist/lib/list-item/list-item.js +9 -5
- package/dist/lib/list-item/list-item.js.map +1 -1
- package/dist/lib/list-item-group/list-item-group.cjs +1 -1
- package/dist/lib/list-item-group/list-item-group.cjs.map +1 -1
- package/dist/lib/list-item-group/list-item-group.js +1 -1
- package/dist/lib/list-item-group/list-item-group.js.map +1 -1
- package/dist/lib/message-input/index.cjs +1 -1
- package/dist/lib/message-input/index.js +1 -1
- package/dist/lib/message-input/message-input-button.cjs +1 -1
- package/dist/lib/message-input/message-input-button.cjs.map +1 -1
- package/dist/lib/message-input/message-input-button.js +1 -1
- package/dist/lib/message-input/message-input-button.js.map +1 -1
- package/dist/lib/message-input/message-input-link.cjs +1 -1
- package/dist/lib/message-input/message-input-link.cjs.map +1 -1
- package/dist/lib/message-input/message-input-link.js +9 -9
- package/dist/lib/message-input/message-input-link.js.map +1 -1
- package/dist/lib/message-input/message-input-topbar.cjs +1 -1
- package/dist/lib/message-input/message-input-topbar.cjs.map +1 -1
- package/dist/lib/message-input/message-input-topbar.js +2 -2
- package/dist/lib/message-input/message-input-topbar.js.map +1 -1
- package/dist/lib/message-input/message-input.cjs +1 -1
- package/dist/lib/message-input/message-input.js +1 -1
- package/dist/lib/modal/modal-constants.cjs +1 -1
- package/dist/lib/modal/modal-constants.cjs.map +1 -1
- package/dist/lib/modal/modal-constants.js +3 -3
- package/dist/lib/modal/modal-constants.js.map +1 -1
- package/dist/lib/modal/modal.cjs +1 -1
- package/dist/lib/modal/modal.cjs.map +1 -1
- package/dist/lib/modal/modal.js +158 -157
- package/dist/lib/modal/modal.js.map +1 -1
- package/dist/lib/mode-directive/index.cjs +1 -0
- package/dist/lib/mode-directive/index.js +2 -0
- package/dist/lib/mode-directive/mode.cjs +2 -0
- package/dist/lib/mode-directive/mode.cjs.map +1 -0
- package/dist/lib/mode-directive/mode.js +67 -0
- package/dist/lib/mode-directive/mode.js.map +1 -0
- package/dist/lib/mode-island/index.cjs +1 -0
- package/dist/lib/mode-island/index.js +3 -0
- package/dist/lib/mode-island/mode-island-constants.cjs +2 -0
- package/dist/lib/mode-island/mode-island-constants.cjs.map +1 -0
- package/dist/lib/mode-island/mode-island-constants.js +10 -0
- package/dist/lib/mode-island/mode-island-constants.js.map +1 -0
- package/dist/lib/mode-island/mode-island.cjs +2 -0
- package/dist/lib/mode-island/mode-island.cjs.map +1 -0
- package/dist/lib/mode-island/mode-island.js +102 -0
- package/dist/lib/mode-island/mode-island.js.map +1 -0
- package/dist/lib/mode-island/utils.cjs +2 -0
- package/dist/lib/mode-island/utils.cjs.map +1 -0
- package/dist/lib/mode-island/utils.js +28 -0
- package/dist/lib/mode-island/utils.js.map +1 -0
- package/dist/lib/mode-island/validators.cjs +2 -0
- package/dist/lib/mode-island/validators.cjs.map +1 -0
- package/dist/lib/mode-island/validators.js +10 -0
- package/dist/lib/mode-island/validators.js.map +1 -0
- package/dist/lib/motion-text/motion-text-constants.cjs +1 -1
- package/dist/lib/motion-text/motion-text-constants.cjs.map +1 -1
- package/dist/lib/motion-text/motion-text-constants.js +18 -6
- package/dist/lib/motion-text/motion-text-constants.js.map +1 -1
- package/dist/lib/motion-text/motion-text.cjs +1 -1
- package/dist/lib/motion-text/motion-text.cjs.map +1 -1
- package/dist/lib/motion-text/motion-text.js +5 -7
- package/dist/lib/motion-text/motion-text.js.map +1 -1
- package/dist/lib/notice/notice-action.cjs +1 -1
- package/dist/lib/notice/notice-action.cjs.map +1 -1
- package/dist/lib/notice/notice-action.js +14 -14
- package/dist/lib/notice/notice-action.js.map +1 -1
- package/dist/lib/notice/notice-constants.cjs +1 -1
- package/dist/lib/notice/notice-constants.cjs.map +1 -1
- package/dist/lib/notice/notice-constants.js +2 -2
- package/dist/lib/notice/notice-constants.js.map +1 -1
- package/dist/lib/notice/notice-content.cjs +1 -1
- package/dist/lib/notice/notice-content.cjs.map +1 -1
- package/dist/lib/notice/notice-content.js +29 -12
- package/dist/lib/notice/notice-content.js.map +1 -1
- package/dist/lib/notice/notice-icon.cjs +1 -1
- package/dist/lib/notice/notice-icon.cjs.map +1 -1
- package/dist/lib/notice/notice-icon.js +4 -4
- package/dist/lib/notice/notice-icon.js.map +1 -1
- package/dist/lib/notice/notice.cjs +1 -1
- package/dist/lib/notice/notice.cjs.map +1 -1
- package/dist/lib/notice/notice.js +17 -16
- package/dist/lib/notice/notice.js.map +1 -1
- package/dist/lib/pagination/pagination.cjs +1 -1
- package/dist/lib/pagination/pagination.cjs.map +1 -1
- package/dist/lib/pagination/pagination.js +13 -12
- package/dist/lib/pagination/pagination.js.map +1 -1
- package/dist/lib/popover/popover-constants.cjs +1 -1
- package/dist/lib/popover/popover-constants.cjs.map +1 -1
- package/dist/lib/popover/popover-constants.js +6 -6
- package/dist/lib/popover/popover-constants.js.map +1 -1
- package/dist/lib/popover/popover-header-footer.cjs +1 -1
- package/dist/lib/popover/popover-header-footer.cjs.map +1 -1
- package/dist/lib/popover/popover-header-footer.js +11 -3
- package/dist/lib/popover/popover-header-footer.js.map +1 -1
- package/dist/lib/popover/popover.cjs +1 -1
- package/dist/lib/popover/popover.cjs.map +1 -1
- package/dist/lib/popover/popover.js +78 -58
- package/dist/lib/popover/popover.js.map +1 -1
- package/dist/lib/radio/radio-constants.cjs +1 -1
- package/dist/lib/radio/radio-constants.cjs.map +1 -1
- package/dist/lib/radio/radio-constants.js +2 -2
- package/dist/lib/radio/radio-constants.js.map +1 -1
- package/dist/lib/radio/radio.cjs +1 -1
- package/dist/lib/radio/radio.cjs.map +1 -1
- package/dist/lib/radio/radio.js +94 -31
- package/dist/lib/radio/radio.js.map +1 -1
- package/dist/lib/resizable/index.cjs +1 -1
- package/dist/lib/resizable/index.js +3 -3
- package/dist/lib/resizable/resizable-handle.cjs +1 -1
- package/dist/lib/resizable/resizable-handle.js +1 -1
- package/dist/lib/resizable/resizable-panel.cjs +1 -1
- package/dist/lib/resizable/resizable-panel.js +1 -1
- package/dist/lib/resizable/resizable.cjs +1 -1
- package/dist/lib/resizable/resizable.js +1 -1
- package/dist/lib/rich-text-editor/index.cjs +1 -1
- package/dist/lib/rich-text-editor/index.js +1 -1
- package/dist/lib/rich-text-editor/markdownRenderer.cjs +1 -1
- package/dist/lib/rich-text-editor/markdownRenderer.js +1 -1
- package/dist/lib/rich-text-editor/rich-text-editor.cjs +1 -1
- package/dist/lib/rich-text-editor/rich-text-editor.js +1 -1
- package/dist/lib/root-layout/root-layout-constants.cjs +1 -1
- package/dist/lib/root-layout/root-layout-constants.cjs.map +1 -1
- package/dist/lib/root-layout/root-layout-constants.js +2 -0
- package/dist/lib/root-layout/root-layout-constants.js.map +1 -1
- package/dist/lib/root-layout/root-layout.cjs +1 -1
- package/dist/lib/root-layout/root-layout.cjs.map +1 -1
- package/dist/lib/root-layout/root-layout.js +2 -2
- package/dist/lib/root-layout/root-layout.js.map +1 -1
- package/dist/lib/scroller/index.cjs +1 -1
- package/dist/lib/scroller/index.js +1 -1
- package/dist/lib/scroller/scroller.cjs +1 -1
- package/dist/lib/scroller/scroller.js +1 -1
- package/dist/lib/segmented-control/index.cjs +1 -0
- package/dist/lib/segmented-control/index.js +4 -0
- package/dist/lib/segmented-control/segmented-control-constants.cjs +2 -0
- package/dist/lib/segmented-control/segmented-control-constants.cjs.map +1 -0
- package/dist/lib/segmented-control/segmented-control-constants.js +41 -0
- package/dist/lib/segmented-control/segmented-control-constants.js.map +1 -0
- package/dist/lib/segmented-control/segmented-control-item.cjs +2 -0
- package/dist/lib/segmented-control/segmented-control-item.cjs.map +1 -0
- package/dist/lib/segmented-control/segmented-control-item.js +104 -0
- package/dist/lib/segmented-control/segmented-control-item.js.map +1 -0
- package/dist/lib/segmented-control/segmented-control.cjs +2 -0
- package/dist/lib/segmented-control/segmented-control.cjs.map +1 -0
- package/dist/lib/segmented-control/segmented-control.js +204 -0
- package/dist/lib/segmented-control/segmented-control.js.map +1 -0
- package/dist/lib/select-menu/select-menu-constants.cjs +1 -1
- package/dist/lib/select-menu/select-menu-constants.cjs.map +1 -1
- package/dist/lib/select-menu/select-menu-constants.js +7 -2
- package/dist/lib/select-menu/select-menu-constants.js.map +1 -1
- package/dist/lib/select-menu/select-menu.cjs +1 -1
- package/dist/lib/select-menu/select-menu.cjs.map +1 -1
- package/dist/lib/select-menu/select-menu.js +117 -58
- package/dist/lib/select-menu/select-menu.js.map +1 -1
- package/dist/lib/settings-menu-button/settings-menu-button.cjs +1 -1
- package/dist/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
- package/dist/lib/settings-menu-button/settings-menu-button.js +5 -5
- package/dist/lib/settings-menu-button/settings-menu-button.js.map +1 -1
- package/dist/lib/skeleton/skeleton-constants.cjs +1 -1
- package/dist/lib/skeleton/skeleton-constants.cjs.map +1 -1
- package/dist/lib/skeleton/skeleton-constants.js +10 -2
- package/dist/lib/skeleton/skeleton-constants.js.map +1 -1
- package/dist/lib/skeleton/skeleton-list-item.cjs +1 -1
- package/dist/lib/skeleton/skeleton-list-item.cjs.map +1 -1
- package/dist/lib/skeleton/skeleton-list-item.js +2 -2
- package/dist/lib/skeleton/skeleton-list-item.js.map +1 -1
- package/dist/lib/skeleton/skeleton-shape.cjs +1 -1
- package/dist/lib/skeleton/skeleton-shape.cjs.map +1 -1
- package/dist/lib/skeleton/skeleton-shape.js +3 -3
- package/dist/lib/skeleton/skeleton-shape.js.map +1 -1
- package/dist/lib/split-button/split-button-constants.cjs +1 -1
- package/dist/lib/split-button/split-button-constants.cjs.map +1 -1
- package/dist/lib/split-button/split-button-constants.js +5 -0
- package/dist/lib/split-button/split-button-constants.js.map +1 -1
- package/dist/lib/split-button/split-button-end.cjs +2 -0
- package/dist/lib/split-button/split-button-end.cjs.map +1 -0
- package/dist/lib/split-button/{split-button-omega.js → split-button-end.js} +9 -9
- package/dist/lib/split-button/split-button-end.js.map +1 -0
- package/dist/lib/split-button/split-button-start.cjs +2 -0
- package/dist/lib/split-button/split-button-start.cjs.map +1 -0
- package/dist/lib/split-button/split-button-start.js +182 -0
- package/dist/lib/split-button/split-button-start.js.map +1 -0
- package/dist/lib/split-button/split-button.cjs +1 -1
- package/dist/lib/split-button/split-button.cjs.map +1 -1
- package/dist/lib/split-button/split-button.js +246 -71
- package/dist/lib/split-button/split-button.js.map +1 -1
- package/dist/lib/stack/stack-constants.cjs +1 -1
- package/dist/lib/stack/stack-constants.cjs.map +1 -1
- package/dist/lib/stack/stack-constants.js +10 -2
- package/dist/lib/stack/stack-constants.js.map +1 -1
- package/dist/lib/stack/stack.cjs.map +1 -1
- package/dist/lib/stack/stack.js.map +1 -1
- package/dist/lib/tab/index.cjs +1 -1
- package/dist/lib/tab/index.js +5 -5
- package/dist/lib/tab/tab-group.cjs +1 -1
- package/dist/lib/tab/tab-group.cjs.map +1 -1
- package/dist/lib/tab/tab-group.js +173 -50
- package/dist/lib/tab/tab-group.js.map +1 -1
- package/dist/lib/tab/tab.cjs +1 -1
- package/dist/lib/tab/tab.cjs.map +1 -1
- package/dist/lib/tab/tab.js +108 -23
- package/dist/lib/tab/tab.js.map +1 -1
- package/dist/lib/tab/tabs-constants.cjs +1 -1
- package/dist/lib/tab/tabs-constants.cjs.map +1 -1
- package/dist/lib/tab/tabs-constants.js +33 -2
- package/dist/lib/tab/tabs-constants.js.map +1 -1
- package/dist/lib/text/index.cjs +1 -0
- package/dist/lib/text/index.js +3 -0
- package/dist/lib/text/text-constants.cjs +2 -0
- package/dist/lib/text/text-constants.cjs.map +1 -0
- package/dist/lib/text/text-constants.js +126 -0
- package/dist/lib/text/text-constants.js.map +1 -0
- package/dist/lib/text/text.cjs +2 -0
- package/dist/lib/text/text.cjs.map +1 -0
- package/dist/lib/text/text.js +150 -0
- package/dist/lib/text/text.js.map +1 -0
- package/dist/lib/toast/index.cjs +1 -1
- package/dist/lib/toast/index.js +1 -1
- package/dist/lib/toast/toast.cjs +1 -1
- package/dist/lib/toast/toast.js +1 -1
- package/dist/lib/toggle/toggle-constants.cjs +1 -1
- package/dist/lib/toggle/toggle-constants.cjs.map +1 -1
- package/dist/lib/toggle/toggle-constants.js +2 -0
- package/dist/lib/toggle/toggle-constants.js.map +1 -1
- package/dist/lib/toggle/toggle.cjs +1 -1
- package/dist/lib/toggle/toggle.cjs.map +1 -1
- package/dist/lib/toggle/toggle.js +24 -29
- package/dist/lib/toggle/toggle.js.map +1 -1
- package/dist/lib/tooltip/tooltip.cjs +1 -4
- package/dist/lib/tooltip/tooltip.cjs.map +1 -1
- package/dist/lib/tooltip/tooltip.js +36 -31
- package/dist/lib/tooltip/tooltip.js.map +1 -1
- package/dist/lib/tooltip-directive/tooltip.cjs +1 -1
- package/dist/lib/tooltip-directive/tooltip.cjs.map +1 -1
- package/dist/lib/tooltip-directive/tooltip.js +36 -35
- package/dist/lib/tooltip-directive/tooltip.js.map +1 -1
- package/dist/lib/top-banner-info/top-banner-info.cjs +1 -1
- package/dist/lib/top-banner-info/top-banner-info.cjs.map +1 -1
- package/dist/lib/top-banner-info/top-banner-info.js +4 -4
- package/dist/lib/top-banner-info/top-banner-info.js.map +1 -1
- package/dist/lib/unread-pill/unread-pill.cjs +1 -1
- package/dist/lib/unread-pill/unread-pill.cjs.map +1 -1
- package/dist/lib/unread-pill/unread-pill.js +1 -1
- package/dist/lib/unread-pill/unread-pill.js.map +1 -1
- package/dist/lib/validation-messages/validation-messages.cjs +1 -1
- package/dist/lib/validation-messages/validation-messages.cjs.map +1 -1
- package/dist/lib/validation-messages/validation-messages.js +2 -2
- package/dist/lib/validation-messages/validation-messages.js.map +1 -1
- package/dist/localization/en-US.cjs +5 -0
- package/dist/localization/en-US.cjs.map +1 -1
- package/dist/localization/en-US.js +1 -1
- package/dist/localization/en-US.js.map +1 -1
- package/dist/{markdownRenderer-DCgGQseq.cjs → markdownRenderer-Dsq-CiH9.cjs} +1 -1
- package/dist/{markdownRenderer-DCgGQseq.cjs.map → markdownRenderer-Dsq-CiH9.cjs.map} +1 -1
- package/dist/{markdownRenderer-D_P94RyM.js → markdownRenderer-k7_rQkox.js} +1 -1
- package/dist/{markdownRenderer-D_P94RyM.js.map → markdownRenderer-k7_rQkox.js.map} +1 -1
- package/dist/{message_input-CHlTsBGK.js → message_input-BYy1xKCy.js} +129 -130
- package/dist/message_input-BYy1xKCy.js.map +1 -0
- package/dist/message_input-sSCHhaeC.cjs +2 -0
- package/dist/message_input-sSCHhaeC.cjs.map +1 -0
- package/dist/mode_constants-CzYJW9ua.cjs +2 -0
- package/dist/mode_constants-CzYJW9ua.cjs.map +1 -0
- package/dist/mode_constants-tb7TL85q.js +14 -0
- package/dist/mode_constants-tb7TL85q.js.map +1 -0
- package/dist/recipes/buttons/callbar_button/callbar_button.vue.d.ts +85 -14
- package/dist/recipes/buttons/callbar_button/callbar_button.vue.d.ts.map +1 -1
- package/dist/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +313 -41
- package/dist/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
- package/dist/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +302 -41
- package/dist/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
- package/dist/recipes/cards/ivr_node/ivr_node.vue.d.ts +228 -35
- package/dist/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
- package/dist/recipes/chips/grouped_chip/grouped_chip.vue.d.ts +62 -16
- package/dist/recipes/chips/grouped_chip/grouped_chip.vue.d.ts.map +1 -1
- package/dist/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +237 -28
- package/dist/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
- package/dist/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +184 -21
- package/dist/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -1
- package/dist/recipes/conversation_view/editor/EditorToolbarButton.vue.d.ts +53 -7
- package/dist/recipes/conversation_view/editor/EditorToolbarDropdownButton.vue.d.ts +228 -26
- package/dist/recipes/conversation_view/editor/EditorToolbarDropdownButton.vue.d.ts.map +1 -1
- package/dist/recipes/conversation_view/editor/EditorToolbarPopoverButton.vue.d.ts +216 -25
- package/dist/recipes/conversation_view/editor/EditorToolbarPopoverButton.vue.d.ts.map +1 -1
- package/dist/recipes/conversation_view/editor/editor.vue.d.ts +1163 -178
- package/dist/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +132 -42
- package/dist/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
- package/dist/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +91 -23
- package/dist/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
- package/dist/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +126 -35
- package/dist/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
- package/dist/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +90 -13
- package/dist/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
- package/dist/recipes/conversation_view/message_input/message_input.vue.d.ts +1622 -207
- package/dist/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/recipes/conversation_view/message_input/message_input_button.vue.d.ts +226 -12
- package/dist/recipes/conversation_view/message_input/message_input_button.vue.d.ts.map +1 -1
- package/dist/recipes/conversation_view/message_input/message_input_link.vue.d.ts +636 -55
- package/dist/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
- package/dist/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +226 -12
- package/dist/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
- package/dist/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts +53 -7
- package/dist/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts.map +1 -1
- package/dist/recipes/item_layout/contact_info/contact_info.vue.d.ts +122 -33
- package/dist/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
- package/dist/recipes/leftbar/callbox/callbox.vue.d.ts +87 -29
- package/dist/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
- package/dist/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +82 -28
- package/dist/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
- package/dist/recipes/leftbar/contact_row/contact_row.vue.d.ts +588 -72
- package/dist/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
- package/dist/recipes/leftbar/general_row/general_row.vue.d.ts +480 -31
- package/dist/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/dist/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts.map +1 -1
- package/dist/recipes/leftbar/group_row/group_row.vue.d.ts +479 -30
- package/dist/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
- package/dist/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
- package/dist/recipes/notices/top_banner_info/top_banner_info.vue.d.ts.map +1 -1
- package/dist/{resizable-aOVGO_Os.cjs → resizable-DhowneUp.cjs} +2 -2
- package/dist/{resizable-aOVGO_Os.cjs.map → resizable-DhowneUp.cjs.map} +1 -1
- package/dist/{resizable-D4-peBOl.js → resizable-xcOu-0_w.js} +3 -3
- package/dist/{resizable-D4-peBOl.js.map → resizable-xcOu-0_w.js.map} +1 -1
- package/dist/{resizable_handle-BlKBiWnx.js → resizable_handle-BAZzCA_i.js} +3 -3
- package/dist/{resizable_handle-BlKBiWnx.js.map → resizable_handle-BAZzCA_i.js.map} +1 -1
- package/dist/{resizable_handle-RIKS8frB.cjs → resizable_handle-fjKg48eY.cjs} +2 -2
- package/dist/{resizable_handle-RIKS8frB.cjs.map → resizable_handle-fjKg48eY.cjs.map} +1 -1
- package/dist/{resizable_utils-DhuzXRdP.cjs → resizable_utils-BE4lK07_.cjs} +1 -1
- package/dist/{resizable_utils-DhuzXRdP.cjs.map → resizable_utils-BE4lK07_.cjs.map} +1 -1
- package/dist/{resizable_utils-BComtrMV.js → resizable_utils-DsKnGHKW.js} +1 -1
- package/dist/{resizable_utils-BComtrMV.js.map → resizable_utils-DsKnGHKW.js.map} +1 -1
- package/dist/{rich_text_editor-Ba67C4Uk.js → rich_text_editor-CEW74QNe.js} +637 -598
- package/dist/{rich_text_editor-Ba67C4Uk.js.map → rich_text_editor-CEW74QNe.js.map} +1 -1
- package/dist/rich_text_editor-immDiKq_.cjs +10 -0
- package/dist/{rich_text_editor-DMP5eTlf.cjs.map → rich_text_editor-immDiKq_.cjs.map} +1 -1
- package/dist/scroller-C15VLKNK.cjs +2 -0
- package/dist/scroller-C15VLKNK.cjs.map +1 -0
- package/dist/{scroller-BGVDh3sq.js → scroller-DPqcc_Wl.js} +6 -6
- package/dist/scroller-DPqcc_Wl.js.map +1 -0
- package/dist/shared/sr_only_close_button.cjs +1 -1
- package/dist/shared/sr_only_close_button.cjs.map +1 -1
- package/dist/shared/sr_only_close_button.js +1 -1
- package/dist/shared/sr_only_close_button.js.map +1 -1
- package/dist/toast-B1WZNMAm.cjs +2 -0
- package/dist/toast-B1WZNMAm.cjs.map +1 -0
- package/dist/{toast-DvPN-bCi.js → toast-DaH2KF7B.js} +52 -51
- package/dist/toast-DaH2KF7B.js.map +1 -0
- package/dist/{useResizableCalculations-DAajatT4.js → useResizableCalculations-2UpEXvfY.js} +2 -2
- package/dist/{useResizableCalculations-DAajatT4.js.map → useResizableCalculations-2UpEXvfY.js.map} +1 -1
- package/dist/{useResizableCalculations-BDITle3Q.cjs → useResizableCalculations-DPBjAFWQ.cjs} +2 -2
- package/dist/{useResizableCalculations-BDITle3Q.cjs.map → useResizableCalculations-DPBjAFWQ.cjs.map} +1 -1
- package/package.json +9 -7
- package/dist/attachment_carousel-BHxR7A76.cjs +0 -2
- package/dist/attachment_carousel-BHxR7A76.cjs.map +0 -1
- package/dist/attachment_carousel-CouFqFMw.js.map +0 -1
- package/dist/combobox-DgClbLOg.js.map +0 -1
- package/dist/combobox-DhjZxfUw.cjs +0 -3
- package/dist/combobox-DhjZxfUw.cjs.map +0 -1
- package/dist/components/split_button/split_button-alpha.vue.d.ts.map +0 -1
- package/dist/datepicker-DprRX9AH.cjs +0 -2
- package/dist/datepicker-DprRX9AH.cjs.map +0 -1
- package/dist/datepicker-LVDRC6Lf.js.map +0 -1
- package/dist/emoji_picker-Cl-T4BXK.cjs +0 -2
- package/dist/emoji_picker-Cl-T4BXK.cjs.map +0 -1
- package/dist/emoji_picker-tVHfpHDk.js.map +0 -1
- package/dist/lib/split-button/split-button-alpha.cjs +0 -2
- package/dist/lib/split-button/split-button-alpha.cjs.map +0 -1
- package/dist/lib/split-button/split-button-alpha.js +0 -107
- package/dist/lib/split-button/split-button-alpha.js.map +0 -1
- package/dist/lib/split-button/split-button-omega.cjs +0 -2
- package/dist/lib/split-button/split-button-omega.cjs.map +0 -1
- package/dist/lib/split-button/split-button-omega.js.map +0 -1
- package/dist/message_input-AWgvtwMV.cjs +0 -2
- package/dist/message_input-AWgvtwMV.cjs.map +0 -1
- package/dist/message_input-CHlTsBGK.js.map +0 -1
- package/dist/rich_text_editor-DMP5eTlf.cjs +0 -10
- package/dist/scroller-BGVDh3sq.js.map +0 -1
- package/dist/scroller-CjAsgjl9.cjs +0 -2
- package/dist/scroller-CjAsgjl9.cjs.map +0 -1
- package/dist/toast-DvPN-bCi.js.map +0 -1
- package/dist/toast-d8_zmgkL.cjs +0 -2
- package/dist/toast-d8_zmgkL.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-multi-select.js","names":[],"sources":["../../../components/combobox_multi_select/combobox_multi_select.vue"],"sourcesContent":["<!-- eslint-disable vue/no-static-inline-styles -->\n<template>\n <dt-combobox-with-popover\n ref=\"comboboxWithPopover\"\n :label=\"label\"\n :show-list=\"showList\"\n :max-height=\"listMaxHeight\"\n :max-width=\"listMaxWidth\"\n :popover-offset=\"popoverOffset\"\n :has-suggestion-list=\"hasSuggestionList\"\n content-width=\"anchor\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n v-bind=\"extractNonListeners($attrs)\"\n @select=\"onComboboxSelect\"\n @highlight=\"comboboxHighlight\"\n >\n <template #input=\"{ onInput }\">\n <span\n ref=\"inputSlotWrapper\"\n class=\"d-recipe-combobox-multi-select__input-wrapper\"\n @focusin=\"handleInputFocusIn\"\n @focusout=\"handleInputFocusOut\"\n >\n <span\n ref=\"chipsWrapper\"\n :class=\"['d-recipe-combobox-multi-select__chip-wrapper', chipWrapperClass]\"\n >\n <dt-chip\n v-for=\"(item, index) in selectedItems\"\n ref=\"chips\"\n :key=\"`${index}-${item}`\"\n :label-class=\"['d-chip__label']\"\n :class=\"[\n 'd-recipe-combobox-multi-select__chip',\n { 'd-recipe-combobox-multi-select__chip--truncate': !!chipMaxWidth },\n ]\"\n :style=\"{ maxWidth: chipMaxWidth }\"\n :size=\"CHIP_SIZES[size]\"\n :disabled=\"disabled\"\n v-on=\"chipListeners\"\n @keydown.backspace=\"onChipRemove(item)\"\n @close=\"onChipRemove(item)\"\n >\n {{ item }}\n </dt-chip>\n </span>\n\n <dt-input\n ref=\"input\"\n v-model=\"value\"\n class=\"d-recipe-combobox-multi-select__input\"\n :input-class=\"[\n inputClass, {\n 'd-recipe-combobox-multi-select__input--hidden': hideInputText,\n }]\"\n :input-wrapper-class=\"inputWrapperClass\"\n :disabled=\"disabled\"\n :aria-label=\"label\"\n :label=\"labelVisible ? label : ''\"\n :description=\"description\"\n :placeholder=\"inputPlaceHolder\"\n :show-messages=\"showInputMessages\"\n :messages=\"inputMessages\"\n :size=\"size\"\n v-bind=\"inputListeners\"\n @input=\"onInput\"\n />\n\n <dt-validation-messages\n :validation-messages=\"maxSelectedMessage\"\n :show-messages=\"showValidationMessages\"\n />\n </span>\n </template>\n\n <!-- @slot slot for popover header -->\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #header\n >\n <div ref=\"header\">\n <slot name=\"header\" />\n </div>\n </template>\n\n <!-- @slot slot for popover list -->\n <template #list>\n <div\n ref=\"list\"\n class=\"d-recipe-combobox-multi-select__list\"\n @mousedown.prevent\n >\n <slot\n v-if=\"!loading\"\n name=\"list\"\n />\n <div\n v-else\n class=\"d-recipe-combobox-multi-select__list--loading\"\n >\n {{ loadingMessage }}\n </div>\n </div>\n </template>\n\n <!-- @slot slot for popover footer -->\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footer\n >\n <div ref=\"footer\">\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-combobox-with-popover>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport DtComboboxWithPopover from '@/components/combobox_with_popover/combobox_with_popover.vue';\nimport DtInput from '@/components/input/input.vue';\nimport DtChip from '@/components/chip/chip.vue';\nimport DtValidationMessages from '@/components/validation_messages/validation_messages.vue';\nimport { validationMessageValidator } from '@/common/validators';\nimport { extractVueListeners, extractNonListeners, hasSlotContent, returnFirstEl } from '@/common/utils';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '@/components/popover/popover_constants';\nimport {\n MULTI_SELECT_SIZES,\n CHIP_SIZES,\n CHIP_TOP_POSITION,\n} from './combobox_multi_select_constants';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtComboboxMultiSelect',\n\n components: {\n DtComboboxWithPopover,\n DtInput,\n DtChip,\n DtValidationMessages,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n labelVisible: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Input placeholder\n */\n placeholder: {\n type: String,\n default: 'Select one or start typing',\n },\n\n /**\n * Input validation messages\n */\n inputMessages: {\n type: Array,\n default: () => [],\n validator: inputMessages => {\n return validationMessageValidator(inputMessages);\n },\n },\n\n /**\n * Show input validation message\n */\n showInputMessages: {\n type: Boolean,\n default: true,\n },\n\n // @TODO: https://dialpad.atlassian.net/browse/DP-52324\n // type: {\n // type: String,\n // values: ['input', 'select'],\n // default: 'select',\n // },\n\n /**\n * Determines if the list is loading\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The message when the list is loading\n */\n loadingMessage: {\n type: String,\n default: 'loading...',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxHeight: {\n type: String,\n default: '300px',\n },\n\n /**\n * The selected items\n */\n selectedItems: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Would be the maximum number of selections you can make. 0 is unlimited\n */\n maxSelected: {\n type: Number,\n default: 0,\n },\n\n /**\n * Max select message when the max selections is exceeded with the structure:\n * `[{\"message\": string, \"type\": VALIDATION_MESSAGE_TYPES }]`\n */\n maxSelectedMessage: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the chip, one of `xs`, `sm`, `md`\n */\n size: {\n type: String,\n default: 'md',\n validator: (t) => Object.values(MULTI_SELECT_SIZES).includes(t),\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n\n /**\n * Determines whether the combobox should collapse to a single when losing focus.\n * @type {boolean}\n */\n collapseOnFocusOut: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Amount of reserved space (in px) on the right side of the input\n * before the chips and the input caret jump to the next line.\n * default is 64\n */\n reservedRightSpace: {\n type: Number,\n default: 64,\n },\n\n /**\n * Determines the maximum width of a single chip. If the text within this chip exceeds the value\n * it will be truncated with ellipses.\n * Possible units rem|px|em\n */\n chipMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the input element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n inputClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the input wrapper element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n inputWrapperClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * When true, disables the underlying input.\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String }\n */\n 'input',\n\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when item removed\n *\n * @event remove\n * @type {String}\n */\n 'remove',\n\n /**\n * Event fired when max selected items limit is reached\n *\n * @event max-selected\n * @type {Object}\n */\n 'max-selected',\n\n /**\n * Native keyup event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n\n /**\n * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Event fired when combobox item is highlighted\n *\n * @event combobox-highlight\n * @type {Object}\n */\n 'combobox-highlight',\n ],\n\n data () {\n return {\n value: '',\n popoverOffset: [0, 4],\n showValidationMessages: false,\n resizeWindowObserver: null,\n initialInputHeight: null,\n CHIP_SIZES,\n hasSlotContent,\n inputFocused: false,\n hideInputText: false,\n };\n },\n\n computed: {\n inputPlaceHolder () {\n return this.selectedItems?.length > 0 ? '' : this.placeholder;\n },\n\n chipListeners () {\n return {\n keydown: event => {\n this.onChipKeyDown(event);\n this.$emit('keydown', event);\n },\n };\n },\n\n inputListeners () {\n return {\n ...extractVueListeners(this.$attrs),\n onInput: event => {\n this.$emit('input', event);\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n\n onKeydown: event => {\n this.onInputKeyDown(event);\n },\n\n onKeyup: event => {\n this.$emit('keyup', event);\n },\n\n onClick: () => {\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n };\n },\n\n chipWrapperClass () {\n return {\n [`d-recipe-combobox-multi-select__chip-wrapper-${this.size}--collapsed`]: !this.inputFocused && this.collapseOnFocusOut,\n };\n },\n },\n\n watch: {\n selectedItems: {\n deep: true,\n handler: async function () {\n await this.initSelectedItems();\n },\n },\n\n chipMaxWidth: {\n async handler () {\n await this.initSelectedItems();\n },\n },\n\n async label () {\n await this.$nextTick();\n // Adjust the chips position if label changed\n this.setChipsTopPosition();\n },\n\n async description () {\n await this.$nextTick();\n // Adjust the chips position if description changed\n this.setChipsTopPosition();\n },\n\n size: {\n async handler () {\n await this.$nextTick();\n const input = this.getInput();\n this.revertInputPadding(input);\n this.initialInputHeight = input.getBoundingClientRect().height;\n this.setInputPadding();\n this.setChipsTopPosition();\n },\n },\n },\n\n async mounted () {\n this.setInitialInputHeight();\n // Recalculate chip position and input padding when resizing window\n this.resizeWindowObserver = new ResizeObserver(async () => {\n this.setChipsTopPosition();\n this.setInputPadding();\n });\n this.resizeWindowObserver.observe(document.body);\n\n await this.initSelectedItems();\n },\n\n beforeUnmount () {\n this.resizeWindowObserver?.unobserve(document.body);\n },\n\n methods: {\n extractNonListeners,\n comboboxHighlight (highlightIndex) {\n this.$emit('combobox-highlight', highlightIndex);\n },\n\n async initSelectedItems () {\n await this.$nextTick();\n this.setInputPadding();\n this.setChipsTopPosition();\n this.setInputMinWidth();\n this.checkMaxSelected();\n },\n\n onChipRemove (item) {\n this.$emit('remove', item);\n this.$refs.input?.focus();\n },\n\n onComboboxSelect (i) {\n if (this.loading) return;\n this.value = '';\n this.$emit('select', i);\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.showComboboxList();\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.closeComboboxList();\n },\n\n getChips () {\n if (!this.selectedItems.length || !this.$refs.chips) return null;\n\n // Use the order from selectedItems to not rely on DOM order which may be stale.\n // Track matched indices to handle duplicate item names correctly.\n const matched = new Set();\n const chips = this.selectedItems.map(item => {\n return this.$refs.chips.find((chip, index) => {\n if (matched.has(index)) return false;\n const chipLabel = returnFirstEl(chip.$el)?.querySelector('.d-chip__label')?.textContent?.trim();\n if (chipLabel === item) {\n matched.add(index);\n return true;\n }\n return false;\n });\n });\n return chips.filter(Boolean).map(chip => returnFirstEl(chip.$el));\n },\n\n getChipButtons () {\n const chips = this.getChips();\n return chips && chips.map(chip => returnFirstEl(chip).querySelector('button'));\n },\n\n getLastChipButton () {\n const chipButtons = this.getChipButtons();\n return chipButtons && chipButtons[chipButtons.length - 1];\n },\n\n getLastChip () {\n const chips = this.getChips();\n return chips && chips[chips.length - 1];\n },\n\n getFirstChip () {\n const chips = this.getChips();\n return chips && chips[0];\n },\n\n getInput () {\n return this.$refs.input?.$refs.input;\n },\n\n onChipKeyDown (event) {\n const key = event.code?.toLowerCase();\n if (key === 'arrowleft') {\n // Move to the previous chip\n this.navigateBetweenChips(event.target, true);\n } else if (key === 'arrowright') {\n if (event.target.id === this.getLastChipButton().id) {\n // Move to the input if it's the last chip\n this.moveFromChipToInput();\n } else {\n // Move to the next chip\n this.navigateBetweenChips(event.target, false);\n }\n }\n },\n\n onInputKeyDown (event) {\n const key = event.code?.toLowerCase();\n // If the cursor is at the start of the text,\n // press 'backspace' or 'left' focuses the last chip\n if (this.selectedItems.length > 0 && event.target.selectionStart === 0) {\n // if there is selected text, do not focus the last chip\n if (event.target.selectionEnd !== event.target.selectionStart) {\n return;\n }\n if (key === 'backspace' || key === 'arrowleft') {\n this.moveFromInputToChip();\n }\n }\n },\n\n moveFromInputToChip () {\n this.getLastChipButton().focus();\n this.$refs.input?.blur();\n this.closeComboboxList();\n },\n\n moveFromChipToInput () {\n this.getLastChipButton().blur();\n this.$refs.input?.focus();\n this.showComboboxList();\n },\n\n navigateBetweenChips (target, toLeft) {\n const from = this.getChipButtons().indexOf(target);\n const to = toLeft ? from - 1 : from + 1;\n if (to < 0 || to >= this.$refs.chips?.length) {\n return;\n }\n this.getChipButtons()[from].blur();\n this.getChipButtons()[to].focus();\n this.closeComboboxList();\n },\n\n setChipsTopPosition () {\n // To place the chips in the input box\n // The chip \"top\" position should be the same line as the input box\n const input = this.getInput();\n if (!input) return;\n const inputSlotWrapper = this.$refs.inputSlotWrapper;\n const top = input.getBoundingClientRect().top -\n inputSlotWrapper.getBoundingClientRect().top;\n const chipsWrapper = this.$refs.chipsWrapper;\n chipsWrapper.style.top = (top - CHIP_TOP_POSITION[this.size]) + 'px';\n },\n\n setInputPadding () {\n const lastChip = this.getLastChip();\n const input = this.getInput();\n const chipsWrapper = this.$refs.chipsWrapper;\n if (!input) return;\n this.revertInputPadding(input);\n this.popoverOffset = [0, 4];\n if (!lastChip) return;\n // Avoid adding extra padding when the input is not focused if collapseOnFocusOut is true\n // This ensures the input returns to its original state when resizing\n if (this.collapseOnFocusOut && !this.inputFocused) return;\n\n // Get the position of the last chip\n // The input cursor should be the same \"top\" as that chip and next besides it\n const left = lastChip.offsetLeft + this.getFullWidth(lastChip);\n const spaceLeft = input.getBoundingClientRect().width - left;\n // input.style.paddingLeft = left + 'px';\n\n if (spaceLeft > this.reservedRightSpace) {\n input.style.paddingLeft = left + 'px';\n } else {\n input.style.paddingLeft = '4px';\n }\n\n // Get the chip wrapper height minus the 4px padding\n const chipsWrapperHeight = chipsWrapper.getBoundingClientRect().height - 4;\n const lastChipHeight = lastChip.getBoundingClientRect().height - 4;\n\n // Get lastChip offsetTop plus 2px of the input padding.\n const top = spaceLeft > this.reservedRightSpace\n ? lastChip.offsetTop + 2\n : (chipsWrapperHeight + lastChipHeight - 9);\n\n input.style.paddingTop = `${top}px`;\n },\n\n revertInputPadding (input) {\n input.style.paddingLeft = '';\n input.style.paddingTop = '';\n input.style.paddingBottom = '';\n },\n\n getFullWidth (el) {\n const styles = window.getComputedStyle(el);\n return el.offsetWidth + parseInt(styles.marginLeft) + parseInt(styles.marginRight);\n },\n\n setInputMinWidth () {\n // Ensure the width of the input is \"slightly bigger\" than the width of a single chip\n const firstChip = this.getFirstChip();\n const input = this.getInput();\n if (!input) return;\n if (firstChip) {\n // Add 4px buffer for typing room\n input.style.minWidth = (this.getFullWidth(firstChip) + 4) + 'px';\n } else {\n input.style.minWidth = '';\n }\n },\n\n checkMaxSelected () {\n if (this.maxSelected === 0) return;\n if (this.selectedItems.length > this.maxSelected) {\n this.showValidationMessages = true;\n this.$emit('max-selected');\n } else {\n this.showValidationMessages = false;\n }\n },\n\n setInitialInputHeight () {\n const input = this.getInput();\n if (!input) return;\n this.initialInputHeight = input.getBoundingClientRect().height;\n },\n\n async handleInputFocusIn () {\n this.inputFocused = true;\n if (this.collapseOnFocusOut) {\n this.hideInputText = false;\n await this.$nextTick();\n this.setInputPadding();\n }\n },\n\n async handleInputFocusOut () {\n this.inputFocused = false;\n if (this.collapseOnFocusOut) {\n this.hideInputText = true;\n const input = this.getInput();\n if (!input) return;\n // Hide the input text when is not on first line\n if (!input.style.paddingTop) {\n return;\n }\n this.revertInputPadding(input);\n }\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;AAuIA,IAAK,IAAU;CACb,cAAc,EAAE,MAAM,GAAG;CACzB,MAAM;CAEN,YAAY;EACV,uBAAA;EACA,SAAA;EACA,QAAA;EACA,sBAAA;EACD;CAED,cAAc;CAEd,OAAO;EAIL,OAAO;GACL,MAAM;GACN,UAAU;GACX;EAMD,cAAc;GACZ,MAAM;GACN,SAAS;GACV;EAKD,aAAa;GACX,MAAM;GACN,SAAS;GACV;EAKD,aAAa;GACX,MAAM;GACN,SAAS;GACV;EAKD,eAAe;GACb,MAAM;GACN,eAAe,EAAE;GACjB,YAAW,MACF,EAA2B,EAAc;GAEnD;EAKD,mBAAmB;GACjB,MAAM;GACN,SAAS;GACV;EAYD,SAAS;GACP,MAAM;GACN,SAAS;GACV;EAKD,gBAAgB;GACd,MAAM;GACN,SAAS;GACV;EAQD,UAAU;GACR,MAAM;GACN,SAAS;GACV;EAMD,eAAe;GACb,MAAM;GACN,SAAS;GACV;EAKD,eAAe;GACb,MAAM;GACN,SAAS,WAAY;AAAE,WAAO,EAAE;;GACjC;EAKD,aAAa;GACX,MAAM;GACN,SAAS;GACV;EAMD,oBAAoB;GAClB,MAAM;GACN,SAAS,WAAY;AAAE,WAAO,EAAE;;GACjC;EAMD,mBAAmB;GACjB,MAAM;GACN,SAAS;GACV;EAKD,MAAM;GACJ,MAAM;GACN,SAAS;GACT,YAAY,MAAM,OAAO,OAAO,EAAmB,CAAC,SAAS,EAA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mE,EAAA,eAAA,CAAA;IAIxG,uBAAqB,EAAA;IACrB,UAAU,EAAA;IACV,cAAY,EAAA;IACZ,OAAO,EAAA,eAAe,EAAA,QAAK;IAC3B,aAAa,EAAA;IACb,aAAa,EAAA;IACb,iBAAe,EAAA;IACf,UAAU,EAAA;IACV,MAAM,EAAA;MACC,EAAA,gBAAc,EACd,YAAO,CAAA,EAAA,MAAA,IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA,CAAA;GAGjB,EAGE,GAAA;IAFC,uBAAqB,EAAA;IACrB,iBAAe,EAAA;;;EAgBX,MAAI,QAgBP,CAfN,EAeM,OAAA;GAdJ,KAAI;GACJ,OAAM;GACL,aAAS,EAAA,OAAA,EAAA,KAAA,QAAV,IAAkB,CAAA,UAAA,CAAA;MAGT,EAAA,WAEP,GAAA,EACF,EAKM,OALN,GAKM,EADD,EAAA,eAAc,EAAA,EAAA,IARnB,EAGE,EAAA,QAAA,QAAA,EAAA,KAAA,GAAA,CAAA,CAKiB,EAAA,IAAA,CAAA,CAAA;;KAvBf,EAAA,eAAe,EAAA,OAAO,OAAM,GAAA;QACjC;cAIK,CAFN,EAEM,OAFN,GAEM,CADJ,EAAsB,EAAA,QAAA,SAAA,CAAA,EAAA,IAAA,CAAA,CAAA;;aA0BlB,EAAA,eAAe,EAAA,OAAO,OAAM,GAAA;QACjC;cAIK,CAFN,EAEM,OAFN,GAEM,CADJ,EAAsB,EAAA,QAAA,SAAA,CAAA,EAAA,IAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"combobox-multi-select.js","names":[],"sources":["../../../components/combobox_multi_select/combobox_multi_select.vue"],"sourcesContent":["<!-- eslint-disable vue/no-static-inline-styles -->\n<template>\n <dt-combobox-with-popover\n ref=\"comboboxWithPopover\"\n :label=\"label\"\n :show-list=\"showList\"\n :max-height=\"listMaxHeight\"\n :max-width=\"listMaxWidth\"\n :popover-offset=\"popoverOffset\"\n :has-suggestion-list=\"hasSuggestionList\"\n content-width=\"anchor\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n v-bind=\"extractNonListeners($attrs)\"\n @select=\"onComboboxSelect\"\n @highlight=\"comboboxHighlight\"\n >\n <template #input=\"{ onInput }\">\n <span\n ref=\"inputSlotWrapper\"\n class=\"d-recipe-combobox-multi-select__input-wrapper\"\n @focusin=\"handleInputFocusIn\"\n @focusout=\"handleInputFocusOut\"\n >\n <span\n ref=\"chipsWrapper\"\n :class=\"['d-recipe-combobox-multi-select__chip-wrapper', chipWrapperClass]\"\n >\n <dt-chip\n v-for=\"(item, index) in selectedItems\"\n ref=\"chips\"\n :key=\"`${index}-${item}`\"\n :label-class=\"['d-chip__label']\"\n :class=\"[\n 'd-recipe-combobox-multi-select__chip',\n { 'd-recipe-combobox-multi-select__chip--truncate': !!chipMaxWidth },\n ]\"\n :style=\"{ maxWidth: chipMaxWidth }\"\n :size=\"CHIP_SIZES[String(size)]\"\n :disabled=\"disabled\"\n v-on=\"chipListeners\"\n @keydown.backspace=\"onChipRemove(item)\"\n @close=\"onChipRemove(item)\"\n >\n {{ item }}\n </dt-chip>\n </span>\n\n <dt-input\n ref=\"input\"\n v-model=\"value\"\n class=\"d-recipe-combobox-multi-select__input\"\n :input-class=\"[\n inputClass, {\n 'd-recipe-combobox-multi-select__input--hidden': hideInputText,\n }]\"\n :input-wrapper-class=\"inputWrapperClass\"\n :disabled=\"disabled\"\n :aria-label=\"label\"\n :label=\"showLabel ? label : ''\"\n :description=\"description\"\n :placeholder=\"inputPlaceHolder\"\n :show-messages=\"showInputMessages\"\n :messages=\"inputMessages\"\n :size=\"size\"\n v-bind=\"inputListeners\"\n @input=\"onInput\"\n />\n\n <dt-validation-messages\n :validation-messages=\"maxSelectedMessage\"\n :show-messages=\"showValidationMessages\"\n />\n </span>\n </template>\n\n <!-- @slot slot for popover header -->\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #header\n >\n <div ref=\"header\">\n <slot name=\"header\" />\n </div>\n </template>\n\n <!-- @slot slot for popover list -->\n <template #list>\n <div\n ref=\"list\"\n class=\"d-recipe-combobox-multi-select__list\"\n @mousedown.prevent\n >\n <slot\n v-if=\"!loading\"\n name=\"list\"\n />\n <div\n v-else\n class=\"d-recipe-combobox-multi-select__list--loading\"\n >\n {{ loadingMessage }}\n </div>\n </div>\n </template>\n\n <!-- @slot slot for popover footer -->\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footer\n >\n <div ref=\"footer\">\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-combobox-with-popover>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport DtComboboxWithPopover from '@/components/combobox_with_popover/combobox_with_popover.vue';\nimport DtInput from '@/components/input/input.vue';\nimport DtChip from '@/components/chip/chip.vue';\nimport DtValidationMessages from '@/components/validation_messages/validation_messages.vue';\nimport { validationMessageValidator } from '@/common/validators';\nimport { extractVueListeners, extractNonListeners, hasSlotContent, returnFirstEl } from '@/common/utils';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '@/components/popover/popover_constants';\nimport {\n CHIP_SIZES,\n CHIP_TOP_POSITION,\n} from './combobox_multi_select_constants';\nimport { COMPONENT_SIZES } from '@/common/constants';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtComboboxMultiSelect',\n\n components: {\n DtComboboxWithPopover,\n DtInput,\n DtChip,\n DtValidationMessages,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n showLabel: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Input placeholder\n */\n placeholder: {\n type: String,\n default: 'Select one or start typing',\n },\n\n /**\n * Input validation messages\n */\n inputMessages: {\n type: Array,\n default: () => [],\n validator: inputMessages => {\n return validationMessageValidator(inputMessages);\n },\n },\n\n /**\n * Show input validation message\n */\n showInputMessages: {\n type: Boolean,\n default: true,\n },\n\n // @TODO: https://dialpad.atlassian.net/browse/DP-52324\n // type: {\n // type: String,\n // values: ['input', 'select'],\n // default: 'select',\n // },\n\n /**\n * Determines if the list is loading\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The message when the list is loading\n */\n loadingMessage: {\n type: String,\n default: 'loading...',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxHeight: {\n type: String,\n default: '300px',\n },\n\n /**\n * The selected items\n */\n selectedItems: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Would be the maximum number of selections you can make. 0 is unlimited\n */\n maxSelected: {\n type: Number,\n default: 0,\n },\n\n /**\n * Max select message when the max selections is exceeded with the structure:\n * `[{\"message\": string, \"type\": VALIDATION_MESSAGE_TYPES }]`\n */\n maxSelectedMessage: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the chip.\n * @values 100, 200, 300\n */\n size: {\n type: [String, Number],\n default: 300,\n validator: (t) => Object.keys(CHIP_SIZES).includes(String(t)),\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n\n /**\n * Determines whether the combobox should collapse to a single when losing focus.\n * @type {boolean}\n */\n collapseOnFocusOut: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Amount of reserved space (in px) on the right side of the input\n * before the chips and the input caret jump to the next line.\n * default is 64\n */\n reservedRightSpace: {\n type: Number,\n default: 64,\n },\n\n /**\n * Determines the maximum width of a single chip. If the text within this chip exceeds the value\n * it will be truncated with ellipses.\n * Possible units rem|px|em\n */\n chipMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the input element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n inputClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the input wrapper element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n inputWrapperClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * When true, disables the underlying input.\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String }\n */\n 'input',\n\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when item removed\n *\n * @event remove\n * @type {String}\n */\n 'remove',\n\n /**\n * Event fired when max selected items limit is reached\n *\n * @event max-selected\n * @type {Object}\n */\n 'max-selected',\n\n /**\n * Native keyup event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n\n /**\n * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Event fired when combobox item is highlighted\n *\n * @event combobox-highlight\n * @type {Object}\n */\n 'combobox-highlight',\n ],\n\n data () {\n return {\n value: '',\n popoverOffset: [0, 4],\n showValidationMessages: false,\n resizeWindowObserver: null,\n initialInputHeight: null,\n CHIP_SIZES,\n hasSlotContent,\n inputFocused: false,\n hideInputText: false,\n };\n },\n\n computed: {\n inputPlaceHolder () {\n return this.selectedItems?.length > 0 ? '' : this.placeholder;\n },\n\n chipListeners () {\n return {\n keydown: event => {\n this.onChipKeyDown(event);\n this.$emit('keydown', event);\n },\n };\n },\n\n inputListeners () {\n return {\n ...extractVueListeners(this.$attrs),\n onInput: event => {\n this.$emit('input', event);\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n\n onKeydown: event => {\n this.onInputKeyDown(event);\n },\n\n onKeyup: event => {\n this.$emit('keyup', event);\n },\n\n onClick: () => {\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n };\n },\n\n chipWrapperClass () {\n return {\n [`d-recipe-combobox-multi-select__chip-wrapper-${COMPONENT_SIZES[String(this.size)] || this.size}--collapsed`]: !this.inputFocused && this.collapseOnFocusOut,\n };\n },\n },\n\n watch: {\n selectedItems: {\n deep: true,\n handler: async function () {\n await this.initSelectedItems();\n },\n },\n\n chipMaxWidth: {\n async handler () {\n await this.initSelectedItems();\n },\n },\n\n async label () {\n await this.$nextTick();\n // Adjust the chips position if label changed\n this.setChipsTopPosition();\n },\n\n async description () {\n await this.$nextTick();\n // Adjust the chips position if description changed\n this.setChipsTopPosition();\n },\n\n size: {\n async handler () {\n await this.$nextTick();\n const input = this.getInput();\n this.revertInputPadding(input);\n this.initialInputHeight = input.getBoundingClientRect().height;\n this.setInputPadding();\n this.setChipsTopPosition();\n },\n },\n },\n\n async mounted () {\n this.setInitialInputHeight();\n // Recalculate chip position and input padding when resizing window\n this.resizeWindowObserver = new ResizeObserver(async () => {\n this.setChipsTopPosition();\n this.setInputPadding();\n });\n this.resizeWindowObserver.observe(document.body);\n\n await this.initSelectedItems();\n },\n\n beforeUnmount () {\n this.resizeWindowObserver?.unobserve(document.body);\n },\n\n methods: {\n extractNonListeners,\n comboboxHighlight (highlightIndex) {\n this.$emit('combobox-highlight', highlightIndex);\n },\n\n async initSelectedItems () {\n await this.$nextTick();\n this.setInputPadding();\n this.setChipsTopPosition();\n this.setInputMinWidth();\n this.checkMaxSelected();\n },\n\n onChipRemove (item) {\n this.$emit('remove', item);\n this.$refs.input?.focus();\n },\n\n onComboboxSelect (i) {\n if (this.loading) return;\n this.value = '';\n this.$emit('select', i);\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.showComboboxList();\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.closeComboboxList();\n },\n\n getChips () {\n if (!this.selectedItems.length || !this.$refs.chips) return null;\n\n // Use the order from selectedItems to not rely on DOM order which may be stale.\n // Track matched indices to handle duplicate item names correctly.\n const matched = new Set();\n const chips = this.selectedItems.map(item => {\n return this.$refs.chips.find((chip, index) => {\n if (matched.has(index)) return false;\n const chipLabel = returnFirstEl(chip.$el)?.querySelector('.d-chip__label')?.textContent?.trim();\n if (chipLabel === item) {\n matched.add(index);\n return true;\n }\n return false;\n });\n });\n return chips.filter(Boolean).map(chip => returnFirstEl(chip.$el));\n },\n\n getChipButtons () {\n const chips = this.getChips();\n return chips && chips.map(chip => returnFirstEl(chip).querySelector('button'));\n },\n\n getLastChipButton () {\n const chipButtons = this.getChipButtons();\n return chipButtons && chipButtons[chipButtons.length - 1];\n },\n\n getLastChip () {\n const chips = this.getChips();\n return chips && chips[chips.length - 1];\n },\n\n getFirstChip () {\n const chips = this.getChips();\n return chips && chips[0];\n },\n\n getInput () {\n return this.$refs.input?.$refs.input;\n },\n\n onChipKeyDown (event) {\n const key = event.code?.toLowerCase();\n if (key === 'arrowleft') {\n // Move to the previous chip\n this.navigateBetweenChips(event.target, true);\n } else if (key === 'arrowright') {\n if (event.target.id === this.getLastChipButton().id) {\n // Move to the input if it's the last chip\n this.moveFromChipToInput();\n } else {\n // Move to the next chip\n this.navigateBetweenChips(event.target, false);\n }\n }\n },\n\n onInputKeyDown (event) {\n const key = event.code?.toLowerCase();\n // If the cursor is at the start of the text,\n // press 'backspace' or 'left' focuses the last chip\n if (this.selectedItems.length > 0 && event.target.selectionStart === 0) {\n // if there is selected text, do not focus the last chip\n if (event.target.selectionEnd !== event.target.selectionStart) {\n return;\n }\n if (key === 'backspace' || key === 'arrowleft') {\n this.moveFromInputToChip();\n }\n }\n },\n\n moveFromInputToChip () {\n this.getLastChipButton().focus();\n this.$refs.input?.blur();\n this.closeComboboxList();\n },\n\n moveFromChipToInput () {\n this.getLastChipButton().blur();\n this.$refs.input?.focus();\n this.showComboboxList();\n },\n\n navigateBetweenChips (target, toLeft) {\n const from = this.getChipButtons().indexOf(target);\n const to = toLeft ? from - 1 : from + 1;\n if (to < 0 || to >= this.$refs.chips?.length) {\n return;\n }\n this.getChipButtons()[from].blur();\n this.getChipButtons()[to].focus();\n this.closeComboboxList();\n },\n\n setChipsTopPosition () {\n // To place the chips in the input box\n // The chip \"top\" position should be the same line as the input box\n const input = this.getInput();\n if (!input) return;\n const inputSlotWrapper = this.$refs.inputSlotWrapper;\n const top = input.getBoundingClientRect().top -\n inputSlotWrapper.getBoundingClientRect().top;\n const chipsWrapper = this.$refs.chipsWrapper;\n chipsWrapper.style.top = (top - CHIP_TOP_POSITION[String(this.size)]) + 'px';\n },\n\n setInputPadding () {\n const lastChip = this.getLastChip();\n const input = this.getInput();\n const chipsWrapper = this.$refs.chipsWrapper;\n if (!input) return;\n this.revertInputPadding(input);\n this.popoverOffset = [0, 4];\n if (!lastChip) return;\n // Avoid adding extra padding when the input is not focused if collapseOnFocusOut is true\n // This ensures the input returns to its original state when resizing\n if (this.collapseOnFocusOut && !this.inputFocused) return;\n\n // Get the position of the last chip\n // The input cursor should be the same \"top\" as that chip and next besides it\n const left = lastChip.offsetLeft + this.getFullWidth(lastChip);\n const spaceLeft = input.getBoundingClientRect().width - left;\n // input.style.paddingLeft = left + 'px';\n\n if (spaceLeft > this.reservedRightSpace) {\n input.style.paddingInlineStart = left + 'px';\n } else {\n input.style.paddingInlineStart = '4px';\n }\n\n // Get the chip wrapper height minus the 4px padding\n const chipsWrapperHeight = chipsWrapper.getBoundingClientRect().height - 4;\n const lastChipHeight = lastChip.getBoundingClientRect().height - 4;\n\n // Get lastChip offsetTop plus 2px of the input padding.\n const top = spaceLeft > this.reservedRightSpace\n ? lastChip.offsetTop + 2\n : (chipsWrapperHeight + lastChipHeight - 9);\n\n input.style.paddingBlockStart = `${top}px`;\n },\n\n revertInputPadding (input) {\n input.style.paddingInlineStart = '';\n input.style.paddingBlockStart = '';\n input.style.paddingBlockEnd = '';\n },\n\n getFullWidth (el) {\n const styles = window.getComputedStyle(el);\n return el.offsetWidth + parseInt(styles.marginLeft) + parseInt(styles.marginRight);\n },\n\n setInputMinWidth () {\n // Ensure the width of the input is \"slightly bigger\" than the width of a single chip\n const firstChip = this.getFirstChip();\n const input = this.getInput();\n if (!input) return;\n if (firstChip) {\n // Add 4px buffer for typing room\n input.style.minWidth = (this.getFullWidth(firstChip) + 4) + 'px';\n } else {\n input.style.minWidth = '';\n }\n },\n\n checkMaxSelected () {\n if (this.maxSelected === 0) return;\n if (this.selectedItems.length > this.maxSelected) {\n this.showValidationMessages = true;\n this.$emit('max-selected');\n } else {\n this.showValidationMessages = false;\n }\n },\n\n setInitialInputHeight () {\n const input = this.getInput();\n if (!input) return;\n this.initialInputHeight = input.getBoundingClientRect().height;\n },\n\n async handleInputFocusIn () {\n this.inputFocused = true;\n if (this.collapseOnFocusOut) {\n this.hideInputText = false;\n await this.$nextTick();\n this.setInputPadding();\n }\n },\n\n async handleInputFocusOut () {\n this.inputFocused = false;\n if (this.collapseOnFocusOut) {\n this.hideInputText = true;\n const input = this.getInput();\n if (!input) return;\n // Hide the input text when is not on first line\n if (!input.style.paddingTop) {\n return;\n }\n this.revertInputPadding(input);\n }\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;;AAuIA,IAAK,IAAU;CACb,cAAc,EAAE,MAAM,GAAG;CACzB,MAAM;CAEN,YAAY;EACV,uBAAA;EACA,SAAA;EACA,QAAA;EACA,sBAAA;EACD;CAED,cAAc;CAEd,OAAO;EAIL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AAI,QAgBP,CAfN,EAeM,OAAA;GAdJ,KAAI;GACJ,OAAM;GACL,aAAS,EAAA,OAAA,EAAA,KAAA,QAAV,IAAkB,CAAA,UAAA,CAAA;MAGT,EAAA,WAEP,GAAA,EACF,EAKM,OALN,GAKM,EADD,EAAA,eAAc,EAAA,EAAA,IARnB,EAGE,EAAA,QAAA,QAAA,EAAA,KAAA,GAAA,CAAA,CAKiB,EAAA,IAAA,CAAA,CAAA;;KAvBf,EAAA,eAAe,EAAA,OAAO,OAAM,GAAA;QACjC;cAIK,CAFN,EAEM,OAFN,GAEM,CADJ,EAAsB,EAAA,QAAA,SAAA,CAAA,EAAA,IAAA,CAAA,CAAA;;aA0BlB,EAAA,eAAe,EAAA,OAAO,OAAM,GAAA;QACjC;cAIK,CAFN,EAEM,OAFN,GAEM,CADJ,EAAsB,EAAA,QAAA,SAAA,CAAA,EAAA,IAAA,CAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/utils/index.cjs`),
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/constants/sizes.cjs`),t=require(`../../common/utils/index.cjs`),n=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),r=require(`../../mode_constants-CzYJW9ua.cjs`),i=require(`../combobox/combobox-loading-list.cjs`),a=require(`../combobox/combobox-empty-list.cjs`),o=require(`../../combobox-Da7wBh3G.cjs`),s=require(`../combobox/combobox-constants.cjs`),c=require(`../popover/popover-constants.cjs`),l=require(`../popover/popover.cjs`),u=require(`../dropdown/dropdown-constants.cjs`);let d=require(`vue`);var f={compatConfig:{MODE:3},name:`DtComboboxWithPopover`,components:{DtCombobox:o.t,DtPopover:l.default,ComboboxLoadingList:i.default,ComboboxEmptyList:a.default},props:{contentMode:r.t,label:{type:String,required:!0},showLabel:{type:Boolean,default:!0},size:{type:[String,Number],default:null,validator:t=>t===null||Object.values(s.COMBOBOX_LABEL_SIZES).includes(t)||Object.keys(e.COMPONENT_SIZES).includes(String(t))},description:{type:String,default:``},showList:{type:Boolean,default:null},listId:{type:String,default(){return t.getUniqueString()}},listClass:{type:[String,Array,Object],default:``},onBeginningOfList:{type:Function,default:null},onEndOfList:{type:Function,default:null},maxHeight:{type:String,default:``},maxWidth:{type:String,default:``},padding:{type:String,default:`small`,validator:e=>Object.keys(u.DROPDOWN_PADDING_CLASSES).some(t=>t===e)},contentWidth:{type:String,default:null,validator:e=>c.POPOVER_CONTENT_WIDTHS.includes(e)},openWithArrowKeys:{type:Boolean,default:!1},popoverOffset:{type:Array,default:()=>[0,4]},popoverSticky:{type:[Boolean,String],default:!1},hasSuggestionList:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},emptyList:{type:Boolean,default:!1},emptyStateMessage:{type:String,default:``},appendTo:{type:[HTMLElement,String],default:`body`,validator:e=>c.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},transition:{type:String,default:`fade`}},emits:[`select`,`escape`,`highlight`,`opened`],data(){return{DROPDOWN_PADDING_CLASSES:u.DROPDOWN_PADDING_CLASSES,isListShown:!1,isInputFocused:!1,isListFocused:!1,externalAnchor:t.getUniqueString(),hasSlotContent:t.hasSlotContent}},computed:{comboboxListeners(){return{...this.$attrs,onSelect:this.onSelect,onEscape:this.onEscape,onHighlight:this.onHighlight}}},watch:{showList:{handler:function(e){e!==null&&(this.isListShown=e)},immediate:!0},isListShown(e){e?window.addEventListener(`mousedown`,this.onFocusOut):window.removeEventListener(`mousedown`,this.onFocusOut),this.onOpened(e)}},methods:{handleDisplayList(e){!this.hasSuggestionList&&e&&this.showComboboxList(),!this.hasSuggestionList&&!e&&this.closeComboboxList()},showComboboxList(){this.showList??(this.isListShown=!0)},closeComboboxList(){this.showList??(this.isListShown=!1)},onSelect(e){this.loading||(this.$emit(`select`,e),this.hasSuggestionList||this.closeComboboxList())},onEscape(){this.$emit(`escape`),this.closeComboboxList()},onHighlight(e){this.loading||this.$emit(`highlight`,e)},onOpened(e){this.$emit(`opened`,e)},onFocusIn(e){this.hasSuggestionList&&e&&this.$refs.input?.querySelector(`input`)===e.target&&this.showComboboxList()},onFocusOut(e){let t=this.$refs.popover?.tip?.popper,n=this.$refs.input;e.composedPath()?.some(e=>[t,n].includes(e))||this.closeComboboxList()},openOnArrowKeyPress(){this.showList!==null||this.isListShown||!this.openWithArrowKeys||this.showComboboxList()}}},p=[`id`],m={ref:`header`},h=[`onMouseleave`,`onFocusout`],g={ref:`footer`};function _(e,t,n,r,i,a){let o=(0,d.resolveComponent)(`combobox-loading-list`),s=(0,d.resolveComponent)(`combobox-empty-list`),c=(0,d.resolveComponent)(`dt-popover`),l=(0,d.resolveComponent)(`dt-combobox`);return(0,d.openBlock)(),(0,d.createBlock)(l,(0,d.mergeProps)({ref:`combobox`,loading:n.loading,label:n.label,"show-label":n.showLabel,size:n.size,description:n.description,"empty-list":n.emptyList,"empty-state-message":n.emptyStateMessage,"show-list":i.isListShown,"on-beginning-of-list":n.onBeginningOfList,"on-end-of-list":n.onEndOfList,"list-rendered-outside":!0,"list-id":n.listId,"data-qa":`dt-combobox`},a.comboboxListeners),{input:(0,d.withCtx)(({inputProps:n})=>[(0,d.createElementVNode)(`div`,{id:i.externalAnchor,ref:`input`,onFocusin:t[0]||(t[0]=(...e)=>a.onFocusIn&&a.onFocusIn(...e)),onKeydown:[t[1]||(t[1]=(0,d.withKeys)(e=>a.openOnArrowKeyPress(e),[`up`])),t[2]||(t[2]=(0,d.withKeys)(e=>a.openOnArrowKeyPress(e),[`down`]))]},[(0,d.renderSlot)(e.$slots,`input`,{inputProps:n,onInput:a.handleDisplayList})],40,p)]),list:(0,d.withCtx)(({opened:r,listProps:a,clearHighlightIndex:l})=>[(0,d.createVNode)(c,{ref:`popover`,open:i.isListShown,"onUpdate:open":t[3]||(t[3]=e=>i.isListShown=e),"close-on-click":!1,"max-height":n.maxHeight,"max-width":n.maxWidth,offset:n.popoverOffset,sticky:n.popoverSticky,"content-mode":n.contentMode,placement:`bottom-start`,"initial-focus-element":`none`,padding:`none`,role:`listbox`,"external-anchor":i.externalAnchor,"content-width":n.contentWidth,"content-appear":!0,"content-tabindex":null,modal:!1,"auto-focus":!1,"append-to":n.appendTo,transition:n.transition,onOpened:r},(0,d.createSlots)({content:(0,d.withCtx)(()=>[(0,d.createElementVNode)(`div`,{ref:`listWrapper`,class:(0,d.normalizeClass)([`d-recipe-combobox-with-popover__list`,i.DROPDOWN_PADDING_CLASSES[n.padding],n.listClass]),onMouseleave:l,onFocusout:l},[n.loading?((0,d.openBlock)(),(0,d.createBlock)(o,(0,d.normalizeProps)((0,d.mergeProps)({key:0},a)),null,16)):n.emptyList&&n.emptyStateMessage?((0,d.openBlock)(),(0,d.createBlock)(s,(0,d.mergeProps)({key:1},a,{message:n.emptyStateMessage}),null,16,[`message`])):(0,d.renderSlot)(e.$slots,`list`,{key:2,listProps:a})],42,h)]),_:2},[i.hasSlotContent(e.$slots.header)?{name:`headerContent`,fn:(0,d.withCtx)(()=>[(0,d.createElementVNode)(`div`,m,[(0,d.renderSlot)(e.$slots,`header`)],512)]),key:`0`}:void 0,i.hasSlotContent(e.$slots.footer)?{name:`footerContent`,fn:(0,d.withCtx)(()=>[(0,d.createElementVNode)(`div`,g,[(0,d.renderSlot)(e.$slots,`footer`)],512)]),key:`1`}:void 0]),1032,[`open`,`max-height`,`max-width`,`offset`,`sticky`,`content-mode`,`external-anchor`,`content-width`,`append-to`,`transition`,`onOpened`])]),_:3},16,[`loading`,`label`,`show-label`,`size`,`description`,`empty-list`,`empty-state-message`,`show-list`,`on-beginning-of-list`,`on-end-of-list`,`list-id`])}var v=n.t(f,[[`render`,_]]);exports.default=v;
|
|
2
2
|
//# sourceMappingURL=combobox-with-popover.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-with-popover.cjs","names":[],"sources":["../../../components/combobox_with_popover/combobox_with_popover.vue"],"sourcesContent":["<template>\n <dt-combobox\n ref=\"combobox\"\n :loading=\"loading\"\n :label=\"label\"\n :label-visible=\"labelVisible\"\n :size=\"size\"\n :description=\"description\"\n :empty-list=\"emptyList\"\n :empty-state-message=\"emptyStateMessage\"\n :show-list=\"isListShown\"\n :on-beginning-of-list=\"onBeginningOfList\"\n :on-end-of-list=\"onEndOfList\"\n :list-rendered-outside=\"true\"\n :list-id=\"listId\"\n data-qa=\"dt-combobox\"\n v-bind=\"comboboxListeners\"\n >\n <template\n #input=\"{ inputProps }\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"externalAnchor\"\n ref=\"input\"\n @focusin=\"onFocusIn\"\n @keydown.up=\"openOnArrowKeyPress($event)\"\n @keydown.down=\"openOnArrowKeyPress($event)\"\n >\n <slot\n name=\"input\"\n :input-props=\"inputProps\"\n :on-input=\"handleDisplayList\"\n />\n </div>\n </template>\n <template #list=\"{ opened, listProps, clearHighlightIndex }\">\n <dt-popover\n ref=\"popover\"\n v-model:open=\"isListShown\"\n :hide-on-click=\"false\"\n :max-height=\"maxHeight\"\n :max-width=\"maxWidth\"\n :offset=\"popoverOffset\"\n :sticky=\"popoverSticky\"\n placement=\"bottom-start\"\n initial-focus-element=\"none\"\n padding=\"none\"\n role=\"listbox\"\n :external-anchor=\"externalAnchor\"\n :content-width=\"contentWidth\"\n :content-appear=\"true\"\n :content-tabindex=\"null\"\n :modal=\"false\"\n :auto-focus=\"false\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n @opened=\"opened\"\n >\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #headerContent\n >\n <div\n ref=\"header\"\n >\n <slot name=\"header\" />\n </div>\n </template>\n\n <template #content>\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"listWrapper\"\n :class=\"[\n 'd-recipe-combobox-with-popover__list',\n DROPDOWN_PADDING_CLASSES[padding],\n listClass,\n ]\"\n @mouseleave=\"clearHighlightIndex\"\n @focusout=\"clearHighlightIndex\"\n >\n <combobox-loading-list\n v-if=\"loading\"\n v-bind=\"listProps\"\n />\n <combobox-empty-list\n v-else-if=\"emptyList && emptyStateMessage\"\n v-bind=\"listProps\"\n :message=\"emptyStateMessage\"\n />\n <slot\n v-else\n name=\"list\"\n :list-props=\"listProps\"\n />\n </div>\n </template>\n\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footerContent\n >\n <div\n ref=\"footer\"\n >\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-popover>\n </template>\n </dt-combobox>\n</template>\n\n<script>\nimport ComboboxLoadingList from '@/components/combobox/combobox_loading-list.vue';\nimport ComboboxEmptyList from '@/components/combobox/combobox_empty-list.vue';\nimport { DtCombobox, COMBOBOX_LABEL_SIZES } from '@/components/combobox';\nimport { DtPopover, POPOVER_APPEND_TO_VALUES, POPOVER_CONTENT_WIDTHS } from '@/components/popover';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport { DROPDOWN_PADDING_CLASSES } from '@/components/dropdown';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtComboboxWithPopover',\n\n components: {\n DtCombobox,\n DtPopover,\n ComboboxLoadingList,\n ComboboxEmptyList,\n },\n\n props: {\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n labelVisible: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the input, one of `xs`, `sm`, `md`, `lg`, `xl`\n * @values null, xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: null,\n validator: (t) => Object.values(COMBOBOX_LABEL_SIZES).includes(t),\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Sets an ID on the list element of the component. Used by several aria attributes\n * as well as when deriving the IDs for each item.\n */\n listId: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Additional class for the wrapper list element.\n */\n listClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A method that will be called when the selection goes past the beginning of the list.\n */\n onBeginningOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * A method that will be called when the selection goes past the end of the list.\n */\n onEndOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Vertical padding size around the list element.\n */\n padding: {\n type: String,\n default: 'small',\n validator: (padding) => {\n return Object.keys(DROPDOWN_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n */\n contentWidth: {\n type: String,\n default: null,\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * If the list should be shown by pressing up or down arrow key on the input element.\n * This can be set when not passing showList prop.\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the popover content box from its anchor element\n * by the specified number of pixels.\n */\n popoverOffset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * If the popover sticks to the input.\n */\n popoverSticky: {\n type: [Boolean, String],\n default: false,\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines when to show the skeletons and also controls aria-busy attribute.\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the list to an empty state, and displays the message from prop `emptyStateMessage`.\n */\n emptyList: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Message to show when the list is empty\n */\n emptyStateMessage: {\n type: String,\n default: '',\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n },\n\n emits: [\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when 'escape' key is pressed\n *\n * @event escape\n */\n 'escape',\n\n /**\n * Event fired when an item is highlighted\n *\n * @event highlight\n * @type {Number}\n */\n 'highlight',\n\n /**\n * Emitted when items are shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n ],\n\n data () {\n return {\n DROPDOWN_PADDING_CLASSES,\n isListShown: false,\n isInputFocused: false,\n isListFocused: false,\n externalAnchor: getUniqueString(),\n hasSlotContent,\n };\n },\n\n computed: {\n comboboxListeners () {\n return {\n ...this.$attrs,\n\n onSelect: this.onSelect,\n\n onEscape: this.onEscape,\n\n onHighlight: this.onHighlight,\n };\n },\n },\n\n watch: {\n showList: {\n handler: function (show) {\n if (show !== null) {\n this.isListShown = show;\n }\n },\n\n immediate: true,\n },\n\n isListShown (val) {\n if (val) {\n window.addEventListener('mousedown', this.onFocusOut);\n } else {\n window.removeEventListener('mousedown', this.onFocusOut);\n }\n this.onOpened(val);\n },\n },\n\n methods: {\n handleDisplayList (value) {\n if (!this.hasSuggestionList && value) { this.showComboboxList(); }\n if (!this.hasSuggestionList && !value) { this.closeComboboxList(); }\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = true;\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = false;\n },\n\n onSelect (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('select', highlightIndex);\n if (!this.hasSuggestionList) {\n // we don't display the list before the user has typed anything\n this.closeComboboxList();\n }\n },\n\n onEscape () {\n this.$emit('escape');\n this.closeComboboxList();\n },\n\n onHighlight (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('highlight', highlightIndex);\n },\n\n onOpened (opened) {\n this.$emit('opened', opened);\n },\n\n onFocusIn (e) {\n if (this.hasSuggestionList && e && this.$refs.input?.querySelector('input') === e.target) {\n // only trigger if we show suggestion list when focused, and\n // it's the input specifically that was focused\n this.showComboboxList();\n }\n },\n\n onFocusOut (e) {\n // Check if the focus change was to another target within the combobox component\n const popoverEl = this.$refs.popover?.tip?.popper;\n const comboboxEl = this.$refs.input;\n\n if (e.composedPath()?.some(el => [popoverEl, comboboxEl].includes(el))) return;\n\n // If outside the combobox then close\n this.closeComboboxList();\n },\n\n openOnArrowKeyPress () {\n if (this.showList !== null || this.isListShown || !this.openWithArrowKeys) { return; }\n\n this.showComboboxList();\n },\n },\n};\n</script>\n"],"mappings":"ikBA0HA,IAAK,EAAU,CACb,aAAc,CAAE,KAAM,EAAG,CACzB,KAAM,wBAEN,WAAY,CACV,WAAA,EAAA,EACA,UAAA,EAAA,QACA,oBAAA,EAAA,QACA,kBAAA,EAAA,QACD,CAED,MAAO,CAIL,MAAO,CACL,KAAM,OACN,SAAU,GACX,CAMD,aAAc,CACZ,KAAM,QACN,QAAS,GACV,CAMD,KAAM,CACJ,KAAM,OACN,QAAS,KACT,UAAY,GAAM,OAAO,OAAO,EAAA,qBAAqB,CAAC,SAAS,EAAE,CAClE,CAKD,YAAa,CACX,KAAM,OACN,QAAS,GACV,CAQD,SAAU,CACR,KAAM,QACN,QAAS,KACV,CAMD,OAAQ,CACN,KAAM,OACN,SAAW,CAAE,OAAO,EAAA,iBAAiB,EACtC,CAKD,UAAW,CACT,KAAM,CAAC,OAA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N,GAAA,EAAA,EAAA,iBAAA,EAAA,EAAA,YAAA,CAAA,IAAA,EAAA,CADQ,EAAS,CAAA,CAAA,KAAA,GAAA,EAGN,EAAA,WAAa,EAAA,oBAAA,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,aAGxB,GAAA,EAAA,EAAA,YAAA,CAAA,IAAA,EAAA,CAFQ,EAAS,CAChB,QAAS,EAAA,kBAAiB,CAAA,CAAA,KAAA,GAAA,CAAA,UAAA,CAAA,GAAA,EAAA,EAAA,YAM3B,EAAA,OAAA,OAAA,OADa,6BAlCX,EAAA,eAAe,EAAA,OAAO,OAAM,CAAA,MACjC,qCAMK,EAAA,EAAA,EAAA,oBAAA,MAJN,EAIM,EAAA,EAAA,EAAA,YADkB,EAAA,OAAA,SAAA,CAAA,CAAA,IAAA,CAAA,CAAA,iBAkClB,EAAA,eAAe,EAAA,OAAO,OAAM,CAAA,MACjC,qCAMK,EAAA,EAAA,EAAA,oBAAA,MAJN,EAIM,EAAA,EAAA,EAAA,YADkB,EAAA,OAAA,SAAA,CAAA,CAAA,IAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"combobox-with-popover.cjs","names":[],"sources":["../../../components/combobox_with_popover/combobox_with_popover.vue"],"sourcesContent":["<template>\n <dt-combobox\n ref=\"combobox\"\n :loading=\"loading\"\n :label=\"label\"\n :show-label=\"showLabel\"\n :size=\"size\"\n :description=\"description\"\n :empty-list=\"emptyList\"\n :empty-state-message=\"emptyStateMessage\"\n :show-list=\"isListShown\"\n :on-beginning-of-list=\"onBeginningOfList\"\n :on-end-of-list=\"onEndOfList\"\n :list-rendered-outside=\"true\"\n :list-id=\"listId\"\n data-qa=\"dt-combobox\"\n v-bind=\"comboboxListeners\"\n >\n <template\n #input=\"{ inputProps }\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"externalAnchor\"\n ref=\"input\"\n @focusin=\"onFocusIn\"\n @keydown.up=\"openOnArrowKeyPress($event)\"\n @keydown.down=\"openOnArrowKeyPress($event)\"\n >\n <slot\n name=\"input\"\n :input-props=\"inputProps\"\n :on-input=\"handleDisplayList\"\n />\n </div>\n </template>\n <template #list=\"{ opened, listProps, clearHighlightIndex }\">\n <dt-popover\n ref=\"popover\"\n v-model:open=\"isListShown\"\n :close-on-click=\"false\"\n :max-height=\"maxHeight\"\n :max-width=\"maxWidth\"\n :offset=\"popoverOffset\"\n :sticky=\"popoverSticky\"\n :content-mode=\"contentMode\"\n placement=\"bottom-start\"\n initial-focus-element=\"none\"\n padding=\"none\"\n role=\"listbox\"\n :external-anchor=\"externalAnchor\"\n :content-width=\"contentWidth\"\n :content-appear=\"true\"\n :content-tabindex=\"null\"\n :modal=\"false\"\n :auto-focus=\"false\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n @opened=\"opened\"\n >\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #headerContent\n >\n <div\n ref=\"header\"\n >\n <slot name=\"header\" />\n </div>\n </template>\n\n <template #content>\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"listWrapper\"\n :class=\"[\n 'd-recipe-combobox-with-popover__list',\n DROPDOWN_PADDING_CLASSES[padding],\n listClass,\n ]\"\n @mouseleave=\"clearHighlightIndex\"\n @focusout=\"clearHighlightIndex\"\n >\n <combobox-loading-list\n v-if=\"loading\"\n v-bind=\"listProps\"\n />\n <combobox-empty-list\n v-else-if=\"emptyList && emptyStateMessage\"\n v-bind=\"listProps\"\n :message=\"emptyStateMessage\"\n />\n <slot\n v-else\n name=\"list\"\n :list-props=\"listProps\"\n />\n </div>\n </template>\n\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footerContent\n >\n <div\n ref=\"footer\"\n >\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-popover>\n </template>\n </dt-combobox>\n</template>\n\n<script>\nimport ComboboxLoadingList from '@/components/combobox/combobox_loading-list.vue';\nimport ComboboxEmptyList from '@/components/combobox/combobox_empty-list.vue';\nimport { DtCombobox, COMBOBOX_LABEL_SIZES } from '@/components/combobox';\nimport { DtPopover, POPOVER_APPEND_TO_VALUES, POPOVER_CONTENT_WIDTHS } from '@/components/popover';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport { COMPONENT_SIZES } from '@/common/constants';\nimport { DROPDOWN_PADDING_CLASSES } from '@/components/dropdown';\nimport { CONTENT_MODE_PROP } from '@/common/mode_constants';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtComboboxWithPopover',\n\n components: {\n DtCombobox,\n DtPopover,\n ComboboxLoadingList,\n ComboboxEmptyList,\n },\n\n props: {\n /**\n * Applies a color mode to the positioned content element.\n * @values light, dark, invert\n */\n contentMode: CONTENT_MODE_PROP,\n\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n showLabel: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the input.\n * @values 100, 200, 300, 400, 500\n */\n size: {\n type: [String, Number],\n default: null,\n validator: (t) => t === null\n || Object.values(COMBOBOX_LABEL_SIZES).includes(t)\n || Object.keys(COMPONENT_SIZES).includes(String(t)),\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Sets an ID on the list element of the component. Used by several aria attributes\n * as well as when deriving the IDs for each item.\n */\n listId: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Additional class for the wrapper list element.\n */\n listClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A method that will be called when the selection goes past the beginning of the list.\n */\n onBeginningOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * A method that will be called when the selection goes past the end of the list.\n */\n onEndOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Vertical padding size around the list element.\n */\n padding: {\n type: String,\n default: 'small',\n validator: (padding) => {\n return Object.keys(DROPDOWN_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n */\n contentWidth: {\n type: String,\n default: null,\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * If the list should be shown by pressing up or down arrow key on the input element.\n * This can be set when not passing showList prop.\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the popover content box from its anchor element\n * by the specified number of pixels.\n */\n popoverOffset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * If the popover sticks to the input.\n */\n popoverSticky: {\n type: [Boolean, String],\n default: false,\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines when to show the skeletons and also controls aria-busy attribute.\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the list to an empty state, and displays the message from prop `emptyStateMessage`.\n */\n emptyList: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Message to show when the list is empty\n */\n emptyStateMessage: {\n type: String,\n default: '',\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n },\n\n emits: [\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when 'escape' key is pressed\n *\n * @event escape\n */\n 'escape',\n\n /**\n * Event fired when an item is highlighted\n *\n * @event highlight\n * @type {Number}\n */\n 'highlight',\n\n /**\n * Emitted when items are shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n ],\n\n data () {\n return {\n DROPDOWN_PADDING_CLASSES,\n isListShown: false,\n isInputFocused: false,\n isListFocused: false,\n externalAnchor: getUniqueString(),\n hasSlotContent,\n };\n },\n\n computed: {\n comboboxListeners () {\n return {\n ...this.$attrs,\n\n onSelect: this.onSelect,\n\n onEscape: this.onEscape,\n\n onHighlight: this.onHighlight,\n };\n },\n },\n\n watch: {\n showList: {\n handler: function (show) {\n if (show !== null) {\n this.isListShown = show;\n }\n },\n\n immediate: true,\n },\n\n isListShown (val) {\n if (val) {\n window.addEventListener('mousedown', this.onFocusOut);\n } else {\n window.removeEventListener('mousedown', this.onFocusOut);\n }\n this.onOpened(val);\n },\n },\n\n methods: {\n handleDisplayList (value) {\n if (!this.hasSuggestionList && value) { this.showComboboxList(); }\n if (!this.hasSuggestionList && !value) { this.closeComboboxList(); }\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = true;\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = false;\n },\n\n onSelect (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('select', highlightIndex);\n if (!this.hasSuggestionList) {\n // we don't display the list before the user has typed anything\n this.closeComboboxList();\n }\n },\n\n onEscape () {\n this.$emit('escape');\n this.closeComboboxList();\n },\n\n onHighlight (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('highlight', highlightIndex);\n },\n\n onOpened (opened) {\n this.$emit('opened', opened);\n },\n\n onFocusIn (e) {\n if (this.hasSuggestionList && e && this.$refs.input?.querySelector('input') === e.target) {\n // only trigger if we show suggestion list when focused, and\n // it's the input specifically that was focused\n this.showComboboxList();\n }\n },\n\n onFocusOut (e) {\n // Check if the focus change was to another target within the combobox component\n const popoverEl = this.$refs.popover?.tip?.popper;\n const comboboxEl = this.$refs.input;\n\n if (e.composedPath()?.some(el => [popoverEl, comboboxEl].includes(el))) return;\n\n // If outside the combobox then close\n this.closeComboboxList();\n },\n\n openOnArrowKeyPress () {\n if (this.showList !== null || this.isListShown || !this.openWithArrowKeys) { return; }\n\n this.showComboboxList();\n },\n },\n};\n</script>\n"],"mappings":"8pBA6HA,IAAK,EAAU,CACb,aAAc,CAAE,KAAM,EAAG,CACzB,KAAM,wBAEN,WAAY,CACV,WAAA,EAAA,EACA,UAAA,EAAA,QACA,oBAAA,EAAA,QACA,kBAAA,EAAA,QACD,CAED,MAAO,CAKL,YAAa,EAAA,EAKb,MAAO,CACL,KAAM,OACN,SAAU,GACX,CAMD,UAAW,CACT,KAAM,QACN,QAAS,GACV,CAMD,KAAM,CACJ,KAAM,CAAC,OAAQ,OAAO,CACtB,QAAS,KACT,UAAY,GAAM,IAAM,MACnB,OAAO,OAAO,EAAA,qBAAqB,CAAC,SAAS,EAAC,EAC9C,OAAO,KAAK,EAAA,gBAAgB,CAAC,SAAS,OAAO,EAAE,CAAC,CACtD,CAKD,YAAa,CACX,KAAM,OACN,QAAS,GACV,CAQD,SAAU,CACR,KAAM,QACN,QAAS,KACV,CAMD,OAAQ,CACN,KAAM,OACN,SAAW,CAAE,OAAO,EAAA,iBAAiB,EACtC,CAKD,UAAW,CACT,KAAM,CAAC,OAAQ,MAAO,OAAO,CAC7B,QAAS,GACV,CAKD,kBAAmB,CACjB,KAAM,SACN,QAAS,KACV,CAKD,YAAa,CACX,KAAM,SACN,QAAS,KACV,CAMD,UAAW,CACT,KAAM,OACN,QAAS,GACV,CAMD,SAAU,CACR,KAAM,OACN,QAAS,GACV,CAKD,QAAS,CACP,KAAM,OACN,QAAS,QACT,UAAY,GACH,OAAO,KAAK,EAAA,yB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EAAA,kBAAiB,CAAA,CAAA,KAAA,GAAA,CAAA,UAAA,CAAA,GAAA,EAAA,EAAA,YAM3B,EAAA,OAAA,OAAA,OADa,6BAlCX,EAAA,eAAe,EAAA,OAAO,OAAM,CAAA,MACjC,qCAMK,EAAA,EAAA,EAAA,oBAAA,MAJN,EAIM,EAAA,EAAA,EAAA,YADkB,EAAA,OAAA,SAAA,CAAA,CAAA,IAAA,CAAA,CAAA,iBAkClB,EAAA,eAAe,EAAA,OAAO,OAAM,CAAA,MACjC,qCAMK,EAAA,EAAA,EAAA,oBAAA,MAJN,EAIM,EAAA,EAAA,EAAA,YADkB,EAAA,OAAA,SAAA,CAAA,CAAA,IAAA,CAAA,CAAA"}
|
|
@@ -1,36 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as n } from "../../
|
|
3
|
-
import r from "
|
|
4
|
-
import i from "
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
1
|
+
import { COMPONENT_SIZES as e } from "../../common/constants/sizes.js";
|
|
2
|
+
import { getUniqueString as t, hasSlotContent as n } from "../../common/utils/index.js";
|
|
3
|
+
import { t as r } from "../../_plugin-vue_export-helper-BTgDAbhb.js";
|
|
4
|
+
import { t as i } from "../../mode_constants-tb7TL85q.js";
|
|
5
|
+
import a from "../combobox/combobox-loading-list.js";
|
|
6
|
+
import o from "../combobox/combobox-empty-list.js";
|
|
7
|
+
import { t as s } from "../../combobox-BQBKrDTW.js";
|
|
8
|
+
import { COMBOBOX_LABEL_SIZES as c } from "../combobox/combobox-constants.js";
|
|
9
|
+
import { POPOVER_APPEND_TO_VALUES as l, POPOVER_CONTENT_WIDTHS as u } from "../popover/popover-constants.js";
|
|
10
|
+
import d from "../popover/popover.js";
|
|
11
|
+
import { DROPDOWN_PADDING_CLASSES as f } from "../dropdown/dropdown-constants.js";
|
|
12
|
+
import { createBlock as p, createElementVNode as m, createSlots as h, createVNode as g, mergeProps as _, normalizeClass as v, normalizeProps as y, openBlock as b, renderSlot as x, resolveComponent as S, withCtx as C, withKeys as w } from "vue";
|
|
11
13
|
//#region components/combobox_with_popover/combobox_with_popover.vue
|
|
12
|
-
var
|
|
14
|
+
var T = {
|
|
13
15
|
compatConfig: { MODE: 3 },
|
|
14
16
|
name: "DtComboboxWithPopover",
|
|
15
17
|
components: {
|
|
16
|
-
DtCombobox:
|
|
17
|
-
DtPopover:
|
|
18
|
-
ComboboxLoadingList:
|
|
19
|
-
ComboboxEmptyList:
|
|
18
|
+
DtCombobox: s,
|
|
19
|
+
DtPopover: d,
|
|
20
|
+
ComboboxLoadingList: a,
|
|
21
|
+
ComboboxEmptyList: o
|
|
20
22
|
},
|
|
21
23
|
props: {
|
|
24
|
+
contentMode: i,
|
|
22
25
|
label: {
|
|
23
26
|
type: String,
|
|
24
27
|
required: !0
|
|
25
28
|
},
|
|
26
|
-
|
|
29
|
+
showLabel: {
|
|
27
30
|
type: Boolean,
|
|
28
31
|
default: !0
|
|
29
32
|
},
|
|
30
33
|
size: {
|
|
31
|
-
type: String,
|
|
34
|
+
type: [String, Number],
|
|
32
35
|
default: null,
|
|
33
|
-
validator: (
|
|
36
|
+
validator: (t) => t === null || Object.values(c).includes(t) || Object.keys(e).includes(String(t))
|
|
34
37
|
},
|
|
35
38
|
description: {
|
|
36
39
|
type: String,
|
|
@@ -43,7 +46,7 @@ var C = {
|
|
|
43
46
|
listId: {
|
|
44
47
|
type: String,
|
|
45
48
|
default() {
|
|
46
|
-
return
|
|
49
|
+
return t();
|
|
47
50
|
}
|
|
48
51
|
},
|
|
49
52
|
listClass: {
|
|
@@ -73,12 +76,12 @@ var C = {
|
|
|
73
76
|
padding: {
|
|
74
77
|
type: String,
|
|
75
78
|
default: "small",
|
|
76
|
-
validator: (e) => Object.keys(
|
|
79
|
+
validator: (e) => Object.keys(f).some((t) => t === e)
|
|
77
80
|
},
|
|
78
81
|
contentWidth: {
|
|
79
82
|
type: String,
|
|
80
83
|
default: null,
|
|
81
|
-
validator: (e) =>
|
|
84
|
+
validator: (e) => u.includes(e)
|
|
82
85
|
},
|
|
83
86
|
openWithArrowKeys: {
|
|
84
87
|
type: Boolean,
|
|
@@ -111,7 +114,7 @@ var C = {
|
|
|
111
114
|
appendTo: {
|
|
112
115
|
type: [HTMLElement, String],
|
|
113
116
|
default: "body",
|
|
114
|
-
validator: (e) =>
|
|
117
|
+
validator: (e) => l.includes(e) || e instanceof HTMLElement
|
|
115
118
|
},
|
|
116
119
|
transition: {
|
|
117
120
|
type: String,
|
|
@@ -126,12 +129,12 @@ var C = {
|
|
|
126
129
|
],
|
|
127
130
|
data() {
|
|
128
131
|
return {
|
|
129
|
-
DROPDOWN_PADDING_CLASSES:
|
|
132
|
+
DROPDOWN_PADDING_CLASSES: f,
|
|
130
133
|
isListShown: !1,
|
|
131
134
|
isInputFocused: !1,
|
|
132
135
|
isListFocused: !1,
|
|
133
|
-
externalAnchor:
|
|
134
|
-
hasSlotContent:
|
|
136
|
+
externalAnchor: t(),
|
|
137
|
+
hasSlotContent: n
|
|
135
138
|
};
|
|
136
139
|
},
|
|
137
140
|
computed: { comboboxListeners() {
|
|
@@ -186,14 +189,14 @@ var C = {
|
|
|
186
189
|
this.showList !== null || this.isListShown || !this.openWithArrowKeys || this.showComboboxList();
|
|
187
190
|
}
|
|
188
191
|
}
|
|
189
|
-
},
|
|
190
|
-
function
|
|
191
|
-
let o =
|
|
192
|
-
return
|
|
192
|
+
}, E = ["id"], D = { ref: "header" }, O = ["onMouseleave", "onFocusout"], k = { ref: "footer" };
|
|
193
|
+
function A(e, t, n, r, i, a) {
|
|
194
|
+
let o = S("combobox-loading-list"), s = S("combobox-empty-list"), c = S("dt-popover"), l = S("dt-combobox");
|
|
195
|
+
return b(), p(l, _({
|
|
193
196
|
ref: "combobox",
|
|
194
197
|
loading: n.loading,
|
|
195
198
|
label: n.label,
|
|
196
|
-
"label
|
|
199
|
+
"show-label": n.showLabel,
|
|
197
200
|
size: n.size,
|
|
198
201
|
description: n.description,
|
|
199
202
|
"empty-list": n.emptyList,
|
|
@@ -205,24 +208,25 @@ function O(e, t, n, r, i, a) {
|
|
|
205
208
|
"list-id": n.listId,
|
|
206
209
|
"data-qa": "dt-combobox"
|
|
207
210
|
}, a.comboboxListeners), {
|
|
208
|
-
input:
|
|
211
|
+
input: C(({ inputProps: n }) => [m("div", {
|
|
209
212
|
id: i.externalAnchor,
|
|
210
213
|
ref: "input",
|
|
211
214
|
onFocusin: t[0] || (t[0] = (...e) => a.onFocusIn && a.onFocusIn(...e)),
|
|
212
|
-
onKeydown: [t[1] || (t[1] =
|
|
213
|
-
}, [
|
|
215
|
+
onKeydown: [t[1] || (t[1] = w((e) => a.openOnArrowKeyPress(e), ["up"])), t[2] || (t[2] = w((e) => a.openOnArrowKeyPress(e), ["down"]))]
|
|
216
|
+
}, [x(e.$slots, "input", {
|
|
214
217
|
inputProps: n,
|
|
215
218
|
onInput: a.handleDisplayList
|
|
216
|
-
})], 40,
|
|
217
|
-
list:
|
|
219
|
+
})], 40, E)]),
|
|
220
|
+
list: C(({ opened: r, listProps: a, clearHighlightIndex: l }) => [g(c, {
|
|
218
221
|
ref: "popover",
|
|
219
222
|
open: i.isListShown,
|
|
220
223
|
"onUpdate:open": t[3] || (t[3] = (e) => i.isListShown = e),
|
|
221
|
-
"
|
|
224
|
+
"close-on-click": !1,
|
|
222
225
|
"max-height": n.maxHeight,
|
|
223
226
|
"max-width": n.maxWidth,
|
|
224
227
|
offset: n.popoverOffset,
|
|
225
228
|
sticky: n.popoverSticky,
|
|
229
|
+
"content-mode": n.contentMode,
|
|
226
230
|
placement: "bottom-start",
|
|
227
231
|
"initial-focus-element": "none",
|
|
228
232
|
padding: "none",
|
|
@@ -236,28 +240,28 @@ function O(e, t, n, r, i, a) {
|
|
|
236
240
|
"append-to": n.appendTo,
|
|
237
241
|
transition: n.transition,
|
|
238
242
|
onOpened: r
|
|
239
|
-
},
|
|
240
|
-
content:
|
|
243
|
+
}, h({
|
|
244
|
+
content: C(() => [m("div", {
|
|
241
245
|
ref: "listWrapper",
|
|
242
|
-
class:
|
|
246
|
+
class: v([
|
|
243
247
|
"d-recipe-combobox-with-popover__list",
|
|
244
248
|
i.DROPDOWN_PADDING_CLASSES[n.padding],
|
|
245
249
|
n.listClass
|
|
246
250
|
]),
|
|
247
251
|
onMouseleave: l,
|
|
248
252
|
onFocusout: l
|
|
249
|
-
}, [n.loading ? (
|
|
253
|
+
}, [n.loading ? (b(), p(o, y(_({ key: 0 }, a)), null, 16)) : n.emptyList && n.emptyStateMessage ? (b(), p(s, _({ key: 1 }, a, { message: n.emptyStateMessage }), null, 16, ["message"])) : x(e.$slots, "list", {
|
|
250
254
|
key: 2,
|
|
251
255
|
listProps: a
|
|
252
|
-
})], 42,
|
|
256
|
+
})], 42, O)]),
|
|
253
257
|
_: 2
|
|
254
258
|
}, [i.hasSlotContent(e.$slots.header) ? {
|
|
255
259
|
name: "headerContent",
|
|
256
|
-
fn:
|
|
260
|
+
fn: C(() => [m("div", D, [x(e.$slots, "header")], 512)]),
|
|
257
261
|
key: "0"
|
|
258
262
|
} : void 0, i.hasSlotContent(e.$slots.footer) ? {
|
|
259
263
|
name: "footerContent",
|
|
260
|
-
fn:
|
|
264
|
+
fn: C(() => [m("div", k, [x(e.$slots, "footer")], 512)]),
|
|
261
265
|
key: "1"
|
|
262
266
|
} : void 0]), 1032, [
|
|
263
267
|
"open",
|
|
@@ -265,6 +269,7 @@ function O(e, t, n, r, i, a) {
|
|
|
265
269
|
"max-width",
|
|
266
270
|
"offset",
|
|
267
271
|
"sticky",
|
|
272
|
+
"content-mode",
|
|
268
273
|
"external-anchor",
|
|
269
274
|
"content-width",
|
|
270
275
|
"append-to",
|
|
@@ -275,7 +280,7 @@ function O(e, t, n, r, i, a) {
|
|
|
275
280
|
}, 16, [
|
|
276
281
|
"loading",
|
|
277
282
|
"label",
|
|
278
|
-
"label
|
|
283
|
+
"show-label",
|
|
279
284
|
"size",
|
|
280
285
|
"description",
|
|
281
286
|
"empty-list",
|
|
@@ -286,8 +291,8 @@ function O(e, t, n, r, i, a) {
|
|
|
286
291
|
"list-id"
|
|
287
292
|
]);
|
|
288
293
|
}
|
|
289
|
-
var
|
|
294
|
+
var j = /* @__PURE__ */ r(T, [["render", A]]);
|
|
290
295
|
//#endregion
|
|
291
|
-
export {
|
|
296
|
+
export { j as default };
|
|
292
297
|
|
|
293
298
|
//# sourceMappingURL=combobox-with-popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-with-popover.js","names":[],"sources":["../../../components/combobox_with_popover/combobox_with_popover.vue"],"sourcesContent":["<template>\n <dt-combobox\n ref=\"combobox\"\n :loading=\"loading\"\n :label=\"label\"\n :label-visible=\"labelVisible\"\n :size=\"size\"\n :description=\"description\"\n :empty-list=\"emptyList\"\n :empty-state-message=\"emptyStateMessage\"\n :show-list=\"isListShown\"\n :on-beginning-of-list=\"onBeginningOfList\"\n :on-end-of-list=\"onEndOfList\"\n :list-rendered-outside=\"true\"\n :list-id=\"listId\"\n data-qa=\"dt-combobox\"\n v-bind=\"comboboxListeners\"\n >\n <template\n #input=\"{ inputProps }\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"externalAnchor\"\n ref=\"input\"\n @focusin=\"onFocusIn\"\n @keydown.up=\"openOnArrowKeyPress($event)\"\n @keydown.down=\"openOnArrowKeyPress($event)\"\n >\n <slot\n name=\"input\"\n :input-props=\"inputProps\"\n :on-input=\"handleDisplayList\"\n />\n </div>\n </template>\n <template #list=\"{ opened, listProps, clearHighlightIndex }\">\n <dt-popover\n ref=\"popover\"\n v-model:open=\"isListShown\"\n :hide-on-click=\"false\"\n :max-height=\"maxHeight\"\n :max-width=\"maxWidth\"\n :offset=\"popoverOffset\"\n :sticky=\"popoverSticky\"\n placement=\"bottom-start\"\n initial-focus-element=\"none\"\n padding=\"none\"\n role=\"listbox\"\n :external-anchor=\"externalAnchor\"\n :content-width=\"contentWidth\"\n :content-appear=\"true\"\n :content-tabindex=\"null\"\n :modal=\"false\"\n :auto-focus=\"false\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n @opened=\"opened\"\n >\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #headerContent\n >\n <div\n ref=\"header\"\n >\n <slot name=\"header\" />\n </div>\n </template>\n\n <template #content>\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"listWrapper\"\n :class=\"[\n 'd-recipe-combobox-with-popover__list',\n DROPDOWN_PADDING_CLASSES[padding],\n listClass,\n ]\"\n @mouseleave=\"clearHighlightIndex\"\n @focusout=\"clearHighlightIndex\"\n >\n <combobox-loading-list\n v-if=\"loading\"\n v-bind=\"listProps\"\n />\n <combobox-empty-list\n v-else-if=\"emptyList && emptyStateMessage\"\n v-bind=\"listProps\"\n :message=\"emptyStateMessage\"\n />\n <slot\n v-else\n name=\"list\"\n :list-props=\"listProps\"\n />\n </div>\n </template>\n\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footerContent\n >\n <div\n ref=\"footer\"\n >\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-popover>\n </template>\n </dt-combobox>\n</template>\n\n<script>\nimport ComboboxLoadingList from '@/components/combobox/combobox_loading-list.vue';\nimport ComboboxEmptyList from '@/components/combobox/combobox_empty-list.vue';\nimport { DtCombobox, COMBOBOX_LABEL_SIZES } from '@/components/combobox';\nimport { DtPopover, POPOVER_APPEND_TO_VALUES, POPOVER_CONTENT_WIDTHS } from '@/components/popover';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport { DROPDOWN_PADDING_CLASSES } from '@/components/dropdown';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtComboboxWithPopover',\n\n components: {\n DtCombobox,\n DtPopover,\n ComboboxLoadingList,\n ComboboxEmptyList,\n },\n\n props: {\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n labelVisible: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the input, one of `xs`, `sm`, `md`, `lg`, `xl`\n * @values null, xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: null,\n validator: (t) => Object.values(COMBOBOX_LABEL_SIZES).includes(t),\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Sets an ID on the list element of the component. Used by several aria attributes\n * as well as when deriving the IDs for each item.\n */\n listId: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Additional class for the wrapper list element.\n */\n listClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A method that will be called when the selection goes past the beginning of the list.\n */\n onBeginningOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * A method that will be called when the selection goes past the end of the list.\n */\n onEndOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Vertical padding size around the list element.\n */\n padding: {\n type: String,\n default: 'small',\n validator: (padding) => {\n return Object.keys(DROPDOWN_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n */\n contentWidth: {\n type: String,\n default: null,\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * If the list should be shown by pressing up or down arrow key on the input element.\n * This can be set when not passing showList prop.\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the popover content box from its anchor element\n * by the specified number of pixels.\n */\n popoverOffset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * If the popover sticks to the input.\n */\n popoverSticky: {\n type: [Boolean, String],\n default: false,\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines when to show the skeletons and also controls aria-busy attribute.\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the list to an empty state, and displays the message from prop `emptyStateMessage`.\n */\n emptyList: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Message to show when the list is empty\n */\n emptyStateMessage: {\n type: String,\n default: '',\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n },\n\n emits: [\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when 'escape' key is pressed\n *\n * @event escape\n */\n 'escape',\n\n /**\n * Event fired when an item is highlighted\n *\n * @event highlight\n * @type {Number}\n */\n 'highlight',\n\n /**\n * Emitted when items are shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n ],\n\n data () {\n return {\n DROPDOWN_PADDING_CLASSES,\n isListShown: false,\n isInputFocused: false,\n isListFocused: false,\n externalAnchor: getUniqueString(),\n hasSlotContent,\n };\n },\n\n computed: {\n comboboxListeners () {\n return {\n ...this.$attrs,\n\n onSelect: this.onSelect,\n\n onEscape: this.onEscape,\n\n onHighlight: this.onHighlight,\n };\n },\n },\n\n watch: {\n showList: {\n handler: function (show) {\n if (show !== null) {\n this.isListShown = show;\n }\n },\n\n immediate: true,\n },\n\n isListShown (val) {\n if (val) {\n window.addEventListener('mousedown', this.onFocusOut);\n } else {\n window.removeEventListener('mousedown', this.onFocusOut);\n }\n this.onOpened(val);\n },\n },\n\n methods: {\n handleDisplayList (value) {\n if (!this.hasSuggestionList && value) { this.showComboboxList(); }\n if (!this.hasSuggestionList && !value) { this.closeComboboxList(); }\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = true;\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = false;\n },\n\n onSelect (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('select', highlightIndex);\n if (!this.hasSuggestionList) {\n // we don't display the list before the user has typed anything\n this.closeComboboxList();\n }\n },\n\n onEscape () {\n this.$emit('escape');\n this.closeComboboxList();\n },\n\n onHighlight (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('highlight', highlightIndex);\n },\n\n onOpened (opened) {\n this.$emit('opened', opened);\n },\n\n onFocusIn (e) {\n if (this.hasSuggestionList && e && this.$refs.input?.querySelector('input') === e.target) {\n // only trigger if we show suggestion list when focused, and\n // it's the input specifically that was focused\n this.showComboboxList();\n }\n },\n\n onFocusOut (e) {\n // Check if the focus change was to another target within the combobox component\n const popoverEl = this.$refs.popover?.tip?.popper;\n const comboboxEl = this.$refs.input;\n\n if (e.composedPath()?.some(el => [popoverEl, comboboxEl].includes(el))) return;\n\n // If outside the combobox then close\n this.closeComboboxList();\n },\n\n openOnArrowKeyPress () {\n if (this.showList !== null || this.isListShown || !this.openWithArrowKeys) { return; }\n\n this.showComboboxList();\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;AA0HA,IAAK,IAAU;CACb,cAAc,EAAE,MAAM,GAAG;CACzB,MAAM;CAEN,YAAY;EACV,YAAA;EACA,WAAA;EACA,qBAAA;EACA,mBAAA;EACD;CAED,OAAO;EAIL,OAAO;GACL,MAAM;GACN,UAAU;GACX;EAMD,cA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SAAO,QA0BV,CAxBN,EAwBM,OAAA;IAvBJ,KAAI;IACH,OAAK,EAAA;;KAAwE,EAAA,yBAAyB,EAAA;KAAwB,EAAA;;IAK9H,cAAY;IACZ,YAAU;OAGH,EAAA,WAAA,GAAA,EADR,EAGE,GAAA,EAAA,EAAA,EAAA,KAAA,GAAA,EADQ,EAAS,CAAA,EAAA,MAAA,GAAA,IAGN,EAAA,aAAa,EAAA,qBAAA,GAAA,EAD1B,EAIE,GAJF,EAIE,EAAA,KAAA,GAAA,EAFQ,GAAS,EAChB,SAAS,EAAA,mBAAiB,CAAA,EAAA,MAAA,IAAA,CAAA,UAAA,CAAA,IAE7B,EAIE,EAAA,QAAA,QAAA;;IADa;;;MAlCX,EAAA,eAAe,EAAA,OAAO,OAAM,GAAA;SACjC;eAMK,CAJN,EAIM,OAJN,GAIM,CADJ,EAAsB,EAAA,QAAA,SAAA,CAAA,EAAA,IAAA,CAAA,CAAA;;cAkClB,EAAA,eAAe,EAAA,OAAO,OAAM,GAAA;SACjC;eAMK,CAJN,EAIM,OAJN,GAIM,CADJ,EAAsB,EAAA,QAAA,SAAA,CAAA,EAAA,IAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"combobox-with-popover.js","names":[],"sources":["../../../components/combobox_with_popover/combobox_with_popover.vue"],"sourcesContent":["<template>\n <dt-combobox\n ref=\"combobox\"\n :loading=\"loading\"\n :label=\"label\"\n :show-label=\"showLabel\"\n :size=\"size\"\n :description=\"description\"\n :empty-list=\"emptyList\"\n :empty-state-message=\"emptyStateMessage\"\n :show-list=\"isListShown\"\n :on-beginning-of-list=\"onBeginningOfList\"\n :on-end-of-list=\"onEndOfList\"\n :list-rendered-outside=\"true\"\n :list-id=\"listId\"\n data-qa=\"dt-combobox\"\n v-bind=\"comboboxListeners\"\n >\n <template\n #input=\"{ inputProps }\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"externalAnchor\"\n ref=\"input\"\n @focusin=\"onFocusIn\"\n @keydown.up=\"openOnArrowKeyPress($event)\"\n @keydown.down=\"openOnArrowKeyPress($event)\"\n >\n <slot\n name=\"input\"\n :input-props=\"inputProps\"\n :on-input=\"handleDisplayList\"\n />\n </div>\n </template>\n <template #list=\"{ opened, listProps, clearHighlightIndex }\">\n <dt-popover\n ref=\"popover\"\n v-model:open=\"isListShown\"\n :close-on-click=\"false\"\n :max-height=\"maxHeight\"\n :max-width=\"maxWidth\"\n :offset=\"popoverOffset\"\n :sticky=\"popoverSticky\"\n :content-mode=\"contentMode\"\n placement=\"bottom-start\"\n initial-focus-element=\"none\"\n padding=\"none\"\n role=\"listbox\"\n :external-anchor=\"externalAnchor\"\n :content-width=\"contentWidth\"\n :content-appear=\"true\"\n :content-tabindex=\"null\"\n :modal=\"false\"\n :auto-focus=\"false\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n @opened=\"opened\"\n >\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #headerContent\n >\n <div\n ref=\"header\"\n >\n <slot name=\"header\" />\n </div>\n </template>\n\n <template #content>\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"listWrapper\"\n :class=\"[\n 'd-recipe-combobox-with-popover__list',\n DROPDOWN_PADDING_CLASSES[padding],\n listClass,\n ]\"\n @mouseleave=\"clearHighlightIndex\"\n @focusout=\"clearHighlightIndex\"\n >\n <combobox-loading-list\n v-if=\"loading\"\n v-bind=\"listProps\"\n />\n <combobox-empty-list\n v-else-if=\"emptyList && emptyStateMessage\"\n v-bind=\"listProps\"\n :message=\"emptyStateMessage\"\n />\n <slot\n v-else\n name=\"list\"\n :list-props=\"listProps\"\n />\n </div>\n </template>\n\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footerContent\n >\n <div\n ref=\"footer\"\n >\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-popover>\n </template>\n </dt-combobox>\n</template>\n\n<script>\nimport ComboboxLoadingList from '@/components/combobox/combobox_loading-list.vue';\nimport ComboboxEmptyList from '@/components/combobox/combobox_empty-list.vue';\nimport { DtCombobox, COMBOBOX_LABEL_SIZES } from '@/components/combobox';\nimport { DtPopover, POPOVER_APPEND_TO_VALUES, POPOVER_CONTENT_WIDTHS } from '@/components/popover';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\nimport { COMPONENT_SIZES } from '@/common/constants';\nimport { DROPDOWN_PADDING_CLASSES } from '@/components/dropdown';\nimport { CONTENT_MODE_PROP } from '@/common/mode_constants';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtComboboxWithPopover',\n\n components: {\n DtCombobox,\n DtPopover,\n ComboboxLoadingList,\n ComboboxEmptyList,\n },\n\n props: {\n /**\n * Applies a color mode to the positioned content element.\n * @values light, dark, invert\n */\n contentMode: CONTENT_MODE_PROP,\n\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n showLabel: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the input.\n * @values 100, 200, 300, 400, 500\n */\n size: {\n type: [String, Number],\n default: null,\n validator: (t) => t === null\n || Object.values(COMBOBOX_LABEL_SIZES).includes(t)\n || Object.keys(COMPONENT_SIZES).includes(String(t)),\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Sets an ID on the list element of the component. Used by several aria attributes\n * as well as when deriving the IDs for each item.\n */\n listId: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Additional class for the wrapper list element.\n */\n listClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A method that will be called when the selection goes past the beginning of the list.\n */\n onBeginningOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * A method that will be called when the selection goes past the end of the list.\n */\n onEndOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Vertical padding size around the list element.\n */\n padding: {\n type: String,\n default: 'small',\n validator: (padding) => {\n return Object.keys(DROPDOWN_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n */\n contentWidth: {\n type: String,\n default: null,\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * If the list should be shown by pressing up or down arrow key on the input element.\n * This can be set when not passing showList prop.\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the popover content box from its anchor element\n * by the specified number of pixels.\n */\n popoverOffset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * If the popover sticks to the input.\n */\n popoverSticky: {\n type: [Boolean, String],\n default: false,\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines when to show the skeletons and also controls aria-busy attribute.\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the list to an empty state, and displays the message from prop `emptyStateMessage`.\n */\n emptyList: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Message to show when the list is empty\n */\n emptyStateMessage: {\n type: String,\n default: '',\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n },\n\n emits: [\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when 'escape' key is pressed\n *\n * @event escape\n */\n 'escape',\n\n /**\n * Event fired when an item is highlighted\n *\n * @event highlight\n * @type {Number}\n */\n 'highlight',\n\n /**\n * Emitted when items are shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n ],\n\n data () {\n return {\n DROPDOWN_PADDING_CLASSES,\n isListShown: false,\n isInputFocused: false,\n isListFocused: false,\n externalAnchor: getUniqueString(),\n hasSlotContent,\n };\n },\n\n computed: {\n comboboxListeners () {\n return {\n ...this.$attrs,\n\n onSelect: this.onSelect,\n\n onEscape: this.onEscape,\n\n onHighlight: this.onHighlight,\n };\n },\n },\n\n watch: {\n showList: {\n handler: function (show) {\n if (show !== null) {\n this.isListShown = show;\n }\n },\n\n immediate: true,\n },\n\n isListShown (val) {\n if (val) {\n window.addEventListener('mousedown', this.onFocusOut);\n } else {\n window.removeEventListener('mousedown', this.onFocusOut);\n }\n this.onOpened(val);\n },\n },\n\n methods: {\n handleDisplayList (value) {\n if (!this.hasSuggestionList && value) { this.showComboboxList(); }\n if (!this.hasSuggestionList && !value) { this.closeComboboxList(); }\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = true;\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = false;\n },\n\n onSelect (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('select', highlightIndex);\n if (!this.hasSuggestionList) {\n // we don't display the list before the user has typed anything\n this.closeComboboxList();\n }\n },\n\n onEscape () {\n this.$emit('escape');\n this.closeComboboxList();\n },\n\n onHighlight (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('highlight', highlightIndex);\n },\n\n onOpened (opened) {\n this.$emit('opened', opened);\n },\n\n onFocusIn (e) {\n if (this.hasSuggestionList && e && this.$refs.input?.querySelector('input') === e.target) {\n // only trigger if we show suggestion list when focused, and\n // it's the input specifically that was focused\n this.showComboboxList();\n }\n },\n\n onFocusOut (e) {\n // Check if the focus change was to another target within the combobox component\n const popoverEl = this.$refs.popover?.tip?.popper;\n const comboboxEl = this.$refs.input;\n\n if (e.composedPath()?.some(el => [popoverEl, comboboxEl].includes(el))) return;\n\n // If outside the combobox then close\n this.closeComboboxList();\n },\n\n openOnArrowKeyPress () {\n if (this.showList !== null || this.isListShown || !this.openWithArrowKeys) { return; }\n\n this.showComboboxList();\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;;;AA6HA,IAAK,IAAU;CACb,cAAc,EAAE,MAAM,GAAG;CACzB,MAAM;CAEN,YAAY;EACV,YAAA;EACA,WAAA;EACA,qBAAA;EACA,mBAAA;EACD;CAED,OAAO;EAKL,aAAa;EAKb,OAAO;GACL,MAAM;GACN,UAAU;GACX;EAMD,WAAW;GACT,MAAM;GACN,SAAS;GACV;EAMD,MAAM;GACJ,MAAM,CAAC,QAAQ,OAAO;GACtB,SAAS;GACT,YAAY,MAAM,MAAM,QACnB,OAAO,OAAO,EAAqB,CAAC,SAAS,EAAC,IAC9C,OAAO,KAAK,EAAgB,CAAC,SAAS,OAAO,EAAE,CAAC;GACtD;EAKD,aAAa;GACX,MAAM;GACN,SAAS;GACV;EAQD,UAAU;GACR,MAAM;GACN,SAAS;GACV;EAMD,QAAQ;GACN,MAAM;GACN,UAAW;AAAE,WAAO,GAAiB;;GACtC;EAKD,WAAW;GACT,MAAM;IAAC;IAAQ;IAAO;IAAO;GAC7B,SAAS;GACV;EAKD,mBAAmB;GACjB,MAAM;GACN,SAAS;GACV;EAKD,aAAa;GACX,MAAM;GACN,SAAS;GACV;EAMD,WAAW;GACT,MAAM;GACN,SAAS;GACV;EAMD,UAAU;GACR,MAAM;GACN,SAAS;GACV;EAKD,SAAS;GACP,MAAM;GACN,SAAS;GACT,YAAY,MACH,OAAO,KAAK,EAAyB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EAAA,QAAA,SAAA,CAAA,EAAA,IAAA,CAAA,CAAA;;cAkClB,EAAA,eAAe,EAAA,OAAO,OAAM,GAAA;SACjC;eAMK,CAJN,EAIM,OAJN,GAIM,CADJ,EAAsB,EAAA,QAAA,SAAA,CAAA,EAAA,IAAA,CAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/utils/index.cjs`),t=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),n=require(`../badge/badge.cjs`),r=require(`../../localization/index.cjs`),i=require(`../button/button.cjs`),a=require(`../emoji-text-wrapper/emoji-text-wrapper.cjs`);let o=require(`vue`),s=require(`@dialpad/dialtone-icons/
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/utils/index.cjs`),t=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),n=require(`../badge/badge.cjs`),r=require(`../../localization/index.cjs`),i=require(`../button/button.cjs`),a=require(`../emoji-text-wrapper/emoji-text-wrapper.cjs`);let o=require(`vue`),s=require(`@dialpad/dialtone-icons/vue`);var c={compatConfig:{MODE:3},name:`DtRecipeContactCentersRow`,components:{DtButton:i.default,DtBadge:n.default,DtEmojiTextWrapper:a.default,DtIconHeadphones:s.DtIconHeadphones,DtIconChevronDown:s.DtIconChevronDown},inheritAttrs:!1,props:{ariaLabel:{type:String,default:``},description:{type:String,required:!0},selected:{type:Boolean,default:!1},showActions:{type:Boolean,default:!0},unreadCount:{type:String,default:null,validator(e){return e?/^\d+\+?$/.test(e):!0}}},emits:[`click`,`click-menu`],data(){return{labelWidth:`auto`,i18n:new r.DialtoneLocalization}},computed:{leftbarContactCentersRowClasses(){return[`d-recipe-leftbar-row`,`d-recipe-leftbar-row--contact-centers`,{"d-recipe-leftbar-row__unread-count":this.showUnreadCount,"d-recipe-leftbar-row--selected":this.selected}]},getAriaLabel(){let t=isNaN(this.unreadCount)?this.unreadCount:Number(this.unreadCount);return this.ariaLabel?this.ariaLabel:e.safeConcatStrings([this.description,this.i18n.$t(`DIALTONE_UNREAD_MESSAGE_COUNT_TEXT`,{unreadCount:t})])},contactRowListeners(){return e.extractVueListeners(this.$attrs)},showUnreadCount(){return!!this.unreadCount},menuButtonLabel(){return this.i18n.$t(`DIALTONE_CONTACT_CENTERS_ROW_MENU_BUTTON_LABEL`)}},watch:{$props:{deep:!0,async handler(){await this.$nextTick(),this.adjustLabelWidth()}}},mounted(){this.resizeObserver=new ResizeObserver(this.adjustLabelWidth),this.resizeObserver.observe(e.returnFirstEl(this.$el)),this.adjustLabelWidth()},beforeUnmount:function(){this.resizeObserver.disconnect()},methods:{removeClassStyleAttrs:e.removeClassStyleAttrs,adjustLabelWidth(){this.labelWidth=(e.returnFirstEl(this.$el)?.querySelector(`.d-recipe-leftbar-row__primary`)?.clientWidth||0)-((e.returnFirstEl(this.$el)?.querySelector(`.d-recipe-leftbar-row__omega`)?.clientWidth||0)+(e.returnFirstEl(this.$el)?.querySelector(`.d-recipe-leftbar-row__alpha`)?.clientWidth||0)+12)+`px`}}},l=[`data-qa`,`aria-label`,`title`,`href`],u={class:`d-recipe-leftbar-row__alpha`},d={key:0,class:`d-recipe-leftbar-row__omega`},f={class:`d-recipe-leftbar-row__action-container`},p={class:`d-recipe-leftbar-row__bottom`};function m(e,t,n,r,i,a){let s=(0,o.resolveComponent)(`dt-icon-headphones`),c=(0,o.resolveComponent)(`dt-emoji-text-wrapper`),m=(0,o.resolveComponent)(`dt-badge`),h=(0,o.resolveComponent)(`dt-icon-chevron-down`),g=(0,o.resolveComponent)(`dt-button`);return(0,o.openBlock)(),(0,o.createElementBlock)(`div`,{class:(0,o.normalizeClass)([`d-recipe-leftbar-row__container`,{"d-recipe-leftbar-row__container--off-duty":e.$slots.timer},e.$attrs.class]),style:(0,o.normalizeStyle)(e.$attrs.style)},[(0,o.createElementVNode)(`div`,{class:(0,o.normalizeClass)(a.leftbarContactCentersRowClasses),"data-qa":`dt-recipe-contact-centers-row`},[(0,o.createElementVNode)(`a`,(0,o.mergeProps)({class:`d-recipe-leftbar-row__primary`,"data-qa":e.$attrs[`data-qa`]??`d-recipe-leftbar-row-link`,"aria-label":a.getAriaLabel,title:n.description,href:e.$attrs.href??`javascript:void(0)`},a.removeClassStyleAttrs(e.$attrs),(0,o.toHandlers)(a.contactRowListeners,!0),{onClick:t[0]||(t[0]=t=>e.$emit(`click`,t))}),[(0,o.createElementVNode)(`div`,u,[(0,o.createVNode)(s,{size:`300`,"data-qa":`dt-recipe-leftbar-row-icon`})]),(0,o.createElementVNode)(`div`,{class:`d-recipe-leftbar-row__label`,style:(0,o.normalizeStyle)(`flex-basis: ${i.labelWidth}`)},[(0,o.createVNode)(c,{class:`d-recipe-leftbar-row__description`,"data-qa":`dt-recipe-leftbar-row-description`,size:`200`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(n.description),1)]),_:1})],4)],16,l),n.showActions?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,d,[e.$slots.end?(0,o.renderSlot)(e.$slots,`end`,{key:0}):(0,o.renderSlot)(e.$slots,`right`,{key:1}),(0,o.createElementVNode)(`div`,f,[a.showUnreadCount?((0,o.openBlock)(),(0,o.createBlock)(m,{key:0,class:`d-recipe-leftbar-row__unread-badge`,"data-qa":`dt-recipe-leftbar-row-unread-badge`,kind:`count`,type:`bulletin`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(n.unreadCount),1)]),_:1})):(0,o.createCommentVNode)(``,!0),(0,o.createVNode)(g,{class:`d-recipe-leftbar-row__action`,"data-qa":`dt-recipe-leftbar-row-action-button`,"aria-label":a.menuButtonLabel,title:a.menuButtonLabel,importance:`clear`,size:100,circle:``,onClick:t[1]||(t[1]=(0,o.withModifiers)(t=>e.$emit(`click-menu`,t),[`stop`]))},{icon:(0,o.withCtx)(()=>[(0,o.createVNode)(h,{size:`100`})]),_:1},8,[`aria-label`,`title`])])])):(0,o.createCommentVNode)(``,!0)],2),(0,o.createElementVNode)(`div`,p,[(0,o.renderSlot)(e.$slots,`timer`)])],6)}var h=t.t(c,[[`render`,m]]);exports.default=h;
|
|
2
2
|
//# sourceMappingURL=contact-centers-row.cjs.map
|