@adyen/bento-vue2 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/dist/@types/components.d.ts +8 -4
  2. package/dist/@types/packages/core/src/components/button/button.types.d.ts +8 -0
  3. package/dist/@types/packages/vue2/src/components/accordion/accordion.keys.d.ts +1 -1
  4. package/dist/@types/packages/vue2/src/components/accordion/accordion.types.d.ts +1 -24
  5. package/dist/@types/packages/vue2/src/components/accordion/accordion.vue.d.ts +17 -51
  6. package/dist/@types/packages/vue2/src/components/accordion/components/accordion-item.vue.d.ts +24 -28
  7. package/dist/@types/packages/vue2/src/components/accordion/index.d.ts +2 -3
  8. package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +0 -4
  9. package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +1 -4
  10. package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +161 -150
  11. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +3 -5
  12. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +3 -3
  13. package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +2 -2
  14. package/dist/@types/packages/vue2/src/components/card/card.vue.d.ts +77 -15
  15. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.types.d.ts +2 -1
  16. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +4 -6
  17. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +4 -4
  18. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.types.d.ts +2 -1
  19. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +36 -11
  20. package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +0 -2
  21. package/dist/@types/packages/vue2/src/components/currency/currency.vue.d.ts +0 -3
  22. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +2 -22
  23. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/components/data-grid-config-settings-column-row/data-grid-config-settings-column-row.vue.d.ts +0 -5
  24. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue.d.ts +0 -24
  25. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +2 -0
  26. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +326 -14
  27. package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +2 -5
  28. package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +1 -21
  29. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +0 -2
  30. package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +1 -21
  31. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +3 -6
  32. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +3 -3
  33. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +277 -104
  34. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +2 -2
  35. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +5 -5
  36. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.types.d.ts +1 -1
  37. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +5 -6
  38. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.types.d.ts +1 -1
  39. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +5 -5
  40. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.types.d.ts +1 -1
  41. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +5 -5
  42. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.types.d.ts +1 -1
  43. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +6 -6
  44. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +7 -9
  45. package/dist/@types/packages/vue2/src/components/empty-state/empty-state.types.d.ts +27 -0
  46. package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +76 -0
  47. package/dist/@types/packages/vue2/src/components/empty-state/index.d.ts +2 -0
  48. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +19 -25
  49. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-button/all-filters-modal-button.vue.d.ts +1 -1
  50. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +0 -26
  51. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +1 -4
  52. package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +0 -10
  53. package/dist/@types/packages/vue2/src/components/filter-bar/components/{base-filter/components/filter-bar-filter-button/filter-bar-filter-button.vue.d.ts → filter-bar-button/filter-bar-button.vue.d.ts} +17 -22
  54. package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/index.d.ts +1 -0
  55. package/dist/@types/packages/vue2/src/components/filter-bar/components/input-filter/input-filter.vue.d.ts +1 -0
  56. package/dist/@types/packages/vue2/src/components/filter-bar/components/range-filter/range-filter.vue.d.ts +0 -2
  57. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +2 -4
  58. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +2 -4
  59. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +0 -2
  60. package/dist/@types/packages/vue2/src/components/focus-trap/focus-trap.vue.d.ts +3 -0
  61. package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +0 -2
  62. package/dist/@types/packages/vue2/src/components/image/const.d.ts +1 -0
  63. package/dist/@types/packages/vue2/src/components/image/image.types.d.ts +19 -0
  64. package/dist/@types/packages/vue2/src/components/image/image.vue.d.ts +50 -0
  65. package/dist/@types/packages/vue2/src/components/image/index.d.ts +1 -0
  66. package/dist/@types/packages/vue2/src/components/info-icon/info-icon.vue.d.ts +3 -3
  67. package/dist/@types/packages/vue2/src/components/input-field/input-field.types.d.ts +1 -0
  68. package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +50 -47
  69. package/dist/@types/packages/vue2/src/components/internal/avatar/avatar.vue.d.ts +0 -3
  70. package/dist/@types/packages/vue2/src/components/internal/base-button/base-button.vue.d.ts +1 -4
  71. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/calendar-month.vue.d.ts +0 -5
  72. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/components/calendar-month-day/__test__/calendar-month-day-stub.vue.d.ts +1 -1
  73. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.vue.d.ts +2 -2
  74. package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
  75. package/dist/@types/packages/vue2/src/components/internal/copy/copy.vue.d.ts +0 -2
  76. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue.d.ts +0 -2
  77. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue.d.ts +0 -2
  78. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +0 -2
  79. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-option-tag/listbox-option-tag.vue.d.ts +0 -2
  80. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select-option/listbox-single-select-option.vue.d.ts +0 -2
  81. package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +3 -7
  82. package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +4 -0
  83. package/dist/@types/packages/vue2/src/components/menu/components/menu-item/menu-item.vue.d.ts +2 -5
  84. package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +6 -31
  85. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +0 -5
  86. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +14 -9
  87. package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +2 -2
  88. package/dist/@types/packages/vue2/src/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +4 -14
  89. package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +7 -6
  90. package/dist/@types/packages/vue2/src/components/pagination/components/pagination-context/pagination-context.vue.d.ts +0 -2
  91. package/dist/@types/packages/vue2/src/components/pagination/components/pagination-controls/pagination-controls.vue.d.ts +0 -2
  92. package/dist/@types/packages/vue2/src/components/pagination/components/pagination-results-per-page/pagination-results-per-page.vue.d.ts +0 -2
  93. package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +2 -1
  94. package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +0 -2
  95. package/dist/@types/packages/vue2/src/components/popover/components/popover-dismiss-button/popover-dismiss-button.vue.d.ts +0 -2
  96. package/dist/@types/packages/vue2/src/components/popover/components/popover-title/popover-title.vue.d.ts +1 -2
  97. package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +9 -9
  98. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +5 -14
  99. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +4 -6
  100. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.types.d.ts +2 -1
  101. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +4 -4
  102. package/dist/@types/packages/vue2/src/components/search-bar/search-bar.vue.d.ts +16 -339
  103. package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +0 -3
  104. package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +1 -0
  105. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.types.d.ts +3 -1
  106. package/dist/@types/packages/vue2/src/components/status/status.vue.d.ts +2 -5
  107. package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +0 -2
  108. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +2 -23
  109. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +2 -5
  110. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue.d.ts +2 -5
  111. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue.d.ts +2 -5
  112. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue.d.ts +1 -4
  113. package/dist/@types/packages/vue2/src/components/tabs/components/tab.types.d.ts +3 -1
  114. package/dist/@types/packages/vue2/src/components/tabs/components/tab.vue.d.ts +1 -0
  115. package/dist/@types/packages/vue2/src/components/tabs/tabs.keys.d.ts +1 -0
  116. package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +6 -2
  117. package/dist/@types/packages/vue2/src/components/tabs/tabs.vue.d.ts +4 -9
  118. package/dist/@types/packages/vue2/src/components/tag/tag.vue.d.ts +4 -7
  119. package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +5 -9
  120. package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +6 -12
  121. package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +1 -0
  122. package/dist/@types/packages/vue2/src/components/toast/components/toast-item/toast-item.vue.d.ts +0 -5
  123. package/dist/@types/packages/vue2/src/components/toggle/toggle.vue.d.ts +4 -6
  124. package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +24 -40
  125. package/dist/@types/packages/vue2/src/composables/use-default-slot-validator/use-default-slot-validator.d.ts +2 -1
  126. package/dist/@types/packages/vue2/src/composables/use-has-slot/use-has-slot.d.ts +4 -1
  127. package/dist/@types/packages/vue2/src/index.d.ts +3 -0
  128. package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +9 -0
  129. package/dist/@types/packages/vue2/src/utils/ts/print-development-warning.d.ts +1 -0
  130. package/dist/accordion.js +69 -177
  131. package/dist/accordion.js.map +1 -1
  132. package/dist/alert.js +57 -60
  133. package/dist/alert.js.map +1 -1
  134. package/dist/assets/base-button.css +1 -1
  135. package/dist/assets/base-modal.css +1 -0
  136. package/dist/assets/button.css +1 -1
  137. package/dist/assets/calendar.css +1 -1
  138. package/dist/assets/checkbox.css +1 -1
  139. package/dist/assets/chevron-up.css +1 -0
  140. package/dist/assets/controls-group.css +1 -1
  141. package/dist/assets/copy.css +1 -1
  142. package/dist/assets/dropdown-default-textbox.css +1 -1
  143. package/dist/assets/dropdown.css +1 -1
  144. package/dist/assets/error-message.css +1 -1
  145. package/dist/assets/footer-actions.css +1 -1
  146. package/dist/assets/index.css +1 -1
  147. package/dist/assets/index10.css +1 -1
  148. package/dist/assets/index11.css +1 -1
  149. package/dist/assets/index12.css +1 -1
  150. package/dist/assets/index13.css +1 -1
  151. package/dist/assets/index14.css +1 -1
  152. package/dist/assets/index15.css +1 -1
  153. package/dist/assets/index16.css +1 -1
  154. package/dist/assets/index17.css +1 -1
  155. package/dist/assets/index18.css +1 -1
  156. package/dist/assets/index19.css +1 -1
  157. package/dist/assets/index2.css +1 -1
  158. package/dist/assets/index20.css +1 -1
  159. package/dist/assets/index21.css +1 -1
  160. package/dist/assets/index22.css +1 -1
  161. package/dist/assets/index23.css +1 -1
  162. package/dist/assets/index24.css +1 -1
  163. package/dist/assets/index25.css +1 -1
  164. package/dist/assets/index26.css +1 -1
  165. package/dist/assets/index27.css +1 -1
  166. package/dist/assets/index28.css +1 -1
  167. package/dist/assets/index29.css +1 -1
  168. package/dist/assets/index3.css +1 -1
  169. package/dist/assets/index30.css +1 -1
  170. package/dist/assets/index31.css +1 -1
  171. package/dist/assets/index32.css +1 -1
  172. package/dist/assets/index33.css +1 -1
  173. package/dist/assets/index34.css +1 -1
  174. package/dist/assets/index35.css +1 -1
  175. package/dist/assets/index36.css +1 -1
  176. package/dist/assets/index37.css +1 -1
  177. package/dist/assets/index38.css +1 -1
  178. package/dist/assets/index39.css +1 -1
  179. package/dist/assets/index4.css +1 -1
  180. package/dist/assets/index40.css +1 -1
  181. package/dist/assets/index41.css +1 -1
  182. package/dist/assets/index42.css +1 -0
  183. package/dist/assets/index5.css +1 -1
  184. package/dist/assets/index6.css +1 -1
  185. package/dist/assets/index7.css +1 -1
  186. package/dist/assets/index8.css +1 -1
  187. package/dist/assets/index9.css +1 -1
  188. package/dist/assets/listbox-option-tag.css +1 -1
  189. package/dist/assets/listbox.css +1 -1
  190. package/dist/assets/loading-button.css +1 -1
  191. package/dist/assets/tooltip.css +1 -1
  192. package/dist/avatar-image.js +1 -1
  193. package/dist/badge.js +2 -2
  194. package/dist/button.js +110 -12
  195. package/dist/button.js.map +1 -1
  196. package/dist/card.js +66 -67
  197. package/dist/card.js.map +1 -1
  198. package/dist/checkbox.js +27 -26
  199. package/dist/checkbox.js.map +1 -1
  200. package/dist/chunks/{base-button.98379576.js → base-button.bd8fa976.js} +24 -27
  201. package/dist/chunks/base-button.bd8fa976.js.map +1 -0
  202. package/dist/chunks/base-modal.a365f260.js +207 -0
  203. package/dist/chunks/base-modal.a365f260.js.map +1 -0
  204. package/dist/chunks/{button.d0c9527d.js → button.fb307df3.js} +36 -39
  205. package/dist/chunks/button.fb307df3.js.map +1 -0
  206. package/dist/chunks/{calendar.0ae43a96.js → calendar.79ea42c1.js} +214 -217
  207. package/dist/chunks/calendar.79ea42c1.js.map +1 -0
  208. package/dist/chunks/checkbox.c7d791ed.js +173 -0
  209. package/dist/chunks/checkbox.c7d791ed.js.map +1 -0
  210. package/dist/chunks/{chevron-down.b851a6da.js → chevron-up.674ec2e5.js} +8 -8
  211. package/dist/chunks/chevron-up.674ec2e5.js.map +1 -0
  212. package/dist/chunks/{controls-group.b827382b.js → controls-group.5d3e04dd.js} +20 -20
  213. package/dist/chunks/controls-group.5d3e04dd.js.map +1 -0
  214. package/dist/chunks/{copy.5a4cbd4d.js → copy.ac796536.js} +37 -38
  215. package/dist/chunks/copy.ac796536.js.map +1 -0
  216. package/dist/chunks/{dropdown-default-textbox.819e43f7.js → dropdown-default-textbox.109c36d2.js} +38 -40
  217. package/dist/chunks/dropdown-default-textbox.109c36d2.js.map +1 -0
  218. package/dist/chunks/{dropdown.c05678d0.js → dropdown.fd93f0ce.js} +351 -335
  219. package/dist/chunks/dropdown.fd93f0ce.js.map +1 -0
  220. package/dist/chunks/error-message.3b3c33d4.js +47 -0
  221. package/dist/chunks/error-message.3b3c33d4.js.map +1 -0
  222. package/dist/chunks/{footer-actions.67642347.js → footer-actions.f02e8699.js} +23 -23
  223. package/dist/chunks/footer-actions.f02e8699.js.map +1 -0
  224. package/dist/chunks/get-slot-text.c1114034.js +9 -0
  225. package/dist/chunks/get-slot-text.c1114034.js.map +1 -0
  226. package/dist/chunks/{grid-layout.73f23b1b.js → grid-layout.b7e0d964.js} +2 -2
  227. package/dist/chunks/{grid-layout.73f23b1b.js.map → grid-layout.b7e0d964.js.map} +1 -1
  228. package/dist/chunks/{index.56858f4e.js → index.45295dd3.js} +23 -19
  229. package/dist/chunks/index.45295dd3.js.map +1 -0
  230. package/dist/chunks/{index.10aaf539.js → index.88ff49c2.js} +136 -142
  231. package/dist/chunks/index.88ff49c2.js.map +1 -0
  232. package/dist/chunks/{index.73d50fa6.js → index.9902cae4.js} +65 -68
  233. package/dist/chunks/{index.73d50fa6.js.map → index.9902cae4.js.map} +1 -1
  234. package/dist/chunks/{index.0cf00b47.js → index.bd734551.js} +35 -37
  235. package/dist/chunks/index.bd734551.js.map +1 -0
  236. package/dist/chunks/{index.133e4da0.js → index.c85a1ab9.js} +81 -79
  237. package/dist/chunks/{index.133e4da0.js.map → index.c85a1ab9.js.map} +1 -1
  238. package/dist/chunks/{index.f0f8ed98.js → index.c8f81673.js} +23 -26
  239. package/dist/chunks/index.c8f81673.js.map +1 -0
  240. package/dist/chunks/{listbox-option-tag.8d6cccac.js → listbox-option-tag.ec42431b.js} +32 -36
  241. package/dist/chunks/listbox-option-tag.ec42431b.js.map +1 -0
  242. package/dist/chunks/{listbox.116ed0c1.js → listbox.e792d2d6.js} +244 -251
  243. package/dist/chunks/listbox.e792d2d6.js.map +1 -0
  244. package/dist/chunks/loading-button.429c8416.js +86 -0
  245. package/dist/chunks/loading-button.429c8416.js.map +1 -0
  246. package/dist/chunks/tabs.keys.358742f2.js +7 -0
  247. package/dist/chunks/tabs.keys.358742f2.js.map +1 -0
  248. package/dist/chunks/{tooltip.2aff4fa6.js → tooltip.a47ace87.js} +49 -52
  249. package/dist/chunks/tooltip.a47ace87.js.map +1 -0
  250. package/dist/chunks/use-default-slot-validator.cbdfe693.js +13 -0
  251. package/dist/chunks/use-default-slot-validator.cbdfe693.js.map +1 -0
  252. package/dist/chunks/use-has-slot.6052d56a.js +6 -0
  253. package/dist/chunks/use-has-slot.6052d56a.js.map +1 -0
  254. package/dist/code-snippet.js +469 -413
  255. package/dist/code-snippet.js.map +1 -1
  256. package/dist/country.js +492 -494
  257. package/dist/country.js.map +1 -1
  258. package/dist/currency.js +32 -35
  259. package/dist/currency.js.map +1 -1
  260. package/dist/data-grid.js +595 -603
  261. package/dist/data-grid.js.map +1 -1
  262. package/dist/date-picker.js +76 -80
  263. package/dist/date-picker.js.map +1 -1
  264. package/dist/date-range-picker.js +2 -2
  265. package/dist/date.js +1 -1
  266. package/dist/divider.js +1 -1
  267. package/dist/dropdown.js +37 -39
  268. package/dist/dropdown.js.map +1 -1
  269. package/dist/empty-state.js +134 -0
  270. package/dist/empty-state.js.map +1 -0
  271. package/dist/filter-bar.js +648 -638
  272. package/dist/filter-bar.js.map +1 -1
  273. package/dist/focus-trap.js +1 -1
  274. package/dist/form-layout.js +64 -64
  275. package/dist/form-layout.js.map +1 -1
  276. package/dist/header.js +61 -63
  277. package/dist/header.js.map +1 -1
  278. package/dist/image.js +82 -0
  279. package/dist/image.js.map +1 -0
  280. package/dist/index.js +216 -205
  281. package/dist/index.js.map +1 -1
  282. package/dist/info-icon.js +2 -2
  283. package/dist/input-field.js +99 -123
  284. package/dist/input-field.js.map +1 -1
  285. package/dist/internal.js +7 -7
  286. package/dist/link.js +27 -26
  287. package/dist/link.js.map +1 -1
  288. package/dist/loading-indicator.js +1 -1
  289. package/dist/menu.js +96 -104
  290. package/dist/menu.js.map +1 -1
  291. package/dist/modal.js +111 -264
  292. package/dist/modal.js.map +1 -1
  293. package/dist/pagination.js +148 -145
  294. package/dist/pagination.js.map +1 -1
  295. package/dist/payment-method.js +16 -18
  296. package/dist/payment-method.js.map +1 -1
  297. package/dist/popover.js +58 -54
  298. package/dist/popover.js.map +1 -1
  299. package/dist/popper-container.js +13 -17
  300. package/dist/popper-container.js.map +1 -1
  301. package/dist/radio-group.js +71 -72
  302. package/dist/radio-group.js.map +1 -1
  303. package/dist/search-bar.js +54 -66
  304. package/dist/search-bar.js.map +1 -1
  305. package/dist/segmented-control.js +68 -55
  306. package/dist/segmented-control.js.map +1 -1
  307. package/dist/sidepanel.js +65 -64
  308. package/dist/sidepanel.js.map +1 -1
  309. package/dist/status.js +20 -23
  310. package/dist/status.js.map +1 -1
  311. package/dist/structured-list.js +1 -1
  312. package/dist/summary-grid.js +110 -141
  313. package/dist/summary-grid.js.map +1 -1
  314. package/dist/tabs.js +68 -60
  315. package/dist/tabs.js.map +1 -1
  316. package/dist/tag.js +23 -26
  317. package/dist/tag.js.map +1 -1
  318. package/dist/textarea.js +97 -96
  319. package/dist/textarea.js.map +1 -1
  320. package/dist/timeline.js +125 -125
  321. package/dist/timeline.js.map +1 -1
  322. package/dist/toast.js +44 -48
  323. package/dist/toast.js.map +1 -1
  324. package/dist/toggle.js +54 -52
  325. package/dist/toggle.js.map +1 -1
  326. package/dist/typography.js +1 -1
  327. package/dist/web-types.json +651 -397
  328. package/package.json +9 -12
  329. package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateBodyFitContentDynamicStyles/useCalculateBodyFitContentDynamicStyles.d.ts +0 -2
  330. package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateBodyFitContentDynamicStyles/useCalculateBodyFitContentDynamicStyles.types.d.ts +0 -8
  331. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/components/index.d.ts +0 -1
  332. package/dist/assets/button-actions.css +0 -1
  333. package/dist/assets/chevron-down.css +0 -1
  334. package/dist/chunks/base-button.98379576.js.map +0 -1
  335. package/dist/chunks/button-actions.bd397c79.js +0 -104
  336. package/dist/chunks/button-actions.bd397c79.js.map +0 -1
  337. package/dist/chunks/button.d0c9527d.js.map +0 -1
  338. package/dist/chunks/calendar.0ae43a96.js.map +0 -1
  339. package/dist/chunks/checkbox.f8457c93.js +0 -164
  340. package/dist/chunks/checkbox.f8457c93.js.map +0 -1
  341. package/dist/chunks/chevron-down.b851a6da.js.map +0 -1
  342. package/dist/chunks/controls-group.b827382b.js.map +0 -1
  343. package/dist/chunks/copy.5a4cbd4d.js.map +0 -1
  344. package/dist/chunks/dropdown-default-textbox.819e43f7.js.map +0 -1
  345. package/dist/chunks/dropdown.c05678d0.js.map +0 -1
  346. package/dist/chunks/error-message.0433b539.js +0 -47
  347. package/dist/chunks/error-message.0433b539.js.map +0 -1
  348. package/dist/chunks/footer-actions.67642347.js.map +0 -1
  349. package/dist/chunks/get-slot-text.e5c766d0.js +0 -9
  350. package/dist/chunks/get-slot-text.e5c766d0.js.map +0 -1
  351. package/dist/chunks/index.0cf00b47.js.map +0 -1
  352. package/dist/chunks/index.10aaf539.js.map +0 -1
  353. package/dist/chunks/index.56858f4e.js.map +0 -1
  354. package/dist/chunks/index.f0f8ed98.js.map +0 -1
  355. package/dist/chunks/listbox-option-tag.8d6cccac.js.map +0 -1
  356. package/dist/chunks/listbox.116ed0c1.js.map +0 -1
  357. package/dist/chunks/loading-button.1c201f87.js +0 -84
  358. package/dist/chunks/loading-button.1c201f87.js.map +0 -1
  359. package/dist/chunks/tooltip.2aff4fa6.js.map +0 -1
  360. package/dist/chunks/use-default-slot-validator.83d977a1.js +0 -11
  361. package/dist/chunks/use-default-slot-validator.83d977a1.js.map +0 -1
  362. package/dist/chunks/use-has-slot.068222e6.js +0 -5
  363. package/dist/chunks/use-has-slot.068222e6.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.133e4da0.js","sources":["../../../../node_modules/focus-lock/dist/es2015/constants.js","../../../../node_modules/focus-lock/dist/es2015/utils/array.js","../../../../node_modules/focus-lock/dist/es2015/utils/is.js","../../../../node_modules/focus-lock/dist/es2015/utils/tabOrder.js","../../../../node_modules/focus-lock/dist/es2015/utils/tabbables.js","../../../../node_modules/focus-lock/dist/es2015/utils/tabUtils.js","../../../../node_modules/focus-lock/dist/es2015/utils/DOMutils.js","../../../../node_modules/focus-lock/dist/es2015/utils/all-affected.js","../../../../node_modules/focus-lock/dist/es2015/utils/getActiveElement.js","../../../../node_modules/focus-lock/dist/es2015/focusInside.js","../../../../node_modules/focus-lock/dist/es2015/focusIsHidden.js","../../../../node_modules/focus-lock/dist/es2015/utils/correctFocus.js","../../../../node_modules/focus-lock/dist/es2015/utils/firstFocus.js","../../../../node_modules/focus-lock/dist/es2015/solver.js","../../../../node_modules/focus-lock/dist/es2015/utils/parenting.js","../../../../node_modules/focus-lock/dist/es2015/focusMerge.js","../../../../node_modules/focus-lock/dist/es2015/focusables.js","../../../../node_modules/focus-lock/dist/es2015/setFocus.js","../../src/components/focus-trap/focus-trap.types.ts","../../src/utils/ts/focus-trap.utils.ts","../../src/components/focus-trap/focus-trap.vue"],"sourcesContent":["/**\n * defines a focus group\n */\nexport var FOCUS_GROUP = 'data-focus-lock';\n/**\n * disables element discovery inside a group marked by key\n */\nexport var FOCUS_DISABLED = 'data-focus-lock-disabled';\n/**\n * allows uncontrolled focus within the marked area, effectively disabling focus lock for it's content\n */\nexport var FOCUS_ALLOW = 'data-no-focus-lock';\n/**\n * instructs autofocus engine to pick default autofocus inside a given node\n * can be set on the element or container\n */\nexport var FOCUS_AUTO = 'data-autofocus-inside';\n/**\n * instructs autofocus to ignore elements within a given node\n * can be set on the element or container\n */\nexport var FOCUS_NO_AUTOFOCUS = 'data-no-autofocus';\n","/*\nIE11 support\n */\nexport var toArray = function (a) {\n var ret = Array(a.length);\n for (var i = 0; i < a.length; ++i) {\n ret[i] = a[i];\n }\n return ret;\n};\nexport var asArray = function (a) { return (Array.isArray(a) ? a : [a]); };\n","import { FOCUS_NO_AUTOFOCUS } from '../constants';\nvar isElementHidden = function (node) {\n // we can measure only \"elements\"\n // consider others as \"visible\"\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n var computedStyle = window.getComputedStyle(node, null);\n if (!computedStyle || !computedStyle.getPropertyValue) {\n return false;\n }\n return (computedStyle.getPropertyValue('display') === 'none' || computedStyle.getPropertyValue('visibility') === 'hidden');\n};\nvar getParentNode = function (node) {\n // DOCUMENT_FRAGMENT_NODE can also point on ShadowRoot. In this case .host will point on the next node\n return node.parentNode && node.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node.parentNode.host\n : node.parentNode;\n};\nvar isTopNode = function (node) {\n // @ts-ignore\n return node === document || (node && node.nodeType === Node.DOCUMENT_NODE);\n};\nvar isVisibleUncached = function (node, checkParent) {\n return !node || isTopNode(node) || (!isElementHidden(node) && checkParent(getParentNode(node)));\n};\nexport var isVisibleCached = function (visibilityCache, node) {\n var cached = visibilityCache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isVisibleUncached(node, isVisibleCached.bind(undefined, visibilityCache));\n visibilityCache.set(node, result);\n return result;\n};\nvar isAutoFocusAllowedUncached = function (node, checkParent) {\n return node && !isTopNode(node) ? (isAutoFocusAllowed(node) ? checkParent(getParentNode(node)) : false) : true;\n};\nexport var isAutoFocusAllowedCached = function (cache, node) {\n var cached = cache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isAutoFocusAllowedUncached(node, isAutoFocusAllowedCached.bind(undefined, cache));\n cache.set(node, result);\n return result;\n};\nexport var getDataset = function (node) {\n // @ts-ignore\n return node.dataset;\n};\nexport var isHTMLButtonElement = function (node) { return node.tagName === 'BUTTON'; };\nexport var isHTMLInputElement = function (node) { return node.tagName === 'INPUT'; };\nexport var isRadioElement = function (node) {\n return isHTMLInputElement(node) && node.type === 'radio';\n};\nexport var notHiddenInput = function (node) {\n return !((isHTMLInputElement(node) || isHTMLButtonElement(node)) && (node.type === 'hidden' || node.disabled));\n};\nexport var isAutoFocusAllowed = function (node) {\n var attribute = node.getAttribute(FOCUS_NO_AUTOFOCUS);\n return ![true, 'true', ''].includes(attribute);\n};\nexport var isGuard = function (node) { var _a; return Boolean(node && ((_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.focusGuard)); };\nexport var isNotAGuard = function (node) { return !isGuard(node); };\nexport var isDefined = function (x) { return Boolean(x); };\n","import { toArray } from './array';\nexport var tabSort = function (a, b) {\n var tabDiff = a.tabIndex - b.tabIndex;\n var indexDiff = a.index - b.index;\n if (tabDiff) {\n if (!a.tabIndex) {\n return 1;\n }\n if (!b.tabIndex) {\n return -1;\n }\n }\n return tabDiff || indexDiff;\n};\nexport var orderByTabIndex = function (nodes, filterNegative, keepGuards) {\n return toArray(nodes)\n .map(function (node, index) { return ({\n node: node,\n index: index,\n tabIndex: keepGuards && node.tabIndex === -1 ? ((node.dataset || {}).focusGuard ? 0 : -1) : node.tabIndex,\n }); })\n .filter(function (data) { return !filterNegative || data.tabIndex >= 0; })\n .sort(tabSort);\n};\n","/**\n * list of the object to be considered as focusable\n */\nexport var tabbables = [\n 'button:enabled',\n 'select:enabled',\n 'textarea:enabled',\n 'input:enabled',\n // elements with explicit roles will also use explicit tabindex\n // '[role=\"button\"]',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[tabindex]',\n '[contenteditable]',\n '[autofocus]',\n];\n","import { FOCUS_AUTO } from '../constants';\nimport { toArray } from './array';\nimport { tabbables } from './tabbables';\nvar queryTabbables = tabbables.join(',');\nvar queryGuardTabbables = \"\".concat(queryTabbables, \", [data-focus-guard]\");\nvar getFocusablesWithShadowDom = function (parent, withGuards) {\n var _a;\n return toArray(((_a = parent.shadowRoot) === null || _a === void 0 ? void 0 : _a.children) || parent.children).reduce(function (acc, child) {\n return acc.concat(child.matches(withGuards ? queryGuardTabbables : queryTabbables) ? [child] : [], getFocusablesWithShadowDom(child));\n }, []);\n};\nexport var getFocusables = function (parents, withGuards) {\n return parents.reduce(function (acc, parent) {\n return acc.concat(\n // add all tabbables inside and within shadow DOMs in DOM order\n getFocusablesWithShadowDom(parent, withGuards), \n // add if node is tabbable itself\n parent.parentNode\n ? toArray(parent.parentNode.querySelectorAll(queryTabbables)).filter(function (node) { return node === parent; })\n : []);\n }, []);\n};\n/**\n * return a list of focusable nodes within an area marked as \"auto-focusable\"\n * @param parent\n */\nexport var getParentAutofocusables = function (parent) {\n var parentFocus = parent.querySelectorAll(\"[\".concat(FOCUS_AUTO, \"]\"));\n return toArray(parentFocus)\n .map(function (node) { return getFocusables([node]); })\n .reduce(function (acc, nodes) { return acc.concat(nodes); }, []);\n};\n","import { toArray } from './array';\nimport { isAutoFocusAllowedCached, isVisibleCached, notHiddenInput } from './is';\nimport { orderByTabIndex } from './tabOrder';\nimport { getFocusables, getParentAutofocusables } from './tabUtils';\n/**\n * given list of focusable elements keeps the ones user can interact with\n * @param nodes\n * @param visibilityCache\n */\nexport var filterFocusable = function (nodes, visibilityCache) {\n return toArray(nodes)\n .filter(function (node) { return isVisibleCached(visibilityCache, node); })\n .filter(function (node) { return notHiddenInput(node); });\n};\nexport var filterAutoFocusable = function (nodes, cache) {\n if (cache === void 0) { cache = new Map(); }\n return toArray(nodes).filter(function (node) { return isAutoFocusAllowedCached(cache, node); });\n};\n/**\n * only tabbable ones\n * (but with guards which would be ignored)\n */\nexport var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);\n};\n/**\n * actually anything \"focusable\", not only tabbable\n * (without guards, as long as they are not expected to be focused)\n */\nexport var getAllTabbableNodes = function (topNodes, visibilityCache) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);\n};\n/**\n * return list of nodes which are expected to be auto-focused\n * @param topNode\n * @param visibilityCache\n */\nexport var parentAutofocusables = function (topNode, visibilityCache) {\n return filterFocusable(getParentAutofocusables(topNode), visibilityCache);\n};\n/*\n * Determines if element is contained in scope, including nested shadow DOMs\n */\nexport var contains = function (scope, element) {\n return ((scope.shadowRoot\n ? contains(scope.shadowRoot, element)\n : scope.contains(element)) || Array.from(scope.children).some(function (child) { return contains(child, element); }));\n};\n","import { FOCUS_DISABLED, FOCUS_GROUP } from '../constants';\nimport { asArray, toArray } from './array';\n/**\n * in case of multiple nodes nested inside each other\n * keeps only top ones\n * this is O(nlogn)\n * @param nodes\n * @returns {*}\n */\nvar filterNested = function (nodes) {\n var contained = new Set();\n var l = nodes.length;\n for (var i = 0; i < l; i += 1) {\n for (var j = i + 1; j < l; j += 1) {\n var position = nodes[i].compareDocumentPosition(nodes[j]);\n /* eslint-disable no-bitwise */\n if ((position & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0) {\n contained.add(j);\n }\n if ((position & Node.DOCUMENT_POSITION_CONTAINS) > 0) {\n contained.add(i);\n }\n /* eslint-enable */\n }\n }\n return nodes.filter(function (_, index) { return !contained.has(index); });\n};\n/**\n * finds top most parent for a node\n * @param node\n * @returns {*}\n */\nvar getTopParent = function (node) {\n return node.parentNode ? getTopParent(node.parentNode) : node;\n};\n/**\n * returns all \"focus containers\" inside a given node\n * @param node\n * @returns {T}\n */\nexport var getAllAffectedNodes = function (node) {\n var nodes = asArray(node);\n return nodes.filter(Boolean).reduce(function (acc, currentNode) {\n var group = currentNode.getAttribute(FOCUS_GROUP);\n acc.push.apply(acc, (group\n ? filterNested(toArray(getTopParent(currentNode).querySelectorAll(\"[\".concat(FOCUS_GROUP, \"=\\\"\").concat(group, \"\\\"]:not([\").concat(FOCUS_DISABLED, \"=\\\"disabled\\\"])\"))))\n : [currentNode]));\n return acc;\n }, []);\n};\n","var getNestedShadowActiveElement = function (shadowRoot) {\n return shadowRoot.activeElement\n ? shadowRoot.activeElement.shadowRoot\n ? getNestedShadowActiveElement(shadowRoot.activeElement.shadowRoot)\n : shadowRoot.activeElement\n : undefined;\n};\n/**\n * returns active element from document or from nested shadowdoms\n */\nexport var getActiveElement = function () {\n return (document.activeElement\n ? document.activeElement.shadowRoot\n ? getNestedShadowActiveElement(document.activeElement.shadowRoot)\n : document.activeElement\n : undefined); // eslint-disable-next-line @typescript-eslint/no-explicit-any\n};\n","import { contains } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\nvar focusInFrame = function (frame) { return frame === document.activeElement; };\nvar focusInsideIframe = function (topNode) {\n return Boolean(toArray(topNode.querySelectorAll('iframe')).some(function (node) { return focusInFrame(node); }));\n};\n/**\n * @returns {Boolean} true, if the current focus is inside given node or nodes\n */\nexport var focusInside = function (topNode) {\n var activeElement = document && getActiveElement();\n if (!activeElement || (activeElement.dataset && activeElement.dataset.focusGuard)) {\n return false;\n }\n return getAllAffectedNodes(topNode).some(function (node) { return contains(node, activeElement) || focusInsideIframe(node); });\n};\n","import { FOCUS_ALLOW } from './constants';\nimport { contains } from './utils/DOMutils';\nimport { toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\n/**\n * focus is hidden FROM the focus-lock\n * ie contained inside a node focus-lock shall ignore\n * @returns {boolean} focus is currently is in \"allow\" area\n */\nexport var focusIsHidden = function () {\n var activeElement = document && getActiveElement();\n if (!activeElement) {\n return false;\n }\n // this does not support setting FOCUS_ALLOW within shadow dom\n return toArray(document.querySelectorAll(\"[\".concat(FOCUS_ALLOW, \"]\"))).some(function (node) { return contains(node, activeElement); });\n};\n","import { isRadioElement } from './is';\nvar findSelectedRadio = function (node, nodes) {\n return nodes\n .filter(isRadioElement)\n .filter(function (el) { return el.name === node.name; })\n .filter(function (el) { return el.checked; })[0] || node;\n};\nexport var correctNode = function (node, nodes) {\n if (isRadioElement(node) && node.name) {\n return findSelectedRadio(node, nodes);\n }\n return node;\n};\n/**\n * giving a set of radio inputs keeps only selected (tabbable) ones\n * @param nodes\n */\nexport var correctNodes = function (nodes) {\n // IE11 has no Set(array) constructor\n var resultSet = new Set();\n nodes.forEach(function (node) { return resultSet.add(correctNode(node, nodes)); });\n // using filter to support IE11\n return nodes.filter(function (node) { return resultSet.has(node); });\n};\n","import { correctNode } from './correctFocus';\nexport var pickFirstFocus = function (nodes) {\n if (nodes[0] && nodes.length > 1) {\n return correctNode(nodes[0], nodes);\n }\n return nodes[0];\n};\nexport var pickFocusable = function (nodes, index) {\n if (nodes.length > 1) {\n return nodes.indexOf(correctNode(nodes[index], nodes));\n }\n return index;\n};\n","import { correctNodes } from './utils/correctFocus';\nimport { pickFocusable } from './utils/firstFocus';\nimport { isGuard } from './utils/is';\nexport var NEW_FOCUS = 'NEW_FOCUS';\n/**\n * Main solver for the \"find next focus\" question\n * @param innerNodes\n * @param outerNodes\n * @param activeElement\n * @param lastNode\n * @returns {number|string|undefined|*}\n */\nexport var newFocus = function (innerNodes, outerNodes, activeElement, lastNode) {\n var cnt = innerNodes.length;\n var firstFocus = innerNodes[0];\n var lastFocus = innerNodes[cnt - 1];\n var isOnGuard = isGuard(activeElement);\n // focus is inside\n if (activeElement && innerNodes.indexOf(activeElement) >= 0) {\n return undefined;\n }\n var activeIndex = activeElement !== undefined ? outerNodes.indexOf(activeElement) : -1;\n var lastIndex = lastNode ? outerNodes.indexOf(lastNode) : activeIndex;\n var lastNodeInside = lastNode ? innerNodes.indexOf(lastNode) : -1;\n var indexDiff = activeIndex - lastIndex;\n var firstNodeIndex = outerNodes.indexOf(firstFocus);\n var lastNodeIndex = outerNodes.indexOf(lastFocus);\n var correctedNodes = correctNodes(outerNodes);\n var correctedIndex = activeElement !== undefined ? correctedNodes.indexOf(activeElement) : -1;\n var correctedIndexDiff = correctedIndex - (lastNode ? correctedNodes.indexOf(lastNode) : activeIndex);\n var returnFirstNode = pickFocusable(innerNodes, 0);\n var returnLastNode = pickFocusable(innerNodes, cnt - 1);\n // new focus\n if (activeIndex === -1 || lastNodeInside === -1) {\n return NEW_FOCUS;\n }\n // old focus\n if (!indexDiff && lastNodeInside >= 0) {\n return lastNodeInside;\n }\n // first element\n if (activeIndex <= firstNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnLastNode;\n }\n // last element\n if (activeIndex >= lastNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnFirstNode;\n }\n // jump out, but not on the guard\n if (indexDiff && Math.abs(correctedIndexDiff) > 1) {\n return lastNodeInside;\n }\n // focus above lock\n if (activeIndex <= firstNodeIndex) {\n return returnLastNode;\n }\n // focus below lock\n if (activeIndex > lastNodeIndex) {\n return returnFirstNode;\n }\n // index is inside tab order, but outside Lock\n if (indexDiff) {\n if (Math.abs(indexDiff) > 1) {\n return lastNodeInside;\n }\n return (cnt + lastNodeInside + indexDiff) % cnt;\n }\n // do nothing\n return undefined;\n};\n","import { parentAutofocusables } from './DOMutils';\nimport { contains } from './DOMutils';\nimport { asArray } from './array';\nvar getParents = function (node, parents) {\n if (parents === void 0) { parents = []; }\n parents.push(node);\n if (node.parentNode) {\n getParents(node.parentNode.host || node.parentNode, parents);\n }\n return parents;\n};\n/**\n * finds a parent for both nodeA and nodeB\n * @param nodeA\n * @param nodeB\n * @returns {boolean|*}\n */\nexport var getCommonParent = function (nodeA, nodeB) {\n var parentsA = getParents(nodeA);\n var parentsB = getParents(nodeB);\n // tslint:disable-next-line:prefer-for-of\n for (var i = 0; i < parentsA.length; i += 1) {\n var currentParent = parentsA[i];\n if (parentsB.indexOf(currentParent) >= 0) {\n return currentParent;\n }\n }\n return false;\n};\nexport var getTopCommonParent = function (baseActiveElement, leftEntry, rightEntries) {\n var activeElements = asArray(baseActiveElement);\n var leftEntries = asArray(leftEntry);\n var activeElement = activeElements[0];\n var topCommon = false;\n leftEntries.filter(Boolean).forEach(function (entry) {\n topCommon = getCommonParent(topCommon || entry, entry) || topCommon;\n rightEntries.filter(Boolean).forEach(function (subEntry) {\n var common = getCommonParent(activeElement, subEntry);\n if (common) {\n if (!topCommon || contains(common, topCommon)) {\n topCommon = common;\n }\n else {\n topCommon = getCommonParent(common, topCommon);\n }\n }\n });\n });\n // TODO: add assert here?\n return topCommon;\n};\n/**\n * return list of nodes which are expected to be autofocused inside a given top nodes\n * @param entries\n * @param visibilityCache\n */\nexport var allParentAutofocusables = function (entries, visibilityCache) {\n return entries.reduce(function (acc, node) { return acc.concat(parentAutofocusables(node, visibilityCache)); }, []);\n};\n","import { NEW_FOCUS, newFocus } from './solver';\nimport { filterAutoFocusable, getAllTabbableNodes, getTabbableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { pickFirstFocus } from './utils/firstFocus';\nimport { getActiveElement } from './utils/getActiveElement';\nimport { getDataset, isDefined, isNotAGuard } from './utils/is';\nimport { allParentAutofocusables, getTopCommonParent } from './utils/parenting';\nvar findAutoFocused = function (autoFocusables) {\n return function (node) { var _a; \n // @ts-expect-error\n return node.autofocus || !!((_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.autofocus) || autoFocusables.indexOf(node) >= 0; };\n};\nvar reorderNodes = function (srcNodes, dstNodes) {\n var remap = new Map();\n // no Set(dstNodes) for IE11 :(\n dstNodes.forEach(function (entity) { return remap.set(entity.node, entity); });\n // remap to dstNodes\n return srcNodes.map(function (node) { return remap.get(node); }).filter(isDefined);\n};\n/**\n * given top node(s) and the last active element return the element to be focused next\n * @param topNode\n * @param lastNode\n */\nexport var getFocusMerge = function (topNode, lastNode) {\n var activeElement = document && getActiveElement();\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);\n var visibilityCache = new Map();\n var anyFocusable = getAllTabbableNodes(entries, visibilityCache);\n var innerElements = getTabbableNodes(entries, visibilityCache).filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n });\n if (!innerElements[0]) {\n innerElements = anyFocusable;\n if (!innerElements[0]) {\n return undefined;\n }\n }\n var outerNodes = getAllTabbableNodes([commonParent], visibilityCache).map(function (_a) {\n var node = _a.node;\n return node;\n });\n var orderedInnerElements = reorderNodes(outerNodes, innerElements);\n var innerNodes = orderedInnerElements.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var newId = newFocus(innerNodes, outerNodes, activeElement, lastNode);\n if (newId === NEW_FOCUS) {\n var autoFocusable = filterAutoFocusable(anyFocusable.map(function (_a) {\n var node = _a.node;\n return node;\n })).filter(findAutoFocused(allParentAutofocusables(entries, visibilityCache)));\n return {\n node: autoFocusable && autoFocusable.length\n ? pickFirstFocus(autoFocusable)\n : pickFirstFocus(filterAutoFocusable(innerNodes)),\n };\n }\n if (newId === undefined) {\n return newId;\n }\n return orderedInnerElements[newId];\n};\n","import { getTabbableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { isGuard, isNotAGuard } from './utils/is';\nimport { getTopCommonParent } from './utils/parenting';\n/**\n * return list of focusable elements inside a given top node\n * @deprecated use {@link getFocusableIn}. Yep, there is typo in the function name\n */\nexport var getFocusabledIn = function (topNode) {\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(topNode, topNode, entries);\n var visibilityCache = new Map();\n var outerNodes = getTabbableNodes([commonParent], visibilityCache, true);\n var innerElements = getTabbableNodes(entries, visibilityCache)\n .filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n })\n .map(function (_a) {\n var node = _a.node;\n return node;\n });\n return outerNodes.map(function (_a) {\n var node = _a.node, index = _a.index;\n return ({\n node: node,\n index: index,\n lockItem: innerElements.indexOf(node) >= 0,\n guard: isGuard(node),\n });\n });\n};\n/**\n * return list of focusable elements inside a given top node\n */\nexport var getFocusableIn = getFocusabledIn;\n","import { getFocusMerge } from './focusMerge';\nexport var focusOn = function (target, focusOptions) {\n if ('focus' in target) {\n target.focus(focusOptions);\n }\n if ('contentWindow' in target && target.contentWindow) {\n target.contentWindow.focus();\n }\n};\nvar guardCount = 0;\nvar lockDisabled = false;\n/**\n * Sets focus at a given node. The last focused element will help to determine which element(first or last) should be focused.\n * HTML markers (see {@link import('./constants').FOCUS_AUTO} constants) can control autofocus\n * @param topNode\n * @param lastNode\n * @param options\n */\nexport var setFocus = function (topNode, lastNode, options) {\n if (options === void 0) { options = {}; }\n var focusable = getFocusMerge(topNode, lastNode);\n if (lockDisabled) {\n return;\n }\n if (focusable) {\n if (guardCount > 2) {\n // tslint:disable-next-line:no-console\n console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' +\n 'See https://github.com/theKashey/focus-lock/#focus-fighting');\n lockDisabled = true;\n setTimeout(function () {\n lockDisabled = false;\n }, 1);\n return;\n }\n guardCount++;\n focusOn(focusable.node, options.focusOptions);\n guardCount--;\n }\n};\n","export enum BentoFocusTrapArrowNavigationDirection {\n VERTICAL = 'vertical',\n HORIZONTAL = 'horizontal',\n}\n\nexport enum BentoFocusTrapVerticalNavigationEvent {\n ARROW_UP = 'arrowup',\n ARROW_DOWN = 'arrowdown',\n}\n\nexport enum BentoFocusTrapHorizontalNavigationEvent {\n ARROW_LEFT = 'arrowleft',\n ARROW_RIGHT = 'arrowright',\n}\n\nexport interface BentoFocusTrapFocusableIn {\n node: HTMLElement;\n /**\n * tab index\n */\n index: number;\n /**\n * true, if this node belongs to a Lock\n */\n lockItem: boolean;\n /**\n * true, if this node is a focus-guard (system node)\n */\n guard: boolean;\n}\n","import { getFocusableIn } from 'focus-lock';\nimport {\n BentoFocusTrapFocusableIn,\n BentoFocusTrapHorizontalNavigationEvent,\n BentoFocusTrapVerticalNavigationEvent,\n} from '@/components/focus-trap/focus-trap.types';\n\n/**\n * Perform callback before next re-paint frame of browser.\n *\n * @param action\n * @returns\n */\nexport const deferAction = (callback: FrameRequestCallback) => requestAnimationFrame(callback);\n\n/**\n * Get's the index number of the current node inside an array of focusable elements.\n *\n * @param node an HTMLElement node\n * @param nodes an array of focusable elements\n * @returns\n */\nconst getNodeIndex = (node: Element, nodes: BentoFocusTrapFocusableIn[]) => {\n const index = nodes.findIndex(item => item.node === node);\n return index === -1 ? 0 : index;\n};\n\n/**\n * Retrieves the next focusable element using a factor to either choose\n * the next or previous focusable element.\n *\n * @param factor a number +1 or -1\n * @param element the element to checks for focusable elements inside of\n * @returns\n */\nexport const getNextFocusableElement = (factor, element): HTMLElement => {\n const currentFocusedEl = document.activeElement;\n const focusableElements = getFocusableIn(element);\n const nextIndex = getNodeIndex(currentFocusedEl, focusableElements) + factor;\n return focusableElements[nextIndex]?.node || (currentFocusedEl as HTMLElement);\n};\n\n/**\n * Returns an object is if keyboard event key is an arrow previous or next key.\n * this changes depending on if the arrow navigation is horizontal or vertical.\n *\n * @param event\n * @param arrowOrder\n * @returns { isArrowNext: boolean, isArrowPrev: boolean }\n */\nexport const getArrowType = (\n event: KeyboardEvent,\n arrowOrder: BentoFocusTrapVerticalNavigationEvent[] | BentoFocusTrapHorizontalNavigationEvent[]\n) => {\n const eventKey = event.key.toLowerCase();\n return {\n isArrowNext: eventKey === arrowOrder[0],\n isArrowPrev: eventKey === arrowOrder[1],\n };\n};\n\n/**\n * Default scrolling into view options\n */\nexport const SCROLL_INTO_VIEW_OPTIONS: ScrollIntoViewOptions = {\n behavior: 'smooth',\n block: 'center',\n inline: 'center',\n};\n","<template>\n <div\n v-if=\"$slots.default\"\n class=\"b-focus-trap\"\n data-testid=\"focus-trap\"\n tabindex=\"-1\"\n v-on=\"arrowNavigation ? { keydown: onKeyDown } : {}\"\n @focusout=\"onBlur\"\n >\n <slot></slot>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import moveFocusInside, { focusInside, focusIsHidden } from 'focus-lock';\n import {\n BentoFocusTrapArrowNavigationDirection,\n BentoFocusTrapHorizontalNavigationEvent,\n BentoFocusTrapVerticalNavigationEvent,\n } from './focus-trap.types';\n import {\n deferAction,\n getArrowType,\n getNextFocusableElement,\n SCROLL_INTO_VIEW_OPTIONS,\n } from '@/utils/ts/focus-trap.utils';\n\n /**\n * Locks the focus inside an element for a11y navigation.\n * Useful for things like modals, popovers, etc...\n *\n * @example\n * import { BentoFocusTrap, BentoButton } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFocusTrap, BentoButton },\n * template: `\n * <div id=\"import-choice\">\n * <bento-focus-trap>\n * Make a choice to proceed further!\n * <bento-button>Yes</bento-button>\n * <bento-button>No</bento-button>\n * </bento-focus-trap>\n * </div>\n * `\n * };\n */\n export default defineComponent({\n name: 'bento-focus-trap',\n props: {\n /**\n * Enables / Disables arrow navigation as well can determine the type of arrow navigation.\n * The types of arrow navigation are horizontal and vertical.\n */\n arrowNavigation: {\n type: String as PropType<BentoFocusTrapArrowNavigationDirection>,\n default: undefined,\n validator: value =>\n Object.values(BentoFocusTrapArrowNavigationDirection).includes(\n value as BentoFocusTrapArrowNavigationDirection\n ),\n },\n /**\n * Enables / disables the focus trap.\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n data: () => ({\n lastFocusedElement: null,\n }),\n computed: {\n isHorizontalArrowNavigation(): boolean {\n return this.arrowNavigation === BentoFocusTrapArrowNavigationDirection.HORIZONTAL;\n },\n isVerticalArrowNavigation(): boolean {\n return this.arrowNavigation === BentoFocusTrapArrowNavigationDirection.VERTICAL;\n },\n arrowOrder() {\n return this.isVerticalArrowNavigation\n ? Object.values(BentoFocusTrapVerticalNavigationEvent)\n : Object.values(BentoFocusTrapHorizontalNavigationEvent);\n },\n },\n watch: {\n /**\n * If the disabled prop changes, then enable / disable the focus trap.\n */\n disabled() {\n if (this.disabled) {\n this.disable();\n } else {\n this.setFocusInside();\n }\n },\n },\n mounted() {\n if (this.disabled) {\n return;\n }\n this.setFocusInside();\n },\n beforeUnmount() {\n if (this.disabled) {\n return;\n }\n this.disable();\n },\n methods: {\n /**\n * Set focus back inside the element area, giving the last focus element\n * `focus-lock` can determine the next interable element to focus on.\n */\n async setFocusInside() {\n const isFocusOnBody = document.activeElement === document.body;\n if (isFocusOnBody || focusIsHidden() || !this.lastFocusedElement) {\n if (!focusInside(this.$el as HTMLElement)) {\n moveFocusInside(this.$el as HTMLElement, this.lastFocusedElement);\n }\n this.lastFocusedElement = document.activeElement;\n }\n },\n /**\n * On blur, trap the focus inside!\n */\n onBlur() {\n if (this.disabled) {\n return;\n }\n deferAction(this.setFocusInside);\n },\n /**\n * If the no arrow navigation is enabled\n * or if the currently focus element is a textarea or an input then prevent navigation.\n */\n shouldPreventNavigation() {\n if (!this.isVerticalArrowNavigation && !this.isHorizontalArrowNavigation) {\n return false;\n }\n\n const currentTag = document.activeElement.tagName.toLowerCase();\n const possibleFormControls = this.isVerticalArrowNavigation\n ? ['textarea', 'select']\n : ['input', 'textarea'];\n return possibleFormControls.includes(currentTag);\n },\n /**\n * When an arrow key is pressed then navigate to the next focusable element.\n * If trap is disabled or is content editable then prevent arrow navigation.\n *\n * @param event on keyboard press event\n */\n onKeyDown(event: KeyboardEvent) {\n if (\n this.disabled ||\n (document.activeElement as HTMLElement).isContentEditable ||\n this.shouldPreventNavigation()\n ) {\n return;\n }\n\n const { isArrowNext, isArrowPrev } = getArrowType(event, this.arrowOrder);\n if (isArrowPrev || isArrowNext) {\n event.preventDefault();\n event.stopPropagation();\n const focusableEl = getNextFocusableElement(isArrowPrev ? 1 : -1, this.$el);\n focusableEl.focus();\n if ('scrollIntoView' in focusableEl) {\n const options =\n 'scrollBehavior' in document.documentElement.style ? SCROLL_INTO_VIEW_OPTIONS : false;\n focusableEl.scrollIntoView(options);\n }\n }\n },\n /**\n * If focus trap is disabled then return focus to last focus element, parent node or simply the document body.\n */\n disable() {\n const focusOnDestroyEl = this.lastFocusedElement || this.$el.parentNode || document.body;\n if (focusOnDestroyEl) {\n focusOnDestroyEl.focus();\n }\n },\n },\n });\n</script>\n\n<style lang=\"scss\" scoped>\n .b-focus-trap {\n outline: none;\n }\n</style>\n"],"names":["FOCUS_GROUP","FOCUS_DISABLED","FOCUS_ALLOW","FOCUS_AUTO","FOCUS_NO_AUTOFOCUS","toArray","a","ret","i","asArray","isElementHidden","node","computedStyle","getParentNode","isTopNode","isVisibleUncached","checkParent","isVisibleCached","visibilityCache","cached","result","isAutoFocusAllowedUncached","isAutoFocusAllowed","isAutoFocusAllowedCached","cache","getDataset","isHTMLButtonElement","isHTMLInputElement","isRadioElement","notHiddenInput","attribute","isGuard","_a","isNotAGuard","isDefined","x","tabSort","b","tabDiff","indexDiff","orderByTabIndex","nodes","filterNegative","keepGuards","index","data","tabbables","queryTabbables","queryGuardTabbables","getFocusablesWithShadowDom","parent","withGuards","acc","child","getFocusables","parents","getParentAutofocusables","parentFocus","filterFocusable","filterAutoFocusable","getTabbableNodes","topNodes","getAllTabbableNodes","parentAutofocusables","topNode","contains","scope","element","filterNested","contained","l","j","position","_","getTopParent","getAllAffectedNodes","currentNode","group","getNestedShadowActiveElement","shadowRoot","getActiveElement","focusInFrame","frame","focusInsideIframe","focusInside","activeElement","focusIsHidden","findSelectedRadio","el","correctNode","correctNodes","resultSet","pickFirstFocus","pickFocusable","NEW_FOCUS","newFocus","innerNodes","outerNodes","lastNode","cnt","firstFocus","lastFocus","isOnGuard","activeIndex","lastIndex","lastNodeInside","firstNodeIndex","lastNodeIndex","correctedNodes","correctedIndex","correctedIndexDiff","returnFirstNode","returnLastNode","getParents","getCommonParent","nodeA","nodeB","parentsA","parentsB","currentParent","getTopCommonParent","baseActiveElement","leftEntry","rightEntries","activeElements","leftEntries","topCommon","entry","subEntry","common","allParentAutofocusables","entries","findAutoFocused","autoFocusables","reorderNodes","srcNodes","dstNodes","remap","entity","getFocusMerge","commonParent","anyFocusable","innerElements","orderedInnerElements","newId","autoFocusable","getFocusabledIn","getFocusableIn","focusOn","target","focusOptions","guardCount","lockDisabled","setFocus","options","focusable","BentoFocusTrapArrowNavigationDirection","BentoFocusTrapArrowNavigationDirection2","BentoFocusTrapVerticalNavigationEvent","BentoFocusTrapVerticalNavigationEvent2","BentoFocusTrapHorizontalNavigationEvent","BentoFocusTrapHorizontalNavigationEvent2","deferAction","callback","getNodeIndex","item","getNextFocusableElement","factor","currentFocusedEl","focusableElements","nextIndex","getArrowType","event","arrowOrder","eventKey","SCROLL_INTO_VIEW_OPTIONS","_sfc_main","defineComponent","value","currentTag","isArrowNext","isArrowPrev","focusableEl","focusOnDestroyEl"],"mappings":";;;AAGO,IAAAA,IAAA,mBAIAC,KAAA,4BAIAC,KAAA,sBAKAC,KAAA,yBAKAC,KAAA,qBClBAC,IAAA,SAAAC,GAAA;AAEP,WADAC,IAAA,MAAAD,EAAA,MAAA,GACAE,IAAA,GAAAA,IAAAF,EAAA,QAAA,EAAAE;AACA,IAAAD,EAAAC,CAAA,IAAAF,EAAAE,CAAA;AAEA,SA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S,GAAA,KAAA,cAAA;AAAA,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,0BAAA;AAMA,UAAA,CAAA,KAAA,6BAAA,CAAA,KAAA;AACA,eAAA;AAGA,YAAAiB,IAAA,SAAA,cAAA,QAAA,YAAA;AAIA,cAHA,KAAA,4BAAA,CAAA,YAAA,QAAA,IAAA,CAAA,SAAA,UAAA,GAGA,SAAAA,CAAA;AAAA,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,UAAAP,GAAA;AAQA,UAAA,KAAA,YAAA,SAAA,cAAA,qBAAA,KAAA,wBAAA;AAKA;AAGA,YAAA,EAAA,aAAAQ,GAAA,aAAAC,EAAA,IAAAV,GAAAC,GAAA,KAAA,UAAA;AACA,UAAAS,KAAAD,GAAA;AACA,QAAAR,EAAA,eAAA,GACAA,EAAA,gBAAA;AACA,cAAAU,IAAAhB,GAAAe,IAAA,IAAA,IAAA,KAAA,GAAA;AAEA,YADAC,EAAA,MAAA,GACA,oBAAAA,GAAA;AACA,gBAAA5B,IAAA,oBAAA,SAAA,gBAAA,QAAAqB,KAAA;AAEA,UAAAO,EAAA,eAAA5B,CAAA;AAAA;AAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA,IACA,UAAA;AAKA,YAAA6B,IAAA,KAAA,sBAAA,KAAA,IAAA,cAAA,SAAA;AACA,MAAAA,KACAA,EAAA,MAAA;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]}
1
+ {"version":3,"file":"index.c85a1ab9.js","sources":["../../../../node_modules/focus-lock/dist/es2015/constants.js","../../../../node_modules/focus-lock/dist/es2015/utils/array.js","../../../../node_modules/focus-lock/dist/es2015/utils/is.js","../../../../node_modules/focus-lock/dist/es2015/utils/tabOrder.js","../../../../node_modules/focus-lock/dist/es2015/utils/tabbables.js","../../../../node_modules/focus-lock/dist/es2015/utils/tabUtils.js","../../../../node_modules/focus-lock/dist/es2015/utils/DOMutils.js","../../../../node_modules/focus-lock/dist/es2015/utils/all-affected.js","../../../../node_modules/focus-lock/dist/es2015/utils/getActiveElement.js","../../../../node_modules/focus-lock/dist/es2015/focusInside.js","../../../../node_modules/focus-lock/dist/es2015/focusIsHidden.js","../../../../node_modules/focus-lock/dist/es2015/utils/correctFocus.js","../../../../node_modules/focus-lock/dist/es2015/utils/firstFocus.js","../../../../node_modules/focus-lock/dist/es2015/solver.js","../../../../node_modules/focus-lock/dist/es2015/utils/parenting.js","../../../../node_modules/focus-lock/dist/es2015/focusMerge.js","../../../../node_modules/focus-lock/dist/es2015/focusables.js","../../../../node_modules/focus-lock/dist/es2015/setFocus.js","../../src/components/focus-trap/focus-trap.types.ts","../../src/utils/ts/focus-trap.utils.ts","../../src/components/focus-trap/focus-trap.vue"],"sourcesContent":["/**\n * defines a focus group\n */\nexport var FOCUS_GROUP = 'data-focus-lock';\n/**\n * disables element discovery inside a group marked by key\n */\nexport var FOCUS_DISABLED = 'data-focus-lock-disabled';\n/**\n * allows uncontrolled focus within the marked area, effectively disabling focus lock for it's content\n */\nexport var FOCUS_ALLOW = 'data-no-focus-lock';\n/**\n * instructs autofocus engine to pick default autofocus inside a given node\n * can be set on the element or container\n */\nexport var FOCUS_AUTO = 'data-autofocus-inside';\n/**\n * instructs autofocus to ignore elements within a given node\n * can be set on the element or container\n */\nexport var FOCUS_NO_AUTOFOCUS = 'data-no-autofocus';\n","/*\nIE11 support\n */\nexport var toArray = function (a) {\n var ret = Array(a.length);\n for (var i = 0; i < a.length; ++i) {\n ret[i] = a[i];\n }\n return ret;\n};\nexport var asArray = function (a) { return (Array.isArray(a) ? a : [a]); };\n","import { FOCUS_NO_AUTOFOCUS } from '../constants';\nvar isElementHidden = function (node) {\n // we can measure only \"elements\"\n // consider others as \"visible\"\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n var computedStyle = window.getComputedStyle(node, null);\n if (!computedStyle || !computedStyle.getPropertyValue) {\n return false;\n }\n return (computedStyle.getPropertyValue('display') === 'none' || computedStyle.getPropertyValue('visibility') === 'hidden');\n};\nvar getParentNode = function (node) {\n // DOCUMENT_FRAGMENT_NODE can also point on ShadowRoot. In this case .host will point on the next node\n return node.parentNode && node.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node.parentNode.host\n : node.parentNode;\n};\nvar isTopNode = function (node) {\n // @ts-ignore\n return node === document || (node && node.nodeType === Node.DOCUMENT_NODE);\n};\nvar isVisibleUncached = function (node, checkParent) {\n return !node || isTopNode(node) || (!isElementHidden(node) && checkParent(getParentNode(node)));\n};\nexport var isVisibleCached = function (visibilityCache, node) {\n var cached = visibilityCache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isVisibleUncached(node, isVisibleCached.bind(undefined, visibilityCache));\n visibilityCache.set(node, result);\n return result;\n};\nvar isAutoFocusAllowedUncached = function (node, checkParent) {\n return node && !isTopNode(node) ? (isAutoFocusAllowed(node) ? checkParent(getParentNode(node)) : false) : true;\n};\nexport var isAutoFocusAllowedCached = function (cache, node) {\n var cached = cache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isAutoFocusAllowedUncached(node, isAutoFocusAllowedCached.bind(undefined, cache));\n cache.set(node, result);\n return result;\n};\nexport var getDataset = function (node) {\n // @ts-ignore\n return node.dataset;\n};\nexport var isHTMLButtonElement = function (node) { return node.tagName === 'BUTTON'; };\nexport var isHTMLInputElement = function (node) { return node.tagName === 'INPUT'; };\nexport var isRadioElement = function (node) {\n return isHTMLInputElement(node) && node.type === 'radio';\n};\nexport var notHiddenInput = function (node) {\n return !((isHTMLInputElement(node) || isHTMLButtonElement(node)) && (node.type === 'hidden' || node.disabled));\n};\nexport var isAutoFocusAllowed = function (node) {\n var attribute = node.getAttribute(FOCUS_NO_AUTOFOCUS);\n return ![true, 'true', ''].includes(attribute);\n};\nexport var isGuard = function (node) { var _a; return Boolean(node && ((_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.focusGuard)); };\nexport var isNotAGuard = function (node) { return !isGuard(node); };\nexport var isDefined = function (x) { return Boolean(x); };\n","import { toArray } from './array';\nexport var tabSort = function (a, b) {\n var tabDiff = a.tabIndex - b.tabIndex;\n var indexDiff = a.index - b.index;\n if (tabDiff) {\n if (!a.tabIndex) {\n return 1;\n }\n if (!b.tabIndex) {\n return -1;\n }\n }\n return tabDiff || indexDiff;\n};\nexport var orderByTabIndex = function (nodes, filterNegative, keepGuards) {\n return toArray(nodes)\n .map(function (node, index) { return ({\n node: node,\n index: index,\n tabIndex: keepGuards && node.tabIndex === -1 ? ((node.dataset || {}).focusGuard ? 0 : -1) : node.tabIndex,\n }); })\n .filter(function (data) { return !filterNegative || data.tabIndex >= 0; })\n .sort(tabSort);\n};\n","/**\n * list of the object to be considered as focusable\n */\nexport var tabbables = [\n 'button:enabled',\n 'select:enabled',\n 'textarea:enabled',\n 'input:enabled',\n // elements with explicit roles will also use explicit tabindex\n // '[role=\"button\"]',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[tabindex]',\n '[contenteditable]',\n '[autofocus]',\n];\n","import { FOCUS_AUTO } from '../constants';\nimport { toArray } from './array';\nimport { tabbables } from './tabbables';\nvar queryTabbables = tabbables.join(',');\nvar queryGuardTabbables = \"\".concat(queryTabbables, \", [data-focus-guard]\");\nvar getFocusablesWithShadowDom = function (parent, withGuards) {\n var _a;\n return toArray(((_a = parent.shadowRoot) === null || _a === void 0 ? void 0 : _a.children) || parent.children).reduce(function (acc, child) {\n return acc.concat(child.matches(withGuards ? queryGuardTabbables : queryTabbables) ? [child] : [], getFocusablesWithShadowDom(child));\n }, []);\n};\nexport var getFocusables = function (parents, withGuards) {\n return parents.reduce(function (acc, parent) {\n return acc.concat(\n // add all tabbables inside and within shadow DOMs in DOM order\n getFocusablesWithShadowDom(parent, withGuards), \n // add if node is tabbable itself\n parent.parentNode\n ? toArray(parent.parentNode.querySelectorAll(queryTabbables)).filter(function (node) { return node === parent; })\n : []);\n }, []);\n};\n/**\n * return a list of focusable nodes within an area marked as \"auto-focusable\"\n * @param parent\n */\nexport var getParentAutofocusables = function (parent) {\n var parentFocus = parent.querySelectorAll(\"[\".concat(FOCUS_AUTO, \"]\"));\n return toArray(parentFocus)\n .map(function (node) { return getFocusables([node]); })\n .reduce(function (acc, nodes) { return acc.concat(nodes); }, []);\n};\n","import { toArray } from './array';\nimport { isAutoFocusAllowedCached, isVisibleCached, notHiddenInput } from './is';\nimport { orderByTabIndex } from './tabOrder';\nimport { getFocusables, getParentAutofocusables } from './tabUtils';\n/**\n * given list of focusable elements keeps the ones user can interact with\n * @param nodes\n * @param visibilityCache\n */\nexport var filterFocusable = function (nodes, visibilityCache) {\n return toArray(nodes)\n .filter(function (node) { return isVisibleCached(visibilityCache, node); })\n .filter(function (node) { return notHiddenInput(node); });\n};\nexport var filterAutoFocusable = function (nodes, cache) {\n if (cache === void 0) { cache = new Map(); }\n return toArray(nodes).filter(function (node) { return isAutoFocusAllowedCached(cache, node); });\n};\n/**\n * only tabbable ones\n * (but with guards which would be ignored)\n */\nexport var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);\n};\n/**\n * actually anything \"focusable\", not only tabbable\n * (without guards, as long as they are not expected to be focused)\n */\nexport var getAllTabbableNodes = function (topNodes, visibilityCache) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);\n};\n/**\n * return list of nodes which are expected to be auto-focused\n * @param topNode\n * @param visibilityCache\n */\nexport var parentAutofocusables = function (topNode, visibilityCache) {\n return filterFocusable(getParentAutofocusables(topNode), visibilityCache);\n};\n/*\n * Determines if element is contained in scope, including nested shadow DOMs\n */\nexport var contains = function (scope, element) {\n return ((scope.shadowRoot\n ? contains(scope.shadowRoot, element)\n : scope.contains(element)) || Array.from(scope.children).some(function (child) { return contains(child, element); }));\n};\n","import { FOCUS_DISABLED, FOCUS_GROUP } from '../constants';\nimport { asArray, toArray } from './array';\n/**\n * in case of multiple nodes nested inside each other\n * keeps only top ones\n * this is O(nlogn)\n * @param nodes\n * @returns {*}\n */\nvar filterNested = function (nodes) {\n var contained = new Set();\n var l = nodes.length;\n for (var i = 0; i < l; i += 1) {\n for (var j = i + 1; j < l; j += 1) {\n var position = nodes[i].compareDocumentPosition(nodes[j]);\n /* eslint-disable no-bitwise */\n if ((position & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0) {\n contained.add(j);\n }\n if ((position & Node.DOCUMENT_POSITION_CONTAINS) > 0) {\n contained.add(i);\n }\n /* eslint-enable */\n }\n }\n return nodes.filter(function (_, index) { return !contained.has(index); });\n};\n/**\n * finds top most parent for a node\n * @param node\n * @returns {*}\n */\nvar getTopParent = function (node) {\n return node.parentNode ? getTopParent(node.parentNode) : node;\n};\n/**\n * returns all \"focus containers\" inside a given node\n * @param node\n * @returns {T}\n */\nexport var getAllAffectedNodes = function (node) {\n var nodes = asArray(node);\n return nodes.filter(Boolean).reduce(function (acc, currentNode) {\n var group = currentNode.getAttribute(FOCUS_GROUP);\n acc.push.apply(acc, (group\n ? filterNested(toArray(getTopParent(currentNode).querySelectorAll(\"[\".concat(FOCUS_GROUP, \"=\\\"\").concat(group, \"\\\"]:not([\").concat(FOCUS_DISABLED, \"=\\\"disabled\\\"])\"))))\n : [currentNode]));\n return acc;\n }, []);\n};\n","var getNestedShadowActiveElement = function (shadowRoot) {\n return shadowRoot.activeElement\n ? shadowRoot.activeElement.shadowRoot\n ? getNestedShadowActiveElement(shadowRoot.activeElement.shadowRoot)\n : shadowRoot.activeElement\n : undefined;\n};\n/**\n * returns active element from document or from nested shadowdoms\n */\nexport var getActiveElement = function () {\n return (document.activeElement\n ? document.activeElement.shadowRoot\n ? getNestedShadowActiveElement(document.activeElement.shadowRoot)\n : document.activeElement\n : undefined); // eslint-disable-next-line @typescript-eslint/no-explicit-any\n};\n","import { contains } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\nvar focusInFrame = function (frame) { return frame === document.activeElement; };\nvar focusInsideIframe = function (topNode) {\n return Boolean(toArray(topNode.querySelectorAll('iframe')).some(function (node) { return focusInFrame(node); }));\n};\n/**\n * @returns {Boolean} true, if the current focus is inside given node or nodes\n */\nexport var focusInside = function (topNode) {\n var activeElement = document && getActiveElement();\n if (!activeElement || (activeElement.dataset && activeElement.dataset.focusGuard)) {\n return false;\n }\n return getAllAffectedNodes(topNode).some(function (node) { return contains(node, activeElement) || focusInsideIframe(node); });\n};\n","import { FOCUS_ALLOW } from './constants';\nimport { contains } from './utils/DOMutils';\nimport { toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\n/**\n * focus is hidden FROM the focus-lock\n * ie contained inside a node focus-lock shall ignore\n * @returns {boolean} focus is currently is in \"allow\" area\n */\nexport var focusIsHidden = function () {\n var activeElement = document && getActiveElement();\n if (!activeElement) {\n return false;\n }\n // this does not support setting FOCUS_ALLOW within shadow dom\n return toArray(document.querySelectorAll(\"[\".concat(FOCUS_ALLOW, \"]\"))).some(function (node) { return contains(node, activeElement); });\n};\n","import { isRadioElement } from './is';\nvar findSelectedRadio = function (node, nodes) {\n return nodes\n .filter(isRadioElement)\n .filter(function (el) { return el.name === node.name; })\n .filter(function (el) { return el.checked; })[0] || node;\n};\nexport var correctNode = function (node, nodes) {\n if (isRadioElement(node) && node.name) {\n return findSelectedRadio(node, nodes);\n }\n return node;\n};\n/**\n * giving a set of radio inputs keeps only selected (tabbable) ones\n * @param nodes\n */\nexport var correctNodes = function (nodes) {\n // IE11 has no Set(array) constructor\n var resultSet = new Set();\n nodes.forEach(function (node) { return resultSet.add(correctNode(node, nodes)); });\n // using filter to support IE11\n return nodes.filter(function (node) { return resultSet.has(node); });\n};\n","import { correctNode } from './correctFocus';\nexport var pickFirstFocus = function (nodes) {\n if (nodes[0] && nodes.length > 1) {\n return correctNode(nodes[0], nodes);\n }\n return nodes[0];\n};\nexport var pickFocusable = function (nodes, index) {\n if (nodes.length > 1) {\n return nodes.indexOf(correctNode(nodes[index], nodes));\n }\n return index;\n};\n","import { correctNodes } from './utils/correctFocus';\nimport { pickFocusable } from './utils/firstFocus';\nimport { isGuard } from './utils/is';\nexport var NEW_FOCUS = 'NEW_FOCUS';\n/**\n * Main solver for the \"find next focus\" question\n * @param innerNodes\n * @param outerNodes\n * @param activeElement\n * @param lastNode\n * @returns {number|string|undefined|*}\n */\nexport var newFocus = function (innerNodes, outerNodes, activeElement, lastNode) {\n var cnt = innerNodes.length;\n var firstFocus = innerNodes[0];\n var lastFocus = innerNodes[cnt - 1];\n var isOnGuard = isGuard(activeElement);\n // focus is inside\n if (activeElement && innerNodes.indexOf(activeElement) >= 0) {\n return undefined;\n }\n var activeIndex = activeElement !== undefined ? outerNodes.indexOf(activeElement) : -1;\n var lastIndex = lastNode ? outerNodes.indexOf(lastNode) : activeIndex;\n var lastNodeInside = lastNode ? innerNodes.indexOf(lastNode) : -1;\n var indexDiff = activeIndex - lastIndex;\n var firstNodeIndex = outerNodes.indexOf(firstFocus);\n var lastNodeIndex = outerNodes.indexOf(lastFocus);\n var correctedNodes = correctNodes(outerNodes);\n var correctedIndex = activeElement !== undefined ? correctedNodes.indexOf(activeElement) : -1;\n var correctedIndexDiff = correctedIndex - (lastNode ? correctedNodes.indexOf(lastNode) : activeIndex);\n var returnFirstNode = pickFocusable(innerNodes, 0);\n var returnLastNode = pickFocusable(innerNodes, cnt - 1);\n // new focus\n if (activeIndex === -1 || lastNodeInside === -1) {\n return NEW_FOCUS;\n }\n // old focus\n if (!indexDiff && lastNodeInside >= 0) {\n return lastNodeInside;\n }\n // first element\n if (activeIndex <= firstNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnLastNode;\n }\n // last element\n if (activeIndex >= lastNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnFirstNode;\n }\n // jump out, but not on the guard\n if (indexDiff && Math.abs(correctedIndexDiff) > 1) {\n return lastNodeInside;\n }\n // focus above lock\n if (activeIndex <= firstNodeIndex) {\n return returnLastNode;\n }\n // focus below lock\n if (activeIndex > lastNodeIndex) {\n return returnFirstNode;\n }\n // index is inside tab order, but outside Lock\n if (indexDiff) {\n if (Math.abs(indexDiff) > 1) {\n return lastNodeInside;\n }\n return (cnt + lastNodeInside + indexDiff) % cnt;\n }\n // do nothing\n return undefined;\n};\n","import { parentAutofocusables } from './DOMutils';\nimport { contains } from './DOMutils';\nimport { asArray } from './array';\nvar getParents = function (node, parents) {\n if (parents === void 0) { parents = []; }\n parents.push(node);\n if (node.parentNode) {\n getParents(node.parentNode.host || node.parentNode, parents);\n }\n return parents;\n};\n/**\n * finds a parent for both nodeA and nodeB\n * @param nodeA\n * @param nodeB\n * @returns {boolean|*}\n */\nexport var getCommonParent = function (nodeA, nodeB) {\n var parentsA = getParents(nodeA);\n var parentsB = getParents(nodeB);\n // tslint:disable-next-line:prefer-for-of\n for (var i = 0; i < parentsA.length; i += 1) {\n var currentParent = parentsA[i];\n if (parentsB.indexOf(currentParent) >= 0) {\n return currentParent;\n }\n }\n return false;\n};\nexport var getTopCommonParent = function (baseActiveElement, leftEntry, rightEntries) {\n var activeElements = asArray(baseActiveElement);\n var leftEntries = asArray(leftEntry);\n var activeElement = activeElements[0];\n var topCommon = false;\n leftEntries.filter(Boolean).forEach(function (entry) {\n topCommon = getCommonParent(topCommon || entry, entry) || topCommon;\n rightEntries.filter(Boolean).forEach(function (subEntry) {\n var common = getCommonParent(activeElement, subEntry);\n if (common) {\n if (!topCommon || contains(common, topCommon)) {\n topCommon = common;\n }\n else {\n topCommon = getCommonParent(common, topCommon);\n }\n }\n });\n });\n // TODO: add assert here?\n return topCommon;\n};\n/**\n * return list of nodes which are expected to be autofocused inside a given top nodes\n * @param entries\n * @param visibilityCache\n */\nexport var allParentAutofocusables = function (entries, visibilityCache) {\n return entries.reduce(function (acc, node) { return acc.concat(parentAutofocusables(node, visibilityCache)); }, []);\n};\n","import { NEW_FOCUS, newFocus } from './solver';\nimport { filterAutoFocusable, getAllTabbableNodes, getTabbableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { pickFirstFocus } from './utils/firstFocus';\nimport { getActiveElement } from './utils/getActiveElement';\nimport { getDataset, isDefined, isNotAGuard } from './utils/is';\nimport { allParentAutofocusables, getTopCommonParent } from './utils/parenting';\nvar findAutoFocused = function (autoFocusables) {\n return function (node) { var _a; \n // @ts-expect-error\n return node.autofocus || !!((_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.autofocus) || autoFocusables.indexOf(node) >= 0; };\n};\nvar reorderNodes = function (srcNodes, dstNodes) {\n var remap = new Map();\n // no Set(dstNodes) for IE11 :(\n dstNodes.forEach(function (entity) { return remap.set(entity.node, entity); });\n // remap to dstNodes\n return srcNodes.map(function (node) { return remap.get(node); }).filter(isDefined);\n};\n/**\n * given top node(s) and the last active element return the element to be focused next\n * @param topNode\n * @param lastNode\n */\nexport var getFocusMerge = function (topNode, lastNode) {\n var activeElement = document && getActiveElement();\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);\n var visibilityCache = new Map();\n var anyFocusable = getAllTabbableNodes(entries, visibilityCache);\n var innerElements = getTabbableNodes(entries, visibilityCache).filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n });\n if (!innerElements[0]) {\n innerElements = anyFocusable;\n if (!innerElements[0]) {\n return undefined;\n }\n }\n var outerNodes = getAllTabbableNodes([commonParent], visibilityCache).map(function (_a) {\n var node = _a.node;\n return node;\n });\n var orderedInnerElements = reorderNodes(outerNodes, innerElements);\n var innerNodes = orderedInnerElements.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var newId = newFocus(innerNodes, outerNodes, activeElement, lastNode);\n if (newId === NEW_FOCUS) {\n var autoFocusable = filterAutoFocusable(anyFocusable.map(function (_a) {\n var node = _a.node;\n return node;\n })).filter(findAutoFocused(allParentAutofocusables(entries, visibilityCache)));\n return {\n node: autoFocusable && autoFocusable.length\n ? pickFirstFocus(autoFocusable)\n : pickFirstFocus(filterAutoFocusable(innerNodes)),\n };\n }\n if (newId === undefined) {\n return newId;\n }\n return orderedInnerElements[newId];\n};\n","import { getTabbableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { isGuard, isNotAGuard } from './utils/is';\nimport { getTopCommonParent } from './utils/parenting';\n/**\n * return list of focusable elements inside a given top node\n * @deprecated use {@link getFocusableIn}. Yep, there is typo in the function name\n */\nexport var getFocusabledIn = function (topNode) {\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(topNode, topNode, entries);\n var visibilityCache = new Map();\n var outerNodes = getTabbableNodes([commonParent], visibilityCache, true);\n var innerElements = getTabbableNodes(entries, visibilityCache)\n .filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n })\n .map(function (_a) {\n var node = _a.node;\n return node;\n });\n return outerNodes.map(function (_a) {\n var node = _a.node, index = _a.index;\n return ({\n node: node,\n index: index,\n lockItem: innerElements.indexOf(node) >= 0,\n guard: isGuard(node),\n });\n });\n};\n/**\n * return list of focusable elements inside a given top node\n */\nexport var getFocusableIn = getFocusabledIn;\n","import { getFocusMerge } from './focusMerge';\nexport var focusOn = function (target, focusOptions) {\n if ('focus' in target) {\n target.focus(focusOptions);\n }\n if ('contentWindow' in target && target.contentWindow) {\n target.contentWindow.focus();\n }\n};\nvar guardCount = 0;\nvar lockDisabled = false;\n/**\n * Sets focus at a given node. The last focused element will help to determine which element(first or last) should be focused.\n * HTML markers (see {@link import('./constants').FOCUS_AUTO} constants) can control autofocus\n * @param topNode\n * @param lastNode\n * @param options\n */\nexport var setFocus = function (topNode, lastNode, options) {\n if (options === void 0) { options = {}; }\n var focusable = getFocusMerge(topNode, lastNode);\n if (lockDisabled) {\n return;\n }\n if (focusable) {\n if (guardCount > 2) {\n // tslint:disable-next-line:no-console\n console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' +\n 'See https://github.com/theKashey/focus-lock/#focus-fighting');\n lockDisabled = true;\n setTimeout(function () {\n lockDisabled = false;\n }, 1);\n return;\n }\n guardCount++;\n focusOn(focusable.node, options.focusOptions);\n guardCount--;\n }\n};\n","export enum BentoFocusTrapArrowNavigationDirection {\n VERTICAL = 'vertical',\n HORIZONTAL = 'horizontal',\n}\n\nexport enum BentoFocusTrapVerticalNavigationEvent {\n ARROW_UP = 'arrowup',\n ARROW_DOWN = 'arrowdown',\n}\n\nexport enum BentoFocusTrapHorizontalNavigationEvent {\n ARROW_LEFT = 'arrowleft',\n ARROW_RIGHT = 'arrowright',\n}\n\nexport interface BentoFocusTrapFocusableIn {\n node: HTMLElement;\n /**\n * tab index\n */\n index: number;\n /**\n * true, if this node belongs to a Lock\n */\n lockItem: boolean;\n /**\n * true, if this node is a focus-guard (system node)\n */\n guard: boolean;\n}\n","import { getFocusableIn } from 'focus-lock';\nimport {\n BentoFocusTrapFocusableIn,\n BentoFocusTrapHorizontalNavigationEvent,\n BentoFocusTrapVerticalNavigationEvent,\n} from '@/components/focus-trap/focus-trap.types';\n\n/**\n * Perform callback before next re-paint frame of browser.\n *\n * @param action\n * @returns\n */\nexport const deferAction = (callback: FrameRequestCallback) => requestAnimationFrame(callback);\n\n/**\n * Get's the index number of the current node inside an array of focusable elements.\n *\n * @param node an HTMLElement node\n * @param nodes an array of focusable elements\n * @returns\n */\nconst getNodeIndex = (node: Element, nodes: BentoFocusTrapFocusableIn[]) => {\n const index = nodes.findIndex(item => item.node === node);\n return index === -1 ? 0 : index;\n};\n\n/**\n * Retrieves the next focusable element using a factor to either choose\n * the next or previous focusable element.\n *\n * @param factor a number +1 or -1\n * @param element the element to checks for focusable elements inside of\n * @returns\n */\nexport const getNextFocusableElement = (factor, element): HTMLElement => {\n const currentFocusedEl = document.activeElement;\n const focusableElements = getFocusableIn(element);\n const nextIndex = getNodeIndex(currentFocusedEl, focusableElements) + factor;\n return focusableElements[nextIndex]?.node || (currentFocusedEl as HTMLElement);\n};\n\n/**\n * Returns an object is if keyboard event key is an arrow previous or next key.\n * this changes depending on if the arrow navigation is horizontal or vertical.\n *\n * @param event\n * @param arrowOrder\n * @returns { isArrowNext: boolean, isArrowPrev: boolean }\n */\nexport const getArrowType = (\n event: KeyboardEvent,\n arrowOrder: BentoFocusTrapVerticalNavigationEvent[] | BentoFocusTrapHorizontalNavigationEvent[]\n) => {\n const eventKey = event.key.toLowerCase();\n return {\n isArrowNext: eventKey === arrowOrder[0],\n isArrowPrev: eventKey === arrowOrder[1],\n };\n};\n\n/**\n * Default scrolling into view options\n */\nexport const SCROLL_INTO_VIEW_OPTIONS: ScrollIntoViewOptions = {\n behavior: 'smooth',\n block: 'center',\n inline: 'center',\n};\n","<template>\n <div\n v-if=\"useHasSlot($slots)('default')\"\n ref=\"root\"\n class=\"b-focus-trap\"\n data-testid=\"focus-trap\"\n tabindex=\"-1\"\n v-on=\"arrowNavigation ? { keydown: onKeyDown } : {}\"\n @focusout=\"onBlur\"\n >\n <slot></slot>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import moveFocusInside, { focusInside, focusIsHidden } from 'focus-lock';\n import {\n BentoFocusTrapArrowNavigationDirection,\n BentoFocusTrapHorizontalNavigationEvent,\n BentoFocusTrapVerticalNavigationEvent,\n } from './focus-trap.types';\n import {\n deferAction,\n getArrowType,\n getNextFocusableElement,\n SCROLL_INTO_VIEW_OPTIONS,\n } from '@/utils/ts/focus-trap.utils';\n import { useHasSlot } from '@/composables';\n\n /**\n * Locks the focus inside an element for a11y navigation.\n * Useful for things like modals, popovers, etc...\n *\n * @example\n * import { BentoFocusTrap, BentoButton } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFocusTrap, BentoButton },\n * template: `\n * <div id=\"import-choice\">\n * <bento-focus-trap>\n * Make a choice to proceed further!\n * <bento-button>Yes</bento-button>\n * <bento-button>No</bento-button>\n * </bento-focus-trap>\n * </div>\n * `\n * };\n */\n export default defineComponent({\n name: 'bento-focus-trap',\n props: {\n /**\n * Enables / Disables arrow navigation as well can determine the type of arrow navigation.\n * The types of arrow navigation are horizontal and vertical.\n */\n arrowNavigation: {\n type: String as PropType<BentoFocusTrapArrowNavigationDirection>,\n default: undefined,\n validator: value =>\n Object.values(BentoFocusTrapArrowNavigationDirection).includes(\n value as BentoFocusTrapArrowNavigationDirection\n ),\n },\n /**\n * Enables / disables the focus trap.\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n data: () => ({\n lastFocusedElement: null,\n }),\n computed: {\n isHorizontalArrowNavigation(): boolean {\n return this.arrowNavigation === BentoFocusTrapArrowNavigationDirection.HORIZONTAL;\n },\n isVerticalArrowNavigation(): boolean {\n return this.arrowNavigation === BentoFocusTrapArrowNavigationDirection.VERTICAL;\n },\n arrowOrder() {\n return this.isVerticalArrowNavigation\n ? Object.values(BentoFocusTrapVerticalNavigationEvent)\n : Object.values(BentoFocusTrapHorizontalNavigationEvent);\n },\n },\n watch: {\n /**\n * If the disabled prop changes, then enable / disable the focus trap.\n */\n disabled() {\n if (this.disabled) {\n this.disable();\n } else {\n this.setFocusInside();\n }\n },\n },\n mounted() {\n if (this.disabled) {\n return;\n }\n this.setFocusInside();\n },\n beforeUnmount() {\n if (this.disabled) {\n return;\n }\n this.disable();\n },\n methods: {\n /**\n * Set focus back inside the element area, giving the last focus element\n * `focus-lock` can determine the next interable element to focus on.\n */\n async setFocusInside() {\n const isFocusOnBody = document.activeElement === document.body;\n if (isFocusOnBody || focusIsHidden() || !this.lastFocusedElement) {\n if (!focusInside(this.$refs.root as HTMLElement)) {\n moveFocusInside(this.$refs.root as HTMLElement, this.lastFocusedElement);\n }\n this.lastFocusedElement = document.activeElement;\n }\n },\n /**\n * On blur, trap the focus inside!\n */\n onBlur() {\n if (this.disabled) {\n return;\n }\n deferAction(this.setFocusInside);\n },\n /**\n * If the no arrow navigation is enabled\n * or if the currently focus element is a textarea or an input then prevent navigation.\n */\n shouldPreventNavigation() {\n if (!this.isVerticalArrowNavigation && !this.isHorizontalArrowNavigation) {\n return false;\n }\n\n const currentTag = document.activeElement.tagName.toLowerCase();\n const possibleFormControls = this.isVerticalArrowNavigation\n ? ['textarea', 'select']\n : ['input', 'textarea'];\n return possibleFormControls.includes(currentTag);\n },\n /**\n * When an arrow key is pressed then navigate to the next focusable element.\n * If trap is disabled or is content editable then prevent arrow navigation.\n *\n * @param event on keyboard press event\n */\n onKeyDown(event: KeyboardEvent) {\n if (\n this.disabled ||\n (document.activeElement as HTMLElement).isContentEditable ||\n this.shouldPreventNavigation()\n ) {\n return;\n }\n\n const { isArrowNext, isArrowPrev } = getArrowType(event, this.arrowOrder);\n if (isArrowPrev || isArrowNext) {\n event.preventDefault();\n event.stopPropagation();\n const focusableEl = getNextFocusableElement(isArrowPrev ? 1 : -1, this.$el);\n focusableEl.focus();\n if ('scrollIntoView' in focusableEl) {\n const options =\n 'scrollBehavior' in document.documentElement.style ? SCROLL_INTO_VIEW_OPTIONS : false;\n focusableEl.scrollIntoView(options);\n }\n }\n },\n /**\n * If focus trap is disabled then return focus to last focus element, parent node or simply the document body.\n */\n disable() {\n const focusOnDestroyEl = this.lastFocusedElement || this.$el.parentNode || document.body;\n if (focusOnDestroyEl) {\n focusOnDestroyEl.focus();\n }\n },\n useHasSlot,\n },\n });\n</script>\n\n<style lang=\"scss\" scoped>\n .b-focus-trap {\n outline: none;\n }\n</style>\n"],"names":["FOCUS_GROUP","FOCUS_DISABLED","FOCUS_ALLOW","FOCUS_AUTO","FOCUS_NO_AUTOFOCUS","toArray","a","ret","i","asArray","isElementHidden","node","computedStyle","getParentNode","isTopNode","isVisibleUncached","checkParent","isVisibleCached","visibilityCache","cached","result","isAutoFocusAllowedUncached","isAutoFocusAllowed","isAutoFocusAllowedCached","cache","getDataset","isHTMLButtonElement","isHTMLInputElement","isRadioElement","notHiddenInput","attribute","isGuard","_a","isNotAGuard","isDefined","x","tabSort","b","tabDiff","indexDiff","orderByTabIndex","nodes","filterNegative","keepGuards","index","data","tabbables","queryTabbables","queryGuardTabbables","getFocusablesWithShadowDom","parent","withGuards","acc","child","getFocusables","parents","getParentAutofocusables","parentFocus","filterFocusable","filterAutoFocusable","getTabbableNodes","topNodes","getAllTabbableNodes","parentAutofocusables","topNode","contains","scope","element","filterNested","contained","l","j","position","_","getTopParent","getAllAffectedNodes","currentNode","group","getNestedShadowActiveElement","shadowRoot","getActiveElement","focusInFrame","frame","focusInsideIframe","focusInside","activeElement","focusIsHidden","findSelectedRadio","el","correctNode","correctNodes","resultSet","pickFirstFocus","pickFocusable","NEW_FOCUS","newFocus","innerNodes","outerNodes","lastNode","cnt","firstFocus","lastFocus","isOnGuard","activeIndex","lastIndex","lastNodeInside","firstNodeIndex","lastNodeIndex","correctedNodes","correctedIndex","correctedIndexDiff","returnFirstNode","returnLastNode","getParents","getCommonParent","nodeA","nodeB","parentsA","parentsB","currentParent","getTopCommonParent","baseActiveElement","leftEntry","rightEntries","activeElements","leftEntries","topCommon","entry","subEntry","common","allParentAutofocusables","entries","findAutoFocused","autoFocusables","reorderNodes","srcNodes","dstNodes","remap","entity","getFocusMerge","commonParent","anyFocusable","innerElements","orderedInnerElements","newId","autoFocusable","getFocusabledIn","getFocusableIn","focusOn","target","focusOptions","guardCount","lockDisabled","setFocus","options","focusable","BentoFocusTrapArrowNavigationDirection","BentoFocusTrapArrowNavigationDirection2","BentoFocusTrapVerticalNavigationEvent","BentoFocusTrapVerticalNavigationEvent2","BentoFocusTrapHorizontalNavigationEvent","BentoFocusTrapHorizontalNavigationEvent2","deferAction","callback","getNodeIndex","item","getNextFocusableElement","factor","currentFocusedEl","focusableElements","nextIndex","getArrowType","event","arrowOrder","eventKey","SCROLL_INTO_VIEW_OPTIONS","_sfc_main","defineComponent","value","currentT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AAEA,CAAA;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]}
@@ -1,15 +1,15 @@
1
- import { ref as l, computed as n, defineComponent as o, toRefs as c } from "vue";
2
- import { B as d, a as u, b as _ } from "./index.56858f4e.js";
3
- import { n as p } from "./_plugin-vue2_normalizer.71e2aa87.js";
4
- import "../assets/index2.css";
5
- const m = (a) => {
6
- const t = l(a);
1
+ import { ref as i, computed as n, defineComponent as l, toRefs as o } from "vue";
2
+ import { B as c } from "./index.45295dd3.js";
3
+ import { n as u } from "./_plugin-vue2_normalizer.71e2aa87.js";
4
+ import "../assets/index18.css";
5
+ const _ = (a) => {
6
+ const t = i(a);
7
7
  return n(() => t.value ? t.value.trim().charAt(0).toUpperCase() : null);
8
8
  };
9
9
  var s = /* @__PURE__ */ ((a) => (a.LARGE = "large", a.SMALL = "small", a))(s || {}), r = /* @__PURE__ */ ((a) => (a.BLUE = "blue", a.GREEN = "green", a.RED = "red", a.YELLOW = "yellow", a))(r || {});
10
- const v = o({
10
+ const d = l({
11
11
  name: "avatar-image",
12
- components: { BentoTypography: d },
12
+ components: { BentoTypography: c },
13
13
  props: {
14
14
  /**
15
15
  * Image src to load the profile picture.
@@ -48,38 +48,35 @@ const v = o({
48
48
  }
49
49
  },
50
50
  setup(a) {
51
- const { username: t } = c(a), e = m(t), i = n(() => ({
52
- [`b-avatar-image--${s.SMALL}`]: a.variant === s.SMALL,
53
- [`b-avatar-image--${a.color}`]: a.color
54
- }));
51
+ const { username: t } = o(a), e = _(t);
55
52
  return {
56
- // Enums
57
- BentoTypographyElement: u,
58
- BentoTypographyVariant: _,
59
53
  // Values
60
- conditionalClasses: i,
54
+ conditionalClasses: n(() => ({
55
+ [`b-avatar-image--${s.SMALL}`]: a.variant === s.SMALL,
56
+ [`b-avatar-image--${a.color}`]: a.color
57
+ })),
61
58
  initials: e
62
59
  };
63
60
  }
64
61
  });
65
- var g = function() {
62
+ var m = function() {
66
63
  var t = this, e = t._self._c;
67
- return t._self._setupProxy, e("div", { staticClass: "b-avatar-image", class: t.conditionalClasses, attrs: { "aria-hidden": "true", "data-testid": "avatar" } }, [t.src ? e("img", { staticClass: "b-avatar-image__image", attrs: { src: t.src, alt: "Profile picture", "data-testid": "avatar-content" } }) : e("div", { staticClass: "b-avatar-image__default", attrs: { "data-testid": "avatar-content" } }, [e("bento-typography", { attrs: { el: t.BentoTypographyElement.SPAN, variant: t.BentoTypographyVariant.BODY, strongest: "" } }, [t._v(" " + t._s(t.initials) + " ")])], 1)]);
68
- }, y = [], f = /* @__PURE__ */ p(
64
+ return t._self._setupProxy, e("div", { staticClass: "b-avatar-image", class: t.conditionalClasses, attrs: { "aria-hidden": "true", "data-testid": "avatar" } }, [t.src ? e("img", { staticClass: "b-avatar-image__image", attrs: { src: t.src, alt: "Profile picture", "data-testid": "avatar-content" } }) : e("div", { staticClass: "b-avatar-image__default", attrs: { "data-testid": "avatar-content" } }, [e("bento-typography", { attrs: { el: "span", variant: "body", strongest: "" } }, [t._v(" " + t._s(t.initials) + " ")])], 1)]);
65
+ }, v = [], p = /* @__PURE__ */ u(
66
+ d,
67
+ m,
69
68
  v,
70
- g,
71
- y,
72
69
  !1,
73
70
  null,
74
- "cd59ad4a",
71
+ "46be3f6e",
75
72
  null,
76
73
  null
77
74
  );
78
- const h = f.exports;
75
+ const L = p.exports;
79
76
  export {
80
- h as A,
77
+ L as A,
81
78
  r as B,
82
79
  s as a,
83
- m as u
80
+ _ as u
84
81
  };
85
- //# sourceMappingURL=index.f0f8ed98.js.map
82
+ //# sourceMappingURL=index.c8f81673.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.c8f81673.js","sources":["../../src/composables/initials.ts","../../src/components/avatar-image/avatar-image.types.ts","../../src/components/avatar-image/avatar-image.vue"],"sourcesContent":["import { computed, ComputedRef, ref } from 'vue';\nimport { MaybeRef } from '@/types';\n\n/** Extracts the first letter of a username\n * @param username - The name to return the initials of\n * Common patterns:\n * 1. John => J\n * 2. John Smith => J\n * John Smith Doe Holly => J\n */\nexport const useInitials = (username: MaybeRef<string | null>): ComputedRef<string | null> => {\n const computedUsername = ref(username);\n return computed(() => (computedUsername.value ? computedUsername.value.trim().charAt(0).toUpperCase() : null));\n};\n","export enum BentoAvatarImageVariant {\n LARGE = 'large',\n SMALL = 'small',\n}\n\nexport enum BentoAvatarImageColor {\n BLUE = 'blue',\n GREEN = 'green',\n RED = 'red',\n YELLOW = 'yellow',\n}\n","<template>\n <div class=\"b-avatar-image\" :class=\"conditionalClasses\" aria-hidden=\"true\" data-testid=\"avatar\">\n <img v-if=\"src\" :src=\"src\" class=\"b-avatar-image__image\" alt=\"Profile picture\" data-testid=\"avatar-content\" />\n <div v-else class=\"b-avatar-image__default\" data-testid=\"avatar-content\">\n <bento-typography el=\"span\" variant=\"body\" strongest>\n {{ initials }}\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, toRefs } from 'vue';\n import { BentoAvatarImageColor, BentoAvatarImageVariant } from './avatar-image.types';\n import { BentoTypography } from '@/components/typography';\n import { useInitials } from '@/composables';\n\n export default defineComponent({\n name: 'avatar-image',\n components: { BentoTypography },\n props: {\n /**\n * Image src to load the profile picture.\n */\n src: {\n type: String,\n default: null,\n },\n /**\n * Name of the user that will be used to extract initials to display default value.\n * John => J\n * John Smith => JS\n * John Smith Doe => JD\n * John Smith Doe Holly => JH\n */\n username: {\n type: String,\n default: null,\n },\n /**\n * Variants supported for small and large.\n * Default - large\n */\n variant: {\n type: String as PropType<BentoAvatarImageVariant>,\n default: BentoAvatarImageVariant.LARGE,\n validator: (value: BentoAvatarImageVariant) => Object.values(BentoAvatarImageVariant).includes(value),\n },\n /**\n * Avatar color. Defaults to yellow.\n */\n color: {\n type: String as PropType<BentoAvatarImageColor>,\n default: BentoAvatarImageColor.YELLOW,\n validator: (value: BentoAvatarImageColor) => Object.values(BentoAvatarImageColor).includes(value),\n },\n },\n setup(props) {\n const { username } = toRefs(props);\n const initials = useInitials(username);\n\n const conditionalClasses = computed(() => ({\n [`b-avatar-image--${BentoAvatarImageVariant.SMALL}`]: props.variant === BentoAvatarImageVariant.SMALL,\n [`b-avatar-image--${props.color}`]: props.color,\n }));\n\n return {\n // Values\n conditionalClasses,\n initials,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./avatar-image.scss\" />\n"],"names":["useInitials","username","computedUsername","ref","computed","BentoAvatarImageVariant","BentoAvatarImageVariant2","BentoAvatarImageColor","BentoAvatarImageColor2","_sfc_main","defineComponent","BentoTypography","value","props","toRefs","initials"],"mappings":";;;;AAUa,MAAAA,IAAA,CAAAC,MAAA;AACT,QAAAC,IAAAC,EAAAF,CAAA;AACA,SAAAG,EAAA,MAAAF,EAAA,QAAAA,EAAA,MAAA,KAAA,EAAA,OAAA,CAAA,EAAA,YAAA,IAAA,IAAA;AACJ;ACbY,IAAAG,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,MAAA,OACAA,EAAA,SAAA,UAJQA,IAAAD,KAAA,CAAA,CAAA;ACYZ,MAAAE,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,KAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,UAAA;AAAA,MAQA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,SAAA;AAAA,MAKA,MAAA;AAAA,MACA,SAAAN,EAAA;AAAA,MACA,WAAA,CAAAO,MAAA,OAAA,OAAAP,CAAA,EAAA,SAAAO,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,OAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAAL,EAAA;AAAA,MACA,WAAA,CAAAK,MAAA,OAAA,OAAAL,CAAA,EAAA,SAAAK,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,MAAAC,GAAA;AAEA,UAAA,EAAA,UAAAZ,EAAA,IAAAa,EAAAD,CAAA,GACAE,IAAAf,EAAAC,CAAA;AAOA,WAAA;AAAA;AAAA,MAAA,oBALAG,EAAA,OAAA;AAAA,QAAA,CAAA,mBAAAC,EAAA,OAAA,GAAAQ,EAAA,YAAAR,EAAA;AAAA,QACA,CAAA,mBAAAQ,EAAA,OAAA,GAAAA,EAAA;AAAA,MACA,EAAA;AAAA,MAKA,UAAAE;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;"}
@@ -1,12 +1,12 @@
1
- import { defineComponent as i, toRefs as v, computed as r } from "vue";
2
- import { A as f, u as b, B as n, a as y } from "./index.f0f8ed98.js";
3
- import { B as c, a as _, b as d } from "./index.56858f4e.js";
4
- import { n as p } from "./_plugin-vue2_normalizer.71e2aa87.js";
5
- import { BentoTag as g } from "../tag.js";
1
+ import { defineComponent as i, toRefs as m, computed as r } from "vue";
2
+ import { A as v, u as b, B as n, a as f } from "./index.c8f81673.js";
3
+ import { B as _ } from "./index.45295dd3.js";
4
+ import { n as c } from "./_plugin-vue2_normalizer.71e2aa87.js";
5
+ import { BentoTag as d } from "../tag.js";
6
6
  import "../assets/listbox-option-tag.css";
7
- const B = i({
7
+ const g = i({
8
8
  name: "bento-avatar",
9
- components: { AvatarImage: f, BentoTypography: c },
9
+ components: { AvatarImage: v, BentoTypography: _ },
10
10
  props: {
11
11
  /**
12
12
  * Displays the user profile without the label.
@@ -35,40 +35,38 @@ const B = i({
35
35
  }
36
36
  },
37
37
  setup(e) {
38
- const { username: t } = v(e), a = r(() => e.iconOnly ? e.username : null), u = r(() => e.src ? null : e.username), l = b(t), o = r(() => l.value ? l.value.charCodeAt(0) - 65 : null), m = r(() => {
39
- const s = 26 / Object.keys(n).length;
40
- return o.value <= s ? n.YELLOW : o.value <= s * 2 ? n.BLUE : o.value <= s * 3 ? n.GREEN : n.RED;
38
+ const { username: t } = m(e), a = r(() => e.iconOnly ? e.username : null), u = r(() => e.src ? null : e.username), l = b(t), s = r(() => l.value ? l.value.charCodeAt(0) - 65 : null), p = r(() => {
39
+ const o = 26 / Object.keys(n).length;
40
+ return s.value <= o ? n.YELLOW : s.value <= o * 2 ? n.BLUE : s.value <= o * 3 ? n.GREEN : n.RED;
41
41
  });
42
42
  return {
43
43
  // Enums
44
- BentoAvatarImageVariant: y,
45
- BentoTypographyElement: _,
46
- BentoTypographyVariant: d,
44
+ BentoAvatarImageVariant: f,
47
45
  // Values
48
46
  computedAriaLabel: a,
49
47
  computedUsername: u,
50
- avatarColor: m
48
+ avatarColor: p
51
49
  };
52
50
  }
53
51
  });
54
- var h = function() {
52
+ var y = function() {
55
53
  var t = this, a = t._self._c;
56
- return t._self._setupProxy, a("div", { staticClass: "b-avatar", attrs: { "aria-label": t.computedAriaLabel } }, [a("avatar-image", { attrs: { src: t.src, username: t.computedUsername, variant: t.BentoAvatarImageVariant.SMALL, color: t.avatarColor } }), t.iconOnly ? t._e() : a("bento-typography", { staticClass: "b-avatar__label", attrs: { el: t.BentoTypographyElement.SPAN, variant: t.BentoTypographyVariant.BODY } }, [t._v(" " + t._s(t.username) + " ")])], 1);
57
- }, A = [], C = /* @__PURE__ */ p(
58
- B,
59
- h,
60
- A,
54
+ return t._self._setupProxy, a("div", { staticClass: "b-avatar", attrs: { "aria-label": t.computedAriaLabel } }, [a("avatar-image", { attrs: { src: t.src, username: t.computedUsername, variant: t.BentoAvatarImageVariant.SMALL, color: t.avatarColor } }), t.iconOnly ? t._e() : a("bento-typography", { staticClass: "b-avatar__label", attrs: { el: "span", variant: "body" } }, [t._v(" " + t._s(t.username) + " ")])], 1);
55
+ }, C = [], x = /* @__PURE__ */ c(
56
+ g,
57
+ y,
58
+ C,
61
59
  !1,
62
60
  null,
63
- "3412fec3",
61
+ "c3749463",
64
62
  null,
65
63
  null
66
64
  );
67
- const N = C.exports, x = i({
65
+ const U = x.exports, A = i({
68
66
  name: "listbox-tag-option",
69
67
  components: {
70
- BentoTag: g,
71
- BentoTypography: c
68
+ BentoTag: d,
69
+ BentoTypography: _
72
70
  },
73
71
  props: {
74
72
  /**
@@ -83,28 +81,26 @@ const N = C.exports, x = i({
83
81
  setup(e) {
84
82
  return {
85
83
  // Values
86
- variant: r(() => e.option.data),
87
- // Enums
88
- BentoTypographyElement: _
84
+ variant: r(() => e.option.data)
89
85
  };
90
86
  }
91
87
  });
92
88
  var O = function() {
93
89
  var t = this, a = t._self._c;
94
- return t._self._setupProxy, a("span", { staticClass: "b-listbox-tag-option" }, [a("span", { attrs: { "aria-hidden": "true" } }, [a("bento-tag", { staticClass: "b-listbox-tag-option__tag", attrs: { label: t.option.value.toString(), variant: t.variant } })], 1), t.option.label ? a("bento-typography", { staticClass: "b-listbox-tag-option__label", attrs: { el: t.BentoTypographyElement.SPAN } }, [t._v(" " + t._s(t.option.label) + " ")]) : t._e()], 1);
95
- }, L = [], T = /* @__PURE__ */ p(
96
- x,
90
+ return t._self._setupProxy, a("span", { staticClass: "b-listbox-tag-option" }, [a("span", { attrs: { "aria-hidden": "true" } }, [a("bento-tag", { staticClass: "b-listbox-tag-option__tag", attrs: { label: t.option.value.toString(), variant: t.variant } })], 1), t.option.label ? a("bento-typography", { staticClass: "b-listbox-tag-option__label", attrs: { el: "span" } }, [t._v(" " + t._s(t.option.label) + " ")]) : t._e()], 1);
91
+ }, h = [], B = /* @__PURE__ */ c(
92
+ A,
97
93
  O,
98
- L,
94
+ h,
99
95
  !1,
100
96
  null,
101
- "d76afc70",
97
+ "83a3d6e2",
102
98
  null,
103
99
  null
104
100
  );
105
- const U = T.exports;
101
+ const j = B.exports;
106
102
  export {
107
- N as B,
108
- U as L
103
+ U as B,
104
+ j as L
109
105
  };
110
- //# sourceMappingURL=listbox-option-tag.8d6cccac.js.map
106
+ //# sourceMappingURL=listbox-option-tag.ec42431b.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listbox-option-tag.ec42431b.js","sources":["../../src/components/internal/avatar/avatar.vue","../../src/components/internal/listbox/components/listbox-option-tag/listbox-option-tag.vue"],"sourcesContent":["<template>\n <div class=\"b-avatar\" :aria-label=\"computedAriaLabel\">\n <avatar-image\n :src=\"src\"\n :username=\"computedUsername\"\n :variant=\"BentoAvatarImageVariant.SMALL\"\n :color=\"avatarColor\"\n />\n <bento-typography v-if=\"!iconOnly\" class=\"b-avatar__label\" el=\"span\" variant=\"body\">\n {{ username }}\n </bento-typography>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, toRefs } from 'vue';\n import { AvatarImage, BentoAvatarImageColor, BentoAvatarImageVariant } from '@/components/avatar-image';\n import { BentoTypography } from '@/components/typography';\n import { useInitials } from '@/composables';\n\n /**\n * Displays an user profile including an avatar and optionally a label.\n *\n * @example\n * import { BentoUserProfile } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoUserProfile },\n * template: `\n * <bento-user-profile :src=\"userAvatarSrc\" username=\"Jane\" />\n */\n export default defineComponent({\n name: 'bento-avatar',\n components: { AvatarImage, BentoTypography },\n props: {\n /**\n * Displays the user profile without the label.\n */\n iconOnly: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Name of the user that will be used both in the label and to extract initials to display default value.\n * John => J\n * John Smith => JS\n * John Smith Doe => JD\n * John Smith Doe Holly => JH\n */\n username: {\n type: String,\n required: true,\n },\n\n /**\n * Image src to load the profile picture.\n */\n src: {\n type: String,\n default: null,\n },\n },\n\n setup(props) {\n const { username } = toRefs(props);\n\n const computedAriaLabel = computed(() => (props.iconOnly ? props.username : null));\n const computedUsername = computed(() => (!props.src ? props.username : null));\n const initials = useInitials(username);\n\n // Returns the UTF-16 char code\n const charCode = computed(() => (initials.value ? initials.value.charCodeAt(0) - 65 : null));\n\n // Returns a computed color based on the letter passed\n const avatarColor = computed(() => {\n const numberOfAlphabetLetters = 26;\n const numberOfColors = Object.keys(BentoAvatarImageColor).length;\n const rangeStep = numberOfAlphabetLetters / numberOfColors;\n\n if (charCode.value <= rangeStep) {\n return BentoAvatarImageColor.YELLOW;\n }\n if (charCode.value <= rangeStep * 2) {\n return BentoAvatarImageColor.BLUE;\n }\n if (charCode.value <= rangeStep * 3) {\n return BentoAvatarImageColor.GREEN;\n }\n return BentoAvatarImageColor.RED;\n });\n\n return {\n // Enums\n BentoAvatarImageVariant,\n\n // Values\n computedAriaLabel,\n computedUsername,\n avatarColor,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./avatar.scss\" />\n","<template>\n <span class=\"b-listbox-tag-option\">\n <span aria-hidden=\"true\">\n <bento-tag class=\"b-listbox-tag-option__tag\" :label=\"option.value.toString()\" :variant=\"variant\" />\n </span>\n <bento-typography v-if=\"option.label\" el=\"span\" class=\"b-listbox-tag-option__label\">\n {{ option.label }}\n </bento-typography>\n </span>\n</template>\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import type { BentoListboxOptionItem } from '@/types';\n import { BentoTag, BentoTagVariant } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n\n /**\n * A Tag Dropdown option item used in the Dropdown and Filter components.\n */\n export default defineComponent({\n name: 'listbox-tag-option',\n components: {\n BentoTag,\n BentoTypography,\n },\n props: {\n /**\n * The option item that contains all the option item's data.\n * @type {BentoListboxOptionItem}\n */\n option: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n },\n setup(props) {\n const variant = computed(() => props.option.data as BentoTagVariant);\n\n return {\n // Values\n variant,\n };\n },\n });\n</script>\n<style lang=\"scss\" scoped src=\"./listbox-option-tag.scss\" />\n"],"names":["_sfc_main$1","defineComponent","AvatarImage","BentoTypography","props","username","toRefs","computedAriaLabel","computed","computedUsername","initials","useInitials","charCode","avatarColor","rangeStep","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