@adyen/bento-vue3 1.76.0 → 1.76.2

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 (68) hide show
  1. package/dist/assets/accordion-item.css +1 -1
  2. package/dist/assets/action-bar.css +1 -1
  3. package/dist/assets/base-modal.css +1 -1
  4. package/dist/assets/button-actions.css +1 -1
  5. package/dist/assets/card.css +1 -1
  6. package/dist/assets/data-grid.css +1 -1
  7. package/dist/assets/dialog-page.css +1 -1
  8. package/dist/assets/file-uploader.css +1 -1
  9. package/dist/assets/input-field.css +1 -1
  10. package/dist/assets/inspector.css +1 -1
  11. package/dist/assets/modal-fullscreen.css +1 -1
  12. package/dist/assets/sidepanel.css +1 -1
  13. package/dist/checkbox.js +2 -2
  14. package/dist/chunks/{checkbox-group.8J29fVna.js → checkbox-group.8ebmaHsA.js} +2 -2
  15. package/dist/chunks/{checkbox-group.8J29fVna.js.map → checkbox-group.8ebmaHsA.js.map} +1 -1
  16. package/dist/chunks/{checkbox.CfNYUty6.js → checkbox.BI0dqARY.js} +18 -18
  17. package/dist/chunks/{checkbox.CfNYUty6.js.map → checkbox.BI0dqARY.js.map} +1 -1
  18. package/dist/chunks/{code-snippet.EeIcRV20.js → code-snippet.Bjf1ma1L.js} +2 -2
  19. package/dist/chunks/{code-snippet.EeIcRV20.js.map → code-snippet.Bjf1ma1L.js.map} +1 -1
  20. package/dist/chunks/{data-grid.DJIxBwCa.js → data-grid.VBEJO94f.js} +8 -8
  21. package/dist/chunks/{data-grid.DJIxBwCa.js.map → data-grid.VBEJO94f.js.map} +1 -1
  22. package/dist/chunks/{date-picker.CobmiKaJ.js → date-picker.OI-sQ232.js} +14 -14
  23. package/dist/chunks/{date-picker.CobmiKaJ.js.map → date-picker.OI-sQ232.js.map} +1 -1
  24. package/dist/chunks/{date-range-picker.B6UKl1_N.js → date-range-picker.D7IwIR5V.js} +19 -19
  25. package/dist/chunks/{date-range-picker.B6UKl1_N.js.map → date-range-picker.D7IwIR5V.js.map} +1 -1
  26. package/dist/chunks/{dropdown-tag.CMjilUQb.js → dropdown-tag.DFeoXIgH.js} +2 -2
  27. package/dist/chunks/{dropdown-tag.CMjilUQb.js.map → dropdown-tag.DFeoXIgH.js.map} +1 -1
  28. package/dist/chunks/{dropdown.DG_EnV8g.js → dropdown.KStrJVoP.js} +18 -18
  29. package/dist/chunks/{dropdown.DG_EnV8g.js.map → dropdown.KStrJVoP.js.map} +1 -1
  30. package/dist/chunks/{filter-bar.dmC284Po.js → filter-bar.JXmlFnHV.js} +6 -6
  31. package/dist/chunks/{filter-bar.dmC284Po.js.map → filter-bar.JXmlFnHV.js.map} +1 -1
  32. package/dist/chunks/{header-with-views.BZ16v5-m.js → header-with-views.Dg2usaMY.js} +3 -3
  33. package/dist/chunks/{header-with-views.BZ16v5-m.js.map → header-with-views.Dg2usaMY.js.map} +1 -1
  34. package/dist/chunks/{input-field-password.BVnZWBAV.js → input-field-password.B6nJ7ygZ.js} +3 -3
  35. package/dist/chunks/{input-field-password.BVnZWBAV.js.map → input-field-password.B6nJ7ygZ.js.map} +1 -1
  36. package/dist/chunks/{input-field-phone-number.CWhPGQ1U.js → input-field-phone-number.D_UBAN2s.js} +3 -3
  37. package/dist/chunks/{input-field-phone-number.CWhPGQ1U.js.map → input-field-phone-number.D_UBAN2s.js.map} +1 -1
  38. package/dist/chunks/{input-field.A-dEZZfC.js → input-field.C29FCI4j.js} +62 -62
  39. package/dist/chunks/input-field.C29FCI4j.js.map +1 -0
  40. package/dist/chunks/{pagination.B4qBK4pM.js → pagination.BaBWNlIF.js} +2 -2
  41. package/dist/chunks/{pagination.B4qBK4pM.js.map → pagination.BaBWNlIF.js.map} +1 -1
  42. package/dist/chunks/{rich-text-editor.BA6_k4Vv.js → rich-text-editor.Bh7KS617.js} +2 -2
  43. package/dist/chunks/{rich-text-editor.BA6_k4Vv.js.map → rich-text-editor.Bh7KS617.js.map} +1 -1
  44. package/dist/chunks/{search-bar.dZ7UCMxb.js → search-bar.RS02IcLc.js} +3 -3
  45. package/dist/chunks/{search-bar.dZ7UCMxb.js.map → search-bar.RS02IcLc.js.map} +1 -1
  46. package/dist/chunks/{secondary-nav.CE082cQ_.js → secondary-nav.DXsgUTqk.js} +2 -2
  47. package/dist/chunks/{secondary-nav.CE082cQ_.js.map → secondary-nav.DXsgUTqk.js.map} +1 -1
  48. package/dist/chunks/{selection-card-group.NnTbPQjj.js → selection-card-group.F8alOPtl.js} +9 -9
  49. package/dist/chunks/{selection-card-group.NnTbPQjj.js.map → selection-card-group.F8alOPtl.js.map} +1 -1
  50. package/dist/code-snippet.js +1 -1
  51. package/dist/data-grid.js +1 -1
  52. package/dist/date-picker.js +1 -1
  53. package/dist/date-range-picker.js +1 -1
  54. package/dist/dropdown.js +2 -2
  55. package/dist/filter-bar.js +1 -1
  56. package/dist/header-with-views.js +1 -1
  57. package/dist/index.js +18 -18
  58. package/dist/input-field-password.js +1 -1
  59. package/dist/input-field-phone-number.js +1 -1
  60. package/dist/input-field.js +1 -1
  61. package/dist/pagination.js +1 -1
  62. package/dist/rich-text-editor.js +1 -1
  63. package/dist/search-bar.js +2 -2
  64. package/dist/secondary-nav.js +1 -1
  65. package/dist/selection-card.js +1 -1
  66. package/dist/web-types.json +1 -1
  67. package/package.json +5 -5
  68. package/dist/chunks/input-field.A-dEZZfC.js.map +0 -1
@@ -1,8 +1,8 @@
1
- import { defineComponent as he, useAttrs as Ee, useSlots as Te, ref as D, provide as Ne, inject as z, toRef as ke, computed as i, toRefs as Ae, createBlock as u, openBlock as n, unref as a, normalizeClass as Le, withCtx as c, createCommentVNode as d, createElementVNode as I, createElementBlock as b, renderSlot as p, withModifiers as X, mergeProps as P, withKeys as ge, createTextVNode as Z, toDisplayString as G, createVNode as Oe } from "vue";
2
- import { a as Se, I as Ie, b as Pe, B as Q } from "./dropdown.DG_EnV8g.js";
3
- import { p as R, d as x, B as h } from "./typography.yBEME_Gu.js";
1
+ import { defineComponent as he, useAttrs as Ee, useSlots as Te, ref as _, provide as Ne, inject as J, toRef as ke, computed as i, toRefs as Ae, createBlock as u, openBlock as n, unref as a, normalizeClass as Le, withCtx as c, createCommentVNode as d, createElementVNode as I, createElementBlock as b, renderSlot as p, withModifiers as j, mergeProps as P, withKeys as ge, createTextVNode as z, toDisplayString as X, createVNode as Oe } from "vue";
2
+ import { a as Se, I as Ie, b as Pe, B as Z } from "./dropdown.KStrJVoP.js";
3
+ import { p as R, d as G, B as h } from "./typography.yBEME_Gu.js";
4
4
  import { g as E } from "./generate-uid.NJ8tVoha.js";
5
- import { g as ee } from "./get-slot-text.DQlZEsId.js";
5
+ import { g as Q } from "./get-slot-text.DQlZEsId.js";
6
6
  import { u as Re } from "./aria-label.CaUURpnB.js";
7
7
  import { u as Ce } from "./index.pdBj0KQU.js";
8
8
  import { u as $e } from "./use-form-layout-loading.D3lALhtC.js";
@@ -11,13 +11,13 @@ import { F as Me, E as Ue } from "./field-label.C97CrBI_.js";
11
11
  import { _ as Ve } from "./_plugin-vue_export-helper.CHgC5LLL.js";
12
12
  import "../assets/input-field.css";
13
13
  var v = /* @__PURE__ */ ((t) => (t.DEFAULT = "default", t.PAYMENT_METHOD = "payment-method", t.STATIC_VALUE = "static-value", t.DROPDOWN = "dropdown", t))(v || {}), f = /* @__PURE__ */ ((t) => (t.START = "start", t.END = "end", t))(f || {}), T = /* @__PURE__ */ ((t) => (t.CONDENSED = "condensed", t.DISABLED = "disabled", t.READONLY = "readonly", t.ERROR = "error", t))(T || {}), C = /* @__PURE__ */ ((t) => (t.SEARCH = "search", t.TEXT = "text", t.NUMBER = "number", t))(C || {}), Fe = /* @__PURE__ */ ((t) => (t.INPUT = "input", t.ESCAPE_PRESSED = "escape-pressed", t.UPDATE_DROPDOWN = "update:dropdown", t.DROPDOWN_INPUT = "dropdown-input", t.FOCUS = "focus", t.CHANGE = "change", t.BLUR = "blur", t.KEYDOWN = "keydown", t))(Fe || {});
