@dialpad/dialtone 9.126.6 → 9.127.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (449) hide show
  1. package/README.md +1 -1
  2. package/dist/tokens/doc.json +23168 -23168
  3. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  4. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
  5. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +7 -7
  6. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  7. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  8. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
  9. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js +5 -5
  10. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  11. package/dist/vue2/lib/datepicker/datepicker.cjs +1 -1
  12. package/dist/vue2/lib/datepicker/datepicker.cjs.map +1 -1
  13. package/dist/vue2/lib/datepicker/datepicker.js +10 -10
  14. package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
  15. package/dist/vue2/lib/dropdown/dropdown.cjs +1 -1
  16. package/dist/vue2/lib/dropdown/dropdown.cjs.map +1 -1
  17. package/dist/vue2/lib/dropdown/dropdown.js +24 -26
  18. package/dist/vue2/lib/dropdown/dropdown.js.map +1 -1
  19. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  20. package/dist/vue2/lib/emoji-picker/emoji-picker.js +1 -0
  21. package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
  22. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +2 -2
  23. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  24. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +33 -29
  25. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  26. package/dist/vue2/lib/toast/toast.cjs.map +1 -1
  27. package/dist/vue2/lib/toast/toast.js.map +1 -1
  28. package/dist/vue2/localization/de-DE.cjs +1 -13
  29. package/dist/vue2/localization/de-DE.cjs.map +1 -1
  30. package/dist/vue2/localization/de-DE.js +1 -13
  31. package/dist/vue2/localization/de-DE.js.map +1 -1
  32. package/dist/vue2/localization/es-LA.cjs +1 -13
  33. package/dist/vue2/localization/es-LA.cjs.map +1 -1
  34. package/dist/vue2/localization/es-LA.js +1 -13
  35. package/dist/vue2/localization/es-LA.js.map +1 -1
  36. package/dist/vue2/localization/fr-FR.cjs +1 -13
  37. package/dist/vue2/localization/fr-FR.cjs.map +1 -1
  38. package/dist/vue2/localization/fr-FR.js +1 -13
  39. package/dist/vue2/localization/fr-FR.js.map +1 -1
  40. package/dist/vue2/localization/it-IT.cjs +1 -13
  41. package/dist/vue2/localization/it-IT.cjs.map +1 -1
  42. package/dist/vue2/localization/it-IT.js +1 -13
  43. package/dist/vue2/localization/it-IT.js.map +1 -1
  44. package/dist/vue2/localization/ja-JP.cjs +1 -8
  45. package/dist/vue2/localization/ja-JP.cjs.map +1 -1
  46. package/dist/vue2/localization/ja-JP.js +1 -8
  47. package/dist/vue2/localization/ja-JP.js.map +1 -1
  48. package/dist/vue2/localization/nl-NL.cjs +1 -13
  49. package/dist/vue2/localization/nl-NL.cjs.map +1 -1
  50. package/dist/vue2/localization/nl-NL.js +1 -13
  51. package/dist/vue2/localization/nl-NL.js.map +1 -1
  52. package/dist/vue2/localization/pt-BR.cjs +1 -13
  53. package/dist/vue2/localization/pt-BR.cjs.map +1 -1
  54. package/dist/vue2/localization/pt-BR.js +1 -13
  55. package/dist/vue2/localization/pt-BR.js.map +1 -1
  56. package/dist/vue2/localization/ru-RU.cjs +1 -23
  57. package/dist/vue2/localization/ru-RU.cjs.map +1 -1
  58. package/dist/vue2/localization/ru-RU.js +1 -23
  59. package/dist/vue2/localization/ru-RU.js.map +1 -1
  60. package/dist/vue2/localization/zh-CN.cjs +1 -8
  61. package/dist/vue2/localization/zh-CN.cjs.map +1 -1
  62. package/dist/vue2/localization/zh-CN.js +1 -8
  63. package/dist/vue2/localization/zh-CN.js.map +1 -1
  64. package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
  65. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  66. package/dist/vue2/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
  67. package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +1 -1
  68. package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
  69. package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
  70. package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
  71. package/dist/vue3/common/mixins/index.cjs +1 -1
  72. package/dist/vue3/common/mixins/index.js +8 -10
  73. package/dist/vue3/common/mixins/index.js.map +1 -1
  74. package/dist/vue3/common/utils/index.cjs +1 -1
  75. package/dist/vue3/common/utils/index.cjs.map +1 -1
  76. package/dist/vue3/common/utils/index.js +42 -38
  77. package/dist/vue3/common/utils/index.js.map +1 -1
  78. package/dist/vue3/component-documentation.json +1 -1
  79. package/dist/vue3/dialtone-vue.cjs +1 -1
  80. package/dist/vue3/dialtone-vue.js +298 -299
  81. package/dist/vue3/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  82. package/dist/vue3/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
  83. package/dist/vue3/lib/attachment-carousel/attachment-carousel.js +86 -110
  84. package/dist/vue3/lib/attachment-carousel/attachment-carousel.js.map +1 -1
  85. package/dist/vue3/lib/banner/banner.cjs +2 -2
  86. package/dist/vue3/lib/banner/banner.cjs.map +1 -1
  87. package/dist/vue3/lib/banner/banner.js +27 -38
  88. package/dist/vue3/lib/banner/banner.js.map +1 -1
  89. package/dist/vue3/lib/breadcrumbs/breadcrumbs.cjs +1 -1
  90. package/dist/vue3/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
  91. package/dist/vue3/lib/breadcrumbs/breadcrumbs.js +20 -18
  92. package/dist/vue3/lib/breadcrumbs/breadcrumbs.js.map +1 -1
  93. package/dist/vue3/lib/button/button.cjs +1 -1
  94. package/dist/vue3/lib/button/button.cjs.map +1 -1
  95. package/dist/vue3/lib/button/button.js +26 -24
  96. package/dist/vue3/lib/button/button.js.map +1 -1
  97. package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  98. package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
  99. package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +36 -41
  100. package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  101. package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  102. package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
  103. package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.js +35 -37
  104. package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  105. package/dist/vue3/lib/chip/chip.cjs +1 -1
  106. package/dist/vue3/lib/chip/chip.cjs.map +1 -1
  107. package/dist/vue3/lib/chip/chip.js +54 -57
  108. package/dist/vue3/lib/chip/chip.js.map +1 -1
  109. package/dist/vue3/lib/combobox/combobox-constants.cjs +1 -1
  110. package/dist/vue3/lib/combobox/combobox-constants.cjs.map +1 -1
  111. package/dist/vue3/lib/combobox/combobox-constants.js +2 -2
  112. package/dist/vue3/lib/combobox/combobox-constants.js.map +1 -1
  113. package/dist/vue3/lib/combobox/combobox-empty-list.cjs.map +1 -1
  114. package/dist/vue3/lib/combobox/combobox-empty-list.js.map +1 -1
  115. package/dist/vue3/lib/combobox/combobox-loading-list.cjs.map +1 -1
  116. package/dist/vue3/lib/combobox/combobox-loading-list.js.map +1 -1
  117. package/dist/vue3/lib/combobox/combobox.cjs +2 -2
  118. package/dist/vue3/lib/combobox/combobox.cjs.map +1 -1
  119. package/dist/vue3/lib/combobox/combobox.js +20 -20
  120. package/dist/vue3/lib/combobox/combobox.js.map +1 -1
  121. package/dist/vue3/lib/combobox/index.cjs +1 -1
  122. package/dist/vue3/lib/combobox/index.js +3 -3
  123. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  124. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  125. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js +119 -124
  126. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  127. package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
  128. package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
  129. package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.js +76 -80
  130. package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
  131. package/dist/vue3/lib/contact-centers-row/contact-centers-row.cjs +1 -1
  132. package/dist/vue3/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
  133. package/dist/vue3/lib/contact-centers-row/contact-centers-row.js +68 -63
  134. package/dist/vue3/lib/contact-centers-row/contact-centers-row.js.map +1 -1
  135. package/dist/vue3/lib/contact-row/contact-row.cjs +1 -1
  136. package/dist/vue3/lib/contact-row/contact-row.cjs.map +1 -1
  137. package/dist/vue3/lib/contact-row/contact-row.js +32 -48
  138. package/dist/vue3/lib/contact-row/contact-row.js.map +1 -1
  139. package/dist/vue3/lib/datepicker/datepicker-constants.cjs +1 -1
  140. package/dist/vue3/lib/datepicker/datepicker-constants.cjs.map +1 -1
  141. package/dist/vue3/lib/datepicker/datepicker-constants.js +2 -3
  142. package/dist/vue3/lib/datepicker/datepicker-constants.js.map +1 -1
  143. package/dist/vue3/lib/datepicker/datepicker.cjs +1 -1
  144. package/dist/vue3/lib/datepicker/datepicker.cjs.map +1 -1
  145. package/dist/vue3/lib/datepicker/datepicker.js +264 -349
  146. package/dist/vue3/lib/datepicker/datepicker.js.map +1 -1
  147. package/dist/vue3/lib/datepicker/formatUtils.cjs +1 -1
  148. package/dist/vue3/lib/datepicker/formatUtils.cjs.map +1 -1
  149. package/dist/vue3/lib/datepicker/formatUtils.js +21 -20
  150. package/dist/vue3/lib/datepicker/formatUtils.js.map +1 -1
  151. package/dist/vue3/lib/datepicker/utils.cjs +1 -1
  152. package/dist/vue3/lib/datepicker/utils.cjs.map +1 -1
  153. package/dist/vue3/lib/datepicker/utils.js +12 -11
  154. package/dist/vue3/lib/datepicker/utils.js.map +1 -1
  155. package/dist/vue3/lib/description-list/description-list.cjs +1 -1
  156. package/dist/vue3/lib/description-list/description-list.cjs.map +1 -1
  157. package/dist/vue3/lib/description-list/description-list.js +10 -10
  158. package/dist/vue3/lib/description-list/description-list.js.map +1 -1
  159. package/dist/vue3/lib/dropdown/dropdown.cjs +1 -1
  160. package/dist/vue3/lib/dropdown/dropdown.cjs.map +1 -1
  161. package/dist/vue3/lib/dropdown/dropdown.js +36 -46
  162. package/dist/vue3/lib/dropdown/dropdown.js.map +1 -1
  163. package/dist/vue3/lib/editor/editor.cjs +1 -1
  164. package/dist/vue3/lib/editor/editor.cjs.map +1 -1
  165. package/dist/vue3/lib/editor/editor.js +169 -186
  166. package/dist/vue3/lib/editor/editor.js.map +1 -1
  167. package/dist/vue3/lib/editor/index.cjs +1 -1
  168. package/dist/vue3/lib/editor/index.js +2 -2
  169. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs +1 -1
  170. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
  171. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js +7 -20
  172. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js.map +1 -1
  173. package/dist/vue3/lib/emoji-picker/emoji-picker.cjs +1 -1
  174. package/dist/vue3/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  175. package/dist/vue3/lib/emoji-picker/emoji-picker.js +419 -477
  176. package/dist/vue3/lib/emoji-picker/emoji-picker.js.map +1 -1
  177. package/dist/vue3/lib/emoji-picker/index.cjs +1 -1
  178. package/dist/vue3/lib/emoji-picker/index.js +3 -4
  179. package/dist/vue3/lib/emoji-row/emoji-row-constants.cjs +1 -1
  180. package/dist/vue3/lib/emoji-row/emoji-row-constants.cjs.map +1 -1
  181. package/dist/vue3/lib/emoji-row/emoji-row-constants.js +6 -7
  182. package/dist/vue3/lib/emoji-row/emoji-row-constants.js.map +1 -1
  183. package/dist/vue3/lib/emoji-row/emoji-row.cjs +1 -1
  184. package/dist/vue3/lib/emoji-row/emoji-row.cjs.map +1 -1
  185. package/dist/vue3/lib/emoji-row/emoji-row.js +53 -43
  186. package/dist/vue3/lib/emoji-row/emoji-row.js.map +1 -1
  187. package/dist/vue3/lib/feed-item-pill/feed-item-pill.cjs +1 -1
  188. package/dist/vue3/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
  189. package/dist/vue3/lib/feed-item-pill/feed-item-pill.js +52 -53
  190. package/dist/vue3/lib/feed-item-pill/feed-item-pill.js.map +1 -1
  191. package/dist/vue3/lib/general-row/general-row.cjs +1 -1
  192. package/dist/vue3/lib/general-row/general-row.cjs.map +1 -1
  193. package/dist/vue3/lib/general-row/general-row.js +133 -118
  194. package/dist/vue3/lib/general-row/general-row.js.map +1 -1
  195. package/dist/vue3/lib/group-row/group-row.cjs +1 -1
  196. package/dist/vue3/lib/group-row/group-row.cjs.map +1 -1
  197. package/dist/vue3/lib/group-row/group-row.js +53 -39
  198. package/dist/vue3/lib/group-row/group-row.js.map +1 -1
  199. package/dist/vue3/lib/icon/icon-constants.cjs.map +1 -1
  200. package/dist/vue3/lib/icon/icon-constants.js.map +1 -1
  201. package/dist/vue3/lib/icon/icon.cjs +1 -1
  202. package/dist/vue3/lib/icon/icon.cjs.map +1 -1
  203. package/dist/vue3/lib/icon/icon.js +15 -11
  204. package/dist/vue3/lib/icon/icon.js.map +1 -1
  205. package/dist/vue3/lib/image-viewer/image-viewer.cjs +1 -1
  206. package/dist/vue3/lib/image-viewer/image-viewer.cjs.map +1 -1
  207. package/dist/vue3/lib/image-viewer/image-viewer.js +51 -47
  208. package/dist/vue3/lib/image-viewer/image-viewer.js.map +1 -1
  209. package/dist/vue3/lib/ivr-node/ivr-node-constants.cjs +1 -1
  210. package/dist/vue3/lib/ivr-node/ivr-node-constants.cjs.map +1 -1
  211. package/dist/vue3/lib/ivr-node/ivr-node-constants.js +24 -24
  212. package/dist/vue3/lib/ivr-node/ivr-node-constants.js.map +1 -1
  213. package/dist/vue3/lib/ivr-node/ivr-node.cjs +1 -1
  214. package/dist/vue3/lib/ivr-node/ivr-node.cjs.map +1 -1
  215. package/dist/vue3/lib/ivr-node/ivr-node.js +80 -76
  216. package/dist/vue3/lib/ivr-node/ivr-node.js.map +1 -1
  217. package/dist/vue3/lib/message-input/message-input-link.cjs +1 -1
  218. package/dist/vue3/lib/message-input/message-input-link.cjs.map +1 -1
  219. package/dist/vue3/lib/message-input/message-input-link.js +100 -77
  220. package/dist/vue3/lib/message-input/message-input-link.js.map +1 -1
  221. package/dist/vue3/lib/message-input/message-input-topbar.cjs +1 -1
  222. package/dist/vue3/lib/message-input/message-input-topbar.cjs.map +1 -1
  223. package/dist/vue3/lib/message-input/message-input-topbar.js +126 -94
  224. package/dist/vue3/lib/message-input/message-input-topbar.js.map +1 -1
  225. package/dist/vue3/lib/message-input/message-input.cjs +1 -1
  226. package/dist/vue3/lib/message-input/message-input.cjs.map +1 -1
  227. package/dist/vue3/lib/message-input/message-input.js +272 -296
  228. package/dist/vue3/lib/message-input/message-input.js.map +1 -1
  229. package/dist/vue3/lib/modal/modal.cjs +1 -2
  230. package/dist/vue3/lib/modal/modal.cjs.map +1 -1
  231. package/dist/vue3/lib/modal/modal.js +64 -79
  232. package/dist/vue3/lib/modal/modal.js.map +1 -1
  233. package/dist/vue3/lib/notice/notice-action.cjs +1 -1
  234. package/dist/vue3/lib/notice/notice-action.cjs.map +1 -1
  235. package/dist/vue3/lib/notice/notice-action.js +38 -39
  236. package/dist/vue3/lib/notice/notice-action.js.map +1 -1
  237. package/dist/vue3/lib/notice/notice.cjs +1 -1
  238. package/dist/vue3/lib/notice/notice.cjs.map +1 -1
  239. package/dist/vue3/lib/notice/notice.js +37 -49
  240. package/dist/vue3/lib/notice/notice.js.map +1 -1
  241. package/dist/vue3/lib/pagination/pagination.cjs +1 -1
  242. package/dist/vue3/lib/pagination/pagination.cjs.map +1 -1
  243. package/dist/vue3/lib/pagination/pagination.js +72 -81
  244. package/dist/vue3/lib/pagination/pagination.js.map +1 -1
  245. package/dist/vue3/lib/popover/popover-header-footer.cjs +1 -1
  246. package/dist/vue3/lib/popover/popover-header-footer.cjs.map +1 -1
  247. package/dist/vue3/lib/popover/popover-header-footer.js +44 -45
  248. package/dist/vue3/lib/popover/popover-header-footer.js.map +1 -1
  249. package/dist/vue3/lib/popover/popover.cjs +1 -1
  250. package/dist/vue3/lib/popover/popover.cjs.map +1 -1
  251. package/dist/vue3/lib/popover/popover.js +26 -37
  252. package/dist/vue3/lib/popover/popover.js.map +1 -1
  253. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +3 -3
  254. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  255. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +187 -181
  256. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  257. package/dist/vue3/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
  258. package/dist/vue3/lib/settings-menu-button/settings-menu-button.js.map +1 -1
  259. package/dist/vue3/lib/time-pill/time-pill.cjs.map +1 -1
  260. package/dist/vue3/lib/time-pill/time-pill.js.map +1 -1
  261. package/dist/vue3/lib/toast/toast.cjs +1 -1
  262. package/dist/vue3/lib/toast/toast.cjs.map +1 -1
  263. package/dist/vue3/lib/toast/toast.js +83 -127
  264. package/dist/vue3/lib/toast/toast.js.map +1 -1
  265. package/dist/vue3/lib/unread-pill/unread-pill.cjs +1 -1
  266. package/dist/vue3/lib/unread-pill/unread-pill.cjs.map +1 -1
  267. package/dist/vue3/lib/unread-pill/unread-pill.js +25 -14
  268. package/dist/vue3/lib/unread-pill/unread-pill.js.map +1 -1
  269. package/dist/vue3/localization/de-DE.cjs +157 -0
  270. package/dist/vue3/localization/de-DE.cjs.map +1 -0
  271. package/dist/vue3/localization/de-DE.js +160 -0
  272. package/dist/vue3/localization/de-DE.js.map +1 -0
  273. package/dist/vue3/localization/en-US.cjs +175 -0
  274. package/dist/vue3/localization/en-US.cjs.map +1 -0
  275. package/dist/vue3/localization/en-US.js +178 -0
  276. package/dist/vue3/localization/en-US.js.map +1 -0
  277. package/dist/vue3/localization/es-LA.cjs +157 -0
  278. package/dist/vue3/localization/es-LA.cjs.map +1 -0
  279. package/dist/vue3/localization/es-LA.js +160 -0
  280. package/dist/vue3/localization/es-LA.js.map +1 -0
  281. package/dist/vue3/localization/fr-FR.cjs +157 -0
  282. package/dist/vue3/localization/fr-FR.cjs.map +1 -0
  283. package/dist/vue3/localization/fr-FR.js +160 -0
  284. package/dist/vue3/localization/fr-FR.js.map +1 -0
  285. package/dist/vue3/localization/index.cjs +2 -0
  286. package/dist/vue3/localization/index.cjs.map +1 -0
  287. package/dist/vue3/localization/index.js +82 -0
  288. package/dist/vue3/localization/index.js.map +1 -0
  289. package/dist/vue3/localization/it-IT.cjs +157 -0
  290. package/dist/vue3/localization/it-IT.cjs.map +1 -0
  291. package/dist/vue3/localization/it-IT.js +160 -0
  292. package/dist/vue3/localization/it-IT.js.map +1 -0
  293. package/dist/vue3/localization/ja-JP.cjs +157 -0
  294. package/dist/vue3/localization/ja-JP.cjs.map +1 -0
  295. package/dist/vue3/localization/ja-JP.js +160 -0
  296. package/dist/vue3/localization/ja-JP.js.map +1 -0
  297. package/dist/vue3/localization/nl-NL.cjs +157 -0
  298. package/dist/vue3/localization/nl-NL.cjs.map +1 -0
  299. package/dist/vue3/localization/nl-NL.js +160 -0
  300. package/dist/vue3/localization/nl-NL.js.map +1 -0
  301. package/dist/vue3/localization/pt-BR.cjs +157 -0
  302. package/dist/vue3/localization/pt-BR.cjs.map +1 -0
  303. package/dist/vue3/localization/pt-BR.js +160 -0
  304. package/dist/vue3/localization/pt-BR.js.map +1 -0
  305. package/dist/vue3/localization/ru-RU.cjs +157 -0
  306. package/dist/vue3/localization/ru-RU.cjs.map +1 -0
  307. package/dist/vue3/localization/ru-RU.js +160 -0
  308. package/dist/vue3/localization/ru-RU.js.map +1 -0
  309. package/dist/vue3/localization/zh-CN.cjs +157 -0
  310. package/dist/vue3/localization/zh-CN.cjs.map +1 -0
  311. package/dist/vue3/localization/zh-CN.js +160 -0
  312. package/dist/vue3/localization/zh-CN.js.map +1 -0
  313. package/dist/vue3/shared/sr_only_close_button.cjs +1 -1
  314. package/dist/vue3/shared/sr_only_close_button.cjs.map +1 -1
  315. package/dist/vue3/shared/sr_only_close_button.js +27 -25
  316. package/dist/vue3/shared/sr_only_close_button.js.map +1 -1
  317. package/dist/vue3/types/common/mixins/index.d.ts +0 -1
  318. package/dist/vue3/types/common/sr_only_close_button.vue.d.ts +8 -15
  319. package/dist/vue3/types/common/sr_only_close_button.vue.d.ts.map +1 -1
  320. package/dist/vue3/types/common/utils/index.d.ts +1 -0
  321. package/dist/vue3/types/common/utils/index.d.ts.map +1 -1
  322. package/dist/vue3/types/components/banner/banner.vue.d.ts +0 -33
  323. package/dist/vue3/types/components/banner/banner.vue.d.ts.map +1 -1
  324. package/dist/vue3/types/components/breadcrumbs/breadcrumbs.vue.d.ts +2 -0
  325. package/dist/vue3/types/components/breadcrumbs/breadcrumbs.vue.d.ts.map +1 -1
  326. package/dist/vue3/types/components/button/button.vue.d.ts +2 -0
  327. package/dist/vue3/types/components/button/button.vue.d.ts.map +1 -1
  328. package/dist/vue3/types/components/chip/chip.vue.d.ts +3 -15
  329. package/dist/vue3/types/components/chip/chip.vue.d.ts.map +1 -1
  330. package/dist/vue3/types/components/combobox/combobox.vue.d.ts.map +1 -1
  331. package/dist/vue3/types/components/combobox/combobox_constants.d.ts +2 -2
  332. package/dist/vue3/types/components/combobox/index.d.ts +1 -1
  333. package/dist/vue3/types/components/datepicker/composables/useCalendar.d.ts.map +1 -1
  334. package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts +5 -1
  335. package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts.map +1 -1
  336. package/dist/vue3/types/components/datepicker/datepicker.vue.d.ts.map +1 -1
  337. package/dist/vue3/types/components/datepicker/datepicker_constants.d.ts +0 -1
  338. package/dist/vue3/types/components/datepicker/datepicker_constants.d.ts.map +1 -1
  339. package/dist/vue3/types/components/datepicker/formatUtils.d.ts +5 -5
  340. package/dist/vue3/types/components/datepicker/formatUtils.d.ts.map +1 -1
  341. package/dist/vue3/types/components/datepicker/modules/calendar.vue.d.ts +0 -4
  342. package/dist/vue3/types/components/datepicker/modules/calendar.vue.d.ts.map +1 -1
  343. package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts +0 -12
  344. package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts.map +1 -1
  345. package/dist/vue3/types/components/datepicker/utils.d.ts +1 -0
  346. package/dist/vue3/types/components/datepicker/utils.d.ts.map +1 -1
  347. package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts +0 -24
  348. package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
  349. package/dist/vue3/types/components/emoji_picker/emoji_picker_constants.d.ts +0 -13
  350. package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
  351. package/dist/vue3/types/components/icon/icon.vue.d.ts +1 -0
  352. package/dist/vue3/types/components/icon/icon_constants.d.ts.map +1 -1
  353. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts +3 -8
  354. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  355. package/dist/vue3/types/components/modal/modal.vue.d.ts +3 -35
  356. package/dist/vue3/types/components/modal/modal.vue.d.ts.map +1 -1
  357. package/dist/vue3/types/components/notice/notice.vue.d.ts +1 -34
  358. package/dist/vue3/types/components/notice/notice.vue.d.ts.map +1 -1
  359. package/dist/vue3/types/components/notice/notice_action.vue.d.ts +7 -35
  360. package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
  361. package/dist/vue3/types/components/pagination/pagination.vue.d.ts +5 -24
  362. package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
  363. package/dist/vue3/types/components/popover/popover.vue.d.ts +0 -33
  364. package/dist/vue3/types/components/popover/popover.vue.d.ts.map +1 -1
  365. package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts +5 -10
  366. package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
  367. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +2 -0
  368. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  369. package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +2 -46
  370. package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
  371. package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts +1 -34
  372. package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
  373. package/dist/vue3/types/components/toast/toast.vue.d.ts +4 -115
  374. package/dist/vue3/types/components/toast/toast.vue.d.ts.map +1 -1
  375. package/dist/vue3/types/index.d.ts +1 -0
  376. package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +3 -11
  377. package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
  378. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +3 -10
  379. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
  380. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +4 -8
  381. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  382. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node_constants.d.ts +7 -7
  383. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node_constants.d.ts.map +1 -1
  384. package/dist/vue3/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
  385. package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -25
  386. package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
  387. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +3 -41
  388. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  389. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +6 -25
  390. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -1
  391. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +2 -2
  392. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +6 -49
  393. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  394. package/dist/vue3/types/recipes/conversation_view/editor/index.d.ts +1 -1
  395. package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +6 -2
  396. package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
  397. package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row_constants.d.ts.map +1 -1
  398. package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +3 -8
  399. package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
  400. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -1
  401. package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +6 -1
  402. package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
  403. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +12 -88
  404. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  405. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +11 -1
  406. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
  407. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +13 -1
  408. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
  409. package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +5 -8
  410. package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
  411. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -18
  412. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  413. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +9 -27
  414. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  415. package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts +11 -21
  416. package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
  417. package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +6 -2
  418. package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  419. package/package.json +4 -4
  420. package/dist/vue3/common/mixins/sr-only-close-button.cjs +0 -3
  421. package/dist/vue3/common/mixins/sr-only-close-button.cjs.map +0 -1
  422. package/dist/vue3/common/mixins/sr-only-close-button.js +0 -44
  423. package/dist/vue3/common/mixins/sr-only-close-button.js.map +0 -1
  424. package/dist/vue3/lib/contact-row/contact-row-constants.cjs +0 -2
  425. package/dist/vue3/lib/contact-row/contact-row-constants.cjs.map +0 -1
  426. package/dist/vue3/lib/contact-row/contact-row-constants.js +0 -5
  427. package/dist/vue3/lib/contact-row/contact-row-constants.js.map +0 -1
  428. package/dist/vue3/lib/emoji/emoji-constants.cjs +0 -2
  429. package/dist/vue3/lib/emoji/emoji-constants.cjs.map +0 -1
  430. package/dist/vue3/lib/emoji/emoji-constants.js +0 -5
  431. package/dist/vue3/lib/emoji/emoji-constants.js.map +0 -1
  432. package/dist/vue3/lib/group-row/group-row-constants.cjs +0 -2
  433. package/dist/vue3/lib/group-row/group-row-constants.cjs.map +0 -1
  434. package/dist/vue3/lib/group-row/group-row-constants.js +0 -8
  435. package/dist/vue3/lib/group-row/group-row-constants.js.map +0 -1
  436. package/dist/vue3/lib/time-pill/time-pill-constants.cjs +0 -2
  437. package/dist/vue3/lib/time-pill/time-pill-constants.cjs.map +0 -1
  438. package/dist/vue3/lib/time-pill/time-pill-constants.js +0 -8
  439. package/dist/vue3/lib/time-pill/time-pill-constants.js.map +0 -1
  440. package/dist/vue3/types/common/mixins/sr_only_close_button.d.ts +0 -30
  441. package/dist/vue3/types/common/mixins/sr_only_close_button.d.ts.map +0 -1
  442. package/dist/vue3/types/components/emoji/emoji_constants.d.ts +0 -3
  443. package/dist/vue3/types/components/emoji/emoji_constants.d.ts.map +0 -1
  444. package/dist/vue3/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts +0 -6
  445. package/dist/vue3/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts.map +0 -1
  446. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row_constants.d.ts +0 -3
  447. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row_constants.d.ts.map +0 -1
  448. package/dist/vue3/types/recipes/leftbar/group_row/group_row_constants.d.ts +0 -6
  449. package/dist/vue3/types/recipes/leftbar/group_row/group_row_constants.d.ts.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("@dialpad/dialtone-icons/vue2"),n=require("../../common/utils/index.cjs"),a=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),i=require("../callbar-button/callbar-button.cjs"),s=require("../dropdown/dropdown.cjs"),d=require("../button/button.cjs"),u=require("../../common/mixins/localization.cjs"),c=require("../callbar-button/callbar-button-constants.cjs"),p={name:"DtRecipeCallbarButtonWithDropdown",components:{DtRecipeCallbarButton:i.default,DtDropdown:s.default,DtButton:d.default,DtIconChevronUp:l.DtIconChevronUp},mixins:[u.default],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},buttonClass:{type:[String,Array,Object],default:""},textClass:{type:[String,Array,Object],default:""},buttonWidthSize:{type:String,default:"xl",validator:e=>c.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}},computed:{showArrowButton(){return this.forceShowArrow||!this.disabled},isCompactMode(){return this.buttonWidthSize==="sm"||this.buttonWidthSize==="md"},arrowButtonLabel(){return this.i18n.$ta("DIALTONE_CALLBAR_BUTTON_WITH_DROPDOWN_ARROW_BUTTON_LABEL")}},mounted(){n.warnIfUnmounted(this.$el,this.$options.name)},methods:{arrowClick(e){return this.$emit("arrow-click",e),this.toggleOpen()},toggleOpen(){return this.open=!this.open},syncOpenState(){this.open=this.openDropdown},buttonClick(e){this.$listeners.click?this.$emit("click",e):this.arrowClick(e)},onModalIsOpened(e){this.open=e,this.$emit("opened",e)}}};var f=function(){var t=this,o=t._self._c;return o("div",{staticClass:"dt-recipe--callbar-button-with-dropdown"},[o("dt-recipe-callbar-button",{staticClass:"dt-recipe--callbar-button-with-dropdown--main-button",attrs:{active:t.active,"aria-label":t.ariaLabel,"button-class":t.buttonClass,"button-width-size":t.buttonWidthSize,danger:t.danger,disabled:t.disabled,"inverted-tooltip":t.invertedTooltip,"show-tooltip":t.showTooltip,"text-class":t.textClass,"tooltip-delay":t.tooltipDelay,"tooltip-text":t.tooltipText},on:{click:t.buttonClick},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("icon")]},proxy:!0},{key:"tooltip",fn:function(){return[t._t("tooltip")]},proxy:!0}],null,!0)},[t._t("default")],2),t.showArrowButton?o("dt-dropdown",t._b({staticClass:"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper",attrs:{id:t.id,modal:!1,"fallback-placements":t.fallbackPlacements,open:t.open,placement:t.placement,padding:"none"},on:{opened:t.onModalIsOpened},scopedSlots:t._u([{key:"anchor",fn:function(){return[o("dt-button",t._b({class:["dt-recipe--callbar-button-with-dropdown--arrow",{"dt-recipe--callbar-button-with-dropdown--arrow--large":!t.isCompactMode}],attrs:{active:t.open,circle:"",importance:"clear",size:"lg",width:"2rem"},on:{click:t.arrowClick},scopedSlots:t._u([{key:"icon",fn:function(){return[o("dt-icon-chevron-up",{staticClass:"dt-recipe--callbar-button-with-dropdown--arrow__icon",attrs:{size:"200"}})]},proxy:!0}],null,!1,887776886)},"dt-button",t.arrowButtonLabel,!1))]},proxy:!0},{key:"list",fn:function({close:r}){return[t._t("list",null,{close:r})]}}],null,!0)},"dt-dropdown",t.$attrs,!1)):t._e()],1)},b=[],_=a.n(p,f,b);const w=_.exports;exports.default=w;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("@dialpad/dialtone-icons/vue2"),n=require("../../common/utils/index.cjs"),a=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),i=require("../callbar-button/callbar-button.cjs"),s=require("../dropdown/dropdown.cjs"),d=require("../button/button.cjs"),u=require("../../common/mixins/localization.cjs"),c=require("../callbar-button/callbar-button-constants.cjs"),p={name:"DtRecipeCallbarButtonWithDropdown",components:{DtRecipeCallbarButton:i.default,DtDropdown:s.default,DtButton:d.default,DtIconChevronUp:l.DtIconChevronUp},mixins:[u.default],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},buttonClass:{type:[String,Array,Object],default:""},textClass:{type:[String,Array,Object],default:""},buttonWidthSize:{type:String,default:"xl",validator:e=>c.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}},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(this.$el,this.$options.name)},methods:{arrowClick(e){return this.$emit("arrow-click",e),this.toggleOpen()},toggleOpen(){return this.open=!this.open},syncOpenState(){this.open=this.openDropdown},buttonClick(e){this.$listeners.click?this.$emit("click",e):this.arrowClick(e)},onModalIsOpened(e){this.open=e,this.$emit("opened",e)}}};var b=function(){var t=this,o=t._self._c;return o("div",{staticClass:"dt-recipe--callbar-button-with-dropdown"},[o("dt-recipe-callbar-button",{staticClass:"dt-recipe--callbar-button-with-dropdown--main-button",attrs:{active:t.active,"aria-label":t.ariaLabel,"button-class":t.buttonClass,"button-width-size":t.buttonWidthSize,danger:t.danger,disabled:t.disabled,"inverted-tooltip":t.invertedTooltip,"show-tooltip":t.showTooltip,"text-class":t.textClass,"tooltip-delay":t.tooltipDelay,"tooltip-text":t.tooltipText},on:{click:t.buttonClick},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("icon")]},proxy:!0},{key:"tooltip",fn:function(){return[t._t("tooltip")]},proxy:!0}],null,!0)},[t._t("default")],2),t.showArrowButton?o("dt-dropdown",t._b({staticClass:"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper",attrs:{id:t.id,modal:!1,"fallback-placements":t.fallbackPlacements,open:t.open,placement:t.placement,padding:"none"},on:{opened:t.onModalIsOpened},scopedSlots:t._u([{key:"anchor",fn:function(){return[o("dt-button",{class:["dt-recipe--callbar-button-with-dropdown--arrow",{"dt-recipe--callbar-button-with-dropdown--arrow--large":!t.isCompactMode}],attrs:{active:t.open,circle:!0,importance:"clear",size:"lg","aria-label":t.arrowButtonLabel,title:t.arrowButtonLabel,width:"2rem"},on:{click:t.arrowClick},scopedSlots:t._u([{key:"icon",fn:function(){return[o("dt-icon-chevron-up",{staticClass:"dt-recipe--callbar-button-with-dropdown--arrow__icon",attrs:{size:"200"}})]},proxy:!0}],null,!1,887776886)})]},proxy:!0},{key:"list",fn:function({close:r}){return[t._t("list",null,{close:r})]}}],null,!0)},"dt-dropdown",t.$attrs,!1)):t._e()],1)},f=[],_=a.n(p,b,f);const w=_.exports;exports.default=w;
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 >\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 :modal=\"false\"\n :fallback-placements=\"fallbackPlacements\"\n :open=\"open\"\n :placement=\"placement\"\n class=\"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper\"\n padding=\"none\"\n v-bind=\"$attrs\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n :active=\"open\"\n :class=\"['dt-recipe--callbar-button-with-dropdown--arrow',\n { 'dt-recipe--callbar-button-with-dropdown--arrow--large': !isCompactMode }]\"\n circle\n importance=\"clear\"\n size=\"lg\"\n v-bind=\"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/vue2';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils, { warnIfUnmounted } from '@/common/utils';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithDropdown',\n\n components: { DtRecipeCallbarButton, DtDropdown, DtButton, DtIconChevronUp },\n\n mixins: [DtLocalizationMixin],\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 * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal dropdown is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n arrowButtonLabel () {\n return this.i18n.$ta('DIALTONE_CALLBAR_BUTTON_WITH_DROPDOWN_ARROW_BUTTON_LABEL');\n },\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openDropdown;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the dropdown\n // the same as if the arrow was clicked.\n if (!this.$listeners.click) {\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","DtLocalizationMixin","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","warnIfUnmounted","ev","isOpened"],"mappings":"seA6EAA,EAAA,CACA,KAAA,oCAEA,WAAA,CAAA,sBAAAC,EAAA,QAAA,WAAAC,UAAAC,SAAAA,EAAAA,QAAAC,gBAAAA,EAAAA,eAAA,EAEA,OAAA,CAAAC,EAAAA,OAAA,EAMA,aAAA,GAEA,MAAA,CAIA,GAAA,CACA,KAAA,OACA,SAAA,CACA,OAAAC,EAAAA,QAAA,iBACA,CACA,EAKA,UAAA,CACA,KAAA,OACA,QAAA,KACA,UAAAC,GACAA,GAAAC,SAAA,OAAA,OAEA,EAUA,UAAA,CACA,KAAA,OACA,QAAA,KACA,EAYA,mBAAA,CACA,KAAA,MACA,QAAA,IACA,CAAA,MAAA,CAEA,EAOA,SAAA,CACA,KAAA,QACA,QAAA,EACA,EAOA,eAAA,CACA,KAAA,QACA,QAAA,EACA,EAQA,OAAA,CACA,KAAA,QACA,QAAA,EACA,EAQA,OAAA,CACA,KAAA,QACA,QAAA,EACA,EAKA,YAAA,CACA,KAAA,CAAA,OAAA,MAAA,MAAA,EACA,QAAA,EACA,EAKA,UAAA,CACA,KAAA,CAAA,OAAA,MAAA,MAAA,EACA,QAAA,EACA,EAKA,gBAAA,CACA,KAAA,OACA,QAAA,KACA,UAAAC,GAAAC,kCAAA,SAAAD,CAAA,CACA,EAMA,gBAAA,CACA,KAAA,QACA,QAAA,EACA,EAOA,YAAA,CACA,KAAA,QACA,QAAA,IACA,EAKA,YAAA,CACA,KAAA,OACA,QAAA,MACA,EAMA,aAAA,CACA,KAAA,QACA,QAAA,MACA,CACA,EAEA,MAAA,CAIA,cAQA,QAKA,QACA,EAEA,MAAA,CACA,MAAA,CACA,KAAA,EACA,CACA,EAEA,SAAA,CACA,iBAAA,CACA,OAAA,KAAA,gBAAA,CAAA,KAAA,QACA,EAEA,eAAA,CACA,OAAA,KAAA,kBAAA,MAAA,KAAA,kBAAA,IACA,EAEA,kBAAA,CACA,OAAA,KAAA,KAAA,IAAA,0DAAA,CACA,CACA,EAEA,SAAA,CACAE,EAAA,gBAAA,KAAA,IAAA,KAAA,SAAA,IAAA,CACA,EAEA,QAAA,CACA,WAAAC,EAAA,CACA,YAAA,MAAA,cAAAA,CAAA,EACA,KAAA,YACA,EAEA,YAAA,CACA,OAAA,KAAA,KAAA,CAAA,KAAA,IACA,EAEA,eAAA,CACA,KAAA,KAAA,KAAA,YACA,EAEA,YAAAA,EAAA,CAGA,KAAA,WAAA,MAGA,KAAA,MAAA,QAAAA,CAAA,EAFA,KAAA,WAAAA,CAAA,CAIA,EAEA,gBAAAC,EAAA,CACA,KAAA,KAAAA,EACA,KAAA,MAAA,SAAAA,CAAA,CACA,CACA,CAEA"}
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 >\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 :modal=\"false\"\n :fallback-placements=\"fallbackPlacements\"\n :open=\"open\"\n :placement=\"placement\"\n class=\"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper\"\n padding=\"none\"\n v-bind=\"$attrs\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n :active=\"open\"\n :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/vue2';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils, { warnIfUnmounted } from '@/common/utils';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithDropdown',\n\n components: { DtRecipeCallbarButton, DtDropdown, DtButton, DtIconChevronUp },\n\n mixins: [DtLocalizationMixin],\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 * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal dropdown is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n arrowButtonLabel () {\n return this.i18n.$t('DIALTONE_CALLBAR_BUTTON_WITH_DROPDOWN_ARROW_BUTTON_ARIA_LABEL');\n },\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openDropdown;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the dropdown\n // the same as if the arrow was clicked.\n if (!this.$listeners.click) {\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","DtLocalizationMixin","utils","label","this","size","CALLBAR_BUTTON_VALID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DAAA,CACA,CACA,EAEA,SAAA,CACAE,EAAA,gBAAA,KAAA,IAAA,KAAA,SAAA,IAAA,CACA,EAEA,QAAA,CACA,WAAAC,EAAA,CACA,YAAA,MAAA,cAAAA,CAAA,EACA,KAAA,YACA,EAEA,YAAA,CACA,OAAA,KAAA,KAAA,CAAA,KAAA,IACA,EAEA,eAAA,CACA,KAAA,KAAA,KAAA,YACA,EAEA,YAAAA,EAAA,CAGA,KAAA,WAAA,MAGA,KAAA,MAAA,QAAAA,CAAA,EAFA,KAAA,WAAAA,CAAA,CAIA,EAEA,gBAAAC,EAAA,CACA,KAAA,KAAAA,EACA,KAAA,MAAA,SAAAA,CAAA,CACA,CACA,CAEA"}
@@ -182,7 +182,7 @@ const f = {
182
182
  return this.buttonWidthSize === "sm" || this.buttonWidthSize === "md";
183
183
  },
