@dialpad/dialtone 9.107.0 → 9.107.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/dist/css/dialtone-default-theme.css +1 -0
  2. package/dist/css/dialtone-default-theme.min.css +1 -1
  3. package/dist/css/dialtone.css +1 -0
  4. package/dist/css/dialtone.min.css +1 -1
  5. package/dist/tokens/doc.json +16848 -16848
  6. package/dist/vue3/common/config.cjs +8 -0
  7. package/dist/vue3/common/config.cjs.map +1 -0
  8. package/dist/vue3/common/config.js +9 -0
  9. package/dist/vue3/common/config.js.map +1 -0
  10. package/dist/vue3/common/mixins/keyboard_list_navigation.cjs +2 -1
  11. package/dist/vue3/common/mixins/keyboard_list_navigation.cjs.map +1 -1
  12. package/dist/vue3/common/mixins/keyboard_list_navigation.js +2 -1
  13. package/dist/vue3/common/mixins/keyboard_list_navigation.js.map +1 -1
  14. package/dist/vue3/common/mixins/modal.cjs +4 -2
  15. package/dist/vue3/common/mixins/modal.cjs.map +1 -1
  16. package/dist/vue3/common/mixins/modal.js +4 -2
  17. package/dist/vue3/common/mixins/modal.js.map +1 -1
  18. package/dist/vue3/common/utils.cjs +28 -0
  19. package/dist/vue3/common/utils.cjs.map +1 -1
  20. package/dist/vue3/common/utils.js +28 -0
  21. package/dist/vue3/common/utils.js.map +1 -1
  22. package/dist/vue3/components/avatar/avatar.vue.cjs +3 -1
  23. package/dist/vue3/components/avatar/avatar.vue.cjs.map +1 -1
  24. package/dist/vue3/components/avatar/avatar.vue.js +4 -2
  25. package/dist/vue3/components/avatar/avatar.vue.js.map +1 -1
  26. package/dist/vue3/components/breadcrumbs/breadcrumb_item.vue.cjs +11 -6
  27. package/dist/vue3/components/breadcrumbs/breadcrumb_item.vue.cjs.map +1 -1
  28. package/dist/vue3/components/breadcrumbs/breadcrumb_item.vue.js +12 -7
  29. package/dist/vue3/components/breadcrumbs/breadcrumb_item.vue.js.map +1 -1
  30. package/dist/vue3/components/checkbox/checkbox.vue.cjs +6 -3
  31. package/dist/vue3/components/checkbox/checkbox.vue.cjs.map +1 -1
  32. package/dist/vue3/components/checkbox/checkbox.vue.js +7 -4
  33. package/dist/vue3/components/checkbox/checkbox.vue.js.map +1 -1
  34. package/dist/vue3/components/datepicker/composables/useCalendar.cjs +9 -8
  35. package/dist/vue3/components/datepicker/composables/useCalendar.cjs.map +1 -1
  36. package/dist/vue3/components/datepicker/composables/useCalendar.js +9 -8
  37. package/dist/vue3/components/datepicker/composables/useCalendar.js.map +1 -1
  38. package/dist/vue3/components/datepicker/composables/useMonthYearPicker.cjs +6 -5
  39. package/dist/vue3/components/datepicker/composables/useMonthYearPicker.cjs.map +1 -1
  40. package/dist/vue3/components/datepicker/composables/useMonthYearPicker.js +6 -5
  41. package/dist/vue3/components/datepicker/composables/useMonthYearPicker.js.map +1 -1
  42. package/dist/vue3/components/datepicker/datepicker.vue.cjs +2 -2
  43. package/dist/vue3/components/datepicker/datepicker.vue.cjs.map +1 -1
  44. package/dist/vue3/components/datepicker/datepicker.vue.js +2 -2
  45. package/dist/vue3/components/datepicker/datepicker.vue.js.map +1 -1
  46. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs +2 -1
  47. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
  48. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js +2 -1
  49. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
  50. package/dist/vue3/components/emoji_text_wrapper/emoji_text_wrapper.vue.cjs +2 -0
  51. package/dist/vue3/components/emoji_text_wrapper/emoji_text_wrapper.vue.cjs.map +1 -1
  52. package/dist/vue3/components/emoji_text_wrapper/emoji_text_wrapper.vue.js +3 -1
  53. package/dist/vue3/components/emoji_text_wrapper/emoji_text_wrapper.vue.js.map +1 -1
  54. package/dist/vue3/components/image_viewer/image_viewer.vue.cjs +3 -2
  55. package/dist/vue3/components/image_viewer/image_viewer.vue.cjs.map +1 -1
  56. package/dist/vue3/components/image_viewer/image_viewer.vue.js +3 -2
  57. package/dist/vue3/components/image_viewer/image_viewer.vue.js.map +1 -1
  58. package/dist/vue3/components/input/input.vue.cjs +8 -7
  59. package/dist/vue3/components/input/input.vue.cjs.map +1 -1
  60. package/dist/vue3/components/input/input.vue.js +10 -9
  61. package/dist/vue3/components/input/input.vue.js.map +1 -1
  62. package/dist/vue3/components/modal/modal.vue.cjs +2 -2
  63. package/dist/vue3/components/modal/modal.vue.cjs.map +1 -1
  64. package/dist/vue3/components/modal/modal.vue.js +3 -3
  65. package/dist/vue3/components/modal/modal.vue.js.map +1 -1
  66. package/dist/vue3/components/popover/popover.vue.cjs +7 -7
  67. package/dist/vue3/components/popover/popover.vue.cjs.map +1 -1
  68. package/dist/vue3/components/popover/popover.vue.js +8 -8
  69. package/dist/vue3/components/popover/popover.vue.js.map +1 -1
  70. package/dist/vue3/components/popover/popover_header_footer.vue.cjs +1 -1
  71. package/dist/vue3/components/popover/popover_header_footer.vue.cjs.map +1 -1
  72. package/dist/vue3/components/popover/popover_header_footer.vue.js +2 -2
  73. package/dist/vue3/components/popover/popover_header_footer.vue.js.map +1 -1
  74. package/dist/vue3/components/radio/radio.vue.cjs +5 -3
  75. package/dist/vue3/components/radio/radio.vue.cjs.map +1 -1
  76. package/dist/vue3/components/radio/radio.vue.js +7 -5
  77. package/dist/vue3/components/radio/radio.vue.js.map +1 -1
  78. package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.cjs +2 -2
  79. package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.cjs.map +1 -1
  80. package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.js +3 -3
  81. package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.js.map +1 -1
  82. package/dist/vue3/components/scroller/modules/dynamic_scroller.vue.cjs +4 -3
  83. package/dist/vue3/components/scroller/modules/dynamic_scroller.vue.cjs.map +1 -1
  84. package/dist/vue3/components/scroller/modules/dynamic_scroller.vue.js +4 -3
  85. package/dist/vue3/components/scroller/modules/dynamic_scroller.vue.js.map +1 -1
  86. package/dist/vue3/components/scroller/modules/scroller_item.vue.cjs +6 -5
  87. package/dist/vue3/components/scroller/modules/scroller_item.vue.cjs.map +1 -1
  88. package/dist/vue3/components/scroller/modules/scroller_item.vue.js +6 -5
  89. package/dist/vue3/components/scroller/modules/scroller_item.vue.js.map +1 -1
  90. package/dist/vue3/components/select_menu/select_menu.vue.cjs +5 -3
  91. package/dist/vue3/components/select_menu/select_menu.vue.cjs.map +1 -1
  92. package/dist/vue3/components/select_menu/select_menu.vue.js +7 -5
  93. package/dist/vue3/components/select_menu/select_menu.vue.js.map +1 -1
  94. package/dist/vue3/components/split_button/split_button.vue.cjs +5 -3
  95. package/dist/vue3/components/split_button/split_button.vue.cjs.map +1 -1
  96. package/dist/vue3/components/split_button/split_button.vue.js +6 -4
  97. package/dist/vue3/components/split_button/split_button.vue.js.map +1 -1
  98. package/dist/vue3/components/tab/tab_panel.vue.cjs +3 -2
  99. package/dist/vue3/components/tab/tab_panel.vue.cjs.map +1 -1
  100. package/dist/vue3/components/tab/tab_panel.vue.js +3 -2
  101. package/dist/vue3/components/tab/tab_panel.vue.js.map +1 -1
  102. package/dist/vue3/components/toggle/toggle.vue.cjs +10 -10
  103. package/dist/vue3/components/toggle/toggle.vue.cjs.map +1 -1
  104. package/dist/vue3/components/toggle/toggle.vue.js +11 -11
  105. package/dist/vue3/components/toggle/toggle.vue.js.map +1 -1
  106. package/dist/vue3/components/tooltip/tooltip.vue.cjs +3 -3
  107. package/dist/vue3/components/tooltip/tooltip.vue.cjs.map +1 -1
  108. package/dist/vue3/components/tooltip/tooltip.vue.js +4 -4
  109. package/dist/vue3/components/tooltip/tooltip.vue.js.map +1 -1
  110. package/dist/vue3/recipes/buttons/callbar_button/callbar_button.vue.cjs +10 -5
  111. package/dist/vue3/recipes/buttons/callbar_button/callbar_button.vue.cjs.map +1 -1
  112. package/dist/vue3/recipes/buttons/callbar_button/callbar_button.vue.js +12 -7
  113. package/dist/vue3/recipes/buttons/callbar_button/callbar_button.vue.js.map +1 -1
  114. package/dist/vue3/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.cjs +6 -5
  115. package/dist/vue3/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.cjs.map +1 -1
  116. package/dist/vue3/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.js +8 -7
  117. package/dist/vue3/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.js.map +1 -1
  118. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +6 -5
  119. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
  120. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +8 -7
  121. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
  122. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +2 -2
  123. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
  124. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +3 -3
  125. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
  126. package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs +7 -5
  127. package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
  128. package/dist/vue3/recipes/conversation_view/editor/editor.vue.js +8 -6
  129. package/dist/vue3/recipes/conversation_view/editor/editor.vue.js.map +1 -1
  130. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs +10 -6
  131. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
  132. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js +11 -7
  133. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
  134. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs +19 -19
  135. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
  136. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js +20 -20
  137. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
  138. package/dist/vue3/recipes/leftbar/contact_centers_row/contact_centers_row.vue.cjs +12 -10
  139. package/dist/vue3/recipes/leftbar/contact_centers_row/contact_centers_row.vue.cjs.map +1 -1
  140. package/dist/vue3/recipes/leftbar/contact_centers_row/contact_centers_row.vue.js +14 -12
  141. package/dist/vue3/recipes/leftbar/contact_centers_row/contact_centers_row.vue.js.map +1 -1
  142. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs +9 -10
  143. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
  144. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js +11 -12
  145. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
  146. package/dist/vue3/types/common/config/index.d.ts +3 -0
  147. package/dist/vue3/types/common/config/index.d.ts.map +1 -0
  148. package/dist/vue3/types/common/mixins/keyboard_list_navigation.d.ts.map +1 -1
  149. package/dist/vue3/types/common/mixins/modal.d.ts.map +1 -1
  150. package/dist/vue3/types/common/utils/index.d.ts +12 -0
  151. package/dist/vue3/types/common/utils/index.d.ts.map +1 -1
  152. package/dist/vue3/types/components/avatar/avatar.vue.d.ts.map +1 -1
  153. package/dist/vue3/types/components/breadcrumbs/breadcrumb_item.vue.d.ts +5 -1
  154. package/dist/vue3/types/components/breadcrumbs/breadcrumb_item.vue.d.ts.map +1 -1
  155. package/dist/vue3/types/components/checkbox/checkbox.vue.d.ts +3 -0
  156. package/dist/vue3/types/components/checkbox/checkbox.vue.d.ts.map +1 -1
  157. package/dist/vue3/types/components/datepicker/composables/useCalendar.d.ts.map +1 -1
  158. package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts.map +1 -1
  159. package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
  160. package/dist/vue3/types/components/emoji_text_wrapper/emoji_text_wrapper.vue.d.ts.map +1 -1
  161. package/dist/vue3/types/components/input/input.vue.d.ts +3 -1
  162. package/dist/vue3/types/components/input/input.vue.d.ts.map +1 -1
  163. package/dist/vue3/types/components/modal/modal.vue.d.ts.map +1 -1
  164. package/dist/vue3/types/components/popover/popover.vue.d.ts.map +1 -1
  165. package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
  166. package/dist/vue3/types/components/radio/radio.vue.d.ts +3 -1
  167. package/dist/vue3/types/components/radio/radio.vue.d.ts.map +1 -1
  168. package/dist/vue3/types/components/select_menu/select_menu.vue.d.ts +3 -1
  169. package/dist/vue3/types/components/select_menu/select_menu.vue.d.ts.map +1 -1
  170. package/dist/vue3/types/components/split_button/split_button.vue.d.ts +2 -0
  171. package/dist/vue3/types/components/toggle/toggle.vue.d.ts +3 -4
  172. package/dist/vue3/types/components/toggle/toggle.vue.d.ts.map +1 -1
  173. package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
  174. package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +5 -1
  175. package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts.map +1 -1
  176. package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +3 -0
  177. package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
  178. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +3 -0
  179. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
  180. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +3 -0
  181. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  182. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +3 -0
  183. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  184. package/dist/vue3/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
  185. package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +3 -0
  186. package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
  187. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +3 -0
  188. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  189. package/package.json +4 -4
