@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,242 +0,0 @@
1
- import { defineComponent as u, computed as I, createElementBlock as b, openBlock as _, createVNode as d, mergeProps as y, withCtx as v, unref as f, toRefs as S, createTextVNode as C, toDisplayString as M, ref as $, watch as A, createBlock as g } from "vue";
2
- import { B as T } from "./avatar.P2Fkz2I6.js";
3
- import { B as i, u as x } from "./dropdown.KStrJVoP.js";
4
- import { d as D, B as k } from "./typography.yBEME_Gu.js";
5
- import { u as E } from "./use-country-items.Dzbl2UsO.js";
6
- import { B } from "./country.types.C0Q_hhgJ.js";
7
- import { L as O } from "./listbox-option-tag.uHSB7MO6.js";
8
- import { B as V } from "./payment-method.CDnn1bjo.js";
9
- import { _ as L } from "./_plugin-vue_export-helper.CHgC5LLL.js";
10
- import "../assets/dropdown-tag.css";
11
- const N = u({
12
- name: "bento-dropdown-avatar"
13
- }), Y = /* @__PURE__ */ u({
14
- ...N,
15
- props: {
16
- ...i.props,
17
- /**
18
- * The option elements to populate the avatar dropdown with.
19
- * It must be an array of {@see BentoAvatarListboxOptions }
20
- * @property {string} value.label - Text to be displayed in the option.
21
- * @property {string | number} value.value - Value of the option.
22
- * @property {string} value.src - Image source of the avatar image.
23
- */
24
- items: {
25
- type: Array,
26
- default: () => []
27
- }
28
- },
29
- emits: ["input", "show-more", "open"],
30
- setup(m, { emit: l }) {
31
- const n = m, r = l, a = (o) => r("input", o), p = I(() => n.items.map(({ value: o, label: t, src: e }) => ({ value: o, label: t, data: e })));
32
- return (o, t) => (_(), b("div", null, [
33
- d(i, y(o.$props, {
34
- items: p.value,
35
- onInput: a,
36
- onShowMore: t[0] || (t[0] = (e) => r("show-more")),
37
- onOpen: t[1] || (t[1] = (e) => r("open"))
38
- }), {
39
- default: v(({ label: e, data: s }) => [
40
- d(f(T), {
41
- username: e,
42
- src: s
43
- }, null, 8, ["username", "src"])
44
- ]),
45
- _: 1
46
- }, 16, ["items"])
47
- ]));
48
- }
49
- }), P = u({
50
- name: "b-dropdown-country"
51
- }), Z = /* @__PURE__ */ u({
52
- ...P,
53
- props: {
54
- ...i.props,
55
- /**
56
- * The option elements to populate the country dropdown with.
57
- * It must be an array of {@see BentoCountryListboxOptions }
58
- * * @deprecated {string} value.label - Use BentoDropdown instead of custom labels
59
- * * @property {BentoCountryCode | string} value.value - Country code of the option
60
- */
61
- items: {
62
- type: Array,
63
- default: () => []
64
- },
65
- /**
66
- * Which label variant to display.
67
- * @values iso, name, phone_code, capital
68
- */
69
- variant: {
70
- type: String,
71
- default: B.CUSTOM,
72
- validator: (m) => Object.values(B).includes(m)
73
- }
74
- },
75
- emits: ["input", "show-more", "open"],
76
- setup(m, { emit: l }) {
77
- const n = m, r = l, a = (e) => r("input", e), { variant: p, items: o } = S(n), t = E(p, o);
78
- return (p.value === "custom" || o.value.some((e) => e.label)) && D(
79
- 'BentoDropdownCountry "custom" variant and "items" prop "label" key',
80
- "Use any of the other BentoDropdownCountry variants instead OR use BentoDropdown component for custom labels",
81
- "2.0.0"
82
- ), (e, s) => (_(), b("div", null, [
83
- d(i, y(e.$props, {
84
- items: f(t),
85
- onInput: a,
86
- onShowMore: s[0] || (s[0] = (w) => r("show-more")),
87
- onOpen: s[1] || (s[1] = (w) => r("open"))
88
- }), {
89
- default: v(({ label: w }) => [
90
- d(f(k), { el: "span" }, {
91
- default: v(() => [
92
- C(M(w), 1)
93
- ]),
94
- _: 2
95
- }, 1024)
96
- ]),
97
- _: 1
98
- }, 16, ["items"])
99
- ]));
100
- }
101
- }), R = u({
102
- name: "b-dropdown-currency"
103
- }), ee = /* @__PURE__ */ u({
104
- ...R,
105
- props: {
106
- ...i.props,
107
- /**
108
- * The option elements to populate the currency dropdown with.
109
- * It must be an array of {@see BentoCurrencyListboxOptions }
110
- * @property {string} value.label - Text to be displayed in the option
111
- * @property {BentoCurrencyISOCode} value.code - Currency ISO code of the option
112
- */
113
- items: {
114
- type: Array,
115
- default: () => []
116
- }
117
- },
118
- emits: ["input", "show-more", "open"],
119
- setup(m, { emit: l }) {
120
- const n = m, r = l, a = (t) => r("input", t), p = $([]);
121
- A(
122
- () => n.items,
123
- () => p.value = n.items,
124
- { immediate: !0 }
125
- );
126
- const o = n.search ? n.search : {
127
- debounceTime: 500,
128
- searchEvent: async (t) => {
129
- var h;
130
- const e = n.items.map((c) => ({
131
- ...c,
132
- label: `${c.value} ${c.label}`
133
- })), s = x(
134
- $(t),
135
- $(e),
136
- (h = n == null ? void 0 : n.search) == null ? void 0 : h.searchEvent,
137
- $(!1)
138
- ).value, w = s == null ? void 0 : s.map((c) => ({
139
- ...c,
140
- label: c.label.substring(c.value.length + 1)
141
- }));
142
- p.value = w;
143
- }
144
- };
145
- return (t, e) => (_(), g(i, y(t.$props, {
146
- search: f(o),
147
- items: p.value,
148
- onInput: a,
149
- onShowMore: e[0] || (e[0] = (s) => r("show-more")),
150
- onOpen: e[1] || (e[1] = (s) => r("open"))
151
- }), {
152
- default: v((s) => [
153
- d(f(O), { option: s }, null, 8, ["option"])
154
- ]),
155
- _: 1
156
- }, 16, ["search", "items"]));
157
- }
158
- }), U = u({
159
- name: "bento-dropdown-payment-method"
160
- }), te = /* @__PURE__ */ u({
161
- ...U,
162
- props: {
163
- ...i.props,
164
- /**
165
- * The option elements to populate the payment method dropdown with.
166
- * It must be an array of {@see BentoPaymentMethodListboxOptions }
167
- * @property {string} value.label - Text to be displayed in the option
168
- * @property {string} value.value - Payment type code that translates to a payment icon name {@see https://adyen-ui-assets.netlify.app/?path=/story/packages-ui-assets-payment-method-icons--icons}
169
- */
170
- items: {
171
- type: Array,
172
- default: () => []
173
- }
174
- },
175
- emits: ["input", "show-more", "open"],
176
- setup(m, { emit: l }) {
177
- const n = l, r = (a) => n("input", a);
178
- return (a, p) => (_(), b("div", null, [
179
- d(i, y(a.$props, {
180
- onInput: r,
181
- onShowMore: p[0] || (p[0] = (o) => n("show-more")),
182
- onOpen: p[1] || (p[1] = (o) => n("open"))
183
- }), {
184
- default: v(({ value: o, label: t }) => [
185
- d(f(V), {
186
- type: o,
187
- label: t
188
- }, null, 8, ["type", "label"])
189
- ]),
190
- _: 1
191
- }, 16)
192
- ]));
193
- }
194
- }), j = u({
195
- name: "bento-dropdown-tag"
196
- }), z = /* @__PURE__ */ u({
197
- ...j,
198
- props: {
199
- ...i.props,
200
- /**
201
- * The option elements to populate the tag dropdown with.
202
- * It must be an array of {@see BentoTagListboxOptions }
203
- * @property {string} value.label - Text to be displayed in the option
204
- * @property {string | number} value.value - Value of the option
205
- * @property {string} value.variant - The BentTag variant shown for the option.
206
- */
207
- items: {
208
- type: Array,
209
- default: () => []
210
- }
211
- },
212
- emits: ["input", "show-more", "open"],
213
- setup(m, { emit: l }) {
214
- const n = m, r = l, a = (o) => r("input", o), p = I(() => {
215
- var o;
216
- return (o = n.items) == null ? void 0 : o.map(({ label: t, value: e, variant: s }) => ({ label: t, value: e, data: s }));
217
- });
218
- return (o, t) => (_(), g(i, y(o.$props, {
219
- class: "b-dropdown-tag",
220
- items: p.value,
221
- "show-slot-content-in-multiple": "",
222
- onInput: a,
223
- onShowMore: t[0] || (t[0] = (e) => r("show-more")),
224
- onOpen: t[1] || (t[1] = (e) => r("open"))
225
- }), {
226
- default: v(({ label: e, data: s }) => [
227
- d(f(O), {
228
- option: { value: e, data: s, label: "" }
229
- }, null, 8, ["option"])
230
- ]),
231
- _: 1
232
- }, 16, ["items"]));
233
- }
234
- }), oe = /* @__PURE__ */ L(z, [["__scopeId", "data-v-839c4a66"]]);
235
- export {
236
- Y as _,
237
- Z as a,
238
- ee as b,
239
- te as c,
240
- oe as d
241
- };
242
- //# sourceMappingURL=dropdown-tag.DFeoXIgH.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dropdown-tag.DFeoXIgH.js","sources":["../../../vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../../vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../../vue2/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, type PropType } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { type BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the avatar dropdown with.\n * It must be an array of {@see BentoAvatarListboxOptions }\n * @property {string} value.label - Text to be displayed in the option.\n * @property {string | number} value.value - Value of the option.\n * @property {string} value.src - Image source of the avatar image.\n */\n items: {\n type: Array as PropType<BentoAvatarListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\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<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\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, type PropType, ref, watch } from 'vue';\n import type { BentoCurrencyListboxOptions } 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 ...BentoDropdown.props,\n /**\n * The option elements to populate the currency dropdown with.\n * It must be an array of {@see BentoCurrencyListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {BentoCurrencyISOCode} value.code - Currency ISO code of the option\n */\n items: {\n type: Array as PropType<BentoCurrencyListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\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, type PropType } from 'vue';\n import { type BentoPaymentMethodListboxOptions } 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 ...BentoDropdown.props,\n /**\n * The option elements to populate the payment method dropdown with.\n * It must be an array of {@see BentoPaymentMethodListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string} value.value - Payment type code that translates to a payment icon name {@see https://adyen-ui-assets.netlify.app/?path=/story/packages-ui-assets-payment-method-icons--icons}\n */\n items: {\n type: Array as PropType<BentoPaymentMethodListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\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, type PropType } from 'vue';\n import type { BentoTagListboxOptions } 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 ...BentoDropdown.props,\n /**\n * The option elements to populate the tag dropdown with.\n * It must be an array of {@see BentoTagListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string | number} value.value - Value of the option\n * @property {string} value.variant - The BentTag variant shown for the option.\n */\n items: {\n type: Array as PropType<BentoTagListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model.\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n\n /**\n * Emitted when:\n * - `lazyLoad` is `automatic` and the scroll meets the end of the list\n * - `lazyload` is `button` and the button is clicked\n */\n (e: 'show-more');\n\n /**\n * Emitted when the dropdown is opened.\n */\n (e: 'open');\n }>();\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","props","__props","emit","__emit","onInput","selectedValue","dropdownItems","computed","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":";;;;;;;;;;AA0FI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;AAtEA,UAAAC,IAAAC,GAeAC,IAAAC,GAmBAC,IAAA,CAAAC,MAAAH,EAAA,SAAAG,CAAA,GAEAC,IAAAC,EAAA,MAAAP,EAAA,MAAA,IAAA,CAAA,EAAA,OAAAQ,GAAA,OAAAC,GAAA,KAAAC,EAAA,OAAA,EAAA,OAAAF,GAAA,OAAAC,GAAA,MAAAC,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;ICqDAC,IAAAZ,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AAxFA,UAAAC,IAAAC,GAwBAC,IAAAC,GAmBAC,IAAA,CAAAC,MAAAH,EAAA,SAAAG,CAAA,GAEA,EAAA,SAAAO,GAAA,OAAAC,EAAA,IAAAC,EAAAd,CAAA,GACAe,IAAAC,EAAAJ,GAAAC,CAAA;AAEA,YAAAD,EAAA,UAAA,YAAAC,EAAA,MAAA,KAAA,CAAAI,MAAAA,EAAA,KAAA,MACIC;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IACA;;;;;;;;;;;;;;;;;;;IC6CRC,IAAApB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;AAtGA,UAAAC,IAAAC,GAcAC,IAAAC,GAmBAC,IAAA,CAAAC,MAAAH,EAAA,SAAAG,CAAA,GACAe,IAAAC,EAAA,CAAA,CAAA;AAEA,IAAAC;AAAA,MAAA,MAAAtB,EAAA;AAAA,MACgB,MAAAoB,EAAA,QAAApB,EAAA;AAAA,MACuB,EAAA,WAAA,GAAA;AAAA,IACjB;AAGtB,UAAAuB,IAAAvB,EAAA,SAAAA,EAAA,SAAA;AAAA,MAEM,cAAA;AAAA,MACkB,aAAA,OAAAwB,MAAA;;AAGV,cAAAC,IAAAzB,EAAA,MAAA,IAAA,CAAAiB,OAAA;AAAA,UAAiD,GAAAA;AAAA,UAC1C,OAAA,GAAAA,EAAA,KAAA,IAAAA,EAAA,KAAA;AAAA,QAC+B,EAAA,GAGtCS,IAAAC;AAAA,UAAsBN,EAAAG,CAAA;AAAA,UACJH,EAAAI,CAAA;AAAA,WACkCG,IAAA5B,KAAA,gBAAAA,EAAA,WAAA,gBAAA4B,EAAA;AAAA,UACjCP,EAAA,EAAA;AAAA,QACN,EAAA,OAIbQ,IAAAH,KAAA,gBAAAA,EAAA,IAAA,CAAAI,OAAA;AAAA,UAAwD,GAAAA;AAAA,UACjD,OAAAA,EAAA,MAAA,UAAAA,EAAA,MAAA,SAAA,CAAA;AAAA,QACkD;AAGzD,QAAAV,EAAA,QAAAS;AAAA,MAAsB;AAAA,IAC1B;;;;;;;;;;;;;;ICHVE,IAAAhC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;AArDA,UAAAG,IAAAC,GAmBAC,IAAA,CAAAC,MAAAH,EAAA,SAAAG,CAAA;;;;;;;;;;;;;;;;;ICkCA2B,IAAAjC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;AApEA,UAAAC,IAAAC,GAeAC,IAAAC,GAmBAC,IAAA,CAAAC,MAAAH,EAAA,SAAAG,CAAA,GAEA4B,IAAA1B,EAAA,MAAA;;AAAA,cAAAqB,IAAA5B,EAAA,UAAA,gBAAA4B,EAAA,IAAA,CAAA,EAAA,OAAAnB,GAAA,OAAAD,GAAA,SAAAI,EAAA,OAAA,EAAA,OAAAH,GAAA,OAAAD,GAAA,MAAAI,EAAA;AAAA,KAAA;;;;;;;;;;;;;;;;;;"}