@adyen/bento-vue2 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 (201) 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 +27 -2
  10. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +522 -114
  11. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +3 -3
  12. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +3 -3
  13. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +3 -3
  14. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +3 -3
  15. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +3 -3
  16. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +3 -3
  17. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +13 -13
  18. 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
  19. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +12 -3
  20. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +3 -3
  21. package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +5 -1
  22. package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +12 -3
  23. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +1 -1
  24. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +1 -1
  25. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.types.d.ts +2 -1
  26. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.vue.d.ts +2 -0
  27. package/dist/@types/packages/vue2/src/components/image/index.d.ts +1 -0
  28. package/dist/@types/packages/vue2/src/components/internal/base-button/base-button.vue.d.ts +2 -0
  29. package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +24 -0
  30. package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +3 -3
  31. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +3 -1
  32. package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +13 -3
  33. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.types.d.ts +1 -9
  34. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.utils.d.ts +5 -21
  35. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +119 -71
  36. package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +3 -2
  37. package/dist/@types/packages/vue2/src/components/stepper/components/step/index.d.ts +1 -0
  38. package/dist/@types/packages/vue2/src/components/stepper/components/step/step.vue.d.ts +33 -0
  39. package/dist/@types/packages/vue2/src/components/stepper/composables/useKeyboardNavigation/useKeyboardNavigation.d.ts +15 -0
  40. package/dist/@types/packages/vue2/src/components/stepper/index.d.ts +3 -0
  41. package/dist/@types/packages/vue2/src/components/stepper/stepper.keys.d.ts +3 -0
  42. package/dist/@types/packages/vue2/src/components/stepper/stepper.types.d.ts +24 -0
  43. package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +42 -0
  44. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
  45. package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +389 -50
  46. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  47. package/dist/@types/packages/vue2/src/types/index.d.ts +1 -0
  48. package/dist/@types/packages/vue2/src/types/lazy-load.d.ts +1 -0
  49. package/dist/accordion.js +1 -1
  50. package/dist/alert.js +1 -1
  51. package/dist/assets/base-button.css +1 -1
  52. package/dist/assets/base-modal.css +1 -1
  53. package/dist/assets/button.css +1 -1
  54. package/dist/assets/calendar.css +1 -1
  55. package/dist/assets/checkbox.css +1 -1
  56. package/dist/assets/dropdown-default-textbox.css +1 -1
  57. package/dist/assets/dropdown.css +1 -1
  58. package/dist/assets/index.css +1 -1
  59. package/dist/assets/index10.css +1 -1
  60. package/dist/assets/index11.css +1 -1
  61. package/dist/assets/index12.css +1 -1
  62. package/dist/assets/index13.css +1 -1
  63. package/dist/assets/index14.css +1 -1
  64. package/dist/assets/index15.css +1 -1
  65. package/dist/assets/index16.css +1 -1
  66. package/dist/assets/index17.css +1 -1
  67. package/dist/assets/index18.css +1 -1
  68. package/dist/assets/index19.css +1 -1
  69. package/dist/assets/index2.css +1 -1
  70. package/dist/assets/index20.css +1 -1
  71. package/dist/assets/index21.css +1 -1
  72. package/dist/assets/index22.css +1 -1
  73. package/dist/assets/index23.css +1 -1
  74. package/dist/assets/index24.css +1 -1
  75. package/dist/assets/index25.css +1 -1
  76. package/dist/assets/index26.css +1 -1
  77. package/dist/assets/index27.css +1 -1
  78. package/dist/assets/index28.css +1 -1
  79. package/dist/assets/index29.css +1 -1
  80. package/dist/assets/index3.css +1 -1
  81. package/dist/assets/index30.css +1 -1
  82. package/dist/assets/index31.css +1 -1
  83. package/dist/assets/index32.css +1 -1
  84. package/dist/assets/index34.css +1 -1
  85. package/dist/assets/index35.css +1 -1
  86. package/dist/assets/index36.css +1 -1
  87. package/dist/assets/index37.css +1 -1
  88. package/dist/assets/index38.css +1 -1
  89. package/dist/assets/index39.css +1 -1
  90. package/dist/assets/index4.css +1 -1
  91. package/dist/assets/index40.css +1 -1
  92. package/dist/assets/index41.css +1 -1
  93. package/dist/assets/index42.css +1 -1
  94. package/dist/assets/index43.css +1 -0
  95. package/dist/assets/index5.css +1 -1
  96. package/dist/assets/index6.css +1 -1
  97. package/dist/assets/index7.css +1 -1
  98. package/dist/assets/index8.css +1 -1
  99. package/dist/assets/index9.css +1 -1
  100. package/dist/assets/tooltip.css +1 -1
  101. package/dist/avatar-image.js +1 -1
  102. package/dist/badge.js +1 -1
  103. package/dist/button.js +1 -1
  104. package/dist/card.js +1 -1
  105. package/dist/checkbox.js +3 -3
  106. package/dist/chunks/base-button.89e9efbd.js +88 -0
  107. package/dist/chunks/base-button.89e9efbd.js.map +1 -0
  108. package/dist/chunks/base-modal.6eaa7e53.js +211 -0
  109. package/dist/chunks/base-modal.6eaa7e53.js.map +1 -0
  110. package/dist/chunks/{calendar.c20df708.js → calendar.44459d87.js} +2 -2
  111. package/dist/chunks/{calendar.c20df708.js.map → calendar.44459d87.js.map} +1 -1
  112. package/dist/chunks/{checkbox.5a69ce9d.js → checkbox.b69b8f22.js} +16 -16
  113. package/dist/chunks/{checkbox.5a69ce9d.js.map → checkbox.b69b8f22.js.map} +1 -1
  114. package/dist/chunks/{copy.982e1b19.js → copy.57f969d4.js} +2 -2
  115. package/dist/chunks/{copy.982e1b19.js.map → copy.57f969d4.js.map} +1 -1
  116. package/dist/chunks/debounce.b5ef6acf.js +10 -0
  117. package/dist/chunks/debounce.b5ef6acf.js.map +1 -0
  118. package/dist/chunks/{dropdown-default-textbox.9bef4138.js → dropdown-default-textbox.2d093874.js} +8 -7
  119. package/dist/chunks/{dropdown-default-textbox.9bef4138.js.map → dropdown-default-textbox.2d093874.js.map} +1 -1
  120. package/dist/chunks/{dropdown.15cc1c45.js → dropdown.10ea8304.js} +33 -31
  121. package/dist/chunks/dropdown.10ea8304.js.map +1 -0
  122. package/dist/chunks/{index.c39c64c9.js → index.0f8690c4.js} +2 -2
  123. package/dist/chunks/{index.c39c64c9.js.map → index.0f8690c4.js.map} +1 -1
  124. package/dist/chunks/{index.58ce168a.js → index.4a11da21.js} +179 -170
  125. package/dist/chunks/index.4a11da21.js.map +1 -0
  126. package/dist/chunks/{index.876ea5bf.js → index.660f2f2e.js} +2 -2
  127. package/dist/chunks/{index.876ea5bf.js.map → index.660f2f2e.js.map} +1 -1
  128. package/dist/chunks/{index.b9c8c99a.js → index.f607a3f1.js} +4 -4
  129. package/dist/chunks/{index.b9c8c99a.js.map → index.f607a3f1.js.map} +1 -1
  130. package/dist/chunks/{debounce.f8d92e44.js → keyboard-navigation.ca47dfa8.js} +11 -17
  131. package/dist/chunks/keyboard-navigation.ca47dfa8.js.map +1 -0
  132. package/dist/chunks/{listbox-option-tag.f8b467a7.js → listbox-option-tag.e2688e54.js} +2 -2
  133. package/dist/chunks/{listbox-option-tag.f8b467a7.js.map → listbox-option-tag.e2688e54.js.map} +1 -1
  134. package/dist/chunks/{listbox.cbf47484.js → listbox.201a8521.js} +6 -5
  135. package/dist/chunks/{listbox.cbf47484.js.map → listbox.201a8521.js.map} +1 -1
  136. package/dist/chunks/{tooltip.0297fd5d.js → tooltip.f89cb0cd.js} +18 -18
  137. package/dist/chunks/{tooltip.0297fd5d.js.map → tooltip.f89cb0cd.js.map} +1 -1
  138. package/dist/chunks/use-has-slot.6052d56a.js.map +1 -1
  139. package/dist/code-snippet.js +193 -191
  140. package/dist/code-snippet.js.map +1 -1
  141. package/dist/country.js +1 -1
  142. package/dist/data-grid.js +750 -640
  143. package/dist/data-grid.js.map +1 -1
  144. package/dist/date-picker.js +5 -5
  145. package/dist/date-range-picker.js +2 -2
  146. package/dist/divider.js +1 -1
  147. package/dist/dropdown.js +3 -3
  148. package/dist/empty-state.js +10 -10
  149. package/dist/empty-state.js.map +1 -1
  150. package/dist/filter-bar.js +533 -491
  151. package/dist/filter-bar.js.map +1 -1
  152. package/dist/focus-trap.js +1 -1
  153. package/dist/form-layout.js +71 -50
  154. package/dist/form-layout.js.map +1 -1
  155. package/dist/header.js +181 -102
  156. package/dist/header.js.map +1 -1
  157. package/dist/image.js +3 -1
  158. package/dist/index.js +200 -193
  159. package/dist/index.js.map +1 -1
  160. package/dist/info-icon.js +2 -2
  161. package/dist/input-field.js +2 -2
  162. package/dist/internal.js +4 -4
  163. package/dist/link.js +1 -1
  164. package/dist/loading-indicator.js +1 -1
  165. package/dist/menu.js +39 -30
  166. package/dist/menu.js.map +1 -1
  167. package/dist/modal.js +29 -26
  168. package/dist/modal.js.map +1 -1
  169. package/dist/pagination.js +2 -2
  170. package/dist/payment-method.js +1 -1
  171. package/dist/popover.js +43 -31
  172. package/dist/popover.js.map +1 -1
  173. package/dist/popper-container.js +1228 -180
  174. package/dist/popper-container.js.map +1 -1
  175. package/dist/radio-group.js +1 -1
  176. package/dist/search-bar.js +3 -3
  177. package/dist/segmented-control.js +9 -9
  178. package/dist/segmented-control.js.map +1 -1
  179. package/dist/sidepanel.js +13 -13
  180. package/dist/sidepanel.js.map +1 -1
  181. package/dist/status.js +1 -1
  182. package/dist/stepper.js +229 -0
  183. package/dist/stepper.js.map +1 -0
  184. package/dist/structured-list.js +1 -1
  185. package/dist/summary-grid.js +2 -2
  186. package/dist/tabs.js +1 -1
  187. package/dist/tag.js +2 -2
  188. package/dist/textarea.js +1 -1
  189. package/dist/timeline.js +2 -2
  190. package/dist/toast.js +1 -1
  191. package/dist/toggle.js +14 -14
  192. package/dist/toggle.js.map +1 -1
  193. package/dist/web-types.json +279 -60
  194. package/package.json +3 -3
  195. package/dist/chunks/base-button.7a676605.js +0 -82
  196. package/dist/chunks/base-button.7a676605.js.map +0 -1
  197. package/dist/chunks/base-modal.a51d2395.js +0 -207
  198. package/dist/chunks/base-modal.a51d2395.js.map +0 -1
  199. package/dist/chunks/debounce.f8d92e44.js.map +0 -1
  200. package/dist/chunks/dropdown.15cc1c45.js.map +0 -1
  201. package/dist/chunks/index.58ce168a.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { B as a } from "./chunks/index.c39c64c9.js";