@@ -218,9 +218,11 @@ const _sfc_main = {
218
218
  }
219
219
  },
220
220
  mounted() {
221
- common_utils.warnIfUnmounted(this.$el, this.$options.name);
221
+ common_utils.warnIfUnmounted(common_utils.returnFirstEl(this.$el), this.$options.name);
222
222
  },
223
223
  methods: {
224
+ removeClassStyleAttrs: common_utils.removeClassStyleAttrs,
225
+ addClassStyleAttrs: common_utils.addClassStyleAttrs,
224
226
  arrowClick(ev) {
225
227
  this.$emit("arrow-click", ev);
226
228
  return this.toggleOpen();
@@ -244,13 +246,12 @@ const _sfc_main = {
244
246
  }
245
247
  }
246
248
  };
247
- const _hoisted_1 = { class: "dt-recipe--callbar-button-with-dropdown" };
248
249
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
249
250
  const _component_dt_recipe_callbar_button = vue.resolveComponent("dt-recipe-callbar-button");
250
251
  const _component_dt_icon_chevron_up = vue.resolveComponent("dt-icon-chevron-up");
251
252
  const _component_dt_button = vue.resolveComponent("dt-button");
252
253
  const _component_dt_dropdown = vue.resolveComponent("dt-dropdown");
253
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
254
+ return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: "dt-recipe--callbar-button-with-dropdown" }, $options.addClassStyleAttrs(_ctx.$attrs)), [
254
255
  vue.createVNode(_component_dt_recipe_callbar_button, {
255
256
  active: $props.active,
256
257
  "aria-label": $props.ariaLabel,
@@ -285,7 +286,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
285
286
  placement: $props.placement,
286
287
  class: "dt-recipe--callbar-button-with-dropdown--dropdown-wrapper",
287
288
  padding: "none"
288
- }, _ctx.$attrs, { onOpened: $options.onModalIsOpened }), {
289
+ }, $options.removeClassStyleAttrs(_ctx.$attrs), { onOpened: $options.onModalIsOpened }), {
289
290
  anchor: vue.withCtx(() => [
290
291
  vue.createVNode(_component_dt_button, {
291
292
  active: $data.open,
@@ -314,7 +315,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
314
315
  ]),
315
316
  _: 3
316
317
  }, 16, ["id", "fallback-placements", "open", "placement", "onOpened"])) : vue.createCommentVNode("", true)