184
184
  arrowButtonLabel() {
185
- return this.i18n.$ta("DIALTONE_CALLBAR_BUTTON_WITH_DROPDOWN_ARROW_BUTTON_LABEL");
185
+ return this.i18n.$t("DIALTONE_CALLBAR_BUTTON_WITH_DROPDOWN_ARROW_BUTTON_ARIA_LABEL");
186
186
  }
187
187
  },
188
188
  mounted() {
@@ -213,22 +213,22 @@ var b = function() {
213
213
  }, proxy: !0 }, { key: "tooltip", fn: function() {
214
214
  return [t._t("tooltip")];
215
215
  }, proxy: !0 }], null, !0) }, [t._t("default")], 2), t.showArrowButton ? o("dt-dropdown", t._b({ staticClass: "dt-recipe--callbar-button-with-dropdown--dropdown-wrapper", attrs: { id: t.id, modal: !1, "fallback-placements": t.fallbackPlacements, open: t.open, placement: t.placement, padding: "none" }, on: { opened: t.onModalIsOpened }, scopedSlots: t._u([{ key: "anchor", fn: function() {
216
- return [o("dt-button", t._b({ class: [
216
+ return [o("dt-button", { class: [
217
217
  "dt-recipe--callbar-button-with-dropdown--arrow",
218
218
  { "dt-recipe--callbar-button-with-dropdown--arrow--large": !t.isCompactMode }
219
- ], attrs: { active: t.open, circle: "", importance: "clear", size: "lg", width: "2rem" }, on: { click: t.arrowClick }, scopedSlots: t._u([{ key: "icon", fn: function() {
219
+ ], attrs: { active: t.open, circle: !0, importance: "clear", size: "lg", "aria-label": t.arrowButtonLabel, title: t.arrowButtonLabel, width: "2rem" }, on: { click: t.arrowClick }, scopedSlots: t._u([{ key: "icon", fn: function() {
220
220
  return [o("dt-icon-chevron-up", { staticClass: "dt-recipe--callbar-button-with-dropdown--arrow__icon", attrs: { size: "200" } })];
221
- }, proxy: !0 }], null, !1, 887776886) }, "dt-button", t.arrowButtonLabel, !1))];
221
+ }, proxy: !0 }], null, !1, 887776886) })];
222
222
  }, proxy: !0 }, { key: "list", fn: function({ close: n }) {
223
223
  return [t._t("list", null, { close: n })];
224
224
  } }], null, !0) }, "dt-dropdown", t.$attrs, !1)) : t._e()], 1);
