@adyen/bento-vue2 1.74.0 → 1.75.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.
- package/dist/@types/index.d.ts +1693 -616
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid-template.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-tag.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{checkbox-group.DETXTJqI.js → checkbox-group.CtNVRcmP.js} +2 -2
- package/dist/chunks/{checkbox-group.DETXTJqI.js.map → checkbox-group.CtNVRcmP.js.map} +1 -1
- package/dist/chunks/{checkbox.BPtHAAEa.js → checkbox.nyUc0gLb.js} +18 -18
- package/dist/chunks/{checkbox.BPtHAAEa.js.map → checkbox.nyUc0gLb.js.map} +1 -1
- package/dist/chunks/{code-snippet.VtrsOTEC.js → code-snippet.DFf3KMSi.js} +2 -2
- package/dist/chunks/{code-snippet.VtrsOTEC.js.map → code-snippet.DFf3KMSi.js.map} +1 -1
- package/dist/chunks/{currency.DDB4G_A8.js → currency.AvvbekWO.js} +15 -14
- package/dist/chunks/{currency.DDB4G_A8.js.map → currency.AvvbekWO.js.map} +1 -1
- package/dist/chunks/{data-grid.DN9xml8y.js → data-grid.D5fTwSvx.js} +1249 -1212
- package/dist/chunks/data-grid.D5fTwSvx.js.map +1 -0
- package/dist/chunks/{date-picker.DoYYzWcA.js → date-picker.BLii86mM.js} +12 -12
- package/dist/chunks/{date-picker.DoYYzWcA.js.map → date-picker.BLii86mM.js.map} +1 -1
- package/dist/chunks/{date-range-picker.C_pJ8yH5.js → date-range-picker.Btgdly1q.js} +14 -14
- package/dist/chunks/{date-range-picker.C_pJ8yH5.js.map → date-range-picker.Btgdly1q.js.map} +1 -1
- package/dist/chunks/dropdown-tag.CpvU8eSZ.js +260 -0
- package/dist/chunks/dropdown-tag.CpvU8eSZ.js.map +1 -0
- package/dist/chunks/{dropdown.BOvtYKXS.js → dropdown.RxD2TqnP.js} +14 -14
- package/dist/chunks/{dropdown.BOvtYKXS.js.map → dropdown.RxD2TqnP.js.map} +1 -1
- package/dist/chunks/es6.MoTTyETW.js.map +1 -1
- package/dist/chunks/{filter-bar.DzHJi42d.js → filter-bar.DfTOz6xI.js} +9 -9
- package/dist/chunks/filter-bar.DfTOz6xI.js.map +1 -0
- package/dist/chunks/{header-with-views.t5Fr63SD.js → header-with-views.AKprhFPj.js} +3 -3
- package/dist/chunks/{header-with-views.t5Fr63SD.js.map → header-with-views.AKprhFPj.js.map} +1 -1
- package/dist/chunks/{input-field-password.Dm3HYonF.js → input-field-password.CSfXqEbT.js} +47 -38
- package/dist/chunks/input-field-password.CSfXqEbT.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.bZauIuHJ.js → input-field-phone-number.oa4hXQdK.js} +3 -3
- package/dist/chunks/{input-field-phone-number.bZauIuHJ.js.map → input-field-phone-number.oa4hXQdK.js.map} +1 -1
- package/dist/chunks/input-field.DdQu3b1-.js +161 -0
- package/dist/chunks/input-field.DdQu3b1-.js.map +1 -0
- package/dist/chunks/{pagination.CKD9FDrA.js → pagination.C0YW_A_o.js} +2 -2
- package/dist/chunks/{pagination.CKD9FDrA.js.map → pagination.C0YW_A_o.js.map} +1 -1
- package/dist/chunks/radio-group.AcYMFudv.js.map +1 -1
- package/dist/chunks/{rich-text-editor.BZgQ578S.js → rich-text-editor.CKWtFjkF.js} +2 -2
- package/dist/chunks/{rich-text-editor.BZgQ578S.js.map → rich-text-editor.CKWtFjkF.js.map} +1 -1
- package/dist/chunks/{search-bar.c-w7Uky2.js → search-bar.DJVfPz-f.js} +3 -3
- package/dist/chunks/{search-bar.c-w7Uky2.js.map → search-bar.DJVfPz-f.js.map} +1 -1
- package/dist/chunks/{secondary-nav.D69COlqF.js → secondary-nav.BFiTQaag.js} +2 -2
- package/dist/chunks/{secondary-nav.D69COlqF.js.map → secondary-nav.BFiTQaag.js.map} +1 -1
- package/dist/chunks/{selection-card-group.8UIir78G.js → selection-card-group.D4rcUyvV.js} +58 -120
- package/dist/chunks/{selection-card-group.8UIir78G.js.map → selection-card-group.D4rcUyvV.js.map} +1 -1
- package/dist/chunks/textarea.CIQuLWQ8.js.map +1 -1
- package/dist/chunks/{use-cached-selected-values.IsfhJHxQ.js → use-cached-selected-values.BZd3CTeP.js} +334 -314
- package/dist/chunks/use-cached-selected-values.BZd3CTeP.js.map +1 -0
- package/dist/code-snippet.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/index.js +221 -220
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/internal.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/styles/bento-dark.css +1 -1
- package/dist/styles/bento-light.css +1 -1
- package/dist/styles/bento.css +1 -1
- package/dist/styles/legacy.css +1 -1
- package/dist/styles/styleguide.css +1 -1
- package/dist/web-types.json +686 -1392
- package/package.json +6 -6
- package/dist/chunks/data-grid.DN9xml8y.js.map +0 -1
- package/dist/chunks/dropdown-tag.DBnurtCQ.js +0 -245
- package/dist/chunks/dropdown-tag.DBnurtCQ.js.map +0 -1
- package/dist/chunks/filter-bar.DzHJi42d.js.map +0 -1
- package/dist/chunks/input-field-password.Dm3HYonF.js.map +0 -1
- package/dist/chunks/input-field.D52XYEzU.js +0 -157
- package/dist/chunks/input-field.D52XYEzU.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.IsfhJHxQ.js.map +0 -1
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
import { defineComponent as a, computed as v, toRefs as h, ref as d, watch as b } from "vue";
|
|
2
|
-
import { B } from "./avatar.CeDqq2Z-.js";
|
|
3
|
-
import { B as i, u as $ } from "./dropdown.BOvtYKXS.js";
|
|
4
|
-
import { n as _ } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
5
|
-
import { d as I, B as g } from "./typography.hlOAxsEn.js";
|
|
6
|
-
import { u as x } from "./use-country-items.B3Cd3Tdo.js";
|
|
7
|
-
import { B as f } from "./country.types.C0Q_hhgJ.js";
|
|
8
|
-
import { L as y } from "./listbox-option-tag.Dl8GwHLT.js";
|
|
9
|
-
import { B as C } from "./payment-method.DtvfUnit.js";
|
|
10
|
-
import "../assets/dropdown-tag.css";
|
|
11
|
-
const S = a({
|
|
12
|
-
name: "bento-dropdown-avatar"
|
|
13
|
-
}), D = /* @__PURE__ */ a({
|
|
14
|
-
...S,
|
|
15
|
-
props: {
|
|
16
|
-
items: { default: () => [] }
|
|
17
|
-
},
|
|
18
|
-
emits: ["input", "show-more", "open"],
|
|
19
|
-
setup(s, { emit: e }) {
|
|
20
|
-
const n = s, t = (r) => e("input", r), o = v(() => n.items.map(({ value: r, label: p, src: u }) => ({ value: r, label: p, data: u })));
|
|
21
|
-
return { __sfc: !0, props: n, emit: e, onInput: t, dropdownItems: o, BentoAvatar: B, BentoDropdown: i };
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
var T = function() {
|
|
25
|
-
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
26
|
-
return n("div", [n(t.BentoDropdown, e._b({ attrs: { items: t.dropdownItems }, on: { input: t.onInput, "show-more": function(o) {
|
|
27
|
-
return t.emit("show-more");
|
|
28
|
-
}, open: function(o) {
|
|
29
|
-
return t.emit("open");
|
|
30
|
-
} }, scopedSlots: e._u([{ key: "default", fn: function({ label: o, data: r }) {
|
|
31
|
-
return [n(t.BentoAvatar, { attrs: { username: o, src: r } })];
|
|
32
|
-
} }]) }, "bento-dropdown", e.$props, !1))], 1);
|
|
33
|
-
}, P = [], F = /* @__PURE__ */ _(
|
|
34
|
-
D,
|
|
35
|
-
T,
|
|
36
|
-
P,
|
|
37
|
-
!1,
|
|
38
|
-
null,
|
|
39
|
-
null
|
|
40
|
-
);
|
|
41
|
-
const pe = F.exports, L = a({
|
|
42
|
-
name: "b-dropdown-country"
|
|
43
|
-
}), M = /* @__PURE__ */ a({
|
|
44
|
-
...L,
|
|
45
|
-
props: {
|
|
46
|
-
...i.props,
|
|
47
|
-
/**
|
|
48
|
-
* The option elements to populate the country dropdown with.
|
|
49
|
-
* It must be an array of {@see BentoCountryListboxOptions }
|
|
50
|
-
* * @deprecated {string} value.label - Use BentoDropdown instead of custom labels
|
|
51
|
-
* * @property {BentoCountryCode | string} value.value - Country code of the option
|
|
52
|
-
*/
|
|
53
|
-
items: {
|
|
54
|
-
type: Array,
|
|
55
|
-
default: () => []
|
|
56
|
-
},
|
|
57
|
-
/**
|
|
58
|
-
* Which label variant to display.
|
|
59
|
-
* @values iso, name, phone_code, capital
|
|
60
|
-
*/
|
|
61
|
-
variant: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: f.CUSTOM,
|
|
64
|
-
validator: (s) => Object.values(f).includes(s)
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
emits: ["input", "show-more", "open"],
|
|
68
|
-
setup(s, { emit: e }) {
|
|
69
|
-
const n = s, t = (u) => e("input", u), { variant: o, items: r } = h(n), p = x(o, r);
|
|
70
|
-
return (o.value === "custom" || r.value.some((u) => u.label)) && I(
|
|
71
|
-
'BentoDropdownCountry "custom" variant and "items" prop "label" key',
|
|
72
|
-
"Use any of the other BentoDropdownCountry variants instead OR use BentoDropdown component for custom labels",
|
|
73
|
-
"2.0.0"
|
|
74
|
-
), { __sfc: !0, props: n, emit: e, onInput: t, variant: o, items: r, countryItems: p, BentoTypography: g, BentoDropdown: i };
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
var O = function() {
|
|
78
|
-
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
79
|
-
return n("div", [n(t.BentoDropdown, e._b({ attrs: { items: t.countryItems }, on: { input: t.onInput, "show-more": function(o) {
|
|
80
|
-
return t.emit("show-more");
|
|
81
|
-
}, open: function(o) {
|
|
82
|
-
return t.emit("open");
|
|
83
|
-
} }, scopedSlots: e._u([{ key: "default", fn: function({ label: o }) {
|
|
84
|
-
return [n(t.BentoTypography, { attrs: { el: "span" } }, [e._v(e._s(o))])];
|
|
85
|
-
} }]) }, "bento-dropdown", e.$props, !1))], 1);
|
|
86
|
-
}, R = [], k = /* @__PURE__ */ _(
|
|
87
|
-
M,
|
|
88
|
-
O,
|
|
89
|
-
R,
|
|
90
|
-
!1,
|
|
91
|
-
null,
|
|
92
|
-
null
|
|
93
|
-
);
|
|
94
|
-
const ue = k.exports, z = a({
|
|
95
|
-
name: "b-dropdown-currency"
|
|
96
|
-
}), A = /* @__PURE__ */ a({
|
|
97
|
-
...z,
|
|
98
|
-
props: {
|
|
99
|
-
items: { default: () => [] }
|
|
100
|
-
},
|
|
101
|
-
emits: ["input", "show-more", "open"],
|
|
102
|
-
setup(s, { emit: e }) {
|
|
103
|
-
const n = s, t = (p) => e("input", p), o = d([]);
|
|
104
|
-
b(
|
|
105
|
-
() => n.items,
|
|
106
|
-
() => o.value = n.items,
|
|
107
|
-
{ immediate: !0 }
|
|
108
|
-
);
|
|
109
|
-
const r = n.search ? n.search : {
|
|
110
|
-
debounceTime: 500,
|
|
111
|
-
searchEvent: async (p) => {
|
|
112
|
-
var m;
|
|
113
|
-
const u = n.items.map((l) => ({
|
|
114
|
-
...l,
|
|
115
|
-
label: `${l.value} ${l.label}`
|
|
116
|
-
})), c = $(
|
|
117
|
-
d(p),
|
|
118
|
-
d(u),
|
|
119
|
-
(m = n == null ? void 0 : n.search) == null ? void 0 : m.searchEvent,
|
|
120
|
-
d(!1)
|
|
121
|
-
).value, w = c == null ? void 0 : c.map((l) => ({
|
|
122
|
-
...l,
|
|
123
|
-
label: l.label.substring(l.value.length + 1)
|
|
124
|
-
}));
|
|
125
|
-
o.value = w;
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
return { __sfc: !0, props: n, emit: e, onInput: t, filteredItems: o, search: r, ListboxOptionTag: y, BentoDropdown: i };
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
var E = function() {
|
|
132
|
-
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
133
|
-
return n(t.BentoDropdown, e._b({ attrs: { search: t.search, items: t.filteredItems }, on: { input: t.onInput, "show-more": function(o) {
|
|
134
|
-
return t.emit("show-more");
|
|
135
|
-
}, open: function(o) {
|
|
136
|
-
return t.emit("open");
|
|
137
|
-
} }, scopedSlots: e._u([{ key: "default", fn: function(o) {
|
|
138
|
-
return [n(t.ListboxOptionTag, { attrs: { option: o } })];
|
|
139
|
-
} }]) }, "bento-dropdown", e.$props, !1));
|
|
140
|
-
}, U = [], V = /* @__PURE__ */ _(
|
|
141
|
-
A,
|
|
142
|
-
E,
|
|
143
|
-
U,
|
|
144
|
-
!1,
|
|
145
|
-
null,
|
|
146
|
-
null
|
|
147
|
-
);
|
|
148
|
-
const le = V.exports, j = a({
|
|
149
|
-
name: "bento-dropdown-payment-method"
|
|
150
|
-
}), q = /* @__PURE__ */ a({
|
|
151
|
-
...j,
|
|
152
|
-
props: {
|
|
153
|
-
items: { default: () => [] }
|
|
154
|
-
},
|
|
155
|
-
emits: ["input", "show-more", "open"],
|
|
156
|
-
setup(s, { emit: e }) {
|
|
157
|
-
return { __sfc: !0, emit: e, onInput: (t) => e("input", t), BentoPaymentMethod: C, BentoDropdown: i };
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
var G = function() {
|
|
161
|
-
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
162
|
-
return n("div", [n(t.BentoDropdown, e._b({ on: { input: t.onInput, "show-more": function(o) {
|
|
163
|
-
return t.emit("show-more");
|
|
164
|
-
}, open: function(o) {
|
|
165
|
-
return t.emit("open");
|
|
166
|
-
} }, scopedSlots: e._u([{ key: "default", fn: function({ value: o, label: r }) {
|
|
167
|
-
return [n(t.BentoPaymentMethod, { attrs: { type: o, label: r } })];
|
|
168
|
-
} }]) }, "bento-dropdown", e.$props, !1))], 1);
|
|
169
|
-
}, H = [], J = /* @__PURE__ */ _(
|
|
170
|
-
q,
|
|
171
|
-
G,
|
|
172
|
-
H,
|
|
173
|
-
!1,
|
|
174
|
-
null,
|
|
175
|
-
null
|
|
176
|
-
);
|
|
177
|
-
const ie = J.exports, K = a({
|
|
178
|
-
name: "bento-dropdown-tag"
|
|
179
|
-
}), N = /* @__PURE__ */ a({
|
|
180
|
-
...K,
|
|
181
|
-
props: {
|
|
182
|
-
description: null,
|
|
183
|
-
disabled: { type: Boolean },
|
|
184
|
-
errorMessage: null,
|
|
185
|
-
label: null,
|
|
186
|
-
optional: { type: Boolean },
|
|
187
|
-
placeholder: null,
|
|
188
|
-
readonly: { type: Boolean },
|
|
189
|
-
required: { type: Boolean },
|
|
190
|
-
tooltipText: null,
|
|
191
|
-
ariaLabel: null,
|
|
192
|
-
condensed: { type: Boolean },
|
|
193
|
-
emptyState: null,
|
|
194
|
-
dynamicFiltering: { type: Boolean },
|
|
195
|
-
error: { type: Boolean },
|
|
196
|
-
hasMoreItems: { type: Boolean },
|
|
197
|
-
isOptionDisabled: { type: Function },
|
|
198
|
-
items: { default: () => [] },
|
|
199
|
-
loading: { type: Boolean },
|
|
200
|
-
componentLoading: { type: Boolean },
|
|
201
|
-
lazyLoadType: null,
|
|
202
|
-
multiple: { type: Boolean },
|
|
203
|
-
search: null,
|
|
204
|
-
showSlotContentInMultiple: { type: Boolean },
|
|
205
|
-
size: null,
|
|
206
|
-
staticCategories: { type: Boolean },
|
|
207
|
-
value: null,
|
|
208
|
-
virtualScroll: { type: Boolean },
|
|
209
|
-
enableValueLabelPair: { type: Boolean }
|
|
210
|
-
},
|
|
211
|
-
emits: ["input", "show-more", "open"],
|
|
212
|
-
setup(s, { emit: e }) {
|
|
213
|
-
const n = s, t = (r) => e("input", r), o = v(() => {
|
|
214
|
-
var r;
|
|
215
|
-
return (r = n.items) == null ? void 0 : r.map(({ label: p, value: u, variant: c }) => ({ label: p, value: u, data: c }));
|
|
216
|
-
});
|
|
217
|
-
return { __sfc: !0, props: n, emit: e, onInput: t, tagItems: o, ListboxOptionTag: y, BentoDropdown: i };
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
var Q = function() {
|
|
221
|
-
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
222
|
-
return n(t.BentoDropdown, e._b({ staticClass: "b-dropdown-tag", attrs: { items: t.tagItems, "show-slot-content-in-multiple": "" }, on: { input: t.onInput, "show-more": function(o) {
|
|
223
|
-
return t.emit("show-more");
|
|
224
|
-
}, open: function(o) {
|
|
225
|
-
return t.emit("open");
|
|
226
|
-
} }, scopedSlots: e._u([{ key: "default", fn: function({ label: o, data: r }) {
|
|
227
|
-
return [n(t.ListboxOptionTag, { attrs: { option: { value: o, data: r, label: "" } } })];
|
|
228
|
-
} }]) }, "bento-dropdown", e.$props, !1));
|
|
229
|
-
}, W = [], X = /* @__PURE__ */ _(
|
|
230
|
-
N,
|
|
231
|
-
Q,
|
|
232
|
-
W,
|
|
233
|
-
!1,
|
|
234
|
-
null,
|
|
235
|
-
"084a9465"
|
|
236
|
-
);
|
|
237
|
-
const ce = X.exports;
|
|
238
|
-
export {
|
|
239
|
-
ue as a,
|
|
240
|
-
le as b,
|
|
241
|
-
ie as c,
|
|
242
|
-
pe as d,
|
|
243
|
-
ce as e
|
|
244
|
-
};
|
|
245
|
-
//# sourceMappingURL=dropdown-tag.DBnurtCQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-tag.DBnurtCQ.js","sources":["../../src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue"],"sourcesContent":["<template>\n <div>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n :items=\"dropdownItems\"\n @input=\"onInput\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { type BentoDropdownAvatarProps } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n items: { default: () => [] }\n});\n\n const emit = defineEmits([\"input\", \"show-more\", \"open\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const dropdownItems = computed(() => props.items.map(({ value, label, src }) => ({ value, label, data: src })));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Avatar Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownAvatar } from '@adyen/bento-vue2';\n * import type { BentoAvatarListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownAvatar },\n * template: `\n * <bento-dropdown-avatar\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('user-id-1') // Default value\n * const options: BentoAvatarListboxOptions = [\n * { label: 'User 1', value: 'user-id-1' },\n * { label: 'User 2', value: 'user-id-2', src: 'image-source.jpeg' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-avatar',\n });\n</script>\n","<template>\n <div>\n <bento-dropdown\n v-slot=\"{ label }\"\n v-bind=\"$props\"\n :items=\"countryItems\"\n @input=\"onInput\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, toRefs } from 'vue';\n import { type BentoCountryListboxOptions } from './dropdown-country.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoTypography } from '@/components/typography';\n import { useCountryItems } from './composables/use-country-items';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoCountryVariant } from '@/components/country';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCountryListboxOptions }\n * * @deprecated {string} value.label - Use BentoDropdown instead of custom labels\n * * @property {BentoCountryCode | string} value.value - Country code of the option\n */\n items: {\n type: Array as PropType<BentoCountryListboxOptions>,\n default: () => [],\n },\n\n /**\n * Which label variant to display.\n * @values iso, name, phone_code, capital\n */\n variant: {\n type: String as PropType<BentoCountryVariant | `${BentoCountryVariant}`>,\n default: BentoCountryVariant.CUSTOM,\n validator: (value: BentoCountryVariant) => Object.values(BentoCountryVariant).includes(value),\n },\n });\n\n const emit = defineEmits([\"input\", \"show-more\", \"open\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const { variant, items } = toRefs(props);\n const countryItems = useCountryItems(variant, items);\n\n if (variant.value === 'custom' || items.value.some(item => item.label)) {\n deprecate(\n 'BentoDropdownCountry \"custom\" variant and \"items\" prop \"label\" key',\n 'Use any of the other BentoDropdownCountry variants instead OR use BentoDropdown component for custom labels',\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Country Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-country\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-country',\n });\n</script>\n","<template>\n <bento-dropdown\n v-slot=\"slotProps\"\n v-bind=\"$props\"\n :search=\"search\"\n :items=\"filteredItems\"\n @input=\"onInput\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, ref, watch } from 'vue';\n import type { BentoCurrencyListboxOptions, BentoDropdownCurrencyProps } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '@/internal/listbox/';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n\n const props = defineProps({\n items: { default: () => [] }\n});\n\n const emit = defineEmits([\"input\", \"show-more\", \"open\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n const filteredItems = ref<BentoCurrencyListboxOptions>([]);\n\n watch(\n () => props.items,\n () => (filteredItems.value = props.items),\n { immediate: true }\n );\n\n const search = props.search\n ? props.search\n : {\n debounceTime: 500,\n searchEvent: async (searchTerm: string) => {\n // Combine value and label to be able to search by the currency code\n const searchableItems = props.items.map(item => ({\n ...item,\n label: `${item.value} ${item.label}`,\n }));\n\n const searchResults = useSearchBarFilter(\n ref(searchTerm),\n ref<BentoCurrencyListboxOptions>(searchableItems),\n props?.search?.searchEvent,\n ref(false)\n ).value;\n\n // Restore original labels by removing the prepended value\n const normalizedResults = searchResults?.map(result => ({\n ...result,\n label: result.label.substring(result.value.length + 1),\n }));\n\n filteredItems.value = normalizedResults;\n },\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * A Currency Dropdown showing a selectable list of currencies.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-currency\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-currency',\n });\n</script>\n","<template>\n <div>\n <bento-dropdown\n v-slot=\"{ value, label }\"\n v-bind=\"$props\"\n @input=\"onInput\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent } from 'vue';\n import { type BentoDropdownPaymentMethodProps } from './dropdown-payment-method.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n defineProps({\n items: { default: () => [] }\n});\n\n const emit = defineEmits([\"input\", \"show-more\", \"open\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n</script>\n\n<script lang=\"ts\">\n /**\n * A Payment method Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownPaymentMethod } from '@adyen/bento-vue2';\n * import type { BentoPaymentMethodListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownPaymentMethod },\n * template: `\n * <bento-dropdown-payment-method\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 'Visa'\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('ideal') // Default value\n * const options: BentoPaymentMethodListboxOptions = [\n * { label: 'Option 1', value: 'ideal' },\n * { label: 'Option 2', value: 'visa' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-payment-method',\n });\n</script>\n","<template>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n class=\"b-dropdown-tag\"\n :items=\"tagItems\"\n show-slot-content-in-multiple\n @input=\"onInput\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"{ value: label, data, label: '' }\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import type { BentoDropdownTagProps } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\n\n const props = defineProps({\n description: null,\n disabled: { type: Boolean },\n errorMessage: null,\n label: null,\n optional: { type: Boolean },\n placeholder: null,\n readonly: { type: Boolean },\n required: { type: Boolean },\n tooltipText: null,\n ariaLabel: null,\n condensed: { type: Boolean },\n emptyState: null,\n dynamicFiltering: { type: Boolean },\n error: { type: Boolean },\n hasMoreItems: { type: Boolean },\n isOptionDisabled: { type: Function },\n items: { default: () => [] },\n loading: { type: Boolean },\n componentLoading: { type: Boolean },\n lazyLoadType: null,\n multiple: { type: Boolean },\n search: null,\n showSlotContentInMultiple: { type: Boolean },\n size: null,\n staticCategories: { type: Boolean },\n value: null,\n virtualScroll: { type: Boolean },\n enableValueLabelPair: { type: Boolean }\n});\n\n const emit = defineEmits([\"input\", \"show-more\", \"open\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const tagItems = computed(() => props.items?.map(({ label, value, variant }) => ({ label, value, data: variant })));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Tag Dropdown showing a selectable list of tags.\n *\n * @example\n * import { BentoDropdownTag } from '@adyen/bento-vue2';\n * import type { BentoTagListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownTag },\n * template: `\n * <bento-dropdown-tag\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('unique-id-1') // Default value\n * const options: BentoTagListboxOptions = [\n * { label: 'Offline', value: 'unique-id-1', variant: 'red' },\n * { label: 'Online', value: 'unique-id-2', variant: 'green' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-tag',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["__default__$4","defineComponent","onInput","selectedValue","emit","dropdownItems","computed","props","value","label","src","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","deprecate","__default__$2","filteredItems","ref","watch","search","searchTerm","searchableItems","searchResults","useSearchBarFilter","_a","normalizedResults","result","__default__$1","__default__","tagItems"],"mappings":";;;;;;;;;;AA8DI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA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