14
- const oe = {
14
+ const x = {
15
15
  "en-US": {
16
16
  ariaLabelDropdownFallback: "{inputLabel} Dropdown",
17
17
  ariaLabelFallback: "Input field"
18
18
  }
19
19
  }, He = ["aria-disabled"], Ye = ["aria-hidden"], qe = ["aria-hidden"], Ke = ["id"], We = { class: "b-input-field__input-container" }, Je = ["id", "aria-label", "aria-describedby", "aria-owns", "aria-invalid", "placeholder", "required", "type", "value", "disabled", "readonly"], je = ["aria-hidden"], ze = ["id"], Xe = ["id"], Ze = {
20
- i18n: { messages: oe }
20
+ i18n: { messages: x }
21
21
  }, Ge = /* @__PURE__ */ he({
22
22
  ...Ze,
23
23
  __name: "input-field",
@@ -45,13 +45,13 @@ const oe = {
45
45
  tooltipText: { default: null }
46
46
  },
47
47
  emits: ["update:dropdown", "blur", "change", "dropdown-input", "escape-pressed", "focus", "keydown", "keyup", "input"],
48
- setup(t, { expose: te, emit: ae }) {
49
- const $ = Ee(), N = Te(), o = t, l = ae, { t: B } = Ce({ messages: oe }), s = Be(N), M = D(null), O = D(null), U = E("input"), y = E("input-dropdown"), k = E("input-static-value"), V = E("input-description"), F = E("input-error"), S = D(!1);
48
+ setup(t, { expose: ee, emit: oe }) {
49
+ const $ = Ee(), N = Te(), o = t, s = oe, { t: B } = Ce({ messages: x }), l = Be(N), M = _(null), O = _(null), U = E("input"), y = E("input-dropdown"), k = E("input-static-value"), V = E("input-description"), F = E("input-error"), S = _(!1);
50
50
  Ne(Se, !0);
51
- const H = z(Ie, D(void 0)), ie = () => {
52
- S.value = !0, l("focus");
53
- }, de = () => {
54
- S.value = !1, l("blur");
51
+ const H = J(Ie, _(void 0)), te = () => {
52
+ S.value = !0, s("focus");
53
+ }, ae = () => {
54
+ S.value = !1, s("blur");
55
55
  }, { isReadOnly: m } = $e(ke(o, "readonly")), Y = i(
56
56
  () => {
57
57
  var e;
@@ -59,60 +59,60 @@ const oe = {
59
59
  }
60
60
  ), A = i(
61
61
  () => o.variant === v.STATIC_VALUE && !!N.staticValue
62
- ), re = i(() => o.variant === v.DEFAULT), ne = i(() => o.variant === v.PAYMENT_METHOD), le = i(
62
+ ), ie = i(() => o.variant === v.DEFAULT), de = i(() => o.variant === v.PAYMENT_METHOD), re = i(
63
63
  () => A.value && o.staticValuePosition === f.START
64
- ), se = i(
64
+ ), ne = i(
65
65
  () => A.value && o.staticValuePosition === f.END
66
- ), L = i(() => o.variant === v.DROPDOWN && !!o.dropdown), ue = i(
66
+ ), L = i(() => o.variant === v.DROPDOWN && !!o.dropdown), le = i(
67
67
  () => L.value && o.dropdownPosition === f.START
68
- ), pe = i(
68
+ ), se = i(
69
69
  () => L.value && o.dropdownPosition === f.END
70
70
  ), g = i(
71
71
  () => !o.disabled && !m.value && (!!o.errorMessage || o.error)
72
- ), q = i(() => ee(N)("default") || o.label), K = i(() => ee(N)("description") || o.description), fe = i(() => L.value === !0 && A.value === !0 ? `${k} ${y}` : L.value === !0 ? `${y}` : A.value === !0 ? `${k}` : null), ce = i(() => B("ariaLabelFallback")), be = i(
73
- () => B("ariaLabelDropdownFallback", { inputLabel: W.value })
74
- ), ve = D($["aria-label"]), { ariaLabel: ye } = Ae(o), W = Re({
72
+ ), ue = i(() => Q(N)("default") || o.label), pe = i(() => Q(N)("description") || o.description), fe = i(() => L.value === !0 && A.value === !0 ? `${k} ${y}` : L.value === !0 ? `${y}` : A.value === !0 ? `${k}` : null), ce = i(() => B("ariaLabelFallback")), be = i(
73
+ () => B("ariaLabelDropdownFallback", { inputLabel: q.value })
74
+ ), ve = _($["aria-label"]), { ariaLabel: ye } = Ae(o), q = Re({
75
75
  ariaLabel: ve.value,
76
76
  // TODO: take this line away when the aria-label props is removed
77
77
  label: ye,
78
- defaultFallback: q.value || ce
78
+ defaultFallback: ue.value || ce
79
79
  }), me = i(
80
- () => `${K.value ? V : ""} ${g.value && o.errorMessage ? F : ""}`
80
+ () => `${pe.value ? V : ""} ${g.value && o.errorMessage ? F : ""}`
81
81
  ), we = i(() => ({
82
82
  [`b-input-field--${T.CONDENSED}`]: o.condensed,
83
83
  [`b-input-field--${T.DISABLED}`]: o.disabled,
84
84
  [`b-input-field--${T.READONLY}`]: m.value,
85
85
  [`b-input-field--${T.ERROR}`]: g.value,
86
86
  "b-input-field--slashed-zero": o.slashedZero
87
- })), J = i(() => ({
87
+ })), K = i(() => ({
88
88
  "aria-label": be.value,
89
89
  ...o.dropdown
90
- })), _e = (e) => {
90
+ })), De = (e) => {
91
91
  const r = e.target.value;
92
- !o.disabled && !m.value && l("input", r);
93
- }, j = (e) => {
94
- l("dropdown-input", e), l("update:dropdown", { ...o == null ? void 0 : o.dropdown, value: e });
92
+ !o.disabled && !m.value && s("input", r);
93
+ }, W = (e) => {
94
+ s("dropdown-input", e), s("update:dropdown", { ...o == null ? void 0 : o.dropdown, value: e });
95
95
  }, w = () => {
96
96
  M.value.focus();
97
97
  };
98
- te({
98
+ ee({
99
99
  focusInput: w,
100
100
  focus: () => {
101
101
  o.variant === "dropdown" ? O.value.focus() : w();
102
102
  }
103
103
  });
104
- const De = z(Pe, "");
105
- return !Object.values(C).includes(o.type) && !De && (o.type === "tel" ? R(
104
+ const _e = J(Pe, "");
105
+ return !Object.values(C).includes(o.type) && !_e && (o.type === "tel" ? R(
106
106
  `"bento-input-field" dropdown does not support the type '${o.type}', use "bento-input-field-phone-number" instead.`
107
107
  ) : o.type === "password" ? R(
108
108
  `"bento-input-field" dropdown does not support the type '${o.type}', use "bento-input-field-password" instead.`
109
- ) : R(`"bento-input-field" dropdown does not support the type '${o.type}'`)), o.error && x(
109
+ ) : R(`"bento-input-field" dropdown does not support the type '${o.type}'`)), o.error && G(
110
110
  'BentoInputField "error" property',
111
111
  `Use the BentoInputField "errorMessage" property instead to indicate that there is a modifier error.
112
112
  Having the field as "undefined" will hide/remove the error.
113
113
  <bento-dropdown errorMessage="Error message text" />`,
114
114
  "2.0.0"
115
- ), s("defaultIconBefore") && x(
115
+ ), l("defaultIconBefore") && G(
116
116
  'BentoInputField "defaultIconBefore" slot',
117
117
  `Use the BentoInputField "iconBefore" slot instead to add an icon at the left side of the input field
118
118
  <bento-input-field>
@@ -128,7 +128,7 @@ const oe = {
128
128
  variant: "body"
129
129
  }, {
130
130
  default: c(() => [
131
- q.value ? (n(), u(a(Me), {
131
+ a(l)("default") || e.label ? (n(), u(a(Me), {
132
132
  key: 0,
133
133
  for: a(U),
134
134
  "data-testid": "input-field-label",
@@ -149,39 +149,39 @@ const oe = {
149
149
  "aria-disabled": e.disabled,
150
150
  onClick: w
151
151
  }, [
152
- re.value && (a(s)("defaultIconBefore") || a(s)("iconBefore")) ? (n(), b("span", {
152
+ ie.value && (a(l)("defaultIconBefore") || a(l)("iconBefore")) ? (n(), b("span", {
153
153
  key: 0,
154
154
  "aria-hidden": e.ariaHidden ? "true" : void 0,
155
155
  class: "b-input-field__icon-before"
156
156
  }, [
157
- a(s)("iconBefore") ? p(e.$slots, "iconBefore", { key: 0 }, void 0, !0) : d("", !0),
158
- a(s)("defaultIconBefore") && !a(s)("iconBefore") ? p(e.$slots, "defaultIconBefore", { key: 1 }, void 0, !0) : d("", !0)
157
+ a(l)("iconBefore") ? p(e.$slots, "iconBefore", { key: 0 }, void 0, !0) : d("", !0),
158
+ a(l)("defaultIconBefore") && !a(l)("iconBefore") ? p(e.$slots, "defaultIconBefore", { key: 1 }, void 0, !0) : d("", !0)
159
159
  ], 8, Ye)) : d("", !0),
160
- ne.value && a(s)("paymentMethod") ? (n(), b("span", {
160
+ de.value && a(l)("paymentMethod") ? (n(), b("span", {
161
161
  key: 1,
162
162
  "aria-hidden": e.ariaHidden ? "true" : void 0,
163
163
  class: "b-input-field__payment-method"
164
164
  }, [
165
165
  p(e.$slots, "paymentMethod", {}, void 0, !0)
166
166
  ], 8, qe)) : d("", !0),
167
- ue.value ? (n(), b("div", {
167
+ le.value ? (n(), b("div", {
168
168
  key: 2,
169
169
  id: a(y),
170
170
  class: "b-input-field__dropdown b-input-field__dropdown--start",
171
- onClick: r[0] || (r[0] = X(() => {
171
+ onClick: r[0] || (r[0] = j(() => {
172
172
  }, ["stop"]))
173
173
  }, [
174
- e.dropdown ? (n(), u(a(Q), P({
174
+ e.dropdown ? (n(), u(a(Z), P({
175
175
  key: 0,
176
176
  ref_key: "inputDropdownElement",
177
177
  ref: O
178
- }, J.value, {
178
+ }, K.value, {
179
179
  disabled: e.disabled,
180
180
  readonly: Y.value,
181
- onInput: j
181
+ onInput: W
182
182
  }), null, 16, ["disabled", "readonly"])) : d("", !0)
183
183
  ], 8, Ke)) : d("", !0),
184
- le.value ? (n(), u(a(h), {
184
+ re.value ? (n(), u(a(h), {
185
185
  key: 3,
186
186
  id: a(k),
187
187
  class: "b-input-field__static-value b-input-field__static-value--start",
@@ -198,7 +198,7 @@ const oe = {
198
198
  ref_key: "inputFieldElement",
199
199
  ref: M,
200
200
  class: "b-input-field__input",
201
- "aria-label": a(W),
201
+ "aria-label": a(q),
202
202
  "aria-describedby": me.value,
203
203
  "aria-owns": fe.value,
204
204
  "aria-invalid": g.value,
@@ -208,15 +208,15 @@ const oe = {
208
208
  value: e.value,
209
209
  disabled: e.disabled,
210
210
  readonly: a(m),
211
- onInput: _e,
212
- onChange: r[1] || (r[1] = (_) => l("change")),
213
- onFocus: ie,
214
- onBlur: de,
211
+ onInput: De,
212
+ onChange: r[1] || (r[1] = (D) => s("change")),
213
+ onFocus: te,
214
+ onBlur: ae,
215
215
  onKeydown: [
216
- r[2] || (r[2] = (_) => l("keydown", _)),
217
- r[4] || (r[4] = ge((_) => l("escape-pressed"), ["esc"]))
216
+ r[2] || (r[2] = (D) => s("keydown", D)),
217
+ r[4] || (r[4] = ge((D) => s("escape-pressed"), ["esc"]))
218
218
  ],
219
- onKeyup: r[3] || (r[3] = (_) => l("keyup", _))
219
+ onKeyup: r[3] || (r[3] = (D) => s("keyup", D))
220
220
  }), null, 16, Je),
221
221
  a(H) && S.value && e.value ? (n(), u(a(h), {
222
222
  key: 0,
@@ -224,12 +224,12 @@ const oe = {
224
224
  class: "b-input-field__hint"
225
225
  }, {
226
226
  default: c(() => [
227
- Z(G(a(H)), 1)
227
+ z(X(a(H)), 1)
228
228
  ]),
229
229
  _: 1
230
230
  })) : d("", !0)
231
231
  ]),
232
- a(s)("iconAfter") ? (n(), b("span", {
232
+ a(l)("iconAfter") ? (n(), b("span", {
233
233
  key: 4,
234
234
  "aria-hidden": e.ariaHidden ? "true" : void 0,
235
235
  class: "b-input-field__icon-after",
@@ -237,7 +237,7 @@ const oe = {
237
237
  }, [
238
238
  p(e.$slots, "iconAfter", {}, void 0, !0)
239
239
  ], 8, je)) : d("", !0),
240
- se.value ? (n(), u(a(h), {
240
+ ne.value ? (n(), u(a(h), {
241
241
  key: 5,
242
242
  id: a(k),
243
243
  class: "b-input-field__static-value b-input-field__static-value--end",
@@ -249,23 +249,23 @@ const oe = {
249
249
  ]),
250
250
  _: 3
251
251
  }, 8, ["id"])) : d("", !0),
252
- pe.value ? (n(), b("div", {
252
+ se.value ? (n(), b("div", {
253
253
  key: 6,
254
254
  id: a(y),
255
255
  "data-testid": "input-field-dropdown-container-end",
256
256
  class: "b-input-field__dropdown b-input-field__dropdown--end",
257
- onClick: r[5] || (r[5] = X(() => {
257
+ onClick: r[5] || (r[5] = j(() => {
258
258
  }, ["stop"]))
259
259
  }, [
260
- e.dropdown ? (n(), u(a(Q), P({
260
+ e.dropdown ? (n(), u(a(Z), P({
261
261
  key: 0,
262
262
  id: a(y),
263
263
  ref_key: "inputDropdownElement",
264
264
  ref: O
265
- }, J.value, {
265
+ }, K.value, {
266
266
  disabled: e.disabled,
267
267
  readonly: Y.value,
268
- onInput: j
268
+ onInput: W
269
269
  }), null, 16, ["id", "disabled", "readonly"])) : d("", !0)
270
270
  ], 8, ze)) : d("", !0)
271
271
  ], 8, He),
@@ -275,7 +275,7 @@ const oe = {
275
275
  "error-message": e.errorMessage,
276
276
  class: "b-input-field__error-message"
277
277
  }, null, 8, ["id", "error-message"])) : d("", !0),
278
- K.value ? (n(), b("span", {
278
+ a(l)("description") || e.description ? (n(), b("span", {
279
279
  key: 2,
280
280
  id: a(V),
281
281
  class: "b-input-field__description",
@@ -287,7 +287,7 @@ const oe = {
287
287
  }, {
288
288
  default: c(() => [
289
289
  p(e.$slots, "description", { id: "description" }, () => [
290
- Z(G(e.description), 1)
290
+ z(X(e.description), 1)
291
291
  ], !0)
292
292
  ]),
293
293
  _: 3
@@ -297,7 +297,7 @@ const oe = {
297
297
  _: 3
298
298
  }, 8, ["class"]));
299
299
  }
300
- }), po = /* @__PURE__ */ Ve(Ge, [["__scopeId", "data-v-22a1a159"]]);
300
+ }), po = /* @__PURE__ */ Ve(Ge, [["__scopeId", "data-v-92010e61"]]);
301
301
  export {
302
302
  po as B,
303
303
  v as a,
@@ -306,4 +306,4 @@ export {
306
306
  C as d,
307
307
  Fe as e
308
308
  };
309
- //# sourceMappingURL=input-field.A-dEZZfC.js.map
309
+ //# sourceMappingURL=input-field.C29FCI4j.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-field.C29FCI4j.js","sources":["../../../vue2/src/components/input-field/input-field.types.ts","../../../vue2/src/components/input-field/input-field.vue"],"sourcesContent":["import { type BentoDropdownProps } from '../dropdown/dropdown.types';\nimport { type FormField } from '../../types/form-field';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldVariant {\n DEFAULT = 'default',\n PAYMENT_METHOD = 'payment-method',\n STATIC_VALUE = 'static-value',\n DROPDOWN = 'dropdown',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldElementPosition {\n START = 'start',\n END = 'end',\n}\n\nexport enum BentoInputFieldStateClass {\n CONDENSED = 'condensed',\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldType {\n SEARCH = 'search',\n TEXT = 'text',\n NUMBER = 'number',\n}\n\nexport type BentoInputFieldValue = string | number;\n\ntype DropdownProps = BentoDropdownProps;\nexport type BentoInputDropdownProps = {\n /**\n * Text that labels the dropdown element\n */\n 'aria-label'?: string;\n /**\n * Enables dynamic filtering\n */\n dynamicFiltering?: DropdownProps['dynamicFiltering'];\n /**\n * List of available items\n */\n items: DropdownProps['items'];\n /**\n * Sets the dropdown in read-only mode\n */\n readonly?: DropdownProps['readonly'];\n /**\n * Selected value of the dropdown\n */\n value?: DropdownProps['value'];\n};\n\n/**\n * @deprecated The use of these enums is no longer supported.\n * Use `v-on:` or `@` to listen to the events being emitted.\n * This enum will be removed in 2.0.\n */\nexport enum BentoInputFieldEvent {\n INPUT = 'input',\n ESCAPE_PRESSED = 'escape-pressed',\n UPDATE_DROPDOWN = 'update:dropdown',\n DROPDOWN_INPUT = 'dropdown-input',\n FOCUS = 'focus',\n CHANGE = 'change',\n BLUR = 'blur',\n KEYDOWN = 'keydown',\n}\n\nexport interface BentoInputFieldProps extends FormField {\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n ariaHidden?: boolean;\n\n /**\n * Text that labels an the input element\n *\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n ariaLabel?: string;\n\n /**\n * Reduces height of the input\n */\n condensed?: boolean;\n\n /**\n * Dropdown props for the small selectable dropdown menu.\n * Properties supported:\n *\n * - `aria-label`: Text that labels the dropdown element\n * - `dynamicFiltering`: Enables dynamic filtering\n * - `items`: List of available items\n * - `readonly`: Sets the dropdown in read-only mode\n * - `value`: Selected value of the dropdown\n */\n dropdown?: BentoInputDropdownProps;\n\n /**\n * Position of the dropdown before or after input value\n */\n dropdownPosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n\n /**\n * Adds error validation class for outlining input-field.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n error?: boolean;\n\n /**\n * Renders a font numeric style with slashed zeros instead of normal ones.\n */\n slashedZero?: boolean;\n\n /**\n * Static text that displayed before or after input value\n * Applicable to the Static Value variant\n */\n staticValue?: string;\n\n /**\n * Position of Static Value before or after input value\n */\n staticValuePosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n\n /**\n * A string specifying the type of control to render.\n * All `input` types are available but only `search`, `text` and `number` are fully supported.\n *\n * If `type` is `search`, use `bento-search-bar` instead.\n */\n type?: BentoInputFieldType | `${BentoInputFieldType}` | HTMLInputElement['type'];\n\n /**\n * Text displayed as the value of the input-field\n */\n value?: BentoInputFieldValue;\n\n /**\n * Describes the different variants for the input element\n */\n variant?: BentoInputFieldVariant | `${BentoInputFieldVariant}`;\n}\n","<template>\n <bento-typography\n class=\"b-input-field\"\n data-testid=\"input-text-container\"\n :class=\"inputFieldConditionalClasses\"\n el=\"div\"\n variant=\"body\"\n >\n <field-label\n v-if=\"hasSlot('default') || label\"\n :for=\"inputFieldId\"\n data-testid=\"input-field-label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n :label=\"label\"\n @click=\"focusInput\"\n >\n <slot></slot>\n </field-label>\n\n <div class=\"b-input-field__input-box\" data-testid=\"input-box\" :aria-disabled=\"disabled\" @click=\"focusInput\">\n <!-- Optional Icon for Default text variant -->\n <span\n v-if=\"isDefaultVariant && (hasSlot('defaultIconBefore') || hasSlot('iconBefore'))\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-before\"\n >\n <slot v-if=\"hasSlot('iconBefore')\" name=\"iconBefore\" />\n <slot v-if=\"hasSlot('defaultIconBefore') && !hasSlot('iconBefore')\" name=\"defaultIconBefore\" />\n </span>\n\n <!-- Mandatory Icon for Payment Method variant -->\n <span\n v-if=\"isPaymentMethodVariant && hasSlot('paymentMethod')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__payment-method\"\n >\n <slot name=\"paymentMethod\" />\n </span>\n\n <!-- Dropdown at start -->\n <div\n v-if=\"shouldDisplayDropdownAtStart\"\n :id=\"dropdownId\"\n class=\"b-input-field__dropdown b-input-field__dropdown--start\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n ref=\"inputDropdownElement\"\n v-bind=\"inputFieldDropdownProps\"\n :disabled=\"disabled\"\n :readonly=\"isDropdownReadOnly\"\n @input=\"onDropdownInput\"\n />\n </div>\n\n <!-- Static Value at start -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtStart\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--start\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n <div class=\"b-input-field__input-container\">\n <input\n :id=\"inputFieldId\"\n v-bind=\"attrs\"\n ref=\"inputFieldElement\"\n class=\"b-input-field__input\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"computedAriaDescribedBy\"\n :aria-owns=\"computedAriaOwns\"\n :aria-invalid=\"shouldShowError\"\n :placeholder=\"placeholder\"\n :required=\"required\"\n :type=\"type\"\n :value=\"value\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onInput\"\n @change=\"emit('change')\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @keydown=\"emit('keydown', $event)\"\n @keyup=\"emit('keyup', $event)\"\n @keydown.esc=\"emit('escape-pressed')\"\n />\n\n <!-- Hint at the end -->\n <bento-typography v-if=\"hint && isFocused && value\" el=\"span\" class=\"b-input-field__hint\">\n {{ hint }}\n </bento-typography>\n </div>\n\n <span\n v-if=\"hasSlot('iconAfter')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-after\"\n data-testid=\"input-text__icon-after\"\n >\n <slot name=\"iconAfter\" />\n </span>\n\n <!-- Static Value at the end -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtEnd\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--end\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n\n <!-- Dropdown at end -->\n <div\n v-if=\"shouldDisplayDropdownAtEnd\"\n :id=\"dropdownId\"\n data-testid=\"input-field-dropdown-container-end\"\n class=\"b-input-field__dropdown b-input-field__dropdown--end\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n :id=\"dropdownId\"\n ref=\"inputDropdownElement\"\n v-bind=\"inputFieldDropdownProps\"\n :disabled=\"disabled\"\n :readonly=\"isDropdownReadOnly\"\n @input=\"onDropdownInput\"\n />\n </div>\n </div>\n\n <error-message\n v-if=\"shouldShowError && !!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-input-field__error-message\"\n />\n\n <span\n v-if=\"hasSlot('description') || description\"\n :id=\"descriptionId\"\n class=\"b-input-field__description\"\n @click=\"focusInput\"\n >\n <bento-typography el=\"span\" variant=\"body\">\n <slot id=\"description\" name=\"description\">\n {{ description }}\n </slot>\n </bento-typography>\n </span>\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide, type Ref, ref, toRef, toRefs, useAttrs, useSlots } from 'vue';\n\n // Components\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { generateUid } from '@/core/utils/ts';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import {\n INPUT_FIELD_COMPONENT_INJECTION_KEY,\n INPUT_FIELD_HINT_INJECTION_KEY,\n INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY,\n } from '@/components/input-field/input-field.keys';\n\n // Composables\n import { useFormLayoutFieldLoading, useHasSlot } from '@/composables';\n\n // Types\n import {\n type BentoInputDropdownProps,\n BentoInputFieldElementPosition,\n type BentoInputFieldProps,\n BentoInputFieldStateClass,\n BentoInputFieldType,\n BentoInputFieldVariant,\n } from './input-field.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n\n const props = withDefaults(defineProps<BentoInputFieldProps>(), {\n ariaHidden: true,\n ariaLabel: undefined,\n condensed: false,\n description: '',\n disabled: false,\n dropdown: undefined,\n dropdownPosition: BentoInputFieldElementPosition.START,\n error: false,\n errorMessage: null,\n label: '',\n optional: false,\n placeholder: '',\n required: false,\n readonly: false,\n slashedZero: false,\n staticValue: '',\n staticValuePosition: BentoInputFieldElementPosition.START,\n tooltipText: null,\n type: BentoInputFieldType.TEXT,\n value: undefined,\n variant: BentoInputFieldVariant.DEFAULT,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the Input Field's internal dropdown changes it's value. Contains every dropdown prop passed with the updated selected value as 'value'\n */\n (e: 'update:dropdown', updatedDropdownProps: BentoInputDropdownProps): void;\n\n /**\n * Emitted when the element has lost focus\n */\n (e: 'blur'): void;\n\n /**\n * Emitted when the user modifies the element's value. Unlike the 'input' event, the change event is not necessarily fired for each alteration to an element's value\n */\n (e: 'change'): void;\n\n /**\n * Emitted when the Input Field's internal dropdown changes it's value\n */\n (e: 'dropdown-input', selectedValue: BentoListboxSelectedValue): void;\n\n /**\n * Emitted when the \"ESC\" key is pressed\n */\n (e: 'escape-pressed'): void;\n\n /**\n * Emitted when the element has received focus\n */\n (e: 'focus'): void;\n\n /**\n * Emitted when a key is pressed down\n */\n (e: 'keydown', event: KeyboardEvent): void;\n\n /**\n * Emitted when a key is pressed and lifted up\n */\n (e: 'keyup', event: KeyboardEvent): void;\n\n /**\n * Emitted when the component's model changes\n */\n (e: 'input', inputValue: string): void;\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n const inputFieldElement = ref(null);\n const inputDropdownElement = ref(null);\n const inputFieldId = generateUid('input');\n const dropdownId = generateUid('input-dropdown');\n const staticValueId = generateUid('input-static-value');\n const descriptionId = generateUid('input-description');\n const errorId = generateUid('input-error');\n const isFocused = ref(false);\n\n // Provide INPUT_FIELD_COMPONENT_INJECTION_KEY as true, to set the input only dropdown size variant in the BentoDropdown comp\n provide(INPUT_FIELD_COMPONENT_INJECTION_KEY, true);\n // Renders the input with a hint if a string is provided\n const hint = inject<Ref<string | undefined>>(INPUT_FIELD_HINT_INJECTION_KEY, ref(undefined));\n\n const onFocus = () => {\n isFocused.value = true;\n emit('focus');\n };\n\n const onBlur = () => {\n isFocused.value = false;\n emit('blur');\n };\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const isDropdownReadOnly = computed<BentoInputDropdownProps['readonly']>(\n () => isReadOnly.value || props.dropdown?.readonly\n );\n\n const shouldShowStaticValue = computed(\n () => props.variant === BentoInputFieldVariant.STATIC_VALUE && !!slots.staticValue\n );\n\n const isDefaultVariant = computed(() => props.variant === BentoInputFieldVariant.DEFAULT);\n\n const isPaymentMethodVariant = computed(() => props.variant === BentoInputFieldVariant.PAYMENT_METHOD);\n\n const shouldDisplayStaticValueAtStart = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayStaticValueAtEnd = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowDropdown = computed(() => props.variant === BentoInputFieldVariant.DROPDOWN && !!props.dropdown);\n const shouldDisplayDropdownAtStart = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayDropdownAtEnd = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.error)\n );\n\n const computedLabel = computed(() => (getSlotText(slots)('default') as string) || props.label);\n const computedDescription = computed(() => (getSlotText(slots)('description') as string) || props.description);\n\n const computedAriaOwns = computed(() => {\n if (shouldShowDropdown.value === true && shouldShowStaticValue.value === true) {\n return `${staticValueId} ${dropdownId}`;\n }\n if (shouldShowDropdown.value === true) {\n return `${dropdownId}`;\n }\n if (shouldShowStaticValue.value === true) {\n return `${staticValueId}`;\n }\n return null;\n });\n\n // vue-i18n issue with t() used in script - direct usage in template works\n // requires either createI18n({ legacy: false }) or to be wrapped in computed()\n const computedAriaLabelFallbackMessage = computed(() => t('ariaLabelFallback'));\n const computedAriaLabelDropdowFallback = computed(() =>\n t('ariaLabelDropdownFallback', { inputLabel: computedAriaLabel.value })\n );\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: computedLabel.value || computedAriaLabelFallbackMessage,\n });\n\n const computedAriaDescribedBy = computed(\n () =>\n `${computedDescription.value ? descriptionId : ''} ${\n shouldShowError.value && !!props.errorMessage ? errorId : ''\n }`\n );\n\n const inputFieldConditionalClasses = computed(() => ({\n [`b-input-field--${BentoInputFieldStateClass.CONDENSED}`]: props.condensed,\n [`b-input-field--${BentoInputFieldStateClass.DISABLED}`]: props.disabled,\n [`b-input-field--${BentoInputFieldStateClass.READONLY}`]: isReadOnly.value,\n [`b-input-field--${BentoInputFieldStateClass.ERROR}`]: shouldShowError.value,\n [`b-input-field--slashed-zero`]: props.slashedZero,\n }));\n\n const inputFieldDropdownProps = computed(() => ({\n 'aria-label': computedAriaLabelDropdowFallback.value,\n ...props.dropdown,\n }));\n\n const onInput = (event: Event) => {\n const inputValue = (event.target as HTMLInputElement).value;\n if (!props.disabled && !isReadOnly.value) {\n emit('input', inputValue);\n }\n };\n\n const onDropdownInput = (selectedValue: BentoListboxSelectedValue) => {\n emit('dropdown-input', selectedValue);\n emit('update:dropdown', { ...props?.dropdown, value: selectedValue });\n };\n\n const focusInput = () => {\n inputFieldElement.value.focus();\n };\n\n const focus = () => {\n if (props.variant === 'dropdown') {\n inputDropdownElement.value.focus();\n } else {\n focusInput();\n }\n };\n\n // Expose method so that other components can focus on it in Vue3\n defineExpose({\n focusInput,\n focus,\n });\n\n const inputFieldParentComponent = inject(INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY, '');\n\n if (!Object.values(BentoInputFieldType).includes(props.type as BentoInputFieldType) && !inputFieldParentComponent) {\n if (props.type === 'tel') {\n printDevelopmentWarning(\n `\"bento-input-field\" dropdown does not support the type '${props.type}', use \"bento-input-field-phone-number\" instead.`\n );\n } else if (props.type === 'password') {\n printDevelopmentWarning(\n `\"bento-input-field\" dropdown does not support the type '${props.type}', use \"bento-input-field-password\" instead.`\n );\n } else {\n printDevelopmentWarning(`\"bento-input-field\" dropdown does not support the type '${props.type}'`);\n }\n }\n\n /**\n * Deprecations\n */\n if (props.error) {\n deprecate(\n 'BentoInputField \"error\" property',\n `Use the BentoInputField \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n if (hasSlot('defaultIconBefore')) {\n deprecate(\n 'BentoInputField \"defaultIconBefore\" slot',\n `Use the BentoInputField \"iconBefore\" slot instead to add an icon at the left side of the input field\n <bento-input-field>\n \\t<template #iconBefore>\n \\t\\t<my-icon-goes-here />\n \\t</template>\n </bento-input-field>`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Input field component is used to create interactive controls for web-based\n * forms in order to accept data from the user.\n *\n * @example\n * import { BentoInputField } from '@adyen/bento-vue2'\n *\n * const inputValue = ref('');\n *\n * export default {\n * components: { BentoInputField },\n * tempate: `\n * <bento-input-field\n * :value=\"inputValue\"\n * :input=\"newValue => inputValue.value = newValue\"\n * >\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-field.scss\" />\n"],"names":["BentoInputFieldVariant","BentoInputFieldVariant2","BentoInputFieldElementPosition","BentoInputFieldElementPosition2","BentoInputFieldStateClass","BentoInputFieldStateClass2","BentoInputFieldType","BentoInputFieldType2","BentoInputFieldEvent","BentoInputFieldEvent2","__default__","messages","attrs","useAttrs","slots","useSlots","props","__props","emit","__emit","t","useI18n","hasSlot","useHasSlot","inputFieldElement","ref","inputDropdownElement","inputFieldId","generateUid","dropdownId","staticValueId","descriptionId","errorId","isFocused","provide","INPUT_FIELD_COMPONENT_INJECTION_KEY","hint","inject","INPUT_FIELD_HINT_INJECTION_KEY","onFocus","onBlur","isReadOnly","useFormLayoutFieldLoading","toRef","isDropdownReadOnly","computed","_a","shouldShowStaticValue","isDefaultVariant","isPaymentMethodVariant","shouldDisplayStaticValueAtStart","shouldDisplayStaticValueAtEnd","shouldShowDropdown","shouldDisplayDropdownAtStart","shouldDisplayDropdownAtEnd","shouldShowError","computedLabel","getSlotText","computedDescription","computedAriaOwns","computedAriaLabelFallbackMessage","computedAriaLabelDropdowFallback","computedAriaLabel","ariaLabelAttribute","ariaLabel","toRefs","useAriaLabel","computedAriaDescribedBy","inputFieldConditionalClasses","inputFieldDropdownProps","onInput","event","inputValue","onDropdownInput","selectedValue","focusInput","__expose","inputFieldParentComponent","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","printDevelopmentWarning","deprecate"],"mappings":";;;;;;;;;;;;AAMY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,iBAAA,kBACAA,EAAA,eAAA,gBACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,UACAA,EAAA,OAAA,QACAA,EAAA,SAAA,UAHQA,IAAAD,KAAA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E,CAAA,EAAA,SAAAU,EAAA,IAAA,KAAA,CAAA6D,OACI7D,EAAA,SAAA,QACI+D;AAAA,MAAA,2DAAA/D,EAAA,IAAA;AAAA,IACyE,IACzEA,EAAA,SAAA,aAEA+D;AAAA,MAAA,2DAAA/D,EAAA,IAAA;AAAA,IACyE,IAGzE+D,EAAA,2DAAA/D,EAAA,IAAA,GAAA,IAORA,EAAA,SACIgE;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIR1D,EAAA,mBAAA,KACI0D;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MACA;AAAA,IAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as B, computed as P, createElementBlock as v, openBlock as r, createVNode as d, unref as e, withCtx as m, createBlock as C, resolveDynamicComponent as Z, mergeProps as L, createSlots as H, createTextVNode as O, toDisplayString as $, createCommentVNode as N, createElementVNode as c, useSlots as J, useAttrs as K, ref as q, toRefs as G, normalizeClass as Q, renderSlot as X } from "vue";
2
2
  import { B as w } from "./typography.yBEME_Gu.js";
3
- import { B as D } from "./dropdown.DG_EnV8g.js";
3
+ import { B as D } from "./dropdown.KStrJVoP.js";
4
4
  import { g as E } from "./generate-uid.NJ8tVoha.js";
5
5
  import { u as k, g as x, a as M } from "./index.pdBj0KQU.js";
6
6
  import { _ } from "./_plugin-vue_export-helper.CHgC5LLL.js";
@@ -458,4 +458,4 @@ const Le = /* @__PURE__ */ _(Te, [["render", $e]]), U = {
458
458
  export {
459
459
  Ke as B
460
460
  };
461
- //# sourceMappingURL=pagination.B4qBK4pM.js.map
461
+ //# sourceMappingURL=pagination.BaBWNlIF.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.B4qBK4pM.js","sources":["../../../vue2/src/components/pagination/components/pagination-results-per-page/pagination-results-per-page.vue","../../../vue2/src/components/pagination/components/pagination-context/pagination-context.vue","../../../ui-assets/icons-16/dist/vue/skip-left.vue","../../../ui-assets/icons-16/dist/vue/skip-right.vue","../../../ui-assets/icons-16/dist/vue/chevron-left-small.vue","../../../ui-assets/icons-16/dist/vue/chevron-right-small.vue","../../../vue2/src/components/pagination/components/pagination-controls/pagination-controls.vue","../../../vue2/src/components/pagination/pagination.vue"],"sourcesContent":["<template>\n <div class=\"b-pagination-results-per-page\">\n <bento-typography el=\"div\">\n <component\n :is=\"i18nComponent\"\n v-bind=\"getI18nProps(translationPathKey)\"\n class=\"b-pagination-results-per-page__dropdown-container\"\n tag=\"div\"\n :plural=\"totalCount\"\n >\n <template #itemCount>\n <bento-dropdown\n :id=\"dropdownId\"\n :aria-label=\"t(translationPathKey, { itemCount: itemsPerPage, totalCount })\"\n class=\"b-pagination-results-per-page__dropdown\"\n condensed\n :items=\"predefinedDropdownOptions\"\n :value=\"itemsPerPage\"\n @input=\"onSelectChange\"\n />\n </template>\n <template v-if=\"!!totalCount\" #totalCount>{{ totalCount }}</template>\n </component>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoDropdown } from '@/components/dropdown';\n import { generateUid } from '@/core/utils/ts';\n import { getI18nComponent, getI18nProps, useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = withDefaults(\n defineProps<{\n /**\n * The amount of items the pager is paging through.\n */\n itemsPerPage?: number;\n /**\n * The total number of items the pager is paging through.\n */\n totalCount?: number;\n }>(),\n {\n itemsPerPage: 50,\n totalCount: null,\n }\n );\n\n const emit = defineEmits<{\n (e: 'select', value: number);\n }>();\n\n const dropdownId = generateUid('b-pagination-context-number-elements');\n const predefinedDropdownOptions = computed(() => [\n { label: n(10), value: 10 },\n { label: n(20), value: 20 },\n { label: n(50), value: 50 },\n { label: n(75), value: 75 },\n { label: n(100), value: 100 },\n ]);\n const i18nComponent = getI18nComponent();\n\n const onSelectChange = (selectedNumberOfResults: number) => {\n emit('select', selectedNumberOfResults);\n };\n\n const translationPathKey = computed(() => (props.totalCount ? 'showingItemsWithTotal' : 'showingItems'));\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination-results-per-page.scss\" />\n","<template>\n <div class=\"b-pagination-context\">\n <bento-typography v-if=\"totalPages > 1\" el=\"div\">\n <component :is=\"i18nComponent\" v-bind=\"getI18nProps('pageNumber')\" tag=\"div\">\n <template #page>\n <bento-dropdown\n :id=\"dropdownId\"\n :aria-label=\"t('pageNumber', { page: n(page) })\"\n class=\"b-pagination-context__dropdown\"\n condensed\n :items=\"listOfAvailablePages\"\n :value=\"page\"\n :virtual-scroll=\"virtualScroll\"\n @input=\"onPageSelectChange\"\n />\n </template>\n </component>\n </bento-typography>\n <bento-typography v-else-if=\"totalPages === 1\" el=\"span\">\n {{ t('pageOneOfOne') }}\n </bento-typography>\n <bento-typography v-else el=\"span\">\n {{ t('pageNumber', { page: n(page) }) }}\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoDropdown } from '@/components/dropdown';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import { generateUid } from '@/core/utils/ts';\n import messages from './messages.json';\n import { getI18nComponent, getI18nProps, useI18n } from '@/utils/ts/i18n';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = withDefaults(\n defineProps<{\n /**\n * The current page number of the pager.\n */\n page?: number;\n\n /**\n * The total number of items the pager is paging through.\n */\n totalPages?: number;\n\n /**\n * Enables virtual scrolling on all dropdowns if set to true.\n */\n virtualScroll?: boolean;\n }>(),\n {\n page: 1,\n totalPages: null,\n virtualScroll: false,\n }\n );\n const emit = defineEmits<{\n (e: 'page-selected', value: string | number);\n }>();\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n const dropdownId = generateUid('bento-pagination-context-current-page');\n const onPageSelectChange = (selectedPage: string | number) => emit('page-selected', selectedPage);\n const i18nComponent = getI18nComponent();\n\n // Generate a list of pages from 1 to \"totalPages\"\n const transformIntoOption = (value: number): BentoListboxOptionItem => ({\n label: n(value),\n value,\n });\n const transformToPageNumber = (_, index) => index + 1;\n const listOfAvailablePages = computed(() =>\n Array.from(new Array(props.totalPages), transformToPageNumber).map(transformIntoOption)\n );\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination-context.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M9.06055 8.00011L12.0605 5.00011L10.9999 3.93945L6.93923 8.00011L10.9999 12.0608L12.0605 11.0001L9.06055 8.00011Z\"/><path fill=\"#001222\" d=\"M4.25 4.25L4.25 11.75H5.75L5.75 4.25L4.25 4.25Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M6.93945 7.99962L3.93945 10.9996L5.00011 12.0603L9.06077 7.99963L5.00011 3.93896L3.93945 4.99963L6.93945 7.99962Z\"/><path fill=\"#001222\" d=\"M11.75 11.7497V4.24974L10.25 4.24974V11.7497H11.75Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M10.5608 5.00011L7.56077 8.00011L10.5608 11.0001L9.50011 12.0608L5.43945 8.00011L9.50011 3.93945L10.5608 5.00011Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M5.43924 10.9999L8.43924 7.99989L5.43924 4.99989L6.4999 3.93923L10.5606 7.99989L6.4999 12.0605L5.43924 10.9999Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <ul class=\"b-pagination-controls\">\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the first page -->\n <bento-button :disabled=\"isCurrentPageFirst\" variant=\"tertiary\" condensed @click=\"navigate(1)\">\n <template #iconLeft>\n <skip-left :svg-title=\"t('navigateToTheFirstPage')\" />\n </template>\n </bento-button>\n </li>\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the previous page -->\n <bento-button :disabled=\"isCurrentPageFirst\" variant=\"tertiary\" condensed @click=\"navigate(page - 1)\">\n <template #iconLeft>\n <chevron-left :svg-title=\"t('navigateToThePreviousPage')\" />\n </template>\n </bento-button>\n </li>\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the next page -->\n <bento-button :disabled=\"isNextButtonDisabled\" variant=\"tertiary\" condensed @click=\"navigate(page + 1)\">\n <template #iconLeft>\n <chevron-right :svg-title=\"t('navigateToTheNextPage')\" />\n </template>\n </bento-button>\n </li>\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the last page -->\n <bento-button\n :disabled=\"isLastPageButtonDisabled\"\n variant=\"tertiary\"\n condensed\n @click=\"navigate(totalPages)\"\n >\n <template #iconLeft>\n <skip-right :svg-title=\"t('navigateToTheLastPage')\" />\n </template>\n </bento-button>\n </li>\n </ul>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoButton } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import SkipLeft from '@adyen/ui-assets-icons-16/vue/skip-left';\n import SkipRight from '@adyen/ui-assets-icons-16/vue/skip-right';\n import ChevronLeft from '@adyen/ui-assets-icons-16/vue/chevron-left-small';\n import ChevronRight from '@adyen/ui-assets-icons-16/vue/chevron-right-small';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = withDefaults(\n defineProps<{\n /**\n * Use to determine if the pager has a \"next page\".\n */\n hasNext?: boolean;\n\n /**\n * The current page number of the pager.\n */\n page: number;\n\n /**\n * The current page number of the pager.\n */\n totalPages?: number;\n }>(),\n {\n hasNext: null,\n totalPages: null,\n }\n );\n\n const emit = defineEmits<{\n (e: 'navigate', value: number);\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const isCurrentPageFirst = computed(() => props.page === 1);\n const isCurrentPageLast = computed(() => props.page === props.totalPages);\n const isNextButtonDisabled = computed(() => {\n const hasNoNextPage = !props.hasNext;\n return hasNoNextPage || isCurrentPageLast.value;\n });\n const isLastPageButtonDisabled = computed(() => {\n const hasNoNextPage = !props.hasNext;\n const hasNoTotalPagesNumber = !props.totalPages;\n\n return hasNoNextPage || isCurrentPageLast.value || hasNoTotalPagesNumber;\n });\n\n const navigate = (pageArg: number) => {\n emit('navigate', pageArg);\n };\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination-controls.scss\" />\n","<template>\n <div class=\"b-pagination\">\n <nav :aria-label=\"computedAriaLabel\" class=\"b-pagination__navigation\" :class=\"navigationConditionalClasses()\">\n <bento-pagination-results-per-page\n v-if=\"!hidePageSize\"\n class=\"b-pagination__results-per-page\"\n :items-per-page=\"size\"\n :total-count=\"totalCount\"\n @select=\"onItemsPerPageChange\"\n />\n <bento-typography v-else-if=\"hasSlot('default')\"><slot /></bento-typography>\n\n <div class=\"b-pagination__page-navigator\">\n <bento-pagination-context\n class=\"b-pagination__context\"\n :total-pages=\"totalPages\"\n :page=\"page\"\n :total-count=\"totalCount\"\n :virtual-scroll=\"virtualScroll\"\n @page-selected=\"onPageSelected\"\n />\n\n <div class=\"b-pagination__divider\"></div>\n\n <bento-pagination-controls\n class=\"b-pagination__controls\"\n :has-next=\"hasNext\"\n :page=\"page\"\n :total-pages=\"totalPages\"\n @navigate=\"navigate\"\n />\n </div>\n </nav>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, toRefs, useAttrs, useSlots } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import BentoPaginationResultsPerPage from './components/pagination-results-per-page/pagination-results-per-page.vue';\n import BentoPaginationContext from './components/pagination-context/pagination-context.vue';\n import BentoPaginationControls from './components/pagination-controls/pagination-controls.vue';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useHasSlot } from '@/composables';\n import type { BentoPaginationProps } from './pagination.types';\n\n const props = withDefaults(defineProps<BentoPaginationProps>(), {\n ariaLabel: null,\n hasNext: null,\n hidePageSize: false,\n page: 1,\n size: 20,\n totalCount: null,\n virtualScroll: false,\n });\n\n const emit = defineEmits<{\n /**\n * Triggered when the navigation controls are clicked or the items per page is changed (i.e. when the arrow buttons to the\n * rightmost of the screen or either dropdown is updated). It indicates to which page it should go next and also the page size.\n */\n (e: 'navigate', page: number, items?: number): void;\n\n /**\n * Triggered when the number of items per page is changed from the left hand dropdown.\n * It indicates the new number of items that will be displayed.\n */\n (e: 'items-page', size: number): void;\n\n /**\n * Triggered when the navigation controls are clicked, whether the arrow buttons to the\n * right most of the screen or the dropdown on the right hand is updated.\n * It indicates to which page it should go next\n * (easily achieved using the [sync modifier](https://v2.vuejs.org/v2/guide/components-custom-events.html#sync-Modifier))\n * e.g. `:page.sync=\"currentPage\"`\n */\n (e: 'update:page', page: number): void;\n\n /**\n * Triggered when the number of items per page is changed from the left hand dropdown.\n * It indicates the new number of items that will be displayed.\n * (easily achieved using the [sync modifier](https://v2.vuejs.org/v2/guide/components-custom-events.html#sync-Modifier))\n * e.g. `:size.sync=\"itemsPerPage\"`\n */\n (e: 'update:size', size: number): void;\n }>();\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const attrs = useAttrs();\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n });\n\n const totalPages = computed(() =>\n !props.totalCount || !props.size ? null : Math.ceil(props.totalCount / props.size)\n );\n\n const navigate = (pageArg: number, itemsPerPage?: number) => {\n if (props.hidePageSize) {\n emit('navigate', pageArg);\n } else {\n emit('navigate', pageArg, itemsPerPage ?? props?.size);\n }\n emit('update:page', pageArg);\n };\n\n const onPageSelected = (pageNumber: number) => {\n navigate(pageNumber);\n };\n\n const onItemsPerPageChange = (elements: number) => {\n emit('items-page', elements);\n emit('update:size', elements);\n\n // Always go to first page when the\n // number of items page changes\n navigate(1, elements);\n };\n\n const navigationConditionalClasses = () => ({\n 'b-pagination__navigation--only-page-navigator': !hasSlot('default') && props.hidePageSize,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Paginiation component to help users page through data sets.\n *\n * There are two ways of doing navigation in this component:\n * 1. (Basic) You tell the component if there is a next page (hasNext)\n * 2. (Enhanced) You tell the component:\n * - How many total items exist (totalCount)\n * - The max number of items that you show/fetch per page (size)\n * - In this case you should not set the hasNext props\n *\n * If you have the data available and opt to use the Enhanced way you get extra controls:\n * - Page dropdown selector\n * - Last page button\n * - \"Showing 10 of 200 items\" text\n *\n * @usage\n * import { BentoPagination } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoPagination },\n * template: `\n * <bento-pagination :has-next=\"isNextPage\" />\n * `,\n * }\n */\n\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination.scss\" />\n"],"names":["__default__$3","messages$2","n","useI18n","props","__props","emit","__emit","dropdownId","generateUid","predefinedDropdownOptions","computed","i18nComponent","getI18nComponent","onSelectChange","selectedNumberOfResults","translationPathKey","__default__$2","messages$1","t","onPageSelectChange","selectedPage","transformIntoOption","value","transformToPageNumber","_","index","listOfAvailablePages","uuid$3","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","uuid$2","uuid$1","uuid","__default__$1","messages","isCurrentPageFirst","isCurrentPageLast","isNextButtonDisabled","isLastPageButtonDisabled","hasNoNextPage","hasNoTotalPagesNumber","navigate","pageArg","__default__","slots","useSlots","hasSlot","useHasSlot","attrs","useAttrs","ariaLabelAttribute","ref","ariaLabel","toRefs","computedAriaLabel","useAriaLabel","totalPages","itemsPerPage","onPageSelected","pageNumber","onItemsPerPageChange","elements","navigationConditionalClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDA+EIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;AA3CA,UAAA,EAAA,GAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF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,eACIE,EAAA,YAAAwC,CAAA,IAEAxC,EAAA,YAAAwC,GAAAe,MAAAzD,KAAA,gBAAAA,EAAA,KAAA,GAEJE,EAAA,eAAAwC,CAAA;AAAA,IAA2B,GAG/BgB,IAAA,CAAAC,MAAA;AACI,MAAAlB,EAAAkB,CAAA;AAAA,IAAmB,GAGvBC,IAAA,CAAAC,MAAA;AACI,MAAA3D,EAAA,cAAA2D,CAAA,GACA3D,EAAA,eAAA2D,CAAA,GAIApB,EAAA,GAAAoB,CAAA;AAAA,IAAoB,GAGxBC,IAAA,OAAA;AAAA,MAA4C,iDAAA,CAAAhB,EAAA,SAAA,KAAA9C,EAAA;AAAA,IACsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"pagination.BaBWNlIF.js","sources":["../../../vue2/src/components/pagination/components/pagination-results-per-page/pagination-results-per-page.vue","../../../vue2/src/components/pagination/components/pagination-context/pagination-context.vue","../../../ui-assets/icons-16/dist/vue/skip-left.vue","../../../ui-assets/icons-16/dist/vue/skip-right.vue","../../../ui-assets/icons-16/dist/vue/chevron-left-small.vue","../../../ui-assets/icons-16/dist/vue/chevron-right-small.vue","../../../vue2/src/components/pagination/components/pagination-controls/pagination-controls.vue","../../../vue2/src/components/pagination/pagination.vue"],"sourcesContent":["<template>\n <div class=\"b-pagination-results-per-page\">\n <bento-typography el=\"div\">\n <component\n :is=\"i18nComponent\"\n v-bind=\"getI18nProps(translationPathKey)\"\n class=\"b-pagination-results-per-page__dropdown-container\"\n tag=\"div\"\n :plural=\"totalCount\"\n >\n <template #itemCount>\n <bento-dropdown\n :id=\"dropdownId\"\n :aria-label=\"t(translationPathKey, { itemCount: itemsPerPage, totalCount })\"\n class=\"b-pagination-results-per-page__dropdown\"\n condensed\n :items=\"predefinedDropdownOptions\"\n :value=\"itemsPerPage\"\n @input=\"onSelectChange\"\n />\n </template>\n <template v-if=\"!!totalCount\" #totalCount>{{ totalCount }}</template>\n </component>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoDropdown } from '@/components/dropdown';\n import { generateUid } from '@/core/utils/ts';\n import { getI18nComponent, getI18nProps, useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = withDefaults(\n defineProps<{\n /**\n * The amount of items the pager is paging through.\n */\n itemsPerPage?: number;\n /**\n * The total number of items the pager is paging through.\n */\n totalCount?: number;\n }>(),\n {\n itemsPerPage: 50,\n totalCount: null,\n }\n );\n\n const emit = defineEmits<{\n (e: 'select', value: number);\n }>();\n\n const dropdownId = generateUid('b-pagination-context-number-elements');\n const predefinedDropdownOptions = computed(() => [\n { label: n(10), value: 10 },\n { label: n(20), value: 20 },\n { label: n(50), value: 50 },\n { label: n(75), value: 75 },\n { label: n(100), value: 100 },\n ]);\n const i18nComponent = getI18nComponent();\n\n const onSelectChange = (selectedNumberOfResults: number) => {\n emit('select', selectedNumberOfResults);\n };\n\n const translationPathKey = computed(() => (props.totalCount ? 'showingItemsWithTotal' : 'showingItems'));\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination-results-per-page.scss\" />\n","<template>\n <div class=\"b-pagination-context\">\n <bento-typography v-if=\"totalPages > 1\" el=\"div\">\n <component :is=\"i18nComponent\" v-bind=\"getI18nProps('pageNumber')\" tag=\"div\">\n <template #page>\n <bento-dropdown\n :id=\"dropdownId\"\n :aria-label=\"t('pageNumber', { page: n(page) })\"\n class=\"b-pagination-context__dropdown\"\n condensed\n :items=\"listOfAvailablePages\"\n :value=\"page\"\n :virtual-scroll=\"virtualScroll\"\n @input=\"onPageSelectChange\"\n />\n </template>\n </component>\n </bento-typography>\n <bento-typography v-else-if=\"totalPages === 1\" el=\"span\">\n {{ t('pageOneOfOne') }}\n </bento-typography>\n <bento-typography v-else el=\"span\">\n {{ t('pageNumber', { page: n(page) }) }}\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoDropdown } from '@/components/dropdown';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import { generateUid } from '@/core/utils/ts';\n import messages from './messages.json';\n import { getI18nComponent, getI18nProps, useI18n } from '@/utils/ts/i18n';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = withDefaults(\n defineProps<{\n /**\n * The current page number of the pager.\n */\n page?: number;\n\n /**\n * The total number of items the pager is paging through.\n */\n totalPages?: number;\n\n /**\n * Enables virtual scrolling on all dropdowns if set to true.\n */\n virtualScroll?: boolean;\n }>(),\n {\n page: 1,\n totalPages: null,\n virtualScroll: false,\n }\n );\n const emit = defineEmits<{\n (e: 'page-selected', value: string | number);\n }>();\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n const dropdownId = generateUid('bento-pagination-context-current-page');\n const onPageSelectChange = (selectedPage: string | number) => emit('page-selected', selectedPage);\n const i18nComponent = getI18nComponent();\n\n // Generate a list of pages from 1 to \"totalPages\"\n const transformIntoOption = (value: number): BentoListboxOptionItem => ({\n label: n(value),\n value,\n });\n const transformToPageNumber = (_, index) => index + 1;\n const listOfAvailablePages = computed(() =>\n Array.from(new Array(props.totalPages), transformToPageNumber).map(transformIntoOption)\n );\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination-context.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M9.06055 8.00011L12.0605 5.00011L10.9999 3.93945L6.93923 8.00011L10.9999 12.0608L12.0605 11.0001L9.06055 8.00011Z\"/><path fill=\"#001222\" d=\"M4.25 4.25L4.25 11.75H5.75L5.75 4.25L4.25 4.25Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M6.93945 7.99962L3.93945 10.9996L5.00011 12.0603L9.06077 7.99963L5.00011 3.93896L3.93945 4.99963L6.93945 7.99962Z\"/><path fill=\"#001222\" d=\"M11.75 11.7497V4.24974L10.25 4.24974V11.7497H11.75Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M10.5608 5.00011L7.56077 8.00011L10.5608 11.0001L9.50011 12.0608L5.43945 8.00011L9.50011 3.93945L10.5608 5.00011Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M5.43924 10.9999L8.43924 7.99989L5.43924 4.99989L6.4999 3.93923L10.5606 7.99989L6.4999 12.0605L5.43924 10.9999Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <ul class=\"b-pagination-controls\">\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the first page -->\n <bento-button :disabled=\"isCurrentPageFirst\" variant=\"tertiary\" condensed @click=\"navigate(1)\">\n <template #iconLeft>\n <skip-left :svg-title=\"t('navigateToTheFirstPage')\" />\n </template>\n </bento-button>\n </li>\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the previous page -->\n <bento-button :disabled=\"isCurrentPageFirst\" variant=\"tertiary\" condensed @click=\"navigate(page - 1)\">\n <template #iconLeft>\n <chevron-left :svg-title=\"t('navigateToThePreviousPage')\" />\n </template>\n </bento-button>\n </li>\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the next page -->\n <bento-button :disabled=\"isNextButtonDisabled\" variant=\"tertiary\" condensed @click=\"navigate(page + 1)\">\n <template #iconLeft>\n <chevron-right :svg-title=\"t('navigateToTheNextPage')\" />\n </template>\n </bento-button>\n </li>\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the last page -->\n <bento-button\n :disabled=\"isLastPageButtonDisabled\"\n variant=\"tertiary\"\n condensed\n @click=\"navigate(totalPages)\"\n >\n <template #iconLeft>\n <skip-right :svg-title=\"t('navigateToTheLastPage')\" />\n </template>\n </bento-button>\n </li>\n </ul>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoButton } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import SkipLeft from '@adyen/ui-assets-icons-16/vue/skip-left';\n import SkipRight from '@adyen/ui-assets-icons-16/vue/skip-right';\n import ChevronLeft from '@adyen/ui-assets-icons-16/vue/chevron-left-small';\n import ChevronRight from '@adyen/ui-assets-icons-16/vue/chevron-right-small';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = withDefaults(\n defineProps<{\n /**\n * Use to determine if the pager has a \"next page\".\n */\n hasNext?: boolean;\n\n /**\n * The current page number of the pager.\n */\n page: number;\n\n /**\n * The current page number of the pager.\n */\n totalPages?: number;\n }>(),\n {\n hasNext: null,\n totalPages: null,\n }\n );\n\n const emit = defineEmits<{\n (e: 'navigate', value: number);\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const isCurrentPageFirst = computed(() => props.page === 1);\n const isCurrentPageLast = computed(() => props.page === props.totalPages);\n const isNextButtonDisabled = computed(() => {\n const hasNoNextPage = !props.hasNext;\n return hasNoNextPage || isCurrentPageLast.value;\n });\n const isLastPageButtonDisabled = computed(() => {\n const hasNoNextPage = !props.hasNext;\n const hasNoTotalPagesNumber = !props.totalPages;\n\n return hasNoNextPage || isCurrentPageLast.value || hasNoTotalPagesNumber;\n });\n\n const navigate = (pageArg: number) => {\n emit('navigate', pageArg);\n };\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination-controls.scss\" />\n","<template>\n <div class=\"b-pagination\">\n <nav :aria-label=\"computedAriaLabel\" class=\"b-pagination__navigation\" :class=\"navigationConditionalClasses()\">\n <bento-pagination-results-per-page\n v-if=\"!hidePageSize\"\n class=\"b-pagination__results-per-page\"\n :items-per-page=\"size\"\n :total-count=\"totalCount\"\n @select=\"onItemsPerPageChange\"\n />\n <bento-typography v-else-if=\"hasSlot('default')\"><slot /></bento-typography>\n\n <div class=\"b-pagination__page-navigator\">\n <bento-pagination-context\n class=\"b-pagination__context\"\n :total-pages=\"totalPages\"\n :page=\"page\"\n :total-count=\"totalCount\"\n :virtual-scroll=\"virtualScroll\"\n @page-selected=\"onPageSelected\"\n />\n\n <div class=\"b-pagination__divider\"></div>\n\n <bento-pagination-controls\n class=\"b-pagination__controls\"\n :has-next=\"hasNext\"\n :page=\"page\"\n :total-pages=\"totalPages\"\n @navigate=\"navigate\"\n />\n </div>\n </nav>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, toRefs, useAttrs, useSlots } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import BentoPaginationResultsPerPage from './components/pagination-results-per-page/pagination-results-per-page.vue';\n import BentoPaginationContext from './components/pagination-context/pagination-context.vue';\n import BentoPaginationControls from './components/pagination-controls/pagination-controls.vue';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useHasSlot } from '@/composables';\n import type { BentoPaginationProps } from './pagination.types';\n\n const props = withDefaults(defineProps<BentoPaginationProps>(), {\n ariaLabel: null,\n hasNext: null,\n hidePageSize: false,\n page: 1,\n size: 20,\n totalCount: null,\n virtualScroll: false,\n });\n\n const emit = defineEmits<{\n /**\n * Triggered when the navigation controls are clicked or the items per page is changed (i.e. when the arrow buttons to the\n * rightmost of the screen or either dropdown is updated). It indicates to which page it should go next and also the page size.\n */\n (e: 'navigate', page: number, items?: number): void;\n\n /**\n * Triggered when the number of items per page is changed from the left hand dropdown.\n * It indicates the new number of items that will be displayed.\n */\n (e: 'items-page', size: number): void;\n\n /**\n * Triggered when the navigation controls are clicked, whether the arrow buttons to the\n * right most of the screen or the dropdown on the right hand is updated.\n * It indicates to which page it should go next\n * (easily achieved using the [sync modifier](https://v2.vuejs.org/v2/guide/components-custom-events.html#sync-Modifier))\n * e.g. `:page.sync=\"currentPage\"`\n */\n (e: 'update:page', page: number): void;\n\n /**\n * Triggered when the number of items per page is changed from the left hand dropdown.\n * It indicates the new number of items that will be displayed.\n * (easily achieved using the [sync modifier](https://v2.vuejs.org/v2/guide/components-custom-events.html#sync-Modifier))\n * e.g. `:size.sync=\"itemsPerPage\"`\n */\n (e: 'update:size', size: number): void;\n }>();\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const attrs = useAttrs();\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n });\n\n const totalPages = computed(() =>\n !props.totalCount || !props.size ? null : Math.ceil(props.totalCount / props.size)\n );\n\n const navigate = (pageArg: number, itemsPerPage?: number) => {\n if (props.hidePageSize) {\n emit('navigate', pageArg);\n } else {\n emit('navigate', pageArg, itemsPerPage ?? props?.size);\n }\n emit('update:page', pageArg);\n };\n\n const onPageSelected = (pageNumber: number) => {\n navigate(pageNumber);\n };\n\n const onItemsPerPageChange = (elements: number) => {\n emit('items-page', elements);\n emit('update:size', elements);\n\n // Always go to first page when the\n // number of items page changes\n navigate(1, elements);\n };\n\n const navigationConditionalClasses = () => ({\n 'b-pagination__navigation--only-page-navigator': !hasSlot('default') && props.hidePageSize,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Paginiation component to help users page through data sets.\n *\n * There are two ways of doing navigation in this component:\n * 1. (Basic) You tell the component if there is a next page (hasNext)\n * 2. (Enhanced) You tell the component:\n * - How many total items exist (totalCount)\n * - The max number of items that you show/fetch per page (size)\n * - In this case you should not set the hasNext props\n *\n * If you have the data available and opt to use the Enhanced way you get extra controls:\n * - Page dropdown selector\n * - Last page button\n * - \"Showing 10 of 200 items\" text\n *\n * @usage\n * import { BentoPagination } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoPagination },\n * template: `\n * <bento-pagination :has-next=\"isNextPage\" />\n * `,\n * }\n */\n\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination.scss\" />\n"],"names":["__default__$3","messages$2","n","useI18n","props","__props","emit","__emit","dropdownId","generateUid","predefinedDropdownOptions","computed","i18nComponent","getI18nComponent","onSelectChange","selectedNumberOfResults","translationPathKey","__default__$2","messages$1","t","onPageSelectChange","selectedPage","transformIntoOption","value","transformToPageNumber","_","index","listOfAvailablePages","uuid$3","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","uuid$2","uuid$1","uuid","__default__$1","messages","isCurrentPageFirst","isCurrentPageLast","isNextButtonDisabled","isLastPageButtonDisabled","hasNoNextPage","hasNoTotalPagesNumber","navigate","pageArg","__default__","slots","useSlots","hasSlot","useHasSlot","attrs","useAttrs","ariaLabelAttribute","ref","ariaLabel","toRefs","computedAriaLabel","useAriaLabel","totalPages","itemsPerPage","onPageSelected","pageNumber","onItemsPerPageChange","elements","navigationConditionalClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDA+EIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;AA3CA,UAAA,EAAA,GAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GAEAG,IAAAC,GAiBAC,IAAAC,GAIAC,IAAAC,EAAA,sCAAA,GACAC,IAAAC,EAAA,MAAA;AAAA,MAAiD,EAAA,OAAAT,EAAA,EAAA,GAAA,OAAA,GAAA;AAAA,MACnB,EAAA,OAAAA,EAAA,EAAA,GAAA,OAAA,GAAA;AAAA,MACA,EAAA,OAAAA,EAAA,EAAA,GAAA,OAAA,GAAA;AAAA,MACA,EAAA,OAAAA,EAAA,EAAA,GAAA,OAAA,GAAA;AAAA,MACA,EAAA,OAAAA,EAAA,GAAA,GAAA,OAAA,IAAA;AAAA,IACE,CAAA,GAEhCU,IAAAC,EAAA,GAEAC,IAAA,CAAAC,MAAA;AACI,MAAAT,EAAA,UAAAS,CAAA;AAAA,IAAsC,GAG1CC,IAAAL,EAAA,MAAAP,EAAA,aAAA,0BAAA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CCOAa,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;AA9CA,UAAAd,IAAAC,GAuBAC,IAAAC,GAIA,EAAA,GAAAY,GAAA,GAAAjB,EAAA,IAAAC,EAAA,EAAA,UAAAe,EAAA,CAAA,GACAV,IAAAC,EAAA,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BAyC,IAAAC,EAAA,GACAC,IAAAC,GAAAH,CAAA,GAEAI,IAAAC,EAAA,GACAC,IAAAC,EAAAH,EAAA,YAAA,CAAA,GACA,EAAA,WAAAI,EAAA,IAAAC,EAAArD,CAAA,GACAsD,IAAAC,EAAA;AAAA,MAAuC,WAAAL,EAAA;AAAA;AAAA,MACL,OAAAE;AAAA,IAEvB,CAAA,GAGXI,IAAAjD;AAAA,MAAmB,MAAA,CAAAP,EAAA,cAAA,CAAAA,EAAA,OAAA,OAAA,KAAA,KAAAA,EAAA,aAAAA,EAAA,IAAA;AAAA,IACkE,GAGrFyC,IAAA,CAAAC,GAAAe,MAAA;AACI,MAAAzD,EAAA,eACIE,EAAA,YAAAwC,CAAA,IAEAxC,EAAA,YAAAwC,GAAAe,MAAAzD,KAAA,gBAAAA,EAAA,KAAA,GAEJE,EAAA,eAAAwC,CAAA;AAAA,IAA2B,GAG/BgB,IAAA,CAAAC,MAAA;AACI,MAAAlB,EAAAkB,CAAA;AAAA,IAAmB,GAGvBC,IAAA,CAAAC,MAAA;AACI,MAAA3D,EAAA,cAAA2D,CAAA,GACA3D,EAAA,eAAA2D,CAAA,GAIApB,EAAA,GAAAoB,CAAA;AAAA,IAAoB,GAGxBC,IAAA,OAAA;AAAA,MAA4C,iDAAA,CAAAhB,EAAA,SAAA,KAAA9C,EAAA;AAAA,IACsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -4,7 +4,7 @@ import { B as gr } from "./segmented-control.BCHGDSrf.js";
4
4
  import { B as dr } from "./alert.C2pusd-_.js";
5
5
  import { _ as Fe } from "./_plugin-vue_export-helper.CHgC5LLL.js";
6
6
  import { B as kr } from "./link.cwPmWlsk.js";
7
- import { B as xr } from "./checkbox.CfNYUty6.js";
7
+ import { B as xr } from "./checkbox.BI0dqARY.js";
8
8
  import { u as br } from "./index.pdBj0KQU.js";
9
9
  import { u as yr } from "./aria-label.CaUURpnB.js";
10
10
  import { g as Re } from "./generate-uid.NJ8tVoha.js";
@@ -6221,4 +6221,4 @@ const ao = {
6221
6221
  export {
6222
6222
  Ao as r
6223
6223
  };
6224
- //# sourceMappingURL=rich-text-editor.BA6_k4Vv.js.map
6224
+ //# sourceMappingURL=rich-text-editor.Bh7KS617.js.map