@adyen/bento-vue3 1.59.0 → 1.60.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 (578) hide show
  1. package/package.json +10 -6
  2. package/dist/@types/components.d.ts +0 -201
  3. package/dist/@types/index.d.ts +0 -17796
  4. package/dist/accordion.js +0 -6
  5. package/dist/accordion.js.map +0 -1
  6. package/dist/action-bar.js +0 -5
  7. package/dist/action-bar.js.map +0 -1
  8. package/dist/alert.js +0 -8
  9. package/dist/alert.js.map +0 -1
  10. package/dist/assets/accordion-item.css +0 -1
  11. package/dist/assets/action-bar.css +0 -1
  12. package/dist/assets/alert.css +0 -1
  13. package/dist/assets/avatar.css +0 -1
  14. package/dist/assets/base-button.css +0 -1
  15. package/dist/assets/base-modal.css +0 -1
  16. package/dist/assets/button-actions-with-menu.css +0 -1
  17. package/dist/assets/button-actions.css +0 -1
  18. package/dist/assets/button.css +0 -1
  19. package/dist/assets/calendar.css +0 -1
  20. package/dist/assets/card.css +0 -1
  21. package/dist/assets/checkbox-group.css +0 -1
  22. package/dist/assets/checkbox-input.css +0 -1
  23. package/dist/assets/checkbox.css +0 -1
  24. package/dist/assets/chip.css +0 -1
  25. package/dist/assets/code-snippet.css +0 -1
  26. package/dist/assets/controls-group.css +0 -1
  27. package/dist/assets/copy.css +0 -1
  28. package/dist/assets/country.css +0 -1
  29. package/dist/assets/currency.css +0 -1
  30. package/dist/assets/dashboard-section.css +0 -1
  31. package/dist/assets/dashed-underline.css +0 -1
  32. package/dist/assets/data-grid-template.css +0 -1
  33. package/dist/assets/data-grid.css +0 -1
  34. package/dist/assets/date-picker.css +0 -1
  35. package/dist/assets/date-range-picker.css +0 -1
  36. package/dist/assets/date.css +0 -1
  37. package/dist/assets/dialog-page.css +0 -1
  38. package/dist/assets/divider.css +0 -1
  39. package/dist/assets/dropdown-default-textbox.css +0 -1
  40. package/dist/assets/dropdown-tag.css +0 -1
  41. package/dist/assets/dropdown.css +0 -1
  42. package/dist/assets/empty-state.css +0 -1
  43. package/dist/assets/error-message.css +0 -1
  44. package/dist/assets/file-uploader.css +0 -1
  45. package/dist/assets/filter-bar.css +0 -1
  46. package/dist/assets/fixed-scroller.css +0 -1
  47. package/dist/assets/focus-trap.css +0 -1
  48. package/dist/assets/footer-actions.css +0 -1
  49. package/dist/assets/form-layout-title.css +0 -1
  50. package/dist/assets/grid-layout.css +0 -1
  51. package/dist/assets/header-with-views.css +0 -1
  52. package/dist/assets/header.css +0 -1
  53. package/dist/assets/info-icon-with-popover.css +0 -1
  54. package/dist/assets/info-icon.css +0 -1
  55. package/dist/assets/input-field-password.css +0 -1
  56. package/dist/assets/input-field-phone-number.css +0 -1
  57. package/dist/assets/input-field.css +0 -1
  58. package/dist/assets/inspector.css +0 -1
  59. package/dist/assets/layout-row.css +0 -1
  60. package/dist/assets/link.css +0 -1
  61. package/dist/assets/listbox-option-tag.css +0 -1
  62. package/dist/assets/loading-indicator.css +0 -1
  63. package/dist/assets/main.css +0 -1
  64. package/dist/assets/menu.css +0 -1
  65. package/dist/assets/modal-fullscreen.css +0 -1
  66. package/dist/assets/pagination.css +0 -1
  67. package/dist/assets/payment-method.css +0 -1
  68. package/dist/assets/popover.css +0 -1
  69. package/dist/assets/popper-container.css +0 -1
  70. package/dist/assets/promo-banner.css +0 -1
  71. package/dist/assets/radio-group.css +0 -1
  72. package/dist/assets/radio-input.css +0 -1
  73. package/dist/assets/rich-text-editor.css +0 -1
  74. package/dist/assets/search-bar.css +0 -1
  75. package/dist/assets/secondary-nav.css +0 -1
  76. package/dist/assets/segmented-control.css +0 -1
  77. package/dist/assets/selection-card-group.css +0 -1
  78. package/dist/assets/sidepanel.css +0 -1
  79. package/dist/assets/status.css +0 -1
  80. package/dist/assets/step.css +0 -1
  81. package/dist/assets/structured-list-item.css +0 -1
  82. package/dist/assets/summary-grid.css +0 -1
  83. package/dist/assets/tabs.css +0 -1
  84. package/dist/assets/tag.css +0 -1
  85. package/dist/assets/teleport.css +0 -1
  86. package/dist/assets/textarea.css +0 -1
  87. package/dist/assets/timeline-item.css +0 -1
  88. package/dist/assets/toast.css +0 -1
  89. package/dist/assets/toggle-button.css +0 -1
  90. package/dist/assets/toggle.css +0 -1
  91. package/dist/assets/tooltip.css +0 -1
  92. package/dist/assets/tutorial.css +0 -1
  93. package/dist/assets/typography.css +0 -1
  94. package/dist/assets/use-cached-selected-values.css +0 -1
  95. package/dist/avatar.js +0 -5
  96. package/dist/avatar.js.map +0 -1
  97. package/dist/button.js +0 -16
  98. package/dist/button.js.map +0 -1
  99. package/dist/card.js +0 -7
  100. package/dist/card.js.map +0 -1
  101. package/dist/checkbox.js +0 -11
  102. package/dist/checkbox.js.map +0 -1
  103. package/dist/chip.js +0 -5
  104. package/dist/chip.js.map +0 -1
  105. package/dist/chunks/1-generic-use.CZhwP2Yc.js +0 -5
  106. package/dist/chunks/1-generic-use.CZhwP2Yc.js.map +0 -1
  107. package/dist/chunks/1-generic-use.R6x8PEGA.js +0 -5
  108. package/dist/chunks/1-generic-use.R6x8PEGA.js.map +0 -1
  109. package/dist/chunks/2-generic-use.CNKjB4B7.js +0 -5
  110. package/dist/chunks/2-generic-use.CNKjB4B7.js.map +0 -1
  111. package/dist/chunks/2-generic-use.w0fUhovx.js +0 -5
  112. package/dist/chunks/2-generic-use.w0fUhovx.js.map +0 -1
  113. package/dist/chunks/3-generic-use.BLEzR04g.js +0 -5
  114. package/dist/chunks/3-generic-use.BLEzR04g.js.map +0 -1
  115. package/dist/chunks/3-generic-use.D3NFHgI4.js +0 -5
  116. package/dist/chunks/3-generic-use.D3NFHgI4.js.map +0 -1
  117. package/dist/chunks/4-generic-use.CULEpvgj.js +0 -5
  118. package/dist/chunks/4-generic-use.CULEpvgj.js.map +0 -1
  119. package/dist/chunks/4-generic-use.D82y3n39.js +0 -5
  120. package/dist/chunks/4-generic-use.D82y3n39.js.map +0 -1
  121. package/dist/chunks/_commonjsHelpers.C6fGbg64.js +0 -7
  122. package/dist/chunks/_commonjsHelpers.C6fGbg64.js.map +0 -1
  123. package/dist/chunks/_plugin-vue_export-helper.CHgC5LLL.js +0 -10
  124. package/dist/chunks/_plugin-vue_export-helper.CHgC5LLL.js.map +0 -1
  125. package/dist/chunks/accordion-item.CihL7JaZ.js +0 -142
  126. package/dist/chunks/accordion-item.CihL7JaZ.js.map +0 -1
  127. package/dist/chunks/action-bar.DHFGXPzd.js +0 -203
  128. package/dist/chunks/action-bar.DHFGXPzd.js.map +0 -1
  129. package/dist/chunks/adding-payment-methods.BJZLPxtM.js +0 -5
  130. package/dist/chunks/adding-payment-methods.BJZLPxtM.js.map +0 -1
  131. package/dist/chunks/adding-payment-methods.Dle8zt43.js +0 -5
  132. package/dist/chunks/adding-payment-methods.Dle8zt43.js.map +0 -1
  133. package/dist/chunks/adyen-giving.Ffw_DlJK.js +0 -5
  134. package/dist/chunks/adyen-giving.Ffw_DlJK.js.map +0 -1
  135. package/dist/chunks/adyen-giving.LiKHj_jY.js +0 -5
  136. package/dist/chunks/adyen-giving.LiKHj_jY.js.map +0 -1
  137. package/dist/chunks/alert.CjegN2iG.js +0 -169
  138. package/dist/chunks/alert.CjegN2iG.js.map +0 -1
  139. package/dist/chunks/aria-label.CaUURpnB.js +0 -13
  140. package/dist/chunks/aria-label.CaUURpnB.js.map +0 -1
  141. package/dist/chunks/avatar.B0-9jC6H.js +0 -94
  142. package/dist/chunks/avatar.B0-9jC6H.js.map +0 -1
  143. package/dist/chunks/base-button.DdNFlbgH.js +0 -115
  144. package/dist/chunks/base-button.DdNFlbgH.js.map +0 -1
  145. package/dist/chunks/base-modal.BXdrZf3U.js +0 -504
  146. package/dist/chunks/base-modal.BXdrZf3U.js.map +0 -1
  147. package/dist/chunks/base-modal.keys.C2PQXcE2.js +0 -5
  148. package/dist/chunks/base-modal.keys.C2PQXcE2.js.map +0 -1
  149. package/dist/chunks/bin.CA6UQCNZ.js +0 -37
  150. package/dist/chunks/bin.CA6UQCNZ.js.map +0 -1
  151. package/dist/chunks/button-actions-with-menu.DfnPv97A.js +0 -174
  152. package/dist/chunks/button-actions-with-menu.DfnPv97A.js.map +0 -1
  153. package/dist/chunks/button-actions.WnxN4KnV.js +0 -264
  154. package/dist/chunks/button-actions.WnxN4KnV.js.map +0 -1
  155. package/dist/chunks/button.CVZJTZv0.js +0 -120
  156. package/dist/chunks/button.CVZJTZv0.js.map +0 -1
  157. package/dist/chunks/calendar.BzN254pQ.js +0 -1288
  158. package/dist/chunks/calendar.BzN254pQ.js.map +0 -1
  159. package/dist/chunks/card.PFtc1o__.js +0 -213
  160. package/dist/chunks/card.PFtc1o__.js.map +0 -1
  161. package/dist/chunks/checkbox-group.Dsiyb1cX.js +0 -192
  162. package/dist/chunks/checkbox-group.Dsiyb1cX.js.map +0 -1
  163. package/dist/chunks/checkbox-input.DVayucaL.js +0 -168
  164. package/dist/chunks/checkbox-input.DVayucaL.js.map +0 -1
  165. package/dist/chunks/checkbox.DeNqOQ8F.js +0 -253
  166. package/dist/chunks/checkbox.DeNqOQ8F.js.map +0 -1
  167. package/dist/chunks/checkmark-circle-fill.jicbqe7k.js +0 -44
  168. package/dist/chunks/checkmark-circle-fill.jicbqe7k.js.map +0 -1
  169. package/dist/chunks/checkmark-small.D7l69yBf.js +0 -29
  170. package/dist/chunks/checkmark-small.D7l69yBf.js.map +0 -1
  171. package/dist/chunks/chevron-left.BF63HtOH.js +0 -52
  172. package/dist/chunks/chevron-left.BF63HtOH.js.map +0 -1
  173. package/dist/chunks/chevron-up.-0oLlHmh.js +0 -52
  174. package/dist/chunks/chevron-up.-0oLlHmh.js.map +0 -1
  175. package/dist/chunks/chip.BVCzNGaI.js +0 -71
  176. package/dist/chunks/chip.BVCzNGaI.js.map +0 -1
  177. package/dist/chunks/click-outside.C1Ud8AA2.js +0 -23
  178. package/dist/chunks/click-outside.C1Ud8AA2.js.map +0 -1
  179. package/dist/chunks/code-snippet.91V1hyL-.js +0 -334
  180. package/dist/chunks/code-snippet.91V1hyL-.js.map +0 -1
  181. package/dist/chunks/codemirror.Zv80n3Z2.js +0 -14628
  182. package/dist/chunks/codemirror.Zv80n3Z2.js.map +0 -1
  183. package/dist/chunks/controls-group.DzFmJYYp.js +0 -98
  184. package/dist/chunks/controls-group.DzFmJYYp.js.map +0 -1
  185. package/dist/chunks/copy.BNFlTYMb.js +0 -156
  186. package/dist/chunks/copy.BNFlTYMb.js.map +0 -1
  187. package/dist/chunks/country.BhAcCmRx.js +0 -99
  188. package/dist/chunks/country.BhAcCmRx.js.map +0 -1
  189. package/dist/chunks/country.types.C0Q_hhgJ.js +0 -269
  190. package/dist/chunks/country.types.C0Q_hhgJ.js.map +0 -1
  191. package/dist/chunks/cross-circle-fill-small.mY6ihJcA.js +0 -29
  192. package/dist/chunks/cross-circle-fill-small.mY6ihJcA.js.map +0 -1
  193. package/dist/chunks/cross-circle-fill.B7YpDLTK.js +0 -44
  194. package/dist/chunks/cross-circle-fill.B7YpDLTK.js.map +0 -1
  195. package/dist/chunks/cross-small.CFrBIeYK.js +0 -29
  196. package/dist/chunks/cross-small.CFrBIeYK.js.map +0 -1
  197. package/dist/chunks/cross.CbLEjiVy.js +0 -29
  198. package/dist/chunks/cross.CbLEjiVy.js.map +0 -1
  199. package/dist/chunks/currency.DagWnTry.js +0 -109
  200. package/dist/chunks/currency.DagWnTry.js.map +0 -1
  201. package/dist/chunks/dashboard-section.BTJ8h5Kd.js +0 -165
  202. package/dist/chunks/dashboard-section.BTJ8h5Kd.js.map +0 -1
  203. package/dist/chunks/dashed-underline.BpSS0BTl.js +0 -98
  204. package/dist/chunks/dashed-underline.BpSS0BTl.js.map +0 -1
  205. package/dist/chunks/data-grid-template.CnrbFvb3.js +0 -111
  206. package/dist/chunks/data-grid-template.CnrbFvb3.js.map +0 -1
  207. package/dist/chunks/data-grid-template.keys.2_AkxuNT.js +0 -5
  208. package/dist/chunks/data-grid-template.keys.2_AkxuNT.js.map +0 -1
  209. package/dist/chunks/data-grid.PAFw8voO.js +0 -3646
  210. package/dist/chunks/data-grid.PAFw8voO.js.map +0 -1
  211. package/dist/chunks/date-input.BqBdAO1E.js +0 -17
  212. package/dist/chunks/date-input.BqBdAO1E.js.map +0 -1
  213. package/dist/chunks/date-picker.CSn6F3aG.js +0 -315
  214. package/dist/chunks/date-picker.CSn6F3aG.js.map +0 -1
  215. package/dist/chunks/date-range-picker.ByQ_yM6z.js +0 -1170
  216. package/dist/chunks/date-range-picker.ByQ_yM6z.js.map +0 -1
  217. package/dist/chunks/date.CKXySBQv.js +0 -995
  218. package/dist/chunks/date.CKXySBQv.js.map +0 -1
  219. package/dist/chunks/debounce.DUTu11PS.js +0 -10
  220. package/dist/chunks/debounce.DUTu11PS.js.map +0 -1
  221. package/dist/chunks/dialog-page.C72BX6So.js +0 -175
  222. package/dist/chunks/dialog-page.C72BX6So.js.map +0 -1
  223. package/dist/chunks/directive.Cbdox5VL.js +0 -23
  224. package/dist/chunks/directive.Cbdox5VL.js.map +0 -1
  225. package/dist/chunks/divider.qUOSAbU6.js +0 -33
  226. package/dist/chunks/divider.qUOSAbU6.js.map +0 -1
  227. package/dist/chunks/dot.BW-xtyjC.js +0 -29
  228. package/dist/chunks/dot.BW-xtyjC.js.map +0 -1
  229. package/dist/chunks/dropdown-default-textbox.BNhy-QDH.js +0 -419
  230. package/dist/chunks/dropdown-default-textbox.BNhy-QDH.js.map +0 -1
  231. package/dist/chunks/dropdown-tag.D_oUoZBc.js +0 -202
  232. package/dist/chunks/dropdown-tag.D_oUoZBc.js.map +0 -1
  233. package/dist/chunks/dropdown.B8LbzSzW.js +0 -936
  234. package/dist/chunks/dropdown.B8LbzSzW.js.map +0 -1
  235. package/dist/chunks/empty-state.BGWjUH6G.js +0 -185
  236. package/dist/chunks/empty-state.BGWjUH6G.js.map +0 -1
  237. package/dist/chunks/error-message.BzDQxHUy.js +0 -158
  238. package/dist/chunks/error-message.BzDQxHUy.js.map +0 -1
  239. package/dist/chunks/es6.BA9GH7QZ.js +0 -11
  240. package/dist/chunks/es6.BA9GH7QZ.js.map +0 -1
  241. package/dist/chunks/events.FNmSWp_P.js +0 -52
  242. package/dist/chunks/events.FNmSWp_P.js.map +0 -1
  243. package/dist/chunks/expand.DusW7F7p.js +0 -33
  244. package/dist/chunks/expand.DusW7F7p.js.map +0 -1
  245. package/dist/chunks/file-uploader.HMZfzgaO.js +0 -2280
  246. package/dist/chunks/file-uploader.HMZfzgaO.js.map +0 -1
  247. package/dist/chunks/filter-bar.CKxLJDQE.js +0 -2976
  248. package/dist/chunks/filter-bar.CKxLJDQE.js.map +0 -1
  249. package/dist/chunks/fixed-scroller.BjxA_R63.js +0 -147
  250. package/dist/chunks/fixed-scroller.BjxA_R63.js.map +0 -1
  251. package/dist/chunks/focus-trap.BdrEB4Ld.js +0 -500
  252. package/dist/chunks/focus-trap.BdrEB4Ld.js.map +0 -1
  253. package/dist/chunks/footer-actions.DqKdjjjh.js +0 -110
  254. package/dist/chunks/footer-actions.DqKdjjjh.js.map +0 -1
  255. package/dist/chunks/form-layout-title.CsmjzAje.js +0 -206
  256. package/dist/chunks/form-layout-title.CsmjzAje.js.map +0 -1
  257. package/dist/chunks/form-layout.types.D3EKzbE7.js +0 -5
  258. package/dist/chunks/form-layout.types.D3EKzbE7.js.map +0 -1
  259. package/dist/chunks/generate-uid.NJ8tVoha.js +0 -32
  260. package/dist/chunks/generate-uid.NJ8tVoha.js.map +0 -1
  261. package/dist/chunks/get-date-locale.BN8xEjY0.js +0 -1735
  262. package/dist/chunks/get-date-locale.BN8xEjY0.js.map +0 -1
  263. package/dist/chunks/get-slot-text.DQlZEsId.js +0 -12
  264. package/dist/chunks/get-slot-text.DQlZEsId.js.map +0 -1
  265. package/dist/chunks/grid-layout.BTLE3rac.js +0 -114
  266. package/dist/chunks/grid-layout.BTLE3rac.js.map +0 -1
  267. package/dist/chunks/header-with-views.BVcLQi-H.js +0 -2354
  268. package/dist/chunks/header-with-views.BVcLQi-H.js.map +0 -1
  269. package/dist/chunks/header.CYPznLHg.js +0 -253
  270. package/dist/chunks/header.CYPznLHg.js.map +0 -1
  271. package/dist/chunks/i18n.B6g5VX0q.js +0 -3131
  272. package/dist/chunks/i18n.B6g5VX0q.js.map +0 -1
  273. package/dist/chunks/image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js +0 -47
  274. package/dist/chunks/image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js.map +0 -1
  275. package/dist/chunks/index.BDuTpjD8.js +0 -40
  276. package/dist/chunks/index.BDuTpjD8.js.map +0 -1
  277. package/dist/chunks/index.BxBB1rsx.js +0 -15
  278. package/dist/chunks/index.BxBB1rsx.js.map +0 -1
  279. package/dist/chunks/index.CVpo3mlK.js +0 -528
  280. package/dist/chunks/index.CVpo3mlK.js.map +0 -1
  281. package/dist/chunks/index.CWuzEfiV.js +0 -6
  282. package/dist/chunks/index.CWuzEfiV.js.map +0 -1
  283. package/dist/chunks/index.DD7TppDb.js +0 -10
  284. package/dist/chunks/index.DD7TppDb.js.map +0 -1
  285. package/dist/chunks/info-icon-with-popover.BUtJRYXy.js +0 -97
  286. package/dist/chunks/info-icon-with-popover.BUtJRYXy.js.map +0 -1
  287. package/dist/chunks/info-icon.MO6y9Dyv.js +0 -45
  288. package/dist/chunks/info-icon.MO6y9Dyv.js.map +0 -1
  289. package/dist/chunks/info.HK3R7Drc.js +0 -44
  290. package/dist/chunks/info.HK3R7Drc.js.map +0 -1
  291. package/dist/chunks/input-field-password.c6WXpF9U.js +0 -366
  292. package/dist/chunks/input-field-password.c6WXpF9U.js.map +0 -1
  293. package/dist/chunks/input-field-phone-number.DQxF-6wT.js +0 -3106
  294. package/dist/chunks/input-field-phone-number.DQxF-6wT.js.map +0 -1
  295. package/dist/chunks/input-field.BDEEGU2t.js +0 -298
  296. package/dist/chunks/input-field.BDEEGU2t.js.map +0 -1
  297. package/dist/chunks/inspector.types.BQnVv5HX.js +0 -187
  298. package/dist/chunks/inspector.types.BQnVv5HX.js.map +0 -1
  299. package/dist/chunks/internal-error.BLZodVBE.js +0 -5
  300. package/dist/chunks/internal-error.BLZodVBE.js.map +0 -1
  301. package/dist/chunks/internal-error.BmrwJFpR.js +0 -5
  302. package/dist/chunks/internal-error.BmrwJFpR.js.map +0 -1
  303. package/dist/chunks/keyboard-navigation.CqgGzfZQ.js +0 -66
  304. package/dist/chunks/keyboard-navigation.CqgGzfZQ.js.map +0 -1
  305. package/dist/chunks/layout-row.CRRLYA03.js +0 -100
  306. package/dist/chunks/layout-row.CRRLYA03.js.map +0 -1
  307. package/dist/chunks/link.CTH1xj0i.js +0 -116
  308. package/dist/chunks/link.CTH1xj0i.js.map +0 -1
  309. package/dist/chunks/listbox-option-tag.CTipR05e.js +0 -55
  310. package/dist/chunks/listbox-option-tag.CTipR05e.js.map +0 -1
  311. package/dist/chunks/loading-indicator.DEepb9Wl.js +0 -44
  312. package/dist/chunks/loading-indicator.DEepb9Wl.js.map +0 -1
  313. package/dist/chunks/menu.HVsIOPzt.js +0 -768
  314. package/dist/chunks/menu.HVsIOPzt.js.map +0 -1
  315. package/dist/chunks/modal-fullscreen.CN1dCmU-.js +0 -270
  316. package/dist/chunks/modal-fullscreen.CN1dCmU-.js.map +0 -1
  317. package/dist/chunks/modal-fullscreen.keys.CMba3hYp.js +0 -5
  318. package/dist/chunks/modal-fullscreen.keys.CMba3hYp.js.map +0 -1
  319. package/dist/chunks/modal.vue_vue_type_script_setup_true_lang._xN4vNxW.js +0 -501
  320. package/dist/chunks/modal.vue_vue_type_script_setup_true_lang._xN4vNxW.js.map +0 -1
  321. package/dist/chunks/no-results-found.Bg_ZcEid.js +0 -5
  322. package/dist/chunks/no-results-found.Bg_ZcEid.js.map +0 -1
  323. package/dist/chunks/no-results-found.BqvYsBR6.js +0 -5
  324. package/dist/chunks/no-results-found.BqvYsBR6.js.map +0 -1
  325. package/dist/chunks/notifications-cleared.BMZk37uf.js +0 -5
  326. package/dist/chunks/notifications-cleared.BMZk37uf.js.map +0 -1
  327. package/dist/chunks/notifications-cleared.C7W9ZXY7.js +0 -5
  328. package/dist/chunks/notifications-cleared.C7W9ZXY7.js.map +0 -1
  329. package/dist/chunks/on-click-outside.D9aY9g8G.js +0 -101
  330. package/dist/chunks/on-click-outside.D9aY9g8G.js.map +0 -1
  331. package/dist/chunks/page-not-found.COJLPVaU.js +0 -5
  332. package/dist/chunks/page-not-found.COJLPVaU.js.map +0 -1
  333. package/dist/chunks/page-not-found.DWW6W-PZ.js +0 -5
  334. package/dist/chunks/page-not-found.DWW6W-PZ.js.map +0 -1
  335. package/dist/chunks/pagination.Cv-jL5MP.js +0 -461
  336. package/dist/chunks/pagination.Cv-jL5MP.js.map +0 -1
  337. package/dist/chunks/payment-method.eazefwm6.js +0 -125
  338. package/dist/chunks/payment-method.eazefwm6.js.map +0 -1
  339. package/dist/chunks/payment-method.types.BqtH7RM2.js +0 -5
  340. package/dist/chunks/payment-method.types.BqtH7RM2.js.map +0 -1
  341. package/dist/chunks/planned-maintenance.C61sWB9h.js +0 -5
  342. package/dist/chunks/planned-maintenance.C61sWB9h.js.map +0 -1
  343. package/dist/chunks/planned-maintenance.jmWYTdet.js +0 -5
  344. package/dist/chunks/planned-maintenance.jmWYTdet.js.map +0 -1
  345. package/dist/chunks/popover.sXC1vaC4.js +0 -350
  346. package/dist/chunks/popover.sXC1vaC4.js.map +0 -1
  347. package/dist/chunks/popper-container.CWgM0skS.js +0 -1396
  348. package/dist/chunks/popper-container.CWgM0skS.js.map +0 -1
  349. package/dist/chunks/popper-container.types.BCZMbVFD.js +0 -9
  350. package/dist/chunks/popper-container.types.BCZMbVFD.js.map +0 -1
  351. package/dist/chunks/promo-banner.CoB1tBCC.js +0 -126
  352. package/dist/chunks/promo-banner.CoB1tBCC.js.map +0 -1
  353. package/dist/chunks/radio-group.BzLVfoL0.js +0 -321
  354. package/dist/chunks/radio-group.BzLVfoL0.js.map +0 -1
  355. package/dist/chunks/radio-input.DKfQGxtp.js +0 -96
  356. package/dist/chunks/radio-input.DKfQGxtp.js.map +0 -1
  357. package/dist/chunks/referrals.BvtT-kQS.js +0 -5
  358. package/dist/chunks/referrals.BvtT-kQS.js.map +0 -1
  359. package/dist/chunks/referrals.aX8WZigH.js +0 -5
  360. package/dist/chunks/referrals.aX8WZigH.js.map +0 -1
  361. package/dist/chunks/refresh.C20ROVDS.js +0 -29
  362. package/dist/chunks/refresh.C20ROVDS.js.map +0 -1
  363. package/dist/chunks/resize.Bqks3WUm.js +0 -15
  364. package/dist/chunks/resize.Bqks3WUm.js.map +0 -1
  365. package/dist/chunks/rich-text-editor.C5RIGjDX.js +0 -6221
  366. package/dist/chunks/rich-text-editor.C5RIGjDX.js.map +0 -1
  367. package/dist/chunks/search-bar.C8bAeztI.js +0 -114
  368. package/dist/chunks/search-bar.C8bAeztI.js.map +0 -1
  369. package/dist/chunks/search.CW_aTqip.js +0 -44
  370. package/dist/chunks/search.CW_aTqip.js.map +0 -1
  371. package/dist/chunks/secondary-nav.BZF_9ztn.js +0 -137
  372. package/dist/chunks/secondary-nav.BZF_9ztn.js.map +0 -1
  373. package/dist/chunks/segmented-control.types.BHRLV8KU.js +0 -5
  374. package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +0 -1
  375. package/dist/chunks/segmented-control.u3a7Mssn.js +0 -144
  376. package/dist/chunks/segmented-control.u3a7Mssn.js.map +0 -1
  377. package/dist/chunks/selection-card-group.CSFQ-f8m.js +0 -474
  378. package/dist/chunks/selection-card-group.CSFQ-f8m.js.map +0 -1
  379. package/dist/chunks/show.ByWWaogc.js +0 -64
  380. package/dist/chunks/show.ByWWaogc.js.map +0 -1
  381. package/dist/chunks/sidepanel.keys.R0DKQuYx.js +0 -5
  382. package/dist/chunks/sidepanel.keys.R0DKQuYx.js.map +0 -1
  383. package/dist/chunks/sidepanel.kwEMG5ee.js +0 -254
  384. package/dist/chunks/sidepanel.kwEMG5ee.js.map +0 -1
  385. package/dist/chunks/status.types.Bdv2zuuh.js +0 -44
  386. package/dist/chunks/status.types.Bdv2zuuh.js.map +0 -1
  387. package/dist/chunks/step.7l-t-eN9.js +0 -264
  388. package/dist/chunks/step.7l-t-eN9.js.map +0 -1
  389. package/dist/chunks/structured-list-item.DLJp-ApS.js +0 -108
  390. package/dist/chunks/structured-list-item.DLJp-ApS.js.map +0 -1
  391. package/dist/chunks/success.DhioLvPD.js +0 -5
  392. package/dist/chunks/success.DhioLvPD.js.map +0 -1
  393. package/dist/chunks/success.nNwxJRBS.js +0 -5
  394. package/dist/chunks/success.nNwxJRBS.js.map +0 -1
  395. package/dist/chunks/summary-grid.keys.CxTf_FOc.js +0 -6
  396. package/dist/chunks/summary-grid.keys.CxTf_FOc.js.map +0 -1
  397. package/dist/chunks/summary-grid.types.DkyTeEAn.js +0 -466
  398. package/dist/chunks/summary-grid.types.DkyTeEAn.js.map +0 -1
  399. package/dist/chunks/tabs.Bn4YIjoy.js +0 -266
  400. package/dist/chunks/tabs.Bn4YIjoy.js.map +0 -1
  401. package/dist/chunks/tabs.keys.Bc2pSKRw.js +0 -7
  402. package/dist/chunks/tabs.keys.Bc2pSKRw.js.map +0 -1
  403. package/dist/chunks/tag.Me7nYLMe.js +0 -51
  404. package/dist/chunks/tag.Me7nYLMe.js.map +0 -1
  405. package/dist/chunks/teleport.CfGWjxe2.js +0 -129
  406. package/dist/chunks/teleport.CfGWjxe2.js.map +0 -1
  407. package/dist/chunks/textarea.BbSzCJ-3.js +0 -278
  408. package/dist/chunks/textarea.BbSzCJ-3.js.map +0 -1
  409. package/dist/chunks/timeline-item._h_dMFfm.js +0 -567
  410. package/dist/chunks/timeline-item._h_dMFfm.js.map +0 -1
  411. package/dist/chunks/toast.Ae5ZoWHb.js +0 -221
  412. package/dist/chunks/toast.Ae5ZoWHb.js.map +0 -1
  413. package/dist/chunks/toggle-button.Dv1t15yj.js +0 -80
  414. package/dist/chunks/toggle-button.Dv1t15yj.js.map +0 -1
  415. package/dist/chunks/toggle.hoD_i2Ey.js +0 -161
  416. package/dist/chunks/toggle.hoD_i2Ey.js.map +0 -1
  417. package/dist/chunks/tooltip.CGMSPub2.js +0 -205
  418. package/dist/chunks/tooltip.CGMSPub2.js.map +0 -1
  419. package/dist/chunks/truncate.BfIl_-71.js +0 -8
  420. package/dist/chunks/truncate.BfIl_-71.js.map +0 -1
  421. package/dist/chunks/tutorial.vue_vue_type_script_setup_true_lang.CysjLLSS.js +0 -423
  422. package/dist/chunks/tutorial.vue_vue_type_script_setup_true_lang.CysjLLSS.js.map +0 -1
  423. package/dist/chunks/typography.DN5eC5ch.js +0 -83
  424. package/dist/chunks/typography.DN5eC5ch.js.map +0 -1
  425. package/dist/chunks/upload-files.5wQwbfkp.js +0 -5
  426. package/dist/chunks/upload-files.5wQwbfkp.js.map +0 -1
  427. package/dist/chunks/upload-files.jTQY6y2X.js +0 -5
  428. package/dist/chunks/upload-files.jTQY6y2X.js.map +0 -1
  429. package/dist/chunks/use-bento-toast-controller.D3LA1FCd.js +0 -50
  430. package/dist/chunks/use-bento-toast-controller.D3LA1FCd.js.map +0 -1
  431. package/dist/chunks/use-cached-selected-values.Dk0UxwFJ.js +0 -1475
  432. package/dist/chunks/use-cached-selected-values.Dk0UxwFJ.js.map +0 -1
  433. package/dist/chunks/use-click-outside.BnhTgpSt.js +0 -14
  434. package/dist/chunks/use-click-outside.BnhTgpSt.js.map +0 -1
  435. package/dist/chunks/use-country-items.4kZgVg_l.js +0 -30
  436. package/dist/chunks/use-country-items.4kZgVg_l.js.map +0 -1
  437. package/dist/chunks/use-country-phon-code.DVgE19zT.js +0 -5610
  438. package/dist/chunks/use-country-phon-code.DVgE19zT.js.map +0 -1
  439. package/dist/chunks/use-default-slot-validator.O02rzsob.js +0 -16
  440. package/dist/chunks/use-default-slot-validator.O02rzsob.js.map +0 -1
  441. package/dist/chunks/use-expandable-content-height.GkjjbmPy.js +0 -17
  442. package/dist/chunks/use-expandable-content-height.GkjjbmPy.js.map +0 -1
  443. package/dist/chunks/use-form-layout-loading.D3lALhtC.js +0 -12
  444. package/dist/chunks/use-form-layout-loading.D3lALhtC.js.map +0 -1
  445. package/dist/chunks/use-has-slot.B7eQSabc.js +0 -15
  446. package/dist/chunks/use-has-slot.B7eQSabc.js.map +0 -1
  447. package/dist/chunks/warning-filled.DmHh0nYG.js +0 -29
  448. package/dist/chunks/warning-filled.DmHh0nYG.js.map +0 -1
  449. package/dist/chunks/wrong-environment.BOsyKdRI.js +0 -5
  450. package/dist/chunks/wrong-environment.BOsyKdRI.js.map +0 -1
  451. package/dist/chunks/wrong-environment.BiHTPtbJ.js +0 -5
  452. package/dist/chunks/wrong-environment.BiHTPtbJ.js.map +0 -1
  453. package/dist/click-outside.js +0 -5
  454. package/dist/click-outside.js.map +0 -1
  455. package/dist/code-snippet.js +0 -8
  456. package/dist/code-snippet.js.map +0 -1
  457. package/dist/country.js +0 -12
  458. package/dist/country.js.map +0 -1
  459. package/dist/currency.js +0 -6
  460. package/dist/currency.js.map +0 -1
  461. package/dist/dashboard-template.js +0 -6
  462. package/dist/dashboard-template.js.map +0 -1
  463. package/dist/dashed-underline.js +0 -5
  464. package/dist/dashed-underline.js.map +0 -1
  465. package/dist/data-grid-template.js +0 -5
  466. package/dist/data-grid-template.js.map +0 -1
  467. package/dist/data-grid.js +0 -11
  468. package/dist/data-grid.js.map +0 -1
  469. package/dist/date-picker.js +0 -8
  470. package/dist/date-picker.js.map +0 -1
  471. package/dist/date-range-picker.js +0 -8
  472. package/dist/date-range-picker.js.map +0 -1
  473. package/dist/date.js +0 -6
  474. package/dist/date.js.map +0 -1
  475. package/dist/divider.js +0 -5
  476. package/dist/divider.js.map +0 -1
  477. package/dist/dropdown.js +0 -16
  478. package/dist/dropdown.js.map +0 -1
  479. package/dist/empty-state.js +0 -8
  480. package/dist/empty-state.js.map +0 -1
  481. package/dist/file-uploader.js +0 -5
  482. package/dist/file-uploader.js.map +0 -1
  483. package/dist/filter-bar.js +0 -8
  484. package/dist/filter-bar.js.map +0 -1
  485. package/dist/focus-trap.js +0 -5
  486. package/dist/focus-trap.js.map +0 -1
  487. package/dist/fonts/fonts.css +0 -2
  488. package/dist/form-layout.js +0 -8
  489. package/dist/form-layout.js.map +0 -1
  490. package/dist/header-with-views.js +0 -5
  491. package/dist/header-with-views.js.map +0 -1
  492. package/dist/header.js +0 -5
  493. package/dist/header.js.map +0 -1
  494. package/dist/image.js +0 -7
  495. package/dist/image.js.map +0 -1
  496. package/dist/index.js +0 -370
  497. package/dist/index.js.map +0 -1
  498. package/dist/info-icon.js +0 -5
  499. package/dist/info-icon.js.map +0 -1
  500. package/dist/input-field-password.js +0 -10
  501. package/dist/input-field-password.js.map +0 -1
  502. package/dist/input-field-phone-number.js +0 -5
  503. package/dist/input-field-phone-number.js.map +0 -1
  504. package/dist/input-field.js +0 -10
  505. package/dist/input-field.js.map +0 -1
  506. package/dist/inspector.js +0 -6
  507. package/dist/inspector.js.map +0 -1
  508. package/dist/internal.js +0 -43
  509. package/dist/internal.js.map +0 -1
  510. package/dist/layout.js +0 -6
  511. package/dist/layout.js.map +0 -1
  512. package/dist/link.js +0 -6
  513. package/dist/link.js.map +0 -1
  514. package/dist/loading-indicator.js +0 -6
  515. package/dist/loading-indicator.js.map +0 -1
  516. package/dist/menu.js +0 -6
  517. package/dist/menu.js.map +0 -1
  518. package/dist/modal-fullscreen.js +0 -6
  519. package/dist/modal-fullscreen.js.map +0 -1
  520. package/dist/modal.js +0 -14
  521. package/dist/modal.js.map +0 -1
  522. package/dist/pagination.js +0 -5
  523. package/dist/pagination.js.map +0 -1
  524. package/dist/payment-method.js +0 -7
  525. package/dist/payment-method.js.map +0 -1
  526. package/dist/popover.js +0 -6
  527. package/dist/popover.js.map +0 -1
  528. package/dist/popper-container.js +0 -10
  529. package/dist/popper-container.js.map +0 -1
  530. package/dist/promo-banner.js +0 -7
  531. package/dist/promo-banner.js.map +0 -1
  532. package/dist/radio-group.js +0 -9
  533. package/dist/radio-group.js.map +0 -1
  534. package/dist/rich-text-editor.js +0 -5
  535. package/dist/rich-text-editor.js.map +0 -1
  536. package/dist/search-bar.js +0 -9
  537. package/dist/search-bar.js.map +0 -1
  538. package/dist/secondary-nav.js +0 -5
  539. package/dist/secondary-nav.js.map +0 -1
  540. package/dist/segmented-control.js +0 -7
  541. package/dist/segmented-control.js.map +0 -1
  542. package/dist/selection-card.js +0 -7
  543. package/dist/selection-card.js.map +0 -1
  544. package/dist/sidepanel.js +0 -7
  545. package/dist/sidepanel.js.map +0 -1
  546. package/dist/status.js +0 -6
  547. package/dist/status.js.map +0 -1
  548. package/dist/stepper.js +0 -8
  549. package/dist/stepper.js.map +0 -1
  550. package/dist/structured-list.js +0 -6
  551. package/dist/structured-list.js.map +0 -1
  552. package/dist/styles/bento-dark.css +0 -2055
  553. package/dist/styles/bento-light.css +0 -2054
  554. package/dist/styles/bento.css +0 -2054
  555. package/dist/styles/legacy.css +0 -2209
  556. package/dist/styles/styleguide.css +0 -2109
  557. package/dist/styles/utility.css +0 -987
  558. package/dist/summary-grid.js +0 -12
  559. package/dist/summary-grid.js.map +0 -1
  560. package/dist/tabs.js +0 -6
  561. package/dist/tabs.js.map +0 -1
  562. package/dist/tag.js +0 -6
  563. package/dist/tag.js.map +0 -1
  564. package/dist/textarea.js +0 -5
  565. package/dist/textarea.js.map +0 -1
  566. package/dist/timeline.js +0 -10
  567. package/dist/timeline.js.map +0 -1
  568. package/dist/toast.js +0 -5
  569. package/dist/toast.js.map +0 -1
  570. package/dist/toggle.js +0 -7
  571. package/dist/toggle.js.map +0 -1
  572. package/dist/tutorial.js +0 -5
  573. package/dist/tutorial.js.map +0 -1
  574. package/dist/typography.js +0 -8
  575. package/dist/typography.js.map +0 -1
  576. package/dist/use-form-v4.js +0 -8300
  577. package/dist/use-form-v4.js.map +0 -1
  578. package/dist/web-types.json +0 -49