317
- ]);
318
+ ], 16);
318
319
  }
319
320
  const callbar_button_with_dropdown = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]);
320
321
  exports.default = callbar_button_with_dropdown;
@@ -1 +1 @@
1
- {"version":3,"file":"callbar_button_with_dropdown.vue.cjs","sources":["../../../../recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-dropdown\"\n >\n <dt-recipe-callbar-button\n :active=\"active\"\n :aria-label=\"ariaLabel\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :danger=\"danger\"\n :disabled=\"disabled\"\n :inverted-tooltip=\"invertedTooltip\"\n :show-tooltip=\"showTooltip\"\n :text-class=\"textClass\"\n :tooltip-delay=\"tooltipDelay\"\n :tooltip-text=\"tooltipText\"\n class=\"dt-recipe--callbar-button-with-dropdown--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-dropdown\n v-if=\"showArrowButton\"\n :id=\"id\"\n :fallback-placements=\"fallbackPlacements\"\n :open=\"open\"\n :placement=\"placement\"\n class=\"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper\"\n padding=\"none\"\n v-bind=\"$attrs\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n :active=\"open\"\n :aria-label=\"arrowButtonLabel\"\n :class=\"['dt-recipe--callbar-button-with-dropdown--arrow',\n { 'dt-recipe--callbar-button-with-dropdown--arrow--large': !isCompactMode }]\"\n circle\n importance=\"clear\"\n size=\"lg\"\n width=\"2rem\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon-chevron-up\n class=\"dt-recipe--callbar-button-with-dropdown--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #list=\"{ close }\">\n <slot\n :close=\"close\"\n name=\"list\"\n />\n </template>\n </dt-dropdown>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtDropdown } from '@/components/dropdown';\nimport { DtIconChevronUp } from '@dialpad/dialtone-icons/vue3';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils, { warnIfUnmounted } from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithDropdown',\n\n components: { DtRecipeCallbarButton, DtDropdown, 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 dropdown 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 * If the dropdown does not fit in the direction described by \"placement\",\n * it will attempt to change it's direction to the \"fallbackPlacements\".\n *\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n * */\n fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\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 * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\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 dropdown 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 showDropdown () {\n if (!this.openDropdown || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\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.openDropdown;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the dropdown\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"],"names":["DtRecipeCallbarButton","DtDropdown","DtButton","DtIconChevronUp","utils","this","CALLBAR_BUTTON_VALID_WIDTH_SIZE","warnIfUnmounted","_openBlock","_createElementBlock","_createVNode","_renderSlot","_withCtx","_createBlock","_mergeProps","_normalizeClass","_createCommentVNode"],"mappings":";;;;;;;;;;AA2EA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAA,uBAAEA,eAAqB,SAAA,YAAEC,kBAAYC,UAAAA,OAAAA,SAAUC,iBAAAA,KAAAA,gBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA,EAM5E,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAOC,aAAAA,QAAM;MACd;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,UAAU;AACpB,eAAO,SAASC,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;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAYD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS,MAAM;AACb,eAAO,CAAC,MAAM;AAAA,MACf;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,I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bar_button_with_dropdown.vue.cjs","sources":["../../../../recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-dropdown\"\n v-bind=\"addClassStyleAttrs($attrs)\"\n >\n <dt-recipe-callbar-button\n :active=\"active\"\n :aria-label=\"ariaLabel\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :danger=\"danger\"\n :disabled=\"disabled\"\n :inverted-tooltip=\"invertedTooltip\"\n :show-tooltip=\"showTooltip\"\n :text-class=\"textClass\"\n :tooltip-delay=\"tooltipDelay\"\n :tooltip-text=\"tooltipText\"\n class=\"dt-recipe--callbar-button-with-dropdown--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-dropdown\n v-if=\"showArrowButton\"\n :id=\"id\"\n :fallback-placements=\"fallbackPlacements\"\n :open=\"open\"\n :placement=\"placement\"\n class=\"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper\"\n padding=\"none\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n :active=\"open\"\n :aria-label=\"arrowButtonLabel\"\n :class=\"['dt-recipe--callbar-button-with-dropdown--arrow',\n { 'dt-recipe--callbar-button-with-dropdown--arrow--large': !isCompactMode }]\"\n circle\n importance=\"clear\"\n size=\"lg\"\n width=\"2rem\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon-chevron-up\n class=\"dt-recipe--callbar-button-with-dropdown--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #list=\"{ close }\">\n <slot\n :close=\"close\"\n name=\"list\"\n />\n </template>\n </dt-dropdown>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtDropdown } from '@/components/dropdown';\nimport { DtIconChevronUp } from '@dialpad/dialtone-icons/vue3';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils, { warnIfUnmounted, removeClassStyleAttrs, addClassStyleAttrs, returnFirstEl } from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithDropdown',\n\n components: { DtRecipeCallbarButton, DtDropdown, 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 dropdown 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 * If the dropdown does not fit in the direction described by \"placement\",\n * it will attempt to change it's direction to the \"fallbackPlacements\".\n *\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n * */\n fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\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 * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\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 dropdown 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 showDropdown () {\n if (!this.openDropdown || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n mounted () {\n warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n },\n\n methods: {\n removeClassStyleAttrs,\n addClassStyleAttrs,\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.openDropdown;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the dropdown\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"],"names":["DtRecipeCallbarButton","DtDropdown","DtButton","DtIconChevronUp","utils","this","CALLBAR_BUTTON_VALID_WIDTH_SIZE","warnIfUnmounted","returnFirstEl","removeClassStyleAttrs","addClassStyleAttrs","_createElementBlock","_mergeProps","_createVNode","_renderSlot","_withCtx","_openBlock","_createBlock","_normalizeClass","_createCommentVNode"],"mappings":";;;;;;;;;;AA4EA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAA,uBAAEA,eAAqB,SAAA,YAAEC,kBAAYC,UAAAA,OAAAA,SAAUC,iBAAAA,KAAAA,gBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA,EAM5E,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAOC,aAAAA,QAAM;MACd;AAAA,IACF;AAAA;AAAA;AAAA;AAAA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,MACN,uBAAqB,OAAkB;AAAA,MACvC,MAAM,MAAI;AAAA,MACV,WAAW,OAAS;AAAA,MACrB,OAAM;AAAA,MACN,SAAQ;AAAA,IACA,GAAA,SAAA,sBAAsB,KAAA,MAAM,GACnC,EAAA,UAAQ,SAAe,gBAAA,CAAA,GAAA;AAAA,MAEb,oBACT,MAiBY;AAAA,QAjBZC,IAAAA,YAiBY,sBAAA;AAAA,UAhBT,QAAQ,MAAI;AAAA,UACZ,cAAY,OAAgB;AAAA,UAC5B,OA3CXK,IAAA,eAAA;AAAA,YAAA;AAAA,wEA2CoJ,SAAa,cAAA;AAAA,UAAA,CAAA;AAAA,UAEvJ,QAAA;AAAA,UACA,YAAW;AAAA,UACX,MAAK;AAAA,UACL,OAAM;AAAA,UACL,SAAO,SAAU;AAAA;UAEP,kBACT,MAGE;AAAA,YAHFL,IAAAA,YAGE,+BAAA;AAAA,cAFA,OAAM;AAAA,cACN,MAAK;AAAA;;UAtDnB,GAAA;AAAA;;MA2DiB,MAAIE,IAAA,QACb,CAGE,EAJe,YAAK;AAAA,QACtBD,IAGE,WAAA,KAAA,QAAA,QAAA,EAFC,OAAY;AAAA;MA7DvB,GAAA;AAAA,8EAAAK,IAAA,mBAAA,IAAA,IAAA;AAAA;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { DtIconChevronUp } from "@dialpad/dialtone-icons/vue3";
2
- import utils, { warnIfUnmounted } from "../../../common/utils.js";
3
- import { resolveComponent, openBlock, createElementBlock, createVNode, withCtx, renderSlot, createBlock, mergeProps, normalizeClass, createCommentVNode } from "vue";
2
+ import utils, { warnIfUnmounted, returnFirstEl, removeClassStyleAttrs, addClassStyleAttrs } from "../../../common/utils.js";
3
+ import { resolveComponent, openBlock, createElementBlock, mergeProps, createVNode, withCtx, renderSlot, createBlock, normalizeClass, createCommentVNode } from "vue";
4
4
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
5
5
  import DtRecipeCallbarButton from "../callbar_button/callbar_button.vue.js";
6
6
  import DtDropdown from "../../../components/dropdown/dropdown.vue.js";
@@ -216,9 +216,11 @@ const _sfc_main = {
216
216
  }
217
217
  },