1
+ import { B as a } from "./chunks/index.0f8690c4.js";
2
2
  export {
3
3
  a as BentoFocusTrap
4
4
  };
@@ -1,12 +1,12 @@
1
- import { defineComponent as _, useSlots as i, computed as n, provide as y, toRef as f, onMounted as v, ref as g } from "vue";
2
- import { BentoAlert as p } from "./alert.js";
3
- import { u as m } from "./chunks/use-has-slot.6052d56a.js";
1
+ import { defineComponent as _, useSlots as p, computed as n, provide as v, toRef as f, onMounted as g, ref as L } from "vue";
2
+ import { BentoAlert as m } from "./alert.js";
3
+ import { u as d } from "./chunks/use-has-slot.6052d56a.js";
4
4
  import { F as b } from "./chunks/form-layout.types.a7a1438d.js";
5
5
  import { n as l } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
6
- import { B as u, c as L } from "./chunks/index.1645ffcb.js";
7
- import "./assets/index19.css";
8
- const h = {}, $ = /* @__PURE__ */ _({
9
- ...h,
6
+ import { B as i, c as h } from "./chunks/index.1645ffcb.js";
7
+ import "./assets/index18.css";
8
+ const C = {}, $ = /* @__PURE__ */ _({
9
+ ...C,
10
10
  __name: "form-layout",
11
11
  props: {
12
12
  /**
@@ -20,18 +20,18 @@ const h = {}, $ = /* @__PURE__ */ _({
20
20
  loading: { type: Boolean, default: !1 }
21
21
  },
22
22
  setup(o) {
23
- const t = o, e = i(), s = m(e), r = n(() => t.form ? "form" : "div"), a = n(() => s("actions-left") || s("actions-right"));
24
- return y(b, f(t, "loading")), { __sfc: !0, slots: e, hasSlot: s, props: t, formLayoutElement: r, hasActions: a, BentoAlert: p };
23
+ const t = o, e = p(), s = d(e), r = n(() => t.form ? "form" : "div"), a = n(() => s("actions-left") || s("actions-right"));
24
+ return v(b, f(t, "loading")), { __sfc: !0, slots: e, hasSlot: s, props: t, formLayoutElement: r, hasActions: a, BentoAlert: m };
25
25
  }
26
26
  });
27
- var C = function() {
27
+ var B = function() {
28
28
  var t = this, e = t._self._c, s = t._self._setupProxy;
29
29
  return e(s.formLayoutElement, { tag: "component", staticClass: "b-form-layout", attrs: { role: "form" } }, [s.hasSlot("error-message") ? e(s.BentoAlert, { staticClass: "b-form-layout__error-message", attrs: { type: "critical" }, scopedSlots: t._u([{ key: "description", fn: function() {
30
30
  return [t._t("error-message")];
31
31
  }, proxy: !0 }], null, !0) }) : t._e(), t._t("default"), s.hasActions ? e("div", { staticClass: "b-form-layout__actions-container" }, [e("div", { staticClass: "b-form-layout__actions" }, [t._t("actions-left")], 2), e("div", { staticClass: "b-form-layout__actions" }, [t._t("actions-right")], 2)]) : t._e()], 2);
32
- }, x = [], B = /* @__PURE__ */ l(
32
+ }, x = [], F = /* @__PURE__ */ l(
33
33
  $,
34
- C,
34
+ B,
35
35
  x,
36
36
  !1,
37
37
  null,
@@ -39,41 +39,54 @@ var C = function() {
39
39
  null,
40
40
  null
41
41
  );
42
- const U = B.exports, F = {}, S = /* @__PURE__ */ _({
43
- ...F,
42
+ const Q = F.exports, T = {}, S = /* @__PURE__ */ _({
43
+ ...T,
44
44
  __name: "form-layout-field-tip",
45
45
  setup(o) {
46
- return { __sfc: !0, BentoAlert: p };
46
+ return { __sfc: !0, BentoAlert: m };
47
47
  }
48
48
  });
49
- var T = function() {
49
+ var A = function() {
50
50
  var t = this, e = t._self._c, s = t._self._setupProxy;
51
51
  return e("div", { staticClass: "b-form-layout-field-tip" }, [t._t("default"), e(s.BentoAlert, { attrs: { variant: "tip", type: "warning" }, scopedSlots: t._u([{ key: "description", fn: function() {
52
52
  return [t._t("message")];
53
53
  }, proxy: !0 }], null, !0) })], 2);
54
- }, A = [], E = /* @__PURE__ */ l(
54
+ }, O = [], E = /* @__PURE__ */ l(
55
55
  S,
56
- T,
57
56
  A,
57
+ O,
58
58
  !1,
59
59
  null,
60
60
  "f5604b8a",
61
61
  null,
62
62
  null
63
63
  );
64
- const V = E.exports, G = (o, t) => {
64
+ const W = E.exports, u = [
65
+ "100",
66
+ "50",
67
+ "33",
68
+ "25",
69
+ "66-33",
70
+ "33-66",
71
+ "75-25",
72
+ "25-75",
73
+ "50-50",
74
+ "33-33-33"
75
+ ], G = 100, P = (o, t) => {
65
76
  const e = (r) => {
66
77
  var a;
67
78
  return (a = r.split) == null ? void 0 : a.call(r, "-").map((c) => parseInt(c, 10));
68
- }, s = n(() => e(o.value));
69
- v(() => {
79
+ }, s = n(
80
+ () => u.includes(o.value) ? e(o.value) : G
81
+ );
82
+ g(() => {
70
83
  const r = t.value.classList[0];
71
- t.value.querySelectorAll(`.${r} > *`).forEach((c, d) => {
72
- c.classList.add(`${r}--${s.value[d] || "100"}`);
84
+ t.value.querySelectorAll(`.${r} > *`).forEach((c, y) => {
85
+ c.classList.add(`${r}--${s.value[y] || "100"}`);
73
86
  });
74
87
  });
75
- }, O = {}, P = /* @__PURE__ */ _({
76
- ...O,
88
+ }, R = {}, I = /* @__PURE__ */ _({
89
+ ...R,
77
90
  __name: "form-layout-group",
78
91
  props: {
79
92
  /**
@@ -88,6 +101,7 @@ const V = E.exports, G = (o, t) => {
88
101
  * If the value entered is not listed in the example
89
102
  * list below it will use 100% by default.
90
103
  * @example
104
+ * '33-33-33'
91
105
  * '50-50'
92
106
  * '25-75'
93
107
  * '75-25'
@@ -100,29 +114,36 @@ const V = E.exports, G = (o, t) => {
100
114
  */
101
115
  layout: {
102
116
  type: String,
103
- default: "100"
117
+ default: "100",
118
+ validator: (o) => u.includes(o)
104
119
  }
105
120
  },
106
121
  setup(o) {
107
- const t = o, e = g(null);
108
- return G(f(t, "layout"), e), { __sfc: !0, props: t, formLayoutGroup: e };
122
+ const t = o, e = L(null);
123
+ P(f(t, "layout"), e);
124
+ const s = n(() => ({
125
+ // Transform into column if the layout is unsopprted
126
+ // "form-layout.scss" depends on this class
127
+ "b-form-layout-group--column": !u.includes(t.layout)
128
+ }));
129
+ return { __sfc: !0, props: t, formLayoutGroup: e, conditionalClasses: s };
109
130
  }
110
131
  });
111
- var R = function() {
112
- var t = this, e = t._self._c;
113
- return t._self._setupProxy, e("div", { ref: "formLayoutGroup", staticClass: "b-form-layout-group" }, [t._t("default")], 2);
114
- }, I = [], N = /* @__PURE__ */ l(
115
- P,
116
- R,
132
+ var N = function() {
133
+ var t = this, e = t._self._c, s = t._self._setupProxy;
134
+ return e("div", { ref: "formLayoutGroup", staticClass: "b-form-layout-group", class: s.conditionalClasses }, [t._t("default")], 2);
135
+ }, k = [], q = /* @__PURE__ */ l(
117
136
  I,
137
+ N,
138
+ k,
118
139
  !1,
119
140
  null,
120
- "4153ff3c",
141
+ "39e9662c",
121
142
  null,
122
143
  null
123
144
  );
124
- const Q = N.exports, k = {}, q = /* @__PURE__ */ _({
125
- ...k,
145
+ const X = q.exports, w = {}, D = /* @__PURE__ */ _({
146
+ ...w,
126
147
  __name: "form-layout-title",
127
148
  props: {
128
149
  /**
@@ -139,36 +160,36 @@ const Q = N.exports, k = {}, q = /* @__PURE__ */ _({
139
160
  * @values h1, h2, h3, h4, h5, h6, div, p, span
140
161
  */
141
162
  el: {
142
- type: u.props.el.type,
163
+ type: i.props.el.type,
143
164
  required: !0,
144
- validator: (o) => Object.values(L).includes(o)
165
+ validator: (o) => Object.values(h).includes(o)
145
166
  }
146
167
  },
147
168
  setup(o) {
148
- const t = o, e = i(), s = n(() => !t.subsection), r = m(e), a = n(() => ({
169
+ const t = o, e = p(), s = n(() => !t.subsection), r = d(e), a = n(() => ({
149
170
  "b-form-layout-title--subsection": t.subsection
150
171
  }));
151
- return { __sfc: !0, slots: e, props: t, isSection: s, hasSlot: r, conditionalClasses: a, BentoTypography: u };
172
+ return { __sfc: !0, slots: e, props: t, isSection: s, hasSlot: r, conditionalClasses: a, BentoTypography: i };
152
173
  }
153
174
  });
154
- var w = function() {
175
+ var M = function() {
155
176
  var t = this, e = t._self._c, s = t._self._setupProxy;
156
177
  return e("div", { staticClass: "b-form-layout-title", class: s.conditionalClasses }, [e(s.BentoTypography, { attrs: { el: t.el, variant: "title", medium: s.isSection } }, [t._t("default")], 2), s.hasSlot("description") ? e(s.BentoTypography, { staticClass: "b-form-layout-title__description", attrs: { el: "span", wide: "" } }, [t._t("description")], 2) : t._e()], 1);
157
- }, M = [], Y = /* @__PURE__ */ l(
158
- q,
159
- w,
178
+ }, U = [], Y = /* @__PURE__ */ l(
179
+ D,
160
180
  M,
181
+ U,
161
182
  !1,
162
183
  null,
163
184
  "03648a9d",
164
185
  null,
165
186
  null
166
187
  );
167
- const W = Y.exports;
188
+ const Z = Y.exports;
168
189
  export {
169
- U as BentoFormLayout,
170
- V as BentoFormLayoutFieldTip,
171
- Q as BentoFormLayoutGroup,
172
- W as BentoFormLayoutTitle
190
+ Q as BentoFormLayout,
191
+ W as BentoFormLayoutFieldTip,
192
+ X as BentoFormLayoutGroup,
193
+ Z as BentoFormLayoutTitle
173
194
  };
174
195
  //# sourceMappingURL=form-layout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-layout.js","sources":["../src/components/form-layout/form-layout.vue","../src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue","../src/components/form-layout/components/form-layout-group/composable/use-form-layout-group-percentage.ts","../src/components/form-layout/components/form-layout-group/form-layout-group.vue","../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":";;;;;;;AAsFI,MAAAA,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;;;;;;;;;;;;;;;;;;qBCTAK,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;qBCzBSC,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;;;;;;;;;;;;;;;;qBC+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":["../src/components/form-layout/form-layout.vue","../src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue","../src/components/form-layout/components/form-layout-group/form-layout-group.types.ts","../src/components/form-layout/components/form-layout-group/composable/use-form-layout-group-percentage.ts","../src/components/form-layout/components/form-layout-group/form-layout-group.vue","../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":";;;;;;;AAsFI,MAAAA,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;;;;;;;;;;;;;;;;;;qBCTAK,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;qBC1BGC,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;;;;;;;;;;;;;;;;;qBCwBrFwB,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;;;;;;;;;;;;;;;;;;"}