@adyen/bento-vue2 1.103.0 → 1.104.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 +21 -0
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/avatar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.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/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/navigation-menu-group.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/typography.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/chunks/avatar.CxPKc8Gy.js +70 -0
- package/dist/chunks/avatar.CxPKc8Gy.js.map +1 -0
- package/dist/chunks/{calendar.BoFWdxN7.js → calendar.DBYMYYl9.js} +2 -2
- package/dist/chunks/{calendar.BoFWdxN7.js.map → calendar.DBYMYYl9.js.map} +1 -1
- package/dist/chunks/{code-snippet.BglbQWRB.js → code-snippet.D1Ic6Ju5.js} +2 -2
- package/dist/chunks/{code-snippet.BglbQWRB.js.map → code-snippet.D1Ic6Ju5.js.map} +1 -1
- package/dist/chunks/{data-grid.DPh8BSnM.js → data-grid.3au_lYxs.js} +5 -5
- package/dist/chunks/{data-grid.DPh8BSnM.js.map → data-grid.3au_lYxs.js.map} +1 -1
- package/dist/chunks/{date-picker.DutUBQbH.js → date-picker.GrFsUsqr.js} +5 -5
- package/dist/chunks/{date-picker.DutUBQbH.js.map → date-picker.GrFsUsqr.js.map} +1 -1
- package/dist/chunks/{date-range-picker.5bvgs49h.js → date-range-picker.CwrOP_Nl.js} +6 -6
- package/dist/chunks/{date-range-picker.5bvgs49h.js.map → date-range-picker.CwrOP_Nl.js.map} +1 -1
- package/dist/chunks/{date-time-picker.DUWWGlOX.js → date-time-picker.CKDIFzA-.js} +5 -5
- package/dist/chunks/{date-time-picker.DUWWGlOX.js.map → date-time-picker.CKDIFzA-.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.BFnfCah8.js → dropdown-tag.B_0euvU1.js} +3 -3
- package/dist/chunks/{dropdown-tag.BFnfCah8.js.map → dropdown-tag.B_0euvU1.js.map} +1 -1
- package/dist/chunks/{dropdown.Ce2P9MZ-.js → dropdown.D1HNF4S9.js} +1212 -1107
- package/dist/chunks/dropdown.D1HNF4S9.js.map +1 -0
- package/dist/chunks/es6.Cu3DYUPA.js.map +1 -1
- package/dist/chunks/{filter-bar.BMO8wTzb.js → filter-bar.UhPEuIIz.js} +9 -9
- package/dist/chunks/{filter-bar.BMO8wTzb.js.map → filter-bar.UhPEuIIz.js.map} +1 -1
- package/dist/chunks/{header-with-views.Dp6SyiPu.js → header-with-views.CStLW424.js} +3 -3
- package/dist/chunks/{header-with-views.Dp6SyiPu.js.map → header-with-views.CStLW424.js.map} +1 -1
- package/dist/chunks/{input-field-password.C9_o6Kg2.js → input-field-password.CFj-kLck.js} +2 -2
- package/dist/chunks/{input-field-password.C9_o6Kg2.js.map → input-field-password.CFj-kLck.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.zRjd8HPi.js → input-field-phone-number.DlHwERaJ.js} +2 -2
- package/dist/chunks/{input-field-phone-number.zRjd8HPi.js.map → input-field-phone-number.DlHwERaJ.js.map} +1 -1
- package/dist/chunks/{input-field.BTt1ORWU.js → input-field.CwotlJZ4.js} +2 -2
- package/dist/chunks/{input-field.BTt1ORWU.js.map → input-field.CwotlJZ4.js.map} +1 -1
- package/dist/chunks/{input-time.BfJIDgaH.js → input-time.3hDbu-Un.js} +3 -3
- package/dist/chunks/{input-time.BfJIDgaH.js.map → input-time.3hDbu-Un.js.map} +1 -1
- package/dist/chunks/{pagination.D81XgMQ7.js → pagination.BRYdk8fi.js} +2 -2
- package/dist/chunks/{pagination.D81XgMQ7.js.map → pagination.BRYdk8fi.js.map} +1 -1
- package/dist/chunks/{search-bar.CRfYCmkl.js → search-bar.BsoJjNjp.js} +3 -3
- package/dist/chunks/{search-bar.CRfYCmkl.js.map → search-bar.BsoJjNjp.js.map} +1 -1
- package/dist/chunks/{secondary-nav.B1Tj7MAA.js → secondary-nav.DCFluB4x.js} +2 -2
- package/dist/chunks/{secondary-nav.B1Tj7MAA.js.map → secondary-nav.DCFluB4x.js.map} +1 -1
- package/dist/chunks/{use-date-input-formatter.DXwvH7B0.js → use-date-input-formatter.DcqMq-Nu.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.DXwvH7B0.js.map → use-date-input-formatter.DcqMq-Nu.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date-time-picker.js +1 -1
- package/dist/dropdown.js +2 -2
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/index.js +18 -18
- 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/input-time.js +1 -1
- package/dist/internal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/styles/bento-dark.css +3 -2
- package/dist/styles/bento-light.css +3 -2
- package/dist/styles/bento.css +3 -2
- package/dist/styles/legacy.css +3 -2
- package/dist/styles/styleguide.css +3 -2
- package/dist/web-types.json +113 -15
- package/package.json +6 -6
- package/dist/chunks/avatar.D__jLgjI.js +0 -71
- package/dist/chunks/avatar.D__jLgjI.js.map +0 -1
- package/dist/chunks/dropdown.Ce2P9MZ-.js.map +0 -1
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
import { computed as n, ref as
|
|
2
|
-
import { B as
|
|
3
|
-
import { g as
|
|
4
|
-
import { u as
|
|
5
|
-
import { s as
|
|
6
|
-
import { u as
|
|
7
|
-
import { C as
|
|
8
|
-
import { C as
|
|
9
|
-
import { n as
|
|
10
|
-
import { C as
|
|
11
|
-
import { C as
|
|
1
|
+
import { computed as n, ref as x, onMounted as _t, onUnmounted as gt, watch as ee, defineComponent as z, nextTick as Z, toRef as H, useSlots as he, useAttrs as Ge, toRefs as tt, inject as Ue } from "vue";
|
|
2
|
+
import { B as ue, d as Fe } from "./typography.D1OZJbEa.js";
|
|
3
|
+
import { g as ce } from "./generate-uid.DBWe4g6T.js";
|
|
4
|
+
import { u as de } from "./index.CPOlyau9.js";
|
|
5
|
+
import { s as be } from "./events.BQOQSSb7.js";
|
|
6
|
+
import { u as lt } from "./use-has-slot.C9lQZ6nz.js";
|
|
7
|
+
import { C as ht } from "./cross-circle-fill.DTDtgLMf.js";
|
|
8
|
+
import { C as St } from "./cross-circle-fill-small.DfxDedRr.js";
|
|
9
|
+
import { n as W } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
10
|
+
import { C as at } from "./chevron-down.eYtgv5ly.js";
|
|
11
|
+
import { C as ot } from "./chevron-up.d8cwIlA_.js";
|
|
12
12
|
/* empty css */
|
|
13
|
-
import { u as
|
|
14
|
-
import { u as
|
|
15
|
-
import { u as
|
|
16
|
-
import { B as
|
|
17
|
-
import { B as
|
|
18
|
-
import { B as
|
|
19
|
-
import { o as
|
|
13
|
+
import { u as xt } from "./aria-label.CaUURpnB.js";
|
|
14
|
+
import { u as Ct } from "./form-field.D_2g7vaP.js";
|
|
15
|
+
import { u as It } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
16
|
+
import { B as U, a as Re } from "./keyboard-navigation.DWmhelVv.js";
|
|
17
|
+
import { B as st } from "./loading-indicator.PxbRzshH.js";
|
|
18
|
+
import { B as nt } from "./empty-state.fziM-yAC.js";
|
|
19
|
+
import { o as Lt } from "./resize.Bqks3WUm.js";
|
|
20
20
|
import "./index.Cl4_42j5.js";
|
|
21
|
-
import { C as
|
|
22
|
-
import { C as
|
|
23
|
-
import { B as
|
|
24
|
-
import { b as
|
|
25
|
-
import { B as
|
|
26
|
-
import { F as
|
|
27
|
-
import { E as
|
|
28
|
-
import { P as
|
|
21
|
+
import { C as ke, N as Ot } from "./minus-small.DJacLGTw.js";
|
|
22
|
+
import { C as Et } from "./checkmark-small.DVDtD4HQ.js";
|
|
23
|
+
import { B as wt } from "./chip.wgEnbEPw.js";
|
|
24
|
+
import { b as Be, a as Tt, h as At, e as Dt } from "./button-actions.CxX7lK7z.js";
|
|
25
|
+
import { B as kt } from "./directive.D1-d-C2K.js";
|
|
26
|
+
import { F as Bt } from "./field-label.CgdTst2l.js";
|
|
27
|
+
import { E as Rt } from "./error-message.BEHBfjmn.js";
|
|
28
|
+
import { P as He } from "./popper-container.D08eTt4B.js";
|
|
29
29
|
import "../assets/dropdown.css";
|
|
30
|
-
const
|
|
31
|
-
const
|
|
30
|
+
const it = (a, e, l, t) => {
|
|
31
|
+
const o = n(
|
|
32
32
|
() => !!a.value?.length && a.value?.length === e.value.length
|
|
33
|
-
),
|
|
33
|
+
), s = n(() => a.value == null || a.value.length === 0 ? !1 : a.value?.length !== e.value.length);
|
|
34
34
|
return {
|
|
35
|
-
isAllSelected:
|
|
36
|
-
isIndeterminate:
|
|
37
|
-
toggleSelectAll: (
|
|
38
|
-
|
|
35
|
+
isAllSelected: o,
|
|
36
|
+
isIndeterminate: s,
|
|
37
|
+
toggleSelectAll: (b) => {
|
|
38
|
+
b ? l() : t();
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
|
-
function
|
|
43
|
-
const
|
|
42
|
+
function Mt(a, { disabled: e, itemHeight: l, overscan: t = 5, prefixHeight: o }) {
|
|
43
|
+
const s = x(null), i = x([]), b = x(0), m = x(0), d = x(0);
|
|
44
44
|
let r;
|
|
45
|
-
const
|
|
46
|
-
const
|
|
45
|
+
const v = n(() => {
|
|
46
|
+
const h = typeof l == "number" ? a.value.length * l : a.value.reduce((S, T, E) => S + l(E), 0), C = typeof l == "number" ? b.value * l : a.value.slice(0, b.value).reduce((S, T, E) => S + l(E), 0);
|
|
47
47
|
return {
|
|
48
48
|
style: {
|
|
49
|
-
marginTop: `${
|
|
50
|
-
height: `${
|
|
49
|
+
marginTop: `${C}px`,
|
|
50
|
+
height: `${h - C}px`
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
}),
|
|
54
|
-
const
|
|
53
|
+
}), c = () => {
|
|
54
|
+
const h = o?.value ?? 0, C = Math.max(s.value.scrollTop - h, 0);
|
|
55
55
|
if (typeof l == "number")
|
|
56
|
-
return Math.floor(
|
|
57
|
-
let
|
|
58
|
-
for (let
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
|
|
56
|
+
return Math.floor(C / l);
|
|
57
|
+
let S = 0, T = 0;
|
|
58
|
+
for (let E = 0; E < a.value.length; E += 1) {
|
|
59
|
+
const A = l(E);
|
|
60
|
+
if (S += A, S >= C) {
|
|
61
|
+
T = E;
|
|
62
62
|
break;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
return
|
|
66
|
-
},
|
|
67
|
-
if (
|
|
68
|
-
return Math.ceil(
|
|
69
|
-
const
|
|
70
|
-
let
|
|
71
|
-
for (let
|
|
72
|
-
const
|
|
73
|
-
if (
|
|
65
|
+
return T;
|
|
66
|
+
}, p = () => {
|
|
67
|
+
if (d.value = s.value.clientHeight, typeof l == "number")
|
|
68
|
+
return Math.ceil(d.value / l);
|
|
69
|
+
const h = b.value ?? 0;
|
|
70
|
+
let C = 0, S = 0;
|
|
71
|
+
for (let T = h; T < a.value.length; T += 1) {
|
|
72
|
+
const E = l(T);
|
|
73
|
+
if (C += E, S = T, C > d.value)
|
|
74
74
|
break;
|
|
75
75
|
}
|
|
76
|
-
return
|
|
77
|
-
},
|
|
78
|
-
if (
|
|
79
|
-
const
|
|
80
|
-
|
|
76
|
+
return S - h;
|
|
77
|
+
}, _ = () => {
|
|
78
|
+
if (s.value) {
|
|
79
|
+
const h = p();
|
|
80
|
+
b.value = c(), m.value = Math.min(b.value + h + t, a.value.length), i.value = a.value.slice(b.value, m.value);
|
|
81
81
|
}
|
|
82
|
-
},
|
|
83
|
-
|
|
82
|
+
}, O = () => {
|
|
83
|
+
_();
|
|
84
84
|
};
|
|
85
|
-
e || (
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}),
|
|
89
|
-
}),
|
|
85
|
+
e || (_t(() => {
|
|
86
|
+
s.value && (d.value = s.value.clientHeight, r = Lt(s.value, ({ clientHeight: h }) => {
|
|
87
|
+
d.value = h, _();
|
|
88
|
+
}), _());
|
|
89
|
+
}), gt(() => {
|
|
90
90
|
r?.disconnect();
|
|
91
|
-
}),
|
|
91
|
+
}), ee(
|
|
92
92
|
() => a.value,
|
|
93
93
|
() => {
|
|
94
|
-
|
|
94
|
+
_();
|
|
95
95
|
}
|
|
96
96
|
));
|
|
97
|
-
const
|
|
98
|
-
ref:
|
|
97
|
+
const w = {
|
|
98
|
+
ref: s,
|
|
99
99
|
style: { overflowY: "auto" }
|
|
100
|
-
},
|
|
101
|
-
if (!
|
|
100
|
+
}, P = (h) => {
|
|
101
|
+
if (!s.value)
|
|
102
102
|
return;
|
|
103
|
-
const
|
|
104
|
-
|
|
103
|
+
const C = typeof l == "number" ? h * l : a.value.slice(0, h).reduce((Y, G, L) => Y + l(L), 0), S = typeof l == "number" ? l : l(h), T = C + S, { scrollTop: E, clientHeight: A } = s.value, N = E + A;
|
|
104
|
+
T > N ? s.value.scrollTop = A > 0 ? T - A : C : C < E && (s.value.scrollTop = C), _();
|
|
105
105
|
};
|
|
106
106
|
return e ? {
|
|
107
|
-
containerRef:
|
|
108
|
-
containerProps:
|
|
107
|
+
containerRef: s,
|
|
108
|
+
containerProps: w,
|
|
109
109
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
110
110
|
onScroll: () => {
|
|
111
111
|
},
|
|
@@ -113,22 +113,22 @@ function It(a, { disabled: e, itemHeight: l, overscan: t = 5, prefixHeight: s })
|
|
|
113
113
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
114
114
|
scrollToIndex: () => {
|
|
115
115
|
},
|
|
116
|
-
startIndex:
|
|
116
|
+
startIndex: x(0)
|
|
117
117
|
} : {
|
|
118
|
-
containerRef:
|
|
119
|
-
containerProps:
|
|
120
|
-
onScroll:
|
|
118
|
+
containerRef: s,
|
|
119
|
+
containerProps: w,
|
|
120
|
+
onScroll: O,
|
|
121
121
|
list: i,
|
|
122
|
-
wrapperProps:
|
|
123
|
-
scrollToIndex:
|
|
124
|
-
startIndex:
|
|
122
|
+
wrapperProps: v,
|
|
123
|
+
scrollToIndex: P,
|
|
124
|
+
startIndex: b
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
var
|
|
128
|
-
const
|
|
127
|
+
var u = /* @__PURE__ */ ((a) => (a.SELECT = "select", a.SHOW_MORE = "show-more", a.ESCAPE = "escape-pressed", a.CLICK = "click", a.ENTER = "enter-pressed", a.SPACE = "space-pressed", a.TAB = "tab-pressed", a.CLOSE_DROPDOWN = "close-dropdown", a))(u || {}), re = /* @__PURE__ */ ((a) => (a.AUTOMATIC = "automatic", a.BUTTON = "button", a.NONE = "none", a))(re || {});
|
|
128
|
+
const Nt = z({
|
|
129
129
|
name: "bento-listbox-static-category",
|
|
130
130
|
components: {
|
|
131
|
-
BentoTypography:
|
|
131
|
+
BentoTypography: ue
|
|
132
132
|
},
|
|
133
133
|
props: {
|
|
134
134
|
/**
|
|
@@ -140,20 +140,24 @@ const Et = F({
|
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
|
-
var
|
|
143
|
+
var $t = function() {
|
|
144
144
|
var e = this, l = e._self._c;
|
|
145
145
|
return e._self._setupProxy, l("div", { staticClass: "b-listbox-single-select-category", attrs: { role: "group", "aria-label": e.categoryLabel } }, [l("bento-typography", { staticClass: "b-listbox-single-select-category__label-text", attrs: { variant: "caption", el: "span", "aria-hidden": "true" } }, [e._v(" " + e._s(e.categoryLabel) + " ")]), l("div", [e._t("default")], 2)], 1);
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
}, Pt = [], Ft = /* @__PURE__ */ W(
|
|
147
|
+
Nt,
|
|
148
|
+
$t,
|
|
149
|
+
Pt,
|
|
150
150
|
!1,
|
|
151
151
|
null,
|
|
152
152
|
"bfbc1649"
|
|
153
153
|
);
|
|
154
|
-
const
|
|
154
|
+
const Vt = Ft.exports, zt = z({
|
|
155
155
|
name: "bento-listbox-option",
|
|
156
156
|
props: {
|
|
157
|
+
/**
|
|
158
|
+
* Indicates if the option is active.
|
|
159
|
+
*/
|
|
160
|
+
active: { type: Boolean, default: !1 },
|
|
157
161
|
/**
|
|
158
162
|
* Setting this property to true will disable the option.
|
|
159
163
|
*/
|
|
@@ -163,29 +167,30 @@ const kt = At.exports, Dt = F({
|
|
|
163
167
|
*/
|
|
164
168
|
selected: { type: Boolean, default: !1 }
|
|
165
169
|
},
|
|
166
|
-
emits: [
|
|
170
|
+
emits: [u.CLICK, u.ENTER, u.SPACE, u.TAB],
|
|
167
171
|
setup(a, { emit: e }) {
|
|
168
172
|
const l = n(() => ({
|
|
173
|
+
"b-listbox-option--active": a.active,
|
|
169
174
|
"b-listbox-option--disabled": a.disabled,
|
|
170
175
|
"b-listbox-option--selected": a.selected
|
|
171
176
|
}));
|
|
172
177
|
return {
|
|
173
178
|
// Enums
|
|
174
|
-
BentoKeyboardNavigationKeyDownEvent:
|
|
175
|
-
BentoListboxEvent:
|
|
179
|
+
BentoKeyboardNavigationKeyDownEvent: U,
|
|
180
|
+
BentoListboxEvent: u,
|
|
176
181
|
// Values
|
|
177
182
|
conditionalClasses: l,
|
|
178
183
|
// Events
|
|
179
|
-
onClick: (
|
|
180
|
-
e(
|
|
184
|
+
onClick: (s) => {
|
|
185
|
+
e(u.CLICK, s);
|
|
181
186
|
},
|
|
182
|
-
onOptionSelected: (
|
|
183
|
-
e(
|
|
187
|
+
onOptionSelected: (s, i) => {
|
|
188
|
+
e(s, i);
|
|
184
189
|
}
|
|
185
190
|
};
|
|
186
191
|
}
|
|
187
192
|
});
|
|
188
|
-
var
|
|
193
|
+
var Gt = function() {
|
|
189
194
|
var e = this, l = e._self._c;
|
|
190
195
|
return e._self._setupProxy, l("div", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(t) {
|
|
191
196
|
return !t.type.indexOf("key") && e._k(t.keyCode, "enter", 13, t.key, "Enter") ? null : e.onOptionSelected(e.BentoListboxEvent.ENTER, t);
|
|
@@ -194,40 +199,44 @@ var Bt = function() {
|
|
|
194
199
|
}, function(t) {
|
|
195
200
|
return !t.type.indexOf("key") && e._k(t.keyCode, "tab", 9, t.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, t);
|
|
196
201
|
}] } }, "div", e.$attrs, !1), [e._t("default")], 2);
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
202
|
+
}, Ut = [], Wt = /* @__PURE__ */ W(
|
|
203
|
+
zt,
|
|
204
|
+
Gt,
|
|
205
|
+
Ut,
|
|
201
206
|
!1,
|
|
202
207
|
null,
|
|
203
|
-
"
|
|
208
|
+
"6722b88d"
|
|
204
209
|
);
|
|
205
|
-
const
|
|
206
|
-
let
|
|
207
|
-
const
|
|
210
|
+
const Me = Wt.exports;
|
|
211
|
+
let Je = 0;
|
|
212
|
+
const Kt = {
|
|
208
213
|
beforeCreate() {
|
|
209
|
-
this.uuid =
|
|
214
|
+
this.uuid = Je.toString(), Je += 1;
|
|
210
215
|
}
|
|
211
216
|
};
|
|
212
|
-
var
|
|
217
|
+
var qt = function() {
|
|
213
218
|
var e = this, l = e._self._c;
|
|
214
219
|
return l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z" } })]);
|
|
215
|
-
},
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
220
|
+
}, Yt = [], jt = /* @__PURE__ */ W(
|
|
221
|
+
Kt,
|
|
222
|
+
qt,
|
|
223
|
+
Yt,
|
|
219
224
|
!1,
|
|
220
225
|
null,
|
|
221
226
|
null
|
|
222
227
|
);
|
|
223
|
-
const
|
|
228
|
+
const Ht = jt.exports, Jt = z({
|
|
224
229
|
name: "bento-listbox-single-select-option",
|
|
225
230
|
components: {
|
|
226
|
-
BentoListboxOption:
|
|
227
|
-
BentoTypography:
|
|
228
|
-
CheckmarkIcon:
|
|
231
|
+
BentoListboxOption: Me,
|
|
232
|
+
BentoTypography: ue,
|
|
233
|
+
CheckmarkIcon: Ht
|
|
229
234
|
},
|
|
230
235
|
props: {
|
|
236
|
+
/**
|
|
237
|
+
* Indicates if the option is active.
|
|
238
|
+
*/
|
|
239
|
+
active: { type: Boolean, default: !1 },
|
|
231
240
|
/**
|
|
232
241
|
* Setting this property to true will disable the option.
|
|
233
242
|
*/
|
|
@@ -245,26 +254,26 @@ const zt = Ft.exports, Vt = F({
|
|
|
245
254
|
*/
|
|
246
255
|
selected: { type: Boolean, default: !1 }
|
|
247
256
|
},
|
|
248
|
-
emits: [
|
|
257
|
+
emits: [u.ENTER, u.SELECT, u.SPACE, u.TAB],
|
|
249
258
|
setup(a, { emit: e }) {
|
|
250
259
|
const l = (i) => {
|
|
251
260
|
a.disabled || e(i, a.option);
|
|
252
|
-
}, t = n(() => a.disabled ? !0 : null),
|
|
261
|
+
}, t = n(() => a.disabled ? !0 : null), o = n(() => a.selected ? !0 : null), s = n(() => a.disabled ? -1 : 0);
|
|
253
262
|
return {
|
|
254
263
|
// Values
|
|
255
264
|
ariaDisabled: t,
|
|
256
|
-
ariaSelected:
|
|
257
|
-
tabIndex:
|
|
265
|
+
ariaSelected: o,
|
|
266
|
+
tabIndex: s,
|
|
258
267
|
// Enums
|
|
259
|
-
BentoListboxEvent:
|
|
268
|
+
BentoListboxEvent: u,
|
|
260
269
|
// Events
|
|
261
270
|
onOptionSelected: l
|
|
262
271
|
};
|
|
263
272
|
}
|
|
264
273
|
});
|
|
265
|
-
var
|
|
274
|
+
var Xt = function() {
|
|
266
275
|
var e = this, l = e._self._c;
|
|
267
|
-
return e._self._setupProxy, l("bento-listbox-option", { staticClass: "b-listbox-single-select-option", attrs: { disabled: e.disabled, selected: e.selected, "aria-selected": e.ariaSelected, "aria-disabled": e.ariaDisabled, tabindex: e.tabIndex }, on: { click: function(t) {
|
|
276
|
+
return e._self._setupProxy, l("bento-listbox-option", { staticClass: "b-listbox-single-select-option", attrs: { active: e.active, disabled: e.disabled, selected: e.selected, "aria-selected": e.ariaSelected, "aria-disabled": e.ariaDisabled, tabindex: e.tabIndex }, on: { click: function(t) {
|
|
268
277
|
return e.onOptionSelected(e.BentoListboxEvent.SELECT);
|
|
269
278
|
}, "enter-pressed": function(t) {
|
|
270
279
|
return e.onOptionSelected(e.BentoListboxEvent.ENTER);
|
|
@@ -275,86 +284,86 @@ var Gt = function() {
|
|
|
275
284
|
} } }, [e._t("default", function() {
|
|
276
285
|
return [l("span", { staticClass: "b-listbox-single-select-option__text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.option.label))]), e.option.description ? l("bento-typography", { staticClass: "b-listbox-single-select-option__description", attrs: { el: "span" } }, [e._v(" " + e._s(e.option.description) + " ")]) : e._e()], 1)];
|
|
277
286
|
}, null, e.option), l("span", { staticClass: "b-listbox-single-select-option__check-icon" }, [l("checkmark-icon", { directives: [{ name: "show", rawName: "v-show", value: e.selected, expression: "selected" }], attrs: { "svg-title": "selected" } })], 1)], 2);
|
|
278
|
-
},
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
287
|
+
}, Zt = [], Qt = /* @__PURE__ */ W(
|
|
288
|
+
Jt,
|
|
289
|
+
Xt,
|
|
290
|
+
Zt,
|
|
282
291
|
!1,
|
|
283
292
|
null,
|
|
284
|
-
"
|
|
293
|
+
"232e0377"
|
|
285
294
|
);
|
|
286
|
-
const
|
|
287
|
-
const t = n(() => e?.value ? e.value - 1 : a.value.length - 1),
|
|
288
|
-
switch (
|
|
295
|
+
const el = Qt.exports, rt = ({ items: a, totalItemCount: e }, l) => {
|
|
296
|
+
const t = n(() => e?.value ? e.value - 1 : a.value.length - 1), o = x(0), s = (p) => {
|
|
297
|
+
switch (p) {
|
|
289
298
|
case "increase":
|
|
290
|
-
|
|
299
|
+
o.value += 1;
|
|
291
300
|
break;
|
|
292
301
|
case "decrease":
|
|
293
|
-
|
|
302
|
+
o.value -= 1;
|
|
294
303
|
break;
|
|
295
304
|
}
|
|
296
|
-
}, i = ({ edgeCaseItem:
|
|
297
|
-
|
|
298
|
-
},
|
|
299
|
-
|
|
305
|
+
}, i = ({ edgeCaseItem: p }, _) => {
|
|
306
|
+
o.value !== p && (s(_), l(o.value));
|
|
307
|
+
}, b = (p) => {
|
|
308
|
+
c(p), i(
|
|
300
309
|
{
|
|
301
310
|
edgeCaseItem: t.value
|
|
302
311
|
},
|
|
303
312
|
"increase"
|
|
304
313
|
/* INCREASE */
|
|
305
314
|
);
|
|
306
|
-
},
|
|
307
|
-
|
|
315
|
+
}, m = (p) => {
|
|
316
|
+
c(p), i(
|
|
308
317
|
{
|
|
309
318
|
edgeCaseItem: 0
|
|
310
319
|
},
|
|
311
320
|
"decrease"
|
|
312
321
|
/* DECREASE */
|
|
313
322
|
);
|
|
314
|
-
},
|
|
315
|
-
|
|
316
|
-
}, r = (
|
|
317
|
-
|
|
318
|
-
},
|
|
319
|
-
|
|
320
|
-
},
|
|
321
|
-
|
|
323
|
+
}, d = (p) => {
|
|
324
|
+
c(p), o.value = 0, l(o.value);
|
|
325
|
+
}, r = (p) => {
|
|
326
|
+
c(p), o.value = t.value, l(o.value);
|
|
327
|
+
}, v = (p) => {
|
|
328
|
+
o.value = p;
|
|
329
|
+
}, c = (p) => {
|
|
330
|
+
p?.detail?.preventDefault(), p?.detail?.stopPropagation();
|
|
322
331
|
};
|
|
323
332
|
return {
|
|
324
|
-
moveToFirstElement:
|
|
333
|
+
moveToFirstElement: d,
|
|
325
334
|
moveToLastElement: r,
|
|
326
|
-
moveToNextElement:
|
|
327
|
-
moveToPreviousElement:
|
|
328
|
-
setListboxFocusedIndex:
|
|
329
|
-
preventDefault:
|
|
330
|
-
focusedIndex:
|
|
335
|
+
moveToNextElement: b,
|
|
336
|
+
moveToPreviousElement: m,
|
|
337
|
+
setListboxFocusedIndex: v,
|
|
338
|
+
preventDefault: c,
|
|
339
|
+
focusedIndex: o
|
|
331
340
|
};
|
|
332
|
-
},
|
|
333
|
-
const
|
|
341
|
+
}, We = (a, e, l = x("option"), t = !0) => {
|
|
342
|
+
const o = x([]), s = async () => {
|
|
334
343
|
if (!a.value || a.value.nodeType === Node.COMMENT_NODE)
|
|
335
344
|
return;
|
|
336
345
|
const i = Array.from(a.value.querySelectorAll(`[role="${l.value}"]`));
|
|
337
|
-
|
|
346
|
+
o.value = t ? i.filter((b) => b.checkVisibility()) : i;
|
|
338
347
|
};
|
|
339
|
-
return
|
|
348
|
+
return ee(
|
|
340
349
|
e,
|
|
341
350
|
() => {
|
|
342
|
-
|
|
343
|
-
|
|
351
|
+
Z(() => {
|
|
352
|
+
s();
|
|
344
353
|
});
|
|
345
354
|
},
|
|
346
355
|
{ immediate: !0, deep: !0 }
|
|
347
356
|
), {
|
|
348
|
-
visibleDomOptions:
|
|
349
|
-
updateVisibleDomOptions:
|
|
357
|
+
visibleDomOptions: o,
|
|
358
|
+
updateVisibleDomOptions: s
|
|
350
359
|
};
|
|
351
|
-
},
|
|
360
|
+
}, ct = (a, e) => `${a}-option-${encodeURIComponent(String(e))}`, tl = z({
|
|
352
361
|
name: "bento-listbox-single-select",
|
|
353
362
|
components: {
|
|
354
|
-
BentoListboxSingleSelectCategory:
|
|
355
|
-
BentoListboxSingleSelectOption:
|
|
363
|
+
BentoListboxSingleSelectCategory: Vt,
|
|
364
|
+
BentoListboxSingleSelectOption: el
|
|
356
365
|
},
|
|
357
|
-
directives: { BentoKeyboardNavigationDirective:
|
|
366
|
+
directives: { BentoKeyboardNavigationDirective: Re },
|
|
358
367
|
inheritAttrs: !1,
|
|
359
368
|
props: {
|
|
360
369
|
/**
|
|
@@ -370,6 +379,10 @@ const Kt = Wt.exports, tt = ({ items: a, totalItemCount: e }, l) => {
|
|
|
370
379
|
type: Function,
|
|
371
380
|
default: () => !1
|
|
372
381
|
},
|
|
382
|
+
/**
|
|
383
|
+
* Identifies the currently active option in the listbox.
|
|
384
|
+
*/
|
|
385
|
+
activeDescendantId: { type: String, default: null },
|
|
373
386
|
/**
|
|
374
387
|
* The option elements to populate the listbox with.
|
|
375
388
|
* It must be an array of {@see BentoListboxOptionItem }.
|
|
@@ -381,6 +394,10 @@ const Kt = Wt.exports, tt = ({ items: a, totalItemCount: e }, l) => {
|
|
|
381
394
|
type: Array,
|
|
382
395
|
required: !0
|
|
383
396
|
},
|
|
397
|
+
/**
|
|
398
|
+
* Prefix used to generate stable option IDs.
|
|
399
|
+
*/
|
|
400
|
+
optionIdBase: { type: String, required: !0 },
|
|
384
401
|
/**
|
|
385
402
|
* The `input` value.
|
|
386
403
|
* Providing an empty string will select no options.
|
|
@@ -408,71 +425,71 @@ const Kt = Wt.exports, tt = ({ items: a, totalItemCount: e }, l) => {
|
|
|
408
425
|
*/
|
|
409
426
|
virtualScrollStartIndex: { type: Number, default: 0 }
|
|
410
427
|
},
|
|
411
|
-
emits: [
|
|
412
|
-
setup(a, { emit: e, expose: l, slots: t, attrs:
|
|
413
|
-
const
|
|
428
|
+
emits: [u.SELECT, u.ENTER, u.SPACE, u.TAB],
|
|
429
|
+
setup(a, { emit: e, expose: l, slots: t, attrs: o }) {
|
|
430
|
+
const s = x(), i = x([]), b = n(() => !!a.selectedValue?.length && a.selectedValue.at(0)), m = n(
|
|
414
431
|
() => ({
|
|
415
|
-
"aria-label":
|
|
416
|
-
"aria-busy":
|
|
417
|
-
"aria-atomic":
|
|
418
|
-
"aria-live":
|
|
432
|
+
"aria-label": o["aria-label"]?.toString(),
|
|
433
|
+
"aria-busy": o["aria-busy"]?.toString(),
|
|
434
|
+
"aria-atomic": o["aria-atomic"]?.toString(),
|
|
435
|
+
"aria-live": o["aria-live"]?.toString()
|
|
419
436
|
})
|
|
420
|
-
),
|
|
421
|
-
e(
|
|
422
|
-
}, { visibleDomOptions:
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
437
|
+
), d = n(() => !!a.items.some(({ items: L }) => !!L)), r = (L) => (I) => {
|
|
438
|
+
e(L, [I]);
|
|
439
|
+
}, v = (L) => ct(a.optionIdBase, L.value), { visibleDomOptions: c, updateVisibleDomOptions: p } = We(
|
|
440
|
+
s,
|
|
441
|
+
H(a, "items"),
|
|
442
|
+
x("option"),
|
|
426
443
|
!1
|
|
427
|
-
),
|
|
428
|
-
if (!
|
|
444
|
+
), _ = n(() => a.totalItemCount > 0), O = (L) => {
|
|
445
|
+
if (!_.value)
|
|
429
446
|
return;
|
|
430
|
-
const
|
|
431
|
-
if (
|
|
447
|
+
const I = L.target;
|
|
448
|
+
if (I === s.value || I?.getAttribute("role") !== "option")
|
|
432
449
|
return;
|
|
433
|
-
const
|
|
434
|
-
if (
|
|
435
|
-
const
|
|
436
|
-
|
|
450
|
+
const R = c.value.indexOf(I);
|
|
451
|
+
if (R !== -1) {
|
|
452
|
+
const F = R + a.virtualScrollStartIndex;
|
|
453
|
+
N(F);
|
|
437
454
|
}
|
|
438
|
-
},
|
|
439
|
-
if (
|
|
440
|
-
a.scrollToIndex(
|
|
441
|
-
const
|
|
442
|
-
|
|
455
|
+
}, w = async (L) => {
|
|
456
|
+
if (_.value && a.scrollToIndex) {
|
|
457
|
+
a.scrollToIndex(L), await Z(), await p();
|
|
458
|
+
const I = L - a.virtualScrollStartIndex;
|
|
459
|
+
c.value[I]?.focus();
|
|
443
460
|
} else
|
|
444
|
-
|
|
445
|
-
},
|
|
446
|
-
|
|
447
|
-
},
|
|
448
|
-
if (!
|
|
461
|
+
c.value[L]?.focus();
|
|
462
|
+
}, P = async (L) => {
|
|
463
|
+
N(L), await w(L);
|
|
464
|
+
}, h = (L, I) => {
|
|
465
|
+
if (!L || !I)
|
|
449
466
|
return;
|
|
450
|
-
const
|
|
451
|
-
|
|
452
|
-
},
|
|
453
|
-
await
|
|
467
|
+
const R = L.getBoundingClientRect(), F = I, J = F.getBoundingClientRect();
|
|
468
|
+
R.top < J.top ? F.scrollTop -= J.top - R.top : R.bottom > J.bottom && (F.scrollTop += R.bottom - J.bottom);
|
|
469
|
+
}, C = async (L, I) => {
|
|
470
|
+
await p(), _.value && a.scrollToIndex ? a.scrollToIndex(L) : h(c.value[L], I);
|
|
454
471
|
}, {
|
|
455
|
-
moveToNextElement:
|
|
456
|
-
moveToPreviousElement:
|
|
457
|
-
moveToFirstElement:
|
|
458
|
-
moveToLastElement:
|
|
459
|
-
setListboxFocusedIndex:
|
|
460
|
-
} =
|
|
472
|
+
moveToNextElement: S,
|
|
473
|
+
moveToPreviousElement: T,
|
|
474
|
+
moveToFirstElement: E,
|
|
475
|
+
moveToLastElement: A,
|
|
476
|
+
setListboxFocusedIndex: N
|
|
477
|
+
} = rt(
|
|
461
478
|
{
|
|
462
|
-
items:
|
|
463
|
-
totalItemCount:
|
|
479
|
+
items: c,
|
|
480
|
+
totalItemCount: H(a, "totalItemCount")
|
|
464
481
|
},
|
|
465
|
-
|
|
466
|
-
),
|
|
467
|
-
[
|
|
468
|
-
[
|
|
469
|
-
[
|
|
470
|
-
[
|
|
471
|
-
},
|
|
472
|
-
[
|
|
473
|
-
[
|
|
474
|
-
[
|
|
475
|
-
[
|
|
482
|
+
w
|
|
483
|
+
), Y = {
|
|
484
|
+
[U.ARROW_UP]: T,
|
|
485
|
+
[U.ARROW_DOWN]: S,
|
|
486
|
+
[U.HOME]: E,
|
|
487
|
+
[U.END]: A
|
|
488
|
+
}, G = {
|
|
489
|
+
[u.SELECT]: r(u.SELECT),
|
|
490
|
+
[u.SPACE]: r(u.SPACE),
|
|
491
|
+
[u.TAB]: r(u.TAB),
|
|
492
|
+
[u.ENTER]: r(u.ENTER)
|
|
476
493
|
};
|
|
477
494
|
return l({
|
|
478
495
|
/**
|
|
@@ -484,87 +501,88 @@ const Kt = Wt.exports, tt = ({ items: a, totalItemCount: e }, l) => {
|
|
|
484
501
|
* Method to set the index of the item to be focused on
|
|
485
502
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
486
503
|
*/
|
|
487
|
-
setListboxFocusedIndex:
|
|
504
|
+
setListboxFocusedIndex: N,
|
|
488
505
|
/**
|
|
489
506
|
* Navigates to an item by global index, handling virtual scroll if enabled.
|
|
490
507
|
* Scrolls the virtual list and focuses the item.
|
|
491
508
|
*/
|
|
492
|
-
navigateToItem:
|
|
509
|
+
navigateToItem: P,
|
|
493
510
|
/**
|
|
494
511
|
* Scrolls to an item by global index without changing focus.
|
|
495
512
|
* Used when the dropdown opens via click to bring the selected option into view.
|
|
496
513
|
*/
|
|
497
|
-
scrollToItem:
|
|
514
|
+
scrollToItem: C
|
|
498
515
|
}), {
|
|
499
516
|
// Enums
|
|
500
|
-
BentoListboxEvent:
|
|
517
|
+
BentoListboxEvent: u,
|
|
501
518
|
// Values
|
|
502
|
-
listboxRef:
|
|
519
|
+
listboxRef: s,
|
|
503
520
|
listboxItemRef: i,
|
|
504
|
-
selectedItem:
|
|
521
|
+
selectedItem: b,
|
|
505
522
|
slots: t,
|
|
506
|
-
ariaAttributes:
|
|
523
|
+
ariaAttributes: m,
|
|
524
|
+
getOptionId: v,
|
|
507
525
|
// Computed
|
|
508
|
-
hasCategories:
|
|
526
|
+
hasCategories: d,
|
|
509
527
|
// Methods
|
|
510
528
|
onOptionSelected: r,
|
|
511
529
|
// Keyboard navigation
|
|
512
|
-
listboxListeners:
|
|
513
|
-
listboxOptionListeners:
|
|
530
|
+
listboxListeners: Y,
|
|
531
|
+
listboxOptionListeners: G,
|
|
514
532
|
// Virtual scroll focus management
|
|
515
|
-
handleVirtualScrollingFocus:
|
|
533
|
+
handleVirtualScrollingFocus: O
|
|
516
534
|
};
|
|
517
535
|
}
|
|
518
536
|
});
|
|
519
|
-
var
|
|
537
|
+
var ll = function() {
|
|
520
538
|
var e = this, l = e._self._c;
|
|
521
539
|
return e._self._setupProxy, l("div", e._g(e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", attrs: { role: "listbox" }, on: { focusin: e.handleVirtualScrollingFocus } }, "div", e.ariaAttributes, !1), e.listboxListeners), [e.hasCategories && e.staticCategories ? [e._l(e.items, function(t) {
|
|
522
|
-
return [t.items && t.items.length > 0 ? l("bento-listbox-single-select-category", { key: `category-${t.value}`, attrs: { "category-label": t.label } }, e._l(t.items, function(
|
|
523
|
-
return l("bento-listbox-single-select-option", e._g({ key:
|
|
524
|
-
return { key: i, fn: function(
|
|
525
|
-
return [e._t(i, null, null,
|
|
540
|
+
return [t.items && t.items.length > 0 ? l("bento-listbox-single-select-category", { key: `category-${t.value}`, attrs: { "category-label": t.label } }, e._l(t.items, function(o) {
|
|
541
|
+
return l("bento-listbox-single-select-option", e._g({ key: o.value, ref: "listboxItemRef", refInFor: !0, attrs: { id: e.getOptionId(o), role: "option", active: e.activeDescendantId === e.getOptionId(o), option: o, disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null, selected: o.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(s, i) {
|
|
542
|
+
return { key: i, fn: function(b) {
|
|
543
|
+
return [e._t(i, null, null, b)];
|
|
526
544
|
} };
|
|
527
545
|
})], null, !0) }, e.listboxOptionListeners));
|
|
528
|
-
}), 1) : l("bento-listbox-single-select-option", e._g({ key: `option-${t.value}`, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: t, disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, selected: t.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(
|
|
529
|
-
return { key:
|
|
530
|
-
return [e._t(
|
|
546
|
+
}), 1) : l("bento-listbox-single-select-option", e._g({ key: `option-${t.value}`, ref: "listboxItemRef", refInFor: !0, attrs: { id: e.getOptionId(t), role: "option", active: e.activeDescendantId === e.getOptionId(t), option: t, disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, selected: t.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(o, s) {
|
|
547
|
+
return { key: s, fn: function(i) {
|
|
548
|
+
return [e._t(s, null, null, i)];
|
|
531
549
|
} };
|
|
532
550
|
})], null, !0) }, e.listboxOptionListeners))];
|
|
533
551
|
})] : e._l(e.items, function(t) {
|
|
534
|
-
return l("bento-listbox-single-select-option", e._g({ key: t.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: t, disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, selected: t.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(
|
|
535
|
-
return { key:
|
|
536
|
-
return [e._t(
|
|
552
|
+
return l("bento-listbox-single-select-option", e._g({ key: t.value, ref: "listboxItemRef", refInFor: !0, attrs: { id: e.getOptionId(t), role: "option", active: e.activeDescendantId === e.getOptionId(t), option: t, disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, selected: t.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(o, s) {
|
|
553
|
+
return { key: s, fn: function(i) {
|
|
554
|
+
return [e._t(s, null, null, i)];
|
|
537
555
|
} };
|
|
538
556
|
})], null, !0) }, e.listboxOptionListeners));
|
|
539
557
|
})], 2);
|
|
540
|
-
},
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
558
|
+
}, al = [], ol = /* @__PURE__ */ W(
|
|
559
|
+
tl,
|
|
560
|
+
ll,
|
|
561
|
+
al,
|
|
544
562
|
!1,
|
|
545
563
|
null,
|
|
546
564
|
null
|
|
547
565
|
);
|
|
548
|
-
const
|
|
549
|
-
let
|
|
550
|
-
const
|
|
566
|
+
const sl = ol.exports;
|
|
567
|
+
let Xe = 0;
|
|
568
|
+
const nl = {
|
|
551
569
|
beforeCreate() {
|
|
552
|
-
this.uuid =
|
|
570
|
+
this.uuid = Xe.toString(), Xe += 1;
|
|
553
571
|
}
|
|
554
572
|
};
|
|
555
|
-
var
|
|
573
|
+
var il = function() {
|
|
556
574
|
var e = this, l = e._self._c;
|
|
557
575
|
return l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M9.69043 5.75L4.62988 10.8105L1.56934 7.75L2.62988 6.68945L4.62988 8.68945L8.62988 4.68945L9.69043 5.75Z" } }), l("path", { attrs: { fill: "#001222", d: "M13.9307 5.75L8.87012 10.8105L7.80957 9.75L12.8701 4.68945L13.9307 5.75Z" } })]);
|
|
558
|
-
},
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
576
|
+
}, rl = [], cl = /* @__PURE__ */ W(
|
|
577
|
+
nl,
|
|
578
|
+
il,
|
|
579
|
+
rl,
|
|
562
580
|
!1,
|
|
563
581
|
null,
|
|
564
582
|
null
|
|
565
583
|
);
|
|
566
|
-
const
|
|
567
|
-
...
|
|
584
|
+
const ul = cl.exports, dl = {}, pl = /* @__PURE__ */ z({
|
|
585
|
+
...dl,
|
|
568
586
|
__name: "decorative-checkbox",
|
|
569
587
|
props: {
|
|
570
588
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -574,29 +592,29 @@ const tl = el.exports, ll = {}, al = /* @__PURE__ */ F({
|
|
|
574
592
|
},
|
|
575
593
|
setup(a) {
|
|
576
594
|
const e = a, l = n(() => ({
|
|
577
|
-
[`b-checkbox-input--${
|
|
595
|
+
[`b-checkbox-input--${ke.DISABLED}`]: e.disabled
|
|
578
596
|
})), t = n(() => ({
|
|
579
|
-
[`b-checkbox-input__outline--${
|
|
580
|
-
[`b-checkbox-input__outline--${
|
|
581
|
-
[`b-checkbox-input__outline--${
|
|
597
|
+
[`b-checkbox-input__outline--${ke.UNCHECKED}`]: !e.checked && !e.indeterminate && !e.allSelected,
|
|
598
|
+
[`b-checkbox-input__outline--${ke.CHECKED}`]: (e.checked || e.allSelected) && !e.indeterminate,
|
|
599
|
+
[`b-checkbox-input__outline--${ke.INDETERMINATE}`]: e.indeterminate
|
|
582
600
|
}));
|
|
583
|
-
return { __sfc: !0, props: e, conditionalClasses: l, outlineConditionalClasses: t, CheckmarkSmallIcon:
|
|
601
|
+
return { __sfc: !0, props: e, conditionalClasses: l, outlineConditionalClasses: t, CheckmarkSmallIcon: Et, MinusSmallIcon: Ot, DoubleCheckmarkSmallIcon: ul };
|
|
584
602
|
}
|
|
585
603
|
});
|
|
586
|
-
var
|
|
604
|
+
var fl = function() {
|
|
587
605
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
588
606
|
return l("div", { staticClass: "b-checkbox-input", class: t.conditionalClasses, attrs: { role: "presentation" } }, [e.indeterminate ? l(t.MinusSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true" } }) : e.allSelected ? l(t.DoubleCheckmarkSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true", "data-testid": "decorative-checkbox-double-checkmark-icon" } }) : e.checked ? l(t.CheckmarkSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true" } }) : e._e(), l("div", { staticClass: "b-checkbox-input__outline", class: t.outlineConditionalClasses })], 1);
|
|
589
|
-
},
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
607
|
+
}, bl = [], vl = /* @__PURE__ */ W(
|
|
608
|
+
pl,
|
|
609
|
+
fl,
|
|
610
|
+
bl,
|
|
593
611
|
!1,
|
|
594
612
|
null,
|
|
595
613
|
"b87bbaf9"
|
|
596
614
|
);
|
|
597
|
-
const
|
|
598
|
-
var
|
|
599
|
-
const
|
|
615
|
+
const Ke = vl.exports;
|
|
616
|
+
var ut = /* @__PURE__ */ ((a) => (a.DISABLED = "disabled", a.STATIC_CATEGORY = "static-category", a))(ut || {}), fe = /* @__PURE__ */ ((a) => (a.SELECT_CATEGORY = "select-category", a.UNSELECT_CATEGORY = "unselect-category", a.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", a))(fe || {});
|
|
617
|
+
const ml = {
|
|
600
618
|
"de-DE": { loading: "Laden", showMore: "Mehr anzeigen" },
|
|
601
619
|
"en-GB": { loading: "Loading", showMore: "Show more" },
|
|
602
620
|
"en-US": { loading: "Loading", showMore: "Show more" },
|
|
@@ -608,11 +626,11 @@ const il = {
|
|
|
608
626
|
"ja-JP": { loading: "読み込み中", showMore: "さらに表示" },
|
|
609
627
|
"pt-BR": { loading: "Carregando", showMore: "Mostrar mais" },
|
|
610
628
|
"zh-CN": { loading: "正在加载", showMore: "显示更多" }
|
|
611
|
-
},
|
|
629
|
+
}, yl = {
|
|
612
630
|
name: "listbox-lazy-load",
|
|
613
|
-
i18n: { messages:
|
|
614
|
-
},
|
|
615
|
-
...
|
|
631
|
+
i18n: { messages: ml }
|
|
632
|
+
}, _l = /* @__PURE__ */ z({
|
|
633
|
+
...yl,
|
|
616
634
|
props: {
|
|
617
635
|
condensed: { type: Boolean, default: !1 },
|
|
618
636
|
hasMoreItems: { type: Boolean, default: !1 },
|
|
@@ -622,28 +640,28 @@ const il = {
|
|
|
622
640
|
},
|
|
623
641
|
emits: ["show-more"],
|
|
624
642
|
setup(a) {
|
|
625
|
-
const e = a, { t: l } =
|
|
626
|
-
() => e.type ===
|
|
627
|
-
),
|
|
628
|
-
() => e.loading ?
|
|
629
|
-
),
|
|
630
|
-
return { __sfc: !0, t: l, props: e, shouldDisplayShowMoreButton: t, loadingButtonState:
|
|
643
|
+
const e = a, { t: l } = de(), t = n(
|
|
644
|
+
() => e.type === re.BUTTON && e.hasMoreItems
|
|
645
|
+
), o = n(
|
|
646
|
+
() => e.loading ? Be.LOADING : Be.START
|
|
647
|
+
), s = n(() => e.loading ? l("loading") : l("showMore"));
|
|
648
|
+
return { __sfc: !0, t: l, props: e, shouldDisplayShowMoreButton: t, loadingButtonState: o, showMoreButtonText: s, BentoLoadingIndicator: st, BentoLoadingButton: Tt };
|
|
631
649
|
}
|
|
632
650
|
});
|
|
633
|
-
var
|
|
651
|
+
var gl = function() {
|
|
634
652
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
635
|
-
return t.shouldDisplayShowMoreButton || e.loading ? l("div", { staticClass: "b-listbox-lazy-load" }, [t.shouldDisplayShowMoreButton ? l(t.BentoLoadingButton, { attrs: { state: t.loadingButtonState, tabindex: e.tabindex, condensed: e.condensed, variant: "secondary" }, on: { "!click": function(
|
|
636
|
-
return e.$emit("show-more",
|
|
653
|
+
return t.shouldDisplayShowMoreButton || e.loading ? l("div", { staticClass: "b-listbox-lazy-load" }, [t.shouldDisplayShowMoreButton ? l(t.BentoLoadingButton, { attrs: { state: t.loadingButtonState, tabindex: e.tabindex, condensed: e.condensed, variant: "secondary" }, on: { "!click": function(o) {
|
|
654
|
+
return e.$emit("show-more", o);
|
|
637
655
|
} } }, [e._v(" " + e._s(t.showMoreButtonText) + " ")]) : e.loading ? l(t.BentoLoadingIndicator) : e._e()], 1) : e._e();
|
|
638
|
-
},
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
656
|
+
}, hl = [], Sl = /* @__PURE__ */ W(
|
|
657
|
+
_l,
|
|
658
|
+
gl,
|
|
659
|
+
hl,
|
|
642
660
|
!1,
|
|
643
661
|
null,
|
|
644
662
|
"d86387ad"
|
|
645
663
|
);
|
|
646
|
-
const
|
|
664
|
+
const dt = Sl.exports, xl = {
|
|
647
665
|
"de-DE": { thereWasAnErrorLoadingNewItems: "Beim Laden neuer Artikel ist ein Fehler aufgetreten." },
|
|
648
666
|
"en-GB": { thereWasAnErrorLoadingNewItems: "There was an error loading new items." },
|
|
649
667
|
"en-US": { thereWasAnErrorLoadingNewItems: "There was an error loading new items." },
|
|
@@ -654,27 +672,27 @@ const at = pl.exports, fl = {
|
|
|
654
672
|
"ja-JP": { thereWasAnErrorLoadingNewItems: "新しいアイテムの読み込みにエラーが発生しました。" },
|
|
655
673
|
"pt-BR": { thereWasAnErrorLoadingNewItems: "Ocorreu um erro ao carregar novos itens." },
|
|
656
674
|
"zh-CN": { thereWasAnErrorLoadingNewItems: "加载新项目时出错。" }
|
|
657
|
-
},
|
|
675
|
+
}, Cl = {
|
|
658
676
|
name: "listbox-multi-select-nested-lazy-load",
|
|
659
|
-
i18n: { messages:
|
|
660
|
-
},
|
|
661
|
-
...
|
|
677
|
+
i18n: { messages: xl }
|
|
678
|
+
}, Il = /* @__PURE__ */ z({
|
|
679
|
+
...Cl,
|
|
662
680
|
props: {
|
|
663
681
|
index: null,
|
|
664
682
|
option: null
|
|
665
683
|
},
|
|
666
684
|
setup(a, { expose: e }) {
|
|
667
|
-
const l = a, t =
|
|
668
|
-
async function i(
|
|
669
|
-
if (
|
|
670
|
-
|
|
685
|
+
const l = a, t = x(!1), o = x(!1), { t: s } = de();
|
|
686
|
+
async function i(b) {
|
|
687
|
+
if (b.stopImmediatePropagation(), !t.value) {
|
|
688
|
+
o.value = !1, t.value = !0;
|
|
671
689
|
try {
|
|
672
690
|
await l.option.lazyLoad?.lazyLoadEvent({
|
|
673
691
|
value: l.option.value,
|
|
674
692
|
index: l.index
|
|
675
693
|
});
|
|
676
694
|
} catch {
|
|
677
|
-
|
|
695
|
+
o.value = !0;
|
|
678
696
|
}
|
|
679
697
|
t.value = !1;
|
|
680
698
|
}
|
|
@@ -684,25 +702,25 @@ const at = pl.exports, fl = {
|
|
|
684
702
|
* Trigger the lazy load event programmatically.
|
|
685
703
|
*/
|
|
686
704
|
showMore: i
|
|
687
|
-
}), { __sfc: !0, loading: t, failedAndRetry:
|
|
705
|
+
}), { __sfc: !0, loading: t, failedAndRetry: o, t: s, props: l, showMore: i, BentoEmptyState: nt, BentoListboxLazyLoad: dt };
|
|
688
706
|
}
|
|
689
707
|
});
|
|
690
|
-
var
|
|
708
|
+
var Ll = function() {
|
|
691
709
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
692
|
-
return l("div", { attrs: { role: "treeitem", tabindex: 0 }, on: { keydown: [function(
|
|
693
|
-
return !
|
|
694
|
-
}, function(
|
|
695
|
-
return !
|
|
710
|
+
return l("div", { attrs: { role: "treeitem", tabindex: 0 }, on: { keydown: [function(o) {
|
|
711
|
+
return !o.type.indexOf("key") && e._k(o.keyCode, "enter", 13, o.key, "Enter") ? null : (o.preventDefault(), t.showMore.apply(null, arguments));
|
|
712
|
+
}, function(o) {
|
|
713
|
+
return !o.type.indexOf("key") && e._k(o.keyCode, "space", 32, o.key, [" ", "Spacebar"]) ? null : (o.preventDefault(), t.showMore.apply(null, arguments));
|
|
696
714
|
}] } }, [t.failedAndRetry ? l(t.BentoEmptyState, { staticClass: "b-listbox-multi-select-nested-lazy-load__error-message", attrs: { variant: "basic" } }, [e._v(" " + e._s(t.t("thereWasAnErrorLoadingNewItems")) + " ")]) : e._e(), l(t.BentoListboxLazyLoad, { attrs: { type: "button", tabindex: -1, condensed: "", "has-more-items": e.option.lazyLoad?.hasMoreItems, loading: t.loading }, on: { "show-more": t.showMore } })], 1);
|
|
697
|
-
},
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
715
|
+
}, Ol = [], El = /* @__PURE__ */ W(
|
|
716
|
+
Il,
|
|
717
|
+
Ll,
|
|
718
|
+
Ol,
|
|
701
719
|
!1,
|
|
702
720
|
null,
|
|
703
721
|
"b7c84651"
|
|
704
722
|
);
|
|
705
|
-
const
|
|
723
|
+
const wl = El.exports, Tl = {
|
|
706
724
|
"de-DE": { categoryClosed: "{category} geschlossen", categoryOpened: "{category} geöffnet" },
|
|
707
725
|
"en-GB": { categoryClosed: "{category} closed", categoryOpened: "{category} opened" },
|
|
708
726
|
"en-US": { categoryClosed: "{category} closed", categoryOpened: "{category} opened" },
|
|
@@ -714,16 +732,16 @@ const gl = _l.exports, hl = {
|
|
|
714
732
|
"ja-JP": { categoryClosed: "{category}を閉じました", categoryOpened: "{category}を開きました" },
|
|
715
733
|
"pt-BR": { categoryClosed: "{category} fechada", categoryOpened: "{categoria} aberta" },
|
|
716
734
|
"zh-CN": { categoryClosed: "{category} 已关闭", categoryOpened: "{category} 已打开" }
|
|
717
|
-
},
|
|
718
|
-
i18n: { messages:
|
|
735
|
+
}, Al = z({
|
|
736
|
+
i18n: { messages: Tl },
|
|
719
737
|
name: "bento-listbox-multi-select-category",
|
|
720
738
|
components: {
|
|
721
|
-
BentoTypography:
|
|
722
|
-
BentoListboxOption:
|
|
723
|
-
BentoListboxMultiSelectNestedLazyLoad:
|
|
724
|
-
ChevronDownIcon:
|
|
725
|
-
ChevronUpIcon:
|
|
726
|
-
DecorativeCheckbox:
|
|
739
|
+
BentoTypography: ue,
|
|
740
|
+
BentoListboxOption: Me,
|
|
741
|
+
BentoListboxMultiSelectNestedLazyLoad: wl,
|
|
742
|
+
ChevronDownIcon: at,
|
|
743
|
+
ChevronUpIcon: ot,
|
|
744
|
+
DecorativeCheckbox: Ke
|
|
727
745
|
},
|
|
728
746
|
props: {
|
|
729
747
|
/**
|
|
@@ -776,67 +794,67 @@ const gl = _l.exports, hl = {
|
|
|
776
794
|
tabindex: { type: Number, default: -1 }
|
|
777
795
|
},
|
|
778
796
|
emits: [
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
797
|
+
fe.SELECT_CATEGORY,
|
|
798
|
+
fe.UNSELECT_CATEGORY,
|
|
799
|
+
fe.TOGGLE_CATEGORY_VISIBILITY
|
|
782
800
|
],
|
|
783
801
|
setup(a, { emit: e }) {
|
|
784
|
-
const l =
|
|
785
|
-
[`b-listbox-multi-select-category--${
|
|
786
|
-
})),
|
|
787
|
-
|
|
788
|
-
},
|
|
789
|
-
const
|
|
790
|
-
return { isDisabled:
|
|
791
|
-
},
|
|
792
|
-
() => a.category.items.filter((
|
|
793
|
-
const { isDisabled:
|
|
794
|
-
return
|
|
802
|
+
const l = x(!1), { t } = de(), o = ce("category-group"), s = ce("category-name"), i = x(null), b = (I) => a.isOptionDisabled ? a.isOptionDisabled(I) : !1, m = n(() => a.category.lazyLoad && a.category.items?.length === 0 ? !1 : a.category.items.every((I) => b(I))), d = H(a, "staticCategories"), r = n(() => l.value || a.staticCategories), v = n(() => ({
|
|
803
|
+
[`b-listbox-multi-select-category--${ut.DISABLED}`]: m.value
|
|
804
|
+
})), c = (I, R) => {
|
|
805
|
+
I.preventDefault(), a.category.lazyLoad && a.category.items?.length === 0 && i.value.showMore(I), l.value = R !== void 0 ? R : !l.value, e(fe.TOGGLE_CATEGORY_VISIBILITY, a.category.value);
|
|
806
|
+
}, p = (I) => {
|
|
807
|
+
const R = b(I), F = a.selectedItemsList?.includes(I.value) || !1;
|
|
808
|
+
return { isDisabled: R, isPreSelected: F };
|
|
809
|
+
}, _ = n(
|
|
810
|
+
() => a.category.items.filter((I) => {
|
|
811
|
+
const { isDisabled: R, isPreSelected: F } = p(I);
|
|
812
|
+
return R && F || !R;
|
|
795
813
|
})
|
|
796
|
-
),
|
|
797
|
-
() =>
|
|
798
|
-
),
|
|
799
|
-
const
|
|
800
|
-
return t(
|
|
801
|
-
}),
|
|
802
|
-
e(
|
|
803
|
-
},
|
|
804
|
-
e(
|
|
805
|
-
},
|
|
814
|
+
), O = n(
|
|
815
|
+
() => _.value?.filter(({ value: I }) => a.selectedItemsList?.includes(I))
|
|
816
|
+
), w = n(() => {
|
|
817
|
+
const I = l.value ? "categoryOpened" : "categoryClosed";
|
|
818
|
+
return t(I, { category: a.category.label });
|
|
819
|
+
}), P = () => {
|
|
820
|
+
e(fe.SELECT_CATEGORY);
|
|
821
|
+
}, h = () => {
|
|
822
|
+
e(fe.UNSELECT_CATEGORY);
|
|
823
|
+
}, C = n(
|
|
806
824
|
() => !!a.category.lazyLoad && a.selectedItemsList.includes(a.category.value)
|
|
807
825
|
), {
|
|
808
|
-
isAllSelected:
|
|
809
|
-
isIndeterminate:
|
|
810
|
-
toggleSelectAll:
|
|
811
|
-
} =
|
|
812
|
-
|
|
826
|
+
isAllSelected: S,
|
|
827
|
+
isIndeterminate: T,
|
|
828
|
+
toggleSelectAll: E
|
|
829
|
+
} = it(O, _, P, h), A = n(() => C.value || S.value), N = n(() => !C.value && T.value), Y = n(() => N.value ? "mixed" : `${A.value}`), G = x(A.value), L = () => {
|
|
830
|
+
G.value = !G.value, E(G.value);
|
|
813
831
|
};
|
|
814
|
-
return
|
|
815
|
-
|
|
832
|
+
return ee(A, () => {
|
|
833
|
+
G.value = A.value;
|
|
816
834
|
}), {
|
|
817
835
|
// Refs
|
|
818
836
|
lazyLoadRef: i,
|
|
819
837
|
// Values
|
|
820
|
-
chevronTitle:
|
|
821
|
-
conditionalClass:
|
|
822
|
-
hasAllPropsDisabled:
|
|
838
|
+
chevronTitle: w,
|
|
839
|
+
conditionalClass: v,
|
|
840
|
+
hasAllPropsDisabled: m,
|
|
823
841
|
isOpen: l,
|
|
824
|
-
isAllSelected:
|
|
825
|
-
isIndeterminate:
|
|
826
|
-
isStaticCategory:
|
|
827
|
-
categoryGroupId:
|
|
828
|
-
categoryNameId:
|
|
842
|
+
isAllSelected: A,
|
|
843
|
+
isIndeterminate: N,
|
|
844
|
+
isStaticCategory: d,
|
|
845
|
+
categoryGroupId: o,
|
|
846
|
+
categoryNameId: s,
|
|
829
847
|
// Computed
|
|
830
848
|
showItemChildren: r,
|
|
831
|
-
ariaCheckedComputed:
|
|
849
|
+
ariaCheckedComputed: Y,
|
|
832
850
|
// Methods
|
|
833
|
-
handleSelectAll:
|
|
834
|
-
toggleOpen:
|
|
835
|
-
toggleSelectAll:
|
|
851
|
+
handleSelectAll: L,
|
|
852
|
+
toggleOpen: c,
|
|
853
|
+
toggleSelectAll: E
|
|
836
854
|
};
|
|
837
855
|
}
|
|
838
856
|
});
|
|
839
|
-
var
|
|
857
|
+
var Dl = function() {
|
|
840
858
|
var e = this, l = e._self._c;
|
|
841
859
|
return e._self._setupProxy, l("div", [e.isStaticCategory ? l("div", { staticClass: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category", attrs: { "aria-hidden": "true" } }, [l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { el: "span", variant: "caption" } }, [e._v(" " + e._s(e.category.label) + " ")])], 1)]) : l("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass, attrs: { tabindex: e.tabindex, "aria-selected": e.ariaCheckedComputed !== "false", "aria-checked": e.ariaCheckedComputed, "aria-disabled": e.hasAllPropsDisabled, "aria-expanded": `${e.isOpen}`, role: "treeitem", "aria-owns": e.categoryGroupId, "aria-labelledby": e.categoryNameId }, on: { click: e.handleSelectAll, "enter-pressed": e.handleSelectAll, "space-pressed": function(t) {
|
|
842
860
|
return t.preventDefault(), e.handleSelectAll.apply(null, arguments);
|
|
@@ -847,23 +865,23 @@ var xl = function() {
|
|
|
847
865
|
}] } }, [l("decorative-checkbox", { attrs: { indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, checked: e.isAllSelected } }), l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { id: e.categoryNameId, el: "span" } }, [e._v(" " + e._s(e.category.label) + " ")]), l("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "aria-hidden": "true", "data-testid": "toggle-listbox" }, on: { "!click": function(t) {
|
|
848
866
|
return t.stopPropagation(), e.toggleOpen.apply(null, arguments);
|
|
849
867
|
} } }, [e.isOpen ? l("chevron-up-icon", { attrs: { "svg-title": e.chevronTitle } }) : l("chevron-down-icon", { attrs: { "svg-title": e.chevronTitle } })], 1)], 1)], 1), l("div", { directives: [{ name: "show", rawName: "v-show", value: e.showItemChildren, expression: "showItemChildren" }], attrs: { id: e.categoryGroupId, role: "group", "aria-label": e.category.label } }, [e._t("default"), e.category.lazyLoad?.hasMoreItems ? [l("bento-listbox-multi-select-nested-lazy-load", { ref: "lazyLoadRef", attrs: { option: e.category, index: e.optionIndex } })] : e._e()], 2)], 1);
|
|
850
|
-
},
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
868
|
+
}, kl = [], Bl = /* @__PURE__ */ W(
|
|
869
|
+
Al,
|
|
870
|
+
Dl,
|
|
871
|
+
kl,
|
|
854
872
|
!1,
|
|
855
873
|
null,
|
|
856
874
|
"b493449e"
|
|
857
875
|
);
|
|
858
|
-
const
|
|
859
|
-
var
|
|
860
|
-
const
|
|
876
|
+
const Rl = Bl.exports;
|
|
877
|
+
var ie = /* @__PURE__ */ ((a) => (a.SELECT_CATEGORY = "select-category", a.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", a.UNSELECT_CATEGORY = "unselect-category", a.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", a))(ie || {});
|
|
878
|
+
const Ml = z({
|
|
861
879
|
name: "listbox-multi-select-options",
|
|
862
880
|
components: {
|
|
863
|
-
BentoListboxOption:
|
|
864
|
-
BentoTypography:
|
|
865
|
-
ListboxMultiSelectCategory:
|
|
866
|
-
DecorativeCheckbox:
|
|
881
|
+
BentoListboxOption: Me,
|
|
882
|
+
BentoTypography: ue,
|
|
883
|
+
ListboxMultiSelectCategory: Rl,
|
|
884
|
+
DecorativeCheckbox: Ke
|
|
867
885
|
},
|
|
868
886
|
inheritAttrs: !1,
|
|
869
887
|
props: {
|
|
@@ -940,30 +958,30 @@ const Il = F({
|
|
|
940
958
|
}
|
|
941
959
|
},
|
|
942
960
|
emits: [
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
961
|
+
ie.TOGGLE_CHECKBOX_SELECTION,
|
|
962
|
+
ie.SELECT_CATEGORY,
|
|
963
|
+
ie.UNSELECT_CATEGORY,
|
|
964
|
+
ie.TOGGLE_CATEGORY_VISIBILITY
|
|
947
965
|
],
|
|
948
966
|
setup(a, { emit: e }) {
|
|
949
|
-
const l = (
|
|
950
|
-
a.isOptionDisabled(
|
|
951
|
-
}, t = (
|
|
967
|
+
const l = (d) => {
|
|
968
|
+
a.isOptionDisabled(d) || e(ie.TOGGLE_CHECKBOX_SELECTION, d);
|
|
969
|
+
}, t = (d) => !!d.items, o = (d) => {
|
|
952
970
|
const r = a.isMultiLevel && a.searching;
|
|
953
|
-
return
|
|
954
|
-
},
|
|
971
|
+
return d.description && (!a.isMultiLevel || r);
|
|
972
|
+
}, s = (d) => {
|
|
955
973
|
const r = !!a.parentCategory?.lazyLoad && a.selectedItemsList.includes(a.parentCategory.value);
|
|
956
|
-
if (
|
|
957
|
-
const
|
|
958
|
-
return r ||
|
|
974
|
+
if (d.items) {
|
|
975
|
+
const v = !!d.lazyLoad && a.selectedItemsList.includes(d.value);
|
|
976
|
+
return r || v || !!d.items.find((c) => a.selectedItemsList.includes(c.value));
|
|
959
977
|
}
|
|
960
|
-
return r || a.selectedItemsList.includes(
|
|
961
|
-
}, i = (
|
|
962
|
-
if (t(
|
|
963
|
-
const r =
|
|
964
|
-
e(r,
|
|
978
|
+
return r || a.selectedItemsList.includes(d.value);
|
|
979
|
+
}, i = (d) => {
|
|
980
|
+
if (t(d)) {
|
|
981
|
+
const r = s(d) ? ie.UNSELECT_CATEGORY : ie.SELECT_CATEGORY;
|
|
982
|
+
e(r, d);
|
|
965
983
|
} else
|
|
966
|
-
l(
|
|
984
|
+
l(d);
|
|
967
985
|
};
|
|
968
986
|
return {
|
|
969
987
|
// Values
|
|
@@ -972,59 +990,59 @@ const Il = F({
|
|
|
972
990
|
"b-listbox-multi-select-options__category-option": a.categoryItems
|
|
973
991
|
})),
|
|
974
992
|
// Methods
|
|
975
|
-
isOptionSelected:
|
|
976
|
-
shouldShowDescription:
|
|
993
|
+
isOptionSelected: s,
|
|
994
|
+
shouldShowDescription: o,
|
|
977
995
|
toggleCheckboxSelection: l,
|
|
978
996
|
toggleSearchOption: i,
|
|
979
|
-
computedTabindex: (
|
|
997
|
+
computedTabindex: (d) => a.itemsIndex[d] === a.focusedIndex ? 0 : -1,
|
|
980
998
|
// Enums
|
|
981
|
-
BentoListboxEvent:
|
|
982
|
-
ListboxMultiSelectOptionsEvent:
|
|
999
|
+
BentoListboxEvent: u,
|
|
1000
|
+
ListboxMultiSelectOptionsEvent: ie
|
|
983
1001
|
};
|
|
984
1002
|
}
|
|
985
1003
|
});
|
|
986
|
-
var
|
|
1004
|
+
var Nl = function() {
|
|
987
1005
|
var e = this, l = e._self._c;
|
|
988
1006
|
return e._self._setupProxy, l("div", e._l(e.items, function(t) {
|
|
989
|
-
return l("div", { key: `selected-${t.value}` }, [e.searching && e.isMultiLevel ? [l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, tabindex: e.computedTabindex(t.value), "aria-selected": `${e.isOptionSelected(t)}`, "aria-checked": `${e.isOptionSelected(t)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(t) : null, role: e.$attrs.role || "option" }, on: { click: function(
|
|
1007
|
+
return l("div", { key: `selected-${t.value}` }, [e.searching && e.isMultiLevel ? [l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, tabindex: e.computedTabindex(t.value), "aria-selected": `${e.isOptionSelected(t)}`, "aria-checked": `${e.isOptionSelected(t)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(t) : null, role: e.$attrs.role || "option" }, on: { click: function(o) {
|
|
990
1008
|
return e.toggleSearchOption(t);
|
|
991
|
-
}, "enter-pressed": function(
|
|
1009
|
+
}, "enter-pressed": function(o) {
|
|
992
1010
|
return e.toggleSearchOption(t);
|
|
993
|
-
}, "space-pressed": function(
|
|
994
|
-
return
|
|
1011
|
+
}, "space-pressed": function(o) {
|
|
1012
|
+
return o.preventDefault(), e.toggleSearchOption(t);
|
|
995
1013
|
} } }, [l("decorative-checkbox", { attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, checked: e.isOptionSelected(t) } }), e._t("default", function() {
|
|
996
1014
|
return [l("span", { staticClass: "b-listbox-multi-select__option-text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(t.label))]), e.shouldShowDescription(t) ? l("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(t.description) + " ")]) : e._e()], 1)];
|
|
997
|
-
}, null, t)], 2)] : [t.items ? [l("listbox-multi-select-category", { attrs: { category: t, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled, "selected-items-list": e.selectedItemsList, "option-index": e.itemsIndex[t.value], tabindex: e.computedTabindex(t.value) }, on: { "select-category": function(
|
|
1015
|
+
}, null, t)], 2)] : [t.items ? [l("listbox-multi-select-category", { attrs: { category: t, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled, "selected-items-list": e.selectedItemsList, "option-index": e.itemsIndex[t.value], tabindex: e.computedTabindex(t.value) }, on: { "select-category": function(o) {
|
|
998
1016
|
return e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, t);
|
|
999
|
-
}, "unselect-category": function(
|
|
1017
|
+
}, "unselect-category": function(o) {
|
|
1000
1018
|
return e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, t);
|
|
1001
|
-
}, "toggle-category-visibility": function(
|
|
1002
|
-
return e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY,
|
|
1003
|
-
} } }, [l("listbox-multi-select-options", { attrs: { "category-items": "", items: t.items, "is-option-disabled": e.isOptionDisabled, "items-index": e.itemsIndex, "focused-index": e.focusedIndex, "is-multi-level": e.isMultiLevel, "static-categories": e.staticCategories, "selected-items-list": e.selectedItemsList, searching: e.searching, "parent-category": t, role: e.$attrs.role || "option" }, on: { "toggle-checkbox-selection": (
|
|
1019
|
+
}, "toggle-category-visibility": function(o) {
|
|
1020
|
+
return e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY, o);
|
|
1021
|
+
} } }, [l("listbox-multi-select-options", { attrs: { "category-items": "", items: t.items, "is-option-disabled": e.isOptionDisabled, "items-index": e.itemsIndex, "focused-index": e.focusedIndex, "is-multi-level": e.isMultiLevel, "static-categories": e.staticCategories, "selected-items-list": e.selectedItemsList, searching: e.searching, "parent-category": t, role: e.$attrs.role || "option" }, on: { "toggle-checkbox-selection": (o) => e.toggleCheckboxSelection(o) } })], 1)] : l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, tabindex: e.computedTabindex(t.value), "aria-selected": `${e.isOptionSelected(t)}`, "aria-checked": `${e.isOptionSelected(t)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(t) : null, role: e.$attrs.role || "option" }, on: { click: function(o) {
|
|
1004
1022
|
return e.toggleCheckboxSelection(t);
|
|
1005
|
-
}, "enter-pressed": function(
|
|
1023
|
+
}, "enter-pressed": function(o) {
|
|
1006
1024
|
return e.toggleCheckboxSelection(t);
|
|
1007
|
-
}, "space-pressed": function(
|
|
1008
|
-
return
|
|
1025
|
+
}, "space-pressed": function(o) {
|
|
1026
|
+
return o.preventDefault(), e.toggleCheckboxSelection(t);
|
|
1009
1027
|
} } }, [l("decorative-checkbox", { attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, checked: e.isOptionSelected(t) } }), e._t("default", function() {
|
|
1010
1028
|
return [l("span", { staticClass: "b-listbox-multi-select__option-text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(t.label))]), e.shouldShowDescription(t) ? l("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(t.description) + " ")]) : e._e()], 1)];
|
|
1011
1029
|
}, null, t)], 2)]], 2);
|
|
1012
1030
|
}), 0);
|
|
1013
|
-
},
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1031
|
+
}, $l = [], Pl = /* @__PURE__ */ W(
|
|
1032
|
+
Ml,
|
|
1033
|
+
Nl,
|
|
1034
|
+
$l,
|
|
1017
1035
|
!1,
|
|
1018
1036
|
null,
|
|
1019
1037
|
"1cf47b26"
|
|
1020
1038
|
);
|
|
1021
|
-
const
|
|
1022
|
-
const e = n(() => !!a.value?.find(({ items: t }) => !!t)), l = n(() => e.value ? a.value?.reduce((t,
|
|
1039
|
+
const Fl = Pl.exports, pt = (a) => {
|
|
1040
|
+
const e = n(() => !!a.value?.find(({ items: t }) => !!t)), l = n(() => e.value ? a.value?.reduce((t, o) => (o.items ? t.push(...o.items.flat()) : t.push(o), t), []) : a.value);
|
|
1023
1041
|
return {
|
|
1024
1042
|
isMultiLevelSelect: e,
|
|
1025
1043
|
flattenedItemsList: l
|
|
1026
1044
|
};
|
|
1027
|
-
},
|
|
1045
|
+
}, Vl = {
|
|
1028
1046
|
"de-DE": { allSelected: "Alle ausgewählt ({total})", numberOfTotalSelected: "{number} von {total} ausgewählt", numbersSelected: "{number} ausgewählt", selectAll: "Alle auswählen ({total})" },
|
|
1029
1047
|
"en-GB": { allSelected: "All selected ({total})", numberOfTotalSelected: "{number} of {total} selected", numbersSelected: "{number} selected", selectAll: "Select all ({total})" },
|
|
1030
1048
|
"en-US": { allSelected: "All selected ({total})", numberOfTotalSelected: "{number} of {total} selected", numbersSelected: "{number} selected", selectAll: "Select all ({total})" },
|
|
@@ -1036,8 +1054,8 @@ const Al = Tl.exports, st = (a) => {
|
|
|
1036
1054
|
"ja-JP": { allSelected: "すべて選択 ({total})", numberOfTotalSelected: "{total}件中{number}件を選択済み", numbersSelected: "{number}件選択済み", selectAll: "すべて選択 ({total})" },
|
|
1037
1055
|
"pt-BR": { allSelected: "Todos os selecionados ({total})", numberOfTotalSelected: "{number} de {total} selecionados", numbersSelected: "{number} selecionados", selectAll: "Selecionar tudo ({total})" },
|
|
1038
1056
|
"zh-CN": { allSelected: "全部已选 ({total})", numberOfTotalSelected: "已选择 {number} 个,共 {total} 个", numbersSelected: "已选择 {number} 个", selectAll: "选择全部({total})个" }
|
|
1039
|
-
},
|
|
1040
|
-
...
|
|
1057
|
+
}, zl = { i18n: { messages: Vl } }, Gl = /* @__PURE__ */ z({
|
|
1058
|
+
...zl,
|
|
1041
1059
|
__name: "listbox-multi-select",
|
|
1042
1060
|
props: {
|
|
1043
1061
|
hasMoreItems: { type: Boolean, default: !1 },
|
|
@@ -1050,206 +1068,210 @@ const Al = Tl.exports, st = (a) => {
|
|
|
1050
1068
|
},
|
|
1051
1069
|
emits: ["select"],
|
|
1052
1070
|
setup(a, { expose: e, emit: l }) {
|
|
1053
|
-
const t = a, { t:
|
|
1071
|
+
const t = a, { t: o, n: s } = de(), i = he(), b = Ge(), m = n(
|
|
1054
1072
|
() => ({
|
|
1055
|
-
"aria-label":
|
|
1056
|
-
"aria-busy":
|
|
1057
|
-
"aria-atomic":
|
|
1058
|
-
"aria-live":
|
|
1073
|
+
"aria-label": b["aria-label"]?.toString(),
|
|
1074
|
+
"aria-busy": b["aria-busy"]?.toString(),
|
|
1075
|
+
"aria-atomic": b["aria-atomic"]?.toString(),
|
|
1076
|
+
"aria-live": b["aria-live"]?.toString(),
|
|
1059
1077
|
"aria-multiselectable": !0
|
|
1060
1078
|
})
|
|
1061
|
-
),
|
|
1062
|
-
const
|
|
1063
|
-
return { isDisabled:
|
|
1064
|
-
},
|
|
1065
|
-
if (t.searching &&
|
|
1079
|
+
), d = x(null), r = x(null), v = x(null), c = x(null), p = n(() => t.selectedValues.map(({ value: f }) => f)), { isMultiLevelSelect: _, flattenedItemsList: O } = pt(H(t, "items")), w = n(() => t.items.some((f) => f.items && f.lazyLoad)), P = n(() => _.value ? t.items.reduce((f, g) => (g.items ? g.lazyLoad ? f.push(g) : f.push(...g.items) : f.push(g), f), []) : t.items), h = n(() => _.value && !t.staticCategories), C = n(() => h.value ? "tree" : "listbox"), S = n(() => h.value ? "treeitem" : "option"), T = (f) => {
|
|
1080
|
+
const g = t.isOptionDisabled(f), k = p.value?.includes(f.value) || !1;
|
|
1081
|
+
return { isDisabled: g, isPreSelected: k };
|
|
1082
|
+
}, E = n(() => {
|
|
1083
|
+
if (t.searching && _)
|
|
1066
1084
|
return t.items;
|
|
1067
|
-
const f =
|
|
1068
|
-
if (
|
|
1085
|
+
const f = P.value.filter((g) => {
|
|
1086
|
+
if (g.lazyLoad)
|
|
1069
1087
|
return !0;
|
|
1070
|
-
const { isDisabled:
|
|
1071
|
-
return
|
|
1088
|
+
const { isDisabled: k, isPreSelected: $ } = T(g);
|
|
1089
|
+
return k && $ || !k;
|
|
1072
1090
|
});
|
|
1073
|
-
return t.selectedValues.forEach((
|
|
1074
|
-
f.find((
|
|
1091
|
+
return t.selectedValues.forEach((g) => {
|
|
1092
|
+
f.find((k) => k.value === g.value) || f.push(g);
|
|
1075
1093
|
}), f;
|
|
1076
|
-
}),
|
|
1077
|
-
() =>
|
|
1078
|
-
),
|
|
1079
|
-
const f =
|
|
1080
|
-
return
|
|
1081
|
-
}),
|
|
1082
|
-
const
|
|
1083
|
-
const { isDisabled:
|
|
1084
|
-
return
|
|
1085
|
-
},
|
|
1086
|
-
l("select", [...t.selectedValues, ...
|
|
1087
|
-
},
|
|
1088
|
-
const
|
|
1089
|
-
const { isDisabled:
|
|
1090
|
-
return !(
|
|
1091
|
-
},
|
|
1092
|
-
l("select",
|
|
1093
|
-
},
|
|
1094
|
-
|
|
1095
|
-
},
|
|
1096
|
-
|
|
1097
|
-
}, { isAllSelected:
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
),
|
|
1103
|
-
|
|
1094
|
+
}), A = n(
|
|
1095
|
+
() => E.value?.filter((f) => p.value?.includes(f.value))
|
|
1096
|
+
), N = () => _.value && !t.searching ? O.value.length : t.items.length, Y = n(() => {
|
|
1097
|
+
const f = E.value.length, g = N(), k = A.value?.length || 0;
|
|
1098
|
+
return k === 0 ? o("selectAll", { total: s(f) }) : k === g ? o("allSelected", { total: s(g) }) : k <= g ? o("numberOfTotalSelected", { number: s(k), total: s(g) }) : o("numbersSelected", { number: s(k) });
|
|
1099
|
+
}), G = (f) => {
|
|
1100
|
+
const g = ($) => {
|
|
1101
|
+
const { isDisabled: V, isPreSelected: j } = T($);
|
|
1102
|
+
return V && j || !V;
|
|
1103
|
+
}, k = f.filter(g).filter(($) => !p.value.includes($.value));
|
|
1104
|
+
l("select", [...t.selectedValues, ...k]);
|
|
1105
|
+
}, L = (f) => {
|
|
1106
|
+
const g = (V) => {
|
|
1107
|
+
const { isDisabled: j, isPreSelected: B } = T(V);
|
|
1108
|
+
return !(j && B);
|
|
1109
|
+
}, k = f.filter(g).map(({ value: V }) => V), $ = t.selectedValues.filter((V) => !k?.includes(V.value));
|
|
1110
|
+
l("select", $);
|
|
1111
|
+
}, I = () => {
|
|
1112
|
+
G(O.value);
|
|
1113
|
+
}, R = () => {
|
|
1114
|
+
L(O.value);
|
|
1115
|
+
}, { isAllSelected: F, isIndeterminate: J, toggleSelectAll: X } = it(
|
|
1116
|
+
A,
|
|
1117
|
+
E,
|
|
1118
|
+
I,
|
|
1119
|
+
R
|
|
1120
|
+
), q = n(() => J.value ? "mixed" : `${F.value}`), y = x(F.value), Q = () => {
|
|
1121
|
+
y.value = !y.value, X(y.value);
|
|
1104
1122
|
};
|
|
1105
|
-
|
|
1106
|
-
|
|
1123
|
+
ee(F, () => {
|
|
1124
|
+
y.value = F.value;
|
|
1107
1125
|
});
|
|
1108
|
-
const
|
|
1126
|
+
const te = (f) => {
|
|
1109
1127
|
if (f.lazyLoad) {
|
|
1110
|
-
const
|
|
1111
|
-
l("select", [...
|
|
1128
|
+
const g = (f.items ?? []).map(({ value: $ }) => $), k = t.selectedValues.filter(({ value: $ }) => !g.includes($));
|
|
1129
|
+
l("select", [...k, f]);
|
|
1112
1130
|
} else
|
|
1113
|
-
|
|
1114
|
-
},
|
|
1131
|
+
G(f.items);
|
|
1132
|
+
}, D = (f) => {
|
|
1115
1133
|
f.lazyLoad ? l(
|
|
1116
1134
|
"select",
|
|
1117
|
-
t.selectedValues.filter(({ value:
|
|
1118
|
-
) :
|
|
1119
|
-
},
|
|
1120
|
-
let
|
|
1121
|
-
if (
|
|
1122
|
-
l(f,
|
|
1135
|
+
t.selectedValues.filter(({ value: g }) => g !== f.value)
|
|
1136
|
+
) : L(f.items);
|
|
1137
|
+
}, ve = (f, g) => {
|
|
1138
|
+
let k = !1, $ = t.selectedValues.filter(({ value: j }) => g.value === j ? (k = !0, !1) : !0);
|
|
1139
|
+
if (k) {
|
|
1140
|
+
l(f, $);
|
|
1123
1141
|
return;
|
|
1124
1142
|
}
|
|
1125
|
-
const
|
|
1126
|
-
(
|
|
1143
|
+
const V = t.items.find(
|
|
1144
|
+
(j) => j.items?.some((B) => B.value === g.value) && j.lazyLoad && p.value.includes(j.value)
|
|
1127
1145
|
);
|
|
1128
|
-
if (
|
|
1129
|
-
|
|
1130
|
-
const
|
|
1131
|
-
(
|
|
1146
|
+
if (V) {
|
|
1147
|
+
$ = $.filter(({ value: B }) => B !== V.value);
|
|
1148
|
+
const j = V.items.filter(
|
|
1149
|
+
(B) => B.value !== g.value
|
|
1132
1150
|
);
|
|
1133
|
-
|
|
1151
|
+
$.push(...j);
|
|
1134
1152
|
} else
|
|
1135
|
-
|
|
1136
|
-
l(f,
|
|
1137
|
-
},
|
|
1138
|
-
if (!
|
|
1153
|
+
$.push(g);
|
|
1154
|
+
l(f, $);
|
|
1155
|
+
}, we = n(() => {
|
|
1156
|
+
if (!_.value)
|
|
1139
1157
|
return t.selectedValues;
|
|
1140
|
-
const f = (
|
|
1141
|
-
(
|
|
1142
|
-
),
|
|
1143
|
-
|
|
1144
|
-
|
|
1158
|
+
const f = (B) => p.value.includes(B.value), g = (B) => B.lazyLoad && f(B) ? !0 : !t.staticCategories && B.items.length > 0 && B.items.every((Ee) => f(Ee)), k = t.items.flatMap(
|
|
1159
|
+
(B) => B.items && !g(B) ? B.items : B
|
|
1160
|
+
), $ = k.filter((B) => B.items ? !0 : f(B)), V = /* @__PURE__ */ new Set();
|
|
1161
|
+
k.forEach((B) => {
|
|
1162
|
+
V.add(B.value), B.items?.forEach((Ee) => V.add(Ee.value));
|
|
1145
1163
|
});
|
|
1146
|
-
const
|
|
1147
|
-
return [...
|
|
1148
|
-
}),
|
|
1149
|
-
if (!
|
|
1164
|
+
const j = t.selectedValues.filter((B) => !V.has(B.value));
|
|
1165
|
+
return [...$, ...j];
|
|
1166
|
+
}), Se = n(() => {
|
|
1167
|
+
if (!we.value?.length)
|
|
1150
1168
|
return !1;
|
|
1151
|
-
const f = ["automatic", "button"].includes(t.lazyLoadType),
|
|
1152
|
-
return f && t.hasMoreItems ? !!t.selectedValues?.length :
|
|
1153
|
-
}),
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
),
|
|
1158
|
-
|
|
1169
|
+
const f = ["automatic", "button"].includes(t.lazyLoadType), g = t.selectedValues?.length > 0 && A.value?.length !== E.value?.length;
|
|
1170
|
+
return f && t.hasMoreItems ? !!t.selectedValues?.length : g;
|
|
1171
|
+
}), pe = n(() => w.value ? !1 : ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), ae = x([]), { visibleDomOptions: me, updateVisibleDomOptions: xe } = We(
|
|
1172
|
+
d,
|
|
1173
|
+
H(t, "items"),
|
|
1174
|
+
S
|
|
1175
|
+
), Ne = (f) => {
|
|
1176
|
+
ae.value.includes(f) ? ae.value = ae.value.filter((g) => g !== f) : ae.value.push(f), Z(() => {
|
|
1159
1177
|
xe();
|
|
1160
1178
|
});
|
|
1161
|
-
},
|
|
1162
|
-
|
|
1179
|
+
}, oe = (f) => {
|
|
1180
|
+
me.value[f]?.focus();
|
|
1163
1181
|
}, {
|
|
1164
|
-
moveToNextElement:
|
|
1165
|
-
moveToPreviousElement:
|
|
1166
|
-
moveToFirstElement:
|
|
1167
|
-
moveToLastElement:
|
|
1168
|
-
preventDefault:
|
|
1169
|
-
focusedIndex:
|
|
1170
|
-
setListboxFocusedIndex:
|
|
1171
|
-
} =
|
|
1182
|
+
moveToNextElement: ye,
|
|
1183
|
+
moveToPreviousElement: Te,
|
|
1184
|
+
moveToFirstElement: Ce,
|
|
1185
|
+
moveToLastElement: Ie,
|
|
1186
|
+
preventDefault: Le,
|
|
1187
|
+
focusedIndex: $e,
|
|
1188
|
+
setListboxFocusedIndex: _e
|
|
1189
|
+
} = rt(
|
|
1172
1190
|
{
|
|
1173
|
-
items:
|
|
1191
|
+
items: me
|
|
1174
1192
|
},
|
|
1175
|
-
|
|
1176
|
-
),
|
|
1177
|
-
[
|
|
1178
|
-
[
|
|
1179
|
-
[
|
|
1180
|
-
[
|
|
1193
|
+
oe
|
|
1194
|
+
), Ae = {
|
|
1195
|
+
[U.ARROW_UP]: (f) => Te(f),
|
|
1196
|
+
[U.ARROW_DOWN]: (f) => ye(f),
|
|
1197
|
+
[U.HOME]: Ce,
|
|
1198
|
+
[U.END]: Ie
|
|
1181
1199
|
};
|
|
1182
1200
|
e({
|
|
1183
1201
|
/**
|
|
1184
1202
|
* Method to set the index of the item to be focused on
|
|
1185
1203
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
1186
1204
|
*/
|
|
1187
|
-
setListboxFocusedIndex:
|
|
1205
|
+
setListboxFocusedIndex: _e
|
|
1188
1206
|
});
|
|
1189
|
-
const
|
|
1190
|
-
[
|
|
1191
|
-
[
|
|
1192
|
-
},
|
|
1193
|
-
let f =
|
|
1194
|
-
const
|
|
1195
|
-
return t.items.forEach((
|
|
1196
|
-
let
|
|
1197
|
-
|
|
1198
|
-
}),
|
|
1207
|
+
const Oe = {
|
|
1208
|
+
[U.ARROW_UP]: Le,
|
|
1209
|
+
[U.ARROW_DOWN]: Le
|
|
1210
|
+
}, De = n(() => {
|
|
1211
|
+
let f = pe.value ? 1 : 0;
|
|
1212
|
+
const g = {};
|
|
1213
|
+
return t.items.forEach((k) => {
|
|
1214
|
+
let $ = ae.value.includes(k.value);
|
|
1215
|
+
k.items ? (t.staticCategories ? $ = !0 : g[k.value] = f++, $ && k.items.forEach((V) => g[V.value] = f++)) : g[k.value] = f++;
|
|
1216
|
+
}), g;
|
|
1199
1217
|
});
|
|
1200
|
-
return { __sfc: !0, props: t, emit: l, t:
|
|
1218
|
+
return { __sfc: !0, props: t, emit: l, t: o, n: s, slots: i, attrs: b, ariaAttributes: m, listboxRef: d, selectAllListboxItemsRef: r, selectedListboxItemsRef: v, listboxItemsRef: c, selectedItemsList: p, isMultiLevelSelect: _, flattenedItemsList: O, hasLazyLoadCategory: w, lazyLoadAwareFlattenedItems: P, isTreePattern: h, computedRole: C, computedOptionRole: S, optionStates: T, enabledItems: E, visibleSelectedList: A, calculateTotalItems: N, selectAllCheckboxText: Y, selectAll: G, unselectAll: L, selectAllItems: I, unselectAllItems: R, isAllSelected: F, isIndeterminate: J, toggleSelectAll: X, ariaCheckedComputed: q, isSelectAllOn: y, handleSelectAll: Q, selectAllCategory: te, unselectAllCategory: D, toggleCheckboxSelection: ve, selectedOptions: we, showSelectedItems: Se, showSelectAllCheckbox: pe, expandedCategories: ae, visibleDomOptions: me, updateVisibleDomOptions: xe, toggleCategoryVisibility: Ne, focusItem: oe, moveToNextElement: ye, moveToPreviousElement: Te, moveToFirstElement: Ce, moveToLastElement: Ie, preventDefault: Le, focusedIndex: $e, setListboxFocusedIndex: _e, listboxListeners: Ae, chipsSectionListeners: Oe, computedItemsIndex: De, DecorativeCheckbox: Ke, BentoTypography: ue, BentoChip: wt, BentoListboxOption: Me, ListboxMultiSelectOptions: Fl, vBentoKeyboardNavigationDirective: Re, BentoListboxEvent: u };
|
|
1201
1219
|
}
|
|
1202
1220
|
});
|
|
1203
|
-
var
|
|
1221
|
+
var Ul = function() {
|
|
1204
1222
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
1205
|
-
return l("div", { ref: "listboxRef", staticClass: "b-listbox-multi-select" }, [t.showSelectedItems ? l("div", [l("ul", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox-multi-select__chips" }, t.chipsSectionListeners), e._l(t.selectedOptions, function(
|
|
1206
|
-
return l("li", { key:
|
|
1207
|
-
|
|
1223
|
+
return l("div", { ref: "listboxRef", staticClass: "b-listbox-multi-select" }, [t.showSelectedItems ? l("div", [l("ul", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox-multi-select__chips" }, t.chipsSectionListeners), e._l(t.selectedOptions, function(o) {
|
|
1224
|
+
return l("li", { key: o.value }, [l(t.BentoChip, { ref: "selectedListboxItemsRef", refInFor: !0, attrs: { disabled: e.isOptionDisabled(o), label: o.label, condensed: "" }, on: { click: function(s) {
|
|
1225
|
+
o.items ? t.unselectAllCategory(o) : t.toggleCheckboxSelection("select", o);
|
|
1208
1226
|
} } })], 1);
|
|
1209
|
-
}), 0), l("hr", { staticClass: "b-listbox-multi-select__divider", attrs: { "aria-hidden": "true" } })]) : e._e(), l("div", e._g(e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], attrs: { role: t.computedRole } }, "div", t.ariaAttributes, !1), t.listboxListeners), [t.showSelectAllCheckbox ? l(t.BentoListboxOption, { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option", attrs: { tabindex: t.focusedIndex === 0 ? 0 : -1, "aria-selected": t.ariaCheckedComputed !== "false", "aria-checked": t.ariaCheckedComputed, role: t.computedOptionRole }, on: { click: t.handleSelectAll, "enter-pressed": t.handleSelectAll, "space-pressed": function(
|
|
1210
|
-
return
|
|
1211
|
-
} } }, [l(t.DecorativeCheckbox, { attrs: { checked: t.isAllSelected, indeterminate: t.isIndeterminate } }), l(t.BentoTypography, { attrs: { el: "span" } }, [e._v(" " + e._s(t.selectAllCheckboxText) + " ")])], 1) : e._e(), t.showSelectAllCheckbox ? l("hr", { staticClass: "b-listbox-multi-select__divider", attrs: { "aria-hidden": "true" } }) : e._e(), l(t.ListboxMultiSelectOptions, { ref: "listboxItemsRef", attrs: { items: e.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": t.isMultiLevelSelect, "static-categories": e.staticCategories, searching: e.searching, "selected-items-list": t.selectedItemsList, "focused-index": t.focusedIndex, "items-index": t.computedItemsIndex, role: t.computedOptionRole }, on: { "toggle-checkbox-selection": function(
|
|
1212
|
-
return t.toggleCheckboxSelection("select",
|
|
1213
|
-
}, "select-category": t.selectAllCategory, "unselect-category": t.unselectAllCategory, "toggle-category-visibility": t.toggleCategoryVisibility, "space-pressed": function(
|
|
1214
|
-
return t.toggleCheckboxSelection(t.BentoListboxEvent.SPACE,
|
|
1215
|
-
}, "tab-pressed": function(
|
|
1216
|
-
return t.toggleCheckboxSelection(t.BentoListboxEvent.TAB,
|
|
1217
|
-
}, "enter-pressed": function(
|
|
1218
|
-
return t.toggleCheckboxSelection(t.BentoListboxEvent.ENTER,
|
|
1219
|
-
} }, scopedSlots: e._u([e._l(t.slots, function(
|
|
1220
|
-
return { key:
|
|
1221
|
-
return [e._t(
|
|
1227
|
+
}), 0), l("hr", { staticClass: "b-listbox-multi-select__divider", attrs: { "aria-hidden": "true" } })]) : e._e(), l("div", e._g(e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], attrs: { role: t.computedRole } }, "div", t.ariaAttributes, !1), t.listboxListeners), [t.showSelectAllCheckbox ? l(t.BentoListboxOption, { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option", attrs: { tabindex: t.focusedIndex === 0 ? 0 : -1, "aria-selected": t.ariaCheckedComputed !== "false", "aria-checked": t.ariaCheckedComputed, role: t.computedOptionRole }, on: { click: t.handleSelectAll, "enter-pressed": t.handleSelectAll, "space-pressed": function(o) {
|
|
1228
|
+
return o.preventDefault(), t.handleSelectAll.apply(null, arguments);
|
|
1229
|
+
} } }, [l(t.DecorativeCheckbox, { attrs: { checked: t.isAllSelected, indeterminate: t.isIndeterminate } }), l(t.BentoTypography, { attrs: { el: "span" } }, [e._v(" " + e._s(t.selectAllCheckboxText) + " ")])], 1) : e._e(), t.showSelectAllCheckbox ? l("hr", { staticClass: "b-listbox-multi-select__divider", attrs: { "aria-hidden": "true" } }) : e._e(), l(t.ListboxMultiSelectOptions, { ref: "listboxItemsRef", attrs: { items: e.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": t.isMultiLevelSelect, "static-categories": e.staticCategories, searching: e.searching, "selected-items-list": t.selectedItemsList, "focused-index": t.focusedIndex, "items-index": t.computedItemsIndex, role: t.computedOptionRole }, on: { "toggle-checkbox-selection": function(o) {
|
|
1230
|
+
return t.toggleCheckboxSelection("select", o);
|
|
1231
|
+
}, "select-category": t.selectAllCategory, "unselect-category": t.unselectAllCategory, "toggle-category-visibility": t.toggleCategoryVisibility, "space-pressed": function(o) {
|
|
1232
|
+
return t.toggleCheckboxSelection(t.BentoListboxEvent.SPACE, o);
|
|
1233
|
+
}, "tab-pressed": function(o) {
|
|
1234
|
+
return t.toggleCheckboxSelection(t.BentoListboxEvent.TAB, o);
|
|
1235
|
+
}, "enter-pressed": function(o) {
|
|
1236
|
+
return t.toggleCheckboxSelection(t.BentoListboxEvent.ENTER, o);
|
|
1237
|
+
} }, scopedSlots: e._u([e._l(t.slots, function(o, s) {
|
|
1238
|
+
return { key: s, fn: function(i) {
|
|
1239
|
+
return [e._t(s, null, null, i)];
|
|
1222
1240
|
} };
|
|
1223
1241
|
})], null, !0) })], 1)]);
|
|
1224
|
-
},
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1242
|
+
}, Wl = [], Kl = /* @__PURE__ */ W(
|
|
1243
|
+
Gl,
|
|
1244
|
+
Ul,
|
|
1245
|
+
Wl,
|
|
1228
1246
|
!1,
|
|
1229
1247
|
null,
|
|
1230
1248
|
"78b94290"
|
|
1231
1249
|
);
|
|
1232
|
-
const
|
|
1250
|
+
const Ze = Kl.exports, ft = (a, e = 300) => {
|
|
1233
1251
|
let l;
|
|
1234
|
-
return (...
|
|
1235
|
-
l && clearTimeout(l), l = setTimeout(() => a(...
|
|
1252
|
+
return (...o) => {
|
|
1253
|
+
l && clearTimeout(l), l = setTimeout(() => a(...o), e);
|
|
1236
1254
|
};
|
|
1237
|
-
},
|
|
1255
|
+
}, ql = 36, Yl = z({
|
|
1238
1256
|
name: "bento-listbox",
|
|
1239
1257
|
components: {
|
|
1240
|
-
BentoEmptyState:
|
|
1241
|
-
BentoListboxSingleSelect:
|
|
1242
|
-
BentoListboxMultiSelect:
|
|
1243
|
-
BentoTypography:
|
|
1244
|
-
BentoLoadingIndicator:
|
|
1245
|
-
BentoListboxLazyLoad:
|
|
1258
|
+
BentoEmptyState: nt,
|
|
1259
|
+
BentoListboxSingleSelect: sl,
|
|
1260
|
+
BentoListboxMultiSelect: Ze,
|
|
1261
|
+
BentoTypography: ue,
|
|
1262
|
+
BentoLoadingIndicator: st,
|
|
1263
|
+
BentoListboxLazyLoad: dt
|
|
1246
1264
|
},
|
|
1247
|
-
directives: { BentoKeyboardNavigationDirective:
|
|
1265
|
+
directives: { BentoKeyboardNavigationDirective: Re },
|
|
1248
1266
|
props: {
|
|
1249
1267
|
/**
|
|
1250
1268
|
* Defines a string value that labels an interactive element.
|
|
1251
1269
|
*/
|
|
1252
1270
|
ariaLabel: { type: String, default: null },
|
|
1271
|
+
/**
|
|
1272
|
+
* Identifies the currently active option in the listbox.
|
|
1273
|
+
*/
|
|
1274
|
+
activeDescendantId: { type: String, default: null },
|
|
1253
1275
|
/**
|
|
1254
1276
|
* Empty state props that will be used with the inner empty state component to be displayed when no search results are found.
|
|
1255
1277
|
*/
|
|
@@ -1300,8 +1322,8 @@ const Ke = Nl.exports, ot = (a, e = 300) => {
|
|
|
1300
1322
|
*/
|
|
1301
1323
|
lazyLoadType: {
|
|
1302
1324
|
type: String,
|
|
1303
|
-
default:
|
|
1304
|
-
validator: (a) => Object.values(
|
|
1325
|
+
default: re.NONE,
|
|
1326
|
+
validator: (a) => Object.values(re).includes(a)
|
|
1305
1327
|
},
|
|
1306
1328
|
/**
|
|
1307
1329
|
* Indicates the listbox is loading filtered items.
|
|
@@ -1325,7 +1347,7 @@ const Ke = Nl.exports, ot = (a, e = 300) => {
|
|
|
1325
1347
|
*
|
|
1326
1348
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
1327
1349
|
*/
|
|
1328
|
-
searching:
|
|
1350
|
+
searching: Ze.props.searching,
|
|
1329
1351
|
/**
|
|
1330
1352
|
* The `input` value.
|
|
1331
1353
|
* Providing an empty string or empty array will select no options.
|
|
@@ -1345,176 +1367,176 @@ const Ke = Nl.exports, ot = (a, e = 300) => {
|
|
|
1345
1367
|
}
|
|
1346
1368
|
},
|
|
1347
1369
|
emits: [
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1370
|
+
u.SELECT,
|
|
1371
|
+
u.SPACE,
|
|
1372
|
+
u.SHOW_MORE,
|
|
1373
|
+
u.ENTER,
|
|
1374
|
+
u.ESCAPE,
|
|
1375
|
+
u.TAB
|
|
1354
1376
|
],
|
|
1355
1377
|
setup(a, { emit: e, slots: l, expose: t }) {
|
|
1356
|
-
const
|
|
1378
|
+
const o = x([]), s = H(a, "items"), i = n(() => a.lazyLoadType !== re.AUTOMATIC), b = n(() => a.lazyLoadType === re.AUTOMATIC), m = () => typeof a?.virtualScroll == "object" && a?.virtualScroll?.itemHeight ? a.virtualScroll.itemHeight : ql, d = !a?.multiple && a?.virtualScroll !== !1 && a?.lazyLoadType === "none", {
|
|
1357
1379
|
containerRef: r,
|
|
1358
|
-
containerProps:
|
|
1359
|
-
onScroll:
|
|
1360
|
-
list:
|
|
1361
|
-
wrapperProps:
|
|
1362
|
-
scrollToIndex:
|
|
1363
|
-
startIndex:
|
|
1364
|
-
} =
|
|
1365
|
-
itemHeight:
|
|
1380
|
+
containerProps: v,
|
|
1381
|
+
onScroll: c,
|
|
1382
|
+
list: p,
|
|
1383
|
+
wrapperProps: _,
|
|
1384
|
+
scrollToIndex: O,
|
|
1385
|
+
startIndex: w
|
|
1386
|
+
} = Mt(s, {
|
|
1387
|
+
itemHeight: m(),
|
|
1366
1388
|
// Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
|
|
1367
|
-
disabled: !
|
|
1368
|
-
}),
|
|
1389
|
+
disabled: !d
|
|
1390
|
+
}), P = n(() => d ? s.value.length : 0), h = n(
|
|
1369
1391
|
() => a.componentLoading !== void 0 || i.value ? "true" : void 0
|
|
1370
|
-
),
|
|
1392
|
+
), C = n(
|
|
1371
1393
|
() => i.value && a.loading || a.componentLoading ? "true" : "false"
|
|
1372
|
-
),
|
|
1394
|
+
), S = n(
|
|
1373
1395
|
() => i.value || a.componentLoading !== void 0 ? "polite" : void 0
|
|
1374
|
-
),
|
|
1396
|
+
), T = n(
|
|
1375
1397
|
() => ({
|
|
1376
1398
|
"aria-label": a.ariaLabel,
|
|
1377
|
-
"aria-busy":
|
|
1378
|
-
"aria-atomic":
|
|
1379
|
-
"aria-live":
|
|
1399
|
+
"aria-busy": C.value,
|
|
1400
|
+
"aria-atomic": h.value,
|
|
1401
|
+
"aria-live": S.value
|
|
1380
1402
|
})
|
|
1381
|
-
),
|
|
1403
|
+
), E = n(
|
|
1382
1404
|
() => a.componentLoading ? {
|
|
1383
|
-
...
|
|
1405
|
+
...T.value,
|
|
1384
1406
|
role: "alert"
|
|
1385
1407
|
} : {}
|
|
1386
|
-
),
|
|
1387
|
-
e(
|
|
1388
|
-
},
|
|
1389
|
-
e(
|
|
1390
|
-
},
|
|
1391
|
-
const
|
|
1392
|
-
if (!
|
|
1408
|
+
), A = (X) => (q) => {
|
|
1409
|
+
e(X, q);
|
|
1410
|
+
}, N = () => {
|
|
1411
|
+
e(u.SHOW_MORE);
|
|
1412
|
+
}, Y = ft(() => {
|
|
1413
|
+
const X = r.value;
|
|
1414
|
+
if (!X)
|
|
1393
1415
|
return;
|
|
1394
|
-
const
|
|
1395
|
-
a.hasMoreItems &&
|
|
1396
|
-
}),
|
|
1397
|
-
|
|
1398
|
-
},
|
|
1399
|
-
() => a.lazyLoadType ===
|
|
1400
|
-
),
|
|
1401
|
-
() => a.loading ?
|
|
1402
|
-
),
|
|
1416
|
+
const q = Math.round(X.scrollTop) + X.clientHeight >= X.scrollHeight;
|
|
1417
|
+
a.hasMoreItems && q && !a.loading && N();
|
|
1418
|
+
}), G = () => {
|
|
1419
|
+
b.value ? Y() : c();
|
|
1420
|
+
}, L = n(() => a.items?.length === 0), I = n(
|
|
1421
|
+
() => a.lazyLoadType === re.BUTTON && a.hasMoreItems
|
|
1422
|
+
), R = n(
|
|
1423
|
+
() => a.loading ? Be.LOADING : Be.START
|
|
1424
|
+
), F = n(() => ({
|
|
1403
1425
|
...a.emptyState,
|
|
1404
1426
|
variant: "condensed"
|
|
1405
|
-
})),
|
|
1406
|
-
[
|
|
1407
|
-
[
|
|
1408
|
-
[
|
|
1409
|
-
[
|
|
1427
|
+
})), J = {
|
|
1428
|
+
[u.SELECT]: A(u.SELECT),
|
|
1429
|
+
[u.SPACE]: A(u.SPACE),
|
|
1430
|
+
[u.TAB]: A(u.TAB),
|
|
1431
|
+
[u.ENTER]: A(u.ENTER)
|
|
1410
1432
|
};
|
|
1411
|
-
return t({ listboxRef: r, listboxItemRef:
|
|
1433
|
+
return t({ listboxRef: r, listboxItemRef: o }), {
|
|
1412
1434
|
// Refs
|
|
1413
1435
|
listboxRef: r,
|
|
1414
|
-
listboxItemRef:
|
|
1436
|
+
listboxItemRef: o,
|
|
1415
1437
|
// a11y
|
|
1416
|
-
ariaAttributes:
|
|
1417
|
-
listboxContainerAttributes:
|
|
1438
|
+
ariaAttributes: T,
|
|
1439
|
+
listboxContainerAttributes: E,
|
|
1418
1440
|
// Values
|
|
1419
|
-
containerProps:
|
|
1420
|
-
isSearchResultEmpty:
|
|
1421
|
-
limitedEmptyStateProps:
|
|
1422
|
-
loadingButtonState:
|
|
1441
|
+
containerProps: v,
|
|
1442
|
+
isSearchResultEmpty: L,
|
|
1443
|
+
limitedEmptyStateProps: F,
|
|
1444
|
+
loadingButtonState: R,
|
|
1423
1445
|
slots: l,
|
|
1424
|
-
shouldDisplayShowMoreButton:
|
|
1425
|
-
virtualisedItems:
|
|
1426
|
-
wrapperProps:
|
|
1446
|
+
shouldDisplayShowMoreButton: I,
|
|
1447
|
+
virtualisedItems: p,
|
|
1448
|
+
wrapperProps: _,
|
|
1427
1449
|
// Virtual scroll
|
|
1428
|
-
totalItemCount:
|
|
1429
|
-
scrollToIndex:
|
|
1430
|
-
virtualScrollStartIndex:
|
|
1450
|
+
totalItemCount: P,
|
|
1451
|
+
scrollToIndex: O,
|
|
1452
|
+
virtualScrollStartIndex: w,
|
|
1431
1453
|
// Enums
|
|
1432
|
-
BentoKeyboardNavigationKeyDownEvent:
|
|
1433
|
-
BentoListboxEvent:
|
|
1454
|
+
BentoKeyboardNavigationKeyDownEvent: U,
|
|
1455
|
+
BentoListboxEvent: u,
|
|
1434
1456
|
// Methods
|
|
1435
|
-
onListboxContainerScroll:
|
|
1436
|
-
onOptionSelected:
|
|
1437
|
-
emitShowMore:
|
|
1438
|
-
listboxListeners:
|
|
1457
|
+
onListboxContainerScroll: G,
|
|
1458
|
+
onOptionSelected: A,
|
|
1459
|
+
emitShowMore: N,
|
|
1460
|
+
listboxListeners: J
|
|
1439
1461
|
};
|
|
1440
1462
|
}
|
|
1441
1463
|
});
|
|
1442
|
-
var
|
|
1464
|
+
var jl = function() {
|
|
1443
1465
|
var e = this, l = e._self._c;
|
|
1444
|
-
return e._self._setupProxy, l("div", e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", staticClass: "b-listbox", style: e.containerProps?.style, attrs: { id: e.id, tabindex: "-1", "data-testid": "listbox-container" }, on: { scroll: e.onListboxContainerScroll } }, "div", e.listboxContainerAttributes, !1), [l("div", e._b({}, "div", e.wrapperProps, !1), [e.componentLoading ? l("div", { staticClass: "b-listbox__loading-filtered-items" }, [l("bento-loading-indicator")], 1) : e.isSearchResultEmpty ? l("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? l("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [l("bento-listbox-multi-select", e._g(e._b({ ref: "listboxItemRef", attrs: { "has-more-items": e.hasMoreItems, items: e.items, "lazy-load-type": e.lazyLoadType, "static-categories": e.staticCategories, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(t,
|
|
1445
|
-
return { key:
|
|
1446
|
-
return [e._t(
|
|
1466
|
+
return e._self._setupProxy, l("div", e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", staticClass: "b-listbox", style: e.containerProps?.style, attrs: { id: e.id, tabindex: "-1", "data-testid": "listbox-container" }, on: { scroll: e.onListboxContainerScroll } }, "div", e.listboxContainerAttributes, !1), [l("div", e._b({}, "div", e.wrapperProps, !1), [e.componentLoading ? l("div", { staticClass: "b-listbox__loading-filtered-items" }, [l("bento-loading-indicator")], 1) : e.isSearchResultEmpty ? l("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? l("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [l("bento-listbox-multi-select", e._g(e._b({ ref: "listboxItemRef", attrs: { "has-more-items": e.hasMoreItems, items: e.items, "lazy-load-type": e.lazyLoadType, "static-categories": e.staticCategories, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(t, o) {
|
|
1467
|
+
return { key: o, fn: function(s) {
|
|
1468
|
+
return [e._t(o, null, null, s)];
|
|
1447
1469
|
} };
|
|
1448
|
-
})], null, !0) }, "bento-listbox-multi-select", e.ariaAttributes, !1), e.listboxListeners))] : [l("bento-listbox-single-select", e._g(e._b({ ref: "listboxItemRef", attrs: { items: e.virtualisedItems, "total-item-count": e.totalItemCount, "scroll-to-index": e.scrollToIndex, "virtual-scroll-start-index": e.virtualScrollStartIndex, "selected-value": e.selectedValue, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(t,
|
|
1449
|
-
return { key:
|
|
1450
|
-
return [e._t(
|
|
1470
|
+
})], null, !0) }, "bento-listbox-multi-select", e.ariaAttributes, !1), e.listboxListeners))] : [l("bento-listbox-single-select", e._g(e._b({ ref: "listboxItemRef", attrs: { "active-descendant-id": e.activeDescendantId, items: e.virtualisedItems, "option-id-base": e.id, "total-item-count": e.totalItemCount, "scroll-to-index": e.scrollToIndex, "virtual-scroll-start-index": e.virtualScrollStartIndex, "selected-value": e.selectedValue, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(t, o) {
|
|
1471
|
+
return { key: o, fn: function(s) {
|
|
1472
|
+
return [e._t(o, null, null, s)];
|
|
1451
1473
|
} };
|
|
1452
1474
|
})], null, !0) }, "bento-listbox-single-select", e.ariaAttributes, !1), e.listboxListeners))], e.lazyLoadType !== "none" ? l("bento-listbox-lazy-load", { attrs: { "has-more-items": e.hasMoreItems, loading: e.loading, type: e.lazyLoadType }, on: { "show-more": e.emitShowMore } }) : e._e()]], 2)]);
|
|
1453
|
-
},
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1475
|
+
}, Hl = [], Jl = /* @__PURE__ */ W(
|
|
1476
|
+
Yl,
|
|
1477
|
+
jl,
|
|
1478
|
+
Hl,
|
|
1457
1479
|
!1,
|
|
1458
1480
|
null,
|
|
1459
|
-
"
|
|
1481
|
+
"74907ba1"
|
|
1460
1482
|
);
|
|
1461
|
-
const
|
|
1483
|
+
const Ve = Jl.exports, ze = (a, e) => {
|
|
1462
1484
|
for (const l of a) {
|
|
1463
1485
|
if (l.value === e)
|
|
1464
1486
|
return l;
|
|
1465
1487
|
if (l.items) {
|
|
1466
|
-
const t =
|
|
1488
|
+
const t = ze(l.items, e);
|
|
1467
1489
|
if (t)
|
|
1468
1490
|
return t;
|
|
1469
1491
|
}
|
|
1470
1492
|
}
|
|
1471
1493
|
return null;
|
|
1472
|
-
},
|
|
1473
|
-
const
|
|
1474
|
-
l.value ?
|
|
1475
|
-
},
|
|
1476
|
-
l.value ?
|
|
1477
|
-
},
|
|
1478
|
-
|
|
1479
|
-
},
|
|
1480
|
-
|
|
1494
|
+
}, Xl = (a) => typeof a == "object" && a !== null && "value" in a && "label" in a, Zl = (a, e, l, t) => {
|
|
1495
|
+
const o = x([]), s = x(), i = (r) => {
|
|
1496
|
+
l.value ? s.value = r.map(({ value: v }) => v) : s.value = r.length > 0 ? r[0].value : null;
|
|
1497
|
+
}, b = (r) => {
|
|
1498
|
+
l.value ? s.value = r.map(({ value: v, label: c }) => ({ value: v, label: c })) : s.value = r.length > 0 ? { value: r[0].value, label: r[0].label } : null;
|
|
1499
|
+
}, m = (r) => {
|
|
1500
|
+
o.value = r, t?.value ? b(r) : i(r);
|
|
1501
|
+
}, d = () => {
|
|
1502
|
+
o.value = [], s.value = null;
|
|
1481
1503
|
};
|
|
1482
|
-
return
|
|
1504
|
+
return ee(
|
|
1483
1505
|
() => e.value,
|
|
1484
1506
|
() => {
|
|
1485
1507
|
if (!e.value && e.value !== 0) {
|
|
1486
|
-
|
|
1508
|
+
d();
|
|
1487
1509
|
return;
|
|
1488
1510
|
}
|
|
1489
|
-
const r = !Array.isArray(e.value),
|
|
1490
|
-
|
|
1491
|
-
const
|
|
1492
|
-
if (
|
|
1493
|
-
|
|
1511
|
+
const r = !Array.isArray(e.value), v = [...o.value];
|
|
1512
|
+
d();
|
|
1513
|
+
const c = (p) => {
|
|
1514
|
+
if (Xl(p))
|
|
1515
|
+
o.value.push(p);
|
|
1494
1516
|
else {
|
|
1495
|
-
let
|
|
1496
|
-
|
|
1517
|
+
let _ = ze(a.value, p);
|
|
1518
|
+
_ || (_ = ze(v, p)), _ || (_ = { value: p, label: p.toString() }), o.value.push(_);
|
|
1497
1519
|
}
|
|
1498
1520
|
};
|
|
1499
1521
|
if (r) {
|
|
1500
|
-
const
|
|
1501
|
-
|
|
1522
|
+
const p = e.value;
|
|
1523
|
+
c(p), t?.value ? b(o.value) : i(o.value);
|
|
1502
1524
|
return;
|
|
1503
1525
|
}
|
|
1504
|
-
e.value.forEach(
|
|
1526
|
+
e.value.forEach(c), t?.value ? b(o.value) : i(o.value);
|
|
1505
1527
|
},
|
|
1506
1528
|
{ immediate: !0 }
|
|
1507
1529
|
), {
|
|
1508
1530
|
// Values
|
|
1509
|
-
cachedSelectedListboxOptions:
|
|
1510
|
-
cachedListboxSelectedValues:
|
|
1531
|
+
cachedSelectedListboxOptions: o,
|
|
1532
|
+
cachedListboxSelectedValues: s,
|
|
1511
1533
|
// Methods
|
|
1512
|
-
resetCache:
|
|
1513
|
-
setCachedValues:
|
|
1534
|
+
resetCache: d,
|
|
1535
|
+
setCachedValues: m
|
|
1514
1536
|
};
|
|
1515
1537
|
};
|
|
1516
|
-
var
|
|
1517
|
-
const
|
|
1538
|
+
var ge = /* @__PURE__ */ ((a) => (a.DEFAULT = "DropdownInputDefault", a.SMALL = "DropdownInputSmall", a))(ge || {});
|
|
1539
|
+
const Ql = {
|
|
1518
1540
|
"de-DE": { apply: "Anwenden", cancel: "Abbrechen", noOptionsMatchThisSearch: "Für diese Suche wurden keine Ergebnisse gefunden." },
|
|
1519
1541
|
"en-GB": { apply: "Apply", cancel: "Cancel", noOptionsMatchThisSearch: "No options match this search" },
|
|
1520
1542
|
"en-US": { apply: "Apply", cancel: "Cancel", noOptionsMatchThisSearch: "No options match this search" },
|
|
@@ -1526,67 +1548,71 @@ const Wl = {
|
|
|
1526
1548
|
"ja-JP": { apply: "適用", cancel: "キャンセル", noOptionsMatchThisSearch: "この検索に一致するオプションはありません" },
|
|
1527
1549
|
"pt-BR": { apply: "Aplicar", cancel: "Cancelar", noOptionsMatchThisSearch: "Nenhuma opção corresponde a esta busca" },
|
|
1528
1550
|
"zh-CN": { apply: "应用", cancel: "取消", noOptionsMatchThisSearch: "没有符合此搜索条件的选项" }
|
|
1529
|
-
},
|
|
1530
|
-
const
|
|
1531
|
-
|
|
1532
|
-
|
|
1551
|
+
}, ea = (a, e, l, t) => {
|
|
1552
|
+
const o = x(a.value), { t: s } = de();
|
|
1553
|
+
ee(a, () => {
|
|
1554
|
+
o.value = a.value;
|
|
1533
1555
|
});
|
|
1534
1556
|
const i = n(
|
|
1535
|
-
() => JSON.stringify(
|
|
1536
|
-
),
|
|
1537
|
-
t(
|
|
1538
|
-
},
|
|
1539
|
-
|
|
1540
|
-
},
|
|
1541
|
-
l.value && e.value && (
|
|
1557
|
+
() => JSON.stringify(o.value) === JSON.stringify(a.value)
|
|
1558
|
+
), b = () => {
|
|
1559
|
+
t(u.SELECT, o.value), t(u.CLOSE_DROPDOWN);
|
|
1560
|
+
}, m = () => {
|
|
1561
|
+
o.value = a.value, t(u.CLOSE_DROPDOWN);
|
|
1562
|
+
}, d = () => {
|
|
1563
|
+
l.value && e.value && (o.value = a.value);
|
|
1542
1564
|
}, r = n(() => [
|
|
1543
1565
|
{
|
|
1544
|
-
title:
|
|
1545
|
-
event:
|
|
1566
|
+
title: s("apply"),
|
|
1567
|
+
event: b,
|
|
1546
1568
|
disabled: i.value
|
|
1547
1569
|
},
|
|
1548
1570
|
{
|
|
1549
|
-
title:
|
|
1550
|
-
event:
|
|
1571
|
+
title: s("cancel"),
|
|
1572
|
+
event: m
|
|
1551
1573
|
}
|
|
1552
|
-
]),
|
|
1553
|
-
|
|
1554
|
-
},
|
|
1555
|
-
|
|
1556
|
-
},
|
|
1557
|
-
|
|
1558
|
-
},
|
|
1559
|
-
|
|
1560
|
-
},
|
|
1561
|
-
|
|
1562
|
-
},
|
|
1563
|
-
t(
|
|
1564
|
-
},
|
|
1565
|
-
[
|
|
1566
|
-
[
|
|
1567
|
-
[
|
|
1568
|
-
[
|
|
1569
|
-
[
|
|
1574
|
+
]), v = (h) => {
|
|
1575
|
+
o.value = h, e.value || t(u.SELECT, h);
|
|
1576
|
+
}, c = (h) => {
|
|
1577
|
+
v(h), t(u.TAB);
|
|
1578
|
+
}, p = (h) => {
|
|
1579
|
+
v(h), t(u.ENTER);
|
|
1580
|
+
}, _ = (h) => {
|
|
1581
|
+
v(h), t(u.SPACE);
|
|
1582
|
+
}, O = () => {
|
|
1583
|
+
m(), t(u.ESCAPE);
|
|
1584
|
+
}, w = () => {
|
|
1585
|
+
t(u.SHOW_MORE);
|
|
1586
|
+
}, P = {
|
|
1587
|
+
[u.SELECT]: v,
|
|
1588
|
+
[u.SHOW_MORE]: w,
|
|
1589
|
+
[u.TAB]: c,
|
|
1590
|
+
[u.SPACE]: _,
|
|
1591
|
+
[u.ENTER]: p
|
|
1570
1592
|
};
|
|
1571
1593
|
return {
|
|
1572
1594
|
// Values
|
|
1573
1595
|
actions: r,
|
|
1574
|
-
internalSelectedValue:
|
|
1596
|
+
internalSelectedValue: o,
|
|
1575
1597
|
// Methods
|
|
1576
|
-
listeners:
|
|
1577
|
-
onEscapeKey:
|
|
1578
|
-
onOutsideDropdownClick:
|
|
1598
|
+
listeners: P,
|
|
1599
|
+
onEscapeKey: O,
|
|
1600
|
+
onOutsideDropdownClick: d
|
|
1579
1601
|
};
|
|
1580
|
-
},
|
|
1581
|
-
i18n: { messages:
|
|
1602
|
+
}, ta = z({
|
|
1603
|
+
i18n: { messages: Ql },
|
|
1582
1604
|
name: "bento-dropdown-options-container"
|
|
1583
|
-
}),
|
|
1584
|
-
...
|
|
1605
|
+
}), la = /* @__PURE__ */ z({
|
|
1606
|
+
...ta,
|
|
1585
1607
|
props: {
|
|
1586
1608
|
/**
|
|
1587
1609
|
* Defines a string value that labels an interactive element.
|
|
1588
1610
|
*/
|
|
1589
1611
|
ariaLabel: { type: String, default: null },
|
|
1612
|
+
/**
|
|
1613
|
+
* Identifies the currently active option in the listbox.
|
|
1614
|
+
*/
|
|
1615
|
+
activeDescendantId: { type: String, default: null },
|
|
1590
1616
|
/**
|
|
1591
1617
|
* Indicates that dropdown items are loading
|
|
1592
1618
|
*/
|
|
@@ -1640,8 +1666,8 @@ const Wl = {
|
|
|
1640
1666
|
*/
|
|
1641
1667
|
lazyLoadType: {
|
|
1642
1668
|
type: String,
|
|
1643
|
-
default:
|
|
1644
|
-
validator: (a) => Object.values(
|
|
1669
|
+
default: re.AUTOMATIC,
|
|
1670
|
+
validator: (a) => Object.values(re).includes(a)
|
|
1645
1671
|
},
|
|
1646
1672
|
/**
|
|
1647
1673
|
* Indicates if new options are lazy loading.
|
|
@@ -1671,7 +1697,7 @@ const Wl = {
|
|
|
1671
1697
|
*
|
|
1672
1698
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
1673
1699
|
*/
|
|
1674
|
-
searching:
|
|
1700
|
+
searching: Ve.props.searching,
|
|
1675
1701
|
/**
|
|
1676
1702
|
* If enabled, dropdown will display non-selectable, static categories
|
|
1677
1703
|
*/
|
|
@@ -1680,7 +1706,7 @@ const Wl = {
|
|
|
1680
1706
|
* Reference to the DOM element or Vue component for positioning
|
|
1681
1707
|
* the Dropdown container.
|
|
1682
1708
|
*/
|
|
1683
|
-
targetElement: { type:
|
|
1709
|
+
targetElement: { type: He.props.targetElement.type, required: !0 },
|
|
1684
1710
|
/**
|
|
1685
1711
|
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
1686
1712
|
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
@@ -1692,27 +1718,27 @@ const Wl = {
|
|
|
1692
1718
|
},
|
|
1693
1719
|
emits: [],
|
|
1694
1720
|
setup(a, { expose: e, emit: l }) {
|
|
1695
|
-
const t = a,
|
|
1721
|
+
const t = a, o = he(), { selectedValue: s, multiple: i } = tt(t), b = x(null), { t: m } = de(), d = n(() => t.open && !t.disabled), r = n(() => m("noOptionsMatchThisSearch")), v = n(() => ({
|
|
1696
1722
|
"b-dropdown-options-container--single": !t?.multiple
|
|
1697
|
-
})),
|
|
1723
|
+
})), c = n(() => ({
|
|
1698
1724
|
"b-dropdown-options-container__listbox--single": !t?.multiple
|
|
1699
|
-
})), { actions:
|
|
1700
|
-
const
|
|
1725
|
+
})), { actions: p, internalSelectedValue: _, listeners: O, onEscapeKey: w, onOutsideDropdownClick: P } = ea(s, i, d, l), h = n(() => t?.multiple ? At : He), C = n(() => {
|
|
1726
|
+
const S = {
|
|
1701
1727
|
"min-width": `${t?.targetElement?.clientWidth}px`,
|
|
1702
1728
|
"max-width": "min(500px, 95%)"
|
|
1703
1729
|
};
|
|
1704
1730
|
return t?.multiple ? {
|
|
1705
1731
|
actionsLayout: "space-between",
|
|
1706
1732
|
ariaLabel: t.ariaLabel,
|
|
1707
|
-
actions:
|
|
1733
|
+
actions: p.value,
|
|
1708
1734
|
divider: !0,
|
|
1709
1735
|
fallbackPosition: ["top-start"],
|
|
1710
|
-
id:
|
|
1736
|
+
id: ce(`dropdown-options-${t.id}`),
|
|
1711
1737
|
open: t.open,
|
|
1712
1738
|
position: "bottom-start",
|
|
1713
1739
|
style: {
|
|
1714
1740
|
width: "auto",
|
|
1715
|
-
...
|
|
1741
|
+
...S
|
|
1716
1742
|
},
|
|
1717
1743
|
targetElement: t.targetElement
|
|
1718
1744
|
} : {
|
|
@@ -1720,40 +1746,40 @@ const Wl = {
|
|
|
1720
1746
|
offset: [0, 8],
|
|
1721
1747
|
position: "bottom-start",
|
|
1722
1748
|
style: {
|
|
1723
|
-
display:
|
|
1724
|
-
...
|
|
1749
|
+
display: d.value ? "block" : "none",
|
|
1750
|
+
...S
|
|
1725
1751
|
},
|
|
1726
1752
|
targetElement: t.targetElement
|
|
1727
1753
|
};
|
|
1728
1754
|
});
|
|
1729
1755
|
return e({
|
|
1730
|
-
onOutsideDropdownClick:
|
|
1731
|
-
dropdownOptionsListboxRef:
|
|
1732
|
-
}), { __sfc: !0, slots:
|
|
1756
|
+
onOutsideDropdownClick: P,
|
|
1757
|
+
dropdownOptionsListboxRef: b
|
|
1758
|
+
}), { __sfc: !0, slots: o, emit: l, props: t, selectedValue: s, multiple: i, dropdownOptionsListboxRef: b, t: m, isDropdownOpen: d, noResultsMessage: r, conditionalClasses: v, conditionalListboxClasses: c, actions: p, internalSelectedValue: _, listeners: O, onEscapeKey: w, onOutsideDropdownClick: P, popperContainerOrPopoverComponent: h, popperContainerOrPopoverProps: C, BentoListbox: Ve };
|
|
1733
1759
|
}
|
|
1734
1760
|
});
|
|
1735
|
-
var
|
|
1761
|
+
var aa = function() {
|
|
1736
1762
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
1737
|
-
return t.isDropdownOpen ? l(t.popperContainerOrPopoverComponent, e._b({ tag: "component", staticClass: "b-dropdown-options-container", class: t.conditionalClasses }, "component", t.popperContainerOrPopoverProps, !1), [l("div", { on: { keydown: [function(
|
|
1738
|
-
|
|
1739
|
-
}, function(
|
|
1740
|
-
return !
|
|
1741
|
-
}] } }, [l(t.BentoListbox, e._g({ ref: "dropdownOptionsListboxRef", staticClass: "b-dropdown-options-container__listbox", class: t.conditionalListboxClasses, attrs: { id: e.id, "aria-label": e.ariaLabel, "component-loading": e.componentLoading, "empty-state": e.emptyState, "is-option-disabled": e.isOptionDisabled, items: e.items, "selected-value": t.internalSelectedValue, multiple: t.multiple, "static-categories": e.staticCategories, "no-results-message": t.noResultsMessage, searching: e.searching, loading: e.loading, "lazy-load-type": e.lazyLoadType, "has-more-items": e.hasMoreItems, "virtual-scroll": e.virtualScroll }, scopedSlots: e._u([e._l(t.slots, function(
|
|
1742
|
-
return { key:
|
|
1743
|
-
return [e._t(
|
|
1763
|
+
return t.isDropdownOpen ? l(t.popperContainerOrPopoverComponent, e._b({ tag: "component", staticClass: "b-dropdown-options-container", class: t.conditionalClasses }, "component", t.popperContainerOrPopoverProps, !1), [l("div", { on: { keydown: [function(o) {
|
|
1764
|
+
o.stopPropagation();
|
|
1765
|
+
}, function(o) {
|
|
1766
|
+
return !o.type.indexOf("key") && e._k(o.keyCode, "esc", 27, o.key, ["Esc", "Escape"]) ? null : t.onEscapeKey.apply(null, arguments);
|
|
1767
|
+
}] } }, [l(t.BentoListbox, e._g({ ref: "dropdownOptionsListboxRef", staticClass: "b-dropdown-options-container__listbox", class: t.conditionalListboxClasses, attrs: { id: e.id, "active-descendant-id": e.activeDescendantId, "aria-label": e.ariaLabel, "component-loading": e.componentLoading, "empty-state": e.emptyState, "is-option-disabled": e.isOptionDisabled, items: e.items, "selected-value": t.internalSelectedValue, multiple: t.multiple, "static-categories": e.staticCategories, "no-results-message": t.noResultsMessage, searching: e.searching, loading: e.loading, "lazy-load-type": e.lazyLoadType, "has-more-items": e.hasMoreItems, "virtual-scroll": e.virtualScroll }, scopedSlots: e._u([e._l(t.slots, function(o, s) {
|
|
1768
|
+
return { key: s, fn: function(i) {
|
|
1769
|
+
return [e._t(s, null, null, i)];
|
|
1744
1770
|
} };
|
|
1745
1771
|
})], null, !0) }, t.listeners))], 1)]) : e._e();
|
|
1746
|
-
},
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1772
|
+
}, oa = [], sa = /* @__PURE__ */ W(
|
|
1773
|
+
la,
|
|
1774
|
+
aa,
|
|
1775
|
+
oa,
|
|
1750
1776
|
!1,
|
|
1751
1777
|
null,
|
|
1752
|
-
"
|
|
1778
|
+
"045f1f85"
|
|
1753
1779
|
);
|
|
1754
|
-
const
|
|
1755
|
-
var
|
|
1756
|
-
const
|
|
1780
|
+
const na = sa.exports;
|
|
1781
|
+
var le = /* @__PURE__ */ ((a) => (a.DISABLED = "disabled", a.READONLY = "readonly", a.HAS_ITEMS = "has-items", a.OPENED = "opened", a.ERROR = "error", a))(le || {}), K = /* @__PURE__ */ ((a) => (a.OPEN = "dropdown-base-open", a.KEYDOWN = "dropdown-base-keydown", a.CLOSE = "dropdown-base-close", a.INPUT = "dropdown-base-input", a.CLEAR = "dropdown-base-clear", a))(K || {});
|
|
1782
|
+
const ia = /* @__PURE__ */ Symbol("dropdown small size injection key"), bt = /* @__PURE__ */ Symbol("dropdown underline style injection key"), ra = {
|
|
1757
1783
|
"de-DE": { clearSearch: "Suche löschen" },
|
|
1758
1784
|
"en-GB": { clearSearch: "Clear search" },
|
|
1759
1785
|
"en-US": { clearSearch: "Clear search" },
|
|
@@ -1765,12 +1791,12 @@ const Zl = /* @__PURE__ */ Symbol("dropdown small size injection key"), nt = /*
|
|
|
1765
1791
|
"ja-JP": { clearSearch: "検索をクリア" },
|
|
1766
1792
|
"pt-BR": { clearSearch: "Limpar busca" },
|
|
1767
1793
|
"zh-CN": { clearSearch: "清除搜索" }
|
|
1768
|
-
},
|
|
1769
|
-
i18n: { messages:
|
|
1794
|
+
}, ca = z({
|
|
1795
|
+
i18n: { messages: ra },
|
|
1770
1796
|
name: "dropdown-base-textbox",
|
|
1771
1797
|
inheritAttrs: !1
|
|
1772
|
-
}),
|
|
1773
|
-
...
|
|
1798
|
+
}), ua = /* @__PURE__ */ z({
|
|
1799
|
+
...ca,
|
|
1774
1800
|
props: {
|
|
1775
1801
|
/**
|
|
1776
1802
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -1798,6 +1824,10 @@ const Zl = /* @__PURE__ */ Symbol("dropdown small size injection key"), nt = /*
|
|
|
1798
1824
|
* If no label element is used then the aria-label is be set should be set.
|
|
1799
1825
|
*/
|
|
1800
1826
|
ariaLabel: { type: String, default: null },
|
|
1827
|
+
/**
|
|
1828
|
+
* Identifies the currently active option in the listbox.
|
|
1829
|
+
*/
|
|
1830
|
+
ariaActiveDescendant: { type: String, default: null },
|
|
1801
1831
|
/**
|
|
1802
1832
|
* Corresponds to the label's id that labels the textbox element.
|
|
1803
1833
|
*/
|
|
@@ -1814,6 +1844,10 @@ const Zl = /* @__PURE__ */ Symbol("dropdown small size injection key"), nt = /*
|
|
|
1814
1844
|
* Sets the possibility to type into the textbox.
|
|
1815
1845
|
*/
|
|
1816
1846
|
dynamicFiltering: { type: Boolean, default: !1 },
|
|
1847
|
+
/**
|
|
1848
|
+
* Indicates whether the dropdown currently has a selected value.
|
|
1849
|
+
*/
|
|
1850
|
+
hasSelectedValue: { type: Boolean, default: !1 },
|
|
1817
1851
|
/**
|
|
1818
1852
|
* Marks the textbox as invalid, rendering an error state
|
|
1819
1853
|
*/
|
|
@@ -1856,90 +1890,118 @@ const Zl = /* @__PURE__ */ Symbol("dropdown small size injection key"), nt = /*
|
|
|
1856
1890
|
},
|
|
1857
1891
|
emits: [],
|
|
1858
1892
|
setup(a, { expose: e, emit: l }) {
|
|
1859
|
-
const t = a, { t:
|
|
1860
|
-
[`b-dropdown-base-textbox--${
|
|
1861
|
-
[`b-dropdown-base-textbox--${
|
|
1862
|
-
[`b-dropdown-base-textbox--${
|
|
1863
|
-
"b-dropdown-base-textbox--underline":
|
|
1864
|
-
})),
|
|
1865
|
-
() =>
|
|
1866
|
-
),
|
|
1893
|
+
const t = a, { t: o } = de(), s = Ge(), i = he(), b = lt(i), m = x(null), d = ce("textbox"), r = x(!1), v = x(t.value), c = Ue(bt, !1), p = n(() => ({
|
|
1894
|
+
[`b-dropdown-base-textbox--${le.DISABLED}`]: t.disabled,
|
|
1895
|
+
[`b-dropdown-base-textbox--${le.READONLY}`]: t.readonly,
|
|
1896
|
+
[`b-dropdown-base-textbox--${le.HAS_ITEMS}`]: !!t.additionalItemsSelected,
|
|
1897
|
+
"b-dropdown-base-textbox--underline": c
|
|
1898
|
+
})), _ = n(
|
|
1899
|
+
() => E.value && s["aria-required"] ? "true" : null
|
|
1900
|
+
), O = n(() => ({
|
|
1867
1901
|
"b-dropdown-base-textbox__input--dynamic-filtering": t.dynamicFiltering
|
|
1868
|
-
})),
|
|
1902
|
+
})), w = n(() => t.dynamicFiltering && !!t.value && t.open), P = (D) => E.value && !t.multiple && !!t.value && D, h = n(
|
|
1869
1903
|
() => ({
|
|
1870
1904
|
"aria-haspopup": "listbox",
|
|
1871
1905
|
"aria-controls": t.ariaControls,
|
|
1872
|
-
"aria-describedby":
|
|
1906
|
+
"aria-describedby": s["aria-describedby"]?.toString(),
|
|
1873
1907
|
"aria-expanded": t.ariaExpanded ? "true" : "false",
|
|
1908
|
+
"aria-activedescendant": t.ariaActiveDescendant,
|
|
1874
1909
|
"aria-labelledby": t.ariaLabelledby,
|
|
1875
1910
|
"aria-label": t.ariaLabelledby ? null : t.ariaLabel,
|
|
1876
1911
|
"aria-invalid": t.isInvalid,
|
|
1877
1912
|
"aria-disabled": t.disabled ? !0 : null,
|
|
1878
|
-
"aria-required":
|
|
1913
|
+
"aria-required": s["aria-required"]
|
|
1879
1914
|
})
|
|
1880
|
-
),
|
|
1915
|
+
), C = n(
|
|
1881
1916
|
() => t.multiple ? t.selectedValueItem : []
|
|
1882
|
-
),
|
|
1883
|
-
() => t.
|
|
1917
|
+
), S = n(
|
|
1918
|
+
() => t.dynamicFiltering && !t.multiple && !t.alwaysComboboxIsInput
|
|
1919
|
+
), T = n(
|
|
1920
|
+
() => t.open || t.alwaysComboboxIsInput || S.value && r.value
|
|
1921
|
+
), E = n(() => t.dynamicFiltering && T.value), A = () => !t.value && t.hasSelectedValue && S.value ? t.displayValue ?? "" : t.value, N = n(() => !T.value || t.alwaysComboboxIsInput && !t.open ? t.displayValue : S.value ? v.value : t.value), Y = n(() => t.selectedValueItem && !t.multiple), G = n(
|
|
1922
|
+
() => t.multiple && t.selectedValueItem && C.value.length > 0 && t.showSlotContentInMultiple
|
|
1884
1923
|
);
|
|
1885
|
-
|
|
1886
|
-
() =>
|
|
1887
|
-
() => {
|
|
1888
|
-
|
|
1889
|
-
|
|
1924
|
+
ee(
|
|
1925
|
+
() => E.value,
|
|
1926
|
+
(D, ve) => {
|
|
1927
|
+
D ? !ve && S.value && (v.value = A()) : v.value = t.value, D && !t.alwaysComboboxIsInput && Z(() => {
|
|
1928
|
+
m.value?.focus(), !t.open && !t.value && t.hasSelectedValue && S.value && m.value?.select();
|
|
1890
1929
|
});
|
|
1891
1930
|
}
|
|
1931
|
+
), ee(
|
|
1932
|
+
() => t.value,
|
|
1933
|
+
(D) => {
|
|
1934
|
+
(!S.value || D !== v.value) && (v.value = D);
|
|
1935
|
+
}
|
|
1936
|
+
), ee(
|
|
1937
|
+
() => t.displayValue,
|
|
1938
|
+
() => {
|
|
1939
|
+
S.value && t.hasSelectedValue && (v.value = A());
|
|
1940
|
+
}
|
|
1941
|
+
), ee(
|
|
1942
|
+
() => t.open,
|
|
1943
|
+
(D) => {
|
|
1944
|
+
D || (r.value = !1);
|
|
1945
|
+
}
|
|
1892
1946
|
);
|
|
1893
|
-
const
|
|
1894
|
-
!t.disabled && !t.readonly && (l(
|
|
1895
|
-
},
|
|
1896
|
-
t.open && (
|
|
1897
|
-
},
|
|
1898
|
-
l(
|
|
1899
|
-
},
|
|
1900
|
-
|
|
1901
|
-
},
|
|
1902
|
-
|
|
1947
|
+
const L = async () => {
|
|
1948
|
+
!t.disabled && !t.readonly && (l(K.OPEN), await Z(), m.value.focus());
|
|
1949
|
+
}, I = (D) => {
|
|
1950
|
+
t.open && (D && be(D), m.value.focus(), l(K.CLOSE));
|
|
1951
|
+
}, R = (D) => t.open && D.target.tagName === "INPUT" ? null : t.open ? I() : L(), F = (D) => t.dynamicFiltering ? null : R(D), J = () => {
|
|
1952
|
+
l(K.CLEAR), l(K.INPUT, ""), m.value.focus();
|
|
1953
|
+
}, X = () => {
|
|
1954
|
+
r.value = !0;
|
|
1955
|
+
}, q = () => {
|
|
1956
|
+
r.value = !1;
|
|
1957
|
+
}, y = (D) => {
|
|
1958
|
+
!S.value || t.open || t.readonly || t.disabled || (D.preventDefault(), D.stopPropagation(), r.value = !0, l(K.OPEN));
|
|
1959
|
+
}, Q = (D) => {
|
|
1960
|
+
!t.readonly && !t.disabled ? (S.value && (v.value = D.target.value), t.dynamicFiltering && !t.open && l(K.OPEN), l(K.INPUT, D.target.value), Z(() => {
|
|
1961
|
+
E.value && m.value?.focus();
|
|
1962
|
+
})) : (D.preventDefault(), D.stopPropagation());
|
|
1963
|
+
}, te = () => {
|
|
1964
|
+
m.value.focus();
|
|
1903
1965
|
};
|
|
1904
1966
|
return e({
|
|
1905
|
-
focus:
|
|
1906
|
-
}), { __sfc: !0, t:
|
|
1967
|
+
focus: te
|
|
1968
|
+
}), { __sfc: !0, t: o, attrs: s, slots: i, hasSlot: b, props: t, emit: l, textbox: m, textboxId: d, isTextboxFocused: r, localInputValue: v, isUnderlineStyle: c, conditionalClasses: p, showRequiredAttribute: _, comboboxConditionalClasses: O, isFiltering: w, shouldShowAutocompleteSuggestion: P, ariaAttributes: h, selectedValueItems: C, shouldUseDynamicFilteringInputMode: S, shouldShowSearchValue: T, shouldShowInput: E, getInitialInputValue: A, inputValue: N, shouldShowSingleSelectSlot: Y, shouldShowMultipleSlot: G, onOpenDropdown: L, onCloseDropdown: I, onToggleDropdown: R, onTextboxEnterKey: F, onClearSearch: J, onTextboxFocus: X, onTextboxBlur: q, onClosedComboboxMouseDown: y, onInputEvent: Q, focus: te, BentoTypography: ue, DropdownBaseTextboxEvent: K, CrossCircleFillIcon: ht, CrossCircleFillSmallIcon: St, BentoDropdownSize: ge };
|
|
1907
1969
|
}
|
|
1908
1970
|
});
|
|
1909
|
-
var
|
|
1971
|
+
var da = function() {
|
|
1910
1972
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
1911
|
-
return l("div", { class: e.$attrs.class, attrs: { "data-testid": "textbox-wrapper" }, on: { click: t.onToggleDropdown, keydown: function(
|
|
1912
|
-
return !
|
|
1913
|
-
} } }, [l(t.BentoTypography, { staticClass: "b-dropdown-base-textbox", class: t.conditionalClasses, attrs: { variant: t.isUnderlineStyle ? "title" : "body", el: "div", "data-testid": "base-textbox" } }, [t.shouldShowInput ? l("input", e._b({ ref: "textbox", staticClass: "b-dropdown-base-textbox__input", attrs: { id: t.textboxId, role: "combobox", type: "text", "aria-autocomplete": "list", size: "1", disabled: e.disabled ? !0 : null, readonly: e.readonly, required: t.showRequiredAttribute }, domProps: { value:
|
|
1914
|
-
return e.$emit(t.DropdownBaseTextboxEvent.KEYDOWN,
|
|
1915
|
-
}, function(
|
|
1916
|
-
return !
|
|
1917
|
-
}], input: t.onInputEvent } }, "input", t.ariaAttributes, !1)) : l("div", e._b({ ref: "textbox", staticClass: "b-dropdown-base-textbox__input", class: t.comboboxConditionalClasses, attrs: { id: t.textboxId, "aria-readonly": e.readonly ? "true" : null, role: "combobox", tabindex: e.disabled ? -1 : 0 } }, "div", t.ariaAttributes, !1), [t.shouldShowSingleSelectSlot ? [t.hasSlot("display-value") ? e._t("display-value", null, null, e.selectedValueItem) : e._t("default", function() {
|
|
1973
|
+
return l("div", { class: e.$attrs.class, attrs: { "data-testid": "textbox-wrapper" }, on: { click: t.onToggleDropdown, keydown: function(o) {
|
|
1974
|
+
return !o.type.indexOf("key") && e._k(o.keyCode, "escape", void 0, o.key, void 0) ? null : t.onCloseDropdown.apply(null, arguments);
|
|
1975
|
+
} } }, [l(t.BentoTypography, { staticClass: "b-dropdown-base-textbox", class: t.conditionalClasses, attrs: { variant: t.isUnderlineStyle ? "title" : "body", el: "div", "data-testid": "base-textbox" } }, [t.shouldShowAutocompleteSuggestion(t.hasSlot("autocomplete-suggestion")) ? l("span", { staticClass: "b-dropdown-base-textbox__autocomplete-suggestion", attrs: { "aria-hidden": "true", "data-testid": "autocomplete-suggestion" } }, [e._t("autocomplete-suggestion")], 2) : e._e(), t.shouldShowInput ? l("input", e._b({ ref: "textbox", staticClass: "b-dropdown-base-textbox__input", attrs: { id: t.textboxId, role: "combobox", type: "text", "aria-autocomplete": t.shouldShowAutocompleteSuggestion(t.hasSlot("autocomplete-suggestion")) ? "both" : "list", size: "1", disabled: e.disabled ? !0 : null, readonly: e.readonly, required: t.showRequiredAttribute }, domProps: { value: t.inputValue }, on: { keydown: [function(o) {
|
|
1976
|
+
return e.$emit(t.DropdownBaseTextboxEvent.KEYDOWN, o);
|
|
1977
|
+
}, function(o) {
|
|
1978
|
+
return !o.type.indexOf("key") && e._k(o.keyCode, "enter", 13, o.key, "Enter") ? null : t.onTextboxEnterKey.apply(null, arguments);
|
|
1979
|
+
}], focus: t.onTextboxFocus, blur: t.onTextboxBlur, input: t.onInputEvent } }, "input", t.ariaAttributes, !1)) : l("div", e._b({ ref: "textbox", staticClass: "b-dropdown-base-textbox__input", class: t.comboboxConditionalClasses, attrs: { id: t.textboxId, "aria-readonly": e.readonly ? "true" : null, role: "combobox", tabindex: e.disabled ? -1 : 0 }, on: { focus: t.onTextboxFocus, mousedown: t.onClosedComboboxMouseDown } }, "div", t.ariaAttributes, !1), [t.shouldShowSingleSelectSlot ? [t.hasSlot("display-value") ? e._t("display-value", null, null, e.selectedValueItem) : e._t("default", function() {
|
|
1918
1980
|
return [e._v(" " + e._s(e.displayValue) + " ")];
|
|
1919
|
-
}, null, e.selectedValueItem)] : t.shouldShowMultipleSlot ? [l("div", { staticClass: "b-dropdown-base-textbox__input-multiple-selected" }, e._l(t.selectedValueItems, function(
|
|
1920
|
-
return l("div", { key:
|
|
1981
|
+
}, null, e.selectedValueItem)] : t.shouldShowMultipleSlot ? [l("div", { staticClass: "b-dropdown-base-textbox__input-multiple-selected" }, e._l(t.selectedValueItems, function(o) {
|
|
1982
|
+
return l("div", { key: o.value }, [l("div", { staticClass: "b-dropdown-base-textbox__input-selected-element" }, [e._t("default", function() {
|
|
1921
1983
|
return [e._v(" " + e._s(e.displayValue) + " ")];
|
|
1922
|
-
}, null,
|
|
1923
|
-
}), 0)] : [e._v(e._s(e.displayValue))]], 2), e.additionalItemsSelected ? l("span", { staticClass: "b-dropdown-base-textbox__additional-items" }, [e._v(" " + e._s(e.additionalItemsSelected) + " ")]) : e._e(), t.hasSlot("icon") && !t.isFiltering ? l("span", { staticClass: "b-dropdown-base-textbox__icon", attrs: { "aria-hidden": "true" } }, [e._t("icon")], 2) : e._e(), t.isFiltering ? l("span", { staticClass: "b-dropdown-base-textbox__clear-search", attrs: { tabindex: e.disabled ? -1 : 0, "data-testid": "clear-search-button" }, on: { click: function(
|
|
1924
|
-
return
|
|
1925
|
-
}, keydown: function(
|
|
1926
|
-
return !
|
|
1927
|
-
}, keyup: function(
|
|
1928
|
-
return !
|
|
1984
|
+
}, null, o)], 2)]);
|
|
1985
|
+
}), 0)] : [e._v(e._s(e.displayValue))]], 2), e.additionalItemsSelected ? l("span", { staticClass: "b-dropdown-base-textbox__additional-items" }, [e._v(" " + e._s(e.additionalItemsSelected) + " ")]) : e._e(), t.hasSlot("icon") && !t.isFiltering ? l("span", { staticClass: "b-dropdown-base-textbox__icon", attrs: { "aria-hidden": "true" } }, [e._t("icon")], 2) : e._e(), t.isFiltering ? l("span", { staticClass: "b-dropdown-base-textbox__clear-search", attrs: { tabindex: e.disabled ? -1 : 0, "data-testid": "clear-search-button" }, on: { click: function(o) {
|
|
1986
|
+
return o.stopPropagation(), t.onClearSearch.apply(null, arguments);
|
|
1987
|
+
}, keydown: function(o) {
|
|
1988
|
+
return !o.type.indexOf("key") && e._k(o.keyCode, "enter", 13, o.key, "Enter") ? null : (o.stopPropagation(), t.onClearSearch.apply(null, arguments));
|
|
1989
|
+
}, keyup: function(o) {
|
|
1990
|
+
return !o.type.indexOf("key") && e._k(o.keyCode, "space", 32, o.key, [" ", "Spacebar"]) ? null : t.onClearSearch.apply(null, arguments);
|
|
1929
1991
|
} } }, [e.size === t.BentoDropdownSize.SMALL ? l(t.CrossCircleFillSmallIcon, { attrs: { "svg-title": t.t("clearSearch") } }) : l(t.CrossCircleFillIcon, { attrs: { "svg-title": t.t("clearSearch") } })], 1) : e._e()])], 1);
|
|
1930
|
-
},
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1992
|
+
}, pa = [], fa = /* @__PURE__ */ W(
|
|
1993
|
+
ua,
|
|
1994
|
+
da,
|
|
1995
|
+
pa,
|
|
1934
1996
|
!1,
|
|
1935
1997
|
null,
|
|
1936
|
-
"
|
|
1998
|
+
"fb2a4a73"
|
|
1937
1999
|
);
|
|
1938
|
-
const
|
|
2000
|
+
const vt = fa.exports, ba = z({
|
|
1939
2001
|
name: "dropdown-default-textbox",
|
|
1940
2002
|
inheritAttrs: !1
|
|
1941
|
-
}),
|
|
1942
|
-
...
|
|
2003
|
+
}), va = /* @__PURE__ */ z({
|
|
2004
|
+
...ba,
|
|
1943
2005
|
props: {
|
|
1944
2006
|
/**
|
|
1945
2007
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -1952,6 +2014,13 @@ const it = sa.exports, oa = F({
|
|
|
1952
2014
|
type: String,
|
|
1953
2015
|
required: !0
|
|
1954
2016
|
},
|
|
2017
|
+
/**
|
|
2018
|
+
* Identifies the currently active option in the listbox.
|
|
2019
|
+
*/
|
|
2020
|
+
ariaActiveDescendant: {
|
|
2021
|
+
type: String,
|
|
2022
|
+
default: null
|
|
2023
|
+
},
|
|
1955
2024
|
/**
|
|
1956
2025
|
* 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.
|
|
1957
2026
|
*/
|
|
@@ -2027,94 +2096,94 @@ const it = sa.exports, oa = F({
|
|
|
2027
2096
|
},
|
|
2028
2097
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
2029
2098
|
setup(a, { expose: e, emit: l }) {
|
|
2030
|
-
const t = a,
|
|
2031
|
-
[`b-dropdown-default-textbox--${
|
|
2032
|
-
[`b-dropdown-default-textbox--${
|
|
2033
|
-
[`b-dropdown-default-textbox--${
|
|
2034
|
-
[`b-dropdown-default-textbox--${
|
|
2099
|
+
const t = a, o = he(), s = x(null), i = n(() => ({
|
|
2100
|
+
[`b-dropdown-default-textbox--${le.ERROR}`]: !t.disabled && !t.readonly && t.isInvalid,
|
|
2101
|
+
[`b-dropdown-default-textbox--${le.DISABLED}`]: t.disabled,
|
|
2102
|
+
[`b-dropdown-default-textbox--${le.READONLY}`]: t.readonly,
|
|
2103
|
+
[`b-dropdown-default-textbox--${le.OPENED}`]: t.open,
|
|
2035
2104
|
"b-dropdown-default-textbox--condensed": t.condensed
|
|
2036
|
-
})),
|
|
2037
|
-
l("input",
|
|
2038
|
-
},
|
|
2039
|
-
l("keydown",
|
|
2040
|
-
}, r = (
|
|
2041
|
-
|
|
2042
|
-
},
|
|
2043
|
-
|
|
2044
|
-
},
|
|
2045
|
-
|
|
2046
|
-
},
|
|
2047
|
-
[
|
|
2048
|
-
[
|
|
2049
|
-
[
|
|
2050
|
-
[
|
|
2051
|
-
[
|
|
2052
|
-
},
|
|
2053
|
-
|
|
2105
|
+
})), b = n(() => t.open && !t.disabled && !t.readonly), m = (O) => {
|
|
2106
|
+
l("input", O);
|
|
2107
|
+
}, d = (O) => {
|
|
2108
|
+
l("keydown", O);
|
|
2109
|
+
}, r = (O) => {
|
|
2110
|
+
be(O), l("open");
|
|
2111
|
+
}, v = (O) => {
|
|
2112
|
+
be(O), l("close");
|
|
2113
|
+
}, c = (O) => {
|
|
2114
|
+
be(O), l("clear");
|
|
2115
|
+
}, p = {
|
|
2116
|
+
[K.INPUT]: m,
|
|
2117
|
+
[K.OPEN]: r,
|
|
2118
|
+
[K.CLOSE]: v,
|
|
2119
|
+
[K.CLEAR]: c,
|
|
2120
|
+
[K.KEYDOWN]: d
|
|
2121
|
+
}, _ = () => {
|
|
2122
|
+
s.value.focus();
|
|
2054
2123
|
};
|
|
2055
2124
|
return e({
|
|
2056
|
-
focus:
|
|
2057
|
-
}), { __sfc: !0, emit: l, slots:
|
|
2125
|
+
focus: _
|
|
2126
|
+
}), { __sfc: !0, emit: l, slots: o, props: t, baseTextbox: s, conditionalClasses: i, isDropdownOpen: b, onInput: m, onKeyDown: d, openDropdown: r, closeDropdown: v, clearValue: c, listeners: p, focus: _, DropdownBaseTextbox: vt, ChevronDownIcon: at, ChevronUpIcon: ot };
|
|
2058
2127
|
}
|
|
2059
2128
|
});
|
|
2060
|
-
var
|
|
2129
|
+
var ma = function() {
|
|
2061
2130
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
2062
|
-
return l("div", { staticClass: "b-dropdown-default-textbox", class: t.conditionalClasses, attrs: { "data-testid": "default-textbox" } }, [l(t.DropdownBaseTextbox, e._g(e._b({ ref: "baseTextbox", staticClass: "b-dropdown-default-textbox__textbox", attrs: { value: e.value }, scopedSlots: e._u([e._l(t.slots, function(
|
|
2063
|
-
return { key:
|
|
2064
|
-
return [e._t(
|
|
2131
|
+
return l("div", { staticClass: "b-dropdown-default-textbox", class: t.conditionalClasses, attrs: { "data-testid": "default-textbox" } }, [l(t.DropdownBaseTextbox, e._g(e._b({ ref: "baseTextbox", staticClass: "b-dropdown-default-textbox__textbox", attrs: { value: e.value }, scopedSlots: e._u([e._l(t.slots, function(o, s) {
|
|
2132
|
+
return { key: s, fn: function(i) {
|
|
2133
|
+
return [e._t(s, null, null, i ?? {})];
|
|
2065
2134
|
} };
|
|
2066
2135
|
}), { key: "icon", fn: function() {
|
|
2067
2136
|
return [l("div", { staticClass: "b-dropdown-default-textbox__chevron" }, [l(t.ChevronUpIcon, { directives: [{ name: "show", rawName: "v-show", value: t.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), l(t.ChevronDownIcon, { directives: [{ name: "show", rawName: "v-show", value: !t.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
|
|
2068
2137
|
}, proxy: !0 }], null, !0) }, "dropdown-base-textbox", { ...e.$attrs, ...e.$props }, !1), t.listeners))], 1);
|
|
2069
|
-
},
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2138
|
+
}, ya = [], _a = /* @__PURE__ */ W(
|
|
2139
|
+
va,
|
|
2140
|
+
ma,
|
|
2141
|
+
ya,
|
|
2073
2142
|
!1,
|
|
2074
2143
|
null,
|
|
2075
|
-
"
|
|
2144
|
+
"998402d4"
|
|
2076
2145
|
);
|
|
2077
|
-
const
|
|
2078
|
-
let
|
|
2079
|
-
const
|
|
2146
|
+
const ga = _a.exports;
|
|
2147
|
+
let Qe = 0;
|
|
2148
|
+
const ha = {
|
|
2080
2149
|
beforeCreate() {
|
|
2081
|
-
this.uuid =
|
|
2150
|
+
this.uuid = Qe.toString(), Qe += 1;
|
|
2082
2151
|
}
|
|
2083
2152
|
};
|
|
2084
|
-
var
|
|
2153
|
+
var Sa = function() {
|
|
2085
2154
|
var e = this, l = e._self._c;
|
|
2086
2155
|
return l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z" } })]);
|
|
2087
|
-
},
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2156
|
+
}, xa = [], Ca = /* @__PURE__ */ W(
|
|
2157
|
+
ha,
|
|
2158
|
+
Sa,
|
|
2159
|
+
xa,
|
|
2091
2160
|
!1,
|
|
2092
2161
|
null,
|
|
2093
2162
|
null
|
|
2094
2163
|
);
|
|
2095
|
-
const
|
|
2096
|
-
let
|
|
2097
|
-
const
|
|
2164
|
+
const Ia = Ca.exports;
|
|
2165
|
+
let et = 0;
|
|
2166
|
+
const La = {
|
|
2098
2167
|
beforeCreate() {
|
|
2099
|
-
this.uuid =
|
|
2168
|
+
this.uuid = et.toString(), et += 1;
|
|
2100
2169
|
}
|
|
2101
2170
|
};
|
|
2102
|
-
var
|
|
2171
|
+
var Oa = function() {
|
|
2103
2172
|
var e = this, l = e._self._c;
|
|
2104
2173
|
return l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z" } })]);
|
|
2105
|
-
},
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2174
|
+
}, Ea = [], wa = /* @__PURE__ */ W(
|
|
2175
|
+
La,
|
|
2176
|
+
Oa,
|
|
2177
|
+
Ea,
|
|
2109
2178
|
!1,
|
|
2110
2179
|
null,
|
|
2111
2180
|
null
|
|
2112
2181
|
);
|
|
2113
|
-
const
|
|
2182
|
+
const Ta = wa.exports, Aa = z({
|
|
2114
2183
|
name: "dropdown-small-textbox",
|
|
2115
2184
|
inheritAttrs: !1
|
|
2116
|
-
}),
|
|
2117
|
-
...
|
|
2185
|
+
}), Da = /* @__PURE__ */ z({
|
|
2186
|
+
...Aa,
|
|
2118
2187
|
props: {
|
|
2119
2188
|
/**
|
|
2120
2189
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -2124,6 +2193,10 @@ const ha = ga.exports, Sa = F({
|
|
|
2124
2193
|
* Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.
|
|
2125
2194
|
*/
|
|
2126
2195
|
ariaControls: { type: String, required: !0 },
|
|
2196
|
+
/**
|
|
2197
|
+
* Identifies the currently active option in the listbox.
|
|
2198
|
+
*/
|
|
2199
|
+
ariaActiveDescendant: { type: String, default: null },
|
|
2127
2200
|
/**
|
|
2128
2201
|
* 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.
|
|
2129
2202
|
*/
|
|
@@ -2171,162 +2244,180 @@ const ha = ga.exports, Sa = F({
|
|
|
2171
2244
|
},
|
|
2172
2245
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
2173
2246
|
setup(a, { expose: e, emit: l }) {
|
|
2174
|
-
const t = a, s =
|
|
2175
|
-
[`b-dropdown-small-textbox--${
|
|
2176
|
-
[`b-dropdown-small-textbox--${
|
|
2177
|
-
[`b-dropdown-small-textbox--${
|
|
2178
|
-
"b-dropdown-small-textbox--underline":
|
|
2179
|
-
})),
|
|
2180
|
-
l("input",
|
|
2181
|
-
},
|
|
2182
|
-
l("keydown",
|
|
2183
|
-
},
|
|
2184
|
-
|
|
2185
|
-
},
|
|
2186
|
-
|
|
2187
|
-
},
|
|
2188
|
-
|
|
2189
|
-
},
|
|
2190
|
-
[
|
|
2191
|
-
[
|
|
2192
|
-
[
|
|
2193
|
-
[
|
|
2194
|
-
[
|
|
2195
|
-
},
|
|
2247
|
+
const t = a, o = he(), s = x(null), i = Ue(bt, !1), b = n(() => ({
|
|
2248
|
+
[`b-dropdown-small-textbox--${le.DISABLED}`]: t.disabled,
|
|
2249
|
+
[`b-dropdown-small-textbox--${le.READONLY}`]: t.readonly,
|
|
2250
|
+
[`b-dropdown-small-textbox--${le.OPENED}`]: t.open,
|
|
2251
|
+
"b-dropdown-small-textbox--underline": i
|
|
2252
|
+
})), m = n(() => t.open && !t.disabled && !t.readonly), d = (w) => {
|
|
2253
|
+
l("input", w);
|
|
2254
|
+
}, r = (w) => {
|
|
2255
|
+
l("keydown", w);
|
|
2256
|
+
}, v = (w) => {
|
|
2257
|
+
be(w), l("open");
|
|
2258
|
+
}, c = (w) => {
|
|
2259
|
+
be(w), l("close");
|
|
2260
|
+
}, p = (w) => {
|
|
2261
|
+
be(w), l("clear");
|
|
2262
|
+
}, _ = {
|
|
2263
|
+
[K.INPUT]: d,
|
|
2264
|
+
[K.OPEN]: v,
|
|
2265
|
+
[K.CLOSE]: c,
|
|
2266
|
+
[K.CLEAR]: p,
|
|
2267
|
+
[K.KEYDOWN]: r
|
|
2268
|
+
}, O = () => {
|
|
2196
2269
|
s.value.focus();
|
|
2197
2270
|
};
|
|
2198
2271
|
return e({
|
|
2199
|
-
focus:
|
|
2200
|
-
}), { __sfc: !0, emit: l, props: t, baseTextbox: s, isUnderlineStyle:
|
|
2272
|
+
focus: O
|
|
2273
|
+
}), { __sfc: !0, emit: l, slots: o, props: t, baseTextbox: s, isUnderlineStyle: i, conditionalClasses: b, isDropdownOpen: m, onInput: d, onKeyDown: r, openDropdown: v, closeDropdown: c, clearValue: p, listeners: _, focus: O, BentoDropdownSize: ge, DropdownBaseTextbox: vt, ChevronDownSmallIcon: Ia, ChevronUpSmallIcon: Ta };
|
|
2201
2274
|
}
|
|
2202
2275
|
});
|
|
2203
|
-
var
|
|
2276
|
+
var ka = function() {
|
|
2204
2277
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
2205
|
-
return l("div", { staticClass: "b-dropdown-small-textbox", class: t.conditionalClasses }, [l(t.DropdownBaseTextbox, e._g(e._b({ ref: "baseTextbox", staticClass: "b-dropdown-small-textbox__textbox", attrs: { size: t.BentoDropdownSize.SMALL }, scopedSlots: e._u([
|
|
2278
|
+
return l("div", { staticClass: "b-dropdown-small-textbox", class: t.conditionalClasses }, [l(t.DropdownBaseTextbox, e._g(e._b({ ref: "baseTextbox", staticClass: "b-dropdown-small-textbox__textbox", attrs: { size: t.BentoDropdownSize.SMALL }, scopedSlots: e._u([e._l(t.slots, function(o, s) {
|
|
2279
|
+
return { key: s, fn: function(i) {
|
|
2280
|
+
return [e._t(s, null, null, i ?? {})];
|
|
2281
|
+
} };
|
|
2282
|
+
}), { key: "icon", fn: function() {
|
|
2206
2283
|
return [l("div", { staticClass: "b-dropdown-small-textbox__chevron" }, [l(t.ChevronUpSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: t.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), l(t.ChevronDownSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: !t.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
|
|
2207
|
-
}, proxy: !0 }]) }, "dropdown-base-textbox", { ...e.$attrs, ...e.$props }, !1), t.listeners))], 1);
|
|
2208
|
-
},
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2284
|
+
}, proxy: !0 }], null, !0) }, "dropdown-base-textbox", { ...e.$attrs, ...e.$props }, !1), t.listeners))], 1);
|
|
2285
|
+
}, Ba = [], Ra = /* @__PURE__ */ W(
|
|
2286
|
+
Da,
|
|
2287
|
+
ka,
|
|
2288
|
+
Ba,
|
|
2212
2289
|
!1,
|
|
2213
2290
|
null,
|
|
2214
|
-
"
|
|
2291
|
+
"f28de89c"
|
|
2215
2292
|
);
|
|
2216
|
-
const
|
|
2217
|
-
const l = /* @__PURE__ */ new Set(), t = new Set(a.value.map((
|
|
2293
|
+
const Ma = Ra.exports, Na = (a, e) => {
|
|
2294
|
+
const l = /* @__PURE__ */ new Set(), t = new Set(a.value.map((s) => s.value)), o = e.value.reduce((s, i) => {
|
|
2218
2295
|
if (i.items)
|
|
2219
2296
|
if (t.has(i.value))
|
|
2220
|
-
|
|
2297
|
+
s.push(i.displayValue ?? i.label), l.add(i.value), i.items.forEach((m) => l.add(m.value));
|
|
2221
2298
|
else {
|
|
2222
|
-
const
|
|
2299
|
+
const m = i.items.filter(
|
|
2223
2300
|
(r) => t.has(r.value)
|
|
2224
2301
|
);
|
|
2225
|
-
|
|
2226
|
-
|
|
2302
|
+
m.length > 0 && m.length === i.items.length ? (s.push(i.displayValue ?? i.label), l.add(i.value), i.items.forEach((r) => l.add(r.value))) : m.forEach(({ label: r, displayValue: v, value: c }) => {
|
|
2303
|
+
s.push(v ?? r), l.add(c);
|
|
2227
2304
|
});
|
|
2228
2305
|
}
|
|
2229
2306
|
else
|
|
2230
|
-
t.has(i.value) && (
|
|
2231
|
-
return
|
|
2307
|
+
t.has(i.value) && (s.push(i.displayValue ?? i.label), l.add(i.value));
|
|
2308
|
+
return s;
|
|
2232
2309
|
}, []);
|
|
2233
|
-
return a.value.forEach((
|
|
2234
|
-
l.has(
|
|
2235
|
-
}),
|
|
2236
|
-
},
|
|
2237
|
-
const
|
|
2310
|
+
return a.value.forEach((s) => {
|
|
2311
|
+
l.has(s.value) || o.push(s.displayValue ?? s.label);
|
|
2312
|
+
}), o.join(", ");
|
|
2313
|
+
}, $a = ({ items: a, placeholder: e, selectedValues: l, isMultiSelect: t }) => {
|
|
2314
|
+
const o = n(
|
|
2238
2315
|
() => t.value && a.value.find((i) => i.items?.length)
|
|
2239
2316
|
);
|
|
2240
|
-
return n(() => l.value.length ?
|
|
2241
|
-
},
|
|
2317
|
+
return n(() => l.value.length ? o.value ? Na(l, a) : l.value.map(({ label: i, displayValue: b }) => b ?? i).join(", ") : e.value || null);
|
|
2318
|
+
}, mt = (a) => {
|
|
2242
2319
|
a.value.$children?.[0].$refs.textbox.focus();
|
|
2243
|
-
},
|
|
2320
|
+
}, Pa = ({
|
|
2244
2321
|
inputContainerRef: a,
|
|
2245
2322
|
optionsContainerRef: e,
|
|
2246
2323
|
selectedValueIndex: l,
|
|
2247
2324
|
isDropdownOpen: t,
|
|
2248
|
-
isDynamicFltering:
|
|
2249
|
-
items:
|
|
2325
|
+
isDynamicFltering: o,
|
|
2326
|
+
items: s,
|
|
2250
2327
|
isMultiple: i,
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2328
|
+
isSearching: b,
|
|
2329
|
+
activeDescendantIndex: m,
|
|
2330
|
+
selectFirstMatchedOption: d,
|
|
2331
|
+
totalItemCount: r,
|
|
2332
|
+
isVirtualScroll: v,
|
|
2333
|
+
removeActiveDescendant: c
|
|
2334
|
+
}, p, _, O) => {
|
|
2335
|
+
const w = async (y) => {
|
|
2336
|
+
o.value && await Z(), s.value[y]?.focus();
|
|
2337
|
+
}, P = async (y) => {
|
|
2338
|
+
o.value && await Z();
|
|
2339
|
+
const Q = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.$el.querySelectorAll(
|
|
2259
2340
|
"button"
|
|
2260
2341
|
);
|
|
2261
|
-
|
|
2262
|
-
},
|
|
2342
|
+
Q?.length ? Q[y]?.focus() : w(y);
|
|
2343
|
+
}, h = (y) => e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.setListboxFocusedIndex(
|
|
2263
2344
|
y
|
|
2264
|
-
),
|
|
2345
|
+
), C = async (y) => {
|
|
2265
2346
|
await e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.navigateToItem(y);
|
|
2266
|
-
},
|
|
2267
|
-
|
|
2268
|
-
|
|
2347
|
+
}, S = (y) => {
|
|
2348
|
+
c?.(), !(y < 0) && Z(() => {
|
|
2349
|
+
v ? C(y) : (h(y), w(y));
|
|
2269
2350
|
});
|
|
2270
|
-
},
|
|
2271
|
-
t.value ||
|
|
2272
|
-
},
|
|
2273
|
-
t.value ||
|
|
2274
|
-
|
|
2351
|
+
}, T = () => {
|
|
2352
|
+
t.value || _(), S(0);
|
|
2353
|
+
}, E = () => {
|
|
2354
|
+
t.value || _();
|
|
2355
|
+
const y = v ? r.value - 1 : s.value.length - 1, Q = Math.min((m?.value ?? -1) + 1, y);
|
|
2356
|
+
S(Q);
|
|
2357
|
+
}, A = () => {
|
|
2358
|
+
t.value || _(), Z(() => {
|
|
2359
|
+
S(v ? r.value - 1 : s.value.length - 1);
|
|
2275
2360
|
});
|
|
2276
|
-
},
|
|
2361
|
+
}, N = (y) => {
|
|
2277
2362
|
y.preventDefault(), y.stopPropagation();
|
|
2278
|
-
},
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
}, T = ({ detail: y }) => {
|
|
2285
|
-
I(y), v();
|
|
2363
|
+
}, Y = ({ detail: y }) => {
|
|
2364
|
+
if (N(y), m?.value !== void 0 && m.value >= 0) {
|
|
2365
|
+
E();
|
|
2366
|
+
return;
|
|
2367
|
+
}
|
|
2368
|
+
T();
|
|
2286
2369
|
}, G = ({ detail: y }) => {
|
|
2287
|
-
|
|
2288
|
-
},
|
|
2289
|
-
|
|
2290
|
-
},
|
|
2291
|
-
y
|
|
2370
|
+
N(y), A();
|
|
2371
|
+
}, L = ({ detail: y }) => {
|
|
2372
|
+
N(y), T();
|
|
2373
|
+
}, I = ({ detail: y }) => {
|
|
2374
|
+
N(y), A();
|
|
2292
2375
|
}, R = ({ detail: y }) => {
|
|
2293
|
-
y
|
|
2376
|
+
N(y), p(), t.value && (i.value ? P(0) : S(l.value));
|
|
2377
|
+
}, F = async ({ detail: y }) => {
|
|
2378
|
+
if (N(y), o.value && !i.value)
|
|
2379
|
+
return t.value && b.value && await d(), void 0;
|
|
2380
|
+
p(), t.value && (i.value ? P(0) : S(l.value));
|
|
2381
|
+
}, J = ({ detail: y }) => {
|
|
2382
|
+
y.stopPropagation(), t.value && O();
|
|
2383
|
+
}, X = ({ detail: y }) => {
|
|
2384
|
+
y.stopPropagation(), t.value && (O(), mt(a));
|
|
2294
2385
|
};
|
|
2295
2386
|
return n(() => ({
|
|
2296
|
-
[
|
|
2297
|
-
[
|
|
2298
|
-
[
|
|
2299
|
-
[
|
|
2300
|
-
...
|
|
2301
|
-
[
|
|
2302
|
-
...
|
|
2303
|
-
[
|
|
2387
|
+
[U.ARROW_DOWN]: Y,
|
|
2388
|
+
[U.ARROW_UP]: G,
|
|
2389
|
+
[U.HOME]: L,
|
|
2390
|
+
[U.END]: I,
|
|
2391
|
+
...o.value ? {} : { [U.SPACE]: R },
|
|
2392
|
+
[U.ENTER]: F,
|
|
2393
|
+
...o.value ? {} : { [U.TAB]: J },
|
|
2394
|
+
[U.ESCAPE]: X
|
|
2304
2395
|
}));
|
|
2305
|
-
},
|
|
2396
|
+
}, Fa = ({ inputContainerRef: a, isDropdownOpen: e }, l) => {
|
|
2306
2397
|
const t = () => {
|
|
2307
|
-
e.value && l(),
|
|
2308
|
-
|
|
2398
|
+
e.value && l(), Z(() => {
|
|
2399
|
+
mt(a);
|
|
2309
2400
|
});
|
|
2310
2401
|
};
|
|
2311
2402
|
return {
|
|
2312
|
-
[
|
|
2313
|
-
[
|
|
2314
|
-
[
|
|
2315
|
-
[
|
|
2403
|
+
[u.ENTER]: t,
|
|
2404
|
+
[u.ESCAPE]: t,
|
|
2405
|
+
[u.TAB]: t,
|
|
2406
|
+
[u.SPACE]: t
|
|
2316
2407
|
};
|
|
2317
2408
|
};
|
|
2318
|
-
function
|
|
2319
|
-
const
|
|
2320
|
-
return
|
|
2321
|
-
|
|
2409
|
+
function Va(a, e, l, t, o) {
|
|
2410
|
+
const s = x(a), i = x(e), b = (r, v = []) => v.flatMap((c) => c.label.toLocaleLowerCase().includes(r) ? t?.value && c.items ? [...b(r, c.items)] : [c, ...b(r, c.items)] : c.items ? [...b(r, c.items)] : []), m = l !== void 0 ? ft(() => l(s.value), o ?? 300) : void 0;
|
|
2411
|
+
return ee(s, () => {
|
|
2412
|
+
m !== void 0 && m();
|
|
2322
2413
|
}), n(() => {
|
|
2323
|
-
if (!
|
|
2414
|
+
if (!s.value || l !== void 0)
|
|
2324
2415
|
return i.value;
|
|
2325
|
-
const r =
|
|
2326
|
-
return
|
|
2416
|
+
const r = s.value.toLocaleLowerCase();
|
|
2417
|
+
return b(r, i.value);
|
|
2327
2418
|
});
|
|
2328
2419
|
}
|
|
2329
|
-
const
|
|
2420
|
+
const za = {
|
|
2330
2421
|
"de-DE": { all: "Alle", ariaLabelFallback: "Dropdown", clearSearch: "Filter löschen" },
|
|
2331
2422
|
"en-GB": { all: "All", ariaLabelFallback: "Dropdown", clearSearch: "Clear filter" },
|
|
2332
2423
|
"en-US": { all: "All", ariaLabelFallback: "Dropdown", clearSearch: "Clear filter" },
|
|
@@ -2338,16 +2429,16 @@ const Da = {
|
|
|
2338
2429
|
"ja-JP": { all: "すべて", ariaLabelFallback: "ドロップダウン", clearSearch: "フィルターをクリア" },
|
|
2339
2430
|
"pt-BR": { all: "Todos", ariaLabelFallback: "Menu suspenso", clearSearch: "Limpar filtro" },
|
|
2340
2431
|
"zh-CN": { all: "全部", ariaLabelFallback: "下拉菜单", clearSearch: "清除筛选器" }
|
|
2341
|
-
},
|
|
2342
|
-
i18n: { messages:
|
|
2432
|
+
}, Ga = z({
|
|
2433
|
+
i18n: { messages: za },
|
|
2343
2434
|
name: "b-dropdown",
|
|
2344
2435
|
components: {
|
|
2345
|
-
DropdownInputDefault:
|
|
2346
|
-
DropdownInputSmall:
|
|
2436
|
+
DropdownInputDefault: ga,
|
|
2437
|
+
DropdownInputSmall: Ma
|
|
2347
2438
|
},
|
|
2348
2439
|
model: { prop: "modelValue" }
|
|
2349
|
-
}),
|
|
2350
|
-
...
|
|
2440
|
+
}), Ua = /* @__PURE__ */ z({
|
|
2441
|
+
...Ga,
|
|
2351
2442
|
props: {
|
|
2352
2443
|
description: { default: null },
|
|
2353
2444
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -2368,7 +2459,7 @@ const Da = {
|
|
|
2368
2459
|
items: { default: () => [] },
|
|
2369
2460
|
loading: { type: Boolean, default: !1 },
|
|
2370
2461
|
componentLoading: { type: Boolean, default: !1 },
|
|
2371
|
-
lazyLoadType: { default:
|
|
2462
|
+
lazyLoadType: { default: Ve.props.lazyLoadType.default },
|
|
2372
2463
|
multiple: { type: Boolean, default: !1 },
|
|
2373
2464
|
search: { default: void 0 },
|
|
2374
2465
|
showSlotContentInMultiple: { type: Boolean, default: !1 },
|
|
@@ -2382,184 +2473,198 @@ const Da = {
|
|
|
2382
2473
|
},
|
|
2383
2474
|
emits: ["input", "update:model-value", "show-more", "open"],
|
|
2384
2475
|
setup(a, { expose: e, emit: l }) {
|
|
2385
|
-
const t = a,
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
),
|
|
2476
|
+
const t = a, o = Ge(), s = he(), i = lt(s), { t: b } = de(), { emitValue: m } = Ct(l), d = x(null), r = x(null), v = x(null), c = x(!1), p = x(!1), _ = ce("bento-dropdown-options-container"), O = ce("dropdown-label"), w = ce("dropdown-description"), P = ce("dropdown-error"), { isReadOnly: h } = It(H(t, "readonly")), C = n(() => t.modelValue ?? t.value), { cachedSelectedListboxOptions: S, cachedListboxSelectedValues: T, setCachedValues: E } = Zl(
|
|
2477
|
+
H(t, "items"),
|
|
2478
|
+
C,
|
|
2479
|
+
H(t, "multiple"),
|
|
2480
|
+
H(t, "enableValueLabelPair")
|
|
2481
|
+
), A = x(o["aria-label"]), N = x(o["aria-describedby"]), { ariaLabel: Y, label: G } = tt(t), L = n(() => b("ariaLabelFallback")), I = xt({
|
|
2391
2482
|
// TODO: take ariaLabel ref away when aria-label prop is removed
|
|
2392
|
-
ariaLabel:
|
|
2393
|
-
label:
|
|
2394
|
-
defaultFallback:
|
|
2395
|
-
}),
|
|
2483
|
+
ariaLabel: Y.value || A,
|
|
2484
|
+
label: G,
|
|
2485
|
+
defaultFallback: L
|
|
2486
|
+
}), R = t.size === ge.SMALL || Ue(ia, !1), F = n(() => R ? ge.SMALL : ge.DEFAULT), J = n(() => ({
|
|
2396
2487
|
"b-dropdown--condensed": t.condensed
|
|
2397
|
-
})),
|
|
2488
|
+
})), X = n(() => ({
|
|
2398
2489
|
"b-dropdown__description--error": !!t.errorMessage
|
|
2399
|
-
})),
|
|
2400
|
-
|
|
2401
|
-
|
|
2490
|
+
})), q = x(""), y = H(t, "items"), Q = H(t, "staticCategories"), te = Va(
|
|
2491
|
+
q,
|
|
2492
|
+
y,
|
|
2402
2493
|
t?.search?.searchEvent,
|
|
2403
|
-
|
|
2494
|
+
Q,
|
|
2404
2495
|
t?.search?.debounceTime
|
|
2405
|
-
),
|
|
2406
|
-
items:
|
|
2407
|
-
placeholder:
|
|
2408
|
-
isMultiSelect:
|
|
2409
|
-
selectedValues:
|
|
2410
|
-
}),
|
|
2411
|
-
if (t?.multiple && Array.isArray(
|
|
2496
|
+
), D = n(() => t.dynamicFiltering && !!q.value), ve = $a({
|
|
2497
|
+
items: y,
|
|
2498
|
+
placeholder: H(t, "placeholder"),
|
|
2499
|
+
isMultiSelect: H(t, "multiple"),
|
|
2500
|
+
selectedValues: S
|
|
2501
|
+
}), we = n(() => {
|
|
2502
|
+
if (t?.multiple && Array.isArray(C.value))
|
|
2412
2503
|
return t.items.filter(
|
|
2413
|
-
({ value:
|
|
2504
|
+
({ value: M }) => t?.value && (t?.value).includes(M)
|
|
2414
2505
|
);
|
|
2415
2506
|
if (!t.multiple && t.staticCategories) {
|
|
2416
|
-
const
|
|
2417
|
-
(
|
|
2507
|
+
const M = t.items.find(
|
|
2508
|
+
(se) => se.items?.some((je) => je.value === C.value)
|
|
2418
2509
|
);
|
|
2419
|
-
return (
|
|
2510
|
+
return (M ? M.items.find((se) => se.value === C.value) : t.items.find(({ value: se }) => se === C.value)) ?? null;
|
|
2420
2511
|
}
|
|
2421
|
-
return t.items.find(({ value:
|
|
2422
|
-
}),
|
|
2423
|
-
const
|
|
2424
|
-
return
|
|
2425
|
-
}), { isMultiLevelSelect:
|
|
2512
|
+
return t.items.find(({ value: M }) => M === C.value);
|
|
2513
|
+
}), Se = n(() => {
|
|
2514
|
+
const ne = (pe.value ? ae.value : te.value).findIndex(({ value: se }) => t.enableValueLabelPair ? C.value?.value === se : C.value === se);
|
|
2515
|
+
return ne > -1 ? ne : 0;
|
|
2516
|
+
}), { isMultiLevelSelect: pe, flattenedItemsList: ae } = pt(y), me = n(() => pe.value && !t.staticCategories), xe = n(() => me.value ? "treeitem" : "option"), Ne = n(() => {
|
|
2426
2517
|
if (t.multiple) {
|
|
2427
|
-
const
|
|
2428
|
-
return
|
|
2518
|
+
const M = Array.isArray(C.value) ? C.value.length : 0, ne = pe.value ? ae.value.length : y.value.length;
|
|
2519
|
+
return M === 0 ? null : !t.hasMoreItems && ne > 0 && ne === M ? b("all") : M;
|
|
2429
2520
|
}
|
|
2430
2521
|
return null;
|
|
2431
|
-
}),
|
|
2522
|
+
}), oe = n(
|
|
2523
|
+
() => te.value.find((M) => !t.isOptionDisabled?.(M))
|
|
2524
|
+
), ye = n(() => t.multiple || !D.value || !p.value ? "" : oe.value?.label ?? ""), Te = n(() => ye.value.toLocaleLowerCase().startsWith(q.value.toLocaleLowerCase()) ? ye.value.slice(q.value.length) : ""), Ce = n(
|
|
2525
|
+
() => !t.multiple && c.value && D.value && p.value && oe.value ? ct(_, oe.value.value) : null
|
|
2526
|
+
), Ie = n(
|
|
2527
|
+
() => Ce.value ? te.value.findIndex(({ value: M }) => M === oe.value?.value) : -1
|
|
2528
|
+
), Le = (M) => {
|
|
2529
|
+
q.value = M, p.value = !0;
|
|
2530
|
+
}, $e = n(
|
|
2432
2531
|
() => [
|
|
2433
|
-
t.description ?
|
|
2434
|
-
|
|
2435
|
-
t.errorMessage ?
|
|
2532
|
+
t.description ? w : null,
|
|
2533
|
+
N.value,
|
|
2534
|
+
t.errorMessage ? P : null
|
|
2436
2535
|
].filter(Boolean).join(" ") || null
|
|
2437
|
-
),
|
|
2438
|
-
const
|
|
2439
|
-
return
|
|
2440
|
-
}), { visibleDomOptions:
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
),
|
|
2445
|
-
|
|
2446
|
-
|
|
2536
|
+
), _e = n(() => {
|
|
2537
|
+
const M = v.value?.dropdownOptionsListboxRef;
|
|
2538
|
+
return M?.listboxRef?.value ?? M?.listboxRef;
|
|
2539
|
+
}), { visibleDomOptions: Ae, updateVisibleDomOptions: Oe } = We(
|
|
2540
|
+
_e,
|
|
2541
|
+
te,
|
|
2542
|
+
xe
|
|
2543
|
+
), De = () => {
|
|
2544
|
+
h.value || (c.value = !0, Z(() => {
|
|
2545
|
+
Oe();
|
|
2447
2546
|
}));
|
|
2448
|
-
},
|
|
2449
|
-
|
|
2450
|
-
},
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
}),
|
|
2454
|
-
},
|
|
2455
|
-
|
|
2456
|
-
},
|
|
2457
|
-
|
|
2547
|
+
}, f = () => {
|
|
2548
|
+
c.value = !1;
|
|
2549
|
+
}, g = () => {
|
|
2550
|
+
h.value || (c.value = !c.value, Z(() => {
|
|
2551
|
+
Oe();
|
|
2552
|
+
}), D.value && (q.value = ""));
|
|
2553
|
+
}, k = () => {
|
|
2554
|
+
D.value && (q.value = ""), c.value && (c.value = !1, v.value.onOutsideDropdownClick());
|
|
2555
|
+
}, $ = n(() => [
|
|
2556
|
+
k,
|
|
2458
2557
|
{
|
|
2459
|
-
ignore: [
|
|
2558
|
+
ignore: [_e]
|
|
2460
2559
|
}
|
|
2461
|
-
]),
|
|
2462
|
-
t.multiple || (
|
|
2463
|
-
},
|
|
2464
|
-
l(
|
|
2465
|
-
},
|
|
2560
|
+
]), V = async (M) => {
|
|
2561
|
+
t.multiple || (q.value = "", c.value = !1), E(M), m(T.value), t.multiple || (await Z(), Pe());
|
|
2562
|
+
}, j = async () => oe.value ? (await V([oe.value]), !0) : !1, B = () => {
|
|
2563
|
+
l(u.SHOW_MORE);
|
|
2564
|
+
}, Ee = Pa(
|
|
2466
2565
|
{
|
|
2467
|
-
inputContainerRef:
|
|
2468
|
-
optionsContainerRef:
|
|
2469
|
-
selectedValueIndex:
|
|
2470
|
-
isDropdownOpen:
|
|
2471
|
-
isDynamicFltering:
|
|
2472
|
-
items:
|
|
2473
|
-
isMultiple: t
|
|
2474
|
-
|
|
2475
|
-
|
|
2566
|
+
inputContainerRef: d,
|
|
2567
|
+
optionsContainerRef: v,
|
|
2568
|
+
selectedValueIndex: Se,
|
|
2569
|
+
isDropdownOpen: c,
|
|
2570
|
+
isDynamicFltering: H(t, "dynamicFiltering"),
|
|
2571
|
+
items: Ae,
|
|
2572
|
+
isMultiple: H(t, "multiple"),
|
|
2573
|
+
isSearching: D,
|
|
2574
|
+
activeDescendantIndex: Ie,
|
|
2575
|
+
selectFirstMatchedOption: j,
|
|
2576
|
+
totalItemCount: n(() => te.value.length),
|
|
2577
|
+
isVirtualScroll: !t?.multiple && t?.virtualScroll !== !1 && t?.lazyLoadType === "none",
|
|
2578
|
+
removeActiveDescendant: () => {
|
|
2579
|
+
p.value = !1;
|
|
2580
|
+
}
|
|
2476
2581
|
},
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
),
|
|
2582
|
+
g,
|
|
2583
|
+
De,
|
|
2584
|
+
f
|
|
2585
|
+
), qe = Fa(
|
|
2481
2586
|
{
|
|
2482
|
-
inputContainerRef:
|
|
2483
|
-
isDropdownOpen:
|
|
2587
|
+
inputContainerRef: d,
|
|
2588
|
+
isDropdownOpen: c
|
|
2484
2589
|
},
|
|
2485
|
-
|
|
2486
|
-
),
|
|
2487
|
-
[
|
|
2488
|
-
[
|
|
2489
|
-
[
|
|
2490
|
-
...
|
|
2590
|
+
f
|
|
2591
|
+
), yt = {
|
|
2592
|
+
[u.CLOSE_DROPDOWN]: f,
|
|
2593
|
+
[u.SELECT]: V,
|
|
2594
|
+
[u.SHOW_MORE]: B,
|
|
2595
|
+
...qe
|
|
2491
2596
|
};
|
|
2492
|
-
t.error &&
|
|
2597
|
+
t.error && Fe(
|
|
2493
2598
|
'BentoDropdown "error" property',
|
|
2494
2599
|
`Use the BentoDropdown "errorMessage" property instead to indicate that there is a modifier error.
|
|
2495
2600
|
Having the field as "undefined" will hide/remove the error.
|
|
2496
2601
|
<bento-dropdown errorMessage="Error message text" />`,
|
|
2497
2602
|
"2.0.0"
|
|
2498
|
-
), t.size &&
|
|
2603
|
+
), t.size && Fe('BentoDropdown "size" property', "Do not use. Only 'default' size should be used.", "2.0.0"), t.value && Fe(
|
|
2499
2604
|
'BentoDropdown "value" property',
|
|
2500
2605
|
`The use of "value" prop in "BentoDropdown" is no longer supported.
|
|
2501
2606
|
Use the "v-model" or "model-value" property instead.`,
|
|
2502
2607
|
"2.0.0"
|
|
2503
2608
|
);
|
|
2504
|
-
const
|
|
2505
|
-
|
|
2506
|
-
},
|
|
2507
|
-
if (await
|
|
2609
|
+
const Pe = () => {
|
|
2610
|
+
d.value?.focus();
|
|
2611
|
+
}, Ye = async () => {
|
|
2612
|
+
if (await Z(), !c.value || t.multiple || !v.value)
|
|
2508
2613
|
return;
|
|
2509
|
-
const
|
|
2510
|
-
if (
|
|
2614
|
+
const M = Se.value;
|
|
2615
|
+
if (M <= 0)
|
|
2511
2616
|
return;
|
|
2512
|
-
const
|
|
2513
|
-
|
|
2617
|
+
const ne = v.value.dropdownOptionsListboxRef, se = ne?.listboxRef;
|
|
2618
|
+
ne?.listboxItemRef?.scrollToItem?.(M, se);
|
|
2514
2619
|
};
|
|
2515
|
-
return
|
|
2516
|
-
() =>
|
|
2517
|
-
(
|
|
2518
|
-
|
|
2620
|
+
return ee(
|
|
2621
|
+
() => c.value,
|
|
2622
|
+
(M) => {
|
|
2623
|
+
M && (l("open"), Ye());
|
|
2519
2624
|
}
|
|
2520
2625
|
), e({
|
|
2521
|
-
focus:
|
|
2522
|
-
}), { __sfc: !0, attrs:
|
|
2626
|
+
focus: Pe
|
|
2627
|
+
}), { __sfc: !0, attrs: o, slots: s, hasSlot: i, props: t, emit: l, t: b, emitValue: m, inputContainerRef: d, inputContainerRefWrapper: r, optionsContainerRef: v, isDropdownOpen: c, shouldShowActiveDescendant: p, dropdownOptionsContainerId: _, labelId: O, descriptionId: w, errorId: P, isReadOnly: h, dropdownValue: C, cachedSelectedListboxOptions: S, cachedListboxSelectedValues: T, setCachedValues: E, ariaLabelAttribute: A, ariaDescribedByAttribute: N, ariaLabel: Y, label: G, computedAriaLabelFallbackMessage: L, computedAriaLabel: I, isInputComponent: R, computedSize: F, conditionalClasses: J, descriptionConditionalClasses: X, searchTerm: q, items: y, staticCategories: Q, filteredItems: te, isSearching: D, displayValue: ve, selectedValueItem: we, selectedValueIndex: Se, isMultiLevelSelect: pe, flattenedItemsList: ae, isTreePattern: me, computedOptionRole: xe, additionalItemsSelected: Ne, firstEnabledFilteredItem: oe, autocompleteSuggestion: ye, autocompleteSuggestionSuffix: Te, activeDescendantId: Ce, activeDescendantIndex: Ie, onSearchTermInput: Le, ariaDescribedBy: $e, listboxRef: _e, visibleDomOptions: Ae, updateVisibleDomOptions: Oe, openDropdown: De, closeDropdown: f, toggleDropdown: g, clickOutsideDropdown: k, clickOutsideDropdownOptions: $, onOptionSelected: V, selectFirstMatchedOption: j, emitShowMoreEvent: B, textboxKeyboardNavigationListeners: Ee, listboxKeyboardNavigationListeners: qe, listboxListeners: yt, focus: Pe, scrollToSelectedOption: Ye, BentoDropdownOptionsContainer: na, BentoTypography: ue, ErrorMessage: Rt, FieldLabel: Bt, BentoTeleport: Dt, vBentoClickOutsideDirective: kt, vBentoKeyboardNavigationDirective: Re };
|
|
2523
2628
|
}
|
|
2524
2629
|
});
|
|
2525
|
-
var
|
|
2630
|
+
var Wa = function() {
|
|
2526
2631
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
2527
|
-
return l("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: t.clickOutsideDropdownOptions, expression: "clickOutsideDropdownOptions" }], staticClass: "b-dropdown", class: t.conditionalClasses }, [t.label ? l(t.FieldLabel, { attrs: { id: t.labelId, condensed: e.condensed, label: t.label, "tooltip-text": e.tooltipText, optional: e.optional, required: e.required } }) : e._e(), l("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "inputContainerRefWrapper" }, t.textboxKeyboardNavigationListeners), [l(t.computedSize, { ref: "inputContainerRef", tag: "component", attrs: { condensed: e.condensed, value: t.searchTerm, "additional-items-selected": t.additionalItemsSelected, "aria-controls": t.dropdownOptionsContainerId, ariaExpanded: t.isDropdownOpen, "aria-labelledby": t.label ? t.labelId : null, "aria-describedby": t.ariaDescribedBy, "aria-label": t.computedAriaLabel, "aria-readonly": t.isReadOnly, "aria-required": e.required, readonly: t.isReadOnly, disabled: e.disabled, "display-value": t.displayValue, "dynamic-filtering": e.dynamicFiltering, "is-invalid": !!e.errorMessage || e.error, multiple: e.multiple, open: t.isDropdownOpen, "selected-value-item": t.isInputComponent ? void 0 : t.selectedValueItem, "show-slot-content-in-multiple": e.showSlotContentInMultiple }, on: { input: function(
|
|
2528
|
-
t.searchTerm
|
|
2529
|
-
},
|
|
2530
|
-
return { key:
|
|
2531
|
-
return [e._t(
|
|
2632
|
+
return l("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: t.clickOutsideDropdownOptions, expression: "clickOutsideDropdownOptions" }], staticClass: "b-dropdown", class: t.conditionalClasses }, [t.label ? l(t.FieldLabel, { attrs: { id: t.labelId, condensed: e.condensed, label: t.label, "tooltip-text": e.tooltipText, optional: e.optional, required: e.required } }) : e._e(), l("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "inputContainerRefWrapper" }, t.textboxKeyboardNavigationListeners), [l(t.computedSize, { ref: "inputContainerRef", tag: "component", attrs: { condensed: e.condensed, value: t.searchTerm, "additional-items-selected": t.additionalItemsSelected, "aria-controls": t.dropdownOptionsContainerId, "aria-active-descendant": t.activeDescendantId, ariaExpanded: t.isDropdownOpen, "aria-labelledby": t.label ? t.labelId : null, "aria-describedby": t.ariaDescribedBy, "aria-label": t.computedAriaLabel, "aria-readonly": t.isReadOnly, "aria-required": e.required, readonly: t.isReadOnly, disabled: e.disabled, "display-value": t.displayValue, "dynamic-filtering": e.dynamicFiltering, "has-selected-value": t.cachedSelectedListboxOptions.length > 0, "is-invalid": !!e.errorMessage || e.error, multiple: e.multiple, open: t.isDropdownOpen, "selected-value-item": t.isInputComponent ? void 0 : t.selectedValueItem, "show-slot-content-in-multiple": e.showSlotContentInMultiple }, on: { input: t.onSearchTermInput, open: t.toggleDropdown, close: t.toggleDropdown }, scopedSlots: e._u([{ key: "autocomplete-suggestion", fn: function() {
|
|
2633
|
+
return [t.autocompleteSuggestionSuffix ? [l("span", { staticClass: "b-dropdown__autocomplete-hidden-prefix" }, [e._v(e._s(t.searchTerm))]), e._v(e._s(t.autocompleteSuggestionSuffix) + " ")] : e._e()];
|
|
2634
|
+
}, proxy: !0 }, e._l(t.slots, function(o, s) {
|
|
2635
|
+
return { key: s, fn: function(i) {
|
|
2636
|
+
return [e._t(s, null, null, i)];
|
|
2532
2637
|
} };
|
|
2533
|
-
})], null, !0) })], 1), t.inputContainerRef ? l(t.BentoTeleport, { attrs: { disabled: e.teleport?.disabled, to: e.teleport?.to } }, [l(t.BentoDropdownOptionsContainer, e._g({ ref: "optionsContainerRef", attrs: { id: t.dropdownOptionsContainerId, "aria-label": t.computedAriaLabel, "component-loading": e.componentLoading, "empty-state": e.emptyState, disabled: e.disabled, "is-option-disabled": e.isOptionDisabled, items: t.filteredItems, multiple: e.multiple, "static-categories": t.staticCategories, open: t.isDropdownOpen, "selected-value": t.cachedSelectedListboxOptions, searching: t.isSearching, "target-element": t.inputContainerRefWrapper, loading: e.loading, "has-more-items": e.hasMoreItems, "lazy-load-type": e.lazyLoadType, "virtual-scroll": e.virtualScroll }, scopedSlots: e._u([e._l(t.slots, function(
|
|
2534
|
-
return { key:
|
|
2535
|
-
return [e._t(
|
|
2638
|
+
})], null, !0) })], 1), t.inputContainerRef ? l(t.BentoTeleport, { attrs: { disabled: e.teleport?.disabled, to: e.teleport?.to } }, [l(t.BentoDropdownOptionsContainer, e._g({ ref: "optionsContainerRef", attrs: { id: t.dropdownOptionsContainerId, "aria-label": t.computedAriaLabel, "active-descendant-id": t.activeDescendantId, "component-loading": e.componentLoading, "empty-state": e.emptyState, disabled: e.disabled, "is-option-disabled": e.isOptionDisabled, items: t.filteredItems, multiple: e.multiple, "static-categories": t.staticCategories, open: t.isDropdownOpen, "selected-value": t.cachedSelectedListboxOptions, searching: t.isSearching, "target-element": t.inputContainerRefWrapper, loading: e.loading, "has-more-items": e.hasMoreItems, "lazy-load-type": e.lazyLoadType, "virtual-scroll": e.virtualScroll }, scopedSlots: e._u([e._l(t.slots, function(o, s) {
|
|
2639
|
+
return { key: s, fn: function(i) {
|
|
2640
|
+
return [e._t(s, null, null, i)];
|
|
2536
2641
|
} };
|
|
2537
2642
|
})], null, !0) }, t.listboxListeners))], 1) : e._e(), e.errorMessage ? l(t.ErrorMessage, { staticClass: "b-dropdown__error-message", attrs: { id: t.errorId, "error-message": e.errorMessage } }) : e._e(), e.description || t.hasSlot("description") ? l(t.BentoTypography, { staticClass: "b-dropdown__description", class: t.descriptionConditionalClasses, attrs: { id: t.descriptionId, el: "span" } }, [e._t("description", function() {
|
|
2538
2643
|
return [e._v(" " + e._s(e.description) + " ")];
|
|
2539
2644
|
})], 2) : e._e()], 1);
|
|
2540
|
-
},
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2645
|
+
}, Ka = [], qa = /* @__PURE__ */ W(
|
|
2646
|
+
Ua,
|
|
2647
|
+
Wa,
|
|
2648
|
+
Ka,
|
|
2544
2649
|
!1,
|
|
2545
2650
|
null,
|
|
2546
|
-
"
|
|
2651
|
+
"824ac155"
|
|
2547
2652
|
);
|
|
2548
|
-
const
|
|
2653
|
+
const xo = qa.exports;
|
|
2549
2654
|
export {
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2655
|
+
xo as B,
|
|
2656
|
+
Ht as C,
|
|
2657
|
+
ga as D,
|
|
2658
|
+
u as a,
|
|
2659
|
+
re as b,
|
|
2660
|
+
ge as c,
|
|
2661
|
+
Ve as d,
|
|
2662
|
+
pt as e,
|
|
2663
|
+
Va as f,
|
|
2664
|
+
ft as g,
|
|
2665
|
+
ia as h,
|
|
2666
|
+
bt as i,
|
|
2667
|
+
Ke as j,
|
|
2668
|
+
Zl as u
|
|
2564
2669
|
};
|
|
2565
|
-
//# sourceMappingURL=dropdown.
|
|
2670
|
+
//# sourceMappingURL=dropdown.D1HNF4S9.js.map
|