218
218
  mounted() {
219
- warnIfUnmounted(this.$el, this.$options.name);
219
+ warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);
220
220
  },
221
221
  methods: {
222
+ removeClassStyleAttrs,
223
+ addClassStyleAttrs,
222
224
  arrowClick(ev) {
223
225
  this.$emit("arrow-click", ev);
224
226
  return this.toggleOpen();
@@ -242,13 +244,12 @@ const _sfc_main = {
242
244
  }
243
245
  }
244
246
  };
245
- const _hoisted_1 = { class: "dt-recipe--callbar-button-with-dropdown" };
246
247
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
247
248
  const _component_dt_recipe_callbar_button = resolveComponent("dt-recipe-callbar-button");
248
249
  const _component_dt_icon_chevron_up = resolveComponent("dt-icon-chevron-up");
249
250
  const _component_dt_button = resolveComponent("dt-button");
250
251
  const _component_dt_dropdown = resolveComponent("dt-dropdown");
251
- return openBlock(), createElementBlock("div", _hoisted_1, [
252
+ return openBlock(), createElementBlock("div", mergeProps({ class: "dt-recipe--callbar-button-with-dropdown" }, $options.addClassStyleAttrs(_ctx.$attrs)), [
252
253
  createVNode(_component_dt_recipe_callbar_button, {
253
254
  active: $props.active,
254
255
  "aria-label": $props.ariaLabel,
@@ -283,7 +284,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
283
284
  placement: $props.placement,
284
285
  class: "dt-recipe--callbar-button-with-dropdown--dropdown-wrapper",
285
286
  padding: "none"
286
- }, _ctx.$attrs, { onOpened: $options.onModalIsOpened }), {
287
+ }, $options.removeClassStyleAttrs(_ctx.$attrs), { onOpened: $options.onModalIsOpened }), {
287
288
  anchor: withCtx(() => [
288
289
  createVNode(_component_dt_button, {
289
290
  active: $data.open,
@@ -312,7 +313,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
312
313
  ]),
313
314
  _: 3
314
315
  }, 16, ["id", "fallback-placements", "open", "placement", "onOpened"])) : createCommentVNode("", true)
315
- ]);
316
+ ], 16);
316
317
  }
