@adyen/bento-vue3 1.4.1 → 1.5.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 (220) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
  3. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-lazy-load/data-grid-lazy-load.vue.d.ts +17 -0
  4. package/dist/@types/packages/vue2/src/components/data-grid/components/index.d.ts +1 -0
  5. package/dist/@types/packages/vue2/src/components/data-grid/composables/index.d.ts +1 -0
  6. package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateColumnHeadersTopPosition/useCalculateColumnHeadersTopPosition.d.ts +2 -0
  7. package/dist/@types/packages/vue2/src/components/data-grid/composables/useLazyLoading/useLazyLoading.d.ts +8 -0
  8. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +3 -1
  9. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +28 -2
  10. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +455 -123
  11. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +3 -3
  12. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +13 -13
  13. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-button/all-filters-modal-button.vue.d.ts +4 -4
  14. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +12 -3
  15. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +3 -3
  16. package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +5 -1
  17. package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +12 -3
  18. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.types.d.ts +2 -1
  19. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.vue.d.ts +2 -0
  20. package/dist/@types/packages/vue2/src/components/image/index.d.ts +1 -0
  21. package/dist/@types/packages/vue2/src/components/internal/base-button/base-button.vue.d.ts +2 -0
  22. package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +24 -0
  23. package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +3 -3
  24. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +3 -1
  25. package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +14 -3
  26. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.types.d.ts +1 -9
  27. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.utils.d.ts +5 -21
  28. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +122 -72
  29. package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +3 -2
  30. package/dist/@types/packages/vue2/src/components/stepper/components/step/index.d.ts +1 -0
  31. package/dist/@types/packages/vue2/src/components/stepper/components/step/step.vue.d.ts +35 -0
  32. package/dist/@types/packages/vue2/src/components/stepper/composables/useKeyboardNavigation/useKeyboardNavigation.d.ts +15 -0
  33. package/dist/@types/packages/vue2/src/components/stepper/index.d.ts +3 -0
  34. package/dist/@types/packages/vue2/src/components/stepper/stepper.keys.d.ts +3 -0
  35. package/dist/@types/packages/vue2/src/components/stepper/stepper.types.d.ts +24 -0
  36. package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +44 -0
  37. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
  38. package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +363 -82
  39. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  40. package/dist/@types/packages/vue2/src/types/index.d.ts +1 -0
  41. package/dist/@types/packages/vue2/src/types/lazy-load.d.ts +1 -0
  42. package/dist/accordion.js +3 -3
  43. package/dist/alert.js +4 -4
  44. package/dist/assets/base-button.css +1 -1
  45. package/dist/assets/base-modal.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/dropdown-default-textbox.css +1 -1
  50. package/dist/assets/dropdown.css +1 -1
  51. package/dist/assets/index.css +1 -1
  52. package/dist/assets/index10.css +1 -1
  53. package/dist/assets/index11.css +1 -1
  54. package/dist/assets/index12.css +1 -1
  55. package/dist/assets/index13.css +1 -1
  56. package/dist/assets/index14.css +1 -1
  57. package/dist/assets/index15.css +1 -1
  58. package/dist/assets/index16.css +1 -1
  59. package/dist/assets/index17.css +1 -1
  60. package/dist/assets/index18.css +1 -1
  61. package/dist/assets/index19.css +1 -1
  62. package/dist/assets/index2.css +1 -1
  63. package/dist/assets/index20.css +1 -1
  64. package/dist/assets/index21.css +1 -1
  65. package/dist/assets/index22.css +1 -1
  66. package/dist/assets/index23.css +1 -1
  67. package/dist/assets/index24.css +1 -1
  68. package/dist/assets/index25.css +1 -1
  69. package/dist/assets/index26.css +1 -1
  70. package/dist/assets/index27.css +1 -1
  71. package/dist/assets/index28.css +1 -1
  72. package/dist/assets/index29.css +1 -1
  73. package/dist/assets/index3.css +1 -1
  74. package/dist/assets/index30.css +1 -1
  75. package/dist/assets/index31.css +1 -1
  76. package/dist/assets/index32.css +1 -1
  77. package/dist/assets/index33.css +1 -1
  78. package/dist/assets/index34.css +1 -1
  79. package/dist/assets/index35.css +1 -1
  80. package/dist/assets/index36.css +1 -1
  81. package/dist/assets/index37.css +1 -1
  82. package/dist/assets/index38.css +1 -1
  83. package/dist/assets/index39.css +1 -1
  84. package/dist/assets/index4.css +1 -1
  85. package/dist/assets/index40.css +1 -1
  86. package/dist/assets/index41.css +1 -1
  87. package/dist/assets/index42.css +1 -1
  88. package/dist/assets/index43.css +1 -1
  89. package/dist/assets/index44.css +1 -0
  90. package/dist/assets/index5.css +1 -1
  91. package/dist/assets/index6.css +1 -1
  92. package/dist/assets/index7.css +1 -1
  93. package/dist/assets/index8.css +1 -1
  94. package/dist/assets/index9.css +1 -1
  95. package/dist/assets/tooltip.css +1 -1
  96. package/dist/avatar-image.js +1 -1
  97. package/dist/badge.js +1 -1
  98. package/dist/button.js +5 -5
  99. package/dist/card.js +4 -4
  100. package/dist/checkbox.js +6 -6
  101. package/dist/chunks/base-button.9740f320.js +116 -0
  102. package/dist/chunks/base-button.9740f320.js.map +1 -0
  103. package/dist/chunks/base-modal.be77971f.js +296 -0
  104. package/dist/chunks/base-modal.be77971f.js.map +1 -0
  105. package/dist/chunks/{button.7d09c245.js → button.7072457f.js} +3 -3
  106. package/dist/chunks/{button.7d09c245.js.map → button.7072457f.js.map} +1 -1
  107. package/dist/chunks/{calendar.0e42130b.js → calendar.1e50c7d1.js} +5 -5
  108. package/dist/chunks/{calendar.0e42130b.js.map → calendar.1e50c7d1.js.map} +1 -1
  109. package/dist/chunks/{checkbox.17462cb0.js → checkbox.638bab98.js} +24 -24
  110. package/dist/chunks/{checkbox.17462cb0.js.map → checkbox.638bab98.js.map} +1 -1
  111. package/dist/chunks/{chevron-up.c03b58f8.js → chevron-up.9bf21068.js} +3 -3
  112. package/dist/chunks/{chevron-up.c03b58f8.js.map → chevron-up.9bf21068.js.map} +1 -1
  113. package/dist/chunks/{controls-group.0d6db9c0.js → controls-group.efcf4e8d.js} +2 -2
  114. package/dist/chunks/{controls-group.0d6db9c0.js.map → controls-group.efcf4e8d.js.map} +1 -1
  115. package/dist/chunks/{copy.c9a29be0.js → copy.527c3d76.js} +3 -3
  116. package/dist/chunks/{copy.c9a29be0.js.map → copy.527c3d76.js.map} +1 -1
  117. package/dist/chunks/debounce.b5ef6acf.js +10 -0
  118. package/dist/chunks/debounce.b5ef6acf.js.map +1 -0
  119. package/dist/chunks/{dropdown-default-textbox.cd789a95.js → dropdown-default-textbox.a1789dc7.js} +19 -18
  120. package/dist/chunks/{dropdown-default-textbox.cd789a95.js.map → dropdown-default-textbox.a1789dc7.js.map} +1 -1
  121. package/dist/chunks/{dropdown.ff4f94a8.js → dropdown.22e51667.js} +9 -7
  122. package/dist/chunks/dropdown.22e51667.js.map +1 -0
  123. package/dist/chunks/{error-message.8c67a507.js → error-message.37b6c7aa.js} +2 -2
  124. package/dist/chunks/{error-message.8c67a507.js.map → error-message.37b6c7aa.js.map} +1 -1
  125. package/dist/chunks/{footer-actions.a587e374.js → footer-actions.5275203a.js} +3 -3
  126. package/dist/chunks/{footer-actions.a587e374.js.map → footer-actions.5275203a.js.map} +1 -1
  127. package/dist/chunks/{grid-layout.984317d7.js → grid-layout.c98e6bc7.js} +2 -2
  128. package/dist/chunks/{grid-layout.984317d7.js.map → grid-layout.c98e6bc7.js.map} +1 -1
  129. package/dist/chunks/{index.77c651df.js → index.32ed68b7.js} +2 -2
  130. package/dist/chunks/{index.77c651df.js.map → index.32ed68b7.js.map} +1 -1
  131. package/dist/chunks/{index.fdb0c13d.js → index.604da8e9.js} +3 -3
  132. package/dist/chunks/{index.fdb0c13d.js.map → index.604da8e9.js.map} +1 -1
  133. package/dist/chunks/{index.fd1cd23a.js → index.a57930ba.js} +197 -188
  134. package/dist/chunks/index.a57930ba.js.map +1 -0
  135. package/dist/chunks/{index.ee69b530.js → index.c22c4278.js} +6 -6
  136. package/dist/chunks/{index.ee69b530.js.map → index.c22c4278.js.map} +1 -1
  137. package/dist/chunks/{index.140bf28f.js → index.c62ea69f.js} +2 -2
  138. package/dist/chunks/{index.140bf28f.js.map → index.c62ea69f.js.map} +1 -1
  139. package/dist/chunks/{index.450b70d5.js → index.dd20095f.js} +3 -3
  140. package/dist/chunks/{index.450b70d5.js.map → index.dd20095f.js.map} +1 -1
  141. package/dist/chunks/{debounce.f8d92e44.js → keyboard-navigation.ca47dfa8.js} +11 -17
  142. package/dist/chunks/keyboard-navigation.ca47dfa8.js.map +1 -0
  143. package/dist/chunks/{listbox-option-tag.ffe70226.js → listbox-option-tag.fa70334e.js} +3 -3
  144. package/dist/chunks/{listbox-option-tag.ffe70226.js.map → listbox-option-tag.fa70334e.js.map} +1 -1
  145. package/dist/chunks/{listbox.f535a736.js → listbox.4205c0de.js} +12 -11
  146. package/dist/chunks/{listbox.f535a736.js.map → listbox.4205c0de.js.map} +1 -1
  147. package/dist/chunks/{loading-button.bc6e3967.js → loading-button.41c15584.js} +2 -2
  148. package/dist/chunks/{loading-button.bc6e3967.js.map → loading-button.41c15584.js.map} +1 -1
  149. package/dist/chunks/{tooltip.973c86d3.js → tooltip.c8350cd0.js} +37 -36
  150. package/dist/chunks/{tooltip.973c86d3.js.map → tooltip.c8350cd0.js.map} +1 -1
  151. package/dist/chunks/use-has-slot.3daaffc6.js +17 -0
  152. package/dist/chunks/use-has-slot.3daaffc6.js.map +1 -0
  153. package/dist/code-snippet.js +469 -466
  154. package/dist/code-snippet.js.map +1 -1
  155. package/dist/country.js +2 -2
  156. package/dist/currency.js +1 -1
  157. package/dist/data-grid.js +963 -834
  158. package/dist/data-grid.js.map +1 -1
  159. package/dist/date-picker.js +8 -8
  160. package/dist/date-range-picker.js +2 -2
  161. package/dist/date.js +1 -1
  162. package/dist/divider.js +1 -1
  163. package/dist/dropdown.js +4 -4
  164. package/dist/empty-state.js +21 -21
  165. package/dist/empty-state.js.map +1 -1
  166. package/dist/filter-bar.js +853 -784
  167. package/dist/filter-bar.js.map +1 -1
  168. package/dist/focus-trap.js +1 -1
  169. package/dist/form-layout.js +72 -51
  170. package/dist/form-layout.js.map +1 -1
  171. package/dist/header.js +190 -112
  172. package/dist/header.js.map +1 -1
  173. package/dist/image.js +3 -1
  174. package/dist/index.js +219 -211
  175. package/dist/index.js.map +1 -1
  176. package/dist/info-icon.js +2 -2
  177. package/dist/input-field.js +5 -5
  178. package/dist/internal.js +7 -7
  179. package/dist/link.js +2 -2
  180. package/dist/loading-indicator.js +1 -1
  181. package/dist/menu.js +114 -104
  182. package/dist/menu.js.map +1 -1
  183. package/dist/modal.js +33 -30
  184. package/dist/modal.js.map +1 -1
  185. package/dist/pagination.js +4 -4
  186. package/dist/payment-method.js +2 -2
  187. package/dist/popover.js +72 -61
  188. package/dist/popover.js.map +1 -1
  189. package/dist/popper-container.js +1238 -192
  190. package/dist/popper-container.js.map +1 -1
  191. package/dist/radio-group.js +5 -5
  192. package/dist/search-bar.js +3 -3
  193. package/dist/segmented-control.js +15 -15
  194. package/dist/segmented-control.js.map +1 -1
  195. package/dist/sidepanel.js +7 -7
  196. package/dist/sidepanel.js.map +1 -1
  197. package/dist/status.js +2 -2
  198. package/dist/stepper.js +276 -0
  199. package/dist/stepper.js.map +1 -0
  200. package/dist/structured-list.js +1 -1
  201. package/dist/summary-grid.js +5 -5
  202. package/dist/tabs.js +2 -2
  203. package/dist/tag.js +3 -3
  204. package/dist/textarea.js +4 -4
  205. package/dist/timeline.js +5 -5
  206. package/dist/toast.js +4 -4
  207. package/dist/toggle.js +12 -12
  208. package/dist/toggle.js.map +1 -1
  209. package/dist/typography.js +1 -1
  210. package/dist/web-types.json +1 -1
  211. package/package.json +3 -3
  212. package/dist/chunks/base-button.c4ac1ad1.js +0 -108
  213. package/dist/chunks/base-button.c4ac1ad1.js.map +0 -1
  214. package/dist/chunks/base-modal.db7a9829.js +0 -291
  215. package/dist/chunks/base-modal.db7a9829.js.map +0 -1
  216. package/dist/chunks/debounce.f8d92e44.js.map +0 -1
  217. package/dist/chunks/dropdown.ff4f94a8.js.map +0 -1
  218. package/dist/chunks/index.fd1cd23a.js.map +0 -1
  219. package/dist/chunks/use-has-slot.9fac7123.js +0 -16
  220. package/dist/chunks/use-has-slot.9fac7123.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { B as a } from "./chunks/index.fdb0c13d.js";
