@adyen/bento-vue3 1.2.0 → 1.3.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 (223) hide show
  1. package/dist/@types/components.d.ts +12 -0
  2. package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +3 -3
  3. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +76 -30
  4. package/dist/@types/packages/vue2/src/components/country/composables/index.d.ts +0 -1
  5. package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +1 -2
  6. package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +11 -1
  7. package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +11 -1
  8. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +2 -1
  9. package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +0 -2
  10. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue.d.ts +10 -0
  11. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/index.d.ts +1 -0
  12. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/composable/use-form-layout-group-percentage.d.ts +3 -0
  13. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.types.d.ts +1 -0
  14. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.vue.d.ts +23 -0
  15. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/index.d.ts +1 -0
  16. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-title/form-layout-title.vue.d.ts +33 -0
  17. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-title/index.d.ts +1 -0
  18. package/dist/@types/packages/vue2/src/components/form-layout/components/index.d.ts +3 -0
  19. package/dist/@types/packages/vue2/src/components/form-layout/form-layout.types.d.ts +1 -0
  20. package/dist/@types/packages/vue2/src/components/form-layout/form-layout.vue.d.ts +33 -0
  21. package/dist/@types/packages/vue2/src/components/form-layout/index.d.ts +2 -0
  22. package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +2 -1
  23. package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +53 -22
  24. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +3 -3
  25. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +51 -44
  26. package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +3 -3
  27. package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +4 -12
  28. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +50 -4
  29. package/dist/@types/packages/vue2/src/components/search-bar/search-bar.vue.d.ts +5 -3
  30. package/dist/@types/packages/vue2/src/components/sidepanel/components/sidepanel-page.vue.d.ts +68 -0
  31. package/dist/@types/packages/vue2/src/components/sidepanel/index.d.ts +3 -0
  32. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.keys.d.ts +2 -0
  33. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.types.d.ts +21 -0
  34. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.vue.d.ts +46 -0
  35. package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +1 -1
  36. package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +2 -1
  37. package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +1 -1
  38. package/dist/@types/packages/vue2/src/composables/index.d.ts +1 -0
  39. package/dist/@types/packages/vue2/src/composables/use-form-layout-loading/use-form-layout-loading.d.ts +4 -0
  40. package/dist/@types/packages/vue2/src/index.d.ts +2 -0
  41. package/dist/@types/packages/vue2/src/utils/ts/dev-environment.d.ts +1 -0
  42. package/dist/accordion.js +1 -1
  43. package/dist/alert.js +3 -3
  44. package/dist/assets/arrow-left.css +1 -0
  45. package/dist/assets/base-button.css +1 -1
  46. package/dist/assets/button.css +1 -1
  47. package/dist/assets/calendar.css +1 -1
  48. package/dist/assets/checkbox.css +1 -1
  49. package/dist/assets/controls-group.css +1 -1
  50. package/dist/assets/copy.css +1 -1
  51. package/dist/assets/dropdown-default-textbox.css +1 -1
  52. package/dist/assets/dropdown.css +1 -1
  53. package/dist/assets/error-message.css +1 -1
  54. package/dist/assets/footer-actions.css +1 -0
  55. package/dist/assets/grid-layout.css +1 -1
  56. package/dist/assets/index.css +1 -1
  57. package/dist/assets/index10.css +1 -1
  58. package/dist/assets/index11.css +1 -1
  59. package/dist/assets/index12.css +1 -1
  60. package/dist/assets/index13.css +1 -1
  61. package/dist/assets/index14.css +1 -1
  62. package/dist/assets/index15.css +1 -1
  63. package/dist/assets/index16.css +1 -1
  64. package/dist/assets/index17.css +1 -1
  65. package/dist/assets/index18.css +1 -1
  66. package/dist/assets/index19.css +1 -1
  67. package/dist/assets/index2.css +1 -1
  68. package/dist/assets/index20.css +1 -1
  69. package/dist/assets/index21.css +1 -1
  70. package/dist/assets/index22.css +1 -1
  71. package/dist/assets/index23.css +1 -1
  72. package/dist/assets/index24.css +1 -1
  73. package/dist/assets/index25.css +1 -1
  74. package/dist/assets/index26.css +1 -1
  75. package/dist/assets/index27.css +1 -1
  76. package/dist/assets/index28.css +1 -1
  77. package/dist/assets/index29.css +1 -1
  78. package/dist/assets/index3.css +1 -1
  79. package/dist/assets/index30.css +1 -1
  80. package/dist/assets/index31.css +1 -1
  81. package/dist/assets/index32.css +1 -1
  82. package/dist/assets/index33.css +1 -1
  83. package/dist/assets/index34.css +1 -1
  84. package/dist/assets/index35.css +1 -1
  85. package/dist/assets/index36.css +1 -1
  86. package/dist/assets/index37.css +1 -1
  87. package/dist/assets/index38.css +1 -1
  88. package/dist/assets/index39.css +1 -1
  89. package/dist/assets/index4.css +1 -1
  90. package/dist/assets/index40.css +1 -1
  91. package/dist/assets/index41.css +1 -0
  92. package/dist/assets/index42.css +1 -0
  93. package/dist/assets/index5.css +1 -1
  94. package/dist/assets/index6.css +1 -1
  95. package/dist/assets/index7.css +1 -1
  96. package/dist/assets/index8.css +1 -1
  97. package/dist/assets/index9.css +1 -1
  98. package/dist/assets/listbox-option-tag.css +1 -1
  99. package/dist/assets/listbox.css +1 -1
  100. package/dist/assets/loading-button.css +1 -1
  101. package/dist/assets/tooltip.css +1 -1
  102. package/dist/avatar-image.js +1 -1
  103. package/dist/badge.js +1 -1
  104. package/dist/button.js +3 -3
  105. package/dist/card.js +3 -3
  106. package/dist/checkbox.js +111 -97
  107. package/dist/checkbox.js.map +1 -1
  108. package/dist/chunks/arrow-left.cdbcc128.js +30 -0
  109. package/dist/chunks/arrow-left.cdbcc128.js.map +1 -0
  110. package/dist/chunks/{base-button.4a56c2fb.js → base-button.20be08da.js} +2 -2
  111. package/dist/chunks/{base-button.4a56c2fb.js.map → base-button.20be08da.js.map} +1 -1
  112. package/dist/chunks/{button-actions.a6e541ad.js → button-actions.54e28e75.js} +2 -2
  113. package/dist/chunks/{button-actions.a6e541ad.js.map → button-actions.54e28e75.js.map} +1 -1
  114. package/dist/chunks/{button.1f630b6e.js → button.e1c39f66.js} +2 -2
  115. package/dist/chunks/{button.1f630b6e.js.map → button.e1c39f66.js.map} +1 -1
  116. package/dist/chunks/{calendar.08885a56.js → calendar.09b683b3.js} +6 -6
  117. package/dist/chunks/calendar.09b683b3.js.map +1 -0
  118. package/dist/chunks/{checkbox.cfb8b8df.js → checkbox.a404069b.js} +3 -3
  119. package/dist/chunks/{checkbox.cfb8b8df.js.map → checkbox.a404069b.js.map} +1 -1
  120. package/dist/chunks/controls-group.60fb2a86.js +136 -0
  121. package/dist/chunks/controls-group.60fb2a86.js.map +1 -0
  122. package/dist/chunks/{copy.1ce0203e.js → copy.2cf5e6c3.js} +3 -3
  123. package/dist/chunks/{copy.1ce0203e.js.map → copy.2cf5e6c3.js.map} +1 -1
  124. package/dist/chunks/{dropdown-default-textbox.dd77bb42.js → dropdown-default-textbox.203e747f.js} +54 -51
  125. package/dist/chunks/dropdown-default-textbox.203e747f.js.map +1 -0
  126. package/dist/chunks/{dropdown.f9997464.js → dropdown.8b415aac.js} +188 -185
  127. package/dist/chunks/dropdown.8b415aac.js.map +1 -0
  128. package/dist/chunks/{error-message.b88bb75a.js → error-message.ddfe8ea5.js} +2 -2
  129. package/dist/chunks/{error-message.b88bb75a.js.map → error-message.ddfe8ea5.js.map} +1 -1
  130. package/dist/chunks/footer-actions.0f640f87.js +106 -0
  131. package/dist/chunks/footer-actions.0f640f87.js.map +1 -0
  132. package/dist/chunks/form-layout.types.a7a1438d.js +5 -0
  133. package/dist/chunks/form-layout.types.a7a1438d.js.map +1 -0
  134. package/dist/chunks/{index.361c61d3.js → index.13949709.js} +2 -2
  135. package/dist/chunks/{index.361c61d3.js.map → index.13949709.js.map} +1 -1
  136. package/dist/chunks/index.222d29b0.js +120 -0
  137. package/dist/chunks/index.222d29b0.js.map +1 -0
  138. package/dist/chunks/{index.64b7b3cc.js → index.3da90517.js} +6 -6
  139. package/dist/chunks/{index.64b7b3cc.js.map → index.3da90517.js.map} +1 -1
  140. package/dist/chunks/{index.96001b1d.js → index.aa34e363.js} +3 -3
  141. package/dist/chunks/{index.96001b1d.js.map → index.aa34e363.js.map} +1 -1
  142. package/dist/chunks/{index.b46a5047.js → index.c9225c3b.js} +260 -253
  143. package/dist/chunks/{index.b46a5047.js.map → index.c9225c3b.js.map} +1 -1
  144. package/dist/chunks/{index.7dd953ea.js → index.d27367cd.js} +2 -2
  145. package/dist/chunks/{index.7dd953ea.js.map → index.d27367cd.js.map} +1 -1
  146. package/dist/chunks/{listbox-option-tag.73661a5d.js → listbox-option-tag.5ae8b79b.js} +3 -3
  147. package/dist/chunks/{listbox-option-tag.73661a5d.js.map → listbox-option-tag.5ae8b79b.js.map} +1 -1
  148. package/dist/chunks/{listbox.7b5e0eee.js → listbox.0c7c4e5e.js} +339 -339
  149. package/dist/chunks/listbox.0c7c4e5e.js.map +1 -0
  150. package/dist/chunks/loading-button.61d8ebe5.js +109 -0
  151. package/dist/chunks/loading-button.61d8ebe5.js.map +1 -0
  152. package/dist/chunks/{tooltip.53290a34.js → tooltip.835d9b52.js} +2 -2
  153. package/dist/chunks/tooltip.835d9b52.js.map +1 -0
  154. package/dist/chunks/use-form-layout-loading.d03e5d48.js +12 -0
  155. package/dist/chunks/use-form-layout-loading.d03e5d48.js.map +1 -0
  156. package/dist/code-snippet.js +6 -6
  157. package/dist/code-snippet.js.map +1 -1
  158. package/dist/country.js +559 -595
  159. package/dist/country.js.map +1 -1
  160. package/dist/currency.js +1 -1
  161. package/dist/data-grid.js +682 -702
  162. package/dist/data-grid.js.map +1 -1
  163. package/dist/date-picker.js +82 -75
  164. package/dist/date-picker.js.map +1 -1
  165. package/dist/date-range-picker.js +2 -2
  166. package/dist/date.js +1 -1
  167. package/dist/divider.js +1 -1
  168. package/dist/dropdown.js +67 -62
  169. package/dist/dropdown.js.map +1 -1
  170. package/dist/filter-bar.js +446 -442
  171. package/dist/filter-bar.js.map +1 -1
  172. package/dist/focus-trap.js +1 -1
  173. package/dist/form-layout.js +188 -0
  174. package/dist/form-layout.js.map +1 -0
  175. package/dist/header.js +3 -3
  176. package/dist/index.js +191 -187
  177. package/dist/index.js.map +1 -1
  178. package/dist/info-icon.js +2 -2
  179. package/dist/input-field.js +123 -121
  180. package/dist/input-field.js.map +1 -1
  181. package/dist/internal.js +6 -6
  182. package/dist/link.js +2 -2
  183. package/dist/loading-indicator.js +1 -1
  184. package/dist/menu.js +4 -4
  185. package/dist/modal.js +266 -397
  186. package/dist/modal.js.map +1 -1
  187. package/dist/pagination.js +4 -4
  188. package/dist/payment-method.js +2 -2
  189. package/dist/popover.js +4 -4
  190. package/dist/popper-container.js +2 -2
  191. package/dist/radio-group.js +127 -124
  192. package/dist/radio-group.js.map +1 -1
  193. package/dist/search-bar.js +2 -2
  194. package/dist/segmented-control.js +4 -4
  195. package/dist/sidepanel.js +279 -0
  196. package/dist/sidepanel.js.map +1 -0
  197. package/dist/status.js +2 -2
  198. package/dist/structured-list.js +1 -1
  199. package/dist/summary-grid.js +3 -3
  200. package/dist/tabs.js +7 -7
  201. package/dist/tabs.js.map +1 -1
  202. package/dist/tag.js +3 -3
  203. package/dist/textarea.js +97 -95
  204. package/dist/textarea.js.map +1 -1
  205. package/dist/timeline.js +8 -8
  206. package/dist/timeline.js.map +1 -1
  207. package/dist/toast.js +3 -3
  208. package/dist/toggle.js +2 -2
  209. package/dist/typography.js +1 -1
  210. package/dist/web-types.json +1 -1
  211. package/package.json +14 -7
  212. package/dist/@types/packages/vue2/src/components/country/composables/useCountryFlag.d.ts +0 -2
  213. package/dist/chunks/calendar.08885a56.js.map +0 -1
  214. package/dist/chunks/controls-group.806da9bd.js +0 -75
  215. package/dist/chunks/controls-group.806da9bd.js.map +0 -1
  216. package/dist/chunks/dropdown-default-textbox.dd77bb42.js.map +0 -1
  217. package/dist/chunks/dropdown.f9997464.js.map +0 -1
  218. package/dist/chunks/index.ebf5f6cf.js +0 -119
  219. package/dist/chunks/index.ebf5f6cf.js.map +0 -1
  220. package/dist/chunks/listbox.7b5e0eee.js.map +0 -1
  221. package/dist/chunks/loading-button.426d89b9.js +0 -113
  222. package/dist/chunks/loading-button.426d89b9.js.map +0 -1
  223. package/dist/chunks/tooltip.53290a34.js.map +0 -1