225
- }, m = [], h = /* @__PURE__ */ l(
225
+ }, m = [], w = /* @__PURE__ */ l(
226
226
  f,
227
227
  b,
228
228
  m
229
229
  );
230
- const v = h.exports;
230
+ const A = w.exports;
231
231
  export {
232
- v as default
232
+ A as default
233
233
  };
234
234
  //# 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 >\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 :modal=\"false\"\n :fallback-placements=\"fallbackPlacements\"\n :open=\"open\"\n :placement=\"placement\"\n class=\"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper\"\n padding=\"none\"\n v-bind=\"$attrs\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n :active=\"open\"\n :class=\"['dt-recipe--callbar-button-with-dropdown--arrow',\n { 'dt-recipe--callbar-button-with-dropdown--arrow--large': !isCompactMode }]\"\n circle\n importance=\"clear\"\n size=\"lg\"\n v-bind=\"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/vue2';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils, { warnIfUnmounted } from '@/common/utils';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithDropdown',\n\n components: { DtRecipeCallbarButton, DtDropdown, DtButton, DtIconChevronUp },\n\n mixins: [DtLocalizationMixin],\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 * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal dropdown is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n arrowButtonLabel () {\n return this.i18n.$ta('DIALTONE_CALLBAR_BUTTON_WITH_DROPDOWN_ARROW_BUTTON_LABEL');\n },\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openDropdown;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the dropdown\n // the same as if the arrow was clicked.\n if (!this.$listeners.click) {\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","DtLocalizationMixin","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","warnIfUnmounted","ev","isOpened"],"mappings":";;;;;;;;AA6EA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,uBAAAC,GAAA,YAAAC,GAAA,UAAAC,GAAA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A,SAAAA,CAAA,IAFA,KAAA,WAAAA,CAAA;AAAA,IAIA;AAAA,IAEA,gBAAAC,GAAA;AACA,WAAA,OAAAA,GACA,KAAA,MAAA,UAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;"}
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 >\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 :modal=\"false\"\n :fallback-placements=\"fallbackPlacements\"\n :open=\"open\"\n :placement=\"placement\"\n class=\"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper\"\n padding=\"none\"\n v-bind=\"$attrs\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n :active=\"open\"\n :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/vue2';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils, { warnIfUnmounted } from '@/common/utils';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithDropdown',\n\n components: { DtRecipeCallbarButton, DtDropdown, DtButton, DtIconChevronUp },\n\n mixins: [DtLocalizationMixin],\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 * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal dropdown is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n arrowButtonLabel () {\n return this.i18n.$t('DIALTONE_CALLBAR_BUTTON_WITH_DROPDOWN_ARROW_BUTTON_ARIA_LABEL');\n },\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openDropdown;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the dropdown\n // the same as if the arrow was clicked.\n if (!this.$listeners.click) {\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","DtLocalizationMixin","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","warnIfUnmounted","ev","isOpened"],"mappings":";;;;;;;;AA8EA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,uBAAAC,GAAA,YAAAC,GAAA,UAAAC,GAAA,iBAAAC,EAAA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AACA,eAAAC,EAAA;MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MACAA,KAAAC,SAAA,OAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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,IAIA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA;AAAA;AAAA;AAAA;AAAA,IAKA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,kBAAA;AACA,aAAA,KAAA,kBAAA,CAAA,KAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,aAAA,KAAA,oBAAA,QAAA,KAAA,oBAAA;AAAA,IACA;AAAA,IAEA,mBAAA;AACA,aAAA,KAAA,KAAA,GAAA,+DAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,IAAAE,EAAA,KAAA,KAAA,KAAA,SAAA,IAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,WAAAC,GAAA;AACA,kBAAA,MAAA,eAAAA,CAAA,GACA,KAAA;IACA;AAAA,IAEA,aAAA;AACA,aAAA,KAAA,OAAA,CAAA,KAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,WAAA,OAAA,KAAA;AAAA,IACA;AAAA,IAEA,YAAAA,GAAA;AAGA,MAAA,KAAA,WAAA,QAGA,KAAA,MAAA,SAAAA,CAAA,IAFA,KAAA,WAAAA,CAAA;AAAA,IAIA;AAAA,IAEA,gBAAAC,GAAA;AACA,WAAA,OAAAA,GACA,KAAA,MAAA,UAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("@dialpad/dialtone-icons/vue2"),n=require("../../common/utils/index.cjs"),r=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),a=require("../callbar-button/callbar-button.cjs"),i=require("../popover/popover.cjs"),s=require("../button/button.cjs"),p=require("../../common/mixins/localization.cjs"),u=require("../callbar-button/callbar-button-constants.cjs"),c={name:"DtRecipeCallbarButtonWithPopover",components:{DtRecipeCallbarButton:a.default,DtPopover:i.default,DtButton:s.default,DtIconChevronUp:l.DtIconChevronUp},mixins:[p.default],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},buttonClass:{type:[String,Array,Object],default:""},textClass:{type:[String,Array,Object],default:""},buttonWidthSize:{type:String,default:"xl",validator:e=>u.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}},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.$ta("DIALTONE_CALLBAR_BUTTON_WITH_POPOVER_ARROW_BUTTON_LABEL")}},mounted(){n.warnIfUnmounted(this.$el,this.$options.name)},methods:{arrowClick(e){return this.$emit("arrow-click",e),this.toggleOpen()},toggleOpen(){return this.open=!this.open},syncOpenState(){this.open=this.openPopover},buttonClick(e){this.$listeners.click?this.$emit("click",e):this.arrowClick(e)},onModalIsOpened(e){this.open=e,this.$emit("opened",e)}}};var d=function(){var t=this,o=t._self._c;return o("div",{staticClass:"d-recipe-callbar-button-with-popover"},[o("dt-recipe-callbar-button",{staticClass:"d-recipe-callbar-button-with-popover--main-button",attrs:{"aria-label":t.ariaLabel,disabled:t.disabled,active:t.active,danger:t.danger,"button-class":t.buttonClass,"button-width-size":t.buttonWidthSize,"text-class":t.textClass,"inverted-tooltip":t.invertedTooltip,"show-tooltip":t.showTooltip,"tooltip-text":t.tooltipText,"tooltip-delay":t.tooltipDelay},on:{click:t.buttonClick}},[t._t("icon",null,{slot:"icon"}),t._t("tooltip",null,{slot:"tooltip"}),t._t("default")],2),t.showArrowButton?o("dt-popover",t._b({staticClass:"d-recipe-callbar-button-with-popover__popover-wrapper",attrs:{id:t.id,modal:!1,open:t.open,placement:t.placement,"initial-focus-element":t.initialFocusElement,"show-close-button":t.showCloseButton,offset:t.offset,padding:"none","dialog-class":["d-recipe-callbar-button-with-popover__popover",t.contentClass],"open-popover":t.showPopover},on:{opened:t.onModalIsOpened},scopedSlots:t._u([{key:"anchor",fn:function(){return[o("dt-button",t._b({class:["d-recipe-callbar-button-with-popover__arrow",{"d-recipe-callbar-button-with-popover__arrow--large":!t.isCompactMode}],attrs:{active:t.open,circle:"",importance:"clear",size:"lg",width:"2rem"},on:{click:t.arrowClick},scopedSlots:t._u([{key:"icon",fn:function(){return[o("dt-icon-chevron-up",{staticClass:"d-recipe-callbar-button-with-popover__arrow-icon",attrs:{size:"200"}})]},proxy:!0}],null,!1,778999832)},"dt-button",t.arrowButtonLabel,!1))]},proxy:!0}],null,!1,2824568807)},"dt-popover",t.$attrs,!1),[t._t("content",null,{slot:"content"}),t._t("headerContent",null,{slot:"headerContent"}),t._t("footerContent",null,{slot:"footerContent"})],2):t._e()],1)},f=[],_=r.n(c,d,f);const b=_.exports;exports.default=b;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("@dialpad/dialtone-icons/vue2"),n=require("../../common/utils/index.cjs"),r=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),a=require("../callbar-button/callbar-button.cjs"),i=require("../popover/popover.cjs"),s=require("../button/button.cjs"),p=require("../../common/mixins/localization.cjs"),u=require("../callbar-button/callbar-button-constants.cjs"),c={name:"DtRecipeCallbarButtonWithPopover",components:{DtRecipeCallbarButton:a.default,DtPopover:i.default,DtButton:s.default,DtIconChevronUp:l.DtIconChevronUp},mixins:[p.default],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},buttonClass:{type:[String,Array,Object],default:""},textClass:{type:[String,Array,Object],default:""},buttonWidthSize:{type:String,default:"xl",validator:e=>u.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}},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(this.$el,this.$options.name)},methods:{arrowClick(e){return this.$emit("arrow-click",e),this.toggleOpen()},toggleOpen(){return this.open=!this.open},syncOpenState(){this.open=this.openPopover},buttonClick(e){this.$listeners.click?this.$emit("click",e):this.arrowClick(e)},onModalIsOpened(e){this.open=e,this.$emit("opened",e)}}};var d=function(){var t=this,o=t._self._c;return o("div",{staticClass:"d-recipe-callbar-button-with-popover"},[o("dt-recipe-callbar-button",{staticClass:"d-recipe-callbar-button-with-popover--main-button",attrs:{"aria-label":t.ariaLabel,disabled:t.disabled,active:t.active,danger:t.danger,"button-class":t.buttonClass,"button-width-size":t.buttonWidthSize,"text-class":t.textClass,"inverted-tooltip":t.invertedTooltip,"show-tooltip":t.showTooltip,"tooltip-text":t.tooltipText,"tooltip-delay":t.tooltipDelay},on:{click:t.buttonClick}},[t._t("icon",null,{slot:"icon"}),t._t("tooltip",null,{slot:"tooltip"}),t._t("default")],2),t.showArrowButton?o("dt-popover",t._b({staticClass:"d-recipe-callbar-button-with-popover__popover-wrapper",attrs:{id:t.id,modal:!1,open:t.open,placement:t.placement,"initial-focus-element":t.initialFocusElement,"show-close-button":t.showCloseButton,offset:t.offset,padding:"none","dialog-class":["d-recipe-callbar-button-with-popover__popover",t.contentClass],"open-popover":t.showPopover},on:{opened:t.onModalIsOpened},scopedSlots:t._u([{key:"anchor",fn:function(){return[o("dt-button",{class:["d-recipe-callbar-button-with-popover__arrow",{"d-recipe-callbar-button-with-popover__arrow--large":!t.isCompactMode}],attrs:{active:t.open,circle:!0,importance:"clear",size:"lg","aria-label":t.arrowButtonLabel,title:t.arrowButtonLabel,width:"2rem"},on:{click:t.arrowClick},scopedSlots:t._u([{key:"icon",fn:function(){return[o("dt-icon-chevron-up",{staticClass:"d-recipe-callbar-button-with-popover__arrow-icon",attrs:{size:"200"}})]},proxy:!0}],null,!1,778999832)})]},proxy:!0}],null,!1,2571181550)},"dt-popover",t.$attrs,!1),[t._t("content",null,{slot:"content"}),t._t("headerContent",null,{slot:"headerContent"}),t._t("footerContent",null,{slot:"footerContent"})],2):t._e()],1)},f=[],_=r.n(c,d,f);const b=_.exports;exports.default=b;
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 >\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 <slot\n slot=\"icon\"\n name=\"icon\"\n />\n <slot\n slot=\"tooltip\"\n name=\"tooltip\"\n />\n <slot />\n </dt-recipe-callbar-button>\n <dt-popover\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :open=\"open\"\n :placement=\"placement\"\n :initial-focus-element=\"initialFocusElement\"\n :show-close-button=\"showCloseButton\"\n :offset=\"offset\"\n padding=\"none\"\n class=\"d-recipe-callbar-button-with-popover__popover-wrapper\"\n :dialog-class=\"['d-recipe-callbar-button-with-popover__popover', contentClass]\"\n v-bind=\"$attrs\"\n :open-popover=\"showPopover\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n :active=\"open\"\n :class=\"['d-recipe-callbar-button-with-popover__arrow',\n { 'd-recipe-callbar-button-with-popover__arrow--large': !isCompactMode }]\"\n circle\n importance=\"clear\"\n size=\"lg\"\n v-bind=\"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 <slot\n slot=\"content\"\n name=\"content\"\n />\n <slot\n slot=\"headerContent\"\n name=\"headerContent\"\n />\n <slot\n slot=\"footerContent\"\n name=\"footerContent\"\n />\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/vue2';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils, { warnIfUnmounted } from '@/common/utils';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithPopover',\n\n components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIconChevronUp },\n\n mixins: [DtLocalizationMixin],\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 * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Additional class name for the popover content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * To auto open the modal popover.\n */\n openPopover: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal popover is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showPopover () {\n if (!this.openPopover || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n\n arrowButtonLabel () {\n return this.i18n.$ta('DIALTONE_CALLBAR_BUTTON_WITH_POPOVER_ARROW_BUTTON_LABEL');\n },\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openPopover;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the popover\n // the same as if the arrow was clicked.\n if (!this.$listeners.click) {\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","DtLocalizationMixin","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","warnIfUnmounted","ev","isOpened"],"mappings":"oeAyFAA,EAAA,CACA,KAAA,mCAEA,WAAA,CAAA,sBAAAC,EAAA,QAAA,UAAAC,UAAAC,SAAAA,EAAAA,QAAAC,gBAAAA,EAAAA,eAAA,EAEA,OAAA,CAAAC,EAAAA,OAAA,EAMA,aAAA,GAEA,MAAA,CAIA,GAAA,CACA,KAAA,OACA,SAAA,CACA,OAAAC,EAAAA,QAAA,iBACA,CACA,EAKA,UAAA,CACA,KAAA,OACA,QAAA,KACA,UAAAC,GACAA,GAAAC,SAAA,OAAA,OAEA,EAUA,UAAA,CACA,KAAA,OACA,QAAA,KACA,EAaA,OAAA,CACA,KAAA,MACA,QAAA,IAAA,CAAA,EAAA,EAAA,CACA,EASA,oBAAA,CACA,KAAA,OACA,QAAA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AA,KAAA,WACA,EAEA,YAAAA,EAAA,CAGA,KAAA,WAAA,MAGA,KAAA,MAAA,QAAAA,CAAA,EAFA,KAAA,WAAAA,CAAA,CAIA,EAEA,gBAAAC,EAAA,CACA,KAAA,KAAAA,EACA,KAAA,MAAA,SAAAA,CAAA,CACA,CACA,CAEA"}
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 >\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 <slot\n slot=\"icon\"\n name=\"icon\"\n />\n <slot\n slot=\"tooltip\"\n name=\"tooltip\"\n />\n <slot />\n </dt-recipe-callbar-button>\n <dt-popover\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :open=\"open\"\n :placement=\"placement\"\n :initial-focus-element=\"initialFocusElement\"\n :show-close-button=\"showCloseButton\"\n :offset=\"offset\"\n padding=\"none\"\n class=\"d-recipe-callbar-button-with-popover__popover-wrapper\"\n :dialog-class=\"['d-recipe-callbar-button-with-popover__popover', contentClass]\"\n v-bind=\"$attrs\"\n :open-popover=\"showPopover\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n :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 <slot\n slot=\"content\"\n name=\"content\"\n />\n <slot\n slot=\"headerContent\"\n name=\"headerContent\"\n />\n <slot\n slot=\"footerContent\"\n name=\"footerContent\"\n />\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/vue2';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils, { warnIfUnmounted } from '@/common/utils';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithPopover',\n\n components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIconChevronUp },\n\n mixins: [DtLocalizationMixin],\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 * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Additional class name for the popover content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * To auto open the modal popover.\n */\n openPopover: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal popover is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showPopover () {\n if (!this.openPopover || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n\n arrowButtonLabel () {\n return this.i18n.$t('DIALTONE_CALLBAR_BUTTON_WITH_POPOVER_ARROW_BUTTON_ARIA_LABEL');\n },\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openPopover;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the popover\n // the same as if the arrow was clicked.\n if (!this.$listeners.click) {\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","DtLocalizationMixin","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","warnIfUnmounted","ev","isOpened"],"mappings":"oeA0FAA,EAAA,CACA,KAAA,mCAEA,WAAA,CAAA,sBAAAC,EAAA,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KAAA,kBAAA,MAAA,KAAA,kBAAA,IACA,EAEA,aAAA,CACA,MAAA,CAAA,KAAA,aAAA,KAAA,MACA,KAAA,cAAA,EACA,IAGA,KAAA,YACA,EAEA,kBAAA,CACA,OAAA,KAAA,KAAA,GAAA,8DAAA,CACA,CACA,EAEA,SAAA,CACAE,EAAA,gBAAA,KAAA,IAAA,KAAA,SAAA,IAAA,CACA,EAEA,QAAA,CACA,WAAAC,EAAA,CACA,YAAA,MAAA,cAAAA,CAAA,EACA,KAAA,YACA,EAEA,YAAA,CACA,OAAA,KAAA,KAAA,CAAA,KAAA,IACA,EAEA,eAAA,CACA,KAAA,KAAA,KAAA,WACA,EAEA,YAAAA,EAAA,CAGA,KAAA,WAAA,MAGA,KAAA,MAAA,QAAAA,CAAA,EAFA,KAAA,WAAAA,CAAA,CAIA,EAEA,gBAAAC,EAAA,CACA,KAAA,KAAAA,EACA,KAAA,MAAA,SAAAA,CAAA,CACA,CACA,CAEA"}
@@ -218,7 +218,7 @@ const d = {
218
218
  return !this.openPopover || this.open ? (this.syncOpenState(), !1) : this.toggleOpen();
219
219
  },
