@adyen/bento-vue2 1.14.0 → 1.15.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 (185) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/packages/vue2/src/components/action-bar/action-bar.types.d.ts +1 -0
  3. package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +17 -2
  4. package/dist/@types/packages/vue2/src/components/action-bar/index.d.ts +1 -0
  5. package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +1 -7
  6. package/dist/@types/packages/vue2/src/components/card/card.vue.d.ts +1 -7
  7. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +1 -7
  8. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -7
  9. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +1 -7
  10. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +1 -7
  11. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +2 -2
  12. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +2 -2
  13. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +2 -2
  14. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +2 -2
  15. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +2 -2
  16. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +2 -2
  17. package/dist/@types/packages/vue2/src/components/header/components/info-icon-with-popover/index.d.ts +1 -0
  18. package/dist/@types/packages/vue2/src/components/header/components/info-icon-with-popover/info-icon-with-popover.vue.d.ts +32 -0
  19. package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +33 -22
  20. package/dist/@types/packages/vue2/src/components/input-field/input-field.keys.d.ts +1 -0
  21. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +0 -9
  22. package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +0 -9
  23. package/dist/@types/packages/vue2/src/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +0 -9
  24. package/dist/@types/packages/vue2/src/components/modal/modal.types.d.ts +4 -0
  25. package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +7 -16
  26. package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +1 -7
  27. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  28. package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.types.d.ts +3 -1
  29. package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +53 -30
  30. package/dist/@types/packages/vue2/src/utils/ts/i18n.d.ts +7 -33
  31. package/dist/accordion.js +1 -1
  32. package/dist/action-bar.js +126 -102
  33. package/dist/action-bar.js.map +1 -1
  34. package/dist/alert.js +2 -2
  35. package/dist/assets/base-modal.css +1 -1
  36. package/dist/assets/dropdown.css +1 -1
  37. package/dist/assets/index.css +1 -1
  38. package/dist/assets/index10.css +1 -1
  39. package/dist/assets/index11.css +1 -1
  40. package/dist/assets/index12.css +1 -1
  41. package/dist/assets/index13.css +1 -1
  42. package/dist/assets/index14.css +1 -1
  43. package/dist/assets/index15.css +1 -1
  44. package/dist/assets/index16.css +1 -1
  45. package/dist/assets/index17.css +1 -1
  46. package/dist/assets/index18.css +1 -1
  47. package/dist/assets/index19.css +1 -1
  48. package/dist/assets/index2.css +1 -1
  49. package/dist/assets/index21.css +1 -1
  50. package/dist/assets/index22.css +1 -1
  51. package/dist/assets/index23.css +1 -1
  52. package/dist/assets/index25.css +1 -1
  53. package/dist/assets/index26.css +1 -1
  54. package/dist/assets/index27.css +1 -1
  55. package/dist/assets/index28.css +1 -1
  56. package/dist/assets/index29.css +1 -1
  57. package/dist/assets/index3.css +1 -1
  58. package/dist/assets/index30.css +1 -1
  59. package/dist/assets/index31.css +1 -1
  60. package/dist/assets/index32.css +1 -1
  61. package/dist/assets/index34.css +1 -1
  62. package/dist/assets/index35.css +1 -1
  63. package/dist/assets/index36.css +1 -1
  64. package/dist/assets/index37.css +1 -1
  65. package/dist/assets/index38.css +1 -1
  66. package/dist/assets/index39.css +1 -1
  67. package/dist/assets/index4.css +1 -1
  68. package/dist/assets/index40.css +1 -1
  69. package/dist/assets/index41.css +1 -1
  70. package/dist/assets/index42.css +1 -1
  71. package/dist/assets/index43.css +1 -1
  72. package/dist/assets/index44.css +1 -1
  73. package/dist/assets/index45.css +1 -1
  74. package/dist/assets/index46.css +1 -1
  75. package/dist/assets/index47.css +1 -0
  76. package/dist/assets/index5.css +1 -1
  77. package/dist/assets/index6.css +1 -1
  78. package/dist/assets/index7.css +1 -1
  79. package/dist/assets/index8.css +1 -1
  80. package/dist/assets/index9.css +1 -1
  81. package/dist/avatar-image.js +1 -1
  82. package/dist/badge.js +1 -1
  83. package/dist/button.js +5 -5
  84. package/dist/card.js +1 -1
  85. package/dist/checkbox.js +1 -1
  86. package/dist/chunks/{base-modal.babcdf50.js → base-modal.4f6eb218.js} +43 -47
  87. package/dist/chunks/base-modal.4f6eb218.js.map +1 -0
  88. package/dist/chunks/{button-actions-with-menu.d17b184d.js → button-actions-with-menu.abb1c2a7.js} +3 -3
  89. package/dist/chunks/{button-actions-with-menu.d17b184d.js.map → button-actions-with-menu.abb1c2a7.js.map} +1 -1
  90. package/dist/chunks/{button.788944f8.js → button.a554a1a8.js} +2 -2
  91. package/dist/chunks/{button.788944f8.js.map → button.a554a1a8.js.map} +1 -1
  92. package/dist/chunks/{calendar.2d4f2237.js → calendar.9dc9c0d2.js} +2 -2
  93. package/dist/chunks/{calendar.2d4f2237.js.map → calendar.9dc9c0d2.js.map} +1 -1
  94. package/dist/chunks/{copy.c1a67fc6.js → copy.2b6e032b.js} +4 -4
  95. package/dist/chunks/{copy.c1a67fc6.js.map → copy.2b6e032b.js.map} +1 -1
  96. package/dist/chunks/{dropdown.ca5ff514.js → dropdown.75441496.js} +197 -197
  97. package/dist/chunks/dropdown.75441496.js.map +1 -0
  98. package/dist/chunks/{fixed-scroller.80e51c1b.js → fixed-scroller.f631634d.js} +2 -2
  99. package/dist/chunks/{fixed-scroller.80e51c1b.js.map → fixed-scroller.f631634d.js.map} +1 -1
  100. package/dist/chunks/{footer-actions.d77abe77.js → footer-actions.c90de730.js} +2 -2
  101. package/dist/chunks/{footer-actions.d77abe77.js.map → footer-actions.c90de730.js.map} +1 -1
  102. package/dist/chunks/i18n.eb5b985b.js.map +1 -1
  103. package/dist/chunks/{index.71638f79.js → index.009455ee.js} +2 -2
  104. package/dist/chunks/{index.71638f79.js.map → index.009455ee.js.map} +1 -1
  105. package/dist/chunks/{index.3e96615d.js → index.1163f656.js} +8 -8
  106. package/dist/chunks/index.1163f656.js.map +1 -0
  107. package/dist/chunks/index.15c0dba4.js +1683 -0
  108. package/dist/chunks/index.15c0dba4.js.map +1 -0
  109. package/dist/chunks/{index.a663e8fe.js → index.15d681a1.js} +4 -4
  110. package/dist/chunks/{index.a663e8fe.js.map → index.15d681a1.js.map} +1 -1
  111. package/dist/chunks/{index.4fa8a7fe.js → index.3e375af4.js} +2 -2
  112. package/dist/chunks/{index.4fa8a7fe.js.map → index.3e375af4.js.map} +1 -1
  113. package/dist/chunks/{index.7ed46af7.js → index.7103d894.js} +2 -2
  114. package/dist/chunks/{index.7ed46af7.js.map → index.7103d894.js.map} +1 -1
  115. package/dist/chunks/{index.c01ee9cc.js → index.76fd4e58.js} +23 -23
  116. package/dist/chunks/{index.c01ee9cc.js.map → index.76fd4e58.js.map} +1 -1
  117. package/dist/chunks/{index.0a20d7ce.js → index.a1dad6fc.js} +5 -5
  118. package/dist/chunks/{index.0a20d7ce.js.map → index.a1dad6fc.js.map} +1 -1
  119. package/dist/chunks/{index.3fe9a55c.js → index.d9b801d1.js} +5 -5
  120. package/dist/chunks/{index.3fe9a55c.js.map → index.d9b801d1.js.map} +1 -1
  121. package/dist/chunks/{index.5cd5af15.js → index.f4162086.js} +3 -3
  122. package/dist/chunks/{index.5cd5af15.js.map → index.f4162086.js.map} +1 -1
  123. package/dist/chunks/info.8b6328aa.js +26 -0
  124. package/dist/chunks/info.8b6328aa.js.map +1 -0
  125. package/dist/chunks/{listbox-option-tag.0e778735.js → listbox-option-tag.fed72c34.js} +2 -2
  126. package/dist/chunks/{listbox-option-tag.0e778735.js.map → listbox-option-tag.fed72c34.js.map} +1 -1
  127. package/dist/chunks/{listbox.a440c634.js → listbox.b021b864.js} +2 -2
  128. package/dist/chunks/{listbox.a440c634.js.map → listbox.b021b864.js.map} +1 -1
  129. package/dist/chunks/{loading-button.4fd20d2d.js → loading-button.07afbfbc.js} +2 -2
  130. package/dist/chunks/{loading-button.4fd20d2d.js.map → loading-button.07afbfbc.js.map} +1 -1
  131. package/dist/chunks/{tooltip.3502709e.js → tooltip.ed1cdb86.js} +2 -2
  132. package/dist/chunks/{tooltip.3502709e.js.map → tooltip.ed1cdb86.js.map} +1 -1
  133. package/dist/code-snippet.js +6 -6
  134. package/dist/code-snippet.js.map +1 -1
  135. package/dist/country.js +1 -1
  136. package/dist/data-grid.js +7 -1678
  137. package/dist/data-grid.js.map +1 -1
  138. package/dist/date-picker.js +14 -14
  139. package/dist/date-range-picker.js +2 -2
  140. package/dist/divider.js +1 -1
  141. package/dist/dropdown.js +5 -5
  142. package/dist/empty-state.js +2 -2
  143. package/dist/filter-bar.js +12 -12
  144. package/dist/focus-trap.js +1 -1
  145. package/dist/form-layout.js +1 -1
  146. package/dist/header.js +190 -122
  147. package/dist/header.js.map +1 -1
  148. package/dist/index.js +306 -244
  149. package/dist/index.js.map +1 -1
  150. package/dist/info-icon.js +16 -34
  151. package/dist/info-icon.js.map +1 -1
  152. package/dist/input-field.js +44 -42
  153. package/dist/input-field.js.map +1 -1
  154. package/dist/internal.js +5 -5
  155. package/dist/link.js +1 -1
  156. package/dist/menu.js +1 -1
  157. package/dist/modal.js +100 -107
  158. package/dist/modal.js.map +1 -1
  159. package/dist/pagination.js +3 -3
  160. package/dist/payment-method.js +1 -1
  161. package/dist/popover.js +1 -1
  162. package/dist/popper-container.js +1 -1
  163. package/dist/radio-group.js +17 -17
  164. package/dist/radio-group.js.map +1 -1
  165. package/dist/search-bar.js +2 -2
  166. package/dist/secondary-nav.js +1 -1
  167. package/dist/segmented-control.js +2 -2
  168. package/dist/sidepanel.js +6 -6
  169. package/dist/sidepanel.js.map +1 -1
  170. package/dist/status.js +1 -1
  171. package/dist/stepper.js +1 -1
  172. package/dist/structured-list.js +1 -1
  173. package/dist/summary-grid.js +2 -2
  174. package/dist/tabs.js +8 -8
  175. package/dist/tag.js +2 -2
  176. package/dist/textarea.js +2 -2
  177. package/dist/timeline.js +4 -4
  178. package/dist/toast.js +2 -2
  179. package/dist/toggle.js +1 -1
  180. package/dist/tutorial.js +4 -4
  181. package/dist/web-types.json +87 -62
  182. package/package.json +2 -2
  183. package/dist/chunks/base-modal.babcdf50.js.map +0 -1
  184. package/dist/chunks/dropdown.ca5ff514.js.map +0 -1
  185. package/dist/chunks/index.3e96615d.js.map +0 -1
