@dialpad/dialtone-vue 3.120.0 → 3.120.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (425) hide show
  1. package/dist/chunks/_plugin-vue_export-helper-caHeSgYY.js +11 -0
  2. package/dist/chunks/_plugin-vue_export-helper-caHeSgYY.js.map +1 -0
  3. package/dist/chunks/_plugin-vue_export-helper-fhnQq0tA.js +10 -0
  4. package/dist/chunks/_plugin-vue_export-helper-fhnQq0tA.js.map +1 -0
  5. package/dist/chunks/{dropdown-eWOvBvwq.js → dropdown-Hn-TeTvZ.js} +151 -104
  6. package/dist/chunks/{dropdown-UO3UJalk.js.map → dropdown-Hn-TeTvZ.js.map} +1 -1
  7. package/dist/chunks/dropdown-w8Do29L5.js +442 -0
  8. package/dist/chunks/{dropdown-eWOvBvwq.js.map → dropdown-w8Do29L5.js.map} +1 -1
  9. package/dist/chunks/dropdown_constants-2pGCXy7m.js +8 -0
  10. package/dist/chunks/dropdown_constants-2pGCXy7m.js.map +1 -0
  11. package/dist/chunks/dropdown_constants-w1MXGC3Z.js +9 -0
  12. package/dist/chunks/dropdown_constants-w1MXGC3Z.js.map +1 -0
  13. package/dist/chunks/{icon_constants-OpYAAKwF.js → icon_constants-Dy4MEUJL.js} +7 -6
  14. package/dist/chunks/{icon_constants-2S_OSQ1t.js.map → icon_constants-Dy4MEUJL.js.map} +1 -1
  15. package/dist/chunks/icon_constants-QYpmdE0R.js +16 -0
  16. package/dist/chunks/{icon_constants-OpYAAKwF.js.map → icon_constants-QYpmdE0R.js.map} +1 -1
  17. package/dist/chunks/index-4qgKeErp.js +446 -0
  18. package/dist/chunks/{index-b4iXYvId.js.map → index-4qgKeErp.js.map} +1 -1
  19. package/dist/chunks/index-b_MgDylR.js +447 -0
  20. package/dist/chunks/{index-6tYeqbgP.js.map → index-b_MgDylR.js.map} +1 -1
  21. package/dist/chunks/{input-4UQWegUk.js → input-NmYDD5bn.js} +83 -60
  22. package/dist/chunks/{input-0Uksk4DP.js.map → input-NmYDD5bn.js.map} +1 -1
  23. package/dist/chunks/input-ttnte8zB.js +295 -0
  24. package/dist/chunks/{input-4UQWegUk.js.map → input-ttnte8zB.js.map} +1 -1
  25. package/dist/chunks/input_group-M-D25pOJ.js +152 -0
  26. package/dist/chunks/{input_group-bBKaq3Wi.js.map → input_group-M-D25pOJ.js.map} +1 -1
  27. package/dist/chunks/{input_group-bBKaq3Wi.js → input_group-jWnq2DJT.js} +27 -24
  28. package/dist/chunks/{input_group-AS760Cp7.js.map → input_group-jWnq2DJT.js.map} +1 -1
  29. package/dist/chunks/keyboard_list_navigation-ScXhrxya.js +284 -0
  30. package/dist/chunks/{keyboard_list_navigation-N74Bpdq7.js.map → keyboard_list_navigation-ScXhrxya.js.map} +1 -1
  31. package/dist/chunks/keyboard_list_navigation-fJnl_Iox.js +283 -0
  32. package/dist/chunks/{keyboard_list_navigation-F0O8nht0.js.map → keyboard_list_navigation-fJnl_Iox.js.map} +1 -1
  33. package/dist/chunks/link_constants-Huj7D_hm.js +22 -0
  34. package/dist/chunks/{link_constants-Kn6kP4i1.js.map → link_constants-Huj7D_hm.js.map} +1 -1
  35. package/dist/chunks/link_constants-nWVlXQBs.js +23 -0
  36. package/dist/chunks/{link_constants-vIUB92L4.js.map → link_constants-nWVlXQBs.js.map} +1 -1
  37. package/dist/chunks/list_item_constants-EiqkqZvP.js +13 -0
  38. package/dist/chunks/{list_item_constants-Tsz5CO1m.js.map → list_item_constants-EiqkqZvP.js.map} +1 -1
  39. package/dist/chunks/list_item_constants-u1xcN9Dd.js +14 -0
  40. package/dist/chunks/{list_item_constants-LTUc74pD.js.map → list_item_constants-u1xcN9Dd.js.map} +1 -1
  41. package/dist/chunks/modal-VgxXAQFP.js +105 -0
  42. package/dist/chunks/{modal-qEzlo0Sj.js.map → modal-VgxXAQFP.js.map} +1 -1
  43. package/dist/chunks/modal-XOr4kiNZ.js +106 -0
  44. package/dist/chunks/{modal-VuMFkZFH.js.map → modal-XOr4kiNZ.js.map} +1 -1
  45. package/dist/chunks/notice_action-WTucGhvr.js +222 -0
  46. package/dist/chunks/{notice_action-tJfD5Qw1.js.map → notice_action-WTucGhvr.js.map} +1 -1
  47. package/dist/chunks/notice_action-p-ePanW_.js +223 -0
  48. package/dist/chunks/{notice_action-jO199emq.js.map → notice_action-p-ePanW_.js.map} +1 -1
  49. package/dist/chunks/notice_constants-7Qt2CQEY.js +7 -0
  50. package/dist/chunks/{notice_constants-mC6al2Dm.js.map → notice_constants-7Qt2CQEY.js.map} +1 -1
  51. package/dist/chunks/notice_constants-UXo9e3bS.js +6 -0
  52. package/dist/chunks/{notice_constants-c--hBFQw.js.map → notice_constants-UXo9e3bS.js.map} +1 -1
  53. package/dist/chunks/popover_constants-JwBF9h1Z.js +143 -0
  54. package/dist/chunks/{popover_constants-hOEhklvr.js.map → popover_constants-JwBF9h1Z.js.map} +1 -1
  55. package/dist/chunks/popover_constants-Qkpb0yh2.js +144 -0
  56. package/dist/chunks/{popover_constants-qjlEkroB.js.map → popover_constants-Qkpb0yh2.js.map} +1 -1
  57. package/dist/chunks/{sr_only_close_button-7O-Ev8uM.js → sr_only_close_button-3EdsV-dH.js} +28 -24
  58. package/dist/chunks/{sr_only_close_button-iD7s1Pbj.js.map → sr_only_close_button-3EdsV-dH.js.map} +1 -1
  59. package/dist/chunks/sr_only_close_button-xGrHFjwA.js +91 -0
  60. package/dist/chunks/{sr_only_close_button-7O-Ev8uM.js.map → sr_only_close_button-xGrHFjwA.js.map} +1 -1
  61. package/dist/chunks/stack_constants-HraCekPm.js +15 -0
  62. package/dist/chunks/{stack_constants-m9Ickqw0.js.map → stack_constants-HraCekPm.js.map} +1 -1
  63. package/dist/chunks/stack_constants-SMzMWnAQ.js +14 -0
  64. package/dist/chunks/{stack_constants-u7tNqGtc.js.map → stack_constants-SMzMWnAQ.js.map} +1 -1
  65. package/dist/chunks/tab-RTDgnD9-.js +391 -0
  66. package/dist/chunks/{tab-at7WWglk.js.map → tab-RTDgnD9-.js.map} +1 -1
  67. package/dist/chunks/tab-qc3f42Yp.js +390 -0
  68. package/dist/chunks/{tab-GQZFMq83.js.map → tab-qc3f42Yp.js.map} +1 -1
  69. package/dist/common/constants.cjs +60 -0
  70. package/dist/{lib → common}/constants.cjs.map +1 -1
  71. package/dist/{lib → common}/constants.js +25 -18
  72. package/dist/{lib → common}/constants.js.map +1 -1
  73. package/dist/common/dates.cjs +72 -0
  74. package/dist/{lib → common}/dates.cjs.map +1 -1
  75. package/dist/common/dates.js +72 -0
  76. package/dist/{lib → common}/dates.js.map +1 -1
  77. package/dist/common/emoji.cjs +163 -0
  78. package/dist/common/emoji.cjs.map +1 -0
  79. package/dist/common/emoji.js +168 -0
  80. package/dist/common/emoji.js.map +1 -0
  81. package/dist/common/mixins.cjs +17 -0
  82. package/dist/{lib → common}/mixins.cjs.map +1 -1
  83. package/dist/common/mixins.js +17 -0
  84. package/dist/common/utils.cjs +243 -0
  85. package/dist/{lib → common}/utils.cjs.map +1 -1
  86. package/dist/common/utils.js +243 -0
  87. package/dist/{lib → common}/utils.js.map +1 -1
  88. package/dist/common/validators.cjs +23 -0
  89. package/dist/{lib → common}/validators.cjs.map +1 -1
  90. package/dist/common/validators.js +23 -0
  91. package/dist/{lib → common}/validators.js.map +1 -1
  92. package/dist/dialtone-vue.cjs +373 -1
  93. package/dist/dialtone-vue.cjs.map +1 -1
  94. package/dist/dialtone-vue.js +328 -327
  95. package/dist/dialtone-vue.js.map +1 -1
  96. package/dist/lib/attachment-carousel.cjs +345 -1
  97. package/dist/lib/attachment-carousel.cjs.map +1 -1
  98. package/dist/lib/attachment-carousel.js +126 -108
  99. package/dist/lib/attachment-carousel.js.map +1 -1
  100. package/dist/lib/avatar.cjs +447 -1
  101. package/dist/lib/avatar.cjs.map +1 -1
  102. package/dist/lib/avatar.js +135 -101
  103. package/dist/lib/avatar.js.map +1 -1
  104. package/dist/lib/badge.cjs +206 -1
  105. package/dist/lib/badge.cjs.map +1 -1
  106. package/dist/lib/badge.js +64 -48
  107. package/dist/lib/badge.js.map +1 -1
  108. package/dist/lib/banner.cjs +242 -2
  109. package/dist/lib/banner.cjs.map +1 -1
  110. package/dist/lib/banner.js +81 -71
  111. package/dist/lib/banner.js.map +1 -1
  112. package/dist/lib/breadcrumbs.cjs +150 -1
  113. package/dist/lib/breadcrumbs.cjs.map +1 -1
  114. package/dist/lib/breadcrumbs.js +60 -52
  115. package/dist/lib/breadcrumbs.js.map +1 -1
  116. package/dist/lib/button-group.cjs +41 -1
  117. package/dist/lib/button-group.cjs.map +1 -1
  118. package/dist/lib/button-group.js +15 -14
  119. package/dist/lib/button-group.js.map +1 -1
  120. package/dist/lib/button.cjs +356 -1
  121. package/dist/lib/button.cjs.map +1 -1
  122. package/dist/lib/button.js +108 -88
  123. package/dist/lib/button.js.map +1 -1
  124. package/dist/lib/callbar-button-with-popover.cjs +322 -1
  125. package/dist/lib/callbar-button-with-popover.cjs.map +1 -1
  126. package/dist/lib/callbar-button-with-popover.js +101 -83
  127. package/dist/lib/callbar-button-with-popover.js.map +1 -1
  128. package/dist/lib/callbar-button.cjs +200 -1
  129. package/dist/lib/callbar-button.cjs.map +1 -1
  130. package/dist/lib/callbar-button.js +52 -45
  131. package/dist/lib/callbar-button.js.map +1 -1
  132. package/dist/lib/callbox.cjs +217 -1
  133. package/dist/lib/callbox.cjs.map +1 -1
  134. package/dist/lib/callbox.js +80 -67
  135. package/dist/lib/callbox.js.map +1 -1
  136. package/dist/lib/card.cjs +91 -1
  137. package/dist/lib/card.cjs.map +1 -1
  138. package/dist/lib/card.js +27 -27
  139. package/dist/lib/card.js.map +1 -1
  140. package/dist/lib/checkbox-group.cjs +115 -1
  141. package/dist/lib/checkbox-group.cjs.map +1 -1
  142. package/dist/lib/checkbox-group.js +34 -23
  143. package/dist/lib/checkbox-group.js.map +1 -1
  144. package/dist/lib/checkbox.cjs +156 -1
  145. package/dist/lib/checkbox.cjs.map +1 -1
  146. package/dist/lib/checkbox.js +72 -60
  147. package/dist/lib/checkbox.js.map +1 -1
  148. package/dist/lib/chip.cjs +235 -1
  149. package/dist/lib/chip.cjs.map +1 -1
  150. package/dist/lib/chip.js +84 -67
  151. package/dist/lib/chip.js.map +1 -1
  152. package/dist/lib/codeblock.cjs +23 -2
  153. package/dist/lib/codeblock.cjs.map +1 -1
  154. package/dist/lib/codeblock.js +13 -13
  155. package/dist/lib/codeblock.js.map +1 -1
  156. package/dist/lib/collapsible.cjs +398 -1
  157. package/dist/lib/collapsible.cjs.map +1 -1
  158. package/dist/lib/collapsible.js +123 -100
  159. package/dist/lib/collapsible.js.map +1 -1
  160. package/dist/lib/combobox-multi-select.cjs +589 -1
  161. package/dist/lib/combobox-multi-select.cjs.map +1 -1
  162. package/dist/lib/combobox-multi-select.js +270 -177
  163. package/dist/lib/combobox-multi-select.js.map +1 -1
  164. package/dist/lib/combobox-with-popover.cjs +452 -1
  165. package/dist/lib/combobox-with-popover.cjs.map +1 -1
  166. package/dist/lib/combobox-with-popover.js +172 -127
  167. package/dist/lib/combobox-with-popover.js.map +1 -1
  168. package/dist/lib/combobox.cjs +18 -1
  169. package/dist/lib/combobox.cjs.map +1 -1
  170. package/dist/lib/combobox.js +9 -9
  171. package/dist/lib/contact-info.cjs +205 -1
  172. package/dist/lib/contact-info.cjs.map +1 -1
  173. package/dist/lib/contact-info.js +69 -60
  174. package/dist/lib/contact-info.js.map +1 -1
  175. package/dist/lib/contact-row.cjs +246 -1
  176. package/dist/lib/contact-row.cjs.map +1 -1
  177. package/dist/lib/contact-row.js +67 -63
  178. package/dist/lib/contact-row.js.map +1 -1
  179. package/dist/lib/datepicker.cjs +854 -1
  180. package/dist/lib/datepicker.cjs.map +1 -1
  181. package/dist/lib/datepicker.js +585 -441
  182. package/dist/lib/datepicker.js.map +1 -1
  183. package/dist/lib/description-list.cjs +116 -1
  184. package/dist/lib/description-list.cjs.map +1 -1
  185. package/dist/lib/description-list.js +56 -24
  186. package/dist/lib/description-list.js.map +1 -1
  187. package/dist/lib/dropdown.cjs +36 -1
  188. package/dist/lib/dropdown.cjs.map +1 -1
  189. package/dist/lib/dropdown.js +22 -21
  190. package/dist/lib/dropdown.js.map +1 -1
  191. package/dist/lib/editor.cjs +711 -1
  192. package/dist/lib/editor.cjs.map +1 -1
  193. package/dist/lib/editor.js +271 -235
  194. package/dist/lib/editor.js.map +1 -1
  195. package/dist/lib/emoji-picker.cjs +1277 -1
  196. package/dist/lib/emoji-picker.cjs.map +1 -1
  197. package/dist/lib/emoji-picker.js +859 -569
  198. package/dist/lib/emoji-picker.js.map +1 -1
  199. package/dist/lib/emoji-row.cjs +128 -1
  200. package/dist/lib/emoji-row.cjs.map +1 -1
  201. package/dist/lib/emoji-row.js +89 -75
  202. package/dist/lib/emoji-row.js.map +1 -1
  203. package/dist/lib/emoji-text-wrapper.cjs +102 -1
  204. package/dist/lib/emoji-text-wrapper.cjs.map +1 -1
  205. package/dist/lib/emoji-text-wrapper.js +42 -31
  206. package/dist/lib/emoji-text-wrapper.js.map +1 -1
  207. package/dist/lib/emoji.cjs +158 -1
  208. package/dist/lib/emoji.cjs.map +1 -1
  209. package/dist/lib/emoji.js +153 -6
  210. package/dist/lib/emoji.js.map +1 -1
  211. package/dist/lib/feed-item-row.cjs +296 -1
  212. package/dist/lib/feed-item-row.cjs.map +1 -1
  213. package/dist/lib/feed-item-row.js +119 -100
  214. package/dist/lib/feed-item-row.js.map +1 -1
  215. package/dist/lib/feed-pill.cjs +173 -1
  216. package/dist/lib/feed-pill.cjs.map +1 -1
  217. package/dist/lib/feed-pill.js +70 -57
  218. package/dist/lib/feed-pill.js.map +1 -1
  219. package/dist/lib/general-row.cjs +518 -1
  220. package/dist/lib/general-row.cjs.map +1 -1
  221. package/dist/lib/general-row.js +186 -148
  222. package/dist/lib/general-row.js.map +1 -1
  223. package/dist/lib/group-row.cjs +116 -1
  224. package/dist/lib/group-row.cjs.map +1 -1
  225. package/dist/lib/group-row.js +37 -35
  226. package/dist/lib/group-row.js.map +1 -1
  227. package/dist/lib/grouped-chip.cjs +96 -1
  228. package/dist/lib/grouped-chip.cjs.map +1 -1
  229. package/dist/lib/grouped-chip.js +51 -46
  230. package/dist/lib/grouped-chip.js.map +1 -1
  231. package/dist/lib/hovercard.cjs +223 -1
  232. package/dist/lib/hovercard.cjs.map +1 -1
  233. package/dist/lib/hovercard.js +115 -80
  234. package/dist/lib/hovercard.js.map +1 -1
  235. package/dist/lib/icon.cjs +58 -1
  236. package/dist/lib/icon.cjs.map +1 -1
  237. package/dist/lib/icon.js +20 -20
  238. package/dist/lib/icon.js.map +1 -1
  239. package/dist/lib/image-viewer.cjs +243 -1
  240. package/dist/lib/image-viewer.cjs.map +1 -1
  241. package/dist/lib/image-viewer.js +104 -80
  242. package/dist/lib/image-viewer.js.map +1 -1
  243. package/dist/lib/input-group.cjs +91 -1
  244. package/dist/lib/input-group.cjs.map +1 -1
  245. package/dist/lib/input-group.js +41 -39
  246. package/dist/lib/input-group.js.map +1 -1
  247. package/dist/lib/input.cjs +578 -1
  248. package/dist/lib/input.cjs.map +1 -1
  249. package/dist/lib/input.js +185 -137
  250. package/dist/lib/input.js.map +1 -1
  251. package/dist/lib/item-layout.cjs +91 -1
  252. package/dist/lib/item-layout.cjs.map +1 -1
  253. package/dist/lib/item-layout.js +45 -39
  254. package/dist/lib/item-layout.js.map +1 -1
  255. package/dist/lib/ivr-node.cjs +263 -1
  256. package/dist/lib/ivr-node.cjs.map +1 -1
  257. package/dist/lib/ivr-node.js +130 -112
  258. package/dist/lib/ivr-node.js.map +1 -1
  259. package/dist/lib/keyboard-shortcut.cjs +119 -1
  260. package/dist/lib/keyboard-shortcut.cjs.map +1 -1
  261. package/dist/lib/keyboard-shortcut.js +58 -48
  262. package/dist/lib/keyboard-shortcut.js.map +1 -1
  263. package/dist/lib/lazy-show.cjs +82 -1
  264. package/dist/lib/lazy-show.cjs.map +1 -1
  265. package/dist/lib/lazy-show.js +21 -19
  266. package/dist/lib/lazy-show.js.map +1 -1
  267. package/dist/lib/link.cjs +43 -1
  268. package/dist/lib/link.cjs.map +1 -1
  269. package/dist/lib/link.js +20 -19
  270. package/dist/lib/link.js.map +1 -1
  271. package/dist/lib/list-item-group.cjs +67 -1
  272. package/dist/lib/list-item-group.cjs.map +1 -1
  273. package/dist/lib/list-item-group.js +24 -22
  274. package/dist/lib/list-item-group.js.map +1 -1
  275. package/dist/lib/list-item.cjs +216 -1
  276. package/dist/lib/list-item.cjs.map +1 -1
  277. package/dist/lib/list-item.js +71 -60
  278. package/dist/lib/list-item.js.map +1 -1
  279. package/dist/lib/message-input.cjs +708 -1
  280. package/dist/lib/message-input.cjs.map +1 -1
  281. package/dist/lib/message-input.js +232 -206
  282. package/dist/lib/message-input.js.map +1 -1
  283. package/dist/lib/modal.cjs +444 -2
  284. package/dist/lib/modal.cjs.map +1 -1
  285. package/dist/lib/modal.js +153 -120
  286. package/dist/lib/modal.js.map +1 -1
  287. package/dist/lib/notice.cjs +197 -1
  288. package/dist/lib/notice.cjs.map +1 -1
  289. package/dist/lib/notice.js +66 -63
  290. package/dist/lib/notice.js.map +1 -1
  291. package/dist/lib/pagination.cjs +205 -1
  292. package/dist/lib/pagination.cjs.map +1 -1
  293. package/dist/lib/pagination.js +96 -81
  294. package/dist/lib/pagination.js.map +1 -1
  295. package/dist/lib/popover.cjs +1080 -1
  296. package/dist/lib/popover.cjs.map +1 -1
  297. package/dist/lib/popover.js +447 -267
  298. package/dist/lib/popover.js.map +1 -1
  299. package/dist/lib/presence.cjs +70 -1
  300. package/dist/lib/presence.cjs.map +1 -1
  301. package/dist/lib/presence.js +33 -27
  302. package/dist/lib/presence.js.map +1 -1
  303. package/dist/lib/radio-group.cjs +88 -1
  304. package/dist/lib/radio-group.cjs.map +1 -1
  305. package/dist/lib/radio-group.js +18 -18
  306. package/dist/lib/radio-group.js.map +1 -1
  307. package/dist/lib/radio.cjs +162 -1
  308. package/dist/lib/radio.cjs.map +1 -1
  309. package/dist/lib/radio.js +66 -57
  310. package/dist/lib/radio.js.map +1 -1
  311. package/dist/lib/rich-text-editor.cjs +1137 -1
  312. package/dist/lib/rich-text-editor.cjs.map +1 -1
  313. package/dist/lib/rich-text-editor.js +567 -386
  314. package/dist/lib/rich-text-editor.js.map +1 -1
  315. package/dist/lib/root-layout.cjs +158 -1
  316. package/dist/lib/root-layout.cjs.map +1 -1
  317. package/dist/lib/root-layout.js +33 -31
  318. package/dist/lib/root-layout.js.map +1 -1
  319. package/dist/lib/scroller.cjs +1090 -1
  320. package/dist/lib/scroller.cjs.map +1 -1
  321. package/dist/lib/scroller.js +668 -345
  322. package/dist/lib/scroller.js.map +1 -1
  323. package/dist/lib/select-menu.cjs +312 -1
  324. package/dist/lib/select-menu.cjs.map +1 -1
  325. package/dist/lib/select-menu.js +124 -79
  326. package/dist/lib/select-menu.js.map +1 -1
  327. package/dist/lib/settings-menu-button.cjs +77 -1
  328. package/dist/lib/settings-menu-button.cjs.map +1 -1
  329. package/dist/lib/settings-menu-button.js +31 -30
  330. package/dist/lib/settings-menu-button.js.map +1 -1
  331. package/dist/lib/skeleton.cjs +635 -1
  332. package/dist/lib/skeleton.cjs.map +1 -1
  333. package/dist/lib/skeleton.js +189 -152
  334. package/dist/lib/skeleton.js.map +1 -1
  335. package/dist/lib/stack.cjs +123 -1
  336. package/dist/lib/stack.cjs.map +1 -1
  337. package/dist/lib/stack.js +61 -53
  338. package/dist/lib/stack.js.map +1 -1
  339. package/dist/lib/tabs.cjs +102 -1
  340. package/dist/lib/tabs.cjs.map +1 -1
  341. package/dist/lib/tabs.js +47 -41
  342. package/dist/lib/tabs.js.map +1 -1
  343. package/dist/lib/time-pill.cjs +41 -1
  344. package/dist/lib/time-pill.cjs.map +1 -1
  345. package/dist/lib/time-pill.js +18 -14
  346. package/dist/lib/time-pill.js.map +1 -1
  347. package/dist/lib/toast.cjs +281 -1
  348. package/dist/lib/toast.cjs.map +1 -1
  349. package/dist/lib/toast.js +96 -74
  350. package/dist/lib/toast.js.map +1 -1
  351. package/dist/lib/toggle.cjs +192 -1
  352. package/dist/lib/toggle.cjs.map +1 -1
  353. package/dist/lib/toggle.js +60 -49
  354. package/dist/lib/toggle.js.map +1 -1
  355. package/dist/lib/tooltip-directive.cjs +84 -1
  356. package/dist/lib/tooltip-directive.cjs.map +1 -1
  357. package/dist/lib/tooltip-directive.js +56 -42
  358. package/dist/lib/tooltip-directive.js.map +1 -1
  359. package/dist/lib/tooltip.cjs +460 -1
  360. package/dist/lib/tooltip.cjs.map +1 -1
  361. package/dist/lib/tooltip.js +162 -103
  362. package/dist/lib/tooltip.js.map +1 -1
  363. package/dist/lib/top-banner-info.cjs +71 -1
  364. package/dist/lib/top-banner-info.cjs.map +1 -1
  365. package/dist/lib/top-banner-info.js +27 -22
  366. package/dist/lib/top-banner-info.js.map +1 -1
  367. package/dist/lib/unread-pill.cjs +73 -1
  368. package/dist/lib/unread-pill.cjs.map +1 -1
  369. package/dist/lib/unread-pill.js +28 -25
  370. package/dist/lib/unread-pill.js.map +1 -1
  371. package/dist/lib/validation-messages.cjs +89 -1
  372. package/dist/lib/validation-messages.cjs.map +1 -1
  373. package/dist/lib/validation-messages.js +41 -36
  374. package/dist/lib/validation-messages.js.map +1 -1
  375. package/dist/style.css +1257 -1
  376. package/dist/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +2 -2
  377. package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +2 -2
  378. package/package.json +30 -29
  379. package/dist/chunks/_plugin-vue_export-helper-6_y-gaV6.js +0 -2
  380. package/dist/chunks/_plugin-vue_export-helper-6_y-gaV6.js.map +0 -1
  381. package/dist/chunks/_plugin-vue_export-helper-hUChTQA_.js +0 -10
  382. package/dist/chunks/_plugin-vue_export-helper-hUChTQA_.js.map +0 -1
  383. package/dist/chunks/dropdown-UO3UJalk.js +0 -2
  384. package/dist/chunks/dropdown_constants-EUcDxBrX.js +0 -9
  385. package/dist/chunks/dropdown_constants-EUcDxBrX.js.map +0 -1
  386. package/dist/chunks/dropdown_constants-KHFvVI2L.js +0 -2
  387. package/dist/chunks/dropdown_constants-KHFvVI2L.js.map +0 -1
  388. package/dist/chunks/icon_constants-2S_OSQ1t.js +0 -2
  389. package/dist/chunks/index-6tYeqbgP.js +0 -3
  390. package/dist/chunks/index-IBtQ5jRJ.js +0 -2
  391. package/dist/chunks/index-IBtQ5jRJ.js.map +0 -1
  392. package/dist/chunks/index-b4iXYvId.js +0 -399
  393. package/dist/chunks/index-mRmwpCBG.js +0 -256
  394. package/dist/chunks/index-mRmwpCBG.js.map +0 -1
  395. package/dist/chunks/input-0Uksk4DP.js +0 -2
  396. package/dist/chunks/input_group-AS760Cp7.js +0 -2
  397. package/dist/chunks/keyboard_list_navigation-F0O8nht0.js +0 -197
  398. package/dist/chunks/keyboard_list_navigation-N74Bpdq7.js +0 -2
  399. package/dist/chunks/link_constants-Kn6kP4i1.js +0 -2
  400. package/dist/chunks/link_constants-vIUB92L4.js +0 -16
  401. package/dist/chunks/list_item_constants-LTUc74pD.js +0 -13
  402. package/dist/chunks/list_item_constants-Tsz5CO1m.js +0 -2
  403. package/dist/chunks/modal-VuMFkZFH.js +0 -82
  404. package/dist/chunks/modal-qEzlo0Sj.js +0 -2
  405. package/dist/chunks/notice_action-jO199emq.js +0 -2
  406. package/dist/chunks/notice_action-tJfD5Qw1.js +0 -209
  407. package/dist/chunks/notice_constants-c--hBFQw.js +0 -6
  408. package/dist/chunks/notice_constants-mC6al2Dm.js +0 -2
  409. package/dist/chunks/popover_constants-hOEhklvr.js +0 -2
  410. package/dist/chunks/popover_constants-qjlEkroB.js +0 -114
  411. package/dist/chunks/sr_only_close_button-iD7s1Pbj.js +0 -3
  412. package/dist/chunks/stack_constants-m9Ickqw0.js +0 -2
  413. package/dist/chunks/stack_constants-u7tNqGtc.js +0 -13
  414. package/dist/chunks/tab-GQZFMq83.js +0 -367
  415. package/dist/chunks/tab-at7WWglk.js +0 -2
  416. package/dist/lib/constants.cjs +0 -2
  417. package/dist/lib/dates.cjs +0 -2
  418. package/dist/lib/dates.js +0 -57
  419. package/dist/lib/mixins.cjs +0 -2
  420. package/dist/lib/mixins.js +0 -17
  421. package/dist/lib/utils.cjs +0 -2
  422. package/dist/lib/utils.js +0 -171
  423. package/dist/lib/validators.cjs +0 -2
  424. package/dist/lib/validators.js +0 -12
  425. /package/dist/{lib → common}/mixins.js.map +0 -0
