@adyen/bento-vue2 1.65.0 → 1.67.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 (229) hide show
  1. package/dist/@types/index.d.ts +473 -253
  2. package/dist/action-bar.js +1 -1
  3. package/dist/assets/accordion-item.css +1 -1
  4. package/dist/assets/action-bar.css +1 -1
  5. package/dist/assets/base-modal.css +1 -1
  6. package/dist/assets/button-actions-with-menu.css +1 -1
  7. package/dist/assets/button-actions.css +1 -1
  8. package/dist/assets/card.css +1 -1
  9. package/dist/assets/copy.css +1 -1
  10. package/dist/assets/data-grid-template.css +1 -1
  11. package/dist/assets/data-grid.css +1 -1
  12. package/dist/assets/date-range-picker.css +1 -1
  13. package/dist/assets/date.css +1 -1
  14. package/dist/assets/dialog-page.css +1 -1
  15. package/dist/assets/dropdown-default-textbox.css +1 -1
  16. package/dist/assets/dropdown.css +1 -1
  17. package/dist/assets/file-uploader.css +1 -1
  18. package/dist/assets/filter-bar.css +1 -1
  19. package/dist/assets/footer-actions.css +1 -1
  20. package/dist/assets/header-with-views.css +1 -1
  21. package/dist/assets/header.css +1 -1
  22. package/dist/assets/info-icon.css +1 -1
  23. package/dist/assets/input-field-password.css +1 -1
  24. package/dist/assets/input-field.css +1 -1
  25. package/dist/assets/inspector.css +1 -1
  26. package/dist/assets/menu.css +1 -1
  27. package/dist/assets/modal-fullscreen.css +1 -1
  28. package/dist/assets/pagination.css +1 -1
  29. package/dist/assets/popover.css +1 -1
  30. package/dist/assets/sidepanel.css +1 -1
  31. package/dist/assets/step.css +1 -1
  32. package/dist/assets/summary-grid.css +1 -1
  33. package/dist/assets/tab.css +1 -0
  34. package/dist/assets/textarea.css +1 -1
  35. package/dist/assets/use-cached-selected-values.css +1 -1
  36. package/dist/button.js +1 -1
  37. package/dist/card.js +1 -1
  38. package/dist/checkbox.js +2 -2
  39. package/dist/chunks/{action-bar.DHdrZtmW.js → action-bar.BxX3I27_.js} +31 -31
  40. package/dist/chunks/action-bar.BxX3I27_.js.map +1 -0
  41. package/dist/chunks/{base-modal.3OptY7u_.js → base-modal.QGDM_kjG.js} +2 -2
  42. package/dist/chunks/{base-modal.3OptY7u_.js.map → base-modal.QGDM_kjG.js.map} +1 -1
  43. package/dist/chunks/button-actions-with-menu.itkbcqzk.js +83 -0
  44. package/dist/chunks/button-actions-with-menu.itkbcqzk.js.map +1 -0
  45. package/dist/chunks/{button-actions._OIvTdKt.js → button-actions.BKdI_ooV.js} +2 -2
  46. package/dist/chunks/button-actions.BKdI_ooV.js.map +1 -0
  47. package/dist/chunks/calendar.DvIQEYwN.js +2086 -0
  48. package/dist/chunks/calendar.DvIQEYwN.js.map +1 -0
  49. package/dist/chunks/{card.CypgT0Ji.js → card.BktfAMv5.js} +2 -2
  50. package/dist/chunks/{card.CypgT0Ji.js.map → card.BktfAMv5.js.map} +1 -1
  51. package/dist/chunks/{checkbox-group.DVX0GFm9.js → checkbox-group.BVMGnokj.js} +4 -4
  52. package/dist/chunks/{checkbox-group.DVX0GFm9.js.map → checkbox-group.BVMGnokj.js.map} +1 -1
  53. package/dist/chunks/{checkbox.nHrvoKfp.js → checkbox.Bg5FM5Oa.js} +2 -2
  54. package/dist/chunks/{checkbox.nHrvoKfp.js.map → checkbox.Bg5FM5Oa.js.map} +1 -1
  55. package/dist/chunks/{code-snippet.W8Zp0zQP.js → code-snippet.DDiQ9R3o.js} +4 -4
  56. package/dist/chunks/{code-snippet.W8Zp0zQP.js.map → code-snippet.DDiQ9R3o.js.map} +1 -1
  57. package/dist/chunks/{controls-group.BWAmz7Tg.js → controls-group.CccuLkgP.js} +2 -2
  58. package/dist/chunks/{controls-group.BWAmz7Tg.js.map → controls-group.CccuLkgP.js.map} +1 -1
  59. package/dist/chunks/copy.CF8Fzu2Y.js +96 -0
  60. package/dist/chunks/copy.CF8Fzu2Y.js.map +1 -0
  61. package/dist/chunks/{dashboard-section.Bz54Z6Hh.js → dashboard-section.Beep1lY8.js} +3 -3
  62. package/dist/chunks/{dashboard-section.Bz54Z6Hh.js.map → dashboard-section.Beep1lY8.js.map} +1 -1
  63. package/dist/chunks/{dashed-underline.CEaAmjDa.js → dashed-underline.BQwLgzz6.js} +2 -2
  64. package/dist/chunks/{dashed-underline.CEaAmjDa.js.map → dashed-underline.BQwLgzz6.js.map} +1 -1
  65. package/dist/chunks/{data-grid-template.DtFRjaR8.js → data-grid-template.nkx0pCMA.js} +16 -14
  66. package/dist/chunks/data-grid-template.nkx0pCMA.js.map +1 -0
  67. package/dist/chunks/{data-grid.D4oeTUhn.js → data-grid.CkwZVy3a.js} +190 -188
  68. package/dist/chunks/data-grid.CkwZVy3a.js.map +1 -0
  69. package/dist/chunks/{date-picker.k0g6anfy.js → date-picker.BLBXaDHv.js} +8 -9
  70. package/dist/chunks/{date-picker.k0g6anfy.js.map → date-picker.BLBXaDHv.js.map} +1 -1
  71. package/dist/chunks/{date-range-picker.D9lyIoO-.js → date-range-picker.am63DgMj.js} +409 -393
  72. package/dist/chunks/date-range-picker.am63DgMj.js.map +1 -0
  73. package/dist/chunks/date.BfyWX2PY.js +160 -0
  74. package/dist/chunks/date.BfyWX2PY.js.map +1 -0
  75. package/dist/chunks/{dropdown-default-textbox.BNuuA4ES.js → dropdown-default-textbox.94q6opSD.js} +3 -3
  76. package/dist/chunks/dropdown-default-textbox.94q6opSD.js.map +1 -0
  77. package/dist/chunks/{dropdown-tag.DKhxBV52.js → dropdown-tag.DYIkCBa6.js} +2 -2
  78. package/dist/chunks/{dropdown-tag.DKhxBV52.js.map → dropdown-tag.DYIkCBa6.js.map} +1 -1
  79. package/dist/chunks/{dropdown.DV7uhHNP.js → dropdown.HA6ISg2h.js} +265 -270
  80. package/dist/chunks/{dropdown.DV7uhHNP.js.map → dropdown.HA6ISg2h.js.map} +1 -1
  81. package/dist/chunks/{error-message.1Em7Lis3.js → error-message.BgxnwPLF.js} +2 -2
  82. package/dist/chunks/{error-message.1Em7Lis3.js.map → error-message.BgxnwPLF.js.map} +1 -1
  83. package/dist/chunks/es6.n1ewaW31.js.map +1 -1
  84. package/dist/chunks/{file-uploader.DyjdNLOa.js → file-uploader.BPslxGI8.js} +323 -323
  85. package/dist/chunks/file-uploader.BPslxGI8.js.map +1 -0
  86. package/dist/chunks/{filter-bar.BxDEplt3.js → filter-bar.DbqsoAI1.js} +667 -652
  87. package/dist/chunks/{filter-bar.BxDEplt3.js.map → filter-bar.DbqsoAI1.js.map} +1 -1
  88. package/dist/chunks/{footer-actions.DyuSTjC5.js → footer-actions.BUfQFz7J.js} +2 -2
  89. package/dist/chunks/{footer-actions.DyuSTjC5.js.map → footer-actions.BUfQFz7J.js.map} +1 -1
  90. package/dist/chunks/{get-date-locale.BN8xEjY0.js → get-date-locale.CAyOIbcp.js} +288 -649
  91. package/dist/chunks/get-date-locale.CAyOIbcp.js.map +1 -0
  92. package/dist/chunks/{header-with-views.Ds9mcwmp.js → header-with-views.JllLR2nW.js} +341 -327
  93. package/dist/chunks/header-with-views.JllLR2nW.js.map +1 -0
  94. package/dist/chunks/{header.Cb644uAi.js → header.04Y0unpy.js} +27 -26
  95. package/dist/chunks/{header.Cb644uAi.js.map → header.04Y0unpy.js.map} +1 -1
  96. package/dist/chunks/index.BrH1t1iu.js +407 -0
  97. package/dist/chunks/index.BrH1t1iu.js.map +1 -0
  98. package/dist/chunks/{info-icon-with-popover.COq40yTq.js → info-icon-with-popover.B1DnkW4B.js} +2 -2
  99. package/dist/chunks/{info-icon-with-popover.COq40yTq.js.map → info-icon-with-popover.B1DnkW4B.js.map} +1 -1
  100. package/dist/chunks/info-icon.CYOXx8CL.js +37 -0
  101. package/dist/chunks/info-icon.CYOXx8CL.js.map +1 -0
  102. package/dist/chunks/{input-field-password.Bloa-rqx.js → input-field-password.BtOdV0gF.js} +124 -123
  103. package/dist/chunks/input-field-password.BtOdV0gF.js.map +1 -0
  104. package/dist/chunks/{input-field-phone-number.B3qzZKuP.js → input-field-phone-number.Dq-LnGag.js} +3 -3
  105. package/dist/chunks/{input-field-phone-number.B3qzZKuP.js.map → input-field-phone-number.Dq-LnGag.js.map} +1 -1
  106. package/dist/chunks/input-field.Bg77qHT2.js +157 -0
  107. package/dist/chunks/input-field.Bg77qHT2.js.map +1 -0
  108. package/dist/chunks/{menu.BCD4FW54.js → menu.EgYjFAku.js} +2 -2
  109. package/dist/chunks/{menu.BCD4FW54.js.map → menu.EgYjFAku.js.map} +1 -1
  110. package/dist/chunks/{modal-fullscreen.1OdCgyca.js → modal-fullscreen.BNTUOC7o.js} +2 -2
  111. package/dist/chunks/{modal-fullscreen.1OdCgyca.js.map → modal-fullscreen.BNTUOC7o.js.map} +1 -1
  112. package/dist/chunks/{modal.xY5aFhAO.js → modal.OvB4kEGR.js} +4 -4
  113. package/dist/chunks/{modal.xY5aFhAO.js.map → modal.OvB4kEGR.js.map} +1 -1
  114. package/dist/chunks/{pagination.Cl7SzoId.js → pagination.Dw153NzQ.js} +115 -115
  115. package/dist/chunks/pagination.Dw153NzQ.js.map +1 -0
  116. package/dist/chunks/{popover.B05xkQ4e.js → popover.BGHbPUOr.js} +2 -2
  117. package/dist/chunks/{popover.B05xkQ4e.js.map → popover.BGHbPUOr.js.map} +1 -1
  118. package/dist/chunks/promo-banner.Bbc2U3S3.js.map +1 -1
  119. package/dist/chunks/{radio-group.CtPG_iiI.js → radio-group.4_KKjvAm.js} +3 -3
  120. package/dist/chunks/{radio-group.CtPG_iiI.js.map → radio-group.4_KKjvAm.js.map} +1 -1
  121. package/dist/chunks/{rich-text-editor.CLxVaskq.js → rich-text-editor.CRJRvfJn.js} +5 -7
  122. package/dist/chunks/{rich-text-editor.CLxVaskq.js.map → rich-text-editor.CRJRvfJn.js.map} +1 -1
  123. package/dist/chunks/{search-bar.CadVBoj0.js → search-bar.BTZSePJh.js} +3 -3
  124. package/dist/chunks/{search-bar.CadVBoj0.js.map → search-bar.BTZSePJh.js.map} +1 -1
  125. package/dist/chunks/{secondary-nav.OwimHNCb.js → secondary-nav.BBhSBNn7.js} +2 -2
  126. package/dist/chunks/{secondary-nav.OwimHNCb.js.map → secondary-nav.BBhSBNn7.js.map} +1 -1
  127. package/dist/chunks/{selection-card-group.CoqBRUT8.js → selection-card-group.0o5T4tab.js} +3 -3
  128. package/dist/chunks/{selection-card-group.CoqBRUT8.js.map → selection-card-group.0o5T4tab.js.map} +1 -1
  129. package/dist/chunks/{sidepanel.CI8fu1Q3.js → sidepanel.Dt-BnFzN.js} +2 -2
  130. package/dist/chunks/{sidepanel.CI8fu1Q3.js.map → sidepanel.Dt-BnFzN.js.map} +1 -1
  131. package/dist/chunks/step.DMMofD4B.js +217 -0
  132. package/dist/chunks/step.DMMofD4B.js.map +1 -0
  133. package/dist/chunks/{structured-list-item.tox2Kcb6.js → structured-list-item.Bnn6-Z3q.js} +3 -3
  134. package/dist/chunks/{structured-list-item.tox2Kcb6.js.map → structured-list-item.Bnn6-Z3q.js.map} +1 -1
  135. package/dist/chunks/summary-grid.types.DsvtLg3D.js +337 -0
  136. package/dist/chunks/summary-grid.types.DsvtLg3D.js.map +1 -0
  137. package/dist/chunks/tab.BhWPBxcB.js +192 -0
  138. package/dist/chunks/tab.BhWPBxcB.js.map +1 -0
  139. package/dist/chunks/{tabs.keys.Bc2pSKRw.js → tabs.keys.Cb4Vw5Jh.js} +3 -3
  140. package/dist/chunks/{tabs.keys.Bc2pSKRw.js.map → tabs.keys.Cb4Vw5Jh.js.map} +1 -1
  141. package/dist/chunks/{textarea.BPeDUAPL.js → textarea.RAU710Uw.js} +83 -80
  142. package/dist/chunks/textarea.RAU710Uw.js.map +1 -0
  143. package/dist/chunks/{timeline-item.CS9ZDOsm.js → timeline-item.Dz66luo5.js} +11 -12
  144. package/dist/chunks/timeline-item.Dz66luo5.js.map +1 -0
  145. package/dist/chunks/{tutorial.DJ_Cwp9i.js → tutorial.DAKO-fKz.js} +4 -4
  146. package/dist/chunks/{tutorial.DJ_Cwp9i.js.map → tutorial.DAKO-fKz.js.map} +1 -1
  147. package/dist/chunks/{use-cached-selected-values.DNOmzQVy.js → use-cached-selected-values.DQPABFfG.js} +538 -498
  148. package/dist/chunks/use-cached-selected-values.DQPABFfG.js.map +1 -0
  149. package/dist/code-snippet.js +1 -1
  150. package/dist/dashboard-template.js +1 -1
  151. package/dist/dashed-underline.js +1 -1
  152. package/dist/data-grid-template.js +1 -1
  153. package/dist/data-grid.js +1 -1
  154. package/dist/date-picker.js +2 -2
  155. package/dist/date-range-picker.js +2 -2
  156. package/dist/date.js +1 -1
  157. package/dist/dropdown.js +4 -4
  158. package/dist/file-uploader.js +1 -1
  159. package/dist/filter-bar.js +1 -1
  160. package/dist/header-with-views.js +1 -1
  161. package/dist/header.js +1 -1
  162. package/dist/index.js +45 -45
  163. package/dist/info-icon.js +1 -1
  164. package/dist/input-field-password.js +1 -1
  165. package/dist/input-field-phone-number.js +1 -1
  166. package/dist/input-field.js +1 -1
  167. package/dist/internal.js +8 -8
  168. package/dist/menu.js +1 -1
  169. package/dist/modal-fullscreen.js +1 -1
  170. package/dist/modal.js +2 -2
  171. package/dist/pagination.js +1 -1
  172. package/dist/popover.js +1 -1
  173. package/dist/radio-group.js +1 -1
  174. package/dist/rich-text-editor.js +1 -1
  175. package/dist/search-bar.js +2 -2
  176. package/dist/secondary-nav.js +1 -1
  177. package/dist/selection-card.js +1 -1
  178. package/dist/sidepanel.js +1 -1
  179. package/dist/stepper.js +1 -1
  180. package/dist/structured-list.js +1 -1
  181. package/dist/styles/bento-dark.css +1 -0
  182. package/dist/styles/bento-light.css +1 -0
  183. package/dist/styles/bento.css +1 -0
  184. package/dist/styles/legacy.css +1 -0
  185. package/dist/styles/styleguide.css +1 -0
  186. package/dist/summary-grid.js +1 -1
  187. package/dist/tabs.js +1 -1
  188. package/dist/textarea.js +1 -1
  189. package/dist/timeline.js +1 -1
  190. package/dist/tutorial.js +1 -1
  191. package/dist/web-types.json +261 -81
  192. package/package.json +6 -6
  193. package/dist/assets/tabs.css +0 -1
  194. package/dist/chunks/action-bar.DHdrZtmW.js.map +0 -1
  195. package/dist/chunks/button-actions-with-menu.CYkEoiee.js +0 -166
  196. package/dist/chunks/button-actions-with-menu.CYkEoiee.js.map +0 -1
  197. package/dist/chunks/button-actions._OIvTdKt.js.map +0 -1
  198. package/dist/chunks/calendar.DbTC35rM.js +0 -1167
  199. package/dist/chunks/calendar.DbTC35rM.js.map +0 -1
  200. package/dist/chunks/copy.CXeLbvUP.js +0 -129
  201. package/dist/chunks/copy.CXeLbvUP.js.map +0 -1
  202. package/dist/chunks/data-grid-template.DtFRjaR8.js.map +0 -1
  203. package/dist/chunks/data-grid.D4oeTUhn.js.map +0 -1
  204. package/dist/chunks/date-range-picker.D9lyIoO-.js.map +0 -1
  205. package/dist/chunks/date.dYFFEunA.js +0 -987
  206. package/dist/chunks/date.dYFFEunA.js.map +0 -1
  207. package/dist/chunks/dropdown-default-textbox.BNuuA4ES.js.map +0 -1
  208. package/dist/chunks/file-uploader.DyjdNLOa.js.map +0 -1
  209. package/dist/chunks/get-date-locale.BN8xEjY0.js.map +0 -1
  210. package/dist/chunks/header-with-views.Ds9mcwmp.js.map +0 -1
  211. package/dist/chunks/index.BDuTpjD8.js +0 -40
  212. package/dist/chunks/index.BDuTpjD8.js.map +0 -1
  213. package/dist/chunks/index.DD7TppDb.js +0 -10
  214. package/dist/chunks/index.DD7TppDb.js.map +0 -1
  215. package/dist/chunks/info-icon.B9aTl1nU.js +0 -41
  216. package/dist/chunks/info-icon.B9aTl1nU.js.map +0 -1
  217. package/dist/chunks/input-field-password.Bloa-rqx.js.map +0 -1
  218. package/dist/chunks/input-field.B_3nZFYz.js +0 -152
  219. package/dist/chunks/input-field.B_3nZFYz.js.map +0 -1
  220. package/dist/chunks/pagination.Cl7SzoId.js.map +0 -1
  221. package/dist/chunks/step.dNTg2rtW.js +0 -217
  222. package/dist/chunks/step.dNTg2rtW.js.map +0 -1
  223. package/dist/chunks/summary-grid.types.CkUIw703.js +0 -301
  224. package/dist/chunks/summary-grid.types.CkUIw703.js.map +0 -1
  225. package/dist/chunks/tabs.Dx6teJGW.js +0 -205
  226. package/dist/chunks/tabs.Dx6teJGW.js.map +0 -1
  227. package/dist/chunks/textarea.BPeDUAPL.js.map +0 -1
  228. package/dist/chunks/timeline-item.CS9ZDOsm.js.map +0 -1
  229. package/dist/chunks/use-cached-selected-values.DNOmzQVy.js.map +0 -1