317
318
  const callbar_button_with_dropdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
318
319
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"callbar_button_with_dropdown.vue.js","sources":["../../../../recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-dropdown\"\n >\n <dt-recipe-callbar-button\n :active=\"active\"\n :aria-label=\"ariaLabel\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :danger=\"danger\"\n :disabled=\"disabled\"\n :inverted-tooltip=\"invertedTooltip\"\n :show-tooltip=\"showTooltip\"\n :text-class=\"textClass\"\n :tooltip-delay=\"tooltipDelay\"\n :tooltip-text=\"tooltipText\"\n class=\"dt-recipe--callbar-button-with-dropdown--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-dropdown\n v-if=\"showArrowButton\"\n :id=\"id\"\n :fallback-placements=\"fallbackPlacements\"\n :open=\"open\"\n :placement=\"placement\"\n class=\"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper\"\n padding=\"none\"\n v-bind=\"$attrs\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n :active=\"open\"\n :aria-label=\"arrowButtonLabel\"\n :class=\"['dt-recipe--callbar-button-with-dropdown--arrow',\n { 'dt-recipe--callbar-button-with-dropdown--arrow--large': !isCompactMode }]\"\n circle\n importance=\"clear\"\n size=\"lg\"\n width=\"2rem\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon-chevron-up\n class=\"dt-recipe--callbar-button-with-dropdown--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #list=\"{ close }\">\n <slot\n :close=\"close\"\n name=\"list\"\n />\n </template>\n </dt-dropdown>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtDropdown } from '@/components/dropdown';\nimport { DtIconChevronUp } from '@dialpad/dialtone-icons/vue3';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils, { warnIfUnmounted } from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithDropdown',\n\n components: { DtRecipeCallbarButton, DtDropdown, 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 dropdown 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 * If the dropdown does not fit in the direction described by \"placement\",\n * it will attempt to change it's direction to the \"fallbackPlacements\".\n *\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n * */\n fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\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 * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\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 dropdown 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 showDropdown () {\n if (!this.openDropdown || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\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.openDropdown;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the dropdown\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"],"names":["this","_openBlock","_createElementBlock","_createVNode","_renderSlot","_withCtx","_createBlock","_mergeProps","_normalizeClass","_createCommentVNode"],"mappings":";;;;;;;;AA2EA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAE,uBAAuB,YAAY,UAAU,gBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA,EAM5E,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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B;AAAA,UAC5B,OA1CXK,eAAA;AAAA,YAAA;AAAA,wEA0CoJ,SAAa,cAAA;AAAA,UAAA,CAAA;AAAA,UAEvJ,QAAA;AAAA,UACA,YAAW;AAAA,UACX,MAAK;AAAA,UACL,OAAM;AAAA,UACL,SAAO,SAAU;AAAA;UAEP,cACT,MAGE;AAAA,YAHFL,YAGE,+BAAA;AAAA,cAFA,OAAM;AAAA,cACN,MAAK;AAAA;;UArDnB,GAAA;AAAA;;MA0DiB,MAAIE,QACb,CAGE,EAJe,YAAK;AAAA,QACtBD,WAGE,KAAA,QAAA,QAAA,EAFC,OAAY;AAAA;MA5DvB,GAAA;AAAA,8EAAAK,mBAAA,IAAA,IAAA;AAAA;;;"}
1
+ {"version":3,"file":"callbar_button_with_dropdown.vue.js","sources":["../../../../recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-dropdown\"\n v-bind=\"addClassStyleAttrs($attrs)\"\n >\n <dt-recipe-callbar-button\n :active=\"active\"\n :aria-label=\"ariaLabel\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :danger=\"danger\"\n :disabled=\"disabled\"\n :inverted-tooltip=\"invertedTooltip\"\n :show-tooltip=\"showTooltip\"\n :text-class=\"textClass\"\n :tooltip-delay=\"tooltipDelay\"\n :tooltip-text=\"tooltipText\"\n class=\"dt-recipe--callbar-button-with-dropdown--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-dropdown\n v-if=\"showArrowButton\"\n :id=\"id\"\n :fallback-placements=\"fallbackPlacements\"\n :open=\"open\"\n :placement=\"placement\"\n class=\"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper\"\n padding=\"none\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n :active=\"open\"\n :aria-label=\"arrowButtonLabel\"\n :class=\"['dt-recipe--callbar-button-with-dropdown--arrow',\n { 'dt-recipe--callbar-button-with-dropdown--arrow--large': !isCompactMode }]\"\n circle\n importance=\"clear\"\n size=\"lg\"\n width=\"2rem\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon-chevron-up\n class=\"dt-recipe--callbar-button-with-dropdown--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #list=\"{ close }\">\n <slot\n :close=\"close\"\n name=\"list\"\n />\n </template>\n </dt-dropdown>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtDropdown } from '@/components/dropdown';\nimport { DtIconChevronUp } from '@dialpad/dialtone-icons/vue3';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils, { warnIfUnmounted, removeClassStyleAttrs, addClassStyleAttrs, returnFirstEl } from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithDropdown',\n\n components: { DtRecipeCallbarButton, DtDropdown, 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 dropdown 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 * If the dropdown does not fit in the direction described by \"placement\",\n * it will attempt to change it's direction to the \"fallbackPlacements\".\n *\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n * */\n fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\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 * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\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 dropdown 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 showDropdown () {\n if (!this.openDropdown || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n mounted () {\n warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n },\n\n methods: {\n removeClassStyleAttrs,\n addClassStyleAttrs,\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.openDropdown;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the dropdown\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"],"names":["this","_createElementBlock","_mergeProps","_createVNode","_renderSlot","_withCtx","_openBlock","_createBlock","_normalizeClass","_createCommentVNode"],"mappings":";;;;;;;;AA4E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,SAAAC,QA0BM,MAAQ;AAAA,QAARD,WAAQ,KAAA,QAAA,SAAA;AAAA;MA1Bd,GAAA;AAAA;IA6BY,SAAe,mBADvBE,aAAAC,YAqCc,wBArCdL,WAqCc;AAAA,MAjElB,KAAA;AAAA,MA8BO,IAAI,OAAE;AAAA,MACN,uBAAqB,OAAkB;AAAA,MACvC,MAAM,MAAI;AAAA,MACV,WAAW,OAAS;AAAA,MACrB,OAAM;AAAA,MACN,SAAQ;AAAA,IACA,GAAA,SAAA,sBAAsB,KAAA,MAAM,GACnC,EAAA,UAAQ,SAAe,gBAAA,CAAA,GAAA;AAAA,MAEb,gBACT,MAiBY;AAAA,QAjBZC,YAiBY,sBAAA;AAAA,UAhBT,QAAQ,MAAI;AAAA,UACZ,cAAY,OAAgB;AAAA,UAC5B,OA3CXK,eAAA;AAAA,YAAA;AAAA,wEA2CoJ,SAAa,cAAA;AAAA,UAAA,CAAA;AAAA,UAEvJ,QAAA;AAAA,UACA,YAAW;AAAA,UACX,MAAK;AAAA,UACL,OAAM;AAAA,UACL,SAAO,SAAU;AAAA;UAEP,cACT,MAGE;AAAA,YAHFL,YAGE,+BAAA;AAAA,cAFA,OAAM;AAAA,cACN,MAAK;AAAA;;UAtDnB,GAAA;AAAA;;MA2DiB,MAAIE,QACb,CAGE,EAJe,YAAK;AAAA,QACtBD,WAGE,KAAA,QAAA,QAAA,EAFC,OAAY;AAAA;MA7DvB,GAAA;AAAA,8EAAAK,mBAAA,IAAA,IAAA;AAAA;;;"}
@@ -250,9 +250,11 @@ const _sfc_main = {
250
250
  }
