@adyen/bento-vue2 1.11.0 → 1.12.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/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +11 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-scroller/use-scroller.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +38 -29
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +43 -1306
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +5 -11
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +43 -48
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +43 -44
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +43 -43
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +43 -43
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +43 -48
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.types.d.ts +28 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/{useKeyboardNavigation.d.ts → use-keyboard-navigation.d.ts} +3 -13
- package/dist/@types/packages/vue2/src/components/dropdown/composables/use-keyboard-navigation.types.d.ts +15 -0
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +48 -1674
- package/dist/@types/packages/vue2/src/components/dropdown/index.d.ts +6 -5
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +12 -12
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +17 -11
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +16 -60
- package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +59 -49
- package/dist/@types/packages/vue2/src/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +39 -291
- package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +76 -83
- package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/search-bar/search-bar.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.types.d.ts +6 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +10 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/index.d.ts +1 -0
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +5 -5
- package/dist/alert.js +3 -3
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/button.js +5 -5
- package/dist/card.js +15 -15
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{base-button.bd61ab14.js → base-button.1f07b7c1.js} +2 -2
- package/dist/chunks/{base-button.bd61ab14.js.map → base-button.1f07b7c1.js.map} +1 -1
- package/dist/chunks/base-modal.9d63bdaf.js +200 -0
- package/dist/chunks/base-modal.9d63bdaf.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.767344df.js → button-actions-with-menu.4c5091f4.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.767344df.js.map → button-actions-with-menu.4c5091f4.js.map} +1 -1
- package/dist/chunks/{button.bb5b4909.js → button.133f145e.js} +2 -2
- package/dist/chunks/{button.bb5b4909.js.map → button.133f145e.js.map} +1 -1
- package/dist/chunks/{calendar.4ab3c2dc.js → calendar.9a8605d1.js} +8 -7
- package/dist/chunks/{calendar.4ab3c2dc.js.map → calendar.9a8605d1.js.map} +1 -1
- package/dist/chunks/{checkbox.c684c20a.js → checkbox.d8b810c7.js} +3 -3
- package/dist/chunks/{checkbox.c684c20a.js.map → checkbox.d8b810c7.js.map} +1 -1
- package/dist/chunks/{controls-group.d25f5044.js → controls-group.bf152dea.js} +3 -3
- package/dist/chunks/{controls-group.d25f5044.js.map → controls-group.bf152dea.js.map} +1 -1
- package/dist/chunks/{copy.36c058e9.js → copy.68a7d416.js} +4 -4
- package/dist/chunks/{copy.36c058e9.js.map → copy.68a7d416.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.1cba89ea.js → dropdown-default-textbox.c595fd31.js} +129 -148
- package/dist/chunks/dropdown-default-textbox.c595fd31.js.map +1 -0
- package/dist/chunks/dropdown.eaee22a3.js +797 -0
- package/dist/chunks/dropdown.eaee22a3.js.map +1 -0
- package/dist/chunks/{field-label.a0c54b7d.js → field-label.66f52c8f.js} +2 -2
- package/dist/chunks/{field-label.a0c54b7d.js.map → field-label.66f52c8f.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.5c90f692.js → fixed-scroller.01fc96f7.js} +2 -2
- package/dist/chunks/{fixed-scroller.5c90f692.js.map → fixed-scroller.01fc96f7.js.map} +1 -1
- package/dist/chunks/{footer-actions.b14cfca8.js → footer-actions.38e99891.js} +3 -3
- package/dist/chunks/{footer-actions.b14cfca8.js.map → footer-actions.38e99891.js.map} +1 -1
- package/dist/chunks/{index.aaedd8f9.js → index.14758ff7.js} +3 -3
- package/dist/chunks/{index.aaedd8f9.js.map → index.14758ff7.js.map} +1 -1
- package/dist/chunks/index.18773b0b.js +637 -0
- package/dist/chunks/index.18773b0b.js.map +1 -0
- package/dist/chunks/{index.7d2ea1de.js → index.2cfe4a09.js} +2 -2
- package/dist/chunks/{index.7d2ea1de.js.map → index.2cfe4a09.js.map} +1 -1
- package/dist/chunks/{index.1e8c900a.js → index.3b7d40b7.js} +2 -2
- package/dist/chunks/{index.1e8c900a.js.map → index.3b7d40b7.js.map} +1 -1
- package/dist/chunks/{index.f18f79eb.js → index.45aa17fc.js} +5 -5
- package/dist/chunks/{index.f18f79eb.js.map → index.45aa17fc.js.map} +1 -1
- package/dist/chunks/{index.b0a89960.js → index.99a2184a.js} +2 -2
- package/dist/chunks/{index.b0a89960.js.map → index.99a2184a.js.map} +1 -1
- package/dist/chunks/{index.f2223abb.js → index.9b669c12.js} +6 -6
- package/dist/chunks/{index.f2223abb.js.map → index.9b669c12.js.map} +1 -1
- package/dist/chunks/{index.720f0cbf.js → index.b38a191d.js} +13 -12
- package/dist/chunks/{index.720f0cbf.js.map → index.b38a191d.js.map} +1 -1
- package/dist/chunks/{index.58282364.js → index.d90c5838.js} +3 -3
- package/dist/chunks/{index.58282364.js.map → index.d90c5838.js.map} +1 -1
- package/dist/chunks/{index.75f0e99f.js → index.eb527b75.js} +6 -6
- package/dist/chunks/{index.75f0e99f.js.map → index.eb527b75.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.9103c011.js → listbox-option-tag.168c794c.js} +3 -3
- package/dist/chunks/{listbox-option-tag.9103c011.js.map → listbox-option-tag.168c794c.js.map} +1 -1
- package/dist/chunks/{listbox.7cf6d6b4.js → listbox.23c6b393.js} +6 -6
- package/dist/chunks/{listbox.7cf6d6b4.js.map → listbox.23c6b393.js.map} +1 -1
- package/dist/chunks/{loading-button.fb025a2e.js → loading-button.44d698b9.js} +2 -2
- package/dist/chunks/{loading-button.fb025a2e.js.map → loading-button.44d698b9.js.map} +1 -1
- package/dist/chunks/{tooltip.f48beb54.js → tooltip.f91b2040.js} +3 -3
- package/dist/chunks/{tooltip.f48beb54.js.map → tooltip.f91b2040.js.map} +1 -1
- package/dist/chunks/{useCountryItems.6b7985bf.js → use-country-items.6b7985bf.js} +1 -1
- package/dist/chunks/use-country-items.6b7985bf.js.map +1 -0
- package/dist/code-snippet.js +7 -7
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +460 -451
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +38 -38
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +102 -132
- package/dist/dropdown.js.map +1 -1
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +54 -53
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header.js +3 -3
- package/dist/index.js +218 -215
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +4 -4
- package/dist/internal.js +7 -7
- package/dist/link.js +38 -28
- package/dist/link.js.map +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +209 -302
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +88 -88
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +4 -4
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +2 -2
- package/dist/segmented-control.js +3 -3
- package/dist/sidepanel.js +5 -5
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/tabs.js +4 -4
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +5 -5
- package/dist/toast.js +3 -3
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +5 -5
- package/dist/typography.js +1 -1
- package/dist/web-types.json +3739 -3589
- package/package.json +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/composables/useDisplayValue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/dropdown/composables/useDisplayValue.types.d.ts +0 -12
- package/dist/@types/packages/vue2/src/components/dropdown/composables/useDropdownSearchFilter.d.ts +0 -3
- package/dist/chunks/base-modal.5640a66a.js +0 -222
- package/dist/chunks/base-modal.5640a66a.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.1cba89ea.js.map +0 -1
- package/dist/chunks/dropdown.4152cc00.js +0 -887
- package/dist/chunks/dropdown.4152cc00.js.map +0 -1
- package/dist/chunks/index.179d485c.js +0 -635
- package/dist/chunks/index.179d485c.js.map +0 -1
- package/dist/chunks/useCountryItems.6b7985bf.js.map +0 -1
- /package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/composables/{useDropdownOptionsListbox.d.ts → use-dropdown-options-listbox.d.ts} +0 -0
- /package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/composables/{useCountryItems.d.ts → use-country-items.d.ts} +0 -0
package/dist/dropdown.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { B as p } from "./chunks/dropdown.eaee22a3.js";
|
|
2
|
+
import { a as _t } from "./chunks/dropdown.eaee22a3.js";
|
|
3
|
+
import { b as dt, a as ct } from "./chunks/listbox.23c6b393.js";
|
|
4
|
+
import { defineComponent as a, computed as l, toRefs as m } from "vue";
|
|
5
|
+
import { B as y, L as i } from "./chunks/listbox-option-tag.168c794c.js";
|
|
4
6
|
import { n as d } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
5
|
-
import {
|
|
6
|
-
import { u as
|
|
7
|
-
import { B as
|
|
8
|
-
import { BentoPaymentMethod as
|
|
9
|
-
import "./assets/
|
|
10
|
-
const
|
|
11
|
-
name: "bento-dropdown-avatar"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
BentoAvatar: f
|
|
15
|
-
},
|
|
7
|
+
import { d as v, B as w } from "./chunks/index.99a2184a.js";
|
|
8
|
+
import { u as b } from "./chunks/use-country-items.6b7985bf.js";
|
|
9
|
+
import { B as c } from "./chunks/country.types.002caff2.js";
|
|
10
|
+
import { BentoPaymentMethod as B } from "./payment-method.js";
|
|
11
|
+
import "./assets/index14.css";
|
|
12
|
+
const $ = a({
|
|
13
|
+
name: "bento-dropdown-avatar"
|
|
14
|
+
}), I = /* @__PURE__ */ a({
|
|
15
|
+
...$,
|
|
16
16
|
props: {
|
|
17
|
-
...
|
|
17
|
+
...p.props,
|
|
18
18
|
/**
|
|
19
19
|
* The option elements to populate the avatar dropdown with.
|
|
20
20
|
* It must be an array of {@see BentoAvatarListboxOptions }
|
|
@@ -28,41 +28,32 @@ const I = u({
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
emits: ["input"],
|
|
31
|
-
setup(
|
|
32
|
-
const n = (e) => t("input", e);
|
|
33
|
-
return {
|
|
34
|
-
// Values
|
|
35
|
-
dropdownItems: l(
|
|
36
|
-
() => r.items.map(({ value: e, label: a, src: p }) => ({ value: e, label: a, data: p }))
|
|
37
|
-
),
|
|
38
|
-
// Methods
|
|
39
|
-
onInput: n
|
|
40
|
-
};
|
|
31
|
+
setup(s, { emit: t }) {
|
|
32
|
+
const o = s, n = (e) => t("input", e), r = l(() => o.items.map(({ value: e, label: u, src: _ }) => ({ value: e, label: u, data: _ })));
|
|
33
|
+
return { __sfc: !0, props: o, emit: t, onInput: n, dropdownItems: r, BentoAvatar: y, BentoDropdown: p };
|
|
41
34
|
}
|
|
42
35
|
});
|
|
43
|
-
var
|
|
44
|
-
var t = this, n = t._self.
|
|
45
|
-
return
|
|
46
|
-
return [n
|
|
36
|
+
var x = function() {
|
|
37
|
+
var t = this, o = t._self._c, n = t._self._setupProxy;
|
|
38
|
+
return o("div", [o(n.BentoDropdown, t._b({ attrs: { items: n.dropdownItems }, on: { input: n.onInput }, scopedSlots: t._u([{ key: "default", fn: function({ label: r, data: e }) {
|
|
39
|
+
return [o(n.BentoAvatar, { attrs: { username: r, src: e } })];
|
|
47
40
|
} }]) }, "bento-dropdown", t.$props, !1))], 1);
|
|
48
|
-
},
|
|
41
|
+
}, D = [], h = /* @__PURE__ */ d(
|
|
49
42
|
I,
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
x,
|
|
44
|
+
D,
|
|
52
45
|
!1,
|
|
53
46
|
null,
|
|
54
47
|
null,
|
|
55
48
|
null,
|
|
56
49
|
null
|
|
57
50
|
);
|
|
58
|
-
const
|
|
59
|
-
name: "b-dropdown-country"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
BentoTypography: y
|
|
63
|
-
},
|
|
51
|
+
const tt = h.exports, g = a({
|
|
52
|
+
name: "b-dropdown-country"
|
|
53
|
+
}), C = /* @__PURE__ */ a({
|
|
54
|
+
...g,
|
|
64
55
|
props: {
|
|
65
|
-
...
|
|
56
|
+
...p.props,
|
|
66
57
|
/**
|
|
67
58
|
* The option elements to populate the country dropdown with.
|
|
68
59
|
* It must be an array of {@see BentoCountryListboxOptions }
|
|
@@ -79,48 +70,41 @@ const N = g.exports, h = u({
|
|
|
79
70
|
*/
|
|
80
71
|
variant: {
|
|
81
72
|
type: String,
|
|
82
|
-
default:
|
|
83
|
-
validator: (
|
|
73
|
+
default: c.CUSTOM,
|
|
74
|
+
validator: (s) => Object.values(c).includes(s)
|
|
84
75
|
}
|
|
85
76
|
},
|
|
86
77
|
emits: ["input"],
|
|
87
|
-
setup(
|
|
88
|
-
const
|
|
89
|
-
return (
|
|
78
|
+
setup(s, { emit: t }) {
|
|
79
|
+
const o = s, n = (_) => t("input", _), { variant: r, items: e } = m(o), u = b(r, e);
|
|
80
|
+
return (r.value === "custom" || e.value.some((_) => _.label)) && v(
|
|
90
81
|
'BentoDropdownCountry "custom" variant and "items" prop "label" key',
|
|
91
82
|
"Use any of the other BentoDropdownCountry variants instead OR use BentoDropdown component for custom labels",
|
|
92
83
|
"2.0.0"
|
|
93
|
-
), {
|
|
94
|
-
// Values
|
|
95
|
-
countryItems: a,
|
|
96
|
-
// Methods
|
|
97
|
-
onInput: e
|
|
98
|
-
};
|
|
84
|
+
), { __sfc: !0, props: o, emit: t, onInput: n, variant: r, items: e, countryItems: u, BentoTypography: w, BentoDropdown: p };
|
|
99
85
|
}
|
|
100
86
|
});
|
|
101
|
-
var
|
|
102
|
-
var t = this, n = t._self.
|
|
103
|
-
return
|
|
104
|
-
return [n
|
|
87
|
+
var T = function() {
|
|
88
|
+
var t = this, o = t._self._c, n = t._self._setupProxy;
|
|
89
|
+
return o("div", [o(n.BentoDropdown, t._b({ attrs: { items: n.countryItems }, on: { input: n.onInput }, scopedSlots: t._u([{ key: "default", fn: function({ label: r }) {
|
|
90
|
+
return [o(n.BentoTypography, { attrs: { el: "span" } }, [t._v(t._s(r))])];
|
|
105
91
|
} }]) }, "bento-dropdown", t.$props, !1))], 1);
|
|
106
|
-
},
|
|
107
|
-
h,
|
|
108
|
-
x,
|
|
92
|
+
}, A = [], P = /* @__PURE__ */ d(
|
|
109
93
|
C,
|
|
94
|
+
T,
|
|
95
|
+
A,
|
|
110
96
|
!1,
|
|
111
97
|
null,
|
|
112
98
|
null,
|
|
113
99
|
null,
|
|
114
100
|
null
|
|
115
101
|
);
|
|
116
|
-
const
|
|
117
|
-
name: "b-dropdown-currency"
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
ListboxOptionTag: c
|
|
121
|
-
},
|
|
102
|
+
const nt = P.exports, S = a({
|
|
103
|
+
name: "b-dropdown-currency"
|
|
104
|
+
}), R = /* @__PURE__ */ a({
|
|
105
|
+
...S,
|
|
122
106
|
props: {
|
|
123
|
-
...
|
|
107
|
+
...p.props,
|
|
124
108
|
/**
|
|
125
109
|
* The option elements to populate the country dropdown with.
|
|
126
110
|
* It must be an array of {@see BentoCurrencyListboxOptions }
|
|
@@ -133,36 +117,31 @@ const Q = D.exports, A = u({
|
|
|
133
117
|
}
|
|
134
118
|
},
|
|
135
119
|
emits: ["input"],
|
|
136
|
-
setup(
|
|
137
|
-
return {
|
|
138
|
-
// Methods
|
|
139
|
-
onInput: (o) => t("input", o)
|
|
140
|
-
};
|
|
120
|
+
setup(s, { emit: t }) {
|
|
121
|
+
return { __sfc: !0, emit: t, onInput: (n) => t("input", n), ListboxOptionTag: i, BentoDropdown: p };
|
|
141
122
|
}
|
|
142
123
|
});
|
|
143
|
-
var
|
|
144
|
-
var t = this, n = t._self.
|
|
145
|
-
return
|
|
146
|
-
return [n
|
|
124
|
+
var k = function() {
|
|
125
|
+
var t = this, o = t._self._c, n = t._self._setupProxy;
|
|
126
|
+
return o(n.BentoDropdown, t._b({ on: { input: n.onInput }, scopedSlots: t._u([{ key: "default", fn: function(r) {
|
|
127
|
+
return [o(n.ListboxOptionTag, { attrs: { option: r } })];
|
|
147
128
|
} }]) }, "bento-dropdown", t.$props, !1));
|
|
148
|
-
},
|
|
149
|
-
A,
|
|
150
|
-
P,
|
|
129
|
+
}, L = [], O = /* @__PURE__ */ d(
|
|
151
130
|
R,
|
|
131
|
+
k,
|
|
132
|
+
L,
|
|
152
133
|
!1,
|
|
153
134
|
null,
|
|
154
135
|
null,
|
|
155
136
|
null,
|
|
156
137
|
null
|
|
157
138
|
);
|
|
158
|
-
const
|
|
159
|
-
name: "bento-dropdown-payment-method"
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
BentoPaymentMethod: b
|
|
163
|
-
},
|
|
139
|
+
const ot = O.exports, F = a({
|
|
140
|
+
name: "bento-dropdown-payment-method"
|
|
141
|
+
}), M = /* @__PURE__ */ a({
|
|
142
|
+
...F,
|
|
164
143
|
props: {
|
|
165
|
-
...
|
|
144
|
+
...p.props,
|
|
166
145
|
/**
|
|
167
146
|
* The option elements to populate the payment method dropdown with.
|
|
168
147
|
* It must be an array of {@see BentoPaymentMethodListboxOptions }
|
|
@@ -175,36 +154,31 @@ const W = S.exports, k = u({
|
|
|
175
154
|
}
|
|
176
155
|
},
|
|
177
156
|
emits: ["input"],
|
|
178
|
-
setup(
|
|
179
|
-
return {
|
|
180
|
-
// Methods
|
|
181
|
-
onInput: (o) => t("input", o)
|
|
182
|
-
};
|
|
157
|
+
setup(s, { emit: t }) {
|
|
158
|
+
return { __sfc: !0, emit: t, onInput: (n) => t("input", n), BentoPaymentMethod: B, BentoDropdown: p };
|
|
183
159
|
}
|
|
184
160
|
});
|
|
185
|
-
var
|
|
186
|
-
var t = this, n = t._self.
|
|
187
|
-
return
|
|
188
|
-
return [n
|
|
161
|
+
var z = function() {
|
|
162
|
+
var t = this, o = t._self._c, n = t._self._setupProxy;
|
|
163
|
+
return o("div", [o(n.BentoDropdown, t._b({ on: { input: n.onInput }, scopedSlots: t._u([{ key: "default", fn: function({ value: r, label: e }) {
|
|
164
|
+
return [o(n.BentoPaymentMethod, { attrs: { type: r, label: e } })];
|
|
189
165
|
} }]) }, "bento-dropdown", t.$props, !1))], 1);
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
166
|
+
}, U = [], j = /* @__PURE__ */ d(
|
|
167
|
+
M,
|
|
168
|
+
z,
|
|
169
|
+
U,
|
|
194
170
|
!1,
|
|
195
171
|
null,
|
|
196
172
|
null,
|
|
197
173
|
null,
|
|
198
174
|
null
|
|
199
175
|
);
|
|
200
|
-
const
|
|
201
|
-
name: "bento-dropdown-tag"
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
ListboxOptionTag: c
|
|
205
|
-
},
|
|
176
|
+
const et = j.exports, E = a({
|
|
177
|
+
name: "bento-dropdown-tag"
|
|
178
|
+
}), V = /* @__PURE__ */ a({
|
|
179
|
+
...E,
|
|
206
180
|
props: {
|
|
207
|
-
...
|
|
181
|
+
...p.props,
|
|
208
182
|
/**
|
|
209
183
|
* The option elements to populate the tag dropdown with.
|
|
210
184
|
* It must be an array of {@see BentoTagListboxOptions }
|
|
@@ -218,43 +192,39 @@ const X = M.exports, O = u({
|
|
|
218
192
|
}
|
|
219
193
|
},
|
|
220
194
|
emits: ["input"],
|
|
221
|
-
setup(
|
|
222
|
-
const n = (e) => t("input", e)
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
var e;
|
|
228
|
-
return (e = r.items) == null ? void 0 : e.map(({ label: a, value: p, variant: i }) => ({ label: a, value: p, data: i }));
|
|
229
|
-
}
|
|
230
|
-
),
|
|
231
|
-
// Methods
|
|
232
|
-
onInput: n
|
|
233
|
-
};
|
|
195
|
+
setup(s, { emit: t }) {
|
|
196
|
+
const o = s, n = (e) => t("input", e), r = l(() => {
|
|
197
|
+
var e;
|
|
198
|
+
return (e = o.items) == null ? void 0 : e.map(({ label: u, value: _, variant: f }) => ({ label: u, value: _, data: f }));
|
|
199
|
+
});
|
|
200
|
+
return { __sfc: !0, props: o, emit: t, onInput: n, tagItems: r, ListboxOptionTag: i, BentoDropdown: p };
|
|
234
201
|
}
|
|
235
202
|
});
|
|
236
|
-
var
|
|
237
|
-
var t = this, n = t._self.
|
|
238
|
-
return
|
|
239
|
-
return [n
|
|
203
|
+
var q = function() {
|
|
204
|
+
var t = this, o = t._self._c, n = t._self._setupProxy;
|
|
205
|
+
return o(n.BentoDropdown, t._b({ staticClass: "b-dropdown-tag", attrs: { items: n.tagItems, "show-slot-content-in-multiple": "" }, on: { input: n.onInput }, scopedSlots: t._u([{ key: "default", fn: function({ label: r, data: e }) {
|
|
206
|
+
return [o(n.ListboxOptionTag, { attrs: { option: { value: r, data: e, label: "" } } })];
|
|
240
207
|
} }]) }, "bento-dropdown", t.$props, !1));
|
|
241
|
-
},
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
208
|
+
}, G = [], H = /* @__PURE__ */ d(
|
|
209
|
+
V,
|
|
210
|
+
q,
|
|
211
|
+
G,
|
|
245
212
|
!1,
|
|
246
213
|
null,
|
|
247
|
-
"
|
|
214
|
+
"bae2dd4a",
|
|
248
215
|
null,
|
|
249
216
|
null
|
|
250
217
|
);
|
|
251
|
-
const
|
|
218
|
+
const rt = H.exports;
|
|
252
219
|
export {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
220
|
+
p as BentoDropdown,
|
|
221
|
+
tt as BentoDropdownAvatar,
|
|
222
|
+
nt as BentoDropdownCountry,
|
|
223
|
+
ot as BentoDropdownCurrency,
|
|
224
|
+
dt as BentoDropdownEvent,
|
|
225
|
+
ct as BentoDropdownLazyLoadType,
|
|
226
|
+
et as BentoDropdownPaymentMethod,
|
|
227
|
+
_t as BentoDropdownSize,
|
|
228
|
+
rt as BentoDropdownTag
|
|
259
229
|
};
|
|
260
230
|
//# sourceMappingURL=dropdown.js.map
|
package/dist/dropdown.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.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 v-slot=\"{ label, data }\" v-bind=\"$props\" :items=\"dropdownItems\" @input=\"onInput\">\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/internal';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\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 components: {\n BentoDropdown,\n BentoAvatar,\n },\n props: {\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 emits: ['input'],\n setup(props, { emit }) {\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const dropdownItems = computed(() =>\n props.items.map(({ value, label, src }) => ({ value, label, data: src }))\n );\n\n return {\n // Values\n dropdownItems,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n","<template>\n <div>\n <bento-dropdown v-slot=\"{ label }\" v-bind=\"$props\" :items=\"countryItems\" @input=\"onInput\">\n <bento-typography>{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType, toRefs } from 'vue';\n import { BentoCountryListboxOptions } from './dropdown-country.types';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoTypography } from '@/components/typography';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useCountryItems } from './composables/useCountryItems';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoCountryVariant } from '@/components/country';\n\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 components: {\n BentoDropdown,\n BentoTypography,\n },\n props: {\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 emits: ['input'],\n setup(props, { emit }) {\n const { variant, items } = toRefs(props);\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\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\n return {\n // Values\n countryItems,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n","<template>\n <bento-dropdown v-slot=\"slotProps\" v-bind=\"$props\" @input=\"onInput\">\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types';\n import { ListboxOptionTag } from '@/internal';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\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 components: {\n BentoDropdown,\n ListboxOptionTag,\n },\n props: {\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country 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 emits: ['input'],\n setup(_props, { emit }) {\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n return {\n // Methods\n onInput,\n };\n },\n });\n</script>\n","<template>\n <div>\n <bento-dropdown v-slot=\"{ value, label }\" v-bind=\"$props\" @input=\"onInput\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import { BentoPaymentMethodListboxOptions } from './dropdown-payment-method.types';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n /**\n * A Payment method Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownPaymentMethod, BentoPaymentMethodType } 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(BentoPaymentMethodType.IDEAL) // Default value\n * const options: BentoPaymentMethodListboxOptions = [\n * { label: 'Option 1', value: BentoPaymentMethodType.IDEAL },\n * { label: 'Option 2', value: BentoPaymentMethodType.VISA },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-payment-method',\n components: {\n BentoDropdown,\n BentoPaymentMethod,\n },\n props: {\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 {BentoPaymentMethodType} value.value - Payment type code that\n */\n items: {\n type: Array as PropType<BentoPaymentMethodListboxOptions>,\n default: () => [],\n },\n },\n emits: ['input'],\n setup(_props, { emit }) {\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n return {\n // Methods\n onInput,\n };\n },\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 >\n <listbox-option-tag :option=\"{ value: label, data, label: '' }\" />\n </bento-dropdown>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '../../../../../types';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\n\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 components: {\n BentoDropdown,\n ListboxOptionTag,\n },\n props: {\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 emits: ['input'],\n setup(props, { emit }) {\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const tagItems = computed(() =>\n props.items?.map(({ label, value, variant }) => ({ label, value, data: variant }))\n );\n\n return {\n // Values\n tagItems,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["_sfc_main$4","defineComponent","BentoDropdown","BentoAvatar","props","emit","onInput","selectedValue","computed","value","label","src","_sfc_main$3","BentoTypography","BentoCountryVariant","variant","items","toRefs","countryItems","useCountryItems","item","deprecate","_sfc_main$2","ListboxOptionTag","_props","_sfc_main$1","BentoPaymentMethod","_sfc_main","_a"],"mappings":";;;;;;;;;AA2CA,MAAAA,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,eAAAC;AAAA,IACA,aAAAC;AAAA,EACA;AAAA,EACA,OAAA;AAAA,IACA,GAAAD,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,OAAA;AAAA,MAQA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,MAAAE,GAAA,EAAA,MAAAC,EAAA,GAAA;AAEA,UAAAC,IAAA,CAAAC,MAAAF,EAAA,SAAAE,CAAA;AAMA,WAAA;AAAA;AAAA,MAAA,eAJAC;AAAA,QAAA,MAAAJ,EAAA,MAAA,IAAA,CAAA,EAAA,OAAAK,GAAA,OAAAC,GAAA,KAAAC,EAAA,OAAA,EAAA,OAAAF,GAAA,OAAAC,GAAA,MAAAC,EAAA,EAAA;AAAA,MACA;AAAA;AAAA,MAKA,SAAAL;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;qBCjCAM,IAAAX,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAW;AAAA,EACA;AAAA,EACA,OAAA;AAAA,IACA,GAAAX,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,OAAA;AAAA,MAOA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,SAAA;AAAA,MAMA,MAAA;AAAA,MACA,SAAAY,EAAA;AAAA,MACA,WAAA,CAAAL,MAAA,OAAA,OAAAK,CAAA,EAAA,SAAAL,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,MAAAL,GAAA,EAAA,MAAAC,EAAA,GAAA;AAEA,UAAA,EAAA,SAAAU,GAAA,OAAAC,EAAA,IAAAC,EAAAb,CAAA,GACAE,IAAA,CAAAC,MAAAF,EAAA,SAAAE,CAAA,GAEAW,IAAAC,EAAAJ,GAAAC,CAAA;AAEA,YAAAD,EAAA,UAAA,YAAAC,EAAA,MAAA,KAAA,CAAAI,MAAAA,EAAA,KAAA,MACAC;AAAA,MAAA;AAAA,MACA;AAAA,MACA;AAAA,IACA,GAIA;AAAA;AAAA,MAAA,cAAAH;AAAA;AAAA,MAEA,SAAAZ;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;qBCzDAgB,IAAArB,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,eAAAC;AAAA,IACA,kBAAAqB;AAAA,EACA;AAAA,EACA,OAAA;AAAA,IACA,GAAArB,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,OAAA;AAAA,MAOA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,MAAAsB,GAAA,EAAA,MAAAnB,EAAA,GAAA;AAIA,WAAA;AAAA;AAAA,MAAA,SAFA,CAAAE,MAAAF,EAAA,SAAAE,CAAA;AAAA,IAIA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;qBC1BAkB,IAAAxB,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,eAAAC;AAAA,IACA,oBAAAwB;AAAA,EACA;AAAA,EACA,OAAA;AAAA,IACA,GAAAxB,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,OAAA;AAAA,MAOA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,MAAAsB,GAAA,EAAA,MAAAnB,EAAA,GAAA;AAIA,WAAA;AAAA;AAAA,MAAA,SAFA,CAAAE,MAAAF,EAAA,SAAAE,CAAA;AAAA,IAIA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;qBCzBAoB,IAAA1B,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,eAAAC;AAAA,IACA,kBAAAqB;AAAA,EACA;AAAA,EACA,OAAA;AAAA,IACA,GAAArB,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,OAAA;AAAA,MAQA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,MAAAE,GAAA,EAAA,MAAAC,EAAA,GAAA;AAEA,UAAAC,IAAA,CAAAC,MAAAF,EAAA,SAAAE,CAAA;AAMA,WAAA;AAAA;AAAA,MAAA,UAJAC;AAAA,QAAA,MAAA;;AAAA,kBAAAoB,IAAAxB,EAAA,UAAA,gBAAAwB,EAAA,IAAA,CAAA,EAAA,OAAAlB,GAAA,OAAAD,GAAA,SAAAM,EAAA,OAAA,EAAA,OAAAL,GAAA,OAAAD,GAAA,MAAAM,EAAA;AAAA;AAAA,MACA;AAAA;AAAA,MAKA,SAAAT;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"dropdown.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 v-slot=\"{ label, data }\" v-bind=\"$props\" :items=\"dropdownItems\" @input=\"onInput\">\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/internal';\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 item is selected\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\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 v-slot=\"{ label }\" v-bind=\"$props\" :items=\"countryItems\" @input=\"onInput\">\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType, toRefs } from 'vue';\n import { BentoCountryListboxOptions } from './dropdown-country.types';\n import { BentoListboxSelectedValue } from '@/types';\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 item is selected\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\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 v-slot=\"slotProps\" v-bind=\"$props\" @input=\"onInput\">\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types';\n import { ListboxOptionTag } from '@/internal';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country 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 item is selected\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\n }>();\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\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 v-slot=\"{ value, label }\" v-bind=\"$props\" @input=\"onInput\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import { BentoPaymentMethodListboxOptions } from './dropdown-payment-method.types';\n import { BentoListboxSelectedValue } from '@/types';\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 {BentoPaymentMethodType} value.value - Payment type code that\n */\n items: {\n type: Array as PropType<BentoPaymentMethodListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when an item is selected\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\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, BentoPaymentMethodType } 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(BentoPaymentMethodType.IDEAL) // Default value\n * const options: BentoPaymentMethodListboxOptions = [\n * { label: 'Option 1', value: BentoPaymentMethodType.IDEAL },\n * { label: 'Option 2', value: BentoPaymentMethodType.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 >\n <listbox-option-tag :option=\"{ value: label, data, label: '' }\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '../../../../../types';\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 item is selected\n */\n (e: 'input', selectedValue: BentoListboxSelectedValue);\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","onInput","selectedValue","emit","dropdownItems","computed","props","value","label","src","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","deprecate","__default__$2","__default__$1","__default__","tagItems","_a"],"mappings":";;;;;;;;;;;AAuEI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;iBApCAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEAE,IAAAC,EAAA,MAAAC,EAAA,MAAA,IAAA,CAAA,EAAA,OAAAC,GAAA,OAAAC,GAAA,KAAAC,EAAA,OAAA,EAAA,OAAAF,GAAA,OAAAC,GAAA,MAAAC,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;sBCqDAC,IAAAV,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;iBA7CAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEA,EAAA,SAAAS,GAAA,OAAAC,EAAA,IAAAC,EAAAP,CAAA,GACAQ,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;;;;;;;;;;;;;;;;;;sBCQRC,IAAAlB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;0CAlCA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;;;;;;;;;;;;;;;;;;sBCkCAiB,IAAAnB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;0CAlCA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;;;;;;;;;;;;;;;;;;sBCsCAkB,IAAApB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;iBAlCAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEAmB,IAAAhB,EAAA,MAAA;;AAAA,cAAAiB,IAAAhB,EAAA,UAAA,gBAAAgB,EAAA,IAAA,CAAA,EAAA,OAAAd,GAAA,OAAAD,GAAA,SAAAI,EAAA,OAAA,EAAA,OAAAH,GAAA,OAAAD,GAAA,MAAAI,EAAA;AAAA,KAAA;;;;;;;;;;;;;;;;;;;;"}
|