220
220
  arrowButtonLabel() {
221
- return this.i18n.$ta("DIALTONE_CALLBAR_BUTTON_WITH_POPOVER_ARROW_BUTTON_LABEL");
221
+ return this.i18n.$t("DIALTONE_CALLBAR_BUTTON_WITH_POPOVER_ARROW_BUTTON_ARIA_LABEL");
222
222
  }
223
223
  },
224
224
  mounted() {
@@ -245,13 +245,13 @@ const d = {
245
245
  var f = function() {
246
246
  var t = this, o = t._self._c;
247
247
  return o("div", { staticClass: "d-recipe-callbar-button-with-popover" }, [o("dt-recipe-callbar-button", { staticClass: "d-recipe-callbar-button-with-popover--main-button", attrs: { "aria-label": t.ariaLabel, disabled: t.disabled, active: t.active, danger: t.danger, "button-class": t.buttonClass, "button-width-size": t.buttonWidthSize, "text-class": t.textClass, "inverted-tooltip": t.invertedTooltip, "show-tooltip": t.showTooltip, "tooltip-text": t.tooltipText, "tooltip-delay": t.tooltipDelay }, on: { click: t.buttonClick } }, [t._t("icon", null, { slot: "icon" }), t._t("tooltip", null, { slot: "tooltip" }), t._t("default")], 2), t.showArrowButton ? o("dt-popover", t._b({ staticClass: "d-recipe-callbar-button-with-popover__popover-wrapper", attrs: { id: t.id, modal: !1, open: t.open, placement: t.placement, "initial-focus-element": t.initialFocusElement, "show-close-button": t.showCloseButton, offset: t.offset, padding: "none", "dialog-class": ["d-recipe-callbar-button-with-popover__popover", t.contentClass], "open-popover": t.showPopover }, on: { opened: t.onModalIsOpened }, scopedSlots: t._u([{ key: "anchor", fn: function() {
248
- return [o("dt-button", t._b({ class: [
248
+ return [o("dt-button", { class: [
249
249
  "d-recipe-callbar-button-with-popover__arrow",
250
250
  { "d-recipe-callbar-button-with-popover__arrow--large": !t.isCompactMode }
251
- ], attrs: { active: t.open, circle: "", importance: "clear", size: "lg", width: "2rem" }, on: { click: t.arrowClick }, scopedSlots: t._u([{ key: "icon", fn: function() {
251
+ ], attrs: { active: t.open, circle: !0, importance: "clear", size: "lg", "aria-label": t.arrowButtonLabel, title: t.arrowButtonLabel, width: "2rem" }, on: { click: t.arrowClick }, scopedSlots: t._u([{ key: "icon", fn: function() {
252
252
  return [o("dt-icon-chevron-up", { staticClass: "d-recipe-callbar-button-with-popover__arrow-icon", attrs: { size: "200" } })];
253
- }, proxy: !0 }], null, !1, 778999832) }, "dt-button", t.arrowButtonLabel, !1))];
254
- }, proxy: !0 }], null, !1, 2824568807) }, "dt-popover", t.$attrs, !1), [t._t("content", null, { slot: "content" }), t._t("headerContent", null, { slot: "headerContent" }), t._t("footerContent", null, { slot: "footerContent" })], 2) : t._e()], 1);
253
+ }, proxy: !0 }], null, !1, 778999832) })];
254
+ }, proxy: !0 }], null, !1, 2571181550) }, "dt-popover", t.$attrs, !1), [t._t("content", null, { slot: "content" }), t._t("headerContent", null, { slot: "headerContent" }), t._t("footerContent", null, { slot: "footerContent" })], 2) : t._e()], 1);
255
255
  }, h = [], _ = /* @__PURE__ */ a(
256
256
  d,
257
257
  f,
@@ -1 +1 @@
1
- {"version":3,"file":"callbar-button-with-popover.js","sources":["../../../recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue"],"sourcesContent":["<template>\n <div\n class=\"d-recipe-callbar-button-with-popover\"\n >\n <dt-recipe-callbar-button\n :aria-label=\"ariaLabel\"\n :disabled=\"disabled\"\n :active=\"active\"\n :danger=\"danger\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :text-class=\"textClass\"\n :inverted-tooltip=\"invertedTooltip\"\n :show-tooltip=\"showTooltip\"\n :tooltip-text=\"tooltipText\"\n :tooltip-delay=\"tooltipDelay\"\n class=\"d-recipe-callbar-button-with-popover--main-button\"\n @click=\"buttonClick\"\n >\n <slot\n slot=\"icon\"\n name=\"icon\"\n />\n <slot\n slot=\"tooltip\"\n name=\"tooltip\"\n />\n <slot />\n </dt-recipe-callbar-button>\n <dt-popover\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :open=\"open\"\n :placement=\"placement\"\n :initial-focus-element=\"initialFocusElement\"\n :show-close-button=\"showCloseButton\"\n :offset=\"offset\"\n padding=\"none\"\n class=\"d-recipe-callbar-button-with-popover__popover-wrapper\"\n :dialog-class=\"['d-recipe-callbar-button-with-popover__popover', contentClass]\"\n v-bind=\"$attrs\"\n :open-popover=\"showPopover\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n :active=\"open\"\n :class=\"['d-recipe-callbar-button-with-popover__arrow',\n { 'd-recipe-callbar-button-with-popover__arrow--large': !isCompactMode }]\"\n circle\n importance=\"clear\"\n size=\"lg\"\n v-bind=\"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 <slot\n slot=\"content\"\n name=\"content\"\n />\n <slot\n slot=\"headerContent\"\n name=\"headerContent\"\n />\n <slot\n slot=\"footerContent\"\n name=\"footerContent\"\n />\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/vue2';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils, { warnIfUnmounted } from '@/common/utils';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithPopover',\n\n components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIconChevronUp },\n\n mixins: [DtLocalizationMixin],\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 * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Additional class name for the popover content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * To auto open the modal popover.\n */\n openPopover: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal popover is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showPopover () {\n if (!this.openPopover || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n\n arrowButtonLabel () {\n return this.i18n.$ta('DIALTONE_CALLBAR_BUTTON_WITH_POPOVER_ARROW_BUTTON_LABEL');\n },\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openPopover;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the popover\n // the same as if the arrow was clicked.\n if (!this.$listeners.click) {\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","DtLocalizationMixin","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","warnIfUnmounted","ev","isOpened"],"mappings":";;;;;;;;AAyFA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,uBAAAC,GAAA,WAAAC,GAAA,UAAAC,GAAA,iBAAAC,EAAA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,M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,EAAA,KAAA,KAAA,KAAA,SAAA,IAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,WAAAC,GAAA;AACA,kBAAA,MAAA,eAAAA,CAAA,GACA,KAAA;IACA;AAAA,IAEA,aAAA;AACA,aAAA,KAAA,OAAA,CAAA,KAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,WAAA,OAAA,KAAA;AAAA,IACA;AAAA,IAEA,YAAAA,GAAA;AAGA,MAAA,KAAA,WAAA,QAGA,KAAA,MAAA,SAAAA,CAAA,IAFA,KAAA,WAAAA,CAAA;AAAA,IAIA;AAAA,IAEA,gBAAAC,GAAA;AACA,WAAA,OAAAA,GACA,KAAA,MAAA,UAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAEA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"callbar-button-with-popover.js","sources":["../../../recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue"],"sourcesContent":["<template>\n <div\n class=\"d-recipe-callbar-button-with-popover\"\n >\n <dt-recipe-callbar-button\n :aria-label=\"ariaLabel\"\n :disabled=\"disabled\"\n :active=\"active\"\n :danger=\"danger\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :text-class=\"textClass\"\n :inverted-tooltip=\"invertedTooltip\"\n :show-tooltip=\"showTooltip\"\n :tooltip-text=\"tooltipText\"\n :tooltip-delay=\"tooltipDelay\"\n class=\"d-recipe-callbar-button-with-popover--main-button\"\n @click=\"buttonClick\"\n >\n <slot\n slot=\"icon\"\n name=\"icon\"\n />\n <slot\n slot=\"tooltip\"\n name=\"tooltip\"\n />\n <slot />\n </dt-recipe-callbar-button>\n <dt-popover\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :open=\"open\"\n :placement=\"placement\"\n :initial-focus-element=\"initialFocusElement\"\n :show-close-button=\"showCloseButton\"\n :offset=\"offset\"\n padding=\"none\"\n class=\"d-recipe-callbar-button-with-popover__popover-wrapper\"\n :dialog-class=\"['d-recipe-callbar-button-with-popover__popover', contentClass]\"\n v-bind=\"$attrs\"\n :open-popover=\"showPopover\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n :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 <slot\n slot=\"content\"\n name=\"content\"\n />\n <slot\n slot=\"headerContent\"\n name=\"headerContent\"\n />\n <slot\n slot=\"footerContent\"\n name=\"footerContent\"\n />\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/vue2';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils, { warnIfUnmounted } from '@/common/utils';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithPopover',\n\n components: { DtRecipeCallbarButton, DtPopover, DtButton, DtIconChevronUp },\n\n mixins: [DtLocalizationMixin],\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 * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Additional class name for the popover content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * To auto open the modal popover.\n */\n openPopover: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal popover is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showPopover () {\n if (!this.openPopover || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n\n arrowButtonLabel () {\n return this.i18n.$t('DIALTONE_CALLBAR_BUTTON_WITH_POPOVER_ARROW_BUTTON_ARIA_LABEL');\n },\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openPopover;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the popover\n // the same as if the arrow was clicked.\n if (!this.$listeners.click) {\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","DtLocalizationMixin","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","warnIfUnmounted","ev","isOpened"],"mappings":";;;;;;;;AA0FA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,uBAAAC,GAAA,WAAAC,GAAA,UAAAC,GAAA,iBAAAC,EAAA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AACA,eAAAC,EAAA;MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MACAA,KAAAC,SAAA,OAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,GAAA,EAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA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AAAA;AAAA;AAAA;AAAA;AAAA,IAQA;AAAA;AAAA;AAAA;AAAA,IAKA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,kBAAA;AACA,aAAA,KAAA,kBAAA,CAAA,KAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,aAAA,KAAA,oBAAA,QAAA,KAAA,oBAAA;AAAA,IACA;AAAA,IAEA,cAAA;AACA,aAAA,CAAA,KAAA,eAAA,KAAA,QACA,KAAA,cAAA,GACA,MAGA,KAAA;IACA;AAAA,IAEA,mBAAA;AACA,aAAA,KAAA,KAAA,GAAA,8DAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,IAAAE,EAAA,KAAA,KAAA,KAAA,SAAA,IAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,WAAAC,GAAA;AACA,kBAAA,MAAA,eAAAA,CAAA,GACA,KAAA;IACA;AAAA,IAEA,aAAA;AACA,aAAA,KAAA,OAAA,CAAA,KAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,WAAA,OAAA,KAAA;AAAA,IACA;AAAA,IAEA,YAAAA,GAAA;AAGA,MAAA,KAAA,WAAA,QAGA,KAAA,MAAA,SAAAA,CAAA,IAFA,KAAA,WAAAA,CAAA;AAAA,IAIA;AAAA,IAEA,gBAAAC,GAAA;AACA,WAAA,OAAAA,GACA,KAAA,MAAA,UAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAEA;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("@dialpad/dialtone-icons/vue2"),n=require("date-fns"),i=require("./utils.cjs"),u=require("./datepicker-constants.cjs"),d=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),f=require("../button/button.cjs"),p=require("../tooltip/tooltip.cjs"),_=require("../stack/stack.cjs"),D=require("../../common/mixins/localization.cjs"),y=require("../../common/utils/index.cjs"),k={name:"DtDatepickerMonthYearPicker",components:{DtButton:f.default,DtTooltip:p.default,DtStack:_.default,DtIconChevronLeft:h.DtIconChevronLeft,DtIconChevronsLeft:h.DtIconChevronsLeft,DtIconChevronRight:h.DtIconChevronRight,DtIconChevronsRight:h.DtIconChevronsRight},mixins:[D.default],props:{selectedDate:{type:Date,required:!0}},emits:["calendar-days","focus-first-day","focus-last-day","close-datepicker"],data(){return{selectMonth:n.getMonth(this.selectedDate),selectYear:n.getYear(this.selectedDate),highlightedDay:null,focusPicker:0,focusRefs:[],refNames:["prevYearButtonRef","prevMonthButtonRef","nextMonthButtonRef","nextYearButtonRef"]}},computed:{calendarDays(){return i.getCalendarDays(this.selectMonth,this.selectYear,this.highlightedDay)},formattedMonth(){return s=>i.formatMonth(s,u.INTL_MONTH_FORMAT,this.i18n.currentLocale)},previousYearAriaLabel(){return`${this.i18n.$t("DIALTONE_DATEPICKER_CHANGE_TO")} ${this.i18n.$t("DIALTONE_DATEPICKER_PREVIOUS_YEAR")} ${this.selectYear-1}`},previousMonthAriaLabel(){return`${this.i18n.$t("DIALTONE_DATEPICKER_CHANGE_TO")} ${this.i18n.$t("DIALTONE_DATEPICKER_PREVIOUS_MONTH")} ${this.formattedMonth(this.selectMonth-1)}`},nextYearAriaLabel(){return`${this.i18n.$t("DIALTONE_DATEPICKER_CHANGE_TO")} ${this.i18n.$t("DIALTONE_DATEPICKER_NEXT_YEAR")} ${this.selectYear+1}`},nextMonthAriaLabel(){return`${this.i18n.$t("DIALTONE_DATEPICKER_CHANGE_TO")} ${this.i18n.$t("DIALTONE_DATEPICKER_NEXT_MONTH")} ${this.formattedMonth(this.selectMonth+1)}`}},watch:{selectMonth:{handler(){this.highlightDay(),this.$emit("calendar-days",this.calendarDays)},immediate:!0},selectYear:{handler(){this.highlightDay(),this.$emit("calendar-days",this.calendarDays)},immediate:!0}},mounted(){this.setButtonsRef(),this.focusMonthYearPicker()},methods:{setButtonsRef(){this.focusRefs=this.refNames.map(s=>this.$refs[s])},focusMonthYearPicker(){this.focusPicker=0,this.focusRefs[0].$el.focus()},handleKeyDown(s){switch(s.key){case"ArrowLeft":s.preventDefault(),this.focusPicker===0?(this.focusPicker=3,this.focusRefs[this.focusPicker].$el.focus()):(this.focusPicker--,this.focusRefs[this.focusPicker].$el.focus());break;case"ArrowRight":s.preventDefault(),this.focusPicker===3?(this.focusPicker=0,this.focusRefs[this.focusPicker].$el.focus()):(this.focusPicker++,this.focusRefs[this.focusPicker].$el.focus());break;case"ArrowDown":s.preventDefault(),this.$emit("focus-first-day");break;case"Tab":s.preventDefault(),this.$emit("focus-first-day");break;case"Escape":this.$emit("close-datepicker");break}},highlightDay(){const s=n.getYear(this.selectedDate),e=n.getMonth(this.selectedDate);s!==this.selectYear||e!==this.selectMonth?this.highlightedDay=null:this.highlightedDay=n.getDate(this.selectedDate)},changeMonth(s){(this.selectMonth===0&&s===-1||this.selectMonth===11&&s===1)&&(this.selectYear+=s);const e=n.set(this.selectedDate,{month:this.selectMonth,year:this.selectYear}),t=s===1?n.addMonths(e,1):n.subMonths(e,1);this.selectMonth=n.getMonth(t)},changeYear(s){this.selectYear=this.selectYear+s},goToNextMonth(){this.changeMonth(1)},goToPrevMonth(){this.changeMonth(-1)}}};var m=function(){var e=this,t=e._self._c;return t("dt-stack",{staticClass:"d-datepicker__month-year",attrs:{direction:"row",gap:"300"}},[t("dt-stack",{staticClass:"d-datepicker__nav",attrs:{as:"nav",direction:"row",gap:"200"}},[t("dt-tooltip",{attrs:{"fallback-placements":["top-start","auto"],message:e.i18n.$t("DIALTONE_DATEPICKER_PREVIOUS_YEAR"),placement:"top"},scopedSlots:e._u([{key:"anchor",fn:function(){return[t("dt-button",{ref:e.refNames[0],staticClass:"d-datepicker__nav-btn",attrs:{id:"prevYearButton","aria-label":e.previousYearAriaLabel,circle:"",importance:"clear",kind:"muted",size:"xs",type:"button"},on:{click:function(a){return e.changeYear(-1)},keydown:function(a){return e.handleKeyDown(a)}}},[t("dt-icon-chevrons-left",{attrs:{size:"200"}})],1)]},proxy:!0}])}),t("dt-tooltip",{attrs:{"fallback-placements":["top-start","auto"],message:e.i18n.$t("DIALTONE_DATEPICKER_PREVIOUS_MONTH"),placement:"top"},scopedSlots:e._u([{key:"anchor",fn:function(){return[t("dt-button",{ref:e.refNames[1],staticClass:"d-datepicker__nav-btn",attrs:{id:"prevMonthButton","aria-label":e.previousMonthAriaLabel,circle:"",importance:"clear",kind:"muted",size:"xs",type:"button"},on:{click:function(a){return e.changeMonth(-1)},keydown:function(a){return e.handleKeyDown(a)}}},[t("dt-icon-chevron-left",{attrs:{size:"200"}})],1)]},proxy:!0}])})],1),t("div",{staticClass:"d-datepicker__month-year-title",attrs:{id:"calendar-heading"}},[e._v(" "+e._s(e.formattedMonth(e.selectMonth))+" "+e._s(e.selectYear)+" ")]),t("dt-stack",{staticClass:"d-datepicker__nav",attrs:{as:"nav",direction:"row",gap:"200"}},[t("dt-tooltip",{attrs:{"fallback-placements":["top-end","auto"],message:e.i18n.$t("DIALTONE_DATEPICKER_NEXT_MONTH"),placement:"top"},scopedSlots:e._u([{key:"anchor",fn:function(){return[t("dt-button",{ref:e.refNames[2],staticClass:"d-datepicker__nav-btn",attrs:{id:"nextMonthButton","aria-label":e.nextMonthAriaLabel,circle:"",importance:"clear",kind:"muted",size:"xs",type:"button"},on:{click:function(a){return e.changeMonth(1)},keydown:function(a){return e.handleKeyDown(a)}}},[t("dt-icon-chevron-right",{attrs:{size:"200"}})],1)]},proxy:!0}])}),t("dt-tooltip",{attrs:{"fallback-placements":["top-end","auto"],message:e.i18n.$t("DIALTONE_DATEPICKER_NEXT_YEAR"),placement:"top"},scopedSlots:e._u([{key:"anchor",fn:function(){return[t("dt-button",{ref:e.refNames[3],staticClass:"d-datepicker__nav-btn",attrs:{id:"nextYearButton","aria-label":e.nextYearAriaLabel,circle:"",importance:"clear",kind:"muted",size:"xs",type:"button"},on:{click:function(a){return e.changeYear(1)},keydown:function(a){return e.handleKeyDown(a)}}},[t("dt-icon-chevrons-right",{attrs:{size:"200"}})],1)]},proxy:!0}])})],1)],1)},$=[],v=d.n(k,m,$);const R=v.exports,b={name:"DtDatepickerCalendar",components:{DtButton:f.default},mixins:[D.default],props:{calendarDays:{type:Array,required:!0}},emits:["select-date","focus-month-year-picker","close-datepicker"],data(){return{selectedDay:null,focusDay:0,daysRef:[]}},computed:{weekDays(){return i.getWeekDayNames(this.i18n.currentLocale,u.WEEK_START)}},watch:{calendarDays(){this.focusDay=0,this.selectedDay=null,this.daysRef=[],this.$nextTick(()=>{this.daysRef=[],this.setDayRef()})}},methods:{dayAriaLabel(s){return this.i18n.$t("DIALTONE_DATEPICKER_SELECT_DAY")+` ${i.formatDate(s.value,u.INTL_MONTH_FORMAT,this.i18n.currentLocale)}`},setDayRef(s,e){this.calendarDays.forEach((t,a)=>{t.days.forEach((c,r)=>{const l=`buttonRef_${a}_${r}`,o=this.$refs[l];o&&c.currentMonth&&this.daysRef.push({el:o[0],day:c})})})},handleKeyDown(s){switch(s.key){case"ArrowUp":s.preventDefault(),this.focusDay-=7;try{this.daysRef[this.focusDay].el.$el.focus()}catch{const t=i.calculatePrevFocusDate(this.daysRef[this.focusDay+7].day.value);this.$emit("go-to-prev-month"),this.$nextTick(()=>{this.setDayRef(),this.daysRef[t-1].el.$el.focus(),this.focusDay+=t-1})}break;case"ArrowDown":s.preventDefault(),this.focusDay+=7;try{this.daysRef[this.focusDay].el.$el.focus()}catch{const t=i.calculateNextFocusDate(this.daysRef[this.focusDay-7].day.value);this.$emit("go-to-next-month"),this.$nextTick(()=>{this.setDayRef(),this.daysRef[t-1].el.$el.focus(),this.focusDay+=t-1})}break;case"ArrowLeft":s.preventDefault(),this.focusDay>0?(this.focusDay-=1,this.daysRef[this.focusDay].el.$el.focus()):(this.$emit("go-to-prev-month"),this.$nextTick(()=>{this.focusLastDay()}));break;case"ArrowRight":s.preventDefault(),this.focusDay<this.daysRef.length-1?(this.focusDay+=1,this.daysRef[this.focusDay].el.$el.focus()):(this.$emit("go-to-next-month"),this.$nextTick(()=>{this.focusFirstDay()}));break;case"Tab":s.preventDefault(),this.$emit("focus-month-year-picker");break;case"Escape":this.$emit("close-datepicker");break}},focusFirstDay(){this.focusDay=0,this.$nextTick(()=>{this.daysRef[this.focusDay].el.$el.focus()})},focusLastDay(){this.$nextTick(()=>{this.focusDay=this.daysRef.length-1,this.daysRef[this.focusDay].el.$el.focus()})},selectDay(s){s.currentMonth&&(this.selectedDay=s.text,this.$emit("select-date",s.value))}}};var g=function(){var e=this,t=e._self._c;return t("table",{staticClass:"d-datepicker__calendar",attrs:{"aria-labelledby":"calendar-heading"}},[t("thead",[t("tr",e._l(e.weekDays,function(a){return t("th",{key:a,staticClass:"d-datepicker__cell d-datepicker__cell--header",attrs:{scope:"col"}},[t("span",{staticClass:"d-datepicker__weekday",attrs:{title:a,"aria-label":a}},[e._v(" "+e._s(a))])])}),0)]),t("tbody",e._l(e.calendarDays,function(a,c){return t("tr",{key:c},e._l(a.days,function(r,l){return t("td",{key:c+l,staticClass:"d-datepicker__cell",attrs:{role:"listbox"}},[t("dt-button",{ref:`buttonRef_${c}_${l}`,refInFor:!0,staticClass:"d-datepicker__day",class:{"d-datepicker__day--disabled":!r.currentMonth,"d-datepicker__day--selected":e.selectedDay?r.text===e.selectedDay&&r.currentMonth:r.selected},attrs:{circle:!0,size:"sm",importance:"clear",disabled:!r.currentMonth,type:"button","aria-selected":e.selectedDay?r.text===e.selectedDay&&r.currentMonth:r.selected,"aria-label":e.dayAriaLabel(r),role:"option"},on:{click:function(o){return e.selectDay(r)},keydown:function(o){return e.handleKeyDown(o)}}},[e._v(" "+e._s(r.text)+" ")])],1)}),0)}),0)])},E=[],T=d.n(b,g,E);const M=T.exports,A={name:"DtDatepicker",components:{DtStack:_.default,MonthYearPicker:R,Calendar:M},props:{selectedDate:{type:Date,default:()=>new Date}},emits:["selected-date","close-datepicker"],data(){return{calendarDays:[]}},mounted(){y.warnIfUnmounted(this.$el,this.$options.name)},methods:{updateCalendarDays(s){this.calendarDays=s}}};var C=function(){var e=this,t=e._self._c;return t("dt-stack",{staticClass:"d-datepicker",attrs:{gap:"400"}},[t("div",{staticClass:"d-datepicker__hd"},[t("month-year-picker",{ref:"monthYearPicker",attrs:{"selected-date":e.selectedDate},on:{"calendar-days":e.updateCalendarDays,"focus-first-day":function(a){return e.$refs.calendar.focusFirstDay()},"focus-last-day":function(a){return e.$refs.calendar.focusLastDay()},"close-datepicker":function(a){return e.$emit("close-datepicker")}}})],1),t("div",{staticClass:"d-datepicker__bd"},[t("calendar",{ref:"calendar",attrs:{"calendar-days":e.calendarDays},on:{"select-date":function(a){return e.$emit("selected-date",a)},"focus-month-year-picker":function(a){return e.$refs.monthYearPicker.focusMonthYearPicker()},"close-datepicker":function(a){return e.$emit("close-datepicker")},"go-to-next-month":function(a){return e.$refs.monthYearPicker.goToNextMonth()},"go-to-prev-month":function(a){return e.$refs.monthYearPicker.goToPrevMonth()}}})],1)])},I=[],P=d.n(A,C,I);const x=P.exports;exports.default=x;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("@dialpad/dialtone-icons/vue2"),n=require("date-fns"),i=require("./utils.cjs"),u=require("./datepicker-constants.cjs"),d=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),f=require("../button/button.cjs"),p=require("../tooltip/tooltip.cjs"),_=require("../stack/stack.cjs"),D=require("../../common/mixins/localization.cjs"),y=require("../../common/utils/index.cjs"),k={name:"DtDatepickerMonthYearPicker",components:{DtButton:f.default,DtTooltip:p.default,DtStack:_.default,DtIconChevronLeft:h.DtIconChevronLeft,DtIconChevronsLeft:h.DtIconChevronsLeft,DtIconChevronRight:h.DtIconChevronRight,DtIconChevronsRight:h.DtIconChevronsRight},mixins:[D.default],props:{selectedDate:{type:Date,required:!0}},emits:["calendar-days","focus-first-day","focus-last-day","close-datepicker"],data(){return{selectMonth:n.getMonth(this.selectedDate),selectYear:n.getYear(this.selectedDate),highlightedDay:null,focusPicker:0,focusRefs:[],refNames:["prevYearButtonRef","prevMonthButtonRef","nextMonthButtonRef","nextYearButtonRef"]}},computed:{calendarDays(){return i.getCalendarDays(this.selectMonth,this.selectYear,this.highlightedDay)},formattedMonth(){return s=>i.formatMonth(s,u.INTL_MONTH_FORMAT,this.i18n.currentLocale)},previousYearAriaLabel(){return`${this.i18n.$t("DIALTONE_DATEPICKER_CHANGE_TO")} ${this.i18n.$t("DIALTONE_DATEPICKER_PREVIOUS_YEAR")} ${this.selectYear-1}`},previousMonthAriaLabel(){return`${this.i18n.$t("DIALTONE_DATEPICKER_CHANGE_TO")} ${this.i18n.$t("DIALTONE_DATEPICKER_PREVIOUS_MONTH")} ${this.formattedMonth(this.selectMonth-1)}`},nextYearAriaLabel(){return`${this.i18n.$t("DIALTONE_DATEPICKER_CHANGE_TO")} ${this.i18n.$t("DIALTONE_DATEPICKER_NEXT_YEAR")} ${this.selectYear+1}`},nextMonthAriaLabel(){return`${this.i18n.$t("DIALTONE_DATEPICKER_CHANGE_TO")} ${this.i18n.$t("DIALTONE_DATEPICKER_NEXT_MONTH")} ${this.formattedMonth(this.selectMonth+1)}`}},watch:{selectMonth:{handler(){this.highlightDay(),this.$emit("calendar-days",this.calendarDays)},immediate:!0},selectYear:{handler(){this.highlightDay(),this.$emit("calendar-days",this.calendarDays)},immediate:!0}},mounted(){this.setButtonsRef(),this.focusMonthYearPicker()},methods:{setButtonsRef(){this.focusRefs=this.refNames.map(s=>this.$refs[s])},focusMonthYearPicker(){this.focusPicker=0,this.focusRefs[0].$el.focus()},handleKeyDown(s){switch(s.key){case"ArrowLeft":s.preventDefault(),this.focusPicker===0?(this.focusPicker=3,this.focusRefs[this.focusPicker].$el.focus()):(this.focusPicker--,this.focusRefs[this.focusPicker].$el.focus());break;case"ArrowRight":s.preventDefault(),this.focusPicker===3?(this.focusPicker=0,this.focusRefs[this.focusPicker].$el.focus()):(this.focusPicker++,this.focusRefs[this.focusPicker].$el.focus());break;case"ArrowDown":s.preventDefault(),this.$emit("focus-first-day");break;case"Tab":s.preventDefault(),this.$emit("focus-first-day");break;case"Escape":this.$emit("close-datepicker");break}},highlightDay(){const s=n.getYear(this.selectedDate),e=n.getMonth(this.selectedDate);s!==this.selectYear||e!==this.selectMonth?this.highlightedDay=null:this.highlightedDay=n.getDate(this.selectedDate)},changeMonth(s){(this.selectMonth===0&&s===-1||this.selectMonth===11&&s===1)&&(this.selectYear+=s);const e=n.set(this.selectedDate,{month:this.selectMonth,year:this.selectYear}),t=s===1?n.addMonths(e,1):n.subMonths(e,1);this.selectMonth=n.getMonth(t)},changeYear(s){this.selectYear=this.selectYear+s},goToNextMonth(){this.changeMonth(1)},goToPrevMonth(){this.changeMonth(-1)}}};var m=function(){var e=this,t=e._self._c;return t("dt-stack",{staticClass:"d-datepicker__month-year",attrs:{direction:"row",gap:"300"}},[t("dt-stack",{staticClass:"d-datepicker__nav",attrs:{as:"nav",direction:"row",gap:"200"}},[t("dt-tooltip",{attrs:{"fallback-placements":["top-start","auto"],message:e.i18n.$t("DIALTONE_DATEPICKER_PREVIOUS_YEAR"),placement:"top"},scopedSlots:e._u([{key:"anchor",fn:function(){return[t("dt-button",{ref:e.refNames[0],staticClass:"d-datepicker__nav-btn",attrs:{id:"prevYearButton","aria-label":e.previousYearAriaLabel,circle:!0,importance:"clear",kind:"muted",size:"xs",type:"button"},on:{click:function(a){return e.changeYear(-1)},keydown:function(a){return e.handleKeyDown(a)}}},[t("dt-icon-chevrons-left",{attrs:{size:"200"}})],1)]},proxy:!0}])}),t("dt-tooltip",{attrs:{"fallback-placements":["top-start","auto"],message:e.i18n.$t("DIALTONE_DATEPICKER_PREVIOUS_MONTH"),placement:"top"},scopedSlots:e._u([{key:"anchor",fn:function(){return[t("dt-button",{ref:e.refNames[1],staticClass:"d-datepicker__nav-btn",attrs:{id:"prevMonthButton","aria-label":e.previousMonthAriaLabel,circle:!0,importance:"clear",kind:"muted",size:"xs",type:"button"},on:{click:function(a){return e.changeMonth(-1)},keydown:function(a){return e.handleKeyDown(a)}}},[t("dt-icon-chevron-left",{attrs:{size:"200"}})],1)]},proxy:!0}])})],1),t("div",{staticClass:"d-datepicker__month-year-title",attrs:{id:"calendar-heading"}},[e._v(" "+e._s(e.formattedMonth(e.selectMonth))+" "+e._s(e.selectYear)+" ")]),t("dt-stack",{staticClass:"d-datepicker__nav",attrs:{as:"nav",direction:"row",gap:"200"}},[t("dt-tooltip",{attrs:{"fallback-placements":["top-end","auto"],message:e.i18n.$t("DIALTONE_DATEPICKER_NEXT_MONTH"),placement:"top"},scopedSlots:e._u([{key:"anchor",fn:function(){return[t("dt-button",{ref:e.refNames[2],staticClass:"d-datepicker__nav-btn",attrs:{id:"nextMonthButton","aria-label":e.nextMonthAriaLabel,circle:!0,importance:"clear",kind:"muted",size:"xs",type:"button"},on:{click:function(a){return e.changeMonth(1)},keydown:function(a){return e.handleKeyDown(a)}}},[t("dt-icon-chevron-right",{attrs:{size:"200"}})],1)]},proxy:!0}])}),t("dt-tooltip",{attrs:{"fallback-placements":["top-end","auto"],message:e.i18n.$t("DIALTONE_DATEPICKER_NEXT_YEAR"),placement:"top"},scopedSlots:e._u([{key:"anchor",fn:function(){return[t("dt-button",{ref:e.refNames[3],staticClass:"d-datepicker__nav-btn",attrs:{id:"nextYearButton","aria-label":e.nextYearAriaLabel,circle:!0,importance:"clear",kind:"muted",size:"xs",type:"button"},on:{click:function(a){return e.changeYear(1)},keydown:function(a){return e.handleKeyDown(a)}}},[t("dt-icon-chevrons-right",{attrs:{size:"200"}})],1)]},proxy:!0}])})],1)],1)},$=[],v=d.n(k,m,$);const R=v.exports,b={name:"DtDatepickerCalendar",components:{DtButton:f.default},mixins:[D.default],props:{calendarDays:{type:Array,required:!0}},emits:["select-date","focus-month-year-picker","close-datepicker"],data(){return{selectedDay:null,focusDay:0,daysRef:[]}},computed:{weekDays(){return i.getWeekDayNames(this.i18n.currentLocale,u.WEEK_START)}},watch:{calendarDays(){this.focusDay=0,this.selectedDay=null,this.daysRef=[],this.$nextTick(()=>{this.daysRef=[],this.setDayRef()})}},methods:{dayAriaLabel(s){return this.i18n.$t("DIALTONE_DATEPICKER_SELECT_DAY")+` ${i.formatDate(s.value,u.INTL_MONTH_FORMAT,this.i18n.currentLocale)}`},setDayRef(s,e){this.calendarDays.forEach((t,a)=>{t.days.forEach((c,r)=>{const l=`buttonRef_${a}_${r}`,o=this.$refs[l];o&&c.currentMonth&&this.daysRef.push({el:o[0],day:c})})})},handleKeyDown(s){switch(s.key){case"ArrowUp":s.preventDefault(),this.focusDay-=7;try{this.daysRef[this.focusDay].el.$el.focus()}catch{const t=i.calculatePrevFocusDate(this.daysRef[this.focusDay+7].day.value);this.$emit("go-to-prev-month"),this.$nextTick(()=>{this.setDayRef(),this.daysRef[t-1].el.$el.focus(),this.focusDay+=t-1})}break;case"ArrowDown":s.preventDefault(),this.focusDay+=7;try{this.daysRef[this.focusDay].el.$el.focus()}catch{const t=i.calculateNextFocusDate(this.daysRef[this.focusDay-7].day.value);this.$emit("go-to-next-month"),this.$nextTick(()=>{this.setDayRef(),this.daysRef[t-1].el.$el.focus(),this.focusDay+=t-1})}break;case"ArrowLeft":s.preventDefault(),this.focusDay>0?(this.focusDay-=1,this.daysRef[this.focusDay].el.$el.focus()):(this.$emit("go-to-prev-month"),this.$nextTick(()=>{this.focusLastDay()}));break;case"ArrowRight":s.preventDefault(),this.focusDay<this.daysRef.length-1?(this.focusDay+=1,this.daysRef[this.focusDay].el.$el.focus()):(this.$emit("go-to-next-month"),this.$nextTick(()=>{this.focusFirstDay()}));break;case"Tab":s.preventDefault(),this.$emit("focus-month-year-picker");break;case"Escape":this.$emit("close-datepicker");break}},focusFirstDay(){this.focusDay=0,this.$nextTick(()=>{this.daysRef[this.focusDay].el.$el.focus()})},focusLastDay(){this.$nextTick(()=>{this.focusDay=this.daysRef.length-1,this.daysRef[this.focusDay].el.$el.focus()})},selectDay(s){s.currentMonth&&(this.selectedDay=s.text,this.$emit("select-date",s.value))}}};var g=function(){var e=this,t=e._self._c;return t("table",{staticClass:"d-datepicker__calendar",attrs:{"aria-labelledby":"calendar-heading"}},[t("thead",[t("tr",e._l(e.weekDays,function(a){return t("th",{key:a,staticClass:"d-datepicker__cell d-datepicker__cell--header",attrs:{scope:"col"}},[t("span",{staticClass:"d-datepicker__weekday",attrs:{title:a,"aria-label":a}},[e._v(" "+e._s(a))])])}),0)]),t("tbody",e._l(e.calendarDays,function(a,c){return t("tr",{key:c},e._l(a.days,function(r,l){return t("td",{key:c+l,staticClass:"d-datepicker__cell",attrs:{role:"listbox"}},[t("dt-button",{ref:`buttonRef_${c}_${l}`,refInFor:!0,staticClass:"d-datepicker__day",class:{"d-datepicker__day--disabled":!r.currentMonth,"d-datepicker__day--selected":e.selectedDay?r.text===e.selectedDay&&r.currentMonth:r.selected},attrs:{circle:!0,size:"sm",importance:"clear",disabled:!r.currentMonth,type:"button","aria-selected":e.selectedDay?r.text===e.selectedDay&&r.currentMonth:r.selected,"aria-label":e.dayAriaLabel(r),role:"option"},on:{click:function(o){return e.selectDay(r)},keydown:function(o){return e.handleKeyDown(o)}}},[e._v(" "+e._s(r.text)+" ")])],1)}),0)}),0)])},E=[],T=d.n(b,g,E);const M=T.exports,A={name:"DtDatepicker",components:{DtStack:_.default,MonthYearPicker:R,Calendar:M},props:{selectedDate:{type:Date,default:()=>new Date}},emits:["selected-date","close-datepicker"],data(){return{calendarDays:[]}},mounted(){y.warnIfUnmounted(this.$el,this.$options.name)},methods:{updateCalendarDays(s){this.calendarDays=s}}};var C=function(){var e=this,t=e._self._c;return t("dt-stack",{staticClass:"d-datepicker",attrs:{gap:"400"}},[t("div",{staticClass:"d-datepicker__hd"},[t("month-year-picker",{ref:"monthYearPicker",attrs:{"selected-date":e.selectedDate},on:{"calendar-days":e.updateCalendarDays,"focus-first-day":function(a){return e.$refs.calendar.focusFirstDay()},"focus-last-day":function(a){return e.$refs.calendar.focusLastDay()},"close-datepicker":function(a){return e.$emit("close-datepicker")}}})],1),t("div",{staticClass:"d-datepicker__bd"},[t("calendar",{ref:"calendar",attrs:{"calendar-days":e.calendarDays},on:{"select-date":function(a){return e.$emit("selected-date",a)},"focus-month-year-picker":function(a){return e.$refs.monthYearPicker.focusMonthYearPicker()},"close-datepicker":function(a){return e.$emit("close-datepicker")},"go-to-next-month":function(a){return e.$refs.monthYearPicker.goToNextMonth()},"go-to-prev-month":function(a){return e.$refs.monthYearPicker.goToPrevMonth()}}})],1)])},I=[],P=d.n(A,C,I);const x=P.exports;exports.default=x;
2
2
  //# sourceMappingURL=datepicker.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"datepicker.cjs","sources":["../../../components/datepicker/modules/month-year-picker.vue","../../../components/datepicker/modules/calendar.vue","../../../components/datepicker/datepicker.vue"],"sourcesContent":["<template>\n <dt-stack\n class=\"d-datepicker__month-year\"\n direction=\"row\"\n gap=\"300\"\n >\n <dt-stack\n as=\"nav\"\n class=\"d-datepicker__nav\"\n direction=\"row\"\n gap=\"200\"\n >\n <dt-tooltip\n :fallback-placements=\"['top-start', 'auto']\"\n :message=\"i18n.$t('DIALTONE_DATEPICKER_PREVIOUS_YEAR')\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n id=\"prevYearButton\"\n :ref=\"refNames[0]\"\n :aria-label=\"previousYearAriaLabel\"\n circle\n class=\"d-datepicker__nav-btn\"\n importance=\"clear\"\n kind=\"muted\"\n size=\"xs\"\n type=\"button\"\n @click=\"changeYear(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevrons-left\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :fallback-placements=\"['top-start', 'auto']\"\n :message=\"i18n.$t('DIALTONE_DATEPICKER_PREVIOUS_MONTH')\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n id=\"prevMonthButton\"\n :ref=\"refNames[1]\"\n :aria-label=\"previousMonthAriaLabel\"\n circle\n class=\"d-datepicker__nav-btn\"\n importance=\"clear\"\n kind=\"muted\"\n size=\"xs\"\n type=\"button\"\n @click=\"changeMonth(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevron-left\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n <div\n id=\"calendar-heading\"\n class=\"d-datepicker__month-year-title\"\n >\n {{ formattedMonth(selectMonth) }}\n\n {{ selectYear }}\n </div>\n <dt-stack\n as=\"nav\"\n class=\"d-datepicker__nav\"\n direction=\"row\"\n gap=\"200\"\n >\n <dt-tooltip\n :fallback-placements=\"['top-end', 'auto']\"\n :message=\"i18n.$t('DIALTONE_DATEPICKER_NEXT_MONTH')\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n id=\"nextMonthButton\"\n :ref=\"refNames[2]\"\n :aria-label=\"nextMonthAriaLabel\"\n circle\n class=\"d-datepicker__nav-btn\"\n importance=\"clear\"\n kind=\"muted\"\n size=\"xs\"\n type=\"button\"\n @click=\"changeMonth(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevron-right\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :fallback-placements=\"['top-end', 'auto']\"\n :message=\"i18n.$t('DIALTONE_DATEPICKER_NEXT_YEAR')\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n id=\"nextYearButton\"\n :ref=\"refNames[3]\"\n :aria-label=\"nextYearAriaLabel\"\n circle\n class=\"d-datepicker__nav-btn\"\n importance=\"clear\"\n kind=\"muted\"\n size=\"xs\"\n type=\"button\"\n @click=\"changeYear(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevrons-right\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n </dt-stack>\n</template>\n\n<script>\nimport {\n DtIconChevronLeft,\n DtIconChevronsLeft,\n DtIconChevronRight,\n DtIconChevronsRight,\n} from '@dialpad/dialtone-icons/vue2';\nimport { getYear, addMonths, getMonth, set, subMonths, getDate } from 'date-fns';\nimport { getCalendarDays, formatMonth } from '../utils';\nimport { INTL_MONTH_FORMAT } from '../datepicker_constants';\nimport { DtStack } from '@/components/stack';\nimport { DtTooltip } from '@/components/tooltip';\nimport { DtButton } from '@/components/button';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtDatepickerMonthYearPicker',\n\n components: {\n DtButton,\n DtTooltip,\n DtStack,\n DtIconChevronLeft,\n DtIconChevronsLeft,\n DtIconChevronRight,\n DtIconChevronsRight,\n },\n\n mixins: [DtLocalizationMixin],\n\n props: {\n selectedDate: {\n type: Date,\n required: true,\n },\n },\n\n emits: [\n /**\n * Will retrieve the calendar days of the given date\n *\n * @event calendar-days\n * @type {Array}\n */\n 'calendar-days',\n\n /**\n * Will focus first day in calendar\n *\n * @event focus-first-day\n */\n 'focus-first-day',\n\n /**\n * Will focus last day in calendar\n *\n * @event focus-last-day\n */\n 'focus-last-day',\n\n /**\n * Will close the datepicker\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n ],\n\n data () {\n return {\n selectMonth: getMonth(this.selectedDate),\n selectYear: getYear(this.selectedDate),\n highlightedDay: null,\n focusPicker: 0,\n focusRefs: [],\n refNames: ['prevYearButtonRef', 'prevMonthButtonRef', 'nextMonthButtonRef', 'nextYearButtonRef'],\n };\n },\n\n computed: {\n // Get days for the currently selected month and year and highlight the selected day\n calendarDays () {\n return getCalendarDays(this.selectMonth, this.selectYear, this.highlightedDay);\n },\n\n formattedMonth () {\n return (month) => formatMonth(month, INTL_MONTH_FORMAT, this.i18n.currentLocale);\n },\n\n previousYearAriaLabel () {\n return `${this.i18n.$t('DIALTONE_DATEPICKER_CHANGE_TO')} ${this.i18n.$t('DIALTONE_DATEPICKER_PREVIOUS_YEAR')} ${this.selectYear - 1}`;\n },\n\n previousMonthAriaLabel () {\n return `${this.i18n.$t('DIALTONE_DATEPICKER_CHANGE_TO')} ${this.i18n.$t('DIALTONE_DATEPICKER_PREVIOUS_MONTH')} ${this.formattedMonth(this.selectMonth - 1)}`;\n },\n\n nextYearAriaLabel () {\n return `${this.i18n.$t('DIALTONE_DATEPICKER_CHANGE_TO')} ${this.i18n.$t('DIALTONE_DATEPICKER_NEXT_YEAR')} ${this.selectYear + 1}`;\n },\n\n nextMonthAriaLabel () {\n return `${this.i18n.$t('DIALTONE_DATEPICKER_CHANGE_TO')} ${this.i18n.$t('DIALTONE_DATEPICKER_NEXT_MONTH')} ${this.formattedMonth(this.selectMonth + 1)}`;\n },\n },\n\n watch: {\n selectMonth: {\n handler () {\n this.highlightDay();\n this.$emit('calendar-days', this.calendarDays);\n },\n\n immediate: true,\n },\n\n selectYear: {\n handler () {\n this.highlightDay();\n this.$emit('calendar-days', this.calendarDays);\n },\n\n immediate: true,\n },\n\n },\n\n mounted () {\n this.setButtonsRef();\n this.focusMonthYearPicker();\n },\n\n methods: {\n setButtonsRef () {\n this.focusRefs = this.refNames.map(refName => this.$refs[refName]);\n },\n\n focusMonthYearPicker () {\n this.focusPicker = 0;\n this.focusRefs[0].$el.focus();\n },\n\n handleKeyDown (event) {\n switch (event.key) {\n case 'ArrowLeft':\n event.preventDefault();\n if (this.focusPicker === 0) {\n this.focusPicker = 3;\n this.focusRefs[this.focusPicker].$el.focus();\n } else {\n this.focusPicker--;\n this.focusRefs[this.focusPicker].$el.focus();\n }\n break;\n\n case 'ArrowRight':\n event.preventDefault();\n if (this.focusPicker === 3) {\n this.focusPicker = 0;\n this.focusRefs[this.focusPicker].$el.focus();\n } else {\n this.focusPicker++;\n this.focusRefs[this.focusPicker].$el.focus();\n }\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n this.$emit('focus-first-day');\n break;\n\n case 'Tab':\n event.preventDefault();\n this.$emit('focus-first-day');\n break;\n\n case 'Escape':\n this.$emit('close-datepicker');\n break;\n }\n },\n\n highlightDay () {\n const year = getYear(this.selectedDate);\n const month = getMonth(this.selectedDate);\n\n if (year !== this.selectYear || month !== this.selectMonth) {\n this.highlightedDay = null;\n } else {\n this.highlightedDay = getDate(this.selectedDate);\n }\n },\n\n changeMonth (value) {\n // Adjust year when changing from January to December or vice versa\n if ((this.selectMonth === 0 && value === -1) || (this.selectMonth === 11 && value === 1)) {\n this.selectYear += value;\n }\n\n // Calculate the new date by adding or subtracting months\n const initialDate = set(this.selectedDate, { month: this.selectMonth, year: this.selectYear });\n const newDate = value === 1 ? addMonths(initialDate, 1) : subMonths(initialDate, 1);\n\n // Update the selected month\n this.selectMonth = getMonth(newDate);\n },\n\n changeYear (value) {\n this.selectYear = this.selectYear + value;\n },\n\n goToNextMonth () {\n this.changeMonth(1);\n },\n\n goToPrevMonth () {\n this.changeMonth(-1);\n },\n },\n};\n</script>\n","<template>\n <table\n class=\"d-datepicker__calendar\"\n aria-labelledby=\"calendar-heading\"\n >\n <thead>\n <tr>\n <th\n v-for=\"day in weekDays\"\n :key=\"day\"\n scope=\"col\"\n class=\"d-datepicker__cell d-datepicker__cell--header\"\n >\n <span\n class=\"d-datepicker__weekday\"\n :title=\"day\"\n :aria-label=\"day\"\n > {{ day }}</span>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"(week, indexWeek) in calendarDays\"\n :key=\"indexWeek\"\n >\n <td\n v-for=\"(day, indexDays) in week.days\"\n :key=\"indexWeek + indexDays\"\n class=\"d-datepicker__cell\"\n role=\"listbox\"\n >\n <dt-button\n :ref=\"`buttonRef_${indexWeek}_${indexDays}`\"\n class=\"d-datepicker__day\"\n :circle=\"true\"\n size=\"sm\"\n importance=\"clear\"\n :disabled=\"!day.currentMonth\"\n :class=\"{\n 'd-datepicker__day--disabled': !day.currentMonth,\n 'd-datepicker__day--selected': selectedDay\n ? ((day.text === selectedDay) && day.currentMonth)\n : day.selected,\n }\"\n type=\"button\"\n :aria-selected=\"!!selectedDay ? ((day.text === selectedDay) && day.currentMonth) : day.selected\"\n :aria-label=\"dayAriaLabel(day)\"\n role=\"option\"\n @click=\"selectDay(day)\"\n @keydown=\"handleKeyDown($event)\"\n >\n {{ day.text }}\n </dt-button>\n </td>\n </tr>\n </tbody>\n </table>\n</template>\n\n<script>\nimport { getWeekDayNames, calculateNextFocusDate, calculatePrevFocusDate, formatDate } from '../utils';\nimport { WEEK_START, INTL_MONTH_FORMAT } from '../datepicker_constants.js';\nimport { DtButton } from '@/components/button';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtDatepickerCalendar',\n components: { DtButton },\n\n mixins: [DtLocalizationMixin],\n\n props: {\n calendarDays: {\n type: Array,\n required: true,\n },\n },\n\n emits: [\n /**\n * Event fired when a date is selected\n *\n * @event select-date\n * @type {Date}\n */\n 'select-date',\n\n /**\n * Will focus the month and year picker\n *\n * @event focus-month-year-picker\n */\n 'focus-month-year-picker',\n\n /**\n * Will close the datepicker\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n ],\n\n data () {\n return {\n // local selectedDay to override the received by props calendarDays\n selectedDay: null,\n focusDay: 0,\n daysRef: [],\n };\n },\n\n computed: {\n weekDays () {\n return getWeekDayNames(this.i18n.currentLocale, WEEK_START);\n },\n },\n\n watch: {\n calendarDays () {\n // on calendarDays update, reset our local variables\n this.focusDay = 0;\n this.selectedDay = null;\n\n this.daysRef = [];\n\n this.$nextTick(() => {\n this.daysRef = [];\n this.setDayRef();\n });\n },\n },\n\n methods: {\n dayAriaLabel (day) {\n return this.i18n.$t('DIALTONE_DATEPICKER_SELECT_DAY') + ` ${formatDate(day.value, INTL_MONTH_FORMAT, this.i18n.currentLocale)}`;\n },\n\n setDayRef (el, day) {\n this.calendarDays.forEach((week, weekIndex) => {\n week.days.forEach((day, dayIndex) => {\n const refKey = `buttonRef_${weekIndex}_${dayIndex}`;\n const dayButton = this.$refs[refKey];\n if (dayButton && day.currentMonth) {\n this.daysRef.push({ el: dayButton[0], day });\n }\n });\n });\n },\n\n handleKeyDown (event) {\n switch (event.key) {\n case 'ArrowUp':\n event.preventDefault();\n this.focusDay -= 7;\n try {\n this.daysRef[this.focusDay].el.$el.focus();\n } catch (error) {\n const prevFocusDate = calculatePrevFocusDate(this.daysRef[this.focusDay + 7].day.value);\n this.$emit('go-to-prev-month');\n this.$nextTick(() => {\n this.setDayRef();\n this.daysRef[prevFocusDate - 1].el.$el.focus();\n this.focusDay += prevFocusDate - 1;\n });\n }\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n this.focusDay += 7;\n try {\n this.daysRef[this.focusDay].el.$el.focus();\n } catch (error) {\n const nextFocusDate = calculateNextFocusDate(this.daysRef[this.focusDay - 7].day.value);\n this.$emit('go-to-next-month');\n this.$nextTick(() => {\n this.setDayRef();\n this.daysRef[nextFocusDate - 1].el.$el.focus();\n this.focusDay += nextFocusDate - 1;\n });\n }\n break;\n\n case 'ArrowLeft':\n event.preventDefault();\n if (this.focusDay > 0) {\n this.focusDay -= 1;\n this.daysRef[this.focusDay].el.$el.focus();\n } else {\n // if we are on month first day, jump to last day of prev month\n this.$emit('go-to-prev-month');\n this.$nextTick(() => {\n this.focusLastDay();\n });\n }\n break;\n\n case 'ArrowRight':\n event.preventDefault();\n if (this.focusDay < this.daysRef.length - 1) {\n this.focusDay += 1;\n this.daysRef[this.focusDay].el.$el.focus();\n } else {\n // if we are on month last day, jump to first day of next month\n this.$emit('go-to-next-month');\n this.$nextTick(() => {\n this.focusFirstDay();\n });\n }\n break;\n\n case 'Tab':\n event.preventDefault();\n this.$emit('focus-month-year-picker');\n break;\n\n case 'Escape':\n this.$emit('close-datepicker');\n break;\n }\n },\n\n focusFirstDay () {\n this.focusDay = 0;\n this.$nextTick(() => {\n this.daysRef[this.focusDay].el.$el.focus();\n });\n },\n\n focusLastDay () {\n this.$nextTick(() => {\n this.focusDay = this.daysRef.length - 1;\n this.daysRef[this.focusDay].el.$el.focus();\n });\n },\n\n selectDay (day) {\n if (!day.currentMonth) { return; }\n\n // local selectedDay is updated when a day is selected\n this.selectedDay = day.text;\n this.$emit('select-date', day.value);\n },\n },\n};\n</script>\n","<!-- eslint-disable vue/multi-word-component-names -->\n<template>\n <dt-stack\n class=\"d-datepicker\"\n gap=\"400\"\n >\n <div class=\"d-datepicker__hd\">\n <month-year-picker\n ref=\"monthYearPicker\"\n :selected-date=\"selectedDate\"\n @calendar-days=\"updateCalendarDays\"\n @focus-first-day=\"$refs.calendar.focusFirstDay()\"\n @focus-last-day=\"$refs.calendar.focusLastDay()\"\n @close-datepicker=\"$emit('close-datepicker')\"\n />\n </div>\n <div class=\"d-datepicker__bd\">\n <calendar\n ref=\"calendar\"\n :calendar-days=\"calendarDays\"\n @select-date=\"$emit('selected-date', $event)\"\n @focus-month-year-picker=\"$refs.monthYearPicker.focusMonthYearPicker()\"\n @close-datepicker=\"$emit('close-datepicker')\"\n @go-to-next-month=\"$refs.monthYearPicker.goToNextMonth()\"\n @go-to-prev-month=\"$refs.monthYearPicker.goToPrevMonth()\"\n />\n </div>\n </dt-stack>\n</template>\n\n<script>\nimport MonthYearPicker from './modules/month-year-picker.vue';\nimport Calendar from './modules/calendar.vue';\nimport { DtStack } from '@/components/stack';\nimport { warnIfUnmounted } from '@/common/utils';\n\nexport default {\n name: 'DtDatepicker',\n\n components: { DtStack, MonthYearPicker, Calendar },\n\n props: {\n /**\n * Selected date\n *\n * @type {Date}\n */\n selectedDate: {\n type: Date,\n default: () => (new Date()),\n },\n },\n\n emits: [\n /**\n * Event fired when a date is selected\n *\n * @event selected-date\n * @type {Date}\n */\n 'selected-date',\n\n /**\n * Event fired when user presses the esc key\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n ],\n\n data () {\n return {\n calendarDays: [],\n };\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n },\n\n methods: {\n updateCalendarDays (days) {\n this.calendarDays = days;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtTooltip","DtStack","DtIconChevronLeft","DtIconChevronsLeft","DtIconChevronRight","DtIconChevronsRight","DtLocalizationMixin","getMonth","getYear","getCalendarDays","month","formatMonth","INTL_MONTH_FORMAT","refName","event","year","getDate","value","initialDate","set","newDate","addMonths","subMonths","getWeekDayNames","WEEK_START","day","formatDate","el","week","weekIndex","dayIndex","refKey","dayButton","prevFocusDate","calculatePrevFocusDate","nextFocusDate","calculateNextFocusDate","MonthYearPicker","Calendar","warnIfUnmounted","days"],"mappings":"6eAkJAA,EAAA,CACA,KAAA,8BAEA,WAAA,CACA,SAAAC,EAAA,QACA,UAAAC,EAAA,QACA,QAAAC,EAAA,QACA,kBAAAC,EAAA,kBACA,mBAAAC,EAAA,mBACA,mBAAAC,EAAA,mBACA,oBAAAC,EAAA,mBACA,EAEA,OAAA,CAAAC,EAAAA,OAAA,EAEA,MAAA,CACA,aAAA,CACA,KAAA,KACA,SAAA,EACA,CACA,EAEA,MAAA,CAOA,gBAOA,kBAOA,iBAOA,kBACA,EAEA,MAAA,CACA,MAAA,CACA,YAAAC,EAAAA,SAAA,KAAA,YAAA,EACA,WAAAC,EAAAA,QAAA,KAAA,YAAA,EACA,eAAA,KACA,YAAA,EACA,UAAA,CAAA,EACA,SAAA,CAAA,oBAAA,qBAAA,qBAAA,mBAAA,CACA,CACA,EAEA,SAAA,CAEA,cAAA,CACA,OAAAC,EAAAA,gBAAA,KAAA,YAAA,KAAA,WAAA,KAAA,cAAA,CACA,EAEA,gBAAA,CACA,OAAAC,GAAAC,EAAAA,YAAAD,EAAAE,EAAA,kBAAA,KAAA,KAAA,aAAA,CACA,EAEA,uBAAA,CACA,MAAA,GAAA,KAAA,KAAA,GAAA,+BAAA,CAAA,IAAA,KAAA,KAAA,GAAA,mCAAA,CAAA,IAAA,KAAA,WAAA,CAAA,EACA,EAEA,wBAAA,CACA,MAAA,GAAA,KAAA,KAAA,GAAA,+BAAA,CAAA,IAAA,KAAA,KAAA,GAAA,oCAAA,CAAA,IAAA,KAAA,eAAA,KAAA,YAAA,CAAA,CAAA,EACA,EAEA,mBAAA,CACA,MAAA,GAAA,KAAA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,IAAA,UAGA,KAAA,MAAA,kBAAA,EACA,KAAA,UAAA,IAAA,CACA,KAAA,aAAA,CACA,CAAA,GAEA,MAEA,IAAA,aACAA,EAAA,eAAA,EACA,KAAA,SAAA,KAAA,QAAA,OAAA,GACA,KAAA,UAAA,EACA,KAAA,QAAA,KAAA,QAAA,EAAA,GAAA,IAAA,UAGA,KAAA,MAAA,kBAAA,EACA,KAAA,UAAA,IAAA,CACA,KAAA,cAAA,CACA,CAAA,GAEA,MAEA,IAAA,MACAA,EAAA,eAAA,EACA,KAAA,MAAA,yBAAA,EACA,MAEA,IAAA,SACA,KAAA,MAAA,kBAAA,EACA,KACA,CACA,EAEA,eAAA,CACA,KAAA,SAAA,EACA,KAAA,UAAA,IAAA,CACA,KAAA,QAAA,KAAA,QAAA,EAAA,GAAA,IAAA,OACA,CAAA,CACA,EAEA,cAAA,CACA,KAAA,UAAA,IAAA,CACA,KAAA,SAAA,KAAA,QAAA,OAAA,EACA,KAAA,QAAA,KAAA,QAAA,EAAA,GAAA,IAAA,OACA,CAAA,CACA,EAEA,UAAAW,EAAA,CACAA,EAAA,eAGA,KAAA,YAAAA,EAAA,KACA,KAAA,MAAA,cAAAA,EAAA,KAAA,EACA,CACA,CACA,4qCCjNA3B,EAAA,CACA,KAAA,eAEA,WAAA,CAAAG,QAAAA,EAAAA,QAAA,gBAAAoC,EAAA,SAAAC,CAAA,EAEA,MAAA,CAMA,aAAA,CACA,KAAA,KACA,QAAA,IAAA,IAAA,IACA,CACA,EAEA,MAAA,CAOA,gBAOA,kBACA,EAEA,MAAA,CACA,MAAA,CACA,aAAA,CAAA,CACA,CACA,EAEA,SAAA,CACAC,EAAA,gBAAA,KAAA,IAAA,KAAA,SAAA,IAAA,CACA,EAEA,QAAA,CACA,mBAAAC,EAAA,CACA,KAAA,aAAAA,CACA,CACA,CACA"}
1
+ {"version":3,"file":"datepicker.cjs","sources":["../../../components/datepicker/modules/month-year-picker.vue","../../../components/datepicker/modules/calendar.vue","../../../components/datepicker/datepicker.vue"],"sourcesContent":["<template>\n <dt-stack\n class=\"d-datepicker__month-year\"\n direction=\"row\"\n gap=\"300\"\n >\n <dt-stack\n as=\"nav\"\n class=\"d-datepicker__nav\"\n direction=\"row\"\n gap=\"200\"\n >\n <dt-tooltip\n :fallback-placements=\"['top-start', 'auto']\"\n :message=\"i18n.$t('DIALTONE_DATEPICKER_PREVIOUS_YEAR')\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n id=\"prevYearButton\"\n :ref=\"refNames[0]\"\n :aria-label=\"previousYearAriaLabel\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n importance=\"clear\"\n kind=\"muted\"\n size=\"xs\"\n type=\"button\"\n @click=\"changeYear(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevrons-left\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :fallback-placements=\"['top-start', 'auto']\"\n :message=\"i18n.$t('DIALTONE_DATEPICKER_PREVIOUS_MONTH')\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n id=\"prevMonthButton\"\n :ref=\"refNames[1]\"\n :aria-label=\"previousMonthAriaLabel\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n importance=\"clear\"\n kind=\"muted\"\n size=\"xs\"\n type=\"button\"\n @click=\"changeMonth(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevron-left\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n <div\n id=\"calendar-heading\"\n class=\"d-datepicker__month-year-title\"\n >\n {{ formattedMonth(selectMonth) }}\n\n {{ selectYear }}\n </div>\n <dt-stack\n as=\"nav\"\n class=\"d-datepicker__nav\"\n direction=\"row\"\n gap=\"200\"\n >\n <dt-tooltip\n :fallback-placements=\"['top-end', 'auto']\"\n :message=\"i18n.$t('DIALTONE_DATEPICKER_NEXT_MONTH')\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n id=\"nextMonthButton\"\n :ref=\"refNames[2]\"\n :aria-label=\"nextMonthAriaLabel\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n importance=\"clear\"\n kind=\"muted\"\n size=\"xs\"\n type=\"button\"\n @click=\"changeMonth(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevron-right\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :fallback-placements=\"['top-end', 'auto']\"\n :message=\"i18n.$t('DIALTONE_DATEPICKER_NEXT_YEAR')\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n id=\"nextYearButton\"\n :ref=\"refNames[3]\"\n :aria-label=\"nextYearAriaLabel\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n importance=\"clear\"\n kind=\"muted\"\n size=\"xs\"\n type=\"button\"\n @click=\"changeYear(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevrons-right\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n </dt-stack>\n</template>\n\n<script>\nimport {\n DtIconChevronLeft,\n DtIconChevronsLeft,\n DtIconChevronRight,\n DtIconChevronsRight,\n} from '@dialpad/dialtone-icons/vue2';\nimport { getYear, addMonths, getMonth, set, subMonths, getDate } from 'date-fns';\nimport { getCalendarDays, formatMonth } from '../utils';\nimport { INTL_MONTH_FORMAT } from '../datepicker_constants';\nimport { DtStack } from '@/components/stack';\nimport { DtTooltip } from '@/components/tooltip';\nimport { DtButton } from '@/components/button';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtDatepickerMonthYearPicker',\n\n components: {\n DtButton,\n DtTooltip,\n DtStack,\n DtIconChevronLeft,\n DtIconChevronsLeft,\n DtIconChevronRight,\n DtIconChevronsRight,\n },\n\n mixins: [DtLocalizationMixin],\n\n props: {\n selectedDate: {\n type: Date,\n required: true,\n },\n },\n\n emits: [\n /**\n * Will retrieve the calendar days of the given date\n *\n * @event calendar-days\n * @type {Array}\n */\n 'calendar-days',\n\n /**\n * Will focus first day in calendar\n *\n * @event focus-first-day\n */\n 'focus-first-day',\n\n /**\n * Will focus last day in calendar\n *\n * @event focus-last-day\n */\n 'focus-last-day',\n\n /**\n * Will close the datepicker\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n ],\n\n data () {\n return {\n selectMonth: getMonth(this.selectedDate),\n selectYear: getYear(this.selectedDate),\n highlightedDay: null,\n focusPicker: 0,\n focusRefs: [],\n refNames: ['prevYearButtonRef', 'prevMonthButtonRef', 'nextMonthButtonRef', 'nextYearButtonRef'],\n };\n },\n\n computed: {\n // Get days for the currently selected month and year and highlight the selected day\n calendarDays () {\n return getCalendarDays(this.selectMonth, this.selectYear, this.highlightedDay);\n },\n\n formattedMonth () {\n return (month) => formatMonth(month, INTL_MONTH_FORMAT, this.i18n.currentLocale);\n },\n\n previousYearAriaLabel () {\n return `${this.i18n.$t('DIALTONE_DATEPICKER_CHANGE_TO')} ${this.i18n.$t('DIALTONE_DATEPICKER_PREVIOUS_YEAR')} ${this.selectYear - 1}`;\n },\n\n previousMonthAriaLabel () {\n return `${this.i18n.$t('DIALTONE_DATEPICKER_CHANGE_TO')} ${this.i18n.$t('DIALTONE_DATEPICKER_PREVIOUS_MONTH')} ${this.formattedMonth(this.selectMonth - 1)}`;\n },\n\n nextYearAriaLabel () {\n return `${this.i18n.$t('DIALTONE_DATEPICKER_CHANGE_TO')} ${this.i18n.$t('DIALTONE_DATEPICKER_NEXT_YEAR')} ${this.selectYear + 1}`;\n },\n\n nextMonthAriaLabel () {\n return `${this.i18n.$t('DIALTONE_DATEPICKER_CHANGE_TO')} ${this.i18n.$t('DIALTONE_DATEPICKER_NEXT_MONTH')} ${this.formattedMonth(this.selectMonth + 1)}`;\n },\n },\n\n watch: {\n selectMonth: {\n handler () {\n this.highlightDay();\n this.$emit('calendar-days', this.calendarDays);\n },\n\n immediate: true,\n },\n\n selectYear: {\n handler () {\n this.highlightDay();\n this.$emit('calendar-days', this.calendarDays);\n },\n\n immediate: true,\n },\n\n },\n\n mounted () {\n this.setButtonsRef();\n this.focusMonthYearPicker();\n },\n\n methods: {\n setButtonsRef () {\n this.focusRefs = this.refNames.map(refName => this.$refs[refName]);\n },\n\n focusMonthYearPicker () {\n this.focusPicker = 0;\n this.focusRefs[0].$el.focus();\n },\n\n handleKeyDown (event) {\n switch (event.key) {\n case 'ArrowLeft':\n event.preventDefault();\n if (this.focusPicker === 0) {\n this.focusPicker = 3;\n this.focusRefs[this.focusPicker].$el.focus();\n } else {\n this.focusPicker--;\n this.focusRefs[this.focusPicker].$el.focus();\n }\n break;\n\n case 'ArrowRight':\n event.preventDefault();\n if (this.focusPicker === 3) {\n this.focusPicker = 0;\n this.focusRefs[this.focusPicker].$el.focus();\n } else {\n this.focusPicker++;\n this.focusRefs[this.focusPicker].$el.focus();\n }\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n this.$emit('focus-first-day');\n break;\n\n case 'Tab':\n event.preventDefault();\n this.$emit('focus-first-day');\n break;\n\n case 'Escape':\n this.$emit('close-datepicker');\n break;\n }\n },\n\n highlightDay () {\n const year = getYear(this.selectedDate);\n const month = getMonth(this.selectedDate);\n\n if (year !== this.selectYear || month !== this.selectMonth) {\n this.highlightedDay = null;\n } else {\n this.highlightedDay = getDate(this.selectedDate);\n }\n },\n\n changeMonth (value) {\n // Adjust year when changing from January to December or vice versa\n if ((this.selectMonth === 0 && value === -1) || (this.selectMonth === 11 && value === 1)) {\n this.selectYear += value;\n }\n\n // Calculate the new date by adding or subtracting months\n const initialDate = set(this.selectedDate, { month: this.selectMonth, year: this.selectYear });\n const newDate = value === 1 ? addMonths(initialDate, 1) : subMonths(initialDate, 1);\n\n // Update the selected month\n this.selectMonth = getMonth(newDate);\n },\n\n changeYear (value) {\n this.selectYear = this.selectYear + value;\n },\n\n goToNextMonth () {\n this.changeMonth(1);\n },\n\n goToPrevMonth () {\n this.changeMonth(-1);\n },\n },\n};\n</script>\n","<template>\n <table\n class=\"d-datepicker__calendar\"\n aria-labelledby=\"calendar-heading\"\n >\n <thead>\n <tr>\n <th\n v-for=\"day in weekDays\"\n :key=\"day\"\n scope=\"col\"\n class=\"d-datepicker__cell d-datepicker__cell--header\"\n >\n <span\n class=\"d-datepicker__weekday\"\n :title=\"day\"\n :aria-label=\"day\"\n > {{ day }}</span>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"(week, indexWeek) in calendarDays\"\n :key=\"indexWeek\"\n >\n <td\n v-for=\"(day, indexDays) in week.days\"\n :key=\"indexWeek + indexDays\"\n class=\"d-datepicker__cell\"\n role=\"listbox\"\n >\n <dt-button\n :ref=\"`buttonRef_${indexWeek}_${indexDays}`\"\n class=\"d-datepicker__day\"\n :circle=\"true\"\n size=\"sm\"\n importance=\"clear\"\n :disabled=\"!day.currentMonth\"\n :class=\"{\n 'd-datepicker__day--disabled': !day.currentMonth,\n 'd-datepicker__day--selected': selectedDay\n ? ((day.text === selectedDay) && day.currentMonth)\n : day.selected,\n }\"\n type=\"button\"\n :aria-selected=\"!!selectedDay ? ((day.text === selectedDay) && day.currentMonth) : day.selected\"\n :aria-label=\"dayAriaLabel(day)\"\n role=\"option\"\n @click=\"selectDay(day)\"\n @keydown=\"handleKeyDown($event)\"\n >\n {{ day.text }}\n </dt-button>\n </td>\n </tr>\n </tbody>\n </table>\n</template>\n\n<script>\nimport { getWeekDayNames, calculateNextFocusDate, calculatePrevFocusDate, formatDate } from '../utils';\nimport { WEEK_START, INTL_MONTH_FORMAT } from '../datepicker_constants.js';\nimport { DtButton } from '@/components/button';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtDatepickerCalendar',\n components: { DtButton },\n\n mixins: [DtLocalizationMixin],\n\n props: {\n calendarDays: {\n type: Array,\n required: true,\n },\n },\n\n emits: [\n /**\n * Event fired when a date is selected\n *\n * @event select-date\n * @type {Date}\n */\n 'select-date',\n\n /**\n * Will focus the month and year picker\n *\n * @event focus-month-year-picker\n */\n 'focus-month-year-picker',\n\n /**\n * Will close the datepicker\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n ],\n\n data () {\n return {\n // local selectedDay to override the received by props calendarDays\n selectedDay: null,\n focusDay: 0,\n daysRef: [],\n };\n },\n\n computed: {\n weekDays () {\n return getWeekDayNames(this.i18n.currentLocale, WEEK_START);\n },\n },\n\n watch: {\n calendarDays () {\n // on calendarDays update, reset our local variables\n this.focusDay = 0;\n this.selectedDay = null;\n\n this.daysRef = [];\n\n this.$nextTick(() => {\n this.daysRef = [];\n this.setDayRef();\n });\n },\n },\n\n methods: {\n dayAriaLabel (day) {\n return this.i18n.$t('DIALTONE_DATEPICKER_SELECT_DAY') + ` ${formatDate(day.value, INTL_MONTH_FORMAT, this.i18n.currentLocale)}`;\n },\n\n setDayRef (el, day) {\n this.calendarDays.forEach((week, weekIndex) => {\n week.days.forEach((day, dayIndex) => {\n const refKey = `buttonRef_${weekIndex}_${dayIndex}`;\n const dayButton = this.$refs[refKey];\n if (dayButton && day.currentMonth) {\n this.daysRef.push({ el: dayButton[0], day });\n }\n });\n });\n },\n\n handleKeyDown (event) {\n switch (event.key) {\n case 'ArrowUp':\n event.preventDefault();\n this.focusDay -= 7;\n try {\n this.daysRef[this.focusDay].el.$el.focus();\n } catch (error) {\n const prevFocusDate = calculatePrevFocusDate(this.daysRef[this.focusDay + 7].day.value);\n this.$emit('go-to-prev-month');\n this.$nextTick(() => {\n this.setDayRef();\n this.daysRef[prevFocusDate - 1].el.$el.focus();\n this.focusDay += prevFocusDate - 1;\n });\n }\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n this.focusDay += 7;\n try {\n this.daysRef[this.focusDay].el.$el.focus();\n } catch (error) {\n const nextFocusDate = calculateNextFocusDate(this.daysRef[this.focusDay - 7].day.value);\n this.$emit('go-to-next-month');\n this.$nextTick(() => {\n this.setDayRef();\n this.daysRef[nextFocusDate - 1].el.$el.focus();\n this.focusDay += nextFocusDate - 1;\n });\n }\n break;\n\n case 'ArrowLeft':\n event.preventDefault();\n if (this.focusDay > 0) {\n this.focusDay -= 1;\n this.daysRef[this.focusDay].el.$el.focus();\n } else {\n // if we are on month first day, jump to last day of prev month\n this.$emit('go-to-prev-month');\n this.$nextTick(() => {\n this.focusLastDay();\n });\n }\n break;\n\n case 'ArrowRight':\n event.preventDefault();\n if (this.focusDay < this.daysRef.length - 1) {\n this.focusDay += 1;\n this.daysRef[this.focusDay].el.$el.focus();\n } else {\n // if we are on month last day, jump to first day of next month\n this.$emit('go-to-next-month');\n this.$nextTick(() => {\n this.focusFirstDay();\n });\n }\n break;\n\n case 'Tab':\n event.preventDefault();\n this.$emit('focus-month-year-picker');\n break;\n\n case 'Escape':\n this.$emit('close-datepicker');\n break;\n }\n },\n\n focusFirstDay () {\n this.focusDay = 0;\n this.$nextTick(() => {\n this.daysRef[this.focusDay].el.$el.focus();\n });\n },\n\n focusLastDay () {\n this.$nextTick(() => {\n this.focusDay = this.daysRef.length - 1;\n this.daysRef[this.focusDay].el.$el.focus();\n });\n },\n\n selectDay (day) {\n if (!day.currentMonth) { return; }\n\n // local selectedDay is updated when a day is selected\n this.selectedDay = day.text;\n this.$emit('select-date', day.value);\n },\n },\n};\n</script>\n","<!-- eslint-disable vue/multi-word-component-names -->\n<template>\n <dt-stack\n class=\"d-datepicker\"\n gap=\"400\"\n >\n <div class=\"d-datepicker__hd\">\n <month-year-picker\n ref=\"monthYearPicker\"\n :selected-date=\"selectedDate\"\n @calendar-days=\"updateCalendarDays\"\n @focus-first-day=\"$refs.calendar.focusFirstDay()\"\n @focus-last-day=\"$refs.calendar.focusLastDay()\"\n @close-datepicker=\"$emit('close-datepicker')\"\n />\n </div>\n <div class=\"d-datepicker__bd\">\n <calendar\n ref=\"calendar\"\n :calendar-days=\"calendarDays\"\n @select-date=\"$emit('selected-date', $event)\"\n @focus-month-year-picker=\"$refs.monthYearPicker.focusMonthYearPicker()\"\n @close-datepicker=\"$emit('close-datepicker')\"\n @go-to-next-month=\"$refs.monthYearPicker.goToNextMonth()\"\n @go-to-prev-month=\"$refs.monthYearPicker.goToPrevMonth()\"\n />\n </div>\n </dt-stack>\n</template>\n\n<script>\nimport MonthYearPicker from './modules/month-year-picker.vue';\nimport Calendar from './modules/calendar.vue';\nimport { DtStack } from '@/components/stack';\nimport { warnIfUnmounted } from '@/common/utils';\n\nexport default {\n name: 'DtDatepicker',\n\n components: { DtStack, MonthYearPicker, Calendar },\n\n props: {\n /**\n * Selected date\n *\n * @type {Date}\n */\n selectedDate: {\n type: Date,\n default: () => (new Date()),\n },\n },\n\n emits: [\n /**\n * Event fired when a date is selected\n *\n * @event selected-date\n * @type {Date}\n */\n 'selected-date',\n\n /**\n * Event fired when user presses the esc key\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n ],\n\n data () {\n return {\n calendarDays: [],\n };\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n },\n\n methods: {\n updateCalendarDays (days) {\n this.calendarDays = days;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtTooltip","DtStack","DtIconChevronLeft","DtIconChevronsLeft","DtIconChevronRight","DtIconChevronsRight","DtLocalizationMixin","getMonth","getYear","getCalendarDays","month","formatMonth","INTL_MONTH_FORMAT","refName","event","year","getDate","value","initialDate","set","newDate","addMonths","subMonths","getWeekDayNames","WEEK_START","day","formatDate","el","week","weekIndex","dayIndex","refKey","dayButton","prevFocusDate","calculatePrevFocusDate","nextFocusDate","calculateNextFocusDate","MonthYearPicker","Calendar","warnIfUnmounted","days"],"mappings":"6eAkJAA,EAAA,CACA,KAAA,8BAEA,WAAA,CACA,SAAAC,EAAA,QACA,UAAAC,EAAA,QACA,QAAAC,EAAA,QACA,kBAAAC,EAAA,kBACA,mBAAAC,EAAA,mBACA,mBAAAC,EAAA,mBACA,oBAAAC,EAAA,mBACA,EAEA,OAAA,CAAAC,EAAAA,OAAA,EAEA,MAAA,CACA,aAAA,CACA,KAAA,KACA,SAAA,EAC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