@adyen/bento-vue3 1.6.1 → 1.7.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 (286) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/packages/core/src/components/button/button.types.d.ts +3 -1
  3. package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +45 -0
  4. package/dist/@types/packages/vue2/src/components/action-bar/index.d.ts +1 -0
  5. package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +4 -4
  6. package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +1 -1
  7. package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +229 -220
  8. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +9 -0
  9. package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +3 -3
  10. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +1 -1
  11. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +5 -5
  12. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
  13. package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +4 -3
  14. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +44 -46
  15. package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +1 -1
  16. package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +8 -2
  17. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +6 -0
  18. package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +8 -2
  19. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +1 -1
  20. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +1 -1
  21. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +46 -28
  22. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +1 -1
  23. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.types.d.ts +2 -0
  24. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +22 -4
  25. package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +5 -2
  26. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +802 -52
  27. package/dist/@types/packages/vue2/src/components/filter-bar/components/boolean-filter/boolean-filter.vue.d.ts +12 -5
  28. package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +1 -1
  29. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +12 -2
  30. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +10 -0
  31. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue.d.ts +3 -3
  32. package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +1 -1
  33. package/dist/@types/packages/vue2/src/components/info-icon/info-icon.vue.d.ts +3 -3
  34. package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +2 -2
  35. package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +21 -0
  36. package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +6 -0
  37. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/calendar-month.vue.d.ts +19 -0
  38. package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
  39. package/dist/@types/packages/vue2/src/components/internal/fixed-scroller/fixed-scroller.vue.d.ts +22 -1
  40. package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +64 -7
  41. package/dist/@types/packages/vue2/src/components/internal/teleport/index.d.ts +1 -0
  42. package/dist/@types/packages/vue2/src/components/internal/teleport/teleport.vue.d.ts +50 -0
  43. package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +1 -1
  44. package/dist/@types/packages/vue2/src/components/menu/menu.keys.d.ts +1 -0
  45. package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +15 -11
  46. package/dist/@types/packages/vue2/src/components/pagination/components/pagination-context/pagination-context.vue.d.ts +9 -0
  47. package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +10 -1
  48. package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +1 -0
  49. package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +4 -4
  50. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +5 -5
  51. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +10 -5
  52. package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +21 -0
  53. package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +21 -5
  54. package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +3 -3
  55. package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +1 -1
  56. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +1 -2
  57. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
  58. package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.keys.d.ts +1 -0
  59. package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +3 -0
  60. package/dist/@types/packages/vue2/src/components/tabs/components/tab.types.d.ts +1 -0
  61. package/dist/@types/packages/vue2/src/components/tabs/components/tab.vue.d.ts +9 -0
  62. package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +1 -0
  63. package/dist/@types/packages/vue2/src/components/tabs/tabs.vue.d.ts +2 -0
  64. package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +5 -5
  65. package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +7 -4
  66. package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +9 -2
  67. package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +15 -15
  68. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/index.d.ts +1 -0
  69. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue.d.ts +12 -0
  70. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/index.d.ts +1 -0
  71. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue.d.ts +173 -0
  72. package/dist/@types/packages/vue2/src/components/tutorial/index.d.ts +2 -0
  73. package/dist/@types/packages/vue2/src/components/tutorial/tutorial.types.d.ts +13 -0
  74. package/dist/@types/packages/vue2/src/components/tutorial/tutorial.vue.d.ts +16 -0
  75. package/dist/@types/packages/vue2/src/composables/index.d.ts +5 -2
  76. package/dist/@types/packages/vue2/src/composables/use-click-outside/use-click-outside.d.ts +3 -0
  77. package/dist/@types/packages/vue2/src/composables/use-form-validate/index.d.ts +2 -0
  78. package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.d.ts +12 -0
  79. package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.types.d.ts +5 -0
  80. package/dist/@types/packages/vue2/src/composables/use-virtual-list/index.d.ts +2 -0
  81. package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.d.ts +15 -0
  82. package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.types.d.ts +20 -0
  83. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  84. package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +4 -4
  85. package/dist/@types/packages/vue2/src/types/listbox.d.ts +12 -0
  86. package/dist/accordion.js +52 -43
  87. package/dist/accordion.js.map +1 -1
  88. package/dist/action-bar.js +210 -0
  89. package/dist/action-bar.js.map +1 -0
  90. package/dist/alert.js +3 -3
  91. package/dist/assets/base-modal.css +1 -1
  92. package/dist/assets/button-actions-with-menu.css +1 -0
  93. package/dist/assets/button.css +1 -1
  94. package/dist/assets/calendar.css +1 -1
  95. package/dist/assets/checkbox.css +1 -1
  96. package/dist/assets/checkmark.css +1 -0
  97. package/dist/assets/chevron-left.css +1 -0
  98. package/dist/assets/dropdown-default-textbox.css +1 -1
  99. package/dist/assets/dropdown.css +1 -1
  100. package/dist/assets/fixed-scroller.css +1 -0
  101. package/dist/assets/index.css +1 -1
  102. package/dist/assets/index10.css +1 -1
  103. package/dist/assets/index11.css +1 -1
  104. package/dist/assets/index12.css +1 -1
  105. package/dist/assets/index13.css +1 -1
  106. package/dist/assets/index14.css +1 -1
  107. package/dist/assets/index15.css +1 -1
  108. package/dist/assets/index16.css +1 -1
  109. package/dist/assets/index17.css +1 -1
  110. package/dist/assets/index18.css +1 -1
  111. package/dist/assets/index19.css +1 -1
  112. package/dist/assets/index2.css +1 -1
  113. package/dist/assets/index20.css +1 -1
  114. package/dist/assets/index21.css +1 -1
  115. package/dist/assets/index22.css +1 -1
  116. package/dist/assets/index23.css +1 -1
  117. package/dist/assets/index24.css +1 -1
  118. package/dist/assets/index25.css +1 -1
  119. package/dist/assets/index26.css +1 -1
  120. package/dist/assets/index27.css +1 -1
  121. package/dist/assets/index28.css +1 -1
  122. package/dist/assets/index29.css +1 -1
  123. package/dist/assets/index3.css +1 -1
  124. package/dist/assets/index30.css +1 -1
  125. package/dist/assets/index31.css +1 -1
  126. package/dist/assets/index32.css +1 -1
  127. package/dist/assets/index33.css +1 -1
  128. package/dist/assets/index34.css +1 -1
  129. package/dist/assets/index35.css +1 -1
  130. package/dist/assets/index36.css +1 -1
  131. package/dist/assets/index37.css +1 -1
  132. package/dist/assets/index38.css +1 -1
  133. package/dist/assets/index39.css +1 -1
  134. package/dist/assets/index40.css +1 -1
  135. package/dist/assets/index41.css +1 -1
  136. package/dist/assets/index42.css +1 -1
  137. package/dist/assets/index43.css +1 -1
  138. package/dist/assets/index44.css +1 -1
  139. package/dist/assets/index45.css +1 -1
  140. package/dist/assets/index46.css +1 -0
  141. package/dist/assets/index5.css +1 -1
  142. package/dist/assets/index6.css +1 -1
  143. package/dist/assets/index7.css +1 -1
  144. package/dist/assets/index8.css +1 -1
  145. package/dist/assets/index9.css +1 -1
  146. package/dist/assets/listbox.css +1 -1
  147. package/dist/assets/refresh.css +1 -0
  148. package/dist/avatar-image.js +1 -1
  149. package/dist/badge.js +1 -1
  150. package/dist/button.js +30 -22
  151. package/dist/button.js.map +1 -1
  152. package/dist/card.js +84 -84
  153. package/dist/card.js.map +1 -1
  154. package/dist/checkbox.js +6 -6
  155. package/dist/chunks/{base-button.4b5ab17e.js → base-button.7897a95e.js} +2 -2
  156. package/dist/chunks/{base-button.4b5ab17e.js.map → base-button.7897a95e.js.map} +1 -1
  157. package/dist/chunks/{base-modal.53a229ac.js → base-modal.0c85e7cb.js} +4 -4
  158. package/dist/chunks/{base-modal.53a229ac.js.map → base-modal.0c85e7cb.js.map} +1 -1
  159. package/dist/chunks/button-actions-with-menu.fa35390c.js +107 -0
  160. package/dist/chunks/button-actions-with-menu.fa35390c.js.map +1 -0
  161. package/dist/chunks/{button.975d0bb8.js → button.e5177388.js} +44 -36
  162. package/dist/chunks/button.e5177388.js.map +1 -0
  163. package/dist/chunks/{calendar.cc37ac1f.js → calendar.c83d4e99.js} +274 -250
  164. package/dist/chunks/calendar.c83d4e99.js.map +1 -0
  165. package/dist/chunks/{checkbox.67ceb148.js → checkbox.3cdbdd52.js} +7 -7
  166. package/dist/chunks/{checkbox.67ceb148.js.map → checkbox.3cdbdd52.js.map} +1 -1
  167. package/dist/chunks/checkmark.83e4f1e0.js +30 -0
  168. package/dist/chunks/checkmark.83e4f1e0.js.map +1 -0
  169. package/dist/chunks/{chevron-right.aef416c6.js → chevron-left.2fd6b083.js} +10 -10
  170. package/dist/chunks/chevron-left.2fd6b083.js.map +1 -0
  171. package/dist/chunks/{controls-group.7214dc7f.js → controls-group.38b436f6.js} +2 -2
  172. package/dist/chunks/{controls-group.7214dc7f.js.map → controls-group.38b436f6.js.map} +1 -1
  173. package/dist/chunks/{copy.7a73d1fd.js → copy.86236c8d.js} +4 -4
  174. package/dist/chunks/{copy.7a73d1fd.js.map → copy.86236c8d.js.map} +1 -1
  175. package/dist/chunks/{dropdown-default-textbox.0f878a8d.js → dropdown-default-textbox.0b38fac3.js} +4 -4
  176. package/dist/chunks/dropdown-default-textbox.0b38fac3.js.map +1 -0
  177. package/dist/chunks/{dropdown.7a104ce3.js → dropdown.afff433b.js} +144 -110
  178. package/dist/chunks/dropdown.afff433b.js.map +1 -0
  179. package/dist/chunks/{error-message.b91afffc.js → error-message.64e1964b.js} +2 -2
  180. package/dist/chunks/{error-message.b91afffc.js.map → error-message.64e1964b.js.map} +1 -1
  181. package/dist/chunks/fixed-scroller.e5aa7b00.js +148 -0
  182. package/dist/chunks/fixed-scroller.e5aa7b00.js.map +1 -0
  183. package/dist/chunks/{footer-actions.13f19a22.js → footer-actions.1ce44374.js} +3 -3
  184. package/dist/chunks/{footer-actions.13f19a22.js.map → footer-actions.1ce44374.js.map} +1 -1
  185. package/dist/chunks/{index.7f24db66.js → index.2bd3812b.js} +2 -2
  186. package/dist/chunks/{index.7f24db66.js.map → index.2bd3812b.js.map} +1 -1
  187. package/dist/chunks/{index.1dc4ebae.js → index.369b0e66.js} +112 -92
  188. package/dist/chunks/index.369b0e66.js.map +1 -0
  189. package/dist/chunks/{index.536bcb56.js → index.6a665ade.js} +3 -3
  190. package/dist/chunks/{index.536bcb56.js.map → index.6a665ade.js.map} +1 -1
  191. package/dist/chunks/{index.4c951e0d.js → index.77f35162.js} +6 -6
  192. package/dist/chunks/{index.4c951e0d.js.map → index.77f35162.js.map} +1 -1
  193. package/dist/chunks/index.bcc58fdd.js +1334 -0
  194. package/dist/chunks/index.bcc58fdd.js.map +1 -0
  195. package/dist/chunks/index.c207e9ab.js +602 -0
  196. package/dist/chunks/index.c207e9ab.js.map +1 -0
  197. package/dist/chunks/{index.6700224a.js → index.e579bc02.js} +2 -2
  198. package/dist/chunks/{index.6700224a.js.map → index.e579bc02.js.map} +1 -1
  199. package/dist/chunks/{index.d68847b0.js → index.fa7b44f1.js} +2 -2
  200. package/dist/chunks/{index.d68847b0.js.map → index.fa7b44f1.js.map} +1 -1
  201. package/dist/chunks/{listbox-option-tag.0f31ecb2.js → listbox-option-tag.809ec40e.js} +3 -3
  202. package/dist/chunks/{listbox-option-tag.0f31ecb2.js.map → listbox-option-tag.809ec40e.js.map} +1 -1
  203. package/dist/chunks/listbox.f6e5a11d.js +1306 -0
  204. package/dist/chunks/listbox.f6e5a11d.js.map +1 -0
  205. package/dist/chunks/{loading-button.6523a015.js → loading-button.746b7fa1.js} +2 -2
  206. package/dist/chunks/{loading-button.6523a015.js.map → loading-button.746b7fa1.js.map} +1 -1
  207. package/dist/chunks/refresh.c38c9eee.js +30 -0
  208. package/dist/chunks/refresh.c38c9eee.js.map +1 -0
  209. package/dist/chunks/summary-grid.keys.1d1028c2.js +5 -0
  210. package/dist/chunks/summary-grid.keys.1d1028c2.js.map +1 -0
  211. package/dist/chunks/{tooltip.b5391514.js → tooltip.f769eb14.js} +54 -51
  212. package/dist/chunks/{tooltip.b5391514.js.map → tooltip.f769eb14.js.map} +1 -1
  213. package/dist/code-snippet.js +6 -6
  214. package/dist/code-snippet.js.map +1 -1
  215. package/dist/country.js +553 -541
  216. package/dist/country.js.map +1 -1
  217. package/dist/currency.js +1 -1
  218. package/dist/data-grid.js +10 -10
  219. package/dist/data-grid.js.map +1 -1
  220. package/dist/date-picker.js +129 -118
  221. package/dist/date-picker.js.map +1 -1
  222. package/dist/date-range-picker.js +2 -2
  223. package/dist/date.js +1 -1
  224. package/dist/divider.js +1 -1
  225. package/dist/dropdown.js +4 -4
  226. package/dist/empty-state.js +44 -42
  227. package/dist/empty-state.js.map +1 -1
  228. package/dist/filter-bar.js +696 -683
  229. package/dist/filter-bar.js.map +1 -1
  230. package/dist/focus-trap.js +1 -1
  231. package/dist/form-layout.js +3 -3
  232. package/dist/header.js +121 -198
  233. package/dist/header.js.map +1 -1
  234. package/dist/image.js +4 -4
  235. package/dist/index.js +164 -158
  236. package/dist/index.js.map +1 -1
  237. package/dist/info-icon.js +8 -8
  238. package/dist/input-field.js +7 -7
  239. package/dist/internal.js +20 -144
  240. package/dist/internal.js.map +1 -1
  241. package/dist/link.js +2 -2
  242. package/dist/loading-indicator.js +1 -1
  243. package/dist/menu.js +3 -592
  244. package/dist/menu.js.map +1 -1
  245. package/dist/modal.js +3 -3
  246. package/dist/pagination.js +37 -21
  247. package/dist/pagination.js.map +1 -1
  248. package/dist/payment-method.js +50 -40
  249. package/dist/payment-method.js.map +1 -1
  250. package/dist/popover.js +16 -16
  251. package/dist/popper-container.js +6 -1276
  252. package/dist/popper-container.js.map +1 -1
  253. package/dist/radio-group.js +128 -97
  254. package/dist/radio-group.js.map +1 -1
  255. package/dist/search-bar.js +2 -2
  256. package/dist/segmented-control.js +130 -106
  257. package/dist/segmented-control.js.map +1 -1
  258. package/dist/sidepanel.js +94 -91
  259. package/dist/sidepanel.js.map +1 -1
  260. package/dist/status.js +2 -2
  261. package/dist/stepper.js +3 -3
  262. package/dist/structured-list.js +1 -1
  263. package/dist/summary-grid.js +146 -163
  264. package/dist/summary-grid.js.map +1 -1
  265. package/dist/tabs.js +128 -99
  266. package/dist/tabs.js.map +1 -1
  267. package/dist/tag.js +3 -3
  268. package/dist/textarea.js +4 -4
  269. package/dist/timeline.js +216 -203
  270. package/dist/timeline.js.map +1 -1
  271. package/dist/toast.js +3 -3
  272. package/dist/toggle.js +6 -6
  273. package/dist/tutorial.js +375 -0
  274. package/dist/tutorial.js.map +1 -0
  275. package/dist/typography.js +1 -1
  276. package/dist/web-types.json +1 -1
  277. package/package.json +5 -2
  278. package/dist/assets/chevron-right.css +0 -1
  279. package/dist/chunks/button.975d0bb8.js.map +0 -1
  280. package/dist/chunks/calendar.cc37ac1f.js.map +0 -1
  281. package/dist/chunks/chevron-right.aef416c6.js.map +0 -1
  282. package/dist/chunks/dropdown-default-textbox.0f878a8d.js.map +0 -1
  283. package/dist/chunks/dropdown.7a104ce3.js.map +0 -1
  284. package/dist/chunks/index.1dc4ebae.js.map +0 -1
  285. package/dist/chunks/listbox.0f25778d.js +0 -1213
  286. package/dist/chunks/listbox.0f25778d.js.map +0 -1
