@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
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+ const vue = require("vue");
3
+ const common_validators = require("../common/validators.cjs");
4
+ const common_utils = require("../common/utils.cjs");
5
+ const lib_validationMessages = require("../lib/validation-messages.cjs");
6
+ const InputGroupMixin = {
7
+ components: { DtValidationMessages: lib_validationMessages.DtValidationMessages },
8
+ // provide data to slotted components
9
+ provide() {
10
+ return {
11
+ groupContext: this.provideObj,
12
+ setGroupValue: this.setGroupValue
13
+ };
14
+ },
15
+ props: {
16
+ /**
17
+ * The id of the input group
18
+ */
19
+ id: {
20
+ type: String,
21
+ default() {
22
+ return common_utils.getUniqueString();
23
+ }
24
+ },
25
+ /**
26
+ * The value of the input group
27
+ */
28
+ value: {
29
+ type: [String, Number, Boolean, Object],
30
+ default: null
31
+ },
32
+ /**
33
+ * The name of the input group
34
+ */
35
+ name: {
36
+ type: String,
37
+ required: true
38
+ },
39
+ /**
40
+ * The legend of the input group
41
+ */
42
+ legend: {
43
+ type: String,
44
+ default: ""
45
+ },
46
+ /**
47
+ * Disables the input group
48
+ * @values true, false
49
+ */
50
+ disabled: {
51
+ type: Boolean,
52
+ default: false
53
+ },
54
+ /**
55
+ * Validation messages
56
+ */
57
+ messages: {
58
+ type: Array,
59
+ default: () => [],
60
+ validator: (messages) => common_validators.validationMessageValidator(messages)
61
+ },
62
+ /**
63
+ * Show validation messages
64
+ * @values true, false
65
+ */
66
+ showMessages: {
67
+ type: Boolean,
68
+ default: true
69
+ },
70
+ /**
71
+ * Used to customize the legend element
72
+ */
73
+ legendClass: {
74
+ type: [String, Array, Object],
75
+ default: ""
76
+ },
77
+ /**
78
+ * Used to customize the messages container
79
+ */
80
+ messagesClass: {
81
+ type: [String, Array, Object],
82
+ default: ""
83
+ },
84
+ /**
85
+ * A set of props that are passed into the legend element
86
+ */
87
+ legendChildProps: {
88
+ type: Object,
89
+ default: () => ({})
90
+ },
91
+ /**
92
+ * A set of props that are passed into the messages container
93
+ */
94
+ messagesChildProps: {
95
+ type: Object,
96
+ default: () => ({})
97
+ }
98
+ },
99
+ emits: [
100
+ /**
101
+ * Native input event
102
+ *
103
+ * @event input
104
+ * @type {KeyboardEvent}
105
+ */
106
+ "input"
107
+ ],
108
+ data() {
109
+ const formattedMessages = common_utils.formatMessages(this.messages);
110
+ return {
111
+ // wrap values in object to make reactive
112
+ provideObj: {
113
+ name: this.name,
114
+ disabled: this.disabled,
115
+ validationState: common_utils.getValidationState(formattedMessages)
116
+ }
117
+ };
118
+ },
119
+ computed: {
120
+ formattedMessages() {
121
+ return common_utils.formatMessages(this.messages);
122
+ },
123
+ validationState() {
124
+ return common_utils.getValidationState(this.formattedMessages);
125
+ }
126
+ },
127
+ watch: {
128
+ disabled(newDisabled) {
129
+ this.provideObj.disabled = newDisabled;
130
+ },
131
+ validationState(newValidationState) {
132
+ this.provideObj.validationState = newValidationState;
133
+ }
134
+ },
135
+ methods: {
136
+ /*
137
+ * provided value to support 2 way binding for slotted input components.
138
+ * slotted input components will change this value and need to emit new value up.
139
+ */
140
+ setGroupValue(newValue) {
141
+ this.internalValue = newValue;
142
+ this.$emit("input", newValue);
143
+ }
144
+ },
145
+ mounted() {
146
+ if (!this.legend && !this.$slots.legend && !this.$attrs["aria-label"]) {
147
+ vue.warn("It is expected that an aria-label is provided when there is no legend.", this);
148
+ }
149
+ }
150
+ };
151
+ exports.InputGroupMixin = InputGroupMixin;
152
+ //# sourceMappingURL=input_group-M-D25pOJ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input_group-bBKaq3Wi.js","sources":["../../common/mixins/input_group.js"],"sourcesContent":["import { warn } from 'vue';\nimport { DtValidationMessages } from '@/components/validation_messages';\nimport { validationMessageValidator } from '../validators';\nimport {\n getUniqueString,\n formatMessages,\n getValidationState,\n} from '@/common/utils';\n\n/**\n * This mixin provides a base provide obj and set of components, props, computed, watchers and data attributes that are\n * commonly used in our input group components.\n * @displayName Input Group Mixin\n */\nexport const InputGroupMixin = {\n components: { DtValidationMessages },\n\n // provide data to slotted components\n provide () {\n return {\n groupContext: this.provideObj,\n setGroupValue: this.setGroupValue,\n };\n },\n\n props: {\n /**\n * The id of the input group\n */\n id: {\n type: String,\n default () {\n return getUniqueString();\n },\n },\n\n /**\n * The value of the input group\n */\n value: {\n type: [String, Number, Boolean, Object],\n default: null,\n },\n\n /**\n * The name of the input group\n */\n name: {\n type: String,\n required: true,\n },\n\n /**\n * The legend of the input group\n */\n legend: {\n type: String,\n default: '',\n },\n\n /**\n * Disables the input group\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Validation messages\n */\n messages: {\n type: Array,\n default: () => [],\n validator: messages => validationMessageValidator(messages),\n },\n\n /**\n * Show validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Used to customize the legend element\n */\n legendClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the messages container\n */\n messagesClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the legend element\n */\n legendChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * A set of props that are passed into the messages container\n */\n messagesChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {KeyboardEvent}\n */\n 'input',\n ],\n\n data () {\n const formattedMessages = formatMessages(this.messages);\n\n return {\n // wrap values in object to make reactive\n provideObj: {\n name: this.name,\n disabled: this.disabled,\n validationState: getValidationState(formattedMessages),\n },\n };\n },\n\n computed: {\n formattedMessages () {\n return formatMessages(this.messages);\n },\n\n validationState () {\n return getValidationState(this.formattedMessages);\n },\n },\n\n watch: {\n disabled (newDisabled) {\n this.provideObj.disabled = newDisabled;\n },\n\n validationState (newValidationState) {\n this.provideObj.validationState = newValidationState;\n },\n },\n\n methods: {\n /*\n * provided value to support 2 way binding for slotted input components.\n * slotted input components will change this value and need to emit new value up.\n */\n setGroupValue (newValue) {\n this.internalValue = newValue;\n this.$emit('input', newValue);\n },\n },\n\n mounted () {\n if (!this.legend && !this.$slots.legend && !this.$attrs['aria-label']) {\n warn('It is expected that an aria-label is provided when there is no legend.', this);\n }\n },\n};\n\nexport default {\n InputGroupMixin,\n};\n"],"names":["InputGroupMixin","DtValidationMessages","getUniqueString","messages","validationMessageValidator","formattedMessages","formatMessages","getValidationState","newDisabled","newValidationState","newValue","warn"],"mappings":";;;;AAcY,MAACA,IAAkB;AAAA,EAC7B,YAAY,EAAE,sBAAAC,EAAsB;AAAA;AAAA,EAGpC,UAAW;AACT,WAAO;AAAA,MACL,cAAc,KAAK;AAAA,MACnB,eAAe,KAAK;AAAA,IAC1B;AAAA,EACG;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAOC,EAAe;AAAA,MACvB;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,OAAO;AAAA,MACL,MAAM,CAAC,QAAQ,QAAQ,SAAS,MAAM;AAAA,MACtC,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,MACjB,WAAW,CAAAC,MAAYC,EAA2BD,CAAQ;AAAA,IAC3D;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,eAAe;AAAA,MACb,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,SAAS,OAAO,CAAA;AAAA,IACjB;AAAA;AAAA;AAAA;AAAA,IAKD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS,OAAO,CAAA;AAAA,IACjB;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA,EACD;AAAA,EAED,OAAQ;AACN,UAAME,IAAoBC,EAAe,KAAK,QAAQ;AAEtD,WAAO;AAAA;AAAA,MAEL,YAAY;AAAA,QACV,MAAM,KAAK;AAAA,QACX,UAAU,KAAK;AAAA,QACf,iBAAiBC,EAAmBF,CAAiB;AAAA,MACtD;AAAA,IACP;AAAA,EACG;AAAA,EAED,UAAU;AAAA,IACR,oBAAqB;AACnB,aAAOC,EAAe,KAAK,QAAQ;AAAA,IACpC;AAAA,IAED,kBAAmB;AACjB,aAAOC,EAAmB,KAAK,iBAAiB;AAAA,IACjD;AAAA,EACF;AAAA,EAED,OAAO;AAAA,IACL,SAAUC,GAAa;AACrB,WAAK,WAAW,WAAWA;AAAA,IAC5B;AAAA,IAED,gBAAiBC,GAAoB;AACnC,WAAK,WAAW,kBAAkBA;AAAA,IACnC;AAAA,EACF;AAAA,EAED,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,IAKP,cAAeC,GAAU;AACvB,WAAK,gBAAgBA,GACrB,KAAK,MAAM,SAASA,CAAQ;AAAA,IAC7B;AAAA,EACF;AAAA,EAED,UAAW;AACT,IAAI,CAAC,KAAK,UAAU,CAAC,KAAK,OAAO,UAAU,CAAC,KAAK,OAAO,YAAY,KAClEC,EAAK,0EAA0E,IAAI;AAAA,EAEtF;AACH;"}
1
+ {"version":3,"file":"input_group-M-D25pOJ.js","sources":["../../common/mixins/input_group.js"],"sourcesContent":["import { warn } from 'vue';\nimport { DtValidationMessages } from '@/components/validation_messages';\nimport { validationMessageValidator } from '../validators';\nimport {\n getUniqueString,\n formatMessages,\n getValidationState,\n} from '@/common/utils';\n\n/**\n * This mixin provides a base provide obj and set of components, props, computed, watchers and data attributes that are\n * commonly used in our input group components.\n * @displayName Input Group Mixin\n */\nexport const InputGroupMixin = {\n components: { DtValidationMessages },\n\n // provide data to slotted components\n provide () {\n return {\n groupContext: this.provideObj,\n setGroupValue: this.setGroupValue,\n };\n },\n\n props: {\n /**\n * The id of the input group\n */\n id: {\n type: String,\n default () {\n return getUniqueString();\n },\n },\n\n /**\n * The value of the input group\n */\n value: {\n type: [String, Number, Boolean, Object],\n default: null,\n },\n\n /**\n * The name of the input group\n */\n name: {\n type: String,\n required: true,\n },\n\n /**\n * The legend of the input group\n */\n legend: {\n type: String,\n default: '',\n },\n\n /**\n * Disables the input group\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Validation messages\n */\n messages: {\n type: Array,\n default: () => [],\n validator: messages => validationMessageValidator(messages),\n },\n\n /**\n * Show validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Used to customize the legend element\n */\n legendClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the messages container\n */\n messagesClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the legend element\n */\n legendChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * A set of props that are passed into the messages container\n */\n messagesChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {KeyboardEvent}\n */\n 'input',\n ],\n\n data () {\n const formattedMessages = formatMessages(this.messages);\n\n return {\n // wrap values in object to make reactive\n provideObj: {\n name: this.name,\n disabled: this.disabled,\n validationState: getValidationState(formattedMessages),\n },\n };\n },\n\n computed: {\n formattedMessages () {\n return formatMessages(this.messages);\n },\n\n validationState () {\n return getValidationState(this.formattedMessages);\n },\n },\n\n watch: {\n disabled (newDisabled) {\n this.provideObj.disabled = newDisabled;\n },\n\n validationState (newValidationState) {\n this.provideObj.validationState = newValidationState;\n },\n },\n\n methods: {\n /*\n * provided value to support 2 way binding for slotted input components.\n * slotted input components will change this value and need to emit new value up.\n */\n setGroupValue (newValue) {\n this.internalValue = newValue;\n this.$emit('input', newValue);\n },\n },\n\n mounted () {\n if (!this.legend && !this.$slots.legend && !this.$attrs['aria-label']) {\n warn('It is expected that an aria-label is provided when there is no legend.', this);\n }\n },\n};\n\nexport default {\n InputGroupMixin,\n};\n"],"names":["DtValidationMessages","getUniqueString","validationMessageValidator","formatMessages","getValidationState","warn"],"mappings":";;;;;AAcY,MAAC,kBAAkB;AAAA,EAC7B,YAAY,EAAEA,sBAAAA,uBAAAA,qBAAsB;AAAA;AAAA,EAGpC,UAAW;AACT,WAAO;AAAA,MACL,cAAc,KAAK;AAAA,MACnB,eAAe,KAAK;AAAA,IAC1B;AAAA,EACG;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAOC,aAAe,gBAAA;AAAA,MACvB;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,OAAO;AAAA,MACL,MAAM,CAAC,QAAQ,QAAQ,SAAS,MAAM;AAAA,MACtC,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,MACjB,WAAW,cAAYC,kBAA0B,2BAAC,QAAQ;AAAA,IAC3D;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,eAAe;AAAA,MACb,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,SAAS,OAAO,CAAA;AAAA,IACjB;AAAA;AAAA;AAAA;AAAA,IAKD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS,OAAO,CAAA;AAAA,IACjB;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA,EACD;AAAA,EAED,OAAQ;AACN,UAAM,oBAAoBC,aAAAA,eAAe,KAAK,QAAQ;AAEtD,WAAO;AAAA;AAAA,MAEL,YAAY;AAAA,QACV,MAAM,KAAK;AAAA,QACX,UAAU,KAAK;AAAA,QACf,iBAAiBC,aAAkB,mBAAC,iBAAiB;AAAA,MACtD;AAAA,IACP;AAAA,EACG;AAAA,EAED,UAAU;AAAA,IACR,oBAAqB;AACnB,aAAOD,aAAc,eAAC,KAAK,QAAQ;AAAA,IACpC;AAAA,IAED,kBAAmB;AACjB,aAAOC,aAAkB,mBAAC,KAAK,iBAAiB;AAAA,IACjD;AAAA,EACF;AAAA,EAED,OAAO;AAAA,IACL,SAAU,aAAa;AACrB,WAAK,WAAW,WAAW;AAAA,IAC5B;AAAA,IAED,gBAAiB,oBAAoB;AACnC,WAAK,WAAW,kBAAkB;AAAA,IACnC;AAAA,EACF;AAAA,EAED,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,IAKP,cAAe,UAAU;AACvB,WAAK,gBAAgB;AACrB,WAAK,MAAM,SAAS,QAAQ;AAAA,IAC7B;AAAA,EACF;AAAA,EAED,UAAW;AACT,QAAI,CAAC,KAAK,UAAU,CAAC,KAAK,OAAO,UAAU,CAAC,KAAK,OAAO,YAAY,GAAG;AACrEC,eAAK,0EAA0E,IAAI;AAAA,IACpF;AAAA,EACF;AACH;;"}
@@ -1,9 +1,9 @@
1
- import { warn as s } from "vue";
2
- import { validationMessageValidator as i } from "../lib/validators.js";
3
- import { getUniqueString as r, formatMessages as t, getValidationState as a } from "../lib/utils.js";
4
- import { DtValidationMessages as d } from "../lib/validation-messages.js";
5
- const u = {
6
- components: { DtValidationMessages: d },
1
+ import { warn } from "vue";
2
+ import { validationMessageValidator } from "../common/validators.js";
3
+ import { getUniqueString, formatMessages, getValidationState } from "../common/utils.js";
4
+ import { DtValidationMessages } from "../lib/validation-messages.js";
5
+ const InputGroupMixin = {
6
+ components: { DtValidationMessages },
7
7
  // provide data to slotted components
8
8
  provide() {
9
9
  return {
@@ -18,7 +18,7 @@ const u = {
18
18
  id: {
19
19
  type: String,
20
20
  default() {
21
- return r();
21
+ return getUniqueString();
22
22
  }
23
23
  },
24
24
  /**
@@ -33,7 +33,7 @@ const u = {
33
33
  */
34
34
  name: {
35
35
  type: String,
36
- required: !0
36
+ required: true
37
37
  },
38
38
  /**
39
39
  * The legend of the input group
@@ -48,7 +48,7 @@ const u = {
48
48
  */
49
49
  disabled: {
50
50
  type: Boolean,
51
- default: !1
51
+ default: false
52
52
  },
53
53
  /**
54
54
  * Validation messages
@@ -56,7 +56,7 @@ const u = {
56
56
  messages: {
57
57
  type: Array,
58
58
  default: () => [],
59
- validator: (e) => i(e)
59
+ validator: (messages) => validationMessageValidator(messages)
60
60
  },
61
61
  /**
62
62
  * Show validation messages
@@ -64,7 +64,7 @@ const u = {
64
64
  */
65
65
  showMessages: {
66
66
  type: Boolean,
67
- default: !0
67
+ default: true
68
68
  },
69
69
  /**
70
70
  * Used to customize the legend element
@@ -105,30 +105,30 @@ const u = {
105
105
  "input"
106
106
  ],
107
107
  data() {
108
- const e = t(this.messages);
108
+ const formattedMessages = formatMessages(this.messages);
109
109
  return {
110
110
  // wrap values in object to make reactive
111
111
  provideObj: {
112
112
  name: this.name,
113
113
  disabled: this.disabled,
114
- validationState: a(e)
114
+ validationState: getValidationState(formattedMessages)
115
115
  }
116
116
  };
117
117
  },
118
118
  computed: {
119
119
  formattedMessages() {
120
- return t(this.messages);
120
+ return formatMessages(this.messages);
121
121
  },
122
122
  validationState() {
123
- return a(this.formattedMessages);
123
+ return getValidationState(this.formattedMessages);
124
124
  }
125
125
  },
126
126
  watch: {
127
- disabled(e) {
128
- this.provideObj.disabled = e;
127
+ disabled(newDisabled) {
128
+ this.provideObj.disabled = newDisabled;
129
129
  },
130
- validationState(e) {
131
- this.provideObj.validationState = e;
130
+ validationState(newValidationState) {
131
+ this.provideObj.validationState = newValidationState;
132
132
  }
133
133
  },
134
134
  methods: {
@@ -136,15 +136,18 @@ const u = {
136
136
  * provided value to support 2 way binding for slotted input components.
137
137
  * slotted input components will change this value and need to emit new value up.
138
138
  */
139
- setGroupValue(e) {
140
- this.internalValue = e, this.$emit("input", e);
139
+ setGroupValue(newValue) {
140
+ this.internalValue = newValue;
141
+ this.$emit("input", newValue);
141
142
  }
142
143
  },
143
144
  mounted() {
144
- !this.legend && !this.$slots.legend && !this.$attrs["aria-label"] && s("It is expected that an aria-label is provided when there is no legend.", this);
145
+ if (!this.legend && !this.$slots.legend && !this.$attrs["aria-label"]) {
146
+ warn("It is expected that an aria-label is provided when there is no legend.", this);
147
+ }
145
148
  }
146
149
  };
147
150
  export {
148
- u as I
151
+ InputGroupMixin
149
152
  };
150
- //# sourceMappingURL=input_group-bBKaq3Wi.js.map
153
+ //# sourceMappingURL=input_group-jWnq2DJT.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input_group-AS760Cp7.js","sources":["../../common/mixins/input_group.js"],"sourcesContent":["import { warn } from 'vue';\nimport { DtValidationMessages } from '@/components/validation_messages';\nimport { validationMessageValidator } from '../validators';\nimport {\n getUniqueString,\n formatMessages,\n getValidationState,\n} from '@/common/utils';\n\n/**\n * This mixin provides a base provide obj and set of components, props, computed, watchers and data attributes that are\n * commonly used in our input group components.\n * @displayName Input Group Mixin\n */\nexport const InputGroupMixin = {\n components: { DtValidationMessages },\n\n // provide data to slotted components\n provide () {\n return {\n groupContext: this.provideObj,\n setGroupValue: this.setGroupValue,\n };\n },\n\n props: {\n /**\n * The id of the input group\n */\n id: {\n type: String,\n default () {\n return getUniqueString();\n },\n },\n\n /**\n * The value of the input group\n */\n value: {\n type: [String, Number, Boolean, Object],\n default: null,\n },\n\n /**\n * The name of the input group\n */\n name: {\n type: String,\n required: true,\n },\n\n /**\n * The legend of the input group\n */\n legend: {\n type: String,\n default: '',\n },\n\n /**\n * Disables the input group\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Validation messages\n */\n messages: {\n type: Array,\n default: () => [],\n validator: messages => validationMessageValidator(messages),\n },\n\n /**\n * Show validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Used to customize the legend element\n */\n legendClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the messages container\n */\n messagesClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the legend element\n */\n legendChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * A set of props that are passed into the messages container\n */\n messagesChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {KeyboardEvent}\n */\n 'input',\n ],\n\n data () {\n const formattedMessages = formatMessages(this.messages);\n\n return {\n // wrap values in object to make reactive\n provideObj: {\n name: this.name,\n disabled: this.disabled,\n validationState: getValidationState(formattedMessages),\n },\n };\n },\n\n computed: {\n formattedMessages () {\n return formatMessages(this.messages);\n },\n\n validationState () {\n return getValidationState(this.formattedMessages);\n },\n },\n\n watch: {\n disabled (newDisabled) {\n this.provideObj.disabled = newDisabled;\n },\n\n validationState (newValidationState) {\n this.provideObj.validationState = newValidationState;\n },\n },\n\n methods: {\n /*\n * provided value to support 2 way binding for slotted input components.\n * slotted input components will change this value and need to emit new value up.\n */\n setGroupValue (newValue) {\n this.internalValue = newValue;\n this.$emit('input', newValue);\n },\n },\n\n mounted () {\n if (!this.legend && !this.$slots.legend && !this.$attrs['aria-label']) {\n warn('It is expected that an aria-label is provided when there is no legend.', this);\n }\n },\n};\n\nexport default {\n InputGroupMixin,\n};\n"],"names":["InputGroupMixin","DtValidationMessages","getUniqueString","messages","validationMessageValidator","formattedMessages","formatMessages","getValidationState","newDisabled","newValidationState","newValue","warn"],"mappings":"iJAcaA,EAAkB,CAC7B,WAAY,CAAEC,qBAAAA,EAAAA,oBAAsB,EAGpC,SAAW,CACT,MAAO,CACL,aAAc,KAAK,WACnB,cAAe,KAAK,aAC1B,CACG,EAED,MAAO,CAIL,GAAI,CACF,KAAM,OACN,SAAW,CACT,OAAOC,EAAe,gBAAA,CACvB,CACF,EAKD,MAAO,CACL,KAAM,CAAC,OAAQ,OAAQ,QAAS,MAAM,EACtC,QAAS,IACV,EAKD,KAAM,CACJ,KAAM,OACN,SAAU,EACX,EAKD,OAAQ,CACN,KAAM,OACN,QAAS,EACV,EAMD,SAAU,CACR,KAAM,QACN,QAAS,EACV,EAKD,SAAU,CACR,KAAM,MACN,QAAS,IAAM,CAAE,EACjB,UAAWC,GAAYC,EAA0B,2BAACD,CAAQ,CAC3D,EAMD,aAAc,CACZ,KAAM,QACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,EACV,EAKD,cAAe,CACb,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,EACV,EAKD,iBAAkB,CAChB,KAAM,OACN,QAAS,KAAO,CAAA,EACjB,EAKD,mBAAoB,CAClB,KAAM,OACN,QAAS,KAAO,CAAA,EACjB,CACF,EAED,MAAO,CAOL,OACD,EAED,MAAQ,CACN,MAAME,EAAoBC,EAAAA,eAAe,KAAK,QAAQ,EAEtD,MAAO,CAEL,WAAY,CACV,KAAM,KAAK,KACX,SAAU,KAAK,SACf,gBAAiBC,EAAkB,mBAACF,CAAiB,CACtD,CACP,CACG,EAED,SAAU,CACR,mBAAqB,CACnB,OAAOC,EAAc,eAAC,KAAK,QAAQ,CACpC,EAED,iBAAmB,CACjB,OAAOC,EAAkB,mBAAC,KAAK,iBAAiB,CACjD,CACF,EAED,MAAO,CACL,SAAUC,EAAa,CACrB,KAAK,WAAW,SAAWA,CAC5B,EAED,gBAAiBC,EAAoB,CACnC,KAAK,WAAW,gBAAkBA,CACnC,CACF,EAED,QAAS,CAKP,cAAeC,EAAU,CACvB,KAAK,cAAgBA,EACrB,KAAK,MAAM,QAASA,CAAQ,CAC7B,CACF,EAED,SAAW,CACL,CAAC,KAAK,QAAU,CAAC,KAAK,OAAO,QAAU,CAAC,KAAK,OAAO,YAAY,GAClEC,OAAK,yEAA0E,IAAI,CAEtF,CACH"}
1
+ {"version":3,"file":"input_group-jWnq2DJT.js","sources":["../../common/mixins/input_group.js"],"sourcesContent":["import { warn } from 'vue';\nimport { DtValidationMessages } from '@/components/validation_messages';\nimport { validationMessageValidator } from '../validators';\nimport {\n getUniqueString,\n formatMessages,\n getValidationState,\n} from '@/common/utils';\n\n/**\n * This mixin provides a base provide obj and set of components, props, computed, watchers and data attributes that are\n * commonly used in our input group components.\n * @displayName Input Group Mixin\n */\nexport const InputGroupMixin = {\n components: { DtValidationMessages },\n\n // provide data to slotted components\n provide () {\n return {\n groupContext: this.provideObj,\n setGroupValue: this.setGroupValue,\n };\n },\n\n props: {\n /**\n * The id of the input group\n */\n id: {\n type: String,\n default () {\n return getUniqueString();\n },\n },\n\n /**\n * The value of the input group\n */\n value: {\n type: [String, Number, Boolean, Object],\n default: null,\n },\n\n /**\n * The name of the input group\n */\n name: {\n type: String,\n required: true,\n },\n\n /**\n * The legend of the input group\n */\n legend: {\n type: String,\n default: '',\n },\n\n /**\n * Disables the input group\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Validation messages\n */\n messages: {\n type: Array,\n default: () => [],\n validator: messages => validationMessageValidator(messages),\n },\n\n /**\n * Show validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Used to customize the legend element\n */\n legendClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the messages container\n */\n messagesClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the legend element\n */\n legendChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * A set of props that are passed into the messages container\n */\n messagesChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {KeyboardEvent}\n */\n 'input',\n ],\n\n data () {\n const formattedMessages = formatMessages(this.messages);\n\n return {\n // wrap values in object to make reactive\n provideObj: {\n name: this.name,\n disabled: this.disabled,\n validationState: getValidationState(formattedMessages),\n },\n };\n },\n\n computed: {\n formattedMessages () {\n return formatMessages(this.messages);\n },\n\n validationState () {\n return getValidationState(this.formattedMessages);\n },\n },\n\n watch: {\n disabled (newDisabled) {\n this.provideObj.disabled = newDisabled;\n },\n\n validationState (newValidationState) {\n this.provideObj.validationState = newValidationState;\n },\n },\n\n methods: {\n /*\n * provided value to support 2 way binding for slotted input components.\n * slotted input components will change this value and need to emit new value up.\n */\n setGroupValue (newValue) {\n this.internalValue = newValue;\n this.$emit('input', newValue);\n },\n },\n\n mounted () {\n if (!this.legend && !this.$slots.legend && !this.$attrs['aria-label']) {\n warn('It is expected that an aria-label is provided when there is no legend.', this);\n }\n },\n};\n\nexport default {\n InputGroupMixin,\n};\n"],"names":[],"mappings":";;;;AAcY,MAAC,kBAAkB;AAAA,EAC7B,YAAY,EAAE,qBAAsB;AAAA;AAAA,EAGpC,UAAW;AACT,WAAO;AAAA,MACL,cAAc,KAAK;AAAA,MACnB,eAAe,KAAK;AAAA,IAC1B;AAAA,EACG;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AACT,eAAO,gBAAe;AAAA,MACvB;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKD,OAAO;AAAA,MACL,MAAM,CAAC,QAAQ,QAAQ,SAAS,MAAM;AAAA,MACtC,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,MACjB,WAAW,cAAY,2BAA2B,QAAQ;AAAA,IAC3D;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,eAAe;AAAA,MACb,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,SAAS,OAAO,CAAA;AAAA,IACjB;AAAA;AAAA;AAAA;AAAA,IAKD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS,OAAO,CAAA;AAAA,IACjB;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA,EACD;AAAA,EAED,OAAQ;AACN,UAAM,oBAAoB,eAAe,KAAK,QAAQ;AAEtD,WAAO;AAAA;AAAA,MAEL,YAAY;AAAA,QACV,MAAM,KAAK;AAAA,QACX,UAAU,KAAK;AAAA,QACf,iBAAiB,mBAAmB,iBAAiB;AAAA,MACtD;AAAA,IACP;AAAA,EACG;AAAA,EAED,UAAU;AAAA,IACR,oBAAqB;AACnB,aAAO,eAAe,KAAK,QAAQ;AAAA,IACpC;AAAA,IAED,kBAAmB;AACjB,aAAO,mBAAmB,KAAK,iBAAiB;AAAA,IACjD;AAAA,EACF;AAAA,EAED,OAAO;AAAA,IACL,SAAU,aAAa;AACrB,WAAK,WAAW,WAAW;AAAA,IAC5B;AAAA,IAED,gBAAiB,oBAAoB;AACnC,WAAK,WAAW,kBAAkB;AAAA,IACnC;AAAA,EACF;AAAA,EAED,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,IAKP,cAAe,UAAU;AACvB,WAAK,gBAAgB;AACrB,WAAK,MAAM,SAAS,QAAQ;AAAA,IAC7B;AAAA,EACF;AAAA,EAED,UAAW;AACT,QAAI,CAAC,KAAK,UAAU,CAAC,KAAK,OAAO,UAAU,CAAC,KAAK,OAAO,YAAY,GAAG;AACrE,WAAK,0EAA0E,IAAI;AAAA,IACpF;AAAA,EACF;AACH;"}
@@ -0,0 +1,284 @@
1
+ const Dom = {
2
+ methods: {
3
+ /**
4
+ * Scroll an element into view if it is not fully visible in its nearest scrollable ancestor.
5
+ * @param {Element} ref
6
+ */
7
+ scrollElementIntoViewIfNeeded(ref, opt_center, opt_behavior, opt_parent) {
8
+ if (ref.scrollIntoViewIfNeeded) {
9
+ this.scrollIntoViewIfNeeded(ref, opt_center, opt_behavior, opt_parent);
10
+ } else {
11
+ this.scrollIntoView(ref, "bottom", false, opt_behavior, opt_parent);
12
+ }
13
+ },
14
+ /**
15
+ * Scroll an element to the top or bottom of its scroll ancestor.
16
+ * @param {Element} ref
17
+ */
18
+ scrollElementIntoView(ref, opt_scrollToTop, opt_behavior, opt_parent) {
19
+ if (opt_scrollToTop === "center") {
20
+ this.scrollIntoView(ref, "center", false, opt_behavior, opt_parent);
21
+ return;
22
+ }
23
+ if (opt_scrollToTop === false) {
24
+ this.scrollIntoView(ref, "bottom", false, opt_behavior, opt_parent);
25
+ } else {
26
+ this.scrollIntoView(ref, "top", false, opt_behavior, opt_parent);
27
+ }
28
+ },
29
+ scrollIntoViewIfNeeded(ref, opt_center, opt_behavior, opt_parent) {
30
+ const dir = opt_center ? "center" : void 0;
31
+ this.scrollIntoView(ref, dir, true, opt_behavior, opt_parent);
32
+ },
33
+ scrollIntoView(ref, opt_dir, opt_ifNeeded, opt_behavior, opt_parent) {
34
+ if (!ref || !ref.parentElement) {
35
+ return;
36
+ }
37
+ const offsetTop = ref.offsetTop;
38
+ const refParent = opt_parent || ref.parentElement;
39
+ const scrollBounds = this._getScrollBounds(refParent);
40
+ const parentHeight = scrollBounds.bottom - scrollBounds.top;
41
+ const elHeight = this._getElementHeight(ref);
42
+ const offsetBottom = offsetTop + elHeight;
43
+ let scrollTop = -1;
44
+ switch (opt_dir) {
45
+ case "top":
46
+ scrollTop = offsetTop;
47
+ break;
48
+ case "center":
49
+ scrollTop = offsetTop + (elHeight - parentHeight) / 2;
50
+ break;
51
+ case "bottom":
52
+ scrollTop = scrollTop = offsetBottom - parentHeight;
53
+ break;
54
+ default:
55
+ if (offsetTop - scrollBounds.top <= parentHeight / 2) {
56
+ scrollTop = offsetTop;
57
+ } else {
58
+ scrollTop = offsetBottom - parentHeight;
59
+ }
60
+ break;
61
+ }
62
+ this._setScrollTop(refParent, scrollTop, scrollBounds, offsetTop, offsetBottom, opt_ifNeeded, opt_behavior);
63
+ },
64
+ _setScrollTop(el, scrollTop, bounds, offsetTop, offsetBottom, opt_isNeeded, opt_behavior) {
65
+ bounds = bounds || this._getScrollBounds(el);
66
+ const parentHeight = bounds.bottom - bounds.top;
67
+ if (opt_isNeeded && this._inScrollBounds(offsetTop, offsetBottom, bounds)) {
68
+ if (offsetTop < bounds.top) {
69
+ scrollTop = offsetTop;
70
+ } else if (offsetBottom > bounds.bottom) {
71
+ scrollTop = offsetBottom - parentHeight;
72
+ } else {
73
+ return;
74
+ }
75
+ }
76
+ if (opt_behavior) {
77
+ el.scrollTo({ top: scrollTop, behavior: opt_behavior });
78
+ } else {
79
+ el.scrollTop = scrollTop;
80
+ }
81
+ },
82
+ _getElementHeight(el) {
83
+ return el.getBoundingClientRect().height;
84
+ },
85
+ _getScrollBounds(el) {
86
+ const height = this._getElementHeight(el);
87
+ const scrollTop = el.scrollTop;
88
+ return {
89
+ top: scrollTop,
90
+ bottom: scrollTop + height
91
+ };
92
+ },
93
+ _inScrollBounds(top, bottom, bounds) {
94
+ const height = bottom - top;
95
+ return bottom <= bounds.bottom + 3 * height / 4 && top >= bounds.top - height / 4;
96
+ }
97
+ }
98
+ };
99
+ const ERROR_INVALID_LIST_ELEMENT = "listElementKey is required or the referenced element doesn't exist. Received listElement: ";
100
+ const KeyboardNavigation = ({
101
+ // Role of the list items in the component. This is used to identify the list items
102
+ // so you must update this if the role of your list items is anything other than 'option'
103
+ listItemRole = "option",
104
+ // Key of the data prop that will be added to the component.
105
+ indexKey = "highlightIndex",
106
+ idKey = "highlightId",
107
+ // Key of the method that references the list element.
108
+ listElementKey = "listRef",
109
+ // Optional, Key of the computed prop that references the currently active item element.
110
+ activeItemKey = "",
111
+ // Optional, name of the method that toggles the list visibility. Used for
112
+ // opening the list when up or down is pressed.
113
+ openMethod = null,
114
+ // Optional, method to call when the highlightIndex is changed.
115
+ afterHighlightMethod = null,
116
+ // Optional, method to call when the highlightIndex goes past the beginning of the list.
117
+ beginningOfListMethod = null,
118
+ // Optional, method to call when the highlightIndex goes past the end of the list.
119
+ endOfListMethod = null,
120
+ // Scroll the active element into view when highlighted by a keyboard event.
121
+ scrollToOnHighlight = true,
122
+ // Focus the active element on keyboard navigation.
123
+ focusOnKeyboardNavigation = false
124
+ } = {}) => ({
125
+ mixins: [Dom],
126
+ data() {
127
+ return {
128
+ [indexKey]: -1,
129
+ [idKey]: "",
130
+ scrollToOnHighlight,
131
+ focusOnKeyboardNavigation
132
+ };
133
+ },
134
+ provide() {
135
+ return {
136
+ highlightId: () => this[idKey]
137
+ };
138
+ },
139
+ methods: {
140
+ // Returns the list element
141
+ // this[listElement]() can return a Vue component, in which case we need to target
142
+ // the $el property, or it can simply be an html element.
143
+ _getListElement() {
144
+ var _a;
145
+ return ((_a = this[listElementKey]()) == null ? void 0 : _a.$el) || this[listElementKey]();
146
+ },
147
+ // Gets the length of all the items in the list, uses the listItemRole param to determine
148
+ // whether an element is a list item.
149
+ _itemsLength() {
150
+ const listItems = this._getListItemNodes();
151
+ if (listItems === null) {
152
+ return 0;
153
+ }
154
+ return listItems.length;
155
+ },
156
+ // Gets all the list item nodes within the list element
157
+ _getListItemNodes() {
158
+ const listElement = this._getListElement();
159
+ if (!listElement) {
160
+ console.error(ERROR_INVALID_LIST_ELEMENT, listElement);
161
+ return null;
162
+ }
163
+ return Array.from(listElement.querySelectorAll(`[role="${listItemRole}"], #sr-only-close-button`));
164
+ },
165
+ onUpKey() {
166
+ if (openMethod) {
167
+ this[openMethod](true);
168
+ }
169
+ if (this[indexKey] > 0) {
170
+ this.setHighlightIndex(this[indexKey] - 1);
171
+ } else if (beginningOfListMethod) {
172
+ this[beginningOfListMethod]();
173
+ }
174
+ this.scrollActiveItemIntoViewIfNeeded();
175
+ this.focusActiveItemIfNeeded();
176
+ },
177
+ onDownKey() {
178
+ if (openMethod) {
179
+ this[openMethod](true);
180
+ }
181
+ if (this[indexKey] < this._itemsLength() - 1) {
182
+ this.setHighlightIndex(this[indexKey] + 1);
183
+ } else if (endOfListMethod) {
184
+ this[endOfListMethod]();
185
+ }
186
+ this.scrollActiveItemIntoViewIfNeeded();
187
+ this.focusActiveItemIfNeeded();
188
+ },
189
+ onHomeKey() {
190
+ this.jumpToBeginning();
191
+ this.scrollActiveItemIntoViewIfNeeded();
192
+ this.focusActiveItemIfNeeded();
193
+ },
194
+ onEndKey() {
195
+ this.jumpToEnd();
196
+ this.scrollActiveItemIntoViewIfNeeded();
197
+ this.focusActiveItemIfNeeded();
198
+ },
199
+ onNavigationKey(key) {
200
+ const listItems = this._getListItemNodes();
201
+ const matchingItems = listItems.filter((item) => {
202
+ const content = item.textContent.trim().toLowerCase();
203
+ return content.startsWith(key.toLowerCase());
204
+ });
205
+ if (matchingItems.length <= 0) {
206
+ return;
207
+ }
208
+ const highlightedMatchingItemIndex = matchingItems.findIndex((item) => {
209
+ return this[indexKey] === listItems.indexOf(item);
210
+ });
211
+ const nextHighlightedItemIndex = listItems.indexOf(
212
+ highlightedMatchingItemIndex < matchingItems.length - 1 ? matchingItems[highlightedMatchingItemIndex + 1] : matchingItems[0]
213
+ );
214
+ this.setHighlightIndex(nextHighlightedItemIndex);
215
+ this.scrollActiveItemIntoViewIfNeeded();
216
+ this.focusActiveItemIfNeeded();
217
+ },
218
+ isValidLetter(key) {
219
+ if (key.length > 1) {
220
+ return false;
221
+ }
222
+ return key >= "a" && key <= "z" || key >= "A" && key <= "Z";
223
+ },
224
+ jumpToBeginning() {
225
+ this.setHighlightIndex(0);
226
+ },
227
+ jumpToEnd() {
228
+ this.setHighlightIndex(this._itemsLength() - 1);
229
+ },
230
+ setHighlightIndex(num) {
231
+ this[indexKey] = num;
232
+ this[idKey] = this._getItemId(num);
233
+ if (this._itemsLength() && afterHighlightMethod) {
234
+ this[afterHighlightMethod](num);
235
+ }
236
+ },
237
+ setHighlightId(id) {
238
+ this[idKey] = id;
239
+ this[indexKey] = this._getItemIndex(id);
240
+ if (this._itemsLength() && afterHighlightMethod) {
241
+ this[afterHighlightMethod](this._getItemIndex(id));
242
+ }
243
+ },
244
+ _getItemIndex(id) {
245
+ const listElement = this._getListElement();
246
+ if (!listElement) {
247
+ return;
248
+ }
249
+ const listItems = Array.from(listElement.querySelectorAll(`[role="${listItemRole}"], #sr-only-close-button`));
250
+ return listItems.indexOf(listElement.querySelector(`#${id}`));
251
+ },
252
+ _getItemId(index) {
253
+ var _a;
254
+ const listElement = this._getListElement();
255
+ if (!listElement) {
256
+ return;
257
+ }
258
+ return (_a = listElement.querySelectorAll(`[role="${listItemRole}"], #sr-only-close-button`)[index]) == null ? void 0 : _a.id;
259
+ },
260
+ scrollActiveItemIntoViewIfNeeded() {
261
+ if (!this.scrollToOnHighlight) {
262
+ return;
263
+ }
264
+ const activeItemEl = this[activeItemKey];
265
+ if (activeItemEl) {
266
+ const listElement = this._getListElement();
267
+ this.scrollElementIntoViewIfNeeded(activeItemEl, null, null, listElement);
268
+ }
269
+ },
270
+ focusActiveItemIfNeeded() {
271
+ if (!this.focusOnKeyboardNavigation) {
272
+ return;
273
+ }
274
+ const activeItemEl = this[activeItemKey];
275
+ if (activeItemEl) {
276
+ activeItemEl.focus();
277
+ }
278
+ }
279
+ }
280
+ });
281
+ export {
282
+ KeyboardNavigation
283
+ };
284
+ //# sourceMappingURL=keyboard_list_navigation-ScXhrxya.js.map