@adyen/bento-vue3 1.19.0 → 1.20.1

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 (177) hide show
  1. package/dist/@types/packages/vue2/src/components/code-snippet/utils/indent-same-as-line-before-extension.d.ts +8 -0
  2. package/dist/@types/packages/vue2/src/components/code-snippet/utils/index.d.ts +2 -0
  3. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types.d.ts +2 -1
  4. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +1 -0
  5. package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +1 -0
  6. package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +1 -0
  7. package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +1 -1
  8. package/dist/accordion.js +1 -1
  9. package/dist/action-bar.js +5 -5
  10. package/dist/alert.js +2 -2
  11. package/dist/assets/base-modal.css +1 -1
  12. package/dist/assets/dialog-page.css +1 -1
  13. package/dist/assets/dropdown-default-textbox.css +1 -1
  14. package/dist/assets/index.css +1 -1
  15. package/dist/assets/index10.css +1 -1
  16. package/dist/assets/index11.css +1 -1
  17. package/dist/assets/index12.css +1 -1
  18. package/dist/assets/index13.css +1 -1
  19. package/dist/assets/index14.css +1 -1
  20. package/dist/assets/index15.css +1 -1
  21. package/dist/assets/index16.css +1 -1
  22. package/dist/assets/index17.css +1 -1
  23. package/dist/assets/index18.css +1 -1
  24. package/dist/assets/index19.css +1 -1
  25. package/dist/assets/index2.css +1 -1
  26. package/dist/assets/index20.css +1 -1
  27. package/dist/assets/index21.css +1 -1
  28. package/dist/assets/index22.css +1 -1
  29. package/dist/assets/index23.css +1 -1
  30. package/dist/assets/index24.css +1 -1
  31. package/dist/assets/index25.css +1 -1
  32. package/dist/assets/index27.css +1 -1
  33. package/dist/assets/index28.css +1 -1
  34. package/dist/assets/index29.css +1 -1
  35. package/dist/assets/index3.css +1 -1
  36. package/dist/assets/index30.css +1 -1
  37. package/dist/assets/index31.css +1 -1
  38. package/dist/assets/index32.css +1 -1
  39. package/dist/assets/index33.css +1 -1
  40. package/dist/assets/index34.css +1 -1
  41. package/dist/assets/index35.css +1 -1
  42. package/dist/assets/index36.css +1 -1
  43. package/dist/assets/index37.css +1 -1
  44. package/dist/assets/index38.css +1 -1
  45. package/dist/assets/index39.css +1 -1
  46. package/dist/assets/index4.css +1 -1
  47. package/dist/assets/index40.css +1 -1
  48. package/dist/assets/index41.css +1 -1
  49. package/dist/assets/index42.css +1 -1
  50. package/dist/assets/index43.css +1 -1
  51. package/dist/assets/index44.css +1 -1
  52. package/dist/assets/index46.css +1 -1
  53. package/dist/assets/index47.css +1 -1
  54. package/dist/assets/index7.css +1 -1
  55. package/dist/assets/index9.css +1 -1
  56. package/dist/avatar-image.js +1 -1
  57. package/dist/badge.js +1 -1
  58. package/dist/button.js +5 -5
  59. package/dist/card.js +3 -3
  60. package/dist/checkbox.js +6 -6
  61. package/dist/chunks/{base-button.585f4113.js → base-button.14dbcade.js} +2 -2
  62. package/dist/chunks/{base-button.585f4113.js.map → base-button.14dbcade.js.map} +1 -1
  63. package/dist/chunks/{base-modal.d3079635.js → base-modal.2cbe3db4.js} +110 -108
  64. package/dist/chunks/base-modal.2cbe3db4.js.map +1 -0
  65. package/dist/chunks/{button-actions-with-menu.dbba09d8.js → button-actions-with-menu.c4e74ccf.js} +4 -4
  66. package/dist/chunks/{button-actions-with-menu.dbba09d8.js.map → button-actions-with-menu.c4e74ccf.js.map} +1 -1
  67. package/dist/chunks/{button-actions.96f2b551.js → button-actions.bf01695d.js} +3 -3
  68. package/dist/chunks/{button-actions.96f2b551.js.map → button-actions.bf01695d.js.map} +1 -1
  69. package/dist/chunks/{button.22a91e4b.js → button.c8e45849.js} +3 -3
  70. package/dist/chunks/{button.22a91e4b.js.map → button.c8e45849.js.map} +1 -1
  71. package/dist/chunks/{calendar.1e8edacc.js → calendar.8fa02af5.js} +163 -163
  72. package/dist/chunks/{calendar.1e8edacc.js.map → calendar.8fa02af5.js.map} +1 -1
  73. package/dist/chunks/{checkbox.696307fa.js → checkbox.959f35a2.js} +3 -3
  74. package/dist/chunks/{checkbox.696307fa.js.map → checkbox.959f35a2.js.map} +1 -1
  75. package/dist/chunks/{controls-group.5be9f363.js → controls-group.c1bd2e23.js} +3 -3
  76. package/dist/chunks/{controls-group.5be9f363.js.map → controls-group.c1bd2e23.js.map} +1 -1
  77. package/dist/chunks/{copy.bcfb0bd0.js → copy.ef632ddb.js} +4 -4
  78. package/dist/chunks/{copy.bcfb0bd0.js.map → copy.ef632ddb.js.map} +1 -1
  79. package/dist/chunks/{dialog-page.4051a197.js → dialog-page.95f9077f.js} +3 -3
  80. package/dist/chunks/{dialog-page.4051a197.js.map → dialog-page.95f9077f.js.map} +1 -1
  81. package/dist/chunks/{dropdown-default-textbox.2f55222c.js → dropdown-default-textbox.e5689274.js} +116 -114
  82. package/dist/chunks/dropdown-default-textbox.e5689274.js.map +1 -0
  83. package/dist/chunks/{dropdown.03b54389.js → dropdown.c6e6e118.js} +7 -7
  84. package/dist/chunks/{dropdown.03b54389.js.map → dropdown.c6e6e118.js.map} +1 -1
  85. package/dist/chunks/{error-message.c1768603.js → error-message.002c5b52.js} +2 -2
  86. package/dist/chunks/{error-message.c1768603.js.map → error-message.002c5b52.js.map} +1 -1
  87. package/dist/chunks/{fixed-scroller.c35f1726.js → fixed-scroller.56ab5fd5.js} +2 -2
  88. package/dist/chunks/{fixed-scroller.c35f1726.js.map → fixed-scroller.56ab5fd5.js.map} +1 -1
  89. package/dist/chunks/{footer-actions.98e94560.js → footer-actions.e44e3ef7.js} +4 -4
  90. package/dist/chunks/{footer-actions.98e94560.js.map → footer-actions.e44e3ef7.js.map} +1 -1
  91. package/dist/chunks/{index.b21b8d6c.js → index.037ae52f.js} +2 -2
  92. package/dist/chunks/{index.b21b8d6c.js.map → index.037ae52f.js.map} +1 -1
  93. package/dist/chunks/{index.23a4ac80.js → index.2464f954.js} +6 -6
  94. package/dist/chunks/{index.23a4ac80.js.map → index.2464f954.js.map} +1 -1
  95. package/dist/chunks/{index.368bb7c9.js → index.2bd868ee.js} +35 -31
  96. package/dist/chunks/index.2bd868ee.js.map +1 -0
  97. package/dist/chunks/{index.c446e6f7.js → index.3fbd3e7b.js} +109 -108
  98. package/dist/chunks/index.3fbd3e7b.js.map +1 -0
  99. package/dist/chunks/index.642a2c58.js +23 -0
  100. package/dist/chunks/{index.fd1de76a.js.map → index.642a2c58.js.map} +1 -1
  101. package/dist/chunks/{index.b29c7715.js → index.6a5bcd83.js} +6 -6
  102. package/dist/chunks/{index.b29c7715.js.map → index.6a5bcd83.js.map} +1 -1
  103. package/dist/chunks/{index.9a976e6e.js → index.86770f4e.js} +2 -2
  104. package/dist/chunks/{index.9a976e6e.js.map → index.86770f4e.js.map} +1 -1
  105. package/dist/chunks/{index.2dfc4f88.js → index.8a2cbeda.js} +3 -3
  106. package/dist/chunks/{index.2dfc4f88.js.map → index.8a2cbeda.js.map} +1 -1
  107. package/dist/chunks/index.995d6d84.js +125 -0
  108. package/dist/chunks/{index.14631d93.js.map → index.995d6d84.js.map} +1 -1
  109. package/dist/chunks/{index.0e4474d0.js → index.ac470d80.js} +7 -7
  110. package/dist/chunks/{index.0e4474d0.js.map → index.ac470d80.js.map} +1 -1
  111. package/dist/chunks/{index.27509a03.js → index.df6f2540.js} +12 -12
  112. package/dist/chunks/{index.27509a03.js.map → index.df6f2540.js.map} +1 -1
  113. package/dist/chunks/{index.32b6c1a6.js → index.e30ba012.js} +2 -2
  114. package/dist/chunks/{index.32b6c1a6.js.map → index.e30ba012.js.map} +1 -1
  115. package/dist/chunks/{listbox-option-tag.98903f6b.js → listbox-option-tag.42db4934.js} +3 -3
  116. package/dist/chunks/{listbox-option-tag.98903f6b.js.map → listbox-option-tag.42db4934.js.map} +1 -1
  117. package/dist/chunks/{listbox.a53a52ee.js → listbox.23422e37.js} +5 -5
  118. package/dist/chunks/{listbox.a53a52ee.js.map → listbox.23422e37.js.map} +1 -1
  119. package/dist/chunks/{loading-button.db938c88.js → loading-button.2363626a.js} +2 -2
  120. package/dist/chunks/{loading-button.db938c88.js.map → loading-button.2363626a.js.map} +1 -1
  121. package/dist/chunks/{tooltip.b2da7195.js → tooltip.57d595f3.js} +3 -3
  122. package/dist/chunks/{tooltip.b2da7195.js.map → tooltip.57d595f3.js.map} +1 -1
  123. package/dist/code-snippet.js +179 -163
  124. package/dist/code-snippet.js.map +1 -1
  125. package/dist/country.js +1 -1
  126. package/dist/currency.js +1 -1
  127. package/dist/data-grid.js +1 -1
  128. package/dist/date-picker.js +8 -8
  129. package/dist/date-range-picker.js +2 -2
  130. package/dist/date.js +1 -1
  131. package/dist/divider.js +1 -1
  132. package/dist/dropdown.js +6 -6
  133. package/dist/empty-state.js +3 -3
  134. package/dist/filter-bar.js +748 -743
  135. package/dist/filter-bar.js.map +1 -1
  136. package/dist/focus-trap.js +1 -1
  137. package/dist/form-layout.js +2 -2
  138. package/dist/header.js +4 -4
  139. package/dist/index.js +20 -20
  140. package/dist/info-icon.js +3 -3
  141. package/dist/input-field.js +4 -4
  142. package/dist/internal.js +8 -8
  143. package/dist/link.js +1 -1
  144. package/dist/loading-indicator.js +1 -1
  145. package/dist/menu.js +1 -1
  146. package/dist/modal-fullscreen.js +6 -6
  147. package/dist/modal.js +6 -6
  148. package/dist/pagination.js +4 -4
  149. package/dist/payment-method.js +2 -2
  150. package/dist/popover.js +1 -1
  151. package/dist/popper-container.js +1 -1
  152. package/dist/radio-group.js +4 -4
  153. package/dist/search-bar.js +14 -14
  154. package/dist/search-bar.js.map +1 -1
  155. package/dist/secondary-nav.js +2 -2
  156. package/dist/segmented-control.js +3 -3
  157. package/dist/sidepanel.js +6 -6
  158. package/dist/status.js +1 -1
  159. package/dist/stepper.js +3 -3
  160. package/dist/structured-list.js +1 -1
  161. package/dist/summary-grid.js +3 -3
  162. package/dist/tabs.js +3 -3
  163. package/dist/tag.js +3 -3
  164. package/dist/textarea.js +4 -4
  165. package/dist/timeline.js +7 -7
  166. package/dist/toast.js +3 -3
  167. package/dist/toggle.js +1 -1
  168. package/dist/tutorial.js +5 -5
  169. package/dist/typography.js +1 -1
  170. package/dist/web-types.json +10 -1
  171. package/package.json +2 -2
  172. package/dist/chunks/base-modal.d3079635.js.map +0 -1
  173. package/dist/chunks/dropdown-default-textbox.2f55222c.js.map +0 -1
  174. package/dist/chunks/index.14631d93.js +0 -125
  175. package/dist/chunks/index.368bb7c9.js.map +0 -1
  176. package/dist/chunks/index.c446e6f7.js.map +0 -1
  177. package/dist/chunks/index.fd1de76a.js +0 -21