@@ -1,154 +1,233 @@
1
- import { ref as M, computed as I, watch as K, onMounted as J, openBlock as g, createBlock as G, unref as r, withCtx as h, createVNode as m, createElementVNode as w, toDisplayString as N, nextTick as T, createElementBlock as $, Fragment as A, renderList as R, normalizeClass as Z, createTextVNode as j } from "vue";
2
- import { startOfWeek as Q, addDays as C, getDay as P, addMonths as U, startOfMonth as X, getDate as E, endOfMonth as _, subMonths as V, getMonth as F, isEqual as ee, getYear as W, set as te, format as ae } from "date-fns";
3
- import { DtStack as q } from "./stack.js";
4
- import { DtTooltip as S } from "./tooltip.js";
5
- import { DtButton as L } from "./button.js";
6
- import { DtIcon as Y } from "./icon.js";
7
- import "../chunks/stack_constants-u7tNqGtc.js";
8
- import "../chunks/_plugin-vue_export-helper-hUChTQA_.js";
9
- import "../chunks/popover_constants-qjlEkroB.js";
1
+ import { ref, computed, watch, onMounted, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, toDisplayString, nextTick, createElementBlock, Fragment, renderList, normalizeClass, createTextVNode } from "vue";
2
+ import { startOfWeek, addDays, getDay, addMonths, startOfMonth, getDate, endOfMonth, subMonths, getMonth, isEqual, getYear, set, format } from "date-fns";
3
+ import { DtStack } from "./stack.js";
4
+ import { DtTooltip } from "./tooltip.js";
5
+ import { DtButton } from "./button.js";
6
+ import { DtIcon } from "./icon.js";
7
+ import "../chunks/stack_constants-HraCekPm.js";
8
+ import "../chunks/_plugin-vue_export-helper-caHeSgYY.js";
9
+ import "../chunks/popover_constants-Qkpb0yh2.js";
10
10
  import "tippy.js";