package/dist/accordion.js CHANGED
@@ -1,12 +1,13 @@
1
- import { defineComponent as x, provide as k, toRef as B, openBlock as n, createElementBlock as i, renderSlot as C, ref as f, inject as $, computed as O, watch as v, createVNode as b, unref as e, withCtx as y, createElementVNode as g, createBlock as h, createTextVNode as z, toDisplayString as A, Transition as D, normalizeStyle as H, createCommentVNode as V } from "vue";
2
- import { _ as E } from "./chunks/_plugin-vue_export-helper.dad06003.js";
3
- import { B as w } from "./chunks/index.7f24db66.js";
1
+ import { defineComponent as C, provide as k, toRef as B, openBlock as a, createElementBlock as r, renderSlot as E, ref as b, inject as O, computed as $, watch as s, createVNode as y, unref as e, withCtx as g, createElementVNode as h, createBlock as I, createTextVNode as z, toDisplayString as A, Transition as D, normalizeStyle as H, createCommentVNode as V } from "vue";
2
+ import { _ as N } from "./chunks/_plugin-vue_export-helper.dad06003.js";
3
+ import { B as w } from "./chunks/index.2bd3812b.js";
4
4
  import { a as R, C as j } from "./chunks/chevron-up.9bf21068.js";
5
- import { g as I } from "./chunks/unique-id.a2a2b458.js";
6
- import { u as M } from "./chunks/use-expandable-content-height.62fc84e5.js";
7
- import "./assets/index15.css";
8
- const N = Symbol("accordion title size injection key"), U = { class: "b-accordion" }, q = {}, J = /* @__PURE__ */ x({
9
- ...q,
5
+ import { g as x } from "./chunks/unique-id.a2a2b458.js";
6
+ import { o as M } from "./chunks/resize.a041304d.js";
7
+ import { u as U } from "./chunks/use-expandable-content-height.62fc84e5.js";
8
+ import "./assets/index36.css";
9
+ const S = Symbol("accordion title size injection key"), q = { class: "b-accordion" }, J = {}, K = /* @__PURE__ */ C({
10
+ ...J,
10
11
  __name: "accordion",
11
12
  props: {
12
13
  /**
@@ -18,14 +19,14 @@ const N = Symbol("accordion title size injection key"), U = { class: "b-accordio
18
19
  default: "default"
19
20
  }
20
21
  },
21
- setup(a) {
22
- return k(N, B(a, "titleSize")), (c, d) => (n(), i("div", U, [
23
- C(c.$slots, "default", {}, void 0, !0)
22
+ setup(i) {
23
+ return k(S, B(i, "titleSize")), (c, l) => (a(), r("div", q, [
24
+ E(c.$slots, "default", {}, void 0, !0)
24
25
  ]));
25
26
  }
26
27
  });
27
- const oe = /* @__PURE__ */ E(J, [["__scopeId", "data-v-9fccc066"]]), K = { class: "b-accordion-item" }, L = ["id", "aria-controls", "aria-expanded"], Y = ["id", "aria-labelledby"], Z = {}, F = /* @__PURE__ */ x({
28
- ...Z,
28
+ const ae = /* @__PURE__ */ N(K, [["__scopeId", "data-v-9fccc066"]]), L = { class: "b-accordion-item" }, Y = ["id", "aria-controls", "aria-expanded"], Z = ["id", "aria-labelledby"], F = {}, G = /* @__PURE__ */ C({
29
+ ...F,
29
30
  __name: "accordion-item",
30
31
  props: {
31
32
  /**
@@ -44,76 +45,84 @@ const oe = /* @__PURE__ */ E(J, [["__scopeId", "data-v-9fccc066"]]), K = { class
44
45
  }
45
46
  },
46
47
  emits: ["update:is-expanded"],
47
- setup(a, { emit: s }) {
48
- const c = a, d = "b-accordion-item__animation--content", r = f(null), t = f(c.isExpanded), l = I("accordionItemButton"), _ = I("accordionItemContent"), p = $(N, "default"), { updateContentHeight: S, contentHeight: u } = M(r, t), T = O(() => u.value ? { "max-height": u.value } : {});
49
- return v(
48
+ setup(i, { emit: d }) {
49
+ const c = i, l = "b-accordion-item__animation--content", n = b(null), t = b(c.isExpanded), _ = x("accordionItemButton"), p = x("accordionItemContent"), u = O(S, "default"), { updateContentHeight: m, contentHeight: v } = U(n, t), T = $(() => v.value ? { "max-height": v.value } : {});
50
+ return s(
50
51
  () => c.isExpanded,
51
52
  (o) => {
52
53
  t.value = o;
53
54
  }
54
- ), v(
55
+ ), s(
56
+ () => n.value,
57
+ () => {
58
+ let o = null;
59
+ !o && n.value && (o = M(n.value, () => {
60
+ n.value && m();
61
+ }));
62
+ }
63
+ ), s(
55
64
  t,
56
65
  (o) => {
57
- s("update:is-expanded", o), S();
66
+ d("update:is-expanded", o), m();
58
67
  },
59
68
  { immediate: !0 }
60
- ), (o, m) => (n(), i("div", K, [
61
- b(e(w), {
69
+ ), (o, f) => (a(), r("div", L, [
70
+ y(e(w), {
62
71
  el: "h3",
63
- variant: e(p) === "small" ? "body" : "title",
64
- strongest: e(p) === "small"
72
+ variant: e(u) === "small" ? "body" : "title",
73
+ strongest: e(u) === "small"
65
74
  }, {
66
- default: y(() => [
67
- g("button", {
68
- id: e(l),
69
- "aria-controls": e(_),
75
+ default: g(() => [
76
+ h("button", {
77
+ id: e(_),
78
+ "aria-controls": e(p),
70
79
  "aria-expanded": `${t.value}`,
71
80
  type: "button",
72
81
  class: "b-accordion-item__button",
73
- onClick: m[0] || (m[0] = (G) => t.value = !t.value)
82
+ onClick: f[0] || (f[0] = (P) => t.value = !t.value)
74
83
  }, [
75
- t.value ? (n(), h(e(R), {
84
+ t.value ? (a(), I(e(R), {
76
85
  key: 0,
77
86
  class: "b-accordion-item__icon",
78
87
  "svg-title": "collapse",
79
88
  "aria-hidden": "true"
80
- })) : (n(), h(e(j), {
89
+ })) : (a(), I(e(j), {
81
90
  key: 1,
82
91
  class: "b-accordion-item__icon",
83
92
  "svg-title": "expand",
84
93
  "aria-hidden": "true"
85
94
  })),
86
- z(" " + A(a.title), 1)
87
- ], 8, L)
95
+ z(" " + A(i.title), 1)
96
+ ], 8, Y)
88
97
  ]),
89
98
  _: 1
90
99
  }, 8, ["variant", "strongest"]),
91
- b(D, { name: d }, {
92
- default: y(() => [
93
- t.value ? (n(), i("div", {
100
+ y(D, { name: l }, {
101
+ default: g(() => [
102
+ t.value ? (a(), r("div", {
94
103
  key: 0,
95
- id: e(_),
96
- "aria-labelledby": e(l),
104
+ id: e(p),
105
+ "aria-labelledby": e(_),
97
106
  role: "region",
98
107
  style: H(e(T))
99
108
  }, [
100
- g("div", {
109
+ h("div", {
101
110
  ref_key: "contentDiv",
102
- ref: r,
111
+ ref: n,
103
112
  class: "b-accordion-item__content"
104
113
  }, [
105
- C(o.$slots, "default", {}, void 0, !0)
114
+ E(o.$slots, "default", {}, void 0, !0)
106
115
  ], 512)
107
- ], 12, Y)) : V("", !0)
116
+ ], 12, Z)) : V("", !0)
108
117
  ]),
109
118
  _: 3
110
119
  })
111
120
  ]));
112
121
  }
113
122
  });
114
- const ne = /* @__PURE__ */ E(F, [["__scopeId", "data-v-98db8bd7"]]);
123
+ const ie = /* @__PURE__ */ N(G, [["__scopeId", "data-v-b1de8d3a"]]);
115
124
  export {
116
- oe as BentoAccordion,
117
- ne as BentoAccordionItem
125
+ ae as BentoAccordion,
126
+ ie as BentoAccordionItem
118
127
  };
119
128
  //# sourceMappingURL=accordion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.js","sources":["../../vue2/src/components/accordion/accordion.keys.ts","../../vue2/src/components/accordion/accordion.vue","../../vue2/src/components/accordion/components/accordion-item.vue"],"sourcesContent":["export const ACCORDION_TITLE_SIZE_INJECTION_KEY = Symbol('accordion title size injection key');\n","<template>\n <div class=\"b-accordion\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { PropType, provide, toRef } from 'vue';\n\n import { ACCORDION_TITLE_SIZE_INJECTION_KEY } from './accordion.keys';\n\n import type { BentoAccordionTitleSize } from './accordion.types';\n\n const props = defineProps({\n /**\n * Controls accordion title size.\n * @values default, small\n */\n titleSize: {\n type: String as PropType<BentoAccordionTitleSize>,\n default: 'default',\n },\n });\n\n provide(ACCORDION_TITLE_SIZE_INJECTION_KEY, toRef(props, 'titleSize'));\n</script>\n\n<script lang=\"ts\">\n /**\n * An accordion is a vertical stack of interactive headers used to reveal or hide\n * sections of content associated with these headers.\n *\n * This component must only have `BentoAccordionItem` components in its default slot.\n *\n * Accordion items should be collapsed by default.\n *\n * @example\n * import { BentoAccordion, BentoAccordionItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAccordion, BentoAccordionItem },\n * template: `\n * <bento-accordion>\n * <bento-accordion-item title=\"Item 1\">\n * Content for item 1\n * </bento-accordion-item>\n * <bento-accordion-item title=\"Item 2\">\n * Content for item 2\n * </bento-accordion-item>\n * </bento-accordion>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./accordion.scss\" />\n","<template>\n <div class=\"b-accordion-item\">\n <bento-typography\n el=\"h3\"\n :variant=\"titleSize === 'small' ? 'body' : 'title'\"\n :strongest=\"titleSize === 'small'\"\n >\n <button\n :id=\"buttonId\"\n :aria-controls=\"contentId\"\n :aria-expanded=\"`${isOpen}`\"\n type=\"button\"\n class=\"b-accordion-item__button\"\n @click=\"isOpen = !isOpen\"\n >\n <chevron-up-icon v-if=\"isOpen\" class=\"b-accordion-item__icon\" svg-title=\"collapse\" aria-hidden=\"true\" />\n <chevron-down-icon v-else class=\"b-accordion-item__icon\" svg-title=\"expand\" aria-hidden=\"true\" />\n {{ title }}\n </button>\n </bento-typography>\n\n <Transition :name=\"CONTENT_TRANSITION_NAME\">\n <div v-if=\"isOpen\" :id=\"contentId\" :aria-labelledby=\"buttonId\" role=\"region\" :style=\"contentMaxHeight\">\n <div ref=\"contentDiv\" class=\"b-accordion-item__content\">\n <slot />\n </div>\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, watch } from 'vue';\n\n import { BentoTypography } from '@/components/typography';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n import { generateUid } from '@/utils/ts/unique-id';\n\n import { ACCORDION_TITLE_SIZE_INJECTION_KEY } from '../accordion.keys';\n\n import type { BentoAccordionTitleSize } from '../accordion.types';\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n\n const CONTENT_TRANSITION_NAME = 'b-accordion-item__animation--content';\n\n const props = defineProps({\n /**\n * Sets the title of the accordion item.\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Controls if the content is visible or hidden.\n */\n isExpanded: {\n type: Boolean,\n default: false,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when content is toggled\n */\n (e: 'update:is-expanded', value: boolean): void;\n }>();\n\n // Refs\n const contentDiv = ref<HTMLDivElement>(null);\n const isOpen = ref(props.isExpanded);\n\n // Generating IDs\n const buttonId = generateUid('accordionItemButton');\n const contentId = generateUid('accordionItemContent');\n\n // Injecting prop from parent\n const titleSize = inject<`${BentoAccordionTitleSize}`>(ACCORDION_TITLE_SIZE_INJECTION_KEY, 'default');\n\n // Getting and setting the item height to be able to handle height animation\n const { updateContentHeight, contentHeight } = useExpandableContentHeight(contentDiv, isOpen);\n\n const contentMaxHeight = computed(() => (contentHeight.value ? { 'max-height': contentHeight.value } : {}));\n\n watch(\n () => props.isExpanded,\n value => {\n isOpen.value = value;\n }\n );\n\n watch(\n isOpen,\n value => {\n // Enable two-way data binding for `isExpanded`\n emit('update:is-expanded', value);\n\n updateContentHeight();\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * An accordion item is an interactive header used to reveal or hide a\n * section of content associated with this header.\n *\n * This component must always be wrapped by a `BentoAccordion` component.\n *\n * @example\n * import { BentoAccordion, BentoAccordionItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAccordion, BentoAccordionItem },\n * template: `\n * <bento-accordion>\n * <bento-accordion-item title=\"Item 1\">\n * Content for item 1\n * </bento-accordion-item>\n * <bento-accordion-item title=\"Item 2\">\n * Content for item 2\n * </bento-accordion-item>\n * </bento-accordion>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./accordion-item.scss\" />\n"],"names":["ACCORDION_TITLE_SIZE_INJECTION_KEY","__default__$1","provide","toRef","__default__","CONTENT_TRANSITION_NAME","contentDiv","ref","isOpen","props","buttonId","generateUid","contentId","titleSize","inject","updateContentHeight","contentHeight","useExpandableContentHeight","contentMaxHeight","computed","watch","value","emit"],"mappings":";;;;;;;AAAa,MAAAA,IAAA,OAAA,oCAAA,iCCqDTC,IAAA,CAAA;;;;;;;;;;;;;;AA7BA,WAAAC,EAAAF,GAAAG,KAAA,WAAA,CAAA;;;;;qLC0GAC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;iBArFAC,IAAA,wCA2BAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAAE,EAAA,UAAA,GAGAC,IAAAC,EAAA,qBAAA,GACAC,IAAAD,EAAA,sBAAA,GAGAE,IAAAC,EAAAd,GAAA,SAAA,GAGA,EAAA,qBAAAe,GAAA,eAAAC,EAAA,IAAAC,EAAAX,GAAAE,CAAA,GAEAU,IAAAC,EAAA,MAAAH,EAAA,QAAA,EAAA,cAAAA,EAAA,MAAA,IAAA,CAAA,CAAA;AAEA,WAAAI;AAAA,MAAA,MAAAX,EAAA;AAAA,MACgB,CAAAY,MAAA;AAER,QAAAb,EAAA,QAAAa;AAAA,MAAe;AAAA,IACnB,GAGJD;AAAA,MAAAZ;AAAA,MACI,CAAAa,MAAA;AAGI,QAAAC,EAAA,sBAAAD,CAAA,GAEAN,EAAA;AAAA,MAAoB;AAAA,MACxB,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"accordion.js","sources":["../../vue2/src/components/accordion/accordion.keys.ts","../../vue2/src/components/accordion/accordion.vue","../../vue2/src/components/accordion/components/accordion-item.vue"],"sourcesContent":["export const ACCORDION_TITLE_SIZE_INJECTION_KEY = Symbol('accordion title size injection key');\n","<template>\n <div class=\"b-accordion\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { PropType, provide, toRef } from 'vue';\n\n import { ACCORDION_TITLE_SIZE_INJECTION_KEY } from './accordion.keys';\n\n import type { BentoAccordionTitleSize } from './accordion.types';\n\n const props = defineProps({\n /**\n * Controls accordion title size.\n * @values default, small\n */\n titleSize: {\n type: String as PropType<BentoAccordionTitleSize>,\n default: 'default',\n },\n });\n\n provide(ACCORDION_TITLE_SIZE_INJECTION_KEY, toRef(props, 'titleSize'));\n</script>\n\n<script lang=\"ts\">\n /**\n * An accordion is a vertical stack of interactive headers used to reveal or hide\n * sections of content associated with these headers.\n *\n * This component must only have `BentoAccordionItem` components in its default slot.\n *\n * Accordion items should be collapsed by default.\n *\n * @example\n * import { BentoAccordion, BentoAccordionItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAccordion, BentoAccordionItem },\n * template: `\n * <bento-accordion>\n * <bento-accordion-item title=\"Item 1\">\n * Content for item 1\n * </bento-accordion-item>\n * <bento-accordion-item title=\"Item 2\">\n * Content for item 2\n * </bento-accordion-item>\n * </bento-accordion>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./accordion.scss\" />\n","<template>\n <div class=\"b-accordion-item\">\n <bento-typography\n el=\"h3\"\n :variant=\"titleSize === 'small' ? 'body' : 'title'\"\n :strongest=\"titleSize === 'small'\"\n >\n <button\n :id=\"buttonId\"\n :aria-controls=\"contentId\"\n :aria-expanded=\"`${isOpen}`\"\n type=\"button\"\n class=\"b-accordion-item__button\"\n @click=\"isOpen = !isOpen\"\n >\n <chevron-up-icon v-if=\"isOpen\" class=\"b-accordion-item__icon\" svg-title=\"collapse\" aria-hidden=\"true\" />\n <chevron-down-icon v-else class=\"b-accordion-item__icon\" svg-title=\"expand\" aria-hidden=\"true\" />\n {{ title }}\n </button>\n </bento-typography>\n\n <Transition :name=\"CONTENT_TRANSITION_NAME\">\n <div v-if=\"isOpen\" :id=\"contentId\" :aria-labelledby=\"buttonId\" role=\"region\" :style=\"contentMaxHeight\">\n <div ref=\"contentDiv\" class=\"b-accordion-item__content\">\n <slot />\n </div>\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, watch } from 'vue';\n\n import { BentoTypography } from '@/components/typography';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n import { generateUid } from '@/utils/ts/unique-id';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n\n import { ACCORDION_TITLE_SIZE_INJECTION_KEY } from '../accordion.keys';\n\n import type { BentoAccordionTitleSize } from '../accordion.types';\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n\n const CONTENT_TRANSITION_NAME = 'b-accordion-item__animation--content';\n\n const props = defineProps({\n /**\n * Sets the title of the accordion item.\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Controls if the content is visible or hidden.\n */\n isExpanded: {\n type: Boolean,\n default: false,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when content is toggled\n */\n (e: 'update:is-expanded', value: boolean): void;\n }>();\n\n // Refs\n const contentDiv = ref<HTMLDivElement>(null);\n const isOpen = ref(props.isExpanded);\n\n // Generating IDs\n const buttonId = generateUid('accordionItemButton');\n const contentId = generateUid('accordionItemContent');\n\n // Injecting prop from parent\n const titleSize = inject<`${BentoAccordionTitleSize}`>(ACCORDION_TITLE_SIZE_INJECTION_KEY, 'default');\n\n // Getting and setting the item height to be able to handle height animation\n const { updateContentHeight, contentHeight } = useExpandableContentHeight(contentDiv, isOpen);\n\n const contentMaxHeight = computed(() => (contentHeight.value ? { 'max-height': contentHeight.value } : {}));\n\n watch(\n () => props.isExpanded,\n value => {\n isOpen.value = value;\n }\n );\n\n watch(\n () => contentDiv.value,\n () => {\n let observer: ResizeObserver | null = null;\n if (!observer && contentDiv.value) {\n observer = observeSizeOfElement(contentDiv.value, () => {\n if (contentDiv.value) {\n updateContentHeight();\n }\n });\n }\n }\n );\n\n watch(\n isOpen,\n value => {\n // Enable two-way data binding for `isExpanded`\n emit('update:is-expanded', value);\n\n updateContentHeight();\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * An accordion item is an interactive header used to reveal or hide a\n * section of content associated with this header.\n *\n * This component must always be wrapped by a `BentoAccordion` component.\n *\n * @example\n * import { BentoAccordion, BentoAccordionItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAccordion, BentoAccordionItem },\n * template: `\n * <bento-accordion>\n * <bento-accordion-item title=\"Item 1\">\n * Content for item 1\n * </bento-accordion-item>\n * <bento-accordion-item title=\"Item 2\">\n * Content for item 2\n * </bento-accordion-item>\n * </bento-accordion>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./accordion-item.scss\" />\n"],"names":["ACCORDION_TITLE_SIZE_INJECTION_KEY","__default__$1","provide","toRef","__default__","CONTENT_TRANSITION_NAME","contentDiv","ref","isOpen","props","buttonId","generateUid","contentId","titleSize","inject","updateContentHeight","contentHeight","useExpandableContentHeight","contentMaxHeight","computed","watch","value","observer","observeSizeOfElement","emit"],"mappings":";;;;;;;;AAAa,MAAAA,IAAA,OAAA,oCAAA,iCCqDTC,IAAA,CAAA;;;;;;;;;;;;;;AA7BA,WAAAC,EAAAF,GAAAG,KAAA,WAAA,CAAA;;;;;qLCyHAC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;iBAnGAC,IAAA,wCA2BAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAAE,EAAA,UAAA,GAGAC,IAAAC,EAAA,qBAAA,GACAC,IAAAD,EAAA,sBAAA,GAGAE,IAAAC,EAAAd,GAAA,SAAA,GAGA,EAAA,qBAAAe,GAAA,eAAAC,EAAA,IAAAC,EAAAX,GAAAE,CAAA,GAEAU,IAAAC,EAAA,MAAAH,EAAA,QAAA,EAAA,cAAAA,EAAA,MAAA,IAAA,CAAA,CAAA;AAEA,WAAAI;AAAA,MAAA,MAAAX,EAAA;AAAA,MACgB,CAAAY,MAAA;AAER,QAAAb,EAAA,QAAAa;AAAA,MAAe;AAAA,IACnB,GAGJD;AAAA,MAAA,MAAAd,EAAA;AAAA,MACqB,MAAA;AAEb,YAAAgB,IAAA;AACA,QAAA,CAAAA,KAAAhB,EAAA,UACIgB,IAAAC,EAAAjB,EAAA,OAAA,MAAA;AACI,UAAAA,EAAA,SACIS,EAAA;AAAA,QACJ,CAAA;AAAA,MAER;AAAA,IACJ,GAGJK;AAAA,MAAAZ;AAAA,MACI,CAAAa,MAAA;AAGI,QAAAG,EAAA,sBAAAH,CAAA,GAEAN,EAAA;AAAA,MAAoB;AAAA,MACxB,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,210 @@
1
+ import { onMounted as N, nextTick as S, getCurrentScope as O, onScopeDispose as V, unref as d, getCurrentInstance as T, ref as _, watch as E, watchEffect as k, computed as B, defineComponent as P, toRef as R, openBlock as j, createElementBlock as G, normalizeClass as z, createElementVNode as D, createVNode as g, withCtx as C, createTextVNode as H, toDisplayString as L } from "vue";
2
+ import { a as q } from "./chunks/button.e5177388.js";
3
+ import { B as F } from "./chunks/index.2bd3812b.js";
4
+ import { B as Q } from "./chunks/button-actions-with-menu.fa35390c.js";
5
+ import { C as U } from "./chunks/cross.5c36a670.js";
6
+ import { u as Y } from "./chunks/i18n.6c402773.js";
7
+ import { _ as $ } from "./chunks/_plugin-vue_export-helper.dad06003.js";
8
+ import "./assets/index19.css";
9
+ function W(e) {
10
+ return O() ? (V(e), !0) : !1;
11
+ }
12
+ function w(e) {
13
+ return typeof e == "function" ? e() : d(e);
14
+ }
15
+ const K = typeof window < "u" && typeof document < "u";
16
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
17
+ const Z = Object.prototype.toString, J = (e) => Z.call(e) === "[object Object]", X = () => {
18
+ };
19
+ function ee(e) {
20
+ return e || T();
21
+ }
22
+ function te(e, n = !0, t) {
23
+ ee() ? N(e, t) : n ? e() : S(e);
24
+ }
25
+ function ne(e) {
26
+ var n;
27
+ const t = w(e);
28
+ return (n = t == null ? void 0 : t.$el) != null ? n : t;
29
+ }
30
+ const I = K ? window : void 0;
31
+ function oe(...e) {
32
+ let n, t, i, o;
33
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, i, o] = e, n = I) : [n, t, i, o] = e, !n)
34
+ return X;
35
+ Array.isArray(t) || (t = [t]), Array.isArray(i) || (i = [i]);
36
+ const c = [], a = () => {
37
+ c.forEach((l) => l()), c.length = 0;
38
+ }, u = (l, f, p, m) => (l.addEventListener(f, p, m), () => l.removeEventListener(f, p, m)), r = E(
39
+ () => [ne(n), w(o)],
40
+ ([l, f]) => {
41
+ if (a(), !l)
42
+ return;
43
+ const p = J(f) ? { ...f } : f;
44
+ c.push(
45
+ ...t.flatMap((m) => i.map((y) => u(l, m, y, p)))
46
+ );
47
+ },
48
+ { immediate: !0, flush: "post" }
49
+ ), s = () => {
50
+ r(), a();
51
+ };
52
+ return W(s), s;
53
+ }
54
+ function ie() {
55
+ const e = _(!1);
56
+ return T() && N(() => {
57
+ e.value = !0;
58
+ }), e;
59
+ }
60
+ function se(e) {
61
+ const n = ie();
62
+ return B(() => (n.value, !!e()));
63
+ }
64
+ function ae(e, n = {}) {
65
+ const { window: t = I } = n, i = se(() => t && "matchMedia" in t && typeof t.matchMedia == "function");
66
+ let o;
67
+ const c = _(!1), a = (s) => {
68
+ c.value = s.matches;
69
+ }, u = () => {
70
+ o && ("removeEventListener" in o ? o.removeEventListener("change", a) : o.removeListener(a));
71
+ }, r = k(() => {
72
+ i.value && (u(), o = t.matchMedia(w(e)), "addEventListener" in o ? o.addEventListener("change", a) : o.addListener(a), c.value = o.matches);
73
+ });
74
+ return W(() => {
75
+ r(), u(), o = void 0;
76
+ }), c;
77
+ }
78
+ function re(e = {}) {
79
+ const {
80
+ window: n = I,
81
+ initialWidth: t = Number.POSITIVE_INFINITY,
82
+ initialHeight: i = Number.POSITIVE_INFINITY,
83
+ listenOrientation: o = !0,
84
+ includeScrollbar: c = !0
85
+ } = e, a = _(t), u = _(i), r = () => {
86
+ n && (c ? (a.value = n.innerWidth, u.value = n.innerHeight) : (a.value = n.document.documentElement.clientWidth, u.value = n.document.documentElement.clientHeight));
87
+ };
88
+ if (r(), te(r), oe("resize", r, { passive: !0 }), o) {
89
+ const s = ae("(orientation: portrait)");
90
+ E(s, () => r());
91
+ }
92
+ return { width: a, height: u };
93
+ }
94
+ const x = {
95
+ "en-US": {
96
+ actionBar: "Action bar",
97
+ close: "Close",
98
+ selected: "selected"
99
+ }
100
+ }, ce = ["aria-label"], le = { class: "b-action-bar__close-button" }, ue = {
101
+ i18n: { messages: x }
102
+ }, de = /* @__PURE__ */ P({
103
+ ...ue,
104
+ __name: "action-bar",
105
+ props: {
106
+ /**
107
+ * List of actions that will be used to render the buttons.
108
+ *
109
+ * Each object in the list should have a `title`, an `event` and,
110
+ * optionally, an `icon`.
111
+ *
112
+ * The component will display 4 actions and the hide the rest inside a menu.
113
+ *
114
+ * @see BentoButton for a list of all the other props supported by each button action.
115
+ */
116
+ actions: {
117
+ type: Array,
118
+ required: !0
119
+ },
120
+ /**
121
+ * Use when there are sticky elements at the bottom, like sticky pagination
122
+ */
123
+ extraBottomSpacing: {
124
+ type: Boolean,
125
+ default: !1
126
+ },
127
+ /**
128
+ * Show how many items are selected
129
+ */
130
+ itemCounter: {
131
+ type: Number,
132
+ required: !0
133
+ },
134
+ /**
135
+ * Label for the selection, e.g. 'selected'/'changed'
136
+ */
137
+ selectionLabel: {
138
+ type: String,
139
+ default: null
140
+ }
141
+ },
142
+ emits: ["close"],
143
+ setup(e, { emit: n }) {
144
+ const t = e, { t: i } = Y({ messages: x }), o = B(() => t.selectionLabel ? t.selectionLabel : i("selected")), c = 32, a = 100, u = 500, r = _(null), s = _(4), { width: l } = re(), f = R(t, "extraBottomSpacing"), p = B(() => ({
145
+ "b-action-bar--extra-spacing": f.value
146
+ })), m = B(() => {
147
+ const h = t.actions.map((M) => ({
148
+ ...M,
149
+ variant: "secondary"
150
+ })), v = h.slice(0, s.value).reverse(), b = h.slice(s.value);
151
+ return [...v, ...b];
152
+ }), y = async () => {
153
+ await S(), l.value > r.value.clientWidth + c + a && s.value < 4 && (s.value += 1, y());
154
+ }, A = async () => {
155
+ await S(), l.value < r.value.clientWidth + c && s.value > 0 && (s.value -= 1, A());
156
+ };
157
+ return E(
158
+ () => l.value,
159
+ async (h, v) => {
160
+ if (await S(), !r.value)
161
+ return;
162
+ const b = h > v;
163
+ l.value < u ? s.value = 0 : b ? y() : A();
164
+ },
165
+ { immediate: !0 }
166
+ ), (h, v) => (j(), G("section", {
167
+ ref_key: "actionBar",
168
+ ref: r,
169
+ class: z(["b-action-bar", d(p)]),
170
+ "aria-label": d(i)("actionBar")
171
+ }, [
172
+ D("div", le, [
173
+ g(d(q), {
174
+ variant: "tertiary",
175
+ inverse: "",
176
+ onClick: v[0] || (v[0] = (b) => n("close"))
177
+ }, {
178
+ iconLeft: C(() => [
179
+ g(d(U), {
180
+ "svg-title": d(i)("close")
181
+ }, null, 8, ["svg-title"])
182
+ ]),
183
+ _: 1
184
+ })
185
+ ]),
186
+ g(d(F), {
187
+ el: "span",
188
+ stronger: "",
189
+ class: "b-action-bar__selection"
190
+ }, {
191
+ default: C(() => [
192
+ H(L(e.itemCounter) + " " + L(d(o)), 1)
193
+ ]),
194
+ _: 1
195
+ }),
196
+ g(Q, {
197
+ actions: d(m),
198
+ class: "b-action-bar__actions",
199
+ "displayed-actions": s.value,
200
+ "menu-position": "top-end",
201
+ inverse: ""
202
+ }, null, 8, ["actions", "displayed-actions"])
203
+ ], 10, ce));
204
+ }
205
+ });
206
+ const be = /* @__PURE__ */ $(de, [["__scopeId", "data-v-68845914"]]);
207
+ export {
208
+ be as BentoActionBar
209
+ };
210
+ //# sourceMappingURL=action-bar.js.map