@@ -1,29 +1,29 @@
1
- import { defineComponent as h, useAttrs as G, useSlots as Y, ref as J, computed as u, watch as Q, nextTick as X, openBlock as s, createElementBlock as r, normalizeClass as $, withKeys as _, createVNode as m, unref as o, withCtx as A, mergeProps as S, renderSlot as C, normalizeProps as P, createTextVNode as O, toDisplayString as g, Fragment as F, renderList as q, createElementVNode as H, guardReactiveProps as W, createCommentVNode as B, withModifiers as T, toHandlers as Z, createSlots as ee, withDirectives as U, vShow as M } from "vue";
2
- import { g as te } from "./unique-id.a2a2b458.js";
3
- import { u as oe } from "./use-has-slot.4d98bf29.js";
4
- import { B as ae } from "./index.14631d93.js";
5
- import { d as le } from "./debounce.b5ef6acf.js";
6
- import { C as ne } from "./cross-circle-fill.1abec1a2.js";
7
- import { _ as j } from "./_plugin-vue_export-helper.dad06003.js";
8
- import { s as V } from "./events.58c00e6d.js";
9
- import { C as de, a as se } from "./chevron-up.638a9f34.js";
1
+ import { defineComponent as C, useAttrs as Q, useSlots as W, ref as X, computed as i, watch as Z, nextTick as ee, openBlock as s, createElementBlock as r, normalizeClass as A, withKeys as I, createVNode as y, unref as o, withCtx as P, mergeProps as S, renderSlot as h, normalizeProps as K, createTextVNode as B, toDisplayString as g, Fragment as U, renderList as j, createElementVNode as z, guardReactiveProps as G, createCommentVNode as V, withModifiers as Y, toHandlers as te, createSlots as oe, withDirectives as q, vShow as H } from "vue";
2
+ import { g as ae } from "./unique-id.a2a2b458.js";
3
+ import { u as le } from "./use-has-slot.4d98bf29.js";
4
+ import { B as ne } from "./index.995d6d84.js";
5
+ import { d as de } from "./debounce.b5ef6acf.js";
6
+ import { C as se } from "./cross-circle-fill.1abec1a2.js";
7
+ import { _ as J } from "./_plugin-vue_export-helper.dad06003.js";
8
+ import { s as $ } from "./events.58c00e6d.js";
9
+ import { C as re, a as ie } from "./chevron-up.638a9f34.js";
10
10
  import "../assets/dropdown-default-textbox.css";
