@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.
Files changed (209) hide show
  1. package/dist/css/dialtone-default-theme.css +518 -369
  2. package/dist/css/dialtone-default-theme.min.css +1 -1
  3. package/dist/css/dialtone.css +430 -361
  4. package/dist/css/dialtone.min.css +1 -1
  5. package/dist/css/tokens/tokens-base-dark.css +1 -0
  6. package/dist/css/tokens/tokens-base-light.css +1 -0
  7. package/dist/css/tokens/tokens-dp-dark.css +87 -8
  8. package/dist/css/tokens/tokens-dp-light.css +87 -8
  9. package/dist/css/tokens/tokens-expressive-dark.css +41 -7
  10. package/dist/css/tokens/tokens-expressive-light.css +41 -7
  11. package/dist/css/tokens/tokens-expressive-sm-dark.css +41 -7
  12. package/dist/css/tokens/tokens-expressive-sm-light.css +41 -7
  13. package/dist/css/tokens/tokens-tmo-dark.css +42 -8
  14. package/dist/css/tokens/tokens-tmo-light.css +42 -8
  15. package/dist/tokens/css/tokens-base-dark.css +1 -0
  16. package/dist/tokens/css/tokens-base-light.css +1 -0
  17. package/dist/tokens/css/tokens-dp-dark.css +87 -8
  18. package/dist/tokens/css/tokens-dp-light.css +87 -8
  19. package/dist/tokens/css/tokens-expressive-dark.css +41 -7
  20. package/dist/tokens/css/tokens-expressive-light.css +41 -7
  21. package/dist/tokens/css/tokens-expressive-sm-dark.css +41 -7
  22. package/dist/tokens/css/tokens-expressive-sm-light.css +41 -7
  23. package/dist/tokens/css/tokens-tmo-dark.css +42 -8
  24. package/dist/tokens/css/tokens-tmo-light.css +42 -8
  25. package/dist/tokens/doc.json +28982 -19944
  26. package/dist/tokens/less/tokens-base-dark.less +1 -0
  27. package/dist/tokens/less/tokens-base-light.less +1 -0
  28. package/dist/tokens/less/tokens-dp-dark.less +75 -6
  29. package/dist/tokens/less/tokens-dp-light.less +75 -6
  30. package/dist/tokens/less/tokens-expressive-dark.less +34 -5
  31. package/dist/tokens/less/tokens-expressive-light.less +34 -5
  32. package/dist/tokens/less/tokens-expressive-sm-dark.less +34 -5
  33. package/dist/tokens/less/tokens-expressive-sm-light.less +34 -5
  34. package/dist/tokens/less/tokens-tmo-dark.less +35 -6
  35. package/dist/tokens/less/tokens-tmo-light.less +35 -6
  36. package/dist/tokens/themes/chunks/tokens-base-dark-BEsKKfTV.js +4 -0
  37. package/dist/tokens/themes/chunks/tokens-base-dark-Bxzti7ig.js +1 -0
  38. package/dist/tokens/themes/chunks/tokens-base-light-DV0xl0Dv.js +1 -0
  39. package/dist/tokens/themes/chunks/tokens-base-light-jdZ77WhZ.js +4 -0
  40. package/dist/tokens/themes/dp-dark.cjs +1 -1
  41. package/dist/tokens/themes/dp-dark.js +5 -5
  42. package/dist/tokens/themes/dp-light.cjs +1 -1
  43. package/dist/tokens/themes/dp-light.js +5 -5
  44. package/dist/tokens/themes/expressive-dark.cjs +1 -1
  45. package/dist/tokens/themes/expressive-dark.js +2 -2
  46. package/dist/tokens/themes/expressive-light.cjs +1 -1
  47. package/dist/tokens/themes/expressive-light.js +4 -4
  48. package/dist/tokens/themes/expressive-sm-dark.cjs +1 -1
  49. package/dist/tokens/themes/expressive-sm-dark.js +2 -2
  50. package/dist/tokens/themes/expressive-sm-light.cjs +1 -1
  51. package/dist/tokens/themes/expressive-sm-light.js +4 -4
  52. package/dist/tokens/themes/tmo-dark.cjs +1 -1
  53. package/dist/tokens/themes/tmo-dark.js +4 -4
  54. package/dist/tokens/themes/tmo-light.cjs +1 -1
  55. package/dist/tokens/themes/tmo-light.js +4 -4
  56. package/dist/tokens/tokens-base-dark.json +1 -0
  57. package/dist/tokens/tokens-base-light.json +1 -0
  58. package/dist/tokens/tokens-dp-dark.json +70 -1
  59. package/dist/tokens/tokens-dp-light.json +70 -1
  60. package/dist/tokens/tokens-expressive-dark.json +30 -1
  61. package/dist/tokens/tokens-expressive-light.json +30 -1
  62. package/dist/tokens/tokens-expressive-sm-dark.json +30 -1
  63. package/dist/tokens/tokens-expressive-sm-light.json +30 -1
  64. package/dist/tokens/tokens-tmo-dark.json +30 -1
  65. package/dist/tokens/tokens-tmo-light.json +30 -1
  66. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs +3 -3
  67. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
  68. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js +3 -3
  69. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
  70. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs +1 -1
  71. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
  72. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js +1 -1
  73. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
  74. package/dist/vue3/common/sr_only_close_button.vue.cjs +4 -4
  75. package/dist/vue3/common/sr_only_close_button.vue.cjs.map +1 -1
  76. package/dist/vue3/common/sr_only_close_button.vue.js +4 -4
  77. package/dist/vue3/common/sr_only_close_button.vue.js.map +1 -1
  78. package/dist/vue3/common/storybook_utils.cjs +8 -0
  79. package/dist/vue3/common/storybook_utils.cjs.map +1 -0
  80. package/dist/vue3/common/storybook_utils.js +8 -0
  81. package/dist/vue3/common/storybook_utils.js.map +1 -0
  82. package/dist/vue3/component-documentation.json +1 -1
  83. package/dist/vue3/components/avatar/avatar.vue.cjs +41 -30
  84. package/dist/vue3/components/avatar/avatar.vue.cjs.map +1 -1
  85. package/dist/vue3/components/avatar/avatar.vue.js +43 -32
  86. package/dist/vue3/components/avatar/avatar.vue.js.map +1 -1
  87. package/dist/vue3/components/chip/chip.vue.cjs +7 -4
  88. package/dist/vue3/components/chip/chip.vue.cjs.map +1 -1
  89. package/dist/vue3/components/chip/chip.vue.js +7 -4
  90. package/dist/vue3/components/chip/chip.vue.js.map +1 -1
  91. package/dist/vue3/components/collapsible/collapsible.vue.cjs +6 -12
  92. package/dist/vue3/components/collapsible/collapsible.vue.cjs.map +1 -1
  93. package/dist/vue3/components/collapsible/collapsible.vue.js +6 -12
  94. package/dist/vue3/components/collapsible/collapsible.vue.js.map +1 -1
  95. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs +17 -5
  96. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs.map +1 -1
  97. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js +17 -5
  98. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
  99. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs +12 -3
  100. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
  101. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js +12 -3
  102. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
  103. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs +1 -0
  104. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
  105. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js +1 -0
  106. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
  107. package/dist/vue3/components/image_viewer/image_viewer.vue.cjs +5 -4
  108. package/dist/vue3/components/image_viewer/image_viewer.vue.cjs.map +1 -1
  109. package/dist/vue3/components/image_viewer/image_viewer.vue.js +5 -4
  110. package/dist/vue3/components/image_viewer/image_viewer.vue.js.map +1 -1
  111. package/dist/vue3/components/list_item/list_item.vue.cjs +5 -4
  112. package/dist/vue3/components/list_item/list_item.vue.cjs.map +1 -1
  113. package/dist/vue3/components/list_item/list_item.vue.js +5 -4
  114. package/dist/vue3/components/list_item/list_item.vue.js.map +1 -1
  115. package/dist/vue3/components/modal/modal.vue.cjs +7 -4
  116. package/dist/vue3/components/modal/modal.vue.cjs.map +1 -1
  117. package/dist/vue3/components/modal/modal.vue.js +7 -4
  118. package/dist/vue3/components/modal/modal.vue.js.map +1 -1
  119. package/dist/vue3/components/notice/notice_action.vue.cjs +7 -4
  120. package/dist/vue3/components/notice/notice_action.vue.cjs.map +1 -1
  121. package/dist/vue3/components/notice/notice_action.vue.js +7 -4
  122. package/dist/vue3/components/notice/notice_action.vue.js.map +1 -1
  123. package/dist/vue3/components/pagination/pagination.vue.cjs +15 -10
  124. package/dist/vue3/components/pagination/pagination.vue.cjs.map +1 -1
  125. package/dist/vue3/components/pagination/pagination.vue.js +15 -10
  126. package/dist/vue3/components/pagination/pagination.vue.js.map +1 -1
  127. package/dist/vue3/components/popover/popover_header_footer.vue.cjs +7 -4
  128. package/dist/vue3/components/popover/popover_header_footer.vue.cjs.map +1 -1
  129. package/dist/vue3/components/popover/popover_header_footer.vue.js +7 -4
  130. package/dist/vue3/components/popover/popover_header_footer.vue.js.map +1 -1
  131. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +5 -4
  132. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
  133. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +5 -4
  134. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
  135. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +11 -7
  136. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
  137. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +11 -7
  138. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
  139. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +7 -4
  140. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
  141. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +7 -4
  142. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
  143. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +7 -14
  144. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
  145. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +8 -15
  146. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
  147. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs +6 -4
  148. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs.map +1 -1
  149. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js +6 -4
  150. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js.map +1 -1
  151. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +12 -6
  152. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
  153. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js +12 -6
  154. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
  155. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs +7 -27
  156. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
  157. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js +8 -28
  158. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
  159. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs +4 -13
  160. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
  161. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js +5 -14
  162. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
  163. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs +7 -13
  164. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs.map +1 -1
  165. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js +8 -14
  166. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js.map +1 -1
  167. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs +13 -9
  168. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
  169. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js +13 -9
  170. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
  171. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +5 -4
  172. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
  173. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +5 -4
  174. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
  175. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs +7 -4
  176. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
  177. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js +7 -4
  178. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
  179. package/dist/vue3/style.css +111 -111
  180. package/dist/vue3/types/common/storybook_utils.d.ts +25 -0
  181. package/dist/vue3/types/common/storybook_utils.d.ts.map +1 -0
  182. package/dist/vue3/types/components/avatar/avatar.vue.d.ts +34 -6
  183. package/dist/vue3/types/components/avatar/avatar.vue.d.ts.map +1 -1
  184. package/dist/vue3/types/components/chip/chip.vue.d.ts +1 -1
  185. package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts +1 -1
  186. package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
  187. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  188. package/dist/vue3/types/components/list_item/list_item.vue.d.ts +8 -2
  189. package/dist/vue3/types/components/list_item/list_item.vue.d.ts.map +1 -1
  190. package/dist/vue3/types/components/notice/notice_action.vue.d.ts +4 -5
  191. package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
  192. package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
  193. package/dist/vue3/types/components/split_button/split_button-omega.vue.d.ts +1 -1
  194. package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
  195. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
  196. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  197. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -0
  198. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  199. package/dist/vue3/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +3 -3
  200. package/dist/vue3/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
  201. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -0
  202. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  203. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
  204. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  205. package/package.json +4 -4
  206. package/dist/tokens/themes/chunks/tokens-base-dark-C_VClg5s.js +0 -4
  207. package/dist/tokens/themes/chunks/tokens-base-dark-CsflOADh.js +0 -1
  208. package/dist/tokens/themes/chunks/tokens-base-light-9TN2mC0P.js +0 -4
  209. package/dist/tokens/themes/chunks/tokens-base-light-Bg9yNmR_.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"popover_header_footer.vue.js","sources":["../../../components/popover/popover_header_footer.vue"],"sourcesContent":["<template>\n <div\n data-qa=\"dt-popover-header-footer\"\n :class=\"{\n 'd-popover__header': type === 'header',\n 'd-popover__footer': type === 'footer',\n }\"\n >\n <div\n v-if=\"hasSlotContent($slots.content)\"\n data-qa=\"dt-popover-header-footer-content\"\n :class=\"[{\n 'd-popover__header__content': type === 'header',\n 'd-popover__footer__content': type === 'footer',\n }, contentClass]\"\n >\n <!-- @slot Slot for main content -->\n <slot name=\"content\" />\n </div>\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"popover__close-button\"\n data-qa=\"dt-popover-close\"\n :class=\"{\n 'd-popover__header__close-button': type === 'header',\n 'd-popover__footer__close-button': type === 'footer',\n }\"\n importance=\"outlined\"\n kind=\"muted\"\n circle\n v-bind=\"closeButtonProps\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon-close\n size=\"300\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue3';\nimport { hasSlotContent } from '@/common/utils';\n\nexport default {\n name: 'PopoverHeaderFooter',\n components: {\n DtButton,\n DtIconClose,\n },\n\n props: {\n // eslint-disable-next-line vue/require-default-prop\n type: {\n type: String,\n validator: function (value) {\n return ['header', 'footer'].includes(value);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * A set of props to be passed into the popover's header close button.\n * Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: () => {},\n },\n },\n\n emits: [\n /**\n * Emitted when popover is closed\n *\n * @event close\n * @type { Boolean }\n */\n 'close',\n ],\n\n data () {\n return {\n hasSlotContent,\n };\n },\n\n methods: {\n focusCloseButton () {\n const closeButton = this.$refs['popover__close-button']?.$el;\n closeButton?.focus();\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_normalizeClass","_renderSlot","_openBlock","_createBlock","_mergeProps","_createVNode"],"mappings":";;;;;AA+CA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,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,WAAQ;AAAA,MACP,OAAK;AAAA,2CAA+C,OAAI,SAAA;AAAA,2CAA0D,OAAI,SAAA;AAAA;MAIvH,YAAW;AAAA,MACX,MAAK;AAAA,MACL,QAAA;AAAA,OACQ,OAAgB,kBAAA;AAAA,MACvB,+CAAO,KAAK,MAAA,OAAA;AAAA;MAEF,cACT,MAEE;AAAA,QAFFC,YAEE,0BAAA,EADA,MAAK,MAAK,CAAA;AAAA;;;;;;"}
