@adyen/bento-vue2 1.43.0 → 1.44.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 +101 -53
- package/dist/action-bar.js +1 -1
- 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-with-menu.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/button.js +7 -8
- package/dist/button.js.map +1 -1
- package/dist/card.js +1 -1
- package/dist/chunks/{action-bar.kPPYSgQK.js → action-bar.Dx12xlEW.js} +15 -15
- package/dist/chunks/action-bar.Dx12xlEW.js.map +1 -0
- package/dist/chunks/{base-modal.DroVbSCn.js → base-modal.BrqNR-ah.js} +2 -2
- package/dist/chunks/{base-modal.DroVbSCn.js.map → base-modal.BrqNR-ah.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.dp6C-PKX.js → button-actions-with-menu.ptKgeQEb.js} +38 -29
- package/dist/chunks/button-actions-with-menu.ptKgeQEb.js.map +1 -0
- package/dist/chunks/button-actions.BIQ3qA8q.js +252 -0
- package/dist/chunks/button-actions.BIQ3qA8q.js.map +1 -0
- package/dist/chunks/{card.BcjxzwZV.js → card.D9g7fZDX.js} +2 -2
- package/dist/chunks/{card.BcjxzwZV.js.map → card.D9g7fZDX.js.map} +1 -1
- package/dist/chunks/{code-snippet.DuZDA7gH.js → code-snippet.rmKiWrIv.js} +4 -4
- package/dist/chunks/{code-snippet.DuZDA7gH.js.map → code-snippet.rmKiWrIv.js.map} +1 -1
- package/dist/chunks/{dashboard-section.CExqPbQb.js → dashboard-section._KVy37B0.js} +2 -2
- package/dist/chunks/{dashboard-section.CExqPbQb.js.map → dashboard-section._KVy37B0.js.map} +1 -1
- package/dist/chunks/{dashed-underline.dGO33Q_E.js → dashed-underline.DX5QlK14.js} +2 -2
- package/dist/chunks/{dashed-underline.dGO33Q_E.js.map → dashed-underline.DX5QlK14.js.map} +1 -1
- package/dist/chunks/{data-grid-template.BF7JMfoJ.js → data-grid-template.BgTUIoak.js} +2 -2
- package/dist/chunks/{data-grid-template.BF7JMfoJ.js.map → data-grid-template.BgTUIoak.js.map} +1 -1
- package/dist/chunks/{data-grid.BXB98JQr.js → data-grid.sAbzCVND.js} +9 -9
- package/dist/chunks/{data-grid.BXB98JQr.js.map → data-grid.sAbzCVND.js.map} +1 -1
- package/dist/chunks/{date-picker.Dfg1_eo6.js → date-picker.DrSWxADA.js} +3 -3
- package/dist/chunks/{date-picker.Dfg1_eo6.js.map → date-picker.DrSWxADA.js.map} +1 -1
- package/dist/chunks/{date-range-picker.xYGf0SRg.js → date-range-picker.CFIOD59O.js} +6 -6
- package/dist/chunks/{date-range-picker.xYGf0SRg.js.map → date-range-picker.CFIOD59O.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.DPZmj7xJ.js → dropdown-default-textbox.ZAFh7KqG.js} +111 -103
- package/dist/chunks/{dropdown-default-textbox.DPZmj7xJ.js.map → dropdown-default-textbox.ZAFh7KqG.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.B4RMse5R.js → dropdown-tag.Ntdp7P7W.js} +2 -2
- package/dist/chunks/{dropdown-tag.B4RMse5R.js.map → dropdown-tag.Ntdp7P7W.js.map} +1 -1
- package/dist/chunks/{dropdown.BfzsI2Th.js → dropdown.DC9un4VJ.js} +240 -234
- package/dist/chunks/{dropdown.BfzsI2Th.js.map → dropdown.DC9un4VJ.js.map} +1 -1
- package/dist/chunks/es6.C-HLzYPA.js +11 -0
- package/dist/chunks/{es6.b4enG1py.js.map → es6.C-HLzYPA.js.map} +1 -1
- package/dist/chunks/{file-uploader.CK-Frs_q.js → file-uploader.ItCr8Ezn.js} +228 -227
- package/dist/chunks/file-uploader.ItCr8Ezn.js.map +1 -0
- package/dist/chunks/{filter-bar.hBPWastb.js → filter-bar.Dowrph-Z.js} +18 -19
- package/dist/chunks/{filter-bar.hBPWastb.js.map → filter-bar.Dowrph-Z.js.map} +1 -1
- package/dist/chunks/{footer-actions.DwnLB4NW.js → footer-actions.B3GJ1wNP.js} +2 -2
- package/dist/chunks/{footer-actions.DwnLB4NW.js.map → footer-actions.B3GJ1wNP.js.map} +1 -1
- package/dist/chunks/{header.CAJtHW1k.js → header.BLjdXtYJ.js} +4 -4
- package/dist/chunks/{header.CAJtHW1k.js.map → header.BLjdXtYJ.js.map} +1 -1
- package/dist/chunks/{input-field-password.BmfOGkrH.js → input-field-password.CgxF9jhq.js} +3 -3
- package/dist/chunks/{input-field-password.BmfOGkrH.js.map → input-field-password.CgxF9jhq.js.map} +1 -1
- package/dist/chunks/{input-field.CHD3Fzzg.js → input-field.CcjqGkLs.js} +2 -2
- package/dist/chunks/{input-field.CHD3Fzzg.js.map → input-field.CcjqGkLs.js.map} +1 -1
- package/dist/chunks/{menu.N41WnXc8.js → menu.B78fzH_k.js} +81 -54
- package/dist/chunks/menu.B78fzH_k.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.BbNe6M9T.js → modal-fullscreen.DgftXCJe.js} +2 -2
- package/dist/chunks/{modal-fullscreen.BbNe6M9T.js.map → modal-fullscreen.DgftXCJe.js.map} +1 -1
- package/dist/chunks/{modal.Cb4zg5fN.js → modal.BA745pfv.js} +4 -4
- package/dist/chunks/{modal.Cb4zg5fN.js.map → modal.BA745pfv.js.map} +1 -1
- package/dist/chunks/{pagination.DORr-ox0.js → pagination.CfwtuZ7R.js} +2 -2
- package/dist/chunks/{pagination.DORr-ox0.js.map → pagination.CfwtuZ7R.js.map} +1 -1
- package/dist/chunks/{popover.Uy-vuQq5.js → popover.ZlmaSYms.js} +2 -2
- package/dist/chunks/{popover.Uy-vuQq5.js.map → popover.ZlmaSYms.js.map} +1 -1
- package/dist/chunks/{search-bar.BtFX4039.js → search-bar.lYuXPzBX.js} +3 -3
- package/dist/chunks/{search-bar.BtFX4039.js.map → search-bar.lYuXPzBX.js.map} +1 -1
- package/dist/chunks/{secondary-nav.DtnWRhFW.js → secondary-nav.CF6WPYn4.js} +3 -3
- package/dist/chunks/{secondary-nav.DtnWRhFW.js.map → secondary-nav.CF6WPYn4.js.map} +1 -1
- package/dist/chunks/{selection-card-group.B6XXbJsv.js → selection-card-group.CjuBQ2UA.js} +4 -4
- package/dist/chunks/{selection-card-group.B6XXbJsv.js.map → selection-card-group.CjuBQ2UA.js.map} +1 -1
- package/dist/chunks/{sidepanel.CRJN9Acz.js → sidepanel.NUx7L5f1.js} +2 -2
- package/dist/chunks/{sidepanel.CRJN9Acz.js.map → sidepanel.NUx7L5f1.js.map} +1 -1
- package/dist/chunks/{teleport.CQKBJZU5.js → teleport.B5fwsT5y.js} +26 -17
- package/dist/chunks/teleport.B5fwsT5y.js.map +1 -0
- package/dist/chunks/textarea.F-JyRtIw.js +196 -0
- package/dist/chunks/{textarea.Y3yd_3ll.js.map → textarea.F-JyRtIw.js.map} +1 -1
- package/dist/chunks/{timeline-item.CCV4U3Zx.js → timeline-item.BJyB8-Wv.js} +3 -3
- package/dist/chunks/{timeline-item.CCV4U3Zx.js.map → timeline-item.BJyB8-Wv.js.map} +1 -1
- package/dist/chunks/{tutorial.4r7MKNEU.js → tutorial.DFvMZAN5.js} +4 -4
- package/dist/chunks/{tutorial.4r7MKNEU.js.map → tutorial.DFvMZAN5.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.CAlfyb_L.js → use-cached-selected-values.BiqVX5O7.js} +26 -26
- package/dist/chunks/{use-cached-selected-values.CAlfyb_L.js.map → use-cached-selected-values.BiqVX5O7.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.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 +4 -4
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +85 -86
- package/dist/index.js.map +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/internal.js +28 -24
- package/dist/internal.js.map +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.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/sidepanel.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +48 -2
- package/package.json +2 -2
- package/dist/assets/loading-button.css +0 -1
- package/dist/chunks/action-bar.kPPYSgQK.js.map +0 -1
- package/dist/chunks/button-actions-with-menu.dp6C-PKX.js.map +0 -1
- package/dist/chunks/button-actions.Cpx4PQp0.js +0 -111
- package/dist/chunks/button-actions.Cpx4PQp0.js.map +0 -1
- package/dist/chunks/es6.b4enG1py.js +0 -10
- package/dist/chunks/file-uploader.CK-Frs_q.js.map +0 -1
- package/dist/chunks/loading-button.CiPmvU7F.js +0 -113
- package/dist/chunks/loading-button.CiPmvU7F.js.map +0 -1
- package/dist/chunks/menu.N41WnXc8.js.map +0 -1
- package/dist/chunks/teleport.CQKBJZU5.js.map +0 -1
- package/dist/chunks/textarea.Y3yd_3ll.js +0 -192
- package/dist/chunks/use-click-outside.D6aIgS15.js +0 -14
- package/dist/chunks/use-click-outside.D6aIgS15.js.map +0 -1
package/dist/chunks/{dropdown-default-textbox.DPZmj7xJ.js → dropdown-default-textbox.ZAFh7KqG.js}
RENAMED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { g as
|
|
3
|
-
import { u as
|
|
4
|
-
import { B as
|
|
5
|
-
import { d as
|
|
6
|
-
import { C as
|
|
7
|
-
import { C as
|
|
8
|
-
import { n as
|
|
9
|
-
import { s as
|
|
10
|
-
import { C as
|
|
1
|
+
import { defineComponent as C, useAttrs as B, useSlots as h, ref as D, computed as r, watch as F, nextTick as P } from "vue";
|
|
2
|
+
import { g as V } from "./generate-uid.D-HFI38h.js";
|
|
3
|
+
import { u as R } from "./use-has-slot.C9lQZ6nz.js";
|
|
4
|
+
import { B as T } from "./typography.Bu_WAKdf.js";
|
|
5
|
+
import { d as M } from "./debounce.DUTu11PS.js";
|
|
6
|
+
import { C as U } from "./cross-circle-fill.CnYH4R_h.js";
|
|
7
|
+
import { C as $ } from "./cross-circle-fill-small.Oj6lPaDy.js";
|
|
8
|
+
import { n as E } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
9
|
+
import { s as v } from "./events.CMzGybJJ.js";
|
|
10
|
+
import { C as Y, a as q } from "./chevron-up.B2uWhZf7.js";
|
|
11
11
|
import "../assets/dropdown-default-textbox.css";
|
|
12
|
-
var
|
|
13
|
-
const
|
|
12
|
+
var k = /* @__PURE__ */ ((l) => (l.DEFAULT = "DropdownInputDefault", l.SMALL = "DropdownInputSmall", l))(k || {}), p = /* @__PURE__ */ ((l) => (l.DISABLED = "disabled", l.READONLY = "readonly", l.HAS_ITEMS = "has-items", l.OPENED = "opened", l.ERROR = "error", l))(p || {}), n = /* @__PURE__ */ ((l) => (l.OPEN = "dropdown-base-open", l.KEYDOWN = "dropdown-base-keydown", l.CLOSE = "dropdown-base-close", l.INPUT = "dropdown-base-input", l.CLEAR = "dropdown-base-clear", l))(n || {});
|
|
13
|
+
const z = C({
|
|
14
14
|
name: "dropdown-base-textbox",
|
|
15
15
|
inheritAttrs: !1
|
|
16
|
-
}),
|
|
17
|
-
...
|
|
16
|
+
}), K = /* @__PURE__ */ C({
|
|
17
|
+
...z,
|
|
18
18
|
props: {
|
|
19
19
|
/**
|
|
20
20
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -103,20 +103,20 @@ const Y = _({
|
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
105
|
emits: [],
|
|
106
|
-
setup(l, {
|
|
107
|
-
const e = l,
|
|
108
|
-
[`b-dropdown-base-textbox--${
|
|
109
|
-
[`b-dropdown-base-textbox--${
|
|
110
|
-
[`b-dropdown-base-textbox--${
|
|
111
|
-
})),
|
|
106
|
+
setup(l, { expose: t, emit: o }) {
|
|
107
|
+
const e = l, a = B(), d = h(), b = R(d), i = D(null), f = V("textbox"), y = r(() => ({
|
|
108
|
+
[`b-dropdown-base-textbox--${p.DISABLED}`]: e.disabled,
|
|
109
|
+
[`b-dropdown-base-textbox--${p.READONLY}`]: e.readonly,
|
|
110
|
+
[`b-dropdown-base-textbox--${p.HAS_ITEMS}`]: !!e.additionalItemsSelected
|
|
111
|
+
})), _ = r(() => ({
|
|
112
112
|
"b-dropdown-base-textbox__input--dynamic-filtering": e.dynamicFiltering
|
|
113
|
-
})),
|
|
113
|
+
})), x = r(() => e.dynamicFiltering && !!e.value && e.open), m = r(
|
|
114
114
|
() => {
|
|
115
|
-
var
|
|
115
|
+
var u;
|
|
116
116
|
return {
|
|
117
117
|
"aria-haspopup": "listbox",
|
|
118
118
|
"aria-controls": e.ariaControls,
|
|
119
|
-
"aria-describedby": (
|
|
119
|
+
"aria-describedby": (u = a["aria-describedby"]) == null ? void 0 : u.toString(),
|
|
120
120
|
"aria-expanded": e.ariaExpanded ? "true" : "false",
|
|
121
121
|
"aria-labelledby": e.ariaLabelledby,
|
|
122
122
|
"aria-label": e.ariaLabelledby ? null : e.ariaLabel,
|
|
@@ -124,65 +124,69 @@ const Y = _({
|
|
|
124
124
|
"aria-disabled": e.disabled ? !0 : null
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
),
|
|
127
|
+
), w = r(
|
|
128
128
|
() => e.multiple ? e.selectedValueItem : []
|
|
129
|
-
),
|
|
130
|
-
() => e.multiple && e.selectedValueItem &&
|
|
129
|
+
), c = r(() => e.dynamicFiltering && (e.open || e.alwaysComboboxIsInput)), s = r(() => e.selectedValueItem && !e.multiple), O = r(
|
|
130
|
+
() => e.multiple && e.selectedValueItem && w.value.length > 0 && e.showSlotContentInMultiple
|
|
131
131
|
);
|
|
132
|
-
|
|
133
|
-
() =>
|
|
132
|
+
F(
|
|
133
|
+
() => c.value,
|
|
134
134
|
() => {
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
c.value && !e.alwaysComboboxIsInput && P(() => {
|
|
136
|
+
i.value.focus();
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
);
|
|
140
|
-
const
|
|
141
|
-
!e.disabled && !e.readonly && (
|
|
142
|
-
},
|
|
143
|
-
e.open && (
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
!e.readonly && !e.disabled ?
|
|
148
|
-
}, e.debounceTime)
|
|
149
|
-
|
|
140
|
+
const S = () => {
|
|
141
|
+
!e.disabled && !e.readonly && (i.value.focus(), o(n.OPEN));
|
|
142
|
+
}, g = () => {
|
|
143
|
+
e.open && (i.value.focus(), o(n.CLOSE));
|
|
144
|
+
}, L = (u) => e.open && u.target.tagName === "INPUT" ? null : e.open ? g() : S(), N = () => {
|
|
145
|
+
o(n.CLEAR), o(n.INPUT, ""), i.value.focus();
|
|
146
|
+
}, A = M((u) => {
|
|
147
|
+
!e.readonly && !e.disabled ? o(n.INPUT, u.target.value) : (u.preventDefault(), u.stopPropagation());
|
|
148
|
+
}, e.debounceTime), I = () => {
|
|
149
|
+
i.value.focus();
|
|
150
|
+
};
|
|
151
|
+
return t({
|
|
152
|
+
focus: I
|
|
153
|
+
}), { __sfc: !0, attrs: a, slots: d, hasSlot: b, props: e, emit: o, textbox: i, textboxId: f, conditionalClasses: y, comboboxConditionalClasses: _, isFiltering: x, ariaAttributes: m, selectedValueItems: w, shouldShowInput: c, shouldShowSingleSelectSlot: s, shouldShowMultipleSlot: O, onOpenDropdown: S, onCloseDropdown: g, onToggleDropdown: L, onClearSearch: N, onInputEvent: A, focus: I, BentoTypography: T, DropdownBaseTextboxEvent: n, CrossCircleFillIcon: U, CrossCircleFillSmallIcon: $, BentoDropdownSize: k };
|
|
150
154
|
}
|
|
151
155
|
});
|
|
152
|
-
var
|
|
153
|
-
var t = this,
|
|
154
|
-
return
|
|
155
|
-
return !a.type.indexOf("key") && t._k(a.keyCode, "escape", void 0, a.key, void 0) ? null :
|
|
156
|
-
} } }, [e
|
|
157
|
-
return t.$emit(
|
|
156
|
+
var H = function() {
|
|
157
|
+
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
158
|
+
return o("div", { class: t.$attrs.class, attrs: { "data-testid": "textbox-wrapper" }, on: { click: e.onToggleDropdown, keydown: function(a) {
|
|
159
|
+
return !a.type.indexOf("key") && t._k(a.keyCode, "escape", void 0, a.key, void 0) ? null : e.onCloseDropdown.apply(null, arguments);
|
|
160
|
+
} } }, [o(e.BentoTypography, { staticClass: "b-dropdown-base-textbox", class: e.conditionalClasses, attrs: { el: "div", "data-testid": "base-textbox" } }, [e.shouldShowInput ? o("input", t._b({ ref: "textbox", staticClass: "b-dropdown-base-textbox__input", attrs: { id: e.textboxId, role: "combobox", type: "text", "aria-autocomplete": "list", size: "1", disabled: t.disabled ? !0 : null, readonly: t.readonly }, domProps: { value: t.open ? t.value : t.displayValue }, on: { keydown: [function(a) {
|
|
161
|
+
return t.$emit(e.DropdownBaseTextboxEvent.KEYDOWN, a);
|
|
158
162
|
}, function(a) {
|
|
159
|
-
return !a.type.indexOf("key") && t._k(a.keyCode, "enter", 13, a.key, "Enter") ? null :
|
|
160
|
-
}], input:
|
|
163
|
+
return !a.type.indexOf("key") && t._k(a.keyCode, "enter", 13, a.key, "Enter") ? null : e.onToggleDropdown.apply(null, arguments);
|
|
164
|
+
}], input: e.onInputEvent } }, "input", e.ariaAttributes, !1)) : o("div", t._b({ ref: "textbox", staticClass: "b-dropdown-base-textbox__input", class: e.comboboxConditionalClasses, attrs: { id: e.textboxId, role: "combobox", tabindex: 0 } }, "div", e.ariaAttributes, !1), [e.shouldShowSingleSelectSlot ? t._t("default", function() {
|
|
161
165
|
return [t._v(" " + t._s(t.displayValue) + " ")];
|
|
162
|
-
}, null, t.selectedValueItem) :
|
|
163
|
-
return
|
|
166
|
+
}, null, t.selectedValueItem) : e.shouldShowMultipleSlot ? [o("div", { staticClass: "b-dropdown-base-textbox__input-multiple-selected" }, t._l(e.selectedValueItems, function(a) {
|
|
167
|
+
return o("div", { key: a.value }, [o("div", { staticClass: "b-dropdown-base-textbox__input-selected-element" }, [t._t("default", function() {
|
|
164
168
|
return [t._v(" " + t._s(t.displayValue) + " ")];
|
|
165
169
|
}, null, a)], 2)]);
|
|
166
|
-
}), 0)] : [t._v(t._s(t.displayValue))]], 2), t.additionalItemsSelected ?
|
|
167
|
-
return a.stopPropagation(),
|
|
170
|
+
}), 0)] : [t._v(t._s(t.displayValue))]], 2), t.additionalItemsSelected ? o("span", { staticClass: "b-dropdown-base-textbox__additional-items" }, [t._v(" " + t._s(t.additionalItemsSelected) + " ")]) : t._e(), e.hasSlot("icon") && !e.isFiltering ? o("span", { staticClass: "b-dropdown-base-textbox__icon", attrs: { "aria-hidden": "true" } }, [t._t("icon")], 2) : t._e(), e.isFiltering ? o("span", { staticClass: "b-dropdown-base-textbox__clear-search", attrs: { tabindex: "0", "data-testid": "clear-search-button" }, on: { click: function(a) {
|
|
171
|
+
return a.stopPropagation(), e.onClearSearch.apply(null, arguments);
|
|
168
172
|
}, keydown: function(a) {
|
|
169
|
-
return !a.type.indexOf("key") && t._k(a.keyCode, "enter", 13, a.key, "Enter") ? null : (a.stopPropagation(),
|
|
173
|
+
return !a.type.indexOf("key") && t._k(a.keyCode, "enter", 13, a.key, "Enter") ? null : (a.stopPropagation(), e.onClearSearch.apply(null, arguments));
|
|
170
174
|
}, keyup: function(a) {
|
|
171
|
-
return !a.type.indexOf("key") && t._k(a.keyCode, "space", 32, a.key, [" ", "Spacebar"]) ? null :
|
|
172
|
-
} } }, [t.size ===
|
|
173
|
-
},
|
|
174
|
-
q,
|
|
175
|
-
z,
|
|
175
|
+
return !a.type.indexOf("key") && t._k(a.keyCode, "space", 32, a.key, [" ", "Spacebar"]) ? null : e.onClearSearch.apply(null, arguments);
|
|
176
|
+
} } }, [t.size === e.BentoDropdownSize.SMALL ? o(e.CrossCircleFillSmallIcon, { attrs: { "svg-title": "clearSearch" } }) : o(e.CrossCircleFillIcon, { attrs: { "svg-title": "clearSearch" } })], 1) : t._e()])], 1);
|
|
177
|
+
}, W = [], j = /* @__PURE__ */ E(
|
|
176
178
|
K,
|
|
179
|
+
H,
|
|
180
|
+
W,
|
|
177
181
|
!1,
|
|
178
182
|
null,
|
|
179
|
-
"
|
|
183
|
+
"499e7c98"
|
|
180
184
|
);
|
|
181
|
-
const
|
|
185
|
+
const G = j.exports, J = C({
|
|
182
186
|
name: "dropdown-default-textbox",
|
|
183
187
|
inheritAttrs: !1
|
|
184
|
-
}),
|
|
185
|
-
...
|
|
188
|
+
}), Q = /* @__PURE__ */ C({
|
|
189
|
+
...J,
|
|
186
190
|
props: {
|
|
187
191
|
/**
|
|
188
192
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -273,56 +277,60 @@ const W = H.exports, j = _({
|
|
|
273
277
|
multiple: { type: Boolean, default: !1 }
|
|
274
278
|
},
|
|
275
279
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
276
|
-
setup(l, {
|
|
277
|
-
const e = l,
|
|
278
|
-
[`b-dropdown-default-textbox--${
|
|
279
|
-
[`b-dropdown-default-textbox--${
|
|
280
|
-
[`b-dropdown-default-textbox--${
|
|
281
|
-
[`b-dropdown-default-textbox--${
|
|
280
|
+
setup(l, { expose: t, emit: o }) {
|
|
281
|
+
const e = l, a = h(), d = D(null), b = r(() => ({
|
|
282
|
+
[`b-dropdown-default-textbox--${p.ERROR}`]: !e.disabled && !e.readonly && e.isInvalid,
|
|
283
|
+
[`b-dropdown-default-textbox--${p.DISABLED}`]: e.disabled,
|
|
284
|
+
[`b-dropdown-default-textbox--${p.READONLY}`]: e.readonly,
|
|
285
|
+
[`b-dropdown-default-textbox--${p.OPENED}`]: e.open,
|
|
282
286
|
"b-dropdown-default-textbox--condensed": e.condensed
|
|
283
|
-
})),
|
|
284
|
-
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
},
|
|
288
|
-
|
|
289
|
-
},
|
|
290
|
-
|
|
291
|
-
},
|
|
292
|
-
|
|
293
|
-
},
|
|
294
|
-
[
|
|
295
|
-
[
|
|
296
|
-
[
|
|
297
|
-
[
|
|
298
|
-
[
|
|
287
|
+
})), i = r(() => e.open && !e.disabled && !e.readonly), f = (s) => {
|
|
288
|
+
o("input", s);
|
|
289
|
+
}, y = (s) => {
|
|
290
|
+
o("keydown", s);
|
|
291
|
+
}, _ = (s) => {
|
|
292
|
+
v(s), o("open");
|
|
293
|
+
}, x = (s) => {
|
|
294
|
+
v(s), o("close");
|
|
295
|
+
}, m = (s) => {
|
|
296
|
+
v(s), o("clear");
|
|
297
|
+
}, w = {
|
|
298
|
+
[n.INPUT]: f,
|
|
299
|
+
[n.OPEN]: _,
|
|
300
|
+
[n.CLOSE]: x,
|
|
301
|
+
[n.CLEAR]: m,
|
|
302
|
+
[n.KEYDOWN]: y
|
|
303
|
+
}, c = () => {
|
|
304
|
+
d.value.focus();
|
|
299
305
|
};
|
|
300
|
-
return {
|
|
306
|
+
return t({
|
|
307
|
+
focus: c
|
|
308
|
+
}), { __sfc: !0, emit: o, slots: a, props: e, baseTextbox: d, conditionalClasses: b, isDropdownOpen: i, onInput: f, onKeyDown: y, openDropdown: _, closeDropdown: x, clearValue: m, listeners: w, focus: c, DropdownBaseTextbox: G, ChevronDownIcon: Y, ChevronUpIcon: q };
|
|
301
309
|
}
|
|
302
310
|
});
|
|
303
|
-
var
|
|
304
|
-
var t = this,
|
|
305
|
-
return
|
|
306
|
-
return { key:
|
|
307
|
-
return [t._t(
|
|
311
|
+
var X = function() {
|
|
312
|
+
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
313
|
+
return o("div", { staticClass: "b-dropdown-default-textbox", class: e.conditionalClasses, attrs: { "data-testid": "default-textbox" } }, [o(e.DropdownBaseTextbox, t._g(t._b({ ref: "baseTextbox", staticClass: "b-dropdown-default-textbox__textbox", attrs: { value: t.value }, scopedSlots: t._u([t._l(e.slots, function(a, d) {
|
|
314
|
+
return { key: d, fn: function(b) {
|
|
315
|
+
return [t._t(d, null, null, b)];
|
|
308
316
|
} };
|
|
309
317
|
}), { key: "icon", fn: function() {
|
|
310
|
-
return [
|
|
311
|
-
}, proxy: !0 }], null, !0) }, "dropdown-base-textbox", { ...t.$attrs, ...t.$props }, !1),
|
|
312
|
-
},
|
|
313
|
-
G,
|
|
314
|
-
J,
|
|
318
|
+
return [o("div", { staticClass: "b-dropdown-default-textbox__chevron" }, [o(e.ChevronUpIcon, { directives: [{ name: "show", rawName: "v-show", value: e.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), o(e.ChevronDownIcon, { directives: [{ name: "show", rawName: "v-show", value: !e.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
|
|
319
|
+
}, proxy: !0 }], null, !0) }, "dropdown-base-textbox", { ...t.$attrs, ...t.$props }, !1), e.listeners))], 1);
|
|
320
|
+
}, Z = [], ee = /* @__PURE__ */ E(
|
|
315
321
|
Q,
|
|
322
|
+
X,
|
|
323
|
+
Z,
|
|
316
324
|
!1,
|
|
317
325
|
null,
|
|
318
|
-
"
|
|
326
|
+
"9ee629c5"
|
|
319
327
|
);
|
|
320
|
-
const
|
|
328
|
+
const ce = ee.exports;
|
|
321
329
|
export {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
330
|
+
k as B,
|
|
331
|
+
ce as D,
|
|
332
|
+
p as a,
|
|
333
|
+
n as b,
|
|
334
|
+
G as c
|
|
327
335
|
};
|
|
328
|
-
//# sourceMappingURL=dropdown-default-textbox.
|
|
336
|
+
//# sourceMappingURL=dropdown-default-textbox.ZAFh7KqG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-default-textbox.DPZmj7xJ.js","sources":["../../src/components/dropdown/dropdown.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["/**\n * @deprecated Do not use. Only 'default' size should be used.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated since version 2.0. Use the string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types';\n\nexport type { BentoListboxSearchOptions as BentoDropdownSearchOptions } from '@/types';\nexport type { BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps } from '@/types';\nexport type { BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions } from '@/types';\n","import { PropType } from 'vue';\nimport { Booleanish } from '@/types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'dropdown-base-open',\n KEYDOWN = 'dropdown-base-keydown',\n CLOSE = 'dropdown-base-close',\n INPUT = 'dropdown-base-input',\n CLEAR = 'dropdown-base-clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"shouldShowInput\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n size=\"1\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n :class=\"comboboxConditionalClasses\"\n role=\"combobox\"\n :tabindex=\"0\"\n >\n <slot v-if=\"shouldShowSingleSelectSlot\" v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n <template v-else-if=\"shouldShowMultipleSlot\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n tabindex=\"0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-small-icon v-if=\"size === BentoDropdownSize.SMALL\" :svg-title=\"'clearSearch'\" />\n <cross-circle-fill-icon v-else :svg-title=\"'clearSearch'\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/core/utils/ts';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { debounce } from '@/utils/ts/debounce';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * If the combobox DOM element should be an `input` element.\n */\n alwaysComboboxIsInput: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: { type: String, default: null },\n\n /**\n * Custom debounce time for the user type event.\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * Dropdown size\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n },\n });\n\n const emit = defineEmits([]);\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n }));\n\n const comboboxConditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox__input--dynamic-filtering`]: props.dynamicFiltering,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value && props.open);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n } as HTMLAttributes)\n );\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as BentoListboxOptionItem[]) : []\n );\n\n const shouldShowInput = computed(() => props.dynamicFiltering && (props.open || props.alwaysComboboxIsInput));\n const shouldShowSingleSelectSlot = computed(() => props.selectedValueItem && !props.multiple);\n const shouldShowMultipleSlot = computed(\n () =>\n props.multiple &&\n props.selectedValueItem &&\n selectedValueItems.value.length > 0 &&\n props.showSlotContentInMultiple\n );\n\n watch(\n () => shouldShowInput.value,\n () => {\n if (shouldShowInput.value && !props.alwaysComboboxIsInput) {\n nextTick(() => {\n textbox.value.focus();\n });\n }\n }\n );\n\n const onOpenDropdown = () => {\n if (!props.disabled && !props.readonly) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.OPEN);\n }\n };\n\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent = props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = debounce<(event: Event) => void>((event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n }, props.debounceTime);\n</script>\n\n<script lang=\"ts\">\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n name: 'dropdown-base-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, defineComponent, PropType, useSlots } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n });\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n 'b-dropdown-default-textbox--condensed': props.condensed,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["BentoDropdownSize","BentoDropdownSize2","DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","__default__$1","defineComponent","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","textbox","ref","textboxId","generateUid","conditionalClasses","computed","props","comboboxConditionalClasses","isFiltering","ariaAttributes","_a","selectedValueItems","shouldShowInput","shouldShowSingleSelectSlot","shouldShowMultipleSlot","watch","nextTick","onOpenDropdown","emit","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","__default__","isDropdownOpen","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,wBACAA,EAAA,QAAA,sBAFQA,IAAAD,KAAA,CAAA,CAAA,GCuEAE,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,sBACAA,EAAA,UAAA,yBACAA,EAAA,QAAA,uBACAA,EAAA,QAAA,uBACAA,EAAA,QAAA,uBALQA,IAAAD,KAAA,CAAA,CAAA;AC4NR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,cAAA;AAEV,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,EAAA,YAAAA,EAAA;AAAA,MAES,CAAA,+BAAAlB,EAAA,QAAA,EAAA,GAAAkB,EAAA;AAAA,MAC4B,CAAA,+BAAAlB,EAAA,QAAA,EAAA,GAAAkB,EAAA;AAAA,MACA,CAAA,+BAAAlB,EAAA,MAAA,EAAA,GAAAkB,EAAA;AAAA,MACF,yCAAAA,EAAA;AAAA,IAC3B,EAAA,GAGnDoB,IAAArB,EAAA,MAAAC,EAAA,QAAA,CAAAA,EAAA,YAAA,CAAAA,EAAA,QAAA,GAEAqB,IAAA,CAAAC,MAAA;AACI,MAAAV,EAAA,SAAAU,CAAA;AAAA,IAAsB,GAE1BC,IAAA,CAAAC,MAAA;AACI,MAAAZ,EAAA,WAAAY,CAAA;AAAA,IAAiB,GAErBC,IAAA,CAAAD,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAZ,EAAA,MAAA;AAAA,IAAW,GAEfe,IAAA,CAAAH,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAZ,EAAA,OAAA;AAAA,IAAY,GAEhBgB,IAAA,CAAAJ,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAZ,EAAA,OAAA;AAAA,IAAY,GAGhBiB,IAAA;AAAA,MAAkB,CAAA7C,EAAA,KAAA,GAAAqC;AAAA,MACoB,CAAArC,EAAA,IAAA,GAAAyC;AAAA,MACD,CAAAzC,EAAA,KAAA,GAAA2C;AAAA,MACC,CAAA3C,EAAA,KAAA,GAAA4C;AAAA,MACA,CAAA5C,EAAA,OAAA,GAAAuC;AAAA,IACE;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"dropdown-default-textbox.ZAFh7KqG.js","sources":["../../src/components/dropdown/dropdown.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["/**\n * @deprecated Do not use. Only 'default' size should be used.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated since version 2.0. Use the string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types';\n\nexport type { BentoListboxSearchOptions as BentoDropdownSearchOptions } from '@/types';\nexport type { BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps } from '@/types';\nexport type { BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions } from '@/types';\n","import { PropType } from 'vue';\nimport { Booleanish } from '@/types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'dropdown-base-open',\n KEYDOWN = 'dropdown-base-keydown',\n CLOSE = 'dropdown-base-close',\n INPUT = 'dropdown-base-input',\n CLEAR = 'dropdown-base-clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"shouldShowInput\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n size=\"1\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n :class=\"comboboxConditionalClasses\"\n role=\"combobox\"\n :tabindex=\"0\"\n >\n <slot v-if=\"shouldShowSingleSelectSlot\" v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n <template v-else-if=\"shouldShowMultipleSlot\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n tabindex=\"0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-small-icon v-if=\"size === BentoDropdownSize.SMALL\" :svg-title=\"'clearSearch'\" />\n <cross-circle-fill-icon v-else :svg-title=\"'clearSearch'\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/core/utils/ts';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { debounce } from '@/utils/ts/debounce';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * If the combobox DOM element should be an `input` element.\n */\n alwaysComboboxIsInput: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: { type: String, default: null },\n\n /**\n * Custom debounce time for the user type event.\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * Dropdown size\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n },\n });\n\n const emit = defineEmits([]);\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n }));\n\n const comboboxConditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox__input--dynamic-filtering`]: props.dynamicFiltering,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value && props.open);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n } as HTMLAttributes)\n );\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as BentoListboxOptionItem[]) : []\n );\n\n const shouldShowInput = computed(() => props.dynamicFiltering && (props.open || props.alwaysComboboxIsInput));\n const shouldShowSingleSelectSlot = computed(() => props.selectedValueItem && !props.multiple);\n const shouldShowMultipleSlot = computed(\n () =>\n props.multiple &&\n props.selectedValueItem &&\n selectedValueItems.value.length > 0 &&\n props.showSlotContentInMultiple\n );\n\n watch(\n () => shouldShowInput.value,\n () => {\n if (shouldShowInput.value && !props.alwaysComboboxIsInput) {\n nextTick(() => {\n textbox.value.focus();\n });\n }\n }\n );\n\n const onOpenDropdown = () => {\n if (!props.disabled && !props.readonly) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.OPEN);\n }\n };\n\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent = props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = debounce<(event: Event) => void>((event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n }, props.debounceTime);\n\n const focus = () => {\n textbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n name: 'dropdown-base-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, defineComponent, PropType, ref, useSlots } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n });\n\n const baseTextbox = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n 'b-dropdown-default-textbox--condensed': props.condensed,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n const focus = () => {\n baseTextbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["BentoDropdownSize","BentoDropdownSize2","DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","__default__$1","defineComponent","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","textbox","ref","textboxId","generateUid","conditionalClasses","computed","props","comboboxConditionalClasses","isFiltering","ariaAttributes","_a","selectedValueItems","shouldShowInput","shouldShowSingleSelectSlot","shouldShowMultipleSlot","watch","nextTick","onOpenDropdown","emit","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","focus","expose","__default__","baseTextbox","isDropdownOpen","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,wBACAA,EAAA,QAAA,sBAFQA,IAAAD,KAAA,CAAA,CAAA,GCuEAE,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,sBACAA,EAAA,UAAA,yBACAA,EAAA,QAAA,uBACAA,EAAA,QAAA,uBACAA,EAAA,QAAA,uBALQA,IAAAD,KAAA,CAAA,CAAA;ACoOR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,cAAA;AAEV,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA9NAC,IAAAC,EAAA,GACAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GA4GAI,IAAAC,EAAA,IAAA,GACAC,IAAAC,EAAA,SAAA,GAEAC,IAAAC,EAAA,OAAA;AAAA,MAA2C,CAAA,4BAAAjB,EAAA,QAAA,EAAA,GAAAkB,EAAA;AAAA,MACkC,CAAA,4BAAAlB,EAAA,QAAA,EAAA,GAAAkB,EAAA;AAAA,MACA,CAAA,4BAAAlB,EAAA,SAAA,EAAA,GAAA,CAAA,CAAAkB,EAAA;AAAA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AAAC,EAAA,QAAA,CAAAA,EAAA,YAAA,CAAAA,EAAA,QAAA,GAEAwB,IAAA,CAAAC,MAAA;AACI,MAAAb,EAAA,SAAAa,CAAA;AAAA,IAAsB,GAE1BC,IAAA,CAAAC,MAAA;AACI,MAAAf,EAAA,WAAAe,CAAA;AAAA,IAAiB,GAErBC,IAAA,CAAAD,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAf,EAAA,MAAA;AAAA,IAAW,GAEfkB,IAAA,CAAAH,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAf,EAAA,OAAA;AAAA,IAAY,GAEhBmB,IAAA,CAAAJ,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAf,EAAA,OAAA;AAAA,IAAY,GAGhBoB,IAAA;AAAA,MAAkB,CAAAhD,EAAA,KAAA,GAAAwC;AAAA,MACoB,CAAAxC,EAAA,IAAA,GAAA4C;AAAA,MACD,CAAA5C,EAAA,KAAA,GAAA8C;AAAA,MACC,CAAA9C,EAAA,KAAA,GAAA+C;AAAA,MACA,CAAA/C,EAAA,OAAA,GAAA0C;AAAA,IACE,GAGxCP,IAAA,MAAA;AACI,MAAAG,EAAA,MAAA,MAAA;AAAA,IAAwB;AAG5B,WAAAF,EAAA;AAAA,MAAa,OAAAD;AAAA,IACT,CAAA;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as a, computed as i, toRefs as m } from "vue";
|
|
2
2
|
import { B as v } from "./avatar.DXzyWKsI.js";
|
|
3
|
-
import { B as p } from "./dropdown.
|
|
3
|
+
import { B as p } from "./dropdown.DC9un4VJ.js";
|
|
4
4
|
import { n as c } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
5
5
|
import { d as y, B as b } from "./typography.Bu_WAKdf.js";
|
|
6
6
|
import { u as w } from "./use-country-items.C25TI6tp.js";
|
|
@@ -212,4 +212,4 @@ export {
|
|
|
212
212
|
nt as d,
|
|
213
213
|
st as e
|
|
214
214
|
};
|
|
215
|
-
//# sourceMappingURL=dropdown-tag.
|
|
215
|
+
//# sourceMappingURL=dropdown-tag.Ntdp7P7W.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-tag.B4RMse5R.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 '@/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([\"input\"]);\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([\"input\"]);\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([\"input\"]);\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 {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([\"input\"]);\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 >\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([\"input\"]);\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":";;;;;;;;;;AAkEI,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;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"dropdown-tag.Ntdp7P7W.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 '@/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([\"input\"]);\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([\"input\"]);\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([\"input\"]);\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 {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([\"input\"]);\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 >\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([\"input\"]);\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":";;;;;;;;;;AAkEI,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