251
251
  },
252
252
  mounted() {
253
- common_utils.warnIfUnmounted(this.$el, this.$options.name);
253
+ common_utils.warnIfUnmounted(common_utils.returnFirstEl(this.$el), this.$options.name);
254
254
  },
255
255
  methods: {
256
+ removeClassStyleAttrs: common_utils.removeClassStyleAttrs,
257
+ addClassStyleAttrs: common_utils.addClassStyleAttrs,
256
258
  arrowClick(ev) {
257
259
  this.$emit("arrow-click", ev);
258
260
  return this.toggleOpen();
@@ -276,13 +278,12 @@ const _sfc_main = {
276
278
  }
277
279
  }
278
280
  };
279
- const _hoisted_1 = { class: "d-recipe-callbar-button-with-popover" };
280
281
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
281
282
  const _component_dt_recipe_callbar_button = vue.resolveComponent("dt-recipe-callbar-button");
282
283
  const _component_dt_icon_chevron_up = vue.resolveComponent("dt-icon-chevron-up");
283
284
  const _component_dt_button = vue.resolveComponent("dt-button");
284
285
  const _component_dt_popover = vue.resolveComponent("dt-popover");
285
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
286
+ return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: "d-recipe-callbar-button-with-popover" }, $options.addClassStyleAttrs(_ctx.$attrs)), [
286
287
  vue.createVNode(_component_dt_recipe_callbar_button, {
287
288
  "aria-label": $props.ariaLabel,
288
289
  disabled: $props.disabled,
@@ -321,7 +322,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
321
322
  padding: "none",
322
323
  class: "d-recipe-callbar-button-with-popover__popover-wrapper",
323
324
  "dialog-class": ["d-recipe-callbar-button-with-popover__popover", $props.contentClass]
324
- }, _ctx.$attrs, {
325
+ }, $options.removeClassStyleAttrs(_ctx.$attrs), {
325
326
  "open-popover": $options.showPopover,
326
327
  onOpened: $options.onModalIsOpened
327
328
  }), {
@@ -359,7 +360,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
359
360
  ]),
360
361
  _: 3
361
362
  }, 16, ["id", "open", "placement", "initial-focus-element", "show-close-button", "offset", "dialog-class", "open-popover", "onOpened"])) : vue.createCommentVNode("", true)
362
- ]);
363
+ ], 16);
363
364
  }
364
365
  const callbar_button_with_popover = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]);
365
366
  exports.default = callbar_button_with_popover;