1
+ {"version":3,"file":"popover_header_footer.vue.js","sources":["../../../components/popover/popover_header_footer.vue"],"sourcesContent":["<template>\n <div\n data-qa=\"dt-popover-header-footer\"\n :class=\"{\n 'd-popover__header': type === 'header',\n 'd-popover__footer': type === 'footer',\n }\"\n >\n <div\n v-if=\"hasSlotContent($slots.content)\"\n data-qa=\"dt-popover-header-footer-content\"\n :class=\"[{\n 'd-popover__header__content': type === 'header',\n 'd-popover__footer__content': type === 'footer',\n }, contentClass]\"\n >\n <!-- @slot Slot for main content -->\n <slot name=\"content\" />\n </div>\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"popover__close-button\"\n data-qa=\"dt-popover-close\"\n :class=\"{\n 'd-popover__header__close-button': type === 'header',\n 'd-popover__footer__close-button': type === 'footer',\n }\"\n importance=\"outlined\"\n kind=\"muted\"\n circle\n v-bind=\"closeButtonProps\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n size=\"300\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\nimport { hasSlotContent } from '@/common/utils';\n\nexport default {\n name: 'PopoverHeaderFooter',\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n // eslint-disable-next-line vue/require-default-prop\n type: {\n type: String,\n validator: function (value) {\n return ['header', 'footer'].includes(value);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * A set of props to be passed into the popover's header close button.\n * Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: () => {},\n },\n },\n\n emits: [\n /**\n * Emitted when popover is closed\n *\n * @event close\n * @type { Boolean }\n */\n 'close',\n ],\n\n data () {\n return {\n hasSlotContent,\n };\n },\n\n methods: {\n focusCloseButton () {\n const closeButton = this.$refs['popover__close-button']?.$el;\n closeButton?.focus();\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_normalizeClass","_renderSlot","_openBlock","_createBlock","_mergeProps","_createVNode"],"mappings":";;;;;AAgDA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA,IAEL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,WAAW,SAAU,OAAO;AAC1B,eAAO,CAAC,UAAU,QAAQ,EAAE,SAAS,KAAK;AAAA,MAC3C;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,SAAS,MAAM;AAAA,MAAE;AAAA,IAClB;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA,EACD;AAAA,EAED,OAAQ;AACN,WAAO;AAAA,MACL;AAAA;EAEH;AAAA,EAED,SAAS;AAAA,IACP,mBAAoB;;AAClB,YAAM,eAAc,UAAK,MAAM,uBAAuB,MAAlC,mBAAqC;AACzD,iDAAa;AAAA,IACd;AAAA,EACF;AACH;;;;sBAhHEA,mBAuCM,OAAA;AAAA,IAtCJ,WAAQ;AAAA,IACP,OAAKC,eAAA;AAAA,2BAA+B,OAAI,SAAA;AAAA,2BAA0C,OAAI,SAAA;AAAA;;IAM/E,MAAc,eAAC,KAAM,OAAC,OAAO,kBADrCD,mBAUM,OAAA;AAAA;MARJ,WAAQ;AAAA,MACP,OAAKC,eAAA,CAAA;AAAA,sCAA2C,OAAI,SAAA;AAAA,sCAAqD,OAAI,SAAA;AAAA,SAAwB,OAAY,YAAA,CAAA;AAAA;MAMlJC,WAAuB,KAAA,QAAA,SAAA;AAAA;IAGjB,OAAe,mBADvBC,aAAAC,YAoBY,sBApBZC,WAoBY;AAAA;MAlBV,KAAI;AAAA,MACJ,WAAQ;AAAA,MACP,OAAK;AAAA,2CAA+C,OAAI,SAAA;AAAA,2CAA0D,OAAI,SAAA;AAAA;MAIvH,YAAW;AAAA,MACX,MAAK;AAAA,MACL,QAAA;AAAA,OACQ,OAAgB,kBAAA;AAAA,MACvB,+CAAO,KAAK,MAAA,OAAA;AAAA;MAEF,cACT,MAGE;AAAA,QAHFC,YAGE,oBAAA;AAAA,UAFA,MAAK;AAAA,UACL,MAAK;AAAA;;;;;;;"}
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- const vue3 = require("@dialpad/dialtone-icons/vue3");
3
2
  const common_utils = require("../../../common/utils.cjs");
4
3
  const vue = require("vue");
5
4
  ;/* empty css */
@@ -7,10 +6,11 @@ const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-he
7
6
  const callbar_button = require("../callbar_button/callbar_button.vue.cjs");
8
7
  const popover = require("../../../components/popover/popover.vue.cjs");
9
8
  const button = require("../../../components/button/button.vue.cjs");
9
+ const icon = require("../../../components/icon/icon.vue.cjs");
10
10
  const callbar_button_constants = require("../callbar_button/callbar_button_constants.cjs");