@@ -1,147 +0,0 @@
1
- import { ref as n, onMounted as E, computed as v, defineComponent as F, createElementBlock as S, openBlock as b, createElementVNode as y, createCommentVNode as B, normalizeStyle as O, unref as e, renderSlot as I, createVNode as p, withCtx as R } from "vue";
2
- import { B as L } from "./button.CVZJTZv0.js";
3
- import { u as T } from "./i18n.B6g5VX0q.js";
4
- import { C as V, a as N } from "./chevron-left.BF63HtOH.js";
5
- import { o as C } from "./resize.Bqks3WUm.js";
6
- import { _ as A } from "./_plugin-vue_export-helper.CHgC5LLL.js";
7
- import "../assets/fixed-scroller.css";
8
- const M = 1, W = 40, P = ({
9
- contentRef: a,
10
- containerRef: c,
11
- leftButtonRef: u,
12
- rightButtonRef: d
13
- }) => {
14
- const o = n(0), t = n(0), i = n(0), r = n(0);
15
- E(() => {
16
- C(c.value, () => {
17
- c.value && (r.value = c.value.offsetWidth, t.value = 0, o.value = 0);
18
- }), C(a.value, () => {
19
- var l;
20
- i.value = (l = a.value) == null ? void 0 : l.scrollWidth;
21
- });
22
- });
23
- const h = v(() => {
24
- var s, m;
25
- const l = (s = u.value) != null && s.scrollWidth ? u.value.scrollWidth + W : 0, x = (m = d.value) != null && m.scrollWidth ? d.value.scrollWidth + W : 0;
26
- return l + x;
27
- }), f = v(() => Math.ceil(i.value / r.value) ?? 0), _ = v(() => {
28
- const l = new Array(f.value).fill(0);
29
- return l.forEach((x, s) => {
30
- if (s === 0)
31
- return;
32
- if (s === f.value - 1) {
33
- l[l.length - 1] = -(i.value - r.value + M);
34
- return;
35
- }
36
- const m = l[s - 1];
37
- l[s] = -(r.value + Math.abs(m) - h.value);
38
- }), l;
39
- }), g = v(() => t.value !== 0), k = v(
40
- () => o.value >= -(i.value - r.value - 1)
41
- );
42
- return {
43
- offset: o,
44
- shouldShowLeftButton: g,
45
- shouldShowRightButton: k,
46
- // Methods
47
- scrollLeft: () => {
48
- t.value !== 0 && (t.value -= 1, o.value = _.value[t.value]);
49
- },
50
- scrollRight: () => {
51
- t.value !== f.value - 1 && (t.value += 1, o.value = _.value[t.value]);
52
- }
53
- };
54
- }, w = {
55
- "en-US": {
56
- scrollLeft: "Scroll left",
57
- scrollRight: "Scroll right"
58
- }
59
- }, $ = { class: "b-fixed-scroller__container" }, z = {
60
- i18n: { messages: w }
61
- }, D = /* @__PURE__ */ F({
62
- ...z,
63
- __name: "fixed-scroller",
64
- props: {
65
- /**
66
- * Applies the condensed style to the buttons
67
- */
68
- condensed: { type: Boolean, default: !1 },
69
- /**
70
- * Padding to be applied to the top of the scroller container
71
- */
72
- extraPaddingTop: { type: Number, default: 0 }
73
- },
74
- setup(a) {
75
- const { t: c } = T({ messages: w }), u = n(null), d = n(null), o = n(null), t = n(null), { offset: i, shouldShowLeftButton: r, shouldShowRightButton: h, scrollLeft: f, scrollRight: _ } = P({
76
- contentRef: u,
77
- containerRef: d,
78
- leftButtonRef: o,
79
- rightButtonRef: t
80
- });
81
- return (g, k) => (b(), S("div", {
82
- ref_key: "fixedScrollerRef",
83
- ref: d,
84
- class: "b-fixed-scroller"
85
- }, [
86
- y("div", $, [
87
- y("div", {
88
- ref_key: "contentRef",
89
- ref: u,
90
- class: "b-fixed-scroller__content",
91
- style: O({
92
- transform: `translateX(${e(i)}px)`,
93
- paddingTop: e(r) || e(h) ? `${a.extraPaddingTop}px` : null
94
- })
95
- }, [
96
- I(g.$slots, "default", {}, void 0, !0)
97
- ], 4)
98
- ]),
99
- e(r) ? (b(), S("div", {
100
- key: 0,
101
- ref_key: "leftButtonRef",
102
- ref: o,
103
- class: "b-fixed-scroller__left"
104
- }, [
105
- p(e(L), {
106
- variant: "secondary",
107
- "aria-label": e(c)("scrollLeft"),
108
- condensed: a.condensed,
109
- onClick: e(f)
110
- }, {
111
- iconLeft: R(() => [
112
- p(e(V), {
113
- "svg-title": "checked",
114
- "aria-hidden": "true"
115
- })
116
- ]),
117
- _: 1
118
- }, 8, ["aria-label", "condensed", "onClick"])
119
- ], 512)) : B("", !0),
120
- e(h) ? (b(), S("div", {
121
- key: 1,
122
- ref_key: "rightButtonRef",
123
- ref: t,
124
- class: "b-fixed-scroller__right"
125
- }, [
126
- p(e(L), {
127
- variant: "secondary",
128
- "aria-label": e(c)("scrollRight"),
129
- condensed: a.condensed,
130
- onClick: e(_)
131
- }, {
132
- iconLeft: R(() => [
133
- p(e(N), {
134
- "svg-title": "checked",
135
- "aria-hidden": "true"
136
- })
137
- ]),
138
- _: 1
139
- }, 8, ["aria-label", "condensed", "onClick"])
140
- ], 512)) : B("", !0)
141
- ], 512));
142
- }
143
- }), Q = /* @__PURE__ */ A(D, [["__scopeId", "data-v-b24aa613"]]);
144
- export {
145
- Q as F
146
- };
147
- //# sourceMappingURL=fixed-scroller.BjxA_R63.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fixed-scroller.BjxA_R63.js","sources":["../../../vue2/src/components/internal/fixed-scroller/composables/useFixedScroller.ts","../../../vue2/src/components/internal/fixed-scroller/fixed-scroller.vue"],"sourcesContent":["import { observeSizeOfElement } from '@/utils/ts/resize';\nimport { computed, onMounted, ref } from 'vue';\nimport type { Ref, UnwrapRef } from 'vue';\n\n// Adding an offset of \"1\" so that the border can be shown within the boundaries\nconst OVERFLOW_CLIP_OFFSET = 1;\n// Add the gradient offset to the calculations\nconst GRADIENT_OFFSET = 40;\n\ninterface useFixedScrollerProps {\n contentRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n containerRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n leftButtonRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n rightButtonRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n}\n\n/**\n * Function to calculate the offset of each view and change the \"view\" via offsets\n * through the functions `scrollLeft` and `scrollRight` whilst providing a way to\n * show and hide the buttons based on the current \"view\" via\n * `shouldShowLeftButton` and `shouldShowRightButton`.\n *\n * Each view is pre-calculated (offsetArray) and updated if the content changes as a computed ref:\n * First view: Always 0 (x axis beginning).\n * Last view: total content space - visible width\n * Intermediate views: Previous offset (to the left) plus the visible space taking\n * away the space the buttons take so that the whole view can be rendered\n *\n *\n * @param props - All the necessary references to calculate the scroll\n * @param props.containerRef - Reference to the container, this defines the visible space width\n * @param props.contentRef - Reference to the content itself, this defines the total content width\n * @param props.leftButtonRef - Reference to the left button, used to calculate total space in which the content will be rendered\n * @param props.rightButtonRef - Reference to the right button, used to calculate total space in which the content will be rendered\n * @returns response - Values used in the view to show the buttons and to change the view right or left\n * @returns response.offset - Offset value by which the view will move on the x axis. To be used in `styles`.\n * @returns response.shouldShowLeftButton - Indicates if the button on the left should be shown\n * @returns response.shouldShowRightButton - Indicates if the button on the right should be shown\n * @returns response.scrollLeft - Used to shift the view to the left\n * @returns response.scrollRight - Used to shift the view to the right\n */\nexport const useFixedScroller = ({\n contentRef,\n containerRef,\n leftButtonRef,\n rightButtonRef,\n}: useFixedScrollerProps) => {\n const offset = ref(0);\n const currentView = ref(0);\n\n // Calculated using 'scrollWidth' to get the full width of the content\n const totalContentWidth = ref(0);\n // Calculated using 'clientWidth' to get the rendered componen width\n const visibleSpaceWidth = ref(0);\n\n onMounted(() => {\n observeSizeOfElement(containerRef.value, () => {\n if (containerRef.value) {\n // Set new width when resized\n visibleSpaceWidth.value = containerRef.value.offsetWidth;\n // Reset the offset and view\n currentView.value = 0;\n offset.value = 0;\n }\n });\n\n observeSizeOfElement(contentRef.value, () => {\n totalContentWidth.value = contentRef.value?.scrollWidth;\n });\n });\n\n // Sum of the space used by the Left and Right buttons\n // Used to calculate how much space the \"actual\" visible space is\n const buttonsWidth = computed(() => {\n const leftButtonWidth = leftButtonRef.value?.scrollWidth\n ? leftButtonRef.value.scrollWidth + GRADIENT_OFFSET\n : 0;\n const rightButtonWidth = rightButtonRef.value?.scrollWidth\n ? rightButtonRef.value.scrollWidth + GRADIENT_OFFSET\n : 0;\n\n return leftButtonWidth + rightButtonWidth;\n });\n // Total number of pages/views available.\n // Calculated as \"ceil\" because if the space doesn't fit \"one view\" (irrational number) the content flows to the next view (integer).\n const totalViews = computed(() => Math.ceil(totalContentWidth.value / visibleSpaceWidth.value) ?? 0);\n\n // Calculation of offsets per view (index).\n // This allows to easily swap the offset without on-the-fly calculations\n const offsetArray = computed(() => {\n const calculatedOffsetList = new Array(totalViews.value).fill(0);\n\n calculatedOffsetList.forEach((_, index) => {\n // First offset will be 0\n if (index === 0) {\n return;\n }\n\n // Calculate last\n if (index === totalViews.value - 1) {\n calculatedOffsetList[calculatedOffsetList.length - 1] = -(\n totalContentWidth.value -\n visibleSpaceWidth.value +\n OVERFLOW_CLIP_OFFSET\n );\n\n return;\n }\n\n // Calculate each offset - Move 1 view\n const previousOffset = calculatedOffsetList[index - 1];\n calculatedOffsetList[index] = -(visibleSpaceWidth.value + Math.abs(previousOffset) - buttonsWidth.value);\n });\n\n return calculatedOffsetList;\n });\n\n // Hide left button when it's the first view\n const shouldShowLeftButton = computed(() => currentView.value !== 0);\n // Hide right button if it's the last view\n const shouldShowRightButton = computed(\n () => offset.value >= -(totalContentWidth.value - visibleSpaceWidth.value - 1)\n );\n\n /**\n * Shifts the current offset by one view to the left.\n */\n const scrollLeft = () => {\n // Do nothing if it is already in page 0\n if (currentView.value === 0) {\n return;\n }\n\n currentView.value -= 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n /**\n * Shifts the current offset by one view to the right.\n */\n const scrollRight = () => {\n // Do nothing if it is already in last page\n if (currentView.value === totalViews.value - 1) {\n return;\n }\n\n currentView.value += 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n return {\n offset,\n shouldShowLeftButton,\n shouldShowRightButton,\n\n // Methods\n scrollLeft,\n scrollRight,\n };\n};\n","<template>\n <div ref=\"fixedScrollerRef\" class=\"b-fixed-scroller\">\n <div class=\"b-fixed-scroller__container\">\n <div\n ref=\"contentRef\"\n class=\"b-fixed-scroller__content\"\n :style=\"{\n transform: `translateX(${offset}px)`,\n paddingTop: shouldShowLeftButton || shouldShowRightButton ? `${extraPaddingTop}px` : null,\n }\"\n >\n <slot></slot>\n </div>\n </div>\n\n <div v-if=\"shouldShowLeftButton\" ref=\"leftButtonRef\" class=\"b-fixed-scroller__left\">\n <bento-button variant=\"secondary\" :aria-label=\"t('scrollLeft')\" :condensed=\"condensed\" @click=\"scrollLeft\">\n <template #iconLeft>\n <chevron-left-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n <div v-if=\"shouldShowRightButton\" ref=\"rightButtonRef\" class=\"b-fixed-scroller__right\">\n <bento-button\n variant=\"secondary\"\n :aria-label=\"t('scrollRight')\"\n :condensed=\"condensed\"\n @click=\"scrollRight\"\n >\n <template #iconLeft>\n <chevron-right-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { BentoButton } from '@/components/button';\n import { useFixedScroller } from './composables';\n import { useI18n } from '@/utils/ts/i18n';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const contentRef = ref(null);\n const fixedScrollerRef = ref(null);\n const leftButtonRef = ref(null);\n const rightButtonRef = ref(null);\n\n defineProps({\n /**\n * Applies the condensed style to the buttons\n */\n condensed: { type: Boolean, default: false },\n /**\n * Padding to be applied to the top of the scroller container\n */\n extraPaddingTop: { type: Number, default: 0 },\n });\n\n const { offset, shouldShowLeftButton, shouldShowRightButton, scrollLeft, scrollRight } = useFixedScroller({\n contentRef,\n containerRef: fixedScrollerRef,\n leftButtonRef,\n rightButtonRef,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Allows to horizontally scroll content by one view at a time.\n *\n * @example\n * import { FixedScroller } from '@/internal';\n *\n * export default {\n * components: { FixedScroller },\n * template: `\n * <fixed-scroller>\n * <div style=\"display: flex; gap: 8px;\">\n * {{ Content here }}\n * </div>\n * </fixed-scroller>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./fixed-scroller.scss\" />\n"],"names":["OVERFLOW_CLIP_OFFSET","GRADIENT_OFFSET","useFixedScroller","contentRef","containerRef","leftButtonRef","rightButtonRef","offset","ref","currentView","totalContentWidth","visibleSpaceWidth","onMounted","observeSizeOfElement","_a","buttonsWidth","computed","leftButtonWidth","rightButtonWidth","_b","totalViews","offsetArray","calculatedOffsetList","_","index","previousOffset","shouldShowLeftButton","shouldShowRightButton","__default__","messages","t","useI18n","fixedScrollerRef","scrollLeft","scrollRight"],"mappings":";;;;;;;AAKA,MAAAA,IAAA,GAEAC,IAAA,IAkCOC,IAAA,CAAA;AAAA,EAA0B,YAAAC;AAAA,EAC7B,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC;AAEJ,MAAA;AACI,QAAAC,IAAAC,EAAA,CAAA,GACAC,IAAAD,EAAA,CAAA,GAGAE,IAAAF,EAAA,CAAA,GAEAG,IAAAH,EAAA,CAAA;AAEA,EAAAI,EAAA,MAAA;AACI,IAAAC,EAAAT,EAAA,OAAA,MAAA;AACI,MAAAA,EAAA,UAEIO,EAAA,QAAAP,EAAA,MAAA,aAEAK,EAAA,QAAA,GACAF,EAAA,QAAA;AAAA,IACJ,CAAA,GAGJM,EAAAV,EAAA,OAAA,MAAA;;AACI,MAAAO,EAAA,SAAAI,IAAAX,EAAA,UAAA,gBAAAW,EAAA;AAAA,IAA4C,CAAA;AAAA,EAC/C,CAAA;AAKL,QAAAC,IAAAC,EAAA,MAAA;;AACI,UAAAC,KAAAH,IAAAT,EAAA,UAAA,QAAAS,EAAA,cAAAT,EAAA,MAAA,cAAAJ,IAAA,GAGAiB,KAAAC,IAAAb,EAAA,UAAA,QAAAa,EAAA,cAAAb,EAAA,MAAA,cAAAL,IAAA;AAIA,WAAAgB,IAAAC;AAAA,EAAyB,CAAA,GAI7BE,IAAAJ,EAAA,MAAA,KAAA,KAAAN,EAAA,QAAAC,EAAA,KAAA,KAAA,CAAA,GAIAU,IAAAL,EAAA,MAAA;AACI,UAAAM,IAAA,IAAA,MAAAF,EAAA,KAAA,EAAA,KAAA,CAAA;AAEA,WAAAE,EAAA,QAAA,CAAAC,GAAAC,MAAA;AAEI,UAAAA,MAAA;AACI;AAIJ,UAAAA,MAAAJ,EAAA,QAAA,GAAA;AACI,QAAAE,EAAAA,EAAA,SAAA,CAAA,IAAA,EAAAZ,EAAA,QAAAC,EAAA,QAAAX;AAMA;AAAA,MAAA;AAIJ,YAAAyB,IAAAH,EAAAE,IAAA,CAAA;AACA,MAAAF,EAAAE,CAAA,IAAA,EAAAb,EAAA,QAAA,KAAA,IAAAc,CAAA,IAAAV,EAAA;AAAA,IAAkG,CAAA,GAGtGO;AAAA,EAAO,CAAA,GAIXI,IAAAV,EAAA,MAAAP,EAAA,UAAA,CAAA,GAEAkB,IAAAX;AAAA,IAA8B,MAAAT,EAAA,SAAA,EAAAG,EAAA,QAAAC,EAAA,QAAA;AAAA,EACkD;AA6BhF,SAAA;AAAA,IAAO,QAAAJ;AAAA,IACH,sBAAAmB;AAAA,IACA,uBAAAC;AAAA;AAAA,IACA,YA1BJ,MAAA;AAEI,MAAAlB,EAAA,UAAA,MAIAA,EAAA,SAAA,GACAF,EAAA,QAAAc,EAAA,MAAAZ,EAAA,KAAA;AAAA,IAAkD;AAAA,IAsBlD,aAhBJ,MAAA;AAEI,MAAAA,EAAA,UAAAW,EAAA,QAAA,MAIAX,EAAA,SAAA,GACAF,EAAA,QAAAc,EAAA,MAAAZ,EAAA,KAAA;AAAA,IAAkD;AAAA,EAUlD;AAER;;;;;iDClEImB,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;AA9CA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GAEA1B,IAAAK,EAAA,IAAA,GACAwB,IAAAxB,EAAA,IAAA,GACAH,IAAAG,EAAA,IAAA,GACAF,IAAAE,EAAA,IAAA,GAaA,EAAA,QAAAD,GAAA,sBAAAmB,GAAA,uBAAAC,GAAA,YAAAM,GAAA,aAAAC,EAAA,IAAAhC,EAAA;AAAA,MAA0G,YAAAC;AAAA,MACtG,cAAA6B;AAAA,MACc,eAAA3B;AAAA,MACd,gBAAAC;AAAA,IACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,500 +0,0 @@
1
- import { ref as W, onUnmounted as ne, isRef as oe, defineComponent as ae, createElementBlock as ie, createCommentVNode as ue, openBlock as se, mergeProps as ce, toHandlers as fe, withKeys as de, renderSlot as le } from "vue";
2
- import { u as ve } from "./use-has-slot.B7eQSabc.js";
3
- import { g as me } from "./index.CVpo3mlK.js";
4
- import { _ as be } from "./_plugin-vue_export-helper.CHgC5LLL.js";
5
- import "../assets/focus-trap.css";
6
- var U = "data-focus-lock", pe = "data-focus-lock-disabled", he = "data-no-focus-lock", ge = "data-autofocus-inside", Oe = "data-no-autofocus", b = function(e) {
7
- for (var t = Array(e.length), r = 0; r < e.length; ++r)
8
- t[r] = e[r];
9
- return t;
10
- }, x = function(e) {
11
- return Array.isArray(e) ? e : [e];
12
- }, Ee = function(e) {
13
- if (e.nodeType !== Node.ELEMENT_NODE)
14
- return !1;
15
- var t = window.getComputedStyle(e, null);
16
- return !t || !t.getPropertyValue ? !1 : t.getPropertyValue("display") === "none" || t.getPropertyValue("visibility") === "hidden";
17
- }, V = function(e) {
18
- return e.parentNode && e.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? (
19
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
- e.parentNode.host
21
- ) : e.parentNode;
22
- }, G = function(e) {
23
- return e === document || e && e.nodeType === Node.DOCUMENT_NODE;
24
- }, Ae = function(e, t) {
25
- return !e || G(e) || !Ee(e) && t(V(e));
26
- }, K = function(e, t) {
27
- var r = e.get(t);
28
- if (r !== void 0)
29
- return r;
30
- var n = Ae(t, K.bind(void 0, e));
31
- return e.set(t, n), n;
32
- }, Ne = function(e, t) {
33
- return e && !G(e) ? Ie(e) ? t(V(e)) : !1 : !0;
34
- }, $ = function(e, t) {
35
- var r = e.get(t);
36
- if (r !== void 0)
37
- return r;
38
- var n = Ne(t, $.bind(void 0, e));
39
- return e.set(t, n), n;
40
- }, q = function(e) {
41
- return e.dataset;
42
- }, we = function(e) {
43
- return e.tagName === "BUTTON";
44
- }, j = function(e) {
45
- return e.tagName === "INPUT";
46
- }, z = function(e) {
47
- return j(e) && e.type === "radio";
48
- }, ye = function(e) {
49
- return !((j(e) || we(e)) && (e.type === "hidden" || e.disabled));
50
- }, Ie = function(e) {
51
- var t = e.getAttribute(Oe);
52
- return ![!0, "true", ""].includes(t);
53
- }, S = function(e) {
54
- var t;
55
- return !!(e && (!((t = q(e)) === null || t === void 0) && t.focusGuard));
56
- }, g = function(e) {
57
- return !S(e);
58
- }, xe = function(e) {
59
- return !!e;
60
- }, Fe = function(e, t) {
61
- var r = e.tabIndex - t.tabIndex, n = e.index - t.index;
62
- if (r) {
63
- if (!e.tabIndex)
64
- return 1;
65
- if (!t.tabIndex)
66
- return -1;
67
- }
68
- return r || n;
69
- }, Z = function(e, t, r) {
70
- return b(e).map(function(n, o) {
71
- return {
72
- node: n,
73
- index: o,
74
- tabIndex: r && n.tabIndex === -1 ? (n.dataset || {}).focusGuard ? 0 : -1 : n.tabIndex
75
- };
76
- }).filter(function(n) {
77
- return !t || n.tabIndex >= 0;
78
- }).sort(Fe);
79
- }, Te = [
80
- "button:enabled",
81
- "select:enabled",
82
- "textarea:enabled",
83
- "input:enabled",
84
- // elements with explicit roles will also use explicit tabindex
85
- // '[role="button"]',
86
- "a[href]",
87
- "area[href]",
88
- "summary",
89
- "iframe",
90
- "object",
91
- "embed",
92
- "audio[controls]",
93
- "video[controls]",
94
- "[tabindex]",
95
- "[contenteditable]",
96
- "[autofocus]"
97
- ], C = Te.join(","), Se = "".concat(C, ", [data-focus-guard]"), Y = function(e, t) {
98
- var r;
99
- return b(((r = e.shadowRoot) === null || r === void 0 ? void 0 : r.children) || e.children).reduce(function(n, o) {
100
- return n.concat(o.matches(t ? Se : C) ? [o] : [], Y(o));
101
- }, []);
102
- }, P = function(e, t) {
103
- return e.reduce(function(r, n) {
104
- return r.concat(
105
- // add all tabbables inside and within shadow DOMs in DOM order
106
- Y(n, t),
107
- // add if node is tabbable itself
108
- n.parentNode ? b(n.parentNode.querySelectorAll(C)).filter(function(o) {
109
- return o === n;
110
- }) : []
111
- );
112
- }, []);
113
- }, Ce = function(e) {
114
- var t = e.querySelectorAll("[".concat(ge, "]"));
115
- return b(t).map(function(r) {
116
- return P([r]);
117
- }).reduce(function(r, n) {
118
- return r.concat(n);
119
- }, []);
120
- }, D = function(e, t) {
121
- return b(e).filter(function(r) {
122
- return K(t, r);
123
- }).filter(function(r) {
124
- return ye(r);
125
- });
126
- }, R = function(e, t) {
127
- return t === void 0 && (t = /* @__PURE__ */ new Map()), b(e).filter(function(r) {
128
- return $(t, r);
129
- });
130
- }, F = function(e, t, r) {
131
- return Z(D(P(e, r), t), !0, r);
132
- }, k = function(e, t) {
133
- return Z(D(P(e), t), !1);
134
- }, Pe = function(e, t) {
135
- return D(Ce(e), t);
136
- }, p = function(e, t) {
137
- return (e.shadowRoot ? p(e.shadowRoot, t) : e.contains(t)) || Array.from(e.children).some(function(r) {
138
- return p(r, t);
139
- });
140
- }, De = function(e) {
141
- for (var t = /* @__PURE__ */ new Set(), r = e.length, n = 0; n < r; n += 1)
142
- for (var o = n + 1; o < r; o += 1) {
143
- var i = e[n].compareDocumentPosition(e[o]);
144
- (i & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0 && t.add(o), (i & Node.DOCUMENT_POSITION_CONTAINS) > 0 && t.add(n);
145
- }
146
- return e.filter(function(a, u) {
147
- return !t.has(u);
148
- });
149
- }, J = function(e) {
150
- return e.parentNode ? J(e.parentNode) : e;
151
- }, L = function(e) {
152
- var t = x(e);
153
- return t.filter(Boolean).reduce(function(r, n) {
154
- var o = n.getAttribute(U);
155
- return r.push.apply(r, o ? De(b(J(n).querySelectorAll("[".concat(U, '="').concat(o, '"]:not([').concat(pe, '="disabled"])')))) : [n]), r;
156
- }, []);
157
- }, Q = function(e) {
158
- return e.activeElement ? e.activeElement.shadowRoot ? Q(e.activeElement.shadowRoot) : e.activeElement : void 0;
159
- }, _ = function() {
160
- return document.activeElement ? document.activeElement.shadowRoot ? Q(document.activeElement.shadowRoot) : document.activeElement : void 0;
161
- }, Le = function(e) {
162
- return e === document.activeElement;
163
- }, _e = function(e) {
164
- return !!b(e.querySelectorAll("iframe")).some(function(t) {
165
- return Le(t);
166
- });
167
- }, Be = function(e) {
168
- var t = document && _();
169
- return !t || t.dataset && t.dataset.focusGuard ? !1 : L(e).some(function(r) {
170
- return p(r, t) || _e(r);
171
- });
172
- }, Ue = function() {
173
- var e = document && _();
174
- return e ? b(document.querySelectorAll("[".concat(he, "]"))).some(function(t) {
175
- return p(t, e);
176
- }) : !1;
177
- }, Re = function(e, t) {
178
- return t.filter(z).filter(function(r) {
179
- return r.name === e.name;
180
- }).filter(function(r) {
181
- return r.checked;
182
- })[0] || e;
183
- }, B = function(e, t) {
184
- return z(e) && e.name ? Re(e, t) : e;
185
- }, ke = function(e) {
186
- var t = /* @__PURE__ */ new Set();
187
- return e.forEach(function(r) {
188
- return t.add(B(r, e));
189
- }), e.filter(function(r) {
190
- return t.has(r);
191
- });
192
- }, M = function(e) {
193
- return e[0] && e.length > 1 ? B(e[0], e) : e[0];
194
- }, H = function(e, t) {
195
- return e.length > 1 ? e.indexOf(B(e[t], e)) : t;
196
- }, X = "NEW_FOCUS", Me = function(e, t, r, n) {
197
- var o = e.length, i = e[0], a = e[o - 1], u = S(r);
198
- if (!(r && e.indexOf(r) >= 0)) {
199
- var s = r !== void 0 ? t.indexOf(r) : -1, f = n ? t.indexOf(n) : s, d = n ? e.indexOf(n) : -1, c = s - f, m = t.indexOf(i), l = t.indexOf(a), v = ke(t), O = r !== void 0 ? v.indexOf(r) : -1, E = O - (n ? v.indexOf(n) : s), A = H(e, 0), N = H(e, o - 1);
200
- if (s === -1 || d === -1)
201
- return X;
202
- if (!c && d >= 0)
203
- return d;
204
- if (s <= m && u && Math.abs(c) > 1)
205
- return N;
206
- if (s >= l && u && Math.abs(c) > 1)
207
- return A;
208
- if (c && Math.abs(E) > 1)
209
- return d;
210
- if (s <= m)
211
- return N;
212
- if (s > l)
213
- return A;
214
- if (c)
215
- return Math.abs(c) > 1 ? d : (o + d + c) % o;
216
- }
217
- }, T = function(e, t) {
218
- return t === void 0 && (t = []), t.push(e), e.parentNode && T(e.parentNode.host || e.parentNode, t), t;
219
- }, w = function(e, t) {
220
- for (var r = T(e), n = T(t), o = 0; o < r.length; o += 1) {
221
- var i = r[o];
222
- if (n.indexOf(i) >= 0)
223
- return i;
224
- }
225
- return !1;
226
- }, ee = function(e, t, r) {
227
- var n = x(e), o = x(t), i = n[0], a = !1;
228
- return o.filter(Boolean).forEach(function(u) {
229
- a = w(a || u, u) || a, r.filter(Boolean).forEach(function(s) {
230
- var f = w(i, s);
231
- f && (!a || p(f, a) ? a = f : a = w(f, a));
232
- });
233
- }), a;
234
- }, He = function(e, t) {
235
- return e.reduce(function(r, n) {
236
- return r.concat(Pe(n, t));
237
- }, []);
238
- }, We = function(e) {
239
- return function(t) {
240
- var r;
241
- return t.autofocus || !!(!((r = q(t)) === null || r === void 0) && r.autofocus) || e.indexOf(t) >= 0;
242
- };
243
- }, Ve = function(e, t) {
244
- var r = /* @__PURE__ */ new Map();
245
- return t.forEach(function(n) {
246
- return r.set(n.node, n);
247
- }), e.map(function(n) {
248
- return r.get(n);
249
- }).filter(xe);
250
- }, Ge = function(e, t) {
251
- var r = document && _(), n = L(e).filter(g), o = ee(r || e, e, n), i = /* @__PURE__ */ new Map(), a = k(n, i), u = F(n, i).filter(function(l) {
252
- var v = l.node;
253
- return g(v);
254
- });
255
- if (!(!u[0] && (u = a, !u[0]))) {
256
- var s = k([o], i).map(function(l) {
257
- var v = l.node;
258
- return v;
259
- }), f = Ve(s, u), d = f.map(function(l) {
260
- var v = l.node;
261
- return v;
262
- }), c = Me(d, s, r, t);
263
- if (c === X) {
264
- var m = R(a.map(function(l) {
265
- var v = l.node;
266
- return v;
267
- })).filter(We(He(n, i)));
268
- return {
269
- node: m && m.length ? M(m) : M(R(d))
270
- };
271
- }
272
- return c === void 0 ? c : f[c];
273
- }
274
- }, Ke = function(e) {
275
- var t = L(e).filter(g), r = ee(e, e, t), n = /* @__PURE__ */ new Map(), o = F([r], n, !0), i = F(t, n).filter(function(a) {
276
- var u = a.node;
277
- return g(u);
278
- }).map(function(a) {
279
- var u = a.node;
280
- return u;
281
- });
282
- return o.map(function(a) {
283
- var u = a.node, s = a.index;
284
- return {
285
- node: u,
286
- index: s,
287
- lockItem: i.indexOf(u) >= 0,
288
- guard: S(u)
289
- };
290
- });
291
- }, $e = Ke, qe = function(e, t) {
292
- "focus" in e && e.focus(t), "contentWindow" in e && e.contentWindow && e.contentWindow.focus();
293
- }, y = 0, I = !1, je = function(e, t, r) {
294
- r === void 0 && (r = {});
295
- var n = Ge(e, t);
296
- if (!I && n) {
297
- if (y > 2) {
298
- console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"), I = !0, setTimeout(function() {
299
- I = !1;
300
- }, 1);
301
- return;
302
- }
303
- y++, qe(n.node, r.focusOptions), y--;
304
- }
305
- }, h = /* @__PURE__ */ ((e) => (e.VERTICAL = "vertical", e.HORIZONTAL = "horizontal", e))(h || {}), te = /* @__PURE__ */ ((e) => (e.ARROW_UP = "arrowup", e.ARROW_DOWN = "arrowdown", e))(te || {}), re = /* @__PURE__ */ ((e) => (e.ARROW_LEFT = "arrowleft", e.ARROW_RIGHT = "arrowright", e))(re || {});
306
- const ze = (e) => requestAnimationFrame(e), Ze = (e, t) => {
307
- const r = t.findIndex((n) => n.node === e);
308
- return r === -1 ? 0 : r;
309
- }, Ye = (e, t) => {
310
- var i;
311
- const r = document.activeElement, n = $e(t), o = Ze(r, n) + e;
312
- return ((i = n[o]) == null ? void 0 : i.node) || r;
313
- }, Je = (e, t) => {
314
- const r = e.key.toLowerCase();
315
- return {
316
- isArrowNext: r === t[0],
317
- isArrowPrev: r === t[1]
318
- };
319
- }, Qe = {
320
- behavior: "smooth",
321
- block: "center",
322
- inline: "center"
323
- }, Xe = (e) => {
324
- const t = W(null), { stop: r } = me(
325
- e,
326
- (o) => {
327
- let i = !1;
328
- for (const a of o)
329
- if (a.type === "childList" && a.addedNodes.length) {
330
- const u = Array.from(a.addedNodes).find((s) => s instanceof HTMLElement ? s.getAttribute("aria-expanded") === "true" : !1);
331
- u && (t.value = u, i = !0);
332
- break;
333
- } else if (a.type === "attributes" && a.oldValue === "false") {
334
- t.value = o[0].target, i = !0;
335
- break;
336
- }
337
- i !== !0 && setTimeout(() => t.value = null);
338
- },
339
- {
340
- attributeFilter: ["aria-expanded"],
341
- attributeOldValue: !0,
342
- childList: !0,
343
- // check for added/removed nodes i.e. teleport
344
- subtree: !0
345
- // check all descendents
346
- }
347
- ), n = (o) => {
348
- const i = ["listbox", "tooltip", "menu"], a = ["combobox"], u = [
349
- // input with autocomplete should only close the autocomplete dropdown when ESCAPE is pressed
350
- // some autocomplete picks up "name=username" without the autocomplete attribute
351
- "INPUT"
352
- ];
353
- for (const s of o.composedPath()) {
354
- if (!(s instanceof HTMLElement))
355
- return;
356
- const f = s, d = f.tagName, c = f.getAttribute("role"), m = d === "DIALOG", l = i.includes(c), v = a.includes(c), O = u.includes(d), E = oe(e) ? e.value === f : e === f;
357
- if (m || E)
358
- return;
359
- if (v && t.value || (l || O) || !m && c === "dialog") {
360
- o.stopPropagation(), o.preventDefault();
361
- return;
362
- }
363
- }
364
- };
365
- return ne(() => {
366
- r();
367
- }), { handleKeydownEscape: n };
368
- }, et = ae({
369
- name: "bento-focus-trap",
370
- props: {
371
- /**
372
- * Enables / Disables arrow navigation as well can determine the type of arrow navigation.
373
- * The types of arrow navigation are horizontal and vertical.
374
- */
375
- arrowNavigation: {
376
- type: String,
377
- default: void 0,
378
- validator: (e) => Object.values(h).includes(
379
- e
380
- )
381
- },
382
- /**
383
- * Enables / disables the focus trap.
384
- */
385
- disabled: {
386
- type: Boolean,
387
- default: !1
388
- }
389
- },
390
- setup() {
391
- const e = W(null), { handleKeydownEscape: t } = Xe(e);
392
- return { root: e, handleKeydownEscape: t };
393
- },
394
- data: () => ({
395
- lastFocusedElement: null
396
- }),
397
- computed: {
398
- isHorizontalArrowNavigation() {
399
- return this.arrowNavigation === h.HORIZONTAL;
400
- },
401
- isVerticalArrowNavigation() {
402
- return this.arrowNavigation === h.VERTICAL;
403
- },
404
- arrowOrder() {
405
- return this.isVerticalArrowNavigation ? Object.values(te) : Object.values(re);
406
- }
407
- },
408
- watch: {
409
- /**
410
- * If the disabled prop changes, then enable / disable the focus trap.
411
- */
412
- disabled() {
413
- this.disabled ? this.disable() : this.setFocusInside();
414
- }
415
- },
416
- mounted() {
417
- this.disabled || this.setFocusInside();
418
- },
419
- beforeUnmount() {
420
- this.disabled || this.disable();
421
- },
422
- methods: {
423
- /**
424
- * Set focus back inside the element area, giving the last focus element
425
- * `focus-lock` can determine the next interable element to focus on.
426
- */
427
- async setFocusInside() {
428
- (document.activeElement === document.body || Ue() || !this.lastFocusedElement) && (Be(this.$refs.root) || je(this.$refs.root, this.lastFocusedElement, {
429
- focusOptions: { preventScroll: !0 }
430
- }), this.lastFocusedElement = document.activeElement);
431
- },
432
- /**
433
- * On blur, trap the focus inside!
434
- */
435
- onBlur() {
436
- this.disabled || ze(this.setFocusInside);
437
- },
438
- /**
439
- * If the no arrow navigation is enabled
440
- * or if the currently focus element is a textarea or an input then prevent navigation.
441
- */
442
- shouldPreventNavigation() {
443
- if (!this.isVerticalArrowNavigation && !this.isHorizontalArrowNavigation)
444
- return !1;
445
- const e = document.activeElement.tagName.toLowerCase();
446
- return (this.isVerticalArrowNavigation ? ["textarea", "select"] : ["input", "textarea"]).includes(e);
447
- },
448
- /**
449
- * When an arrow key is pressed then navigate to the next focusable element.
450
- * If trap is disabled or is content editable then prevent arrow navigation.
451
- *
452
- * @param event on keyboard press event
453
- */
454
- onKeyDown(e) {
455
- if (this.disabled || document.activeElement.isContentEditable || this.shouldPreventNavigation())
456
- return;
457
- const { isArrowNext: t, isArrowPrev: r } = Je(e, this.arrowOrder);
458
- if (r || t) {
459
- e.preventDefault(), e.stopPropagation();
460
- const n = Ye(r ? 1 : -1, this.$el);
461
- if (n.focus(), "scrollIntoView" in n) {
462
- const o = "scrollBehavior" in document.documentElement.style ? Qe : !1;
463
- n.scrollIntoView(o);
464
- }
465
- }
466
- },
467
- /**
468
- * If focus trap is disabled then return focus to last focus element, parent node or simply the document body.
469
- */
470
- disable() {
471
- const e = this.lastFocusedElement || this.$el.parentNode || document.body;
472
- e && e.focus();
473
- },
474
- useHasSlot: ve
475
- }
476
- });
477
- function tt(e, t, r, n, o, i) {
478
- return e.useHasSlot(e.$slots)("default") ? (se(), ie("div", ce({
479
- key: 0,
480
- ref: "root",
481
- class: "b-focus-trap",
482
- "data-testid": "focus-trap",
483
- tabindex: "-1"
484
- }, fe(e.arrowNavigation ? { keydown: e.onKeyDown } : {}, !0), {
485
- onFocusout: t[0] || (t[0] = (...a) => e.onBlur && e.onBlur(...a)),
486
- onKeydown: t[1] || (t[1] = de((...a) => e.handleKeydownEscape && e.handleKeydownEscape(...a), ["esc"]))
487
- }), [
488
- le(e.$slots, "default", {}, void 0, !0)
489
- ], 16)) : ue("", !0);
490
- }
491
- const ut = /* @__PURE__ */ be(et, [["render", tt], ["__scopeId", "data-v-0f934e0d"]]);
492
- export {
493
- ut as B,
494
- _ as a,
495
- $e as b,
496
- Be as f,
497
- Ye as g,
498
- je as s
499
- };
500
- //# sourceMappingURL=focus-trap.BdrEB4Ld.js.map