package/dist/modal.js CHANGED
@@ -1,370 +1,251 @@
1
- import { defineComponent as T, ref as se, toRefs as G, computed as f, watch as ie, onMounted as z, resolveComponent as v, openBlock as d, createElementBlock as N, createElementVNode as D, normalizeClass as U, withKeys as re, createVNode as M, withCtx as i, normalizeStyle as q, renderSlot as u, createCommentVNode as g, createBlock as p, unref as y, createTextVNode as j, toDisplayString as H, createSlots as Q, resolveDynamicComponent as de, mergeProps as ue } from "vue";
2
- import { B as ce, a as w } from "./chunks/button.1f630b6e.js";
3
- import { B as J, a as X, b as Z } from "./chunks/index.ebf5f6cf.js";
4
- import { BentoDivider as me } from "./divider.js";
5
- import { B as pe } from "./chunks/index.361c61d3.js";
6
- import { u as V } from "./chunks/use-has-slot.068222e6.js";
7
- import { u as fe } from "./chunks/aria-label.ac9651a5.js";
8
- import { u as x } from "./chunks/i18n.6c402773.js";
9
- import { g as ye } from "./chunks/get-slot-text.2db867f8.js";
10
- import { C as ve } from "./chunks/cross.5c36a670.js";
11
- import { G as be, a as ge } from "./chunks/grid-layout.a30855ff.js";
12
- import { _ as $ } from "./chunks/_plugin-vue_export-helper.dad06003.js";
13
- import { B as F, c as K } from "./chunks/button-actions.a6e541ad.js";
14
- import "./assets/index21.css";
15
- var R = /* @__PURE__ */ ((e) => (e.DEFAULT = "BentoModalDefault", e.DIALOG = "BentoModalDialog", e))(R || {}), E = /* @__PURE__ */ ((e) => (e.SMALL = "small", e.MEDIUM = "medium", e.LARGE = "large", e))(E || {}), S = /* @__PURE__ */ ((e) => (e.SMALLER = "smaller", e.EQUAL = "equal", e.BIGGER = "bigger", e))(S || {}), I = /* @__PURE__ */ ((e) => (e.DIALOG = "dialog", e.ALERT_DIALOG = "alertdialog", e))(I || {}), L = /* @__PURE__ */ ((e) => (e.CONFIRMATION = "confirmation", e.DESTRUCTIVE = "destructive", e.INFO = "info", e.ACKNOWLEDGEMENT = "acknowledgement", e))(L || {}), h = /* @__PURE__ */ ((e) => (e.CLOSE_MODAL = "close-modal", e))(h || {});
16
- const W = {
1
+ import { defineComponent as $, useAttrs as U, ref as J, computed as m, watch as X, onMounted as G, resolveComponent as f, openBlock as i, createElementBlock as I, createElementVNode as E, normalizeClass as z, withKeys as Z, createVNode as M, withCtx as n, normalizeStyle as P, renderSlot as s, createCommentVNode as h, createBlock as y, mergeProps as V, createSlots as K, toRefs as x, createTextVNode as ee, toDisplayString as oe, resolveDynamicComponent as te } from "vue";
2
+ import { B as ne, a as _ } from "./chunks/button.e1c39f66.js";
3
+ import { B as ae, a as le, b as se } from "./chunks/index.222d29b0.js";
4
+ import { BentoDivider as ie } from "./divider.js";
5
+ import { B as de } from "./chunks/index.13949709.js";
6
+ import { u as k } from "./chunks/use-has-slot.068222e6.js";
7
+ import { u as W } from "./chunks/i18n.6c402773.js";
8
+ import { C as re } from "./chunks/cross.5c36a670.js";
9
+ import { G as ue, a as ce } from "./chunks/grid-layout.a30855ff.js";
10
+ import { _ as N } from "./chunks/_plugin-vue_export-helper.dad06003.js";
11
+ import { F as me } from "./chunks/footer-actions.0f640f87.js";
12
+ import { B as fe, c as ye } from "./chunks/button-actions.54e28e75.js";
13
+ import "./assets/index12.css";
14
+ var w = /* @__PURE__ */ ((e) => (e.DEFAULT = "BentoModalDefault", e.DIALOG = "BentoModalDialog", e))(w || {}), O = /* @__PURE__ */ ((e) => (e.SMALL = "small", e.MEDIUM = "medium", e.LARGE = "large", e))(O || {}), B = /* @__PURE__ */ ((e) => (e.SMALLER = "smaller", e.EQUAL = "equal", e.BIGGER = "bigger", e))(B || {}), T = /* @__PURE__ */ ((e) => (e.DIALOG = "dialog", e.ALERT_DIALOG = "alertdialog", e))(T || {}), g = /* @__PURE__ */ ((e) => (e.CONFIRMATION = "confirmation", e.DESTRUCTIVE = "destructive", e.INFO = "info", e.ACKNOWLEDGEMENT = "acknowledgement", e))(g || {}), p = /* @__PURE__ */ ((e) => (e.CLOSE_MODAL = "close-modal", e))(p || {});
15
+ const q = {
17
16
  "en-US": {
18
17
  ariaLabelFallback: "modal"
19
18
  }
20
- }, he = T({
21
- i18n: { messages: W },
19
+ }, pe = $({
20
+ i18n: { messages: q },
22
21
  name: "base-modal",
23
- components: { CrossIcon: ve, BentoTypography: J, BentoButton: ce, BentoDivider: me, BentoFocusTrap: pe, GridLayout: be },
22
+ components: { CrossIcon: re, BentoTypography: ae, BentoButton: ne, BentoDivider: ie, BentoFocusTrap: de, GridLayout: ue },
24
23
  props: {
25
24
  /**
26
- * Defines whether the modal will be an alert modal
25
+ * 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.
27
26
  */
28
- modalRole: {
27
+ columnsSize: {
29
28
  type: String,
30
- default: I.DIALOG
29
+ default: B.SMALLER
31
30
  },
32
31
  /**
33
- * If set to true, it allows the modal to be closed by clicking outside of it
32
+ * If provided, manages the padding of the whole modal container
34
33
  */
35
- isDismissible: {
36
- type: Boolean,
37
- required: !0
38
- },
34
+ customPadding: { type: String, default: null },
39
35
  /**
40
36
  * Hides a cross icon on the right side of the title
41
37
  */
42
- hideCloseButton: {
43
- type: Boolean,
44
- required: !0
45
- },
38
+ hideCloseButton: { type: Boolean, required: !0 },
46
39
  /**
47
- * If provided, manages the padding of the whole modal container
40
+ * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.
48
41
  */
49
- customPadding: {
50
- type: String,
51
- default: null
52
- },
42
+ initiallyOpen: { type: Boolean, default: !1 },
53
43
  /**
54
- * If provided, renders the modal's content in a two-column layout an wth dividers separating its content
44
+ * If set to true, it allows the modal to be closed by clicking outside of it
55
45
  */
56
- withColumnLayout: {
57
- type: Boolean,
58
- default: !1
59
- },
46
+ isDismissible: { type: Boolean, required: !0 },
60
47
  /**
61
- * 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.
48
+ * Controls the modal's state from the outside. Set it to true to open the modal
62
49
  */
63
- columnsSize: {
64
- type: String,
65
- default: S.SMALLER
66
- },
50
+ isOpen: { type: Boolean, required: !0 },
67
51
  /**
68
- * Controls the modal's state from the outside. Set it to true to open the modal
52
+ * Defines whether the modal will be an alert modal
69
53
  */
70
- isOpen: {
71
- type: Boolean,
72
- required: !0
73
- },
54
+ modalRole: { type: String, default: T.DIALOG },
55
+ /**
56
+ * Allows the inner elments to overflow the dialog
57
+ */
58
+ overflowVisible: { type: Boolean, default: !1 },
74
59
  /**
75
60
  * Sets the width of the modal
76
61
  */
77
62
  size: {
78
63
  type: String,
79
- default: E.SMALL
64
+ default: O.SMALL
80
65
  },
81
66
  /**
82
- * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.
67
+ * If provided, renders the modal's content in a two-column layout an wth dividers separating its content
83
68
  */
84
- initiallyOpen: {
85
- type: Boolean,
86
- default: !1
87
- },
88
- overflowVisible: {
89
- type: Boolean,
90
- default: !1
91
- }
69
+ withColumnLayout: { type: Boolean, default: !1 }
92
70
  },
93
- emits: [h.CLOSE_MODAL],
94
- setup(e, { slots: t, emit: l }) {
95
- const { t: r } = x({ messages: W }), a = V(t), o = se(null), { isOpen: n, customPadding: s, overflowVisible: b } = G(e), C = f(
96
- () => a("default") && t.default() ? ye(t)("default") : null
97
- ), B = f(() => {
98
- if (!s.value)
71
+ emits: [p.CLOSE_MODAL],
72
+ setup(e, { slots: l, emit: r }) {
73
+ const { t: a } = W({ messages: q }), u = U(), o = k(l), t = J(null), c = m(() => {
74
+ if (!e.customPadding)
99
75
  return {};
100
- const O = {
101
- paddingLeft: s.value,
102
- paddingRight: s.value
103
- }, P = { ...O, paddingTop: void 0, paddingBottom: void 0 };
104
- return a("default") || (P.paddingTop = s.value), a("actions") || (P.paddingBottom = s.value), {
105
- header: { ...O, paddingTop: s.value },
106
- content: P,
107
- actions: { ...O, paddingBottom: s.value }
76
+ const A = {
77
+ paddingLeft: e.customPadding,
78
+ paddingRight: e.customPadding
79
+ }, R = { ...A, paddingTop: void 0, paddingBottom: void 0 };
80
+ return o("default") || (R.paddingTop = e.customPadding), o("actions") || (R.paddingBottom = e.customPadding), {
81
+ header: { ...A, paddingTop: e.customPadding },
82
+ content: R,
83
+ actions: { ...A, paddingBottom: e.customPadding }
108
84
  };
109
- }), A = fe({
110
- label: C,
111
- defaultFallback: r("ariaLabelFallback")
112
- }), c = f(() => e.withColumnLayout && e.size === E.LARGE), m = () => {
113
- o.value.showModal();
114
- }, _ = () => {
115
- l(h.CLOSE_MODAL);
116
- }, k = () => {
117
- o.value.close(), _();
118
- }, oe = () => {
119
- k();
120
- }, te = ({ target: O }) => {
121
- O && O.tagName === I.DIALOG.toUpperCase() && k();
122
- }, ne = f(() => ({
85
+ }), C = m(
86
+ () => u["aria-label"] ?? a("ariaLabelFallback")
87
+ ), b = m(() => e.withColumnLayout && e.size === O.LARGE), L = () => {
88
+ t.value.showModal();
89
+ }, S = () => {
90
+ r(p.CLOSE_MODAL);
91
+ }, d = () => {
92
+ t.value.close(), S();
93
+ }, v = () => {
94
+ d();
95
+ }, D = ({ target: A }) => {
96
+ A && A.tagName === T.DIALOG.toUpperCase() && d();
97
+ }, Y = m(() => ({
123
98
  [`b-modal-base__container--${e.size}`]: e.size,
124
- ["b-modal-base__container--visible"]: n.value,
125
- ["b-modal-base__container--overflow-visible"]: b.value,
126
- ["b-modal-base__container--column-layout"]: c.value
127
- })), ae = f(() => ({
128
- "b-modal-base__content--column-layout": c.value,
129
- "b-modal-base__content--with-header": a("default"),
130
- "b-modal-base__content--with-actions": a("actions")
131
- })), le = f(() => e.columnsSize === S.SMALLER ? [{ small: 4, medium: 4, large: 4 }] : e.columnsSize === S.BIGGER ? [{ small: 8, medium: 8, large: 8 }] : [{ small: 6, medium: 6, large: 6 }]);
132
- return ie(
133
- () => [n.value, o.value],
99
+ "b-modal-base__container--visible": e.isOpen,
100
+ "b-modal-base__container--overflow-visible": e.overflowVisible,
101
+ "b-modal-base__container--column-layout": b.value
102
+ })), H = m(() => ({
103
+ "b-modal-base__content--column-layout": b.value,
104
+ "b-modal-base__content--with-header": o("default"),
105
+ "b-modal-base__content--with-actions": o("actions")
106
+ })), Q = m(() => e.columnsSize === B.SMALLER ? [{ small: 4, medium: 4, large: 4 }] : e.columnsSize === B.BIGGER ? [{ small: 8, medium: 8, large: 8 }] : [{ small: 6, medium: 6, large: 6 }]);
107
+ return X(
108
+ () => [e.isOpen, t.value],
134
109
  () => {
135
- n.value && o.value ? m() : o.value && k();
110
+ e.isOpen && t.value ? L() : t.value && d();
136
111
  },
137
112
  { immediate: !0 }
138
- ), z(() => {
139
- n.value && o.value && m();
113
+ ), G(() => {
114
+ e.isOpen && t.value && L();
140
115
  }), {
141
116
  // Refs
142
- modal: o,
143
- computedAriaLabel: A,
117
+ modal: t,
118
+ computedAriaLabel: C,
144
119
  // Handling the state
145
- openModal: m,
146
- closeModalOnClickOutside: te,
120
+ openModal: L,
121
+ closeModalOnClickOutside: D,
147
122
  // Methods
148
- onCloseButtonClick: oe,
149
- hasSlot: a,
150
- emitCloseEvent: _,
123
+ onCloseButtonClick: v,
124
+ hasSlot: o,
125
+ emitCloseEvent: S,
126
+ t: a,
151
127
  // Styles
152
- modalConditionalClasses: ne,
153
- modalContentConditionalClasses: ae,
154
- customPaddingStyles: B,
155
- hasColumnLayout: c,
156
- computedColumnWidth: le,
128
+ modalConditionalClasses: Y,
129
+ modalContentConditionalClasses: H,
130
+ customPaddingStyles: c,
131
+ hasColumnLayout: b,
132
+ computedColumnWidth: Q,
157
133
  // Enums
158
- BentoButtonVariant: w,
159
- BentoTypographyElement: X,
160
- BentoTypographyVariant: Z,
161
- GridLayoutContainerType: ge
134
+ BentoButtonVariant: _,
135
+ BentoTypographyElement: le,
136
+ BentoTypographyVariant: se,
137
+ GridLayoutContainerType: ce
162
138
  };
163
139
  }
164
140
  });
165
- const Ce = { class: "b-modal-base" }, Le = ["role", "aria-label", "open"], Be = { class: "b-modal-base__wrapper" }, Ae = { class: "b-modal-base__header" }, _e = {
141
+ const be = { class: "b-modal-base" }, ve = ["role", "aria-label", "open"], ge = { class: "b-modal-base__wrapper" }, Ce = { class: "b-modal-base__header" }, Le = {
166
142
  "aria-label": "modal actions",
167
143
  class: "b-modal-base__actions"
168
144
  };
169
- function Se(e, t, l, r, a, o) {
170
- const n = v("bento-typography"), s = v("cross-icon"), b = v("bento-button"), C = v("bento-divider"), B = v("grid-layout"), A = v("bento-focus-trap");
171
- return d(), N("div", Ce, [
172
- D("dialog", {
145
+ function he(e, l, r, a, u, o) {
146
+ const t = f("bento-typography"), c = f("cross-icon"), C = f("bento-button"), b = f("bento-divider"), L = f("grid-layout"), S = f("bento-focus-trap");
147
+ return i(), I("div", be, [
148
+ E("dialog", {
173
149
  ref: "modal",
174
150
  role: e.modalRole,
175
151
  "aria-label": e.computedAriaLabel,
176
- class: U(["b-modal-base__container", e.modalConditionalClasses]),
152
+ class: z(["b-modal-base__container", e.modalConditionalClasses]),
177
153
  open: e.initiallyOpen,
178
- onClick: t[0] || (t[0] = (c) => e.isDismissible && e.closeModalOnClickOutside(c)),
179
- onKeydown: t[1] || (t[1] = re((...c) => e.emitCloseEvent && e.emitCloseEvent(...c), ["esc"]))
154
+ onClick: l[0] || (l[0] = (d) => e.isDismissible && e.closeModalOnClickOutside(d)),
155
+ onKeydown: l[1] || (l[1] = Z((...d) => e.emitCloseEvent && e.emitCloseEvent(...d), ["esc"]))
180
156
  }, [
181
- M(A, null, {
182
- default: i(() => [
183
- D("div", Be, [
184
- e.hasSlot("default") || !e.hideCloseButton ? (d(), N("div", {
157
+ M(S, null, {
158
+ default: n(() => [
159
+ E("div", ge, [
160
+ e.hasSlot("default") || !e.hideCloseButton ? (i(), I("div", {
185
161
  key: 0,
186
162
  class: "b-modal-base__header-container",
187
- style: q(e.customPaddingStyles.header)
163
+ style: P(e.customPaddingStyles.header)
188
164
  }, [
189
- D("div", Ae, [
190
- M(n, {
165
+ E("div", Ce, [
166
+ M(t, {
191
167
  class: "b-modal-base__title",
192
168
  "aria-label": "base modal title",
193
169
  el: e.BentoTypographyElement.SPAN,
194
170
  variant: e.BentoTypographyVariant.TITLE,
195
171
  stronger: ""
196
172
  }, {
197
- default: i(() => [
198
- e.hasSlot("default") ? u(e.$slots, "default", { key: 0 }, void 0, !0) : g("", !0)
173
+ default: n(() => [
174
+ e.hasSlot("default") ? s(e.$slots, "default", { key: 0 }, void 0, !0) : h("", !0)
199
175
  ]),
200
176
  _: 3
201
177
  }, 8, ["el", "variant"]),
202
- e.hideCloseButton ? g("", !0) : (d(), p(b, {
178
+ e.hideCloseButton ? h("", !0) : (i(), y(C, {
203
179
  key: 0,
204
180
  class: "b-modal-base__close-button",
205
181
  variant: e.BentoButtonVariant.TERTIARY,
206
182
  type: "button",
207
183
  onClick: e.onCloseButtonClick
208
184
  }, {
209
- default: i(() => [
210
- M(s, { "svg-title": "close" })
185
+ default: n(() => [
186
+ M(c, { "svg-title": "close" })
211
187
  ]),
212
188
  _: 1
213
189
  }, 8, ["variant", "onClick"]))
214
190
  ]),
215
- e.hasColumnLayout ? (d(), p(C, {
191
+ e.hasColumnLayout ? (i(), y(b, {
216
192
  key: 0,
217
193
  class: "b-modal-base__divider"
218
- })) : g("", !0)
219
- ], 4)) : g("", !0),
220
- D("div", {
221
- class: U(["b-modal-base__content", e.modalContentConditionalClasses]),
222
- style: q(e.customPaddingStyles.content)
194
+ })) : h("", !0)
195
+ ], 4)) : h("", !0),
196
+ E("div", {
197
+ class: z(["b-modal-base__content", e.modalContentConditionalClasses]),
198
+ style: P(e.customPaddingStyles.content)
223
199
  }, [
224
- e.hasSlot("content") ? (d(), p(n, {
200
+ e.hasSlot("content") ? (i(), y(t, {
225
201
  key: 0,
226
202
  "aria-label": "base modal content",
227
203
  el: e.BentoTypographyElement.DIV,
228
204
  variant: e.BentoTypographyVariant.BODY,
229
205
  stronger: ""
230
206
  }, {
231
- default: i(() => [
232
- e.hasColumnLayout ? (d(), p(B, {
207
+ default: n(() => [
208
+ e.hasColumnLayout ? (i(), y(L, {
233
209
  key: 0,
234
210
  "column-width": e.computedColumnWidth,
235
211
  "container-type": e.GridLayoutContainerType.NORMAL,
236
212
  class: "b-modal-base__grid"
237
213
  }, {
238
- "col-1": i(() => [
239
- u(e.$slots, "content-col-1", {}, void 0, !0)
214
+ "col-1": n(() => [
215
+ s(e.$slots, "content-col-1", {}, void 0, !0)
240
216
  ]),
241
- "col-2": i(() => [
242
- u(e.$slots, "content-col-2", {}, void 0, !0)
217
+ "col-2": n(() => [
218
+ s(e.$slots, "content-col-2", {}, void 0, !0)
243
219
  ]),
244
220
  _: 3
245
- }, 8, ["column-width", "container-type"])) : u(e.$slots, "content", { key: 1 }, void 0, !0)
221
+ }, 8, ["column-width", "container-type"])) : s(e.$slots, "content", { key: 1 }, void 0, !0)
246
222
  ]),
247
223
  _: 3
248
- }, 8, ["el", "variant"])) : g("", !0)
224
+ }, 8, ["el", "variant"])) : h("", !0)
249
225
  ], 6),
250
- e.hasSlot("actions") ? (d(), N("div", {
226
+ e.hasSlot("actions") ? (i(), I("div", {
251
227
  key: 1,
252
228
  class: "b-modal-base__actions-container",
253
- style: q(e.customPaddingStyles.actions)
229
+ style: P(e.customPaddingStyles.actions)
254
230
  }, [
255
- e.hasColumnLayout ? (d(), p(C, {
231
+ e.hasColumnLayout ? (i(), y(b, {
256
232
  key: 0,
257
233
  class: "b-modal-base__divider"
258
- })) : g("", !0),
259
- D("div", _e, [
260
- u(e.$slots, "actions", {}, void 0, !0)
234
+ })) : h("", !0),
235
+ E("div", Le, [
236
+ s(e.$slots, "actions", {}, void 0, !0)
261
237
  ])
262
- ], 4)) : g("", !0)
238
+ ], 4)) : h("", !0)
263
239
  ])
264
240
  ]),
265
241
  _: 3
266
242
  })
267
- ], 42, Le)
243
+ ], 42, ve)
268
244
  ]);
269
245
  }
270
- const ee = /* @__PURE__ */ $(he, [["render", Se], ["__scopeId", "data-v-c82b2878"]]), Oe = { class: "b-footer-actions" }, Ee = {}, De = /* @__PURE__ */ T({
271
- ...Ee,
272
- __name: "footer-actions",
273
- props: {
274
- /**
275
- * List of actions that will be used to render the buttons.
276
- * First element in the list will be rendered as "primary".
277
- * All elements after the first will be rendered as "secondary".
278
- * But you may change the color of 1-st action to red with 'critial' key
279
- * Not more than 3 action buttons can be provided
280
- * Or 2 action buttons and 1 Label for them
281
- *
282
- * Each object in the list should have a `title`, an `event` and
283
- * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.
284
- *
285
- * `title`: Button's text.
286
- *
287
- * `event`: Event triggered when clicking the Button.
288
- *
289
- * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.
290
- *
291
- * ```
292
- * [{
293
- * title: 'Primary',2
294
- * event: () => { ... },
295
- * icon: FourPeopleIcon
296
- * }, {
297
- * title: 'Secondary',
298
- * event: () => { ... }
299
- * }]
300
- * ```
301
- */
302
- actions: {
303
- type: Array,
304
- required: !0
305
- },
306
- /**
307
- * Text label that is displayed left to the action buttons
308
- */
309
- actionsLabel: {
310
- type: String,
311
- default: null
312
- },
313
- /**
314
- * If passed - sets first button color to red
315
- */
316
- destructiveActions: {
317
- type: Boolean,
318
- default: !1
319
- }
320
- },
321
- setup(e) {
322
- const t = e, { actions: l, destructiveActions: r } = G(t), a = f(() => {
323
- const o = l.value.length < 3 ? l.value : l.value.slice(0, l.value.length - 1);
324
- return o[0].critical = r.value, {
325
- leftAligned: l.value.length === 3 ? [
326
- {
327
- ...l.value[l.value.length - 1],
328
- variant: w.SECONDARY
329
- }
330
- ] : null,
331
- rightAligned: [...o]
332
- };
333
- });
334
- return z(() => {
335
- if (t.actions && t.actions.length > 3)
336
- throw new Error("Not more than 3 action buttons may be provided to Bento Modal default variant");
337
- if (t.actionsLabel && t.actions && t.actions.length > 2)
338
- throw new Error(
339
- "Not more than 2 action buttons may be provided with actions label to Bento Modal default variant"
340
- );
341
- }), (o, n) => (d(), N("div", Oe, [
342
- e.actionsLabel ? (d(), p(y(J), {
343
- key: 0,
344
- el: y(X).SPAN,
345
- variant: y(Z).BODY,
346
- stronger: ""
347
- }, {
348
- default: i(() => [
349
- j(H(e.actionsLabel), 1)
350
- ]),
351
- _: 1
352
- }, 8, ["el", "variant"])) : g("", !0),
353
- y(a).leftAligned ? (d(), p(y(F), {
354
- key: 1,
355
- actions: y(a).leftAligned,
356
- layout: y(K).BUTTONS_START
357
- }, null, 8, ["actions", "layout"])) : g("", !0),
358
- M(y(F), {
359
- actions: y(a).rightAligned,
360
- layout: y(K).BUTTONS_END
361
- }, null, 8, ["actions", "layout"])
362
- ]));
363
- }
364
- });
365
- const Me = /* @__PURE__ */ $(De, [["__scopeId", "data-v-7d3e4571"]]), we = T({
246
+ const j = /* @__PURE__ */ N(pe, [["render", he], ["__scopeId", "data-v-3bd8058e"]]), Be = $({
366
247
  name: "bento-modal-default",
367
- components: { BaseModal: ee, FooterActions: Me },
248
+ components: { BaseModal: j, FooterActions: me },
368
249
  props: {
369
250
  /**
370
251
  * Adds a cross icon on the right side of the alert
@@ -423,7 +304,7 @@ const Me = /* @__PURE__ */ $(De, [["__scopeId", "data-v-7d3e4571"]]), we = T({
423
304
  */
424
305
  columnsSize: {
425
306
  type: String,
426
- default: S.SMALLER
307
+ default: B.SMALLER
427
308
  },
428
309
  /**
429
310
  * List of actions that will be used to render the buttons.
@@ -479,25 +360,24 @@ const Me = /* @__PURE__ */ $(De, [["__scopeId", "data-v-7d3e4571"]]), we = T({
479
360
  default: !1
480
361
  }
481
362
  },
482
- emits: [h.CLOSE_MODAL],
483
- setup(e, { slots: t, emit: l }) {
484
- const r = V(t), a = () => {
485
- l(h.CLOSE_MODAL);
363
+ emits: [p.CLOSE_MODAL],
364
+ setup(e, { slots: l, emit: r }) {
365
+ const a = k(l), u = () => {
366
+ r(p.CLOSE_MODAL);
486
367
  };
487
- return z(() => {
488
- if (!(r("content") || r("content-col-1") && r("content-col-2")))
368
+ return G(() => {
369
+ if (!(a("content") || a("content-col-1") && a("content-col-2")))
489
370
  throw new Error("Bento Modal default variant requires content slot or column slots");
490
371
  }), {
491
372
  // Methods
492
- onCloseModal: a,
493
- hasSlot: r
373
+ onCloseModal: u,
374
+ hasSlot: a
494
375
  };
495
376
  }
496
377
  });
497
- function Te(e, t, l, r, a, o) {
498
- const n = v("footer-actions"), s = v("base-modal");
499
- return d(), p(s, {
500
- class: "b-modal-default",
378
+ function Se(e, l, r, a, u, o) {
379
+ const t = f("footer-actions"), c = f("base-modal");
380
+ return i(), y(c, V({ class: "b-modal-default" }, e.$attrs, {
501
381
  size: e.size,
502
382
  "hide-close-button": e.hideCloseButton,
503
383
  "custom-padding": e.customPadding,
@@ -507,30 +387,30 @@ function Te(e, t, l, r, a, o) {
507
387
  "with-column-layout": e.withColumnLayout,
508
388
  "initially-open": e.initiallyOpen,
509
389
  onCloseModal: e.onCloseModal
510
- }, Q({
511
- "content-col-1": i(() => [
512
- u(e.$slots, "content-col-1")
390
+ }), K({
391
+ "content-col-1": n(() => [
392
+ s(e.$slots, "content-col-1")
513
393
  ]),
514
- "content-col-2": i(() => [
515
- u(e.$slots, "content-col-2")
394
+ "content-col-2": n(() => [
395
+ s(e.$slots, "content-col-2")
516
396
  ]),
517
- content: i(() => [
518
- u(e.$slots, "content")
397
+ content: n(() => [
398
+ s(e.$slots, "content")
519
399
  ]),
520
400
  _: 2
521
401
  }, [
522
402
  e.hasSlot("default") ? {
523
403
  name: "default",
524
- fn: i(() => [
525
- u(e.$slots, "default")
404
+ fn: n(() => [
405
+ s(e.$slots, "default")
526
406
  ]),
527
407
  key: "0"
528
408
  } : void 0,
529
409
  e.actions ? {
530
410
  name: "actions",
531
- fn: i(() => [
532
- u(e.$slots, "actions", {}, () => [
533
- M(n, {
411
+ fn: n(() => [
412
+ s(e.$slots, "actions", {}, () => [
413
+ M(t, {
534
414
  actions: e.actions,
535
415
  "actions-label": e.actionsLabel,
536
416
  "destructive-actions": e.destructiveActions
@@ -539,16 +419,16 @@ function Te(e, t, l, r, a, o) {
539
419
  ]),
540
420
  key: "1"
541
421
  } : void 0
542
- ]), 1032, ["size", "hide-close-button", "custom-padding", "is-dismissible", "is-open", "overflow-visible", "with-column-layout", "initially-open", "onCloseModal"]);
422
+ ]), 1040, ["size", "hide-close-button", "custom-padding", "is-dismissible", "is-open", "overflow-visible", "with-column-layout", "initially-open", "onCloseModal"]);
543
423
  }
544
- const $e = /* @__PURE__ */ $(we, [["render", Te]]), Y = {
424
+ const Ae = /* @__PURE__ */ N(Be, [["render", Se]]), F = {
545
425
  "en-US": {
546
426
  okButtonText: "OK"
547
427
  }
548
- }, ke = T({
549
- i18n: { messages: Y },
428
+ }, Oe = $({
429
+ i18n: { messages: F },
550
430
  name: "bento-modal-dialog",
551
- components: { BaseModal: ee, BentoButtonActions: F },
431
+ components: { BaseModal: j, BentoButtonActions: fe },
552
432
  props: {
553
433
  /**
554
434
  * Controls the modal's state from the outside. Set it to true to open the modal
@@ -618,102 +498,101 @@ const $e = /* @__PURE__ */ $(we, [["render", Te]]), Y = {
618
498
  default: !1
619
499
  }
620
500
  },
621
- emits: [h.CLOSE_MODAL],
622
- setup(e, { slots: t, emit: l }) {
623
- const { t: r } = x({ messages: Y }), a = V(t), { actions: o, dialogType: n } = G(e), s = () => {
624
- l(h.CLOSE_MODAL);
625
- }, b = () => {
626
- s();
627
- }, C = f(() => [
501
+ emits: [p.CLOSE_MODAL],
502
+ setup(e, { slots: l, emit: r }) {
503
+ const { t: a } = W({ messages: F }), u = k(l), { actions: o, dialogType: t } = x(e), c = () => {
504
+ r(p.CLOSE_MODAL);
505
+ }, C = () => {
506
+ c();
507
+ }, b = m(() => [
628
508
  {
629
- title: r("okButtonText"),
630
- event: b,
631
- variant: w.SECONDARY
509
+ title: a("okButtonText"),
510
+ event: C,
511
+ variant: _.SECONDARY
632
512
  }
633
- ]), B = f(() => {
634
- var _;
635
- const c = {
513
+ ]), L = m(() => {
514
+ var D;
515
+ const d = {
636
516
  title: "Cancel",
637
- event: b
638
- }, m = (_ = o == null ? void 0 : o.value) == null ? void 0 : _[0];
639
- return n.value === L.DESTRUCTIVE ? m.critical = !0 : n.value === L.INFO && (m.variant = w.SECONDARY), [m, c];
640
- }), A = f(() => ({
641
- [`b-modal-dialog--${n.value}`]: n.value
517
+ event: C
518
+ }, v = (D = o == null ? void 0 : o.value) == null ? void 0 : D[0];
519
+ return t.value === g.DESTRUCTIVE ? v.critical = !0 : t.value === g.INFO && (v.variant = _.SECONDARY), [v, d];
520
+ }), S = m(() => ({
521
+ [`b-modal-dialog--${t.value}`]: t.value
642
522
  }));
643
- return z(() => {
644
- var c, m;
645
- if (!a("default") || !e.content)
523
+ return G(() => {
524
+ var d, v;
525
+ if (!u("default") || !e.content)
646
526
  throw new Error("Bento Modal Dialog requires header title and content");
647
- if (((c = o == null ? void 0 : o.value) == null ? void 0 : c.length) > 1)
527
+ if (((d = o == null ? void 0 : o.value) == null ? void 0 : d.length) > 1)
648
528
  throw new Error("Not more than 1 action button may be provided to Modal Dialog");
649
- if (n.value !== L.ACKNOWLEDGEMENT && !(o != null && o.value))
529
+ if (t.value !== g.ACKNOWLEDGEMENT && !(o != null && o.value))
650
530
  throw new Error(
651
531
  "Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button"
652
532
  );
653
- if (n.value === L.ACKNOWLEDGEMENT && ((m = o == null ? void 0 : o.value) != null && m.length))
533
+ if (t.value === g.ACKNOWLEDGEMENT && ((v = o == null ? void 0 : o.value) != null && v.length))
654
534
  throw new Error("Acknowledgement Modal Dialog does not accept action buttons");
655
535
  }), {
656
536
  // Values
657
- dialogActions: B,
658
- acknowledgementDialogActions: C,
537
+ dialogActions: L,
538
+ acknowledgementDialogActions: b,
659
539
  // Methods
660
- onCloseModal: s,
661
- onCloseActionButton: b,
540
+ onCloseModal: c,
541
+ onCloseActionButton: C,
662
542
  // Styles
663
- modalDialogConditionalClasses: A,
543
+ modalDialogConditionalClasses: S,
664
544
  // Enums
665
- BentoModalRole: I,
666
- BentoModalSize: E,
667
- BentoButtonVariant: w,
668
- BentoModalDialogType: L,
669
- BentoButtonActionsLayout: K
545
+ BentoModalRole: T,
546
+ BentoModalSize: O,
547
+ BentoButtonVariant: _,
548
+ BentoModalDialogType: g,
549
+ BentoButtonActionsLayout: ye
670
550
  };
671
551
  }
672
552
  });
673
- function Ne(e, t, l, r, a, o) {
674
- const n = v("bento-button-actions"), s = v("base-modal");
675
- return d(), p(s, {
676
- class: U(["b-modal-dialog", e.modalDialogConditionalClasses]),
553
+ function Ee(e, l, r, a, u, o) {
554
+ const t = f("bento-button-actions"), c = f("base-modal");
555
+ return i(), y(c, V({
556
+ class: ["b-modal-dialog", e.modalDialogConditionalClasses],
677
557
  "hide-close-button": !0,
678
558
  size: e.BentoModalSize.SMALL,
679
559
  "is-dismissible": e.isDismissible,
680
560
  "is-open": e.isOpen,
681
561
  "overflow-visible": e.overflowVisible,
682
562
  "modal-role": e.BentoModalRole.ALERT_DIALOG,
683
- "initially-open": e.initiallyOpen,
684
- onCloseModal: e.onCloseModal
685
- }, {
686
- default: i(() => [
687
- u(e.$slots, "default")
563
+ "initially-open": e.initiallyOpen
564
+ }, e.$attrs, { onCloseModal: e.onCloseModal }), {
565
+ default: n(() => [
566
+ s(e.$slots, "default")
688
567
  ]),
689
- content: i(() => [
690
- j(H(e.content), 1)
568
+ content: n(() => [
569
+ ee(oe(e.content), 1)
691
570
  ]),
692
- actions: i(() => [
693
- e.dialogType === e.BentoModalDialogType.ACKNOWLEDGEMENT ? (d(), p(n, {
571
+ actions: n(() => [
572
+ e.dialogType === e.BentoModalDialogType.ACKNOWLEDGEMENT ? (i(), y(t, {
694
573
  key: 0,
695
574
  actions: e.acknowledgementDialogActions,
696
575
  layout: e.BentoButtonActionsLayout.BUTTONS_END
697
- }, null, 8, ["actions", "layout"])) : (d(), p(n, {
576
+ }, null, 8, ["actions", "layout"])) : (i(), y(t, {
698
577
  key: 1,
699
578
  actions: e.dialogActions,
700
579
  layout: e.BentoButtonActionsLayout.BUTTONS_END
701
580
  }, null, 8, ["actions", "layout"]))
702
581
  ]),
703
582
  _: 3
704
- }, 8, ["class", "size", "is-dismissible", "is-open", "overflow-visible", "modal-role", "initially-open", "onCloseModal"]);
583
+ }, 16, ["class", "size", "is-dismissible", "is-open", "overflow-visible", "modal-role", "initially-open", "onCloseModal"]);
705
584
  }
706
- const Re = /* @__PURE__ */ $(ke, [["render", Ne]]), Ie = T({
585
+ const De = /* @__PURE__ */ N(Oe, [["render", Ee]]), Me = $({
707
586
  name: "bento-modal",
708
- components: { BentoModalDefault: $e, BentoModalDialog: Re },
587
+ components: { BentoModalDefault: Ae, BentoModalDialog: De },
709
588
  props: {
710
589
  /**
711
590
  * Choose between default or dialog versions of modal
712
591
  */
713
592
  variant: {
714
593
  type: String,
715
- default: R.DEFAULT,
716
- validator: (e) => Object.values(R).includes(e)
594
+ default: w.DEFAULT,
595
+ validator: (e) => Object.values(w).includes(e)
717
596
  },
718
597
  // Shared Modal Default and Modal Default props
719
598
  /**
@@ -779,8 +658,8 @@ const Re = /* @__PURE__ */ $(ke, [["render", Ne]]), Ie = T({
779
658
  */
780
659
  size: {
781
660
  type: String,
782
- default: E.SMALL,
783
- validator: (e) => Object.values(E).includes(e)
661
+ default: O.SMALL,
662
+ validator: (e) => Object.values(O).includes(e)
784
663
  },
785
664
  /**
786
665
  * If provided, manages the padding of the whole modal container
@@ -801,8 +680,8 @@ const Re = /* @__PURE__ */ $(ke, [["render", Ne]]), Ie = T({
801
680
  */
802
681
  columnsSize: {
803
682
  type: String,
804
- default: S.SMALLER,
805
- validator: (e) => Object.values(S).includes(e)
683
+ default: B.SMALLER,
684
+ validator: (e) => Object.values(B).includes(e)
806
685
  },
807
686
  /**
808
687
  * Text label that is displayed left to the action buttons
@@ -824,8 +703,8 @@ const Re = /* @__PURE__ */ $(ke, [["render", Ne]]), Ie = T({
824
703
  */
825
704
  dialogType: {
826
705
  type: String,
827
- default: L.CONFIRMATION,
828
- validator: (e) => Object.values(L).includes(e)
706
+ default: g.CONFIRMATION,
707
+ validator: (e) => Object.values(g).includes(e)
829
708
  },
830
709
  /**
831
710
  * Text that will be displayed in the content section of Modal
@@ -835,90 +714,80 @@ const Re = /* @__PURE__ */ $(ke, [["render", Ne]]), Ie = T({
835
714
  default: null
836
715
  }
837
716
  },
838
- emits: [h.CLOSE_MODAL],
839
- setup(e, { slots: t, emit: l }) {
840
- const {
841
- variant: r,
842
- hideCloseButton: a,
843
- size: o,
844
- isDismissible: n,
845
- overflowVisible: s,
846
- dialogType: b,
847
- content: C,
848
- customPadding: B,
849
- actionsLabel: A,
850
- destructiveActions: c,
851
- withColumnLayout: m
852
- } = G(e), _ = f(
853
- () => r.value === R.DEFAULT ? {
854
- hideCloseButton: a.value,
855
- size: o.value,
856
- customPadding: B.value,
857
- actionsLabel: A.value,
858
- destructiveActions: c.value,
859
- isDismissible: n.value ?? !0,
860
- overflowVisible: s.value,
861
- withColumnLayout: m.value
717
+ emits: [p.CLOSE_MODAL],
718
+ setup(e, { slots: l, emit: r }) {
719
+ const a = U(), u = m(
720
+ () => e.variant === w.DEFAULT ? {
721
+ hideCloseButton: e.hideCloseButton,
722
+ size: e.size,
723
+ customPadding: e.customPadding,
724
+ actionsLabel: e.actionsLabel,
725
+ destructiveActions: e.destructiveActions,
726
+ isDismissible: e.isDismissible ?? !0,
727
+ overflowVisible: e.overflowVisible,
728
+ withColumnLayout: e.withColumnLayout,
729
+ ...a
862
730
  } : {
863
- dialogType: b.value,
864
- content: C.value,
865
- isDismissible: n.value ?? !1,
866
- overflowVisible: s.value
731
+ dialogType: e.dialogType,
732
+ content: e.content,
733
+ isDismissible: e.isDismissible ?? !1,
734
+ overflowVisible: e.overflowVisible,
735
+ ...a
867
736
  }
868
737
  );
869
738
  return {
870
739
  onCloseModal: () => {
871
- l(h.CLOSE_MODAL);
740
+ r(p.CLOSE_MODAL);
872
741
  },
873
- customProps: _,
874
- hasSlot: V(t)
742
+ customProps: u,
743
+ hasSlot: k(l)
875
744
  };
876
745
  }
877
746
  });
878
- function Ge(e, t, l, r, a, o) {
879
- return d(), p(de(e.variant), ue({
747
+ function _e(e, l, r, a, u, o) {
748
+ return i(), y(te(e.variant), V({
880
749
  class: "b-modal",
881
750
  "is-open": e.isOpen,
882
751
  actions: e.actions
883
- }, e.customProps, { onCloseModal: e.onCloseModal }), Q({ _: 2 }, [
752
+ }, e.customProps, { onCloseModal: e.onCloseModal }), K({ _: 2 }, [
884
753
  e.hasSlot("default") ? {
885
754
  name: "default",
886
- fn: i(() => [
887
- u(e.$slots, "default")
755
+ fn: n(() => [
756
+ s(e.$slots, "default")
888
757
  ]),
889
758
  key: "0"
890
759
  } : void 0,
891
760
  e.hasSlot("content-col-1") ? {
892
761
  name: "content-col-1",
893
- fn: i(() => [
894
- u(e.$slots, "content-col-1")
762
+ fn: n(() => [
763
+ s(e.$slots, "content-col-1")
895
764
  ]),
896
765
  key: "1"
897
766
  } : void 0,
898
767
  e.hasSlot("content-col-2") ? {
899
768
  name: "content-col-2",
900
- fn: i(() => [
901
- u(e.$slots, "content-col-2")
769
+ fn: n(() => [
770
+ s(e.$slots, "content-col-2")
902
771
  ]),
903
772
  key: "2"
904
773
  } : void 0,
905
774
  e.hasSlot("content") ? {
906
775
  name: "content",
907
- fn: i(() => [
908
- u(e.$slots, "content")
776
+ fn: n(() => [
777
+ s(e.$slots, "content")
909
778
  ]),
910
779
  key: "3"
911
780
  } : void 0
912
781
  ]), 1040, ["is-open", "actions", "onCloseModal"]);
913
782
  }
914
- const Xe = /* @__PURE__ */ $(Ie, [["render", Ge]]);
783
+ const Fe = /* @__PURE__ */ N(Me, [["render", _e]]);
915
784
  export {
916
- Xe as BentoModal,
917
- S as BentoModalColumnLayoutVariant,
918
- L as BentoModalDialogType,
919
- h as BentoModalEvent,
920
- I as BentoModalRole,
921
- E as BentoModalSize,
922
- R as BentoModalVariant
785
+ Fe as BentoModal,
786
+ B as BentoModalColumnLayoutVariant,
787
+ g as BentoModalDialogType,
788
+ p as BentoModalEvent,
789
+ T as BentoModalRole,
790
+ O as BentoModalSize,
791
+ w as BentoModalVariant
923
792
  };
924
793
  //# sourceMappingURL=modal.js.map