@dialpad/dialtone-vue 3.210.0 → 3.211.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (437) hide show
  1. package/dist/common/constants/index.cjs +1 -1
  2. package/dist/common/constants/index.cjs.map +1 -1
  3. package/dist/common/constants/index.js +10 -10
  4. package/dist/common/constants/index.js.map +1 -1
  5. package/dist/common/mixins/keyboard-list-navigation.cjs +1 -1
  6. package/dist/common/mixins/keyboard-list-navigation.cjs.map +1 -1
  7. package/dist/common/mixins/keyboard-list-navigation.js +7 -7
  8. package/dist/common/mixins/keyboard-list-navigation.js.map +1 -1
  9. package/dist/component-documentation.json +1 -1
  10. package/dist/dialtone-vue.cjs +1 -1
  11. package/dist/dialtone-vue.js +425 -387
  12. package/dist/dialtone-vue.js.map +1 -1
  13. package/dist/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  14. package/dist/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
  15. package/dist/lib/attachment-carousel/attachment-carousel.js +64 -117
  16. package/dist/lib/attachment-carousel/attachment-carousel.js.map +1 -1
  17. package/dist/lib/avatar/avatar-constants.cjs +1 -1
  18. package/dist/lib/avatar/avatar-constants.cjs.map +1 -1
  19. package/dist/lib/avatar/avatar-constants.js +169 -43
  20. package/dist/lib/avatar/avatar-constants.js.map +1 -1
  21. package/dist/lib/avatar/avatar.cjs +1 -1
  22. package/dist/lib/avatar/avatar.cjs.map +1 -1
  23. package/dist/lib/avatar/avatar.js +185 -100
  24. package/dist/lib/avatar/avatar.js.map +1 -1
  25. package/dist/lib/avatar/index.cjs +1 -1
  26. package/dist/lib/avatar/index.js +16 -10
  27. package/dist/lib/badge/badge.cjs +1 -1
  28. package/dist/lib/badge/badge.cjs.map +1 -1
  29. package/dist/lib/badge/badge.js +47 -35
  30. package/dist/lib/badge/badge.js.map +1 -1
  31. package/dist/lib/button/button-constants.cjs +1 -1
  32. package/dist/lib/button/button-constants.cjs.map +1 -1
  33. package/dist/lib/button/button-constants.js +23 -19
  34. package/dist/lib/button/button-constants.js.map +1 -1
  35. package/dist/lib/button/button.cjs +1 -1
  36. package/dist/lib/button/button.cjs.map +1 -1
  37. package/dist/lib/button/button.js +171 -66
  38. package/dist/lib/button/button.js.map +1 -1
  39. package/dist/lib/callbar-button/callbar-button.cjs +1 -1
  40. package/dist/lib/callbar-button/callbar-button.cjs.map +1 -1
  41. package/dist/lib/callbar-button/callbar-button.js +13 -14
  42. package/dist/lib/callbar-button/callbar-button.js.map +1 -1
  43. package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  44. package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
  45. package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +42 -30
  46. package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  47. package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  48. package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
  49. package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.js +38 -26
  50. package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  51. package/dist/lib/callbox/callbox.cjs +1 -1
  52. package/dist/lib/callbox/callbox.cjs.map +1 -1
  53. package/dist/lib/callbox/callbox.js +47 -47
  54. package/dist/lib/callbox/callbox.js.map +1 -1
  55. package/dist/lib/chip/chip.cjs +1 -1
  56. package/dist/lib/chip/chip.cjs.map +1 -1
  57. package/dist/lib/chip/chip.js +1 -1
  58. package/dist/lib/chip/chip.js.map +1 -1
  59. package/dist/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  60. package/dist/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  61. package/dist/lib/combobox-multi-select/combobox-multi-select.js +31 -31
  62. package/dist/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  63. package/dist/lib/contact-centers-row/contact-centers-row.cjs +1 -1
  64. package/dist/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
  65. package/dist/lib/contact-centers-row/contact-centers-row.js +33 -33
  66. package/dist/lib/contact-centers-row/contact-centers-row.js.map +1 -1
  67. package/dist/lib/contact-info/contact-info.cjs +1 -1
  68. package/dist/lib/contact-info/contact-info.cjs.map +1 -1
  69. package/dist/lib/contact-info/contact-info.js +56 -56
  70. package/dist/lib/contact-info/contact-info.js.map +1 -1
  71. package/dist/lib/contact-row/contact-row.cjs +1 -1
  72. package/dist/lib/contact-row/contact-row.cjs.map +1 -1
  73. package/dist/lib/contact-row/contact-row.js +1 -1
  74. package/dist/lib/contact-row/contact-row.js.map +1 -1
  75. package/dist/lib/datepicker/datepicker.cjs +1 -1
  76. package/dist/lib/datepicker/datepicker.cjs.map +1 -1
  77. package/dist/lib/datepicker/datepicker.js +11 -11
  78. package/dist/lib/datepicker/datepicker.js.map +1 -1
  79. package/dist/lib/editor/editor.cjs.map +1 -1
  80. package/dist/lib/editor/editor.js.map +1 -1
  81. package/dist/lib/emoji-picker/emoji-picker.cjs +1 -1
  82. package/dist/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  83. package/dist/lib/emoji-picker/emoji-picker.js +2 -2
  84. package/dist/lib/emoji-picker/emoji-picker.js.map +1 -1
  85. package/dist/lib/feed-item-pill/feed-item-pill.cjs +1 -1
  86. package/dist/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
  87. package/dist/lib/feed-item-pill/feed-item-pill.js +56 -53
  88. package/dist/lib/feed-item-pill/feed-item-pill.js.map +1 -1
  89. package/dist/lib/feed-item-row/feed-item-row.cjs +1 -1
  90. package/dist/lib/feed-item-row/feed-item-row.cjs.map +1 -1
  91. package/dist/lib/feed-item-row/feed-item-row.js +11 -11
  92. package/dist/lib/feed-item-row/feed-item-row.js.map +1 -1
  93. package/dist/lib/filter-pill/filter-pill.cjs +2 -0
  94. package/dist/lib/filter-pill/filter-pill.cjs.map +1 -0
  95. package/dist/lib/filter-pill/filter-pill.js +346 -0
  96. package/dist/lib/filter-pill/filter-pill.js.map +1 -0
  97. package/dist/lib/filter-pill/index.cjs +2 -0
  98. package/dist/lib/filter-pill/index.cjs.map +1 -0
  99. package/dist/lib/filter-pill/index.js +5 -0
  100. package/dist/lib/filter-pill/index.js.map +1 -0
  101. package/dist/lib/general-row/general-row.cjs +1 -1
  102. package/dist/lib/general-row/general-row.cjs.map +1 -1
  103. package/dist/lib/general-row/general-row.js +153 -99
  104. package/dist/lib/general-row/general-row.js.map +1 -1
  105. package/dist/lib/group-row/group-row.cjs +1 -1
  106. package/dist/lib/group-row/group-row.cjs.map +1 -1
  107. package/dist/lib/group-row/group-row.js +1 -1
  108. package/dist/lib/group-row/group-row.js.map +1 -1
  109. package/dist/lib/grouped-chip/grouped-chip.cjs +1 -1
  110. package/dist/lib/grouped-chip/grouped-chip.cjs.map +1 -1
  111. package/dist/lib/grouped-chip/grouped-chip.js +31 -31
  112. package/dist/lib/grouped-chip/grouped-chip.js.map +1 -1
  113. package/dist/lib/input/input.cjs +1 -1
  114. package/dist/lib/input/input.cjs.map +1 -1
  115. package/dist/lib/input/input.js +53 -42
  116. package/dist/lib/input/input.js.map +1 -1
  117. package/dist/lib/item-layout/item-layout.cjs +3 -3
  118. package/dist/lib/item-layout/item-layout.cjs.map +1 -1
  119. package/dist/lib/item-layout/item-layout.js +74 -39
  120. package/dist/lib/item-layout/item-layout.js.map +1 -1
  121. package/dist/lib/kitchen-sink/kitchen-sink-view.cjs +2 -0
  122. package/dist/lib/kitchen-sink/kitchen-sink-view.cjs.map +1 -0
  123. package/dist/lib/kitchen-sink/kitchen-sink-view.js +263 -0
  124. package/dist/lib/kitchen-sink/kitchen-sink-view.js.map +1 -0
  125. package/dist/lib/link/link.cjs +1 -1
  126. package/dist/lib/link/link.cjs.map +1 -1
  127. package/dist/lib/link/link.js +21 -12
  128. package/dist/lib/link/link.js.map +1 -1
  129. package/dist/lib/list-item/list-item.cjs +1 -1
  130. package/dist/lib/list-item/list-item.cjs.map +1 -1
  131. package/dist/lib/list-item/list-item.js +25 -15
  132. package/dist/lib/list-item/list-item.js.map +1 -1
  133. package/dist/lib/loader/loader.cjs +13 -1
  134. package/dist/lib/loader/loader.cjs.map +1 -1
  135. package/dist/lib/loader/loader.js +31 -20
  136. package/dist/lib/loader/loader.js.map +1 -1
  137. package/dist/lib/message-input/message-input.cjs +1 -1
  138. package/dist/lib/message-input/message-input.cjs.map +1 -1
  139. package/dist/lib/message-input/message-input.js +39 -39
  140. package/dist/lib/message-input/message-input.js.map +1 -1
  141. package/dist/lib/mode-island/index.cjs +2 -0
  142. package/dist/lib/mode-island/index.cjs.map +1 -0
  143. package/dist/lib/mode-island/index.js +7 -0
  144. package/dist/lib/mode-island/index.js.map +1 -0
  145. package/dist/lib/mode-island/mode-island-constants.cjs +2 -0
  146. package/dist/lib/mode-island/mode-island-constants.cjs.map +1 -0
  147. package/dist/lib/mode-island/mode-island-constants.js +12 -0
  148. package/dist/lib/mode-island/mode-island-constants.js.map +1 -0
  149. package/dist/lib/mode-island/mode-island.cjs +2 -0
  150. package/dist/lib/mode-island/mode-island.cjs.map +1 -0
  151. package/dist/lib/mode-island/mode-island.js +130 -0
  152. package/dist/lib/mode-island/mode-island.js.map +1 -0
  153. package/dist/lib/mode-island/utils.cjs +2 -0
  154. package/dist/lib/mode-island/utils.cjs.map +1 -0
  155. package/dist/lib/mode-island/utils.js +32 -0
  156. package/dist/lib/mode-island/utils.js.map +1 -0
  157. package/dist/lib/mode-island/validators.cjs +2 -0
  158. package/dist/lib/mode-island/validators.cjs.map +1 -0
  159. package/dist/lib/mode-island/validators.js +12 -0
  160. package/dist/lib/mode-island/validators.js.map +1 -0
  161. package/dist/lib/notice/notice-action.cjs +1 -1
  162. package/dist/lib/notice/notice-action.cjs.map +1 -1
  163. package/dist/lib/notice/notice-action.js +7 -7
  164. package/dist/lib/notice/notice-action.js.map +1 -1
  165. package/dist/lib/pagination/pagination.cjs +1 -1
  166. package/dist/lib/pagination/pagination.cjs.map +1 -1
  167. package/dist/lib/pagination/pagination.js +15 -14
  168. package/dist/lib/pagination/pagination.js.map +1 -1
  169. package/dist/lib/popover/popover.cjs +1 -1
  170. package/dist/lib/popover/popover.cjs.map +1 -1
  171. package/dist/lib/popover/popover.js +1 -1
  172. package/dist/lib/popover/popover.js.map +1 -1
  173. package/dist/lib/progress-circle/index.cjs +2 -0
  174. package/dist/lib/progress-circle/index.cjs.map +1 -0
  175. package/dist/lib/progress-circle/index.js +10 -0
  176. package/dist/lib/progress-circle/index.js.map +1 -0
  177. package/dist/lib/progress-circle/progress-circle-constants.cjs +2 -0
  178. package/dist/lib/progress-circle/progress-circle-constants.cjs.map +1 -0
  179. package/dist/lib/progress-circle/progress-circle-constants.js +25 -0
  180. package/dist/lib/progress-circle/progress-circle-constants.js.map +1 -0
  181. package/dist/lib/progress-circle/progress-circle.cjs +2 -0
  182. package/dist/lib/progress-circle/progress-circle.cjs.map +1 -0
  183. package/dist/lib/progress-circle/progress-circle.js +136 -0
  184. package/dist/lib/progress-circle/progress-circle.js.map +1 -0
  185. package/dist/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  186. package/dist/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  187. package/dist/lib/root-layout/root-layout-constants.cjs +1 -1
  188. package/dist/lib/root-layout/root-layout-constants.cjs.map +1 -1
  189. package/dist/lib/root-layout/root-layout-constants.js +4 -2
  190. package/dist/lib/root-layout/root-layout-constants.js.map +1 -1
  191. package/dist/lib/root-layout/root-layout.cjs +1 -1
  192. package/dist/lib/root-layout/root-layout.cjs.map +1 -1
  193. package/dist/lib/root-layout/root-layout.js +9 -10
  194. package/dist/lib/root-layout/root-layout.js.map +1 -1
  195. package/dist/lib/settings-menu-button/settings-menu-button.cjs +1 -1
  196. package/dist/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
  197. package/dist/lib/settings-menu-button/settings-menu-button.js +14 -15
  198. package/dist/lib/settings-menu-button/settings-menu-button.js.map +1 -1
  199. package/dist/lib/split-button/split-button-alpha.cjs +1 -1
  200. package/dist/lib/split-button/split-button-alpha.cjs.map +1 -1
  201. package/dist/lib/split-button/split-button-alpha.js +86 -33
  202. package/dist/lib/split-button/split-button-alpha.js.map +1 -1
  203. package/dist/lib/split-button/split-button.cjs +1 -1
  204. package/dist/lib/split-button/split-button.cjs.map +1 -1
  205. package/dist/lib/split-button/split-button.js +282 -92
  206. package/dist/lib/split-button/split-button.js.map +1 -1
  207. package/dist/lib/tab/index.cjs +1 -1
  208. package/dist/lib/tab/index.js +13 -11
  209. package/dist/lib/tab/tab-group.cjs +1 -1
  210. package/dist/lib/tab/tab-group.cjs.map +1 -1
  211. package/dist/lib/tab/tab-group.js +107 -46
  212. package/dist/lib/tab/tab-group.js.map +1 -1
  213. package/dist/lib/tab/tab.cjs +1 -1
  214. package/dist/lib/tab/tab.cjs.map +1 -1
  215. package/dist/lib/tab/tab.js +128 -37
  216. package/dist/lib/tab/tab.js.map +1 -1
  217. package/dist/lib/tab/tabs-constants.cjs +1 -1
  218. package/dist/lib/tab/tabs-constants.cjs.map +1 -1
  219. package/dist/lib/tab/tabs-constants.js +13 -11
  220. package/dist/lib/tab/tabs-constants.js.map +1 -1
  221. package/dist/lib/text/index.cjs +2 -0
  222. package/dist/lib/text/index.cjs.map +1 -0
  223. package/dist/lib/text/index.js +20 -0
  224. package/dist/lib/text/index.js.map +1 -0
  225. package/dist/lib/text/text-constants.cjs +2 -0
  226. package/dist/lib/text/text-constants.cjs.map +1 -0
  227. package/dist/lib/text/text-constants.js +69 -0
  228. package/dist/lib/text/text-constants.js.map +1 -0
  229. package/dist/lib/text/text-tone-tokens.cjs +2 -0
  230. package/dist/lib/text/text-tone-tokens.cjs.map +1 -0
  231. package/dist/lib/text/text-tone-tokens.js +33 -0
  232. package/dist/lib/text/text-tone-tokens.js.map +1 -0
  233. package/dist/lib/text/text.cjs +2 -0
  234. package/dist/lib/text/text.cjs.map +1 -0
  235. package/dist/lib/text/text.js +203 -0
  236. package/dist/lib/text/text.js.map +1 -0
  237. package/dist/lib/top-banner-info/top-banner-info.cjs +1 -1
  238. package/dist/lib/top-banner-info/top-banner-info.cjs.map +1 -1
  239. package/dist/lib/top-banner-info/top-banner-info.js +16 -16
  240. package/dist/lib/top-banner-info/top-banner-info.js.map +1 -1
  241. package/dist/localization/en-US.cjs +2 -0
  242. package/dist/localization/en-US.cjs.map +1 -1
  243. package/dist/localization/en-US.js +2 -0
  244. package/dist/localization/en-US.js.map +1 -1
  245. package/dist/localization/es-LA.cjs +1 -1
  246. package/dist/localization/es-LA.cjs.map +1 -1
  247. package/dist/localization/es-LA.js +1 -1
  248. package/dist/localization/es-LA.js.map +1 -1
  249. package/dist/localization/it-IT.cjs +3 -3
  250. package/dist/localization/it-IT.cjs.map +1 -1
  251. package/dist/localization/it-IT.js +3 -3
  252. package/dist/localization/it-IT.js.map +1 -1
  253. package/dist/localization/nl-NL.cjs +2 -2
  254. package/dist/localization/nl-NL.cjs.map +1 -1
  255. package/dist/localization/nl-NL.js +2 -2
  256. package/dist/localization/nl-NL.js.map +1 -1
  257. package/dist/localization/ru-RU.cjs +1 -1
  258. package/dist/localization/ru-RU.cjs.map +1 -1
  259. package/dist/localization/ru-RU.js +1 -1
  260. package/dist/localization/ru-RU.js.map +1 -1
  261. package/dist/localization/zh-CN.cjs +1 -1
  262. package/dist/localization/zh-CN.cjs.map +1 -1
  263. package/dist/localization/zh-CN.js +1 -1
  264. package/dist/localization/zh-CN.js.map +1 -1
  265. package/dist/node_modules/@tiptap/vue-3.cjs.map +1 -1
  266. package/dist/node_modules/@tiptap/vue-3.js.map +1 -1
  267. package/dist/style.css +1 -1
  268. package/dist/types/common/mixins/keyboard_list_navigation.d.ts.map +1 -1
  269. package/dist/types/common/sr_only_close_button.vue.d.ts +38 -2
  270. package/dist/types/components/avatar/avatar.vue.d.ts +71 -25
  271. package/dist/types/components/avatar/avatar.vue.d.ts.map +1 -1
  272. package/dist/types/components/avatar/avatar_constants.d.ts +86 -29
  273. package/dist/types/components/avatar/avatar_constants.d.ts.map +1 -1
  274. package/dist/types/components/avatar/index.d.ts +1 -1
  275. package/dist/types/components/badge/badge.vue.d.ts.map +1 -1
  276. package/dist/types/components/banner/banner.vue.d.ts +76 -4
  277. package/dist/types/components/banner/banner.vue.d.ts.map +1 -1
  278. package/dist/types/components/breadcrumbs/breadcrumb_item.vue.d.ts +9 -0
  279. package/dist/types/components/breadcrumbs/breadcrumb_item.vue.d.ts.map +1 -1
  280. package/dist/types/components/breadcrumbs/breadcrumbs.vue.d.ts +9 -0
  281. package/dist/types/components/button/button.vue.d.ts +38 -2
  282. package/dist/types/components/button/button.vue.d.ts.map +1 -1
  283. package/dist/types/components/button/button_constants.d.ts +4 -0
  284. package/dist/types/components/button/button_constants.d.ts.map +1 -1
  285. package/dist/types/components/chip/chip.vue.d.ts +38 -2
  286. package/dist/types/components/chip/chip.vue.d.ts.map +1 -1
  287. package/dist/types/components/collapsible/collapsible.vue.d.ts +38 -2
  288. package/dist/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
  289. package/dist/types/components/combobox/combobox.vue.d.ts +79 -13
  290. package/dist/types/components/combobox/combobox.vue.d.ts.map +1 -1
  291. package/dist/types/components/combobox/combobox_empty-list.vue.d.ts +39 -6
  292. package/dist/types/components/combobox/combobox_empty-list.vue.d.ts.map +1 -1
  293. package/dist/types/components/combobox/combobox_loading-list.vue.d.ts +39 -6
  294. package/dist/types/components/combobox/combobox_loading-list.vue.d.ts.map +1 -1
  295. package/dist/types/components/dropdown/dropdown.vue.d.ts +76 -4
  296. package/dist/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
  297. package/dist/types/components/filter_pill/filter_pill.vue.d.ts +2070 -0
  298. package/dist/types/components/filter_pill/filter_pill.vue.d.ts.map +1 -0
  299. package/dist/types/components/filter_pill/index.d.ts +2 -0
  300. package/dist/types/components/filter_pill/index.d.ts.map +1 -0
  301. package/dist/types/components/hovercard/hovercard.vue.d.ts +152 -8
  302. package/dist/types/components/hovercard/hovercard.vue.d.ts.map +1 -1
  303. package/dist/types/components/image_viewer/image_viewer.vue.d.ts +76 -4
  304. package/dist/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  305. package/dist/types/components/input/input.vue.d.ts.map +1 -1
  306. package/dist/types/components/item_layout/item_layout.vue.d.ts +36 -5
  307. package/dist/types/components/item_layout/item_layout.vue.d.ts.map +1 -1
  308. package/dist/types/components/link/link.vue.d.ts +9 -0
  309. package/dist/types/components/list_item/list_item.vue.d.ts +39 -6
  310. package/dist/types/components/list_item/list_item.vue.d.ts.map +1 -1
  311. package/dist/types/components/loader/loader.vue.d.ts +1 -32
  312. package/dist/types/components/loader/loader.vue.d.ts.map +1 -1
  313. package/dist/types/components/modal/modal.vue.d.ts +76 -4
  314. package/dist/types/components/modal/modal.vue.d.ts.map +1 -1
  315. package/dist/types/components/mode_island/index.d.ts +3 -0
  316. package/dist/types/components/mode_island/index.d.ts.map +1 -0
  317. package/dist/types/components/mode_island/mode_island.vue.d.ts +3 -0
  318. package/dist/types/components/mode_island/mode_island.vue.d.ts.map +1 -0
  319. package/dist/types/components/mode_island/mode_island_constants.d.ts +10 -0
  320. package/dist/types/components/mode_island/mode_island_constants.d.ts.map +1 -0
  321. package/dist/types/components/mode_island/utils.d.ts +12 -0
  322. package/dist/types/components/mode_island/utils.d.ts.map +1 -0
  323. package/dist/types/components/mode_island/validators.d.ts +6 -0
  324. package/dist/types/components/mode_island/validators.d.ts.map +1 -0
  325. package/dist/types/components/notice/notice.vue.d.ts +76 -4
  326. package/dist/types/components/notice/notice.vue.d.ts.map +1 -1
  327. package/dist/types/components/notice/notice_action.vue.d.ts +76 -4
  328. package/dist/types/components/notice/notice_action.vue.d.ts.map +1 -1
  329. package/dist/types/components/pagination/pagination.vue.d.ts +38 -2
  330. package/dist/types/components/pagination/pagination.vue.d.ts.map +1 -1
  331. package/dist/types/components/popover/popover.vue.d.ts +76 -4
  332. package/dist/types/components/popover/popover.vue.d.ts.map +1 -1
  333. package/dist/types/components/popover/popover_header_footer.vue.d.ts +38 -2
  334. package/dist/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
  335. package/dist/types/components/progress_circle/index.d.ts +3 -0
  336. package/dist/types/components/progress_circle/index.d.ts.map +1 -0
  337. package/dist/types/components/progress_circle/progress_circle.vue.d.ts +70 -0
  338. package/dist/types/components/progress_circle/progress_circle.vue.d.ts.map +1 -0
  339. package/dist/types/components/progress_circle/progress_circle_constants.d.ts +23 -0
  340. package/dist/types/components/progress_circle/progress_circle_constants.d.ts.map +1 -0
  341. package/dist/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +9 -0
  342. package/dist/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts.map +1 -1
  343. package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +9 -0
  344. package/dist/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts +71 -25
  345. package/dist/types/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts +39 -6
  346. package/dist/types/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts.map +1 -1
  347. package/dist/types/components/rich_text_editor/extensions/variable/VariableComponent.vue.d.ts +114 -6
  348. package/dist/types/components/rich_text_editor/extensions/variable/VariableComponent.vue.d.ts.map +1 -1
  349. package/dist/types/components/root_layout/root_layout_constants.d.ts +2 -0
  350. package/dist/types/components/root_layout/root_layout_constants.d.ts.map +1 -1
  351. package/dist/types/components/split_button/split_button-alpha.vue.d.ts +57 -3
  352. package/dist/types/components/split_button/split_button-alpha.vue.d.ts.map +1 -1
  353. package/dist/types/components/split_button/split_button-omega.vue.d.ts +38 -2
  354. package/dist/types/components/split_button/split_button-omega.vue.d.ts.map +1 -1
  355. package/dist/types/components/split_button/split_button.vue.d.ts +342 -28
  356. package/dist/types/components/split_button/split_button.vue.d.ts.map +1 -1
  357. package/dist/types/components/tab/index.d.ts +1 -1
  358. package/dist/types/components/tab/tab.vue.d.ts +73 -7
  359. package/dist/types/components/tab/tab.vue.d.ts.map +1 -1
  360. package/dist/types/components/tab/tab_group.vue.d.ts +42 -0
  361. package/dist/types/components/tab/tab_group.vue.d.ts.map +1 -1
  362. package/dist/types/components/tab/tabs_constants.d.ts +5 -3
  363. package/dist/types/components/tab/tabs_constants.d.ts.map +1 -1
  364. package/dist/types/components/text/index.d.ts +3 -0
  365. package/dist/types/components/text/index.d.ts.map +1 -0
  366. package/dist/types/components/text/scripts/update-text-tone-tokens.d.cts +3 -0
  367. package/dist/types/components/text/scripts/update-text-tone-tokens.d.cts.map +1 -0
  368. package/dist/types/components/text/scripts/update_text_tone_tokens.d.cts +3 -0
  369. package/dist/types/components/text/scripts/update_text_tone_tokens.d.cts.map +1 -0
  370. package/dist/types/components/text/scripts/update_text_tone_tokens.d.ts +1 -0
  371. package/dist/types/components/text/scripts/update_text_tone_tokens.d.ts.map +1 -0
  372. package/dist/types/components/text/text.vue.d.ts +141 -0
  373. package/dist/types/components/text/text.vue.d.ts.map +1 -0
  374. package/dist/types/components/text/text_constants.d.ts +73 -0
  375. package/dist/types/components/text/text_constants.d.ts.map +1 -0
  376. package/dist/types/components/text/text_tone_tokens.d.ts +3 -0
  377. package/dist/types/components/text/text_tone_tokens.d.ts.map +1 -0
  378. package/dist/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +76 -4
  379. package/dist/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
  380. package/dist/types/components/toast/layouts/toast_layout_default.vue.d.ts +76 -4
  381. package/dist/types/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
  382. package/dist/types/components/toast/toast.vue.d.ts +304 -16
  383. package/dist/types/components/toast/toast.vue.d.ts.map +1 -1
  384. package/dist/types/index.d.ts +4 -0
  385. package/dist/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +38 -2
  386. package/dist/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts.map +1 -1
  387. package/dist/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +152 -8
  388. package/dist/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
  389. package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +152 -8
  390. package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
  391. package/dist/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +114 -6
  392. package/dist/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  393. package/dist/types/recipes/chips/grouped_chip/grouped_chip.vue.d.ts +38 -2
  394. package/dist/types/recipes/chips/grouped_chip/grouped_chip.vue.d.ts.map +1 -1
  395. package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +234 -30
  396. package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
  397. package/dist/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +196 -12
  398. package/dist/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  399. package/dist/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +158 -10
  400. package/dist/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -1
  401. package/dist/types/recipes/conversation_view/editor/EditorToolbarButton.vue.d.ts +38 -2
  402. package/dist/types/recipes/conversation_view/editor/EditorToolbarDropdownButton.vue.d.ts +114 -6
  403. package/dist/types/recipes/conversation_view/editor/EditorToolbarDropdownButton.vue.d.ts.map +1 -1
  404. package/dist/types/recipes/conversation_view/editor/EditorToolbarPopoverButton.vue.d.ts +114 -6
  405. package/dist/types/recipes/conversation_view/editor/EditorToolbarPopoverButton.vue.d.ts.map +1 -1
  406. package/dist/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +38 -2
  407. package/dist/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
  408. package/dist/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +74 -7
  409. package/dist/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
  410. package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +110 -31
  411. package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  412. package/dist/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +74 -7
  413. package/dist/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
  414. package/dist/types/recipes/conversation_view/message_input/message_input_button.vue.d.ts +38 -2
  415. package/dist/types/recipes/conversation_view/message_input/message_input_button.vue.d.ts.map +1 -1
  416. package/dist/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +152 -8
  417. package/dist/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
  418. package/dist/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +38 -2
  419. package/dist/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
  420. package/dist/types/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts +38 -2
  421. package/dist/types/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts.map +1 -1
  422. package/dist/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +107 -30
  423. package/dist/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
  424. package/dist/types/recipes/leftbar/callbox/callbox.vue.d.ts +71 -25
  425. package/dist/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
  426. package/dist/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +38 -2
  427. package/dist/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
  428. package/dist/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +467 -28
  429. package/dist/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  430. package/dist/types/recipes/leftbar/general_row/general_row.vue.d.ts +396 -3
  431. package/dist/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  432. package/dist/types/recipes/leftbar/group_row/group_row.vue.d.ts +396 -3
  433. package/dist/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
  434. package/dist/types/recipes/notices/top_banner_info/top_banner_info.vue.d.ts.map +1 -1
  435. package/package.json +7 -6
  436. package/dist/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +0 -30
  437. package/dist/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"callbar-button.js","sources":["../../../recipes/buttons/callbar_button/callbar_button.vue"],"sourcesContent":["<template>\n <dt-tooltip\n :id=\"id\"\n :inverted=\"invertedTooltip\"\n v-bind=\"addClassStyleAttrs($attrs)\"\n :delay=\"tooltipDelay\"\n :show=\"showTooltip\"\n :offset=\"[0, 24]\"\n >\n <template #anchor>\n <span\n :class=\"{ 'd-recipe-callbar-button--disabled': disabled }\"\n >\n <dt-button\n :importance=\"buttonImportance\"\n kind=\"muted\"\n icon-position=\"top\"\n :aria-disabled=\"disabled\"\n :aria-label=\"ariaLabel\"\n :label-class=\"callbarButtonTextClass\"\n :width=\"buttonWidth\"\n :class=\"callbarButtonClass\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n v-on=\"callbarButtonListeners\"\n >\n <slot />\n <template #icon>\n <slot name=\"icon\" />\n </template>\n </dt-button>\n </span>\n </template>\n <slot name=\"tooltip\">\n {{ tooltipText }}\n </slot>\n </dt-tooltip>\n</template>\n\n<script>\nimport { CALLBAR_BUTTON_VALID_WIDTH_SIZE } from './callbar_button_constants';\nimport { DtButton } from '@/components/button';\nimport { DtTooltip } from '@/components/tooltip';\nimport utils, { extractVueListeners, removeClassStyleAttrs, addClassStyleAttrs } from '@/common/utils';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeCallbarButton',\n\n components: { DtButton, DtTooltip },\n\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 * 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 * 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 * Whether the button is a circle or not.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n circle: {\n type: Boolean,\n default: false,\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 * 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 * The fill and outline of the button associated with its visual importance.\n * @values clear, outlined, primary\n */\n importance: {\n type: String,\n default: '',\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 * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n computed: {\n callbarButtonClass () {\n return [\n this.buttonClass,\n 'd-recipe-callbar-button',\n {\n 'd-recipe-callbar-button--circle': this.circle,\n 'd-recipe-callbar-button--active': this.active,\n 'd-recipe-callbar-button--danger': this.danger,\n 'd-btn--disabled': this.disabled,\n }];\n },\n\n callbarButtonTextClass () {\n return [\n 'd-recipe-callbar-button__text',\n this.textClass,\n ];\n },\n\n buttonWidth () {\n switch (this.buttonWidthSize) {\n case 'sm':\n return '4.5rem';\n case 'md':\n return '6rem';\n default:\n return '8.4rem';\n }\n },\n\n buttonImportance () {\n if (this.importance) {\n return this.importance;\n }\n return this.circle ? 'outlined' : 'clear';\n },\n\n callbarButtonListeners () {\n return {\n ...extractVueListeners(this.$attrs),\n click: (event) => this.$emit('click', event),\n };\n },\n },\n\n methods: {\n removeClassStyleAttrs,\n addClassStyleAttrs,\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtTooltip","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","extractVueListeners","event","removeClassStyleAttrs","addClassStyleAttrs","_openBlock","_createBlock","_component_dt_tooltip","_mergeProps","$props","$options","_ctx","_createElementVNode","_createVNode","_component_dt_button","_toHandlers","_renderSlot"],"mappings":";;;;;;AA4CA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM;EACtB,MAAM;AAAA,EAEN,YAAY,EAAE,UAAAC,GAAU,WAAAC;EAExB,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAOC,EAAM,gBAAe;AAAA,MAC9B;AAAA;;;;;;;IASF,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA;;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AEO;AAAA,YADFF,EAAA,WAAW,GAAA,CAAA;AAAA;;;;;;"}
