@adyen/bento-vue3 1.76.2 → 1.77.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 (145) hide show
  1. package/dist/@types/index.d.ts +216 -33
  2. package/dist/assets/accordion-item.css +1 -1
  3. package/dist/assets/action-bar.css +1 -1
  4. package/dist/assets/base-modal.css +1 -1
  5. package/dist/assets/button-actions.css +1 -1
  6. package/dist/assets/card.css +1 -1
  7. package/dist/assets/data-grid.css +1 -1
  8. package/dist/assets/date-picker.css +1 -1
  9. package/dist/assets/date-range-picker.css +1 -1
  10. package/dist/assets/dialog-page.css +1 -1
  11. package/dist/assets/dropdown-default-textbox.css +1 -1
  12. package/dist/assets/dropdown-tag.css +1 -1
  13. package/dist/assets/dropdown.css +1 -1
  14. package/dist/assets/file-uploader.css +1 -1
  15. package/dist/assets/filter-bar.css +1 -1
  16. package/dist/assets/input-field-phone-number.css +1 -1
  17. package/dist/assets/input-field.css +1 -1
  18. package/dist/assets/inspector.css +1 -1
  19. package/dist/assets/modal-fullscreen.css +1 -1
  20. package/dist/assets/pagination.css +1 -1
  21. package/dist/assets/payment-method.css +1 -1
  22. package/dist/assets/secondary-nav.css +1 -1
  23. package/dist/assets/sidepanel.css +1 -1
  24. package/dist/assets/tag.css +1 -1
  25. package/dist/assets/textarea.css +1 -1
  26. package/dist/assets/timeline-item.css +1 -1
  27. package/dist/checkbox.js +2 -2
  28. package/dist/chunks/{checkbox-group.8ebmaHsA.js → checkbox-group.COUx8Ne8.js} +2 -2
  29. package/dist/chunks/{checkbox-group.8ebmaHsA.js.map → checkbox-group.COUx8Ne8.js.map} +1 -1
  30. package/dist/chunks/{checkbox.BI0dqARY.js → checkbox.SffuKyNj.js} +3 -3
  31. package/dist/chunks/{checkbox.BI0dqARY.js.map → checkbox.SffuKyNj.js.map} +1 -1
  32. package/dist/chunks/{code-snippet.Bjf1ma1L.js → code-snippet.ByoBEM00.js} +2 -2
  33. package/dist/chunks/{code-snippet.Bjf1ma1L.js.map → code-snippet.ByoBEM00.js.map} +1 -1
  34. package/dist/chunks/{currency.CBZMwm21.js → currency.WmvQjX7l.js} +2 -2
  35. package/dist/chunks/{currency.CBZMwm21.js.map → currency.WmvQjX7l.js.map} +1 -1
  36. package/dist/chunks/{data-grid.VBEJO94f.js → data-grid.CMIG82Xt.js} +7 -7
  37. package/dist/chunks/{data-grid.VBEJO94f.js.map → data-grid.CMIG82Xt.js.map} +1 -1
  38. package/dist/chunks/date-picker.CsGq3iSK.js +244 -0
  39. package/dist/chunks/date-picker.CsGq3iSK.js.map +1 -0
  40. package/dist/chunks/date-picker.types.Ckt7zxGy.js +5 -0
  41. package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -0
  42. package/dist/chunks/date-range-picker.C19CWG27.js +1149 -0
  43. package/dist/chunks/date-range-picker.C19CWG27.js.map +1 -0
  44. package/dist/chunks/{dropdown-default-textbox.MkU0tMf1.js → dropdown-default-textbox._KEBXjKT.js} +88 -86
  45. package/dist/chunks/dropdown-default-textbox._KEBXjKT.js.map +1 -0
  46. package/dist/chunks/dropdown-tag.B90dpg8J.js +301 -0
  47. package/dist/chunks/dropdown-tag.B90dpg8J.js.map +1 -0
  48. package/dist/chunks/dropdown.DYDHM__3.js +833 -0
  49. package/dist/chunks/{dropdown.KStrJVoP.js.map → dropdown.DYDHM__3.js.map} +1 -1
  50. package/dist/chunks/es6.MoTTyETW.js.map +1 -1
  51. package/dist/chunks/{file-uploader.By0MTfKk.js → file-uploader.BDXQ7Ccv.js} +416 -415
  52. package/dist/chunks/{file-uploader.By0MTfKk.js.map → file-uploader.BDXQ7Ccv.js.map} +1 -1
  53. package/dist/chunks/{filter-bar.JXmlFnHV.js → filter-bar.CmF92iAr.js} +303 -303
  54. package/dist/chunks/filter-bar.CmF92iAr.js.map +1 -0
  55. package/dist/chunks/form-field.BBqLu-vs.js +10 -0
  56. package/dist/chunks/form-field.BBqLu-vs.js.map +1 -0
  57. package/dist/chunks/get-slot-text.CQRAP2_q.js +12 -0
  58. package/dist/chunks/get-slot-text.CQRAP2_q.js.map +1 -0
  59. package/dist/chunks/{header-with-views.Dg2usaMY.js → header-with-views.xPfeOz0Y.js} +3 -3
  60. package/dist/chunks/{header-with-views.Dg2usaMY.js.map → header-with-views.xPfeOz0Y.js.map} +1 -1
  61. package/dist/chunks/{input-field-password.B6nJ7ygZ.js → input-field-password.BZBYVyAb.js} +3 -3
  62. package/dist/chunks/{input-field-password.B6nJ7ygZ.js.map → input-field-password.BZBYVyAb.js.map} +1 -1
  63. package/dist/chunks/{input-field-phone-number.D_UBAN2s.js → input-field-phone-number.a8Mw5PAW.js} +5 -5
  64. package/dist/chunks/{input-field-phone-number.D_UBAN2s.js.map → input-field-phone-number.a8Mw5PAW.js.map} +1 -1
  65. package/dist/chunks/{input-field.C29FCI4j.js → input-field.CYGGIK48.js} +48 -48
  66. package/dist/chunks/input-field.CYGGIK48.js.map +1 -0
  67. package/dist/chunks/{listbox-option-tag.uHSB7MO6.js → listbox-option-tag.Cwe9Bn-R.js} +2 -2
  68. package/dist/chunks/{listbox-option-tag.uHSB7MO6.js.map → listbox-option-tag.Cwe9Bn-R.js.map} +1 -1
  69. package/dist/chunks/{pagination.BaBWNlIF.js → pagination.CYdGcyMA.js} +49 -49
  70. package/dist/chunks/pagination.CYdGcyMA.js.map +1 -0
  71. package/dist/chunks/{payment-method.CDnn1bjo.js → payment-method.D6PeTYWq.js} +45 -42
  72. package/dist/chunks/payment-method.D6PeTYWq.js.map +1 -0
  73. package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
  74. package/dist/chunks/{radio-group.DWNqrkZ3.js → radio-group.B_8R6vGx.js} +3 -3
  75. package/dist/chunks/{radio-group.DWNqrkZ3.js.map → radio-group.B_8R6vGx.js.map} +1 -1
  76. package/dist/chunks/{rich-text-editor.Bh7KS617.js → rich-text-editor.B6Ftqv55.js} +2 -2
  77. package/dist/chunks/{rich-text-editor.Bh7KS617.js.map → rich-text-editor.B6Ftqv55.js.map} +1 -1
  78. package/dist/chunks/{search-bar.RS02IcLc.js → search-bar.D3Ri_RUK.js} +3 -3
  79. package/dist/chunks/{search-bar.RS02IcLc.js.map → search-bar.D3Ri_RUK.js.map} +1 -1
  80. package/dist/chunks/{secondary-nav.DXsgUTqk.js → secondary-nav.CAb20jWW.js} +24 -24
  81. package/dist/chunks/secondary-nav.CAb20jWW.js.map +1 -0
  82. package/dist/chunks/{summary-grid.types.ByQ4u19J.js → summary-grid.types.cE1fyLvC.js} +2 -2
  83. package/dist/chunks/{summary-grid.types.ByQ4u19J.js.map → summary-grid.types.cE1fyLvC.js.map} +1 -1
  84. package/dist/chunks/tag.CjaB9DxL.js +57 -0
  85. package/dist/chunks/tag.CjaB9DxL.js.map +1 -0
  86. package/dist/chunks/textarea.C_gnXj6b.js +254 -0
  87. package/dist/chunks/textarea.C_gnXj6b.js.map +1 -0
  88. package/dist/chunks/{timeline-item.DNjubXL2.js → timeline-item.rSY0Xce3.js} +48 -48
  89. package/dist/chunks/timeline-item.rSY0Xce3.js.map +1 -0
  90. package/dist/chunks/{toggle.Dd_NA8eH.js → toggle.BHCUjMpp.js} +2 -2
  91. package/dist/chunks/{toggle.Dd_NA8eH.js.map → toggle.BHCUjMpp.js.map} +1 -1
  92. package/dist/code-snippet.js +1 -1
  93. package/dist/currency.js +1 -1
  94. package/dist/data-grid.js +1 -1
  95. package/dist/date-picker.js +7 -6
  96. package/dist/date-picker.js.map +1 -1
  97. package/dist/date-range-picker.js +1 -1
  98. package/dist/dropdown.js +3 -3
  99. package/dist/file-uploader.js +1 -1
  100. package/dist/filter-bar.js +1 -1
  101. package/dist/header-with-views.js +1 -1
  102. package/dist/index.js +246 -245
  103. package/dist/index.js.map +1 -1
  104. package/dist/input-field-password.js +1 -1
  105. package/dist/input-field-phone-number.js +1 -1
  106. package/dist/input-field.js +1 -1
  107. package/dist/internal.js +1 -1
  108. package/dist/pagination.js +1 -1
  109. package/dist/payment-method.js +1 -1
  110. package/dist/radio-group.js +1 -1
  111. package/dist/rich-text-editor.js +1 -1
  112. package/dist/search-bar.js +2 -2
  113. package/dist/secondary-nav.js +1 -1
  114. package/dist/styles/bento-dark.css +4 -0
  115. package/dist/styles/bento-light.css +4 -0
  116. package/dist/styles/bento.css +4 -0
  117. package/dist/styles/legacy.css +4 -0
  118. package/dist/styles/styleguide.css +4 -0
  119. package/dist/summary-grid.js +1 -1
  120. package/dist/tag.js +1 -1
  121. package/dist/textarea.js +1 -1
  122. package/dist/timeline.js +1 -1
  123. package/dist/toggle.js +1 -1
  124. package/dist/web-types.json +1 -1
  125. package/package.json +5 -5
  126. package/dist/chunks/date-picker.OI-sQ232.js +0 -234
  127. package/dist/chunks/date-picker.OI-sQ232.js.map +0 -1
  128. package/dist/chunks/date-range-picker.D7IwIR5V.js +0 -1114
  129. package/dist/chunks/date-range-picker.D7IwIR5V.js.map +0 -1
  130. package/dist/chunks/dropdown-default-textbox.MkU0tMf1.js.map +0 -1
  131. package/dist/chunks/dropdown-tag.DFeoXIgH.js +0 -242
  132. package/dist/chunks/dropdown-tag.DFeoXIgH.js.map +0 -1
  133. package/dist/chunks/dropdown.KStrJVoP.js +0 -825
  134. package/dist/chunks/filter-bar.JXmlFnHV.js.map +0 -1
  135. package/dist/chunks/get-slot-text.DQlZEsId.js +0 -12
  136. package/dist/chunks/get-slot-text.DQlZEsId.js.map +0 -1
  137. package/dist/chunks/input-field.C29FCI4j.js.map +0 -1
  138. package/dist/chunks/pagination.BaBWNlIF.js.map +0 -1
  139. package/dist/chunks/payment-method.CDnn1bjo.js.map +0 -1
  140. package/dist/chunks/secondary-nav.DXsgUTqk.js.map +0 -1
  141. package/dist/chunks/tag.CEmpyuYX.js +0 -50
  142. package/dist/chunks/tag.CEmpyuYX.js.map +0 -1
  143. package/dist/chunks/textarea.C1jkfowf.js +0 -246
  144. package/dist/chunks/textarea.C1jkfowf.js.map +0 -1
  145. package/dist/chunks/timeline-item.DNjubXL2.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as k, useAttrs as ne, useSlots as Q, ref as X, computed as i, watch as se, nextTick as z, createElementBlock as r, openBlock as n, withKeys as C, normalizeClass as K, createVNode as D, unref as o, withCtx as T, createCommentVNode as P, mergeProps as v, renderSlot as L, normalizeProps as Z, createTextVNode as R, toDisplayString as E, Fragment as H, renderList as ee, createElementVNode as te, withModifiers as j, createBlock as W, toHandlers as de, createSlots as re, withDirectives as J, vShow as G, guardReactiveProps as ie } from "vue";