11
11
  const _sfc_main = {
12
12
  name: "DtRecipeCallbarButtonWithPopover",
13
- components: { DtRecipeCallbarButton: callbar_button, DtPopover: popover, DtButton: button, DtIconChevronUp: vue3.DtIconChevronUp },
13
+ components: { DtRecipeCallbarButton: callbar_button, DtPopover: popover, DtButton: button, DtIcon: icon },
14
14
  /* inheritAttrs: false is generally an option we want to set on library
15
15
  components. This allows any attributes passed in that are not recognized
16
16
  as props to be passed down to another element or component using v-bind:$attrs
@@ -243,7 +243,7 @@ const _sfc_main = {
243
243
  const _hoisted_1 = { class: "dt-recipe--callbar-button-with-popover" };
244
244
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
245
245
  const _component_dt_recipe_callbar_button = vue.resolveComponent("dt-recipe-callbar-button");
246
- const _component_dt_icon_chevron_up = vue.resolveComponent("dt-icon-chevron-up");
246
+ const _component_dt_icon = vue.resolveComponent("dt-icon");
247
247
  const _component_dt_button = vue.resolveComponent("dt-button");
248
248
  const _component_dt_popover = vue.resolveComponent("dt-popover");
249
249
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
@@ -301,7 +301,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
301
301
  onClick: $options.arrowClick
302
302
  }, {
303
303
  icon: vue.withCtx(() => [
304
- vue.createVNode(_component_dt_icon_chevron_up, {
304
+ vue.createVNode(_component_dt_icon, {
305
+ name: "chevron-up",
305
306
  class: "dt-recipe--callbar-button-with-popover--arrow__icon",
306
307
  size: "200"
307
308
  })
@@ -1 +1 @@
1
- {"version":3,"file":"callbar_button_with_popover.vue.cjs","sources":["../../../../recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-popover\"\n >\n <dt-recipe-callbar-button\n :aria-label=\"ariaLabel\"\n :disabled=\"disabled\"\n :active=\"active\"\n :danger=\"danger\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :text-class=\"textClass\"\n class=\"dt-recipe--callbar-button-with-popover--main-button\"\n @click=\"buttonClick\"\n >\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n <slot />\n </dt-recipe-callbar-button>\n <dt-popover\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :open=\"open\"\n :placement=\"placement\"\n :initial-focus-element=\"initialFocusElement\"\n :show-close-button=\"showCloseButton\"\n :offset=\"offset\"\n padding=\"none\"\n class=\"dt-recipe--callbar-button-with-popover--popover-wrapper\"\n :dialog-class=\"['dt-recipe--callbar-button-with-popover--popover', contentClass]\"\n header-class=\"d-d-flex d-ai-center d-fw-normal d-px12\"\n v-bind=\"$attrs\"\n :open-popover=\"showPopover\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n circle\n importance=\"clear\"\n size=\"lg\"\n :class=\"['dt-recipe--callbar-button-with-popover--arrow',\n { 'dt-recipe--callbar-button-with-popover--arrow--large': !isCompactMode }]\"\n width=\"2rem\"\n :aria-label=\"arrowButtonLabel\"\n :active=\"open\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon-chevron-up\n class=\"dt-recipe--callbar-button-with-popover--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n <template #headerContent>\n <slot name=\"headerContent\" />\n </template>\n <template #footerContent>\n <slot name=\"footerContent\" />\n </template>\n </dt-popover>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtPopover } from '@/components/popover';\nimport { DtIconChevronUp } from '@dialpad/dialtone-icons/vue3';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithPopover',\n\n components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIconChevronUp },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Aria label for the arrow. Cannot be empty.\n */\n arrowButtonLabel: {\n type: String,\n required: true,\n validator: (label) => {\n return !!label;\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * @values 'bottom', 'bottom-start', 'bottom-end',\n * 'right', 'right-start', 'right-end',\n * 'left', 'left-start', 'left-end',\n * 'top', 'top-start', 'top-end'\n * @default 'top'\n */\n placement: {\n type: String,\n default: 'top',\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 16],\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: String,\n default: 'first',\n },\n\n /**\n * Determines visibility for close button\n */\n showCloseButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Forces showing the arrow, even if the button is disabled.\n * default is false\n * @values true, false\n */\n forceShowArrow: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * We need this declaration because of how Vue3 informs the component about a listener.\n * Spoiler alert: it doesn't.\n * Vue3 intends to work as a real pub-sub, meaning the publisher has not a clue of who the subscribers are.\n * This makes it impossible from the regular declaration (emits: ['click']) to check whether\n * we actually have a click handler or not.\n * We're hacking it by adding an onClick prop: https://github.com/vuejs/core/issues/5220\n */\n /* eslint-disable-next-line vue/no-unused-properties */\n onClick: {\n type: Function,\n default: null,\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Additional class name for the popover content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * To auto open the modal popover.\n */\n openPopover: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal popover is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showPopover () {\n if (!this.openPopover || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openPopover;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the popover\n // the same as if the arrow was clicked.\n if (!this.$props.onClick) {\n this.arrowClick(ev);\n } else {\n this.$emit('click', ev);\n }\n },\n\n onModalIsOpened (isOpened) {\n this.open = isOpened;\n this.$emit('opened', isOpened);\n },\n },\n\n};\n</script>\n\n<style lang=\"less\">\n.dt-recipe--callbar-button-with-popover--arrow {\n margin-top: var(--dt-space-350-negative);\n margin-left: calc(var(--dt-space-300-negative) * 5);\n width: var(--dt-size-500);\n height: var(--dt-size-500);\n padding: var(--dt-space-400);\n border-radius: var(--dt-size-300);\n\n &.d-btn--active {\n background: var(--dt-color-surface-moderate-opaque);\n }\n\n &--large {\n margin-left: var(--dt-space-550-negative);\n }\n\n &__icon {\n color: var(--dt-color-black-800);\n }\n}\n\n.dt-recipe--callbar-button-with-popover--popover {\n .d-popover__header {\n background: var(--dt-color-surface-contrast);\n color: var(--dt-color-foreground-primary-inverted);\n\n .d-btn {\n color: var(--dt-color-foreground-primary-inverted);\n }\n }\n}\n\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected::after,\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected:hover::after {\n --tab--bgc: var(--dt-color-surface-contrast);\n}\n.dt-recipe--callbar-button-with-popover--button .tab-group {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.dt-recipe--callbar-button-with-popover--button .tab-content {\n flex: 1 1 100%;\n overflow-y: auto;\n}\n\n.dt-recipe--callbar-button-with-popover {\n display: flex;\n align-items: center;\n}\n</style>\n"],"names":["DtRecipeCallbarButton","DtPopover","DtButton","DtIconChevronUp","utils","this","CALLBAR_BUTTON_VALID_WIDTH_SIZE","_openBlock","_createElementBlock","_createVNode","_renderSlot","_createBlock","_mergeProps","_normalizeClass"],"mappings":";;;;;;;;;;AAgFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAA,uBAAEA,gBAAqB,WAAEC,SAAWC,UAAAA,QAAUC,iBAAAA,KAAAA,gBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA,EAM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;AAAA,MACR,OAAM;AAAA,MACL,oEAAkE,OAAY,YAAA;AAAA,MAC/E,gBAAa;AAAA,OACL,KAAM,QAAA;AAAA,MACb,gBAAc,SAAW;AAAA,MACzB,UAAQ,SAAe;AAAA;MAEb,oBACT,MAiBY;AAAA,QAjBZH,IAAAA,YAiBY,sBAAA;AAAA,UAhBV,QAAA;AAAA,UACA,YAAW;AAAA,UACX,MAAK;AAAA,UACJ,OAAKI,IAAA,eAAA;AAAA,YAAA;AAAA,uEAAkI,SAAa,cAAA;AAAA,UAAA,CAAA;AAAA,UAErJ,OAAM;AAAA,UACL,cAAY,OAAgB;AAAA,UAC5B,QAAQ,MAAI;AAAA,UACZ,SAAO,SAAU;AAAA;UAEP,kBACT,MAGE;AAAA,YAHFJ,IAAAA,YAGE,+BAAA;AAAA,cAFA,OAAM;AAAA,cACN,MAAK;AAAA;;;;;MAKF,qBACT,MAAuB;AAAA,QAAvBC,eAAuB,KAAA,QAAA,SAAA;AAAA;MAEd,2BACT,MAA6B;AAAA,QAA7BA,eAA6B,KAAA,QAAA,eAAA;AAAA;MAEpB,2BACT,MAA6B;AAAA,QAA7BA,eAA6B,KAAA,QAAA,eAAA;AAAA;;;;;;;"}
1
+ {"version":3,"file":"callbar_button_with_popover.vue.cjs","sources":["../../../../recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-popover\"\n >\n <dt-recipe-callbar-button\n :aria-label=\"ariaLabel\"\n :disabled=\"disabled\"\n :active=\"active\"\n :danger=\"danger\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :text-class=\"textClass\"\n class=\"dt-recipe--callbar-button-with-popover--main-button\"\n @click=\"buttonClick\"\n >\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n <slot />\n </dt-recipe-callbar-button>\n <dt-popover\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :open=\"open\"\n :placement=\"placement\"\n :initial-focus-element=\"initialFocusElement\"\n :show-close-button=\"showCloseButton\"\n :offset=\"offset\"\n padding=\"none\"\n class=\"dt-recipe--callbar-button-with-popover--popover-wrapper\"\n :dialog-class=\"['dt-recipe--callbar-button-with-popover--popover', contentClass]\"\n header-class=\"d-d-flex d-ai-center d-fw-normal d-px12\"\n v-bind=\"$attrs\"\n :open-popover=\"showPopover\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n circle\n importance=\"clear\"\n size=\"lg\"\n :class=\"['dt-recipe--callbar-button-with-popover--arrow',\n { 'dt-recipe--callbar-button-with-popover--arrow--large': !isCompactMode }]\"\n width=\"2rem\"\n :aria-label=\"arrowButtonLabel\"\n :active=\"open\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon\n name=\"chevron-up\"\n class=\"dt-recipe--callbar-button-with-popover--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n <template #headerContent>\n <slot name=\"headerContent\" />\n </template>\n <template #footerContent>\n <slot name=\"footerContent\" />\n </template>\n </dt-popover>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtPopover } from '@/components/popover';\nimport { DtIcon } from '@/components/icon';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithPopover',\n\n components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIcon },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Aria label for the arrow. Cannot be empty.\n */\n arrowButtonLabel: {\n type: String,\n required: true,\n validator: (label) => {\n return !!label;\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * @values 'bottom', 'bottom-start', 'bottom-end',\n * 'right', 'right-start', 'right-end',\n * 'left', 'left-start', 'left-end',\n * 'top', 'top-start', 'top-end'\n * @default 'top'\n */\n placement: {\n type: String,\n default: 'top',\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 16],\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: String,\n default: 'first',\n },\n\n /**\n * Determines visibility for close button\n */\n showCloseButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Forces showing the arrow, even if the button is disabled.\n * default is false\n * @values true, false\n */\n forceShowArrow: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * We need this declaration because of how Vue3 informs the component about a listener.\n * Spoiler alert: it doesn't.\n * Vue3 intends to work as a real pub-sub, meaning the publisher has not a clue of who the subscribers are.\n * This makes it impossible from the regular declaration (emits: ['click']) to check whether\n * we actually have a click handler or not.\n * We're hacking it by adding an onClick prop: https://github.com/vuejs/core/issues/5220\n */\n /* eslint-disable-next-line vue/no-unused-properties */\n onClick: {\n type: Function,\n default: null,\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Additional class name for the popover content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * To auto open the modal popover.\n */\n openPopover: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal popover is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showPopover () {\n if (!this.openPopover || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openPopover;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the popover\n // the same as if the arrow was clicked.\n if (!this.$props.onClick) {\n this.arrowClick(ev);\n } else {\n this.$emit('click', ev);\n }\n },\n\n onModalIsOpened (isOpened) {\n this.open = isOpened;\n this.$emit('opened', isOpened);\n },\n },\n\n};\n</script>\n\n<style lang=\"less\">\n.dt-recipe--callbar-button-with-popover--arrow {\n margin-top: var(--dt-space-350-negative);\n margin-left: calc(var(--dt-space-300-negative) * 5);\n width: var(--dt-size-500);\n height: var(--dt-size-500);\n padding: var(--dt-space-400);\n border-radius: var(--dt-size-300);\n\n &.d-btn--active {\n background: var(--dt-color-surface-moderate-opaque);\n }\n\n &--large {\n margin-left: var(--dt-space-550-negative);\n }\n\n &__icon {\n color: var(--dt-color-black-800);\n }\n}\n\n.dt-recipe--callbar-button-with-popover--popover {\n .d-popover__header {\n background: var(--dt-color-surface-contrast);\n color: var(--dt-color-foreground-primary-inverted);\n\n .d-btn {\n color: var(--dt-color-foreground-primary-inverted);\n }\n }\n}\n\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected::after,\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected:hover::after {\n --tab--bgc: var(--dt-color-surface-contrast);\n}\n.dt-recipe--callbar-button-with-popover--button .tab-group {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.dt-recipe--callbar-button-with-popover--button .tab-content {\n flex: 1 1 100%;\n overflow-y: auto;\n}\n\n.dt-recipe--callbar-button-with-popover {\n display: flex;\n align-items: center;\n}\n</style>\n"],"names":["DtRecipeCallbarButton","DtPopover","DtButton","DtIcon","utils","this","CALLBAR_BUTTON_VALID_WIDTH_SIZE","_openBlock","_createElementBlock","_createVNode","_renderSlot","_createBlock","_mergeProps","_normalizeClass"],"mappings":";;;;;;;;;;AAiFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAA,uBAAEA,gBAAqB,WAAEC,SAAWC,UAAAA,QAAUC,QAAAA,KAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAMlE,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAOC,aAAAA,QAAM;MACd;AA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UAAQ,SAAe;AAAA;MAEb,oBACT,MAkBY;AAAA,QAlBZH,IAAAA,YAkBY,sBAAA;AAAA,UAjBV,QAAA;AAAA,UACA,YAAW;AAAA,UACX,MAAK;AAAA,UACJ,OAAKI,IAAA,eAAA;AAAA,YAAA;AAAA,uEAAkI,SAAa,cAAA;AAAA,UAAA,CAAA;AAAA,UAErJ,OAAM;AAAA,UACL,cAAY,OAAgB;AAAA,UAC5B,QAAQ,MAAI;AAAA,UACZ,SAAO,SAAU;AAAA;UAEP,kBACT,MAIE;AAAA,YAJFJ,IAAAA,YAIE,oBAAA;AAAA,cAHA,MAAK;AAAA,cACL,OAAM;AAAA,cACN,MAAK;AAAA;;;;;MAKF,qBACT,MAAuB;AAAA,QAAvBC,eAAuB,KAAA,QAAA,SAAA;AAAA;MAEd,2BACT,MAA6B;AAAA,QAA7BA,eAA6B,KAAA,QAAA,eAAA;AAAA;MAEpB,2BACT,MAA6B;AAAA,QAA7BA,eAA6B,KAAA,QAAA,eAAA;AAAA;;;;;;;"}
@@ -1,4 +1,3 @@
1
- import { DtIconChevronUp } from "@dialpad/dialtone-icons/vue3";
2
1
  import utils from "../../../common/utils.js";
3
2
  import { resolveComponent, openBlock, createElementBlock, createVNode, withCtx, renderSlot, createBlock, mergeProps, normalizeClass, createCommentVNode } from "vue";
4
3
  /* empty css */
@@ -6,10 +5,11 @@ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
6
5
  import DtRecipeCallbarButton from "../callbar_button/callbar_button.vue.js";
7
6
  import DtPopover from "../../../components/popover/popover.vue.js";
8
7
  import DtButton from "../../../components/button/button.vue.js";
8
+ import DtIcon from "../../../components/icon/icon.vue.js";
9
9
  import { CALLBAR_BUTTON_VALID_WIDTH_SIZE } from "../callbar_button/callbar_button_constants.js";
10
10
  const _sfc_main = {
11
11
  name: "DtRecipeCallbarButtonWithPopover",
12
- components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIconChevronUp },
12
+ components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIcon },
13
13
  /* inheritAttrs: false is generally an option we want to set on library
14
14
  components. This allows any attributes passed in that are not recognized
15
15
  as props to be passed down to another element or component using v-bind:$attrs
@@ -242,7 +242,7 @@ const _sfc_main = {
242
242
  const _hoisted_1 = { class: "dt-recipe--callbar-button-with-popover" };
243
243
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
244
244
  const _component_dt_recipe_callbar_button = resolveComponent("dt-recipe-callbar-button");
245
- const _component_dt_icon_chevron_up = resolveComponent("dt-icon-chevron-up");
245
+ const _component_dt_icon = resolveComponent("dt-icon");
246
246
  const _component_dt_button = resolveComponent("dt-button");
247
247
  const _component_dt_popover = resolveComponent("dt-popover");
248
248
  return openBlock(), createElementBlock("div", _hoisted_1, [
@@ -300,7 +300,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
300
300
  onClick: $options.arrowClick
301
301
  }, {
302
302
  icon: withCtx(() => [
303
- createVNode(_component_dt_icon_chevron_up, {
303
+ createVNode(_component_dt_icon, {
304
+ name: "chevron-up",
304
305
  class: "dt-recipe--callbar-button-with-popover--arrow__icon",
305
306
  size: "200"
306
307
  })
@@ -1 +1 @@
1
- {"version":3,"file":"callbar_button_with_popover.vue.js","sources":["../../../../recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-popover\"\n >\n <dt-recipe-callbar-button\n :aria-label=\"ariaLabel\"\n :disabled=\"disabled\"\n :active=\"active\"\n :danger=\"danger\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :text-class=\"textClass\"\n class=\"dt-recipe--callbar-button-with-popover--main-button\"\n @click=\"buttonClick\"\n >\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n <slot />\n </dt-recipe-callbar-button>\n <dt-popover\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :open=\"open\"\n :placement=\"placement\"\n :initial-focus-element=\"initialFocusElement\"\n :show-close-button=\"showCloseButton\"\n :offset=\"offset\"\n padding=\"none\"\n class=\"dt-recipe--callbar-button-with-popover--popover-wrapper\"\n :dialog-class=\"['dt-recipe--callbar-button-with-popover--popover', contentClass]\"\n header-class=\"d-d-flex d-ai-center d-fw-normal d-px12\"\n v-bind=\"$attrs\"\n :open-popover=\"showPopover\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n circle\n importance=\"clear\"\n size=\"lg\"\n :class=\"['dt-recipe--callbar-button-with-popover--arrow',\n { 'dt-recipe--callbar-button-with-popover--arrow--large': !isCompactMode }]\"\n width=\"2rem\"\n :aria-label=\"arrowButtonLabel\"\n :active=\"open\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon-chevron-up\n class=\"dt-recipe--callbar-button-with-popover--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n <template #headerContent>\n <slot name=\"headerContent\" />\n </template>\n <template #footerContent>\n <slot name=\"footerContent\" />\n </template>\n </dt-popover>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtPopover } from '@/components/popover';\nimport { DtIconChevronUp } from '@dialpad/dialtone-icons/vue3';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithPopover',\n\n components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIconChevronUp },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Aria label for the arrow. Cannot be empty.\n */\n arrowButtonLabel: {\n type: String,\n required: true,\n validator: (label) => {\n return !!label;\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * @values 'bottom', 'bottom-start', 'bottom-end',\n * 'right', 'right-start', 'right-end',\n * 'left', 'left-start', 'left-end',\n * 'top', 'top-start', 'top-end'\n * @default 'top'\n */\n placement: {\n type: String,\n default: 'top',\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 16],\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: String,\n default: 'first',\n },\n\n /**\n * Determines visibility for close button\n */\n showCloseButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Forces showing the arrow, even if the button is disabled.\n * default is false\n * @values true, false\n */\n forceShowArrow: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * We need this declaration because of how Vue3 informs the component about a listener.\n * Spoiler alert: it doesn't.\n * Vue3 intends to work as a real pub-sub, meaning the publisher has not a clue of who the subscribers are.\n * This makes it impossible from the regular declaration (emits: ['click']) to check whether\n * we actually have a click handler or not.\n * We're hacking it by adding an onClick prop: https://github.com/vuejs/core/issues/5220\n */\n /* eslint-disable-next-line vue/no-unused-properties */\n onClick: {\n type: Function,\n default: null,\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Additional class name for the popover content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * To auto open the modal popover.\n */\n openPopover: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal popover is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showPopover () {\n if (!this.openPopover || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openPopover;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the popover\n // the same as if the arrow was clicked.\n if (!this.$props.onClick) {\n this.arrowClick(ev);\n } else {\n this.$emit('click', ev);\n }\n },\n\n onModalIsOpened (isOpened) {\n this.open = isOpened;\n this.$emit('opened', isOpened);\n },\n },\n\n};\n</script>\n\n<style lang=\"less\">\n.dt-recipe--callbar-button-with-popover--arrow {\n margin-top: var(--dt-space-350-negative);\n margin-left: calc(var(--dt-space-300-negative) * 5);\n width: var(--dt-size-500);\n height: var(--dt-size-500);\n padding: var(--dt-space-400);\n border-radius: var(--dt-size-300);\n\n &.d-btn--active {\n background: var(--dt-color-surface-moderate-opaque);\n }\n\n &--large {\n margin-left: var(--dt-space-550-negative);\n }\n\n &__icon {\n color: var(--dt-color-black-800);\n }\n}\n\n.dt-recipe--callbar-button-with-popover--popover {\n .d-popover__header {\n background: var(--dt-color-surface-contrast);\n color: var(--dt-color-foreground-primary-inverted);\n\n .d-btn {\n color: var(--dt-color-foreground-primary-inverted);\n }\n }\n}\n\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected::after,\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected:hover::after {\n --tab--bgc: var(--dt-color-surface-contrast);\n}\n.dt-recipe--callbar-button-with-popover--button .tab-group {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.dt-recipe--callbar-button-with-popover--button .tab-content {\n flex: 1 1 100%;\n overflow-y: auto;\n}\n\n.dt-recipe--callbar-button-with-popover {\n display: flex;\n align-items: center;\n}\n</style>\n"],"names":["this","_openBlock","_createElementBlock","_createVNode","_renderSlot","_createBlock","_mergeProps","_normalizeClass"],"mappings":";;;;;;;;;AAgFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAE,uBAAuB,WAAW,UAAU,gBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3E,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAO,MAAM;MACd;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,UAAU;AACpB,eAAO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AA;AAAA,YAAA;AAAA,uEAAkI,SAAa,cAAA;AAAA,UAAA,CAAA;AAAA,UAErJ,OAAM;AAAA,UACL,cAAY,OAAgB;AAAA,UAC5B,QAAQ,MAAI;AAAA,UACZ,SAAO,SAAU;AAAA;UAEP,cACT,MAGE;AAAA,YAHFJ,YAGE,+BAAA;AAAA,cAFA,OAAM;AAAA,cACN,MAAK;AAAA;;;;;MAKF,iBACT,MAAuB;AAAA,QAAvBC,WAAuB,KAAA,QAAA,SAAA;AAAA;MAEd,uBACT,MAA6B;AAAA,QAA7BA,WAA6B,KAAA,QAAA,eAAA;AAAA;MAEpB,uBACT,MAA6B;AAAA,QAA7BA,WAA6B,KAAA,QAAA,eAAA;AAAA;;;;;;"}
1
+ {"version":3,"file":"callbar_button_with_popover.vue.js","sources":["../../../../recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-popover\"\n >\n <dt-recipe-callbar-button\n :aria-label=\"ariaLabel\"\n :disabled=\"disabled\"\n :active=\"active\"\n :danger=\"danger\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :text-class=\"textClass\"\n class=\"dt-recipe--callbar-button-with-popover--main-button\"\n @click=\"buttonClick\"\n >\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n <slot />\n </dt-recipe-callbar-button>\n <dt-popover\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :open=\"open\"\n :placement=\"placement\"\n :initial-focus-element=\"initialFocusElement\"\n :show-close-button=\"showCloseButton\"\n :offset=\"offset\"\n padding=\"none\"\n class=\"dt-recipe--callbar-button-with-popover--popover-wrapper\"\n :dialog-class=\"['dt-recipe--callbar-button-with-popover--popover', contentClass]\"\n header-class=\"d-d-flex d-ai-center d-fw-normal d-px12\"\n v-bind=\"$attrs\"\n :open-popover=\"showPopover\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n circle\n importance=\"clear\"\n size=\"lg\"\n :class=\"['dt-recipe--callbar-button-with-popover--arrow',\n { 'dt-recipe--callbar-button-with-popover--arrow--large': !isCompactMode }]\"\n width=\"2rem\"\n :aria-label=\"arrowButtonLabel\"\n :active=\"open\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon\n name=\"chevron-up\"\n class=\"dt-recipe--callbar-button-with-popover--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n <template #headerContent>\n <slot name=\"headerContent\" />\n </template>\n <template #footerContent>\n <slot name=\"footerContent\" />\n </template>\n </dt-popover>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtPopover } from '@/components/popover';\nimport { DtIcon } from '@/components/icon';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithPopover',\n\n components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIcon },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Aria label for the arrow. Cannot be empty.\n */\n arrowButtonLabel: {\n type: String,\n required: true,\n validator: (label) => {\n return !!label;\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * @values 'bottom', 'bottom-start', 'bottom-end',\n * 'right', 'right-start', 'right-end',\n * 'left', 'left-start', 'left-end',\n * 'top', 'top-start', 'top-end'\n * @default 'top'\n */\n placement: {\n type: String,\n default: 'top',\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 16],\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: String,\n default: 'first',\n },\n\n /**\n * Determines visibility for close button\n */\n showCloseButton: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Forces showing the arrow, even if the button is disabled.\n * default is false\n * @values true, false\n */\n forceShowArrow: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * We need this declaration because of how Vue3 informs the component about a listener.\n * Spoiler alert: it doesn't.\n * Vue3 intends to work as a real pub-sub, meaning the publisher has not a clue of who the subscribers are.\n * This makes it impossible from the regular declaration (emits: ['click']) to check whether\n * we actually have a click handler or not.\n * We're hacking it by adding an onClick prop: https://github.com/vuejs/core/issues/5220\n */\n /* eslint-disable-next-line vue/no-unused-properties */\n onClick: {\n type: Function,\n default: null,\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Additional class name for the popover content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * To auto open the modal popover.\n */\n openPopover: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal popover is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showPopover () {\n if (!this.openPopover || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openPopover;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the popover\n // the same as if the arrow was clicked.\n if (!this.$props.onClick) {\n this.arrowClick(ev);\n } else {\n this.$emit('click', ev);\n }\n },\n\n onModalIsOpened (isOpened) {\n this.open = isOpened;\n this.$emit('opened', isOpened);\n },\n },\n\n};\n</script>\n\n<style lang=\"less\">\n.dt-recipe--callbar-button-with-popover--arrow {\n margin-top: var(--dt-space-350-negative);\n margin-left: calc(var(--dt-space-300-negative) * 5);\n width: var(--dt-size-500);\n height: var(--dt-size-500);\n padding: var(--dt-space-400);\n border-radius: var(--dt-size-300);\n\n &.d-btn--active {\n background: var(--dt-color-surface-moderate-opaque);\n }\n\n &--large {\n margin-left: var(--dt-space-550-negative);\n }\n\n &__icon {\n color: var(--dt-color-black-800);\n }\n}\n\n.dt-recipe--callbar-button-with-popover--popover {\n .d-popover__header {\n background: var(--dt-color-surface-contrast);\n color: var(--dt-color-foreground-primary-inverted);\n\n .d-btn {\n color: var(--dt-color-foreground-primary-inverted);\n }\n }\n}\n\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected::after,\n.dt-recipe--callbar-button-with-popover--button .d-tab--selected:hover::after {\n --tab--bgc: var(--dt-color-surface-contrast);\n}\n.dt-recipe--callbar-button-with-popover--button .tab-group {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.dt-recipe--callbar-button-with-popover--button .tab-content {\n flex: 1 1 100%;\n overflow-y: auto;\n}\n\n.dt-recipe--callbar-button-with-popover {\n display: flex;\n align-items: center;\n}\n</style>\n"],"names":["this","_openBlock","_createElementBlock","_createVNode","_renderSlot","_createBlock","_mergeProps","_normalizeClass"],"mappings":";;;;;;;;;AAiFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAE,uBAAuB,WAAW,UAAU,OAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAMlE,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAO,MAAM;MACd;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,UAAU;AACpB,eAAO,SAASA,SAAK,OAAO;AAAA,MAC7B;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,WAAW,CAAC,UAAU;AACpB,eAAO,CAAC,CAAC;AAAA,MACV;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AA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QAAvBC,WAAuB,KAAA,QAAA,SAAA;AAAA;MAEd,uBACT,MAA6B;AAAA,QAA7BA,WAA6B,KAAA,QAAA,eAAA;AAAA;MAEpB,uBACT,MAA6B;AAAA,QAA7BA,WAA6B,KAAA,QAAA,eAAA;AAAA;;;;;;"}
@@ -1,17 +1,16 @@
1
1
  "use strict";
2
- const vue3 = require("@dialpad/dialtone-icons/vue3");
3
2
  const image_carousel = require("./media_components/image_carousel.vue.cjs");
4
3
  const vue = require("vue");
5
4
  ;/* empty css */
6
5
  const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.cjs");
7
6
  const button = require("../../../components/button/button.vue.cjs");
7
+ const icon = require("../../../components/icon/icon.vue.cjs");
8
8
  const MEDIA_ITEM_WIDTH = 64;
9
9
  const _sfc_main = {
10
10
  name: "DtRecipeAttachmentCarousel",
11
11
  components: {
12
12
  DtButton: button,
13
- DtIconArrowRight: vue3.DtIconArrowRight,
14
- DtIconArrowLeft: vue3.DtIconArrowLeft,
13
+ DtIcon: icon,
15
14
  DtImageCarousel: image_carousel
16
15
  },
17
16
  mixins: [],
@@ -124,9 +123,8 @@ const _hoisted_1 = {
124
123
  role: "presentation"
125
124
  };
126
125
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
127
- const _component_dt_icon_arrow_left = vue.resolveComponent("dt-icon-arrow-left");
126
+ const _component_dt_icon = vue.resolveComponent("dt-icon");
128
127
  const _component_dt_button = vue.resolveComponent("dt-button");
129
- const _component_dt_icon_arrow_right = vue.resolveComponent("dt-icon-arrow-right");
130
128
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
131
129
  $props.mediaList.length > 0 ? (vue.openBlock(), vue.createElementBlock("ul", {
132
130
  key: 0,
@@ -157,7 +155,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
157
155
  onClick: $options.leftScroll
158
156
  }, {
159
157
  icon: vue.withCtx(() => [
160
- vue.createVNode(_component_dt_icon_arrow_left, { size: "100" })
158
+ vue.createVNode(_component_dt_icon, {
159
+ name: "arrow-left",
160
+ size: "100"
161
+ })
161
162
  ]),
162
163
  _: 1
163
164
  }, 8, ["aria-label", "onClick"]), [
@@ -173,7 +174,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
173
174
  onClick: $options.rightScroll
174
175
  }, {
175
176
  icon: vue.withCtx(() => [
176
- vue.createVNode(_component_dt_icon_arrow_right, { size: "100" })
177
+ vue.createVNode(_component_dt_icon, {
178
+ name: "arrow-right",
179
+ size: "100"
180
+ })
177
181
  ]),
178
182
  _: 1
179
183
  }, 8, ["aria-label", "onClick"]), [
@@ -1 +1 @@
1
- {"version":3,"file":"attachment_carousel.vue.cjs","sources":["../../../../recipes/conversation_view/attachment_carousel/attachment_carousel.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-attachment-carousel\"\n role=\"presentation\"\n >\n <ul\n v-if=\"mediaList.length > 0\"\n ref=\"carousel\"\n class=\"dt-attachment-carousel__media-list\"\n @scroll=\"handleScroll\"\n >\n <!-- media list -->\n <component\n :is=\"mediaComponent(mediaItem.type)\"\n v-for=\"(mediaItem, index) in filteredMediaList\"\n :key=\"`media-${index}`\"\n :index=\"index\"\n :media-item=\"mediaItem\"\n :close-aria-label=\"closeAriaLabel\"\n :click-to-open-aria-label=\"clickToOpenAriaLabel\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n @remove-media=\"removeMediaItem(index)\"\n @focusin=\"onItemFocus\"\n />\n </ul>\n\n <!-- Carousel Arrows -->\n <dt-button\n v-show=\"showLeftArrow\"\n tabindex=\"-1\"\n :aria-label=\"leftArrowAriaLabel\"\n class=\"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--left\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"leftScroll\"\n >\n <template #icon>\n <dt-icon-arrow-left\n size=\"100\"\n />\n </template>\n </dt-button>\n <dt-button\n v-show=\"showRightArrow\"\n tabindex=\"-1\"\n :aria-label=\"rightArrowAriaLabel\"\n class=\"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--right\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"rightScroll\"\n >\n <template #icon>\n <dt-icon-arrow-right\n size=\"100\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtIconArrowRight, DtIconArrowLeft } from '@dialpad/dialtone-icons/vue3';\nimport { DtButton } from '@/components/button';\n\nimport DtImageCarousel from './media_components/image_carousel.vue';\n\nconst MEDIA_ITEM_WIDTH = 64;\n\nexport default {\n name: 'DtRecipeAttachmentCarousel',\n\n components: {\n DtButton,\n DtIconArrowRight,\n DtIconArrowLeft,\n DtImageCarousel,\n },\n\n mixins: [],\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n // inheritAttrs: false,\n\n props: {\n /**\n * media - object array of media objects\n * @type {Array}\n *\n * Object: {\n * path: String,\n * altText: String | null,\n * }\n */\n mediaList: {\n type: Array,\n default: () => [],\n },\n\n closeAriaLabel: {\n type: String,\n required: true,\n },\n\n clickToOpenAriaLabel: {\n type: String,\n required: true,\n },\n\n progressbarAriaLabel: {\n type: String,\n required: true,\n },\n\n leftArrowAriaLabel: {\n type: String,\n required: true,\n },\n\n rightArrowAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n data () {\n return {\n showCloseButton: {},\n showRightArrow: true,\n showLeftArrow: false,\n isMounted: false,\n };\n },\n\n computed: {\n filteredMediaList () {\n return this.mediaList.filter((mediaItem) => mediaItem.type === 'image' || mediaItem.type === 'video');\n },\n },\n\n mounted: function () {\n this.showLeftArrow = this.$refs.carousel.scrollLeft > 0;\n this.showRightArrow = this.$refs.carousel.scrollWidth > this.$refs.carousel.clientWidth;\n },\n\n methods: {\n onItemFocus (e) {\n e.currentTarget.scrollIntoView({ behavior: 'smooth' });\n },\n\n mediaComponent (type) {\n switch (type) {\n case 'image':\n return 'dt-image-carousel';\n default:\n // unknown media type\n return null;\n }\n },\n\n removeMediaItem (index) {\n // make sure the carousel arrows is updated. 64 is the width of each media item\n this.showRightArrow = this.$refs.carousel.scrollWidth > (this.$refs.carousel.clientWidth + MEDIA_ITEM_WIDTH);\n this.$emit('remove-media', index);\n },\n\n closeButton (val, index) {\n this.showCloseButton[index] = val;\n },\n\n handleScroll () {\n const carousel = this.$refs.carousel;\n this.showLeftArrow = carousel.scrollLeft > 0;\n this.showRightArrow = !((carousel.scrollLeft + carousel.clientWidth) === carousel.scrollWidth);\n },\n\n leftScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft - 100,\n behavior: 'smooth',\n });\n },\n\n rightScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft + 100,\n behavior: 'smooth',\n });\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-attachment-carousel {\n position: relative;\n max-height: 100px;\n width: var(--dt-space-1000);\n}\n\n.dt-attachment-carousel__media-list {\n display: flex;\n flex-direction: row;\n padding-left: 0px;\n overflow-x: scroll;\n &::-webkit-scrollbar {\n display: none;\n }\n}\n\n.dt-attachment-carousel__arrow {\n position: absolute;\n opacity: 0;\n\n .dt-attachment-carousel:hover & {\n opacity: 1;\n }\n background-color: var(--dt-color-neutral-white);\n top: var(--dt-space-30-percent);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-100);\n border-color: var(--bc-default);\n}\n.dt-attachment-carousel__arrow--left {\n left: var(--dt-space-300);\n}\n.dt-attachment-carousel__arrow--right {\n right: var(--dt-space-300);\n}\n\n.dt-attachment-carousel__image-viewer {\n height: var(--dt-size-700);\n width: var(--dt-size-700);\n border-radius: var(--br4);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-350);\n border-color: var(--dt-color-border-subtle);\n}\n</style>\n"],"names":["DtButton","DtIconArrowRight","DtIconArrowLeft","DtImageCarousel","_openBlock","_createElementBlock","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","_createVNode"],"mappings":";;;;;;;AAoEA,MAAM,mBAAmB;AAEzB,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,UAAAA;AAAAA,IACA,kBAAAC,KAAgB;AAAA,IAChB,iBAAAC,KAAe;AAAA,IACf,iBAAAC;AAAAA,EACD;AAAA,EAED,QAAQ,CAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQV,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,IAClB;AAAA,IAED,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,qBAAqB;AAAA,MACnB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA,EACD;AAAA,EAED,OAAQ;AACN,WAAO;AAAA,MACL,iBAAiB,CAAE;AAAA,MACnB,gBAAgB;AAAA,MAChB,eAAe;AAAA,MACf,WAAW;AAAA;EAEd;AAAA,EAED,UAAU;AAAA,IACR,oBAAqB;AACnB,aAAO,KAAK,UAAU,OAAO,CAAC,cAAc,UAAU,SAAS,WAAW,UAAU,SAAS,OAAO;AAAA,IACrG;AAAA,EACF;AAAA,EAED,SAAS,WAAY;AACnB,SAAK,gBAAgB,KAAK,MAAM,SAAS,aAA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IAAA,mBAWEC,cAT6B,MAAAC,IAAA,WAAA,SAAA,mBAArB,CAAA,WAAW,UAAK;AAF1B,eAAAH,IAAA,UAAA,GAAAI,IAAAA,YAWEC,IAVK,wBAAA,SAAA,eAAe,UAAU,IAAI,CAAA,GAAA;AAAA,UAEjC,cAAc,KAAK;AAAA,UACnB;AAAA,UACA,cAAY;AAAA,UACZ,oBAAkB,OAAc;AAAA,UAChC,4BAA0B,OAAoB;AAAA,UAC9C,0BAAwB,OAAoB;AAAA,UAC5C,eAAY,YAAE,SAAe,gBAAC,KAAK;AAAA,UACnC,WAAS,SAAW;AAAA;;;uBAKzBC,IAeY,YAAA,sBAAA;AAAA,MAbV,UAAS;AAAA,MACR,cAAY,OAAkB;AAAA,MAC/B,OAAM;AAAA,MACN,QAAA;AAAA,MACA,MAAK;AAAA,MACL,YAAW;AAAA,MACV,SAAO,SAAU;AAAA;MAEP,kBACT,MAEE;AAAA,QAFFA,IAAAA,YAEE,+BAAA,EADA,MAAK,MAAK,CAAA;AAAA;;;kBAXN,MAAa,aAAA;AAAA;uBAevBA,IAeY,YAAA,sBAAA;AAAA,MAbV,UAAS;AAAA,MACR,cAAY,OAAmB;AAAA,MAChC,OAAM;AAAA,MACN,QAAA;AAAA,MACA,MAAK;AAAA,MACL,YAAW;AAAA,MACV,SAAO,SAAW;AAAA;MAER,kBACT,MAEE;AAAA,QAFFA,IAAAA,YAEE,gCAAA,EADA,MAAK,MAAK,CAAA;AAAA;;;kBAXN,MAAc,cAAA;AAAA;;;;;"}
1
+ {"version":3,"file":"attachment_carousel.vue.cjs","sources":["../../../../recipes/conversation_view/attachment_carousel/attachment_carousel.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-attachment-carousel\"\n role=\"presentation\"\n >\n <ul\n v-if=\"mediaList.length > 0\"\n ref=\"carousel\"\n class=\"dt-attachment-carousel__media-list\"\n @scroll=\"handleScroll\"\n >\n <!-- media list -->\n <component\n :is=\"mediaComponent(mediaItem.type)\"\n v-for=\"(mediaItem, index) in filteredMediaList\"\n :key=\"`media-${index}`\"\n :index=\"index\"\n :media-item=\"mediaItem\"\n :close-aria-label=\"closeAriaLabel\"\n :click-to-open-aria-label=\"clickToOpenAriaLabel\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n @remove-media=\"removeMediaItem(index)\"\n @focusin=\"onItemFocus\"\n />\n </ul>\n\n <!-- Carousel Arrows -->\n <dt-button\n v-show=\"showLeftArrow\"\n tabindex=\"-1\"\n :aria-label=\"leftArrowAriaLabel\"\n class=\"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--left\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"leftScroll\"\n >\n <template #icon>\n <dt-icon\n name=\"arrow-left\"\n size=\"100\"\n />\n </template>\n </dt-button>\n <dt-button\n v-show=\"showRightArrow\"\n tabindex=\"-1\"\n :aria-label=\"rightArrowAriaLabel\"\n class=\"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--right\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"rightScroll\"\n >\n <template #icon>\n <dt-icon\n name=\"arrow-right\"\n size=\"100\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtIcon } from '@/components/icon';\nimport { DtButton } from '@/components/button';\n\nimport DtImageCarousel from './media_components/image_carousel.vue';\n\nconst MEDIA_ITEM_WIDTH = 64;\n\nexport default {\n name: 'DtRecipeAttachmentCarousel',\n\n components: {\n DtButton,\n DtIcon,\n DtImageCarousel,\n },\n\n mixins: [],\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n // inheritAttrs: false,\n\n props: {\n /**\n * media - object array of media objects\n * @type {Array}\n *\n * Object: {\n * path: String,\n * altText: String | null,\n * }\n */\n mediaList: {\n type: Array,\n default: () => [],\n },\n\n closeAriaLabel: {\n type: String,\n required: true,\n },\n\n clickToOpenAriaLabel: {\n type: String,\n required: true,\n },\n\n progressbarAriaLabel: {\n type: String,\n required: true,\n },\n\n leftArrowAriaLabel: {\n type: String,\n required: true,\n },\n\n rightArrowAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n data () {\n return {\n showCloseButton: {},\n showRightArrow: true,\n showLeftArrow: false,\n isMounted: false,\n };\n },\n\n computed: {\n filteredMediaList () {\n return this.mediaList.filter((mediaItem) => mediaItem.type === 'image' || mediaItem.type === 'video');\n },\n },\n\n mounted: function () {\n this.showLeftArrow = this.$refs.carousel.scrollLeft > 0;\n this.showRightArrow = this.$refs.carousel.scrollWidth > this.$refs.carousel.clientWidth;\n },\n\n methods: {\n onItemFocus (e) {\n e.currentTarget.scrollIntoView({ behavior: 'smooth' });\n },\n\n mediaComponent (type) {\n switch (type) {\n case 'image':\n return 'dt-image-carousel';\n default:\n // unknown media type\n return null;\n }\n },\n\n removeMediaItem (index) {\n // make sure the carousel arrows is updated. 64 is the width of each media item\n this.showRightArrow = this.$refs.carousel.scrollWidth > (this.$refs.carousel.clientWidth + MEDIA_ITEM_WIDTH);\n this.$emit('remove-media', index);\n },\n\n closeButton (val, index) {\n this.showCloseButton[index] = val;\n },\n\n handleScroll () {\n const carousel = this.$refs.carousel;\n this.showLeftArrow = carousel.scrollLeft > 0;\n this.showRightArrow = !((carousel.scrollLeft + carousel.clientWidth) === carousel.scrollWidth);\n },\n\n leftScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft - 100,\n behavior: 'smooth',\n });\n },\n\n rightScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft + 100,\n behavior: 'smooth',\n });\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-attachment-carousel {\n position: relative;\n max-height: 100px;\n width: var(--dt-space-1000);\n}\n\n.dt-attachment-carousel__media-list {\n display: flex;\n flex-direction: row;\n padding-left: 0px;\n overflow-x: scroll;\n &::-webkit-scrollbar {\n display: none;\n }\n}\n\n.dt-attachment-carousel__arrow {\n position: absolute;\n opacity: 0;\n\n .dt-attachment-carousel:hover & {\n opacity: 1;\n }\n background-color: var(--dt-color-neutral-white);\n top: var(--dt-space-30-percent);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-100);\n border-color: var(--bc-default);\n}\n.dt-attachment-carousel__arrow--left {\n left: var(--dt-space-300);\n}\n.dt-attachment-carousel__arrow--right {\n right: var(--dt-space-300);\n}\n\n.dt-attachment-carousel__image-viewer {\n height: var(--dt-size-700);\n width: var(--dt-size-700);\n border-radius: var(--br4);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-350);\n border-color: var(--dt-color-border-subtle);\n}\n</style>\n"],"names":["DtButton","DtIcon","DtImageCarousel","_openBlock","_createElementBlock","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","_createVNode"],"mappings":";;;;;;;AAsEA,MAAM,mBAAmB;AAEzB,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,UAAAA;AAAAA,IACA,QAAAC;AAAAA,IACA,iBAAAC;AAAAA,EACD;AAAA,EAED,QAAQ,CAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQV,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,IAClB;AAAA,IAED,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,qBAAqB;AA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QAAA;AAAA,MACA,MAAK;AAAA,MACL,YAAW;AAAA,MACV,SAAO,SAAW;AAAA;MAER,kBACT,MAGE;AAAA,QAHFA,IAAAA,YAGE,oBAAA;AAAA,UAFA,MAAK;AAAA,UACL,MAAK;AAAA;;;;kBAZD,MAAc,cAAA;AAAA;;;;;"}
@@ -1,16 +1,15 @@
1
- import { DtIconArrowRight, DtIconArrowLeft } from "@dialpad/dialtone-icons/vue3";
2
1
  import DtImageCarousel from "./media_components/image_carousel.vue.js";
3
2
  import { resolveComponent, openBlock, createElementBlock, Fragment, renderList, createBlock, resolveDynamicComponent, createCommentVNode, withDirectives, createVNode, withCtx, vShow } from "vue";
4
3
  /* empty css */
5
4
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
6
5
  import DtButton from "../../../components/button/button.vue.js";
6
+ import DtIcon from "../../../components/icon/icon.vue.js";
7
7
  const MEDIA_ITEM_WIDTH = 64;
8
8
  const _sfc_main = {
9
9
  name: "DtRecipeAttachmentCarousel",
10
10
  components: {
11
11
  DtButton,
12
- DtIconArrowRight,
13
- DtIconArrowLeft,
12
+ DtIcon,
14
13
  DtImageCarousel
15
14
  },
16
15
  mixins: [],
@@ -123,9 +122,8 @@ const _hoisted_1 = {
123
122
  role: "presentation"
124
123
  };
125
124
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
126
- const _component_dt_icon_arrow_left = resolveComponent("dt-icon-arrow-left");
125
+ const _component_dt_icon = resolveComponent("dt-icon");
127
126
  const _component_dt_button = resolveComponent("dt-button");
128
- const _component_dt_icon_arrow_right = resolveComponent("dt-icon-arrow-right");
129
127
  return openBlock(), createElementBlock("div", _hoisted_1, [
130
128
  $props.mediaList.length > 0 ? (openBlock(), createElementBlock("ul", {
131
129
  key: 0,
@@ -156,7 +154,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
156
154
  onClick: $options.leftScroll
157
155
  }, {
158
156
  icon: withCtx(() => [
159
- createVNode(_component_dt_icon_arrow_left, { size: "100" })
157
+ createVNode(_component_dt_icon, {
158
+ name: "arrow-left",
159
+ size: "100"
160
+ })
160
161
  ]),
161
162
  _: 1
162
163
  }, 8, ["aria-label", "onClick"]), [
@@ -172,7 +173,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
172
173
  onClick: $options.rightScroll
173
174
  }, {
174
175
  icon: withCtx(() => [
175
- createVNode(_component_dt_icon_arrow_right, { size: "100" })
176
+ createVNode(_component_dt_icon, {
177
+ name: "arrow-right",
178
+ size: "100"
179
+ })
176
180
  ]),
177
181
  _: 1
178
182
  }, 8, ["aria-label", "onClick"]), [
@@ -1 +1 @@
1
- {"version":3,"file":"attachment_carousel.vue.js","sources":["../../../../recipes/conversation_view/attachment_carousel/attachment_carousel.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-attachment-carousel\"\n role=\"presentation\"\n >\n <ul\n v-if=\"mediaList.length > 0\"\n ref=\"carousel\"\n class=\"dt-attachment-carousel__media-list\"\n @scroll=\"handleScroll\"\n >\n <!-- media list -->\n <component\n :is=\"mediaComponent(mediaItem.type)\"\n v-for=\"(mediaItem, index) in filteredMediaList\"\n :key=\"`media-${index}`\"\n :index=\"index\"\n :media-item=\"mediaItem\"\n :close-aria-label=\"closeAriaLabel\"\n :click-to-open-aria-label=\"clickToOpenAriaLabel\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n @remove-media=\"removeMediaItem(index)\"\n @focusin=\"onItemFocus\"\n />\n </ul>\n\n <!-- Carousel Arrows -->\n <dt-button\n v-show=\"showLeftArrow\"\n tabindex=\"-1\"\n :aria-label=\"leftArrowAriaLabel\"\n class=\"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--left\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"leftScroll\"\n >\n <template #icon>\n <dt-icon-arrow-left\n size=\"100\"\n />\n </template>\n </dt-button>\n <dt-button\n v-show=\"showRightArrow\"\n tabindex=\"-1\"\n :aria-label=\"rightArrowAriaLabel\"\n class=\"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--right\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"rightScroll\"\n >\n <template #icon>\n <dt-icon-arrow-right\n size=\"100\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtIconArrowRight, DtIconArrowLeft } from '@dialpad/dialtone-icons/vue3';\nimport { DtButton } from '@/components/button';\n\nimport DtImageCarousel from './media_components/image_carousel.vue';\n\nconst MEDIA_ITEM_WIDTH = 64;\n\nexport default {\n name: 'DtRecipeAttachmentCarousel',\n\n components: {\n DtButton,\n DtIconArrowRight,\n DtIconArrowLeft,\n DtImageCarousel,\n },\n\n mixins: [],\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n // inheritAttrs: false,\n\n props: {\n /**\n * media - object array of media objects\n * @type {Array}\n *\n * Object: {\n * path: String,\n * altText: String | null,\n * }\n */\n mediaList: {\n type: Array,\n default: () => [],\n },\n\n closeAriaLabel: {\n type: String,\n required: true,\n },\n\n clickToOpenAriaLabel: {\n type: String,\n required: true,\n },\n\n progressbarAriaLabel: {\n type: String,\n required: true,\n },\n\n leftArrowAriaLabel: {\n type: String,\n required: true,\n },\n\n rightArrowAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n data () {\n return {\n showCloseButton: {},\n showRightArrow: true,\n showLeftArrow: false,\n isMounted: false,\n };\n },\n\n computed: {\n filteredMediaList () {\n return this.mediaList.filter((mediaItem) => mediaItem.type === 'image' || mediaItem.type === 'video');\n },\n },\n\n mounted: function () {\n this.showLeftArrow = this.$refs.carousel.scrollLeft > 0;\n this.showRightArrow = this.$refs.carousel.scrollWidth > this.$refs.carousel.clientWidth;\n },\n\n methods: {\n onItemFocus (e) {\n e.currentTarget.scrollIntoView({ behavior: 'smooth' });\n },\n\n mediaComponent (type) {\n switch (type) {\n case 'image':\n return 'dt-image-carousel';\n default:\n // unknown media type\n return null;\n }\n },\n\n removeMediaItem (index) {\n // make sure the carousel arrows is updated. 64 is the width of each media item\n this.showRightArrow = this.$refs.carousel.scrollWidth > (this.$refs.carousel.clientWidth + MEDIA_ITEM_WIDTH);\n this.$emit('remove-media', index);\n },\n\n closeButton (val, index) {\n this.showCloseButton[index] = val;\n },\n\n handleScroll () {\n const carousel = this.$refs.carousel;\n this.showLeftArrow = carousel.scrollLeft > 0;\n this.showRightArrow = !((carousel.scrollLeft + carousel.clientWidth) === carousel.scrollWidth);\n },\n\n leftScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft - 100,\n behavior: 'smooth',\n });\n },\n\n rightScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft + 100,\n behavior: 'smooth',\n });\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-attachment-carousel {\n position: relative;\n max-height: 100px;\n width: var(--dt-space-1000);\n}\n\n.dt-attachment-carousel__media-list {\n display: flex;\n flex-direction: row;\n padding-left: 0px;\n overflow-x: scroll;\n &::-webkit-scrollbar {\n display: none;\n }\n}\n\n.dt-attachment-carousel__arrow {\n position: absolute;\n opacity: 0;\n\n .dt-attachment-carousel:hover & {\n opacity: 1;\n }\n background-color: var(--dt-color-neutral-white);\n top: var(--dt-space-30-percent);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-100);\n border-color: var(--bc-default);\n}\n.dt-attachment-carousel__arrow--left {\n left: var(--dt-space-300);\n}\n.dt-attachment-carousel__arrow--right {\n right: var(--dt-space-300);\n}\n\n.dt-attachment-carousel__image-viewer {\n height: var(--dt-size-700);\n width: var(--dt-size-700);\n border-radius: var(--br4);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-350);\n border-color: var(--dt-color-border-subtle);\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","_createVNode"],"mappings":";;;;;;AAoEA,MAAM,mBAAmB;AAEzB,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,QAAQ,CAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQV,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,IAClB;AAAA,IAED,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,qBAAqB;AAAA,MACnB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA,EACD;AAAA,EAED,OAAQ;AACN,WAAO;AAAA,MACL,iBAAiB,CAAE;AAAA,MACnB,gBAAgB;AAAA,MAChB,eAAe;AAAA,MACf,WAAW;AAAA;EAEd;AAAA,EAED,UAAU;AAAA,IACR,oBAAqB;AACnB,aAAO,KAAK,UAAU,OAAO,CAAC,cAAc,UAAU,SAAS,WAAW,UAAU,SAAS,OAAO;AAAA,IACrG;AAAA,EACF;AAAA,EAED,SAAS,WAAY;AACnB,SAAK,gBAAgB,KAAK,MAAM,SAAS,aAAa;AACtD,SAAK,iBAAiB,KAAK,MAAM,SAAS,cAAc,KAAK,MAAM,SAAS;AAAA,EAC7E;AAAA,EAED,SAAS;AAA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e,UAAU,IAAI,CAAA,GAAA;AAAA,UAEjC,cAAc,KAAK;AAAA,UACnB;AAAA,UACA,cAAY;AAAA,UACZ,oBAAkB,OAAc;AAAA,UAChC,4BAA0B,OAAoB;AAAA,UAC9C,0BAAwB,OAAoB;AAAA,UAC5C,eAAY,YAAE,SAAe,gBAAC,KAAK;AAAA,UACnC,WAAS,SAAW;AAAA;;;mBAKzBC,YAeY,sBAAA;AAAA,MAbV,UAAS;AAAA,MACR,cAAY,OAAkB;AAAA,MAC/B,OAAM;AAAA,MACN,QAAA;AAAA,MACA,MAAK;AAAA,MACL,YAAW;AAAA,MACV,SAAO,SAAU;AAAA;MAEP,cACT,MAEE;AAAA,QAFFA,YAEE,+BAAA,EADA,MAAK,MAAK,CAAA;AAAA;;;cAXN,MAAa,aAAA;AAAA;mBAevBA,YAeY,sBAAA;AAAA,MAbV,UAAS;AAAA,MACR,cAAY,OAAmB;AAAA,MAChC,OAAM;AAAA,MACN,QAAA;AAAA,MACA,MAAK;AAAA,MACL,YAAW;AAAA,MACV,SAAO,SAAW;AAAA;MAER,cACT,MAEE;AAAA,QAFFA,YAEE,gCAAA,EADA,MAAK,MAAK,CAAA;AAAA;;;cAXN,MAAc,cAAA;AAAA;;;;"}
1
+ {"version":3,"file":"attachment_carousel.vue.js","sources":["../../../../recipes/conversation_view/attachment_carousel/attachment_carousel.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-attachment-carousel\"\n role=\"presentation\"\n >\n <ul\n v-if=\"mediaList.length > 0\"\n ref=\"carousel\"\n class=\"dt-attachment-carousel__media-list\"\n @scroll=\"handleScroll\"\n >\n <!-- media list -->\n <component\n :is=\"mediaComponent(mediaItem.type)\"\n v-for=\"(mediaItem, index) in filteredMediaList\"\n :key=\"`media-${index}`\"\n :index=\"index\"\n :media-item=\"mediaItem\"\n :close-aria-label=\"closeAriaLabel\"\n :click-to-open-aria-label=\"clickToOpenAriaLabel\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n @remove-media=\"removeMediaItem(index)\"\n @focusin=\"onItemFocus\"\n />\n </ul>\n\n <!-- Carousel Arrows -->\n <dt-button\n v-show=\"showLeftArrow\"\n tabindex=\"-1\"\n :aria-label=\"leftArrowAriaLabel\"\n class=\"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--left\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"leftScroll\"\n >\n <template #icon>\n <dt-icon\n name=\"arrow-left\"\n size=\"100\"\n />\n </template>\n </dt-button>\n <dt-button\n v-show=\"showRightArrow\"\n tabindex=\"-1\"\n :aria-label=\"rightArrowAriaLabel\"\n class=\"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--right\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"rightScroll\"\n >\n <template #icon>\n <dt-icon\n name=\"arrow-right\"\n size=\"100\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtIcon } from '@/components/icon';\nimport { DtButton } from '@/components/button';\n\nimport DtImageCarousel from './media_components/image_carousel.vue';\n\nconst MEDIA_ITEM_WIDTH = 64;\n\nexport default {\n name: 'DtRecipeAttachmentCarousel',\n\n components: {\n DtButton,\n DtIcon,\n DtImageCarousel,\n },\n\n mixins: [],\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n // inheritAttrs: false,\n\n props: {\n /**\n * media - object array of media objects\n * @type {Array}\n *\n * Object: {\n * path: String,\n * altText: String | null,\n * }\n */\n mediaList: {\n type: Array,\n default: () => [],\n },\n\n closeAriaLabel: {\n type: String,\n required: true,\n },\n\n clickToOpenAriaLabel: {\n type: String,\n required: true,\n },\n\n progressbarAriaLabel: {\n type: String,\n required: true,\n },\n\n leftArrowAriaLabel: {\n type: String,\n required: true,\n },\n\n rightArrowAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n data () {\n return {\n showCloseButton: {},\n showRightArrow: true,\n showLeftArrow: false,\n isMounted: false,\n };\n },\n\n computed: {\n filteredMediaList () {\n return this.mediaList.filter((mediaItem) => mediaItem.type === 'image' || mediaItem.type === 'video');\n },\n },\n\n mounted: function () {\n this.showLeftArrow = this.$refs.carousel.scrollLeft > 0;\n this.showRightArrow = this.$refs.carousel.scrollWidth > this.$refs.carousel.clientWidth;\n },\n\n methods: {\n onItemFocus (e) {\n e.currentTarget.scrollIntoView({ behavior: 'smooth' });\n },\n\n mediaComponent (type) {\n switch (type) {\n case 'image':\n return 'dt-image-carousel';\n default:\n // unknown media type\n return null;\n }\n },\n\n removeMediaItem (index) {\n // make sure the carousel arrows is updated. 64 is the width of each media item\n this.showRightArrow = this.$refs.carousel.scrollWidth > (this.$refs.carousel.clientWidth + MEDIA_ITEM_WIDTH);\n this.$emit('remove-media', index);\n },\n\n closeButton (val, index) {\n this.showCloseButton[index] = val;\n },\n\n handleScroll () {\n const carousel = this.$refs.carousel;\n this.showLeftArrow = carousel.scrollLeft > 0;\n this.showRightArrow = !((carousel.scrollLeft + carousel.clientWidth) === carousel.scrollWidth);\n },\n\n leftScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft - 100,\n behavior: 'smooth',\n });\n },\n\n rightScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft + 100,\n behavior: 'smooth',\n });\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-attachment-carousel {\n position: relative;\n max-height: 100px;\n width: var(--dt-space-1000);\n}\n\n.dt-attachment-carousel__media-list {\n display: flex;\n flex-direction: row;\n padding-left: 0px;\n overflow-x: scroll;\n &::-webkit-scrollbar {\n display: none;\n }\n}\n\n.dt-attachment-carousel__arrow {\n position: absolute;\n opacity: 0;\n\n .dt-attachment-carousel:hover & {\n opacity: 1;\n }\n background-color: var(--dt-color-neutral-white);\n top: var(--dt-space-30-percent);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-100);\n border-color: var(--bc-default);\n}\n.dt-attachment-carousel__arrow--left {\n left: var(--dt-space-300);\n}\n.dt-attachment-carousel__arrow--right {\n right: var(--dt-space-300);\n}\n\n.dt-attachment-carousel__image-viewer {\n height: var(--dt-size-700);\n width: var(--dt-size-700);\n border-radius: var(--br4);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-350);\n border-color: var(--dt-color-border-subtle);\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","_createVNode"],"mappings":";;;;;;AAsEA,MAAM,mBAAmB;AAEzB,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,QAAQ,CAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQV,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,IAClB;AAAA,IAED,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,qBAAqB;AAAA,MACnB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA,EACD;AAAA,EAED,OAAQ;AACN,WAAO;AAAA,MACL,iBAAiB,CAAE;AAAA,MACnB,gBAAgB;AAAA,MAChB,eAAe;AAAA,M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const vue = require("vue");
5
4
  ;/* empty css */
6
5
  const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.cjs");
7
6
  const image_viewer = require("../../../../components/image_viewer/image_viewer.vue.cjs");
8
7
  const button = require("../../../../components/button/button.vue.cjs");
8
+ const icon = require("../../../../components/icon/icon.vue.cjs");
9
9
  const _sfc_main = {
10
10
  name: "DtImageCarousel",
11
11
  components: {
12
12
  DtImageViewer: image_viewer,
13
13
  DtButton: button,
14
- DtIconClose: vue3.DtIconClose,
14
+ DtIcon: icon,
15
15
  DtProgressBar: progress_bar
16
16
  },
17
17
  props: {
@@ -56,7 +56,7 @@ const _hoisted_2 = { class: "dt-attachment-image__top-right" };
56
56
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
57
57
  const _component_dt_image_viewer = vue.resolveComponent("dt-image-viewer");
58
58
  const _component_dt_progress_bar = vue.resolveComponent("dt-progress-bar");
59
- const _component_dt_icon_close = vue.resolveComponent("dt-icon-close");
59
+ const _component_dt_icon = vue.resolveComponent("dt-icon");
60
60
  const _component_dt_button = vue.resolveComponent("dt-button");
61
61
  return vue.openBlock(), vue.createElementBlock("li", _hoisted_1, [
62
62
  vue.createVNode(_component_dt_image_viewer, {
@@ -84,7 +84,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
84
84
  onClick: _cache[0] || (_cache[0] = ($event) => $options.removeMediaItem($props.index))
85
85
  }, {
86
86
  icon: vue.withCtx(() => [
87
- vue.createVNode(_component_dt_icon_close, { size: "200" })
87
+ vue.createVNode(_component_dt_icon, {
88
+ name: "close",
89
+ size: "200"
90
+ })
88
91
  ]),
89
92
  _: 1
90
93
  }, 8, ["id", "aria-label"])
@@ -1 +1 @@
1
- {"version":3,"file":"image_carousel.vue.cjs","sources":["../../../../../recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue"],"sourcesContent":["<template>\n <li\n class=\"dt-attachment-image\"\n >\n <dt-image-viewer\n image-button-class=\"dt-attachment-image__image-viewer\"\n :image-src=\"mediaItem.path\"\n :image-alt=\"mediaItem.altText\"\n :close-aria-label=\"closeAriaLabel\"\n :aria-label=\"clickToOpenAriaLabel\"\n />\n\n <!-- Loader / Close button -->\n <div\n class=\"dt-attachment-image__top-right\"\n >\n <dt-progress-bar\n v-if=\"mediaItem.isUploading\"\n class=\"dt-attachment-image__progress-bar\"\n :progress=\"mediaItem.progress\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n />\n <dt-button\n :id=\"`closeButton-${index}`\"\n tabindex=\"0\"\n class=\"dt-attachment-image__close-button\"\n circle\n size=\"xs\"\n importance=\"clear\"\n :aria-label=\"closeAriaLabel\"\n @click=\"removeMediaItem(index)\"\n >\n <template #icon>\n <dt-icon-close\n size=\"200\"\n />\n </template>\n </dt-button>\n </div>\n </li>\n</template>\n\n<script>\nimport { DtImageViewer } from '@/components/image_viewer';\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue3';\n\nimport DtProgressBar from './progress_bar.vue';\n\nexport default {\n name: 'DtImageCarousel',\n\n components: {\n DtImageViewer,\n DtButton,\n DtIconClose,\n DtProgressBar,\n },\n\n props: {\n mediaItem: {\n type: Object,\n required: true,\n },\n\n index: {\n type: Number,\n required: true,\n },\n\n closeAriaLabel: {\n type: String,\n required: true,\n },\n\n clickToOpenAriaLabel: {\n type: String,\n required: true,\n },\n\n progressbarAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when media close button is clicked to remove the image\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n methods: {\n removeMediaItem (index) {\n this.$emit('remove-media', index);\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-attachment-image {\n position: relative;\n\n &:focus-within .dt-attachment-image__close-button, &:hover .dt-attachment-image__close-button {\n opacity: 1;\n }\n}\n.dt-attachment-image__image-viewer {\n height: var(--dt-size-700);\n width: var(--dt-size-700);\n border: var(--dt-space-100) solid;\n border-radius: var(--br4);\n border-width: var(--dt-size-350);\n border-color: var(--dt-color-border-subtle);\n object-fit: cover;\n}\n.dt-attachment-image__top-right {\n position: absolute;\n top: var(--dt-size-100);\n right: var(--dt-size-100);\n}\n.dt-attachment-image__close-button {\n opacity: 0;\n position: absolute;\n top: inherit;\n right: inherit;\n color: var(--dt-color-neutral-white);\n background-color: var(--dt-color-black-400);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-200);\n border-color: var(--dt-color-neutral-white);\n}\n.dt-attachment-image__progress-bar {\n position: absolute;\n top: inherit;\n right: inherit;\n background-color: var(--dt-color-neutral-white);\n border-radius: 50%;\n display: flex;\n transform: rotate(-90deg);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-200);\n border-color: var(--dt-color-border-subtle);\n}\n</style>\n"],"names":["DtImageViewer","DtButton","DtIconClose","DtProgressBar","_openBlock","_createElementBlock","_createVNode","_createElementVNode","_createBlock"],"mappings":";;;;;;;;AAiDA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,mBACVA;AAAAA,IACA,UAAAC;AAAAA,iBACAC,KAAW;AAAA,mBACXC;AAAAA,EACD;AAAA,EAED,OAAO;AAAA,IACL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA,EACD;AAAA,EAED,SAAS;AAAA,IACP,gBAAiB,OAAO;AACtB,WAAK,MAAM,gBAAgB,KAAK;AAAA,IACjC;AAAA,EACF;AACH;AAnGI,MAAA,aAAA,EAAA,OAAM,sBAAqB;AAYzB,MAAA,aAAA,EAAA,OAAM,iCAAgC;;;;;;AAb1C,SAAAC,cAAA,GAAAC,uBAsCK,MAtCL,YAsCK;AAAA,IAnCHC,IAAAA,YAME,4BAAA;AAAA,MALA,sBAAmB;AAAA,MAClB,aAAW,OAAS,UAAC;AAAA,MACrB,aAAW,OAAS,UAAC;AAAA,MACrB,oBAAkB,OAAc;AAAA,MAChC,cAAY,OAAoB;AAAA;IAInCC,IAAA,mBAyBM,OAzBN,YAyBM;AAAA,MArBI,OAAA,UAAU,gCADlBC,IAKE,YAAA,4BAAA;AAAA;QAHA,OAAM;AAAA,QACL,UAAU,OAAS,UAAC;AAAA,QACpB,0BAAwB,OAAoB;AAAA;MAE/CF,IAAAA,YAeY,sBAAA;AAAA,QAdT,mBAAmB,OAAK,KAAA;AAAA,QACzB,UAAS;AAAA,QACT,OAAM;AAAA,QACN,QAAA;AAAA,QACA,MAAK;AAAA,QACL,YAAW;AAAA,QACV,cAAY,OAAc;AAAA,QAC1B,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,YAAE,SAAe,gBAAC,OAAK,KAAA;AAAA;QAElB,kBACT,MAEE;AAAA,UAFFA,IAAAA,YAEE,0BAAA,EADA,MAAK,MAAK,CAAA;AAAA;;;;;;;;"}
1
+ {"version":3,"file":"image_carousel.vue.cjs","sources":["../../../../../recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue"],"sourcesContent":["<template>\n <li\n class=\"dt-attachment-image\"\n >\n <dt-image-viewer\n image-button-class=\"dt-attachment-image__image-viewer\"\n :image-src=\"mediaItem.path\"\n :image-alt=\"mediaItem.altText\"\n :close-aria-label=\"closeAriaLabel\"\n :aria-label=\"clickToOpenAriaLabel\"\n />\n\n <!-- Loader / Close button -->\n <div\n class=\"dt-attachment-image__top-right\"\n >\n <dt-progress-bar\n v-if=\"mediaItem.isUploading\"\n class=\"dt-attachment-image__progress-bar\"\n :progress=\"mediaItem.progress\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n />\n <dt-button\n :id=\"`closeButton-${index}`\"\n tabindex=\"0\"\n class=\"dt-attachment-image__close-button\"\n circle\n size=\"xs\"\n importance=\"clear\"\n :aria-label=\"closeAriaLabel\"\n @click=\"removeMediaItem(index)\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </div>\n </li>\n</template>\n\n<script>\nimport { DtImageViewer } from '@/components/image_viewer';\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\n\nimport DtProgressBar from './progress_bar.vue';\n\nexport default {\n name: 'DtImageCarousel',\n\n components: {\n DtImageViewer,\n DtButton,\n DtIcon,\n DtProgressBar,\n },\n\n props: {\n mediaItem: {\n type: Object,\n required: true,\n },\n\n index: {\n type: Number,\n required: true,\n },\n\n closeAriaLabel: {\n type: String,\n required: true,\n },\n\n clickToOpenAriaLabel: {\n type: String,\n required: true,\n },\n\n progressbarAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when media close button is clicked to remove the image\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n methods: {\n removeMediaItem (index) {\n this.$emit('remove-media', index);\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-attachment-image {\n position: relative;\n\n &:focus-within .dt-attachment-image__close-button, &:hover .dt-attachment-image__close-button {\n opacity: 1;\n }\n}\n.dt-attachment-image__image-viewer {\n height: var(--dt-size-700);\n width: var(--dt-size-700);\n border: var(--dt-space-100) solid;\n border-radius: var(--br4);\n border-width: var(--dt-size-350);\n border-color: var(--dt-color-border-subtle);\n object-fit: cover;\n}\n.dt-attachment-image__top-right {\n position: absolute;\n top: var(--dt-size-100);\n right: var(--dt-size-100);\n}\n.dt-attachment-image__close-button {\n opacity: 0;\n position: absolute;\n top: inherit;\n right: inherit;\n color: var(--dt-color-neutral-white);\n background-color: var(--dt-color-black-400);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-200);\n border-color: var(--dt-color-neutral-white);\n}\n.dt-attachment-image__progress-bar {\n position: absolute;\n top: inherit;\n right: inherit;\n background-color: var(--dt-color-neutral-white);\n border-radius: 50%;\n display: flex;\n transform: rotate(-90deg);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-200);\n border-color: var(--dt-color-border-subtle);\n}\n</style>\n"],"names":["DtImageViewer","DtButton","DtIcon","DtProgressBar","_openBlock","_createElementBlock","_createVNode","_createElementVNode","_createBlock"],"mappings":";;;;;;;;AAkDA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,mBACVA;AAAAA,IACA,UAAAC;AAAAA,IACA,QAAAC;AAAAA,mBACAC;AAAAA,EACD;AAAA,EAED,OAAO;AAAA,IACL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA,EACD;AAAA,EAED,SAAS;AAAA,IACP,gBAAiB,OAAO;AACtB,WAAK,MAAM,gBAAgB,KAAK;AAAA,IACjC;AAAA,EACF;AACH;AApGI,MAAA,aAAA,EAAA,OAAM,sBAAqB;AAYzB,MAAA,aAAA,EAAA,OAAM,iCAAgC;;;;;;AAb1C,SAAAC,cAAA,GAAAC,uBAuCK,MAvCL,YAuCK;AAAA,IApCHC,IAAAA,YAME,4BAAA;AAAA,MALA,sBAAmB;AAAA,MAClB,aAAW,OAAS,UAAC;AAAA,MACrB,aAAW,OAAS,UAAC;AAAA,MACrB,oBAAkB,OAAc;AAAA,MAChC,cAAY,OAAoB;AAAA;IAInCC,IAAA,mBA0BM,OA1BN,YA0BM;AAAA,MAtBI,OAAA,UAAU,gCADlBC,IAKE,YAAA,4BAAA;AAAA;QAHA,OAAM;AAAA,QACL,UAAU,OAAS,UAAC;AAAA,QACpB,0BAAwB,OAAoB;AAAA;MAE/CF,IAAAA,YAgBY,sBAAA;AAAA,QAfT,mBAAmB,OAAK,KAAA;AAAA,QACzB,UAAS;AAAA,QACT,OAAM;AAAA,QACN,QAAA;AAAA,QACA,MAAK;AAAA,QACL,YAAW;AAAA,QACV,cAAY,OAAc;AAAA,QAC1B,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,YAAE,SAAe,gBAAC,OAAK,KAAA;AAAA;QAElB,kBACT,MAGE;AAAA,UAHFA,IAAAA,YAGE,oBAAA;AAAA,YAFA,MAAK;AAAA,YACL,MAAK;AAAA;;;;;;;;;"}
@@ -1,16 +1,16 @@
1
- import { DtIconClose } from "@dialpad/dialtone-icons/vue3";
2
1
  import DtProgressBar from "./progress_bar.vue.js";
3
2
  import { resolveComponent, openBlock, createElementBlock, createVNode, createElementVNode, createBlock, createCommentVNode, withCtx } from "vue";
4
3
  /* empty css */
5
4
  import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
6
5
  import DtImageViewer from "../../../../components/image_viewer/image_viewer.vue.js";
7
6
  import DtButton from "../../../../components/button/button.vue.js";
7
+ import DtIcon from "../../../../components/icon/icon.vue.js";
8
8
  const _sfc_main = {
9
9
  name: "DtImageCarousel",
10
10
  components: {
11
11
  DtImageViewer,
12
12
  DtButton,
13
- DtIconClose,
13
+ DtIcon,
14
14
  DtProgressBar
15
15
  },
16
16
  props: {
@@ -55,7 +55,7 @@ const _hoisted_2 = { class: "dt-attachment-image__top-right" };
55
55
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
56
56
  const _component_dt_image_viewer = resolveComponent("dt-image-viewer");
57
57
  const _component_dt_progress_bar = resolveComponent("dt-progress-bar");
58
- const _component_dt_icon_close = resolveComponent("dt-icon-close");
58
+ const _component_dt_icon = resolveComponent("dt-icon");
59
59
  const _component_dt_button = resolveComponent("dt-button");
60
60
  return openBlock(), createElementBlock("li", _hoisted_1, [
61
61
  createVNode(_component_dt_image_viewer, {
@@ -83,7 +83,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
83
83
  onClick: _cache[0] || (_cache[0] = ($event) => $options.removeMediaItem($props.index))
84
84
  }, {
85
85
  icon: withCtx(() => [
86
- createVNode(_component_dt_icon_close, { size: "200" })
86
+ createVNode(_component_dt_icon, {
87
+ name: "close",
88
+ size: "200"
89
+ })
87
90
  ]),
88
91
  _: 1
89
92
  }, 8, ["id", "aria-label"])