1
+ {"version":3,"file":"callbar-button.js","sources":["../../../recipes/buttons/callbar_button/callbar_button.vue"],"sourcesContent":["<template>\n <dt-tooltip\n :id=\"id\"\n :inverted=\"invertedTooltip\"\n v-bind=\"addClassStyleAttrs($attrs)\"\n :delay=\"tooltipDelay\"\n :show=\"showTooltip\"\n :offset=\"[0, 24]\"\n >\n <template #anchor>\n <span\n :class=\"{ 'd-recipe-callbar-button--disabled': disabled }\"\n >\n <dt-button\n :importance=\"buttonImportance\"\n kind=\"muted\"\n :aria-disabled=\"disabled\"\n :aria-label=\"ariaLabel\"\n :label-class=\"callbarButtonTextClass\"\n :width=\"buttonWidth\"\n :class=\"callbarButtonClass\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n v-on=\"callbarButtonListeners\"\n >\n <slot />\n <!-- @slot Icon displayed above the button label (block-start) -->\n <template #blockStartIcon>\n <slot\n v-if=\"$slots.blockStartIcon\"\n name=\"blockStartIcon\"\n />\n <!-- @slot @deprecated Use blockStartIcon -->\n <slot\n v-else\n name=\"icon\"\n />\n </template>\n </dt-button>\n </span>\n </template>\n <slot name=\"tooltip\">\n {{ tooltipText }}\n </slot>\n </dt-tooltip>\n</template>\n\n<script>\nimport { CALLBAR_BUTTON_VALID_WIDTH_SIZE } from './callbar_button_constants';\nimport { DtButton } from '@/components/button';\nimport { DtTooltip } from '@/components/tooltip';\nimport utils, { extractVueListeners, removeClassStyleAttrs, addClassStyleAttrs } from '@/common/utils';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeCallbarButton',\n\n components: { DtButton, DtTooltip },\n\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 * 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 * 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 * Whether the button is a circle or not.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n circle: {\n type: Boolean,\n default: false,\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 * 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 * The fill and outline of the button associated with its visual importance.\n * @values clear, outlined, primary\n */\n importance: {\n type: String,\n default: '',\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 * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n computed: {\n callbarButtonClass () {\n return [\n this.buttonClass,\n 'd-recipe-callbar-button',\n {\n 'd-recipe-callbar-button--circle': this.circle,\n 'd-recipe-callbar-button--active': this.active,\n 'd-recipe-callbar-button--danger': this.danger,\n 'd-btn--disabled': this.disabled,\n }];\n },\n\n callbarButtonTextClass () {\n return [\n 'd-recipe-callbar-button__text',\n this.textClass,\n ];\n },\n\n buttonWidth () {\n switch (this.buttonWidthSize) {\n case 'sm':\n return '4.5rem';\n case 'md':\n return '6rem';\n default:\n return '8.4rem';\n }\n },\n\n buttonImportance () {\n if (this.importance) {\n return this.importance;\n }\n return this.circle ? 'outlined' : 'clear';\n },\n\n callbarButtonListeners () {\n return {\n ...extractVueListeners(this.$attrs),\n click: (event) => this.$emit('click', event),\n };\n },\n },\n\n methods: {\n removeClassStyleAttrs,\n addClassStyleAttrs,\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtTooltip","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","extractVueListeners","event","removeClassStyleAttrs","addClassStyleAttrs","_openBlock","_createBlock","_component_dt_tooltip","_mergeProps","$props","$options","_ctx","_createElementVNode","_createVNode","_component_dt_button","_toHandlers","_renderSlot"],"mappings":";;;;;;AAoDA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM;EACtB,MAAM;AAAA,EAEN,YAAY,EAAE,UAAAC,GAAU,WAAAC;EAExB,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAOC,EAAM,gBAAe;AAAA,MAC9B;AAAA;;;;;;;IASF,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA;;;;;;;IASX,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA;;;;;;IAQX,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA;;;;;;IAQX,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WA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ialpad/dialtone-icons/vue3"),n=require("../../common/utils/index.cjs"),p=require("../../localization/index.cjs"),t=require("vue"),b=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),w=require("../button/button.cjs"),h=require("../dropdown/dropdown.cjs"),_=require("../callbar-button/callbar-button.cjs"),m=require("../callbar-button/callbar-button-constants.cjs"),f={name:"DtRecipeCallbarButtonWithDropdown",components:{DtRecipeCallbarButton:_.default,DtDropdown:h.default,DtButton:w.default,DtIconChevronUp:u.DtIconChevronUp},inheritAttrs:!1,props:{id:{type:String,default(){return n.default.getUniqueString()}},ariaLabel:{type:String,default:null,validator:e=>e||(void 0).$slots.default},placement:{type:String,default:"top"},fallbackPlacements:{type:Array,default:()=>["auto"]},disabled:{type:Boolean,default:!1},forceShowArrow:{type:Boolean,default:!1},active:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},onClick:{type:Function,default:null},buttonClass:{type:[String,Array,Object],default:""},textClass:{type:[String,Array,Object],default:""},buttonWidthSize:{type:String,default:"xl",validator:e=>m.CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(e)},invertedTooltip:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:null},tooltipText:{type:String,default:void 0},tooltipDelay:{type:Boolean,default:void 0}},emits:["arrow-click","click","opened"],data(){return{open:!1,i18n:new p.DialtoneLocalization}},computed:{showArrowButton(){return this.forceShowArrow||!this.disabled},isCompactMode(){return this.buttonWidthSize==="sm"||this.buttonWidthSize==="md"},arrowButtonLabel(){return this.i18n.$t("DIALTONE_CALLBAR_BUTTON_WITH_DROPDOWN_ARROW_BUTTON_ARIA_LABEL")}},mounted(){n.warnIfUnmounted(n.returnFirstEl(this.$el),this.$options.name)},methods:{removeClassStyleAttrs:n.removeClassStyleAttrs,addClassStyleAttrs:n.addClassStyleAttrs,arrowClick(e){return this.$emit("arrow-click",e),this.toggleOpen()},toggleOpen(){return this.open=!this.open},syncOpenState(){this.open=this.openDropdown},buttonClick(e){this.$props.onClick?this.$emit("click",e):this.arrowClick(e)},onModalIsOpened(e){this.open=e,this.$emit("opened",e)}}};function C(e,B,o,S,a,l){const r=t.resolveComponent("dt-recipe-callbar-button"),i=t.resolveComponent("dt-icon-chevron-up"),d=t.resolveComponent("dt-button"),s=t.resolveComponent("dt-dropdown");return t.openBlock(),t.createElementBlock("div",t.mergeProps({class:"dt-recipe--callbar-button-with-dropdown"},l.addClassStyleAttrs(e.$attrs)),[t.createVNode(r,{active:o.active,"aria-label":o.ariaLabel,"button-class":o.buttonClass,"button-width-size":o.buttonWidthSize,danger:o.danger,disabled:o.disabled,"inverted-tooltip":o.invertedTooltip,"show-tooltip":o.showTooltip,"text-class":o.textClass,"tooltip-delay":o.tooltipDelay,"tooltip-text":o.tooltipText,class:"dt-recipe--callbar-button-with-dropdown--main-button",onClick:l.buttonClick},{icon:t.withCtx(()=>[t.renderSlot(e.$slots,"icon")]),tooltip:t.withCtx(()=>[t.renderSlot(e.$slots,"tooltip")]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["active","aria-label","button-class","button-width-size","danger","disabled","inverted-tooltip","show-tooltip","text-class","tooltip-delay","tooltip-text","onClick"]),l.showArrowButton?(t.openBlock(),t.createBlock(s,t.mergeProps({key:0,id:o.id,"fallback-placements":o.fallbackPlacements,open:a.open,modal:!1,placement:o.placement,class:"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper",padding:"none"},l.removeClassStyleAttrs(e.$attrs),{onOpened:l.onModalIsOpened}),{anchor:t.withCtx(()=>[t.createVNode(d,{active:a.open,class:t.normalizeClass(["dt-recipe--callbar-button-with-dropdown--arrow",{"dt-recipe--callbar-button-with-dropdown--arrow--large":!l.isCompactMode}]),circle:!0,importance:"clear",size:"lg","aria-label":l.arrowButtonLabel,title:l.arrowButtonLabel,width:"2rem",onClick:l.arrowClick},{icon:t.withCtx(()=>[t.createVNode(i,{class:"dt-recipe--callbar-button-with-dropdown--arrow__icon",size:"200"})]),_:1},8,["active","class","aria-label","title","onClick"])]),list:t.withCtx(({close:c})=>[t.renderSlot(e.$slots,"list",{close:c})]),_:3},16,["id","fallback-placements","open","placement","onOpened"])):t.createCommentVNode("",!0)],16)}const y=b._(f,[["render",C]]);exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("@dialpad/dialtone-icons/vue3"),n=require("../../common/utils/index.cjs"),p=require("../../localization/index.cjs"),t=require("vue"),b=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),w=require("../button/button.cjs"),h=require("../dropdown/dropdown.cjs"),f=require("../callbar-button/callbar-button.cjs"),m=require("../callbar-button/callbar-button-constants.cjs"),_={name:"DtRecipeCallbarButtonWithDropdown",components:{DtRecipeCallbarButton:f.default,DtDropdown:h.default,DtButton:w.default,DtIconChevronUp:u.DtIconChevronUp},inheritAttrs:!1,props:{id:{type:String,default(){return n.default.getUniqueString()}},ariaLabel:{type:String,default:null,validator:e=>e||(void 0).$slots.default},placement:{type:String,default:"top"},fallbackPlacements:{type:Array,default:()=>["auto"]},disabled:{type:Boolean,default:!1},forceShowArrow:{type:Boolean,default:!1},active:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},onClick:{type:Function,default:null},buttonClass:{type:[String,Array,Object],default:""},textClass:{type:[String,Array,Object],default:""},buttonWidthSize:{type:String,default:"xl",validator:e=>m.CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(e)},invertedTooltip:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:null},tooltipText:{type:String,default:void 0},tooltipDelay:{type:Boolean,default:void 0}},emits:["arrow-click","click","opened"],data(){return{open:!1,i18n:new p.DialtoneLocalization}},computed:{showArrowButton(){return this.forceShowArrow||!this.disabled},isCompactMode(){return this.buttonWidthSize==="sm"||this.buttonWidthSize==="md"},arrowButtonLabel(){return this.i18n.$t("DIALTONE_CALLBAR_BUTTON_WITH_DROPDOWN_ARROW_BUTTON_ARIA_LABEL")}},mounted(){n.warnIfUnmounted(n.returnFirstEl(this.$el),this.$options.name)},methods:{removeClassStyleAttrs:n.removeClassStyleAttrs,addClassStyleAttrs:n.addClassStyleAttrs,arrowClick(e){return this.$emit("arrow-click",e),this.toggleOpen()},toggleOpen(){return this.open=!this.open},syncOpenState(){this.open=this.openDropdown},buttonClick(e){this.$props.onClick?this.$emit("click",e):this.arrowClick(e)},onModalIsOpened(e){this.open=e,this.$emit("opened",e)}}};function C(e,S,o,k,a,l){const r=t.resolveComponent("dt-recipe-callbar-button"),i=t.resolveComponent("dt-icon-chevron-up"),d=t.resolveComponent("dt-button"),s=t.resolveComponent("dt-dropdown");return t.openBlock(),t.createElementBlock("div",t.mergeProps({class:"dt-recipe--callbar-button-with-dropdown"},l.addClassStyleAttrs(e.$attrs)),[t.createVNode(r,{active:o.active,"aria-label":o.ariaLabel,"button-class":o.buttonClass,"button-width-size":o.buttonWidthSize,danger:o.danger,disabled:o.disabled,"inverted-tooltip":o.invertedTooltip,"show-tooltip":o.showTooltip,"text-class":o.textClass,"tooltip-delay":o.tooltipDelay,"tooltip-text":o.tooltipText,class:"dt-recipe--callbar-button-with-dropdown--main-button",onClick:l.buttonClick},t.createSlots({tooltip:t.withCtx(()=>[t.renderSlot(e.$slots,"tooltip")]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:2},[e.$slots.blockStartIcon?{name:"blockStartIcon",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"blockStartIcon")]),key:"0"}:void 0,e.$slots.icon?{name:"icon",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"icon")]),key:"1"}:void 0]),1032,["active","aria-label","button-class","button-width-size","danger","disabled","inverted-tooltip","show-tooltip","text-class","tooltip-delay","tooltip-text","onClick"]),l.showArrowButton?(t.openBlock(),t.createBlock(s,t.mergeProps({key:0,id:o.id,"fallback-placements":o.fallbackPlacements,open:a.open,modal:!1,placement:o.placement,class:"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper",padding:"none"},l.removeClassStyleAttrs(e.$attrs),{onOpened:l.onModalIsOpened}),{anchor:t.withCtx(()=>[t.createVNode(d,{active:a.open,class:t.normalizeClass(["dt-recipe--callbar-button-with-dropdown--arrow",{"dt-recipe--callbar-button-with-dropdown--arrow--large":!l.isCompactMode}]),circle:!0,importance:"clear",size:"lg","aria-label":l.arrowButtonLabel,title:l.arrowButtonLabel,width:"2rem",onClick:l.arrowClick},{startIcon:t.withCtx(()=>[t.createVNode(i,{class:"dt-recipe--callbar-button-with-dropdown--arrow__icon",size:"200"})]),_:1},8,["active","class","aria-label","title","onClick"])]),list:t.withCtx(({close:c})=>[t.renderSlot(e.$slots,"list",{close:c})]),_:3},16,["id","fallback-placements","open","placement","onOpened"])):t.createCommentVNode("",!0)],16)}const y=b._(_,[["render",C]]);exports.default=y;
2
2
  //# sourceMappingURL=callbar-button-with-dropdown.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"callbar-button-with-dropdown.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 :modal=\"false\"\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 :class=\"['dt-recipe--callbar-button-with-dropdown--arrow',\n { 'dt-recipe--callbar-button-with-dropdown--arrow--large': !isCompactMode }]\"\n :circle=\"true\"\n importance=\"clear\"\n size=\"lg\"\n :aria-label=\"arrowButtonLabel\"\n :title=\"arrowButtonLabel\"\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';\nimport { DialtoneLocalization } from '@/localization';\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 * 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 \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 i18n: new DialtoneLocalization(),\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 arrowButtonLabel () {\n return this.i18n.$t('DIALTONE_CALLBAR_BUTTON_WITH_DROPDOWN_ARROW_BUTTON_ARIA_LABEL');\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":["_sfc_main","DtRecipeCallbarButton","DtDropdown","DtButton","DtIconChevronUp","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","DialtoneLocalization","warnIfUnmounted","returnFirstEl","removeClassStyleAttrs","addClassStyleAttrs","ev","isOpened","_createElementBlock","_mergeProps","$options","_ctx","_createVNode","_component_dt_recipe_callbar_button","$props","_renderSlot","_openBlock","_createBlock","_component_dt_dropdown","$data","_component_dt_button","_normalizeClass","_component_dt_icon_chevron_up","_withCtx","close"],"mappings":"ifA+EKA,EAAU,CACb,KAAM,oCAEN,WAAY,CAAA,sBAAEC,EAAAA,QAAqB,WAAEC,UAAU,SAAEC,EAAAA,QAAQ,gBAAEC,EAAAA,iBAM3D,aAAc,GAEd,MAAO,CAIL,GAAI,CACF,KAAM,OACN,SAAW,CACT,OAAOC,EAAAA,QAAM,gBAAe,CAC9B,GAMF,UAAW,CACT,KAAM,OACN,QAAS,KACT,UAAYC,GACHA,GAASC,SAAK,OAAO,SAYhC,UAAW,CACT,KAAM,OACN,QAAS,OAaX,mBAAoB,CAClB,KAAM,MACN,QAAS,IACA,CAAC,MAAM,GASlB,SAAU,CACR,KAAM,QACN,QAAS,IAQX,eAAgB,CACd,KAAM,QACN,QAAS,IASX,OAAQ,CACN,KAAM,QACN,QAAS,IASX,OAAQ,CACN,KAAM,QACN,QAAS,IAYX,QAAS,CACP,KAAM,SACN,QAAS,MAMX,YAAa,CACX,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,IAMX,UAAW,CACT,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,IAMX,gBAAiB,CACf,KAAM,OACN,QAAS,KACT,UAAWC,GAAQC,kCAAgC,SAASD,CAAI,GAOlE,gBAAiB,CACf,KAAM,QACN,QAAS,IAQX,YAAa,CACX,KAAM,QACN,QAAS,MAMX,YAAa,CACX,KAAM,OACN,QAAS,QAOX,aAAc,CACZ,KAAM,QACN,QAAS,SAIb,MAAO,CAIL,cAQA,QAKA,UAGF,MAAQ,CACN,MAAO,CACL,KAAM,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A,sBAEzB,IAAQ,CAARI,aAAQJ,EAAA,OAAA,SAAA,mLAGFD,EAAA,iBADRM,EAAAA,YAAAC,EAAAA,YAuCcC,EAvCdT,aAuCc,OArCX,GAAIK,EAAA,GACJ,sBAAqBA,EAAA,mBACrB,KAAMK,EAAA,KACN,MAAO,GACP,UAAWL,EAAA,UACZ,MAAM,4DACN,QAAQ,MACA,EAAAJ,EAAA,sBAAsBC,EAAA,MAAM,EAAA,CACnC,SAAQD,EAAA,eAAe,CAAA,EAAA,CAEb,iBACT,IAkBY,CAlBZE,EAAAA,YAkBYQ,EAAA,CAjBT,OAAQD,EAAA,KACR,MAAKE,EAAAA,eAAA,CAAA,2GAAoIX,EAAA,aAAa,CAAA,CAAA,EAEtJ,OAAQ,GACT,WAAW,QACX,KAAK,KACJ,aAAYA,EAAA,iBACZ,MAAOA,EAAA,iBACR,MAAM,OACL,QAAOA,EAAA,aAEG,eACT,IAGE,CAHFE,EAAAA,YAGEU,EAAA,CAFA,MAAM,uDACN,KAAK,sEAKF,KAAIC,EAAAA,QACb,CAGE,CAJe,MAAAC,KAAK,CACtBT,EAAAA,WAGEJ,EAAA,OAAA,OAAA,CAFC,MAAOa,CAAK,CAAA"}