1
+ import { defineComponent as L, useAttrs as ne, useSlots as X, ref as Z, computed as i, watch as se, nextTick as j, createElementBlock as d, openBlock as n, withKeys as E, normalizeClass as T, createVNode as D, unref as o, withCtx as q, createCommentVNode as P, mergeProps as y, Fragment as R, renderSlot as w, normalizeProps as M, createTextVNode as F, toDisplayString as k, renderList as ee, createElementVNode as te, withModifiers as W, createBlock as J, toHandlers as de, createSlots as re, withDirectives as G, vShow as Q, guardReactiveProps as ie } from "vue";
2
2
  import { g as ue } from "./generate-uid.NJ8tVoha.js";
3
3
  import { u as ce } from "./index.pdBj0KQU.js";
4
4
  import { u as pe } from "./use-has-slot.B7eQSabc.js";
@@ -7,11 +7,11 @@ import { d as fe } from "./debounce.DUTu11PS.js";
7
7
  import { C as ye } from "./cross-circle-fill.CYLL7jfC.js";
8
8
  import { C as me } from "./cross-circle-fill-small.Dv5-PxwF.js";
9
9
  import { _ as ae } from "./_plugin-vue_export-helper.CHgC5LLL.js";
10
- import { s as F } from "./events.CMzGybJJ.js";
10
+ import { s as K } from "./events.CMzGybJJ.js";
11
11
  import { C as ve } from "./chevron-down.DCQ6ZLaq.js";