package/dist/modal.js CHANGED
@@ -1,16 +1,17 @@
1
- import { defineComponent as d, useSlots as b, onMounted as h, toRefs as O, ref as L, computed as _, useAttrs as x, watch as T } from "vue";
2
- import { b as v, f as M, d as c, c as k, a as C, B as y } from "./chunks/base-modal.babcdf50.js";
3
- import { e as ft } from "./chunks/base-modal.babcdf50.js";
4
- import { u as B } from "./chunks/use-has-slot.fbeb19ec.js";
5
- import { F as R } from "./chunks/footer-actions.d77abe77.js";
6
- import { n as g } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
7
- import { B as A } from "./chunks/button.788944f8.js";
8
- import { u as N } from "./chunks/i18n.eb5b985b.js";
9
- import { BentoButtonActions as z } from "./button.js";
10
- const V = d({
1
+ import { defineComponent as d, useSlots as g, onMounted as A, toRefs as E, ref as L, computed as f, useAttrs as x, watch as T } from "vue";
2
+ import { c as B, g as O, e as c, d as k, b as C, B as R, a as v } from "./chunks/base-modal.4f6eb218.js";
3
+ import { f as _t } from "./chunks/base-modal.4f6eb218.js";
4
+ import { u as b } from "./chunks/use-has-slot.fbeb19ec.js";
5
+ import { F as N } from "./chunks/footer-actions.c90de730.js";
6
+ import { n as S } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
7
+ import { B as M } from "./chunks/button.a554a1a8.js";
8
+ import { u as z } from "./chunks/i18n.eb5b985b.js";
9
+ import { BentoButtonActions as $ } from "./button.js";
10
+ import { d as P } from "./chunks/index.ee11faa7.js";
11
+ const F = d({
11
12
  name: "bento-modal-default"
12
- }), $ = /* @__PURE__ */ d({
13
- ...V,
13
+ }), q = /* @__PURE__ */ d({
14
+ ...F,
14
15
  props: {
15
16
  /**
16
17
  * List of actions that will be used to render the buttons.
@@ -57,7 +58,7 @@ const V = d({
57
58
  */
58
59
  columnsSize: {
59
60
  type: String,
60
- default: v.SMALLER
61
+ default: B.SMALLER
61
62
  },
62
63
  /**
63
64
  * If passed - sets first button color to red
@@ -79,10 +80,6 @@ const V = d({
79
80
  * Controls the modal's state from the outside. Set it to true to open the modal
80
81
  */
81
82
  isOpen: { type: Boolean, required: !0 },
82
- /**
83
- * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown
84
- */
85
- overflowVisible: { type: Boolean, default: !1 },
86
83
  /**
87
84
  * Sets the width of the modal
88
85
  */
@@ -97,18 +94,18 @@ const V = d({
97
94
  },
98
95
  emits: ["close-modal"],
99
96
  setup(l, { emit: t }) {
100
- const e = b(), o = B(e), a = () => {
97
+ const o = g(), e = b(o), a = () => {
101
98
  t("close-modal");
102
99
  };
103
- return h(() => {
104
- if (!(o("content") || o("content-col-1") && o("content-col-2")))
100
+ return A(() => {
101
+ if (!(e("content") || e("content-col-1") && e("content-col-2")))
105
102
  throw new Error("Bento Modal default variant requires content slot or column slots");
106
- }), { __sfc: !0, slots: e, hasSlot: o, emit: t, onCloseModal: a, BaseModal: M, FooterActions: R };
103
+ }), { __sfc: !0, slots: o, hasSlot: e, emit: t, onCloseModal: a, BaseModal: O, FooterActions: N };
107
104
  }
108
105
  });
109
- var F = function() {
110
- var t = this, e = t._self._c, o = t._self._setupProxy;
111
- return e(o.BaseModal, t._b({ staticClass: "b-modal-default", attrs: { actions: t.actions, size: t.size, "hide-close-button": t.hideCloseButton, "custom-padding": t.customPadding, "is-dismissible": t.isDismissible, "is-open": t.isOpen, "overflow-visible": t.overflowVisible, "with-column-layout": t.withColumnLayout, "initially-open": t.initiallyOpen }, on: { "close-modal": o.onCloseModal }, scopedSlots: t._u([o.hasSlot("default") ? { key: "default", fn: function() {
106
+ var j = function() {
107
+ var t = this, o = t._self._c, e = t._self._setupProxy;
108
+ return o(e.BaseModal, t._b({ staticClass: "b-modal-default", attrs: { actions: t.actions, size: t.size, "hide-close-button": t.hideCloseButton, "custom-padding": t.customPadding, "is-dismissible": t.isDismissible, "is-open": t.isOpen, "with-column-layout": t.withColumnLayout, "initially-open": t.initiallyOpen }, on: { "close-modal": e.onCloseModal }, scopedSlots: t._u([e.hasSlot("default") ? { key: "default", fn: function() {
112
109
  return [t._t("default")];
113
110
  }, proxy: !0 } : null, { key: "content-col-1", fn: function() {
114
111
  return [t._t("content-col-1")];
@@ -116,30 +113,30 @@ var F = function() {
116
113
  return [t._t("content-col-2")];
117
114
  }, proxy: !0 }, { key: "content", fn: function() {
118
115
  return [t._t("content")];
119
- }, proxy: !0 }, t.actions ? { key: "actions", fn: function() {
116
+ }, proxy: !0 }, t.actions && t.actions.length > 0 ? { key: "actions", fn: function() {
120
117
  return [t._t("actions", function() {
121
- return [e(o.FooterActions, { attrs: { actions: t.actions, "actions-label": t.actionsLabel, "destructive-actions": t.destructiveActions } })];
118
+ return [o(e.FooterActions, { attrs: { actions: t.actions, "actions-label": t.actionsLabel, "destructive-actions": t.destructiveActions } })];
122
119
  })];
123
120
  }, proxy: !0 } : null], null, !0) }, "base-modal", t.$attrs, !1));
124
- }, P = [], q = /* @__PURE__ */ g(
125
- $,
126
- F,
127
- P,
121
+ }, I = [], V = /* @__PURE__ */ S(
122
+ q,
123
+ j,
124
+ I,
128
125
  !1,
129
126
  null,
130
127
  null,
131
128
  null,
132
129
  null
133
130
  );
134
- const I = q.exports, j = {
131
+ const G = V.exports, U = {
135
132
  "en-US": {
136
133
  okButtonText: "OK"
137
134
  }
138
- }, G = d({
139
- i18n: { messages: j },
135
+ }, K = d({
136
+ i18n: { messages: U },
140
137
  name: "bento-modal-dialog"
141
- }), U = /* @__PURE__ */ d({
142
- ...G,
138
+ }), W = /* @__PURE__ */ d({
139
+ ...K,
143
140
  props: {
144
141
  /**
145
142
  * List of actions that will be used to render the buttons.
@@ -188,37 +185,33 @@ const I = q.exports, j = {
188
185
  /**
189
186
  * Controls the modal's state from the outside. Set it to true to open the modal
190
187
  */
191
- isOpen: { type: Boolean, required: !0 },
192
- /**
193
- * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown
194
- */
195
- overflowVisible: { type: Boolean, default: !1 }
188
+ isOpen: { type: Boolean, required: !0 }
196
189
  },
197
190
  emits: ["close-modal"],
198
191
  setup(l, { emit: t }) {
199
- const e = l, { t: o } = N(), a = b(), f = B(a), { actions: n, dialogType: s } = O(e), p = L(null), m = () => {
192
+ const o = l, { t: e } = z(), a = g(), p = b(a), { actions: n, dialogType: s } = E(o), m = L(null), _ = () => {
200
193
  t("close-modal");
201
194
  }, i = (r) => {
202
- p.value.internalModalActionClose(r);
203
- }, w = _(() => [
195
+ m.value.internalModalActionClose(r);
196
+ }, y = f(() => [
204
197
  {
205
- title: o("okButtonText"),
198
+ title: e("okButtonText"),
206
199
  event: i,
207
- variant: A.SECONDARY
200
+ variant: M.SECONDARY
208
201
  }
209
- ]), D = _(() => {
210
- var S;
202
+ ]), D = f(() => {
203
+ var h;
211
204
  const r = {
212
205
  title: "Cancel",
213
206
  event: i
214
- }, u = (S = n == null ? void 0 : n.value) == null ? void 0 : S[0];
215
- return s.value === c.DESTRUCTIVE ? u.critical = !0 : s.value === c.INFO && (u.variant = A.SECONDARY), [u, r];
216
- }), E = _(() => ({
207
+ }, u = (h = n == null ? void 0 : n.value) == null ? void 0 : h[0];
208
+ return s.value === c.DESTRUCTIVE ? u.critical = !0 : s.value === c.INFO && (u.variant = M.SECONDARY), [u, r];
209
+ }), w = f(() => ({
217
210
  [`b-modal-dialog--${s.value}`]: s.value
218
211
  }));
219
- return h(() => {
212
+ return A(() => {
220
213
  var r, u;
221
- if (!f("default") || !e.content && !f("content"))
214
+ if (!p("default") || !o.content && !p("content"))
222
215
  throw new Error("Bento Modal Dialog requires header title and content");
223
216
  if (((r = n == null ? void 0 : n.value) == null ? void 0 : r.length) > 1)
224
217
  throw new Error("Not more than 1 action button may be provided to Modal Dialog");
@@ -226,32 +219,32 @@ const I = q.exports, j = {
226
219
  throw new Error("Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button");
227
220
  if (s.value === c.ACKNOWLEDGEMENT && ((u = n == null ? void 0 : n.value) != null && u.length))
228
221
  throw new Error("Acknowledgement Modal Dialog does not accept action buttons");
229
- }), { __sfc: !0, emit: t, props: e, t: o, slots: a, hasSlot: f, actions: n, dialogType: s, modalRef: p, onCloseModal: m, onCloseActionButton: i, acknowledgementDialogActions: w, dialogActions: D, modalDialogConditionalClasses: E, BentoModalRole: k, BaseModal: M, BentoButtonActions: z };
222
+ }), { __sfc: !0, emit: t, props: o, t: e, slots: a, hasSlot: p, actions: n, dialogType: s, modalRef: m, onCloseModal: _, onCloseActionButton: i, acknowledgementDialogActions: y, dialogActions: D, modalDialogConditionalClasses: w, BentoModalRole: k, BaseModal: O, BentoButtonActions: $ };
230
223
  }
231
224
  });
232
- var K = function() {
233
- var t = this, e = t._self._c, o = t._self._setupProxy;
234
- return e(o.BaseModal, t._b({ ref: "modalRef", staticClass: "b-modal-dialog", class: o.modalDialogConditionalClasses, attrs: { actions: o.actions, "hide-close-button": !0, size: "small", "is-dismissible": t.isDismissible, "is-open": t.isOpen, "overflow-visible": t.overflowVisible, "modal-role": o.BentoModalRole.ALERT_DIALOG, "initially-open": t.initiallyOpen }, on: { "close-modal": o.onCloseModal }, scopedSlots: t._u([{ key: "default", fn: function() {
225
+ var Y = function() {
226
+ var t = this, o = t._self._c, e = t._self._setupProxy;
227
+ return o(e.BaseModal, t._b({ ref: "modalRef", staticClass: "b-modal-dialog", class: e.modalDialogConditionalClasses, attrs: { actions: e.actions, "hide-close-button": !0, size: "small", "is-dismissible": t.isDismissible, "is-open": t.isOpen, "modal-role": e.BentoModalRole.ALERT_DIALOG, "initially-open": t.initiallyOpen }, on: { "close-modal": e.onCloseModal }, scopedSlots: t._u([{ key: "default", fn: function() {
235
228
  return [t._t("default")];
236
229
  }, proxy: !0 }, { key: "content", fn: function() {
237
230
  return [t._v(" " + t._s(t.content) + " ")];
238
231
  }, proxy: !0 }, { key: "actions", fn: function() {
239
- return [o.dialogType === "acknowledgement" ? e(o.BentoButtonActions, { attrs: { actions: o.acknowledgementDialogActions, layout: "buttons-end" } }) : e(o.BentoButtonActions, { attrs: { actions: o.dialogActions, layout: "buttons-end" } })];
232
+ return [e.dialogType === "acknowledgement" ? o(e.BentoButtonActions, { attrs: { actions: e.acknowledgementDialogActions, layout: "buttons-end" } }) : o(e.BentoButtonActions, { attrs: { actions: e.dialogActions, layout: "buttons-end" } })];
240
233
  }, proxy: !0 }], null, !0) }, "base-modal", t.$attrs, !1));
241
- }, W = [], Y = /* @__PURE__ */ g(
242
- U,
243
- K,
234
+ }, H = [], J = /* @__PURE__ */ S(
244
235
  W,
236
+ Y,
237
+ H,
245
238
  !1,
246
239
  null,
247
240
  null,
248
241
  null,
249
242
  null
250
243
  );
251
- const H = Y.exports, J = d({
252
- components: { BentoModalDefault: I, BentoModalDialog: H }
253
- }), Q = /* @__PURE__ */ d({
254
- ...J,
244
+ const Q = J.exports, X = d({
245
+ components: { BentoModalDefault: G, BentoModalDialog: Q }
246
+ }), Z = /* @__PURE__ */ d({
247
+ ...X,
255
248
  __name: "modal",
256
249
  props: {
257
250
  /**
@@ -296,8 +289,8 @@ const H = Y.exports, J = d({
296
289
  */
297
290
  columnsSize: {
298
291
  type: String,
299
- default: v.SMALLER,
300
- validator: (l) => Object.values(v).includes(l)
292
+ default: B.SMALLER,
293
+ validator: (l) => Object.values(B).includes(l)
301
294
  },
302
295
  /**
303
296
  * If provided, manages the padding of the whole modal container
@@ -342,17 +335,13 @@ const H = Y.exports, J = d({
342
335
  default: C.SMALL,
343
336
  validator: (l) => Object.values(C).includes(l)
344
337
  },
345
- /**
346
- * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown
347
- */
348
- overflowVisible: { type: Boolean, default: !1 },
349
338
  /**
350
339
  * Choose between default or dialog versions of modal
351
340
  */
352
341
  variant: {
353
342
  type: String,
354
- default: y.DEFAULT,
355
- validator: (l) => Object.values(y).includes(l)
343
+ default: "default",
344
+ validator: (l) => Object.values(R).includes(l) || Object.values(v).includes(l)
356
345
  },
357
346
  /**
358
347
  * If provided, renders the modal's content in a two-column layout an wth dividers separating its content
@@ -361,66 +350,70 @@ const H = Y.exports, J = d({
361
350
  },
362
351
  emits: ["close-modal"],
363
352
  setup(l, { emit: t }) {
364
- const e = l, o = 500, a = b(), f = B(a), n = x(), s = _(
365
- () => e.variant === y.DEFAULT ? {
366
- hideCloseButton: e.hideCloseButton,
367
- size: e.size,
368
- customPadding: e.customPadding,
369
- actionsLabel: e.actionsLabel,
370
- destructiveActions: e.destructiveActions,
371
- isDismissible: e.isDismissible ?? !0,
372
- overflowVisible: e.overflowVisible,
373
- withColumnLayout: e.withColumnLayout,
374
- columnSize: e.columnsSize,
353
+ const o = l, e = 500, a = g(), p = b(a), n = x(), s = f(() => Object.values(v).includes(o.variant) ? o.variant : v[o.variant.toUpperCase()]), m = f(
354
+ () => s.value === v.DEFAULT ? {
355
+ hideCloseButton: o.hideCloseButton,
356
+ size: o.size,
357
+ customPadding: o.customPadding,
358
+ actionsLabel: o.actionsLabel,
359
+ destructiveActions: o.destructiveActions,
360
+ isDismissible: o.isDismissible ?? !0,
361
+ withColumnLayout: o.withColumnLayout,
362
+ columnSize: o.columnsSize,
375
363
  ...n
376
364
  } : {
377
- dialogType: e.dialogType,
378
- content: e.content,
379
- isDismissible: e.isDismissible ?? !1,
380
- overflowVisible: e.overflowVisible,
365
+ dialogType: o.dialogType,
366
+ content: o.content,
367
+ isDismissible: o.isDismissible ?? !1,
381
368
  ...n
382
369
  }
383
- ), p = () => {
370
+ ), _ = () => {
384
371
  t("close-modal");
385
372
  };
386
373
  return T(
387
- () => e.actions,
374
+ () => o.actions,
388
375
  () => {
389
- var m, i;
390
- ((i = (m = e.actions) == null ? void 0 : m[0]) == null ? void 0 : i.state) === "success" && setTimeout(p, o);
376
+ var i, y;
377
+ ((y = (i = o.actions) == null ? void 0 : i[0]) == null ? void 0 : y.state) === "success" && setTimeout(_, e);
391
378
  }
392
- ), { __sfc: !0, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME: o, slots: a, hasSlot: f, attrs: n, emit: t, props: e, customProps: s, onCloseModal: p };
379
+ ), Object.keys(n).includes("overflow-visible") && P(
380
+ 'BentoModal "overflow-visible" property',
381
+ `"overflow-visible" property was made redundant. BentoModal can work correctly without the need to pass the propery.
382
+ Remove the "overflow-visible" prop from BentoModal to remove this error.`,
383
+ "2.0.0"
384
+ ), { __sfc: !0, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME: e, slots: a, hasSlot: p, attrs: n, emit: t, props: o, computedVariant: s, customProps: m, onCloseModal: _ };
393
385
  }
394
386
  });
395
- var X = function() {
396
- var t = this, e = t._self._c, o = t._self._setupProxy;
397
- return e(t.variant, t._b({ tag: "component", staticClass: "b-modal", attrs: { "is-open": t.isOpen, actions: t.actions, "initially-open": t.initiallyOpen }, on: { "close-modal": o.onCloseModal }, scopedSlots: t._u([o.hasSlot("default") ? { key: "default", fn: function() {
387
+ var tt = function() {
388
+ var t = this, o = t._self._c, e = t._self._setupProxy;
389
+ return o(e.computedVariant, t._b({ tag: "component", staticClass: "b-modal", attrs: { "is-open": t.isOpen, actions: t.actions, "initially-open": t.initiallyOpen }, on: { "close-modal": e.onCloseModal }, scopedSlots: t._u([e.hasSlot("default") ? { key: "default", fn: function() {
398
390
  return [t._t("default")];
399
- }, proxy: !0 } : null, o.hasSlot("content-col-1") ? { key: "content-col-1", fn: function() {
391
+ }, proxy: !0 } : null, e.hasSlot("content-col-1") ? { key: "content-col-1", fn: function() {
400
392
  return [t._t("content-col-1")];
401
- }, proxy: !0 } : null, o.hasSlot("content-col-2") ? { key: "content-col-2", fn: function() {
393
+ }, proxy: !0 } : null, e.hasSlot("content-col-2") ? { key: "content-col-2", fn: function() {
402
394
  return [t._t("content-col-2")];
403
- }, proxy: !0 } : null, o.hasSlot("content") ? { key: "content", fn: function() {
395
+ }, proxy: !0 } : null, e.hasSlot("content") ? { key: "content", fn: function() {
404
396
  return [t._t("content")];
405
- }, proxy: !0 } : null], null, !0) }, "component", o.customProps, !1));
406
- }, Z = [], tt = /* @__PURE__ */ g(
407
- Q,
408
- X,
397
+ }, proxy: !0 } : null], null, !0) }, "component", e.customProps, !1));
398
+ }, et = [], ot = /* @__PURE__ */ S(
409
399
  Z,
400
+ tt,
401
+ et,
410
402
  !1,
411
403
  null,
412
404
  null,
413
405
  null,
414
406
  null
415
407
  );
416
- const ut = tt.exports;
408
+ const pt = ot.exports;
417
409
  export {
418
- ut as BentoModal,
419
- v as BentoModalColumnLayoutVariant,
410
+ pt as BentoModal,
411
+ B as BentoModalColumnLayoutVariant,
420
412
  c as BentoModalDialogType,
421
- ft as BentoModalEvent,
413
+ _t as BentoModalEvent,
422
414
  k as BentoModalRole,
423
415
  C as BentoModalSize,
424
- y as BentoModalVariant
416
+ R as BentoModalVariant,
417
+ v as BentoModalVariantMapping
425
418
  };
426
419
  //# sourceMappingURL=modal.js.map
package/dist/modal.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"modal.js","sources":["../src/components/modal/components/modal-default/modal-default.vue","../src/components/modal/components/modal-dialog/modal-dialog.vue","../src/components/modal/modal.vue"],"sourcesContent":["<template>\n <base-modal\n class=\"b-modal-default\"\n v-bind=\"$attrs\"\n :actions=\"actions\"\n :size=\"size\"\n :hide-close-button=\"hideCloseButton\"\n :custom-padding=\"customPadding\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :overflow-visible=\"overflowVisible\"\n :with-column-layout=\"withColumnLayout\"\n :initially-open=\"initiallyOpen\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template #content><slot name=\"content\"></slot></template>\n\n <template v-if=\"actions\" #actions>\n <slot name=\"actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </slot>\n </template>\n </base-modal>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, onMounted, PropType, useSlots } from 'vue';\n import { BentoModalColumnLayoutVariant, BentoModalSize } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { useHasSlot } from '@/composables';\n import { BentoButtonActionsList } from '@/components/button';\n import { FooterActions } from '@/components/internal/footer-actions';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const emit = defineEmits<{\n /**\n * Emitted when the modal is closed.\n */\n (e: 'close-modal');\n }>();\n\n defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: { type: String, default: null },\n\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: { type: String, default: null },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: { type: Boolean, default: false },\n\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: { type: Boolean, default: false },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: { type: Boolean, required: true },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: { type: Boolean, required: true },\n\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: { type: Boolean, default: false },\n\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n required: true,\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: { type: Boolean, default: false },\n });\n\n const onCloseModal = () => {\n emit('close-modal');\n };\n\n onMounted(() => {\n if (!(hasSlot('content') || (hasSlot('content-col-1') && hasSlot('content-col-2')))) {\n throw new Error('Bento Modal default variant requires content slot or column slots');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Creates a Modal based off the `base-modal` component.\n * It allows two column modals as well as content modals.\n *\n * @example\n * import { BentoModalDefault } from '@/components/modal/components';\n *\n * export default {\n * components: { BentoModalDefault },\n * template: `\n * <bento-modal-default\n * :is-dismissible=\"false\"\n * :is-open=\"isOpen\"\n * @close-modal=\"isOpen = false\"\n * >\n * <template #content-col-1>\n * // Content on the left side column\n * </template>\n *\n * <template #content-col-2>\n * // Content on the right side column\n * </template>\n *\n * <template v-if=\"actions\" #actions>\n * <footer-actions :actions=\"actions\" />\n * </template>\n * </bento-modal-default>\n * `,\n * setup() {\n * const isOpen = ref(true)\n * const footerActions = [{\n * title: 'Primary action',\n * event: () => { ... }\n * }]\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-modal-default',\n });\n</script>\n","<template>\n <base-modal\n ref=\"modalRef\"\n class=\"b-modal-dialog\"\n :actions=\"actions\"\n :class=\"modalDialogConditionalClasses\"\n :hide-close-button=\"true\"\n size=\"small\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :overflow-visible=\"overflowVisible\"\n :modal-role=\"BentoModalRole.ALERT_DIALOG\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"$attrs\"\n @close-modal=\"onCloseModal\"\n >\n <template #default>\n <slot></slot>\n </template>\n <template #content>\n {{ content }}\n </template>\n\n <template #actions>\n <bento-button-actions\n v-if=\"dialogType === 'acknowledgement'\"\n :actions=\"acknowledgementDialogActions\"\n layout=\"buttons-end\"\n />\n\n <bento-button-actions v-else :actions=\"dialogActions\" layout=\"buttons-end\" />\n </template>\n </base-modal>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, Ref, ref, toRefs, useSlots } from 'vue';\n import { BentoModalDialogType, BentoModalRole } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { useHasSlot } from '@/composables';\n import {\n BentoButtonActionObject,\n BentoButtonActions,\n BentoButtonActionsList,\n BentoButtonVariant,\n } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const emit = defineEmits<{\n (e: 'close-modal');\n }>();\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * Only 1 action button is allowed for Modal Dialog\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text that is displayed in the content section of modal\n */\n content: { type: String, required: true },\n\n /**\n * Sets different action buttons styling and appearance\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n required: true,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: { type: Boolean, required: true },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: { type: Boolean, required: true },\n\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: { type: Boolean, default: false },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { actions, dialogType } = toRefs(props);\n const modalRef: Ref<InstanceType<typeof BaseModal>> = ref(null);\n\n const onCloseModal = () => {\n emit('close-modal');\n };\n\n const onCloseActionButton = (event: Event) => {\n // Calls \"base-modal\" internal function to initialize the\n // \"close\" animation and trigger the \"close\" event.\n // This follows the same \"dialog\" pattern of calling \"dialog.close()\"\n modalRef.value.internalModalActionClose(event);\n };\n\n const acknowledgementDialogActions = computed(() => [\n {\n title: t('okButtonText') as string,\n event: onCloseActionButton,\n variant: BentoButtonVariant.SECONDARY,\n },\n ]);\n\n const dialogActions = computed(() => {\n const mandatoryCancelActionButton: BentoButtonActionObject = {\n title: 'Cancel',\n event: onCloseActionButton,\n };\n const updatedPassedActionsObject: BentoButtonActionObject = actions?.value?.[0];\n\n if (dialogType.value === BentoModalDialogType.DESTRUCTIVE) {\n updatedPassedActionsObject.critical = true;\n } else if (dialogType.value === BentoModalDialogType.INFO) {\n updatedPassedActionsObject.variant = BentoButtonVariant.SECONDARY;\n }\n\n return [updatedPassedActionsObject, mandatoryCancelActionButton];\n });\n\n const modalDialogConditionalClasses = computed(() => ({\n [`b-modal-dialog--${dialogType.value}`]: dialogType.value,\n }));\n\n onMounted(() => {\n if (!hasSlot('default') || (!props.content && !hasSlot('content'))) {\n throw new Error('Bento Modal Dialog requires header title and content');\n }\n\n if (actions?.value?.length > 1) {\n throw new Error('Not more than 1 action button may be provided to Modal Dialog');\n }\n\n if (dialogType.value !== BentoModalDialogType.ACKNOWLEDGEMENT && !actions?.value) {\n throw new Error('Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button');\n }\n\n if (dialogType.value === BentoModalDialogType.ACKNOWLEDGEMENT && actions?.value?.length) {\n throw new Error('Acknowledgement Modal Dialog does not accept action buttons');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Creates a \"dialog\" type of modal.\n * These are are modals that require a deliberate user action or acknowledgement\n * (confirmations or destructive actions).\n *\n * It’s not customizable and consists of title, description label and one action.\n *\n * @example\n * import { BentoModalDialog } from '@/components/modal/components';\n *\n * export default {\n * components: { BentoModalDialog },\n * template: `\n * <bento-modal-dialog\n * dialog-type=\"destructive\"\n * :is-dismissible=\"false\"\n * :is-open=\"isOpen\"\n * @close-modal=\"isOpen = false\"\n * >\n * Dialog content\n * </bento-modal-dialog>\n * `,\n * setup() {\n * const isOpen = ref(true)\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-modal-dialog',\n });\n</script>\n","<template>\n <component\n :is=\"variant\"\n class=\"b-modal\"\n :is-open=\"isOpen\"\n :actions=\"actions\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"customProps\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType, useAttrs, useSlots, watch } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n BentoModalDialogType,\n BentoModalSize,\n BentoModalVariant,\n } from './modal.types';\n import { BentoModalDefault, BentoModalDialog } from '@/components/modal/components';\n import { useHasSlot } from '@/composables';\n import { BentoButtonActionsList } from '@/components/button';\n\n const LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME = 500;\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const attrs = useAttrs();\n const emit = defineEmits<{\n /**\n * Emitted when the modal is closed\n */\n (e: 'close-modal');\n }>();\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: { type: String, default: null },\n\n /**\n * Text that will be displayed in the content section of Modal\n */\n content: { type: String, default: null },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant | `${BentoModalColumnLayoutVariant}`>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n validator: (value: BentoModalColumnLayoutVariant) =>\n Object.values(BentoModalColumnLayoutVariant).includes(value),\n },\n\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: { type: String, default: null },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: { type: Boolean, default: false },\n\n /**\n * Changes the visual styling of action buttons\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n default: BentoModalDialogType.CONFIRMATION,\n validator: (value: BentoModalDialogType) => Object.values(BentoModalDialogType).includes(value),\n },\n\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed without performing an action\n */\n isDismissible: { type: Boolean, default: null },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: { type: Boolean, default: false },\n\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n default: BentoModalSize.SMALL,\n validator: (value: BentoModalSize) => Object.values(BentoModalSize).includes(value),\n },\n\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: { type: Boolean, default: false },\n\n /**\n * Choose between default or dialog versions of modal\n */\n variant: {\n type: String as PropType<BentoModalVariant | `${BentoModalVariant}`>,\n default: BentoModalVariant.DEFAULT,\n validator: (value: BentoModalVariant) => Object.values(BentoModalVariant).includes(value),\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: { type: Boolean, default: false },\n });\n\n const customProps = computed(() =>\n props.variant === BentoModalVariant.DEFAULT\n ? {\n hideCloseButton: props.hideCloseButton,\n size: props.size,\n customPadding: props.customPadding,\n actionsLabel: props.actionsLabel,\n destructiveActions: props.destructiveActions,\n isDismissible: props.isDismissible ?? true,\n overflowVisible: props.overflowVisible,\n withColumnLayout: props.withColumnLayout,\n columnSize: props.columnsSize,\n ...attrs,\n }\n : {\n dialogType: props.dialogType,\n content: props.content,\n isDismissible: props.isDismissible ?? false,\n overflowVisible: props.overflowVisible,\n ...attrs,\n }\n );\n\n const onCloseModal = () => {\n emit('close-modal');\n };\n\n // If the first button is a loading button then close the modal have 0.5 seconds\n // if the state is changed to 'success'.\n watch(\n () => props.actions,\n () => {\n if (props.actions?.[0]?.state === 'success') {\n setTimeout(onCloseModal, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME);\n }\n }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * Modal is a window that appear over any other page content\n * and focus user attention exclusively on one task or piece of\n * information at the moment.\n *\n * @example\n * import { BentoModal } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModal },\n * template: `\n * <bento-modal :isOpen=\"true\">\n * Title of the Modal\n * <template #content>\n * Mandatory content slot\n * </template>\n * </bento-modal>\n * `\n * };\n */\n export default defineComponent({\n components: { BentoModalDefault, BentoModalDialog },\n });\n</script>\n"],"names":["__default__","defineComponent","slots","useSlots","hasSlot","useHasSlot","onCloseModal","emit","onMounted","messages","t","useI18n","actions","dialogType","toRefs","props","modalRef","ref","onCloseActionButton","event","acknowledgementDialogActions","computed","BentoButtonVariant","dialogActions","mandatoryCancelActionButton","updatedPassedActionsObject","_a","BentoModalDialogType","modalDialogConditionalClasses","_b","BentoModalDefault","BentoModalDialog","LOADING_BTN_CLOSE_AFTER_SUCCESS_DELA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,MAAMA,EAAM;AAAA,QACZ,eAAeA,EAAM;AAAA,QACrB,cAAcA,EAAM;AAAA,QACpB,oBAAoBA,EAAM;AAAA,QAC1B,eAAeA,EAAM,iBAAiB;AAAA,QACtC,iBAAiBA,EAAM;AAAA,QACvB,kBAAkBA,EAAM;AAAA,QACxB,YAAYA,EAAM;AAAA,QAClB,GAAGkB;AAAA,MAAA,IAEP;AAAA,QACI,YAAYlB,EAAM;AAAA,QAClB,SAASA,EAAM;AAAA,QACf,eAAeA,EAAM,iBAAiB;AAAA,QACtC,iBAAiBA,EAAM;AAAA,QACvB,GAAGkB;AAAA,MACP;AAAA,IAAA,GAGJ3B,IAAe,MAAM;AACvB,MAAAC,EAAK,aAAa;AAAA,IAAA;AAKtB,WAAA8B;AAAA,MACI,MAAMtB,EAAM;AAAA,MACZ,MAAM;;AACF,UAAIc,KAAAH,IAAAX,EAAM,YAAN,gBAAAW,EAAgB,OAAhB,gBAAAG,EAAoB,WAAU,aAC9B,WAAWvB,GAAc0B,CAA0C;AAAA,MAE3E;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"modal.js","sources":["../src/components/modal/components/modal-default/modal-default.vue","../src/components/modal/components/modal-dialog/modal-dialog.vue","../src/components/modal/modal.vue"],"sourcesContent":["<template>\n <base-modal\n class=\"b-modal-default\"\n v-bind=\"$attrs\"\n :actions=\"actions\"\n :size=\"size\"\n :hide-close-button=\"hideCloseButton\"\n :custom-padding=\"customPadding\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :with-column-layout=\"withColumnLayout\"\n :initially-open=\"initiallyOpen\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template #content><slot name=\"content\"></slot></template>\n\n <template v-if=\"actions && actions.length > 0\" #actions>\n <slot name=\"actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </slot>\n </template>\n </base-modal>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, onMounted, PropType, useSlots } from 'vue';\n import { BentoModalColumnLayoutVariant, BentoModalSize } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { useHasSlot } from '@/composables';\n import { BentoButtonActionsList } from '@/components/button';\n import { FooterActions } from '@/components/internal/footer-actions';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const emit = defineEmits<{\n /**\n * Emitted when the modal is closed.\n */\n (e: 'close-modal');\n }>();\n\n defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: { type: String, default: null },\n\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: { type: String, default: null },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: { type: Boolean, default: false },\n\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: { type: Boolean, default: false },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: { type: Boolean, required: true },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: { type: Boolean, required: true },\n\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n required: true,\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: { type: Boolean, default: false },\n });\n\n const onCloseModal = () => {\n emit('close-modal');\n };\n\n onMounted(() => {\n if (!(hasSlot('content') || (hasSlot('content-col-1') && hasSlot('content-col-2')))) {\n throw new Error('Bento Modal default variant requires content slot or column slots');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Creates a Modal based off the `base-modal` component.\n * It allows two column modals as well as content modals.\n *\n * @example\n * import { BentoModalDefault } from '@/components/modal/components';\n *\n * export default {\n * components: { BentoModalDefault },\n * template: `\n * <bento-modal-default\n * :is-dismissible=\"false\"\n * :is-open=\"isOpen\"\n * @close-modal=\"isOpen = false\"\n * >\n * <template #content-col-1>\n * // Content on the left side column\n * </template>\n *\n * <template #content-col-2>\n * // Content on the right side column\n * </template>\n *\n * <template v-if=\"actions\" #actions>\n * <footer-actions :actions=\"actions\" />\n * </template>\n * </bento-modal-default>\n * `,\n * setup() {\n * const isOpen = ref(true)\n * const footerActions = [{\n * title: 'Primary action',\n * event: () => { ... }\n * }]\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-modal-default',\n });\n</script>\n","<template>\n <base-modal\n ref=\"modalRef\"\n class=\"b-modal-dialog\"\n :actions=\"actions\"\n :class=\"modalDialogConditionalClasses\"\n :hide-close-button=\"true\"\n size=\"small\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :modal-role=\"BentoModalRole.ALERT_DIALOG\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"$attrs\"\n @close-modal=\"onCloseModal\"\n >\n <template #default>\n <slot></slot>\n </template>\n <template #content>\n {{ content }}\n </template>\n\n <template #actions>\n <bento-button-actions\n v-if=\"dialogType === 'acknowledgement'\"\n :actions=\"acknowledgementDialogActions\"\n layout=\"buttons-end\"\n />\n\n <bento-button-actions v-else :actions=\"dialogActions\" layout=\"buttons-end\" />\n </template>\n </base-modal>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, Ref, ref, toRefs, useSlots } from 'vue';\n import { BentoModalDialogType, BentoModalRole } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { useHasSlot } from '@/composables';\n import {\n BentoButtonActionObject,\n BentoButtonActions,\n BentoButtonActionsList,\n BentoButtonVariant,\n } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const emit = defineEmits<{\n (e: 'close-modal');\n }>();\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * Only 1 action button is allowed for Modal Dialog\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text that is displayed in the content section of modal\n */\n content: { type: String, required: true },\n\n /**\n * Sets different action buttons styling and appearance\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n required: true,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: { type: Boolean, required: true },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: { type: Boolean, required: true },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { actions, dialogType } = toRefs(props);\n const modalRef: Ref<InstanceType<typeof BaseModal>> = ref(null);\n\n const onCloseModal = () => {\n emit('close-modal');\n };\n\n const onCloseActionButton = (event: Event) => {\n // Calls \"base-modal\" internal function to initialize the\n // \"close\" animation and trigger the \"close\" event.\n // This follows the same \"dialog\" pattern of calling \"dialog.close()\"\n modalRef.value.internalModalActionClose(event);\n };\n\n const acknowledgementDialogActions = computed(() => [\n {\n title: t('okButtonText') as string,\n event: onCloseActionButton,\n variant: BentoButtonVariant.SECONDARY,\n },\n ]);\n\n const dialogActions = computed(() => {\n const mandatoryCancelActionButton: BentoButtonActionObject = {\n title: 'Cancel',\n event: onCloseActionButton,\n };\n const updatedPassedActionsObject: BentoButtonActionObject = actions?.value?.[0];\n\n if (dialogType.value === BentoModalDialogType.DESTRUCTIVE) {\n updatedPassedActionsObject.critical = true;\n } else if (dialogType.value === BentoModalDialogType.INFO) {\n updatedPassedActionsObject.variant = BentoButtonVariant.SECONDARY;\n }\n\n return [updatedPassedActionsObject, mandatoryCancelActionButton];\n });\n\n const modalDialogConditionalClasses = computed(() => ({\n [`b-modal-dialog--${dialogType.value}`]: dialogType.value,\n }));\n\n onMounted(() => {\n if (!hasSlot('default') || (!props.content && !hasSlot('content'))) {\n throw new Error('Bento Modal Dialog requires header title and content');\n }\n\n if (actions?.value?.length > 1) {\n throw new Error('Not more than 1 action button may be provided to Modal Dialog');\n }\n\n if (dialogType.value !== BentoModalDialogType.ACKNOWLEDGEMENT && !actions?.value) {\n throw new Error('Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button');\n }\n\n if (dialogType.value === BentoModalDialogType.ACKNOWLEDGEMENT && actions?.value?.length) {\n throw new Error('Acknowledgement Modal Dialog does not accept action buttons');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Creates a \"dialog\" type of modal.\n * These are are modals that require a deliberate user action or acknowledgement\n * (confirmations or destructive actions).\n *\n * It’s not customizable and consists of title, description label and one action.\n *\n * @example\n * import { BentoModalDialog } from '@/components/modal/components';\n *\n * export default {\n * components: { BentoModalDialog },\n * template: `\n * <bento-modal-dialog\n * dialog-type=\"destructive\"\n * :is-dismissible=\"false\"\n * :is-open=\"isOpen\"\n * @close-modal=\"isOpen = false\"\n * >\n * Dialog content\n * </bento-modal-dialog>\n * `,\n * setup() {\n * const isOpen = ref(true)\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-modal-dialog',\n });\n</script>\n","<template>\n <component\n :is=\"computedVariant\"\n class=\"b-modal\"\n :is-open=\"isOpen\"\n :actions=\"actions\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"customProps\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType, useAttrs, useSlots, watch } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n BentoModalDialogType,\n BentoModalSize,\n BentoModalVariant,\n BentoModalVariantMapping,\n } from './modal.types';\n import { BentoModalDefault, BentoModalDialog } from '@/components/modal/components';\n import { useHasSlot } from '@/composables';\n import { BentoButtonActionsList } from '@/components/button';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME = 500;\n\n type BentoModalVariantProp = BentoModalVariant | `${BentoModalVariant}` | `${BentoModalVariantMapping}`;\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const attrs = useAttrs();\n const emit = defineEmits<{\n /**\n * Emitted when the modal is closed\n */\n (e: 'close-modal');\n }>();\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: { type: String, default: null },\n\n /**\n * Text that will be displayed in the content section of Modal\n */\n content: { type: String, default: null },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant | `${BentoModalColumnLayoutVariant}`>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n validator: (value: BentoModalColumnLayoutVariant) =>\n Object.values(BentoModalColumnLayoutVariant).includes(value),\n },\n\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: { type: String, default: null },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: { type: Boolean, default: false },\n\n /**\n * Changes the visual styling of action buttons\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n default: BentoModalDialogType.CONFIRMATION,\n validator: (value: BentoModalDialogType) => Object.values(BentoModalDialogType).includes(value),\n },\n\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed without performing an action\n */\n isDismissible: { type: Boolean, default: null },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: { type: Boolean, default: false },\n\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n default: BentoModalSize.SMALL,\n validator: (value: BentoModalSize) => Object.values(BentoModalSize).includes(value),\n },\n\n /**\n * Choose between default or dialog versions of modal\n */\n variant: {\n type: String as PropType<BentoModalVariantProp>,\n default: 'default',\n validator: (value: BentoModalVariantProp) =>\n Object.values<BentoModalVariantProp>(BentoModalVariant).includes(value) ||\n Object.values<BentoModalVariantProp>(BentoModalVariantMapping).includes(value),\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: { type: Boolean, default: false },\n });\n\n const computedVariant = computed(() => {\n if (Object.values<BentoModalVariantProp>(BentoModalVariantMapping).includes(props.variant)) {\n return props.variant;\n }\n return BentoModalVariantMapping[props.variant.toUpperCase()];\n });\n\n const customProps = computed(() =>\n computedVariant.value === BentoModalVariantMapping.DEFAULT\n ? {\n hideCloseButton: props.hideCloseButton,\n size: props.size,\n customPadding: props.customPadding,\n actionsLabel: props.actionsLabel,\n destructiveActions: props.destructiveActions,\n isDismissible: props.isDismissible ?? true,\n withColumnLayout: props.withColumnLayout,\n columnSize: props.columnsSize,\n ...attrs,\n }\n : {\n dialogType: props.dialogType,\n content: props.content,\n isDismissible: props.isDismissible ?? false,\n ...attrs,\n }\n );\n\n const onCloseModal = () => {\n emit('close-modal');\n };\n\n // If the first button is a loading button then close the modal have 0.5 seconds\n // if the state is changed to 'success'.\n watch(\n () => props.actions,\n () => {\n if (props.actions?.[0]?.state === 'success') {\n setTimeout(onCloseModal, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME);\n }\n }\n );\n\n if (Object.keys(attrs).includes('overflow-visible')) {\n deprecate(\n 'BentoModal \"overflow-visible\" property',\n `\"overflow-visible\" property was made redundant. BentoModal can work correctly without the need to pass the propery.\n Remove the \"overflow-visible\" prop from BentoModal to remove this error.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Modal is a window that appear over any other page content\n * and focus user attention exclusively on one task or piece of\n * information at the moment.\n *\n * @example\n * import { BentoModal } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModal },\n * template: `\n * <bento-modal :isOpen=\"true\">\n * Title of the Modal\n * <template #content>\n * Mandatory content slot\n * </template>\n * </bento-modal>\n * `\n * };\n */\n export default defineComponent({\n components: { BentoModalDefault, BentoModalDialog },\n });\n</script>\n"],"names":["__default__","defineComponent","slots","useSlots","hasSlot","useHasSlot","onCloseModal","emit","onMounted","messages","t","useI18n","actions","dialogType","toRefs","props","modalRef","ref","onCloseActionButton","event","acknowledgementDialogActions","computed","BentoButtonVariant","dialogActions","mandatoryCancelActionButton","updatedPassedActionsObject","_a","BentoModalDialogType","modalDialogConditionalClasses","_b","BentoModalDefault","BentoModalDialog","LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME","attrs","useAttrs","computedVariant","BentoModalVariantMapping","customProps","watch","deprecate"],"mappings":";;;;;;;;;;AA8LI,MAAAA,IAAeC,EAAgB;AAAA,EAC3B,MAAM;AACV,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAvJD,UAAMC,IAAQC,KACRC,IAAUC,EAAWH,CAAK,GAmG1BI,IAAe,MAAM;AACvB,MAAAC,EAAK,aAAa;AAAA,IAAA;AAGtB,WAAAC,EAAU,MAAM;AACR,UAAA,EAAEJ,EAAQ,SAAS,KAAMA,EAAQ,eAAe,KAAKA,EAAQ,eAAe;AACtE,cAAA,IAAI,MAAM,mEA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AA,MACP;AAAA,IAAA,GAGJ3B,IAAe,MAAM;AACvB,MAAAC,EAAK,aAAa;AAAA,IAAA;AAKtB,WAAA+B;AAAA,MACI,MAAMvB,EAAM;AAAA,MACZ,MAAM;;AACF,UAAIc,KAAAH,IAAAX,EAAM,YAAN,gBAAAW,EAAgB,OAAhB,gBAAAG,EAAoB,WAAU,aAC9B,WAAWvB,GAAc0B,CAA0C;AAAA,MAE3E;AAAA,IAAA,GAGA,OAAO,KAAKC,CAAK,EAAE,SAAS,kBAAkB,KAC9CM;AAAA,MACI;AAAA,MACA;AAAA;AAAA,MAEA;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as p, ref as P, computed as r, toRefs as L } from "vue";
2
2
  import { u as N } from "./chunks/aria-label.ac9651a5.js";
3
3
  import { B as C } from "./chunks/index.ee11faa7.js";
4
- import { B as b } from "./chunks/dropdown.ca5ff514.js";
4
+ import { B as b } from "./chunks/dropdown.75441496.js";
5
5
  import { g as T } from "./chunks/unique-id.a2a2b458.js";
6
6
  import { g as y, a as x } from "./chunks/i18n.eb5b985b.js";
7
7
  import { n as l } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
8
- import { a as S } from "./chunks/button.788944f8.js";
9
- import "./assets/index46.css";
8
+ import { a as S } from "./chunks/button.a554a1a8.js";
9
+ import "./assets/index29.css";
10
10
  const I = {
11
11
  "en-US": {
12
12
  showingItems: "Showing {itemCount} items",