@dialpad/dialtone 9.126.6 → 9.127.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (619) hide show
  1. package/README.md +1 -1
  2. package/dist/tokens/doc.json +25670 -25670
  3. package/dist/vue2/common/mixins/index.cjs +1 -1
  4. package/dist/vue2/common/mixins/index.js +2 -4
  5. package/dist/vue2/common/mixins/index.js.map +1 -1
  6. package/dist/vue2/component-documentation.json +1 -1
  7. package/dist/vue2/dialtone-vue.cjs +1 -1
  8. package/dist/vue2/dialtone-vue.js +345 -347
  9. package/dist/vue2/dialtone-vue.js.map +1 -1
  10. package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  11. package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
  12. package/dist/vue2/lib/attachment-carousel/attachment-carousel.js +16 -12
  13. package/dist/vue2/lib/attachment-carousel/attachment-carousel.js.map +1 -1
  14. package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs +1 -1
  15. package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
  16. package/dist/vue2/lib/breadcrumbs/breadcrumbs.js +6 -6
  17. package/dist/vue2/lib/breadcrumbs/breadcrumbs.js.map +1 -1
  18. package/dist/vue2/lib/button/button.cjs +1 -1
  19. package/dist/vue2/lib/button/button.cjs.map +1 -1
  20. package/dist/vue2/lib/button/button.js +6 -6
  21. package/dist/vue2/lib/button/button.js.map +1 -1
  22. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  23. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
  24. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +18 -18
  25. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  26. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  27. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
  28. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js +14 -14
  29. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  30. package/dist/vue2/lib/chip/chip.cjs +1 -1
  31. package/dist/vue2/lib/chip/chip.cjs.map +1 -1
  32. package/dist/vue2/lib/chip/chip.js +7 -7
  33. package/dist/vue2/lib/chip/chip.js.map +1 -1
  34. package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs +1 -1
  35. package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
  36. package/dist/vue2/lib/contact-centers-row/contact-centers-row.js +13 -13
  37. package/dist/vue2/lib/contact-centers-row/contact-centers-row.js.map +1 -1
  38. package/dist/vue2/lib/datepicker/datepicker.cjs +1 -1
  39. package/dist/vue2/lib/datepicker/datepicker.cjs.map +1 -1
  40. package/dist/vue2/lib/datepicker/datepicker.js +26 -26
  41. package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
  42. package/dist/vue2/lib/datepicker/formatUtils.cjs +1 -1
  43. package/dist/vue2/lib/datepicker/formatUtils.cjs.map +1 -1
  44. package/dist/vue2/lib/datepicker/formatUtils.js +21 -20
  45. package/dist/vue2/lib/datepicker/formatUtils.js.map +1 -1
  46. package/dist/vue2/lib/dropdown/dropdown.cjs +1 -1
  47. package/dist/vue2/lib/dropdown/dropdown.cjs.map +1 -1
  48. package/dist/vue2/lib/dropdown/dropdown.js +24 -26
  49. package/dist/vue2/lib/dropdown/dropdown.js.map +1 -1
  50. package/dist/vue2/lib/editor/editor.cjs +1 -1
  51. package/dist/vue2/lib/editor/editor.cjs.map +1 -1
  52. package/dist/vue2/lib/editor/editor.js +17 -17
  53. package/dist/vue2/lib/editor/editor.js.map +1 -1
  54. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs +1 -1
  55. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  56. package/dist/vue2/lib/emoji-picker/emoji-picker.js +7 -6
  57. package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
  58. package/dist/vue2/lib/emoji-row/emoji-row.cjs +1 -1
  59. package/dist/vue2/lib/emoji-row/emoji-row.cjs.map +1 -1
  60. package/dist/vue2/lib/emoji-row/emoji-row.js +24 -20
  61. package/dist/vue2/lib/emoji-row/emoji-row.js.map +1 -1
  62. package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs +1 -1
  63. package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
  64. package/dist/vue2/lib/feed-item-pill/feed-item-pill.js +8 -8
  65. package/dist/vue2/lib/feed-item-pill/feed-item-pill.js.map +1 -1
  66. package/dist/vue2/lib/general-row/general-row.cjs +1 -1
  67. package/dist/vue2/lib/general-row/general-row.cjs.map +1 -1
  68. package/dist/vue2/lib/general-row/general-row.js +17 -17
  69. package/dist/vue2/lib/general-row/general-row.js.map +1 -1
  70. package/dist/vue2/lib/group-row/group-row.cjs +1 -1
  71. package/dist/vue2/lib/group-row/group-row.cjs.map +1 -1
  72. package/dist/vue2/lib/group-row/group-row.js +11 -7
  73. package/dist/vue2/lib/group-row/group-row.js.map +1 -1
  74. package/dist/vue2/lib/icon/icon.cjs +1 -1
  75. package/dist/vue2/lib/icon/icon.cjs.map +1 -1
  76. package/dist/vue2/lib/icon/icon.js +10 -6
  77. package/dist/vue2/lib/icon/icon.js.map +1 -1
  78. package/dist/vue2/lib/image-viewer/image-viewer.cjs +1 -1
  79. package/dist/vue2/lib/image-viewer/image-viewer.cjs.map +1 -1
  80. package/dist/vue2/lib/image-viewer/image-viewer.js +8 -7
  81. package/dist/vue2/lib/image-viewer/image-viewer.js.map +1 -1
  82. package/dist/vue2/lib/ivr-node/ivr-node.cjs +1 -1
  83. package/dist/vue2/lib/ivr-node/ivr-node.cjs.map +1 -1
  84. package/dist/vue2/lib/ivr-node/ivr-node.js +17 -17
  85. package/dist/vue2/lib/ivr-node/ivr-node.js.map +1 -1
  86. package/dist/vue2/lib/loader/loader.cjs +1 -1
  87. package/dist/vue2/lib/loader/loader.cjs.map +1 -1
  88. package/dist/vue2/lib/loader/loader.js +12 -8
  89. package/dist/vue2/lib/loader/loader.js.map +1 -1
  90. package/dist/vue2/lib/message-input/message-input-link.cjs +1 -1
  91. package/dist/vue2/lib/message-input/message-input-link.cjs.map +1 -1
  92. package/dist/vue2/lib/message-input/message-input-link.js +15 -15
  93. package/dist/vue2/lib/message-input/message-input-link.js.map +1 -1
  94. package/dist/vue2/lib/message-input/message-input-topbar.cjs +1 -1
  95. package/dist/vue2/lib/message-input/message-input-topbar.cjs.map +1 -1
  96. package/dist/vue2/lib/message-input/message-input-topbar.js +14 -10
  97. package/dist/vue2/lib/message-input/message-input-topbar.js.map +1 -1
  98. package/dist/vue2/lib/message-input/message-input.cjs +1 -1
  99. package/dist/vue2/lib/message-input/message-input.cjs.map +1 -1
  100. package/dist/vue2/lib/message-input/message-input.js +14 -10
  101. package/dist/vue2/lib/message-input/message-input.js.map +1 -1
  102. package/dist/vue2/lib/modal/modal.cjs +1 -1
  103. package/dist/vue2/lib/modal/modal.cjs.map +1 -1
  104. package/dist/vue2/lib/modal/modal.js +12 -11
  105. package/dist/vue2/lib/modal/modal.js.map +1 -1
  106. package/dist/vue2/lib/notice/notice-action.cjs +1 -1
  107. package/dist/vue2/lib/notice/notice-action.cjs.map +1 -1
  108. package/dist/vue2/lib/notice/notice-action.js +10 -6
  109. package/dist/vue2/lib/notice/notice-action.js.map +1 -1
  110. package/dist/vue2/lib/pagination/pagination.cjs +1 -1
  111. package/dist/vue2/lib/pagination/pagination.cjs.map +1 -1
  112. package/dist/vue2/lib/pagination/pagination.js +7 -7
  113. package/dist/vue2/lib/pagination/pagination.js.map +1 -1
  114. package/dist/vue2/lib/popover/popover-header-footer.cjs +1 -1
  115. package/dist/vue2/lib/popover/popover-header-footer.cjs.map +1 -1
  116. package/dist/vue2/lib/popover/popover-header-footer.js +13 -9
  117. package/dist/vue2/lib/popover/popover-header-footer.js.map +1 -1
  118. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +2 -2
  119. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  120. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +61 -57
  121. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  122. package/dist/vue2/lib/toast/toast.cjs.map +1 -1
  123. package/dist/vue2/lib/toast/toast.js.map +1 -1
  124. package/dist/vue2/lib/unread-pill/unread-pill.cjs +1 -1
  125. package/dist/vue2/lib/unread-pill/unread-pill.cjs.map +1 -1
  126. package/dist/vue2/lib/unread-pill/unread-pill.js +15 -11
  127. package/dist/vue2/lib/unread-pill/unread-pill.js.map +1 -1
  128. package/dist/vue2/localization/de-DE.cjs +1 -13
  129. package/dist/vue2/localization/de-DE.cjs.map +1 -1
  130. package/dist/vue2/localization/de-DE.js +1 -13
  131. package/dist/vue2/localization/de-DE.js.map +1 -1
  132. package/dist/vue2/localization/es-LA.cjs +1 -13
  133. package/dist/vue2/localization/es-LA.cjs.map +1 -1
  134. package/dist/vue2/localization/es-LA.js +1 -13
  135. package/dist/vue2/localization/es-LA.js.map +1 -1
  136. package/dist/vue2/localization/fr-FR.cjs +1 -13
  137. package/dist/vue2/localization/fr-FR.cjs.map +1 -1
  138. package/dist/vue2/localization/fr-FR.js +1 -13
  139. package/dist/vue2/localization/fr-FR.js.map +1 -1
  140. package/dist/vue2/localization/index.cjs +1 -1
  141. package/dist/vue2/localization/index.cjs.map +1 -1
  142. package/dist/vue2/localization/index.js +59 -53
  143. package/dist/vue2/localization/index.js.map +1 -1
  144. package/dist/vue2/localization/it-IT.cjs +1 -13
  145. package/dist/vue2/localization/it-IT.cjs.map +1 -1
  146. package/dist/vue2/localization/it-IT.js +1 -13
  147. package/dist/vue2/localization/it-IT.js.map +1 -1
  148. package/dist/vue2/localization/ja-JP.cjs +1 -8
  149. package/dist/vue2/localization/ja-JP.cjs.map +1 -1
  150. package/dist/vue2/localization/ja-JP.js +1 -8
  151. package/dist/vue2/localization/ja-JP.js.map +1 -1
  152. package/dist/vue2/localization/nl-NL.cjs +1 -13
  153. package/dist/vue2/localization/nl-NL.cjs.map +1 -1
  154. package/dist/vue2/localization/nl-NL.js +1 -13
  155. package/dist/vue2/localization/nl-NL.js.map +1 -1
  156. package/dist/vue2/localization/pt-BR.cjs +1 -13
  157. package/dist/vue2/localization/pt-BR.cjs.map +1 -1
  158. package/dist/vue2/localization/pt-BR.js +1 -13
  159. package/dist/vue2/localization/pt-BR.js.map +1 -1
  160. package/dist/vue2/localization/ru-RU.cjs +1 -23
  161. package/dist/vue2/localization/ru-RU.cjs.map +1 -1
  162. package/dist/vue2/localization/ru-RU.js +1 -23
  163. package/dist/vue2/localization/ru-RU.js.map +1 -1
  164. package/dist/vue2/localization/zh-CN.cjs +1 -8
  165. package/dist/vue2/localization/zh-CN.cjs.map +1 -1
  166. package/dist/vue2/localization/zh-CN.js +1 -8
  167. package/dist/vue2/localization/zh-CN.js.map +1 -1
  168. package/dist/vue2/shared/sr_only_close_button.cjs +1 -1
  169. package/dist/vue2/shared/sr_only_close_button.cjs.map +1 -1
  170. package/dist/vue2/shared/sr_only_close_button.js +14 -10
  171. package/dist/vue2/shared/sr_only_close_button.js.map +1 -1
  172. package/dist/vue2/types/common/mixins/index.d.ts +0 -1
  173. package/dist/vue2/types/common/sr_only_close_button.vue.d.ts +5 -8
  174. package/dist/vue2/types/common/sr_only_close_button.vue.d.ts.map +1 -1
  175. package/dist/vue2/types/components/breadcrumbs/breadcrumbs.vue.d.ts +3 -5
  176. package/dist/vue2/types/components/breadcrumbs/breadcrumbs.vue.d.ts.map +1 -1
  177. package/dist/vue2/types/components/button/button.vue.d.ts +4 -6
  178. package/dist/vue2/types/components/button/button.vue.d.ts.map +1 -1
  179. package/dist/vue2/types/components/chip/chip.vue.d.ts +6 -8
  180. package/dist/vue2/types/components/chip/chip.vue.d.ts.map +1 -1
  181. package/dist/vue2/types/components/datepicker/formatUtils.d.ts.map +1 -1
  182. package/dist/vue2/types/components/datepicker/modules/calendar.vue.d.ts +3 -5
  183. package/dist/vue2/types/components/datepicker/modules/calendar.vue.d.ts.map +1 -1
  184. package/dist/vue2/types/components/datepicker/modules/month-year-picker.vue.d.ts +3 -5
  185. package/dist/vue2/types/components/datepicker/modules/month-year-picker.vue.d.ts.map +1 -1
  186. package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
  187. package/dist/vue2/types/components/emoji_picker/emoji_picker.vue.d.ts +1 -5
  188. package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts +2 -4
  189. package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  190. package/dist/vue2/types/components/loader/loader.vue.d.ts +5 -6
  191. package/dist/vue2/types/components/loader/loader.vue.d.ts.map +1 -1
  192. package/dist/vue2/types/components/modal/modal.vue.d.ts +2 -4
  193. package/dist/vue2/types/components/modal/modal.vue.d.ts.map +1 -1
  194. package/dist/vue2/types/components/notice/notice_action.vue.d.ts +5 -6
  195. package/dist/vue2/types/components/notice/notice_action.vue.d.ts.map +1 -1
  196. package/dist/vue2/types/components/pagination/pagination.vue.d.ts +4 -6
  197. package/dist/vue2/types/components/pagination/pagination.vue.d.ts.map +1 -1
  198. package/dist/vue2/types/components/popover/popover_header_footer.vue.d.ts +5 -6
  199. package/dist/vue2/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
  200. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +5 -7
  201. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  202. package/dist/vue2/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
  203. package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +5 -7
  204. package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
  205. package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +5 -7
  206. package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
  207. package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +4 -6
  208. package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  209. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +3 -5
  210. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  211. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +5 -6
  212. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -1
  213. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +14 -16
  214. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  215. package/dist/vue2/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +5 -6
  216. package/dist/vue2/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
  217. package/dist/vue2/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +6 -8
  218. package/dist/vue2/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
  219. package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +5 -6
  220. package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
  221. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +5 -7
  222. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  223. package/dist/vue2/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +3 -5
  224. package/dist/vue2/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
  225. package/dist/vue2/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +5 -6
  226. package/dist/vue2/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
  227. package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +5 -7
  228. package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
  229. package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts +17 -19
  230. package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  231. package/dist/vue2/types/recipes/leftbar/group_row/group_row.vue.d.ts +8 -9
  232. package/dist/vue2/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
  233. package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +5 -6
  234. package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  235. package/dist/vue3/common/mixins/index.cjs +1 -1
  236. package/dist/vue3/common/mixins/index.js +8 -10
  237. package/dist/vue3/common/mixins/index.js.map +1 -1
  238. package/dist/vue3/common/utils/index.cjs +1 -1
  239. package/dist/vue3/common/utils/index.cjs.map +1 -1
  240. package/dist/vue3/common/utils/index.js +42 -38
  241. package/dist/vue3/common/utils/index.js.map +1 -1
  242. package/dist/vue3/component-documentation.json +1 -1
  243. package/dist/vue3/dialtone-vue.cjs +1 -1
  244. package/dist/vue3/dialtone-vue.js +298 -299
  245. package/dist/vue3/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  246. package/dist/vue3/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
  247. package/dist/vue3/lib/attachment-carousel/attachment-carousel.js +86 -110
  248. package/dist/vue3/lib/attachment-carousel/attachment-carousel.js.map +1 -1
  249. package/dist/vue3/lib/banner/banner.cjs +2 -2
  250. package/dist/vue3/lib/banner/banner.cjs.map +1 -1
  251. package/dist/vue3/lib/banner/banner.js +27 -38
  252. package/dist/vue3/lib/banner/banner.js.map +1 -1
  253. package/dist/vue3/lib/breadcrumbs/breadcrumbs.cjs +1 -1
  254. package/dist/vue3/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
  255. package/dist/vue3/lib/breadcrumbs/breadcrumbs.js +20 -18
  256. package/dist/vue3/lib/breadcrumbs/breadcrumbs.js.map +1 -1
  257. package/dist/vue3/lib/button/button.cjs +1 -1
  258. package/dist/vue3/lib/button/button.cjs.map +1 -1
  259. package/dist/vue3/lib/button/button.js +26 -24
  260. package/dist/vue3/lib/button/button.js.map +1 -1
  261. package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  262. package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
  263. package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +36 -41
  264. package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  265. package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  266. package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
  267. package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.js +35 -37
  268. package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  269. package/dist/vue3/lib/chip/chip.cjs +1 -1
  270. package/dist/vue3/lib/chip/chip.cjs.map +1 -1
  271. package/dist/vue3/lib/chip/chip.js +54 -57
  272. package/dist/vue3/lib/chip/chip.js.map +1 -1
  273. package/dist/vue3/lib/combobox/combobox-constants.cjs +1 -1
  274. package/dist/vue3/lib/combobox/combobox-constants.cjs.map +1 -1
  275. package/dist/vue3/lib/combobox/combobox-constants.js +2 -2
  276. package/dist/vue3/lib/combobox/combobox-constants.js.map +1 -1
  277. package/dist/vue3/lib/combobox/combobox-empty-list.cjs.map +1 -1
  278. package/dist/vue3/lib/combobox/combobox-empty-list.js.map +1 -1
  279. package/dist/vue3/lib/combobox/combobox-loading-list.cjs.map +1 -1
  280. package/dist/vue3/lib/combobox/combobox-loading-list.js.map +1 -1
  281. package/dist/vue3/lib/combobox/combobox.cjs +2 -2
  282. package/dist/vue3/lib/combobox/combobox.cjs.map +1 -1
  283. package/dist/vue3/lib/combobox/combobox.js +20 -20
  284. package/dist/vue3/lib/combobox/combobox.js.map +1 -1
  285. package/dist/vue3/lib/combobox/index.cjs +1 -1
  286. package/dist/vue3/lib/combobox/index.js +3 -3
  287. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  288. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  289. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js +119 -124
  290. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  291. package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
  292. package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
  293. package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.js +76 -80
  294. package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
  295. package/dist/vue3/lib/contact-centers-row/contact-centers-row.cjs +1 -1
  296. package/dist/vue3/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
  297. package/dist/vue3/lib/contact-centers-row/contact-centers-row.js +68 -63
  298. package/dist/vue3/lib/contact-centers-row/contact-centers-row.js.map +1 -1
  299. package/dist/vue3/lib/contact-row/contact-row.cjs +1 -1
  300. package/dist/vue3/lib/contact-row/contact-row.cjs.map +1 -1
  301. package/dist/vue3/lib/contact-row/contact-row.js +32 -48
  302. package/dist/vue3/lib/contact-row/contact-row.js.map +1 -1
  303. package/dist/vue3/lib/datepicker/datepicker-constants.cjs +1 -1
  304. package/dist/vue3/lib/datepicker/datepicker-constants.cjs.map +1 -1
  305. package/dist/vue3/lib/datepicker/datepicker-constants.js +2 -3
  306. package/dist/vue3/lib/datepicker/datepicker-constants.js.map +1 -1
  307. package/dist/vue3/lib/datepicker/datepicker.cjs +1 -1
  308. package/dist/vue3/lib/datepicker/datepicker.cjs.map +1 -1
  309. package/dist/vue3/lib/datepicker/datepicker.js +264 -349
  310. package/dist/vue3/lib/datepicker/datepicker.js.map +1 -1
  311. package/dist/vue3/lib/datepicker/formatUtils.cjs +1 -1
  312. package/dist/vue3/lib/datepicker/formatUtils.cjs.map +1 -1
  313. package/dist/vue3/lib/datepicker/formatUtils.js +21 -20
  314. package/dist/vue3/lib/datepicker/formatUtils.js.map +1 -1
  315. package/dist/vue3/lib/datepicker/utils.cjs +1 -1
  316. package/dist/vue3/lib/datepicker/utils.cjs.map +1 -1
  317. package/dist/vue3/lib/datepicker/utils.js +12 -11
  318. package/dist/vue3/lib/datepicker/utils.js.map +1 -1
  319. package/dist/vue3/lib/description-list/description-list.cjs +1 -1
  320. package/dist/vue3/lib/description-list/description-list.cjs.map +1 -1
  321. package/dist/vue3/lib/description-list/description-list.js +10 -10
  322. package/dist/vue3/lib/description-list/description-list.js.map +1 -1
  323. package/dist/vue3/lib/dropdown/dropdown.cjs +1 -1
  324. package/dist/vue3/lib/dropdown/dropdown.cjs.map +1 -1
  325. package/dist/vue3/lib/dropdown/dropdown.js +36 -46
  326. package/dist/vue3/lib/dropdown/dropdown.js.map +1 -1
  327. package/dist/vue3/lib/editor/editor.cjs +1 -1
  328. package/dist/vue3/lib/editor/editor.cjs.map +1 -1
  329. package/dist/vue3/lib/editor/editor.js +169 -186
  330. package/dist/vue3/lib/editor/editor.js.map +1 -1
  331. package/dist/vue3/lib/editor/index.cjs +1 -1
  332. package/dist/vue3/lib/editor/index.js +2 -2
  333. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs +1 -1
  334. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
  335. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js +7 -20
  336. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js.map +1 -1
  337. package/dist/vue3/lib/emoji-picker/emoji-picker.cjs +1 -1
  338. package/dist/vue3/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  339. package/dist/vue3/lib/emoji-picker/emoji-picker.js +419 -477
  340. package/dist/vue3/lib/emoji-picker/emoji-picker.js.map +1 -1
  341. package/dist/vue3/lib/emoji-picker/index.cjs +1 -1
  342. package/dist/vue3/lib/emoji-picker/index.js +3 -4
  343. package/dist/vue3/lib/emoji-row/emoji-row-constants.cjs +1 -1
  344. package/dist/vue3/lib/emoji-row/emoji-row-constants.cjs.map +1 -1
  345. package/dist/vue3/lib/emoji-row/emoji-row-constants.js +6 -7
  346. package/dist/vue3/lib/emoji-row/emoji-row-constants.js.map +1 -1
  347. package/dist/vue3/lib/emoji-row/emoji-row.cjs +1 -1
  348. package/dist/vue3/lib/emoji-row/emoji-row.cjs.map +1 -1
  349. package/dist/vue3/lib/emoji-row/emoji-row.js +53 -43
  350. package/dist/vue3/lib/emoji-row/emoji-row.js.map +1 -1
  351. package/dist/vue3/lib/feed-item-pill/feed-item-pill.cjs +1 -1
  352. package/dist/vue3/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
  353. package/dist/vue3/lib/feed-item-pill/feed-item-pill.js +52 -53
  354. package/dist/vue3/lib/feed-item-pill/feed-item-pill.js.map +1 -1
  355. package/dist/vue3/lib/general-row/general-row.cjs +1 -1
  356. package/dist/vue3/lib/general-row/general-row.cjs.map +1 -1
  357. package/dist/vue3/lib/general-row/general-row.js +133 -118
  358. package/dist/vue3/lib/general-row/general-row.js.map +1 -1
  359. package/dist/vue3/lib/group-row/group-row.cjs +1 -1
  360. package/dist/vue3/lib/group-row/group-row.cjs.map +1 -1
  361. package/dist/vue3/lib/group-row/group-row.js +53 -39
  362. package/dist/vue3/lib/group-row/group-row.js.map +1 -1
  363. package/dist/vue3/lib/icon/icon-constants.cjs.map +1 -1
  364. package/dist/vue3/lib/icon/icon-constants.js.map +1 -1
  365. package/dist/vue3/lib/icon/icon.cjs +1 -1
  366. package/dist/vue3/lib/icon/icon.cjs.map +1 -1
  367. package/dist/vue3/lib/icon/icon.js +16 -13
  368. package/dist/vue3/lib/icon/icon.js.map +1 -1
  369. package/dist/vue3/lib/image-viewer/image-viewer.cjs +1 -1
  370. package/dist/vue3/lib/image-viewer/image-viewer.cjs.map +1 -1
  371. package/dist/vue3/lib/image-viewer/image-viewer.js +51 -47
  372. package/dist/vue3/lib/image-viewer/image-viewer.js.map +1 -1
  373. package/dist/vue3/lib/ivr-node/ivr-node-constants.cjs +1 -1
  374. package/dist/vue3/lib/ivr-node/ivr-node-constants.cjs.map +1 -1
  375. package/dist/vue3/lib/ivr-node/ivr-node-constants.js +24 -24
  376. package/dist/vue3/lib/ivr-node/ivr-node-constants.js.map +1 -1
  377. package/dist/vue3/lib/ivr-node/ivr-node.cjs +1 -1
  378. package/dist/vue3/lib/ivr-node/ivr-node.cjs.map +1 -1
  379. package/dist/vue3/lib/ivr-node/ivr-node.js +80 -76
  380. package/dist/vue3/lib/ivr-node/ivr-node.js.map +1 -1
  381. package/dist/vue3/lib/message-input/message-input-link.cjs +1 -1
  382. package/dist/vue3/lib/message-input/message-input-link.cjs.map +1 -1
  383. package/dist/vue3/lib/message-input/message-input-link.js +100 -77
  384. package/dist/vue3/lib/message-input/message-input-link.js.map +1 -1
  385. package/dist/vue3/lib/message-input/message-input-topbar.cjs +1 -1
  386. package/dist/vue3/lib/message-input/message-input-topbar.cjs.map +1 -1
  387. package/dist/vue3/lib/message-input/message-input-topbar.js +126 -94
  388. package/dist/vue3/lib/message-input/message-input-topbar.js.map +1 -1
  389. package/dist/vue3/lib/message-input/message-input.cjs +1 -1
  390. package/dist/vue3/lib/message-input/message-input.cjs.map +1 -1
  391. package/dist/vue3/lib/message-input/message-input.js +272 -296
  392. package/dist/vue3/lib/message-input/message-input.js.map +1 -1
  393. package/dist/vue3/lib/modal/modal.cjs +1 -2
  394. package/dist/vue3/lib/modal/modal.cjs.map +1 -1
  395. package/dist/vue3/lib/modal/modal.js +64 -79
  396. package/dist/vue3/lib/modal/modal.js.map +1 -1
  397. package/dist/vue3/lib/notice/notice-action.cjs +1 -1
  398. package/dist/vue3/lib/notice/notice-action.cjs.map +1 -1
  399. package/dist/vue3/lib/notice/notice-action.js +38 -39
  400. package/dist/vue3/lib/notice/notice-action.js.map +1 -1
  401. package/dist/vue3/lib/notice/notice.cjs +1 -1
  402. package/dist/vue3/lib/notice/notice.cjs.map +1 -1
  403. package/dist/vue3/lib/notice/notice.js +37 -49
  404. package/dist/vue3/lib/notice/notice.js.map +1 -1
  405. package/dist/vue3/lib/pagination/pagination.cjs +1 -1
  406. package/dist/vue3/lib/pagination/pagination.cjs.map +1 -1
  407. package/dist/vue3/lib/pagination/pagination.js +72 -81
  408. package/dist/vue3/lib/pagination/pagination.js.map +1 -1
  409. package/dist/vue3/lib/popover/popover-header-footer.cjs +1 -1
  410. package/dist/vue3/lib/popover/popover-header-footer.cjs.map +1 -1
  411. package/dist/vue3/lib/popover/popover-header-footer.js +44 -45
  412. package/dist/vue3/lib/popover/popover-header-footer.js.map +1 -1
  413. package/dist/vue3/lib/popover/popover.cjs +1 -1
  414. package/dist/vue3/lib/popover/popover.cjs.map +1 -1
  415. package/dist/vue3/lib/popover/popover.js +26 -37
  416. package/dist/vue3/lib/popover/popover.js.map +1 -1
  417. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +3 -3
  418. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  419. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +187 -181
  420. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  421. package/dist/vue3/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
  422. package/dist/vue3/lib/settings-menu-button/settings-menu-button.js.map +1 -1
  423. package/dist/vue3/lib/time-pill/time-pill.cjs.map +1 -1
  424. package/dist/vue3/lib/time-pill/time-pill.js.map +1 -1
  425. package/dist/vue3/lib/toast/toast.cjs +1 -1
  426. package/dist/vue3/lib/toast/toast.cjs.map +1 -1
  427. package/dist/vue3/lib/toast/toast.js +83 -127
  428. package/dist/vue3/lib/toast/toast.js.map +1 -1
  429. package/dist/vue3/lib/unread-pill/unread-pill.cjs +1 -1
  430. package/dist/vue3/lib/unread-pill/unread-pill.cjs.map +1 -1
  431. package/dist/vue3/lib/unread-pill/unread-pill.js +25 -14
  432. package/dist/vue3/lib/unread-pill/unread-pill.js.map +1 -1
  433. package/dist/vue3/localization/de-DE.cjs +157 -0
  434. package/dist/vue3/localization/de-DE.cjs.map +1 -0
  435. package/dist/vue3/localization/de-DE.js +160 -0
  436. package/dist/vue3/localization/de-DE.js.map +1 -0
  437. package/dist/vue3/localization/en-US.cjs +175 -0
  438. package/dist/vue3/localization/en-US.cjs.map +1 -0
  439. package/dist/vue3/localization/en-US.js +178 -0
  440. package/dist/vue3/localization/en-US.js.map +1 -0
  441. package/dist/vue3/localization/es-LA.cjs +157 -0
  442. package/dist/vue3/localization/es-LA.cjs.map +1 -0
  443. package/dist/vue3/localization/es-LA.js +160 -0
  444. package/dist/vue3/localization/es-LA.js.map +1 -0
  445. package/dist/vue3/localization/fr-FR.cjs +157 -0
  446. package/dist/vue3/localization/fr-FR.cjs.map +1 -0
  447. package/dist/vue3/localization/fr-FR.js +160 -0
  448. package/dist/vue3/localization/fr-FR.js.map +1 -0
  449. package/dist/vue3/localization/index.cjs +2 -0
  450. package/dist/vue3/localization/index.cjs.map +1 -0
  451. package/dist/vue3/localization/index.js +82 -0
  452. package/dist/vue3/localization/index.js.map +1 -0
  453. package/dist/vue3/localization/it-IT.cjs +157 -0
  454. package/dist/vue3/localization/it-IT.cjs.map +1 -0
  455. package/dist/vue3/localization/it-IT.js +160 -0
  456. package/dist/vue3/localization/it-IT.js.map +1 -0
  457. package/dist/vue3/localization/ja-JP.cjs +157 -0
  458. package/dist/vue3/localization/ja-JP.cjs.map +1 -0
  459. package/dist/vue3/localization/ja-JP.js +160 -0
  460. package/dist/vue3/localization/ja-JP.js.map +1 -0
  461. package/dist/vue3/localization/nl-NL.cjs +157 -0
  462. package/dist/vue3/localization/nl-NL.cjs.map +1 -0
  463. package/dist/vue3/localization/nl-NL.js +160 -0
  464. package/dist/vue3/localization/nl-NL.js.map +1 -0
  465. package/dist/vue3/localization/pt-BR.cjs +157 -0
  466. package/dist/vue3/localization/pt-BR.cjs.map +1 -0
  467. package/dist/vue3/localization/pt-BR.js +160 -0
  468. package/dist/vue3/localization/pt-BR.js.map +1 -0
  469. package/dist/vue3/localization/ru-RU.cjs +157 -0
  470. package/dist/vue3/localization/ru-RU.cjs.map +1 -0
  471. package/dist/vue3/localization/ru-RU.js +160 -0
  472. package/dist/vue3/localization/ru-RU.js.map +1 -0
  473. package/dist/vue3/localization/zh-CN.cjs +157 -0
  474. package/dist/vue3/localization/zh-CN.cjs.map +1 -0
  475. package/dist/vue3/localization/zh-CN.js +160 -0
  476. package/dist/vue3/localization/zh-CN.js.map +1 -0
  477. package/dist/vue3/shared/sr_only_close_button.cjs +1 -1
  478. package/dist/vue3/shared/sr_only_close_button.cjs.map +1 -1
  479. package/dist/vue3/shared/sr_only_close_button.js +27 -25
  480. package/dist/vue3/shared/sr_only_close_button.js.map +1 -1
  481. package/dist/vue3/types/common/mixins/index.d.ts +0 -1
  482. package/dist/vue3/types/common/sr_only_close_button.vue.d.ts +8 -15
  483. package/dist/vue3/types/common/sr_only_close_button.vue.d.ts.map +1 -1
  484. package/dist/vue3/types/common/utils/index.d.ts +1 -0
  485. package/dist/vue3/types/common/utils/index.d.ts.map +1 -1
  486. package/dist/vue3/types/components/banner/banner.vue.d.ts +0 -33
  487. package/dist/vue3/types/components/banner/banner.vue.d.ts.map +1 -1
  488. package/dist/vue3/types/components/breadcrumbs/breadcrumbs.vue.d.ts +2 -0
  489. package/dist/vue3/types/components/breadcrumbs/breadcrumbs.vue.d.ts.map +1 -1
  490. package/dist/vue3/types/components/button/button.vue.d.ts +2 -0
  491. package/dist/vue3/types/components/button/button.vue.d.ts.map +1 -1
  492. package/dist/vue3/types/components/chip/chip.vue.d.ts +3 -15
  493. package/dist/vue3/types/components/chip/chip.vue.d.ts.map +1 -1
  494. package/dist/vue3/types/components/combobox/combobox.vue.d.ts.map +1 -1
  495. package/dist/vue3/types/components/combobox/combobox_constants.d.ts +2 -2
  496. package/dist/vue3/types/components/combobox/index.d.ts +1 -1
  497. package/dist/vue3/types/components/datepicker/composables/useCalendar.d.ts.map +1 -1
  498. package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts +5 -1
  499. package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts.map +1 -1
  500. package/dist/vue3/types/components/datepicker/datepicker.vue.d.ts.map +1 -1
  501. package/dist/vue3/types/components/datepicker/datepicker_constants.d.ts +0 -1
  502. package/dist/vue3/types/components/datepicker/datepicker_constants.d.ts.map +1 -1
  503. package/dist/vue3/types/components/datepicker/formatUtils.d.ts +5 -5
  504. package/dist/vue3/types/components/datepicker/formatUtils.d.ts.map +1 -1
  505. package/dist/vue3/types/components/datepicker/modules/calendar.vue.d.ts +0 -4
  506. package/dist/vue3/types/components/datepicker/modules/calendar.vue.d.ts.map +1 -1
  507. package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts +0 -12
  508. package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts.map +1 -1
  509. package/dist/vue3/types/components/datepicker/utils.d.ts +1 -0
  510. package/dist/vue3/types/components/datepicker/utils.d.ts.map +1 -1
  511. package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts +0 -24
  512. package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
  513. package/dist/vue3/types/components/emoji_picker/emoji_picker_constants.d.ts +0 -13
  514. package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
  515. package/dist/vue3/types/components/icon/icon.vue.d.ts +2 -3
  516. package/dist/vue3/types/components/icon/icon_constants.d.ts.map +1 -1
  517. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts +3 -8
  518. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  519. package/dist/vue3/types/components/modal/modal.vue.d.ts +3 -35
  520. package/dist/vue3/types/components/modal/modal.vue.d.ts.map +1 -1
  521. package/dist/vue3/types/components/notice/notice.vue.d.ts +1 -34
  522. package/dist/vue3/types/components/notice/notice.vue.d.ts.map +1 -1
  523. package/dist/vue3/types/components/notice/notice_action.vue.d.ts +7 -35
  524. package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
  525. package/dist/vue3/types/components/pagination/pagination.vue.d.ts +5 -24
  526. package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
  527. package/dist/vue3/types/components/popover/popover.vue.d.ts +0 -33
  528. package/dist/vue3/types/components/popover/popover.vue.d.ts.map +1 -1
  529. package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts +5 -10
  530. package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
  531. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +2 -0
  532. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  533. package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +2 -46
  534. package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
  535. package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts +1 -34
  536. package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
  537. package/dist/vue3/types/components/toast/toast.vue.d.ts +4 -115
  538. package/dist/vue3/types/components/toast/toast.vue.d.ts.map +1 -1
  539. package/dist/vue3/types/index.d.ts +1 -0
  540. package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +3 -11
  541. package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
  542. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +3 -10
  543. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
  544. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +4 -8
  545. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  546. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node_constants.d.ts +7 -7
  547. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node_constants.d.ts.map +1 -1
  548. package/dist/vue3/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
  549. package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -25
  550. package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
  551. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +3 -41
  552. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  553. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +6 -25
  554. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -1
  555. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +2 -2
  556. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +6 -49
  557. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  558. package/dist/vue3/types/recipes/conversation_view/editor/index.d.ts +1 -1
  559. package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +6 -2
  560. package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
  561. package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row_constants.d.ts.map +1 -1
  562. package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +3 -8
  563. package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
  564. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -1
  565. package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +6 -1
  566. package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
  567. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +12 -88
  568. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  569. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +11 -1
  570. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
  571. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +13 -1
  572. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
  573. package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +5 -8
  574. package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
  575. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -18
  576. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  577. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +9 -27
  578. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  579. package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts +11 -21
  580. package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
  581. package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +6 -2
  582. package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  583. package/package.json +4 -4
  584. package/dist/vue2/common/mixins/localization.cjs +0 -2
  585. package/dist/vue2/common/mixins/localization.cjs.map +0 -1
  586. package/dist/vue2/common/mixins/localization.js +0 -10
  587. package/dist/vue2/common/mixins/localization.js.map +0 -1
  588. package/dist/vue2/types/common/mixins/localization.d.ts +0 -8
  589. package/dist/vue2/types/common/mixins/localization.d.ts.map +0 -1
  590. package/dist/vue3/common/mixins/sr-only-close-button.cjs +0 -3
  591. package/dist/vue3/common/mixins/sr-only-close-button.cjs.map +0 -1
  592. package/dist/vue3/common/mixins/sr-only-close-button.js +0 -44
  593. package/dist/vue3/common/mixins/sr-only-close-button.js.map +0 -1
  594. package/dist/vue3/lib/contact-row/contact-row-constants.cjs +0 -2
  595. package/dist/vue3/lib/contact-row/contact-row-constants.cjs.map +0 -1
  596. package/dist/vue3/lib/contact-row/contact-row-constants.js +0 -5
  597. package/dist/vue3/lib/contact-row/contact-row-constants.js.map +0 -1
  598. package/dist/vue3/lib/emoji/emoji-constants.cjs +0 -2
  599. package/dist/vue3/lib/emoji/emoji-constants.cjs.map +0 -1
  600. package/dist/vue3/lib/emoji/emoji-constants.js +0 -5
  601. package/dist/vue3/lib/emoji/emoji-constants.js.map +0 -1
  602. package/dist/vue3/lib/group-row/group-row-constants.cjs +0 -2
  603. package/dist/vue3/lib/group-row/group-row-constants.cjs.map +0 -1
  604. package/dist/vue3/lib/group-row/group-row-constants.js +0 -8
  605. package/dist/vue3/lib/group-row/group-row-constants.js.map +0 -1
  606. package/dist/vue3/lib/time-pill/time-pill-constants.cjs +0 -2
  607. package/dist/vue3/lib/time-pill/time-pill-constants.cjs.map +0 -1
  608. package/dist/vue3/lib/time-pill/time-pill-constants.js +0 -8
  609. package/dist/vue3/lib/time-pill/time-pill-constants.js.map +0 -1
  610. package/dist/vue3/types/common/mixins/sr_only_close_button.d.ts +0 -30
  611. package/dist/vue3/types/common/mixins/sr_only_close_button.d.ts.map +0 -1
  612. package/dist/vue3/types/components/emoji/emoji_constants.d.ts +0 -3
  613. package/dist/vue3/types/components/emoji/emoji_constants.d.ts.map +0 -1
  614. package/dist/vue3/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts +0 -6
  615. package/dist/vue3/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts.map +0 -1
  616. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row_constants.d.ts +0 -3
  617. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row_constants.d.ts.map +0 -1
  618. package/dist/vue3/types/recipes/leftbar/group_row/group_row_constants.d.ts +0 -6
  619. package/dist/vue3/types/recipes/leftbar/group_row/group_row_constants.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"datepicker.js","sources":["../../../components/datepicker/composables/useMonthYearPicker.js","../../../components/datepicker/modules/month-year-picker.vue","../../../components/datepicker/composables/useCalendar.js","../../../components/datepicker/modules/calendar.vue","../../../components/datepicker/datepicker.vue"],"sourcesContent":["import { computed, ref, watch } from 'vue';\nimport { addMonths, getDate, getMonth, getYear, set, subMonths } from 'date-fns';\nimport { formatMonth, getCalendarDays } from '@/components/datepicker/utils.js';\nimport { returnFirstEl } from '@/common/utils';\n\nexport function useMonthYearPicker (props, emits) {\n const selectMonth = ref(getMonth(props.selectedDate));\n const selectYear = ref(getYear(props.selectedDate));\n const highlightedDay = ref(null);\n const focusPicker = ref(0);\n const focusRefs = ref([]);\n\n const calendarDays = computed(() => {\n return getCalendarDays(selectMonth.value, selectYear.value, highlightedDay.value);\n });\n\n const formattedMonth = computed(() => {\n return (month, format, locale) => formatMonth(month, format, locale);\n });\n\n watch(selectMonth, () => {\n highlightDay();\n emits('calendar-days', calendarDays.value);\n }, { immediate: true });\n\n watch(selectYear, () => {\n highlightDay();\n emits('calendar-days', calendarDays.value);\n }, { immediate: true });\n\n function setDayRef (el) {\n if (!focusRefs.value.includes(el)) {\n focusRefs.value.push(el);\n }\n }\n\n function focusMonthYearPicker () {\n returnFirstEl(focusRefs.value[0].$el).focus();\n }\n\n function handleKeyDown (event) {\n switch (event.key) {\n case 'ArrowLeft':\n event.preventDefault();\n if (focusPicker.value === 0) {\n focusPicker.value = 3;\n returnFirstEl(focusRefs.value[focusPicker.value].$el).focus();\n } else {\n focusPicker.value--;\n returnFirstEl(focusRefs.value[focusPicker.value].$el).focus();\n }\n break;\n\n case 'ArrowRight':\n event.preventDefault();\n if (focusPicker.value === 3) {\n focusPicker.value = 0;\n returnFirstEl(focusRefs.value[focusPicker.value].$el).focus();\n } else {\n focusPicker.value++;\n returnFirstEl(focusRefs.value[focusPicker.value].$el).focus();\n }\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n emits('focus-first-day');\n break;\n\n case 'Tab':\n event.preventDefault();\n emits('focus-first-day');\n break;\n\n case 'Escape':\n emits('close-datepicker');\n break;\n }\n }\n\n function highlightDay () {\n const year = getYear(props.selectedDate);\n const month = getMonth(props.selectedDate);\n\n if (year !== selectYear.value || month !== selectMonth.value) {\n highlightedDay.value = null;\n } else {\n highlightedDay.value = getDate(props.selectedDate);\n }\n }\n\n function changeMonth (value) {\n // Adjust year when changing from January to December or vice versa\n if ((selectMonth.value === 0 && value === -1) || (selectMonth.value === 11 && value === 1)) {\n selectYear.value += value;\n }\n\n // Calculate the new date by adding or subtracting months\n const initialDate = set(props.selectedDate, { month: selectMonth.value, year: selectYear.value });\n const newDate = value === 1 ? addMonths(initialDate, 1) : subMonths(initialDate, 1);\n\n // Update the selected month\n selectMonth.value = getMonth(newDate);\n }\n\n function changeYear (value) {\n selectYear.value = selectYear.value + value;\n }\n\n function goToNextMonth () {\n changeMonth(1);\n }\n\n function goToPrevMonth () {\n changeMonth(-1);\n }\n\n return {\n selectMonth,\n selectYear,\n formattedMonth,\n setDayRef,\n focusMonthYearPicker,\n handleKeyDown,\n changeMonth,\n changeYear,\n goToNextMonth,\n goToPrevMonth,\n };\n}\n","<template>\n <dt-stack\n direction=\"row\"\n class=\"d-datepicker__month-year\"\n gap=\"300\"\n >\n <dt-stack\n as=\"nav\"\n direction=\"row\"\n gap=\"200\"\n class=\"d-datepicker__nav\"\n >\n <dt-tooltip\n :message=\"prevYearLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-start', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"prevYearButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${prevYearLabel} ${selectYear - 1}`\"\n @click=\"changeYear(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevrons-left\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :message=\"prevMonthLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-end', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"prevMonthButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"\n `${changeToLabel} ${prevMonthLabel} ${formattedMonth(selectMonth - 1, INTL_MONTH_FORMAT, locale)}`\n \"\n @click=\"changeMonth(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevron-left\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n <div\n id=\"calendar-heading\"\n class=\"d-datepicker__month-year-title\"\n >\n {{ formattedMonth(selectMonth, INTL_MONTH_FORMAT, locale) }}\n\n {{ selectYear }}\n </div>\n <dt-stack\n as=\"nav\"\n direction=\"row\"\n gap=\"200\"\n class=\"d-datepicker__nav\"\n >\n <dt-tooltip\n :message=\"nextMonthLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-start', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"nextMonthButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"\n `${changeToLabel} ${nextMonthLabel} ${formattedMonth(selectMonth + 1, INTL_MONTH_FORMAT, locale)}`\n \"\n @click=\"changeMonth(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevron-right\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :message=\"nextYearLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-end', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"nextYearButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${nextYearLabel} ${selectYear + 1}`\"\n @click=\"changeYear(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevrons-right\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n </dt-stack>\n</template>\n\n<script setup>\nimport { DtIconChevronLeft, DtIconChevronsLeft, DtIconChevronRight, DtIconChevronsRight } from '@dialpad/dialtone-icons/vue3';\nimport { DtStack } from '@/components/stack';\nimport { DtButton } from '@/components/button';\nimport { DtTooltip } from '@/components/tooltip';\nimport { INTL_MONTH_FORMAT } from '../datepicker_constants';\nimport { onMounted } from 'vue';\nimport { useMonthYearPicker } from '@/components/datepicker/composables/useMonthYearPicker.js';\n\nconst props = defineProps({\n locale: {\n type: String,\n required: true,\n },\n\n prevMonthLabel: {\n type: String,\n required: true,\n },\n\n nextMonthLabel: {\n type: String,\n required: true,\n },\n\n prevYearLabel: {\n type: String,\n required: true,\n },\n\n nextYearLabel: {\n type: String,\n required: true,\n },\n\n changeToLabel: {\n type: String,\n required: true,\n },\n\n selectedDate: {\n type: Date,\n required: true,\n },\n});\nconst emits = defineEmits([\n /**\n * Will retrieve the calendar days of the given date\n *\n * @event calendar-days\n * @type {Array}\n */\n 'calendar-days',\n\n /**\n * Will focus first day in calendar\n *\n * @event focus-first-day\n */\n 'focus-first-day',\n\n /**\n * Will focus last day in calendar\n *\n * @event focus-last-day\n */\n 'focus-last-day',\n\n /**\n * Will close the datepicker\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n]);\n\nconst {\n selectMonth,\n selectYear,\n formattedMonth,\n setDayRef,\n focusMonthYearPicker,\n handleKeyDown,\n changeMonth,\n changeYear,\n goToNextMonth,\n goToPrevMonth,\n} = useMonthYearPicker(props, emits);\n\nonMounted(() => {\n focusMonthYearPicker();\n});\n\ndefineExpose({\n focusMonthYearPicker,\n goToNextMonth,\n goToPrevMonth,\n});\n</script>\n","import { computed, ref, watch, nextTick } from 'vue';\nimport { getWeekDayNames, calculateNextFocusDate, calculatePrevFocusDate } from '@/components/datepicker/utils.js';\nimport { MONTH_FORMAT, WEEK_START } from '@/components/datepicker/datepicker_constants.js';\nimport { format, getYear } from 'date-fns';\nimport { returnFirstEl } from '@/common/utils';\n\nexport function useCalendar (props, emits) {\n const selectedDay = ref(null);\n const focusDay = ref(0);\n const daysRef = ref([]);\n\n const weekDays = computed(() => {\n return getWeekDayNames(props.locale, WEEK_START);\n });\n\n watch(() => props.calendarDays, () => {\n focusDay.value = 0;\n daysRef.value = [];\n selectedDay.value = null;\n });\n\n function dayAriaLabel (day) {\n return `${props.selectDayLabel} ${day.text} ${format(day.value, MONTH_FORMAT)} ${getYear(day.value)}`;\n }\n\n function setDayRef (el, day) {\n if (!daysRef.value.some(day => day.el === el) && day.currentMonth) {\n daysRef.value.push({ el, day });\n }\n }\n\n function handleKeyDown (event) {\n switch (event.key) {\n case 'ArrowUp':\n event.preventDefault();\n focusDay.value -= 7;\n try {\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n } catch (error) {\n const prevFocusDate = calculatePrevFocusDate(daysRef.value[focusDay.value + 7].day.value);\n emits('go-to-prev-month');\n\n nextTick(() => {\n returnFirstEl(daysRef.value[prevFocusDate - 1].el.$el).focus();\n focusDay.value += prevFocusDate - 1;\n });\n }\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n focusDay.value += 7;\n try {\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n } catch (error) {\n const nextFocusDate = calculateNextFocusDate(daysRef.value[focusDay.value - 7].day.value);\n emits('go-to-next-month');\n\n nextTick(() => {\n returnFirstEl(daysRef.value[nextFocusDate - 1].el.$el).focus();\n focusDay.value += nextFocusDate - 1;\n });\n }\n break;\n\n case 'ArrowLeft':\n event.preventDefault();\n if (focusDay.value > 0) {\n focusDay.value -= 1;\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n } else {\n // if we are on month first day, jump to last day of prev month\n emits('go-to-prev-month');\n focusLastDay();\n }\n break;\n\n case 'ArrowRight':\n event.preventDefault();\n if (focusDay.value < daysRef.value.length - 1) {\n focusDay.value += 1;\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n } else {\n // if we are on month last day, jump to first day of next month\n emits('go-to-next-month');\n\n focusFirstDay();\n }\n break;\n\n case 'Tab':\n event.preventDefault();\n emits('focus-month-year-picker');\n break;\n\n case 'Escape':\n emits('close-datepicker');\n break;\n }\n }\n\n function focusFirstDay () {\n focusDay.value = 0;\n\n nextTick(() => {\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n });\n }\n\n function focusLastDay () {\n nextTick(() => {\n focusDay.value = daysRef.value.length - 1;\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n });\n }\n\n function selectDay (day) {\n if (!day.currentMonth) { return; }\n\n // local selectedDay is updated when a day is selected\n selectedDay.value = day.text;\n emits('select-date', day.value);\n }\n\n return {\n selectedDay,\n weekDays,\n dayAriaLabel,\n setDayRef,\n handleKeyDown,\n focusFirstDay,\n selectDay,\n };\n}\n","<!-- eslint-disable vue/multi-word-component-names -->\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=\"el => { if (el) setDayRef(el, day) }\"\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 setup>\nimport { useCalendar } from '@/components/datepicker/composables/useCalendar.js';\nimport { DtButton } from '@/components/button';\n\nconst props = defineProps({\n calendarDays: {\n type: Array,\n required: true,\n },\n\n locale: {\n type: String,\n required: true,\n },\n\n selectDayLabel: {\n type: String,\n required: true,\n },\n});\n\nconst emits = defineEmits([\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 * Will go to the next month\n *\n * @event go-to-next-month\n */\n 'go-to-next-month',\n\n /**\n * Will go to the previous month\n *\n * @event go-to-prev-month\n */\n 'go-to-prev-month',\n]);\n\nconst {\n selectedDay,\n weekDays,\n dayAriaLabel,\n setDayRef,\n handleKeyDown,\n focusFirstDay,\n selectDay,\n} = useCalendar(props, emits);\n\ndefineExpose({\n focusFirstDay,\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 :locale=\"locale\"\n :prev-month-label=\"prevMonthLabel\"\n :next-month-label=\"nextMonthLabel\"\n :prev-year-label=\"prevYearLabel\"\n :next-year-label=\"nextYearLabel\"\n :change-to-label=\"changeToLabel\"\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 :locale=\"locale\"\n :calendar-days=\"calendarDays\"\n :select-day-label=\"selectDayLabel\"\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 setup>\nimport { returnFirstEl, warnIfUnmounted } from '@/common/utils';\nimport MonthYearPicker from './modules/month-year-picker.vue';\nimport Calendar from './modules/calendar.vue';\nimport { DtStack } from '@/components/stack';\n\nimport { onMounted, ref, getCurrentInstance } from 'vue';\n\ndefineProps({\n /**\n * Label for the previous month button\n *\n * @type {String}\n * @example 'Previous month'\n */\n prevMonthLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Label for the next month button\n *\n * @type {String}\n * @example 'Next month'\n */\n nextMonthLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Label for the previous year button\n *\n * @type {String}\n * @example 'Previous year'\n */\n prevYearLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Label for the next year button\n *\n * @type {String}\n * @example 'Next year'\n */\n nextYearLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Label for the select day button\n *\n * @type {String}\n * @example 'Select day'\n */\n selectDayLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Label for the change to button\n *\n * @type {String}\n * @example 'Change to'\n */\n changeToLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Locale for the calendar\n *\n * @type {String}\n */\n locale: {\n type: String,\n default: 'en-US',\n },\n\n /**\n * Selected date\n *\n * @type {Date}\n */\n selectedDate: {\n type: Date,\n default: () => (new Date()),\n },\n});\n\ndefineEmits([\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\nconst calendarDays = ref([]);\n\nfunction updateCalendarDays (days) {\n calendarDays.value = days;\n}\n\nonMounted(() => {\n const instance = getCurrentInstance();\n warnIfUnmounted(returnFirstEl(instance.proxy.$el), 'datepicker');\n});\n</script>\n"],"names":["useMonthYearPicker","props","emits","selectMonth","ref","getMonth","selectYear","getYear","highlightedDay","focusPicker","focusRefs","calendarDays","computed","getCalendarDays","formattedMonth","month","format","locale","formatMonth","watch","highlightDay","setDayRef","el","focusMonthYearPicker","returnFirstEl","handleKeyDown","event","year","getDate","changeMonth","value","initialDate","set","newDate","addMonths","subMonths","changeYear","goToNextMonth","goToPrevMonth","__props","__emit","onMounted","__expose","useCalendar","selectedDay","focusDay","daysRef","weekDays","getWeekDayNames","WEEK_START","dayAriaLabel","day","MONTH_FORMAT","prevFocusDate","calculatePrevFocusDate","nextTick","nextFocusDate","calculateNextFocusDate","focusLastDay","focusFirstDay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A,MACA,cAAAG;AAAA,MACA,WAAA7B;AAAA,MACA,eAAAI;AAAA,MACA,eAAAkC;AAAA,MACA,WAAAC;AAAA,IACF,IAAIjB,GAAY1C,GAAOC,CAAK;AAE5B,WAAAwC,EAAa;AAAA,MACX,eAAAiB;AAAA,IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACmBD,UAAMhD,IAAeP,EAAI,CAAA,CAAE;AAE3B,aAASyD,EAAoBC,GAAM;AACjC,MAAAnD,EAAa,QAAQmD;AAAA,IACvB;AAEA,WAAArB,EAAU,MAAM;AACd,YAAMsB,IAAWC;AACjB,MAAAC,EAAgBzC,EAAcuC,EAAS,MAAM,GAAG,GAAG,YAAY;AAAA,IACjE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"datepicker.js","sources":["../../../components/datepicker/composables/useMonthYearPicker.js","../../../components/datepicker/modules/month-year-picker.vue","../../../components/datepicker/composables/useCalendar.js","../../../components/datepicker/modules/calendar.vue","../../../components/datepicker/datepicker.vue"],"sourcesContent":["import { computed, ref, watch } from 'vue';\nimport { addMonths, getDate, getMonth, getYear, set, subMonths } from 'date-fns';\nimport { formatMonth, getCalendarDays } from '../utils.js';\nimport { INTL_MONTH_FORMAT } from '../datepicker_constants';\nimport { returnFirstEl } from '@/common/utils';\nimport { DialtoneLocalization } from '@/localization';\n\nexport function useMonthYearPicker (props, emits) {\n const selectMonth = ref(getMonth(props.selectedDate));\n const selectYear = ref(getYear(props.selectedDate));\n const highlightedDay = ref(null);\n const focusPicker = ref(0);\n const focusRefs = ref([]);\n const i18n = new DialtoneLocalization();\n\n const calendarDays = computed(() => {\n return getCalendarDays(selectMonth.value, selectYear.value, highlightedDay.value);\n });\n\n watch(selectMonth, () => {\n highlightDay();\n emits('calendar-days', calendarDays.value);\n }, { immediate: true });\n\n watch(selectYear, () => {\n highlightDay();\n emits('calendar-days', calendarDays.value);\n }, { immediate: true });\n\n function formattedMonth (month) {\n return formatMonth(month, INTL_MONTH_FORMAT, i18n.currentLocale);\n }\n\n function setDayRef (el) {\n if (!focusRefs.value.includes(el)) {\n focusRefs.value.push(el);\n }\n }\n\n function focusMonthYearPicker () {\n returnFirstEl(focusRefs.value[0].$el).focus();\n }\n\n function handleKeyDown (event) {\n switch (event.key) {\n case 'ArrowLeft':\n event.preventDefault();\n if (focusPicker.value === 0) {\n focusPicker.value = 3;\n returnFirstEl(focusRefs.value[focusPicker.value].$el).focus();\n } else {\n focusPicker.value--;\n returnFirstEl(focusRefs.value[focusPicker.value].$el).focus();\n }\n break;\n\n case 'ArrowRight':\n event.preventDefault();\n if (focusPicker.value === 3) {\n focusPicker.value = 0;\n returnFirstEl(focusRefs.value[focusPicker.value].$el).focus();\n } else {\n focusPicker.value++;\n returnFirstEl(focusRefs.value[focusPicker.value].$el).focus();\n }\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n emits('focus-first-day');\n break;\n\n case 'Tab':\n event.preventDefault();\n emits('focus-first-day');\n break;\n\n case 'Escape':\n emits('close-datepicker');\n break;\n }\n }\n\n function highlightDay () {\n const year = getYear(props.selectedDate);\n const month = getMonth(props.selectedDate);\n\n if (year !== selectYear.value || month !== selectMonth.value) {\n highlightedDay.value = null;\n } else {\n highlightedDay.value = getDate(props.selectedDate);\n }\n }\n\n function changeMonth (value) {\n // Adjust year when changing from January to December or vice versa\n if ((selectMonth.value === 0 && value === -1) || (selectMonth.value === 11 && value === 1)) {\n selectYear.value += value;\n }\n\n // Calculate the new date by adding or subtracting months\n const initialDate = set(props.selectedDate, { month: selectMonth.value, year: selectYear.value });\n const newDate = value === 1 ? addMonths(initialDate, 1) : subMonths(initialDate, 1);\n\n // Update the selected month\n selectMonth.value = getMonth(newDate);\n }\n\n function changeYear (value) {\n selectYear.value = selectYear.value + value;\n }\n\n function goToNextMonth () {\n changeMonth(1);\n }\n\n function goToPrevMonth () {\n changeMonth(-1);\n }\n\n function previousYearAriaLabel () {\n return `${i18n.$t('DIALTONE_DATEPICKER_CHANGE_TO')} ${i18n.$t('DIALTONE_DATEPICKER_PREVIOUS_YEAR')} ${selectYear.value - 1}`;\n }\n\n function previousMonthAriaLabel () {\n return `${i18n.$t('DIALTONE_DATEPICKER_CHANGE_TO')} ${i18n.$t('DIALTONE_DATEPICKER_PREVIOUS_MONTH')} ${formattedMonth(selectMonth.value - 1)}`;\n }\n\n function nextYearAriaLabel () {\n return `${i18n.$t('DIALTONE_DATEPICKER_CHANGE_TO')} ${i18n.$t('DIALTONE_DATEPICKER_NEXT_YEAR')} ${selectYear.value + 1}`;\n }\n\n function nextMonthAriaLabel () {\n return `${i18n.$t('DIALTONE_DATEPICKER_CHANGE_TO')} ${i18n.$t('DIALTONE_DATEPICKER_NEXT_MONTH')} ${formattedMonth(selectMonth.value + 1)}`;\n }\n\n return {\n selectMonth,\n selectYear,\n formattedMonth,\n setDayRef,\n focusMonthYearPicker,\n handleKeyDown,\n changeMonth,\n changeYear,\n goToNextMonth,\n goToPrevMonth,\n previousYearAriaLabel,\n previousMonthAriaLabel,\n nextYearAriaLabel,\n nextMonthAriaLabel,\n };\n}\n","<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=\"el => { if (el) setDayRef(el) }\"\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=\"el => { if (el) setDayRef(el) }\"\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=\"el => { if (el) setDayRef(el) }\"\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=\"el => { if (el) setDayRef(el) }\"\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 setup>\nimport {\n DtIconChevronLeft,\n DtIconChevronsLeft,\n DtIconChevronRight,\n DtIconChevronsRight,\n} from '@dialpad/dialtone-icons/vue3';\nimport { DtStack } from '@/components/stack';\nimport { DtButton } from '@/components/button';\nimport { DtTooltip } from '@/components/tooltip';\nimport { onMounted } from 'vue';\nimport { useMonthYearPicker } from '../composables/useMonthYearPicker.js';\nimport { DialtoneLocalization } from '@/localization';\n\nconst props = defineProps({\n selectedDate: {\n type: Date,\n required: true,\n },\n});\n\nconst emits = defineEmits([\n /**\n * Will retrieve the calendar days of the given date\n *\n * @event calendar-days\n * @type {Array}\n */\n 'calendar-days',\n\n /**\n * Will focus first day in calendar\n *\n * @event focus-first-day\n */\n 'focus-first-day',\n\n /**\n * Will focus last day in calendar\n *\n * @event focus-last-day\n */\n 'focus-last-day',\n\n /**\n * Will close the datepicker\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n]);\n\nconst i18n = new DialtoneLocalization();\n\nconst {\n selectMonth,\n selectYear,\n formattedMonth,\n setDayRef,\n focusMonthYearPicker,\n handleKeyDown,\n changeMonth,\n changeYear,\n goToNextMonth,\n goToPrevMonth,\n previousYearAriaLabel,\n previousMonthAriaLabel,\n nextMonthAriaLabel,\n nextYearAriaLabel,\n} = useMonthYearPicker(props, emits);\n\nonMounted(() => {\n focusMonthYearPicker();\n});\n\ndefineExpose({\n focusMonthYearPicker,\n goToNextMonth,\n goToPrevMonth,\n});\n</script>\n","import { computed, ref, watch, nextTick } from 'vue';\nimport { getWeekDayNames, calculateNextFocusDate, calculatePrevFocusDate, formatDate } from '../utils.js';\nimport { INTL_MONTH_FORMAT, WEEK_START } from '../datepicker_constants.js';\nimport { returnFirstEl } from '@/common/utils';\nimport { DialtoneLocalization } from '@/localization';\n\nexport function useCalendar (props, emits) {\n const selectedDay = ref(null);\n const focusDay = ref(0);\n const daysRef = ref([]);\n const i18n = new DialtoneLocalization();\n\n const weekDays = computed(() => {\n return getWeekDayNames(props.locale, WEEK_START);\n });\n\n watch(() => props.calendarDays, () => {\n focusDay.value = 0;\n daysRef.value = [];\n selectedDay.value = null;\n });\n\n function dayAriaLabel (day) {\n return i18n.$t('DIALTONE_DATEPICKER_SELECT_DAY') + ` ${formatDate(day.value, INTL_MONTH_FORMAT, i18n.currentLocale)}`;\n }\n\n function setDayRef (el, day) {\n if (!daysRef.value.some(day => day.el === el) && day.currentMonth) {\n daysRef.value.push({ el, day });\n }\n }\n\n function handleKeyDown (event) {\n switch (event.key) {\n case 'ArrowUp':\n event.preventDefault();\n focusDay.value -= 7;\n try {\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n } catch (error) {\n const prevFocusDate = calculatePrevFocusDate(daysRef.value[focusDay.value + 7].day.value);\n emits('go-to-prev-month');\n\n nextTick(() => {\n returnFirstEl(daysRef.value[prevFocusDate - 1].el.$el).focus();\n focusDay.value += prevFocusDate - 1;\n });\n }\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n focusDay.value += 7;\n try {\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n } catch (error) {\n const nextFocusDate = calculateNextFocusDate(daysRef.value[focusDay.value - 7].day.value);\n emits('go-to-next-month');\n\n nextTick(() => {\n returnFirstEl(daysRef.value[nextFocusDate - 1].el.$el).focus();\n focusDay.value += nextFocusDate - 1;\n });\n }\n break;\n\n case 'ArrowLeft':\n event.preventDefault();\n if (focusDay.value > 0) {\n focusDay.value -= 1;\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n } else {\n // if we are on month first day, jump to last day of prev month\n emits('go-to-prev-month');\n focusLastDay();\n }\n break;\n\n case 'ArrowRight':\n event.preventDefault();\n if (focusDay.value < daysRef.value.length - 1) {\n focusDay.value += 1;\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n } else {\n // if we are on month last day, jump to first day of next month\n emits('go-to-next-month');\n\n focusFirstDay();\n }\n break;\n\n case 'Tab':\n event.preventDefault();\n emits('focus-month-year-picker');\n break;\n\n case 'Escape':\n emits('close-datepicker');\n break;\n }\n }\n\n function focusFirstDay () {\n focusDay.value = 0;\n\n nextTick(() => {\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n });\n }\n\n function focusLastDay () {\n nextTick(() => {\n focusDay.value = daysRef.value.length - 1;\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n });\n }\n\n function selectDay (day) {\n if (!day.currentMonth) { return; }\n\n // local selectedDay is updated when a day is selected\n selectedDay.value = day.text;\n emits('select-date', day.value);\n }\n\n return {\n selectedDay,\n weekDays,\n dayAriaLabel,\n setDayRef,\n handleKeyDown,\n focusFirstDay,\n selectDay,\n };\n}\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=\"el => { if (el) setDayRef(el, day) }\"\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 setup>\nimport { useCalendar } from '../composables/useCalendar.js';\nimport { DtButton } from '@/components/button';\n\nconst props = defineProps({\n calendarDays: {\n type: Array,\n required: true,\n },\n});\n\nconst emits = defineEmits([\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 * Will go to the next month\n *\n * @event go-to-next-month\n */\n 'go-to-next-month',\n\n /**\n * Will go to the previous month\n *\n * @event go-to-prev-month\n */\n 'go-to-prev-month',\n]);\n\nconst {\n selectedDay,\n weekDays,\n dayAriaLabel,\n setDayRef,\n handleKeyDown,\n focusFirstDay,\n selectDay,\n} = useCalendar(props, emits);\n\ndefineExpose({\n focusFirstDay,\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 setup>\nimport MonthYearPicker from './modules/month-year-picker.vue';\nimport Calendar from './modules/calendar.vue';\nimport { DtStack } from '@/components/stack';\nimport { returnFirstEl, warnIfUnmounted } from '@/common/utils';\nimport { onMounted, ref, getCurrentInstance } from 'vue';\n\ndefineProps({\n /**\n * Selected date\n *\n * @type {Date}\n */\n selectedDate: {\n type: Date,\n default: () => (new Date()),\n },\n});\n\ndefineEmits([\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\nconst calendarDays = ref([]);\n\nfunction updateCalendarDays (days) {\n calendarDays.value = days;\n}\n\nonMounted(() => {\n const instance = getCurrentInstance();\n warnIfUnmounted(returnFirstEl(instance.proxy.$el), 'datepicker');\n});\n</script>\n"],"names":["useMonthYearPicker","props","emits","selectMonth","ref","getMonth","selectYear","getYear","highlightedDay","focusPicker","focusRefs","i18n","DialtoneLocalization","calendarDays","computed","getCalendarDays","watch","highlightDay","formattedMonth","month","formatMonth","INTL_MONTH_FORMAT","setDayRef","el","focusMonthYearPicker","returnFirstEl","handleKeyDown","event","year","getDate","changeMonth","value","initialDate","set","newDate","addMonths","subMonths","changeYear","goToNextMonth","goToPrevMonth","previousYearAriaLabel","previousMonthAriaLabel","nextYearAriaLabel","nextMonthAriaLabel","__props","__emit","onMounted","__expose","useCalendar","selectedDay","focusDay","daysRef","weekDays","getWeekDayNames","WEEK_START","dayAriaLabel","day","formatDate","prevFocusDate","calculatePrevFocusDate","nextTick","nextFocusDate","calculateNextFocusDate","focusLastDay","focusFirstDay","selectDay","updateCalendarDays","days","instance","getCurrentInstance","warnIfUnmounted"],"mappings":";;;;;;;;;;AAOO,SAASA,GAAoBC,GAAOC,GAAO;AAChD,QAAMC,IAAcC,EAAIC,EAASJ,EAAM,YAAY,CAAC,GAC9CK,IAAaF,EAAIG,EAAQN,EAAM,YAAY,CAAC,GAC5CO,IAAiBJ,EAAI,IAAI,GACzBK,IAAcL,EAAI,CAAC,GACnBM,IAAYN,EAAI,CAAA,CAAE,GAClBO,IAAO,IAAIC,KAEXC,IAAeC,EAAS,MACrBC,GAAgBZ,EAAY,OAAOG,EAAW,OAAOE,EAAe,KAAK,CACjF;AAED,EAAAQ,EAAMb,GAAa,MAAM;AACvB,IAAAc,KACAf,EAAM,iBAAiBW,EAAa,KAAK;AAAA,EAC7C,GAAK,EAAE,WAAW,GAAI,CAAE,GAEtBG,EAAMV,GAAY,MAAM;AACtB,IAAAW,KACAf,EAAM,iBAAiBW,EAAa,KAAK;AAAA,EAC7C,GAAK,EAAE,WAAW,GAAI,CAAE;AAEtB,WAASK,EAAgBC,GAAO;AAC9B,WAAOC,GAAYD,GAAOE,GAAmBV,EAAK,aAAa;AAAA,EAChE;AAED,WAASW,EAAWC,GAAI;AACtB,IAAKb,EAAU,MAAM,SAASa,CAAE,KAC9Bb,EAAU,MAAM,KAAKa,CAAE;AAAA,EAE1B;AAED,WAASC,IAAwB;AAC/B,IAAAC,EAAcf,EAAU,MAAM,CAAC,EAAE,GAAG,EAAE;EACvC;AAED,WAASgB,EAAeC,GAAO;AAC7B,YAAQA,EAAM,KAAG;AAAA,MACf,KAAK;AACH,QAAAA,EAAM,eAAc,GAChBlB,EAAY,UAAU,KACxBA,EAAY,QAAQ,GACpBgB,EAAcf,EAAU,MAAMD,EAAY,KAAK,EAAE,GAAG,EAAE,YAEtDA,EAAY,SACZgB,EAAcf,EAAU,MAAMD,EAAY,KAAK,EAAE,GAAG,EAAE;AAExD;AAAA,MAEF,KAA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EAAS,MAAM,GAAG,GAAG,YAAY;AAAA,IACjE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function a(t,e="default"){return new Intl.DateTimeFormat(e,{weekday:"long",year:"numeric",month:"long",day:"numeric"}).format(t)}function n(t,e="default"){return new Intl.DateTimeFormat(e,{year:"numeric",month:"long",day:"numeric"}).format(t)}function m(t,e="default",r=!0){const o=r?{weekday:"short",year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"short",day:"numeric"};return new Intl.DateTimeFormat(e,o).format(t)}function u(t,e="default",r=!1){const o=r?"short":"long";return new Intl.DateTimeFormat(e,{month:o,day:"numeric"}).format(t)}function i(t,e="default"){return new Intl.DateTimeFormat(e,{year:"2-digit",month:"2-digit",day:"2-digit"}).format(t)}const f={formatLong:a,formatMedium:n,formatShort:m,formatNoYear:u,formatNumerical:i};exports.default=f;exports.formatLong=a;exports.formatMedium=n;exports.formatNoYear=u;exports.formatNumerical=i;exports.formatShort=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../localization/index.cjs");function n(e,t=null){return new Intl.DateTimeFormat(t||o.DialtoneLocalization.getPreferredLocale(),{weekday:"long",year:"numeric",month:"long",day:"numeric"}).format(e)}function i(e,t=null){return new Intl.DateTimeFormat(t||o.DialtoneLocalization.getPreferredLocale(),{year:"numeric",month:"long",day:"numeric"}).format(e)}function m(e,t=null,r=!0){const a=r?{weekday:"short",year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"short",day:"numeric"};return new Intl.DateTimeFormat(t||o.DialtoneLocalization.getPreferredLocale(),a).format(e)}function l(e,t=null,r=!1){const a=r?"short":"long";return new Intl.DateTimeFormat(t||o.DialtoneLocalization.getPreferredLocale(),{month:a,day:"numeric"}).format(e)}function u(e,t=null){return new Intl.DateTimeFormat(t||o.DialtoneLocalization.getPreferredLocale(),{year:"2-digit",month:"2-digit",day:"2-digit"}).format(e)}const c={formatLong:n,formatMedium:i,formatShort:m,formatNoYear:l,formatNumerical:u};exports.default=c;exports.formatLong=n;exports.formatMedium=i;exports.formatNoYear=l;exports.formatNumerical=u;exports.formatShort=m;
2
2
  //# sourceMappingURL=formatUtils.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatUtils.cjs","sources":["../../../components/datepicker/formatUtils.js"],"sourcesContent":["export function formatLong (date, locale = 'default') {\n return new Intl.DateTimeFormat(locale, { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }).format(date);\n}\n\nexport function formatMedium (date, locale = 'default') {\n return new Intl.DateTimeFormat(locale, { year: 'numeric', month: 'long', day: 'numeric' }).format(date);\n}\n\nexport function formatShort (date, locale = 'default', showWeekday = true) {\n const options = showWeekday ? { weekday: 'short', year: 'numeric', month: 'short', day: 'numeric' } : { year: 'numeric', month: 'short', day: 'numeric' };\n return new Intl.DateTimeFormat(locale, options).format(date);\n}\n\nexport function formatNoYear (date, locale = 'default', abbreviated = false) {\n const monthFormat = abbreviated ? 'short' : 'long';\n return new Intl.DateTimeFormat(locale, { month: monthFormat, day: 'numeric' }).format(date);\n}\n\nexport function formatNumerical (date, locale = 'default') {\n return new Intl.DateTimeFormat(locale, { year: '2-digit', month: '2-digit', day: '2-digit' }).format(date);\n}\n\nexport default {\n formatLong,\n formatMedium,\n formatShort,\n formatNoYear,\n formatNumerical,\n};\n"],"names":["formatLong","date","locale","formatMedium","formatShort","showWeekday","options","formatNoYear","abbreviated","monthFormat","formatNumerical","formatUtils"],"mappings":"4GAAO,SAASA,EAAYC,EAAMC,EAAS,UAAW,CACpD,OAAO,IAAI,KAAK,eAAeA,EAAQ,CAAE,QAAS,OAAQ,KAAM,UAAW,MAAO,OAAQ,IAAK,SAAW,CAAA,EAAE,OAAOD,CAAI,CACzH,CAEO,SAASE,EAAcF,EAAMC,EAAS,UAAW,CACtD,OAAO,IAAI,KAAK,eAAeA,EAAQ,CAAE,KAAM,UAAW,MAAO,OAAQ,IAAK,SAAS,CAAE,EAAE,OAAOD,CAAI,CACxG,CAEO,SAASG,EAAaH,EAAMC,EAAS,UAAWG,EAAc,GAAM,CACzE,MAAMC,EAAUD,EAAc,CAAE,QAAS,QAAS,KAAM,UAAW,MAAO,QAAS,IAAK,SAAW,EAAG,CAAE,KAAM,UAAW,MAAO,QAAS,IAAK,WAC9I,OAAO,IAAI,KAAK,eAAeH,EAAQI,CAAO,EAAE,OAAOL,CAAI,CAC7D,CAEO,SAASM,EAAcN,EAAMC,EAAS,UAAWM,EAAc,GAAO,CAC3E,MAAMC,EAAcD,EAAc,QAAU,OAC5C,OAAO,IAAI,KAAK,eAAeN,EAAQ,CAAE,MAAOO,EAAa,IAAK,SAAW,CAAA,EAAE,OAAOR,CAAI,CAC5F,CAEO,SAASS,EAAiBT,EAAMC,EAAS,UAAW,CACzD,OAAO,IAAI,KAAK,eAAeA,EAAQ,CAAE,KAAM,UAAW,MAAO,UAAW,IAAK,SAAS,CAAE,EAAE,OAAOD,CAAI,CAC3G,CAEA,MAAeU,EAAA,CACb,WAAAX,EACA,aAAAG,EACA,YAAAC,EACA,aAAAG,EACA,gBAAAG,CACF"}
1
+ {"version":3,"file":"formatUtils.cjs","sources":["../../../components/datepicker/formatUtils.js"],"sourcesContent":["import { DialtoneLocalization } from '@/localization';\n\n/**\n * Formats a date into a long format using the specified locale.\n *\n * @param {Date} date - The date to format.\n * @param {string} [locale='default'] - The locale to use for formatting. Defaults to 'default'.\n * @returns {string} The formatted date string.\n */\nexport function formatLong (date, locale = null) {\n return new Intl.DateTimeFormat(locale || DialtoneLocalization.getPreferredLocale(), { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }).format(date);\n}\n\n/**\n * Formats the given date in medium format.\n *\n * @param {Date} date - The date to be formatted.\n * @param {string} [locale='default'] - The locale to be used for formatting. Defaults to 'default'.\n * @returns {string} The formatted date string in medium format.\n */\nexport function formatMedium (date, locale = null) {\n return new Intl.DateTimeFormat(locale || DialtoneLocalization.getPreferredLocale(), { year: 'numeric', month: 'long', day: 'numeric' }).format(date);\n}\n\n/**\n * Formats a date into a short string representation.\n * @param {Date} date - The date to format.\n * @param {string} [locale='default'] - The locale to use for formatting. Defaults to 'default'.\n * @param {boolean} [showWeekday=true] - Whether to include the weekday in the formatted string. Defaults to true.\n * @returns {string} The formatted date string.\n */\nexport function formatShort (date, locale = null, showWeekday = true) {\n const options = showWeekday ? { weekday: 'short', year: 'numeric', month: 'short', day: 'numeric' } : { year: 'numeric', month: 'short', day: 'numeric' };\n return new Intl.DateTimeFormat(locale || DialtoneLocalization.getPreferredLocale(), options).format(date);\n}\n\n/**\n * Formats a date without the year.\n *\n * @param {Date} date - The date to format.\n * @param {string} [locale='default'] - The locale to use for formatting. Defaults to 'default'.\n * @param {boolean} [abbreviated=false] - Whether to use abbreviated month names. Defaults to false.\n * @returns {string} The formatted date without the year.\n */\nexport function formatNoYear (date, locale = null, abbreviated = false) {\n const monthFormat = abbreviated ? 'short' : 'long';\n return new Intl.DateTimeFormat(locale || DialtoneLocalization.getPreferredLocale(), { month: monthFormat, day: 'numeric' }).format(date);\n}\n\n/**\n * Formats a date into a numerical string representation.\n *\n * @param {Date} date - The date to format.\n * @param {string} [locale='default'] - The locale to use for formatting. Defaults to 'default'.\n * @returns {string} The formatted numerical date string.\n */\nexport function formatNumerical (date, locale = null) {\n return new Intl.DateTimeFormat(locale || DialtoneLocalization.getPreferredLocale(), { year: '2-digit', month: '2-digit', day: '2-digit' }).format(date);\n}\n\nexport default {\n formatLong,\n formatMedium,\n formatShort,\n formatNoYear,\n formatNumerical,\n};\n"],"names":["formatLong","date","locale","DialtoneLocalization","formatMedium","formatShort","showWeekday","options","formatNoYear","abbreviated","monthFormat","formatNumerical","formatUtils"],"mappings":"4JASO,SAASA,EAAYC,EAAMC,EAAS,KAAM,CAC/C,OAAO,IAAI,KAAK,eAAeA,GAAUC,EAAoB,qBAAC,mBAAoB,EAAE,CAAE,QAAS,OAAQ,KAAM,UAAW,MAAO,OAAQ,IAAK,SAAS,CAAE,EAAE,OAAOF,CAAI,CACtK,CASO,SAASG,EAAcH,EAAMC,EAAS,KAAM,CACjD,OAAO,IAAI,KAAK,eAAeA,GAAUC,EAAAA,qBAAqB,mBAAoB,EAAE,CAAE,KAAM,UAAW,MAAO,OAAQ,IAAK,SAAW,CAAA,EAAE,OAAOF,CAAI,CACrJ,CASO,SAASI,EAAaJ,EAAMC,EAAS,KAAMI,EAAc,GAAM,CACpE,MAAMC,EAAUD,EAAc,CAAE,QAAS,QAAS,KAAM,UAAW,MAAO,QAAS,IAAK,SAAW,EAAG,CAAE,KAAM,UAAW,MAAO,QAAS,IAAK,WAC9I,OAAO,IAAI,KAAK,eAAeJ,GAAUC,EAAoB,qBAAC,mBAAoB,EAAEI,CAAO,EAAE,OAAON,CAAI,CAC1G,CAUO,SAASO,EAAcP,EAAMC,EAAS,KAAMO,EAAc,GAAO,CACtE,MAAMC,EAAcD,EAAc,QAAU,OAC5C,OAAO,IAAI,KAAK,eAAeP,GAAUC,EAAoB,qBAAC,mBAAkB,EAAI,CAAE,MAAOO,EAAa,IAAK,SAAS,CAAE,EAAE,OAAOT,CAAI,CACzI,CASO,SAASU,EAAiBV,EAAMC,EAAS,KAAM,CACpD,OAAO,IAAI,KAAK,eAAeA,GAAUC,EAAAA,qBAAqB,mBAAoB,EAAE,CAAE,KAAM,UAAW,MAAO,UAAW,IAAK,SAAW,CAAA,EAAE,OAAOF,CAAI,CACxJ,CAEA,MAAeW,EAAA,CACb,WAAAZ,EACA,aAAAI,EACA,YAAAC,EACA,aAAAG,EACA,gBAAAG,CACF"}
@@ -1,33 +1,34 @@
1
- function o(t, e = "default") {
2
- return new Intl.DateTimeFormat(e, { weekday: "long", year: "numeric", month: "long", day: "numeric" }).format(t);
1
+ import { DialtoneLocalization as r } from "../../localization/index.js";
2
+ function a(e, t = null) {
3
+ return new Intl.DateTimeFormat(t || r.getPreferredLocale(), { weekday: "long", year: "numeric", month: "long", day: "numeric" }).format(e);
3
4
  }
4
- function a(t, e = "default") {
5
- return new Intl.DateTimeFormat(e, { year: "numeric", month: "long", day: "numeric" }).format(t);
5
+ function m(e, t = null) {
6
+ return new Intl.DateTimeFormat(t || r.getPreferredLocale(), { year: "numeric", month: "long", day: "numeric" }).format(e);
6
7
  }
7
- function m(t, e = "default", n = !0) {
8
- const r = n ? { weekday: "short", year: "numeric", month: "short", day: "numeric" } : { year: "numeric", month: "short", day: "numeric" };
9
- return new Intl.DateTimeFormat(e, r).format(t);
8
+ function i(e, t = null, n = !0) {
9
+ const o = n ? { weekday: "short", year: "numeric", month: "short", day: "numeric" } : { year: "numeric", month: "short", day: "numeric" };
10
+ return new Intl.DateTimeFormat(t || r.getPreferredLocale(), o).format(e);
10
11
  }
11
- function i(t, e = "default", n = !1) {
12
- const r = n ? "short" : "long";
13
- return new Intl.DateTimeFormat(e, { month: r, day: "numeric" }).format(t);
12
+ function l(e, t = null, n = !1) {
13
+ const o = n ? "short" : "long";
14
+ return new Intl.DateTimeFormat(t || r.getPreferredLocale(), { month: o, day: "numeric" }).format(e);
14
15
  }
15
- function u(t, e = "default") {
16
- return new Intl.DateTimeFormat(e, { year: "2-digit", month: "2-digit", day: "2-digit" }).format(t);
16
+ function u(e, t = null) {
17
+ return new Intl.DateTimeFormat(t || r.getPreferredLocale(), { year: "2-digit", month: "2-digit", day: "2-digit" }).format(e);
17
18
  }
18
19
  const f = {
19
- formatLong: o,
20
- formatMedium: a,
21
- formatShort: m,
22
- formatNoYear: i,
20
+ formatLong: a,
21
+ formatMedium: m,
22
+ formatShort: i,
23
+ formatNoYear: l,
23
24
  formatNumerical: u
24
25
  };
25
26
  export {
26
27
  f as default,
27
- o as formatLong,
28
- a as formatMedium,
29
- i as formatNoYear,
28
+ a as formatLong,
29
+ m as formatMedium,
30
+ l as formatNoYear,
30
31
  u as formatNumerical,
31
- m as formatShort
32
+ i as formatShort
32
33
  };
33
34
  //# sourceMappingURL=formatUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatUtils.js","sources":["../../../components/datepicker/formatUtils.js"],"sourcesContent":["export function formatLong (date, locale = 'default') {\n return new Intl.DateTimeFormat(locale, { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }).format(date);\n}\n\nexport function formatMedium (date, locale = 'default') {\n return new Intl.DateTimeFormat(locale, { year: 'numeric', month: 'long', day: 'numeric' }).format(date);\n}\n\nexport function formatShort (date, locale = 'default', showWeekday = true) {\n const options = showWeekday ? { weekday: 'short', year: 'numeric', month: 'short', day: 'numeric' } : { year: 'numeric', month: 'short', day: 'numeric' };\n return new Intl.DateTimeFormat(locale, options).format(date);\n}\n\nexport function formatNoYear (date, locale = 'default', abbreviated = false) {\n const monthFormat = abbreviated ? 'short' : 'long';\n return new Intl.DateTimeFormat(locale, { month: monthFormat, day: 'numeric' }).format(date);\n}\n\nexport function formatNumerical (date, locale = 'default') {\n return new Intl.DateTimeFormat(locale, { year: '2-digit', month: '2-digit', day: '2-digit' }).format(date);\n}\n\nexport default {\n formatLong,\n formatMedium,\n formatShort,\n formatNoYear,\n formatNumerical,\n};\n"],"names":["formatLong","date","locale","formatMedium","formatShort","showWeekday","options","formatNoYear","abbreviated","monthFormat","formatNumerical","formatUtils"],"mappings":"AAAO,SAASA,EAAYC,GAAMC,IAAS,WAAW;AACpD,SAAO,IAAI,KAAK,eAAeA,GAAQ,EAAE,SAAS,QAAQ,MAAM,WAAW,OAAO,QAAQ,KAAK,UAAW,CAAA,EAAE,OAAOD,CAAI;AACzH;AAEO,SAASE,EAAcF,GAAMC,IAAS,WAAW;AACtD,SAAO,IAAI,KAAK,eAAeA,GAAQ,EAAE,MAAM,WAAW,OAAO,QAAQ,KAAK,UAAS,CAAE,EAAE,OAAOD,CAAI;AACxG;AAEO,SAASG,EAAaH,GAAMC,IAAS,WAAWG,IAAc,IAAM;AACzE,QAAMC,IAAUD,IAAc,EAAE,SAAS,SAAS,MAAM,WAAW,OAAO,SAAS,KAAK,UAAW,IAAG,EAAE,MAAM,WAAW,OAAO,SAAS,KAAK;AAC9I,SAAO,IAAI,KAAK,eAAeH,GAAQI,CAAO,EAAE,OAAOL,CAAI;AAC7D;AAEO,SAASM,EAAcN,GAAMC,IAAS,WAAWM,IAAc,IAAO;AAC3E,QAAMC,IAAcD,IAAc,UAAU;AAC5C,SAAO,IAAI,KAAK,eAAeN,GAAQ,EAAE,OAAOO,GAAa,KAAK,UAAW,CAAA,EAAE,OAAOR,CAAI;AAC5F;AAEO,SAASS,EAAiBT,GAAMC,IAAS,WAAW;AACzD,SAAO,IAAI,KAAK,eAAeA,GAAQ,EAAE,MAAM,WAAW,OAAO,WAAW,KAAK,UAAS,CAAE,EAAE,OAAOD,CAAI;AAC3G;AAEA,MAAeU,IAAA;AAAA,EACb,YAAAX;AAAA,EACA,cAAAG;AAAA,EACA,aAAAC;AAAA,EACA,cAAAG;AAAA,EACA,iBAAAG;AACF;"}
1
+ {"version":3,"file":"formatUtils.js","sources":["../../../components/datepicker/formatUtils.js"],"sourcesContent":["import { DialtoneLocalization } from '@/localization';\n\n/**\n * Formats a date into a long format using the specified locale.\n *\n * @param {Date} date - The date to format.\n * @param {string} [locale='default'] - The locale to use for formatting. Defaults to 'default'.\n * @returns {string} The formatted date string.\n */\nexport function formatLong (date, locale = null) {\n return new Intl.DateTimeFormat(locale || DialtoneLocalization.getPreferredLocale(), { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }).format(date);\n}\n\n/**\n * Formats the given date in medium format.\n *\n * @param {Date} date - The date to be formatted.\n * @param {string} [locale='default'] - The locale to be used for formatting. Defaults to 'default'.\n * @returns {string} The formatted date string in medium format.\n */\nexport function formatMedium (date, locale = null) {\n return new Intl.DateTimeFormat(locale || DialtoneLocalization.getPreferredLocale(), { year: 'numeric', month: 'long', day: 'numeric' }).format(date);\n}\n\n/**\n * Formats a date into a short string representation.\n * @param {Date} date - The date to format.\n * @param {string} [locale='default'] - The locale to use for formatting. Defaults to 'default'.\n * @param {boolean} [showWeekday=true] - Whether to include the weekday in the formatted string. Defaults to true.\n * @returns {string} The formatted date string.\n */\nexport function formatShort (date, locale = null, showWeekday = true) {\n const options = showWeekday ? { weekday: 'short', year: 'numeric', month: 'short', day: 'numeric' } : { year: 'numeric', month: 'short', day: 'numeric' };\n return new Intl.DateTimeFormat(locale || DialtoneLocalization.getPreferredLocale(), options).format(date);\n}\n\n/**\n * Formats a date without the year.\n *\n * @param {Date} date - The date to format.\n * @param {string} [locale='default'] - The locale to use for formatting. Defaults to 'default'.\n * @param {boolean} [abbreviated=false] - Whether to use abbreviated month names. Defaults to false.\n * @returns {string} The formatted date without the year.\n */\nexport function formatNoYear (date, locale = null, abbreviated = false) {\n const monthFormat = abbreviated ? 'short' : 'long';\n return new Intl.DateTimeFormat(locale || DialtoneLocalization.getPreferredLocale(), { month: monthFormat, day: 'numeric' }).format(date);\n}\n\n/**\n * Formats a date into a numerical string representation.\n *\n * @param {Date} date - The date to format.\n * @param {string} [locale='default'] - The locale to use for formatting. Defaults to 'default'.\n * @returns {string} The formatted numerical date string.\n */\nexport function formatNumerical (date, locale = null) {\n return new Intl.DateTimeFormat(locale || DialtoneLocalization.getPreferredLocale(), { year: '2-digit', month: '2-digit', day: '2-digit' }).format(date);\n}\n\nexport default {\n formatLong,\n formatMedium,\n formatShort,\n formatNoYear,\n formatNumerical,\n};\n"],"names":["formatLong","date","locale","DialtoneLocalization","formatMedium","formatShort","showWeekday","options","formatNoYear","abbreviated","monthFormat","formatNumerical","formatUtils"],"mappings":";AASO,SAASA,EAAYC,GAAMC,IAAS,MAAM;AAC/C,SAAO,IAAI,KAAK,eAAeA,KAAUC,EAAqB,mBAAoB,GAAE,EAAE,SAAS,QAAQ,MAAM,WAAW,OAAO,QAAQ,KAAK,UAAS,CAAE,EAAE,OAAOF,CAAI;AACtK;AASO,SAASG,EAAcH,GAAMC,IAAS,MAAM;AACjD,SAAO,IAAI,KAAK,eAAeA,KAAUC,EAAqB,mBAAoB,GAAE,EAAE,MAAM,WAAW,OAAO,QAAQ,KAAK,UAAW,CAAA,EAAE,OAAOF,CAAI;AACrJ;AASO,SAASI,EAAaJ,GAAMC,IAAS,MAAMI,IAAc,IAAM;AACpE,QAAMC,IAAUD,IAAc,EAAE,SAAS,SAAS,MAAM,WAAW,OAAO,SAAS,KAAK,UAAW,IAAG,EAAE,MAAM,WAAW,OAAO,SAAS,KAAK;AAC9I,SAAO,IAAI,KAAK,eAAeJ,KAAUC,EAAqB,mBAAoB,GAAEI,CAAO,EAAE,OAAON,CAAI;AAC1G;AAUO,SAASO,EAAcP,GAAMC,IAAS,MAAMO,IAAc,IAAO;AACtE,QAAMC,IAAcD,IAAc,UAAU;AAC5C,SAAO,IAAI,KAAK,eAAeP,KAAUC,EAAqB,mBAAkB,GAAI,EAAE,OAAOO,GAAa,KAAK,UAAS,CAAE,EAAE,OAAOT,CAAI;AACzI;AASO,SAASU,EAAiBV,GAAMC,IAAS,MAAM;AACpD,SAAO,IAAI,KAAK,eAAeA,KAAUC,EAAqB,mBAAoB,GAAE,EAAE,MAAM,WAAW,OAAO,WAAW,KAAK,UAAW,CAAA,EAAE,OAAOF,CAAI;AACxJ;AAEA,MAAeW,IAAA;AAAA,EACb,YAAAZ;AAAA,EACA,cAAAI;AAAA,EACA,aAAAC;AAAA,EACA,cAAAG;AAAA,EACA,iBAAAG;AACF;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("date-fns"),f=require("./datepicker-constants.cjs"),u=t=>t?new Date(t):new Date,g=(t,e,n)=>{const o=u(JSON.parse(JSON.stringify(t))),s=[];for(let c=0;c<7;c++){const r=a.addDays(o,c),D=a.getMonth(r)!==e;s.push({text:r.getDate(),value:r,currentMonth:!D,isFirstDayOfMonth:r.getDate()===1&&!D,selected:n?r.getDate()===n&&!D:!1})}return s},h=(t,e)=>!t||!e?!1:a.isEqual(t,e),M=(t,e,n)=>{const o=[],s=u(new Date(e,t)),c=u(new Date(e,t+1,0)),r=f.WEEK_START,D=a.startOfWeek(s,{weekStartsOn:r}),d=i=>{const y=g(i,t,n);if(o.push({days:y}),!o[o.length-1].days.some(l=>h(l.value,c))){const l=a.addDays(i,7);d(l)}};return d(D),o},k=(t,e)=>{const n=[1,2,3,4,5,6,7].map(c=>new Intl.DateTimeFormat(t,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${c}T00:00:00+00:00`)).slice(0,2)),o=n.slice(0,e),s=n.slice(e+1,n.length);return[n[e]].concat(...s).concat(...o)},m=(t,e,n)=>new Intl.DateTimeFormat(n,{month:e}).format(new Date(2e3,t,1)),w=t=>{const e=new Date(t),n=a.getDay(e),o=a.addMonths(e,1),s=a.startOfMonth(o),c=a.getDay(s),r=(n-c+7)%7,D=a.addDays(s,r);return a.getDate(D)},W=t=>{const e=new Date(t),n=a.getDay(e);let s=a.endOfMonth(a.subMonths(e,1));for(;a.getDay(s)!==n;)s=a.addDays(s,-1);return a.getDate(s)};exports.calculateNextFocusDate=w;exports.calculatePrevFocusDate=W;exports.formatMonth=m;exports.getCalendarDays=M;exports.getWeekDayNames=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("date-fns"),y=require("./datepicker-constants.cjs"),u=t=>t?new Date(t):new Date,g=(t,e,a)=>{const o=u(JSON.parse(JSON.stringify(t))),s=[];for(let r=0;r<7;r++){const c=n.addDays(o,r),D=n.getMonth(c)!==e;s.push({text:c.getDate(),value:c,currentMonth:!D,isFirstDayOfMonth:c.getDate()===1&&!D,selected:a?c.getDate()===a&&!D:!1})}return s},h=(t,e)=>!t||!e?!1:n.isEqual(t,e),m=(t,e,a)=>{const o=[],s=u(new Date(e,t)),r=u(new Date(e,t+1,0)),c=y.WEEK_START,D=n.startOfWeek(s,{weekStartsOn:c}),d=i=>{const f=g(i,t,a);if(o.push({days:f}),!o[o.length-1].days.some(l=>h(l.value,r))){const l=n.addDays(i,7);d(l)}};return d(D),o},M=(t,e)=>{const a=[1,2,3,4,5,6,7].map(r=>new Intl.DateTimeFormat(t,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${r}T00:00:00+00:00`)).slice(0,2)),o=a.slice(0,e),s=a.slice(e+1,a.length);return[a[e]].concat(...s).concat(...o)},w=(t,e,a)=>new Intl.DateTimeFormat(a,{month:e}).format(new Date(2e3,t,1)),k=(t,e,a)=>new Intl.DateTimeFormat(a,{dateStyle:e}).format(new Date(t)),W=t=>{const e=new Date(t),a=n.getDay(e),o=n.addMonths(e,1),s=n.startOfMonth(o),r=n.getDay(s),c=(a-r+7)%7,D=n.addDays(s,c);return n.getDate(D)},O=t=>{const e=new Date(t),a=n.getDay(e);let s=n.endOfMonth(n.subMonths(e,1));for(;n.getDay(s)!==a;)s=n.addDays(s,-1);return n.getDate(s)};exports.calculateNextFocusDate=W;exports.calculatePrevFocusDate=O;exports.formatDate=k;exports.formatMonth=w;exports.getCalendarDays=m;exports.getWeekDayNames=M;
2
2
  //# sourceMappingURL=utils.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.cjs","sources":["../../../components/datepicker/utils.js"],"sourcesContent":["import {\n startOfWeek, addDays, getMonth, isEqual,\n addMonths, startOfMonth, getDay, getDate,\n subMonths, endOfMonth,\n} from 'date-fns';\nimport { WEEK_START } from '@/components/datepicker/datepicker_constants.js';\n\nconst _parsedGetDate = (value) => (value ? new Date(value) : new Date());\n\n/**\n * Get 7 days from the provided start date, month is used to check\n * whether the date is from the specified month or in the offset\n */\nconst getWeekDays = (startDay, month, selectedDay) => {\n const startDate = _parsedGetDate(JSON.parse(JSON.stringify(startDay)));\n const dates = [];\n for (let i = 0; i < 7; i++) {\n const next = addDays(startDate, i);\n const isNext = getMonth(next) !== month;\n dates.push({\n text: next.getDate(),\n value: next,\n currentMonth: !isNext,\n isFirstDayOfMonth: next.getDate() === 1 && !isNext,\n // will be selected if the date is the same as the selected day and is from the current month\n selected: selectedDay ? (next.getDate() === selectedDay && !isNext) : false,\n });\n }\n return dates;\n};\n\nconst isDateEqual = (date, dateToCompare) => {\n if (!date || !dateToCompare) {\n return false;\n }\n return isEqual(date, dateToCompare);\n};\n\n/**\n * Get days for the calendar to be displayed in a table grouped by weeks\n */\nexport const getCalendarDays = (month, year, selectedDay) => {\n const weeks = [];\n const firstDate = _parsedGetDate(new Date(year, month));\n const lastDate = _parsedGetDate(new Date(year, month + 1, 0));\n\n const weekStartsOn = WEEK_START;\n\n const firstDateInCalendar = startOfWeek(firstDate, { weekStartsOn });\n\n const addDaysToWeek = (date) => {\n const days = getWeekDays(date, month, selectedDay);\n\n weeks.push({ days });\n\n if (\n !weeks[weeks.length - 1].days.some((day) =>\n isDateEqual(day.value, lastDate),\n )\n ) {\n const nextDate = addDays(date, 7);\n addDaysToWeek(nextDate);\n }\n };\n\n addDaysToWeek(firstDateInCalendar);\n\n return weeks;\n};\n\n/**\n * Generate week day names based on locale and in order specified in week start\n */\nexport const getWeekDayNames = (locale, weekStart) => {\n // Get list in order from sun ... sat\n const days = [1, 2, 3, 4, 5, 6, 7].map((day) => {\n return new Intl.DateTimeFormat(locale, { weekday: 'short', timeZone: 'UTC' })\n .format(new Date(`2017-01-0${day}T00:00:00+00:00`))\n .slice(0, 2);\n });\n\n // Get days that are in order before specified week start\n const beforeWeekStart = days.slice(0, weekStart);\n // Get days that are in order after specified week start\n const afterWeekStart = days.slice(weekStart + 1, days.length);\n\n // return them in correct order\n return [days[weekStart]].concat(...afterWeekStart).concat(...beforeWeekStart);\n};\n\nexport const formatMonth = (month, monthFormat, locale) => {\n return new Intl.DateTimeFormat(locale, { month: monthFormat }).format(new Date(2000, month, 1));\n};\n\nexport const calculateNextFocusDate = (currentDate) => {\n const date = new Date(currentDate);\n const currentWeekday = getDay(date);\n const nextMonthDate = addMonths(date, 1);\n const nextMonthStart = startOfMonth(nextMonthDate);\n const nextMonthStartWeekday = getDay(nextMonthStart);\n\n const dayDifference = (currentWeekday - nextMonthStartWeekday + 7) % 7;\n\n // Add the difference in days to the first day of the next month\n const focusDate = addDays(nextMonthStart, dayDifference);\n\n // Returns only the day of the month\n return getDate(focusDate);\n};\n\nexport const calculatePrevFocusDate = (currentDate) => {\n const date = new Date(currentDate);\n const currentWeekday = getDay(date);\n\n // Move to the last day of the previous month\n const lastDayOfPrevMonth = endOfMonth(subMonths(date, 1));\n let focusDate = lastDayOfPrevMonth;\n\n // Adjust to the same weekday in the last week of the previous month\n while (getDay(focusDate) !== currentWeekday) {\n focusDate = addDays(focusDate, -1);\n }\n\n // Returns only the day of the month\n return getDate(focusDate);\n};\n"],"names":["_parsedGetDate","value","getWeekDays","startDay","month","selectedDay","startDate","dates","i","next","addDays","isNext","getMonth","isDateEqual","date","dateToCompare","isEqual","getCalendarDays","year","weeks","firstDate","lastDate","weekStartsOn","WEEK_START","firstDateInCalendar","startOfWeek","addDaysToWeek","days","day","nextDate","getWeekDayNames","locale","weekStart","beforeWeekStart","afterWeekStart","formatMonth","monthFormat","calculateNextFocusDate","currentDate","currentWeekday","getDay","nextMonthDate","addMonths","nextMonthStart","startOfMonth","nextMonthStartWeekday","dayDifference","focusDate","getDate","calculatePrevFocusDate","endOfMonth","subMonths"],"mappings":"oJAOMA,EAAkBC,GAAWA,EAAQ,IAAI,KAAKA,CAAK,EAAI,IAAI,KAM3DC,EAAc,CAACC,EAAUC,EAAOC,IAAgB,CACpD,MAAMC,EAAYN,EAAe,KAAK,MAAM,KAAK,UAAUG,CAAQ,CAAC,CAAC,EAC/DI,EAAQ,CAAA,EACd,QAASC,EAAI,EAAGA,EAAI,EAAGA,IAAK,CAC1B,MAAMC,EAAOC,EAAAA,QAAQJ,EAAWE,CAAC,EAC3BG,EAASC,EAAAA,SAASH,CAAI,IAAML,EAClCG,EAAM,KAAK,CACT,KAAME,EAAK,QAAS,EACpB,MAAOA,EACP,aAAc,CAACE,EACf,kBAAmBF,EAAK,YAAc,GAAK,CAACE,EAE5C,SAAUN,EAAeI,EAAK,QAAS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E,EAEaE,EAAc,CAAC/B,EAAOgC,EAAaL,IACvC,IAAI,KAAK,eAAeA,EAAQ,CAAE,MAAOK,CAAW,CAAE,EAAE,OAAO,IAAI,KAAK,IAAMhC,EAAO,CAAC,CAAC,EAGnFiC,EAA0BC,GAAgB,CACrD,MAAMxB,EAAO,IAAI,KAAKwB,CAAW,EAC3BC,EAAiBC,SAAO1B,CAAI,EAC5B2B,EAAgBC,EAAAA,UAAU5B,EAAM,CAAC,EACjC6B,EAAiBC,eAAaH,CAAa,EAC3CI,EAAwBL,SAAOG,CAAc,EAE7CG,GAAiBP,EAAiBM,EAAwB,GAAK,EAG/DE,EAAYrC,EAAAA,QAAQiC,EAAgBG,CAAa,EAGvD,OAAOE,EAAAA,QAAQD,CAAS,CAC1B,EAEaE,EAA0BX,GAAgB,CACrD,MAAMxB,EAAO,IAAI,KAAKwB,CAAW,EAC3BC,EAAiBC,SAAO1B,CAAI,EAIlC,IAAIiC,EADuBG,EAAAA,WAAWC,EAAAA,UAAUrC,EAAM,CAAC,CAAC,EAIxD,KAAO0B,EAAM,OAACO,CAAS,IAAMR,GAC3BQ,EAAYrC,EAAO,QAACqC,EAAW,EAAE,EAInC,OAAOC,EAAAA,QAAQD,CAAS,CAC1B"}
1
+ {"version":3,"file":"utils.cjs","sources":["../../../components/datepicker/utils.js"],"sourcesContent":["import {\n startOfWeek, addDays, getMonth, isEqual,\n addMonths, startOfMonth, getDay, getDate,\n subMonths, endOfMonth,\n} from 'date-fns';\nimport { WEEK_START } from '@/components/datepicker/datepicker_constants.js';\n\nconst _parsedGetDate = (value) => (value ? new Date(value) : new Date());\n\n/**\n * Get 7 days from the provided start date, month is used to check\n * whether the date is from the specified month or in the offset\n */\nconst getWeekDays = (startDay, month, selectedDay) => {\n const startDate = _parsedGetDate(JSON.parse(JSON.stringify(startDay)));\n const dates = [];\n for (let i = 0; i < 7; i++) {\n const next = addDays(startDate, i);\n const isNext = getMonth(next) !== month;\n dates.push({\n text: next.getDate(),\n value: next,\n currentMonth: !isNext,\n isFirstDayOfMonth: next.getDate() === 1 && !isNext,\n // will be selected if the date is the same as the selected day and is from the current month\n selected: selectedDay ? (next.getDate() === selectedDay && !isNext) : false,\n });\n }\n return dates;\n};\n\nconst isDateEqual = (date, dateToCompare) => {\n if (!date || !dateToCompare) {\n return false;\n }\n return isEqual(date, dateToCompare);\n};\n\n/**\n * Get days for the calendar to be displayed in a table grouped by weeks\n */\nexport const getCalendarDays = (month, year, selectedDay) => {\n const weeks = [];\n const firstDate = _parsedGetDate(new Date(year, month));\n const lastDate = _parsedGetDate(new Date(year, month + 1, 0));\n\n const weekStartsOn = WEEK_START;\n\n const firstDateInCalendar = startOfWeek(firstDate, { weekStartsOn });\n\n const addDaysToWeek = (date) => {\n const days = getWeekDays(date, month, selectedDay);\n\n weeks.push({ days });\n\n if (\n !weeks[weeks.length - 1].days.some((day) =>\n isDateEqual(day.value, lastDate),\n )\n ) {\n const nextDate = addDays(date, 7);\n addDaysToWeek(nextDate);\n }\n };\n\n addDaysToWeek(firstDateInCalendar);\n\n return weeks;\n};\n\n/**\n * Generate week day names based on locale and in order specified in week start\n */\nexport const getWeekDayNames = (locale, weekStart) => {\n // Get list in order from sun ... sat\n const days = [1, 2, 3, 4, 5, 6, 7].map((day) => {\n return new Intl.DateTimeFormat(locale, { weekday: 'short', timeZone: 'UTC' })\n .format(new Date(`2017-01-0${day}T00:00:00+00:00`))\n .slice(0, 2);\n });\n\n // Get days that are in order before specified week start\n const beforeWeekStart = days.slice(0, weekStart);\n // Get days that are in order after specified week start\n const afterWeekStart = days.slice(weekStart + 1, days.length);\n\n // return them in correct order\n return [days[weekStart]].concat(...afterWeekStart).concat(...beforeWeekStart);\n};\n\nexport const formatMonth = (month, monthFormat, locale) => {\n return new Intl.DateTimeFormat(locale, { month: monthFormat }).format(new Date(2000, month, 1));\n};\n\nexport const formatDate = (date, dateFormat, locale) => {\n return new Intl.DateTimeFormat(locale, { dateStyle: dateFormat }).format(new Date(date));\n};\n\nexport const calculateNextFocusDate = (currentDate) => {\n const date = new Date(currentDate);\n const currentWeekday = getDay(date);\n const nextMonthDate = addMonths(date, 1);\n const nextMonthStart = startOfMonth(nextMonthDate);\n const nextMonthStartWeekday = getDay(nextMonthStart);\n\n const dayDifference = (currentWeekday - nextMonthStartWeekday + 7) % 7;\n\n // Add the difference in days to the first day of the next month\n const focusDate = addDays(nextMonthStart, dayDifference);\n\n // Returns only the day of the month\n return getDate(focusDate);\n};\n\nexport const calculatePrevFocusDate = (currentDate) => {\n const date = new Date(currentDate);\n const currentWeekday = getDay(date);\n\n // Move to the last day of the previous month\n const lastDayOfPrevMonth = endOfMonth(subMonths(date, 1));\n let focusDate = lastDayOfPrevMonth;\n\n // Adjust to the same weekday in the last week of the previous month\n while (getDay(focusDate) !== currentWeekday) {\n focusDate = addDays(focusDate, -1);\n }\n\n // Returns only the day of the month\n return getDate(focusDate);\n};\n"],"names":["_parsedGetDate","value","getWeekDays","startDay","month","selectedDay","startDate","dates","i","next","addDays","isNext","getMonth","isDateEqual","date","dateToCompare","isEqual","getCalendarDays","year","weeks","firstDate","lastDate","weekStartsOn","WEEK_START","firstDateInCalendar","startOfWeek","addDaysToWeek","days","day","nextDate","getWeekDayNames","locale","weekStart","beforeWeekStart","afterWeekStart","formatMonth","monthFormat","formatDate","dateFormat","calculateNextFocusDate","currentDate","currentWeekday","getDay","nextMonthDate","addMonths","nextMonthStart","startOfMonth","nextMonthStartWeekday","dayDifference","focusDate","getDate","calculatePrevFocusDate","endOfMonth","subMonths"],"mappings":"oJAOMA,EAAkBC,GAAWA,EAAQ,IAAI,KAAKA,CAAK,EAAI,IAAI,KAM3DC,EAAc,CAACC,EAAUC,EAAOC,IAAgB,CACpD,MAAMC,EAAYN,EAAe,KAAK,MAAM,KAAK,UAAUG,CAAQ,CAAC,CAAC,EAC/DI,EAAQ,CAAA,EACd,QAASC,EAAI,EAAGA,EAAI,EAAGA,IAAK,CAC1B,MAAMC,EAAOC,EAAAA,QAAQJ,EA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ACd,EAGKK,EAAkBN,EAAK,MAAM,EAAGK,CAAS,EAEzCE,EAAiBP,EAAK,MAAMK,EAAY,EAAGL,EAAK,MAAM,EAG5D,MAAO,CAACA,EAAKK,CAAS,CAAC,EAAE,OAAO,GAAGE,CAAc,EAAE,OAAO,GAAGD,CAAe,CAC9E,EAEaE,EAAc,CAAC/B,EAAOgC,EAAaL,IACvC,IAAI,KAAK,eAAeA,EAAQ,CAAE,MAAOK,CAAW,CAAE,EAAE,OAAO,IAAI,KAAK,IAAMhC,EAAO,CAAC,CAAC,EAGnFiC,EAAa,CAACvB,EAAMwB,EAAYP,IACpC,IAAI,KAAK,eAAeA,EAAQ,CAAE,UAAWO,CAAY,CAAA,EAAE,OAAO,IAAI,KAAKxB,CAAI,CAAC,EAG5EyB,EAA0BC,GAAgB,CACrD,MAAM1B,EAAO,IAAI,KAAK0B,CAAW,EAC3BC,EAAiBC,SAAO5B,CAAI,EAC5B6B,EAAgBC,EAAAA,UAAU9B,EAAM,CAAC,EACjC+B,EAAiBC,eAAaH,CAAa,EAC3CI,EAAwBL,SAAOG,CAAc,EAE7CG,GAAiBP,EAAiBM,EAAwB,GAAK,EAG/DE,EAAYvC,EAAAA,QAAQmC,EAAgBG,CAAa,EAGvD,OAAOE,EAAAA,QAAQD,CAAS,CAC1B,EAEaE,EAA0BX,GAAgB,CACrD,MAAM1B,EAAO,IAAI,KAAK0B,CAAW,EAC3BC,EAAiBC,SAAO5B,CAAI,EAIlC,IAAImC,EADuBG,EAAAA,WAAWC,EAAAA,UAAUvC,EAAM,CAAC,CAAC,EAIxD,KAAO4B,EAAM,OAACO,CAAS,IAAMR,GAC3BQ,EAAYvC,EAAO,QAACuC,EAAW,EAAE,EAInC,OAAOC,EAAAA,QAAQD,CAAS,CAC1B"}
@@ -1,6 +1,6 @@
1
- import { startOfWeek as m, getDay as D, addMonths as w, startOfMonth as M, addDays as f, getDate as h, endOfMonth as g, subMonths as k, getMonth as O, isEqual as W } from "date-fns";
1
+ import { startOfWeek as y, getDay as D, addMonths as w, startOfMonth as M, addDays as f, getDate as h, endOfMonth as g, subMonths as k, getMonth as O, isEqual as W } from "date-fns";
2
2
  import { WEEK_START as x } from "./datepicker-constants.js";
3
- const u = (t) => t ? new Date(t) : /* @__PURE__ */ new Date(), p = (t, e, n) => {
3
+ const u = (t) => t ? new Date(t) : /* @__PURE__ */ new Date(), S = (t, e, n) => {
4
4
  const s = u(JSON.parse(JSON.stringify(t))), a = [];
5
5
  for (let o = 0; o < 7; o++) {
6
6
  const r = f(s, o), c = O(r) !== e;
@@ -14,11 +14,11 @@ const u = (t) => t ? new Date(t) : /* @__PURE__ */ new Date(), p = (t, e, n) =>
14
14
  });
15
15
  }
16
16
  return a;
17
- }, S = (t, e) => !t || !e ? !1 : W(t, e), N = (t, e, n) => {
18
- const s = [], a = u(new Date(e, t)), o = u(new Date(e, t + 1, 0)), c = m(a, { weekStartsOn: x }), i = (d) => {
19
- const y = p(d, t, n);
20
- if (s.push({ days: y }), !s[s.length - 1].days.some(
21
- (l) => S(l.value, o)
17
+ }, p = (t, e) => !t || !e ? !1 : W(t, e), N = (t, e, n) => {
18
+ const s = [], a = u(new Date(e, t)), o = u(new Date(e, t + 1, 0)), c = y(a, { weekStartsOn: x }), i = (d) => {
19
+ const m = S(d, t, n);
20
+ if (s.push({ days: m }), !s[s.length - 1].days.some(
21
+ (l) => p(l.value, o)
22
22
  )) {
23
23
  const l = f(d, 7);
24
24
  i(l);
@@ -28,10 +28,10 @@ const u = (t) => t ? new Date(t) : /* @__PURE__ */ new Date(), p = (t, e, n) =>
28
28
  }, v = (t, e) => {
29
29
  const n = [1, 2, 3, 4, 5, 6, 7].map((o) => new Intl.DateTimeFormat(t, { weekday: "short", timeZone: "UTC" }).format(/* @__PURE__ */ new Date(`2017-01-0${o}T00:00:00+00:00`)).slice(0, 2)), s = n.slice(0, e), a = n.slice(e + 1, n.length);
30
30
  return [n[e]].concat(...a).concat(...s);
31
- }, E = (t, e, n) => new Intl.DateTimeFormat(n, { month: e }).format(new Date(2e3, t, 1)), I = (t) => {
31
+ }, E = (t, e, n) => new Intl.DateTimeFormat(n, { month: e }).format(new Date(2e3, t, 1)), I = (t, e, n) => new Intl.DateTimeFormat(n, { dateStyle: e }).format(new Date(t)), P = (t) => {
32
32
  const e = new Date(t), n = D(e), s = w(e, 1), a = M(s), o = D(a), r = (n - o + 7) % 7, c = f(a, r);
33
33
  return h(c);
34
- }, P = (t) => {
34
+ }, b = (t) => {
35
35
  const e = new Date(t), n = D(e);
36
36
  let a = g(k(e, 1));
37
37
  for (; D(a) !== n; )
@@ -39,8 +39,9 @@ const u = (t) => t ? new Date(t) : /* @__PURE__ */ new Date(), p = (t, e, n) =>
39
39
  return h(a);
40
40
  };
41
41
  export {
42
- I as calculateNextFocusDate,
43
- P as calculatePrevFocusDate,
42
+ P as calculateNextFocusDate,
43
+ b as calculatePrevFocusDate,
44
+ I as formatDate,
44
45
  E as formatMonth,
45
46
  N as getCalendarDays,
46
47
  v as getWeekDayNames
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../components/datepicker/utils.js"],"sourcesContent":["import {\n startOfWeek, addDays, getMonth, isEqual,\n addMonths, startOfMonth, getDay, getDate,\n subMonths, endOfMonth,\n} from 'date-fns';\nimport { WEEK_START } from '@/components/datepicker/datepicker_constants.js';\n\nconst _parsedGetDate = (value) => (value ? new Date(value) : new Date());\n\n/**\n * Get 7 days from the provided start date, month is used to check\n * whether the date is from the specified month or in the offset\n */\nconst getWeekDays = (startDay, month, selectedDay) => {\n const startDate = _parsedGetDate(JSON.parse(JSON.stringify(startDay)));\n const dates = [];\n for (let i = 0; i < 7; i++) {\n const next = addDays(startDate, i);\n const isNext = getMonth(next) !== month;\n dates.push({\n text: next.getDate(),\n value: next,\n currentMonth: !isNext,\n isFirstDayOfMonth: next.getDate() === 1 && !isNext,\n // will be selected if the date is the same as the selected day and is from the current month\n selected: selectedDay ? (next.getDate() === selectedDay && !isNext) : false,\n });\n }\n return dates;\n};\n\nconst isDateEqual = (date, dateToCompare) => {\n if (!date || !dateToCompare) {\n return false;\n }\n return isEqual(date, dateToCompare);\n};\n\n/**\n * Get days for the calendar to be displayed in a table grouped by weeks\n */\nexport const getCalendarDays = (month, year, selectedDay) => {\n const weeks = [];\n const firstDate = _parsedGetDate(new Date(year, month));\n const lastDate = _parsedGetDate(new Date(year, month + 1, 0));\n\n const weekStartsOn = WEEK_START;\n\n const firstDateInCalendar = startOfWeek(firstDate, { weekStartsOn });\n\n const addDaysToWeek = (date) => {\n const days = getWeekDays(date, month, selectedDay);\n\n weeks.push({ days });\n\n if (\n !weeks[weeks.length - 1].days.some((day) =>\n isDateEqual(day.value, lastDate),\n )\n ) {\n const nextDate = addDays(date, 7);\n addDaysToWeek(nextDate);\n }\n };\n\n addDaysToWeek(firstDateInCalendar);\n\n return weeks;\n};\n\n/**\n * Generate week day names based on locale and in order specified in week start\n */\nexport const getWeekDayNames = (locale, weekStart) => {\n // Get list in order from sun ... sat\n const days = [1, 2, 3, 4, 5, 6, 7].map((day) => {\n return new Intl.DateTimeFormat(locale, { weekday: 'short', timeZone: 'UTC' })\n .format(new Date(`2017-01-0${day}T00:00:00+00:00`))\n .slice(0, 2);\n });\n\n // Get days that are in order before specified week start\n const beforeWeekStart = days.slice(0, weekStart);\n // Get days that are in order after specified week start\n const afterWeekStart = days.slice(weekStart + 1, days.length);\n\n // return them in correct order\n return [days[weekStart]].concat(...afterWeekStart).concat(...beforeWeekStart);\n};\n\nexport const formatMonth = (month, monthFormat, locale) => {\n return new Intl.DateTimeFormat(locale, { month: monthFormat }).format(new Date(2000, month, 1));\n};\n\nexport const calculateNextFocusDate = (currentDate) => {\n const date = new Date(currentDate);\n const currentWeekday = getDay(date);\n const nextMonthDate = addMonths(date, 1);\n const nextMonthStart = startOfMonth(nextMonthDate);\n const nextMonthStartWeekday = getDay(nextMonthStart);\n\n const dayDifference = (currentWeekday - nextMonthStartWeekday + 7) % 7;\n\n // Add the difference in days to the first day of the next month\n const focusDate = addDays(nextMonthStart, dayDifference);\n\n // Returns only the day of the month\n return getDate(focusDate);\n};\n\nexport const calculatePrevFocusDate = (currentDate) => {\n const date = new Date(currentDate);\n const currentWeekday = getDay(date);\n\n // Move to the last day of the previous month\n const lastDayOfPrevMonth = endOfMonth(subMonths(date, 1));\n let focusDate = lastDayOfPrevMonth;\n\n // Adjust to the same weekday in the last week of the previous month\n while (getDay(focusDate) !== currentWeekday) {\n focusDate = addDays(focusDate, -1);\n }\n\n // Returns only the day of the month\n return getDate(focusDate);\n};\n"],"names":["_parsedGetDate","value","getWeekDays","startDay","month","selectedDay","startDate","dates","i","next","addDays","isNext","getMonth","isDateEqual","date","dateToCompare","isEqual","getCalendarDays","year","weeks","firstDate","lastDate","firstDateInCalendar","startOfWeek","WEEK_START","addDaysToWeek","days","day","nextDate","getWeekDayNames","locale","weekStart","beforeWeekStart","afterWeekStart","formatMonth","monthFormat","calculateNextFocusDate","currentDate","currentWeekday","getDay","nextMonthDate","addMonths","nextMonthStart","startOfMonth","nextMonthStartWeekday","dayDifference","focusDate","getDate","calculatePrevFocusDate","endOfMonth","subMonths"],"mappings":";;AAOA,MAAMA,IAAiB,CAACC,MAAWA,IAAQ,IAAI,KAAKA,CAAK,IAAI,oBAAI,KAAI,GAM/DC,IAAc,CAACC,GAAUC,GAAOC,MAAgB;AACpD,QAAMC,IAAYN,EAAe,KAAK,MAAM,KAAK,UAAUG,CAAQ,CAAC,CAAC,GAC/DI,IAAQ,CAAA;AACd,WAASC,IAAI,GAAGA,IAAI,GAAGA,KAAK;AAC1B,UAAMC,IAAOC,EAAQJ,GAAWE,CAAC,GAC3BG,IAASC,EAASH,CAAI,MAAML;AAClC,IAAAG,EAAM,KAAK;AAAA,MACT,MAAME,EAAK,QAAS;AAAA,MACpB,OAAOA;AAAA,MACP,cAAc,CAACE;AAAA,MACf,mBAAmBF,EAAK,cAAc,KAAK,CAACE;AAAA;AAAA,MAE5C,UAAUN,IAAeI,EAAK,QAAS,MAAK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CAAe;AAC9E,GAEaE,IAAc,CAAC9B,GAAO+B,GAAaL,MACvC,IAAI,KAAK,eAAeA,GAAQ,EAAE,OAAOK,EAAW,CAAE,EAAE,OAAO,IAAI,KAAK,KAAM/B,GAAO,CAAC,CAAC,GAGnFgC,IAAyB,CAACC,MAAgB;AACrD,QAAMvB,IAAO,IAAI,KAAKuB,CAAW,GAC3BC,IAAiBC,EAAOzB,CAAI,GAC5B0B,IAAgBC,EAAU3B,GAAM,CAAC,GACjC4B,IAAiBC,EAAaH,CAAa,GAC3CI,IAAwBL,EAAOG,CAAc,GAE7CG,KAAiBP,IAAiBM,IAAwB,KAAK,GAG/DE,IAAYpC,EAAQgC,GAAgBG,CAAa;AAGvD,SAAOE,EAAQD,CAAS;AAC1B,GAEaE,IAAyB,CAACX,MAAgB;AACrD,QAAMvB,IAAO,IAAI,KAAKuB,CAAW,GAC3BC,IAAiBC,EAAOzB,CAAI;AAIlC,MAAIgC,IADuBG,EAAWC,EAAUpC,GAAM,CAAC,CAAC;AAIxD,SAAOyB,EAAOO,CAAS,MAAMR;AAC3B,IAAAQ,IAAYpC,EAAQoC,GAAW,EAAE;AAInC,SAAOC,EAAQD,CAAS;AAC1B;"}
1
+ {"version":3,"file":"utils.js","sources":["../../../components/datepicker/utils.js"],"sourcesContent":["import {\n startOfWeek, addDays, getMonth, isEqual,\n addMonths, startOfMonth, getDay, getDate,\n subMonths, endOfMonth,\n} from 'date-fns';\nimport { WEEK_START } from '@/components/datepicker/datepicker_constants.js';\n\nconst _parsedGetDate = (value) => (value ? new Date(value) : new Date());\n\n/**\n * Get 7 days from the provided start date, month is used to check\n * whether the date is from the specified month or in the offset\n */\nconst getWeekDays = (startDay, month, selectedDay) => {\n const startDate = _parsedGetDate(JSON.parse(JSON.stringify(startDay)));\n const dates = [];\n for (let i = 0; i < 7; i++) {\n const next = addDays(startDate, i);\n const isNext = getMonth(next) !== month;\n dates.push({\n text: next.getDate(),\n value: next,\n currentMonth: !isNext,\n isFirstDayOfMonth: next.getDate() === 1 && !isNext,\n // will be selected if the date is the same as the selected day and is from the current month\n selected: selectedDay ? (next.getDate() === selectedDay && !isNext) : false,\n });\n }\n return dates;\n};\n\nconst isDateEqual = (date, dateToCompare) => {\n if (!date || !dateToCompare) {\n return false;\n }\n return isEqual(date, dateToCompare);\n};\n\n/**\n * Get days for the calendar to be displayed in a table grouped by weeks\n */\nexport const getCalendarDays = (month, year, selectedDay) => {\n const weeks = [];\n const firstDate = _parsedGetDate(new Date(year, month));\n const lastDate = _parsedGetDate(new Date(year, month + 1, 0));\n\n const weekStartsOn = WEEK_START;\n\n const firstDateInCalendar = startOfWeek(firstDate, { weekStartsOn });\n\n const addDaysToWeek = (date) => {\n const days = getWeekDays(date, month, selectedDay);\n\n weeks.push({ days });\n\n if (\n !weeks[weeks.length - 1].days.some((day) =>\n isDateEqual(day.value, lastDate),\n )\n ) {\n const nextDate = addDays(date, 7);\n addDaysToWeek(nextDate);\n }\n };\n\n addDaysToWeek(firstDateInCalendar);\n\n return weeks;\n};\n\n/**\n * Generate week day names based on locale and in order specified in week start\n */\nexport const getWeekDayNames = (locale, weekStart) => {\n // Get list in order from sun ... sat\n const days = [1, 2, 3, 4, 5, 6, 7].map((day) => {\n return new Intl.DateTimeFormat(locale, { weekday: 'short', timeZone: 'UTC' })\n .format(new Date(`2017-01-0${day}T00:00:00+00:00`))\n .slice(0, 2);\n });\n\n // Get days that are in order before specified week start\n const beforeWeekStart = days.slice(0, weekStart);\n // Get days that are in order after specified week start\n const afterWeekStart = days.slice(weekStart + 1, days.length);\n\n // return them in correct order\n return [days[weekStart]].concat(...afterWeekStart).concat(...beforeWeekStart);\n};\n\nexport const formatMonth = (month, monthFormat, locale) => {\n return new Intl.DateTimeFormat(locale, { month: monthFormat }).format(new Date(2000, month, 1));\n};\n\nexport const formatDate = (date, dateFormat, locale) => {\n return new Intl.DateTimeFormat(locale, { dateStyle: dateFormat }).format(new Date(date));\n};\n\nexport const calculateNextFocusDate = (currentDate) => {\n const date = new Date(currentDate);\n const currentWeekday = getDay(date);\n const nextMonthDate = addMonths(date, 1);\n const nextMonthStart = startOfMonth(nextMonthDate);\n const nextMonthStartWeekday = getDay(nextMonthStart);\n\n const dayDifference = (currentWeekday - nextMonthStartWeekday + 7) % 7;\n\n // Add the difference in days to the first day of the next month\n const focusDate = addDays(nextMonthStart, dayDifference);\n\n // Returns only the day of the month\n return getDate(focusDate);\n};\n\nexport const calculatePrevFocusDate = (currentDate) => {\n const date = new Date(currentDate);\n const currentWeekday = getDay(date);\n\n // Move to the last day of the previous month\n const lastDayOfPrevMonth = endOfMonth(subMonths(date, 1));\n let focusDate = lastDayOfPrevMonth;\n\n // Adjust to the same weekday in the last week of the previous month\n while (getDay(focusDate) !== currentWeekday) {\n focusDate = addDays(focusDate, -1);\n }\n\n // Returns only the day of the month\n return getDate(focusDate);\n};\n"],"names":["_parsedGetDate","value","getWeekDays","startDay","month","selectedDay","startDate","dates","i","next","addDays","isNext","getMonth","isDateEqual","date","dateToCompare","isEqual","getCalendarDays","year","weeks","firstDate","lastDate","firstDateInCalendar","startOfWeek","WEEK_START","addDaysToWeek","days","day","nextDate","getWeekDayNames","locale","weekStart","beforeWeekStart","afterWeekStart","formatMonth","monthFormat","formatDate","dateFormat","calculateNextFocusDate","currentDate","currentWeekday","getDay","nextMonthDate","addMonths","nextMonthStart","startOfMonth","nextMonthStartWeekday","dayDifference","focusDate","getDate","calculatePrevFocusDate","endOfMonth","subMonths"],"mappings":";;AAOA,MAAMA,IAAiB,CAACC,MAAWA,IAAQ,IAAI,KAAKA,CAAK,IAAI,oBAAI,KAAI,GAM/DC,IAAc,CAACC,GAAUC,GAAOC,MAAgB;AACpD,QAAMC,IAAYN,EAAe,KAAK,MAAM,KAAK,UAAUG,CAAQ,CAAC,CAAC,GAC/DI,IAAQ,CAAA;AACd,WAASC,IAAI,GAAGA,IAAI,GAAGA,KAAK;AAC1B,UAAMC,IAAOC,EAAQJ,GAAWE,CAAC,GAC3BG,IAASC,E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EACjD,MAAM,GAAG,CAAC,CACd,GAGKK,IAAkBN,EAAK,MAAM,GAAGK,CAAS,GAEzCE,IAAiBP,EAAK,MAAMK,IAAY,GAAGL,EAAK,MAAM;AAG5D,SAAO,CAACA,EAAKK,CAAS,CAAC,EAAE,OAAO,GAAGE,CAAc,EAAE,OAAO,GAAGD,CAAe;AAC9E,GAEaE,IAAc,CAAC9B,GAAO+B,GAAaL,MACvC,IAAI,KAAK,eAAeA,GAAQ,EAAE,OAAOK,EAAW,CAAE,EAAE,OAAO,IAAI,KAAK,KAAM/B,GAAO,CAAC,CAAC,GAGnFgC,IAAa,CAACtB,GAAMuB,GAAYP,MACpC,IAAI,KAAK,eAAeA,GAAQ,EAAE,WAAWO,EAAY,CAAA,EAAE,OAAO,IAAI,KAAKvB,CAAI,CAAC,GAG5EwB,IAAyB,CAACC,MAAgB;AACrD,QAAMzB,IAAO,IAAI,KAAKyB,CAAW,GAC3BC,IAAiBC,EAAO3B,CAAI,GAC5B4B,IAAgBC,EAAU7B,GAAM,CAAC,GACjC8B,IAAiBC,EAAaH,CAAa,GAC3CI,IAAwBL,EAAOG,CAAc,GAE7CG,KAAiBP,IAAiBM,IAAwB,KAAK,GAG/DE,IAAYtC,EAAQkC,GAAgBG,CAAa;AAGvD,SAAOE,EAAQD,CAAS;AAC1B,GAEaE,IAAyB,CAACX,MAAgB;AACrD,QAAMzB,IAAO,IAAI,KAAKyB,CAAW,GAC3BC,IAAiBC,EAAO3B,CAAI;AAIlC,MAAIkC,IADuBG,EAAWC,EAAUtC,GAAM,CAAC,CAAC;AAIxD,SAAO2B,EAAOO,CAAS,MAAMR;AAC3B,IAAAQ,IAAYtC,EAAQsC,GAAW,EAAE;AAInC,SAAOC,EAAQD,CAAS;AAC1B;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../stack/stack-constants.cjs"),l=require("./description-list-constants.cjs"),n=require("./description-list-validators.cjs"),e=require("vue"),c=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),d={compatConfig:{MODE:3},name:"DtDescriptionList",props:{direction:{type:String,default:"row",validator:t=>l.DT_DESCRIPTION_LIST_DIRECTION.includes(t)},items:{type:Array,default:()=>[],validator:t=>n.itemsValidator(t),required:!0},gap:{type:String,default:"400",validator:t=>a.DT_STACK_GAP.includes(t)},termClass:{type:[String,Array,Object],default:""},descriptionClass:{type:[String,Array,Object],default:""}},computed:{dtClass(){return["d-description-list__term",this.termClass]},ddClass(){return["d-description-list__description",this.descriptionClass]},getDirectionClass(){return`d-description-list--${this.direction}`},getGapClass(){return`d-description-list--gap-${this.gap}`}}};function o(t,u,i,_,m,s){return e.openBlock(),e.createElementBlock("dl",{class:e.normalizeClass(["d-description-list",s.getDirectionClass,s.getGapClass])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.items,r=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.term},[e.createElementVNode("dt",{class:e.normalizeClass(s.dtClass)},e.toDisplayString(r.term),3),e.createElementVNode("dd",{class:e.normalizeClass(s.ddClass)},e.toDisplayString(r.description),3)],64))),128))],2)}const p=c._(d,[["render",o]]);exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./description-list-constants.cjs"),l=require("./description-list-validators.cjs"),e=require("vue"),n=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),c=require("../stack/stack-constants.cjs"),d={compatConfig:{MODE:3},name:"DtDescriptionList",props:{direction:{type:String,default:"row",validator:t=>a.DT_DESCRIPTION_LIST_DIRECTION.includes(t)},items:{type:Array,default:()=>[],validator:t=>l.itemsValidator(t),required:!0},gap:{type:String,default:"400",validator:t=>c.DT_STACK_GAP.includes(t)},termClass:{type:[String,Array,Object],default:""},descriptionClass:{type:[String,Array,Object],default:""}},computed:{dtClass(){return["d-description-list__term",this.termClass]},ddClass(){return["d-description-list__description",this.descriptionClass]},getDirectionClass(){return`d-description-list--${this.direction}`},getGapClass(){return`d-description-list--gap-${this.gap}`}}};function o(t,u,i,_,m,s){return e.openBlock(),e.createElementBlock("dl",{class:e.normalizeClass(["d-description-list",s.getDirectionClass,s.getGapClass])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.items,r=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.term},[e.createElementVNode("dt",{class:e.normalizeClass(s.dtClass)},e.toDisplayString(r.term),3),e.createElementVNode("dd",{class:e.normalizeClass(s.ddClass)},e.toDisplayString(r.description),3)],64))),128))],2)}const p=n._(d,[["render",o]]);exports.default=p;
2
2
  //# sourceMappingURL=description-list.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"description-list.cjs","sources":["../../../components/description_list/description_list.vue"],"sourcesContent":["<template>\n <dl :class=\"['d-description-list', getDirectionClass, getGapClass]\">\n <template\n v-for=\"item in items\"\n :key=\"item.term\"\n >\n <dt :class=\"dtClass\">\n {{ item.term }}\n </dt>\n <dd :class=\"ddClass\">\n {{ item.description }}\n </dd>\n </template>\n </dl>\n</template>\n\n<script>\nimport { DT_STACK_GAP } from '../stack/stack_constants';\nimport { DT_DESCRIPTION_LIST_DIRECTION } from './description_list_constants';\nimport { itemsValidator } from './description_list_validators';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtDescriptionList',\n\n props: {\n /**\n * The direction for the list\n * @values row, column\n */\n direction: {\n type: String,\n default: 'row',\n validator: direction => DT_DESCRIPTION_LIST_DIRECTION.includes(direction),\n },\n\n /**\n * A list of items that represent the term and the description\n */\n items: {\n type: Array,\n default: () => [],\n validator: items => itemsValidator(items),\n required: true,\n },\n\n /**\n * Set the space between the elements\n * @values 0, 100, 200, 300, 400, 500, 600\n */\n gap: {\n type: String,\n default: '400',\n validator: (gap) => DT_STACK_GAP.includes(gap),\n },\n\n /**\n * Used to customize the term element\n */\n termClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the description element\n */\n descriptionClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n dtClass () {\n return ['d-description-list__term', this.termClass];\n },\n\n ddClass () {\n return ['d-description-list__description', this.descriptionClass];\n },\n\n getDirectionClass () {\n return `d-description-list--${this.direction}`;\n },\n\n getGapClass () {\n return `d-description-list--gap-${this.gap}`;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","direction","DT_DESCRIPTION_LIST_DIRECTION","items","itemsValidator","gap","DT_STACK_GAP","_createElementBlock","_normalizeClass","$options","_openBlock","_Fragment","_renderList","$props","item","_createElementVNode","_toDisplayString"],"mappings":"oUAqBKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,oBAEN,MAAO,CAKL,UAAW,CACT,KAAM,OACN,QAAS,MACT,UAAWC,GAAaC,gCAA8B,SAASD,CAAS,CACzE,EAKD,MAAO,CACL,KAAM,MACN,QAAS,IAAM,CAAE,EACjB,UAAWE,GAASC,EAAc,eAACD,CAAK,EACxC,SAAU,EACX,EAMD,IAAK,CACH,KAAM,OACN,QAAS,MACT,UAAYE,GAAQC,eAAa,SAASD,CAAG,CAC9C,EAKD,UAAW,CACT,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,EACV,EAKD,iBAAkB,CAChB,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,EACV,CACF,EAED,SAAU,CACR,SAAW,CACT,MAAO,CAAC,2BAA4B,KAAK,SAAS,CACnD,EAED,SAAW,CACT,MAAO,CAAC,kCAAmC,KAAK,gBAAgB,CACjE,EAED,mBAAqB,CACnB,MAAO,uBAAuB,KAAK,SAAS,EAC7C,EAED,aAAe,CACb,MAAO,2BAA2B,KAAK,GAAG,EAC3C,CACF,CACH,+CAzFEE,EAYK,mBAAA,KAAA,CAZA,MADPC,EAAA,eAAA,CAAA,qBACqCC,EAAiB,kBAAEA,EAAW,WAAA,CAAA,KAC/DC,YAAA,EAAA,EAAAH,EAAAA,mBAUWI,EAZf,SAAA,KAAAC,EAAAA,WAGqBC,EAAK,MAAbC,IAHbJ,EAAA,UAAA,EAAAH,EAAA,mBAAAI,WAAA,CAAA,IAIYG,EAAK,OAEXC,EAAAA,mBAEK,KAAA,CAFA,MANXP,EAAAA,eAMkBC,EAAO,OAAA,CACd,EAAAO,kBAAAF,EAAK,IAAI,EAAA,CAAA,EAEdC,EAAAA,mBAEK,KAAA,CAFA,MATXP,EAAAA,eASkBC,EAAO,OAAA,CACd,EAAAO,kBAAAF,EAAK,WAAW,EAAA,CAAA"}
1
+ {"version":3,"file":"description-list.cjs","sources":["../../../components/description_list/description_list.vue"],"sourcesContent":["<template>\n <dl :class=\"['d-description-list', getDirectionClass, getGapClass]\">\n <template\n v-for=\"item in items\"\n :key=\"item.term\"\n >\n <dt :class=\"dtClass\">\n {{ item.term }}\n </dt>\n <dd :class=\"ddClass\">\n {{ item.description }}\n </dd>\n </template>\n </dl>\n</template>\n\n<script>\nimport { DT_STACK_GAP } from '@/components/stack';\nimport { DT_DESCRIPTION_LIST_DIRECTION } from './description_list_constants';\nimport { itemsValidator } from './description_list_validators';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtDescriptionList',\n\n props: {\n /**\n * The direction for the list\n * @values row, column\n */\n direction: {\n type: String,\n default: 'row',\n validator: direction => DT_DESCRIPTION_LIST_DIRECTION.includes(direction),\n },\n\n /**\n * A list of items that represent the term and the description\n */\n items: {\n type: Array,\n default: () => [],\n validator: items => itemsValidator(items),\n required: true,\n },\n\n /**\n * Set the space between the elements\n * @values 0, 100, 200, 300, 400, 500, 600\n */\n gap: {\n type: String,\n default: '400',\n validator: (gap) => DT_STACK_GAP.includes(gap),\n },\n\n /**\n * Used to customize the term element\n */\n termClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the description element\n */\n descriptionClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n dtClass () {\n return ['d-description-list__term', this.termClass];\n },\n\n ddClass () {\n return ['d-description-list__description', this.descriptionClass];\n },\n\n getDirectionClass () {\n return `d-description-list--${this.direction}`;\n },\n\n getGapClass () {\n return `d-description-list--gap-${this.gap}`;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","direction","DT_DESCRIPTION_LIST_DIRECTION","items","itemsValidator","gap","DT_STACK_GAP","_createElementBlock","_normalizeClass","$options","_openBlock","_Fragment","_renderList","$props","item","_createElementVNode","_toDisplayString"],"mappings":"oUAqBKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,oBAEN,MAAO,CAKL,UAAW,CACT,KAAM,OACN,QAAS,MACT,UAAWC,GAAaC,gCAA8B,SAASD,CAAS,CACzE,EAKD,MAAO,CACL,KAAM,MACN,QAAS,IAAM,CAAE,EACjB,UAAWE,GAASC,EAAc,eAACD,CAAK,EACxC,SAAU,EACX,EAMD,IAAK,CACH,KAAM,OACN,QAAS,MACT,UAAYE,GAAQC,eAAa,SAASD,CAAG,CAC9C,EAKD,UAAW,CACT,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,EACV,EAKD,iBAAkB,CAChB,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,EACV,CACF,EAED,SAAU,CACR,SAAW,CACT,MAAO,CAAC,2BAA4B,KAAK,SAAS,CACnD,EAED,SAAW,CACT,MAAO,CAAC,kCAAmC,KAAK,gBAAgB,CACjE,EAED,mBAAqB,CACnB,MAAO,uBAAuB,KAAK,SAAS,EAC7C,EAED,aAAe,CACb,MAAO,2BAA2B,KAAK,GAAG,EAC3C,CACF,CACH,+CAzFEE,EAYK,mBAAA,KAAA,CAZA,MADPC,EAAA,eAAA,CAAA,qBACqCC,EAAiB,kBAAEA,EAAW,WAAA,CAAA,KAC/DC,YAAA,EAAA,EAAAH,EAAAA,mBAUWI,EAZf,SAAA,KAAAC,EAAAA,WAGqBC,EAAK,MAAbC,IAHbJ,EAAA,UAAA,EAAAH,EAAA,mBAAAI,WAAA,CAAA,IAIYG,EAAK,OAEXC,EAAAA,mBAEK,KAAA,CAFA,MANXP,EAAAA,eAMkBC,EAAO,OAAA,CACd,EAAAO,kBAAAF,EAAK,IAAI,EAAA,CAAA,EAEdC,EAAAA,mBAEK,KAAA,CAFA,MATXP,EAAAA,eASkBC,EAAO,OAAA,CACd,EAAAO,kBAAAF,EAAK,WAAW,EAAA,CAAA"}
@@ -1,8 +1,8 @@
1
- import { DT_STACK_GAP as c } from "../stack/stack-constants.js";
2
- import { DT_DESCRIPTION_LIST_DIRECTION as p } from "./description-list-constants.js";
3
- import { itemsValidator as m } from "./description-list-validators.js";
4
- import { openBlock as s, createElementBlock as i, normalizeClass as a, Fragment as d, renderList as u, createElementVNode as l, toDisplayString as n } from "vue";
5
- import { _ } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
1
+ import { DT_DESCRIPTION_LIST_DIRECTION as c } from "./description-list-constants.js";
2
+ import { itemsValidator as p } from "./description-list-validators.js";
3
+ import { openBlock as s, createElementBlock as i, normalizeClass as a, Fragment as d, renderList as m, createElementVNode as l, toDisplayString as n } from "vue";
4
+ import { _ as u } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
5
+ import { DT_STACK_GAP as _ } from "../stack/stack-constants.js";
6
6
  const C = {
7
7
  compatConfig: { MODE: 3 },
8
8
  name: "DtDescriptionList",
@@ -14,7 +14,7 @@ const C = {
14
14
  direction: {
15
15
  type: String,
16
16
  default: "row",
17
- validator: (t) => p.includes(t)
17
+ validator: (t) => c.includes(t)
18
18
  },
19
19
  /**
20
20
  * A list of items that represent the term and the description
@@ -22,7 +22,7 @@ const C = {
22
22
  items: {
23
23
  type: Array,
24
24
  default: () => [],
25
- validator: (t) => m(t),
25
+ validator: (t) => p(t),
26
26
  required: !0
27
27
  },
28
28
  /**
@@ -32,7 +32,7 @@ const C = {
32
32
  gap: {
33
33
  type: String,
34
34
  default: "400",
35
- validator: (t) => c.includes(t)
35
+ validator: (t) => _.includes(t)
36
36
  },
37
37
  /**
38
38
  * Used to customize the term element
@@ -68,7 +68,7 @@ function f(t, g, o, y, D, e) {
68
68
  return s(), i("dl", {
69
69
  class: a(["d-description-list", e.getDirectionClass, e.getGapClass])
70
70
  }, [
71
- (s(!0), i(d, null, u(o.items, (r) => (s(), i(d, {
71
+ (s(!0), i(d, null, m(o.items, (r) => (s(), i(d, {
72
72
  key: r.term
73
73
  }, [
74
74
  l("dt", {
@@ -80,7 +80,7 @@ function f(t, g, o, y, D, e) {
80
80
  ], 64))), 128))
81
81
  ], 2);
82
82
  }
83
- const I = /* @__PURE__ */ _(C, [["render", f]]);
83
+ const I = /* @__PURE__ */ u(C, [["render", f]]);
84
84
  export {
85
85
  I as default
86
86
  };
@@ -1 +1 @@
1
- {"version":3,"file":"description-list.js","sources":["../../../components/description_list/description_list.vue"],"sourcesContent":["<template>\n <dl :class=\"['d-description-list', getDirectionClass, getGapClass]\">\n <template\n v-for=\"item in items\"\n :key=\"item.term\"\n >\n <dt :class=\"dtClass\">\n {{ item.term }}\n </dt>\n <dd :class=\"ddClass\">\n {{ item.description }}\n </dd>\n </template>\n </dl>\n</template>\n\n<script>\nimport { DT_STACK_GAP } from '../stack/stack_constants';\nimport { DT_DESCRIPTION_LIST_DIRECTION } from './description_list_constants';\nimport { itemsValidator } from './description_list_validators';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtDescriptionList',\n\n props: {\n /**\n * The direction for the list\n * @values row, column\n */\n direction: {\n type: String,\n default: 'row',\n validator: direction => DT_DESCRIPTION_LIST_DIRECTION.includes(direction),\n },\n\n /**\n * A list of items that represent the term and the description\n */\n items: {\n type: Array,\n default: () => [],\n validator: items => itemsValidator(items),\n required: true,\n },\n\n /**\n * Set the space between the elements\n * @values 0, 100, 200, 300, 400, 500, 600\n */\n gap: {\n type: String,\n default: '400',\n validator: (gap) => DT_STACK_GAP.includes(gap),\n },\n\n /**\n * Used to customize the term element\n */\n termClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the description element\n */\n descriptionClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n dtClass () {\n return ['d-description-list__term', this.termClass];\n },\n\n ddClass () {\n return ['d-description-list__description', this.descriptionClass];\n },\n\n getDirectionClass () {\n return `d-description-list--${this.direction}`;\n },\n\n getGapClass () {\n return `d-description-list--gap-${this.gap}`;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","direction","DT_DESCRIPTION_LIST_DIRECTION","items","itemsValidator","gap","DT_STACK_GAP","_createElementBlock","_normalizeClass","$options","_openBlock","_Fragment","_renderList","$props","item","_createElementVNode","_toDisplayString"],"mappings":";;;;;AAqBA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAAC,MAAaC,EAA8B,SAASD,CAAS;AAAA,IACzE;AAAA;AAAA;AAAA;AAAA,IAKD,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,MACjB,WAAW,CAAAE,MAASC,EAAeD,CAAK;AAAA,MACxC,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,KAAK;AAAA,MACH,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAACE,MAAQC,EAAa,SAASD,CAAG;AAAA,IAC9C;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,kBAAkB;AAAA,MAChB,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EAED,UAAU;AAAA,IACR,UAAW;AACT,aAAO,CAAC,4BAA4B,KAAK,SAAS;AAAA,IACnD;AAAA,IAED,UAAW;AACT,aAAO,CAAC,mCAAmC,KAAK,gBAAgB;AAAA,IACjE;AAAA,IAED,oBAAqB;AACnB,aAAO,uBAAuB,KAAK,SAAS;AAAA,IAC7C;AAAA,IAED,cAAe;AACb,aAAO,2BAA2B,KAAK,GAAG;AAAA,IAC3C;AAAA,EACF;AACH;;cAzFEE,EAYK,MAAA;AAAA,IAZA,OADPC,EAAA,CAAA,sBACqCC,EAAiB,mBAAEA,EAAW,WAAA,CAAA;AAAA;KAC/DC,EAAA,EAAA,GAAAH,EAUWI,GAZf,MAAAC,EAGqBC,EAAK,OAH1B,CAGaC,OAHbJ,EAAA,GAAAH,EAAAI,GAAA;AAAA,MAAA,KAIYG,EAAK;AAAA;MAEXC,EAEK,MAAA;AAAA,QAFA,OANXP,EAMkBC,EAAO,OAAA;AAAA,MACd,GAAAO,EAAAF,EAAK,IAAI,GAAA,CAAA;AAAA,MAEdC,EAEK,MAAA;AAAA,QAFA,OATXP,EASkBC,EAAO,OAAA;AAAA,MACd,GAAAO,EAAAF,EAAK,WAAW,GAAA,CAAA;AAAA;;;;"}
1
+ {"version":3,"file":"description-list.js","sources":["../../../components/description_list/description_list.vue"],"sourcesContent":["<template>\n <dl :class=\"['d-description-list', getDirectionClass, getGapClass]\">\n <template\n v-for=\"item in items\"\n :key=\"item.term\"\n >\n <dt :class=\"dtClass\">\n {{ item.term }}\n </dt>\n <dd :class=\"ddClass\">\n {{ item.description }}\n </dd>\n </template>\n </dl>\n</template>\n\n<script>\nimport { DT_STACK_GAP } from '@/components/stack';\nimport { DT_DESCRIPTION_LIST_DIRECTION } from './description_list_constants';\nimport { itemsValidator } from './description_list_validators';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtDescriptionList',\n\n props: {\n /**\n * The direction for the list\n * @values row, column\n */\n direction: {\n type: String,\n default: 'row',\n validator: direction => DT_DESCRIPTION_LIST_DIRECTION.includes(direction),\n },\n\n /**\n * A list of items that represent the term and the description\n */\n items: {\n type: Array,\n default: () => [],\n validator: items => itemsValidator(items),\n required: true,\n },\n\n /**\n * Set the space between the elements\n * @values 0, 100, 200, 300, 400, 500, 600\n */\n gap: {\n type: String,\n default: '400',\n validator: (gap) => DT_STACK_GAP.includes(gap),\n },\n\n /**\n * Used to customize the term element\n */\n termClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the description element\n */\n descriptionClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n dtClass () {\n return ['d-description-list__term', this.termClass];\n },\n\n ddClass () {\n return ['d-description-list__description', this.descriptionClass];\n },\n\n getDirectionClass () {\n return `d-description-list--${this.direction}`;\n },\n\n getGapClass () {\n return `d-description-list--gap-${this.gap}`;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","direction","DT_DESCRIPTION_LIST_DIRECTION","items","itemsValidator","gap","DT_STACK_GAP","_createElementBlock","_normalizeClass","$options","_openBlock","_Fragment","_renderList","$props","item","_createElementVNode","_toDisplayString"],"mappings":";;;;;AAqBA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAAC,MAAaC,EAA8B,SAASD,CAAS;AAAA,IACzE;AAAA;AAAA;AAAA;AAAA,IAKD,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,MACjB,WAAW,CAAAE,MAASC,EAAeD,CAAK;AAAA,MACxC,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,KAAK;AAAA,MACH,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAACE,MAAQC,EAAa,SAASD,CAAG;AAAA,IAC9C;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,kBAAkB;AAAA,MAChB,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EAED,UAAU;AAAA,IACR,UAAW;AACT,aAAO,CAAC,4BAA4B,KAAK,SAAS;AAAA,IACnD;AAAA,IAED,UAAW;AACT,aAAO,CAAC,mCAAmC,KAAK,gBAAgB;AAAA,IACjE;AAAA,IAED,oBAAqB;AACnB,aAAO,uBAAuB,KAAK,SAAS;AAAA,IAC7C;AAAA,IAED,cAAe;AACb,aAAO,2BAA2B,KAAK,GAAG;AAAA,IAC3C;AAAA,EACF;AACH;;cAzFEE,EAYK,MAAA;AAAA,IAZA,OADPC,EAAA,CAAA,sBACqCC,EAAiB,mBAAEA,EAAW,WAAA,CAAA;AAAA;KAC/DC,EAAA,EAAA,GAAAH,EAUWI,GAZf,MAAAC,EAGqBC,EAAK,OAH1B,CAGaC,OAHbJ,EAAA,GAAAH,EAAAI,GAAA;AAAA,MAAA,KAIYG,EAAK;AAAA;MAEXC,EAEK,MAAA;AAAA,QAFA,OANXP,EAMkBC,EAAO,OAAA;AAAA,MACd,GAAAO,EAAAF,EAAK,IAAI,GAAA,CAAA;AAAA,MAEdC,EAEK,MAAA;AAAA,QAFA,OATXP,EASkBC,EAAO,OAAA;AAAA,MACd,GAAAO,EAAAF,EAAK,WAAW,GAAA,CAAA;AAAA;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("../../common/mixins/keyboard-list-navigation.cjs"),l=require("./dropdown-constants.cjs"),c=require("../../common/utils/index.cjs"),o=require("../../common/constants/index.cjs"),y=require("../../common/mixins/sr-only-close-button.cjs"),m=require("../../shared/sr_only_close_button.cjs"),t=require("vue"),E=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),f=require("../popover/popover.cjs"),d=require("../list-item/list-item-constants.cjs"),_=require("../popover/popover-constants.cjs"),S={compatConfig:{MODE:3},name:"DtDropdown",components:{DtPopover:f.default,SrOnlyCloseButton:m.default},mixins:[g.default({indexKey:"highlightIndex",idKey:"highlightId",listElementKey:"getListElement",listItemRole:"menuitem",afterHighlightMethod:"afterHighlight",beginningOfListMethod:"beginningOfListMethod",endOfListMethod:"endOfListMethod",activeItemKey:"activeItemEl",focusOnKeyboardNavigation:!0}),y.default],inheritAttrs:!1,props:{open:{type:Boolean,default:null},openOnContext:{type:Boolean,default:!1},padding:{type:String,default:"small",validator:e=>Object.keys(l.DROPDOWN_PADDING_CLASSES).some(n=>n===e)},modal:{type:Boolean,default:!0},contentWidth:{type:String,default:null},maxHeight:{type:String,default:""},maxWidth:{type:String,default:""},listId:{type:String,default(){return c.getUniqueString()}},navigationType:{type:String,default:d.LIST_ITEM_NAVIGATION_TYPES.ARROW_KEYS,validator:e=>Object.values(d.LIST_ITEM_NAVIGATION_TYPES).includes(e)},fallbackPlacements:{type:Array,default:()=>["auto"]},placement:{type:String,default:"bottom"},onBeginningOfList:{type:Function,default:null},onEndOfList:{type:Function,default:null},listClass:{type:[String,Array,Object],default:""},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>_.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},tether:{type:Boolean,default:!0},transition:{type:String,default:"fade"}},emits:["keydown","highlight","update:open","opened","update:open"],data(){return{LIST_ITEM_NAVIGATION_TYPES:d.LIST_ITEM_NAVIGATION_TYPES,DROPDOWN_PADDING_CLASSES:l.DROPDOWN_PADDING_CLASSES,EVENT_KEYNAMES:o.EVENT_KEYNAMES,openedWithKeyboard:!1,isOpen:null}},computed:{dropdownListeners(){return{opened:e=>{this.updateInitialHighlightIndex(e)},keydown:e=>{switch(e.code){case o.EVENT_KEYNAMES.up:case o.EVENT_KEYNAMES.arrowup:this.onUpKeyPress(e),e.stopPropagation(),e.preventDefault();break;case o.EVENT_KEYNAMES.down:case o.EVENT_KEYNAMES.arrowdown:this.onDownKeyPress(e),e.stopPropagation(),e.preventDefault();break;case o.EVENT_KEYNAMES.space:case o.EVENT_KEYNAMES.spacebar:this.onSpaceKey();break;case o.EVENT_KEYNAMES.enter:this.onEnterKey();break;case o.EVENT_KEYNAMES.home:this.onHomeKeyPress(e),e.stopPropagation(),e.preventDefault();break;case o.EVENT_KEYNAMES.end:this.onEndKeyPress(e),e.stopPropagation(),e.preventDefault();break;default:this.onKeyPress(e);break}this.$emit("keydown",e)}}},beginningOfListMethod(){return this.onBeginningOfList||this.jumpToEnd},endOfListMethod(){return this.onEndOfList||this.jumpToBeginning},activeItemEl(){return this.getListElement().querySelector("#"+this.highlightId)},isArrowKeyNav(){return this.navigationType===this.LIST_ITEM_NAVIGATION_TYPES.ARROW_KEYS},listClasses(){return["d-dropdown-list",l.DROPDOWN_PADDING_CLASSES[this.padding],this.listClass,{"d-context-menu-list":this.openOnContext}]},shouldOpenWithArrowKeys(){return!this.openOnContext}},methods:{onMouseHighlight(e){const n=e.target.closest("li");n&&n.role&&this.highlightId!==n.id&&(this.setHighlightId(n.id),n.focus())},getListElement(){return this.$refs.listWrapper},clearHighlightIndex(){this.setHighlightIndex(-1)},afterHighlight(){this.visuallyHiddenClose&&this.highlightIndex===this._itemsLength()-1||this.$emit("highlight",this.highlightIndex)},updateInitialHighlightIndex(e){this.isOpen=e,e?(this.openedWithKeyboard&&this.isArrowKeyNav&&this.setHighlightIndex(0),this.$emit("opened",!0)):(this.clearHighlightIndex(),this.openedWithKeyboard=!1,this.$emit("opened",!1))},onSpaceKey(){this.open||(this.openedWithKeyboard=!0)},onEnterKey(){this.open||(this.openedWithKeyboard=!0)},onUpKeyPress(){if(!this.isOpen){this.openedWithKeyboard=!0;return}if(this.isArrowKeyNav)return this.onUpKey()},onDownKeyPress(){if(!this.isOpen){this.openedWithKeyboard=!0;return}if(this.isArrowKeyNav)return this.onDownKey()},onHomeKeyPress(){if(!(!this.isOpen||!this.isArrowKeyNav))return this.onHomeKey()},onEndKeyPress(){if(!(!this.isOpen||!this.isArrowKeyNav))return this.onEndKey()},onKeyPress(e){if(!(!this.isOpen||!this.isArrowKeyNav||!this.isValidLetter(e.key)))return e.stopPropagation(),e.preventDefault(),this.onNavigationKey(e.key)}}},K=["id"];function N(e,n,i,O,h,s){const u=t.resolveComponent("sr-only-close-button"),p=t.resolveComponent("dt-popover");return t.openBlock(),t.createBlock(p,t.mergeProps({ref:"popover","content-width":i.contentWidth,open:i.open,placement:i.placement,"initial-focus-element":h.openedWithKeyboard?"first":"dialog","fallback-placements":i.fallbackPlacements,padding:"none",role:"menu","append-to":i.appendTo,modal:i.modal,"max-height":i.maxHeight,"max-width":i.maxWidth,"open-with-arrow-keys":s.shouldOpenWithArrowKeys,"open-on-context":i.openOnContext},e.$attrs,{tether:i.tether,transition:i.transition},t.toHandlers(s.dropdownListeners)),{anchor:t.withCtx(({attrs:r})=>[t.renderSlot(e.$slots,"anchor",t.mergeProps({ref:"anchor"},r))]),content:t.withCtx(({close:r})=>[t.createElementVNode("ul",{id:i.listId,ref:"listWrapper",class:t.normalizeClass(s.listClasses),"data-qa":"dt-dropdown-list-wrapper",onMouseleave:n[0]||(n[0]=(...a)=>s.clearHighlightIndex&&s.clearHighlightIndex(...a)),onMousemoveCapture:n[1]||(n[1]=(...a)=>s.onMouseHighlight&&s.onMouseHighlight(...a))},[t.renderSlot(e.$slots,"list",{close:r}),e.showVisuallyHiddenClose?(t.openBlock(),t.createBlock(u,{key:0,"visually-hidden-close-label":e.visuallyHiddenCloseLabel,tabindex:s.isArrowKeyNav?-1:0,onClose:r},null,8,["visually-hidden-close-label","tabindex","onClose"])):t.createCommentVNode("",!0)],42,K)]),footerContent:t.withCtx(({close:r})=>[t.renderSlot(e.$slots,"footer",{close:r})]),_:3},16,["content-width","open","placement","initial-focus-element","fallback-placements","append-to","modal","max-height","max-width","open-with-arrow-keys","open-on-context","tether","transition"])}const I=E._(S,[["render",N]]);exports.default=I;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("../../common/mixins/keyboard-list-navigation.cjs"),l=require("./dropdown-constants.cjs"),g=require("../../common/utils/index.cjs"),o=require("../../common/constants/index.cjs"),t=require("vue"),c=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),E=require("../popover/popover.cjs"),d=require("../list-item/list-item-constants.cjs"),f=require("../popover/popover-constants.cjs"),m={compatConfig:{MODE:3},name:"DtDropdown",components:{DtPopover:E.default},mixins:[p.default({indexKey:"highlightIndex",idKey:"highlightId",listElementKey:"getListElement",listItemRole:"menuitem",afterHighlightMethod:"afterHighlight",beginningOfListMethod:"beginningOfListMethod",endOfListMethod:"endOfListMethod",activeItemKey:"activeItemEl",focusOnKeyboardNavigation:!0})],inheritAttrs:!1,props:{open:{type:Boolean,default:null},openOnContext:{type:Boolean,default:!1},padding:{type:String,default:"small",validator:e=>Object.keys(l.DROPDOWN_PADDING_CLASSES).some(i=>i===e)},modal:{type:Boolean,default:!0},contentWidth:{type:String,default:null},maxHeight:{type:String,default:""},maxWidth:{type:String,default:""},listId:{type:String,default(){return g.getUniqueString()}},navigationType:{type:String,default:d.LIST_ITEM_NAVIGATION_TYPES.ARROW_KEYS,validator:e=>Object.values(d.LIST_ITEM_NAVIGATION_TYPES).includes(e)},fallbackPlacements:{type:Array,default:()=>["auto"]},placement:{type:String,default:"bottom"},onBeginningOfList:{type:Function,default:null},onEndOfList:{type:Function,default:null},listClass:{type:[String,Array,Object],default:""},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>f.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},tether:{type:Boolean,default:!0},transition:{type:String,default:"fade"}},emits:["keydown","highlight","update:open","opened","update:open"],data(){return{LIST_ITEM_NAVIGATION_TYPES:d.LIST_ITEM_NAVIGATION_TYPES,DROPDOWN_PADDING_CLASSES:l.DROPDOWN_PADDING_CLASSES,EVENT_KEYNAMES:o.EVENT_KEYNAMES,openedWithKeyboard:!1,isOpen:null}},computed:{dropdownListeners(){return{opened:e=>{this.updateInitialHighlightIndex(e)},keydown:e=>{switch(e.code){case o.EVENT_KEYNAMES.up:case o.EVENT_KEYNAMES.arrowup:this.onUpKeyPress(e),e.stopPropagation(),e.preventDefault();break;case o.EVENT_KEYNAMES.down:case o.EVENT_KEYNAMES.arrowdown:this.onDownKeyPress(e),e.stopPropagation(),e.preventDefault();break;case o.EVENT_KEYNAMES.space:case o.EVENT_KEYNAMES.spacebar:this.onSpaceKey();break;case o.EVENT_KEYNAMES.enter:this.onEnterKey();break;case o.EVENT_KEYNAMES.home:this.onHomeKeyPress(e),e.stopPropagation(),e.preventDefault();break;case o.EVENT_KEYNAMES.end:this.onEndKeyPress(e),e.stopPropagation(),e.preventDefault();break;default:this.onKeyPress(e);break}this.$emit("keydown",e)}}},beginningOfListMethod(){return this.onBeginningOfList||this.jumpToEnd},endOfListMethod(){return this.onEndOfList||this.jumpToBeginning},activeItemEl(){return this.getListElement().querySelector("#"+this.highlightId)},isArrowKeyNav(){return this.navigationType===this.LIST_ITEM_NAVIGATION_TYPES.ARROW_KEYS},listClasses(){return["d-dropdown-list",l.DROPDOWN_PADDING_CLASSES[this.padding],this.listClass,{"d-context-menu-list":this.openOnContext}]},shouldOpenWithArrowKeys(){return!this.openOnContext}},methods:{onMouseHighlight(e){const i=e.target.closest("li");i&&i.role&&this.highlightId!==i.id&&(this.setHighlightId(i.id),i.focus())},getListElement(){return this.$refs.listWrapper},clearHighlightIndex(){this.setHighlightIndex(-1)},afterHighlight(){this.highlightIndex!==this._itemsLength()-1&&this.$emit("highlight",this.highlightIndex)},updateInitialHighlightIndex(e){this.isOpen=e,e?(this.openedWithKeyboard&&this.isArrowKeyNav&&this.setHighlightIndex(0),this.$emit("opened",!0)):(this.clearHighlightIndex(),this.openedWithKeyboard=!1,this.$emit("opened",!1))},onSpaceKey(){this.open||(this.openedWithKeyboard=!0)},onEnterKey(){this.open||(this.openedWithKeyboard=!0)},onUpKeyPress(){if(!this.isOpen){this.openedWithKeyboard=!0;return}if(this.isArrowKeyNav)return this.onUpKey()},onDownKeyPress(){if(!this.isOpen){this.openedWithKeyboard=!0;return}if(this.isArrowKeyNav)return this.onDownKey()},onHomeKeyPress(){if(!(!this.isOpen||!this.isArrowKeyNav))return this.onHomeKey()},onEndKeyPress(){if(!(!this.isOpen||!this.isArrowKeyNav))return this.onEndKey()},onKeyPress(e){if(!(!this.isOpen||!this.isArrowKeyNav||!this.isValidLetter(e.key)))return e.stopPropagation(),e.preventDefault(),this.onNavigationKey(e.key)}}},y=["id"];function _(e,i,n,K,h,s){const u=t.resolveComponent("dt-popover");return t.openBlock(),t.createBlock(u,t.mergeProps({ref:"popover","content-width":n.contentWidth,open:n.open,placement:n.placement,"initial-focus-element":h.openedWithKeyboard?"first":"dialog","fallback-placements":n.fallbackPlacements,padding:"none",role:"menu","append-to":n.appendTo,modal:n.modal,"max-height":n.maxHeight,"max-width":n.maxWidth,"open-with-arrow-keys":s.shouldOpenWithArrowKeys,"open-on-context":n.openOnContext},e.$attrs,{tether:n.tether,transition:n.transition},t.toHandlers(s.dropdownListeners)),{anchor:t.withCtx(({attrs:r})=>[t.renderSlot(e.$slots,"anchor",t.mergeProps({ref:"anchor"},r))]),content:t.withCtx(({close:r})=>[t.createElementVNode("ul",{id:n.listId,ref:"listWrapper",class:t.normalizeClass(s.listClasses),"data-qa":"dt-dropdown-list-wrapper",onMouseleave:i[0]||(i[0]=(...a)=>s.clearHighlightIndex&&s.clearHighlightIndex(...a)),onMousemoveCapture:i[1]||(i[1]=(...a)=>s.onMouseHighlight&&s.onMouseHighlight(...a))},[t.renderSlot(e.$slots,"list",{close:r})],42,y)]),footerContent:t.withCtx(({close:r})=>[t.renderSlot(e.$slots,"footer",{close:r})]),_:3},16,["content-width","open","placement","initial-focus-element","fallback-placements","append-to","modal","max-height","max-width","open-with-arrow-keys","open-on-context","tether","transition"])}const S=c._(m,[["render",_]]);exports.default=S;
2
2
  //# sourceMappingURL=dropdown.cjs.map