@@ -0,0 +1,157 @@
1
+ import { defineComponent as oe, useAttrs as ae, useSlots as ne, ref as c, provide as re, inject as k, toRef as ie, computed as n, toRefs as se } from "vue";
2
+ import { a as de, I as le, b as ue, B as pe } from "./dropdown.HA6ISg2h.js";
3
+ import { p as T, d as M, B as ce } from "./typography.J1v_SPG3.js";
4
+ import { g as f } from "./generate-uid.NJ8tVoha.js";
5
+ import { g as fe } from "./get-slot-text.BQS5Olxm.js";
6
+ import { u as _e } from "./aria-label.CaUURpnB.js";
7
+ import { u as be } from "./i18n.BQkEbtPM.js";
8
+ import { u as ye } from "./use-form-layout-loading.D3lALhtC.js";
9
+ import { u as he } from "./use-has-slot.C9lQZ6nz.js";
10
+ import { F as we, E as De } from "./error-message.BgxnwPLF.js";
11
+ import { n as me } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
12
+ import "../assets/input-field.css";
13
+ var d = /* @__PURE__ */ ((o) => (o.DEFAULT = "default", o.PAYMENT_METHOD = "payment-method", o.STATIC_VALUE = "static-value", o.DROPDOWN = "dropdown", o))(d || {}), s = /* @__PURE__ */ ((o) => (o.START = "start", o.END = "end", o))(s || {}), _ = /* @__PURE__ */ ((o) => (o.CONDENSED = "condensed", o.DISABLED = "disabled", o.READONLY = "readonly", o.ERROR = "error", o))(_ || {}), A = /* @__PURE__ */ ((o) => (o.SEARCH = "search", o.TEXT = "text", o.NUMBER = "number", o))(A || {}), ve = /* @__PURE__ */ ((o) => (o.INPUT = "input", o.ESCAPE_PRESSED = "escape-pressed", o.UPDATE_DROPDOWN = "update:dropdown", o.DROPDOWN_INPUT = "dropdown-input", o.FOCUS = "focus", o.CHANGE = "change", o.BLUR = "blur", o.KEYDOWN = "keydown", o))(ve || {});
14
+ const Ee = {
15
+ "en-US": {
16
+ ariaLabelDropdownFallback: "{inputLabel} Dropdown",
17
+ ariaLabelFallback: "Input field"
18
+ }
19
+ }, Te = {
20
+ i18n: { messages: Ee }
21
+ }, Ae = /* @__PURE__ */ oe({
22
+ ...Te,
23
+ __name: "input-field",
24
+ props: {
25
+ ariaHidden: { type: Boolean, default: !0 },
26
+ ariaLabel: { default: void 0 },
27
+ condensed: { type: Boolean, default: !1 },
28
+ disabled: { type: Boolean, default: !1 },
29
+ dropdown: { default: void 0 },
30
+ dropdownPosition: { default: s.START },
31
+ error: { type: Boolean, default: !1 },
32
+ errorMessage: { default: null },
33
+ optional: { type: Boolean, default: !1 },
34
+ placeholder: { default: "" },
35
+ required: { type: Boolean, default: !1 },
36
+ readonly: { type: Boolean, default: !1 },
37
+ slashedZero: { type: Boolean, default: !1 },
38
+ staticValue: { default: "" },
39
+ staticValuePosition: { default: s.START },
40
+ tooltipText: { default: null },
41
+ type: { default: A.TEXT },
42
+ value: { default: void 0 },
43
+ variant: { default: d.DEFAULT }
44
+ },
45
+ emits: ["update:dropdown", "blur", "change", "dropdown-input", "escape-pressed", "focus", "keydown", "keyup", "input"],
46
+ setup(o, { expose: t, emit: a }) {
47
+ const e = o, r = ae(), b = ne(), { t: h } = be(), y = he(b), S = c(null), I = c(null), U = f("input"), w = f("input-dropdown"), D = f("input-static-value"), g = f("input-description"), N = f("input-error"), m = c(!1);
48
+ re(de, !0);
49
+ const V = k(le, c(void 0)), x = () => {
50
+ m.value = !0, a("focus");
51
+ }, $ = () => {
52
+ m.value = !1, a("blur");
53
+ }, { isReadOnly: l } = ye(ie(e, "readonly")), H = n(
54
+ () => {
55
+ var i;
56
+ return l.value || ((i = e.dropdown) == null ? void 0 : i.readonly);
57
+ }
58
+ ), u = n(
59
+ () => e.variant === d.STATIC_VALUE && !!b.staticValue
60
+ ), Y = n(() => e.variant === d.DEFAULT), W = n(() => e.variant === d.PAYMENT_METHOD), K = n(
61
+ () => u.value && e.staticValuePosition === s.START
62
+ ), q = n(
63
+ () => u.value && e.staticValuePosition === s.END
64
+ ), p = n(() => e.variant === d.DROPDOWN && !!e.dropdown), J = n(
65
+ () => p.value && e.dropdownPosition === s.START
66
+ ), j = n(
67
+ () => p.value && e.dropdownPosition === s.END
68
+ ), v = n(
69
+ () => !e.disabled && !l.value && (!!e.errorMessage || e.error)
70
+ ), z = n(() => p.value === !0 && u.value === !0 ? `${D} ${w}` : p.value === !0 ? `${w}` : u.value === !0 ? `${D}` : null), O = n(() => h("ariaLabelFallback")), C = n(
71
+ () => h("ariaLabelDropdownFallback", { inputLabel: R.value })
72
+ ), L = c(r["aria-label"]), { ariaLabel: P } = se(e), R = _e({
73
+ ariaLabel: L.value,
74
+ // TODO: take this line away when the aria-label props is removed
75
+ label: P,
76
+ defaultFallback: y("default") ? fe(b)("default") : O
77
+ }), X = n(
78
+ () => `${y("description") ? g : ""} ${v.value && e.errorMessage ? N : ""}`
79
+ ), Z = n(() => ({
80
+ [`b-input-field--${_.CONDENSED}`]: e.condensed,
81
+ [`b-input-field--${_.DISABLED}`]: e.disabled,
82
+ [`b-input-field--${_.READONLY}`]: l.value,
83
+ [`b-input-field--${_.ERROR}`]: v.value,
84
+ "b-input-field--slashed-zero": e.slashedZero
85
+ })), G = n(() => ({
86
+ "aria-label": C.value,
87
+ ...e.dropdown
88
+ })), Q = (i) => {
89
+ const te = i.target.value;
90
+ !e.disabled && !l.value && a("input", te);
91
+ }, ee = (i) => {
92
+ a("dropdown-input", i), a("update:dropdown", { ...e == null ? void 0 : e.dropdown, value: i });
93
+ }, E = () => {
94
+ S.value.focus();
95
+ }, B = () => {
96
+ e.variant === "dropdown" ? I.value.focus() : E();
97
+ };
98
+ t({
99
+ focusInput: E,
100
+ focus: B
101
+ });
102
+ const F = k(ue, "");
103
+ return !Object.values(A).includes(e.type) && !F && (e.type === "tel" ? T(
104
+ `"bento-input-field" dropdown does not support the type '${e.type}', use "bento-input-field-phone-number" instead.`
105
+ ) : e.type === "password" ? T(
106
+ `"bento-input-field" dropdown does not support the type '${e.type}', use "bento-input-field-password" instead.`
107
+ ) : T(`"bento-input-field" dropdown does not support the type '${e.type}'`)), e.error && M(
108
+ 'BentoInputField "error" property',
109
+ `Use the BentoInputField "errorMessage" property instead to indicate that there is a modifier error.
110
+ Having the field as "undefined" will hide/remove the error.
111
+ <bento-dropdown errorMessage="Error message text" />`,
112
+ "2.0.0"
113
+ ), y("defaultIconBefore") && M(
114
+ 'BentoInputField "defaultIconBefore" slot',
115
+ `Use the BentoInputField "iconBefore" slot instead to add an icon at the left side of the input field
116
+ <bento-input-field>
117
+ <template #iconBefore>
118
+ <my-icon-goes-here />
119
+ </template>
120
+ </bento-input-field>`,
121
+ "2.0.0"
122
+ ), { __sfc: !0, attrs: r, slots: b, props: e, emit: a, t: h, hasSlot: y, inputFieldElement: S, inputDropdownElement: I, inputFieldId: U, dropdownId: w, staticValueId: D, descriptionId: g, errorId: N, isFocused: m, hint: V, onFocus: x, onBlur: $, isReadOnly: l, isDropdownReadOnly: H, shouldShowStaticValue: u, isDefaultVariant: Y, isPaymentMethodVariant: W, shouldDisplayStaticValueAtStart: K, shouldDisplayStaticValueAtEnd: q, shouldShowDropdown: p, shouldDisplayDropdownAtStart: J, shouldDisplayDropdownAtEnd: j, shouldShowError: v, computedAriaOwns: z, computedAriaLabelFallbackMessage: O, computedAriaLabelDropdowFallback: C, ariaLabelAttribute: L, ariaLabel: P, computedAriaLabel: R, computedAriaDescribedBy: X, inputFieldConditionalClasses: Z, inputFieldDropdownProps: G, onInput: Q, onDropdownInput: ee, focusInput: E, focus: B, inputFieldParentComponent: F, BentoDropdown: pe, BentoTypography: ce, ErrorMessage: De, FieldLabel: we };
123
+ }
124
+ });
125
+ var Se = function() {
126
+ var t = this, a = t._self._c, e = t._self._setupProxy;
127
+ return a(e.BentoTypography, { staticClass: "b-input-field", class: e.inputFieldConditionalClasses, attrs: { "data-testid": "input-text-container", el: "div", variant: "body" } }, [e.hasSlot("default") ? a(e.FieldLabel, { attrs: { for: e.inputFieldId, "data-testid": "input-field-label", "tooltip-text": t.tooltipText, optional: t.optional, required: t.required }, on: { click: e.focusInput } }, [t._t("default")], 2) : t._e(), a("div", { staticClass: "b-input-field__input-box", attrs: { "data-testid": "input-box", "aria-disabled": t.disabled }, on: { click: e.focusInput } }, [e.isDefaultVariant && (e.hasSlot("defaultIconBefore") || e.hasSlot("iconBefore")) ? a("span", { staticClass: "b-input-field__icon-before", attrs: { "aria-hidden": t.ariaHidden ? "true" : void 0 } }, [e.hasSlot("iconBefore") ? t._t("iconBefore") : t._e(), e.hasSlot("defaultIconBefore") && !e.hasSlot("iconBefore") ? t._t("defaultIconBefore") : t._e()], 2) : t._e(), e.isPaymentMethodVariant && e.hasSlot("paymentMethod") ? a("span", { staticClass: "b-input-field__payment-method", attrs: { "aria-hidden": t.ariaHidden ? "true" : void 0 } }, [t._t("paymentMethod")], 2) : t._e(), e.shouldDisplayDropdownAtStart ? a("div", { staticClass: "b-input-field__dropdown b-input-field__dropdown--start", attrs: { id: e.dropdownId }, on: { click: function(r) {
128
+ r.stopPropagation();
129
+ } } }, [t.dropdown ? a(e.BentoDropdown, t._b({ ref: "inputDropdownElement", attrs: { disabled: t.disabled, readonly: e.isDropdownReadOnly }, on: { input: e.onDropdownInput } }, "bento-dropdown", e.inputFieldDropdownProps, !1)) : t._e()], 1) : t._e(), e.shouldDisplayStaticValueAtStart ? a(e.BentoTypography, { staticClass: "b-input-field__static-value b-input-field__static-value--start", attrs: { id: e.staticValueId, el: "span", variant: "body" } }, [t._t("staticValue")], 2) : t._e(), a("div", { staticClass: "b-input-field__input-container" }, [a("input", t._b({ ref: "inputFieldElement", staticClass: "b-input-field__input", attrs: { id: e.inputFieldId, "aria-label": e.computedAriaLabel, "aria-describedby": e.computedAriaDescribedBy, "aria-owns": e.computedAriaOwns, "aria-invalid": e.shouldShowError, placeholder: t.placeholder, type: t.type, disabled: t.disabled, readonly: e.isReadOnly }, domProps: { value: t.value }, on: { input: e.onInput, change: function(r) {
130
+ return e.emit("change");
131
+ }, focus: e.onFocus, blur: e.onBlur, keydown: [function(r) {
132
+ return e.emit("keydown", r);
133
+ }, function(r) {
134
+ return !r.type.indexOf("key") && t._k(r.keyCode, "esc", 27, r.key, ["Esc", "Escape"]) ? null : e.emit("escape-pressed");
135
+ }], keyup: function(r) {
136
+ return e.emit("keyup", r);
137
+ } } }, "input", e.attrs, !1)), e.hint && e.isFocused && t.value ? a(e.BentoTypography, { staticClass: "b-input-field__hint", attrs: { el: "span" } }, [t._v(" " + t._s(e.hint) + " ")]) : t._e()], 1), e.hasSlot("iconAfter") ? a("span", { staticClass: "b-input-field__icon-after", attrs: { "aria-hidden": t.ariaHidden ? "true" : void 0, "data-testid": "input-text__icon-after" } }, [t._t("iconAfter")], 2) : t._e(), e.shouldDisplayStaticValueAtEnd ? a(e.BentoTypography, { staticClass: "b-input-field__static-value b-input-field__static-value--end", attrs: { id: e.staticValueId, el: "span", variant: "body" } }, [t._t("staticValue")], 2) : t._e(), e.shouldDisplayDropdownAtEnd ? a("div", { staticClass: "b-input-field__dropdown b-input-field__dropdown--end", attrs: { id: e.dropdownId, "data-testid": "input-field-dropdown-container-end" }, on: { click: function(r) {
138
+ r.stopPropagation();
139
+ } } }, [t.dropdown ? a(e.BentoDropdown, t._b({ ref: "inputDropdownElement", attrs: { id: e.dropdownId, disabled: t.disabled, readonly: e.isDropdownReadOnly }, on: { input: e.onDropdownInput } }, "bento-dropdown", e.inputFieldDropdownProps, !1)) : t._e()], 1) : t._e()], 1), e.shouldShowError && t.errorMessage ? a(e.ErrorMessage, { staticClass: "b-input-field__error-message", attrs: { id: e.errorId, "error-message": t.errorMessage } }) : t._e(), e.hasSlot("description") ? a("span", { staticClass: "b-input-field__description", attrs: { id: e.descriptionId }, on: { click: e.focusInput } }, [a(e.BentoTypography, { attrs: { el: "span", variant: "body" } }, [t._t("description", null, { id: "description" })], 2)], 1) : t._e()], 1);
140
+ }, Ie = [], ge = /* @__PURE__ */ me(
141
+ Ae,
142
+ Se,
143
+ Ie,
144
+ !1,
145
+ null,
146
+ "565d1f9b"
147
+ );
148
+ const Ve = ge.exports;
149
+ export {
150
+ Ve as B,
151
+ d as a,
152
+ s as b,
153
+ _ as c,
154
+ A as d,
155
+ ve as e
156
+ };
157
+ //# sourceMappingURL=input-field.Bg77qHT2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-field.Bg77qHT2.js","sources":["../../src/components/input-field/input-field.types.ts","../../src/components/input-field/input-field.vue"],"sourcesContent":["import { BentoDropdown } from '@/components/dropdown/';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldVariant {\n DEFAULT = 'default',\n PAYMENT_METHOD = 'payment-method',\n STATIC_VALUE = 'static-value',\n DROPDOWN = 'dropdown',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldElementPosition {\n START = 'start',\n END = 'end',\n}\n\nexport enum BentoInputFieldStateClass {\n CONDENSED = 'condensed',\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldType {\n SEARCH = 'search',\n TEXT = 'text',\n NUMBER = 'number',\n}\n\nexport type BentoInputFieldValue = string | number;\n\ntype DropdownProps = InstanceType<typeof BentoDropdown>['$props'];\nexport type BentoInputDropdownProps = {\n /**\n * Text that labels the dropdown element\n */\n 'aria-label'?: string;\n /**\n * Enables dynamic filtering\n */\n dynamicFiltering?: DropdownProps['dynamicFiltering'];\n /**\n * List of available items\n */\n items: DropdownProps['items'];\n /**\n * Sets the dropdown in read-only mode\n */\n readonly?: DropdownProps['readonly'];\n /**\n * Selected value of the dropdown\n */\n value?: DropdownProps['value'];\n};\n\n/**\n * @deprecated The use of these enums is no longer supported.\n * Use `v-on:` or `@` to listen to the events being emitted.\n * This enum will be removed in 2.0.\n */\nexport enum BentoInputFieldEvent {\n INPUT = 'input',\n ESCAPE_PRESSED = 'escape-pressed',\n UPDATE_DROPDOWN = 'update:dropdown',\n DROPDOWN_INPUT = 'dropdown-input',\n FOCUS = 'focus',\n CHANGE = 'change',\n BLUR = 'blur',\n KEYDOWN = 'keydown',\n}\n\nexport interface BentoInputFieldProps {\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n ariaHidden?: boolean;\n\n /**\n * Text that labels an the input element\n *\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n ariaLabel?: string;\n\n /**\n * Reduces height of the input\n */\n condensed?: boolean;\n\n /**\n * Disables the possibility of changing value in the input-field\n */\n disabled?: boolean;\n\n /**\n * Dropdown props for the small selectable dropdown menu.\n * Properties supported:\n *\n * - `aria-label`: Text that labels the dropdown element\n * - `dynamicFiltering`: Enables dynamic filtering\n * - `items`: List of available items\n * - `readonly`: Sets the dropdown in read-only mode\n * - `value`: Selected value of the dropdown\n */\n dropdown?: BentoInputDropdownProps;\n\n /**\n * Position of the dropdown before or after input value\n */\n dropdownPosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n\n /**\n * Adds error validation class for outlining input-field.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n error?: boolean;\n\n /**\n * Renders input-field with an error state and the error message beneath the input box\n */\n errorMessage?: string;\n\n /**\n * Highlights the dropdown is optional.\n */\n optional?: boolean;\n\n /**\n * Text displayed as the placeholder of the input-field\n */\n placeholder?: string;\n\n /**\n * Highlights the dropdown is required.\n */\n required?: boolean;\n\n /**\n * Setting this property to true will set the input field to read only state.\n */\n readonly?: boolean;\n\n /**\n * Renders a font numeric style with slashed zeros instead of normal ones.\n */\n slashedZero?: boolean;\n\n /**\n * Static text that displayed before or after input value\n * Applicable to the Static Value variant\n */\n staticValue?: string;\n\n /**\n * Position of Static Value before or after input value\n */\n staticValuePosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText?: string;\n\n /**\n * A string specifying the type of control to render.\n * All `input` types are available but only `search`, `text` and `number` are fully supported.\n *\n * If `type` is `search`, use `bento-search-bar` instead.\n */\n type?: BentoInputFieldType | `${BentoInputFieldType}` | HTMLInputElement['type'];\n\n /**\n * Text displayed as the value of the input-field\n */\n value?: BentoInputFieldValue;\n\n /**\n * Describes the different variants for the input element\n */\n variant?: BentoInputFieldVariant | `${BentoInputFieldVariant}`;\n}\n","<template>\n <bento-typography\n class=\"b-input-field\"\n data-testid=\"input-text-container\"\n :class=\"inputFieldConditionalClasses\"\n el=\"div\"\n variant=\"body\"\n >\n <field-label\n v-if=\"hasSlot('default')\"\n :for=\"inputFieldId\"\n data-testid=\"input-field-label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n @click=\"focusInput\"\n >\n <slot></slot>\n </field-label>\n\n <div class=\"b-input-field__input-box\" data-testid=\"input-box\" :aria-disabled=\"disabled\" @click=\"focusInput\">\n <!-- Optional Icon for Default text variant -->\n <span\n v-if=\"isDefaultVariant && (hasSlot('defaultIconBefore') || hasSlot('iconBefore'))\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-before\"\n >\n <slot v-if=\"hasSlot('iconBefore')\" name=\"iconBefore\" />\n <slot v-if=\"hasSlot('defaultIconBefore') && !hasSlot('iconBefore')\" name=\"defaultIconBefore\" />\n </span>\n\n <!-- Mandatory Icon for Payment Method variant -->\n <span\n v-if=\"isPaymentMethodVariant && hasSlot('paymentMethod')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__payment-method\"\n >\n <slot name=\"paymentMethod\" />\n </span>\n\n <!-- Dropdown at start -->\n <div\n v-if=\"shouldDisplayDropdownAtStart\"\n :id=\"dropdownId\"\n class=\"b-input-field__dropdown b-input-field__dropdown--start\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n ref=\"inputDropdownElement\"\n v-bind=\"inputFieldDropdownProps\"\n :disabled=\"disabled\"\n :readonly=\"isDropdownReadOnly\"\n @input=\"onDropdownInput\"\n />\n </div>\n\n <!-- Static Value at start -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtStart\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--start\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n <div class=\"b-input-field__input-container\">\n <input\n :id=\"inputFieldId\"\n v-bind=\"attrs\"\n ref=\"inputFieldElement\"\n class=\"b-input-field__input\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"computedAriaDescribedBy\"\n :aria-owns=\"computedAriaOwns\"\n :aria-invalid=\"shouldShowError\"\n :placeholder=\"placeholder\"\n :type=\"type\"\n :value=\"value\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onInput\"\n @change=\"emit('change')\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @keydown=\"emit('keydown', $event)\"\n @keyup=\"emit('keyup', $event)\"\n @keydown.esc=\"emit('escape-pressed')\"\n />\n\n <!-- Hint at the end -->\n <bento-typography v-if=\"hint && isFocused && value\" el=\"span\" class=\"b-input-field__hint\">\n {{ hint }}\n </bento-typography>\n </div>\n\n <span\n v-if=\"hasSlot('iconAfter')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-after\"\n data-testid=\"input-text__icon-after\"\n >\n <slot name=\"iconAfter\" />\n </span>\n\n <!-- Static Value at the end -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtEnd\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--end\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n\n <!-- Dropdown at end -->\n <div\n v-if=\"shouldDisplayDropdownAtEnd\"\n :id=\"dropdownId\"\n data-testid=\"input-field-dropdown-container-end\"\n class=\"b-input-field__dropdown b-input-field__dropdown--end\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n :id=\"dropdownId\"\n ref=\"inputDropdownElement\"\n v-bind=\"inputFieldDropdownProps\"\n :disabled=\"disabled\"\n :readonly=\"isDropdownReadOnly\"\n @input=\"onDropdownInput\"\n />\n </div>\n </div>\n\n <error-message\n v-if=\"shouldShowError && !!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-input-field__error-message\"\n />\n\n <span v-if=\"hasSlot('description')\" :id=\"descriptionId\" class=\"b-input-field__description\" @click=\"focusInput\">\n <bento-typography el=\"span\" variant=\"body\">\n <slot id=\"description\" name=\"description\" />\n </bento-typography>\n </span>\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide, Ref, ref, toRef, toRefs, useAttrs, useSlots } from 'vue';\n\n // Components\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { generateUid } from '@/core/utils/ts';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import {\n INPUT_FIELD_COMPONENT_INJECTION_KEY,\n INPUT_FIELD_HINT_INJECTION_KEY,\n INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY,\n } from '@/components/input-field/input-field.keys';\n\n // Composables\n import { useFormLayoutFieldLoading, useHasSlot } from '@/composables';\n\n // Types\n import {\n BentoInputDropdownProps,\n BentoInputFieldElementPosition,\n BentoInputFieldProps,\n BentoInputFieldStateClass,\n BentoInputFieldType,\n BentoInputFieldVariant,\n } from './input-field.types';\n import { BentoListboxSelectedValue } from '@/types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n\n const props = defineProps({\n ariaHidden: { type: Boolean, default: true },\n ariaLabel: { default: undefined },\n condensed: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n dropdown: { default: undefined },\n dropdownPosition: { default: BentoInputFieldElementPosition.START },\n error: { type: Boolean, default: false },\n errorMessage: { default: null },\n optional: { type: Boolean, default: false },\n placeholder: { default: '' },\n required: { type: Boolean, default: false },\n readonly: { type: Boolean, default: false },\n slashedZero: { type: Boolean, default: false },\n staticValue: { default: '' },\n staticValuePosition: { default: BentoInputFieldElementPosition.START },\n tooltipText: { default: null },\n type: { default: BentoInputFieldType.TEXT },\n value: { default: undefined },\n variant: { default: BentoInputFieldVariant.DEFAULT }\n});\n\n const emit = defineEmits([\"update:dropdown\", \"blur\", \"change\", \"dropdown-input\", \"escape-pressed\", \"focus\", \"keydown\", \"keyup\", \"input\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n const inputFieldElement = ref(null);\n const inputDropdownElement = ref(null);\n const inputFieldId = generateUid('input');\n const dropdownId = generateUid('input-dropdown');\n const staticValueId = generateUid('input-static-value');\n const descriptionId = generateUid('input-description');\n const errorId = generateUid('input-error');\n const isFocused = ref(false);\n\n // Provide INPUT_FIELD_COMPONENT_INJECTION_KEY as true, to set the input only dropdown size variant in the BentoDropdown comp\n provide(INPUT_FIELD_COMPONENT_INJECTION_KEY, true);\n // Renders the input with a hint if a string is provided\n const hint = inject<Ref<string | undefined>>(INPUT_FIELD_HINT_INJECTION_KEY, ref(undefined));\n\n const onFocus = () => {\n isFocused.value = true;\n emit('focus');\n };\n\n const onBlur = () => {\n isFocused.value = false;\n emit('blur');\n };\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const isDropdownReadOnly = computed<BentoInputDropdownProps['readonly']>(\n () => isReadOnly.value || props.dropdown?.readonly\n );\n\n const shouldShowStaticValue = computed(\n () => props.variant === BentoInputFieldVariant.STATIC_VALUE && !!slots.staticValue\n );\n\n const isDefaultVariant = computed(() => props.variant === BentoInputFieldVariant.DEFAULT);\n\n const isPaymentMethodVariant = computed(() => props.variant === BentoInputFieldVariant.PAYMENT_METHOD);\n\n const shouldDisplayStaticValueAtStart = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayStaticValueAtEnd = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowDropdown = computed(() => props.variant === BentoInputFieldVariant.DROPDOWN && !!props.dropdown);\n const shouldDisplayDropdownAtStart = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayDropdownAtEnd = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.error)\n );\n\n const computedAriaOwns = computed(() => {\n if (shouldShowDropdown.value === true && shouldShowStaticValue.value === true) {\n return `${staticValueId} ${dropdownId}`;\n }\n if (shouldShowDropdown.value === true) {\n return `${dropdownId}`;\n }\n if (shouldShowStaticValue.value === true) {\n return `${staticValueId}`;\n }\n return null;\n });\n\n // vue-i18n issue with t() used in script - direct usage in template works\n // requires either createI18n({ legacy: false }) or to be wrapped in computed()\n const computedAriaLabelFallbackMessage = computed(() => t('ariaLabelFallback'));\n const computedAriaLabelDropdowFallback = computed(() =>\n t('ariaLabelDropdownFallback', { inputLabel: computedAriaLabel.value })\n );\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: hasSlot('default')\n ? (getSlotText(slots)('default') as string)\n : computedAriaLabelFallbackMessage,\n });\n\n const computedAriaDescribedBy = computed(\n () =>\n `${hasSlot('description') ? descriptionId : ''} ${\n shouldShowError.value && !!props.errorMessage ? errorId : ''\n }`\n );\n\n const inputFieldConditionalClasses = computed(() => ({\n [`b-input-field--${BentoInputFieldStateClass.CONDENSED}`]: props.condensed,\n [`b-input-field--${BentoInputFieldStateClass.DISABLED}`]: props.disabled,\n [`b-input-field--${BentoInputFieldStateClass.READONLY}`]: isReadOnly.value,\n [`b-input-field--${BentoInputFieldStateClass.ERROR}`]: shouldShowError.value,\n [`b-input-field--slashed-zero`]: props.slashedZero,\n }));\n\n const inputFieldDropdownProps = computed(() => ({\n 'aria-label': computedAriaLabelDropdowFallback.value,\n ...props.dropdown,\n }));\n\n const onInput = (event: Event) => {\n const inputValue = (event.target as HTMLInputElement).value;\n if (!props.disabled && !isReadOnly.value) {\n emit('input', inputValue);\n }\n };\n\n const onDropdownInput = (selectedValue: BentoListboxSelectedValue) => {\n emit('dropdown-input', selectedValue);\n emit('update:dropdown', { ...props?.dropdown, value: selectedValue });\n };\n\n const focusInput = () => {\n inputFieldElement.value.focus();\n };\n\n const focus = () => {\n if (props.variant === 'dropdown') {\n inputDropdownElement.value.focus();\n } else {\n focusInput();\n }\n };\n\n // Expose method so that other components can focus on it in Vue3\n defineExpose({\n focusInput,\n focus,\n });\n\n const inputFieldParentComponent = inject(INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY, '');\n\n if (!Object.values(BentoInputFieldType).includes(props.type as BentoInputFieldType) && !inputFieldParentComponent) {\n if (props.type === 'tel') {\n printDevelopmentWarning(\n `\"bento-input-field\" dropdown does not support the type '${props.type}', use \"bento-input-field-phone-number\" instead.`\n );\n } else if (props.type === 'password') {\n printDevelopmentWarning(\n `\"bento-input-field\" dropdown does not support the type '${props.type}', use \"bento-input-field-password\" instead.`\n );\n } else {\n printDevelopmentWarning(`\"bento-input-field\" dropdown does not support the type '${props.type}'`);\n }\n }\n\n /**\n * Deprecations\n */\n if (props.error) {\n deprecate(\n 'BentoInputField \"error\" property',\n `Use the BentoInputField \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n if (hasSlot('defaultIconBefore')) {\n deprecate(\n 'BentoInputField \"defaultIconBefore\" slot',\n `Use the BentoInputField \"iconBefore\" slot instead to add an icon at the left side of the input field\n <bento-input-field>\n \\t<template #iconBefore>\n \\t\\t<my-icon-goes-here />\n \\t</template>\n </bento-input-field>`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Input field component is used to create interactive controls for web-based\n * forms in order to accept data from the user.\n *\n * @example\n * import { BentoInputField } from '@adyen/bento-vue2'\n *\n * const inputValue = ref('');\n *\n * export default {\n * components: { BentoInputField },\n * tempate: `\n * <bento-input-field\n * :value=\"inputValue\"\n * :input=\"newValue => inputValue.value = newValue\"\n * >\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-field.scss\" />\n"],"names":["BentoInputFieldVariant","BentoInputFieldVariant2","BentoInputFieldElementPosition","BentoInputFieldElementPosition2","BentoInputFieldStateClass","BentoInputFieldStateClass2","BentoInputFieldType","BentoInputFieldType2","BentoInputFieldEvent","BentoInputFieldEvent2","__default__","messages","attrs","useAttrs","slots","useSlots","t","useI18n","hasSlot","useHasSlot","inputFieldElement","ref","inputDropdownElement","inputFieldId","generateUid","dropdownId","staticValueId","descriptionId","errorId","isFocused","provide","INPUT_FIELD_COMPONENT_INJECTION_KEY","hint","inject","INPUT_FIELD_HINT_INJECTION_KEY","onFocus","emit","onBlur","isReadOnly","useFormLayoutFieldLoading","toRef","props","isDropdownReadOnly","computed","_a","shouldShowStaticValue","isDefaultVariant","isPaymentMethodVariant","shouldDisplayStaticValueAtStart","shouldDisplayStaticValueAtEnd","shouldShowDropdown","shouldDisplayDropdownAtStart","shouldDisplayDropdownAtEnd","shouldShowError","computedAriaOwns","computedAriaLabelFallbackMessage","computedAriaLabelDropdowFallback","computedAriaLabel","ariaLabelAttribute","ariaLabel","toRefs","useAriaLabel","getSlotText","computedAriaDescribedBy","inputFieldConditionalClasses","inputFieldDropdownProps","onInput","event","inputValue","onDropdownInput","selectedValue","focusInput","focus","expose","inputFieldParentComponent","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","printDevelopmentWarning","deprecate"],"mappings":";;;;;;;;;;;;AAKY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,iBAAA,kBACAA,EAAA,eAAA,gBACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,UACAA,EAAA,OAAA,QACAA,EAAA,SAAA,UAHQA,IAAAD,KAAA,CAAA,CAAA,GAqCAE,KAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,iBAAA,kBACAA,EAAA,kBAAA,mBACAA,EAAA,iBAAA,kBACAA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,OAAA,QACAA,EAAA,UAAA,WARQA,IAAAD,MAAA,CAAA,CAAA;;;;;;GCgWRE,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,GAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;iBAtOAC,IAAAC,GAAA,GACAC,IAAAC,GAAA,GA0BA,EAAA,GAAAC,EAAA,IAAAC,GAAA,GACAC,IAAAC,GAAAL,CAAA,GACAM,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAC,EAAA,OAAA,GACAC,IAAAD,EAAA,gBAAA,GACAE,IAAAF,EAAA,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CAAAH,EAAA,SACIF,EAAA,SAAAgC,EAAA;AAAA,IACJ,GAGJC,KAAA,CAAAC,MAAA;AACI,MAAAlC,EAAA,kBAAAkC,CAAA,GACAlC,EAAA,mBAAA,EAAA,GAAAK,KAAA,gBAAAA,EAAA,UAAA,OAAA6B,EAAA,CAAA;AAAA,IAAoE,GAGxEC,IAAA,MAAA;AACI,MAAAnD,EAAA,MAAA,MAAA;AAAA,IAA8B,GAGlCoD,IAAA,MAAA;AACI,MAAA/B,EAAA,YAAA,aACInB,EAAA,MAAA,MAAA,IAEAiD,EAAA;AAAA,IACJ;AAIJ,IAAAE,EAAA;AAAA,MAAa,YAAAF;AAAA,MACT,OAAAC;AAAA,IACA,CAAA;AAGJ,UAAAE,IAAAzC,EAAA0C,IAAA,EAAA;AAEA,WAAA,CAAA,OAAA,OAAArE,CAAA,EAAA,SAAAmC,EAAA,IAAA,KAAA,CAAAiC,MACIjC,EAAA,SAAA,QACImC;AAAA,MAAA,2DAAAnC,EAAA,IAAA;AAAA,IACyE,IACzEA,EAAA,SAAA,aAEAmC;AAAA,MAAA,2DAAAnC,EAAA,IAAA;AAAA,IACyE,IAGzEmC,EAAA,2DAAAnC,EAAA,IAAA,GAAA,IAORA,EAAA,SACIoC;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIR3D,EAAA,mBAAA,KACI2D;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MACA;AAAA,IAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as M, computed as h, ref as a, inject as N, onMounted as P, watch as K, nextTick as A, useSlots as G, provide as X } from "vue";
2
2
  import { B as F, D as q } from "./divider.Cc4JFWG_.js";