1
+ import { B as a } from "./chunks/index.604da8e9.js";
2
2
  export {
3
3
  a as BentoFocusTrap
4
4
  };
@@ -1,15 +1,15 @@
1
- import { defineComponent as d, useSlots as L, computed as i, provide as F, toRef as h, openBlock as _, createBlock as v, resolveDynamicComponent as T, unref as a, withCtx as u, renderSlot as n, createCommentVNode as b, createElementBlock as m, createElementVNode as g, createVNode as $, onMounted as I, ref as S, normalizeClass as k } from "vue";
2
- import { BentoAlert as B } from "./alert.js";
3
- import { u as C } from "./chunks/use-has-slot.9fac7123.js";
4
- import { F as E } from "./chunks/form-layout.types.a7a1438d.js";
1
+ import { defineComponent as d, useSlots as h, computed as _, provide as I, toRef as $, openBlock as i, createBlock as v, resolveDynamicComponent as E, unref as a, withCtx as u, renderSlot as l, createCommentVNode as b, createElementBlock as m, createElementVNode as g, createVNode as B, onMounted as N, ref as O, normalizeClass as T } from "vue";
2
+ import { BentoAlert as C } from "./alert.js";
3
+ import { u as F } from "./chunks/use-has-slot.3daaffc6.js";
4
+ import { F as S } from "./chunks/form-layout.types.a7a1438d.js";
5
5
  import { _ as p } from "./chunks/_plugin-vue_export-helper.dad06003.js";