1
+ {"version":3,"file":"callbar-button-with-dropdown.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\n v-if=\"$slots.blockStartIcon\"\n #blockStartIcon\n >\n <slot name=\"blockStartIcon\" />\n </template>\n <template\n v-if=\"$slots.icon\"\n #icon\n >\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 :modal=\"false\"\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 :class=\"['dt-recipe--callbar-button-with-dropdown--arrow',\n { 'dt-recipe--callbar-button-with-dropdown--arrow--large': !isCompactMode }]\"\n :circle=\"true\"\n importance=\"clear\"\n size=\"lg\"\n :aria-label=\"arrowButtonLabel\"\n :title=\"arrowButtonLabel\"\n width=\"2rem\"\n @click=\"arrowClick\"\n >\n <template #startIcon>\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';\nimport { DialtoneLocalization } from '@/localization';\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 * 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 \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 i18n: new DialtoneLocalization(),\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 arrowButtonLabel () {\n return this.i18n.$t('DIALTONE_CALLBAR_BUTTON_WITH_DROPDOWN_ARROW_BUTTON_ARIA_LABEL');\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":["_sfc_main","DtRecipeCallbarButton","DtDropdown","DtButton","DtIconChevronUp","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","DialtoneLocalization","warnIfUnmounted","returnFirstEl","removeClassStyleAttrs","addClassStyleAttrs","ev","isOpened","_createElementBlock","_mergeProps","$options","_ctx","_createVNode","_component_dt_recipe_callbar_button","$props","_renderSlot","_openBlock","_createBlock","_component_dt_dropdown","$data","_component_dt_button","_normalizeClass","_component_dt_icon_chevron_up","_withCtx","close"],"mappings":"ifAwFKA,EAAU,CACb,KAAM,oCAEN,WAAY,CAAA,sBAAEC,EAAAA,QAAqB,WAAEC,UAAU,SAAEC,EAAAA,QAAQ,gBAAEC,EAAAA,iBAM3D,aAAc,GAEd,MAAO,CAIL,GAAI,CACF,KAAM,OACN,SAAW,CACT,OAAOC,EAAAA,QAAM,gBAAe,CAC9B,GAMF,UAAW,CACT,KAAM,OACN,QAAS,KACT,UAAYC,GACHA,GAASC,SAAK,OAAO,SAYhC,UAAW,CACT,KAAM,OACN,QAAS,OAaX,mBAAoB,CAClB,KAAM,MACN,QAAS,IACA,CAAC,MAAM,GASlB,SAAU,CACR,KAAM,QACN,QAAS,IAQX,eAAgB,CACd,KAAM,QACN,QAAS,IASX,OAAQ,CACN,KAAM,QACN,QAAS,IASX,OAAQ,CACN,KAAM,QACN,QAAS,IAYX,QAAS,CACP,KAAM,SACN,QAAS,MAMX,YAAa,CACX,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,IAMX,UAAW,C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pad/dialtone-icons/vue3";
2
- import w, { addClassStyleAttrs as h, removeClassStyleAttrs as _, warnIfUnmounted as C, returnFirstEl as y } from "../../common/utils/index.js";
3
- import { DialtoneLocalization as B } from "../../localization/index.js";
4
- import { resolveComponent as a, openBlock as d, createElementBlock as k, mergeProps as c, createVNode as r, withCtx as l, renderSlot as n, createBlock as A, normalizeClass as g, createCommentVNode as S } from "vue";
5
- import { _ as v } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
6
- import D from "../button/button.js";
7
- import O from "../dropdown/dropdown.js";
8
- import T from "../callbar-button/callbar-button.js";
2
+ import w, { addClassStyleAttrs as h, removeClassStyleAttrs as _, warnIfUnmounted as y, returnFirstEl as C } from "../../common/utils/index.js";
3
+ import { DialtoneLocalization as k } from "../../localization/index.js";
4
+ import { resolveComponent as n, openBlock as d, createElementBlock as S, mergeProps as s, createVNode as r, createSlots as B, withCtx as l, renderSlot as a, createBlock as A, normalizeClass as g, createCommentVNode as v } from "vue";
5
+ import { _ as D } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
6
+ import O from "../button/button.js";
7
+ import T from "../dropdown/dropdown.js";
8
+ import I from "../callbar-button/callbar-button.js";
9
9
  import { CALLBAR_BUTTON_VALID_WIDTH_SIZE as L } from "../callbar-button/callbar-button-constants.js";
10
10
  const z = {
11
11
  name: "DtRecipeCallbarButtonWithDropdown",
12
- components: { DtRecipeCallbarButton: T, DtDropdown: O, DtButton: D, DtIconChevronUp: f },
12
+ components: { DtRecipeCallbarButton: I, DtDropdown: T, DtButton: O, DtIconChevronUp: f },
13
13
  /* inheritAttrs: false is generally an option we want to set on library
14
14
  components. This allows any attributes passed in that are not recognized
15
15
  as props to be passed down to another element or component using v-bind:$attrs
@@ -184,7 +184,7 @@ const z = {
184
184
  data() {
185
185
  return {
186
186
  open: !1,
187
- i18n: new B()
187
+ i18n: new k()
188
188
  };
189
189
  },
190
190
  computed: {
@@ -199,7 +199,7 @@ const z = {
199
199
  }
200
200
  },
201
201
  mounted() {
202
- C(y(this.$el), this.$options.name);
202
+ y(C(this.$el), this.$options.name);
203
203
  },
204
204
  methods: {
205
205
  removeClassStyleAttrs: _,
@@ -221,10 +221,10 @@ const z = {
221
221
  }
222
222
  }
223
223
  };
224
- function I(t, W, e, R, i, o) {
225
- const s = a("dt-recipe-callbar-button"), p = a("dt-icon-chevron-up"), u = a("dt-button"), m = a("dt-dropdown");
226
- return d(), k("div", c({ class: "dt-recipe--callbar-button-with-dropdown" }, o.addClassStyleAttrs(t.$attrs)), [
227
- r(s, {
224
+ function W(t, R, e, N, i, o) {
225
+ const c = n("dt-recipe-callbar-button"), u = n("dt-icon-chevron-up"), p = n("dt-button"), m = n("dt-dropdown");
226
+ return d(), S("div", s({ class: "dt-recipe--callbar-button-with-dropdown" }, o.addClassStyleAttrs(t.$attrs)), [
227
+ r(c, {
228
228
  active: e.active,
229
229
  "aria-label": e.ariaLabel,
230
230
  "button-class": e.buttonClass,
@@ -238,19 +238,31 @@ function I(t, W, e, R, i, o) {
238
238
  "tooltip-text": e.tooltipText,
239
239
  class: "dt-recipe--callbar-button-with-dropdown--main-button",
240
240
  onClick: o.buttonClick
241
- }, {
242
- icon: l(() => [
243
- n(t.$slots, "icon")
244
- ]),
241
+ }, B({
245
242
  tooltip: l(() => [
246
- n(t.$slots, "tooltip")
243
+ a(t.$slots, "tooltip")
247
244
  ]),
248
245
  default: l(() => [
249
- n(t.$slots, "default")
246
+ a(t.$slots, "default")
250
247
  ]),
251
- _: 3
252
- }, 8, ["active", "aria-label", "button-class", "button-width-size", "danger", "disabled", "inverted-tooltip", "show-tooltip", "text-class", "tooltip-delay", "tooltip-text", "onClick"]),
253
- o.showArrowButton ? (d(), A(m, c({
248
+ _: 2
249
+ }, [
250
+ t.$slots.blockStartIcon ? {
251
+ name: "blockStartIcon",
252
+ fn: l(() => [
253
+ a(t.$slots, "blockStartIcon")
254
+ ]),
255
+ key: "0"
256
+ } : void 0,
257
+ t.$slots.icon ? {
258
+ name: "icon",
259
+ fn: l(() => [
260
+ a(t.$slots, "icon")
261
+ ]),
262
+ key: "1"
263
+ } : void 0
264
+ ]), 1032, ["active", "aria-label", "button-class", "button-width-size", "danger", "disabled", "inverted-tooltip", "show-tooltip", "text-class", "tooltip-delay", "tooltip-text", "onClick"]),
265
+ o.showArrowButton ? (d(), A(m, s({
254
266
  key: 0,
255
267
  id: e.id,
256
268
  "fallback-placements": e.fallbackPlacements,
@@ -261,7 +273,7 @@ function I(t, W, e, R, i, o) {
261
273
  padding: "none"
262
274
  }, o.removeClassStyleAttrs(t.$attrs), { onOpened: o.onModalIsOpened }), {
263
275
  anchor: l(() => [
264
- r(u, {
276
+ r(p, {
265
277
  active: i.open,
266
278
  class: g([
267
279
  "dt-recipe--callbar-button-with-dropdown--arrow",
@@ -275,8 +287,8 @@ function I(t, W, e, R, i, o) {
275
287
  width: "2rem",
276
288
  onClick: o.arrowClick
277
289
  }, {
278
- icon: l(() => [
279
- r(p, {
290
+ startIcon: l(() => [
291
+ r(u, {
280
292
  class: "dt-recipe--callbar-button-with-dropdown--arrow__icon",
281
293
  size: "200"
282
294
  })
@@ -285,14 +297,14 @@ function I(t, W, e, R, i, o) {
285
297
  }, 8, ["active", "class", "aria-label", "title", "onClick"])
286
298
  ]),
287
299
  list: l(({ close: b }) => [
288
- n(t.$slots, "list", { close: b })
300
+ a(t.$slots, "list", { close: b })
289
301
  ]),
290
302
  _: 3
291
- }, 16, ["id", "fallback-placements", "open", "placement", "onOpened"])) : S("", !0)
303
+ }, 16, ["id", "fallback-placements", "open", "placement", "onOpened"])) : v("", !0)
292
304
  ], 16);
293
305
  }
294
- const H = /* @__PURE__ */ v(z, [["render", I]]);
306
+ const q = /* @__PURE__ */ D(z, [["render", W]]);
295
307
  export {
296
- H as default
308
+ q as default
297
309
  };
298
310
  //# sourceMappingURL=callbar-button-with-dropdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"callbar-button-with-dropdown.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 :modal=\"false\"\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 :class=\"['dt-recipe--callbar-button-with-dropdown--arrow',\n { 'dt-recipe--callbar-button-with-dropdown--arrow--large': !isCompactMode }]\"\n :circle=\"true\"\n importance=\"clear\"\n size=\"lg\"\n :aria-label=\"arrowButtonLabel\"\n :title=\"arrowButtonLabel\"\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';\nimport { DialtoneLocalization } from '@/localization';\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 * 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 \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 i18n: new DialtoneLocalization(),\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 arrowButtonLabel () {\n return this.i18n.$t('DIALTONE_CALLBAR_BUTTON_WITH_DROPDOWN_ARROW_BUTTON_ARIA_LABEL');\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":["_sfc_main","DtRecipeCallbarButton","DtDropdown","DtButton","DtIconChevronUp","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","DialtoneLocalization","warnIfUnmounted","returnFirstEl","removeClassStyleAttrs","addClassStyleAttrs","ev","isOpened","_createElementBlock","_mergeProps","$options","_ctx","_createVNode","_component_dt_recipe_callbar_button","$props","_renderSlot","_openBlock","_createBlock","_component_dt_dropdown","$data","_component_dt_button","_normalizeClass","_component_dt_icon_chevron_up","_withCtx","close"],"mappings":";;;;;;;;;AA+EA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAE,uBAAAC,GAAuB,YAAAC,GAAY,UAAAC,GAAU,iBAAAC;;;;;EAM3D,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAOC,EAAM,gBAAe;AAAA,MAC9B;AAAA;;;;IAMF,WAAW;AAAA,MACT,MAAM;AAAA,MACN,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f,OAAM;AAAA,MACL,SAAOJ,EAAA;AAAA;MAEG,QACT,MAAoB;AAAA,QAApBK,EAAoBJ,EAAA,QAAA,MAAA;AAAA;MAEX,WACT,MAAuB;AAAA,QAAvBI,EAAuBJ,EAAA,QAAA,SAAA;AAAA;iBAEzB,MAAQ;AAAA,QAARI,EAAQJ,EAAA,QAAA,SAAA;AAAA;;;IAGFD,EAAA,mBADRM,KAAAC,EAuCcC,GAvCdT,EAuCc;AAAA;MArCX,IAAIK,EAAA;AAAA,MACJ,uBAAqBA,EAAA;AAAA,MACrB,MAAMK,EAAA;AAAA,MACN,OAAO;AAAA,MACP,WAAWL,EAAA;AAAA,MACZ,OAAM;AAAA,MACN,SAAQ;AAAA,IACA,GAAAJ,EAAA,sBAAsBC,EAAA,MAAM,GAAA,EACnC,UAAQD,EAAA,gBAAe,CAAA,GAAA;AAAA,MAEb,UACT,MAkBY;AAAA,QAlBZE,EAkBYQ,GAAA;AAAA,UAjBT,QAAQD,EAAA;AAAA,UACR,OAAKE,EAAA;AAAA,YAAA;AAAA,wEAAoIX,EAAA,cAAa;AAAA,UAAA,CAAA;AAAA,UAEtJ,QAAQ;AAAA,UACT,YAAW;AAAA,UACX,MAAK;AAAA,UACJ,cAAYA,EAAA;AAAA,UACZ,OAAOA,EAAA;AAAA,UACR,OAAM;AAAA,UACL,SAAOA,EAAA;AAAA;UAEG,QACT,MAGE;AAAA,YAHFE,EAGEU,GAAA;AAAA,cAFA,OAAM;AAAA,cACN,MAAK;AAAA;;;;;MAKF,MAAIC,EACb,CAGE,EAJe,OAAAC,QAAK;AAAA,QACtBT,EAGEJ,EAAA,QAAA,QAAA,EAFC,OAAOa,EAAK,CAAA;AAAA;;;;;;"}
1
+ {"version":3,"file":"callbar-button-with-dropdown.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\n v-if=\"$slots.blockStartIcon\"\n #blockStartIcon\n >\n <slot name=\"blockStartIcon\" />\n </template>\n <template\n v-if=\"$slots.icon\"\n #icon\n >\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 :modal=\"false\"\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 :class=\"['dt-recipe--callbar-button-with-dropdown--arrow',\n { 'dt-recipe--callbar-button-with-dropdown--arrow--large': !isCompactMode }]\"\n :circle=\"true\"\n importance=\"clear\"\n size=\"lg\"\n :aria-label=\"arrowButtonLabel\"\n :title=\"arrowButtonLabel\"\n width=\"2rem\"\n @click=\"arrowClick\"\n >\n <template #startIcon>\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';\nimport { DialtoneLocalization } from '@/localization';\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 * 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 \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 i18n: new DialtoneLocalization(),\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 arrowButtonLabel () {\n return this.i18n.$t('DIALTONE_CALLBAR_BUTTON_WITH_DROPDOWN_ARROW_BUTTON_ARIA_LABEL');\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":["_sfc_main","DtRecipeCallbarButton","DtDropdown","DtButton","DtIconChevronUp","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","DialtoneLocalization","warnIfUnmounted","returnFirstEl","removeClassStyleAttrs","addClassStyleAttrs","ev","isOpened","_createElementBlock","_mergeProps","$options","_ctx","_createVNode","_component_dt_recipe_callbar_button","$props","_renderSlot","_openBlock","_createBlock","_component_dt_dropdown","$data","_component_dt_button","_normalizeClass","_component_dt_icon_chevron_up","_withCtx","close"],"mappings":";;;;;;;;;AAwFA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAE,uBAAAC,GAAuB,YAAAC,GAAY,UAAAC,GAAU,iBAAAC;;;;;EAM3D,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAOC,EAAM,gBAAe;AAAA,MAC9B;AAAA;;;;IAMF,WAAW;AAAA,MACT,MAAM;AAAA,MACN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,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("@dialpad/dialtone-icons/vue3"),n=require("../../common/utils/index.cjs"),u=require("../../localization/index.cjs"),t=require("vue"),p=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),h=require("../button/button.cjs"),b=require("../popover/popover.cjs"),f=require("../callbar-button/callbar-button.cjs"),_=require("../callbar-button/callbar-button-constants.cjs"),C={compatConfig:{MODE:3},name:"DtRecipeCallbarButtonWithPopover",components:{DtRecipeCallbarButton:f.default,DtPopover:b.default,DtButton:h.default,DtIconChevronUp:d.DtIconChevronUp},inheritAttrs:!1,props:{id:{type:String,default(){return n.default.getUniqueString()}},ariaLabel:{type:String,default:null,validator:e=>e||(void 0).$slots.default},placement:{type:String,default:"top"},offset:{type:Array,default:()=>[0,16]},initialFocusElement:{type:String,default:"first"},showCloseButton:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},forceShowArrow:{type:Boolean,default:!1},active:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},onClick:{type:Function,default:null},buttonClass:{type:[String,Array,Object],default:""},textClass:{type:[String,Array,Object],default:""},buttonWidthSize:{type:String,default:"xl",validator:e=>_.CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(e)},contentClass:{type:[String,Array,Object],default:""},openPopover:{type:Boolean,default:!1},invertedTooltip:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:null},tooltipText:{type:String,default:void 0},tooltipDelay:{type:Boolean,default:void 0}},emits:["arrow-click","click","opened"],data(){return{open:!1,i18n:new u.DialtoneLocalization}},computed:{showArrowButton(){return this.forceShowArrow||!this.disabled},isCompactMode(){return this.buttonWidthSize==="sm"||this.buttonWidthSize==="md"},showPopover(){return!this.openPopover||this.open?(this.syncOpenState(),!1):this.toggleOpen()},arrowButtonLabel(){return this.i18n.$t("DIALTONE_CALLBAR_BUTTON_WITH_POPOVER_ARROW_BUTTON_ARIA_LABEL")}},mounted(){n.warnIfUnmounted(n.returnFirstEl(this.$el),this.$options.name)},methods:{removeClassStyleAttrs:n.removeClassStyleAttrs,addClassStyleAttrs:n.addClassStyleAttrs,arrowClick(e){return this.$emit("arrow-click",e),this.toggleOpen()},toggleOpen(){return this.open=!this.open},syncOpenState(){this.open=this.openPopover},buttonClick(e){this.$props.onClick?this.$emit("click",e):this.arrowClick(e)},onModalIsOpened(e){this.open=e,this.$emit("opened",e)}}};function w(e,m,o,y,a,l){const r=t.resolveComponent("dt-recipe-callbar-button"),i=t.resolveComponent("dt-icon-chevron-up"),s=t.resolveComponent("dt-button"),c=t.resolveComponent("dt-popover");return t.openBlock(),t.createElementBlock("div",t.mergeProps({class:"d-recipe-callbar-button-with-popover"},l.addClassStyleAttrs(e.$attrs)),[t.createVNode(r,{"aria-label":o.ariaLabel,disabled:o.disabled,active:o.active,danger:o.danger,"button-class":o.buttonClass,"button-width-size":o.buttonWidthSize,"text-class":o.textClass,"inverted-tooltip":o.invertedTooltip,"show-tooltip":o.showTooltip,"tooltip-text":o.tooltipText,"tooltip-delay":o.tooltipDelay,class:"d-recipe-callbar-button-with-popover--main-button",onClick:l.buttonClick},{icon:t.withCtx(()=>[t.renderSlot(e.$slots,"icon")]),tooltip:t.withCtx(()=>[t.renderSlot(e.$slots,"tooltip")]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["aria-label","disabled","active","danger","button-class","button-width-size","text-class","inverted-tooltip","show-tooltip","tooltip-text","tooltip-delay","onClick"]),l.showArrowButton?(t.openBlock(),t.createBlock(c,t.mergeProps({key:0,id:o.id,modal:!1,open:a.open,placement:o.placement,"initial-focus-element":o.initialFocusElement,"show-close-button":o.showCloseButton,offset:o.offset,padding:"none",class:"d-recipe-callbar-button-with-popover__popover-wrapper","dialog-class":["d-recipe-callbar-button-with-popover__popover",o.contentClass]},l.removeClassStyleAttrs(e.$attrs),{"open-popover":l.showPopover,onOpened:l.onModalIsOpened}),{anchor:t.withCtx(()=>[t.createVNode(s,{active:a.open,class:t.normalizeClass(["d-recipe-callbar-button-with-popover__arrow",{"d-recipe-callbar-button-with-popover__arrow--large":!l.isCompactMode}]),circle:!0,importance:"clear",size:"lg","aria-label":l.arrowButtonLabel,title:l.arrowButtonLabel,width:"2rem",onClick:l.arrowClick},{icon:t.withCtx(()=>[t.createVNode(i,{class:"d-recipe-callbar-button-with-popover__arrow-icon",size:"200"})]),_:1},8,["active","class","aria-label","title","onClick"])]),content:t.withCtx(()=>[t.renderSlot(e.$slots,"content")]),headerContent:t.withCtx(()=>[t.renderSlot(e.$slots,"headerContent")]),footerContent:t.withCtx(()=>[t.renderSlot(e.$slots,"footerContent")]),_:3},16,["id","open","placement","initial-focus-element","show-close-button","offset","dialog-class","open-popover","onOpened"])):t.createCommentVNode("",!0)],16)}const v=p._(C,[["render",w]]);exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("@dialpad/dialtone-icons/vue3"),n=require("../../common/utils/index.cjs"),u=require("../../localization/index.cjs"),t=require("vue"),p=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),b=require("../button/button.cjs"),h=require("../popover/popover.cjs"),f=require("../callbar-button/callbar-button.cjs"),_=require("../callbar-button/callbar-button-constants.cjs"),C={compatConfig:{MODE:3},name:"DtRecipeCallbarButtonWithPopover",components:{DtRecipeCallbarButton:f.default,DtPopover:h.default,DtButton:b.default,DtIconChevronUp:d.DtIconChevronUp},inheritAttrs:!1,props:{id:{type:String,default(){return n.default.getUniqueString()}},ariaLabel:{type:String,default:null,validator:e=>e||(void 0).$slots.default},placement:{type:String,default:"top"},offset:{type:Array,default:()=>[0,16]},initialFocusElement:{type:String,default:"first"},showCloseButton:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},forceShowArrow:{type:Boolean,default:!1},active:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},onClick:{type:Function,default:null},buttonClass:{type:[String,Array,Object],default:""},textClass:{type:[String,Array,Object],default:""},buttonWidthSize:{type:String,default:"xl",validator:e=>_.CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(e)},contentClass:{type:[String,Array,Object],default:""},openPopover:{type:Boolean,default:!1},invertedTooltip:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:null},tooltipText:{type:String,default:void 0},tooltipDelay:{type:Boolean,default:void 0}},emits:["arrow-click","click","opened"],data(){return{open:!1,i18n:new u.DialtoneLocalization}},computed:{showArrowButton(){return this.forceShowArrow||!this.disabled},isCompactMode(){return this.buttonWidthSize==="sm"||this.buttonWidthSize==="md"},showPopover(){return!this.openPopover||this.open?(this.syncOpenState(),!1):this.toggleOpen()},arrowButtonLabel(){return this.i18n.$t("DIALTONE_CALLBAR_BUTTON_WITH_POPOVER_ARROW_BUTTON_ARIA_LABEL")}},mounted(){n.warnIfUnmounted(n.returnFirstEl(this.$el),this.$options.name)},methods:{removeClassStyleAttrs:n.removeClassStyleAttrs,addClassStyleAttrs:n.addClassStyleAttrs,arrowClick(e){return this.$emit("arrow-click",e),this.toggleOpen()},toggleOpen(){return this.open=!this.open},syncOpenState(){this.open=this.openPopover},buttonClick(e){this.$props.onClick?this.$emit("click",e):this.arrowClick(e)},onModalIsOpened(e){this.open=e,this.$emit("opened",e)}}};function w(e,v,o,y,a,l){const r=t.resolveComponent("dt-recipe-callbar-button"),i=t.resolveComponent("dt-icon-chevron-up"),s=t.resolveComponent("dt-button"),c=t.resolveComponent("dt-popover");return t.openBlock(),t.createElementBlock("div",t.mergeProps({class:"d-recipe-callbar-button-with-popover"},l.addClassStyleAttrs(e.$attrs)),[t.createVNode(r,{"aria-label":o.ariaLabel,disabled:o.disabled,active:o.active,danger:o.danger,"button-class":o.buttonClass,"button-width-size":o.buttonWidthSize,"text-class":o.textClass,"inverted-tooltip":o.invertedTooltip,"show-tooltip":o.showTooltip,"tooltip-text":o.tooltipText,"tooltip-delay":o.tooltipDelay,class:"d-recipe-callbar-button-with-popover--main-button",onClick:l.buttonClick},t.createSlots({tooltip:t.withCtx(()=>[t.renderSlot(e.$slots,"tooltip")]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:2},[e.$slots.blockStartIcon?{name:"blockStartIcon",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"blockStartIcon")]),key:"0"}:void 0,e.$slots.icon?{name:"icon",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"icon")]),key:"1"}:void 0]),1032,["aria-label","disabled","active","danger","button-class","button-width-size","text-class","inverted-tooltip","show-tooltip","tooltip-text","tooltip-delay","onClick"]),l.showArrowButton?(t.openBlock(),t.createBlock(c,t.mergeProps({key:0,id:o.id,modal:!1,open:a.open,placement:o.placement,"initial-focus-element":o.initialFocusElement,"show-close-button":o.showCloseButton,offset:o.offset,padding:"none",class:"d-recipe-callbar-button-with-popover__popover-wrapper","dialog-class":["d-recipe-callbar-button-with-popover__popover",o.contentClass]},l.removeClassStyleAttrs(e.$attrs),{"open-popover":l.showPopover,onOpened:l.onModalIsOpened}),{anchor:t.withCtx(()=>[t.createVNode(s,{active:a.open,class:t.normalizeClass(["d-recipe-callbar-button-with-popover__arrow",{"d-recipe-callbar-button-with-popover__arrow--large":!l.isCompactMode}]),circle:!0,importance:"clear",size:"lg","aria-label":l.arrowButtonLabel,title:l.arrowButtonLabel,width:"2rem",onClick:l.arrowClick},{startIcon:t.withCtx(()=>[t.createVNode(i,{class:"d-recipe-callbar-button-with-popover__arrow-icon",size:"200"})]),_:1},8,["active","class","aria-label","title","onClick"])]),content:t.withCtx(()=>[t.renderSlot(e.$slots,"content")]),headerContent:t.withCtx(()=>[t.renderSlot(e.$slots,"headerContent")]),footerContent:t.withCtx(()=>[t.renderSlot(e.$slots,"footerContent")]),_:3},16,["id","open","placement","initial-focus-element","show-close-button","offset","dialog-class","open-popover","onOpened"])):t.createCommentVNode("",!0)],16)}const m=p._(C,[["render",w]]);exports.default=m;
2
2
  //# sourceMappingURL=callbar-button-with-popover.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"callbar-button-with-popover.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 :active=\"open\"\n :class=\"['d-recipe-callbar-button-with-popover__arrow',\n { 'd-recipe-callbar-button-with-popover__arrow--large': !isCompactMode }]\"\n :circle=\"true\"\n importance=\"clear\"\n size=\"lg\"\n :aria-label=\"arrowButtonLabel\"\n :title=\"arrowButtonLabel\"\n width=\"2rem\"\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';\nimport { DialtoneLocalization } from '@/localization';\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 * 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 \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 i18n: new DialtoneLocalization(),\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 arrowButtonLabel () {\n return this.i18n.$t('DIALTONE_CALLBAR_BUTTON_WITH_POPOVER_ARROW_BUTTON_ARIA_LABEL');\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":["_sfc_main","DtRecipeCallbarButton","DtPopover","DtButton","DtIconChevronUp","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","DialtoneLocalization","warnIfUnmounted","returnFirstEl","removeClassStyleAttrs","addClassStyleAttrs","ev","isOpened","_createElementBlock","_mergeProps","$options","_ctx","_createVNode","_component_dt_recipe_callbar_button","$props","_renderSlot","_openBlock","_createBlock","_component_dt_popover","$data","_component_dt_button","_normalizeClass","_component_dt_icon_chevron_up"],"mappings":"+eAsFKA,EAAU,CACb,aAAc,CAAE,KAAM,GACtB,KAAM,mCAEN,WAAY,CAAA,sBAAEC,EAAAA,QAAqB,UAAEC,UAAS,SAAEC,EAAAA,QAAQ,gBAAEC,EAAAA,iBAM1D,aAAc,GAEd,MAAO,CAIL,GAAI,CACF,KAAM,OACN,SAAW,CACT,OAAOC,EAAAA,QAAM,gBAAe,CAC9B,GAMF,UAAW,CACT,KAAM,OACN,QAAS,KACT,UAAYC,GACHA,GAASC,SAAK,OAAO,SAYhC,UAAW,CACT,KAAM,OACN,QAAS,OAcX,OAAQ,CACN,KAAM,MACN,QAAS,IAAM,CAAC,EAAG,EAAE,GAUvB,oBAAqB,CACnB,KAAM,OACN,QAAS,SAMX,gBAAiB,CACf,KAAM,QACN,QAAS,IAQX,SAAU,CACR,KAAM,QACN,QAAS,IAQX,eAAgB,CACd,KAAM,QACN,QAAS,IASX,OAAQ,CACN,KAAM,QACN,QAAS,IASX,OAAQ,CACN,KAAM,QACN,QAAS,IAYX,QAAS,CACP,KAAM,SACN,QAAS,MAMX,YAAa,CACX,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,IAMX,UAAW,CACT,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,IAMX,gBAAiB,CACf,KAAM,OACN,QAAS,KACT,UAAWC,GAAQC,kCAAgC,SAASD,CAAI,GAMlE,aAAc,CACZ,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,IAMX,YAAa,CACX,KAAM,QACN,QAAS,IAOX,gBAAiB,CACf,KAAM,QACN,QAAS,IAQX,YAAa,CACX,KAA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AAA,gBACnB,aAAYA,EAAA,UACZ,mBAAkBA,EAAA,gBAClB,eAAcA,EAAA,YACd,eAAcA,EAAA,YACd,gBAAeA,EAAA,aAChB,MAAM,oDACL,QAAOJ,EAAA,cAEG,eACT,IAAoB,CAApBK,aAAoBJ,EAAA,OAAA,MAAA,IAEX,kBACT,IAAuB,CAAvBI,aAAuBJ,EAAA,OAAA,SAAA,sBAEzB,IAAQ,CAARI,aAAQJ,EAAA,OAAA,SAAA,mLAGFD,EAAA,iBADRM,EAAAA,YAAAC,EAAAA,YA8CaC,EA9CbT,aA8Ca,OA5CV,GAAIK,EAAA,GACJ,MAAO,GACP,KAAMK,EAAA,KACN,UAAWL,EAAA,UACX,wBAAuBA,EAAA,oBACvB,oBAAmBA,EAAA,gBACnB,OAAQA,EAAA,OACT,QAAQ,OACR,MAAM,wDACL,gEAAgEA,EAAA,YAAY,CACrE,EAAAJ,EAAA,sBAAsBC,EAAA,MAAM,EAAA,CACnC,eAAcD,EAAA,YACd,SAAQA,EAAA,mBAEE,iBACT,IAkBY,CAlBZE,EAAAA,YAkBYQ,EAAA,CAjBT,OAAQD,EAAA,KACR,MAAKE,EAAAA,eAAA,CAAA,qGAA8HX,EAAA,aAAa,CAAA,CAAA,EAEhJ,OAAQ,GACT,WAAW,QACX,KAAK,KACJ,aAAYA,EAAA,iBACZ,MAAOA,EAAA,iBACR,MAAM,OACL,QAAOA,EAAA,aAEG,eACT,IAGE,CAHFE,EAAAA,YAGEU,EAAA,CAFA,MAAM,mDACN,KAAK,sEAKF,kBACT,IAAuB,CAAvBP,aAAuBJ,EAAA,OAAA,SAAA,IAEd,wBACT,IAA6B,CAA7BI,aAA6BJ,EAAA,OAAA,eAAA,IAEpB,wBACT,IAA6B,CAA7BI,aAA6BJ,EAAA,OAAA,eAAA"}
1
+ {"version":3,"file":"callbar-button-with-popover.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\n v-if=\"$slots.blockStartIcon\"\n #blockStartIcon\n >\n <slot name=\"blockStartIcon\" />\n </template>\n <template\n v-if=\"$slots.icon\"\n #icon\n >\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 :active=\"open\"\n :class=\"['d-recipe-callbar-button-with-popover__arrow',\n { 'd-recipe-callbar-button-with-popover__arrow--large': !isCompactMode }]\"\n :circle=\"true\"\n importance=\"clear\"\n size=\"lg\"\n :aria-label=\"arrowButtonLabel\"\n :title=\"arrowButtonLabel\"\n width=\"2rem\"\n @click=\"arrowClick\"\n >\n <template #startIcon>\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';\nimport { DialtoneLocalization } from '@/localization';\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 * 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 \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 i18n: new DialtoneLocalization(),\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 arrowButtonLabel () {\n return this.i18n.$t('DIALTONE_CALLBAR_BUTTON_WITH_POPOVER_ARROW_BUTTON_ARIA_LABEL');\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":["_sfc_main","DtRecipeCallbarButton","DtPopover","DtButton","DtIconChevronUp","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","DialtoneLocalization","warnIfUnmounted","returnFirstEl","removeClassStyleAttrs","addClassStyleAttrs","ev","isOpened","_createElementBlock","_mergeProps","$options","_ctx","_createVNode","_component_dt_recipe_callbar_button","$props","_renderSlot","_openBlock","_createBlock","_component_dt_popover","$data","_component_dt_button","_normalizeClass","_component_dt_icon_chevron_up"],"mappings":"+eA+FKA,EAAU,CACb,aAAc,CAAE,KAAM,GACtB,KAAM,mCAEN,WAAY,CAAA,sBAAEC,EAAAA,QAAqB,UAAEC,UAAS,SAAEC,EAAAA,QAAQ,gBAAEC,EAAAA,iBAM1D,aAAc,GAEd,MAAO,CAIL,GAAI,CACF,KAAM,OACN,SAAW,CACT,OAAOC,EAAAA,QAAM,gBAAe,CAC9B,GAMF,UAAW,CACT,KAAM,OACN,QAAS,KACT,UAAYC,GACHA,GAASC,SAAK,OAAO,SAYhC,UAAW,CACT,KAAM,OACN,QAAS,OAcX,OAAQ,CACN,KAAM,MACN,QAAS,IAAM,CAAC,EAAG,EAAE,GAUvB,oBAAqB,CACnB,KAAM,OACN,QAAS,SAMX,gBAAiB,CACf,KAAM,QACN,QAAS,IAQX,SAAU,CACR,KAAM,QACN,QAAS,IAQX,eAAgB,CACd,KAAM,QACN,QAAS,IASX,OAAQ,CACN,KAAM,QACN,QAAS,IASX,OAAQ,CACN,KAAM,QACN,QAAS,IAYX,QAAS,CACP,KAAM,SACN,QAAS,MAMX,YAAa,CACX,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,IAMX,UAAW,CACT,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,IAMX,gBAAiB,CACf,KAAM,OACN,QAAS,KACT,UAAWC,GAAQC,kCAAgC,SAASD,CAAI,GAMlE,aAAc,CACZ,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,IAMX,YAAa,CACX,KAAM,QACN,QAAS,IAOX,gBAAiB,CACf,KAAM,QAC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A,OAAA,eAAA"}
@@ -1,16 +1,16 @@
1
1
  import { DtIconChevronUp as h } from "@dialpad/dialtone-icons/vue3";
2
- import m, { addClassStyleAttrs as b, removeClassStyleAttrs as _, warnIfUnmounted as w, returnFirstEl as v } from "../../common/utils/index.js";
2
+ import m, { addClassStyleAttrs as b, removeClassStyleAttrs as w, warnIfUnmounted as _, returnFirstEl as v } from "../../common/utils/index.js";
3
3
  import { DialtoneLocalization as C } from "../../localization/index.js";
4
- import { resolveComponent as a, openBlock as s, createElementBlock as y, mergeProps as c, createVNode as i, withCtx as l, renderSlot as n, createBlock as g, normalizeClass as B, createCommentVNode as S } from "vue";
4
+ import { resolveComponent as a, openBlock as s, createElementBlock as y, mergeProps as c, createVNode as r, createSlots as g, withCtx as l, renderSlot as n, createBlock as B, normalizeClass as S, createCommentVNode as k } from "vue";
5
5
  import { _ as A } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
6
- import k from "../button/button.js";
7
- import O from "../popover/popover.js";
8
- import T from "../callbar-button/callbar-button.js";
6
+ import O from "../button/button.js";
7
+ import T from "../popover/popover.js";
8
+ import I from "../callbar-button/callbar-button.js";
9
9
  import { CALLBAR_BUTTON_VALID_WIDTH_SIZE as L } from "../callbar-button/callbar-button-constants.js";
10
10
  const D = {
11
11
  compatConfig: { MODE: 3 },
12
12
  name: "DtRecipeCallbarButtonWithPopover",
13
- components: { DtRecipeCallbarButton: T, DtPopover: O, DtButton: k, DtIconChevronUp: h },
13
+ components: { DtRecipeCallbarButton: I, DtPopover: T, DtButton: O, DtIconChevronUp: h },
14
14
  /* inheritAttrs: false is generally an option we want to set on library
15
15
  components. This allows any attributes passed in that are not recognized
16
16
  as props to be passed down to another element or component using v-bind:$attrs
@@ -236,10 +236,10 @@ const D = {
236
236
  }
237
237
  },
238
238
  mounted() {
239
- w(v(this.$el), this.$options.name);
239
+ _(v(this.$el), this.$options.name);
240
240
  },
241
241
  methods: {
242
- removeClassStyleAttrs: _,
242
+ removeClassStyleAttrs: w,
243
243
  addClassStyleAttrs: b,
244
244
  arrowClick(t) {
245
245
  return this.$emit("arrow-click", t), this.toggleOpen();
@@ -258,10 +258,10 @@ const D = {
258
258
  }
259
259
  }
260
260
  };
261
- function z(t, I, e, P, r, o) {
261
+ function z(t, P, e, E, i, o) {
262
262
  const d = a("dt-recipe-callbar-button"), p = a("dt-icon-chevron-up"), u = a("dt-button"), f = a("dt-popover");
263
263
  return s(), y("div", c({ class: "d-recipe-callbar-button-with-popover" }, o.addClassStyleAttrs(t.$attrs)), [
264
- i(d, {
264
+ r(d, {
265
265
  "aria-label": e.ariaLabel,
266
266
  disabled: e.disabled,
267
267
  active: e.active,
@@ -275,23 +275,35 @@ function z(t, I, e, P, r, o) {
275
275
  "tooltip-delay": e.tooltipDelay,
276
276
  class: "d-recipe-callbar-button-with-popover--main-button",
277
277
  onClick: o.buttonClick
278
- }, {
279
- icon: l(() => [
280
- n(t.$slots, "icon")
281
- ]),
278
+ }, g({
282
279
  tooltip: l(() => [
283
280
  n(t.$slots, "tooltip")
284
281
  ]),
285
282
  default: l(() => [
286
283
  n(t.$slots, "default")
287
284
  ]),
288
- _: 3
289
- }, 8, ["aria-label", "disabled", "active", "danger", "button-class", "button-width-size", "text-class", "inverted-tooltip", "show-tooltip", "tooltip-text", "tooltip-delay", "onClick"]),
290
- o.showArrowButton ? (s(), g(f, c({
285
+ _: 2
286
+ }, [
287
+ t.$slots.blockStartIcon ? {
288
+ name: "blockStartIcon",
289
+ fn: l(() => [
290
+ n(t.$slots, "blockStartIcon")
291
+ ]),
292
+ key: "0"
293
+ } : void 0,
294
+ t.$slots.icon ? {
295
+ name: "icon",
296
+ fn: l(() => [
297
+ n(t.$slots, "icon")
298
+ ]),
299
+ key: "1"
300
+ } : void 0
301
+ ]), 1032, ["aria-label", "disabled", "active", "danger", "button-class", "button-width-size", "text-class", "inverted-tooltip", "show-tooltip", "tooltip-text", "tooltip-delay", "onClick"]),
302
+ o.showArrowButton ? (s(), B(f, c({
291
303
  key: 0,
292
304
  id: e.id,
293
305
  modal: !1,
294
- open: r.open,
306
+ open: i.open,
295
307
  placement: e.placement,
296
308
  "initial-focus-element": e.initialFocusElement,
297
309
  "show-close-button": e.showCloseButton,
@@ -304,9 +316,9 @@ function z(t, I, e, P, r, o) {
304
316
  onOpened: o.onModalIsOpened
305
317
  }), {
306
318
  anchor: l(() => [
307
- i(u, {
308
- active: r.open,
309
- class: B([
319
+ r(u, {
320
+ active: i.open,
321
+ class: S([
310
322
  "d-recipe-callbar-button-with-popover__arrow",
311
323
  { "d-recipe-callbar-button-with-popover__arrow--large": !o.isCompactMode }
312
324
  ]),
@@ -318,8 +330,8 @@ function z(t, I, e, P, r, o) {
318
330
  width: "2rem",
319
331
  onClick: o.arrowClick
320
332
  }, {
321
- icon: l(() => [
322
- i(p, {
333
+ startIcon: l(() => [
334
+ r(p, {
323
335
  class: "d-recipe-callbar-button-with-popover__arrow-icon",
324
336
  size: "200"
325
337
  })
@@ -337,11 +349,11 @@ function z(t, I, e, P, r, o) {
337
349
  n(t.$slots, "footerContent")
338
350
  ]),
339
351
  _: 3
340
- }, 16, ["id", "open", "placement", "initial-focus-element", "show-close-button", "offset", "dialog-class", "open-popover", "onOpened"])) : S("", !0)
352
+ }, 16, ["id", "open", "placement", "initial-focus-element", "show-close-button", "offset", "dialog-class", "open-popover", "onOpened"])) : k("", !0)
341
353
  ], 16);
342
354
  }
343
- const j = /* @__PURE__ */ A(D, [["render", z]]);
355
+ const H = /* @__PURE__ */ A(D, [["render", z]]);
344
356
  export {
345
- j as default
357
+ H as default
346
358
  };
347
359
  //# sourceMappingURL=callbar-button-with-popover.js.map