@dialpad/dialtone-vue 2.127.0 → 2.127.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (422) hide show
  1. package/dist/chunks/_plugin-vue2_normalizer-1aBeR4AK.js +59 -0
  2. package/dist/chunks/_plugin-vue2_normalizer-1aBeR4AK.js.map +1 -0
  3. package/dist/chunks/_plugin-vue2_normalizer-sOSkiPF3.js +60 -0
  4. package/dist/chunks/_plugin-vue2_normalizer-sOSkiPF3.js.map +1 -0
  5. package/dist/chunks/{dropdown-SMWaTWyF.js → dropdown-DTtcQEFC.js} +131 -84
  6. package/dist/chunks/{dropdown-SMWaTWyF.js.map → dropdown-DTtcQEFC.js.map} +1 -1
  7. package/dist/chunks/dropdown-IaLNHmVd.js +403 -0
  8. package/dist/chunks/{dropdown-zhMEz3bn.js.map → dropdown-IaLNHmVd.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-DUr1xHR0.js +442 -0
  18. package/dist/chunks/{index-2jPosQBn.js.map → index-DUr1xHR0.js.map} +1 -1
  19. package/dist/chunks/index-IA-Z8fgm.js +441 -0
  20. package/dist/chunks/{index-nIyl_PL6.js.map → index-IA-Z8fgm.js.map} +1 -1
  21. package/dist/chunks/{input-1tm09l_-.js → input-6kbd8Pju.js} +83 -60
  22. package/dist/chunks/{input-o-fc1X4b.js.map → input-6kbd8Pju.js.map} +1 -1
  23. package/dist/chunks/input-Axw-wFj2.js +295 -0
  24. package/dist/chunks/{input-1tm09l_-.js.map → input-Axw-wFj2.js.map} +1 -1
  25. package/dist/chunks/input_group-m3cWYUfI.js +143 -0
  26. package/dist/chunks/{input_group-zcAq3DQl.js.map → input_group-m3cWYUfI.js.map} +1 -1
  27. package/dist/chunks/{input_group-zcAq3DQl.js → input_group-qVZaS5Bb.js} +27 -24
  28. package/dist/chunks/{input_group-j2gTtc1C.js.map → input_group-qVZaS5Bb.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-IRUoLX2d.js +196 -0
  46. package/dist/chunks/{notice_action-u3ZKIhit.js.map → notice_action-IRUoLX2d.js.map} +1 -1
  47. package/dist/chunks/notice_action-P6uDyE9x.js +195 -0
  48. package/dist/chunks/{notice_action-9NmtQRai.js.map → notice_action-P6uDyE9x.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-81bHIpPu.js +95 -0
  58. package/dist/chunks/{sr_only_close_button-ErijKGYR.js.map → sr_only_close_button-81bHIpPu.js.map} +1 -1
  59. package/dist/chunks/sr_only_close_button-ZaGdAHz7.js +94 -0
  60. package/dist/chunks/{sr_only_close_button-JGole5Xi.js.map → sr_only_close_button-ZaGdAHz7.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-FcsV5VmK.js +386 -0
  66. package/dist/chunks/{tab-7hJQSLFx.js.map → tab-FcsV5VmK.js.map} +1 -1
  67. package/dist/chunks/tab-V4cb44Ry.js +387 -0
  68. package/dist/chunks/{tab-Qm9LVkYj.js.map → tab-V4cb44Ry.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 +237 -0
  85. package/dist/{lib → common}/utils.cjs.map +1 -1
  86. package/dist/common/utils.js +237 -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 +372 -1
  93. package/dist/dialtone-vue.cjs.map +1 -1
  94. package/dist/dialtone-vue.js +325 -324
  95. package/dist/dialtone-vue.js.map +1 -1
  96. package/dist/lib/attachment-carousel.cjs +260 -1
  97. package/dist/lib/attachment-carousel.cjs.map +1 -1
  98. package/dist/lib/attachment-carousel.js +96 -84
  99. package/dist/lib/attachment-carousel.js.map +1 -1
  100. package/dist/lib/avatar.cjs +399 -1
  101. package/dist/lib/avatar.cjs.map +1 -1
  102. package/dist/lib/avatar.js +111 -79
  103. package/dist/lib/avatar.js.map +1 -1
  104. package/dist/lib/badge.cjs +182 -1
  105. package/dist/lib/badge.cjs.map +1 -1
  106. package/dist/lib/badge.js +53 -38
  107. package/dist/lib/badge.js.map +1 -1
  108. package/dist/lib/banner.cjs +209 -2
  109. package/dist/lib/banner.cjs.map +1 -1
  110. package/dist/lib/banner.js +58 -47
  111. package/dist/lib/banner.js.map +1 -1
  112. package/dist/lib/breadcrumbs.cjs +146 -1
  113. package/dist/lib/breadcrumbs.cjs.map +1 -1
  114. package/dist/lib/breadcrumbs.js +57 -48
  115. package/dist/lib/breadcrumbs.js.map +1 -1
  116. package/dist/lib/button-group.cjs +47 -1
  117. package/dist/lib/button-group.cjs.map +1 -1
  118. package/dist/lib/button-group.js +21 -18
  119. package/dist/lib/button-group.js.map +1 -1
  120. package/dist/lib/button.cjs +349 -1
  121. package/dist/lib/button.cjs.map +1 -1
  122. package/dist/lib/button.js +98 -76
  123. package/dist/lib/button.js.map +1 -1
  124. package/dist/lib/callbar-button-with-popover.cjs +249 -1
  125. package/dist/lib/callbar-button-with-popover.cjs.map +1 -1
  126. package/dist/lib/callbar-button-with-popover.js +66 -50
  127. package/dist/lib/callbar-button-with-popover.js.map +1 -1
  128. package/dist/lib/callbar-button.cjs +182 -1
  129. package/dist/lib/callbar-button.cjs.map +1 -1
  130. package/dist/lib/callbar-button.js +42 -34
  131. package/dist/lib/callbar-button.js.map +1 -1
  132. package/dist/lib/callbox.cjs +146 -1
  133. package/dist/lib/callbox.cjs.map +1 -1
  134. package/dist/lib/callbox.js +38 -32
  135. package/dist/lib/callbox.js.map +1 -1
  136. package/dist/lib/card.cjs +73 -1
  137. package/dist/lib/card.cjs.map +1 -1
  138. package/dist/lib/card.js +22 -20
  139. package/dist/lib/card.js.map +1 -1
  140. package/dist/lib/checkbox-group.cjs +129 -1
  141. package/dist/lib/checkbox-group.cjs.map +1 -1
  142. package/dist/lib/checkbox-group.js +42 -29
  143. package/dist/lib/checkbox-group.js.map +1 -1
  144. package/dist/lib/checkbox.cjs +127 -1
  145. package/dist/lib/checkbox.cjs.map +1 -1
  146. package/dist/lib/checkbox.js +46 -35
  147. package/dist/lib/checkbox.js.map +1 -1
  148. package/dist/lib/chip.cjs +198 -1
  149. package/dist/lib/chip.cjs.map +1 -1
  150. package/dist/lib/chip.js +59 -45
  151. package/dist/lib/chip.js.map +1 -1
  152. package/dist/lib/codeblock.cjs +29 -2
  153. package/dist/lib/codeblock.cjs.map +1 -1
  154. package/dist/lib/codeblock.js +15 -14
  155. package/dist/lib/codeblock.js.map +1 -1
  156. package/dist/lib/collapsible.cjs +334 -1
  157. package/dist/lib/collapsible.cjs.map +1 -1
  158. package/dist/lib/collapsible.js +91 -68
  159. package/dist/lib/collapsible.js.map +1 -1
  160. package/dist/lib/combobox-multi-select.cjs +519 -1
  161. package/dist/lib/combobox-multi-select.cjs.map +1 -1
  162. package/dist/lib/combobox-multi-select.js +223 -136
  163. package/dist/lib/combobox-multi-select.js.map +1 -1
  164. package/dist/lib/combobox-with-popover.cjs +384 -1
  165. package/dist/lib/combobox-with-popover.cjs.map +1 -1
  166. package/dist/lib/combobox-with-popover.js +130 -86
  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 +145 -1
  172. package/dist/lib/contact-info.cjs.map +1 -1
  173. package/dist/lib/contact-info.js +34 -32
  174. package/dist/lib/contact-info.js.map +1 -1
  175. package/dist/lib/contact-row.cjs +205 -1
  176. package/dist/lib/contact-row.cjs.map +1 -1
  177. package/dist/lib/contact-row.js +42 -39
  178. package/dist/lib/contact-row.js.map +1 -1
  179. package/dist/lib/datepicker.cjs +662 -1
  180. package/dist/lib/datepicker.cjs.map +1 -1
  181. package/dist/lib/datepicker.js +330 -218
  182. package/dist/lib/datepicker.js.map +1 -1
  183. package/dist/lib/description-list.cjs +114 -1
  184. package/dist/lib/description-list.cjs.map +1 -1
  185. package/dist/lib/description-list.js +51 -19
  186. package/dist/lib/description-list.js.map +1 -1
  187. package/dist/lib/dropdown.cjs +45 -1
  188. package/dist/lib/dropdown.cjs.map +1 -1
  189. package/dist/lib/dropdown.js +27 -25
  190. package/dist/lib/dropdown.js.map +1 -1
  191. package/dist/lib/editor.cjs +555 -1
  192. package/dist/lib/editor.cjs.map +1 -1
  193. package/dist/lib/editor.js +191 -162
  194. package/dist/lib/editor.js.map +1 -1
  195. package/dist/lib/emoji-picker.cjs +1063 -1
  196. package/dist/lib/emoji-picker.cjs.map +1 -1
  197. package/dist/lib/emoji-picker.js +638 -374
  198. package/dist/lib/emoji-picker.js.map +1 -1
  199. package/dist/lib/emoji-row.cjs +88 -1
  200. package/dist/lib/emoji-row.cjs.map +1 -1
  201. package/dist/lib/emoji-row.js +46 -40
  202. package/dist/lib/emoji-row.js.map +1 -1
  203. package/dist/lib/emoji-text-wrapper.cjs +109 -1
  204. package/dist/lib/emoji-text-wrapper.cjs.map +1 -1
  205. package/dist/lib/emoji-text-wrapper.js +49 -35
  206. package/dist/lib/emoji-text-wrapper.js.map +1 -1
  207. package/dist/lib/emoji.cjs +145 -1
  208. package/dist/lib/emoji.cjs.map +1 -1
  209. package/dist/lib/emoji.js +140 -5
  210. package/dist/lib/emoji.js.map +1 -1
  211. package/dist/lib/feed-item-row.cjs +213 -1
  212. package/dist/lib/feed-item-row.cjs.map +1 -1
  213. package/dist/lib/feed-item-row.js +71 -63
  214. package/dist/lib/feed-item-row.js.map +1 -1
  215. package/dist/lib/feed-pill.cjs +149 -1
  216. package/dist/lib/feed-pill.cjs.map +1 -1
  217. package/dist/lib/feed-pill.js +60 -51
  218. package/dist/lib/feed-pill.js.map +1 -1
  219. package/dist/lib/general-row.cjs +405 -1
  220. package/dist/lib/general-row.cjs.map +1 -1
  221. package/dist/lib/general-row.js +133 -106
  222. package/dist/lib/general-row.js.map +1 -1
  223. package/dist/lib/group-row.cjs +117 -1
  224. package/dist/lib/group-row.cjs.map +1 -1
  225. package/dist/lib/group-row.js +33 -30
  226. package/dist/lib/group-row.js.map +1 -1
  227. package/dist/lib/grouped-chip.cjs +45 -1
  228. package/dist/lib/grouped-chip.cjs.map +1 -1
  229. package/dist/lib/grouped-chip.js +28 -26
  230. package/dist/lib/grouped-chip.js.map +1 -1
  231. package/dist/lib/hovercard.cjs +227 -1
  232. package/dist/lib/hovercard.cjs.map +1 -1
  233. package/dist/lib/hovercard.js +98 -63
  234. package/dist/lib/hovercard.js.map +1 -1
  235. package/dist/lib/icon.cjs +59 -1
  236. package/dist/lib/icon.cjs.map +1 -1
  237. package/dist/lib/icon.js +22 -20
  238. package/dist/lib/icon.js.map +1 -1
  239. package/dist/lib/image-viewer.cjs +190 -1
  240. package/dist/lib/image-viewer.cjs.map +1 -1
  241. package/dist/lib/image-viewer.js +83 -62
  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 +29 -27
  246. package/dist/lib/input-group.js.map +1 -1
  247. package/dist/lib/input.cjs +492 -1
  248. package/dist/lib/input.cjs.map +1 -1
  249. package/dist/lib/input.js +127 -89
  250. package/dist/lib/input.js.map +1 -1
  251. package/dist/lib/item-layout.cjs +40 -1
  252. package/dist/lib/item-layout.cjs.map +1 -1
  253. package/dist/lib/item-layout.js +15 -13
  254. package/dist/lib/item-layout.js.map +1 -1
  255. package/dist/lib/ivr-node.cjs +209 -1
  256. package/dist/lib/ivr-node.cjs.map +1 -1
  257. package/dist/lib/ivr-node.js +115 -99
  258. package/dist/lib/ivr-node.js.map +1 -1
  259. package/dist/lib/keyboard-shortcut.cjs +106 -1
  260. package/dist/lib/keyboard-shortcut.cjs.map +1 -1
  261. package/dist/lib/keyboard-shortcut.js +42 -34
  262. package/dist/lib/keyboard-shortcut.js.map +1 -1
  263. package/dist/lib/lazy-show.cjs +80 -1
  264. package/dist/lib/lazy-show.cjs.map +1 -1
  265. package/dist/lib/lazy-show.js +20 -16
  266. package/dist/lib/lazy-show.js.map +1 -1
  267. package/dist/lib/link.cjs +70 -1
  268. package/dist/lib/link.cjs.map +1 -1
  269. package/dist/lib/link.js +22 -20
  270. package/dist/lib/link.js.map +1 -1
  271. package/dist/lib/list-item-group.cjs +60 -1
  272. package/dist/lib/list-item-group.cjs.map +1 -1
  273. package/dist/lib/list-item-group.js +19 -17
  274. package/dist/lib/list-item-group.js.map +1 -1
  275. package/dist/lib/list-item.cjs +204 -1
  276. package/dist/lib/list-item.cjs.map +1 -1
  277. package/dist/lib/list-item.js +67 -56
  278. package/dist/lib/list-item.js.map +1 -1
  279. package/dist/lib/message-input.cjs +554 -1
  280. package/dist/lib/message-input.cjs.map +1 -1
  281. package/dist/lib/message-input.js +174 -152
  282. package/dist/lib/message-input.js.map +1 -1
  283. package/dist/lib/modal.cjs +350 -2
  284. package/dist/lib/modal.cjs.map +1 -1
  285. package/dist/lib/modal.js +118 -90
  286. package/dist/lib/modal.js.map +1 -1
  287. package/dist/lib/notice.cjs +159 -1
  288. package/dist/lib/notice.cjs.map +1 -1
  289. package/dist/lib/notice.js +46 -43
  290. package/dist/lib/notice.js.map +1 -1
  291. package/dist/lib/pagination.cjs +152 -1
  292. package/dist/lib/pagination.cjs.map +1 -1
  293. package/dist/lib/pagination.js +60 -48
  294. package/dist/lib/pagination.js.map +1 -1
  295. package/dist/lib/popover.cjs +956 -1
  296. package/dist/lib/popover.cjs.map +1 -1
  297. package/dist/lib/popover.js +401 -221
  298. package/dist/lib/popover.js.map +1 -1
  299. package/dist/lib/presence.cjs +65 -1
  300. package/dist/lib/presence.cjs.map +1 -1
  301. package/dist/lib/presence.js +32 -26
  302. package/dist/lib/presence.js.map +1 -1
  303. package/dist/lib/radio-group.cjs +98 -1
  304. package/dist/lib/radio-group.cjs.map +1 -1
  305. package/dist/lib/radio-group.js +24 -22
  306. package/dist/lib/radio-group.js.map +1 -1
  307. package/dist/lib/radio.cjs +118 -1
  308. package/dist/lib/radio.cjs.map +1 -1
  309. package/dist/lib/radio.js +43 -35
  310. package/dist/lib/radio.js.map +1 -1
  311. package/dist/lib/rich-text-editor.cjs +1138 -1
  312. package/dist/lib/rich-text-editor.cjs.map +1 -1
  313. package/dist/lib/rich-text-editor.js +574 -387
  314. package/dist/lib/rich-text-editor.js.map +1 -1
  315. package/dist/lib/root-layout.cjs +130 -1
  316. package/dist/lib/root-layout.cjs.map +1 -1
  317. package/dist/lib/root-layout.js +28 -24
  318. package/dist/lib/root-layout.js.map +1 -1
  319. package/dist/lib/select-menu.cjs +282 -1
  320. package/dist/lib/select-menu.cjs.map +1 -1
  321. package/dist/lib/select-menu.js +101 -61
  322. package/dist/lib/select-menu.js.map +1 -1
  323. package/dist/lib/settings-menu-button.cjs +65 -1
  324. package/dist/lib/settings-menu-button.cjs.map +1 -1
  325. package/dist/lib/settings-menu-button.js +26 -24
  326. package/dist/lib/settings-menu-button.js.map +1 -1
  327. package/dist/lib/skeleton.cjs +612 -1
  328. package/dist/lib/skeleton.cjs.map +1 -1
  329. package/dist/lib/skeleton.js +174 -135
  330. package/dist/lib/skeleton.js.map +1 -1
  331. package/dist/lib/stack.cjs +127 -1
  332. package/dist/lib/stack.cjs.map +1 -1
  333. package/dist/lib/stack.js +66 -56
  334. package/dist/lib/stack.js.map +1 -1
  335. package/dist/lib/tabs.cjs +99 -1
  336. package/dist/lib/tabs.cjs.map +1 -1
  337. package/dist/lib/tabs.js +42 -35
  338. package/dist/lib/tabs.js.map +1 -1
  339. package/dist/lib/time-pill.cjs +47 -1
  340. package/dist/lib/time-pill.cjs.map +1 -1
  341. package/dist/lib/time-pill.js +21 -16
  342. package/dist/lib/time-pill.js.map +1 -1
  343. package/dist/lib/toast.cjs +247 -1
  344. package/dist/lib/toast.cjs.map +1 -1
  345. package/dist/lib/toast.js +78 -55
  346. package/dist/lib/toast.js.map +1 -1
  347. package/dist/lib/toggle.cjs +177 -1
  348. package/dist/lib/toggle.cjs.map +1 -1
  349. package/dist/lib/toggle.js +46 -37
  350. package/dist/lib/toggle.js.map +1 -1
  351. package/dist/lib/tooltip-directive.cjs +87 -1
  352. package/dist/lib/tooltip-directive.cjs.map +1 -1
  353. package/dist/lib/tooltip-directive.js +55 -41
  354. package/dist/lib/tooltip-directive.js.map +1 -1
  355. package/dist/lib/tooltip.cjs +436 -1
  356. package/dist/lib/tooltip.cjs.map +1 -1
  357. package/dist/lib/tooltip.js +152 -90
  358. package/dist/lib/tooltip.js.map +1 -1
  359. package/dist/lib/top-banner-info.cjs +63 -1
  360. package/dist/lib/top-banner-info.cjs.map +1 -1
  361. package/dist/lib/top-banner-info.js +22 -18
  362. package/dist/lib/top-banner-info.js.map +1 -1
  363. package/dist/lib/unread-pill.cjs +63 -1
  364. package/dist/lib/unread-pill.cjs.map +1 -1
  365. package/dist/lib/unread-pill.js +25 -21
  366. package/dist/lib/unread-pill.js.map +1 -1
  367. package/dist/lib/validation-messages.cjs +85 -1
  368. package/dist/lib/validation-messages.cjs.map +1 -1
  369. package/dist/lib/validation-messages.js +32 -29
  370. package/dist/lib/validation-messages.js.map +1 -1
  371. package/dist/style.css +1214 -1
  372. package/dist/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +2 -2
  373. package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +2 -2
  374. package/package.json +31 -30
  375. package/dist/chunks/_plugin-vue2_normalizer-ZK80B3OL.js +0 -2
  376. package/dist/chunks/_plugin-vue2_normalizer-ZK80B3OL.js.map +0 -1
  377. package/dist/chunks/_plugin-vue2_normalizer-u6G_3nkj.js +0 -33
  378. package/dist/chunks/_plugin-vue2_normalizer-u6G_3nkj.js.map +0 -1
  379. package/dist/chunks/dropdown-zhMEz3bn.js +0 -2
  380. package/dist/chunks/dropdown_constants-EUcDxBrX.js +0 -9
  381. package/dist/chunks/dropdown_constants-EUcDxBrX.js.map +0 -1
  382. package/dist/chunks/dropdown_constants-KHFvVI2L.js +0 -2
  383. package/dist/chunks/dropdown_constants-KHFvVI2L.js.map +0 -1
  384. package/dist/chunks/icon_constants-2S_OSQ1t.js +0 -2
  385. package/dist/chunks/index-2jPosQBn.js +0 -3
  386. package/dist/chunks/index-YkSDT8-g.js +0 -244
  387. package/dist/chunks/index-YkSDT8-g.js.map +0 -1
  388. package/dist/chunks/index-nIyl_PL6.js +0 -372
  389. package/dist/chunks/index-sdfB7Aok.js +0 -2
  390. package/dist/chunks/index-sdfB7Aok.js.map +0 -1
  391. package/dist/chunks/input-o-fc1X4b.js +0 -2
  392. package/dist/chunks/input_group-j2gTtc1C.js +0 -2
  393. package/dist/chunks/keyboard_list_navigation-F0O8nht0.js +0 -197
  394. package/dist/chunks/keyboard_list_navigation-N74Bpdq7.js +0 -2
  395. package/dist/chunks/link_constants-Kn6kP4i1.js +0 -2
  396. package/dist/chunks/link_constants-vIUB92L4.js +0 -16
  397. package/dist/chunks/list_item_constants-LTUc74pD.js +0 -13
  398. package/dist/chunks/list_item_constants-Tsz5CO1m.js +0 -2
  399. package/dist/chunks/modal-VuMFkZFH.js +0 -82
  400. package/dist/chunks/modal-qEzlo0Sj.js +0 -2
  401. package/dist/chunks/notice_action-9NmtQRai.js +0 -182
  402. package/dist/chunks/notice_action-u3ZKIhit.js +0 -2
  403. package/dist/chunks/notice_constants-c--hBFQw.js +0 -6
  404. package/dist/chunks/notice_constants-mC6al2Dm.js +0 -2
  405. package/dist/chunks/popover_constants-hOEhklvr.js +0 -2
  406. package/dist/chunks/popover_constants-qjlEkroB.js +0 -114
  407. package/dist/chunks/sr_only_close_button-ErijKGYR.js +0 -3
  408. package/dist/chunks/sr_only_close_button-JGole5Xi.js +0 -86
  409. package/dist/chunks/stack_constants-m9Ickqw0.js +0 -2
  410. package/dist/chunks/stack_constants-u7tNqGtc.js +0 -13
  411. package/dist/chunks/tab-7hJQSLFx.js +0 -2
  412. package/dist/chunks/tab-Qm9LVkYj.js +0 -346
  413. package/dist/lib/constants.cjs +0 -2
  414. package/dist/lib/dates.cjs +0 -2
  415. package/dist/lib/dates.js +0 -57
  416. package/dist/lib/mixins.cjs +0 -2
  417. package/dist/lib/mixins.js +0 -17
  418. package/dist/lib/utils.cjs +0 -2
  419. package/dist/lib/utils.js +0 -175
  420. package/dist/lib/validators.cjs +0 -2
  421. package/dist/lib/validators.js +0 -12
  422. /package/dist/{lib → common}/mixins.js.map +0 -0
@@ -0,0 +1,143 @@
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
+ data() {
100
+ const formattedMessages = common_utils.formatMessages(this.messages);
101
+ return {
102
+ // wrap values in object to make reactive
103
+ provideObj: {
104
+ name: this.name,
105
+ disabled: this.disabled,
106
+ validationState: common_utils.getValidationState(formattedMessages)
107
+ }
108
+ };
109
+ },
110
+ computed: {
111
+ formattedMessages() {
112
+ return common_utils.formatMessages(this.messages);
113
+ },
114
+ validationState() {
115
+ return common_utils.getValidationState(this.formattedMessages);
116
+ }
117
+ },
118
+ watch: {
119
+ disabled(newDisabled) {
120
+ this.provideObj.disabled = newDisabled;
121
+ },
122
+ validationState(newValidationState) {
123
+ this.provideObj.validationState = newValidationState;
124
+ }
125
+ },
126
+ methods: {
127
+ /*
128
+ * provided value to support 2 way binding for slotted input components.
129
+ * slotted input components will change this value and need to emit new value up.
130
+ */
131
+ setGroupValue(newValue) {
132
+ this.internalValue = newValue;
133
+ this.$emit("input", newValue);
134
+ }
135
+ },
136
+ mounted() {
137
+ if (!this.legend && !this.$slots.legend && !this.$attrs["aria-label"]) {
138
+ Vue.util.warn("It is expected that an aria-label is provided when there is no legend.", this);
139
+ }
140
+ }
141
+ };
142
+ exports.InputGroupMixin = InputGroupMixin;
143
+ //# sourceMappingURL=input_group-m3cWYUfI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input_group-zcAq3DQl.js","sources":["../../common/mixins/input_group.js"],"sourcesContent":["import Vue 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 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 Vue.util.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","Vue"],"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,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,EAAI,KAAK,KAAK,0EAA0E,IAAI;AAAA,EAE/F;AACH;"}
1
+ {"version":3,"file":"input_group-m3cWYUfI.js","sources":["../../common/mixins/input_group.js"],"sourcesContent":["import Vue 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 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 Vue.util.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"],"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,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;AACrE,UAAI,KAAK,KAAK,0EAA0E,IAAI;AAAA,IAC7F;AAAA,EACF;AACH;;"}
@@ -1,9 +1,9 @@
1
- import 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 Vue 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
@@ -96,30 +96,30 @@ const u = {
96
96
  }
97
97
  },
98
98
  data() {
99
- const e = t(this.messages);
99
+ const formattedMessages = formatMessages(this.messages);
100
100
  return {
101
101
  // wrap values in object to make reactive
102
102
  provideObj: {
103
103
  name: this.name,
104
104
  disabled: this.disabled,
105
- validationState: a(e)
105
+ validationState: getValidationState(formattedMessages)
106
106
  }
107
107
  };
108
108
  },
109
109
  computed: {
110
110
  formattedMessages() {
111
- return t(this.messages);
111
+ return formatMessages(this.messages);
112
112
  },
113
113
  validationState() {
114
- return a(this.formattedMessages);
114
+ return getValidationState(this.formattedMessages);
115
115
  }
116
116
  },
117
117
  watch: {
118
- disabled(e) {
119
- this.provideObj.disabled = e;
118
+ disabled(newDisabled) {
119
+ this.provideObj.disabled = newDisabled;
120
120
  },
121
- validationState(e) {
122
- this.provideObj.validationState = e;
121
+ validationState(newValidationState) {
122
+ this.provideObj.validationState = newValidationState;
123
123
  }
124
124
  },
125
125
  methods: {
@@ -127,15 +127,18 @@ const u = {
127
127
  * provided value to support 2 way binding for slotted input components.
128
128
  * slotted input components will change this value and need to emit new value up.
129
129
  */
130
- setGroupValue(e) {
131
- this.internalValue = e, this.$emit("input", e);
130
+ setGroupValue(newValue) {
131
+ this.internalValue = newValue;
132
+ this.$emit("input", newValue);
132
133
  }
133
134
  },
134
135
  mounted() {
135
- !this.legend && !this.$slots.legend && !this.$attrs["aria-label"] && s.util.warn("It is expected that an aria-label is provided when there is no legend.", this);
136
+ if (!this.legend && !this.$slots.legend && !this.$attrs["aria-label"]) {
137
+ Vue.util.warn("It is expected that an aria-label is provided when there is no legend.", this);
138
+ }
136
139
  }
137
140
  };
138
141
  export {
139
- u as I
142
+ InputGroupMixin
140
143
  };
141
- //# sourceMappingURL=input_group-zcAq3DQl.js.map
144
+ //# sourceMappingURL=input_group-qVZaS5Bb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input_group-j2gTtc1C.js","sources":["../../common/mixins/input_group.js"],"sourcesContent":["import Vue 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 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 Vue.util.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","Vue"],"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,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,EAAI,KAAK,KAAK,yEAA0E,IAAI,CAE/F,CACH"}
1
+ {"version":3,"file":"input_group-qVZaS5Bb.js","sources":["../../common/mixins/input_group.js"],"sourcesContent":["import Vue 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 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 Vue.util.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,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,UAAI,KAAK,KAAK,0EAA0E,IAAI;AAAA,IAC7F;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