6
- import { B as y, c as N } from "./chunks/index.77c651df.js";
7
- import "./assets/index32.css";
6
+ import { B as y, c as k } from "./chunks/index.32ed68b7.js";
7
+ import "./assets/index20.css";
8
8
  const G = {
9
9
  key: 1,
10
10
  class: "b-form-layout__actions-container"
11
- }, A = { class: "b-form-layout__actions" }, O = { class: "b-form-layout__actions" }, V = {}, w = /* @__PURE__ */ d({
12
- ...V,
11
+ }, A = { class: "b-form-layout__actions" }, V = { class: "b-form-layout__actions" }, w = {}, D = /* @__PURE__ */ d({
12
+ ...w,
13
13
  __name: "form-layout",
14
14
  props: {
15
15
  /**
@@ -23,29 +23,29 @@ const G = {
23
23
  loading: { type: Boolean, default: !1 }
24
24
  },
25
25
  setup(o) {
26
- const t = o, r = L(), l = C(r), e = i(() => t.form ? "form" : "div"), c = i(() => l("actions-left") || l("actions-right"));
27
- return F(E, h(t, "loading")), (s, f) => (_(), v(T(a(e)), {
26
+ const t = o, r = h(), n = F(r), e = _(() => t.form ? "form" : "div"), c = _(() => n("actions-left") || n("actions-right"));
27
+ return I(S, $(t, "loading")), (s, f) => (i(), v(E(a(e)), {
28
28
  class: "b-form-layout",
29
29
  role: "form"
30
30
  }, {
31
31
  default: u(() => [
32
- a(l)("error-message") ? (_(), v(a(B), {
32
+ a(n)("error-message") ? (i(), v(a(C), {
33
33
  key: 0,
34
34
  class: "b-form-layout__error-message",
35
35
  type: "critical"
36
36
  }, {
37
37
  description: u(() => [
38
- n(s.$slots, "error-message", {}, void 0, !0)
38
+ l(s.$slots, "error-message", {}, void 0, !0)
39
39
  ]),
40
40
  _: 3
41
41
  })) : b("", !0),
42
- n(s.$slots, "default", {}, void 0, !0),
43
- a(c) ? (_(), m("div", G, [
42
+ l(s.$slots, "default", {}, void 0, !0),
43
+ a(c) ? (i(), m("div", G, [
44
44
  g("div", A, [
45
- n(s.$slots, "actions-left", {}, void 0, !0)
45
+ l(s.$slots, "actions-left", {}, void 0, !0)
46
46
  ]),
47
- g("div", O, [
48
- n(s.$slots, "actions-right", {}, void 0, !0)
47
+ g("div", V, [
48
+ l(s.$slots, "actions-right", {}, void 0, !0)
49
49
  ])
50
50
  ])) : b("", !0)
51
51
  ]),
@@ -53,37 +53,50 @@ const G = {
53
53
  }));
54
54
  }
55
55
  });
56
- const W = /* @__PURE__ */ p(w, [["__scopeId", "data-v-f0c8b741"]]), q = { class: "b-form-layout-field-tip" }, x = {}, D = /* @__PURE__ */ d({
57
- ...x,
56
+ const Z = /* @__PURE__ */ p(D, [["__scopeId", "data-v-f0c8b741"]]), P = { class: "b-form-layout-field-tip" }, R = {}, q = /* @__PURE__ */ d({
57
+ ...R,
58
58
  __name: "form-layout-field-tip",
59
59
  setup(o) {
60
- return (t, r) => (_(), m("div", q, [
61
- n(t.$slots, "default", {}, void 0, !0),
62
- $(a(B), {
60
+ return (t, r) => (i(), m("div", P, [
61
+ l(t.$slots, "default", {}, void 0, !0),
62
+ B(a(C), {
63
63
  variant: "tip",
64
64
  type: "warning"
65
65
  }, {
66
66
  description: u(() => [
67
- n(t.$slots, "message", {}, void 0, !0)
67
+ l(t.$slots, "message", {}, void 0, !0)
68
68
  ]),
69
69
  _: 3
70
70
  })
71
71
  ]));
72
72
  }
73
73
  });
74
- const X = /* @__PURE__ */ p(D, [["__scopeId", "data-v-80229079"]]), M = (o, t) => {
74
+ const oo = /* @__PURE__ */ p(q, [["__scopeId", "data-v-80229079"]]), L = [
75
+ "100",
76
+ "50",
77
+ "33",
78
+ "25",
79
+ "66-33",
80
+ "33-66",
81
+ "75-25",
82
+ "25-75",
83
+ "50-50",
84
+ "33-33-33"
85
+ ], x = 100, M = (o, t) => {
75
86
  const r = (e) => {
76
87
  var c;
77
88
  return (c = e.split) == null ? void 0 : c.call(e, "-").map((s) => parseInt(s, 10));
78
- }, l = i(() => r(o.value));
79
- I(() => {
89
+ }, n = _(
90
+ () => L.includes(o.value) ? r(o.value) : x
91
+ );
92
+ N(() => {
80
93
  const e = t.value.classList[0];
81
94
  t.value.querySelectorAll(`.${e} > *`).forEach((s, f) => {
82
- s.classList.add(`${e}--${l.value[f] || "100"}`);
95
+ s.classList.add(`${e}--${n.value[f] || "100"}`);
83
96
  });
84
97
  });
85
- }, Y = {}, j = /* @__PURE__ */ d({
86
- ...Y,
98
+ }, U = {}, Y = /* @__PURE__ */ d({
99
+ ...U,
87
100
  __name: "form-layout-group",
88
101
  props: {
89
102
  /**
@@ -98,6 +111,7 @@ const X = /* @__PURE__ */ p(D, [["__scopeId", "data-v-80229079"]]), M = (o, t) =
98
111
  * If the value entered is not listed in the example
99
112
  * list below it will use 100% by default.
100
113
  * @example
114
+ * '33-33-33'
101
115
  * '50-50'
102
116
  * '25-75'
103
117
  * '75-25'
@@ -110,22 +124,29 @@ const X = /* @__PURE__ */ p(D, [["__scopeId", "data-v-80229079"]]), M = (o, t) =
110
124
  */
111
125
  layout: {
112
126
  type: String,
113
- default: "100"
127
+ default: "100",
128
+ validator: (o) => L.includes(o)
114
129
  }
115
130
  },
116
131
  setup(o) {
117
- const t = o, r = S(null);
118
- return M(h(t, "layout"), r), (l, e) => (_(), m("div", {
132
+ const t = o, r = O(null);
133
+ M($(t, "layout"), r);
134
+ const n = _(() => ({
135
+ // Transform into column if the layout is unsopprted
136
+ // "form-layout.scss" depends on this class
137
+ "b-form-layout-group--column": !L.includes(t.layout)
138
+ }));
139
+ return (e, c) => (i(), m("div", {
119
140
  ref_key: "formLayoutGroup",
120
141
  ref: r,
121
- class: "b-form-layout-group"
142
+ class: T(["b-form-layout-group", a(n)])
122
143
  }, [
123
- n(l.$slots, "default", {}, void 0, !0)
124
- ], 512));
144
+ l(e.$slots, "default", {}, void 0, !0)
145
+ ], 2));
125
146
  }
126
147
  });
127
- const Z = /* @__PURE__ */ p(j, [["__scopeId", "data-v-a76530eb"]]), z = {}, H = /* @__PURE__ */ d({
128
- ...z,
148
+ const to = /* @__PURE__ */ p(Y, [["__scopeId", "data-v-d4db03b2"]]), j = {}, z = /* @__PURE__ */ d({
149
+ ...j,
129
150
  __name: "form-layout-title",
130
151
  props: {
131
152
  /**
@@ -144,45 +165,45 @@ const Z = /* @__PURE__ */ p(j, [["__scopeId", "data-v-a76530eb"]]), z = {}, H =
144
165
  el: {
145
166
  type: y.props.el.type,
146
167
  required: !0,
147
- validator: (o) => Object.values(N).includes(o)
168
+ validator: (o) => Object.values(k).includes(o)
148
169
  }
149
170
  },
150
171
  setup(o) {
151
- const t = o, r = L(), l = i(() => !t.subsection), e = C(r), c = i(() => ({
172
+ const t = o, r = h(), n = _(() => !t.subsection), e = F(r), c = _(() => ({
152
173
  "b-form-layout-title--subsection": t.subsection
153
174
  }));
154
- return (s, f) => (_(), m("div", {
155
- class: k(["b-form-layout-title", a(c)])
175
+ return (s, f) => (i(), m("div", {
176
+ class: T(["b-form-layout-title", a(c)])
156
177
  }, [
157
- $(a(y), {
178
+ B(a(y), {
158
179
  el: o.el,
159
180
  variant: "title",
160
- medium: a(l)
181
+ medium: a(n)
161
182
  }, {
162
183
  default: u(() => [
163
- n(s.$slots, "default", {}, void 0, !0)
184
+ l(s.$slots, "default", {}, void 0, !0)
164
185
  ]),
165
186
  _: 3
166
187
  }, 8, ["el", "medium"]),
167
- a(e)("description") ? (_(), v(a(y), {
188
+ a(e)("description") ? (i(), v(a(y), {
168
189
  key: 0,
169
190
  class: "b-form-layout-title__description",
170
191
  el: "span",
171
192
  wide: ""
172
193
  }, {
173
194
  default: u(() => [
174
- n(s.$slots, "description", {}, void 0, !0)
195
+ l(s.$slots, "description", {}, void 0, !0)
175
196
  ]),
176
197
  _: 3
177
198
  })) : b("", !0)
178
199
  ], 2));
179
200
  }
180
201
  });
181
- const tt = /* @__PURE__ */ p(H, [["__scopeId", "data-v-fbc939de"]]);
202
+ const eo = /* @__PURE__ */ p(z, [["__scopeId", "data-v-fbc939de"]]);
182
203
  export {
183
- W as BentoFormLayout,
184
- X as BentoFormLayoutFieldTip,
185
- Z as BentoFormLayoutGroup,
186
- tt as BentoFormLayoutTitle
204
+ Z as BentoFormLayout,
205
+ oo as BentoFormLayoutFieldTip,
206
+ to as BentoFormLayoutGroup,
207
+ eo as BentoFormLayoutTitle
187
208
  };
188
209
  //# sourceMappingURL=form-layout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-layout.js","sources":["../../vue2/src/components/form-layout/form-layout.vue","../../vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue","../../vue2/src/components/form-layout/components/form-layout-group/composable/use-form-layout-group-percentage.ts","../../vue2/src/components/form-layout/components/form-layout-group/form-layout-group.vue","../../vue2/src/components/form-layout/components/form-layout-title/form-layout-title.vue"],"sourcesContent":["<template>\n <component :is=\"formLayoutElement\" class=\"b-form-layout\" role=\"form\">\n <bento-alert v-if=\"hasSlot('error-message')\" class=\"b-form-layout__error-message\" type=\"critical\">\n <template #description>\n <slot name=\"error-message\" />\n </template>\n </bento-alert>\n\n <slot />\n\n <div v-if=\"hasActions\" class=\"b-form-layout__actions-container\">\n <div class=\"b-form-layout__actions\">\n <slot name=\"actions-left\" />\n </div>\n\n <div class=\"b-form-layout__actions\">\n <slot name=\"actions-right\" />\n </div>\n </div>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, provide, toRef, useSlots } from 'vue';\n import { BentoAlert } from '@/components/alert';\n import { useHasSlot } from '@/composables';\n import { FORM_LAYOUT_LOADING_INJECTION_KEY } from './form-layout.types';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const props = defineProps({\n /**\n * Renders the form layout as an HTML `form`\n */\n form: { type: Boolean, default: false },\n\n /**\n * Sets the state of the form and its fields to\n * a read only status.\n */\n loading: { type: Boolean, default: false },\n });\n\n const formLayoutElement = computed(() => (props.form ? 'form' : 'div'));\n const hasActions = computed(() => hasSlot('actions-left') || hasSlot('actions-right'));\n\n provide(FORM_LAYOUT_LOADING_INJECTION_KEY, toRef(props, 'loading'));\n</script>\n\n<script lang=\"ts\">\n /**\n * Form layout component is a pre-designed layout that serves\n * as a starting point for creating a form.\n *\n * It can include various common form components:\n * input field, dropdown, date picker, checkbox group, radio group,\n * textarea, etc.\n *\n * Form layout is context agnostic and can be dropped in different\n * places, for example in modals, side panels or pages.\n *\n * @example\n * import { BentoFormLayout, BentoFormLayoutFieldTip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayout, BentoFormLayoutFieldTip },\n * template: `\n * <bento-form-layout>\n * <template #error-message>There is an error. Correct the highlighted field.</template>\n *\n * <bento-input-field>Input field</bento-input-field>\n *\n * <bento-form-layout-field-tip>\n * <bento-dropdown label=\"Dropdown\" :items=\"dropdownItems\" placeholder=\"Select an animal\" />\n * <template #message>This is a small tip that can be used in small spaces</template>\n * </bento-form-layout-field-tip>\n *\n * <bento-form-layout-title subsection>\n * Section title\n * <template #description>Optional section description</template>\n * </bento-form-layout-title>\n * </bento-form-layout>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout.scss\" />\n","<template>\n <div class=\"b-form-layout-field-tip\">\n <slot />\n <bento-alert variant=\"tip\" type=\"warning\">\n <template #description>\n <slot name=\"message\" />\n </template>\n </bento-alert>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoAlert } from '@/components/alert';\n</script>\n\n<script lang=\"ts\">\n /**\n * You can help users provide accurate and well formatted information\n * by using various elements that come with an input field.\n *\n * Use description/supporting text to add additional context to the\n * field or guidance how to format the input correctly.\n * Because description is always visible it should be the first\n * choice in providing guidance.\n *\n * @example\n * import { BentoFormLayoutFieldTip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutFieldTip },\n * template: `\n * <bento-form-layout-field-tip>\n * <bento-dropdown label=\"Dropdown\" :items=\"dropdownItems\" placeholder=\"Select an animal\" />\n *\n * <template #message>This is a small tip that can be used in small spaces</template>\n * </bento-form-layout-field-tip>\n * `\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-field-tip.scss\" />\n","import { computed, onMounted, Ref } from 'vue';\nimport { BentoLayoutGroupProportions } from '../form-layout-group.types';\n\n/**\n * Calculates the CSS classes based on the percentage\n * for each one of the layouts in format `##-##` or `##`.\n *\n * It receives a layout of type @see BentoLayoutGroupProportions to\n * generate the class and apply it to the children of the @see BentoFormLayoutGroup component\n *\n * @param {Ref<BentoLayoutGroupProportions>} layoutProp Layout string in the format `##` or `##-##`\n * @param {Ref<HTMLElement>} formLayoutGroupRef Reference to an HTML element of type BentoFormLayoutGroup\n */\nexport const useFormLayoutGroupPercentage = (\n layoutProp: Ref<BentoLayoutGroupProportions>,\n formLayoutGroupRef: Ref<HTMLElement>\n) => {\n // Split the `##-##` format into individual values [##, ##]\n const getLayoutValues = layout => layout.split?.('-').map(value => parseInt(value, 10));\n const layout = computed(() => getLayoutValues(layoutProp.value));\n\n onMounted(() => {\n // Apply class to every immediate child\n const layoutClassName = formLayoutGroupRef.value.classList[0];\n const immediateChildren = formLayoutGroupRef.value.querySelectorAll(`.${layoutClassName} > *`); // Get immediate children\n immediateChildren.forEach((child, index) => {\n child.classList.add(`${layoutClassName}--${layout.value[index] || '100'}`); // 100% default\n });\n });\n};\n","<template>\n <div ref=\"formLayoutGroup\" class=\"b-form-layout-group\">\n <slot></slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineProps, PropType, ref, toRef } from 'vue';\n import { useFormLayoutGroupPercentage } from './composable/use-form-layout-group-percentage';\n import { BentoLayoutGroupProportions } from './form-layout-group.types';\n\n const props = defineProps({\n /**\n * The layout of the pair group of components.\n * This will render the components within the width of the proportions.\n * Only two colums are available.\n *\n * If only one value is entered, then it will assume there's only one child in the group.\n * If two values are entered, the first value will be use for the first child and the second\n * value for the second child.\n *\n * If the value entered is not listed in the example\n * list below it will use 100% by default.\n * @example\n * '50-50'\n * '25-75'\n * '75-25'\n * '33-66'\n * '66-33'\n * '25'\n * '33'\n * '50'\n * '100'\n */\n layout: {\n type: String as PropType<BentoLayoutGroupProportions>,\n default: '100',\n },\n });\n\n const formLayoutGroup = ref(null);\n useFormLayoutGroupPercentage(toRef(props, 'layout'), formLayoutGroup);\n</script>\n\n<script lang=\"ts\">\n /**\n * Use to provide horizontal layouts to build forms\n * with two fields per line.\n *\n * These can be used for field combinations,\n * such as post code and city or title and first name.\n *\n * @example\n * import { BentoFormLayoutGroup } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutGroup },\n * template: `\n * <bento-form-layout-group>\n * <first-element />\n * <second-element />\n * </bento-form-layout-group>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-group.scss\" />\n","<template>\n <div class=\"b-form-layout-title\" :class=\"conditionalClasses\">\n <bento-typography :el=\"el\" variant=\"title\" :medium=\"isSection\">\n <slot />\n </bento-typography>\n\n <bento-typography v-if=\"hasSlot('description')\" class=\"b-form-layout-title__description\" el=\"span\" wide>\n <slot name=\"description\" />\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useSlots } from 'vue';\n import { BentoTypography, BentoTypographyElement } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Defines if the Form Layout title is\n * a \"section\" or a \"subsection\".\n * Default is \"section\" (false). Turn into \"true\" for \"subsection\"\n */\n subsection: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the HTML DOM element.\n * @values h1, h2, h3, h4, h5, h6, div, p, span\n */\n el: {\n type: BentoTypography.props.el.type,\n required: true,\n validator: (value: BentoTypographyElement) => Object.values(BentoTypographyElement).includes(value),\n },\n });\n\n // Uses \"medium\" typography if it is a section title\n const isSection = computed(() => !props.subsection);\n const hasSlot = useHasSlot(slots);\n const conditionalClasses = computed(() => ({\n 'b-form-layout-title--subsection': props.subsection,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * If you’re building a lengthy form, organise related\n * fields into sections and, if needed, subsections.\n *\n * A form can have a \"Section Title\" and multiple \"Subsection titles\".\n *\n * One of the values provided in @see BentoTypographyElement must always be provided as a string\n * to define correct HTML sementic from the application's context\n *\n * @example\n * import { BentoFormLayoutTitle } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutTitle },\n * template: `\n * <bento-form-layout-title subsection el=\"h2\">\n * Title\n * <template #description>Description text</template>\n * </bento-form-layout-title>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-title.scss\" />\n"],"names":["__default__$3","slots","useSlots","hasSlot","useHasSlot","formLayoutElement","computed","props","hasActions","provide","FORM_LAYOUT_LOADING_INJECTION_KEY","toRef","__default__$2","useFormLayoutGroupPercentage","layoutProp","formLayoutGroupRef","getLayoutValues","layout2","_a","value","layout","onMounted","layoutClassName","child","index","__default__$1","formLayoutGroup","ref","__default__","isSection","conditionalClasses"],"mappings":";;;;;;;;;;qFAsFIA,IAAA,CAAA;;;;;;;;;;;;;;;iBA1DAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAeAI,IAAAC,EAAA,MAAAC,EAAA,OAAA,SAAA,KAAA,GACAC,IAAAF,EAAA,MAAAH,EAAA,cAAA,KAAAA,EAAA,eAAA,CAAA;AAEA,WAAAM,EAAAC,GAAAC,EAAAJ,GAAA,SAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8GCTAK,IAAA,CAAA;;;;;;;;;;;;;;;;;;oECzBSC,IAAA,CAAAC,GAAAC,MAAA;AAKT,QAAAC,IAAA,CAAAC,MAAA;;AAAA,YAAAC,IAAAD,EAAA,UAAA,gBAAAC,EAAA,KAAAD,GAAA,KAAA,IAAA,CAAAE,MAAA,SAAAA,GAAA,EAAA;AAAA,KACAC,IAAAd,EAAA,MAAAU,EAAAF,EAAA,KAAA,CAAA;AAEA,EAAAO,EAAA,MAAA;AAEI,UAAAC,IAAAP,EAAA,MAAA,UAAA,CAAA;AAEA,IADAA,EAAA,MAAA,iBAAA,IAAAO,OAAA,EACA,QAAA,CAAAC,GAAAC,MAAA;AACI,MAAAD,EAAA,UAAA,IAAA,GAAAD,MAAAF,EAAA,MAAAI,CAAA,KAAA,OAAA;AAAA,IAAyE,CAAA;AAAA,EAC5E,CAAA;AAET,GCoCIC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAzBAC,IAAAC,EAAA,IAAA;AACA,WAAAd,EAAAF,EAAAJ,GAAA,QAAA,GAAAmB,CAAA;;;;;;;;;oEC+BAE,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;iBAvDA3B,IAAAC,EAAA,GAyBA2B,IAAAvB,EAAA,MAAA,CAAAC,EAAA,UAAA,GACAJ,IAAAC,EAAAH,CAAA,GACA6B,IAAAxB,EAAA,OAAA;AAAA,MAA2C,mCAAAC,EAAA;AAAA,IACE,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"form-layout.js","sources":["../../vue2/src/components/form-layout/form-layout.vue","../../vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue","../../vue2/src/components/form-layout/components/form-layout-group/form-layout-group.types.ts","../../vue2/src/components/form-layout/components/form-layout-group/composable/use-form-layout-group-percentage.ts","../../vue2/src/components/form-layout/components/form-layout-group/form-layout-group.vue","../../vue2/src/components/form-layout/components/form-layout-title/form-layout-title.vue"],"sourcesContent":["<template>\n <component :is=\"formLayoutElement\" class=\"b-form-layout\" role=\"form\">\n <bento-alert v-if=\"hasSlot('error-message')\" class=\"b-form-layout__error-message\" type=\"critical\">\n <template #description>\n <slot name=\"error-message\" />\n </template>\n </bento-alert>\n\n <slot />\n\n <div v-if=\"hasActions\" class=\"b-form-layout__actions-container\">\n <div class=\"b-form-layout__actions\">\n <slot name=\"actions-left\" />\n </div>\n\n <div class=\"b-form-layout__actions\">\n <slot name=\"actions-right\" />\n </div>\n </div>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, provide, toRef, useSlots } from 'vue';\n import { BentoAlert } from '@/components/alert';\n import { useHasSlot } from '@/composables';\n import { FORM_LAYOUT_LOADING_INJECTION_KEY } from './form-layout.types';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const props = defineProps({\n /**\n * Renders the form layout as an HTML `form`\n */\n form: { type: Boolean, default: false },\n\n /**\n * Sets the state of the form and its fields to\n * a read only status.\n */\n loading: { type: Boolean, default: false },\n });\n\n const formLayoutElement = computed(() => (props.form ? 'form' : 'div'));\n const hasActions = computed(() => hasSlot('actions-left') || hasSlot('actions-right'));\n\n provide(FORM_LAYOUT_LOADING_INJECTION_KEY, toRef(props, 'loading'));\n</script>\n\n<script lang=\"ts\">\n /**\n * Form layout component is a pre-designed layout that serves\n * as a starting point for creating a form.\n *\n * It can include various common form components:\n * input field, dropdown, date picker, checkbox group, radio group,\n * textarea, etc.\n *\n * Form layout is context agnostic and can be dropped in different\n * places, for example in modals, side panels or pages.\n *\n * @example\n * import { BentoFormLayout, BentoFormLayoutFieldTip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayout, BentoFormLayoutFieldTip },\n * template: `\n * <bento-form-layout>\n * <template #error-message>There is an error. Correct the highlighted field.</template>\n *\n * <bento-input-field>Input field</bento-input-field>\n *\n * <bento-form-layout-field-tip>\n * <bento-dropdown label=\"Dropdown\" :items=\"dropdownItems\" placeholder=\"Select an animal\" />\n * <template #message>This is a small tip that can be used in small spaces</template>\n * </bento-form-layout-field-tip>\n *\n * <bento-form-layout-title subsection>\n * Section title\n * <template #description>Optional section description</template>\n * </bento-form-layout-title>\n * </bento-form-layout>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout.scss\" />\n","<template>\n <div class=\"b-form-layout-field-tip\">\n <slot />\n <bento-alert variant=\"tip\" type=\"warning\">\n <template #description>\n <slot name=\"message\" />\n </template>\n </bento-alert>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoAlert } from '@/components/alert';\n</script>\n\n<script lang=\"ts\">\n /**\n * You can help users provide accurate and well formatted information\n * by using various elements that come with an input field.\n *\n * Use description/supporting text to add additional context to the\n * field or guidance how to format the input correctly.\n * Because description is always visible it should be the first\n * choice in providing guidance.\n *\n * @example\n * import { BentoFormLayoutFieldTip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutFieldTip },\n * template: `\n * <bento-form-layout-field-tip>\n * <bento-dropdown label=\"Dropdown\" :items=\"dropdownItems\" placeholder=\"Select an animal\" />\n *\n * <template #message>This is a small tip that can be used in small spaces</template>\n * </bento-form-layout-field-tip>\n * `\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-field-tip.scss\" />\n","export type BentoLayoutGroupProportions =\n | '33-33-33'\n | '50-50'\n | '25-75'\n | '75-25'\n | '33-66'\n | '66-33'\n | '25'\n | '33'\n | '50'\n | '100';\n\nexport const BentoLayoutGroupProportions = [\n '100',\n '50',\n '33',\n '25',\n '66-33',\n '33-66',\n '75-25',\n '25-75',\n '50-50',\n '33-33-33',\n];\n","import { computed, onMounted, Ref } from 'vue';\nimport { BentoLayoutGroupProportions } from '../form-layout-group.types';\n\nconst DEFAULT_PROPORTION = 100;\n\n/**\n * Calculates the CSS classes based on the percentage\n * for each one of the layouts in format `##-##` or `##`.\n *\n * It receives a layout of type @see BentoLayoutGroupProportions to\n * generate the class and apply it to the children of the @see BentoFormLayoutGroup component\n *\n * @param {Ref<BentoLayoutGroupProportions>} layoutProp Layout string in the format `##` or `##-##`\n * @param {Ref<HTMLElement>} formLayoutGroupRef Reference to an HTML element of type BentoFormLayoutGroup\n */\nexport const useFormLayoutGroupPercentage = (\n layoutProp: Ref<BentoLayoutGroupProportions>,\n formLayoutGroupRef: Ref<HTMLElement>\n) => {\n // Split the `##-##` format into individual values [##, ##]\n const getLayoutValues = layout => layout.split?.('-').map(value => parseInt(value, 10));\n // Split the values only if the are in BentoLayoutGroupProportions, otherwise return 100%\n const layout = computed(() =>\n BentoLayoutGroupProportions.includes(layoutProp.value) ? getLayoutValues(layoutProp.value) : DEFAULT_PROPORTION\n );\n\n onMounted(() => {\n // Apply class to every immediate child\n const layoutClassName = formLayoutGroupRef.value.classList[0];\n const immediateChildren = formLayoutGroupRef.value.querySelectorAll(`.${layoutClassName} > *`); // Get immediate children\n immediateChildren.forEach((child, index) => {\n child.classList.add(`${layoutClassName}--${layout.value[index] || '100'}`); // 100% default\n });\n });\n};\n","<template>\n <div ref=\"formLayoutGroup\" class=\"b-form-layout-group\" :class=\"conditionalClasses\">\n <slot></slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineProps, PropType, ref, toRef } from 'vue';\n import { useFormLayoutGroupPercentage } from './composable/use-form-layout-group-percentage';\n import { BentoLayoutGroupProportions } from './form-layout-group.types';\n\n const props = defineProps({\n /**\n * The layout of the pair group of components.\n * This will render the components within the width of the proportions.\n * Only two colums are available.\n *\n * If only one value is entered, then it will assume there's only one child in the group.\n * If two values are entered, the first value will be use for the first child and the second\n * value for the second child.\n *\n * If the value entered is not listed in the example\n * list below it will use 100% by default.\n * @example\n * '33-33-33'\n * '50-50'\n * '25-75'\n * '75-25'\n * '33-66'\n * '66-33'\n * '25'\n * '33'\n * '50'\n * '100'\n */\n layout: {\n type: String as PropType<BentoLayoutGroupProportions>,\n default: '100',\n validator: (value: BentoLayoutGroupProportions) => BentoLayoutGroupProportions.includes(value),\n },\n });\n\n const formLayoutGroup = ref(null);\n useFormLayoutGroupPercentage(toRef(props, 'layout'), formLayoutGroup);\n\n const conditionalClasses = computed(() => ({\n // Transform into column if the layout is unsopprted\n // \"form-layout.scss\" depends on this class\n 'b-form-layout-group--column': !BentoLayoutGroupProportions.includes(props.layout),\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Use to provide horizontal layouts to build forms\n * with two fields per line.\n *\n * These can be used for field combinations,\n * such as post code and city or title and first name.\n *\n * @example\n * import { BentoFormLayoutGroup } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutGroup },\n * template: `\n * <bento-form-layout-group>\n * <first-element />\n * <second-element />\n * </bento-form-layout-group>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-group.scss\" />\n","<template>\n <div class=\"b-form-layout-title\" :class=\"conditionalClasses\">\n <bento-typography :el=\"el\" variant=\"title\" :medium=\"isSection\">\n <slot />\n </bento-typography>\n\n <bento-typography v-if=\"hasSlot('description')\" class=\"b-form-layout-title__description\" el=\"span\" wide>\n <slot name=\"description\" />\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useSlots } from 'vue';\n import { BentoTypography, BentoTypographyElement } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Defines if the Form Layout title is\n * a \"section\" or a \"subsection\".\n * Default is \"section\" (false). Turn into \"true\" for \"subsection\"\n */\n subsection: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the HTML DOM element.\n * @values h1, h2, h3, h4, h5, h6, div, p, span\n */\n el: {\n type: BentoTypography.props.el.type,\n required: true,\n validator: (value: BentoTypographyElement) => Object.values(BentoTypographyElement).includes(value),\n },\n });\n\n // Uses \"medium\" typography if it is a section title\n const isSection = computed(() => !props.subsection);\n const hasSlot = useHasSlot(slots);\n const conditionalClasses = computed(() => ({\n 'b-form-layout-title--subsection': props.subsection,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * If you’re building a lengthy form, organise related\n * fields into sections and, if needed, subsections.\n *\n * A form can have a \"Section Title\" and multiple \"Subsection titles\".\n *\n * One of the values provided in @see BentoTypographyElement must always be provided as a string\n * to define correct HTML sementic from the application's context\n *\n * @example\n * import { BentoFormLayoutTitle } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutTitle },\n * template: `\n * <bento-form-layout-title subsection el=\"h2\">\n * Title\n * <template #description>Description text</template>\n * </bento-form-layout-title>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-title.scss\" />\n"],"names":["__default__$3","slots","useSlots","hasSlot","useHasSlot","formLayoutElement","computed","props","hasActions","provide","FORM_LAYOUT_LOADING_INJECTION_KEY","toRef","__default__$2","BentoLayoutGroupProportions","DEFAULT_PROPORTION","useFormLayoutGroupPercentage","layoutProp","formLayoutGroupRef","getLayoutValues","layout2","_a","value","layout","onMounted","layoutClassName","child","index","__default__$1","formLayoutGroup","ref","conditionalClasses","__default__","isSection"],"mappings":";;;;;;;;;;qFAsFIA,IAAA,CAAA;;;;;;;;;;;;;;;iBA1DAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAeAI,IAAAC,EAAA,MAAAC,EAAA,OAAA,SAAA,KAAA,GACAC,IAAAF,EAAA,MAAAH,EAAA,cAAA,KAAAA,EAAA,eAAA,CAAA;AAEA,WAAAM,EAAAC,GAAAC,EAAAJ,GAAA,SAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8GCTAK,IAAA,CAAA;;;;;;;;;;;;;;;;;;qEC1BGC,IAAA;AAAA,EAAoC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAEJ,GCpBAC,IAAA,KAYaC,IAAA,CAAAC,GAAAC,MAAA;AAKT,QAAAC,IAAA,CAAAC,MAAA;;AAAA,YAAAC,IAAAD,EAAA,UAAA,gBAAAC,EAAA,KAAAD,GAAA,KAAA,IAAA,CAAAE,MAAA,SAAAA,GAAA,EAAA;AAAA,KAEAC,IAAAhB;AAAA,IAAe,MAAAO,EAAA,SAAAG,EAAA,KAAA,IAAAE,EAAAF,EAAA,KAAA,IAAAF;AAAA,EACkF;AAGjG,EAAAS,EAAA,MAAA;AAEI,UAAAC,IAAAP,EAAA,MAAA,UAAA,CAAA;AAEA,IADAA,EAAA,MAAA,iBAAA,IAAAO,OAAA,EACA,QAAA,CAAAC,GAAAC,MAAA;AACI,MAAAD,EAAA,UAAA,IAAA,GAAAD,MAAAF,EAAA,MAAAI,CAAA,KAAA,OAAA;AAAA,IAAyE,CAAA;AAAA,EAC5E,CAAA;AAET,GCuCIC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA/BAC,IAAAC,EAAA,IAAA;AACA,IAAAd,EAAAJ,EAAAJ,GAAA,QAAA,GAAAqB,CAAA;AAEA,UAAAE,IAAAxB,EAAA,OAAA;AAAA;AAAA;AAAA,MAA2C,+BAAA,CAAAO,EAAA,SAAAN,EAAA,MAAA;AAAA,IAG0C,EAAA;;;;;;;;;;qECwBrFwB,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;iBAvDA9B,IAAAC,EAAA,GAyBA8B,IAAA1B,EAAA,MAAA,CAAAC,EAAA,UAAA,GACAJ,IAAAC,EAAAH,CAAA,GACA6B,IAAAxB,EAAA,OAAA;AAAA,MAA2C,mCAAAC,EAAA;AAAA,IACE,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}