@@ -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=\"d-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 :inverted-tooltip=\"invertedTooltip\"\n :show-tooltip=\"showTooltip\"\n :tooltip-text=\"tooltipText\"\n :tooltip-delay=\"tooltipDelay\"\n class=\"d-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=\"d-recipe-callbar-button-with-popover__popover-wrapper\"\n :dialog-class=\"['d-recipe-callbar-button-with-popover__popover', contentClass]\"\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=\"['d-recipe-callbar-button-with-popover__arrow',\n { 'd-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=\"d-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, { warnIfUnmounted } from '@/common/utils';\n\nexport default {\n compatConfig: { MODE: 3 },\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 * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\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 mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\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"],"names":["DtRecipeCallbarButton","DtPopover","DtButton","DtIconChevronUp","utils","this","CALLBAR_BUTTON_VALID_WIDTH_SIZE","warnIfUnmounted","_openBlock","_createElementBlock","_createVNode","_renderSlot","_withCtx","_createBlock","_mergeProps","_normalizeClass","_createCommentVNode"],"mappings":";;;;;;;;;;AAmFA,MAAK,YAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAA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M;AAAA,cACN,MAAK;AAAA;;UA1DnB,GAAA;AAAA;;MA+DiB,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;MAtErC,GAAA;AAAA,+IAAAK,IAAA,mBAAA,IAAA,IAAA;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=\"d-recipe-callbar-button-with-popover\"\n v-bind=\"addClassStyleAttrs($attrs)\"\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 :inverted-tooltip=\"invertedTooltip\"\n :show-tooltip=\"showTooltip\"\n :tooltip-text=\"tooltipText\"\n :tooltip-delay=\"tooltipDelay\"\n class=\"d-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=\"d-recipe-callbar-button-with-popover__popover-wrapper\"\n :dialog-class=\"['d-recipe-callbar-button-with-popover__popover', contentClass]\"\n v-bind=\"removeClassStyleAttrs($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=\"['d-recipe-callbar-button-with-popover__arrow',\n { 'd-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=\"d-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, { warnIfUnmounted, removeClassStyleAttrs, addClassStyleAttrs, returnFirstEl } from '@/common/utils';\n\nexport default {\n compatConfig: { MODE: 3 },\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 * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\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 mounted () {\n warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n },\n\n methods: {\n removeClassStyleAttrs,\n addClassStyleAttrs,\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"],"names":["DtRecipeCallbarButton","DtPopover","DtButton","DtIconChevronUp","utils","this","CALLBAR_BUTTON_VALID_WIDTH_SIZE","warnIfUnmounted","returnFirstEl","removeClassStyleAttrs","addClassStyleAttrs","_createElementBlock","_mergeProps","_createVNode","_renderSlot","_withCtx","_openBlock","_createBlock","_normalizeClass","_createCommentVNode"],"mappings":";;;;;;;;;;AAoFA,MAAK,YAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY,EAAA,uBAAEA,eAAqB,SAAA,WAAEC,iBAAWC,UAAAA,OAAAA,SAAUC,iBAAAA,KAAAA,gBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3E,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAOC,aAAAA,QAAM;MACd;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,UAAU;AACpB,eAAO,SAASC,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;AAAA,IACV;AAAA;AAAA;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AI;AAAA,MACV,WAAW,OAAS;AAAA,MACpB,yBAAuB,OAAmB;AAAA,MAC1C,qBAAmB,OAAe;AAAA,MAClC,QAAQ,OAAM;AAAA,MACf,SAAQ;AAAA,MACR,OAAM;AAAA,MACL,kEAAgE,OAAY,YAAA;AAAA,IACrE,GAAA,SAAA,sBAAsB,KAAM,MAAA,GAAA;AAAA,MACnC,gBAAc,SAAW;AAAA,MACzB,UAAQ,SAAe;AAAA;MAEb,oBACT,MAiBY;AAAA,QAjBZC,IAAAA,YAiBY,sBAAA;AAAA,UAhBV,QAAA;AAAA,UACA,YAAW;AAAA,UACX,MAAK;AAAA,UACJ,OAjDXK,IAAA,eAAA;AAAA,YAAA;AAAA,qEAiD8I,SAAa,cAAA;AAAA,UAAA,CAAA;AAAA,UAEjJ,OAAM;AAAA,UACL,cAAY,OAAgB;AAAA,UAC5B,QAAQ,MAAI;AAAA,UACZ,SAAO,SAAU;AAAA;UAEP,kBACT,MAGE;AAAA,YAHFL,IAAAA,YAGE,+BAAA;AAAA,cAFA,OAAM;AAAA,cACN,MAAK;AAAA;;UA3DnB,GAAA;AAAA;;MAgEiB,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;MAvErC,GAAA;AAAA,+IAAAK,IAAA,mBAAA,IAAA,IAAA;AAAA;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { DtIconChevronUp } from "@dialpad/dialtone-icons/vue3";
2
- import utils, { warnIfUnmounted } from "../../../common/utils.js";
3
- import { resolveComponent, openBlock, createElementBlock, createVNode, withCtx, renderSlot, createBlock, mergeProps, normalizeClass, createCommentVNode } from "vue";
2
+ import utils, { warnIfUnmounted, returnFirstEl, removeClassStyleAttrs, addClassStyleAttrs } from "../../../common/utils.js";
3
+ import { resolveComponent, openBlock, createElementBlock, mergeProps, createVNode, withCtx, renderSlot, createBlock, normalizeClass, createCommentVNode } from "vue";
4
4
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
5
5
  import DtRecipeCallbarButton from "../callbar_button/callbar_button.vue.js";
6
6
  import DtPopover from "../../../components/popover/popover.vue.js";
@@ -248,9 +248,11 @@ const _sfc_main = {
248
248
  }
249
249
  },
250
250
  mounted() {
251
- warnIfUnmounted(this.$el, this.$options.name);
251
+ warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);
252
252
  },
253
253
  methods: {
254
+ removeClassStyleAttrs,
255
+ addClassStyleAttrs,
254
256
  arrowClick(ev) {
255
257
  this.$emit("arrow-click", ev);
256
258
  return this.toggleOpen();
@@ -274,13 +276,12 @@ const _sfc_main = {
274
276
  }
275
277
  }
276
278
  };
277
- const _hoisted_1 = { class: "d-recipe-callbar-button-with-popover" };
278
279
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
279
280
  const _component_dt_recipe_callbar_button = resolveComponent("dt-recipe-callbar-button");
280
281
  const _component_dt_icon_chevron_up = resolveComponent("dt-icon-chevron-up");
281
282
  const _component_dt_button = resolveComponent("dt-button");
282
283
  const _component_dt_popover = resolveComponent("dt-popover");