3
- import { a as V, B as Y } from "./popover.B05xkQ4e.js";
3
+ import { a as V, B as Y } from "./popover.BGHbPUOr.js";
4
4
  import { u as j } from "./use-click-outside.BnhTgpSt.js";
5
5
  import { u as J } from "./use-has-slot.C9lQZ6nz.js";
6
6
  import { g as Z } from "./generate-uid.NJ8tVoha.js";
@@ -511,4 +511,4 @@ export {
511
511
  fe as O,
512
512
  C as a
513
513
  };
514
- //# sourceMappingURL=menu.BCD4FW54.js.map
514
+ //# sourceMappingURL=menu.EgYjFAku.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu.BCD4FW54.js","sources":["../../src/components/menu/menu.keys.ts","../../../ui-assets/icons-16/dist/vue/options-vertical.vue","../../src/components/menu/components/menu-item/menu-item.vue","../../src/components/menu/menu.types.ts","../../src/components/data-grid/components/data-grid-cell/data-grid-cell.keys.ts","../../src/components/menu/components/menu-list-container/menu-list-container.vue","../../src/components/menu/components/sub-menu-item-list/sub-menu-item-list.vue","../../src/components/menu/composables/use-dynamic-menu-size/use-dynamic-menu-size.ts","../../src/components/menu/components/menu-item-list/menu-item-list.vue","../../src/components/menu/menu.vue"],"sourcesContent":["export const MENU_INVERSE_INJECTION_KEY = Symbol('menu inverse style injection key');\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M8 4C8.29667 4 8.58668 3.91203 8.83335 3.74721C9.08003 3.58238 9.27229 3.34811 9.38582 3.07403C9.49935 2.79994 9.52906 2.49834 9.47118 2.20737C9.4133 1.91639 9.27044 1.64912 9.06066 1.43934C8.85088 1.22956 8.58361 1.0867 8.29264 1.02882C8.00167 0.970945 7.70006 1.00065 7.42598 1.11418C7.15189 1.22771 6.91762 1.41997 6.7528 1.66665C6.58797 1.91332 6.5 2.20333 6.5 2.5C6.5 2.89783 6.65803 3.27936 6.93934 3.56066C7.22064 3.84197 7.60218 4 8 4Z\"/><path fill=\"#001222\" d=\"M8 15C8.29667 15 8.58668 14.912 8.83335 14.7472C9.08003 14.5824 9.27229 14.3481 9.38582 14.074C9.49935 13.7999 9.52906 13.4983 9.47118 13.2074C9.4133 12.9164 9.27044 12.6491 9.06066 12.4393C8.85088 12.2296 8.58361 12.0867 8.29264 12.0288C8.00167 11.9709 7.70006 12.0007 7.42598 12.1142C7.15189 12.2277 6.91762 12.42 6.7528 12.6666C6.58797 12.9133 6.5 13.2033 6.5 13.5C6.5 13.8978 6.65803 14.2794 6.93934 14.5607C7.22064 14.842 7.60218 15 8 15Z\"/><path fill=\"#001222\" d=\"M8.83335 9.24721C8.58668 9.41203 8.29667 9.5 8 9.5C7.60218 9.5 7.22064 9.34197 6.93934 9.06066C6.65803 8.77936 6.5 8.39783 6.5 8C6.5 7.70333 6.58797 7.41332 6.7528 7.16665C6.91762 6.91997 7.15189 6.72771 7.42598 6.61418C7.70006 6.50065 8.00167 6.47094 8.29264 6.52882C8.58361 6.5867 8.85088 6.72956 9.06066 6.93934C9.27044 7.14912 9.4133 7.41639 9.47118 7.70737C9.52906 7.99834 9.49935 8.29994 9.38582 8.57403C9.27229 8.84811 9.08003 9.08238 8.83335 9.24721Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <base-button\n class=\"b-menu-item\"\n role=\"menuitem\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n tabindex=\"-1\"\n @click=\"onClick\"\n >\n <template v-if=\"icon\" #iconLeft>\n <component :is=\"icon\" class=\"b-menu-item__icon-left\" aria-hidden=\"true\" />\n </template>\n <template #default>\n <bento-typography el=\"span\" variant=\"body\" :stronger=\"isTitle\" class=\"b-menu-item__primary-text\">\n {{ text }}\n </bento-typography>\n <bento-typography v-if=\"computedSecondaryText\" el=\"span\" variant=\"body\" class=\"b-menu-item__secondary-text\">\n {{ computedSecondaryText }}\n </bento-typography>\n </template>\n <template v-if=\"chevron\" #iconRight><chevron-right-icon aria-hidden=\"true\" /></template>\n </base-button>\n</template>\n\n<script lang=\"ts\">\n import { BaseButton, BentoBaseButtonEvent } from '@/components/internal/base-button';\n import { BentoTypography } from '@/components/typography';\n import { truncate } from '@/utils/ts/truncate';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoMenuItem } from './menu-item.types';\n\n /**\n * Menu item component to render items in a menu. For internal use only.\n */\n export default defineComponent({\n name: 'menu-item',\n components: { BaseButton, BentoTypography, ChevronRightIcon },\n props: {\n /**\n * menu-item text that gets displayed as the main label\n */\n text: {\n type: String,\n required: true,\n },\n /**\n * menu-item action that gets executed when the MeniItem is clicked\n */\n handler: {\n type: Function as PropType<BentoMenuItem['handler']>,\n required: true,\n },\n /**\n * menu-item text that gets displayed as the secondary label\n */\n secondaryText: {\n type: String,\n default: null,\n },\n /**\n * Optional chevron icon displayed to the right of the menu-item\n */\n chevron: {\n type: Boolean,\n default: false,\n },\n /**\n * Optional icon displayed to the left of the menu-item\n */\n icon: {\n // Types for Vue2 (Object) and Vue3 (Function)\n // TODO: Remove Object when fully migrated to Vue3\n type: [Object, Function] as PropType<BentoMenuItem['icon']>,\n default: null,\n },\n /**\n * Disables menu-item button functionality\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays an indent variant od the menu-item\n */\n indent: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays menu-item button as critical\n */\n critical: {\n type: Boolean,\n default: false,\n },\n /**\n * Renders the text in a bold variant\n */\n isTitle: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoBaseButtonEvent.CLICK],\n setup(props, { emit }) {\n const MAX_SECONDARY_TEXT_LENGTH = 10;\n\n const conditionalClasses = computed(() => ({\n 'b-menu-item--critical': props.critical,\n 'b-menu-item--indent': props.indent,\n }));\n\n const computedSecondaryText = computed(() => truncate(props.secondaryText, MAX_SECONDARY_TEXT_LENGTH));\n\n const onClick = (e: MouseEvent) => {\n e.stopPropagation();\n props.handler();\n emit(BentoBaseButtonEvent.CLICK);\n };\n\n return {\n // Values\n conditionalClasses,\n computedSecondaryText,\n\n // Methods\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-item.scss\" />\n","import { OnClickOutsideOptions } from '@/directives/click-outside/types';\nimport { BentoButton } from '../button';\nimport { BentoPopoverPositions } from '../popover';\nimport { BentoMenuItem } from './components';\n\nexport * from './components/menu-item/menu-item.types';\n\nexport enum BentoMenuEvent {\n BACK = 'back',\n CLOSE = 'close',\n OPEN = 'open',\n}\n\ntype ButtonProps = InstanceType<typeof BentoButton>['$props'];\n\nexport type BentoMenuButtonProps = {\n variant?: ButtonProps['variant'];\n condensed?: ButtonProps['condensed'];\n disabled?: ButtonProps['disabled'];\n};\n\nexport interface BentoMenuProps {\n /**\n * Object containing props to change the menu button appearance. Accepts the same props present in BentoButton.\n */\n button?: BentoMenuButtonProps;\n /**\n * Controls if the menu should close when an item is clicked.\n * Defaults to `true`.\n */\n closeMenuOnItemSelect?: boolean;\n /**\n * The data to be displayed in the list\n */\n data: BentoMenuItem[];\n /**\n * Disables opening the menu when the down arrow key is pressed.\n */\n disableArrowDownOpeningMenu?: boolean;\n /**\n * The position of where the menu should open.\n */\n menuPosition?: BentoPopoverPositions | `${BentoPopoverPositions}`;\n /**\n * Instructs the menu popover to be visible outside of the containing container.\n * @see {@link https://floating-ui.com/docs/usefloating#strategy}\n */\n menuFixedPositioning?: boolean;\n /**\n * Sets a custom width for the menu popover.\n */\n menuWidth?: number;\n /**\n * Returns focus to the menu button after popover is closed.\n * Disable if focus management is delegated to the parent component.\n * Defaults to `true`.\n */\n revertFocusToButton?: boolean;\n /**\n * Can be used to set the inner teleport component to render the menu's popover in the root `body` DOM node\n * (or `dialog` if popover is inside a dialog).\n */\n teleport?: boolean;\n /**\n * Can be used to set the inner teleport component to render the menu's popover in the root `body` DOM node\n * (or `dialog` if popover is inside a dialog).\n *\n * @see {@link OnClickOutsideOptions}\n */\n closeOnClickOutsideOptions?: OnClickOutsideOptions;\n}\n","export const DATA_GRID_CELL_MENU_REGISTERING_INJECTION_KEY = Symbol('menu registering injection key');\n","<template>\n <div\n ref=\"menuListContainerRef\"\n class=\"b-menu-list-container\"\n data-testid=\"menu-list-container\"\n v-on=\"menuListContainerEvents\"\n ><slot></slot\n ></div>\n</template>\n\n<script setup lang=\"ts\">\n import { DATA_GRID_CELL_MENU_REGISTERING_INJECTION_KEY } from '@/components/data-grid/components/data-grid-cell/data-grid-cell.keys';\n import { inject, ref } from 'vue';\n import type { DataGridCellRegisterMenu } from '@/components/data-grid/components/data-grid-cell/data-grid-cell.types';\n\n const menuListContainerRef = ref<HTMLDivElement>();\n const menuListContainerEvents = ref({});\n const registeringAndMousingOut = inject<DataGridCellRegisterMenu | false>(\n DATA_GRID_CELL_MENU_REGISTERING_INJECTION_KEY,\n false\n );\n\n // This is needed by the DataGridCell component in order to keep track of if a teleported menu\n // is being hovered over in the DataGridCellActions.\n if (registeringAndMousingOut) {\n const { registerMenuContainerElement } = registeringAndMousingOut;\n registerMenuContainerElement(menuListContainerRef);\n menuListContainerEvents.value = {\n mouseleave: registeringAndMousingOut?.menuMouseLeave,\n };\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Menu list container component to set the correct styling in a menu list. For internal use only.\n */\n export default {\n name: 'bento-menu-list-container',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-list-container.scss\" />\n","<template>\n <transition name=\"b-sub-menu-item-list__transition\" appear>\n <menu-list-container class=\"b-sub-menu-item-list\">\n <ul\n ref=\"subMenuItemListRefLocal\"\n role=\"menu\"\n class=\"b-sub-menu-item-list__list\"\n @keydown.down.stop=\"focusNext\"\n @keydown.up.stop=\"focusPrevious\"\n @keydown.esc.stop=\"onBackButton\"\n >\n <li v-for=\"(item, index) in computedItems\" :key=\"`sub-menu-item-list-item-${index}`\" role=\"none\">\n <menu-item\n :text=\"item.text\"\n :handler=\"item.handler\"\n :secondary-text=\"item.secondaryText\"\n :icon=\"item.icon\"\n :is-title=\"item.isTitle\"\n :disabled=\"item.disabled\"\n :critical=\"item.critical\"\n :indent=\"item.indent\"\n :tabindex=\"index === subMenuFocusedIndex ? '0' : '-1'\"\n @click=\"item.clickHandler\"\n />\n <bento-divider v-if=\"item.addDivider\" class=\"b-sub-menu-item-list__divider\" />\n </li>\n </ul>\n </menu-list-container>\n </transition>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, ref } from 'vue';\n import { BentoDivider } from '@/components/divider';\n import { BentoMenuItem, MenuItem } from '../menu-item';\n import MenuListContainer from '../menu-list-container/menu-list-container.vue';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import { BentoMenuEvent } from '../../menu.types';\n import messages from '../../messages.json';\n\n /**\n * SubMenuItemList component to render a submenu with the sliding transition. For internal use only.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'sub-menu-item-list',\n components: { BentoDivider, MenuItem, MenuListContainer },\n props: {\n items: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n title: {\n type: String,\n required: true,\n },\n },\n emits: [BentoMenuEvent.CLOSE, BentoMenuEvent.BACK],\n setup(props, { emit }) {\n const subMenuItemListRefLocal = ref(null);\n const subMenuFocusedIndex = ref(0);\n const numberOfItems = ref(props.items.length);\n\n const closeMenu = () => emit(BentoMenuEvent.CLOSE);\n\n const onBackButton = () => emit(BentoMenuEvent.BACK);\n\n const computedItems = computed(() => {\n const items = props.items?.map(el => ({\n ...el,\n indent: !el.icon,\n isTitle: false,\n clickHandler: closeMenu,\n }));\n return [\n {\n text: props.title,\n secondaryText: null,\n critical: false,\n icon: ChevronLeftIcon,\n isTitle: true,\n disabled: false,\n indent: false,\n handler: onBackButton,\n clickHandler: onBackButton,\n addDivider: true,\n },\n ...items,\n ];\n });\n\n const focusItem = async () => {\n subMenuItemListRefLocal.value?.children?.[subMenuFocusedIndex.value]?.children?.[0]?.focus();\n };\n\n onMounted(async () => {\n // Using setTimeout otherwise the sliding animation doesn't work anymore. The timeout imer is the same as the transition time (0.15s)\n setTimeout(() => focusItem(), 150);\n });\n\n const focusPrevious = () => {\n if (subMenuFocusedIndex.value > 0) {\n subMenuFocusedIndex.value -= 1;\n if (computedItems.value[subMenuFocusedIndex.value].disabled) {\n focusPrevious();\n }\n } else {\n subMenuFocusedIndex.value = numberOfItems.value;\n }\n focusItem();\n };\n\n const focusNext = () => {\n if (subMenuFocusedIndex.value < numberOfItems.value) {\n subMenuFocusedIndex.value += 1;\n if (computedItems.value[subMenuFocusedIndex.value].disabled) {\n focusNext();\n }\n } else {\n subMenuFocusedIndex.value = 0;\n }\n focusItem();\n };\n\n return {\n // Enums\n BentoMenuEvent,\n\n // Values\n subMenuItemListRefLocal,\n subMenuFocusedIndex,\n ChevronLeftIcon,\n computedItems,\n\n // Methods\n closeMenu,\n onBackButton,\n focusPrevious,\n focusNext,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./sub-menu-item-list.scss\" />\n","import { computed, type CSSProperties, nextTick, type Ref, ref, watch } from 'vue';\n\n// Helper type for the expected shape of the sub-menu ref\ninterface SubMenuRef {\n $el: HTMLElement;\n}\n\n/**\n * A composable that dynamically calculates the width and height for a menu container\n * based on the content of a conditionally rendered sub-menu.\n *\n * @param subMenuItemListRef A ref to the sub-menu component instance(s).\n * @param visibleSubMenuIndex A ref indicating which sub-menu is visible.\n * @param showSubMenu A ref indicating if any sub-menu is visible.\n * @returns A computed style object to be bound to the menu container.\n */\nexport function useDynamicMenuSize(\n subMenuItemListRef: Ref<SubMenuRef[] | null>,\n visibleSubMenuIndex: Ref<number | null>,\n showSubMenu: Ref<boolean>\n) {\n const MAX_MENU_WIDTH = 350;\n const MIN_MENU_WIDTH = 150;\n\n const subMenuWidth = ref(0);\n const subMenuHeight = ref(0);\n\n /**\n * Calculates an element's dimensions in stages using an invisible clone\n * to prevent visual flicker.\n *\n * 1. **Clone**: Creates a 'ghost' copy of the element and adds it to the\n * DOM invisibly.\n * 2. **Measure Ideal Width**: Sets the ghost's width to 'max-content' to find\n * its natural, unwrapped width.\n * 3. **Calculate Final Width**: Clamps the ideal width between the defined\n * MIN and MAX constants.\n * 4. **Measure Final Height**: Applies the final clamped width to the ghost,\n * allowing content to wrap, and then measures the resulting height.\n * 5. **Cleanup**: Removes the ghost element from the DOM.\n */\n const measureSubMenuStyle = (element: HTMLElement) => {\n if (!element || !element.parentElement) {\n return;\n }\n\n // Mount it on the parent element to allow proper height size, otherwise it will be 0\n const parent = element.parentElement;\n\n // Measure the unwrapped width\n const ghost = element.cloneNode(true) as HTMLElement;\n ghost.style.position = 'absolute';\n ghost.style.visibility = 'hidden';\n parent.appendChild(ghost);\n\n // Measure the unwrapped width\n ghost.style.width = 'max-content';\n const unwrappedWidth = ghost.offsetWidth;\n\n // Calculate and store the FINAL clamped width\n const clampedWidth = Math.max(MIN_MENU_WIDTH, Math.min(unwrappedWidth, MAX_MENU_WIDTH));\n subMenuWidth.value = clampedWidth;\n\n // Measure the wrapped height using the final width\n ghost.style.width = `${clampedWidth}px`;\n const height = ghost.offsetHeight;\n\n // Update the height ref with the correct, wrapped height\n subMenuHeight.value = height;\n\n parent.removeChild(ghost);\n // Update the height ref with the correct, wrapped height\n subMenuHeight.value = height;\n };\n\n watch([visibleSubMenuIndex, showSubMenu], async ([newIndex]) => {\n if (newIndex !== null) {\n await nextTick();\n\n const subMenuElement = subMenuItemListRef.value?.[0]?.$el;\n if (subMenuElement) {\n measureSubMenuStyle(subMenuElement);\n }\n } else {\n subMenuWidth.value = 0;\n subMenuHeight.value = 0;\n }\n });\n\n const computedStyle = computed<CSSProperties>(() => {\n const style: CSSProperties = { width: 'max-content' };\n\n if (showSubMenu.value) {\n if (subMenuHeight.value > 0) {\n style.height = `${subMenuHeight.value}px`;\n }\n if (subMenuWidth.value > 0) {\n style.width = `${subMenuWidth.value}px`;\n }\n }\n\n return style;\n });\n\n return { computedStyle };\n}\n","<template>\n <menu-list-container ref=\"menuItemListWrapperRef\" :style=\"computedStyle\">\n <ul\n ref=\"menuItemListRef\"\n class=\"b-menu-item-list\"\n role=\"menu\"\n @keydown.down=\"focusNext\"\n @keydown.up=\"focusPrevious\"\n @keydown.esc=\"closeMenu\"\n @keydown.tab=\"closeMenu\"\n >\n <li\n v-for=\"(item, index) in computedData\"\n :key=\"`menu-item-${index}`\"\n ref=\"menuItemRef\"\n class=\"b-menu-item-list__item\"\n role=\"none\"\n @keydown.right=\"focusRight(item, index)\"\n @keydown.left=\"focusLeft()\"\n >\n <menu-item\n :text=\"item.text\"\n :handler=\"!item.items?.length ? item.handler : () => null\"\n :secondary-text=\"item.secondaryText\"\n :icon=\"item.icon\"\n :chevron=\"!!item.items?.length\"\n :disabled=\"item.disabled\"\n :critical=\"item.critical\"\n :indent=\"item.indent\"\n :tabindex=\"index === subMenuFocusedIndex ? '0' : '-1'\"\n :aria-haspopup=\"!!item.items?.length\"\n :aria-expanded=\"showSubMenu && visibleSubMenuIndex === index\"\n @click=\"menuItemClick(item, index)\"\n />\n <bento-divider v-if=\"item.addDivider\" class=\"b-menu-item-list__divider\" />\n <sub-menu-item-list\n v-if=\"item.items?.length && showSubMenu && visibleSubMenuIndex === index\"\n ref=\"subMenuItemListRef\"\n :items=\"item.items\"\n :title=\"item.text\"\n @back=\"onBackButton\"\n @close=\"closeMenu\"\n />\n </li>\n </ul>\n </menu-list-container>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, ref } from 'vue';\n import { isVue3 } from 'vue-demi';\n import { BentoDivider } from '@/components/divider';\n import { BentoMenuItem, MenuItem } from '../menu-item';\n import { BentoMenuEvent } from '../../menu.types';\n import MenuListContainer from '../menu-list-container/menu-list-container.vue';\n import SubMenuItemList from '../sub-menu-item-list/sub-menu-item-list.vue';\n import { useDynamicMenuSize } from '../../composables';\n\n /**\n * MenuItem list to be used in the Menu component. For internal use only.\n */\n export default defineComponent({\n name: 'menu-item-list',\n components: { BentoDivider, MenuItem, MenuListContainer, SubMenuItemList },\n props: {\n /**\n * The data to be displayed in the list\n */\n data: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n /**\n * Displays the menu-items of the list in the indent variant. Only applies to elements that don't have an icon to their left.\n */\n indentItems: {\n type: Boolean,\n default: false,\n },\n /**\n * If set to true, focuses the last item on the list instead of the first. Used for accessibility purposes when the menu is opened with the 'up' arrow key.\n */\n focusLastElement: {\n type: Boolean,\n default: false,\n },\n /**\n * If set to true, closes the menu when an item is clicked.\n */\n closeMenuOnItemSelect: {\n type: Boolean,\n default: true,\n },\n },\n emits: [BentoMenuEvent.CLOSE, 'menu-item-click'],\n setup(props, { emit, expose }) {\n const menuItemRef = ref(null);\n const menuItemListRef = ref(null);\n const menuItemListWrapperRef = ref(null);\n const subMenuItemListRef = ref(null);\n const showSubMenu = ref(false);\n const visibleSubMenuIndex = ref(null);\n const focusedIndex = ref(props.focusLastElement ? props.data.length - 1 : 0);\n const subMenuFocusedIndex = ref(0);\n const numberOfItems = ref(props.data.length - 1);\n const hasMenuItemsWithIcon = computed(() => props.data.some(el => el.icon));\n\n const computedData = computed(() => {\n if (props.indentItems || hasMenuItemsWithIcon.value) {\n return props.data.map(el => {\n let indent = false;\n if (!el.icon) {\n indent = true;\n }\n return {\n ...el,\n indent,\n };\n });\n }\n return props.data;\n });\n\n const focusItem = async () => {\n // vue 3 requires nextTick to be called before an item can be focused\n // this function does not need to be awaited itself\n\n if (isVue3) {\n await nextTick();\n }\n\n menuItemListRef.value?.children[focusedIndex.value]?.children[0]?.focus();\n };\n\n const closeMenu = () => emit(BentoMenuEvent.CLOSE);\n\n const menuItemClick = (item: BentoMenuItem, index: number) => {\n if (item.items) {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = true;\n\n return;\n }\n\n visibleSubMenuIndex.value = index;\n showSubMenu.value = false;\n\n if (!item.skipClose && props.closeMenuOnItemSelect !== false) {\n closeMenu();\n }\n\n emit('menu-item-click');\n };\n\n const focusPrevious = () => {\n if (focusedIndex.value > 0) {\n focusedIndex.value -= 1;\n if (computedData.value[focusedIndex.value].disabled) {\n focusPrevious();\n }\n } else {\n focusedIndex.value = numberOfItems.value;\n }\n focusItem();\n };\n\n const focusNext = () => {\n if (focusedIndex.value < numberOfItems.value) {\n focusedIndex.value += 1;\n if (computedData.value[focusedIndex.value].disabled) {\n focusNext();\n }\n } else {\n focusedIndex.value = 0;\n }\n focusItem();\n };\n\n const focusRight = (item, index) => {\n if (item?.items?.length) {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = true;\n }\n };\n\n const focusLeft = () => {\n if (visibleSubMenuIndex.value && showSubMenu.value) {\n visibleSubMenuIndex.value = null;\n showSubMenu.value = false;\n }\n };\n\n const onBackButton = () => {\n showSubMenu.value = false;\n visibleSubMenuIndex.value = null;\n // Focus the right element\n focusItem();\n };\n\n expose({\n focusItem,\n });\n\n const { computedStyle } = useDynamicMenuSize(subMenuItemListRef, visibleSubMenuIndex, showSubMenu);\n\n return {\n // Values\n menuItemListRef,\n menuItemListWrapperRef,\n subMenuItemListRef,\n menuItemRef,\n\n computedData,\n computedStyle,\n\n focusedIndex,\n subMenuFocusedIndex,\n\n showSubMenu,\n visibleSubMenuIndex,\n\n // Methods\n menuItemClick,\n closeMenu,\n focusPrevious,\n focusNext,\n focusRight,\n focusLeft,\n onBackButton,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-item-list.scss\" />\n","<template>\n <div\n :class=\"computedClasses\"\n class=\"b-menu\"\n data-testid=\"menu\"\n @keydown.down=\"onKeyDown\"\n @keydown.up=\"onKeyUp\"\n @keydown.esc=\"closeMenu()\"\n >\n <bento-toggle-button\n ref=\"menuButtonRef\"\n aria-haspopup=\"true\"\n v-bind=\"computedButtonPropsWithDefaults\"\n :aria-controls=\"showMenu ? menuId : null\"\n :toggled=\"showMenu\"\n :inverse=\"isInverseColorSet\"\n @click=\"toggleShowMenu\"\n >\n <template v-if=\"!hasSlot('default') || hasSlot('iconLeft')\" #iconLeft>\n <slot name=\"iconLeft\">\n <options-vertical-icon :title=\"t('menuButton')\" />\n </slot>\n </template>\n <template v-if=\"hasSlot('default')\" #default>\n <slot />\n </template>\n <template v-if=\"hasSlot('default')\" #iconRight>\n <chevron-down-icon />\n </template>\n </bento-toggle-button>\n\n <bento-teleport v-if=\"menuButtonRef\" :disabled=\"!teleport\">\n <bento-popover\n v-if=\"menuButtonRef\"\n :id=\"menuId\"\n ref=\"popoverRef\"\n :role=\"null\"\n :open=\"showMenu\"\n class=\"b-menu__popover\"\n :style=\"computedMenuWidth\"\n :target-element=\"menuButtonRef\"\n :position=\"menuPosition\"\n :fixed-positioning=\"menuFixedPositioning\"\n :fallback-position=\"[\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'right-end',\n 'left-start',\n 'left-end',\n ]\"\n :teleport=\"teleport\"\n without-space\n >\n <menu-item-list\n ref=\"menuItemListRef\"\n :close-menu-on-item-select=\"closeMenuOnItemSelect\"\n :data=\"data\"\n :focus-last-element=\"isLastElementFocused\"\n @close=\"closeMenu\"\n @menu-item-click=\"menuItemClick\"\n />\n </bento-popover>\n </bento-teleport>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoToggleButton } from '@/components/button';\n import { DIVIDER_INVERSE_INJECTION_KEY } from '@/components/divider/divider.keys';\n import { BentoPopover, BentoPopoverPositions } from '@/components/popover';\n import { useClickOutside, useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { BentoTeleport } from '@/internal';\n import { useI18n } from '@/utils/ts/i18n';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import OptionsVerticalIcon from '@adyen/ui-assets-icons-16/vue/options-vertical';\n import { computed, inject, nextTick, onMounted, provide, ref, useSlots } from 'vue';\n import { MenuItemList } from './components';\n import { MENU_INVERSE_INJECTION_KEY } from './menu.keys';\n import { BentoMenuButtonProps, BentoMenuEvent, BentoMenuProps } from './menu.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n button: { default: () =>\n ({\n variant: 'secondary',\n }) as BentoMenuButtonProps },\n closeMenuOnItemSelect: { type: Boolean, default: true },\n data: null,\n disableArrowDownOpeningMenu: { type: Boolean, default: false },\n menuPosition: { default: BentoPopoverPositions.BOTTOM_START },\n menuFixedPositioning: { type: Boolean, default: false },\n menuWidth: { default: null },\n revertFocusToButton: { type: Boolean, default: true },\n teleport: { type: Boolean, default: false },\n closeOnClickOutsideOptions: { default: undefined }\n});\n\n const emit = defineEmits([\"menu-item-click\", \"click-outside\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const menuButtonRef = ref(null);\n const menuItemListRef = ref(null);\n const showMenu = ref(false);\n const isLastElementFocused = ref(false);\n const popoverRef = ref<HTMLElement>(null);\n const menuId = generateUid('menu');\n\n const isInverseColorSet = inject(MENU_INVERSE_INJECTION_KEY, ref(false));\n provide(DIVIDER_INVERSE_INJECTION_KEY, isInverseColorSet);\n\n const computedClasses = computed(() => ({\n 'b-menu--inverse': isInverseColorSet.value,\n }));\n\n const computedMenuWidth = computed(() => (props.menuWidth ? { width: `${props.menuWidth}px` } : null));\n const computedButtonPropsWithDefaults = computed<BentoMenuButtonProps>(() => {\n if (!props?.button) {\n return undefined;\n }\n return {\n variant: 'secondary',\n ...props.button,\n };\n });\n\n const openMenu = () => {\n showMenu.value = true;\n emit(BentoMenuEvent.OPEN);\n };\n\n const closeMenu = async (revertFocus = props.revertFocusToButton) => {\n if (!showMenu.value) {\n return;\n }\n\n showMenu.value = false;\n\n if (revertFocus) {\n // ensure that menu is closed and re-rendering is completed before focusing\n await nextTick();\n\n menuButtonRef.value?.$el?.focus();\n }\n\n emit(BentoMenuEvent.CLOSE);\n };\n\n const toggleShowMenu = (e: MouseEvent) => {\n e.stopPropagation();\n if (!showMenu.value) {\n openMenu();\n } else {\n closeMenu();\n }\n };\n\n const onKeyDown = (event: KeyboardEvent) => {\n event.preventDefault();\n\n isLastElementFocused.value = false;\n if (!props.disableArrowDownOpeningMenu) {\n openMenu();\n }\n };\n\n const onKeyUp = (event: KeyboardEvent) => {\n event.preventDefault();\n\n isLastElementFocused.value = true;\n openMenu();\n };\n\n const menuItemClick = () => {\n emit('menu-item-click');\n };\n\n // Ignore the events inside the Button and the Popover\n useClickOutside(\n popoverRef,\n () => {\n closeMenu();\n emit('click-outside');\n },\n {\n ...props.closeOnClickOutsideOptions,\n ignore: [menuButtonRef, ...(props.closeOnClickOutsideOptions?.ignore ?? [])],\n }\n );\n\n defineExpose({\n /**\n * Control to enable programmatic closing of the menu\n */\n closeMenu,\n });\n\n onMounted(() => {\n if (hasSlot('iconRight')) {\n printDevelopmentWarning(\n '\"bento-menu\" no longer supports the \"iconRight\" slot. The right-aligned icon is now fixed by design.'\n );\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Menu component to render a series of buttons. Csan render nested submenus.\n *\n * @example\n * import { BentoMenu } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoMenu },\n * template: `\n * <bento-menu\n * :data=[\n * { text: 'Menu item text', handler: () => { some code here } },\n * { text: 'Another menu item text', handler: () => { some other code here }, critical: true }\n * ]\n * />\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-menu',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu.scss\" />\n"],"names":["MENU_INVERSE_INJECTION_KEY","uuid","_sfc_main$5","_sfc_main$4","defineComponent","BaseButton","BentoTypography","ChevronRightIcon","BentoBaseButtonEvent","props","emit","conditionalClasses","computed","computedSecondaryText","truncate","e","BentoMenuEvent","BentoMenuEvent2","DATA_GRID_CELL_MENU_REGISTERING_INJECTION_KEY","__default__$1","menuListContainerRef","ref","menuListContainerEvents","registeringAndMousingOut","inject","registerMenuContainerElement","_sfc_main$2","messages","BentoDivider","MenuItem","MenuListContainer","subMenuItemListRefLocal","subMenuFocusedIndex","numberOfItems","closeMenu","onBackButton","computedItems","items","_a","el","ChevronLeftIcon","focusItem","_e","_d","_c","_b","onMounted","focusPrevious","focusNext","useDynamicMenuSize","subMenuItemListRef","visibleSubMenuIndex","showSubMenu","subMenuWidth","subMenuHeight","measureSubMenuStyle","element","parent","ghost","unwrappedWidth","clampedWidth","height","watch","newIndex","nextTick","subMenuElement","style","_sfc_main$1","SubMenuItemList","expose","menuItemRef","menuItemListRef","menuItemListWrapperRef","focusedIndex","hasMenuItemsWithIcon","computedData","indent","menuItemClick","item","index","focusRight","focusLeft","computedStyle","__default__","slots","useSlots","hasSlot","useHasSlot","t","useI18n","menuButtonRef","showMenu","isLastElementFocused","popoverRef","menuId","generateUid","isInverseColorSet","provide","DIVIDER_INVERSE_INJECTION_KEY","computedClasses","computedMenuWidth","computedButtonPropsWithDefaults","openMenu","revertFocus","toggleShowMenu","onKeyDown","event","onKeyUp","useClickOutside","printDevelopmentWarning"],"mappings":";;;;;;;;;;;;;;;;;;AAAa,MAAAA,KAAA,OAAA,kCAAA;ACOb,IAAAC,IAAA;AAEA,MAAAC,KAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;uBCqBAE,KAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,YAAAC,IAAA,iBAAAC,GAAA,kBAAAC,GAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,MAAA;AAAA,MAIA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,SAAA;AAAA,MAIA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,eAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,SAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA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BACI6F,EAAA;AAAA,IACJ,GAGJK,IAAA,CAAAD,MAAA;AACI,MAAAA,EAAA,eAAA,GAEAd,EAAA,QAAA,IACAU,EAAA;AAAA,IAAS,GAGbzB,IAAA,MAAA;AACI,MAAAnE,EAAA,iBAAA;AAAA,IAAsB;AAI1B,WAAAkG;AAAA,MAAAf;AAAA,MACI,MAAA;AAEI,QAAA3D,EAAA,GACAxB,EAAA,eAAA;AAAA,MAAoB;AAAA,MACxB;AAAA,QACA,GAAAD,EAAA;AAAA,QACa,QAAA,CAAAiF,GAAA,KAAApD,IAAA7B,EAAA,+BAAA,gBAAA6B,EAAA,WAAA,CAAA,CAAA;AAAA,MACkE;AAAA,IAC/E,GAGJ+B,EAAA;AAAA;AAAA;AAAA;AAAA,MAAa,WAAAnC;AAAA,IAIT,CAAA,GAGJY,EAAA,MAAA;AACI,MAAAwC,EAAA,WAAA,KACIuB;AAAA,QAAA;AAAA,MACI;AAAA,IAER,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"menu.EgYjFAku.js","sources":["../../src/components/menu/menu.keys.ts","../../../ui-assets/icons-16/dist/vue/options-vertical.vue","../../src/components/menu/components/menu-item/menu-item.vue","../../src/components/menu/menu.types.ts","../../src/components/data-grid/components/data-grid-cell/data-grid-cell.keys.ts","../../src/components/menu/components/menu-list-container/menu-list-container.vue","../../src/components/menu/components/sub-menu-item-list/sub-menu-item-list.vue","../../src/components/menu/composables/use-dynamic-menu-size/use-dynamic-menu-size.ts","../../src/components/menu/components/menu-item-list/menu-item-list.vue","../../src/components/menu/menu.vue"],"sourcesContent":["export const MENU_INVERSE_INJECTION_KEY = Symbol('menu inverse style injection key');\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M8 4C8.29667 4 8.58668 3.91203 8.83335 3.74721C9.08003 3.58238 9.27229 3.34811 9.38582 3.07403C9.49935 2.79994 9.52906 2.49834 9.47118 2.20737C9.4133 1.91639 9.27044 1.64912 9.06066 1.43934C8.85088 1.22956 8.58361 1.0867 8.29264 1.02882C8.00167 0.970945 7.70006 1.00065 7.42598 1.11418C7.15189 1.22771 6.91762 1.41997 6.7528 1.66665C6.58797 1.91332 6.5 2.20333 6.5 2.5C6.5 2.89783 6.65803 3.27936 6.93934 3.56066C7.22064 3.84197 7.60218 4 8 4Z\"/><path fill=\"#001222\" d=\"M8 15C8.29667 15 8.58668 14.912 8.83335 14.7472C9.08003 14.5824 9.27229 14.3481 9.38582 14.074C9.49935 13.7999 9.52906 13.4983 9.47118 13.2074C9.4133 12.9164 9.27044 12.6491 9.06066 12.4393C8.85088 12.2296 8.58361 12.0867 8.29264 12.0288C8.00167 11.9709 7.70006 12.0007 7.42598 12.1142C7.15189 12.2277 6.91762 12.42 6.7528 12.6666C6.58797 12.9133 6.5 13.2033 6.5 13.5C6.5 13.8978 6.65803 14.2794 6.93934 14.5607C7.22064 14.842 7.60218 15 8 15Z\"/><path fill=\"#001222\" d=\"M8.83335 9.24721C8.58668 9.41203 8.29667 9.5 8 9.5C7.60218 9.5 7.22064 9.34197 6.93934 9.06066C6.65803 8.77936 6.5 8.39783 6.5 8C6.5 7.70333 6.58797 7.41332 6.7528 7.16665C6.91762 6.91997 7.15189 6.72771 7.42598 6.61418C7.70006 6.50065 8.00167 6.47094 8.29264 6.52882C8.58361 6.5867 8.85088 6.72956 9.06066 6.93934C9.27044 7.14912 9.4133 7.41639 9.47118 7.70737C9.52906 7.99834 9.49935 8.29994 9.38582 8.57403C9.27229 8.84811 9.08003 9.08238 8.83335 9.24721Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <base-button\n class=\"b-menu-item\"\n role=\"menuitem\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n tabindex=\"-1\"\n @click=\"onClick\"\n >\n <template v-if=\"icon\" #iconLeft>\n <component :is=\"icon\" class=\"b-menu-item__icon-left\" aria-hidden=\"true\" />\n </template>\n <template #default>\n <bento-typography el=\"span\" variant=\"body\" :stronger=\"isTitle\" class=\"b-menu-item__primary-text\">\n {{ text }}\n </bento-typography>\n <bento-typography v-if=\"computedSecondaryText\" el=\"span\" variant=\"body\" class=\"b-menu-item__secondary-text\">\n {{ computedSecondaryText }}\n </bento-typography>\n </template>\n <template v-if=\"chevron\" #iconRight><chevron-right-icon aria-hidden=\"true\" /></template>\n </base-button>\n</template>\n\n<script lang=\"ts\">\n import { BaseButton, BentoBaseButtonEvent } from '@/components/internal/base-button';\n import { BentoTypography } from '@/components/typography';\n import { truncate } from '@/utils/ts/truncate';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoMenuItem } from './menu-item.types';\n\n /**\n * Menu item component to render items in a menu. For internal use only.\n */\n export default defineComponent({\n name: 'menu-item',\n components: { BaseButton, BentoTypography, ChevronRightIcon },\n props: {\n /**\n * menu-item text that gets displayed as the main label\n */\n text: {\n type: String,\n required: true,\n },\n /**\n * menu-item action that gets executed when the MeniItem is clicked\n */\n handler: {\n type: Function as PropType<BentoMenuItem['handler']>,\n required: true,\n },\n /**\n * menu-item text that gets displayed as the secondary label\n */\n secondaryText: {\n type: String,\n default: null,\n },\n /**\n * Optional chevron icon displayed to the right of the menu-item\n */\n chevron: {\n type: Boolean,\n default: false,\n },\n /**\n * Optional icon displayed to the left of the menu-item\n */\n icon: {\n // Types for Vue2 (Object) and Vue3 (Function)\n // TODO: Remove Object when fully migrated to Vue3\n type: [Object, Function] as PropType<BentoMenuItem['icon']>,\n default: null,\n },\n /**\n * Disables menu-item button functionality\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays an indent variant od the menu-item\n */\n indent: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays menu-item button as critical\n */\n critical: {\n type: Boolean,\n default: false,\n },\n /**\n * Renders the text in a bold variant\n */\n isTitle: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoBaseButtonEvent.CLICK],\n setup(props, { emit }) {\n const MAX_SECONDARY_TEXT_LENGTH = 10;\n\n const conditionalClasses = computed(() => ({\n 'b-menu-item--critical': props.critical,\n 'b-menu-item--indent': props.indent,\n }));\n\n const computedSecondaryText = computed(() => truncate(props.secondaryText, MAX_SECONDARY_TEXT_LENGTH));\n\n const onClick = (e: MouseEvent) => {\n e.stopPropagation();\n props.handler();\n emit(BentoBaseButtonEvent.CLICK);\n };\n\n return {\n // Values\n conditionalClasses,\n computedSecondaryText,\n\n // Methods\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-item.scss\" />\n","import { OnClickOutsideOptions } from '@/directives/click-outside/types';\nimport { BentoButton } from '../button';\nimport { BentoPopoverPositions } from '../popover';\nimport { BentoMenuItem } from './components';\n\nexport * from './components/menu-item/menu-item.types';\n\nexport enum BentoMenuEvent {\n BACK = 'back',\n CLOSE = 'close',\n OPEN = 'open',\n}\n\ntype ButtonProps = InstanceType<typeof BentoButton>['$props'];\n\nexport type BentoMenuButtonProps = {\n variant?: ButtonProps['variant'];\n condensed?: ButtonProps['condensed'];\n disabled?: ButtonProps['disabled'];\n};\n\nexport interface BentoMenuProps {\n /**\n * Object containing props to change the menu button appearance. Accepts the same props present in BentoButton.\n */\n button?: BentoMenuButtonProps;\n /**\n * Controls if the menu should close when an item is clicked.\n * Defaults to `true`.\n */\n closeMenuOnItemSelect?: boolean;\n /**\n * The data to be displayed in the list\n */\n data: BentoMenuItem[];\n /**\n * Disables opening the menu when the down arrow key is pressed.\n */\n disableArrowDownOpeningMenu?: boolean;\n /**\n * The position of where the menu should open.\n */\n menuPosition?: BentoPopoverPositions | `${BentoPopoverPositions}`;\n /**\n * Instructs the menu popover to be visible outside of the containing container.\n * @see {@link https://floating-ui.com/docs/usefloating#strategy}\n */\n menuFixedPositioning?: boolean;\n /**\n * Sets a custom width for the menu popover.\n */\n menuWidth?: number;\n /**\n * Returns focus to the menu button after popover is closed.\n * Disable if focus management is delegated to the parent component.\n * Defaults to `true`.\n */\n revertFocusToButton?: boolean;\n /**\n * Can be used to set the inner teleport component to render the menu's popover in the root `body` DOM node\n * (or `dialog` if popover is inside a dialog).\n */\n teleport?: boolean;\n /**\n * Can be used to set the inner teleport component to render the menu's popover in the root `body` DOM node\n * (or `dialog` if popover is inside a dialog).\n *\n * @see {@link OnClickOutsideOptions}\n */\n closeOnClickOutsideOptions?: OnClickOutsideOptions;\n}\n","export const DATA_GRID_CELL_MENU_REGISTERING_INJECTION_KEY = Symbol('menu registering injection key');\n","<template>\n <div\n ref=\"menuListContainerRef\"\n class=\"b-menu-list-container\"\n data-testid=\"menu-list-container\"\n v-on=\"menuListContainerEvents\"\n ><slot></slot\n ></div>\n</template>\n\n<script setup lang=\"ts\">\n import { DATA_GRID_CELL_MENU_REGISTERING_INJECTION_KEY } from '@/components/data-grid/components/data-grid-cell/data-grid-cell.keys';\n import { inject, ref } from 'vue';\n import type { DataGridCellRegisterMenu } from '@/components/data-grid/components/data-grid-cell/data-grid-cell.types';\n\n const menuListContainerRef = ref<HTMLDivElement>();\n const menuListContainerEvents = ref({});\n const registeringAndMousingOut = inject<DataGridCellRegisterMenu | false>(\n DATA_GRID_CELL_MENU_REGISTERING_INJECTION_KEY,\n false\n );\n\n // This is needed by the DataGridCell component in order to keep track of if a teleported menu\n // is being hovered over in the DataGridCellActions.\n if (registeringAndMousingOut) {\n const { registerMenuContainerElement } = registeringAndMousingOut;\n registerMenuContainerElement(menuListContainerRef);\n menuListContainerEvents.value = {\n mouseleave: registeringAndMousingOut?.menuMouseLeave,\n };\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Menu list container component to set the correct styling in a menu list. For internal use only.\n */\n export default {\n name: 'bento-menu-list-container',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-list-container.scss\" />\n","<template>\n <transition name=\"b-sub-menu-item-list__transition\" appear>\n <menu-list-container class=\"b-sub-menu-item-list\">\n <ul\n ref=\"subMenuItemListRefLocal\"\n role=\"menu\"\n class=\"b-sub-menu-item-list__list\"\n @keydown.down.stop=\"focusNext\"\n @keydown.up.stop=\"focusPrevious\"\n @keydown.esc.stop=\"onBackButton\"\n >\n <li v-for=\"(item, index) in computedItems\" :key=\"`sub-menu-item-list-item-${index}`\" role=\"none\">\n <menu-item\n :text=\"item.text\"\n :handler=\"item.handler\"\n :secondary-text=\"item.secondaryText\"\n :icon=\"item.icon\"\n :is-title=\"item.isTitle\"\n :disabled=\"item.disabled\"\n :critical=\"item.critical\"\n :indent=\"item.indent\"\n :tabindex=\"index === subMenuFocusedIndex ? '0' : '-1'\"\n @click=\"item.clickHandler\"\n />\n <bento-divider v-if=\"item.addDivider\" class=\"b-sub-menu-item-list__divider\" />\n </li>\n </ul>\n </menu-list-container>\n </transition>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, ref } from 'vue';\n import { BentoDivider } from '@/components/divider';\n import { BentoMenuItem, MenuItem } from '../menu-item';\n import MenuListContainer from '../menu-list-container/menu-list-container.vue';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import { BentoMenuEvent } from '../../menu.types';\n import messages from '../../messages.json';\n\n /**\n * SubMenuItemList component to render a submenu with the sliding transition. For internal use only.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'sub-menu-item-list',\n components: { BentoDivider, MenuItem, MenuListContainer },\n props: {\n items: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n title: {\n type: String,\n required: true,\n },\n },\n emits: [BentoMenuEvent.CLOSE, BentoMenuEvent.BACK],\n setup(props, { emit }) {\n const subMenuItemListRefLocal = ref(null);\n const subMenuFocusedIndex = ref(0);\n const numberOfItems = ref(props.items.length);\n\n const closeMenu = () => emit(BentoMenuEvent.CLOSE);\n\n const onBackButton = () => emit(BentoMenuEvent.BACK);\n\n const computedItems = computed(() => {\n const items = props.items?.map(el => ({\n ...el,\n indent: !el.icon,\n isTitle: false,\n clickHandler: closeMenu,\n }));\n return [\n {\n text: props.title,\n secondaryText: null,\n critical: false,\n icon: ChevronLeftIcon,\n isTitle: true,\n disabled: false,\n indent: false,\n handler: onBackButton,\n clickHandler: onBackButton,\n addDivider: true,\n },\n ...items,\n ];\n });\n\n const focusItem = async () => {\n subMenuItemListRefLocal.value?.children?.[subMenuFocusedIndex.value]?.children?.[0]?.focus();\n };\n\n onMounted(async () => {\n // Using setTimeout otherwise the sliding animation doesn't work anymore. The timeout imer is the same as the transition time (0.15s)\n setTimeout(() => focusItem(), 150);\n });\n\n const focusPrevious = () => {\n if (subMenuFocusedIndex.value > 0) {\n subMenuFocusedIndex.value -= 1;\n if (computedItems.value[subMenuFocusedIndex.value].disabled) {\n focusPrevious();\n }\n } else {\n subMenuFocusedIndex.value = numberOfItems.value;\n }\n focusItem();\n };\n\n const focusNext = () => {\n if (subMenuFocusedIndex.value < numberOfItems.value) {\n subMenuFocusedIndex.value += 1;\n if (computedItems.value[subMenuFocusedIndex.value].disabled) {\n focusNext();\n }\n } else {\n subMenuFocusedIndex.value = 0;\n }\n focusItem();\n };\n\n return {\n // Enums\n BentoMenuEvent,\n\n // Values\n subMenuItemListRefLocal,\n subMenuFocusedIndex,\n ChevronLeftIcon,\n computedItems,\n\n // Methods\n closeMenu,\n onBackButton,\n focusPrevious,\n focusNext,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./sub-menu-item-list.scss\" />\n","import { computed, type CSSProperties, nextTick, type Ref, ref, watch } from 'vue';\n\n// Helper type for the expected shape of the sub-menu ref\ninterface SubMenuRef {\n $el: HTMLElement;\n}\n\n/**\n * A composable that dynamically calculates the width and height for a menu container\n * based on the content of a conditionally rendered sub-menu.\n *\n * @param subMenuItemListRef A ref to the sub-menu component instance(s).\n * @param visibleSubMenuIndex A ref indicating which sub-menu is visible.\n * @param showSubMenu A ref indicating if any sub-menu is visible.\n * @returns A computed style object to be bound to the menu container.\n */\nexport function useDynamicMenuSize(\n subMenuItemListRef: Ref<SubMenuRef[] | null>,\n visibleSubMenuIndex: Ref<number | null>,\n showSubMenu: Ref<boolean>\n) {\n const MAX_MENU_WIDTH = 350;\n const MIN_MENU_WIDTH = 150;\n\n const subMenuWidth = ref(0);\n const subMenuHeight = ref(0);\n\n /**\n * Calculates an element's dimensions in stages using an invisible clone\n * to prevent visual flicker.\n *\n * 1. **Clone**: Creates a 'ghost' copy of the element and adds it to the\n * DOM invisibly.\n * 2. **Measure Ideal Width**: Sets the ghost's width to 'max-content' to find\n * its natural, unwrapped width.\n * 3. **Calculate Final Width**: Clamps the ideal width between the defined\n * MIN and MAX constants.\n * 4. **Measure Final Height**: Applies the final clamped width to the ghost,\n * allowing content to wrap, and then measures the resulting height.\n * 5. **Cleanup**: Removes the ghost element from the DOM.\n */\n const measureSubMenuStyle = (element: HTMLElement) => {\n if (!element || !element.parentElement) {\n return;\n }\n\n // Mount it on the parent element to allow proper height size, otherwise it will be 0\n const parent = element.parentElement;\n\n // Measure the unwrapped width\n const ghost = element.cloneNode(true) as HTMLElement;\n ghost.style.position = 'absolute';\n ghost.style.visibility = 'hidden';\n parent.appendChild(ghost);\n\n // Measure the unwrapped width\n ghost.style.width = 'max-content';\n const unwrappedWidth = ghost.offsetWidth;\n\n // Calculate and store the FINAL clamped width\n const clampedWidth = Math.max(MIN_MENU_WIDTH, Math.min(unwrappedWidth, MAX_MENU_WIDTH));\n subMenuWidth.value = clampedWidth;\n\n // Measure the wrapped height using the final width\n ghost.style.width = `${clampedWidth}px`;\n const height = ghost.offsetHeight;\n\n // Update the height ref with the correct, wrapped height\n subMenuHeight.value = height;\n\n parent.removeChild(ghost);\n // Update the height ref with the correct, wrapped height\n subMenuHeight.value = height;\n };\n\n watch([visibleSubMenuIndex, showSubMenu], async ([newIndex]) => {\n if (newIndex !== null) {\n await nextTick();\n\n const subMenuElement = subMenuItemListRef.value?.[0]?.$el;\n if (subMenuElement) {\n measureSubMenuStyle(subMenuElement);\n }\n } else {\n subMenuWidth.value = 0;\n subMenuHeight.value = 0;\n }\n });\n\n const computedStyle = computed<CSSProperties>(() => {\n const style: CSSProperties = { width: 'max-content' };\n\n if (showSubMenu.value) {\n if (subMenuHeight.value > 0) {\n style.height = `${subMenuHeight.value}px`;\n }\n if (subMenuWidth.value > 0) {\n style.width = `${subMenuWidth.value}px`;\n }\n }\n\n return style;\n });\n\n return { computedStyle };\n}\n","<template>\n <menu-list-container ref=\"menuItemListWrapperRef\" :style=\"computedStyle\">\n <ul\n ref=\"menuItemListRef\"\n class=\"b-menu-item-list\"\n role=\"menu\"\n @keydown.down=\"focusNext\"\n @keydown.up=\"focusPrevious\"\n @keydown.esc=\"closeMenu\"\n @keydown.tab=\"closeMenu\"\n >\n <li\n v-for=\"(item, index) in computedData\"\n :key=\"`menu-item-${index}`\"\n ref=\"menuItemRef\"\n class=\"b-menu-item-list__item\"\n role=\"none\"\n @keydown.right=\"focusRight(item, index)\"\n @keydown.left=\"focusLeft()\"\n >\n <menu-item\n :text=\"item.text\"\n :handler=\"!item.items?.length ? item.handler : () => null\"\n :secondary-text=\"item.secondaryText\"\n :icon=\"item.icon\"\n :chevron=\"!!item.items?.length\"\n :disabled=\"item.disabled\"\n :critical=\"item.critical\"\n :indent=\"item.indent\"\n :tabindex=\"index === subMenuFocusedIndex ? '0' : '-1'\"\n :aria-haspopup=\"!!item.items?.length\"\n :aria-expanded=\"showSubMenu && visibleSubMenuIndex === index\"\n @click=\"menuItemClick(item, index)\"\n />\n <bento-divider v-if=\"item.addDivider\" class=\"b-menu-item-list__divider\" />\n <sub-menu-item-list\n v-if=\"item.items?.length && showSubMenu && visibleSubMenuIndex === index\"\n ref=\"subMenuItemListRef\"\n :items=\"item.items\"\n :title=\"item.text\"\n @back=\"onBackButton\"\n @close=\"closeMenu\"\n />\n </li>\n </ul>\n </menu-list-container>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, ref } from 'vue';\n import { isVue3 } from 'vue-demi';\n import { BentoDivider } from '@/components/divider';\n import { BentoMenuItem, MenuItem } from '../menu-item';\n import { BentoMenuEvent } from '../../menu.types';\n import MenuListContainer from '../menu-list-container/menu-list-container.vue';\n import SubMenuItemList from '../sub-menu-item-list/sub-menu-item-list.vue';\n import { useDynamicMenuSize } from '../../composables';\n\n /**\n * MenuItem list to be used in the Menu component. For internal use only.\n */\n export default defineComponent({\n name: 'menu-item-list',\n components: { BentoDivider, MenuItem, MenuListContainer, SubMenuItemList },\n props: {\n /**\n * The data to be displayed in the list\n */\n data: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n /**\n * Displays the menu-items of the list in the indent variant. Only applies to elements that don't have an icon to their left.\n */\n indentItems: {\n type: Boolean,\n default: false,\n },\n /**\n * If set to true, focuses the last item on the list instead of the first. Used for accessibility purposes when the menu is opened with the 'up' arrow key.\n */\n focusLastElement: {\n type: Boolean,\n default: false,\n },\n /**\n * If set to true, closes the menu when an item is clicked.\n */\n closeMenuOnItemSelect: {\n type: Boolean,\n default: true,\n },\n },\n emits: [BentoMenuEvent.CLOSE, 'menu-item-click'],\n setup(props, { emit, expose }) {\n const menuItemRef = ref(null);\n const menuItemListRef = ref(null);\n const menuItemListWrapperRef = ref(null);\n const subMenuItemListRef = ref(null);\n const showSubMenu = ref(false);\n const visibleSubMenuIndex = ref(null);\n const focusedIndex = ref(props.focusLastElement ? props.data.length - 1 : 0);\n const subMenuFocusedIndex = ref(0);\n const numberOfItems = ref(props.data.length - 1);\n const hasMenuItemsWithIcon = computed(() => props.data.some(el => el.icon));\n\n const computedData = computed(() => {\n if (props.indentItems || hasMenuItemsWithIcon.value) {\n return props.data.map(el => {\n let indent = false;\n if (!el.icon) {\n indent = true;\n }\n return {\n ...el,\n indent,\n };\n });\n }\n return props.data;\n });\n\n const focusItem = async () => {\n // vue 3 requires nextTick to be called before an item can be focused\n // this function does not need to be awaited itself\n\n if (isVue3) {\n await nextTick();\n }\n\n menuItemListRef.value?.children[focusedIndex.value]?.children[0]?.focus();\n };\n\n const closeMenu = () => emit(BentoMenuEvent.CLOSE);\n\n const menuItemClick = (item: BentoMenuItem, index: number) => {\n if (item.items) {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = true;\n\n return;\n }\n\n visibleSubMenuIndex.value = index;\n showSubMenu.value = false;\n\n if (!item.skipClose && props.closeMenuOnItemSelect !== false) {\n closeMenu();\n }\n\n emit('menu-item-click');\n };\n\n const focusPrevious = () => {\n if (focusedIndex.value > 0) {\n focusedIndex.value -= 1;\n if (computedData.value[focusedIndex.value].disabled) {\n focusPrevious();\n }\n } else {\n focusedIndex.value = numberOfItems.value;\n }\n focusItem();\n };\n\n const focusNext = () => {\n if (focusedIndex.value < numberOfItems.value) {\n focusedIndex.value += 1;\n if (computedData.value[focusedIndex.value].disabled) {\n focusNext();\n }\n } else {\n focusedIndex.value = 0;\n }\n focusItem();\n };\n\n const focusRight = (item, index) => {\n if (item?.items?.length) {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = true;\n }\n };\n\n const focusLeft = () => {\n if (visibleSubMenuIndex.value && showSubMenu.value) {\n visibleSubMenuIndex.value = null;\n showSubMenu.value = false;\n }\n };\n\n const onBackButton = () => {\n showSubMenu.value = false;\n visibleSubMenuIndex.value = null;\n // Focus the right element\n focusItem();\n };\n\n expose({\n focusItem,\n });\n\n const { computedStyle } = useDynamicMenuSize(subMenuItemListRef, visibleSubMenuIndex, showSubMenu);\n\n return {\n // Values\n menuItemListRef,\n menuItemListWrapperRef,\n subMenuItemListRef,\n menuItemRef,\n\n computedData,\n computedStyle,\n\n focusedIndex,\n subMenuFocusedIndex,\n\n showSubMenu,\n visibleSubMenuIndex,\n\n // Methods\n menuItemClick,\n closeMenu,\n focusPrevious,\n focusNext,\n focusRight,\n focusLeft,\n onBackButton,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-item-list.scss\" />\n","<template>\n <div\n :class=\"computedClasses\"\n class=\"b-menu\"\n data-testid=\"menu\"\n @keydown.down=\"onKeyDown\"\n @keydown.up=\"onKeyUp\"\n @keydown.esc=\"closeMenu()\"\n >\n <bento-toggle-button\n ref=\"menuButtonRef\"\n aria-haspopup=\"true\"\n v-bind=\"computedButtonPropsWithDefaults\"\n :aria-controls=\"showMenu ? menuId : null\"\n :toggled=\"showMenu\"\n :inverse=\"isInverseColorSet\"\n @click=\"toggleShowMenu\"\n >\n <template v-if=\"!hasSlot('default') || hasSlot('iconLeft')\" #iconLeft>\n <slot name=\"iconLeft\">\n <options-vertical-icon :title=\"t('menuButton')\" />\n </slot>\n </template>\n <template v-if=\"hasSlot('default')\" #default>\n <slot />\n </template>\n <template v-if=\"hasSlot('default')\" #iconRight>\n <chevron-down-icon />\n </template>\n </bento-toggle-button>\n\n <bento-teleport v-if=\"menuButtonRef\" :disabled=\"!teleport\">\n <bento-popover\n v-if=\"menuButtonRef\"\n :id=\"menuId\"\n ref=\"popoverRef\"\n :role=\"null\"\n :open=\"showMenu\"\n class=\"b-menu__popover\"\n :style=\"computedMenuWidth\"\n :target-element=\"menuButtonRef\"\n :position=\"menuPosition\"\n :fixed-positioning=\"menuFixedPositioning\"\n :fallback-position=\"[\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'right-end',\n 'left-start',\n 'left-end',\n ]\"\n :teleport=\"teleport\"\n without-space\n >\n <menu-item-list\n ref=\"menuItemListRef\"\n :close-menu-on-item-select=\"closeMenuOnItemSelect\"\n :data=\"data\"\n :focus-last-element=\"isLastElementFocused\"\n @close=\"closeMenu\"\n @menu-item-click=\"menuItemClick\"\n />\n </bento-popover>\n </bento-teleport>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoToggleButton } from '@/components/button';\n import { DIVIDER_INVERSE_INJECTION_KEY } from '@/components/divider/divider.keys';\n import { BentoPopover, BentoPopoverPositions } from '@/components/popover';\n import { useClickOutside, useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { BentoTeleport } from '@/internal';\n import { useI18n } from '@/utils/ts/i18n';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import OptionsVerticalIcon from '@adyen/ui-assets-icons-16/vue/options-vertical';\n import { computed, inject, nextTick, onMounted, provide, ref, useSlots } from 'vue';\n import { MenuItemList } from './components';\n import { MENU_INVERSE_INJECTION_KEY } from './menu.keys';\n import { BentoMenuButtonProps, BentoMenuEvent, BentoMenuProps } from './menu.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n button: { default: () =>\n ({\n variant: 'secondary',\n }) as BentoMenuButtonProps },\n closeMenuOnItemSelect: { type: Boolean, default: true },\n data: null,\n disableArrowDownOpeningMenu: { type: Boolean, default: false },\n menuPosition: { default: BentoPopoverPositions.BOTTOM_START },\n menuFixedPositioning: { type: Boolean, default: false },\n menuWidth: { default: null },\n revertFocusToButton: { type: Boolean, default: true },\n teleport: { type: Boolean, default: false },\n closeOnClickOutsideOptions: { default: undefined }\n});\n\n const emit = defineEmits([\"menu-item-click\", \"click-outside\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const menuButtonRef = ref(null);\n const menuItemListRef = ref(null);\n const showMenu = ref(false);\n const isLastElementFocused = ref(false);\n const popoverRef = ref<HTMLElement>(null);\n const menuId = generateUid('menu');\n\n const isInverseColorSet = inject(MENU_INVERSE_INJECTION_KEY, ref(false));\n provide(DIVIDER_INVERSE_INJECTION_KEY, isInverseColorSet);\n\n const computedClasses = computed(() => ({\n 'b-menu--inverse': isInverseColorSet.value,\n }));\n\n const computedMenuWidth = computed(() => (props.menuWidth ? { width: `${props.menuWidth}px` } : null));\n const computedButtonPropsWithDefaults = computed<BentoMenuButtonProps>(() => {\n if (!props?.button) {\n return undefined;\n }\n return {\n variant: 'secondary',\n ...props.button,\n };\n });\n\n const openMenu = () => {\n showMenu.value = true;\n emit(BentoMenuEvent.OPEN);\n };\n\n const closeMenu = async (revertFocus = props.revertFocusToButton) => {\n if (!showMenu.value) {\n return;\n }\n\n showMenu.value = false;\n\n if (revertFocus) {\n // ensure that menu is closed and re-rendering is completed before focusing\n await nextTick();\n\n menuButtonRef.value?.$el?.focus();\n }\n\n emit(BentoMenuEvent.CLOSE);\n };\n\n const toggleShowMenu = (e: MouseEvent) => {\n e.stopPropagation();\n if (!showMenu.value) {\n openMenu();\n } else {\n closeMenu();\n }\n };\n\n const onKeyDown = (event: KeyboardEvent) => {\n event.preventDefault();\n\n isLastElementFocused.value = false;\n if (!props.disableArrowDownOpeningMenu) {\n openMenu();\n }\n };\n\n const onKeyUp = (event: KeyboardEvent) => {\n event.preventDefault();\n\n isLastElementFocused.value = true;\n openMenu();\n };\n\n const menuItemClick = () => {\n emit('menu-item-click');\n };\n\n // Ignore the events inside the Button and the Popover\n useClickOutside(\n popoverRef,\n () => {\n closeMenu();\n emit('click-outside');\n },\n {\n ...props.closeOnClickOutsideOptions,\n ignore: [menuButtonRef, ...(props.closeOnClickOutsideOptions?.ignore ?? [])],\n }\n );\n\n defineExpose({\n /**\n * Control to enable programmatic closing of the menu\n */\n closeMenu,\n });\n\n onMounted(() => {\n if (hasSlot('iconRight')) {\n printDevelopmentWarning(\n '\"bento-menu\" no longer supports the \"iconRight\" slot. The right-aligned icon is now fixed by design.'\n );\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Menu component to render a series of buttons. Csan render nested submenus.\n *\n * @example\n * import { BentoMenu } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoMenu },\n * template: `\n * <bento-menu\n * :data=[\n * { text: 'Menu item text', handler: () => { some code here } },\n * { text: 'Another menu item text', handler: () => { some other code here }, critical: true }\n * ]\n * />\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-menu',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu.scss\" />\n"],"names":["MENU_INVERSE_INJECTION_KEY","uuid","_sfc_main$5","_sfc_main$4","defineComponent","BaseButton","BentoTypography","ChevronRightIcon","BentoBaseButtonEvent","props","emit","conditionalClasses","computed","computedSecondaryText","truncate","e","BentoMenuEvent","BentoMenuEvent2","DATA_GRID_CELL_MENU_REGISTERING_INJECTION_KEY","__default__$1","menuListContainerRef","ref","menuListContainerEvents","registeringAndMousingOut","inject","registerMenuContainerElement","_sfc_main$2","messages","BentoDivider","MenuItem","MenuListContainer","subMenuItemListRefLocal","subMenuFocusedIndex","numberOfItems","closeMenu","onBackButton","computedItems","items","_a","el","ChevronLeftIcon","focusItem","_e","_d","_c","_b","onMounted","focusPrevious","focusNext","useDynamicMenuSize","subMenuItemListRef","visibleSubMenuIndex","showSubMenu","subMenuWidth","subMenuHeight","measureSubMenuStyle","element","parent","ghost","unwrappedWidth","clampedWidth","height","watch","newIndex","nextTick","subMenuElement","style","_sfc_main$1","SubMenuItemList","expose","menuItemRef","menuItemListRef","menuItemListWrapperRef","focusedIndex","hasMenuItemsWithIcon","computedData","indent","menuItemClick","item","index","focusRight","focusLeft","computedStyle","__default__","slots","useSlots","hasSlot","useHasSlot","t","useI18n","menuButtonRef","showMenu","isLastElementFocused","popoverRef","menuId","generateUid","isInverseColorSet","provide","DIVIDER_INVERSE_INJECTION_KEY","computedClasses","computedMenuWidth","computedButtonPropsWithDefaults","openMenu","revertFocus","toggleShowMenu","onKeyDown","event","onKeyUp","useClickOutside","printDevelopmentWarning"],"mappings":";;;;;;;;;;;;;;;;;;AAAa,MAAAA,KAAA,OAAA,kCAAA;ACOb,IAAAC,IAAA;AAEA,MAAAC,KAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;uBCqBAE,KAAAC,EAAA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A,IAAwB,GAG5BkB,IAAA,OAAAqE,IAAA9F,EAAA,wBAAA;;AACI,MAAAkF,EAAA,UAIAA,EAAA,QAAA,IAEAY,MAEI,MAAAvC,EAAA,IAEAnB,KAAAP,IAAAoD,EAAA,UAAA,gBAAApD,EAAA,QAAA,QAAAO,EAAA,UAGJnC,EAAAM,EAAA,KAAA;AAAA,IAAyB,GAG7BwF,IAAA,CAAAzF,MAAA;AACI,MAAAA,EAAA,gBAAA,GACA4E,EAAA,QAGIzD,EAAA,IAFAoE,EAAA;AAAA,IAGJ,GAGJG,IAAA,CAAAC,MAAA;AACI,MAAAA,EAAA,eAAA,GAEAd,EAAA,QAAA,IACAnF,EAAA,+BACI6F,EAAA;AAAA,IACJ,GAGJK,IAAA,CAAAD,MAAA;AACI,MAAAA,EAAA,eAAA,GAEAd,EAAA,QAAA,IACAU,EAAA;AAAA,IAAS,GAGbzB,IAAA,MAAA;AACI,MAAAnE,EAAA,iBAAA;AAAA,IAAsB;AAI1B,WAAAkG;AAAA,MAAAf;AAAA,MACI,MAAA;AAEI,QAAA3D,EAAA,GACAxB,EAAA,eAAA;AAAA,MAAoB;AAAA,MACxB;AAAA,QACA,GAAAD,EAAA;AAAA,QACa,QAAA,CAAAiF,GAAA,KAAApD,IAAA7B,EAAA,+BAAA,gBAAA6B,EAAA,WAAA,CAAA,CAAA;AAAA,MACkE;AAAA,IAC/E,GAGJ+B,EAAA;AAAA;AAAA;AAAA;AAAA,MAAa,WAAAnC;AAAA,IAIT,CAAA,GAGJY,EAAA,MAAA;AACI,MAAAwC,EAAA,WAAA,KACIuB;AAAA,QAAA;AAAA,MACI;AAAA,IAER,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -4,7 +4,7 @@ import { B as N } from "./focus-trap.C-wIQqpO.js";
4
4
  import { B as w } from "./typography.J1v_SPG3.js";
5
5
  import { u as P } from "./use-has-slot.C9lQZ6nz.js";
6
6
  import { D as R, B as G, b as J, a as K } from "./dialog-page.CLHZqQeU.js";
7
- import { B as U } from "./button-actions._OIvTdKt.js";
7
+ import { B as U } from "./button-actions.BKdI_ooV.js";
8
8
  import { n as E } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
9
9
  import { C as Y } from "./cross.CC_B-vG-.js";
10
10
  import { u as $ } from "./i18n.BQkEbtPM.js";
@@ -199,4 +199,4 @@ export {
199
199
  X as B,
200
200
  ve as m
201
201
  };
202
- //# sourceMappingURL=modal-fullscreen.1OdCgyca.js.map
202
+ //# sourceMappingURL=modal-fullscreen.BNTUOC7o.js.map