11
- import "./utils.js";
12
- import "./constants.js";
11
+ import "../common/utils.js";
12
+ import "../common/constants.js";
13
13
  import "./lazy-show.js";
14
- import "../chunks/link_constants-vIUB92L4.js";
14
+ import "../chunks/link_constants-nWVlXQBs.js";
15
15
  import "@dialpad/dialtone-icons/vue3";
16
- import "../chunks/icon_constants-OpYAAKwF.js";
16
+ import "../chunks/icon_constants-Dy4MEUJL.js";
17
17
  import "@dialpad/dialtone-icons/icons.json";
18
- const H = 0, ne = "MMMM", z = "long", B = (e) => e ? new Date(e) : /* @__PURE__ */ new Date(), re = (e, n, s) => {
19
- const t = B(JSON.parse(JSON.stringify(e))), a = [];
20
- for (let o = 0; o < 7; o++) {
21
- const u = C(t, o), d = F(u) !== n;
22
- a.push({
23
- text: u.getDate(),
24
- value: u,
25
- currentMonth: !d,
26
- isFirstDayOfMonth: u.getDate() === 1 && !d,
18
+ const WEEK_START = 0;
19
+ const MONTH_FORMAT = "MMMM";
20
+ const INTL_MONTH_FORMAT = "long";
21
+ const _parsedGetDate = (value) => value ? new Date(value) : /* @__PURE__ */ new Date();
22
+ const getWeekDays = (startDay, month, selectedDay) => {
23
+ const startDate = _parsedGetDate(JSON.parse(JSON.stringify(startDay)));
24
+ const dates = [];
25
+ for (let i = 0; i < 7; i++) {
26
+ const next = addDays(startDate, i);
27
+ const isNext = getMonth(next) !== month;
28
+ dates.push({
29
+ text: next.getDate(),
30
+ value: next,
31
+ currentMonth: !isNext,
32
+ isFirstDayOfMonth: next.getDate() === 1 && !isNext,
27
33
  // will be selected if the date is the same as the selected day and is from the current month
28
- selected: s ? u.getDate() === s && !d : !1
34
+ selected: selectedDay ? next.getDate() === selectedDay && !isNext : false
29
35
  });
30
36
  }
31
- return a;
32
- }, le = (e, n) => !e || !n ? !1 : ee(e, n), oe = (e, n, s) => {
33
- const t = [], a = B(new Date(n, e)), o = B(new Date(n, e + 1, 0)), d = Q(a, { weekStartsOn: H }), v = (D) => {
34
- const p = re(D, e, s);
35
- if (t.push({ days: p }), !t[t.length - 1].days.some(
36
- (b) => le(b.value, o)
37
+ return dates;
38
+ };
39
+ const isDateEqual = (date, dateToCompare) => {
40
+ if (!date || !dateToCompare) {
41
+ return false;
42
+ }
43
+ return isEqual(date, dateToCompare);
44
+ };
45
+ const getCalendarDays = (month, year, selectedDay) => {
46
+ const weeks = [];
47
+ const firstDate = _parsedGetDate(new Date(year, month));
48
+ const lastDate = _parsedGetDate(new Date(year, month + 1, 0));
49
+ const weekStartsOn = WEEK_START;
50
+ const firstDateInCalendar = startOfWeek(firstDate, { weekStartsOn });
51
+ const addDaysToWeek = (date) => {
52
+ const days = getWeekDays(date, month, selectedDay);
53
+ weeks.push({ days });
54
+ if (!weeks[weeks.length - 1].days.some(
55
+ (day) => isDateEqual(day.value, lastDate)
37
56
  )) {
38
- const b = C(D, 7);
39
- v(b);
57
+ const nextDate = addDays(date, 7);
58
+ addDaysToWeek(nextDate);
40
59
  }
41
60
  };
42
- return v(d), t;
43
- }, se = (e, n) => {
44
- const s = [1, 2, 3, 4, 5, 6, 7].map((o) => new Intl.DateTimeFormat(e, { weekday: "short", timeZone: "UTC" }).format(/* @__PURE__ */ new Date(`2017-01-0${o}T00:00:00+00:00`)).slice(0, 2)), t = s.slice(0, n), a = s.slice(n + 1, s.length);
45
- return [s[n]].concat(...a).concat(...t);
46
- }, ce = (e, n, s) => new Intl.DateTimeFormat(s, { month: n }).format(new Date(2e3, e, 1)), ue = (e) => {
47
- const n = new Date(e), s = P(n), t = U(n, 1), a = X(t), o = P(a), u = (s - o + 7) % 7, d = C(a, u);
48
- return E(d);
49
- }, ie = (e) => {
50
- const n = new Date(e), s = P(n);
51
- let a = _(V(n, 1));
52
- for (; P(a) !== s; )
53
- a = C(a, -1);
54
- return E(a);
61
+ addDaysToWeek(firstDateInCalendar);
62
+ return weeks;
63
+ };
64
+ const getWeekDayNames = (locale, weekStart) => {
65
+ const days = [1, 2, 3, 4, 5, 6, 7].map((day) => {
66
+ return new Intl.DateTimeFormat(locale, { weekday: "short", timeZone: "UTC" }).format(/* @__PURE__ */ new Date(`2017-01-0${day}T00:00:00+00:00`)).slice(0, 2);
67
+ });
68
+ const beforeWeekStart = days.slice(0, weekStart);
69
+ const afterWeekStart = days.slice(weekStart + 1, days.length);
70
+ return [days[weekStart]].concat(...afterWeekStart).concat(...beforeWeekStart);
55
71
  };
56
- function de(e, n) {
57
- const s = M(F(e.selectedDate)), t = M(W(e.selectedDate)), a = M(null), o = M(0), u = M([]), d = I(() => oe(s.value, t.value, a.value)), v = I(() => (l, k, O) => ce(l, k, O));
58
- K(s, () => {
59
- i(), n("calendar-days", d.value);
60
- }, { immediate: !0 }), K(t, () => {
61
- i(), n("calendar-days", d.value);
62
- }, { immediate: !0 });
63
- function D(l) {
64
- u.value.includes(l) || u.value.push(l);
72
+ const formatMonth = (month, monthFormat, locale) => {
73
+ return new Intl.DateTimeFormat(locale, { month: monthFormat }).format(new Date(2e3, month, 1));
74
+ };
75
+ const calculateNextFocusDate = (currentDate) => {
76
+ const date = new Date(currentDate);
77
+ const currentWeekday = getDay(date);
78
+ const nextMonthDate = addMonths(date, 1);
79
+ const nextMonthStart = startOfMonth(nextMonthDate);
80
+ const nextMonthStartWeekday = getDay(nextMonthStart);
81
+ const dayDifference = (currentWeekday - nextMonthStartWeekday + 7) % 7;
82
+ const focusDate = addDays(nextMonthStart, dayDifference);
83
+ return getDate(focusDate);
84
+ };
85
+ const calculatePrevFocusDate = (currentDate) => {
86
+ const date = new Date(currentDate);
87
+ const currentWeekday = getDay(date);
88
+ const lastDayOfPrevMonth = endOfMonth(subMonths(date, 1));
89
+ let focusDate = lastDayOfPrevMonth;
90
+ while (getDay(focusDate) !== currentWeekday) {
91
+ focusDate = addDays(focusDate, -1);
65
92
  }
66
- function p() {
67
- u.value[0].$el.focus();
93
+ return getDate(focusDate);
94
+ };
95
+ function useMonthYearPicker(props, emits) {
96
+ const selectMonth = ref(getMonth(props.selectedDate));
97
+ const selectYear = ref(getYear(props.selectedDate));
98
+ const highlightedDay = ref(null);
99
+ const focusPicker = ref(0);
100
+ const focusRefs = ref([]);
101
+ const calendarDays = computed(() => {
102
+ return getCalendarDays(selectMonth.value, selectYear.value, highlightedDay.value);
103
+ });
104
+ const formattedMonth = computed(() => {
105
+ return (month, format2, locale) => formatMonth(month, format2, locale);
106
+ });
107
+ watch(selectMonth, () => {
108
+ highlightDay();
109
+ emits("calendar-days", calendarDays.value);
110
+ }, { immediate: true });
111
+ watch(selectYear, () => {
112
+ highlightDay();
113
+ emits("calendar-days", calendarDays.value);
114
+ }, { immediate: true });
115
+ function setDayRef(el) {
116
+ if (!focusRefs.value.includes(el)) {
117
+ focusRefs.value.push(el);
118
+ }
68
119
  }
69
- function b(l) {
70
- switch (l.key) {
120
+ function focusMonthYearPicker() {
121
+ focusRefs.value[0].$el.focus();
122
+ }
123
+ function handleKeyDown(event) {
124
+ switch (event.key) {
71
125
  case "ArrowLeft":
72
- l.preventDefault(), o.value === 0 ? (o.value = 3, u.value[o.value].$el.focus()) : (o.value--, u.value[o.value].$el.focus());
126
+ event.preventDefault();
127
+ if (focusPicker.value === 0) {
128
+ focusPicker.value = 3;
129
+ focusRefs.value[focusPicker.value].$el.focus();
130
+ } else {
131
+ focusPicker.value--;
132
+ focusRefs.value[focusPicker.value].$el.focus();
133
+ }
73
134
  break;
74
135
  case "ArrowRight":
75
- l.preventDefault(), o.value === 3 ? (o.value = 0, u.value[o.value].$el.focus()) : (o.value++, u.value[o.value].$el.focus());
136
+ event.preventDefault();
137
+ if (focusPicker.value === 3) {
138
+ focusPicker.value = 0;
139
+ focusRefs.value[focusPicker.value].$el.focus();
140
+ } else {
141
+ focusPicker.value++;
142
+ focusRefs.value[focusPicker.value].$el.focus();
143
+ }
76
144
  break;
77
145
  case "ArrowDown":
78
- l.preventDefault(), n("focus-first-day");
146
+ event.preventDefault();
147
+ emits("focus-first-day");
79
148
  break;
80
149
  case "Tab":
81
- l.preventDefault(), n("focus-first-day");
150
+ event.preventDefault();
151
+ emits("focus-first-day");
82
152
  break;
83
153
  case "Escape":
84
- n("close-datepicker");
154
+ emits("close-datepicker");
85
155
  break;
86
156
  }
87
157
  }
88
- function i() {
89
- const l = W(e.selectedDate), k = F(e.selectedDate);
90
- l !== t.value || k !== s.value ? a.value = null : a.value = E(e.selectedDate);
158
+ function highlightDay() {
159
+ const year = getYear(props.selectedDate);
160
+ const month = getMonth(props.selectedDate);
161
+ if (year !== selectYear.value || month !== selectMonth.value) {
162
+ highlightedDay.value = null;
163
+ } else {
164
+ highlightedDay.value = getDate(props.selectedDate);
165
+ }
91
166
  }
92
- function y(l) {
93
- (s.value === 0 && l === -1 || s.value === 11 && l === 1) && (t.value += l);
94
- const k = te(e.selectedDate, { month: s.value, year: t.value }), O = l === 1 ? U(k, 1) : V(k, 1);
95
- s.value = F(O);
167
+ function changeMonth(value) {
168
+ if (selectMonth.value === 0 && value === -1 || selectMonth.value === 11 && value === 1) {
169
+ selectYear.value += value;
170
+ }
171
+ const initialDate = set(props.selectedDate, { month: selectMonth.value, year: selectYear.value });
172
+ const newDate = value === 1 ? addMonths(initialDate, 1) : subMonths(initialDate, 1);
173
+ selectMonth.value = getMonth(newDate);
96
174
  }
97
- function f(l) {
98
- t.value = t.value + l;
175
+ function changeYear(value) {
176
+ selectYear.value = selectYear.value + value;
99
177
  }
100
- function x() {
101
- y(1);
178
+ function goToNextMonth() {
179
+ changeMonth(1);
102
180
  }
103
- function c() {
104
- y(-1);
181
+ function goToPrevMonth() {
182
+ changeMonth(-1);
105
183
  }
106
184
  return {
107
- selectMonth: s,
108
- selectYear: t,
109
- formattedMonth: v,
110
- setDayRef: D,
111
- focusMonthYearPicker: p,
112
- handleKeyDown: b,
113
- changeMonth: y,
114
- changeYear: f,
115
- goToNextMonth: x,
116
- goToPrevMonth: c
185
+ selectMonth,
186
+ selectYear,
187
+ formattedMonth,
188
+ setDayRef,
189
+ focusMonthYearPicker,
190
+ handleKeyDown,
191
+ changeMonth,
192
+ changeYear,
193
+ goToNextMonth,
194
+ goToPrevMonth
117
195
  };
118
196
  }
119
- const fe = {
197
+ const _hoisted_1$2 = {
120
198
  id: "calendar-heading",
121
199
  class: "d-datepicker__month-year-title"
122
- }, me = {
200
+ };
201
+ const _sfc_main$2 = {
123
202
  __name: "month-year-picker",
124
203
  props: {
125
204
  locale: {
126
205
  type: String,
127
- required: !0
206
+ required: true
128
207
  },
129
208
  prevMonthLabel: {
130
209
  type: String,
131
- required: !0
210
+ required: true
132
211
  },
133
212
  nextMonthLabel: {
134
213
  type: String,
135
- required: !0
214
+ required: true
136
215
  },
137
216
  prevYearLabel: {
138
217
  type: String,
139
- required: !0
218
+ required: true
140
219
  },
141
220
  nextYearLabel: {
142
221
  type: String,
143
- required: !0
222
+ required: true
144
223
  },
145
224
  changeToLabel: {
146
225
  type: String,
147
- required: !0
226
+ required: true
148
227
  },
149
228
  selectedDate: {
150
229
  type: Date,
151
- required: !0
230
+ required: true
152
231
  }
153
232
  },
154
233
  emits: [
@@ -178,270 +257,318 @@ const fe = {
178
257
  */
179
258
  "close-datepicker"
180
259
  ],
181
- setup(e, { expose: n, emit: s }) {
182
- const t = e, a = s, {
183
- selectMonth: o,
184
- selectYear: u,
185
- formattedMonth: d,
186
- setDayRef: v,
187
- focusMonthYearPicker: D,
188
- handleKeyDown: p,
189
- changeMonth: b,
190
- changeYear: i,
191
- goToNextMonth: y,
192
- goToPrevMonth: f
193
- } = de(t, a);
194
- return J(() => {
195
- D();
196
- }), n({
197
- focusMonthYearPicker: D,
198
- goToNextMonth: y,
199
- goToPrevMonth: f
200
- }), (x, c) => (g(), G(r(q), {
201
- direction: "row",
202
- class: "d-datepicker__month-year",
203
- gap: "300"
204
- }, {
205
- default: h(() => [
206
- m(r(q), {
207
- as: "nav",
208
- direction: "row",
209
- gap: "200",
210
- class: "d-datepicker__nav"
211
- }, {
212
- default: h(() => [
213
- m(r(S), {
214
- message: e.prevYearLabel,
215
- placement: "top"
216
- }, {
217
- anchor: h(() => [
218
- m(r(L), {
219
- id: "prevYearButton",
220
- ref: (l) => {
221
- l && r(v)(l);
222
- },
223
- size: "xs",
224
- importance: "clear",
225
- kind: "muted",
226
- circle: !0,
227
- class: "d-datepicker__nav-btn",
228
- type: "button",
229
- "aria-label": `${e.changeToLabel} ${e.prevYearLabel} ${r(u) - 1}`,
230
- onClick: c[0] || (c[0] = (l) => r(i)(-1)),
231
- onKeydown: c[1] || (c[1] = (l) => r(p)(l))
232
- }, {
233
- default: h(() => [
234
- m(r(Y), {
235
- name: "chevrons-left",
236
- size: "200"
237
- })
238
- ]),
239
- _: 1
240
- }, 8, ["aria-label"])
241
- ]),
242
- _: 1
243
- }, 8, ["message"]),
244
- m(r(S), {
245
- message: e.prevMonthLabel,
246
- placement: "top"
247
- }, {
248
- anchor: h(() => [
249
- m(r(L), {
250
- id: "prevMonthButton",
251
- ref: (l) => {
252
- l && r(v)(l);
253
- },
254
- size: "xs",
255
- importance: "clear",
256
- kind: "muted",
257
- circle: !0,
258
- class: "d-datepicker__nav-btn",
259
- type: "button",
260
- "aria-label": `${e.changeToLabel} ${e.prevMonthLabel} ${r(d)(r(o) - 1, r(z), e.locale)}`,
261
- onClick: c[2] || (c[2] = (l) => r(b)(-1)),
262
- onKeydown: c[3] || (c[3] = (l) => r(p)(l))
263
- }, {
264
- default: h(() => [
265
- m(r(Y), {
266
- name: "chevron-left",
267
- size: "200"
268
- })
269
- ]),
270
- _: 1
271
- }, 8, ["aria-label"])
272
- ]),
273
- _: 1
274
- }, 8, ["message"])
275
- ]),
276
- _: 1
277
- }),
278
- w("div", fe, N(r(d)(r(o), r(z), e.locale)) + " " + N(r(u)), 1),
279
- m(r(q), {
280
- as: "nav",
281
- direction: "row",
282
- gap: "200",
283
- class: "d-datepicker__nav"
284
- }, {
285
- default: h(() => [
286
- m(r(S), {
287
- message: e.nextMonthLabel,
288
- placement: "top"
289
- }, {
290
- anchor: h(() => [
291
- m(r(L), {
292
- id: "nextMonthButton",
293
- ref: (l) => {
294
- l && r(v)(l);
295
- },
296
- size: "xs",
297
- importance: "clear",
298
- kind: "muted",
299
- circle: !0,
300
- class: "d-datepicker__nav-btn",
301
- type: "button",
302
- "aria-label": `${e.changeToLabel} ${e.nextMonthLabel} ${r(d)(r(o) + 1, r(z), e.locale)}`,
303
- onClick: c[4] || (c[4] = (l) => r(b)(1)),
304
- onKeydown: c[5] || (c[5] = (l) => r(p)(l))
305
- }, {
306
- default: h(() => [
307
- m(r(Y), {
308
- name: "chevron-right",
309
- size: "200"
310
- })
311
- ]),
312
- _: 1
313
- }, 8, ["aria-label"])
314
- ]),
315
- _: 1
316
- }, 8, ["message"]),
317
- m(r(S), {
318
- message: e.nextYearLabel,
319
- placement: "top"
320
- }, {
321
- anchor: h(() => [
322
- m(r(L), {
323
- id: "nextYearButton",
324
- ref: (l) => {
325
- l && r(v)(l);
326
- },
327
- size: "xs",
328
- importance: "clear",
329
- kind: "muted",
330
- circle: !0,
331
- class: "d-datepicker__nav-btn",
332
- type: "button",
333
- "aria-label": `${e.changeToLabel} ${e.nextYearLabel} ${r(u) + 1}`,
334
- onClick: c[6] || (c[6] = (l) => r(i)(1)),
335
- onKeydown: c[7] || (c[7] = (l) => r(p)(l))
336
- }, {
337
- default: h(() => [
338
- m(r(Y), {
339
- name: "chevrons-right",
340
- size: "200"
341
- })
342
- ]),
343
- _: 1
344
- }, 8, ["aria-label"])
345
- ]),
346
- _: 1
347
- }, 8, ["message"])
348
- ]),
349
- _: 1
350
- })
351
- ]),
352
- _: 1
353
- }));
260
+ setup(__props, { expose: __expose, emit: __emit }) {
261
+ const props = __props;
262
+ const emits = __emit;
263
+ const {
264
+ selectMonth,
265
+ selectYear,
266
+ formattedMonth,
267
+ setDayRef,
268
+ focusMonthYearPicker,
269
+ handleKeyDown,
270
+ changeMonth,
271
+ changeYear,
272
+ goToNextMonth,
273
+ goToPrevMonth
274
+ } = useMonthYearPicker(props, emits);
275
+ onMounted(() => {
276
+ focusMonthYearPicker();
277
+ });
278
+ __expose({
279
+ focusMonthYearPicker,
280
+ goToNextMonth,
281
+ goToPrevMonth
282
+ });
283
+ return (_ctx, _cache) => {
284
+ return openBlock(), createBlock(unref(DtStack), {
285
+ direction: "row",
286
+ class: "d-datepicker__month-year",
287
+ gap: "300"
288
+ }, {
289
+ default: withCtx(() => [
290
+ createVNode(unref(DtStack), {
291
+ as: "nav",
292
+ direction: "row",
293
+ gap: "200",
294
+ class: "d-datepicker__nav"
295
+ }, {
296
+ default: withCtx(() => [
297
+ createVNode(unref(DtTooltip), {
298
+ message: __props.prevYearLabel,
299
+ placement: "top"
300
+ }, {
301
+ anchor: withCtx(() => [
302
+ createVNode(unref(DtButton), {
303
+ id: "prevYearButton",
304
+ ref: (el) => {
305
+ if (el)
306
+ unref(setDayRef)(el);
307
+ },
308
+ size: "xs",
309
+ importance: "clear",
310
+ kind: "muted",
311
+ circle: true,
312
+ class: "d-datepicker__nav-btn",
313
+ type: "button",
314
+ "aria-label": `${__props.changeToLabel} ${__props.prevYearLabel} ${unref(selectYear) - 1}`,
315
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(changeYear)(-1)),
316
+ onKeydown: _cache[1] || (_cache[1] = ($event) => unref(handleKeyDown)($event))
317
+ }, {
318
+ default: withCtx(() => [
319
+ createVNode(unref(DtIcon), {
320
+ name: "chevrons-left",
321
+ size: "200"
322
+ })
323
+ ]),
324
+ _: 1
325
+ }, 8, ["aria-label"])
326
+ ]),
327
+ _: 1
328
+ }, 8, ["message"]),
329
+ createVNode(unref(DtTooltip), {
330
+ message: __props.prevMonthLabel,
331
+ placement: "top"
332
+ }, {
333
+ anchor: withCtx(() => [
334
+ createVNode(unref(DtButton), {
335
+ id: "prevMonthButton",
336
+ ref: (el) => {
337
+ if (el)
338
+ unref(setDayRef)(el);
339
+ },
340
+ size: "xs",
341
+ importance: "clear",
342
+ kind: "muted",
343
+ circle: true,
344
+ class: "d-datepicker__nav-btn",
345
+ type: "button",
346
+ "aria-label": `${__props.changeToLabel} ${__props.prevMonthLabel} ${unref(formattedMonth)(unref(selectMonth) - 1, unref(INTL_MONTH_FORMAT), __props.locale)}`,
347
+ onClick: _cache[2] || (_cache[2] = ($event) => unref(changeMonth)(-1)),
348
+ onKeydown: _cache[3] || (_cache[3] = ($event) => unref(handleKeyDown)($event))
349
+ }, {
350
+ default: withCtx(() => [
351
+ createVNode(unref(DtIcon), {
352
+ name: "chevron-left",
353
+ size: "200"
354
+ })
355
+ ]),
356
+ _: 1
357
+ }, 8, ["aria-label"])
358
+ ]),
359
+ _: 1
360
+ }, 8, ["message"])
361
+ ]),
362
+ _: 1
363
+ }),
364
+ createElementVNode("div", _hoisted_1$2, toDisplayString(unref(formattedMonth)(unref(selectMonth), unref(INTL_MONTH_FORMAT), __props.locale)) + " " + toDisplayString(unref(selectYear)), 1),
365
+ createVNode(unref(DtStack), {
366
+ as: "nav",
367
+ direction: "row",
368
+ gap: "200",
369
+ class: "d-datepicker__nav"
370
+ }, {
371
+ default: withCtx(() => [
372
+ createVNode(unref(DtTooltip), {
373
+ message: __props.nextMonthLabel,
374
+ placement: "top"
375
+ }, {
376
+ anchor: withCtx(() => [
377
+ createVNode(unref(DtButton), {
378
+ id: "nextMonthButton",
379
+ ref: (el) => {
380
+ if (el)
381
+ unref(setDayRef)(el);
382
+ },
383
+ size: "xs",
384
+ importance: "clear",
385
+ kind: "muted",
386
+ circle: true,
387
+ class: "d-datepicker__nav-btn",
388
+ type: "button",
389
+ "aria-label": `${__props.changeToLabel} ${__props.nextMonthLabel} ${unref(formattedMonth)(unref(selectMonth) + 1, unref(INTL_MONTH_FORMAT), __props.locale)}`,
390
+ onClick: _cache[4] || (_cache[4] = ($event) => unref(changeMonth)(1)),
391
+ onKeydown: _cache[5] || (_cache[5] = ($event) => unref(handleKeyDown)($event))
392
+ }, {
393
+ default: withCtx(() => [
394
+ createVNode(unref(DtIcon), {
395
+ name: "chevron-right",
396
+ size: "200"
397
+ })
398
+ ]),
399
+ _: 1
400
+ }, 8, ["aria-label"])
401
+ ]),
402
+ _: 1
403
+ }, 8, ["message"]),
404
+ createVNode(unref(DtTooltip), {
405
+ message: __props.nextYearLabel,
406
+ placement: "top"
407
+ }, {
408
+ anchor: withCtx(() => [
409
+ createVNode(unref(DtButton), {
410
+ id: "nextYearButton",
411
+ ref: (el) => {
412
+ if (el)
413
+ unref(setDayRef)(el);
414
+ },
415
+ size: "xs",
416
+ importance: "clear",
417
+ kind: "muted",
418
+ circle: true,
419
+ class: "d-datepicker__nav-btn",
420
+ type: "button",
421
+ "aria-label": `${__props.changeToLabel} ${__props.nextYearLabel} ${unref(selectYear) + 1}`,
422
+ onClick: _cache[6] || (_cache[6] = ($event) => unref(changeYear)(1)),
423
+ onKeydown: _cache[7] || (_cache[7] = ($event) => unref(handleKeyDown)($event))
424
+ }, {
425
+ default: withCtx(() => [
426
+ createVNode(unref(DtIcon), {
427
+ name: "chevrons-right",
428
+ size: "200"
429
+ })
430
+ ]),
431
+ _: 1
432
+ }, 8, ["aria-label"])
433
+ ]),
434
+ _: 1
435
+ }, 8, ["message"])
436
+ ]),
437
+ _: 1
438
+ })
439
+ ]),
440
+ _: 1
441
+ });
442
+ };
354
443
  }
355
444
  };
356
- function ve(e, n) {
357
- const s = M(null), t = M(0), a = M([]), o = I(() => se(e.locale, H));
358
- K(() => e.calendarDays, () => {
359
- t.value = 0, a.value = [], s.value = null;
445
+ function useCalendar(props, emits) {
446
+ const selectedDay = ref(null);
447
+ const focusDay = ref(0);
448
+ const daysRef = ref([]);
449
+ const weekDays = computed(() => {
450
+ return getWeekDayNames(props.locale, WEEK_START);
451
+ });
452
+ watch(() => props.calendarDays, () => {
453
+ focusDay.value = 0;
454
+ daysRef.value = [];
455
+ selectedDay.value = null;
360
456
  });
361
- function u(i) {
362
- return `${e.selectDayLabel} ${i.text} ${ae(i.value, ne)} ${W(i.value)}`;
457
+ function dayAriaLabel(day) {
458
+ return `${props.selectDayLabel} ${day.text} ${format(day.value, MONTH_FORMAT)} ${getYear(day.value)}`;
363
459
  }
364
- function d(i, y) {
365
- !a.value.some((f) => f.el === i) && y.currentMonth && a.value.push({ el: i, day: y });
460
+ function setDayRef(el, day) {
461
+ if (!daysRef.value.some((day2) => day2.el === el) && day.currentMonth) {
462
+ daysRef.value.push({ el, day });
463
+ }
366
464
  }
367
- function v(i) {
368
- switch (i.key) {
465
+ function handleKeyDown(event) {
466
+ switch (event.key) {
369
467
  case "ArrowUp":
370
- i.preventDefault(), t.value -= 7;
468
+ event.preventDefault();
469
+ focusDay.value -= 7;
371
470
  try {
372
- a.value[t.value].el.$el.focus();
373
- } catch {
374
- const f = ie(a.value[t.value + 7].day.value);
375
- n("go-to-prev-month"), T(() => {
376
- a.value[f - 1].el.$el.focus(), t.value += f - 1;
471
+ daysRef.value[focusDay.value].el.$el.focus();
472
+ } catch (error) {
473
+ const prevFocusDate = calculatePrevFocusDate(daysRef.value[focusDay.value + 7].day.value);
474
+ emits("go-to-prev-month");
475
+ nextTick(() => {
476
+ daysRef.value[prevFocusDate - 1].el.$el.focus();
477
+ focusDay.value += prevFocusDate - 1;
377
478
  });
378
479
  }
379
480
  break;
380
481
  case "ArrowDown":
381
- i.preventDefault(), t.value += 7;
482
+ event.preventDefault();
483
+ focusDay.value += 7;
382
484
  try {
383
- a.value[t.value].el.$el.focus();
384
- } catch {
385
- const f = ue(a.value[t.value - 7].day.value);
386
- n("go-to-next-month"), T(() => {
387
- a.value[f - 1].el.$el.focus(), t.value += f - 1;
485
+ daysRef.value[focusDay.value].el.$el.focus();
486
+ } catch (error) {
487
+ const nextFocusDate = calculateNextFocusDate(daysRef.value[focusDay.value - 7].day.value);
488
+ emits("go-to-next-month");
489
+ nextTick(() => {
490
+ daysRef.value[nextFocusDate - 1].el.$el.focus();
491
+ focusDay.value += nextFocusDate - 1;
388
492
  });
389
493
  }
390
494
  break;
391
495
  case "ArrowLeft":
392
- i.preventDefault(), t.value > 0 ? (t.value -= 1, a.value[t.value].el.$el.focus()) : (n("go-to-prev-month"), p());
496
+ event.preventDefault();
497
+ if (focusDay.value > 0) {
498
+ focusDay.value -= 1;
499
+ daysRef.value[focusDay.value].el.$el.focus();
500
+ } else {
501
+ emits("go-to-prev-month");
502
+ focusLastDay();
503
+ }
393
504
  break;
394
505
  case "ArrowRight":
395
- i.preventDefault(), t.value < a.value.length - 1 ? (t.value += 1, a.value[t.value].el.$el.focus()) : (n("go-to-next-month"), D());
506
+ event.preventDefault();
507
+ if (focusDay.value < daysRef.value.length - 1) {
508
+ focusDay.value += 1;
509
+ daysRef.value[focusDay.value].el.$el.focus();
510
+ } else {
511
+ emits("go-to-next-month");
512
+ focusFirstDay();
513
+ }
396
514
  break;
397
515
  case "Tab":
398
- i.preventDefault(), n("focus-month-year-picker");
516
+ event.preventDefault();
517
+ emits("focus-month-year-picker");
399
518
  break;
400
519
  case "Escape":
401
- n("close-datepicker");
520
+ emits("close-datepicker");
402
521
  break;
403
522
  }
404
523
  }
405
- function D() {
406
- t.value = 0, T(() => {
407
- a.value[t.value].el.$el.focus();
524
+ function focusFirstDay() {
525
+ focusDay.value = 0;
526
+ nextTick(() => {
527
+ daysRef.value[focusDay.value].el.$el.focus();
408
528
  });
409
529
  }
410
- function p() {
411
- T(() => {
412
- t.value = a.value.length - 1, a.value[t.value].el.$el.focus();
530
+ function focusLastDay() {
531
+ nextTick(() => {
532
+ focusDay.value = daysRef.value.length - 1;
533
+ daysRef.value[focusDay.value].el.$el.focus();
413
534
  });
414
535
  }
415
- function b(i) {
416
- i.currentMonth && (s.value = i.text, n("select-date", i.value));
536
+ function selectDay(day) {
537
+ if (!day.currentMonth) {
538
+ return;
539
+ }
540
+ selectedDay.value = day.text;
541
+ emits("select-date", day.value);
417
542
  }
418
543
  return {
419
- selectedDay: s,
420
- weekDays: o,
421
- dayAriaLabel: u,
422
- setDayRef: d,
423
- handleKeyDown: v,
424
- focusFirstDay: D,
425
- selectDay: b
544
+ selectedDay,
545
+ weekDays,
546
+ dayAriaLabel,
547
+ setDayRef,
548
+ handleKeyDown,
549
+ focusFirstDay,
550
+ selectDay
426
551
  };
427
552
  }
428
- const ye = {
553
+ const _hoisted_1$1 = {
429
554
  class: "d-datepicker__calendar",
430
555
  "aria-labelledby": "calendar-heading"
431
- }, he = ["title", "aria-label"], De = {
556
+ };
557
+ const _hoisted_2$1 = ["title", "aria-label"];
558
+ const _sfc_main$1 = {
432
559
  __name: "calendar",
433
560
  props: {
434
561
  calendarDays: {
435
562
  type: Array,
436
- required: !0
563
+ required: true
437
564
  },
438
565
  locale: {
439
566
  type: String,
440
- required: !0
567
+ required: true
441
568
  },
442
569
  selectDayLabel: {
443
570
  type: String,
444
- required: !0
571
+ required: true
445
572
  }
446
573
  },
447
574
  emits: [
@@ -477,72 +604,87 @@ const ye = {
477
604
  */
478
605
  "go-to-prev-month"
479
606
  ],
480
- setup(e, { expose: n, emit: s }) {
481
- const t = e, a = s, {
482
- selectedDay: o,
483
- weekDays: u,
484
- dayAriaLabel: d,
485
- setDayRef: v,
486
- handleKeyDown: D,
487
- focusFirstDay: p,
488
- selectDay: b
489
- } = ve(t, a);
490
- return n({
491
- focusFirstDay: p
492
- }), (i, y) => (g(), $("table", ye, [
493
- w("thead", null, [
494
- w("tr", null, [
495
- (g(!0), $(A, null, R(r(u), (f) => (g(), $("th", {
496
- key: f,
497
- scope: "col",
498
- class: "d-datepicker__cell d-datepicker__cell--header"
499
- }, [
500
- w("span", {
501
- class: "d-datepicker__weekday",
502
- title: f,
503
- "aria-label": f
504
- }, N(f), 9, he)
505
- ]))), 128))
607
+ setup(__props, { expose: __expose, emit: __emit }) {
608
+ const props = __props;
609
+ const emits = __emit;
610
+ const {
611
+ selectedDay,
612
+ weekDays,
613
+ dayAriaLabel,
614
+ setDayRef,
615
+ handleKeyDown,
616
+ focusFirstDay,
617
+ selectDay
618
+ } = useCalendar(props, emits);
619
+ __expose({
620
+ focusFirstDay
621
+ });
622
+ return (_ctx, _cache) => {
623
+ return openBlock(), createElementBlock("table", _hoisted_1$1, [
624
+ createElementVNode("thead", null, [
625
+ createElementVNode("tr", null, [
626
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(weekDays), (day) => {
627
+ return openBlock(), createElementBlock("th", {
628
+ key: day,
629
+ scope: "col",
630
+ class: "d-datepicker__cell d-datepicker__cell--header"
631
+ }, [
632
+ createElementVNode("span", {
633
+ class: "d-datepicker__weekday",
634
+ title: day,
635
+ "aria-label": day
636
+ }, toDisplayString(day), 9, _hoisted_2$1)
637
+ ]);
638
+ }), 128))
639
+ ])
640
+ ]),
641
+ createElementVNode("tbody", null, [
642
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.calendarDays, (week, indexWeek) => {
643
+ return openBlock(), createElementBlock("tr", { key: indexWeek }, [
644
+ (openBlock(true), createElementBlock(Fragment, null, renderList(week.days, (day, indexDays) => {
645
+ return openBlock(), createElementBlock("td", {
646
+ key: indexWeek + indexDays,
647
+ class: "d-datepicker__cell",
648
+ role: "listbox"
649
+ }, [
650
+ createVNode(unref(DtButton), {
651
+ ref_for: true,
652
+ ref: (el) => {
653
+ if (el)
654
+ unref(setDayRef)(el, day);
655
+ },
656
+ class: normalizeClass(["d-datepicker__day", {
657
+ "d-datepicker__day--disabled": !day.currentMonth,
658
+ "d-datepicker__day--selected": unref(selectedDay) ? day.text === unref(selectedDay) && day.currentMonth : day.selected
659
+ }]),
660
+ circle: true,
661
+ size: "sm",
662
+ importance: "clear",
663
+ disabled: !day.currentMonth,
664
+ type: "button",
665
+ "aria-selected": !!unref(selectedDay) ? day.text === unref(selectedDay) && day.currentMonth : day.selected,
666
+ "aria-label": unref(dayAriaLabel)(day),
667
+ role: "option",
668
+ onClick: ($event) => unref(selectDay)(day),
669
+ onKeydown: _cache[0] || (_cache[0] = ($event) => unref(handleKeyDown)($event))
670
+ }, {
671
+ default: withCtx(() => [
672
+ createTextVNode(toDisplayString(day.text), 1)
673
+ ]),
674
+ _: 2
675
+ }, 1032, ["disabled", "class", "aria-selected", "aria-label", "onClick"])
676
+ ]);
677
+ }), 128))
678
+ ]);
679
+ }), 128))
506
680
  ])
507
- ]),
508
- w("tbody", null, [
509
- (g(!0), $(A, null, R(e.calendarDays, (f, x) => (g(), $("tr", { key: x }, [
510
- (g(!0), $(A, null, R(f.days, (c, l) => (g(), $("td", {
511
- key: x + l,
512
- class: "d-datepicker__cell",
513
- role: "listbox"
514
- }, [
515
- m(r(L), {
516
- ref_for: !0,
517
- ref: (k) => {
518
- k && r(v)(k, c);
519
- },
520
- class: Z(["d-datepicker__day", {
521
- "d-datepicker__day--disabled": !c.currentMonth,
522
- "d-datepicker__day--selected": r(o) ? c.text === r(o) && c.currentMonth : c.selected
523
- }]),
524
- circle: !0,
525
- size: "sm",
526
- importance: "clear",
527
- disabled: !c.currentMonth,
528
- type: "button",
529
- "aria-selected": r(o) ? c.text === r(o) && c.currentMonth : c.selected,
530
- "aria-label": r(d)(c),
531
- role: "option",
532
- onClick: (k) => r(b)(c),
533
- onKeydown: y[0] || (y[0] = (k) => r(D)(k))
534
- }, {
535
- default: h(() => [
536
- j(N(c.text), 1)
537
- ]),
538
- _: 2
539
- }, 1032, ["disabled", "class", "aria-selected", "aria-label", "onClick"])
540
- ]))), 128))
541
- ]))), 128))
542
- ])
543
- ]));
681
+ ]);
682
+ };
544
683
  }
545
- }, pe = { class: "d-datepicker__hd" }, be = { class: "d-datepicker__bd" }, Re = {
684
+ };
685
+ const _hoisted_1 = { class: "d-datepicker__hd" };
686
+ const _hoisted_2 = { class: "d-datepicker__bd" };
687
+ const _sfc_main = {
546
688
  __name: "datepicker",
547
689
  props: {
548
690
  /**
@@ -553,7 +695,7 @@ const ye = {
553
695
  */
554
696
  prevMonthLabel: {
555
697
  type: String,
556
- required: !0
698
+ required: true
557
699
  },
558
700
  /**
559
701
  * Label for the next month button
@@ -563,7 +705,7 @@ const ye = {
563
705
  */
564
706
  nextMonthLabel: {
565
707
  type: String,
566
- required: !0
708
+ required: true
567
709
  },
568
710
  /**
569
711
  * Label for the previous year button
@@ -573,7 +715,7 @@ const ye = {
573
715
  */
574
716
  prevYearLabel: {
575
717
  type: String,
576
- required: !0
718
+ required: true
577
719
  },
578
720
  /**
579
721
  * Label for the next year button
@@ -583,7 +725,7 @@ const ye = {
583
725
  */
584
726
  nextYearLabel: {
585
727
  type: String,
586
- required: !0
728
+ required: true
587
729
  },
588
730
  /**
589
731
  * Label for the select day button
@@ -593,7 +735,7 @@ const ye = {
593
735
  */
594
736
  selectDayLabel: {
595
737
  type: String,
596
- required: !0
738
+ required: true
597
739
  },
598
740
  /**
599
741
  * Label for the change to button
@@ -603,7 +745,7 @@ const ye = {
603
745
  */
604
746
  changeToLabel: {
605
747
  type: String,
606
- required: !0
748
+ required: true
607
749
  },
608
750
  /**
609
751
  * Locale for the calendar
@@ -639,73 +781,75 @@ const ye = {
639
781
  */
640
782
  "close-datepicker"
641
783
  ],
642
- setup(e) {
643
- const n = M([]);
644
- function s(t) {
645
- n.value = t;
784
+ setup(__props) {
785
+ const calendarDays = ref([]);
786
+ function updateCalendarDays(days) {
787
+ calendarDays.value = days;
646
788
  }
647
- return (t, a) => (g(), G(r(q), {
648
- class: "d-datepicker",
649
- gap: "400"
650
- }, {
651
- default: h(() => [
652
- w("div", pe, [
653
- m(me, {
654
- ref: "monthYearPicker",
655
- locale: e.locale,
656
- "prev-month-label": e.prevMonthLabel,
657
- "next-month-label": e.nextMonthLabel,
658
- "prev-year-label": e.prevYearLabel,
659
- "next-year-label": e.nextYearLabel,
660
- "change-to-label": e.changeToLabel,
661
- "selected-date": e.selectedDate,
662
- onCalendarDays: s,
663
- onFocusFirstDay: a[0] || (a[0] = (o) => t.$refs.calendar.focusFirstDay()),
664
- onFocusLastDay: a[1] || (a[1] = (o) => t.$refs.calendar.focusLastDay()),
665
- onCloseDatepicker: a[2] || (a[2] = (o) => t.$emit("close-datepicker"))
666
- }, null, 8, ["locale", "prev-month-label", "next-month-label", "prev-year-label", "next-year-label", "change-to-label", "selected-date"])
789
+ return (_ctx, _cache) => {
790
+ return openBlock(), createBlock(unref(DtStack), {
791
+ class: "d-datepicker",
792
+ gap: "400"
793
+ }, {
794
+ default: withCtx(() => [
795
+ createElementVNode("div", _hoisted_1, [
796
+ createVNode(_sfc_main$2, {
797
+ ref: "monthYearPicker",
798
+ locale: __props.locale,
799
+ "prev-month-label": __props.prevMonthLabel,
800
+ "next-month-label": __props.nextMonthLabel,
801
+ "prev-year-label": __props.prevYearLabel,
802
+ "next-year-label": __props.nextYearLabel,
803
+ "change-to-label": __props.changeToLabel,
804
+ "selected-date": __props.selectedDate,
805
+ onCalendarDays: updateCalendarDays,
806
+ onFocusFirstDay: _cache[0] || (_cache[0] = ($event) => _ctx.$refs.calendar.focusFirstDay()),
807
+ onFocusLastDay: _cache[1] || (_cache[1] = ($event) => _ctx.$refs.calendar.focusLastDay()),
808
+ onCloseDatepicker: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("close-datepicker"))
809
+ }, null, 8, ["locale", "prev-month-label", "next-month-label", "prev-year-label", "next-year-label", "change-to-label", "selected-date"])
810
+ ]),
811
+ createElementVNode("div", _hoisted_2, [
812
+ createVNode(_sfc_main$1, {
813
+ ref: "calendar",
814
+ locale: __props.locale,
815
+ "calendar-days": calendarDays.value,
816
+ "select-day-label": __props.selectDayLabel,
817
+ onSelectDate: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("selected-date", $event)),
818
+ onFocusMonthYearPicker: _cache[4] || (_cache[4] = ($event) => _ctx.$refs.monthYearPicker.focusMonthYearPicker()),
819
+ onCloseDatepicker: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("close-datepicker")),
820
+ onGoToNextMonth: _cache[6] || (_cache[6] = ($event) => _ctx.$refs.monthYearPicker.goToNextMonth()),
821
+ onGoToPrevMonth: _cache[7] || (_cache[7] = ($event) => _ctx.$refs.monthYearPicker.goToPrevMonth())
822
+ }, null, 8, ["locale", "calendar-days", "select-day-label"])
823
+ ])
667
824
  ]),
668
- w("div", be, [
669
- m(De, {
670
- ref: "calendar",
671
- locale: e.locale,
672
- "calendar-days": n.value,
673
- "select-day-label": e.selectDayLabel,
674
- onSelectDate: a[3] || (a[3] = (o) => t.$emit("selected-date", o)),
675
- onFocusMonthYearPicker: a[4] || (a[4] = (o) => t.$refs.monthYearPicker.focusMonthYearPicker()),
676
- onCloseDatepicker: a[5] || (a[5] = (o) => t.$emit("close-datepicker")),
677
- onGoToNextMonth: a[6] || (a[6] = (o) => t.$refs.monthYearPicker.goToNextMonth()),
678
- onGoToPrevMonth: a[7] || (a[7] = (o) => t.$refs.monthYearPicker.goToPrevMonth())
679
- }, null, 8, ["locale", "calendar-days", "select-day-label"])
680
- ])
681
- ]),
682
- _: 1
683
- }));
825
+ _: 1
826
+ });
827
+ };
684
828
  }
685
829
  };
686
- function ze(e, n = "default") {
687
- return new Intl.DateTimeFormat(n, { weekday: "long", year: "numeric", month: "long", day: "numeric" }).format(e);
830
+ function formatLong(date, locale = "default") {
831
+ return new Intl.DateTimeFormat(locale, { weekday: "long", year: "numeric", month: "long", day: "numeric" }).format(date);
688
832
  }
689
- function Ie(e, n = "default") {
690
- return new Intl.DateTimeFormat(n, { year: "numeric", month: "long", day: "numeric" }).format(e);
833
+ function formatMedium(date, locale = "default") {
834
+ return new Intl.DateTimeFormat(locale, { year: "numeric", month: "long", day: "numeric" }).format(date);
691
835
  }
692
- function Ke(e, n = "default", s = !0) {
693
- const t = s ? { weekday: "short", year: "numeric", month: "short", day: "numeric" } : { year: "numeric", month: "short", day: "numeric" };
694
- return new Intl.DateTimeFormat(n, t).format(e);
836
+ function formatShort(date, locale = "default", showWeekday = true) {
837
+ const options = showWeekday ? { weekday: "short", year: "numeric", month: "short", day: "numeric" } : { year: "numeric", month: "short", day: "numeric" };
838
+ return new Intl.DateTimeFormat(locale, options).format(date);
695
839
  }
696
- function We(e, n = "default", s = !1) {
697
- const t = s ? "short" : "long";
698
- return new Intl.DateTimeFormat(n, { month: t, day: "numeric" }).format(e);
840
+ function formatNoYear(date, locale = "default", abbreviated = false) {
841
+ const monthFormat = abbreviated ? "short" : "long";
842
+ return new Intl.DateTimeFormat(locale, { month: monthFormat, day: "numeric" }).format(date);
699
843
  }
700
- function Be(e, n = "default") {
701
- return new Intl.DateTimeFormat(n, { year: "2-digit", month: "2-digit", day: "2-digit" }).format(e);
844
+ function formatNumerical(date, locale = "default") {
845
+ return new Intl.DateTimeFormat(locale, { year: "2-digit", month: "2-digit", day: "2-digit" }).format(date);
702
846
  }
703
847
  export {
704
- Re as DtDatepicker,
705
- ze as formatLong,
706
- Ie as formatMedium,
707
- We as formatNoYear,
708
- Be as formatNumerical,
709
- Ke as formatShort
848
+ _sfc_main as DtDatepicker,
849
+ formatLong,
850
+ formatMedium,
851
+ formatNoYear,
852
+ formatNumerical,
853
+ formatShort
710
854
  };
711
855
  //# sourceMappingURL=datepicker.js.map