283
- return openBlock(), createElementBlock("div", _hoisted_1, [
284
+ return openBlock(), createElementBlock("div", mergeProps({ class: "d-recipe-callbar-button-with-popover" }, $options.addClassStyleAttrs(_ctx.$attrs)), [
284
285
  createVNode(_component_dt_recipe_callbar_button, {
285
286
  "aria-label": $props.ariaLabel,
286
287
  disabled: $props.disabled,
@@ -319,7 +320,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
319
320
  padding: "none",
320
321
  class: "d-recipe-callbar-button-with-popover__popover-wrapper",
321
322
  "dialog-class": ["d-recipe-callbar-button-with-popover__popover", $props.contentClass]
322
- }, _ctx.$attrs, {
323
+ }, $options.removeClassStyleAttrs(_ctx.$attrs), {
323
324
  "open-popover": $options.showPopover,
324
325
  onOpened: $options.onModalIsOpened
325
326
  }), {
@@ -357,7 +358,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
357
358
  ]),
358
359
  _: 3
359
360
  }, 16, ["id", "open", "placement", "initial-focus-element", "show-close-button", "offset", "dialog-class", "open-popover", "onOpened"])) : createCommentVNode("", true)
360
- ]);
361
+ ], 16);
361
362
  }
362
363
  const callbar_button_with_popover = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
363
364
  export {
@@ -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=\"d-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 :inverted-tooltip=\"invertedTooltip\"\n :show-tooltip=\"showTooltip\"\n :tooltip-text=\"tooltipText\"\n :tooltip-delay=\"tooltipDelay\"\n class=\"d-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=\"d-recipe-callbar-button-with-popover__popover-wrapper\"\n :dialog-class=\"['d-recipe-callbar-button-with-popover__popover', contentClass]\"\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=\"['d-recipe-callbar-button-with-popover__arrow',\n { 'd-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=\"d-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, { warnIfUnmounted } from '@/common/utils';\n\nexport default {\n compatConfig: { MODE: 3 },\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 * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\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 mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\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"],"names":["this","_openBlock","_createElementBlock","_createVNode","_renderSlot","_withCtx","_createBlock","_mergeProps","_normalizeClass","_createCommentVNode"],"mappings":";;;;;;;;AAmFA,MAAK,YAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,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,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;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaD,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS,MAAM,CAAC,GAAG,EAAE;AAAA,IACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,qBAAqB;AAAA,MACnB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,iBAAiB;AAAA,MACf,M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A,CAAA;AAAA,UAEjJ,OAAM;AAAA,UACL,cAAY,OAAgB;AAAA,UAC5B,QAAQ,MAAI;AAAA,UACZ,SAAO,SAAU;AAAA;UAEP,cACT,MAGE;AAAA,YAHFL,YAGE,+BAAA;AAAA,cAFA,OAAM;AAAA,cACN,MAAK;AAAA;;UA1DnB,GAAA;AAAA;;MA+DiB,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;MAtErC,GAAA;AAAA,+IAAAK,mBAAA,IAAA,IAAA;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=\"d-recipe-callbar-button-with-popover\"\n v-bind=\"addClassStyleAttrs($attrs)\"\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 :inverted-tooltip=\"invertedTooltip\"\n :show-tooltip=\"showTooltip\"\n :tooltip-text=\"tooltipText\"\n :tooltip-delay=\"tooltipDelay\"\n class=\"d-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=\"d-recipe-callbar-button-with-popover__popover-wrapper\"\n :dialog-class=\"['d-recipe-callbar-button-with-popover__popover', contentClass]\"\n v-bind=\"removeClassStyleAttrs($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=\"['d-recipe-callbar-button-with-popover__arrow',\n { 'd-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=\"d-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, { warnIfUnmounted, removeClassStyleAttrs, addClassStyleAttrs, returnFirstEl } from '@/common/utils';\n\nexport default {\n compatConfig: { MODE: 3 },\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 * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\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 mounted () {\n warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n },\n\n methods: {\n removeClassStyleAttrs,\n addClassStyleAttrs,\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"],"names":["this","_createElementBlock","_mergeProps","_createVNode","_renderSlot","_withCtx","_openBlock","_createBlock","_normalizeClass","_createCommentVNode"],"mappings":";;;;;;;;AAoFA,MAAK,YAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,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,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;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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,SAAQ;AAAA,MACR,OAAM;AAAA,MACL,kEAAgE,OAAY,YAAA;AAAA,IACrE,GAAA,SAAA,sBAAsB,KAAM,MAAA,GAAA;AAAA,MACnC,gBAAc,SAAW;AAAA,MACzB,UAAQ,SAAe;AAAA;MAEb,gBACT,MAiBY;AAAA,QAjBZC,YAiBY,sBAAA;AAAA,UAhBV,QAAA;AAAA,UACA,YAAW;AAAA,UACX,MAAK;AAAA,UACJ,OAjDXK,eAAA;AAAA,YAAA;AAAA,qEAiD8I,SAAa,cAAA;AAAA,UAAA,CAAA;AAAA,UAEjJ,OAAM;AAAA,UACL,cAAY,OAAgB;AAAA,UAC5B,QAAQ,MAAI;AAAA,UACZ,SAAO,SAAU;AAAA;UAEP,cACT,MAGE;AAAA,YAHFL,YAGE,+BAAA;AAAA,cAFA,OAAM;AAAA,cACN,MAAK;AAAA;;UA3DnB,GAAA;AAAA;;MAgEiB,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;MAvErC,GAAA;AAAA,+IAAAK,mBAAA,IAAA,IAAA;AAAA;;;"}
@@ -396,10 +396,10 @@ const _sfc_main = {
396
396
  (_a = this.$refs.comboboxWithPopover) == null ? void 0 : _a.closeComboboxList();
397
397
  },
398
398
  getChipButtons() {
399
- return this.$refs.chips && this.$refs.chips.map((chip2) => chip2.$el.querySelector("button"));
399
+ return this.$refs.chips && this.$refs.chips.map((chip2) => common_utils.returnFirstEl(chip2.$el).querySelector("button"));
400
400
  },
401
401
  getChips() {
402
- return this.$refs.chips && this.$refs.chips.map((chip2) => chip2.$el);
402
+ return this.$refs.chips && this.$refs.chips.map((chip2) => common_utils.returnFirstEl(chip2.$el));
403
403
  },
404
404
  getLastChipButton() {
405
405
  return this.$refs.chips && this.getChipButtons()[this.getChipButtons().length - 1];