@dialpad/dialtone 9.71.0-beta.2 → 9.72.0
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/css/dialtone-default-theme.css +518 -369
- package/dist/css/dialtone-default-theme.min.css +1 -1
- package/dist/css/dialtone.css +430 -361
- package/dist/css/dialtone.min.css +1 -1
- package/dist/css/tokens/tokens-base-dark.css +1 -0
- package/dist/css/tokens/tokens-base-light.css +1 -0
- package/dist/css/tokens/tokens-dp-dark.css +87 -8
- package/dist/css/tokens/tokens-dp-light.css +87 -8
- package/dist/css/tokens/tokens-expressive-dark.css +41 -7
- package/dist/css/tokens/tokens-expressive-light.css +41 -7
- package/dist/css/tokens/tokens-expressive-sm-dark.css +41 -7
- package/dist/css/tokens/tokens-expressive-sm-light.css +41 -7
- package/dist/css/tokens/tokens-tmo-dark.css +42 -8
- package/dist/css/tokens/tokens-tmo-light.css +42 -8
- package/dist/tokens/css/tokens-base-dark.css +1 -0
- package/dist/tokens/css/tokens-base-light.css +1 -0
- package/dist/tokens/css/tokens-dp-dark.css +87 -8
- package/dist/tokens/css/tokens-dp-light.css +87 -8
- package/dist/tokens/css/tokens-expressive-dark.css +41 -7
- package/dist/tokens/css/tokens-expressive-light.css +41 -7
- package/dist/tokens/css/tokens-expressive-sm-dark.css +41 -7
- package/dist/tokens/css/tokens-expressive-sm-light.css +41 -7
- package/dist/tokens/css/tokens-tmo-dark.css +42 -8
- package/dist/tokens/css/tokens-tmo-light.css +42 -8
- package/dist/tokens/doc.json +28982 -19944
- package/dist/tokens/less/tokens-base-dark.less +1 -0
- package/dist/tokens/less/tokens-base-light.less +1 -0
- package/dist/tokens/less/tokens-dp-dark.less +75 -6
- package/dist/tokens/less/tokens-dp-light.less +75 -6
- package/dist/tokens/less/tokens-expressive-dark.less +34 -5
- package/dist/tokens/less/tokens-expressive-light.less +34 -5
- package/dist/tokens/less/tokens-expressive-sm-dark.less +34 -5
- package/dist/tokens/less/tokens-expressive-sm-light.less +34 -5
- package/dist/tokens/less/tokens-tmo-dark.less +35 -6
- package/dist/tokens/less/tokens-tmo-light.less +35 -6
- package/dist/tokens/themes/chunks/tokens-base-dark-BEsKKfTV.js +4 -0
- package/dist/tokens/themes/chunks/tokens-base-dark-Bxzti7ig.js +1 -0
- package/dist/tokens/themes/chunks/tokens-base-light-DV0xl0Dv.js +1 -0
- package/dist/tokens/themes/chunks/tokens-base-light-jdZ77WhZ.js +4 -0
- package/dist/tokens/themes/dp-dark.cjs +1 -1
- package/dist/tokens/themes/dp-dark.js +5 -5
- package/dist/tokens/themes/dp-light.cjs +1 -1
- package/dist/tokens/themes/dp-light.js +5 -5
- package/dist/tokens/themes/expressive-dark.cjs +1 -1
- package/dist/tokens/themes/expressive-dark.js +2 -2
- package/dist/tokens/themes/expressive-light.cjs +1 -1
- package/dist/tokens/themes/expressive-light.js +4 -4
- package/dist/tokens/themes/expressive-sm-dark.cjs +1 -1
- package/dist/tokens/themes/expressive-sm-dark.js +2 -2
- package/dist/tokens/themes/expressive-sm-light.cjs +1 -1
- package/dist/tokens/themes/expressive-sm-light.js +4 -4
- package/dist/tokens/themes/tmo-dark.cjs +1 -1
- package/dist/tokens/themes/tmo-dark.js +4 -4
- package/dist/tokens/themes/tmo-light.cjs +1 -1
- package/dist/tokens/themes/tmo-light.js +4 -4
- package/dist/tokens/tokens-base-dark.json +1 -0
- package/dist/tokens/tokens-base-light.json +1 -0
- package/dist/tokens/tokens-dp-dark.json +70 -1
- package/dist/tokens/tokens-dp-light.json +70 -1
- package/dist/tokens/tokens-expressive-dark.json +30 -1
- package/dist/tokens/tokens-expressive-light.json +30 -1
- package/dist/tokens/tokens-expressive-sm-dark.json +30 -1
- package/dist/tokens/tokens-expressive-sm-light.json +30 -1
- package/dist/tokens/tokens-tmo-dark.json +30 -1
- package/dist/tokens/tokens-tmo-light.json +30 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs +3 -3
- package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js +3 -3
- package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
- package/dist/vue3/common/sr_only_close_button.vue.cjs +4 -4
- package/dist/vue3/common/sr_only_close_button.vue.cjs.map +1 -1
- package/dist/vue3/common/sr_only_close_button.vue.js +4 -4
- package/dist/vue3/common/sr_only_close_button.vue.js.map +1 -1
- package/dist/vue3/common/storybook_utils.cjs +8 -0
- package/dist/vue3/common/storybook_utils.cjs.map +1 -0
- package/dist/vue3/common/storybook_utils.js +8 -0
- package/dist/vue3/common/storybook_utils.js.map +1 -0
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/components/avatar/avatar.vue.cjs +41 -30
- package/dist/vue3/components/avatar/avatar.vue.cjs.map +1 -1
- package/dist/vue3/components/avatar/avatar.vue.js +43 -32
- package/dist/vue3/components/avatar/avatar.vue.js.map +1 -1
- package/dist/vue3/components/chip/chip.vue.cjs +7 -4
- package/dist/vue3/components/chip/chip.vue.cjs.map +1 -1
- package/dist/vue3/components/chip/chip.vue.js +7 -4
- package/dist/vue3/components/chip/chip.vue.js.map +1 -1
- package/dist/vue3/components/collapsible/collapsible.vue.cjs +6 -12
- package/dist/vue3/components/collapsible/collapsible.vue.cjs.map +1 -1
- package/dist/vue3/components/collapsible/collapsible.vue.js +6 -12
- package/dist/vue3/components/collapsible/collapsible.vue.js.map +1 -1
- package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs +17 -5
- package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs.map +1 -1
- package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js +17 -5
- package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
- package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs +12 -3
- package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
- package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js +12 -3
- package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
- package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs +1 -0
- package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
- package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js +1 -0
- package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
- package/dist/vue3/components/image_viewer/image_viewer.vue.cjs +5 -4
- package/dist/vue3/components/image_viewer/image_viewer.vue.cjs.map +1 -1
- package/dist/vue3/components/image_viewer/image_viewer.vue.js +5 -4
- package/dist/vue3/components/image_viewer/image_viewer.vue.js.map +1 -1
- package/dist/vue3/components/list_item/list_item.vue.cjs +5 -4
- package/dist/vue3/components/list_item/list_item.vue.cjs.map +1 -1
- package/dist/vue3/components/list_item/list_item.vue.js +5 -4
- package/dist/vue3/components/list_item/list_item.vue.js.map +1 -1
- package/dist/vue3/components/modal/modal.vue.cjs +7 -4
- package/dist/vue3/components/modal/modal.vue.cjs.map +1 -1
- package/dist/vue3/components/modal/modal.vue.js +7 -4
- package/dist/vue3/components/modal/modal.vue.js.map +1 -1
- package/dist/vue3/components/notice/notice_action.vue.cjs +7 -4
- package/dist/vue3/components/notice/notice_action.vue.cjs.map +1 -1
- package/dist/vue3/components/notice/notice_action.vue.js +7 -4
- package/dist/vue3/components/notice/notice_action.vue.js.map +1 -1
- package/dist/vue3/components/pagination/pagination.vue.cjs +15 -10
- package/dist/vue3/components/pagination/pagination.vue.cjs.map +1 -1
- package/dist/vue3/components/pagination/pagination.vue.js +15 -10
- package/dist/vue3/components/pagination/pagination.vue.js.map +1 -1
- package/dist/vue3/components/popover/popover_header_footer.vue.cjs +7 -4
- package/dist/vue3/components/popover/popover_header_footer.vue.cjs.map +1 -1
- package/dist/vue3/components/popover/popover_header_footer.vue.js +7 -4
- package/dist/vue3/components/popover/popover_header_footer.vue.js.map +1 -1
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +5 -4
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +5 -4
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +11 -7
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +11 -7
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +7 -4
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +7 -4
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +7 -14
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +8 -15
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs +6 -4
- package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js +6 -4
- package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js.map +1 -1
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +12 -6
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js +12 -6
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs +7 -27
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js +8 -28
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs +4 -13
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js +5 -14
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs +7 -13
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js +8 -14
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs +13 -9
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js +13 -9
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +5 -4
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +5 -4
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs +7 -4
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js +7 -4
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
- package/dist/vue3/style.css +111 -111
- package/dist/vue3/types/common/storybook_utils.d.ts +25 -0
- package/dist/vue3/types/common/storybook_utils.d.ts.map +1 -0
- package/dist/vue3/types/components/avatar/avatar.vue.d.ts +34 -6
- package/dist/vue3/types/components/avatar/avatar.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/chip/chip.vue.d.ts +1 -1
- package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts +1 -1
- package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/list_item/list_item.vue.d.ts +8 -2
- package/dist/vue3/types/components/list_item/list_item.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/notice/notice_action.vue.d.ts +4 -5
- package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/split_button/split_button-omega.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -0
- package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +3 -3
- package/dist/vue3/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -0
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/tokens/themes/chunks/tokens-base-dark-C_VClg5s.js +0 -4
- package/dist/tokens/themes/chunks/tokens-base-dark-CsflOADh.js +0 -1
- package/dist/tokens/themes/chunks/tokens-base-light-9TN2mC0P.js +0 -4
- package/dist/tokens/themes/chunks/tokens-base-light-Bg9yNmR_.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.vue.js","sources":["../../../components/chip/chip.vue"],"sourcesContent":["<template>\n <span class=\"d-chip\">\n <component\n :is=\"interactive ? 'button' : 'span'\"\n :id=\"id\"\n :type=\"interactive && 'button'\"\n :class=\"chipClasses()\"\n data-qa=\"dt-chip\"\n :aria-labelledby=\"ariaLabel ? undefined : `${id}-content`\"\n :aria-label=\"ariaLabel\"\n v-on=\"chipListeners\"\n >\n <span\n v-if=\"hasSlotContent($slots.icon)\"\n data-qa=\"dt-chip-icon\"\n class=\"d-chip__icon\"\n >\n <!-- @slot slot for Chip icon -->\n <slot name=\"icon\" />\n </span>\n <span\n v-else-if=\"hasSlotContent($slots.avatar)\"\n data-qa=\"dt-chip-avatar\"\n >\n <!-- @slot slot for Chip avatar -->\n <slot name=\"avatar\" />\n </span>\n <span\n v-if=\"hasSlotContent($slots.default)\"\n :id=\"`${id}-content`\"\n data-qa=\"dt-chip-label\"\n :class=\"['d-chip__text', contentClass]\"\n >\n <!-- @slot slot for Content within chip -->\n <slot />\n </span>\n </component>\n <dt-button\n v-if=\"!hideClose\"\n v-bind=\"closeButtonProps\"\n :class=\"chipCloseButtonClasses()\"\n data-qa=\"dt-chip-close\"\n :aria-label=\"closeButtonProps.ariaLabel\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon
|
|
1
|
+
{"version":3,"file":"chip.vue.js","sources":["../../../components/chip/chip.vue"],"sourcesContent":["<template>\n <span class=\"d-chip\">\n <component\n :is=\"interactive ? 'button' : 'span'\"\n :id=\"id\"\n :type=\"interactive && 'button'\"\n :class=\"chipClasses()\"\n data-qa=\"dt-chip\"\n :aria-labelledby=\"ariaLabel ? undefined : `${id}-content`\"\n :aria-label=\"ariaLabel\"\n v-on=\"chipListeners\"\n >\n <span\n v-if=\"hasSlotContent($slots.icon)\"\n data-qa=\"dt-chip-icon\"\n class=\"d-chip__icon\"\n >\n <!-- @slot slot for Chip icon -->\n <slot name=\"icon\" />\n </span>\n <span\n v-else-if=\"hasSlotContent($slots.avatar)\"\n data-qa=\"dt-chip-avatar\"\n >\n <!-- @slot slot for Chip avatar -->\n <slot name=\"avatar\" />\n </span>\n <span\n v-if=\"hasSlotContent($slots.default)\"\n :id=\"`${id}-content`\"\n data-qa=\"dt-chip-label\"\n :class=\"['d-chip__text', contentClass]\"\n >\n <!-- @slot slot for Content within chip -->\n <slot />\n </span>\n </component>\n <dt-button\n v-if=\"!hideClose\"\n v-bind=\"closeButtonProps\"\n :class=\"chipCloseButtonClasses()\"\n data-qa=\"dt-chip-close\"\n :aria-label=\"closeButtonProps.ariaLabel\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n :size=\"closeButtonIconSize\"\n />\n </template>\n </dt-button>\n </span>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\nimport {\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n} from './chip_constants';\nimport { getUniqueString, hasSlotContent } from '@/common/utils';\n\n/**\n * A chip is a compact UI element that provides brief, descriptive information about an element.\n * It is terse, ideally one word. It is important a button is identifiable, consistent, and\n * communicates its actions clearly, and is appropriately sized to its action.\n * @see https://dialtone.dialpad.com/components/chip.html\n */\nexport default {\n name: 'DtChip',\n\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n /**\n * A set of props to be passed into the modal's close button. Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: function () { return { ariaLabel: 'close' }; },\n validator: (props) => {\n return !!props.ariaLabel;\n },\n },\n\n /**\n * Hides the close button on the chip\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The size of the chip.\n * @values xs, sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(CHIP_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * The interactivity of the chip.\n * Makes chip clickable, apply hover/focus/active style, emit keyboard events etc.\n * @values true, false\n */\n interactive: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n id: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Descriptive label for the chip content.\n * If this prop is unset the content in the default slot will be used as an aria-label.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the chip element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the span element.\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native chip click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native chip key up event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n ],\n\n data () {\n return {\n isActive: false,\n hasSlotContent,\n };\n },\n\n computed: {\n chipListeners () {\n return {\n click: event => {\n if (this.interactive) this.$emit('click', event);\n },\n\n keyup: event => {\n if (event.code?.toLowerCase() === 'delete') {\n this.onClose();\n } else {\n this.$emit('keyup', event);\n }\n },\n };\n },\n\n closeButtonIconSize () {\n return CHIP_ICON_SIZES[this.size];\n },\n },\n\n methods: {\n chipClasses () {\n return [\n this.$attrs['grouped-chip'] ? 'd-chip' : 'd-chip__label',\n CHIP_SIZE_MODIFIERS[this.size],\n this.labelClass,\n ];\n },\n\n chipCloseButtonClasses () {\n return [\n 'd-chip__close',\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS[this.size],\n ];\n },\n\n onClose () {\n if (!this.hideClose) {\n this.$emit('close');\n }\n },\n },\n};\n</script>\n"],"names":["_openBlock","_createElementBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_toHandlers","_renderSlot","_createVNode"],"mappings":";;;;;;AAuEA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,SAAS,WAAY;AAAE,eAAO,EAAE,WAAW,QAAS;AAAA,MAAG;AAAA,MACvD,WAAW,CAAC,UAAU;AACpB,eAAO,CAAC,CAAC,MAAM;AAAA,MAChB;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,MAAM,OAAO,KAAK,mBAAmB,EAAE,SAAS,CAAC;AAAA,IAC9D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,IAAI;AAAA,MACF,MAAM;AAAA,MACN,SAAS,WAAY;AAAE,eAAO,gBAAe;AAAA,MAAK;AAAA,IACnD;AAAA;AAAA;AAAA;AAAA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
|
|
1
1
|
"use strict";
|
|
2
2
|
const common_utils = require("../../common/utils.cjs");
|
|
3
3
|
const collapsible_lazy_show = require("./collapsible_lazy_show.vue.cjs");
|
|
4
|
-
const vue3 = require("@dialpad/dialtone-icons/vue3");
|
|
5
4
|
const vue = require("vue");
|
|
6
5
|
const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.cjs");
|
|
7
6
|
const button = require("../button/button.vue.cjs");
|
|
8
7
|
const lazy_show = require("../lazy_show/lazy_show.vue.cjs");
|
|
8
|
+
const icon = require("../icon/icon.vue.cjs");
|
|
9
9
|
const _sfc_main = {
|
|
10
10
|
name: "DtCollapsible",
|
|
11
11
|
components: {
|
|
12
12
|
DtButton: button,
|
|
13
13
|
DtCollapsibleLazyShow: collapsible_lazy_show,
|
|
14
14
|
DtLazyShow: lazy_show,
|
|
15
|
-
|
|
16
|
-
DtIconChevronRight: vue3.DtIconChevronRight
|
|
15
|
+
DtIcon: icon
|
|
17
16
|
},
|
|
18
17
|
props: {
|
|
19
18
|
/**
|
|
@@ -175,8 +174,7 @@ const _sfc_main = {
|
|
|
175
174
|
const _hoisted_1 = ["id"];
|
|
176
175
|
const _hoisted_2 = ["title"];
|
|
177
176
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
178
|
-
const
|
|
179
|
-
const _component_dt_icon_chevron_right = vue.resolveComponent("dt-icon-chevron-right");
|
|
177
|
+
const _component_dt_icon = vue.resolveComponent("dt-icon");
|
|
180
178
|
const _component_dt_button = vue.resolveComponent("dt-button");
|
|
181
179
|
const _component_dt_collapsible_lazy_show = vue.resolveComponent("dt-collapsible-lazy-show");
|
|
182
180
|
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.elementType), vue.mergeProps({ ref: "collapsible" }, vue.toHandlers($options.collapsibleListeners)), {
|
|
@@ -204,15 +202,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
204
202
|
onClick: $options.defaultToggleOpen
|
|
205
203
|
}, {
|
|
206
204
|
default: vue.withCtx(() => [
|
|
207
|
-
|
|
208
|
-
|
|
205
|
+
vue.createVNode(_component_dt_icon, {
|
|
206
|
+
name: $data.isOpen ? "chevron-down" : "chevron-right",
|
|
209
207
|
class: "d-collapsible__icon",
|
|
210
208
|
size: "300"
|
|
211
|
-
}
|
|
212
|
-
key: 1,
|
|
213
|
-
class: "d-collapsible__icon",
|
|
214
|
-
size: "300"
|
|
215
|
-
})),
|
|
209
|
+
}, null, 8, ["name"]),
|
|
216
210
|
vue.createElementVNode("span", {
|
|
217
211
|
class: "d-collapsible__anchor-text",
|
|
218
212
|
title: $props.anchorText
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible.vue.cjs","sources":["../../../components/collapsible/collapsible.vue"],"sourcesContent":["<template>\n <component\n :is=\"elementType\"\n ref=\"collapsible\"\n v-on=\"collapsibleListeners\"\n >\n <!-- Element for capturing keypress events -->\n <div\n :id=\"!ariaLabelledBy && labelledBy\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n >\n <!-- @slot Slot for the anchor element that toggles the collapsible content -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-controls': id,\n 'aria-expanded': isOpen.toString(),\n 'role': 'button',\n }\"\n >\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-controls=\"id\"\n :aria-expanded=\"`${isOpen}`\"\n :style=\"{\n 'width': maxWidth,\n }\"\n @click=\"defaultToggleOpen\"\n >\n <dt-icon-chevron-down\n v-if=\"isOpen\"\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <dt-icon-chevron-right\n v-else\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <span\n class=\"d-collapsible__anchor-text\"\n :title=\"anchorText\"\n >\n {{ anchorText }}\n </span>\n </dt-button>\n </slot>\n </div>\n <dt-collapsible-lazy-show\n :id=\"id\"\n ref=\"contentWrapper\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :show=\"isOpen\"\n :element-type=\"contentElementType\"\n :class=\"contentClass\"\n :style=\"{\n 'max-height': maxHeight,\n 'max-width': maxWidth,\n }\"\n data-qa=\"dt-collapsible--content\"\n tabindex=\"-1\"\n appear\n v-on=\"collapsibleListeners\"\n @after-leave=\"onLeaveTransitionComplete\"\n @after-enter=\"onEnterTransitionComplete\"\n >\n <!-- @slot Slot for the collapsible element that is expanded by the anchor -->\n <slot\n name=\"content\"\n />\n </dt-collapsible-lazy-show>\n </component>\n</template>\n\n<script>\nimport { extractVueListeners, getUniqueString, hasSlotContent } from '@/common/utils';\nimport DtCollapsibleLazyShow from './collapsible_lazy_show.vue';\nimport { DtButton } from '@/components/button';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { DtIconChevronDown, DtIconChevronRight } from '@dialpad/dialtone-icons/vue3';\n\n/**\n * A collapsible is a component consisting of an interactive anchor that toggled the expandable/collapsible element.\n * @see https://dialtone.dialpad.com/components/collapsible.html\n */\nexport default {\n name: 'DtCollapsible',\n\n components: {\n DtButton,\n DtCollapsibleLazyShow,\n DtLazyShow,\n DtIconChevronDown,\n DtIconChevronRight,\n },\n\n props: {\n /**\n * Text that is displayed on the anchor if nothing is passed in the slot.\n * Ignored if the anchor slot is used.\n */\n anchorText: {\n type: String,\n default: null,\n },\n\n /**\n * Controls whether the collapsible is shown. Leaving this null will have the collapsible start\n * expanded and trigger on click by default. If you set this value, the default trigger\n * behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The id of the content wrapper.\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * HTML element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n contentElementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Additional class name for the anchor wrapper element.\n */\n anchorClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * The maximum width of the anchor and collapsible element.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: null,\n },\n\n /**\n * The maximum height of the collapsible element.\n * Possible units rem|px|%|em\n */\n maxHeight: {\n type: String,\n default: null,\n },\n\n /**\n * Label on the collapsible content. Should provide this or ariaLabelledBy but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Id of the element that labels the collapsible content. Defaults to the anchor element.\n * Should provide this or ariaLabel but not both.\n */\n ariaLabelledBy: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Event fired when the content is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n ],\n\n data () {\n return {\n isOpen: true,\n };\n },\n\n computed: {\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor\n return this.ariaLabelledBy || (!this.ariaLabel && getUniqueString('DtCollapsible__anchor'));\n },\n\n collapsibleListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n\n watch: {\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n },\n\n created () {\n this.validateProperAnchor();\n },\n\n methods: {\n onLeaveTransitionComplete () {\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n onEnterTransitionComplete () {\n this.$emit('opened', true, this.$refs.content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n defaultToggleOpen () {\n if (this.open === null) {\n this.toggleOpen();\n }\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n validateProperAnchor () {\n if (!this.anchorText && !hasSlotContent(this.$slots.anchor)) {\n console.error('anchor text and anchor slot content cannot both be falsy');\n }\n },\n },\n};\n</script>\n"],"names":["DtButton","DtCollapsibleLazyShow","DtLazyShow","DtIconChevronDown","DtIconChevronRight","getUniqueString","extractVueListeners","hasSlotContent","_createBlock","_resolveDynamicComponent","_mergeProps","_toHandlers","_createElementVNode","_renderSlot","_createVNode","_normalizeStyle"],"mappings":";;;;;;;;AAyFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,UAAAA;AAAAA,IACA,uBAAAC;AAAAA,gBACAC;AAAAA,IACA,mBAAAC,KAAiB;AAAA,IACjB,oBAAAC,KAAkB;AAAA,EACnB;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AAAE,eAAOC,aAAe,gBAAA;AAAA,MAAK;AAAA,IACzC;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,WAAW;AAA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AA,QACH,mBAAiB,MAAM,MAAA;AAAA,QACvB,mBAAiB,SAAU;AAAA,QAC3B,cAAY,OAAS;AAAA,QACrB,MAAM,MAAM;AAAA,QACZ,gBAAc,OAAkB;AAAA,QAChC,OAAO,OAAY;AAAA,QACnB,OAAK;AAAA,wBAA0B,OAAS;AAAA,uBAAuB,OAAQ;AAAA;QAIxE,WAAQ;AAAA,QACR,UAAS;AAAA,QACT,QAAA;AAAA,MACA,GAAAC,IAAA,WAAM,SAAoB,oBAAA,GAAA;AAAA,QACzB,cAAa,SAAyB;AAAA,QACtC,cAAa,SAAyB;AAAA;6BAGvC,MAEE;AAAA,UAFFE,eAEE,KAAA,QAAA,SAAA;AAAA;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"collapsible.vue.cjs","sources":["../../../components/collapsible/collapsible.vue"],"sourcesContent":["<template>\n <component\n :is=\"elementType\"\n ref=\"collapsible\"\n v-on=\"collapsibleListeners\"\n >\n <!-- Element for capturing keypress events -->\n <div\n :id=\"!ariaLabelledBy && labelledBy\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n >\n <!-- @slot Slot for the anchor element that toggles the collapsible content -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-controls': id,\n 'aria-expanded': isOpen.toString(),\n 'role': 'button',\n }\"\n >\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-controls=\"id\"\n :aria-expanded=\"`${isOpen}`\"\n :style=\"{\n 'width': maxWidth,\n }\"\n @click=\"defaultToggleOpen\"\n >\n <dt-icon\n :name=\" isOpen ? 'chevron-down' : 'chevron-right'\"\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <span\n class=\"d-collapsible__anchor-text\"\n :title=\"anchorText\"\n >\n {{ anchorText }}\n </span>\n </dt-button>\n </slot>\n </div>\n <dt-collapsible-lazy-show\n :id=\"id\"\n ref=\"contentWrapper\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :show=\"isOpen\"\n :element-type=\"contentElementType\"\n :class=\"contentClass\"\n :style=\"{\n 'max-height': maxHeight,\n 'max-width': maxWidth,\n }\"\n data-qa=\"dt-collapsible--content\"\n tabindex=\"-1\"\n appear\n v-on=\"collapsibleListeners\"\n @after-leave=\"onLeaveTransitionComplete\"\n @after-enter=\"onEnterTransitionComplete\"\n >\n <!-- @slot Slot for the collapsible element that is expanded by the anchor -->\n <slot\n name=\"content\"\n />\n </dt-collapsible-lazy-show>\n </component>\n</template>\n\n<script>\nimport { extractVueListeners, getUniqueString, hasSlotContent } from '@/common/utils';\nimport DtCollapsibleLazyShow from './collapsible_lazy_show.vue';\nimport { DtButton } from '@/components/button';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { DtIcon } from '@/components/icon';\n\n/**\n * A collapsible is a component consisting of an interactive anchor that toggled the expandable/collapsible element.\n * @see https://dialtone.dialpad.com/components/collapsible.html\n */\nexport default {\n name: 'DtCollapsible',\n\n components: {\n DtButton,\n DtCollapsibleLazyShow,\n DtLazyShow,\n DtIcon,\n },\n\n props: {\n /**\n * Text that is displayed on the anchor if nothing is passed in the slot.\n * Ignored if the anchor slot is used.\n */\n anchorText: {\n type: String,\n default: null,\n },\n\n /**\n * Controls whether the collapsible is shown. Leaving this null will have the collapsible start\n * expanded and trigger on click by default. If you set this value, the default trigger\n * behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The id of the content wrapper.\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * HTML element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n contentElementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Additional class name for the anchor wrapper element.\n */\n anchorClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * The maximum width of the anchor and collapsible element.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: null,\n },\n\n /**\n * The maximum height of the collapsible element.\n * Possible units rem|px|%|em\n */\n maxHeight: {\n type: String,\n default: null,\n },\n\n /**\n * Label on the collapsible content. Should provide this or ariaLabelledBy but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Id of the element that labels the collapsible content. Defaults to the anchor element.\n * Should provide this or ariaLabel but not both.\n */\n ariaLabelledBy: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Event fired when the content is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n ],\n\n data () {\n return {\n isOpen: true,\n };\n },\n\n computed: {\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor\n return this.ariaLabelledBy || (!this.ariaLabel && getUniqueString('DtCollapsible__anchor'));\n },\n\n collapsibleListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n\n watch: {\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n },\n\n created () {\n this.validateProperAnchor();\n },\n\n methods: {\n onLeaveTransitionComplete () {\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n onEnterTransitionComplete () {\n this.$emit('opened', true, this.$refs.content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n defaultToggleOpen () {\n if (this.open === null) {\n this.toggleOpen();\n }\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n validateProperAnchor () {\n if (!this.anchorText && !hasSlotContent(this.$slots.anchor)) {\n console.error('anchor text and anchor slot content cannot both be falsy');\n }\n },\n },\n};\n</script>\n"],"names":["DtButton","DtCollapsibleLazyShow","DtLazyShow","DtIcon","getUniqueString","extractVueListeners","hasSlotContent","_createBlock","_resolveDynamicComponent","_mergeProps","_toHandlers","_createElementVNode","_renderSlot","_createVNode","_normalizeStyle"],"mappings":";;;;;;;;AAoFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,UAAAA;AAAAA,IACA,uBAAAC;AAAAA,gBACAC;AAAAA,IACA,QAAAC;AAAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AAAE,eAAOC,aAAe,gBAAA;AAAA,MAAK;AAAA,IACzC;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AA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AAA,wBAA0B,OAAS;AAAA,uBAAuB,OAAQ;AAAA;QAIxE,WAAQ;AAAA,QACR,UAAS;AAAA,QACT,QAAA;AAAA,MACA,GAAAC,IAAA,WAAM,SAAoB,oBAAA,GAAA;AAAA,QACzB,cAAa,SAAyB;AAAA,QACtC,cAAa,SAAyB;AAAA;6BAGvC,MAEE;AAAA,UAFFE,eAEE,KAAA,QAAA,SAAA;AAAA;;;;;;;;;"}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { getUniqueString, extractVueListeners, hasSlotContent } from "../../common/utils.js";
|
|
2
2
|
import DtCollapsibleLazyShow from "./collapsible_lazy_show.vue.js";
|
|
3
|
-
import { DtIconChevronDown, DtIconChevronRight } from "@dialpad/dialtone-icons/vue3";
|
|
4
3
|
import { resolveComponent, openBlock, createBlock, resolveDynamicComponent, mergeProps, toHandlers, withCtx, createElementVNode, normalizeClass, renderSlot, createVNode, normalizeStyle, toDisplayString } from "vue";
|
|
5
4
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
6
5
|
import DtButton from "../button/button.vue.js";
|
|
7
6
|
import DtLazyShow from "../lazy_show/lazy_show.vue.js";
|
|
7
|
+
import DtIcon from "../icon/icon.vue.js";
|
|
8
8
|
const _sfc_main = {
|
|
9
9
|
name: "DtCollapsible",
|
|
10
10
|
components: {
|
|
11
11
|
DtButton,
|
|
12
12
|
DtCollapsibleLazyShow,
|
|
13
13
|
DtLazyShow,
|
|
14
|
-
|
|
15
|
-
DtIconChevronRight
|
|
14
|
+
DtIcon
|
|
16
15
|
},
|
|
17
16
|
props: {
|
|
18
17
|
/**
|
|
@@ -174,8 +173,7 @@ const _sfc_main = {
|
|
|
174
173
|
const _hoisted_1 = ["id"];
|
|
175
174
|
const _hoisted_2 = ["title"];
|
|
176
175
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
177
|
-
const
|
|
178
|
-
const _component_dt_icon_chevron_right = resolveComponent("dt-icon-chevron-right");
|
|
176
|
+
const _component_dt_icon = resolveComponent("dt-icon");
|
|
179
177
|
const _component_dt_button = resolveComponent("dt-button");
|
|
180
178
|
const _component_dt_collapsible_lazy_show = resolveComponent("dt-collapsible-lazy-show");
|
|
181
179
|
return openBlock(), createBlock(resolveDynamicComponent($props.elementType), mergeProps({ ref: "collapsible" }, toHandlers($options.collapsibleListeners)), {
|
|
@@ -203,15 +201,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
203
201
|
onClick: $options.defaultToggleOpen
|
|
204
202
|
}, {
|
|
205
203
|
default: withCtx(() => [
|
|
206
|
-
|
|
207
|
-
|
|
204
|
+
createVNode(_component_dt_icon, {
|
|
205
|
+
name: $data.isOpen ? "chevron-down" : "chevron-right",
|
|
208
206
|
class: "d-collapsible__icon",
|
|
209
207
|
size: "300"
|
|
210
|
-
}
|
|
211
|
-
key: 1,
|
|
212
|
-
class: "d-collapsible__icon",
|
|
213
|
-
size: "300"
|
|
214
|
-
})),
|
|
208
|
+
}, null, 8, ["name"]),
|
|
215
209
|
createElementVNode("span", {
|
|
216
210
|
class: "d-collapsible__anchor-text",
|
|
217
211
|
title: $props.anchorText
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible.vue.js","sources":["../../../components/collapsible/collapsible.vue"],"sourcesContent":["<template>\n <component\n :is=\"elementType\"\n ref=\"collapsible\"\n v-on=\"collapsibleListeners\"\n >\n <!-- Element for capturing keypress events -->\n <div\n :id=\"!ariaLabelledBy && labelledBy\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n >\n <!-- @slot Slot for the anchor element that toggles the collapsible content -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-controls': id,\n 'aria-expanded': isOpen.toString(),\n 'role': 'button',\n }\"\n >\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-controls=\"id\"\n :aria-expanded=\"`${isOpen}`\"\n :style=\"{\n 'width': maxWidth,\n }\"\n @click=\"defaultToggleOpen\"\n >\n <dt-icon-chevron-down\n v-if=\"isOpen\"\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <dt-icon-chevron-right\n v-else\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <span\n class=\"d-collapsible__anchor-text\"\n :title=\"anchorText\"\n >\n {{ anchorText }}\n </span>\n </dt-button>\n </slot>\n </div>\n <dt-collapsible-lazy-show\n :id=\"id\"\n ref=\"contentWrapper\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :show=\"isOpen\"\n :element-type=\"contentElementType\"\n :class=\"contentClass\"\n :style=\"{\n 'max-height': maxHeight,\n 'max-width': maxWidth,\n }\"\n data-qa=\"dt-collapsible--content\"\n tabindex=\"-1\"\n appear\n v-on=\"collapsibleListeners\"\n @after-leave=\"onLeaveTransitionComplete\"\n @after-enter=\"onEnterTransitionComplete\"\n >\n <!-- @slot Slot for the collapsible element that is expanded by the anchor -->\n <slot\n name=\"content\"\n />\n </dt-collapsible-lazy-show>\n </component>\n</template>\n\n<script>\nimport { extractVueListeners, getUniqueString, hasSlotContent } from '@/common/utils';\nimport DtCollapsibleLazyShow from './collapsible_lazy_show.vue';\nimport { DtButton } from '@/components/button';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { DtIconChevronDown, DtIconChevronRight } from '@dialpad/dialtone-icons/vue3';\n\n/**\n * A collapsible is a component consisting of an interactive anchor that toggled the expandable/collapsible element.\n * @see https://dialtone.dialpad.com/components/collapsible.html\n */\nexport default {\n name: 'DtCollapsible',\n\n components: {\n DtButton,\n DtCollapsibleLazyShow,\n DtLazyShow,\n DtIconChevronDown,\n DtIconChevronRight,\n },\n\n props: {\n /**\n * Text that is displayed on the anchor if nothing is passed in the slot.\n * Ignored if the anchor slot is used.\n */\n anchorText: {\n type: String,\n default: null,\n },\n\n /**\n * Controls whether the collapsible is shown. Leaving this null will have the collapsible start\n * expanded and trigger on click by default. If you set this value, the default trigger\n * behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The id of the content wrapper.\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * HTML element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n contentElementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Additional class name for the anchor wrapper element.\n */\n anchorClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * The maximum width of the anchor and collapsible element.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: null,\n },\n\n /**\n * The maximum height of the collapsible element.\n * Possible units rem|px|%|em\n */\n maxHeight: {\n type: String,\n default: null,\n },\n\n /**\n * Label on the collapsible content. Should provide this or ariaLabelledBy but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Id of the element that labels the collapsible content. Defaults to the anchor element.\n * Should provide this or ariaLabel but not both.\n */\n ariaLabelledBy: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Event fired when the content is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n ],\n\n data () {\n return {\n isOpen: true,\n };\n },\n\n computed: {\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor\n return this.ariaLabelledBy || (!this.ariaLabel && getUniqueString('DtCollapsible__anchor'));\n },\n\n collapsibleListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n\n watch: {\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n },\n\n created () {\n this.validateProperAnchor();\n },\n\n methods: {\n onLeaveTransitionComplete () {\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n onEnterTransitionComplete () {\n this.$emit('opened', true, this.$refs.content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n defaultToggleOpen () {\n if (this.open === null) {\n this.toggleOpen();\n }\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n validateProperAnchor () {\n if (!this.anchorText && !hasSlotContent(this.$slots.anchor)) {\n console.error('anchor text and anchor slot content cannot both be falsy');\n }\n },\n },\n};\n</script>\n"],"names":["_createBlock","_resolveDynamicComponent","_mergeProps","_toHandlers","_createElementVNode","_renderSlot","_createVNode","_normalizeStyle"],"mappings":";;;;;;;AAyFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AAAE,eAAO,gBAAe;AAAA,MAAK;AAAA,IACzC;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM,CAAC,QAAQ,OAAO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E,YAwB2B,qCAxB3BJ,WAwB2B;AAAA,QAvBxB,IAAI,OAAE;AAAA,QACP,KAAI;AAAA,QACH,mBAAiB,MAAM,MAAA;AAAA,QACvB,mBAAiB,SAAU;AAAA,QAC3B,cAAY,OAAS;AAAA,QACrB,MAAM,MAAM;AAAA,QACZ,gBAAc,OAAkB;AAAA,QAChC,OAAO,OAAY;AAAA,QACnB,OAAK;AAAA,wBAA0B,OAAS;AAAA,uBAAuB,OAAQ;AAAA;QAIxE,WAAQ;AAAA,QACR,UAAS;AAAA,QACT,QAAA;AAAA,MACA,GAAAC,WAAM,SAAoB,oBAAA,GAAA;AAAA,QACzB,cAAa,SAAyB;AAAA,QACtC,cAAa,SAAyB;AAAA;yBAGvC,MAEE;AAAA,UAFFE,WAEE,KAAA,QAAA,SAAA;AAAA;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"collapsible.vue.js","sources":["../../../components/collapsible/collapsible.vue"],"sourcesContent":["<template>\n <component\n :is=\"elementType\"\n ref=\"collapsible\"\n v-on=\"collapsibleListeners\"\n >\n <!-- Element for capturing keypress events -->\n <div\n :id=\"!ariaLabelledBy && labelledBy\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n >\n <!-- @slot Slot for the anchor element that toggles the collapsible content -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-controls': id,\n 'aria-expanded': isOpen.toString(),\n 'role': 'button',\n }\"\n >\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-controls=\"id\"\n :aria-expanded=\"`${isOpen}`\"\n :style=\"{\n 'width': maxWidth,\n }\"\n @click=\"defaultToggleOpen\"\n >\n <dt-icon\n :name=\" isOpen ? 'chevron-down' : 'chevron-right'\"\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <span\n class=\"d-collapsible__anchor-text\"\n :title=\"anchorText\"\n >\n {{ anchorText }}\n </span>\n </dt-button>\n </slot>\n </div>\n <dt-collapsible-lazy-show\n :id=\"id\"\n ref=\"contentWrapper\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :show=\"isOpen\"\n :element-type=\"contentElementType\"\n :class=\"contentClass\"\n :style=\"{\n 'max-height': maxHeight,\n 'max-width': maxWidth,\n }\"\n data-qa=\"dt-collapsible--content\"\n tabindex=\"-1\"\n appear\n v-on=\"collapsibleListeners\"\n @after-leave=\"onLeaveTransitionComplete\"\n @after-enter=\"onEnterTransitionComplete\"\n >\n <!-- @slot Slot for the collapsible element that is expanded by the anchor -->\n <slot\n name=\"content\"\n />\n </dt-collapsible-lazy-show>\n </component>\n</template>\n\n<script>\nimport { extractVueListeners, getUniqueString, hasSlotContent } from '@/common/utils';\nimport DtCollapsibleLazyShow from './collapsible_lazy_show.vue';\nimport { DtButton } from '@/components/button';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { DtIcon } from '@/components/icon';\n\n/**\n * A collapsible is a component consisting of an interactive anchor that toggled the expandable/collapsible element.\n * @see https://dialtone.dialpad.com/components/collapsible.html\n */\nexport default {\n name: 'DtCollapsible',\n\n components: {\n DtButton,\n DtCollapsibleLazyShow,\n DtLazyShow,\n DtIcon,\n },\n\n props: {\n /**\n * Text that is displayed on the anchor if nothing is passed in the slot.\n * Ignored if the anchor slot is used.\n */\n anchorText: {\n type: String,\n default: null,\n },\n\n /**\n * Controls whether the collapsible is shown. Leaving this null will have the collapsible start\n * expanded and trigger on click by default. If you set this value, the default trigger\n * behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The id of the content wrapper.\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * HTML element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n contentElementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Additional class name for the anchor wrapper element.\n */\n anchorClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * The maximum width of the anchor and collapsible element.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: null,\n },\n\n /**\n * The maximum height of the collapsible element.\n * Possible units rem|px|%|em\n */\n maxHeight: {\n type: String,\n default: null,\n },\n\n /**\n * Label on the collapsible content. Should provide this or ariaLabelledBy but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Id of the element that labels the collapsible content. Defaults to the anchor element.\n * Should provide this or ariaLabel but not both.\n */\n ariaLabelledBy: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Event fired when the content is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n ],\n\n data () {\n return {\n isOpen: true,\n };\n },\n\n computed: {\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor\n return this.ariaLabelledBy || (!this.ariaLabel && getUniqueString('DtCollapsible__anchor'));\n },\n\n collapsibleListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n\n watch: {\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n },\n\n created () {\n this.validateProperAnchor();\n },\n\n methods: {\n onLeaveTransitionComplete () {\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n onEnterTransitionComplete () {\n this.$emit('opened', true, this.$refs.content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n defaultToggleOpen () {\n if (this.open === null) {\n this.toggleOpen();\n }\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n validateProperAnchor () {\n if (!this.anchorText && !hasSlotContent(this.$slots.anchor)) {\n console.error('anchor text and anchor slot content cannot both be falsy');\n }\n },\n },\n};\n</script>\n"],"names":["_createBlock","_resolveDynamicComponent","_mergeProps","_toHandlers","_createElementVNode","_renderSlot","_createVNode","_normalizeStyle"],"mappings":";;;;;;;AAoFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AAAE,eAAO,gBAAe;AAAA,MAAK;AAAA,IACzC;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,gBAA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oBAAA,GAAA;AAAA,QACzB,cAAa,SAAyB;AAAA,QACtC,cAAa,SAAyB;AAAA;yBAGvC,MAEE;AAAA,UAFFE,WAEE,KAAA,QAAA,SAAA;AAAA;;;;;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const vue = require("vue");
|
|
3
|
-
const vue3 = require("@dialpad/dialtone-icons/vue3");
|
|
4
3
|
const datepicker_constants = require("../datepicker_constants.cjs");
|
|
5
4
|
const useMonthYearPicker = require("../composables/useMonthYearPicker.cjs");
|
|
6
5
|
const stack = require("../../stack/stack.vue.cjs");
|
|
7
6
|
const tooltip = require("../../tooltip/tooltip.vue.cjs");
|
|
8
7
|
const button = require("../../button/button.vue.cjs");
|
|
8
|
+
const icon = require("../../icon/icon.vue.cjs");
|
|
9
9
|
const _hoisted_1 = {
|
|
10
10
|
id: "calendar-heading",
|
|
11
11
|
class: "d-datepicker__month-year-title"
|
|
@@ -128,7 +128,10 @@ const _sfc_main = {
|
|
|
128
128
|
onKeydown: _cache[1] || (_cache[1] = ($event) => vue.unref(handleKeyDown)($event))
|
|
129
129
|
}, {
|
|
130
130
|
default: vue.withCtx(() => [
|
|
131
|
-
vue.createVNode(vue.unref(
|
|
131
|
+
vue.createVNode(vue.unref(icon), {
|
|
132
|
+
name: "chevrons-left",
|
|
133
|
+
size: "200"
|
|
134
|
+
})
|
|
132
135
|
]),
|
|
133
136
|
_: 1
|
|
134
137
|
}, 8, ["aria-label"])
|
|
@@ -157,7 +160,10 @@ const _sfc_main = {
|
|
|
157
160
|
onKeydown: _cache[3] || (_cache[3] = ($event) => vue.unref(handleKeyDown)($event))
|
|
158
161
|
}, {
|
|
159
162
|
default: vue.withCtx(() => [
|
|
160
|
-
vue.createVNode(vue.unref(
|
|
163
|
+
vue.createVNode(vue.unref(icon), {
|
|
164
|
+
name: "chevron-left",
|
|
165
|
+
size: "200"
|
|
166
|
+
})
|
|
161
167
|
]),
|
|
162
168
|
_: 1
|
|
163
169
|
}, 8, ["aria-label"])
|
|
@@ -197,7 +203,10 @@ const _sfc_main = {
|
|
|
197
203
|
onKeydown: _cache[5] || (_cache[5] = ($event) => vue.unref(handleKeyDown)($event))
|
|
198
204
|
}, {
|
|
199
205
|
default: vue.withCtx(() => [
|
|
200
|
-
vue.createVNode(vue.unref(
|
|
206
|
+
vue.createVNode(vue.unref(icon), {
|
|
207
|
+
name: "chevron-right",
|
|
208
|
+
size: "200"
|
|
209
|
+
})
|
|
201
210
|
]),
|
|
202
211
|
_: 1
|
|
203
212
|
}, 8, ["aria-label"])
|
|
@@ -226,7 +235,10 @@ const _sfc_main = {
|
|
|
226
235
|
onKeydown: _cache[7] || (_cache[7] = ($event) => vue.unref(handleKeyDown)($event))
|
|
227
236
|
}, {
|
|
228
237
|
default: vue.withCtx(() => [
|
|
229
|
-
vue.createVNode(vue.unref(
|
|
238
|
+
vue.createVNode(vue.unref(icon), {
|
|
239
|
+
name: "chevrons-right",
|
|
240
|
+
size: "200"
|
|
241
|
+
})
|
|
230
242
|
]),
|
|
231
243
|
_: 1
|
|
232
244
|
}, 8, ["aria-label"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"month-year-picker.vue.cjs","sources":["../../../../components/datepicker/modules/month-year-picker.vue"],"sourcesContent":["<template>\n <dt-stack\n direction=\"row\"\n class=\"d-datepicker__month-year\"\n gap=\"300\"\n >\n <dt-stack\n as=\"nav\"\n direction=\"row\"\n gap=\"200\"\n class=\"d-datepicker__nav\"\n >\n <dt-tooltip\n :message=\"prevYearLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-start', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"prevYearButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${prevYearLabel} ${selectYear - 1}`\"\n @click=\"changeYear(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon
|
|
1
|
+
{"version":3,"file":"month-year-picker.vue.cjs","sources":["../../../../components/datepicker/modules/month-year-picker.vue"],"sourcesContent":["<template>\n <dt-stack\n direction=\"row\"\n class=\"d-datepicker__month-year\"\n gap=\"300\"\n >\n <dt-stack\n as=\"nav\"\n direction=\"row\"\n gap=\"200\"\n class=\"d-datepicker__nav\"\n >\n <dt-tooltip\n :message=\"prevYearLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-start', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"prevYearButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${prevYearLabel} ${selectYear - 1}`\"\n @click=\"changeYear(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon\n name=\"chevrons-left\"\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :message=\"prevMonthLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-end', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"prevMonthButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"\n `${changeToLabel} ${prevMonthLabel} ${formattedMonth(selectMonth - 1, INTL_MONTH_FORMAT, locale)}`\n \"\n @click=\"changeMonth(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon\n name=\"chevron-left\"\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n <div\n id=\"calendar-heading\"\n class=\"d-datepicker__month-year-title\"\n >\n {{ formattedMonth(selectMonth, INTL_MONTH_FORMAT, locale) }}\n\n {{ selectYear }}\n </div>\n <dt-stack\n as=\"nav\"\n direction=\"row\"\n gap=\"200\"\n class=\"d-datepicker__nav\"\n >\n <dt-tooltip\n :message=\"nextMonthLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-start', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"nextMonthButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"\n `${changeToLabel} ${nextMonthLabel} ${formattedMonth(selectMonth + 1, INTL_MONTH_FORMAT, locale)}`\n \"\n @click=\"changeMonth(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon\n name=\"chevron-right\"\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :message=\"nextYearLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-end', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"nextYearButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${nextYearLabel} ${selectYear + 1}`\"\n @click=\"changeYear(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon\n name=\"chevrons-right\"\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n </dt-stack>\n</template>\n\n<script setup>\nimport { DtIcon } from '@/components/icon';\nimport { DtStack } from '@/components/stack';\nimport { DtButton } from '@/components/button';\nimport { DtTooltip } from '@/components/tooltip';\nimport { INTL_MONTH_FORMAT } from '../datepicker_constants';\nimport { onMounted } from 'vue';\nimport { useMonthYearPicker } from '@/components/datepicker/composables/useMonthYearPicker.js';\n\nconst props = defineProps({\n locale: {\n type: String,\n required: true,\n },\n\n prevMonthLabel: {\n type: String,\n required: true,\n },\n\n nextMonthLabel: {\n type: String,\n required: true,\n },\n\n prevYearLabel: {\n type: String,\n required: true,\n },\n\n nextYearLabel: {\n type: String,\n required: true,\n },\n\n changeToLabel: {\n type: String,\n required: true,\n },\n\n selectedDate: {\n type: Date,\n required: true,\n },\n});\nconst emits = defineEmits([\n /**\n * Will retrieve the calendar days of the given date\n *\n * @event calendar-days\n * @type {Array}\n */\n 'calendar-days',\n\n /**\n * Will focus first day in calendar\n *\n * @event focus-first-day\n */\n 'focus-first-day',\n\n /**\n * Will focus last day in calendar\n *\n * @event focus-last-day\n */\n 'focus-last-day',\n\n /**\n * Will close the datepicker\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n]);\n\nconst {\n selectMonth,\n selectYear,\n formattedMonth,\n setDayRef,\n focusMonthYearPicker,\n handleKeyDown,\n changeMonth,\n changeYear,\n goToNextMonth,\n goToPrevMonth,\n} = useMonthYearPicker(props, emits);\n\nonMounted(() => {\n focusMonthYearPicker();\n});\n\ndefineExpose({\n focusMonthYearPicker,\n goToNextMonth,\n goToPrevMonth,\n});\n</script>\n"],"names":["useMonthYearPicker","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoJA,UAAM,QAAQ;AAoCd,UAAM,QAAQ;AA+Bd,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,IAAIA,mBAAkB,mBAAC,OAAO,KAAK;AAEnCC,QAAAA,UAAU,MAAM;AACd;IACF,CAAC;AAED,aAAa;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { onMounted, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, toDisplayString } from "vue";
|
|
2
|
-
import { DtIconChevronsLeft, DtIconChevronLeft, DtIconChevronRight, DtIconChevronsRight } from "@dialpad/dialtone-icons/vue3";
|
|
3
2
|
import { INTL_MONTH_FORMAT } from "../datepicker_constants.js";
|
|
4
3
|
import { useMonthYearPicker } from "../composables/useMonthYearPicker.js";
|
|
5
4
|
import DtStack from "../../stack/stack.vue.js";
|
|
6
5
|
import DtTooltip from "../../tooltip/tooltip.vue.js";
|
|
7
6
|
import DtButton from "../../button/button.vue.js";
|
|
7
|
+
import DtIcon from "../../icon/icon.vue.js";
|
|
8
8
|
const _hoisted_1 = {
|
|
9
9
|
id: "calendar-heading",
|
|
10
10
|
class: "d-datepicker__month-year-title"
|
|
@@ -127,7 +127,10 @@ const _sfc_main = {
|
|
|
127
127
|
onKeydown: _cache[1] || (_cache[1] = ($event) => unref(handleKeyDown)($event))
|
|
128
128
|
}, {
|
|
129
129
|
default: withCtx(() => [
|
|
130
|
-
createVNode(unref(
|
|
130
|
+
createVNode(unref(DtIcon), {
|
|
131
|
+
name: "chevrons-left",
|
|
132
|
+
size: "200"
|
|
133
|
+
})
|
|
131
134
|
]),
|
|
132
135
|
_: 1
|
|
133
136
|
}, 8, ["aria-label"])
|
|
@@ -156,7 +159,10 @@ const _sfc_main = {
|
|
|
156
159
|
onKeydown: _cache[3] || (_cache[3] = ($event) => unref(handleKeyDown)($event))
|
|
157
160
|
}, {
|
|
158
161
|
default: withCtx(() => [
|
|
159
|
-
createVNode(unref(
|
|
162
|
+
createVNode(unref(DtIcon), {
|
|
163
|
+
name: "chevron-left",
|
|
164
|
+
size: "200"
|
|
165
|
+
})
|
|
160
166
|
]),
|
|
161
167
|
_: 1
|
|
162
168
|
}, 8, ["aria-label"])
|
|
@@ -196,7 +202,10 @@ const _sfc_main = {
|
|
|
196
202
|
onKeydown: _cache[5] || (_cache[5] = ($event) => unref(handleKeyDown)($event))
|
|
197
203
|
}, {
|
|
198
204
|
default: withCtx(() => [
|
|
199
|
-
createVNode(unref(
|
|
205
|
+
createVNode(unref(DtIcon), {
|
|
206
|
+
name: "chevron-right",
|
|
207
|
+
size: "200"
|
|
208
|
+
})
|
|
200
209
|
]),
|
|
201
210
|
_: 1
|
|
202
211
|
}, 8, ["aria-label"])
|
|
@@ -225,7 +234,10 @@ const _sfc_main = {
|
|
|
225
234
|
onKeydown: _cache[7] || (_cache[7] = ($event) => unref(handleKeyDown)($event))
|
|
226
235
|
}, {
|
|
227
236
|
default: withCtx(() => [
|
|
228
|
-
createVNode(unref(
|
|
237
|
+
createVNode(unref(DtIcon), {
|
|
238
|
+
name: "chevrons-right",
|
|
239
|
+
size: "200"
|
|
240
|
+
})
|
|
229
241
|
]),
|
|
230
242
|
_: 1
|
|
231
243
|
}, 8, ["aria-label"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"month-year-picker.vue.js","sources":["../../../../components/datepicker/modules/month-year-picker.vue"],"sourcesContent":["<template>\n <dt-stack\n direction=\"row\"\n class=\"d-datepicker__month-year\"\n gap=\"300\"\n >\n <dt-stack\n as=\"nav\"\n direction=\"row\"\n gap=\"200\"\n class=\"d-datepicker__nav\"\n >\n <dt-tooltip\n :message=\"prevYearLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-start', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"prevYearButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${prevYearLabel} ${selectYear - 1}`\"\n @click=\"changeYear(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon
|
|
1
|
+
{"version":3,"file":"month-year-picker.vue.js","sources":["../../../../components/datepicker/modules/month-year-picker.vue"],"sourcesContent":["<template>\n <dt-stack\n direction=\"row\"\n class=\"d-datepicker__month-year\"\n gap=\"300\"\n >\n <dt-stack\n as=\"nav\"\n direction=\"row\"\n gap=\"200\"\n class=\"d-datepicker__nav\"\n >\n <dt-tooltip\n :message=\"prevYearLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-start', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"prevYearButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${prevYearLabel} ${selectYear - 1}`\"\n @click=\"changeYear(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon\n name=\"chevrons-left\"\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :message=\"prevMonthLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-end', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"prevMonthButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"\n `${changeToLabel} ${prevMonthLabel} ${formattedMonth(selectMonth - 1, INTL_MONTH_FORMAT, locale)}`\n \"\n @click=\"changeMonth(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon\n name=\"chevron-left\"\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n <div\n id=\"calendar-heading\"\n class=\"d-datepicker__month-year-title\"\n >\n {{ formattedMonth(selectMonth, INTL_MONTH_FORMAT, locale) }}\n\n {{ selectYear }}\n </div>\n <dt-stack\n as=\"nav\"\n direction=\"row\"\n gap=\"200\"\n class=\"d-datepicker__nav\"\n >\n <dt-tooltip\n :message=\"nextMonthLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-start', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"nextMonthButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"\n `${changeToLabel} ${nextMonthLabel} ${formattedMonth(selectMonth + 1, INTL_MONTH_FORMAT, locale)}`\n \"\n @click=\"changeMonth(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon\n name=\"chevron-right\"\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :message=\"nextYearLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-end', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"nextYearButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${nextYearLabel} ${selectYear + 1}`\"\n @click=\"changeYear(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon\n name=\"chevrons-right\"\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n </dt-stack>\n</template>\n\n<script setup>\nimport { DtIcon } from '@/components/icon';\nimport { DtStack } from '@/components/stack';\nimport { DtButton } from '@/components/button';\nimport { DtTooltip } from '@/components/tooltip';\nimport { INTL_MONTH_FORMAT } from '../datepicker_constants';\nimport { onMounted } from 'vue';\nimport { useMonthYearPicker } from '@/components/datepicker/composables/useMonthYearPicker.js';\n\nconst props = defineProps({\n locale: {\n type: String,\n required: true,\n },\n\n prevMonthLabel: {\n type: String,\n required: true,\n },\n\n nextMonthLabel: {\n type: String,\n required: true,\n },\n\n prevYearLabel: {\n type: String,\n required: true,\n },\n\n nextYearLabel: {\n type: String,\n required: true,\n },\n\n changeToLabel: {\n type: String,\n required: true,\n },\n\n selectedDate: {\n type: Date,\n required: true,\n },\n});\nconst emits = defineEmits([\n /**\n * Will retrieve the calendar days of the given date\n *\n * @event calendar-days\n * @type {Array}\n */\n 'calendar-days',\n\n /**\n * Will focus first day in calendar\n *\n * @event focus-first-day\n */\n 'focus-first-day',\n\n /**\n * Will focus last day in calendar\n *\n * @event focus-last-day\n */\n 'focus-last-day',\n\n /**\n * Will close the datepicker\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n]);\n\nconst {\n selectMonth,\n selectYear,\n formattedMonth,\n setDayRef,\n focusMonthYearPicker,\n handleKeyDown,\n changeMonth,\n changeYear,\n goToNextMonth,\n goToPrevMonth,\n} = useMonthYearPicker(props, emits);\n\nonMounted(() => {\n focusMonthYearPicker();\n});\n\ndefineExpose({\n focusMonthYearPicker,\n goToNextMonth,\n goToPrevMonth,\n});\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoJA,UAAM,QAAQ;AAoCd,UAAM,QAAQ;AA+Bd,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,IAAI,mBAAmB,OAAO,KAAK;AAEnC,cAAU,MAAM;AACd;IACF,CAAC;AAED,aAAa;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const vue = require("vue");
|
|
3
|
-
const vue3 = require("@dialpad/dialtone-icons/vue3");
|
|
4
3
|
const input = require("../../input/input.vue.cjs");
|
|
4
|
+
const icon = require("../../icon/icon.vue.cjs");
|
|
5
5
|
const button = require("../../button/button.vue.cjs");
|
|
6
6
|
const _hoisted_1 = { class: "d-emoji-picker__search d-emoji-picker__alignment" };
|
|
7
7
|
const _sfc_main = {
|
|
@@ -49,7 +49,10 @@ const _sfc_main = {
|
|
|
49
49
|
]
|
|
50
50
|
}, vue.createSlots({
|
|
51
51
|
leftIcon: vue.withCtx(() => [
|
|
52
|
-
vue.createVNode(vue.unref(
|
|
52
|
+
vue.createVNode(vue.unref(icon), {
|
|
53
|
+
name: "search",
|
|
54
|
+
size: "200"
|
|
55
|
+
})
|
|
53
56
|
]),
|
|
54
57
|
_: 2
|
|
55
58
|
}, [
|
|
@@ -58,11 +61,17 @@ const _sfc_main = {
|
|
|
58
61
|
fn: vue.withCtx(() => [
|
|
59
62
|
vue.createVNode(vue.unref(button), {
|
|
60
63
|
importance: "clear",
|
|
64
|
+
size: "xs",
|
|
65
|
+
class: "d-mrn4",
|
|
66
|
+
circle: "",
|
|
61
67
|
kind: "muted",
|
|
62
68
|
onClick: clearSearch
|
|
63
69
|
}, {
|
|
64
70
|
icon: vue.withCtx(() => [
|
|
65
|
-
vue.createVNode(vue.unref(
|
|
71
|
+
vue.createVNode(vue.unref(icon), {
|
|
72
|
+
name: "close",
|
|
73
|
+
size: "200"
|
|
74
|
+
})
|
|
66
75
|
]),
|
|
67
76
|
_: 1
|
|
68
77
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji_search.vue.cjs","sources":["../../../../components/emoji_picker/modules/emoji_search.vue"],"sourcesContent":["<template>\n <div class=\"d-emoji-picker__search d-emoji-picker__alignment\">\n <dt-input\n id=\"searchInput\"\n ref=\"searchInput\"\n :placeholder=\"searchPlaceholderLabel\"\n :model-value=\"modelValue\"\n @update:model-value=\"$emit('update:modelValue', $event)\"\n @keydown.up=\"$emit('focus-tabset')\"\n @keydown.down.prevent=\"$emit('focus-emoji-selector')\"\n @keydown.enter=\"$emit('select-first-emoji')\"\n >\n <template #leftIcon>\n <dt-icon
|
|
1
|
+
{"version":3,"file":"emoji_search.vue.cjs","sources":["../../../../components/emoji_picker/modules/emoji_search.vue"],"sourcesContent":["<template>\n <div class=\"d-emoji-picker__search d-emoji-picker__alignment\">\n <dt-input\n id=\"searchInput\"\n ref=\"searchInput\"\n :placeholder=\"searchPlaceholderLabel\"\n :model-value=\"modelValue\"\n @update:model-value=\"$emit('update:modelValue', $event)\"\n @keydown.up=\"$emit('focus-tabset')\"\n @keydown.down.prevent=\"$emit('focus-emoji-selector')\"\n @keydown.enter=\"$emit('select-first-emoji')\"\n >\n <template #leftIcon>\n <dt-icon\n name=\"search\"\n size=\"200\"\n />\n </template>\n <template\n v-if=\"modelValue.length > 0\"\n #rightIcon\n >\n <dt-button\n importance=\"clear\"\n size=\"xs\"\n class=\"d-mrn4\"\n circle\n kind=\"muted\"\n @click=\"clearSearch\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n </dt-input>\n </div>\n</template>\n\n<script setup>\nimport { DtInput } from '@/components/input';\nimport { DtIcon } from '@/components/icon';\nimport { DtButton } from '@/components/button';\nimport { onMounted, ref } from 'vue';\n\ndefineProps({\n searchPlaceholderLabel: {\n type: String,\n required: true,\n },\n modelValue: {\n type: String,\n default: '',\n },\n});\n\nconst emits = defineEmits(['update:modelValue', 'focus-emoji-selector', 'focus-tabset', 'select-first-emoji']);\n\nconst searchInput = ref(null);\n\nfunction clearSearch () {\n emits('update:modelValue', '');\n focusSearchInput();\n}\n\nfunction focusSearchInput () {\n searchInput.value.focus();\n}\nonMounted(() => {\n focusSearchInput();\n});\n\ndefineExpose({\n focusSearchInput,\n});\n</script>\n"],"names":["ref","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;AA2DA,UAAM,QAAQ;AAEd,UAAM,cAAcA,IAAAA,IAAI,IAAI;AAE5B,aAAS,cAAe;AACtB,YAAM,qBAAqB,EAAE;AAC7B;IACF;AAEA,aAAS,mBAAoB;AAC3B,kBAAY,MAAM;IACpB;AACAC,QAAAA,UAAU,MAAM;AACd;IACF,CAAC;AAED,aAAa;AAAA,MACX;AAAA,IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onMounted, openBlock, createElementBlock, createVNode, unref, withKeys, withModifiers, createSlots, withCtx } from "vue";
|
|
2
|
-
import { DtIconSearch, DtIconXCircle } from "@dialpad/dialtone-icons/vue3";
|
|
3
2
|
import DtInput from "../../input/input.vue.js";
|
|
3
|
+
import DtIcon from "../../icon/icon.vue.js";
|
|
4
4
|
import DtButton from "../../button/button.vue.js";
|
|
5
5
|
const _hoisted_1 = { class: "d-emoji-picker__search d-emoji-picker__alignment" };
|
|
6
6
|
const _sfc_main = {
|
|
@@ -48,7 +48,10 @@ const _sfc_main = {
|
|
|
48
48
|
]
|
|
49
49
|
}, createSlots({
|
|
50
50
|
leftIcon: withCtx(() => [
|
|
51
|
-
createVNode(unref(
|
|
51
|
+
createVNode(unref(DtIcon), {
|
|
52
|
+
name: "search",
|
|
53
|
+
size: "200"
|
|
54
|
+
})
|
|
52
55
|
]),
|
|
53
56
|
_: 2
|
|
54
57
|
}, [
|
|
@@ -57,11 +60,17 @@ const _sfc_main = {
|
|
|
57
60
|
fn: withCtx(() => [
|
|
58
61
|
createVNode(unref(DtButton), {
|
|
59
62
|
importance: "clear",
|
|
63
|
+
size: "xs",
|
|
64
|
+
class: "d-mrn4",
|
|
65
|
+
circle: "",
|
|
60
66
|
kind: "muted",
|
|
61
67
|
onClick: clearSearch
|
|
62
68
|
}, {
|
|
63
69
|
icon: withCtx(() => [
|
|
64
|
-
createVNode(unref(
|
|
70
|
+
createVNode(unref(DtIcon), {
|
|
71
|
+
name: "close",
|
|
72
|
+
size: "200"
|
|
73
|
+
})
|
|
65
74
|
]),
|
|
66
75
|
_: 1
|
|
67
76
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji_search.vue.js","sources":["../../../../components/emoji_picker/modules/emoji_search.vue"],"sourcesContent":["<template>\n <div class=\"d-emoji-picker__search d-emoji-picker__alignment\">\n <dt-input\n id=\"searchInput\"\n ref=\"searchInput\"\n :placeholder=\"searchPlaceholderLabel\"\n :model-value=\"modelValue\"\n @update:model-value=\"$emit('update:modelValue', $event)\"\n @keydown.up=\"$emit('focus-tabset')\"\n @keydown.down.prevent=\"$emit('focus-emoji-selector')\"\n @keydown.enter=\"$emit('select-first-emoji')\"\n >\n <template #leftIcon>\n <dt-icon
|
|
1
|
+
{"version":3,"file":"emoji_search.vue.js","sources":["../../../../components/emoji_picker/modules/emoji_search.vue"],"sourcesContent":["<template>\n <div class=\"d-emoji-picker__search d-emoji-picker__alignment\">\n <dt-input\n id=\"searchInput\"\n ref=\"searchInput\"\n :placeholder=\"searchPlaceholderLabel\"\n :model-value=\"modelValue\"\n @update:model-value=\"$emit('update:modelValue', $event)\"\n @keydown.up=\"$emit('focus-tabset')\"\n @keydown.down.prevent=\"$emit('focus-emoji-selector')\"\n @keydown.enter=\"$emit('select-first-emoji')\"\n >\n <template #leftIcon>\n <dt-icon\n name=\"search\"\n size=\"200\"\n />\n </template>\n <template\n v-if=\"modelValue.length > 0\"\n #rightIcon\n >\n <dt-button\n importance=\"clear\"\n size=\"xs\"\n class=\"d-mrn4\"\n circle\n kind=\"muted\"\n @click=\"clearSearch\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n </dt-input>\n </div>\n</template>\n\n<script setup>\nimport { DtInput } from '@/components/input';\nimport { DtIcon } from '@/components/icon';\nimport { DtButton } from '@/components/button';\nimport { onMounted, ref } from 'vue';\n\ndefineProps({\n searchPlaceholderLabel: {\n type: String,\n required: true,\n },\n modelValue: {\n type: String,\n default: '',\n },\n});\n\nconst emits = defineEmits(['update:modelValue', 'focus-emoji-selector', 'focus-tabset', 'select-first-emoji']);\n\nconst searchInput = ref(null);\n\nfunction clearSearch () {\n emits('update:modelValue', '');\n focusSearchInput();\n}\n\nfunction focusSearchInput () {\n searchInput.value.focus();\n}\nonMounted(() => {\n focusSearchInput();\n});\n\ndefineExpose({\n focusSearchInput,\n});\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AA2DA,UAAM,QAAQ;AAEd,UAAM,cAAc,IAAI,IAAI;AAE5B,aAAS,cAAe;AACtB,YAAM,qBAAqB,EAAE;AAC7B;IACF;AAEA,aAAS,mBAAoB;AAC3B,kBAAY,MAAM;IACpB;AACA,cAAU,MAAM;AACd;IACF,CAAC;AAED,aAAa;AAAA,MACX;AAAA,IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -127,6 +127,7 @@ const _sfc_main = {
|
|
|
127
127
|
return (_ctx, _cache) => {
|
|
128
128
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
129
129
|
vue.createVNode(vue.unref(tab_group), {
|
|
130
|
+
size: "sm",
|
|
130
131
|
"tab-list-class": "d-emoji-picker__tabset-list",
|
|
131
132
|
selected: selectedTab.value
|
|
132
133
|
}, {
|