@adyen/bento-vue2 1.49.0 → 1.50.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 +58 -74
- 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/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.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/payment-method.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/toggle-button.css +1 -1
- package/dist/button.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.pYOeP8WX.js → action-bar.CGJJrMpa.js} +3 -3
- package/dist/chunks/{action-bar.pYOeP8WX.js.map → action-bar.CGJJrMpa.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BxWulRXh.js → button-actions-with-menu.C5OE7oOu.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.BxWulRXh.js.map → button-actions-with-menu.C5OE7oOu.js.map} +1 -1
- package/dist/chunks/{checkbox-group.4TiIcnc7.js → checkbox-group.wa6Mtmxa.js} +2 -2
- package/dist/chunks/{checkbox-group.4TiIcnc7.js.map → checkbox-group.wa6Mtmxa.js.map} +1 -1
- package/dist/chunks/{checkbox.CE9NdY0R.js → checkbox.BPvnJrvd.js} +17 -17
- package/dist/chunks/{checkbox.CE9NdY0R.js.map → checkbox.BPvnJrvd.js.map} +1 -1
- package/dist/chunks/{code-snippet.DSsZWtwa.js → code-snippet.3s8WCnke.js} +2 -2
- package/dist/chunks/{code-snippet.DSsZWtwa.js.map → code-snippet.3s8WCnke.js.map} +1 -1
- package/dist/chunks/{dashboard-section.DzMn8yDZ.js → dashboard-section.BgyN5u0K.js} +2 -2
- package/dist/chunks/{dashboard-section.DzMn8yDZ.js.map → dashboard-section.BgyN5u0K.js.map} +1 -1
- package/dist/chunks/{dashed-underline.COTMts4l.js → dashed-underline.Cvn5IoHT.js} +2 -2
- package/dist/chunks/{dashed-underline.COTMts4l.js.map → dashed-underline.Cvn5IoHT.js.map} +1 -1
- package/dist/chunks/{data-grid-template.BPBneEHq.js → data-grid-template.DtWM0Tnu.js} +2 -2
- package/dist/chunks/{data-grid-template.BPBneEHq.js.map → data-grid-template.DtWM0Tnu.js.map} +1 -1
- package/dist/chunks/{data-grid.iqFUbiZy.js → data-grid.N5Rxo6QB.js} +11 -11
- package/dist/chunks/data-grid.N5Rxo6QB.js.map +1 -0
- package/dist/chunks/{date-picker.C68IAqHR.js → date-picker.Byv5Z-Xj.js} +2 -2
- package/dist/chunks/{date-picker.C68IAqHR.js.map → date-picker.Byv5Z-Xj.js.map} +1 -1
- package/dist/chunks/{date-range-picker.dcQRDNS7.js → date-range-picker.CUS9Q53T.js} +4 -4
- package/dist/chunks/{date-range-picker.dcQRDNS7.js.map → date-range-picker.CUS9Q53T.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.DhENnOHT.js → dropdown-tag.ClUMccWv.js} +3 -3
- package/dist/chunks/{dropdown-tag.DhENnOHT.js.map → dropdown-tag.ClUMccWv.js.map} +1 -1
- package/dist/chunks/{dropdown.BBHNOorv.js → dropdown.CC1i41NX.js} +263 -263
- package/dist/chunks/dropdown.CC1i41NX.js.map +1 -0
- package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
- package/dist/chunks/{file-uploader.mLUYQnz1.js → file-uploader.DTkxh9Ct.js} +244 -248
- package/dist/chunks/file-uploader.DTkxh9Ct.js.map +1 -0
- package/dist/chunks/{filter-bar.CFcu6P8H.js → filter-bar.gj9sdW5T.js} +9 -9
- package/dist/chunks/{filter-bar.CFcu6P8H.js.map → filter-bar.gj9sdW5T.js.map} +1 -1
- package/dist/chunks/{header.BeS6ktqU.js → header.5rAXro_L.js} +48 -48
- package/dist/chunks/{header.BeS6ktqU.js.map → header.5rAXro_L.js.map} +1 -1
- package/dist/chunks/{info-icon-with-popover.yeIoJzhj.js → info-icon-with-popover.B0zJWJZn.js} +2 -2
- package/dist/chunks/{info-icon-with-popover.yeIoJzhj.js.map → info-icon-with-popover.B0zJWJZn.js.map} +1 -1
- package/dist/chunks/{input-field-password.Dez8haIj.js → input-field-password.PU9SY4FC.js} +3 -3
- package/dist/chunks/{input-field-password.Dez8haIj.js.map → input-field-password.PU9SY4FC.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.CPTonsjM.js → input-field-phone-number.D2juJ9ZD.js} +2 -2
- package/dist/chunks/{input-field-phone-number.CPTonsjM.js.map → input-field-phone-number.D2juJ9ZD.js.map} +1 -1
- package/dist/chunks/{input-field.lEMEBT7J.js → input-field.BPbe00eB.js} +2 -2
- package/dist/chunks/{input-field.lEMEBT7J.js.map → input-field.BPbe00eB.js.map} +1 -1
- package/dist/chunks/{menu.lbODB0y3.js → menu.BC7ynpgF.js} +24 -24
- package/dist/chunks/{menu.lbODB0y3.js.map → menu.BC7ynpgF.js.map} +1 -1
- package/dist/chunks/{pagination.CuJ-P2bO.js → pagination.CT-h2q0J.js} +2 -2
- package/dist/chunks/{pagination.CuJ-P2bO.js.map → pagination.CT-h2q0J.js.map} +1 -1
- package/dist/chunks/payment-method.Bu76jY3c.js +59 -0
- package/dist/chunks/payment-method.Bu76jY3c.js.map +1 -0
- package/dist/chunks/payment-method.types.CJKfZQN5.js.map +1 -1
- package/dist/chunks/{popover.BQGNMbQN.js → popover.CRdrSmFW.js} +17 -16
- package/dist/chunks/popover.CRdrSmFW.js.map +1 -0
- package/dist/chunks/{search-bar.Dk-GuqgF.js → search-bar.bMOGN8_E.js} +3 -3
- package/dist/chunks/{search-bar.Dk-GuqgF.js.map → search-bar.bMOGN8_E.js.map} +1 -1
- package/dist/chunks/{secondary-nav.DC2GrGaQ.js → secondary-nav.C9sm93do.js} +2 -2
- package/dist/chunks/{secondary-nav.DC2GrGaQ.js.map → secondary-nav.C9sm93do.js.map} +1 -1
- package/dist/chunks/{selection-card-group.B-YY-iKp.js → selection-card-group.0O3gmtoi.js} +8 -8
- package/dist/chunks/{selection-card-group.B-YY-iKp.js.map → selection-card-group.0O3gmtoi.js.map} +1 -1
- package/dist/chunks/{toggle-button.BX_9vB0d.js → toggle-button.DK4H4sHT.js} +5 -5
- package/dist/chunks/toggle-button.DK4H4sHT.js.map +1 -0
- package/dist/chunks/{tutorial.BWWTUI9f.js → tutorial.BbQox1EZ.js} +3 -3
- package/dist/chunks/{tutorial.BWWTUI9f.js.map → tutorial.BbQox1EZ.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.C5gHa-dC.js → use-cached-selected-values.a_5Iw6Dh.js} +258 -254
- package/dist/chunks/use-cached-selected-values.a_5Iw6Dh.js.map +1 -0
- 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 +3 -3
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +28 -28
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/internal.js +3 -3
- package/dist/menu.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/payment-method.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/styles/bento-dark.css +1 -1
- package/dist/styles/bento-light.css +1 -1
- package/dist/styles/bento.css +1 -1
- package/dist/styles/legacy.css +2 -0
- package/dist/styles/styleguide.css +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +41 -39
- package/package.json +4 -4
- package/dist/chunks/data-grid.iqFUbiZy.js.map +0 -1
- package/dist/chunks/dropdown.BBHNOorv.js.map +0 -1
- package/dist/chunks/file-uploader.mLUYQnz1.js.map +0 -1
- package/dist/chunks/payment-method.BKr_q5cZ.js +0 -84
- package/dist/chunks/payment-method.BKr_q5cZ.js.map +0 -1
- package/dist/chunks/popover.BQGNMbQN.js.map +0 -1
- package/dist/chunks/toggle-button.BX_9vB0d.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.C5gHa-dC.js.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { d as
|
|
3
|
-
import { a as
|
|
4
|
-
import { n as
|
|
5
|
-
import { s as
|
|
6
|
-
import { g as
|
|
1
|
+
import { ref as h, watch as ce, computed as p, defineComponent as T, useSlots as ue, toRefs as pe, nextTick as E, useAttrs as Le, toRef as x, inject as Oe } from "vue";
|
|
2
|
+
import { d as le, B as Ee } from "./typography.J1v_SPG3.js";
|
|
3
|
+
import { a as W, b as $, c as De, B as M, D as Be } from "./dropdown-default-textbox.CC9Z_RFG.js";
|
|
4
|
+
import { n as P } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
5
|
+
import { s as j } from "./events.CMzGybJJ.js";
|
|
6
|
+
import { g as k } from "./generate-uid.NJ8tVoha.js";
|
|
7
7
|
import { u as Ie } from "./aria-label.CaUURpnB.js";
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
8
|
+
import { u as H } from "./i18n.BQkEbtPM.js";
|
|
9
|
+
import { u as Te } from "./use-form-layout-loading.D3lALhtC.js";
|
|
10
10
|
import { u as Re } from "./use-has-slot.C9lQZ6nz.js";
|
|
11
|
-
import { a as
|
|
12
|
-
import { B as
|
|
11
|
+
import { a as u, b as U, B as q, c as Ae, u as Ne } from "./use-cached-selected-values.a_5Iw6Dh.js";
|
|
12
|
+
import { B as O, a as $e } from "./keyboard-navigation.pB8weElW.js";
|
|
13
13
|
import { B as Me } from "./directive.O3yEdalv.js";
|
|
14
14
|
import { F as ke, E as Pe } from "./error-message.xTNEaNn8.js";
|
|
15
|
-
import { P as
|
|
16
|
-
import { B as Fe } from "./popover.
|
|
15
|
+
import { P as ie } from "./popper-container.CsW4R0-t.js";
|
|
16
|
+
import { B as Fe } from "./popover.CRdrSmFW.js";
|
|
17
17
|
import "../assets/dropdown.css";
|
|
18
18
|
const Ke = {
|
|
19
19
|
"en-US": {
|
|
@@ -29,61 +29,61 @@ const Ke = {
|
|
|
29
29
|
apply: "Aplicar",
|
|
30
30
|
cancel: "Cancelar"
|
|
31
31
|
}
|
|
32
|
-
}, ze = (
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
}, ze = (n, t, o, e) => {
|
|
33
|
+
const a = h(n.value), { t: i } = H();
|
|
34
|
+
ce(n, () => {
|
|
35
|
+
a.value = n.value;
|
|
36
36
|
});
|
|
37
|
-
const
|
|
38
|
-
() => JSON.stringify(
|
|
39
|
-
),
|
|
40
|
-
e(
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
o.value && t.value && (
|
|
45
|
-
},
|
|
37
|
+
const s = p(
|
|
38
|
+
() => JSON.stringify(a.value) === JSON.stringify(n.value)
|
|
39
|
+
), r = () => {
|
|
40
|
+
e(u.SELECT, a.value), e(u.CLOSE_DROPDOWN);
|
|
41
|
+
}, c = () => {
|
|
42
|
+
a.value = n.value, e(u.CLOSE_DROPDOWN);
|
|
43
|
+
}, m = () => {
|
|
44
|
+
o.value && t.value && (a.value = n.value);
|
|
45
|
+
}, l = p(() => [
|
|
46
46
|
{
|
|
47
47
|
title: i("apply"),
|
|
48
|
-
event:
|
|
49
|
-
disabled:
|
|
48
|
+
event: r,
|
|
49
|
+
disabled: s.value
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
title: i("cancel"),
|
|
53
|
-
event:
|
|
53
|
+
event: c
|
|
54
54
|
}
|
|
55
55
|
]), d = (y) => {
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
d(y), e(
|
|
56
|
+
a.value = y, t.value || e(u.SELECT, y);
|
|
57
|
+
}, C = (y) => {
|
|
58
|
+
d(y), e(u.TAB);
|
|
59
59
|
}, g = (y) => {
|
|
60
|
-
d(y), e(
|
|
61
|
-
},
|
|
62
|
-
d(y), e(
|
|
63
|
-
}, C = () => {
|
|
64
|
-
r(), e(c.ESCAPE);
|
|
60
|
+
d(y), e(u.ENTER);
|
|
61
|
+
}, f = (y) => {
|
|
62
|
+
d(y), e(u.SPACE);
|
|
65
63
|
}, L = () => {
|
|
66
|
-
e(
|
|
64
|
+
c(), e(u.ESCAPE);
|
|
65
|
+
}, w = () => {
|
|
66
|
+
e(u.SHOW_MORE);
|
|
67
67
|
}, S = {
|
|
68
|
-
[
|
|
69
|
-
[
|
|
70
|
-
[
|
|
71
|
-
[
|
|
72
|
-
[
|
|
68
|
+
[u.SELECT]: d,
|
|
69
|
+
[u.SHOW_MORE]: w,
|
|
70
|
+
[u.TAB]: C,
|
|
71
|
+
[u.SPACE]: f,
|
|
72
|
+
[u.ENTER]: g
|
|
73
73
|
};
|
|
74
74
|
return {
|
|
75
75
|
// Values
|
|
76
|
-
actions:
|
|
77
|
-
internalSelectedValue:
|
|
76
|
+
actions: l,
|
|
77
|
+
internalSelectedValue: a,
|
|
78
78
|
// Methods
|
|
79
79
|
listeners: S,
|
|
80
|
-
onEscapeKey:
|
|
81
|
-
onOutsideDropdownClick:
|
|
80
|
+
onEscapeKey: L,
|
|
81
|
+
onOutsideDropdownClick: m
|
|
82
82
|
};
|
|
83
|
-
}, We =
|
|
83
|
+
}, We = T({
|
|
84
84
|
i18n: { messages: Ke },
|
|
85
85
|
name: "bento-dropdown-options-container"
|
|
86
|
-
}), je = /* @__PURE__ */
|
|
86
|
+
}), je = /* @__PURE__ */ T({
|
|
87
87
|
...We,
|
|
88
88
|
props: {
|
|
89
89
|
/**
|
|
@@ -139,8 +139,8 @@ const Ke = {
|
|
|
139
139
|
*/
|
|
140
140
|
lazyLoadType: {
|
|
141
141
|
type: String,
|
|
142
|
-
default:
|
|
143
|
-
validator: (
|
|
142
|
+
default: q.AUTOMATIC,
|
|
143
|
+
validator: (n) => Object.values(q).includes(n)
|
|
144
144
|
},
|
|
145
145
|
/**
|
|
146
146
|
* Indicates if new options are loading.
|
|
@@ -170,7 +170,7 @@ const Ke = {
|
|
|
170
170
|
*
|
|
171
171
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
172
172
|
*/
|
|
173
|
-
searching:
|
|
173
|
+
searching: U.props.searching,
|
|
174
174
|
/**
|
|
175
175
|
* If enabled, dropdown will display non-selectable, static categories
|
|
176
176
|
*/
|
|
@@ -179,7 +179,7 @@ const Ke = {
|
|
|
179
179
|
* Reference to the DOM element or Vue component for positioning
|
|
180
180
|
* the Dropdown container.
|
|
181
181
|
*/
|
|
182
|
-
targetElement: { type:
|
|
182
|
+
targetElement: { type: ie.props.targetElement.type, required: !0 },
|
|
183
183
|
/**
|
|
184
184
|
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
185
185
|
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
@@ -190,15 +190,15 @@ const Ke = {
|
|
|
190
190
|
}
|
|
191
191
|
},
|
|
192
192
|
emits: [],
|
|
193
|
-
setup(
|
|
194
|
-
const e =
|
|
193
|
+
setup(n, { expose: t, emit: o }) {
|
|
194
|
+
const e = n, a = ue(), { selectedValue: i, multiple: s } = pe(e), r = h(null), { t: c } = H(), m = p(() => e.open && !e.disabled), l = p(() => c("noOptionsMatchThisSearch")), d = p(() => ({
|
|
195
195
|
"b-dropdown-options-container--single": !(e != null && e.multiple)
|
|
196
|
-
})),
|
|
196
|
+
})), C = p(() => ({
|
|
197
197
|
"b-dropdown-options-container__listbox--single": !(e != null && e.multiple)
|
|
198
|
-
})), { actions: g, internalSelectedValue:
|
|
199
|
-
var
|
|
200
|
-
const
|
|
201
|
-
"min-width": `${(
|
|
198
|
+
})), { actions: g, internalSelectedValue: f, listeners: L, onEscapeKey: w, onOutsideDropdownClick: S } = ze(i, s, m, o), y = p(() => e != null && e.multiple ? Fe : ie), D = p(() => {
|
|
199
|
+
var v;
|
|
200
|
+
const B = {
|
|
201
|
+
"min-width": `${(v = e == null ? void 0 : e.targetElement) == null ? void 0 : v.clientWidth}px`,
|
|
202
202
|
"max-width": "min(500px, 95%)"
|
|
203
203
|
};
|
|
204
204
|
return e != null && e.multiple ? {
|
|
@@ -206,12 +206,12 @@ const Ke = {
|
|
|
206
206
|
actions: g.value,
|
|
207
207
|
divider: !0,
|
|
208
208
|
fallbackPosition: ["top-start"],
|
|
209
|
-
id:
|
|
209
|
+
id: k(`dropdown-options-${e.id}`),
|
|
210
210
|
open: e.open,
|
|
211
211
|
position: "bottom-start",
|
|
212
212
|
style: {
|
|
213
213
|
width: "auto",
|
|
214
|
-
...
|
|
214
|
+
...B
|
|
215
215
|
},
|
|
216
216
|
targetElement: e.targetElement
|
|
217
217
|
} : {
|
|
@@ -219,46 +219,46 @@ const Ke = {
|
|
|
219
219
|
offset: [0, 8],
|
|
220
220
|
position: "bottom-start",
|
|
221
221
|
style: {
|
|
222
|
-
display:
|
|
223
|
-
...
|
|
222
|
+
display: m.value ? "block" : "none",
|
|
223
|
+
...B
|
|
224
224
|
},
|
|
225
225
|
targetElement: e.targetElement
|
|
226
226
|
};
|
|
227
227
|
});
|
|
228
228
|
return t({
|
|
229
229
|
onOutsideDropdownClick: S
|
|
230
|
-
}), { __sfc: !0, slots:
|
|
230
|
+
}), { __sfc: !0, slots: a, emit: o, props: e, selectedValue: i, multiple: s, dropdownOptionsListboxRef: r, t: c, isDropdownOpen: m, noResultsMessage: l, conditionalClasses: d, conditionalListboxClasses: C, actions: g, internalSelectedValue: f, listeners: L, onEscapeKey: w, onOutsideDropdownClick: S, popperContainerOrPopoverComponent: y, popperContainerOrPopoverProps: D, BentoListbox: U };
|
|
231
231
|
}
|
|
232
232
|
});
|
|
233
233
|
var Ue = function() {
|
|
234
234
|
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
235
|
-
return o(e.popperContainerOrPopoverComponent, t._b({ tag: "component", staticClass: "b-dropdown-options-container", class: e.conditionalClasses, attrs: { "aria-label": t.ariaLabel } }, "component", e.popperContainerOrPopoverProps, !1), [o("div", { on: { keydown: function(
|
|
236
|
-
return !
|
|
237
|
-
} } }, [o(e.BentoListbox, t._g({ ref: "dropdownOptionsListboxRef", staticClass: "b-dropdown-options-container__listbox", class: e.conditionalListboxClasses, attrs: { id: t.id, "aria-label": t.ariaLabel, "empty-state": t.emptyState, "is-option-disabled": t.isOptionDisabled, items: t.items, "selected-value": e.internalSelectedValue, multiple: e.multiple, "static-categories": t.staticCategories, "no-results-message": e.noResultsMessage, searching: t.searching, loading: t.loading, "lazy-load-type": t.lazyLoadType, "has-more-items": t.hasMoreItems, "virtual-scroll": t.virtualScroll }, scopedSlots: t._u([t._l(e.slots, function(
|
|
238
|
-
return { key: i, fn: function(
|
|
239
|
-
return [t._t(i, null, null,
|
|
235
|
+
return o(e.popperContainerOrPopoverComponent, t._b({ tag: "component", staticClass: "b-dropdown-options-container", class: e.conditionalClasses, attrs: { "aria-label": t.ariaLabel } }, "component", e.popperContainerOrPopoverProps, !1), [o("div", { on: { keydown: function(a) {
|
|
236
|
+
return !a.type.indexOf("key") && t._k(a.keyCode, "esc", 27, a.key, ["Esc", "Escape"]) ? null : e.onEscapeKey.apply(null, arguments);
|
|
237
|
+
} } }, [o(e.BentoListbox, t._g({ ref: "dropdownOptionsListboxRef", staticClass: "b-dropdown-options-container__listbox", class: e.conditionalListboxClasses, attrs: { id: t.id, "aria-label": t.ariaLabel, "empty-state": t.emptyState, "is-option-disabled": t.isOptionDisabled, items: t.items, "selected-value": e.internalSelectedValue, multiple: e.multiple, "static-categories": t.staticCategories, "no-results-message": e.noResultsMessage, searching: t.searching, loading: t.loading, "lazy-load-type": t.lazyLoadType, "has-more-items": t.hasMoreItems, "virtual-scroll": t.virtualScroll }, scopedSlots: t._u([t._l(e.slots, function(a, i) {
|
|
238
|
+
return { key: i, fn: function(s) {
|
|
239
|
+
return [t._t(i, null, null, s)];
|
|
240
240
|
} };
|
|
241
241
|
})], null, !0) }, e.listeners))], 1)]);
|
|
242
|
-
},
|
|
242
|
+
}, qe = [], He = /* @__PURE__ */ P(
|
|
243
243
|
je,
|
|
244
244
|
Ue,
|
|
245
|
-
|
|
245
|
+
qe,
|
|
246
246
|
!1,
|
|
247
247
|
null,
|
|
248
248
|
"b7543bfc"
|
|
249
249
|
);
|
|
250
|
-
const
|
|
251
|
-
let
|
|
252
|
-
const
|
|
250
|
+
const Je = He.exports;
|
|
251
|
+
let re = 0;
|
|
252
|
+
const Ve = {
|
|
253
253
|
beforeCreate() {
|
|
254
|
-
this.uuid =
|
|
254
|
+
this.uuid = re.toString(), re += 1;
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
257
|
var Ye = function() {
|
|
258
258
|
var t = this, o = t._self._c;
|
|
259
259
|
return o("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? o("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), o("path", { attrs: { fill: "#00112C", d: "M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z" } })]);
|
|
260
|
-
}, Ze = [], Qe = /* @__PURE__ */
|
|
261
|
-
|
|
260
|
+
}, Ze = [], Qe = /* @__PURE__ */ P(
|
|
261
|
+
Ve,
|
|
262
262
|
Ye,
|
|
263
263
|
Ze,
|
|
264
264
|
!1,
|
|
@@ -266,16 +266,16 @@ var Ye = function() {
|
|
|
266
266
|
null
|
|
267
267
|
);
|
|
268
268
|
const Xe = Qe.exports;
|
|
269
|
-
let
|
|
269
|
+
let de = 0;
|
|
270
270
|
const Ge = {
|
|
271
271
|
beforeCreate() {
|
|
272
|
-
this.uuid =
|
|
272
|
+
this.uuid = de.toString(), de += 1;
|
|
273
273
|
}
|
|
274
274
|
};
|
|
275
275
|
var et = function() {
|
|
276
276
|
var t = this, o = t._self._c;
|
|
277
277
|
return o("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? o("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), o("path", { attrs: { fill: "#00112C", d: "M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z" } })]);
|
|
278
|
-
}, tt = [], ot = /* @__PURE__ */
|
|
278
|
+
}, tt = [], ot = /* @__PURE__ */ P(
|
|
279
279
|
Ge,
|
|
280
280
|
et,
|
|
281
281
|
tt,
|
|
@@ -283,11 +283,11 @@ var et = function() {
|
|
|
283
283
|
null,
|
|
284
284
|
null
|
|
285
285
|
);
|
|
286
|
-
const
|
|
286
|
+
const at = ot.exports, nt = T({
|
|
287
287
|
name: "dropdown-small-textbox",
|
|
288
288
|
inheritAttrs: !1
|
|
289
|
-
}),
|
|
290
|
-
...
|
|
289
|
+
}), st = /* @__PURE__ */ T({
|
|
290
|
+
...nt,
|
|
291
291
|
props: {
|
|
292
292
|
/**
|
|
293
293
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -347,33 +347,33 @@ const st = ot.exports, at = I({
|
|
|
347
347
|
value: { type: String, default: "" }
|
|
348
348
|
},
|
|
349
349
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
350
|
-
setup(
|
|
351
|
-
const e =
|
|
352
|
-
[`b-dropdown-small-textbox--${
|
|
353
|
-
[`b-dropdown-small-textbox--${
|
|
354
|
-
[`b-dropdown-small-textbox--${
|
|
355
|
-
})),
|
|
356
|
-
o("input",
|
|
357
|
-
},
|
|
358
|
-
o("keydown",
|
|
359
|
-
},
|
|
360
|
-
|
|
361
|
-
},
|
|
362
|
-
|
|
363
|
-
}, d = (
|
|
364
|
-
|
|
365
|
-
},
|
|
366
|
-
[
|
|
367
|
-
[
|
|
368
|
-
[
|
|
369
|
-
[
|
|
370
|
-
[
|
|
350
|
+
setup(n, { expose: t, emit: o }) {
|
|
351
|
+
const e = n, a = h(null), i = p(() => ({
|
|
352
|
+
[`b-dropdown-small-textbox--${W.DISABLED}`]: e.disabled,
|
|
353
|
+
[`b-dropdown-small-textbox--${W.READONLY}`]: e.readonly,
|
|
354
|
+
[`b-dropdown-small-textbox--${W.OPENED}`]: e.open
|
|
355
|
+
})), s = p(() => e.open && !e.disabled && !e.readonly), r = (f) => {
|
|
356
|
+
o("input", f);
|
|
357
|
+
}, c = (f) => {
|
|
358
|
+
o("keydown", f);
|
|
359
|
+
}, m = (f) => {
|
|
360
|
+
j(f), o("open");
|
|
361
|
+
}, l = (f) => {
|
|
362
|
+
j(f), o("close");
|
|
363
|
+
}, d = (f) => {
|
|
364
|
+
j(f), o("clear");
|
|
365
|
+
}, C = {
|
|
366
|
+
[$.INPUT]: r,
|
|
367
|
+
[$.OPEN]: m,
|
|
368
|
+
[$.CLOSE]: l,
|
|
369
|
+
[$.CLEAR]: d,
|
|
370
|
+
[$.KEYDOWN]: c
|
|
371
371
|
}, g = () => {
|
|
372
|
-
|
|
372
|
+
a.value.focus();
|
|
373
373
|
};
|
|
374
374
|
return t({
|
|
375
375
|
focus: g
|
|
376
|
-
}), { __sfc: !0, emit: o, props: e, baseTextbox:
|
|
376
|
+
}), { __sfc: !0, emit: o, props: e, baseTextbox: a, conditionalClasses: i, isDropdownOpen: s, onInput: r, onKeyDown: c, openDropdown: m, closeDropdown: l, clearValue: d, listeners: C, focus: g, BentoDropdownSize: M, DropdownBaseTextbox: De, ChevronDownSmallIcon: Xe, ChevronUpSmallIcon: at };
|
|
377
377
|
}
|
|
378
378
|
});
|
|
379
379
|
var lt = function() {
|
|
@@ -381,116 +381,116 @@ var lt = function() {
|
|
|
381
381
|
return o("div", { staticClass: "b-dropdown-small-textbox", class: e.conditionalClasses }, [o(e.DropdownBaseTextbox, t._g(t._b({ ref: "baseTextbox", staticClass: "b-dropdown-small-textbox__textbox", attrs: { size: e.BentoDropdownSize.SMALL }, scopedSlots: t._u([{ key: "icon", fn: function() {
|
|
382
382
|
return [o("div", { staticClass: "b-dropdown-small-textbox__chevron" }, [o(e.ChevronUpSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: e.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), o(e.ChevronDownSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: !e.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
|
|
383
383
|
}, proxy: !0 }]) }, "dropdown-base-textbox", { ...t.$attrs, ...t.$props }, !1), e.listeners))], 1);
|
|
384
|
-
}, it = [], rt = /* @__PURE__ */
|
|
385
|
-
|
|
384
|
+
}, it = [], rt = /* @__PURE__ */ P(
|
|
385
|
+
st,
|
|
386
386
|
lt,
|
|
387
387
|
it,
|
|
388
388
|
!1,
|
|
389
389
|
null,
|
|
390
390
|
"d0e53db8"
|
|
391
391
|
);
|
|
392
|
-
const dt = rt.exports, ct = (
|
|
392
|
+
const dt = rt.exports, ct = (n, t) => t.value.reduce((o, e) => {
|
|
393
393
|
if (e.items) {
|
|
394
|
-
const
|
|
395
|
-
(
|
|
394
|
+
const a = e.items.filter(
|
|
395
|
+
(s) => n.value.find((r) => r.value === s.value)
|
|
396
396
|
);
|
|
397
|
-
|
|
397
|
+
a.length === e.items.length ? o.push(e.displayValue ?? e.label) : a.forEach(({ label: s, displayValue: r }) => o.push(r ?? s));
|
|
398
398
|
}
|
|
399
|
-
return
|
|
400
|
-
}, []).join(", "), ut = ({ items:
|
|
401
|
-
const
|
|
402
|
-
() => e.value &&
|
|
403
|
-
var
|
|
404
|
-
return (
|
|
399
|
+
return n.value.find((a) => a.value === e.value) && o.push(e.displayValue ?? e.label), o;
|
|
400
|
+
}, []).join(", "), ut = ({ items: n, placeholder: t, selectedValues: o, isMultiSelect: e }) => {
|
|
401
|
+
const a = p(
|
|
402
|
+
() => e.value && n.value.find((s) => {
|
|
403
|
+
var r;
|
|
404
|
+
return (r = s.items) == null ? void 0 : r.length;
|
|
405
405
|
})
|
|
406
406
|
);
|
|
407
|
-
return
|
|
408
|
-
},
|
|
407
|
+
return p(() => o.value.length ? a.value ? ct(o, n) : o.value.map(({ label: s, displayValue: r }) => r ?? s).join(", ") : t.value || null);
|
|
408
|
+
}, fe = (n) => {
|
|
409
409
|
var t;
|
|
410
|
-
(t =
|
|
410
|
+
(t = n.value.$children) == null || t[0].$refs.textbox.focus();
|
|
411
411
|
}, pt = ({
|
|
412
|
-
inputContainerRef:
|
|
412
|
+
inputContainerRef: n,
|
|
413
413
|
optionsContainerRef: t,
|
|
414
414
|
selectedValueIndex: o,
|
|
415
415
|
isDropdownOpen: e,
|
|
416
|
-
isDynamicFltering:
|
|
416
|
+
isDynamicFltering: a,
|
|
417
417
|
items: i,
|
|
418
|
-
isMultiple:
|
|
419
|
-
},
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
418
|
+
isMultiple: s
|
|
419
|
+
}, r, c, m) => {
|
|
420
|
+
const l = async (v) => {
|
|
421
|
+
var _, F;
|
|
422
|
+
a.value && await E(), (F = (_ = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : _.$el.querySelectorAll('[role="option"]')[v]) == null || F.focus();
|
|
423
|
+
}, d = (v) => {
|
|
424
|
+
var _;
|
|
425
|
+
return (_ = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : _.setListboxFocusedIndex(
|
|
426
|
+
v
|
|
427
|
+
);
|
|
428
|
+
}, C = ({ detail: v }) => {
|
|
429
|
+
v.preventDefault(), e.value || c(), E(() => {
|
|
430
|
+
s ? l(0) : (d(o.value), l(o.value));
|
|
426
431
|
});
|
|
427
|
-
},
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
o.value
|
|
431
|
-
), t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.listboxItemRef[o.value].$el.focus();
|
|
432
|
+
}, g = ({ detail: v }) => {
|
|
433
|
+
v.preventDefault(), e.value || c(), E(() => {
|
|
434
|
+
d(o.value), l(o.value);
|
|
432
435
|
});
|
|
433
|
-
},
|
|
434
|
-
e.value || (
|
|
435
|
-
var
|
|
436
|
-
if (
|
|
437
|
-
const
|
|
438
|
-
(
|
|
436
|
+
}, f = () => {
|
|
437
|
+
e.value || (c(), E(() => {
|
|
438
|
+
var v;
|
|
439
|
+
if (s) {
|
|
440
|
+
const _ = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children;
|
|
441
|
+
(v = _ == null ? void 0 : _[_.length - 1].$el.querySelectorAll('[role="option"]')[i.length - 1]) == null || v.focus();
|
|
439
442
|
} else
|
|
440
|
-
(
|
|
443
|
+
d(i.length - 1), l(i.length - 1);
|
|
441
444
|
}));
|
|
442
|
-
},
|
|
443
|
-
e.value && (
|
|
444
|
-
},
|
|
445
|
-
e.value &&
|
|
446
|
-
},
|
|
447
|
-
e.value ||
|
|
448
|
-
|
|
449
|
-
(f = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || f[0].$el.focus();
|
|
445
|
+
}, L = () => {
|
|
446
|
+
e.value && (m(), fe(n));
|
|
447
|
+
}, w = () => {
|
|
448
|
+
e.value && m();
|
|
449
|
+
}, S = () => {
|
|
450
|
+
e.value || c(), E(() => {
|
|
451
|
+
l(0);
|
|
450
452
|
});
|
|
451
|
-
},
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
n ? (m = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || m[0].$el.focus() : (h = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || h[o.value].$el.focus();
|
|
453
|
+
}, y = ({ detail: v }) => {
|
|
454
|
+
v.preventDefault(), r(), e.value && E(() => {
|
|
455
|
+
s ? l(0) : (d(o.value), l(o.value));
|
|
455
456
|
});
|
|
456
|
-
},
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
n ? (f = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || f[0].$el.focus() : (m = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || m[o.value].$el.focus();
|
|
457
|
+
}, D = () => {
|
|
458
|
+
r(), e.value && E(() => {
|
|
459
|
+
s ? l(0) : (d(o.value), l(o.value));
|
|
460
460
|
});
|
|
461
461
|
};
|
|
462
|
-
return
|
|
463
|
-
...
|
|
464
|
-
[
|
|
465
|
-
[
|
|
466
|
-
[
|
|
467
|
-
[
|
|
468
|
-
[
|
|
469
|
-
[
|
|
470
|
-
[
|
|
462
|
+
return p(() => ({
|
|
463
|
+
...a.value ? {} : { [O.SPACE]: y },
|
|
464
|
+
[O.ENTER]: D,
|
|
465
|
+
[O.ARROW_DOWN]: C,
|
|
466
|
+
[O.ARROW_UP]: g,
|
|
467
|
+
[O.END]: f,
|
|
468
|
+
[O.ESCAPE]: L,
|
|
469
|
+
[O.HOME]: S,
|
|
470
|
+
[O.TAB]: w
|
|
471
471
|
}));
|
|
472
|
-
}, ft = ({ inputContainerRef:
|
|
472
|
+
}, ft = ({ inputContainerRef: n, isDropdownOpen: t }, o) => {
|
|
473
473
|
const e = () => {
|
|
474
474
|
t.value && o(), E(() => {
|
|
475
|
-
|
|
475
|
+
fe(n);
|
|
476
476
|
});
|
|
477
477
|
};
|
|
478
478
|
return {
|
|
479
|
-
[
|
|
480
|
-
[
|
|
481
|
-
[
|
|
482
|
-
[
|
|
479
|
+
[u.ENTER]: e,
|
|
480
|
+
[u.ESCAPE]: e,
|
|
481
|
+
[u.TAB]: e,
|
|
482
|
+
[u.SPACE]: e
|
|
483
483
|
};
|
|
484
484
|
};
|
|
485
|
-
function vt(
|
|
486
|
-
const
|
|
487
|
-
return
|
|
488
|
-
o !== void 0 && o(
|
|
489
|
-
}),
|
|
490
|
-
if (!
|
|
485
|
+
function vt(n, t, o, e) {
|
|
486
|
+
const a = h(n), i = h(t), s = (c, m = []) => m.flatMap((l) => l.label.toLocaleLowerCase().includes(c) ? e != null && e.value && l.items ? [...s(c, l.items)] : [l, ...s(c, l.items)] : l.items ? [...s(c, l.items)] : []);
|
|
487
|
+
return ce(a, () => {
|
|
488
|
+
o !== void 0 && o(a.value);
|
|
489
|
+
}), p(() => {
|
|
490
|
+
if (!a.value || o !== void 0)
|
|
491
491
|
return i.value;
|
|
492
|
-
const
|
|
493
|
-
return
|
|
492
|
+
const c = a.value.toLocaleLowerCase();
|
|
493
|
+
return s(c, i.value);
|
|
494
494
|
});
|
|
495
495
|
}
|
|
496
496
|
const mt = {
|
|
@@ -507,15 +507,15 @@ const mt = {
|
|
|
507
507
|
all: "Todos",
|
|
508
508
|
clearFilter: "Limpar filtro"
|
|
509
509
|
}
|
|
510
|
-
},
|
|
510
|
+
}, yt = Symbol("input field component injection key"), Pt = Symbol("input field hint injection key"), bt = T({
|
|
511
511
|
i18n: { messages: mt },
|
|
512
512
|
name: "b-dropdown",
|
|
513
513
|
components: {
|
|
514
|
-
DropdownInputDefault:
|
|
514
|
+
DropdownInputDefault: Be,
|
|
515
515
|
DropdownInputSmall: dt
|
|
516
516
|
}
|
|
517
|
-
}), _t = /* @__PURE__ */
|
|
518
|
-
...
|
|
517
|
+
}), _t = /* @__PURE__ */ T({
|
|
518
|
+
...bt,
|
|
519
519
|
props: {
|
|
520
520
|
/**
|
|
521
521
|
* @deprecated from version 2.0.0. Use the aria-label attribute instead.
|
|
@@ -602,8 +602,8 @@ const mt = {
|
|
|
602
602
|
*/
|
|
603
603
|
lazyLoadType: {
|
|
604
604
|
type: String,
|
|
605
|
-
default:
|
|
606
|
-
validator: (
|
|
605
|
+
default: U.props.lazyLoadType.default,
|
|
606
|
+
validator: (n) => Object.values(q).includes(n)
|
|
607
607
|
},
|
|
608
608
|
/*
|
|
609
609
|
* If enabled, the user will be able to select multiple items.
|
|
@@ -643,7 +643,7 @@ const mt = {
|
|
|
643
643
|
size: {
|
|
644
644
|
type: String,
|
|
645
645
|
default: null,
|
|
646
|
-
validator: (
|
|
646
|
+
validator: (n) => Object.values(M).includes(n)
|
|
647
647
|
},
|
|
648
648
|
/**
|
|
649
649
|
* If enabled, dropdown will display non-selectable, static categories
|
|
@@ -672,131 +672,131 @@ const mt = {
|
|
|
672
672
|
}
|
|
673
673
|
},
|
|
674
674
|
emits: ["input", "show-more"],
|
|
675
|
-
setup(
|
|
675
|
+
setup(n, { expose: t, emit: o }) {
|
|
676
676
|
var se;
|
|
677
|
-
const e =
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
),
|
|
677
|
+
const e = n, a = Le(), i = ue(), s = Re(i), { t: r } = H(), c = h(null), m = h(null), l = h(null), d = h(!1), C = k("bento-dropdown-options-container"), g = k("dropdown-label"), f = k("dropdown-description"), L = k("dropdown-error"), { isReadOnly: w } = Te(x(e, "readonly")), { cachedSelectedListboxOptions: S, cachedListboxSelectedValues: y, setCachedValues: D } = Ae(
|
|
678
|
+
x(e, "items"),
|
|
679
|
+
x(e, "value"),
|
|
680
|
+
x(e, "multiple")
|
|
681
|
+
), B = h(a["aria-label"]), { ariaLabel: v, label: _ } = pe(e), F = Ie({
|
|
682
682
|
// TODO: take ariaLabel ref away when aria-label prop is removed
|
|
683
|
-
ariaLabel:
|
|
684
|
-
label:
|
|
685
|
-
defaultFallback:
|
|
686
|
-
}),
|
|
683
|
+
ariaLabel: v || B,
|
|
684
|
+
label: _,
|
|
685
|
+
defaultFallback: r("ariaLabelFallback")
|
|
686
|
+
}), J = e.size === M.SMALL || Oe(yt, !1), ve = p(() => J ? M.SMALL : M.DEFAULT), me = p(() => ({
|
|
687
687
|
"b-dropdown--condensed": e.condensed
|
|
688
|
-
})),
|
|
688
|
+
})), ye = p(() => ({
|
|
689
689
|
"b-dropdown__description--error": !!e.errorMessage
|
|
690
|
-
})),
|
|
691
|
-
items:
|
|
692
|
-
placeholder:
|
|
693
|
-
isMultiSelect:
|
|
690
|
+
})), I = h(""), R = x(e, "items"), V = x(e, "staticCategories"), Y = vt(I, R, (se = e == null ? void 0 : e.search) == null ? void 0 : se.searchEvent, V), z = p(() => e.dynamicFiltering && !!I.value), be = ut({
|
|
691
|
+
items: R,
|
|
692
|
+
placeholder: x(e, "placeholder"),
|
|
693
|
+
isMultiSelect: x(e, "multiple"),
|
|
694
694
|
selectedValues: S
|
|
695
|
-
}), _e =
|
|
695
|
+
}), _e = p(() => {
|
|
696
696
|
if (e != null && e.multiple && Array.isArray(e.value))
|
|
697
697
|
return e.items.filter(
|
|
698
|
-
({ value:
|
|
698
|
+
({ value: b }) => (e == null ? void 0 : e.value) && (e == null ? void 0 : e.value).includes(b)
|
|
699
699
|
);
|
|
700
700
|
if (!e.multiple && e.staticCategories) {
|
|
701
|
-
const
|
|
702
|
-
(
|
|
701
|
+
const b = e.items.find(
|
|
702
|
+
(N) => N.items.some((xe) => xe.value === e.value)
|
|
703
703
|
);
|
|
704
|
-
return
|
|
704
|
+
return b ? b.items.find((N) => N.value === e.value) : null;
|
|
705
705
|
}
|
|
706
|
-
return e.items.find(({ value:
|
|
707
|
-
}),
|
|
708
|
-
const
|
|
709
|
-
return
|
|
710
|
-
}), { isMultiLevelSelect:
|
|
711
|
-
var
|
|
706
|
+
return e.items.find(({ value: b }) => b === (e == null ? void 0 : e.value));
|
|
707
|
+
}), Z = p(() => {
|
|
708
|
+
const b = Y.value.findIndex(({ value: A }) => e.value === A);
|
|
709
|
+
return b > 0 ? b : 0;
|
|
710
|
+
}), { isMultiLevelSelect: Q, flattenedItemsList: X } = Ne(R), ge = p(() => {
|
|
711
|
+
var b;
|
|
712
712
|
if (e.multiple) {
|
|
713
|
-
const
|
|
714
|
-
return !e.hasMoreItems &&
|
|
713
|
+
const A = (b = e == null ? void 0 : e.value) == null ? void 0 : b.length, N = Q.value ? X.value.length : R.value.length;
|
|
714
|
+
return !e.hasMoreItems && N === A ? r("all") : A;
|
|
715
715
|
}
|
|
716
716
|
return null;
|
|
717
|
-
}),
|
|
718
|
-
() => `${e.description ?
|
|
719
|
-
),
|
|
720
|
-
|
|
721
|
-
},
|
|
717
|
+
}), he = p(
|
|
718
|
+
() => `${e.description ? f : ""} ${e.errorMessage ? L : ""}`.trim() || null
|
|
719
|
+
), G = () => {
|
|
720
|
+
w.value || (d.value = !0);
|
|
721
|
+
}, K = () => {
|
|
722
722
|
d.value = !1;
|
|
723
|
-
}, X = () => {
|
|
724
|
-
L.value || (d.value = !d.value, F.value && (D.value = ""));
|
|
725
|
-
}, he = () => {
|
|
726
|
-
F.value && (D.value = ""), d.value && (d.value = !1, p.value.onOutsideDropdownClick());
|
|
727
|
-
}, G = (_) => {
|
|
728
|
-
e.multiple || (D.value = "", d.value = !1), f(_), o("input", y.value);
|
|
729
723
|
}, ee = () => {
|
|
730
|
-
|
|
724
|
+
w.value || (d.value = !d.value, z.value && (I.value = ""));
|
|
725
|
+
}, Ce = () => {
|
|
726
|
+
z.value && (I.value = ""), d.value && (d.value = !1, l.value.onOutsideDropdownClick());
|
|
727
|
+
}, te = (b) => {
|
|
728
|
+
e.multiple || (I.value = "", d.value = !1), D(b), o("input", y.value);
|
|
729
|
+
}, oe = () => {
|
|
730
|
+
o(u.SHOW_MORE);
|
|
731
731
|
}, we = pt(
|
|
732
732
|
{
|
|
733
|
-
inputContainerRef:
|
|
734
|
-
optionsContainerRef:
|
|
735
|
-
selectedValueIndex:
|
|
733
|
+
inputContainerRef: c,
|
|
734
|
+
optionsContainerRef: l,
|
|
735
|
+
selectedValueIndex: Z,
|
|
736
736
|
isDropdownOpen: d,
|
|
737
|
-
isDynamicFltering:
|
|
737
|
+
isDynamicFltering: x(e, "dynamicFiltering"),
|
|
738
738
|
items: e.items,
|
|
739
739
|
isMultiple: e.multiple
|
|
740
740
|
},
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
),
|
|
741
|
+
ee,
|
|
742
|
+
G,
|
|
743
|
+
K
|
|
744
|
+
), ae = ft(
|
|
745
745
|
{
|
|
746
|
-
inputContainerRef:
|
|
746
|
+
inputContainerRef: c,
|
|
747
747
|
isDropdownOpen: d
|
|
748
748
|
},
|
|
749
|
-
|
|
750
|
-
),
|
|
751
|
-
[
|
|
752
|
-
[
|
|
753
|
-
[
|
|
754
|
-
...
|
|
749
|
+
K
|
|
750
|
+
), Se = {
|
|
751
|
+
[u.CLOSE_DROPDOWN]: K,
|
|
752
|
+
[u.SELECT]: te,
|
|
753
|
+
[u.SHOW_MORE]: oe,
|
|
754
|
+
...ae
|
|
755
755
|
};
|
|
756
|
-
e.error &&
|
|
756
|
+
e.error && le(
|
|
757
757
|
'BentoDropdown "error" property',
|
|
758
758
|
`Use the BentoDropdown "errorMessage" property instead to indicate that there is a modifier error.
|
|
759
759
|
Having the field as "undefined" will hide/remove the error.
|
|
760
760
|
<bento-dropdown errorMessage="Error message text" />`,
|
|
761
761
|
"2.0.0"
|
|
762
|
-
), e.size &&
|
|
763
|
-
const
|
|
764
|
-
|
|
762
|
+
), e.size && le('BentoDropdown "size" property', "Do not use. Only 'default' size should be used.", "2.0.0");
|
|
763
|
+
const ne = () => {
|
|
764
|
+
c.value.focus();
|
|
765
765
|
};
|
|
766
766
|
return t({
|
|
767
|
-
focus:
|
|
768
|
-
}), { __sfc: !0, attrs:
|
|
767
|
+
focus: ne
|
|
768
|
+
}), { __sfc: !0, attrs: a, slots: i, hasSlot: s, props: e, emit: o, t: r, inputContainerRef: c, inputContainerRefWrapper: m, optionsContainerRef: l, isDropdownOpen: d, dropdownOptionsContainerId: C, labelId: g, descriptionId: f, errorId: L, isReadOnly: w, cachedSelectedListboxOptions: S, cachedListboxSelectedValues: y, setCachedValues: D, ariaLabelAttribute: B, ariaLabel: v, label: _, computedAriaLabel: F, isInputComponent: J, size: ve, conditionalClasses: me, descriptionConditionalClasses: ye, searchTerm: I, items: R, staticCategories: V, filteredItems: Y, isSearching: z, displayValue: be, selectedValueItem: _e, selectedValueIndex: Z, isMultiLevelSelect: Q, flattenedItemsList: X, additionalItemsSelected: ge, ariaDescribedBy: he, openDropdown: G, closeDropdown: K, toggleDropdown: ee, clickOutsideDropdown: Ce, onOptionSelected: te, emitShowMoreEvent: oe, textboxKeyboardNavigationListeners: we, listboxKeyboardNavigationListeners: ae, listboxListeners: Se, focus: ne, BentoDropdownOptionsContainer: Je, BentoTypography: Ee, ErrorMessage: Pe, FieldLabel: ke, vBentoClickOutsideDirective: Me, vBentoKeyboardNavigationDirective: $e };
|
|
769
769
|
}
|
|
770
770
|
});
|
|
771
771
|
var gt = function() {
|
|
772
|
-
var
|
|
772
|
+
var a;
|
|
773
773
|
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
774
774
|
return o("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.clickOutsideDropdown, expression: "clickOutsideDropdown" }], staticClass: "b-dropdown", class: e.conditionalClasses }, [e.label ? o(e.FieldLabel, { attrs: { id: e.labelId, condensed: t.condensed, label: e.label, "tooltip-text": t.tooltipText, optional: t.optional, required: t.required } }) : t._e(), o("div", t._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "inputContainerRefWrapper" }, e.textboxKeyboardNavigationListeners), [o(e.size, { ref: "inputContainerRef", tag: "component", attrs: { condensed: t.condensed, value: e.searchTerm, "additional-items-selected": e.additionalItemsSelected, ariaControls: e.dropdownOptionsContainerId, ariaExpanded: e.isDropdownOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, "aria-label": e.computedAriaLabel, "aria-readonly": e.isReadOnly, readonly: e.isReadOnly, disabled: t.disabled, "display-value": e.displayValue, "dynamic-filtering": t.dynamicFiltering, "is-invalid": !!t.errorMessage || t.error, multiple: t.multiple, open: e.isDropdownOpen, "selected-value-item": e.isInputComponent ? void 0 : e.selectedValueItem, "show-slot-content-in-multiple": t.showSlotContentInMultiple }, on: { input: function(i) {
|
|
775
775
|
e.searchTerm = i;
|
|
776
|
-
}, open: e.toggleDropdown, close: e.toggleDropdown }, scopedSlots: t._u([t._l(e.slots, function(i,
|
|
777
|
-
return { key:
|
|
778
|
-
return [t._t(
|
|
776
|
+
}, open: e.toggleDropdown, close: e.toggleDropdown }, scopedSlots: t._u([t._l(e.slots, function(i, s) {
|
|
777
|
+
return { key: s, fn: function(r) {
|
|
778
|
+
return [t._t(s, null, null, r)];
|
|
779
779
|
} };
|
|
780
|
-
})], null, !0) })], 1), e.inputContainerRef ? o(e.BentoDropdownOptionsContainer, t._g({ ref: "optionsContainerRef", attrs: { id: e.dropdownOptionsContainerId, "aria-label": e.computedAriaLabel, "empty-state": t.emptyState, "debounce-time": (
|
|
781
|
-
return { key:
|
|
782
|
-
return [t._t(
|
|
780
|
+
})], null, !0) })], 1), e.inputContainerRef ? o(e.BentoDropdownOptionsContainer, t._g({ ref: "optionsContainerRef", attrs: { id: e.dropdownOptionsContainerId, "aria-label": e.computedAriaLabel, "empty-state": t.emptyState, "debounce-time": (a = t.search) == null ? void 0 : a.debounceTime, disabled: t.disabled, "is-option-disabled": t.isOptionDisabled, items: e.filteredItems, multiple: t.multiple, "static-categories": e.staticCategories, open: e.isDropdownOpen, "selected-value": e.cachedSelectedListboxOptions, searching: e.isSearching, "target-element": e.inputContainerRefWrapper, loading: t.loading, "has-more-items": t.hasMoreItems, "lazy-load-type": t.lazyLoadType, "virtual-scroll": t.virtualScroll }, scopedSlots: t._u([t._l(e.slots, function(i, s) {
|
|
781
|
+
return { key: s, fn: function(r) {
|
|
782
|
+
return [t._t(s, null, null, r)];
|
|
783
783
|
} };
|
|
784
784
|
})], null, !0) }, e.listboxListeners)) : t._e(), t.errorMessage ? o(e.ErrorMessage, { staticClass: "b-dropdown__error-message", attrs: { id: e.errorId, "error-message": t.errorMessage } }) : t._e(), t.description || e.hasSlot("description") ? o(e.BentoTypography, { staticClass: "b-dropdown__description", class: e.descriptionConditionalClasses, attrs: { id: e.descriptionId, el: "span" } }, [t._t("description", function() {
|
|
785
785
|
return [t._v(" " + t._s(t.description) + " ")];
|
|
786
786
|
})], 2) : t._e()], 1);
|
|
787
|
-
},
|
|
787
|
+
}, ht = [], Ct = /* @__PURE__ */ P(
|
|
788
788
|
_t,
|
|
789
789
|
gt,
|
|
790
|
-
|
|
790
|
+
ht,
|
|
791
791
|
!1,
|
|
792
792
|
null,
|
|
793
|
-
"
|
|
793
|
+
"de09bc83"
|
|
794
794
|
);
|
|
795
|
-
const Ft =
|
|
795
|
+
const Ft = Ct.exports;
|
|
796
796
|
export {
|
|
797
797
|
Ft as B,
|
|
798
798
|
Pt as I,
|
|
799
|
-
|
|
799
|
+
yt as a,
|
|
800
800
|
vt as u
|
|
801
801
|
};
|
|
802
|
-
//# sourceMappingURL=dropdown.
|
|
802
|
+
//# sourceMappingURL=dropdown.CC1i41NX.js.map
|