11
- var c = /* @__PURE__ */ ((t) => (t.DISABLED = "disabled", t.READONLY = "readonly", t.HAS_ITEMS = "has-items", t.OPENED = "opened", t.ERROR = "error", t))(c || {}), n = /* @__PURE__ */ ((t) => (t.OPEN = "dropdown-base-open", t.KEYDOWN = "dropdown-base-keydown", t.CLOSE = "dropdown-base-close", t.INPUT = "dropdown-base-input", t.CLEAR = "dropdown-base-clear", t))(n || {});
12
- const re = ["onKeydown"], ie = ["id", "value", "disabled", "readonly", "onKeydown"], ue = ["id"], ce = {
11
+ var p = /* @__PURE__ */ ((t) => (t.DISABLED = "disabled", t.READONLY = "readonly", t.HAS_ITEMS = "has-items", t.OPENED = "opened", t.ERROR = "error", t))(p || {}), n = /* @__PURE__ */ ((t) => (t.OPEN = "dropdown-base-open", t.KEYDOWN = "dropdown-base-keydown", t.CLOSE = "dropdown-base-close", t.INPUT = "dropdown-base-input", t.CLEAR = "dropdown-base-clear", t))(n || {});
12
+ const ue = ["onKeydown"], pe = ["id", "value", "disabled", "readonly", "onKeydown"], ce = ["id"], be = {
13
13
  key: 1,
14
14
  class: "b-dropdown-base-textbox__input-multiple-selected"
15
- }, pe = { class: "b-dropdown-base-textbox__input-selected-element" }, be = {
15
+ }, ye = { class: "b-dropdown-base-textbox__input-selected-element" }, fe = {
16
16
  key: 2,
17
17
  class: "b-dropdown-base-textbox__additional-items"
18
- }, ye = {
18
+ }, me = {
19
19
  key: 3,
20
20
  class: "b-dropdown-base-textbox__icon",
21
21
  "aria-hidden": "true"
22
- }, fe = ["onClick", "onKeydown", "onKeyup"], me = h({
22
+ }, xe = ["onClick", "onKeydown", "onKeyup"], we = C({
23
23
  name: "dropdown-base-textbox",
24
24
  inheritAttrs: !1
25
- }), xe = /* @__PURE__ */ h({
26
- ...me,
25
+ }), _e = /* @__PURE__ */ C({
26
+ ...we,
27
27
  props: {
28
28
  /**
29
29
  * The number of additional items that have been selected in the dropdown.
@@ -105,13 +105,13 @@ const re = ["onKeydown"], ie = ["id", "value", "disabled", "readonly", "onKeydow
105
105
  showSlotContentInMultiple: { type: Boolean, default: !1 }
106
106
  },
107
107
  setup(t, { emit: d }) {
108
- const e = t, E = G(), N = Y(), x = oe(N), i = J(null), w = te("textbox"), D = u(() => ({
109
- [`b-dropdown-base-textbox--${c.DISABLED}`]: e.disabled,
110
- [`b-dropdown-base-textbox--${c.READONLY}`]: e.readonly,
111
- [`b-dropdown-base-textbox--${c.HAS_ITEMS}`]: !!e.additionalItemsSelected
112
- })), k = u(() => ({
108
+ const e = t, E = Q(), N = W(), f = le(N), u = X(null), m = ae("textbox"), D = i(() => ({
109
+ [`b-dropdown-base-textbox--${p.DISABLED}`]: e.disabled,
110
+ [`b-dropdown-base-textbox--${p.READONLY}`]: e.readonly,
111
+ [`b-dropdown-base-textbox--${p.HAS_ITEMS}`]: !!e.additionalItemsSelected
112
+ })), k = i(() => ({
113
113
  ["b-dropdown-base-textbox__input--dynamic-filtering"]: e.dynamicFiltering
114
- })), v = u(() => e.dynamicFiltering && !!e.value && e.open), I = u(
114
+ })), x = i(() => e.dynamicFiltering && !!e.value && e.open), w = i(
115
115
  () => {
116
116
  var l;
117
117
  return {
@@ -125,42 +125,44 @@ const re = ["onKeydown"], ie = ["id", "value", "disabled", "readonly", "onKeydow
125
125
  "aria-disabled": e.disabled ? !0 : null
126
126
  };
127
127
  }
128
- ), a = u(() => e.dynamicFiltering && (e.open || e.alwaysComboboxIsInput));
129
- Q(
130
- () => a.value,
128
+ ), a = i(
129
+ () => e.multiple ? e.selectedValueItem : []
130
+ ), _ = i(() => e.dynamicFiltering && (e.open || e.alwaysComboboxIsInput)), R = i(() => e.selectedValueItem && !e.multiple), v = i(
131
+ () => e.multiple && e.selectedValueItem && a.value.length > 0 && e.showSlotContentInMultiple
132
+ );
133
+ Z(
134
+ () => _.value,
131
135
  () => {
132
- a.value && !e.alwaysComboboxIsInput && X(() => {
133
- i.value.focus();
136
+ _.value && !e.alwaysComboboxIsInput && ee(() => {
137
+ u.value.focus();
134
138
  });
135
139
  }
136
140
  );
137
- const K = () => {
138
- !e.disabled && !e.readonly && (i.value.focus(), d(n.OPEN));
139
- }, L = () => {
140
- e.open && (i.value.focus(), d(n.CLOSE));
141
- }, b = (l) => e.open && l.target.tagName === "INPUT" ? null : e.open ? L() : K(), y = () => {
142
- d(n.CLEAR), d(n.INPUT, ""), i.value.focus();
143
- }, R = le((l) => {
141
+ const L = () => {
142
+ !e.disabled && !e.readonly && (u.value.focus(), d(n.OPEN));
143
+ }, F = () => {
144
+ e.open && (u.value.focus(), d(n.CLOSE));
145
+ }, T = (l) => e.open && l.target.tagName === "INPUT" ? null : e.open ? F() : L(), O = () => {
146
+ d(n.CLEAR), d(n.INPUT, ""), u.value.focus();
147
+ }, M = de((l) => {
144
148
  !e.readonly && !e.disabled ? d(n.INPUT, l.target.value) : (l.preventDefault(), l.stopPropagation());
145
- }, e.debounceTime), z = u(
146
- () => e.multiple ? e.selectedValueItem : []
147
- );
148
- return (l, f) => (s(), r("div", {
149
- class: $(l.$attrs.class),
149
+ }, e.debounceTime);
150
+ return (l, b) => (s(), r("div", {
151
+ class: A(l.$attrs.class),
150
152
  "data-testid": "textbox-wrapper",
151
- onClick: b,
152
- onKeydown: _(L, ["escape"])
153
+ onClick: T,
154
+ onKeydown: I(F, ["escape"])
153
155
  }, [
154
- m(o(ae), {
155
- class: $(["b-dropdown-base-textbox", o(D)]),
156
+ y(o(ne), {
157
+ class: A(["b-dropdown-base-textbox", o(D)]),
156
158
  el: "div",
157
159
  "data-testid": "base-textbox"
158
160
  }, {
159
- default: A(() => [
160
- o(a) ? (s(), r("input", S({ key: 0 }, o(I), {
161
- id: o(w),
161
+ default: P(() => [
162
+ o(_) ? (s(), r("input", S({ key: 0 }, o(w), {
163
+ id: o(m),
162
164
  ref_key: "textbox",
163
- ref: i,
165
+ ref: u,
164
166
  class: "b-dropdown-base-textbox__input",
165
167
  role: "combobox",
166
168
  type: "text",
@@ -169,63 +171,63 @@ const re = ["onKeydown"], ie = ["id", "value", "disabled", "readonly", "onKeydow
169
171
  disabled: t.disabled ? !0 : null,
170
172
  readonly: t.readonly,
171
173
  onKeydown: [
172
- f[0] || (f[0] = (p) => l.$emit(o(n).KEYDOWN, p)),
173
- _(b, ["enter"])
174
+ b[0] || (b[0] = (c) => l.$emit(o(n).KEYDOWN, c)),
175
+ I(T, ["enter"])
174
176
  ],
175
- onInput: f[1] || (f[1] = //@ts-ignore
176
- (...p) => o(R) && o(R)(...p))
177
- }), null, 16, ie)) : (s(), r("div", S({
177
+ onInput: b[1] || (b[1] = //@ts-ignore
178
+ (...c) => o(M) && o(M)(...c))
179
+ }), null, 16, pe)) : (s(), r("div", S({
178
180
  key: 1,
179
- id: o(w)
180
- }, o(I), {
181
+ id: o(m)
182
+ }, o(w), {
181
183
  ref_key: "textbox",
182
- ref: i,
184
+ ref: u,
183
185
  class: ["b-dropdown-base-textbox__input", o(k)],
184
186
  role: "combobox",
185
187
  tabindex: 0
186
188
  }), [
187
- t.selectedValueItem && !t.multiple ? C(l.$slots, "default", P(S({ key: 0 }, t.selectedValueItem)), () => [
188
- O(g(t.displayValue), 1)
189
- ], !0) : t.selectedValueItem && t.showSlotContentInMultiple ? (s(), r("div", ce, [
190
- (s(!0), r(F, null, q(o(z), (p) => (s(), r("div", {
191
- key: p.value
189
+ o(R) ? h(l.$slots, "default", K(S({ key: 0 }, t.selectedValueItem)), () => [
190
+ B(g(t.displayValue), 1)
191
+ ], !0) : o(v) ? (s(), r("div", be, [
192
+ (s(!0), r(U, null, j(o(a), (c) => (s(), r("div", {
193
+ key: c.value
192
194
  }, [
193
- H("div", pe, [
194
- C(l.$slots, "default", P(W(p)), () => [
195
- O(g(t.displayValue), 1)
195
+ z("div", ye, [
196
+ h(l.$slots, "default", K(G(c)), () => [
197
+ B(g(t.displayValue), 1)
196
198
  ], !0)
197
199
  ])
198
200
  ]))), 128))
199
- ])) : (s(), r(F, { key: 2 }, [
200
- O(g(t.displayValue), 1)
201
+ ])) : (s(), r(U, { key: 2 }, [
202
+ B(g(t.displayValue), 1)
201
203
  ], 64))
202
- ], 16, ue)),
203
- t.additionalItemsSelected ? (s(), r("span", be, g(t.additionalItemsSelected), 1)) : B("", !0),
204
- o(x)("icon") && !o(v) ? (s(), r("span", ye, [
205
- C(l.$slots, "icon", {}, void 0, !0)
206
- ])) : B("", !0),
207
- o(v) ? (s(), r("span", {
204
+ ], 16, ce)),
205
+ t.additionalItemsSelected ? (s(), r("span", fe, g(t.additionalItemsSelected), 1)) : V("", !0),
206
+ o(f)("icon") && !o(x) ? (s(), r("span", me, [
207
+ h(l.$slots, "icon", {}, void 0, !0)
208
+ ])) : V("", !0),
209
+ o(x) ? (s(), r("span", {
208
210
  key: 4,
209
211
  class: "b-dropdown-base-textbox__clear-search",
210
212
  tabindex: "0",
211
213
  "data-testid": "clear-search-button",
212
- onClick: T(y, ["stop"]),
213
- onKeydown: _(T(y, ["stop"]), ["enter"]),
214
- onKeyup: _(y, ["space"])
214
+ onClick: Y(O, ["stop"]),
215
+ onKeydown: I(Y(O, ["stop"]), ["enter"]),
216
+ onKeyup: I(O, ["space"])
215
217
  }, [
216
- m(o(ne), { "svg-title": "clearSearch" })
217
- ], 40, fe)) : B("", !0)
218
+ y(o(se), { "svg-title": "clearSearch" })
219
+ ], 40, xe)) : V("", !0)
218
220
  ]),
219
221
  _: 3
220
222
  }, 8, ["class"])
221
- ], 42, re));
223
+ ], 42, ue));
222
224
  }
223
225
  });
224
- const we = /* @__PURE__ */ j(xe, [["__scopeId", "data-v-a9372676"]]), ve = { class: "b-dropdown-default-textbox__chevron" }, Ie = h({
226
+ const ve = /* @__PURE__ */ J(_e, [["__scopeId", "data-v-544908a0"]]), Ie = { class: "b-dropdown-default-textbox__chevron" }, ge = C({
225
227
  name: "dropdown-default-textbox",
226
228
  inheritAttrs: !1
227
- }), _e = /* @__PURE__ */ h({
228
- ...Ie,
229
+ }), Se = /* @__PURE__ */ C({
230
+ ...ge,
229
231
  props: {
230
232
  /**
231
233
  * The number of additional items that have been selected in the dropdown.
@@ -317,64 +319,64 @@ const we = /* @__PURE__ */ j(xe, [["__scopeId", "data-v-a9372676"]]), ve = { cla
317
319
  },
318
320
  emits: ["clear", "close", "input", "keydown", "open"],
319
321
  setup(t, { emit: d }) {
320
- const e = t, E = Y(), N = u(() => ({
321
- [`b-dropdown-default-textbox--${c.ERROR}`]: !e.disabled && !e.readonly && e.isInvalid,
322
- [`b-dropdown-default-textbox--${c.DISABLED}`]: e.disabled,
323
- [`b-dropdown-default-textbox--${c.READONLY}`]: e.readonly,
324
- [`b-dropdown-default-textbox--${c.OPENED}`]: e.open,
322
+ const e = t, E = W(), N = i(() => ({
323
+ [`b-dropdown-default-textbox--${p.ERROR}`]: !e.disabled && !e.readonly && e.isInvalid,
324
+ [`b-dropdown-default-textbox--${p.DISABLED}`]: e.disabled,
325
+ [`b-dropdown-default-textbox--${p.READONLY}`]: e.readonly,
326
+ [`b-dropdown-default-textbox--${p.OPENED}`]: e.open,
325
327
  "b-dropdown-default-textbox--condensed": e.condensed
326
- })), x = u(() => e.open && !e.disabled && !e.readonly), i = (a) => {
328
+ })), f = i(() => e.open && !e.disabled && !e.readonly), u = (a) => {
327
329
  d("input", a);
328
- }, w = (a) => {
330
+ }, m = (a) => {
329
331
  d("keydown", a);
330
332
  }, D = (a) => {
331
- V(a), d("open");
333
+ $(a), d("open");
332
334
  }, k = (a) => {
333
- V(a), d("close");
334
- }, v = (a) => {
335
- V(a), d("clear");
336
- }, I = {
337
- [n.INPUT]: i,
335
+ $(a), d("close");
336
+ }, x = (a) => {
337
+ $(a), d("clear");
338
+ }, w = {
339
+ [n.INPUT]: u,
338
340
  [n.OPEN]: D,
339
341
  [n.CLOSE]: k,
340
- [n.CLEAR]: v,
341
- [n.KEYDOWN]: w
342
+ [n.CLEAR]: x,
343
+ [n.KEYDOWN]: m
342
344
  };
343
- return (a, K) => (s(), r("div", {
344
- class: $(["b-dropdown-default-textbox", o(N)]),
345
+ return (a, _) => (s(), r("div", {
346
+ class: A(["b-dropdown-default-textbox", o(N)]),
345
347
  "data-testid": "default-textbox"
346
348
  }, [
347
- m(we, S({ ...a.$attrs, ...a.$props }, {
349
+ y(ve, S({ ...a.$attrs, ...a.$props }, {
348
350
  class: "b-dropdown-default-textbox__textbox",
349
351
  value: t.value
350
- }, Z(I)), ee({
351
- icon: A(() => [
352
- H("div", ve, [
353
- U(m(o(de), { "svg-title": "opened" }, null, 512), [
354
- [M, o(x)]
352
+ }, te(w)), oe({
353
+ icon: P(() => [
354
+ z("div", Ie, [
355
+ q(y(o(re), { "svg-title": "opened" }, null, 512), [
356
+ [H, o(f)]
355
357
  ]),
356
- U(m(o(se), { "svg-title": "closed" }, null, 512), [
357
- [M, !o(x)]
358
+ q(y(o(ie), { "svg-title": "closed" }, null, 512), [
359
+ [H, !o(f)]
358
360
  ])
359
361
  ])
360
362
  ]),
361
363
  _: 2
362
364
  }, [
363
- q(o(E), (L, b) => ({
364
- name: b,
365
- fn: A((y) => [
366
- C(a.$slots, b, P(W(y)), void 0, !0)
365
+ j(o(E), (R, v) => ({
366
+ name: v,
367
+ fn: P((L) => [
368
+ h(a.$slots, v, K(G(L)), void 0, !0)
367
369
  ])
368
370
  }))
369
371
  ]), 1040, ["value"])
370
372
  ], 2));
371
373
  }
372
374
  });
373
- const Oe = /* @__PURE__ */ j(_e, [["__scopeId", "data-v-742f436a"]]);
375
+ const Ve = /* @__PURE__ */ J(Se, [["__scopeId", "data-v-742f436a"]]);
374
376
  export {
375
- c as D,
377
+ p as D,
376
378
  n as a,
377
- we as b,
378
- Oe as c
379
+ ve as b,
380
+ Ve as c
379
381
  };
380
- //# sourceMappingURL=dropdown-default-textbox.2f55222c.js.map
382
+ //# sourceMappingURL=dropdown-default-textbox.e5689274.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-default-textbox.e5689274.js","sources":["../../../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 { PropType } from 'vue';\nimport { Booleanish } from '@/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 :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\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 role=\"combobox\"\n :tabindex=\"0\"\n >\n <slot v-if=\"shouldShowSingleSelectSlot\" v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\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=\"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-icon :svg-title=\"'clearSearch'\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { debounce } from '@/utils/ts/debounce';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\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 | 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 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 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 } as HTMLAttributes)\n );\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as 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 = () => {\n if (!props.disabled && !props.readonly) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.OPEN);\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</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 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 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, PropType, useSlots } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\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 | 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 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</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":["DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","__default__$1","defineComponent","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","textbox","ref","textboxId","generateUid","conditionalClasses","computed","props","comboboxConditionalClasses","isFiltering","ariaAttributes","_a","selectedValueItems","shouldShowInput","shouldShowSingleSelectSlot","shouldShowMultipleSlot","watch","nextTick","onOpenDropdown","emit","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","__default__","isDropdownOpen","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":"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"}
@@ -1,6 +1,6 @@
1
1
  import { ref as w, watch as Se, computed as f, defineComponent as z, useSlots as xe, toRefs as we, openBlock as g, createBlock as P, resolveDynamicComponent as Le, unref as a, mergeProps as A, withCtx as F, createElementVNode as Q, withKeys as ze, createVNode as J, toHandlers as Z, createSlots as ae, renderList as oe, renderSlot as Y, normalizeProps as ne, guardReactiveProps as se, createElementBlock as M, toDisplayString as ue, createCommentVNode as K, normalizeClass as ie, withDirectives as G, vShow as ve, nextTick as T, useAttrs as We, toRef as _, inject as je, createTextVNode as Ue } from "vue";
2
- import { d as me, B as qe } from "./index.14631d93.js";
3
- import { D as le, a as ye, b as He, c as Je } from "./dropdown-default-textbox.2f55222c.js";
2
+ import { d as me, B as qe } from "./index.995d6d84.js";
3
+ import { D as le, a as ye, b as He, c as Je } from "./dropdown-default-textbox.e5689274.js";
4
4
  import { _ as q } from "./_plugin-vue_export-helper.dad06003.js";
5
5
  import { g as U } from "./unique-id.a2a2b458.js";
6
6
  import { u as Ye } from "./aria-label.ac9651a5.js";
@@ -8,11 +8,11 @@ import { u as ce } from "./i18n.f7e6533e.js";
8
8
  import { u as Ze } from "./use-form-layout-loading.d03e5d48.js";
9
9
  import { B as Ge } from "./directive.0408e565.js";
10
10
  import { B as R, a as Qe } from "./keyboard-navigation.ca47dfa8.js";
11
- import { b as c, a as re, B as de, u as Xe } from "./listbox.a53a52ee.js";
11
+ import { b as c, a as re, B as de, u as Xe } from "./listbox.23422e37.js";
12
12
  import { u as Ve } from "./use-has-slot.4d98bf29.js";
13
- import { F as et, E as tt } from "./error-message.c1768603.js";
14
- import { a as be } from "./index.2dfc4f88.js";
15
- import { a as lt } from "./index.b29c7715.js";
13
+ import { F as et, E as tt } from "./error-message.002c5b52.js";
14
+ import { a as be } from "./index.8a2cbeda.js";
15
+ import { a as lt } from "./index.6a5bcd83.js";
16
16
  import "../assets/dropdown.css";
17
17
  var D = /* @__PURE__ */ ((e) => (e.DEFAULT = "DropdownInputDefault", e.SMALL = "DropdownInputSmall", e))(D || {});
18
18
  const fe = {
@@ -900,4 +900,4 @@ export {
900
900
  D as a,
901
901
  Ct as u
902
902
  };
903
- //# sourceMappingURL=dropdown.03b54389.js.map
903
+ //# sourceMappingURL=dropdown.c6e6e118.js.map