12
12
  import { C as xe } from "./chevron-up.kfuLRpZb.js";
13
13
  import "../assets/dropdown-default-textbox.css";
14
- var oe = /* @__PURE__ */ ((e) => (e.DEFAULT = "DropdownInputDefault", e.SMALL = "DropdownInputSmall", e))(oe || {}), b = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.READONLY = "readonly", e.HAS_ITEMS = "has-items", e.OPENED = "opened", e.ERROR = "error", e))(b || {}), d = /* @__PURE__ */ ((e) => (e.OPEN = "dropdown-base-open", e.KEYDOWN = "dropdown-base-keydown", e.CLOSE = "dropdown-base-close", e.INPUT = "dropdown-base-input", e.CLEAR = "dropdown-base-clear", e))(d || {});
14
+ var oe = /* @__PURE__ */ ((e) => (e.DEFAULT = "DropdownInputDefault", e.SMALL = "DropdownInputSmall", e))(oe || {}), b = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.READONLY = "readonly", e.HAS_ITEMS = "has-items", e.OPENED = "opened", e.ERROR = "error", e))(b || {}), r = /* @__PURE__ */ ((e) => (e.OPEN = "dropdown-base-open", e.KEYDOWN = "dropdown-base-keydown", e.CLOSE = "dropdown-base-close", e.INPUT = "dropdown-base-input", e.CLEAR = "dropdown-base-clear", e))(r || {});
15
15
  const le = {
16
16
  "en-US": {
17
17
  clearSearch: "Clear search"
@@ -32,12 +32,12 @@ const le = {
32
32
  key: 3,
33
33
  class: "b-dropdown-base-textbox__icon",
34
34
  "aria-hidden": "true"
35
- }, Ee = ["tabindex", "onKeydown"], De = k({
35
+ }, Ee = ["tabindex", "onKeydown"], ke = L({
36
36
  i18n: { messages: le },
37
37
  name: "dropdown-base-textbox",
38
38
  inheritAttrs: !1
39
- }), Le = /* @__PURE__ */ k({
40
- ...De,
39
+ }), De = /* @__PURE__ */ L({
40
+ ...ke,
41
41
  props: {
42
42
  /**
43
43
  * The number of additional items that have been selected in the dropdown.
@@ -126,67 +126,67 @@ const le = {
126
126
  }
127
127
  },
128
128
  setup(e, { expose: N, emit: _ }) {
129
- const { t: c } = ce({ messages: le }), x = ne(), s = Q(), w = pe(s), t = e, p = _, u = X(null), S = ue("textbox"), A = i(() => ({
129
+ const { t: c } = ce({ messages: le }), S = ne(), s = X(), m = pe(s), t = e, p = _, u = Z(null), I = ue("textbox"), A = i(() => ({
130
130
  [`b-dropdown-base-textbox--${b.DISABLED}`]: t.disabled,
131
131
  [`b-dropdown-base-textbox--${b.READONLY}`]: t.readonly,
132
132
  [`b-dropdown-base-textbox--${b.HAS_ITEMS}`]: !!t.additionalItemsSelected
133
- })), I = i(() => x.required), B = i(() => ({
133
+ })), g = i(() => S.required), B = i(() => ({
134
134
  "b-dropdown-base-textbox__input--dynamic-filtering": t.dynamicFiltering
135
- })), g = i(() => t.dynamicFiltering && !!t.value && t.open), O = i(
135
+ })), h = i(() => t.dynamicFiltering && !!t.value && t.open), O = i(
136
136
  () => {
137
137
  var l;
138
138
  return {
139
139
  "aria-haspopup": "listbox",
140
140
  "aria-controls": t.ariaControls,
141
- "aria-describedby": (l = x["aria-describedby"]) == null ? void 0 : l.toString(),
141
+ "aria-describedby": (l = S["aria-describedby"]) == null ? void 0 : l.toString(),
142
142
  "aria-expanded": t.ariaExpanded ? "true" : "false",
143
143
  "aria-labelledby": t.ariaLabelledby,
144
144
  "aria-label": t.ariaLabelledby ? null : t.ariaLabel,
145
145
  "aria-invalid": t.isInvalid,
146
146
  "aria-disabled": t.disabled ? !0 : null,
147
- "aria-required": y.value ? null : I.value
147
+ "aria-required": v.value ? null : g.value
148
148
  };
149
149
  }
150
150
  ), a = i(
151
151
  () => t.multiple ? t.selectedValueItem : []
152
- ), y = i(() => t.dynamicFiltering && (t.open || t.alwaysComboboxIsInput)), q = i(() => t.selectedValueItem && !t.multiple), h = i(
152
+ ), v = i(() => t.dynamicFiltering && (t.open || t.alwaysComboboxIsInput)), U = i(() => t.selectedValueItem && !t.multiple), C = i(
153
153
  () => t.multiple && t.selectedValueItem && a.value.length > 0 && t.showSlotContentInMultiple
154
154
  );
155
155
  se(
156
- () => y.value,
156
+ () => v.value,
157
157
  () => {
158
- y.value && !t.alwaysComboboxIsInput && z(() => {
158
+ v.value && !t.alwaysComboboxIsInput && j(() => {
159
159
  u.value.focus();
160
160
  });
161
161
  }
162
162
  );
163
163
  const V = async () => {
164
- !t.disabled && !t.readonly && (p(d.OPEN), await z(), u.value.focus());
165
- }, M = () => {
166
- t.open && (u.value.focus(), p(d.CLOSE));
167
- }, U = (l) => t.open && l.target.tagName === "INPUT" ? null : t.open ? M() : V(), $ = () => {
168
- p(d.CLEAR), p(d.INPUT, ""), u.value.focus();
169
- }, Y = fe((l) => {
170
- !t.readonly && !t.disabled ? p(d.INPUT, l.target.value) : (l.preventDefault(), l.stopPropagation());
164
+ !t.disabled && !t.readonly && (p(r.OPEN), await j(), u.value.focus());
165
+ }, Y = () => {
166
+ t.open && (u.value.focus(), p(r.CLOSE));
167
+ }, z = (l) => t.open && l.target.tagName === "INPUT" ? null : t.open ? Y() : V(), $ = () => {
168
+ p(r.CLEAR), p(r.INPUT, ""), u.value.focus();
169
+ }, H = fe((l) => {
170
+ !t.readonly && !t.disabled ? p(r.INPUT, l.target.value) : (l.preventDefault(), l.stopPropagation());
171
171
  }, t.debounceTime);
172
172
  return N({
173
173
  focus: () => {
174
174
  u.value.focus();
175
175
  }
176
- }), (l, m) => (n(), r("div", {
177
- class: K(l.$attrs.class),
176
+ }), (l, x) => (n(), d("div", {
177
+ class: T(l.$attrs.class),
178
178
  "data-testid": "textbox-wrapper",
179
- onClick: U,
180
- onKeydown: C(M, ["escape"])
179
+ onClick: z,
180
+ onKeydown: E(Y, ["escape"])
181
181
  }, [
182
182
  D(o(be), {
183
- class: K(["b-dropdown-base-textbox", A.value]),
183
+ class: T(["b-dropdown-base-textbox", A.value]),
184
184
  el: "div",
185
185
  "data-testid": "base-textbox"
186
186
  }, {
187
- default: T(() => [
188
- y.value ? (n(), r("input", v({ key: 0 }, O.value, {
189
- id: o(S),
187
+ default: q(() => [
188
+ v.value ? (n(), d("input", y({ key: 0 }, O.value, {
189
+ id: o(I),
190
190
  ref_key: "textbox",
191
191
  ref: u,
192
192
  class: "b-dropdown-base-textbox__input",
@@ -197,16 +197,16 @@ const le = {
197
197
  value: e.open ? e.value : e.displayValue,
198
198
  disabled: e.disabled ? !0 : null,
199
199
  readonly: e.readonly,
200
- required: I.value,
200
+ required: g.value,
201
201
  onKeydown: [
202
- m[0] || (m[0] = (f) => l.$emit(o(d).KEYDOWN, f)),
203
- C(U, ["enter"])
202
+ x[0] || (x[0] = (f) => l.$emit(o(r).KEYDOWN, f)),
203
+ E(z, ["enter"])
204
204
  ],
205
- onInput: m[1] || (m[1] = //@ts-ignore
206
- (...f) => o(Y) && o(Y)(...f))
207
- }), null, 16, we)) : (n(), r("div", v({
205
+ onInput: x[1] || (x[1] = //@ts-ignore
206
+ (...f) => o(H) && o(H)(...f))
207
+ }), null, 16, we)) : (n(), d("div", y({
208
208
  key: 1,
209
- id: o(S)
209
+ id: o(I)
210
210
  }, O.value, {
211
211
  ref_key: "textbox",
212
212
  ref: u,
@@ -215,39 +215,41 @@ const le = {
215
215
  role: "combobox",
216
216
  tabindex: e.disabled ? -1 : 0
217
217
  }), [
218
- q.value ? L(l.$slots, "default", Z(v({ key: 0 }, e.selectedValueItem)), () => [
219
- R(E(e.displayValue), 1)
220
- ], !0) : h.value ? (n(), r("div", Ie, [
221
- (n(!0), r(H, null, ee(a.value, (f) => (n(), r("div", {
218
+ U.value ? (n(), d(R, { key: 0 }, [
219
+ o(m)("display-value") ? w(l.$slots, "display-value", M(y({ key: 0 }, e.selectedValueItem)), void 0, !0) : w(l.$slots, "default", M(y({ key: 1 }, e.selectedValueItem)), () => [
220
+ F(k(e.displayValue), 1)
221
+ ], !0)
222
+ ], 64)) : C.value ? (n(), d("div", Ie, [
223
+ (n(!0), d(R, null, ee(a.value, (f) => (n(), d("div", {
222
224
  key: f.value
223
225
  }, [
224
226
  te("div", ge, [
225
- L(l.$slots, "default", v({ ref_for: !0 }, f), () => [
226
- R(E(e.displayValue), 1)
227
+ w(l.$slots, "default", y({ ref_for: !0 }, f), () => [
228
+ F(k(e.displayValue), 1)
227
229
  ], !0)
228
230
  ])
229
231
  ]))), 128))
230
- ])) : (n(), r(H, { key: 2 }, [
231
- R(E(e.displayValue), 1)
232
+ ])) : (n(), d(R, { key: 2 }, [
233
+ F(k(e.displayValue), 1)
232
234
  ], 64))
233
235
  ], 16, Se)),
234
- e.additionalItemsSelected ? (n(), r("span", he, E(e.additionalItemsSelected), 1)) : P("", !0),
235
- o(w)("icon") && !g.value ? (n(), r("span", Ce, [
236
- L(l.$slots, "icon", {}, void 0, !0)
236
+ e.additionalItemsSelected ? (n(), d("span", he, k(e.additionalItemsSelected), 1)) : P("", !0),
237
+ o(m)("icon") && !h.value ? (n(), d("span", Ce, [
238
+ w(l.$slots, "icon", {}, void 0, !0)
237
239
  ])) : P("", !0),
238
- g.value ? (n(), r("span", {
240
+ h.value ? (n(), d("span", {
239
241
  key: 4,
240
242
  class: "b-dropdown-base-textbox__clear-search",
241
243
  tabindex: e.disabled ? -1 : 0,
242
244
  "data-testid": "clear-search-button",
243
- onClick: j($, ["stop"]),
244
- onKeydown: C(j($, ["stop"]), ["enter"]),
245
- onKeyup: C($, ["space"])
245
+ onClick: W($, ["stop"]),
246
+ onKeydown: E(W($, ["stop"]), ["enter"]),
247
+ onKeyup: E($, ["space"])
246
248
  }, [
247
- e.size === o(oe).SMALL ? (n(), W(o(me), {
249
+ e.size === o(oe).SMALL ? (n(), J(o(me), {
248
250
  key: 0,
249
251
  "svg-title": o(c)("clearSearch")
250
- }, null, 8, ["svg-title"])) : (n(), W(o(ye), {
252
+ }, null, 8, ["svg-title"])) : (n(), J(o(ye), {
251
253
  key: 1,
252
254
  "svg-title": o(c)("clearSearch")
253
255
  }, null, 8, ["svg-title"]))
@@ -257,10 +259,10 @@ const le = {
257
259
  }, 8, ["class"])
258
260
  ], 34));
259
261
  }
260
- }), ke = /* @__PURE__ */ ae(Le, [["__scopeId", "data-v-a345d2f5"]]), Ne = { class: "b-dropdown-default-textbox__chevron" }, _e = k({
262
+ }), Le = /* @__PURE__ */ ae(De, [["__scopeId", "data-v-ea907b0a"]]), Ne = { class: "b-dropdown-default-textbox__chevron" }, _e = L({
261
263
  name: "dropdown-default-textbox",
262
264
  inheritAttrs: !1
263
- }), Ae = /* @__PURE__ */ k({
265
+ }), Ae = /* @__PURE__ */ L({
264
266
  ..._e,
265
267
  props: {
266
268
  /**
@@ -353,7 +355,7 @@ const le = {
353
355
  },
354
356
  emits: ["clear", "close", "input", "keydown", "open"],
355
357
  setup(e, { expose: N, emit: _ }) {
356
- const c = _, x = Q(), s = e, w = X(null), t = i(() => ({
358
+ const c = _, S = X(), s = e, m = Z(null), t = i(() => ({
357
359
  [`b-dropdown-default-textbox--${b.ERROR}`]: !s.disabled && !s.readonly && s.isInvalid,
358
360
  [`b-dropdown-default-textbox--${b.DISABLED}`]: s.disabled,
359
361
  [`b-dropdown-default-textbox--${b.READONLY}`]: s.readonly,
@@ -361,63 +363,63 @@ const le = {
361
363
  "b-dropdown-default-textbox--condensed": s.condensed
362
364
  })), p = i(() => s.open && !s.disabled && !s.readonly), u = (a) => {
363
365
  c("input", a);
364
- }, S = (a) => {
366
+ }, I = (a) => {
365
367
  c("keydown", a);
366
368
  }, A = (a) => {
367
- F(a), c("open");
368
- }, I = (a) => {
369
- F(a), c("close");
369
+ K(a), c("open");
370
+ }, g = (a) => {
371
+ K(a), c("close");
370
372
  }, B = (a) => {
371
- F(a), c("clear");
372
- }, g = {
373
- [d.INPUT]: u,
374
- [d.OPEN]: A,
375
- [d.CLOSE]: I,
376
- [d.CLEAR]: B,
377
- [d.KEYDOWN]: S
373
+ K(a), c("clear");
374
+ }, h = {
375
+ [r.INPUT]: u,
376
+ [r.OPEN]: A,
377
+ [r.CLOSE]: g,
378
+ [r.CLEAR]: B,
379
+ [r.KEYDOWN]: I
378
380
  };
379
381
  return N({
380
382
  focus: () => {
381
- w.value.focus();
383
+ m.value.focus();
382
384
  }
383
- }), (a, y) => (n(), r("div", {
384
- class: K(["b-dropdown-default-textbox", t.value]),
385
+ }), (a, v) => (n(), d("div", {
386
+ class: T(["b-dropdown-default-textbox", t.value]),
385
387
  "data-testid": "default-textbox"
386
388
  }, [
387
- D(ke, v({
389
+ D(Le, y({
388
390
  ref_key: "baseTextbox",
389
- ref: w
391
+ ref: m
390
392
  }, { ...a.$attrs, ...a.$props }, {
391
393
  class: "b-dropdown-default-textbox__textbox",
392
394
  value: e.value
393
- }, de(g)), re({
394
- icon: T(() => [
395
+ }, de(h)), re({
396
+ icon: q(() => [
395
397
  te("div", Ne, [
396
- J(D(o(xe), { "svg-title": "opened" }, null, 512), [
397
- [G, p.value]
398
+ G(D(o(xe), { "svg-title": "opened" }, null, 512), [
399
+ [Q, p.value]
398
400
  ]),
399
- J(D(o(ve), { "svg-title": "closed" }, null, 512), [
400
- [G, !p.value]
401
+ G(D(o(ve), { "svg-title": "closed" }, null, 512), [
402
+ [Q, !p.value]
401
403
  ])
402
404
  ])
403
405
  ]),
404
406
  _: 2
405
407
  }, [
406
- ee(o(x), (q, h) => ({
407
- name: h,
408
- fn: T((V) => [
409
- L(a.$slots, h, Z(ie(V)), void 0, !0)
408
+ ee(o(S), (U, C) => ({
409
+ name: C,
410
+ fn: q((V) => [
411
+ w(a.$slots, C, M(ie(V ?? {})), void 0, !0)
410
412
  ])
411
413
  }))
412
414
  ]), 1040, ["value"])
413
415
  ], 2));
414
416
  }
415
- }), ze = /* @__PURE__ */ ae(Ae, [["__scopeId", "data-v-8d675178"]]);
417
+ }), ze = /* @__PURE__ */ ae(Ae, [["__scopeId", "data-v-0771af15"]]);
416
418
  export {
417
419
  oe as B,
418
420
  ze as D,
419
421
  b as a,
420
- d as b,
421
- ke as c
422
+ r as b,
423
+ Le as c
422
424
  };
423
- //# sourceMappingURL=dropdown-default-textbox.MkU0tMf1.js.map
425
+ //# sourceMappingURL=dropdown-default-textbox._KEBXjKT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-default-textbox._KEBXjKT.js","sources":["../../../vue2/src/components/dropdown/dropdown.types.ts","../../../vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../../vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../../vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["import type {\n BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps,\n BentoListboxSearchOptions as BentoDropdownSearchOptions,\n BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions,\n BentoListboxIsOptionDisabled,\n BentoListboxLazyLoadType,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n} from '../../types/listbox';\nimport { type FormField } from '../../types/form-field';\nexport type { BentoDropdownSearchOptions, BentoDropdownEmptyStateProps, BentoDropdownVirtulisationOptions };\nexport interface BentoDropdownProps extends FormField {\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n * Defines a string value that labels an interactive element.\n */\n ariaLabel?: string;\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed?: boolean;\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState?: BentoDropdownEmptyStateProps;\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering?: boolean;\n /**\n * Highlights the dropdown in an erroneous state.\n * @deprecated Use \"errorMessage\" prop instead\n */\n error?: boolean;\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems?: boolean;\n /**\n * Function that dertermines which options are disabled from interaction.\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled?: BentoListboxIsOptionDisabled;\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoListboxOptionItem }\n * @property value.label - Text to be displayed in the option\n * @property value.value - Value of the option\n */\n items?: BentoListboxOptions;\n /**\n * Indicates if new options are lazy loading.\n */\n loading?: boolean;\n /**\n * Indicates that dropdown items are loading\n */\n componentLoading?: boolean;\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType?: BentoListboxLazyLoadType | `${BentoListboxLazyLoadType}`;\n /**\n * If enabled, the user will be able to select multiple items.\n */\n multiple?: boolean;\n /**\n * Dropdown search options and events.\n * @see BentoDropdownSearchOptions\n */\n search?: BentoDropdownSearchOptions;\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple?: boolean;\n /**\n * @deprecated Do not use. Only 'default' size should be used.\n */\n size?: BentoDropdownSize | `${BentoDropdownSize}`;\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories?: boolean;\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n * @deprecated for usage with properties since version 2.0. Use `v-model` or `model-value` instead.\n */\n value?: BentoListboxSelectedValue;\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n */\n modelValue?: BentoListboxSelectedValue;\n /**\n * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll?: BentoDropdownVirtulisationOptions;\n /**\n * Enables value/label value handling. When `true`, the component expects and emits value/label\n * pair objects instead of primitive values.\n *\n * This affects both the `value` prop and the `input` event payload.\n *\n * - **Input (`value` prop):** Expects a `{ value: string | number, label: string }` object (or an array of them for multi-select).\n * - **Output (`input` event):** Emits a `{ value: string | number, label: string }` object (or an array of them) upon selection.\n *\n * This is particularly useful when a selected item's label is not available in the `items` prop,\n * allowing the component to display the correct label for values loaded from external sources.\n * @default false\n */\n enableValueLabelPair?: boolean;\n}\n\n/**\n * @deprecated Do not use. Only 'default' size should be used.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated since version 2.0. Use the string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types/listbox';\n","import { type PropType } from 'vue';\nimport { type Booleanish } from '@/types/prop-types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'dropdown-base-open',\n KEYDOWN = 'dropdown-base-keydown',\n CLOSE = 'dropdown-base-close',\n INPUT = 'dropdown-base-input',\n CLEAR = 'dropdown-base-clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"shouldShowInput\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n size=\"1\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n :required=\"isRequired\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n :class=\"comboboxConditionalClasses\"\n :aria-readonly=\"readonly ? 'true' : null\"\n role=\"combobox\"\n :tabindex=\"disabled ? -1 : 0\"\n >\n <template v-if=\"shouldShowSingleSelectSlot\">\n <slot v-if=\"hasSlot('display-value')\" v-bind=\"selectedValueItem\" name=\"display-value\"></slot>\n <slot v-else v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n </template>\n <template v-else-if=\"shouldShowMultipleSlot\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n :tabindex=\"disabled ? -1 : 0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-small-icon v-if=\"size === BentoDropdownSize.SMALL\" :svg-title=\"t('clearSearch')\" />\n <cross-circle-fill-icon v-else :svg-title=\"t('clearSearch')\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, nextTick, type PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { debounce } from '@/utils/ts/debounce';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * If the combobox DOM element should be an `input` element.\n */\n alwaysComboboxIsInput: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: { type: String, default: null },\n\n /**\n * Custom debounce time for the user type event.\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * Dropdown size\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the \"clear\" button is clicked\n */\n (e: DropdownBaseTextboxEvent.CLEAR);\n\n /**\n * Emitted on click, space, enter and esc user events. It will close the dropdown.\n */\n (e: DropdownBaseTextboxEvent.CLOSE);\n\n /**\n * Emitted when `dynamicFiltering` is enabled and a search input is entered\n */\n (e: DropdownBaseTextboxEvent.INPUT, searchValue: string);\n\n /**\n * Emitted when any key is pressed and the focus is on the input field\n */\n (e: DropdownBaseTextboxEvent.KEYDOWN, event: KeyboardEvent);\n\n /**\n * Emitted on click, space and enter user events. It will open the dropdown.\n */\n (e: DropdownBaseTextboxEvent.OPEN);\n }>();\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n }));\n\n const isRequired = computed(() => attrs['required'] as Booleanish);\n\n const comboboxConditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox__input--dynamic-filtering`]: props.dynamicFiltering,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value && props.open);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n 'aria-required': shouldShowInput.value ? null : isRequired.value,\n }) as HTMLAttributes\n );\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as Array<BentoListboxOptionItem>) : []\n );\n\n const shouldShowInput = computed(() => props.dynamicFiltering && (props.open || props.alwaysComboboxIsInput));\n const shouldShowSingleSelectSlot = computed(() => props.selectedValueItem && !props.multiple);\n const shouldShowMultipleSlot = computed(\n () =>\n props.multiple &&\n props.selectedValueItem &&\n selectedValueItems.value.length > 0 &&\n props.showSlotContentInMultiple\n );\n\n watch(\n () => shouldShowInput.value,\n () => {\n if (shouldShowInput.value && !props.alwaysComboboxIsInput) {\n nextTick(() => {\n textbox.value.focus();\n });\n }\n }\n );\n\n const onOpenDropdown = async () => {\n if (!props.disabled && !props.readonly) {\n emit(DropdownBaseTextboxEvent.OPEN);\n // wait for popover to open before setting focus\n await nextTick();\n textbox.value.focus();\n }\n };\n\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent = props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = debounce<(event: Event) => void>((event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n }, props.debounceTime);\n\n const focus = () => {\n textbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'dropdown-base-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope ?? {}\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, defineComponent, type PropType, ref, useSlots } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n const emit = defineEmits<{\n /**\n * Emitted on clearing the input.\n */\n (e: 'clear');\n\n /**\n * Emitted on click, space and enter user events. It will open the dropdown.\n */\n (e: 'close');\n\n /**\n * Emitted on input event.\n */\n (e: 'input', newInput: string);\n\n /**\n * Emitted on keydown event.\n */\n (e: 'keydown', keydownEvent: KeyboardEvent);\n\n /**\n * Emitted on click, space, enter and esc user events. It will close the dropdown.\n */\n (e: 'open');\n }>();\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n });\n\n const baseTextbox = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n 'b-dropdown-default-textbox--condensed': props.condensed,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n const focus = () => {\n baseTextbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["BentoDropdownSize","BentoDropdownSize2","DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","__default__$1","defineComponent","messages","t","useI18n","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","props","__props","emit","__emit","textbox","ref","textboxId","generateUid","conditionalClasses","computed","isRequired","comboboxConditionalClasses","isFiltering","ariaAttributes","_a","shouldShowInput","selectedValueItems","shouldShowSingleSelectSlot","shouldShowMultipleSlot","watch","nextTick","onOpenDropdown","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","__expose","__default__","baseTextbox","isDropdownOpen","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;;;;;;;;;;;;AA8HY,IAAAA,KAAA,kBAAAC,OACRA,EAAA,UAAA,wBACAA,EAAA,QAAA,sBAFQA,IAAAD,MAAA,CAAA,CAAA,GCpDAE,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,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