@adyen/bento-vue2 1.100.0 → 1.100.1
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/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.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/checkbox.js +2 -2
- package/dist/chunks/{calendar.BKddGc3j.js → calendar.CuGedgRq.js} +2 -2
- package/dist/chunks/{calendar.BKddGc3j.js.map → calendar.CuGedgRq.js.map} +1 -1
- package/dist/chunks/{checkbox-group.mgC7eJkE.js → checkbox-group.BpGBZsvv.js} +2 -2
- package/dist/chunks/{checkbox-group.mgC7eJkE.js.map → checkbox-group.BpGBZsvv.js.map} +1 -1
- package/dist/chunks/{checkbox.CBawZCc6.js → checkbox.G0GNZZ9K.js} +18 -18
- package/dist/chunks/{checkbox.CBawZCc6.js.map → checkbox.G0GNZZ9K.js.map} +1 -1
- package/dist/chunks/{code-snippet.CY_C6Xyz.js → code-snippet.dvAB8CG2.js} +2 -2
- package/dist/chunks/{code-snippet.CY_C6Xyz.js.map → code-snippet.dvAB8CG2.js.map} +1 -1
- package/dist/chunks/{data-grid.D26rPQcn.js → data-grid.BpitDm6u.js} +6 -6
- package/dist/chunks/{data-grid.D26rPQcn.js.map → data-grid.BpitDm6u.js.map} +1 -1
- package/dist/chunks/{date-picker.nNtLItmg.js → date-picker.BTwRnmEE.js} +5 -5
- package/dist/chunks/{date-picker.nNtLItmg.js.map → date-picker.BTwRnmEE.js.map} +1 -1
- package/dist/chunks/{date-range-picker.DL-oePHl.js → date-range-picker.BcDYTeav.js} +6 -6
- package/dist/chunks/{date-range-picker.DL-oePHl.js.map → date-range-picker.BcDYTeav.js.map} +1 -1
- package/dist/chunks/{date-time-picker.D89IemgM.js → date-time-picker.Bt0DDn-2.js} +5 -5
- package/dist/chunks/{date-time-picker.D89IemgM.js.map → date-time-picker.Bt0DDn-2.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.CCItycfH.js → dropdown-tag.pcDELtyg.js} +2 -2
- package/dist/chunks/{dropdown-tag.CCItycfH.js.map → dropdown-tag.pcDELtyg.js.map} +1 -1
- package/dist/chunks/{dropdown.CLHXtH0r.js → dropdown.C0k4Mkmd.js} +900 -895
- package/dist/chunks/dropdown.C0k4Mkmd.js.map +1 -0
- package/dist/chunks/{filter-bar.Dq3fo3rZ.js → filter-bar.uUFaDsK3.js} +9 -9
- package/dist/chunks/{filter-bar.Dq3fo3rZ.js.map → filter-bar.uUFaDsK3.js.map} +1 -1
- package/dist/chunks/{header-with-views.yjk4GuOn.js → header-with-views.F1_U1yrc.js} +4 -4
- package/dist/chunks/{header-with-views.yjk4GuOn.js.map → header-with-views.F1_U1yrc.js.map} +1 -1
- package/dist/chunks/{input-field-password.Dkty2s5M.js → input-field-password.Dz856XUp.js} +2 -2
- package/dist/chunks/{input-field-password.Dkty2s5M.js.map → input-field-password.Dz856XUp.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.CdT4hLCR.js → input-field-phone-number.TxUJwMmR.js} +2 -2
- package/dist/chunks/{input-field-phone-number.CdT4hLCR.js.map → input-field-phone-number.TxUJwMmR.js.map} +1 -1
- package/dist/chunks/{input-field.3BC9gdvi.js → input-field.DCPT-CRs.js} +2 -2
- package/dist/chunks/{input-field.3BC9gdvi.js.map → input-field.DCPT-CRs.js.map} +1 -1
- package/dist/chunks/{input-time.OTVaDCFj.js → input-time.iiPk0s3u.js} +3 -3
- package/dist/chunks/{input-time.OTVaDCFj.js.map → input-time.iiPk0s3u.js.map} +1 -1
- package/dist/chunks/{pagination.9fxG-UWo.js → pagination.-DeOPaif.js} +2 -2
- package/dist/chunks/{pagination.9fxG-UWo.js.map → pagination.-DeOPaif.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.DYfdUHI6.js → rich-text-editor.DFYV7H5M.js} +2 -2
- package/dist/chunks/{rich-text-editor.DYfdUHI6.js.map → rich-text-editor.DFYV7H5M.js.map} +1 -1
- package/dist/chunks/{search-bar.d8qlBngk.js → search-bar.BoMt-y2O.js} +3 -3
- package/dist/chunks/{search-bar.d8qlBngk.js.map → search-bar.BoMt-y2O.js.map} +1 -1
- package/dist/chunks/{secondary-nav.BQ6DM8_b.js → secondary-nav.BjOKDyzy.js} +2 -2
- package/dist/chunks/{secondary-nav.BQ6DM8_b.js.map → secondary-nav.BjOKDyzy.js.map} +1 -1
- package/dist/chunks/{selection-card-group.lNZ8z318.js → selection-card-group.BNoKeTnh.js} +8 -8
- package/dist/chunks/{selection-card-group.lNZ8z318.js.map → selection-card-group.BNoKeTnh.js.map} +1 -1
- package/dist/chunks/{use-date-input-formatter.BR_O2GeY.js → use-date-input-formatter.HUulWm5Y.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.BR_O2GeY.js.map → use-date-input-formatter.HUulWm5Y.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 +21 -21
- 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/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/chunks/dropdown.CLHXtH0r.js.map +0 -1
|
@@ -1,55 +1,55 @@
|
|
|
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 E, onMounted as ct, onUnmounted as ut, watch as oe, defineComponent as U, nextTick as j, toRef as W, useSlots as Oe, useAttrs as Ve, toRefs as Xe, inject as ze } from "vue";
|
|
2
|
+
import { B as re, d as $e } from "./typography.C8lPlsbD.js";
|
|
3
|
+
import { g as ie } from "./generate-uid.NJ8tVoha.js";
|
|
4
|
+
import { u as fe } from "./index.B6WW_F-J.js";
|
|
5
|
+
import { s as pe } from "./events.BQOQSSb7.js";
|
|
6
|
+
import { u as Ze } from "./use-has-slot.C9lQZ6nz.js";
|
|
7
|
+
import { C as dt } from "./cross-circle-fill.DTDtgLMf.js";
|
|
8
|
+
import { C as pt } from "./cross-circle-fill-small.DfxDedRr.js";
|
|
9
|
+
import { n as G } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
10
|
+
import { C as Qe } from "./chevron-down.eYtgv5ly.js";
|
|
11
|
+
import { C as et } from "./chevron-up.d8cwIlA_.js";
|
|
12
12
|
/* empty css */
|
|
13
|
-
import { u as
|
|
14
|
-
import { u as
|
|
15
|
-
import { u as
|
|
13
|
+
import { u as ft } from "./aria-label.CaUURpnB.js";
|
|
14
|
+
import { u as bt } from "./form-field.D_2g7vaP.js";
|
|
15
|
+
import { u as vt } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
16
16
|
import { B as z, a as ke } from "./keyboard-navigation.DWmhelVv.js";
|
|
17
|
-
import { B as
|
|
18
|
-
import { B as
|
|
19
|
-
import { o as
|
|
17
|
+
import { B as mt } from "./loading-indicator.PxbRzshH.js";
|
|
18
|
+
import { B as _t } from "./empty-state.Be3Np0rd.js";
|
|
19
|
+
import { o as yt } from "./resize.Bqks3WUm.js";
|
|
20
20
|
import "./index.Cl4_42j5.js";
|
|
21
|
-
import { C as De, N as
|
|
22
|
-
import { C as
|
|
23
|
-
import { B as
|
|
24
|
-
import { a as
|
|
25
|
-
import { B as
|
|
26
|
-
import { F as
|
|
27
|
-
import { E as
|
|
28
|
-
import { P as
|
|
21
|
+
import { C as De, N as gt } from "./minus-small.DJacLGTw.js";
|
|
22
|
+
import { C as ht } from "./checkmark-small.DVDtD4HQ.js";
|
|
23
|
+
import { B as St } from "./chip.BFY_-VCz.js";
|
|
24
|
+
import { a as xt, b as Ke, h as Ct, e as Ot } from "./button-actions.Dxez8SNL.js";
|
|
25
|
+
import { B as Et } from "./directive.BBWhsNtO.js";
|
|
26
|
+
import { F as It } from "./field-label.CkMM3cXO.js";
|
|
27
|
+
import { E as Lt } from "./error-message.CyERcfdt.js";
|
|
28
|
+
import { P as qe } from "./popper-container.dxpRn9a5.js";
|
|
29
29
|
import "../assets/dropdown.css";
|
|
30
|
-
const
|
|
31
|
-
const
|
|
30
|
+
const tt = (a, e, l, t) => {
|
|
31
|
+
const o = n(
|
|
32
32
|
() => {
|
|
33
|
-
var r,
|
|
34
|
-
return !!((r = a.value) != null && r.length) && ((
|
|
33
|
+
var r, _;
|
|
34
|
+
return !!((r = a.value) != null && r.length) && ((_ = a.value) == null ? void 0 : _.length) === e.value.length;
|
|
35
35
|
}
|
|
36
|
-
),
|
|
36
|
+
), s = n(() => {
|
|
37
37
|
var r;
|
|
38
38
|
return a.value == null || a.value.length === 0 ? !1 : ((r = a.value) == null ? void 0 : r.length) !== e.value.length;
|
|
39
39
|
});
|
|
40
40
|
return {
|
|
41
|
-
isAllSelected:
|
|
42
|
-
isIndeterminate:
|
|
41
|
+
isAllSelected: o,
|
|
42
|
+
isIndeterminate: s,
|
|
43
43
|
toggleSelectAll: (r) => {
|
|
44
44
|
r ? l() : t();
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
|
-
function
|
|
49
|
-
const
|
|
48
|
+
function Tt(a, { disabled: e, itemHeight: l, overscan: t = 5, prefixHeight: o }) {
|
|
49
|
+
const s = E(null), i = E([]), r = E(0), _ = E(0), p = E(0);
|
|
50
50
|
let c;
|
|
51
|
-
const
|
|
52
|
-
const b = typeof l == "number" ? a.value.length * l : a.value.reduce((
|
|
51
|
+
const m = n(() => {
|
|
52
|
+
const b = typeof l == "number" ? a.value.length * l : a.value.reduce((L, T, w) => L + l(w), 0), O = typeof l == "number" ? r.value * l : a.value.slice(0, r.value).reduce((L, T, w) => L + l(w), 0);
|
|
53
53
|
return {
|
|
54
54
|
style: {
|
|
55
55
|
marginTop: `${O}px`,
|
|
@@ -57,61 +57,61 @@ function At(a, { disabled: e, itemHeight: l, overscan: t = 5, prefixHeight: s })
|
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
}), f = () => {
|
|
60
|
-
const b = (
|
|
60
|
+
const b = (o == null ? void 0 : o.value) ?? 0, O = Math.max(s.value.scrollTop - b, 0);
|
|
61
61
|
if (typeof l == "number")
|
|
62
62
|
return Math.floor(O / l);
|
|
63
|
-
let
|
|
63
|
+
let L = 0, T = 0;
|
|
64
64
|
for (let w = 0; w < a.value.length; w += 1) {
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
67
|
-
|
|
65
|
+
const F = l(w);
|
|
66
|
+
if (L += F, L >= O) {
|
|
67
|
+
T = w;
|
|
68
68
|
break;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
return
|
|
72
|
-
},
|
|
73
|
-
if (
|
|
74
|
-
return Math.ceil(
|
|
71
|
+
return T;
|
|
72
|
+
}, d = () => {
|
|
73
|
+
if (p.value = s.value.clientHeight, typeof l == "number")
|
|
74
|
+
return Math.ceil(p.value / l);
|
|
75
75
|
const b = r.value ?? 0;
|
|
76
|
-
let O = 0,
|
|
77
|
-
for (let
|
|
78
|
-
const w = l(
|
|
79
|
-
if (O += w,
|
|
76
|
+
let O = 0, L = 0;
|
|
77
|
+
for (let T = b; T < a.value.length; T += 1) {
|
|
78
|
+
const w = l(T);
|
|
79
|
+
if (O += w, L = T, O > p.value)
|
|
80
80
|
break;
|
|
81
81
|
}
|
|
82
|
-
return
|
|
82
|
+
return L - b;
|
|
83
83
|
}, S = () => {
|
|
84
|
-
if (
|
|
85
|
-
const b =
|
|
86
|
-
r.value = f(),
|
|
84
|
+
if (s.value) {
|
|
85
|
+
const b = d();
|
|
86
|
+
r.value = f(), _.value = Math.min(r.value + b + t, a.value.length), i.value = a.value.slice(r.value, _.value);
|
|
87
87
|
}
|
|
88
|
-
},
|
|
88
|
+
}, y = () => {
|
|
89
89
|
S();
|
|
90
90
|
};
|
|
91
|
-
e || (
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
e || (ct(() => {
|
|
92
|
+
s.value && (p.value = s.value.clientHeight, c = yt(s.value, ({ clientHeight: b }) => {
|
|
93
|
+
p.value = b, S();
|
|
94
94
|
}), S());
|
|
95
|
-
}),
|
|
95
|
+
}), ut(() => {
|
|
96
96
|
c == null || c.disconnect();
|
|
97
|
-
}),
|
|
97
|
+
}), oe(
|
|
98
98
|
() => a.value,
|
|
99
99
|
() => {
|
|
100
100
|
S();
|
|
101
101
|
}
|
|
102
102
|
));
|
|
103
|
-
const
|
|
104
|
-
ref:
|
|
103
|
+
const B = {
|
|
104
|
+
ref: s,
|
|
105
105
|
style: { overflowY: "auto" }
|
|
106
|
-
},
|
|
107
|
-
if (!
|
|
106
|
+
}, R = (b) => {
|
|
107
|
+
if (!s.value)
|
|
108
108
|
return;
|
|
109
|
-
const O = typeof l == "number" ? b * l : a.value.slice(0, b).reduce((
|
|
110
|
-
|
|
109
|
+
const O = typeof l == "number" ? b * l : a.value.slice(0, b).reduce((k, v, A) => k + l(A), 0), L = typeof l == "number" ? l : l(b), T = O + L, { scrollTop: w, clientHeight: F } = s.value, I = w + F;
|
|
110
|
+
T > I ? s.value.scrollTop = F > 0 ? T - F : O : O < w && (s.value.scrollTop = O), S();
|
|
111
111
|
};
|
|
112
112
|
return e ? {
|
|
113
|
-
containerRef:
|
|
114
|
-
containerProps:
|
|
113
|
+
containerRef: s,
|
|
114
|
+
containerProps: B,
|
|
115
115
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
116
116
|
onScroll: () => {
|
|
117
117
|
},
|
|
@@ -119,22 +119,22 @@ function At(a, { disabled: e, itemHeight: l, overscan: t = 5, prefixHeight: s })
|
|
|
119
119
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
120
120
|
scrollToIndex: () => {
|
|
121
121
|
},
|
|
122
|
-
startIndex:
|
|
122
|
+
startIndex: E(0)
|
|
123
123
|
} : {
|
|
124
|
-
containerRef:
|
|
125
|
-
containerProps:
|
|
126
|
-
onScroll:
|
|
124
|
+
containerRef: s,
|
|
125
|
+
containerProps: B,
|
|
126
|
+
onScroll: y,
|
|
127
127
|
list: i,
|
|
128
|
-
wrapperProps:
|
|
129
|
-
scrollToIndex:
|
|
128
|
+
wrapperProps: m,
|
|
129
|
+
scrollToIndex: R,
|
|
130
130
|
startIndex: r
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
var
|
|
134
|
-
const
|
|
133
|
+
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 || {}), ne = /* @__PURE__ */ ((a) => (a.AUTOMATIC = "automatic", a.BUTTON = "button", a.NONE = "none", a))(ne || {});
|
|
134
|
+
const wt = U({
|
|
135
135
|
name: "bento-listbox-static-category",
|
|
136
136
|
components: {
|
|
137
|
-
BentoTypography:
|
|
137
|
+
BentoTypography: re
|
|
138
138
|
},
|
|
139
139
|
props: {
|
|
140
140
|
/**
|
|
@@ -146,18 +146,18 @@ const Dt = U({
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
});
|
|
149
|
-
var
|
|
149
|
+
var At = function() {
|
|
150
150
|
var e = this, l = e._self._c;
|
|
151
151
|
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);
|
|
152
|
-
},
|
|
152
|
+
}, Dt = [], kt = /* @__PURE__ */ G(
|
|
153
|
+
wt,
|
|
154
|
+
At,
|
|
153
155
|
Dt,
|
|
154
|
-
kt,
|
|
155
|
-
Bt,
|
|
156
156
|
!1,
|
|
157
157
|
null,
|
|
158
158
|
"bfbc1649"
|
|
159
159
|
);
|
|
160
|
-
const
|
|
160
|
+
const Bt = kt.exports, Rt = U({
|
|
161
161
|
name: "bento-listbox-option",
|
|
162
162
|
props: {
|
|
163
163
|
/**
|
|
@@ -169,7 +169,7 @@ const Mt = Rt.exports, Nt = U({
|
|
|
169
169
|
*/
|
|
170
170
|
selected: { type: Boolean, default: !1 }
|
|
171
171
|
},
|
|
172
|
-
emits: [
|
|
172
|
+
emits: [u.CLICK, u.ENTER, u.SPACE, u.TAB],
|
|
173
173
|
setup(a, { emit: e }) {
|
|
174
174
|
const l = n(() => ({
|
|
175
175
|
"b-listbox-option--disabled": a.disabled,
|
|
@@ -178,20 +178,20 @@ const Mt = Rt.exports, Nt = U({
|
|
|
178
178
|
return {
|
|
179
179
|
// Enums
|
|
180
180
|
BentoKeyboardNavigationKeyDownEvent: z,
|
|
181
|
-
BentoListboxEvent:
|
|
181
|
+
BentoListboxEvent: u,
|
|
182
182
|
// Values
|
|
183
183
|
conditionalClasses: l,
|
|
184
184
|
// Events
|
|
185
|
-
onClick: (
|
|
186
|
-
e(
|
|
185
|
+
onClick: (s) => {
|
|
186
|
+
e(u.CLICK, s);
|
|
187
187
|
},
|
|
188
|
-
onOptionSelected: (
|
|
189
|
-
e(
|
|
188
|
+
onOptionSelected: (s, i) => {
|
|
189
|
+
e(s, i);
|
|
190
190
|
}
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
|
-
var
|
|
194
|
+
var Mt = function() {
|
|
195
195
|
var e = this, l = e._self._c;
|
|
196
196
|
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) {
|
|
197
197
|
return !t.type.indexOf("key") && e._k(t.keyCode, "enter", 13, t.key, "Enter") ? null : e.onOptionSelected(e.BentoListboxEvent.ENTER, t);
|
|
@@ -200,38 +200,38 @@ var $t = function() {
|
|
|
200
200
|
}, function(t) {
|
|
201
201
|
return !t.type.indexOf("key") && e._k(t.keyCode, "tab", 9, t.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, t);
|
|
202
202
|
}] } }, "div", e.$attrs, !1), [e._t("default")], 2);
|
|
203
|
-
},
|
|
203
|
+
}, Nt = [], $t = /* @__PURE__ */ G(
|
|
204
|
+
Rt,
|
|
205
|
+
Mt,
|
|
204
206
|
Nt,
|
|
205
|
-
$t,
|
|
206
|
-
Pt,
|
|
207
207
|
!1,
|
|
208
208
|
null,
|
|
209
209
|
"c345b6c0"
|
|
210
210
|
);
|
|
211
|
-
const Be =
|
|
212
|
-
let
|
|
213
|
-
const
|
|
211
|
+
const Be = $t.exports;
|
|
212
|
+
let Ye = 0;
|
|
213
|
+
const Pt = {
|
|
214
214
|
beforeCreate() {
|
|
215
|
-
this.uuid =
|
|
215
|
+
this.uuid = Ye.toString(), Ye += 1;
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
|
-
var
|
|
218
|
+
var Ft = function() {
|
|
219
219
|
var e = this, l = e._self._c;
|
|
220
220
|
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" } })]);
|
|
221
|
-
},
|
|
221
|
+
}, Vt = [], zt = /* @__PURE__ */ G(
|
|
222
|
+
Pt,
|
|
223
|
+
Ft,
|
|
222
224
|
Vt,
|
|
223
|
-
zt,
|
|
224
|
-
Ut,
|
|
225
225
|
!1,
|
|
226
226
|
null,
|
|
227
227
|
null
|
|
228
228
|
);
|
|
229
|
-
const
|
|
229
|
+
const Ut = zt.exports, Gt = U({
|
|
230
230
|
name: "bento-listbox-single-select-option",
|
|
231
231
|
components: {
|
|
232
232
|
BentoListboxOption: Be,
|
|
233
|
-
BentoTypography:
|
|
234
|
-
CheckmarkIcon:
|
|
233
|
+
BentoTypography: re,
|
|
234
|
+
CheckmarkIcon: Ut
|
|
235
235
|
},
|
|
236
236
|
props: {
|
|
237
237
|
/**
|
|
@@ -251,24 +251,24 @@ const Kt = Gt.exports, qt = U({
|
|
|
251
251
|
*/
|
|
252
252
|
selected: { type: Boolean, default: !1 }
|
|
253
253
|
},
|
|
254
|
-
emits: [
|
|
254
|
+
emits: [u.ENTER, u.SELECT, u.SPACE, u.TAB],
|
|
255
255
|
setup(a, { emit: e }) {
|
|
256
256
|
const l = (i) => {
|
|
257
257
|
a.disabled || e(i, a.option);
|
|
258
|
-
}, t = n(() => a.disabled ? !0 : null),
|
|
258
|
+
}, t = n(() => a.disabled ? !0 : null), o = n(() => a.selected ? !0 : null), s = n(() => a.disabled ? -1 : 0);
|
|
259
259
|
return {
|
|
260
260
|
// Values
|
|
261
261
|
ariaDisabled: t,
|
|
262
|
-
ariaSelected:
|
|
263
|
-
tabIndex:
|
|
262
|
+
ariaSelected: o,
|
|
263
|
+
tabIndex: s,
|
|
264
264
|
// Enums
|
|
265
|
-
BentoListboxEvent:
|
|
265
|
+
BentoListboxEvent: u,
|
|
266
266
|
// Events
|
|
267
267
|
onOptionSelected: l
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
270
|
});
|
|
271
|
-
var
|
|
271
|
+
var Kt = function() {
|
|
272
272
|
var e = this, l = e._self._c;
|
|
273
273
|
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) {
|
|
274
274
|
return e.onOptionSelected(e.BentoListboxEvent.SELECT);
|
|
@@ -281,85 +281,85 @@ var Yt = function() {
|
|
|
281
281
|
} } }, [e._t("default", function() {
|
|
282
282
|
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)];
|
|
283
283
|
}, 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);
|
|
284
|
-
},
|
|
284
|
+
}, qt = [], Yt = /* @__PURE__ */ G(
|
|
285
|
+
Gt,
|
|
286
|
+
Kt,
|
|
285
287
|
qt,
|
|
286
|
-
Yt,
|
|
287
|
-
Wt,
|
|
288
288
|
!1,
|
|
289
289
|
null,
|
|
290
290
|
"bb14d75a"
|
|
291
291
|
);
|
|
292
|
-
const
|
|
293
|
-
const t = n(() => e != null && e.value ? e.value - 1 : a.value.length - 1),
|
|
294
|
-
switch (
|
|
292
|
+
const Wt = Yt.exports, lt = ({ items: a, totalItemCount: e }, l) => {
|
|
293
|
+
const t = n(() => e != null && e.value ? e.value - 1 : a.value.length - 1), o = E(0), s = (d) => {
|
|
294
|
+
switch (d) {
|
|
295
295
|
case "increase":
|
|
296
|
-
|
|
296
|
+
o.value += 1;
|
|
297
297
|
break;
|
|
298
298
|
case "decrease":
|
|
299
|
-
|
|
299
|
+
o.value -= 1;
|
|
300
300
|
break;
|
|
301
301
|
}
|
|
302
|
-
}, i = ({ edgeCaseItem:
|
|
303
|
-
|
|
304
|
-
}, r = (
|
|
305
|
-
f(
|
|
302
|
+
}, i = ({ edgeCaseItem: d }, S) => {
|
|
303
|
+
o.value !== d && (s(S), l(o.value));
|
|
304
|
+
}, r = (d) => {
|
|
305
|
+
f(d), i(
|
|
306
306
|
{
|
|
307
307
|
edgeCaseItem: t.value
|
|
308
308
|
},
|
|
309
309
|
"increase"
|
|
310
310
|
/* INCREASE */
|
|
311
311
|
);
|
|
312
|
-
},
|
|
313
|
-
f(
|
|
312
|
+
}, _ = (d) => {
|
|
313
|
+
f(d), i(
|
|
314
314
|
{
|
|
315
315
|
edgeCaseItem: 0
|
|
316
316
|
},
|
|
317
317
|
"decrease"
|
|
318
318
|
/* DECREASE */
|
|
319
319
|
);
|
|
320
|
-
},
|
|
321
|
-
f(
|
|
322
|
-
}, c = (
|
|
323
|
-
f(
|
|
324
|
-
},
|
|
325
|
-
|
|
326
|
-
}, f = (
|
|
327
|
-
var S,
|
|
328
|
-
(S =
|
|
320
|
+
}, p = (d) => {
|
|
321
|
+
f(d), o.value = 0, l(o.value);
|
|
322
|
+
}, c = (d) => {
|
|
323
|
+
f(d), o.value = t.value, l(o.value);
|
|
324
|
+
}, m = (d) => {
|
|
325
|
+
o.value = d;
|
|
326
|
+
}, f = (d) => {
|
|
327
|
+
var S, y;
|
|
328
|
+
(S = d == null ? void 0 : d.detail) == null || S.preventDefault(), (y = d == null ? void 0 : d.detail) == null || y.stopPropagation();
|
|
329
329
|
};
|
|
330
330
|
return {
|
|
331
|
-
moveToFirstElement:
|
|
331
|
+
moveToFirstElement: p,
|
|
332
332
|
moveToLastElement: c,
|
|
333
333
|
moveToNextElement: r,
|
|
334
|
-
moveToPreviousElement:
|
|
335
|
-
setListboxFocusedIndex:
|
|
334
|
+
moveToPreviousElement: _,
|
|
335
|
+
setListboxFocusedIndex: m,
|
|
336
336
|
preventDefault: f,
|
|
337
|
-
focusedIndex:
|
|
337
|
+
focusedIndex: o
|
|
338
338
|
};
|
|
339
|
-
}, Ue = (a, e, l =
|
|
340
|
-
const
|
|
339
|
+
}, Ue = (a, e, l = E("option"), t = !0) => {
|
|
340
|
+
const o = E([]), s = async () => {
|
|
341
341
|
if (!a.value || a.value.nodeType === Node.COMMENT_NODE)
|
|
342
342
|
return;
|
|
343
343
|
const i = Array.from(a.value.querySelectorAll(`[role="${l.value}"]`));
|
|
344
|
-
|
|
344
|
+
o.value = t ? i.filter((r) => r.checkVisibility()) : i;
|
|
345
345
|
};
|
|
346
|
-
return
|
|
346
|
+
return oe(
|
|
347
347
|
e,
|
|
348
348
|
() => {
|
|
349
349
|
j(() => {
|
|
350
|
-
|
|
350
|
+
s();
|
|
351
351
|
});
|
|
352
352
|
},
|
|
353
353
|
{ immediate: !0 }
|
|
354
354
|
), {
|
|
355
|
-
visibleDomOptions:
|
|
356
|
-
updateVisibleDomOptions:
|
|
355
|
+
visibleDomOptions: o,
|
|
356
|
+
updateVisibleDomOptions: s
|
|
357
357
|
};
|
|
358
|
-
},
|
|
358
|
+
}, jt = U({
|
|
359
359
|
name: "bento-listbox-single-select",
|
|
360
360
|
components: {
|
|
361
|
-
BentoListboxSingleSelectCategory:
|
|
362
|
-
BentoListboxSingleSelectOption:
|
|
361
|
+
BentoListboxSingleSelectCategory: Bt,
|
|
362
|
+
BentoListboxSingleSelectOption: Wt
|
|
363
363
|
},
|
|
364
364
|
directives: { BentoKeyboardNavigationDirective: ke },
|
|
365
365
|
inheritAttrs: !1,
|
|
@@ -415,74 +415,78 @@ const Ht = jt.exports, st = ({ items: a, totalItemCount: e }, l) => {
|
|
|
415
415
|
*/
|
|
416
416
|
virtualScrollStartIndex: { type: Number, default: 0 }
|
|
417
417
|
},
|
|
418
|
-
emits: [
|
|
419
|
-
setup(a, { emit: e, expose: l, slots: t, attrs:
|
|
420
|
-
const
|
|
421
|
-
var
|
|
422
|
-
return !!((
|
|
423
|
-
}),
|
|
418
|
+
emits: [u.SELECT, u.ENTER, u.SPACE, u.TAB],
|
|
419
|
+
setup(a, { emit: e, expose: l, slots: t, attrs: o }) {
|
|
420
|
+
const s = E(), i = E([]), r = n(() => {
|
|
421
|
+
var v;
|
|
422
|
+
return !!((v = a.selectedValue) != null && v.length) && a.selectedValue.at(0);
|
|
423
|
+
}), _ = n(
|
|
424
424
|
() => {
|
|
425
|
-
var
|
|
425
|
+
var v, A, M, g;
|
|
426
426
|
return {
|
|
427
|
-
"aria-label": (
|
|
428
|
-
"aria-busy": (
|
|
429
|
-
"aria-atomic": (
|
|
430
|
-
"aria-live": (
|
|
427
|
+
"aria-label": (v = o["aria-label"]) == null ? void 0 : v.toString(),
|
|
428
|
+
"aria-busy": (A = o["aria-busy"]) == null ? void 0 : A.toString(),
|
|
429
|
+
"aria-atomic": (M = o["aria-atomic"]) == null ? void 0 : M.toString(),
|
|
430
|
+
"aria-live": (g = o["aria-live"]) == null ? void 0 : g.toString()
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
|
-
),
|
|
434
|
-
e(
|
|
435
|
-
}, { visibleDomOptions:
|
|
436
|
-
|
|
433
|
+
), p = n(() => !!a.items.some(({ items: v }) => !!v)), c = (v) => (A) => {
|
|
434
|
+
e(v, [A]);
|
|
435
|
+
}, { visibleDomOptions: m, updateVisibleDomOptions: f } = Ue(
|
|
436
|
+
s,
|
|
437
437
|
W(a, "items"),
|
|
438
|
-
|
|
438
|
+
E("option"),
|
|
439
439
|
!1
|
|
440
|
-
),
|
|
441
|
-
if (!
|
|
440
|
+
), d = n(() => a.totalItemCount > 0), S = (v) => {
|
|
441
|
+
if (!d.value)
|
|
442
442
|
return;
|
|
443
|
-
const
|
|
444
|
-
if (
|
|
443
|
+
const A = v.target;
|
|
444
|
+
if (A === s.value || (A == null ? void 0 : A.getAttribute("role")) !== "option")
|
|
445
445
|
return;
|
|
446
|
-
const
|
|
447
|
-
if (
|
|
448
|
-
const
|
|
449
|
-
|
|
446
|
+
const M = m.value.indexOf(A);
|
|
447
|
+
if (M !== -1) {
|
|
448
|
+
const g = M + a.virtualScrollStartIndex;
|
|
449
|
+
F(g);
|
|
450
450
|
}
|
|
451
|
-
},
|
|
452
|
-
var
|
|
453
|
-
if (
|
|
454
|
-
a.scrollToIndex(
|
|
455
|
-
const
|
|
456
|
-
(
|
|
451
|
+
}, y = async (v) => {
|
|
452
|
+
var A, M;
|
|
453
|
+
if (d.value && a.scrollToIndex) {
|
|
454
|
+
a.scrollToIndex(v), await j(), await f();
|
|
455
|
+
const g = v - a.virtualScrollStartIndex;
|
|
456
|
+
(A = m.value[g]) == null || A.focus();
|
|
457
457
|
} else
|
|
458
|
-
(
|
|
459
|
-
},
|
|
460
|
-
|
|
461
|
-
},
|
|
462
|
-
|
|
463
|
-
|
|
458
|
+
(M = m.value[v]) == null || M.focus();
|
|
459
|
+
}, B = async (v) => {
|
|
460
|
+
F(v), await y(v);
|
|
461
|
+
}, R = (v, A) => {
|
|
462
|
+
if (!v || !A)
|
|
463
|
+
return;
|
|
464
|
+
const M = v.getBoundingClientRect(), g = A, N = g.getBoundingClientRect();
|
|
465
|
+
M.top < N.top ? g.scrollTop -= N.top - M.top : M.bottom > N.bottom && (g.scrollTop += M.bottom - N.bottom);
|
|
466
|
+
}, b = async (v, A) => {
|
|
467
|
+
await f(), d.value && a.scrollToIndex ? a.scrollToIndex(v) : R(m.value[v], A);
|
|
464
468
|
}, {
|
|
465
|
-
moveToNextElement:
|
|
466
|
-
moveToPreviousElement:
|
|
469
|
+
moveToNextElement: O,
|
|
470
|
+
moveToPreviousElement: L,
|
|
467
471
|
moveToFirstElement: T,
|
|
468
|
-
moveToLastElement:
|
|
469
|
-
setListboxFocusedIndex:
|
|
470
|
-
} =
|
|
472
|
+
moveToLastElement: w,
|
|
473
|
+
setListboxFocusedIndex: F
|
|
474
|
+
} = lt(
|
|
471
475
|
{
|
|
472
|
-
items:
|
|
476
|
+
items: m,
|
|
473
477
|
totalItemCount: W(a, "totalItemCount")
|
|
474
478
|
},
|
|
475
|
-
|
|
476
|
-
),
|
|
477
|
-
[z.ARROW_UP]:
|
|
478
|
-
[z.ARROW_DOWN]:
|
|
479
|
+
y
|
|
480
|
+
), I = {
|
|
481
|
+
[z.ARROW_UP]: L,
|
|
482
|
+
[z.ARROW_DOWN]: O,
|
|
479
483
|
[z.HOME]: T,
|
|
480
|
-
[z.END]:
|
|
481
|
-
},
|
|
482
|
-
[
|
|
483
|
-
[
|
|
484
|
-
[
|
|
485
|
-
[
|
|
484
|
+
[z.END]: w
|
|
485
|
+
}, k = {
|
|
486
|
+
[u.SELECT]: c(u.SELECT),
|
|
487
|
+
[u.SPACE]: c(u.SPACE),
|
|
488
|
+
[u.TAB]: c(u.TAB),
|
|
489
|
+
[u.ENTER]: c(u.ENTER)
|
|
486
490
|
};
|
|
487
491
|
return l({
|
|
488
492
|
/**
|
|
@@ -494,87 +498,87 @@ const Ht = jt.exports, st = ({ items: a, totalItemCount: e }, l) => {
|
|
|
494
498
|
* Method to set the index of the item to be focused on
|
|
495
499
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
496
500
|
*/
|
|
497
|
-
setListboxFocusedIndex:
|
|
501
|
+
setListboxFocusedIndex: F,
|
|
498
502
|
/**
|
|
499
503
|
* Navigates to an item by global index, handling virtual scroll if enabled.
|
|
500
504
|
* Scrolls the virtual list and focuses the item.
|
|
501
505
|
*/
|
|
502
|
-
navigateToItem:
|
|
506
|
+
navigateToItem: B,
|
|
503
507
|
/**
|
|
504
508
|
* Scrolls to an item by global index without changing focus.
|
|
505
509
|
* Used when the dropdown opens via click to bring the selected option into view.
|
|
506
510
|
*/
|
|
507
|
-
scrollToItem:
|
|
511
|
+
scrollToItem: b
|
|
508
512
|
}), {
|
|
509
513
|
// Enums
|
|
510
|
-
BentoListboxEvent:
|
|
514
|
+
BentoListboxEvent: u,
|
|
511
515
|
// Values
|
|
512
|
-
listboxRef:
|
|
516
|
+
listboxRef: s,
|
|
513
517
|
listboxItemRef: i,
|
|
514
518
|
selectedItem: r,
|
|
515
519
|
slots: t,
|
|
516
|
-
ariaAttributes:
|
|
520
|
+
ariaAttributes: _,
|
|
517
521
|
// Computed
|
|
518
|
-
hasCategories:
|
|
522
|
+
hasCategories: p,
|
|
519
523
|
// Methods
|
|
520
524
|
onOptionSelected: c,
|
|
521
525
|
// Keyboard navigation
|
|
522
|
-
listboxListeners:
|
|
523
|
-
listboxOptionListeners:
|
|
526
|
+
listboxListeners: I,
|
|
527
|
+
listboxOptionListeners: k,
|
|
524
528
|
// Virtual scroll focus management
|
|
525
529
|
handleVirtualScrollingFocus: S
|
|
526
530
|
};
|
|
527
531
|
}
|
|
528
532
|
});
|
|
529
|
-
var
|
|
533
|
+
var Ht = function() {
|
|
530
534
|
var e = this, l = e._self._c;
|
|
531
535
|
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) {
|
|
532
|
-
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(
|
|
533
|
-
return l("bento-listbox-single-select-option", e._g({ key:
|
|
536
|
+
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) {
|
|
537
|
+
return l("bento-listbox-single-select-option", e._g({ key: o.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", 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) {
|
|
534
538
|
return { key: i, fn: function(r) {
|
|
535
539
|
return [e._t(i, null, null, r)];
|
|
536
540
|
} };
|
|
537
541
|
})], null, !0) }, e.listboxOptionListeners));
|
|
538
|
-
}), 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(
|
|
539
|
-
return { key:
|
|
540
|
-
return [e._t(
|
|
542
|
+
}), 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(o, s) {
|
|
543
|
+
return { key: s, fn: function(i) {
|
|
544
|
+
return [e._t(s, null, null, i)];
|
|
541
545
|
} };
|
|
542
546
|
})], null, !0) }, e.listboxOptionListeners))];
|
|
543
547
|
})] : e._l(e.items, function(t) {
|
|
544
|
-
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(
|
|
545
|
-
return { key:
|
|
546
|
-
return [e._t(
|
|
548
|
+
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(o, s) {
|
|
549
|
+
return { key: s, fn: function(i) {
|
|
550
|
+
return [e._t(s, null, null, i)];
|
|
547
551
|
} };
|
|
548
552
|
})], null, !0) }, e.listboxOptionListeners));
|
|
549
553
|
})], 2);
|
|
550
|
-
},
|
|
554
|
+
}, Jt = [], Xt = /* @__PURE__ */ G(
|
|
555
|
+
jt,
|
|
556
|
+
Ht,
|
|
551
557
|
Jt,
|
|
552
|
-
Xt,
|
|
553
|
-
Zt,
|
|
554
558
|
!1,
|
|
555
559
|
null,
|
|
556
560
|
null
|
|
557
561
|
);
|
|
558
|
-
const
|
|
559
|
-
let
|
|
560
|
-
const
|
|
562
|
+
const Zt = Xt.exports;
|
|
563
|
+
let We = 0;
|
|
564
|
+
const Qt = {
|
|
561
565
|
beforeCreate() {
|
|
562
|
-
this.uuid =
|
|
566
|
+
this.uuid = We.toString(), We += 1;
|
|
563
567
|
}
|
|
564
568
|
};
|
|
565
|
-
var
|
|
569
|
+
var el = function() {
|
|
566
570
|
var e = this, l = e._self._c;
|
|
567
571
|
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" } })]);
|
|
568
|
-
},
|
|
572
|
+
}, tl = [], ll = /* @__PURE__ */ G(
|
|
573
|
+
Qt,
|
|
574
|
+
el,
|
|
569
575
|
tl,
|
|
570
|
-
ll,
|
|
571
|
-
al,
|
|
572
576
|
!1,
|
|
573
577
|
null,
|
|
574
578
|
null
|
|
575
579
|
);
|
|
576
|
-
const
|
|
577
|
-
...
|
|
580
|
+
const al = ll.exports, ol = {}, sl = /* @__PURE__ */ U({
|
|
581
|
+
...ol,
|
|
578
582
|
__name: "decorative-checkbox",
|
|
579
583
|
props: {
|
|
580
584
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -590,23 +594,23 @@ const ol = sl.exports, nl = {}, il = /* @__PURE__ */ U({
|
|
|
590
594
|
[`b-checkbox-input__outline--${De.CHECKED}`]: (e.checked || e.allSelected) && !e.indeterminate,
|
|
591
595
|
[`b-checkbox-input__outline--${De.INDETERMINATE}`]: e.indeterminate
|
|
592
596
|
}));
|
|
593
|
-
return { __sfc: !0, props: e, conditionalClasses: l, outlineConditionalClasses: t, CheckmarkSmallIcon:
|
|
597
|
+
return { __sfc: !0, props: e, conditionalClasses: l, outlineConditionalClasses: t, CheckmarkSmallIcon: ht, MinusSmallIcon: gt, DoubleCheckmarkSmallIcon: al };
|
|
594
598
|
}
|
|
595
599
|
});
|
|
596
|
-
var
|
|
600
|
+
var nl = function() {
|
|
597
601
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
598
602
|
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);
|
|
599
|
-
},
|
|
603
|
+
}, il = [], rl = /* @__PURE__ */ G(
|
|
604
|
+
sl,
|
|
605
|
+
nl,
|
|
600
606
|
il,
|
|
601
|
-
rl,
|
|
602
|
-
cl,
|
|
603
607
|
!1,
|
|
604
608
|
null,
|
|
605
609
|
"b87bbaf9"
|
|
606
610
|
);
|
|
607
|
-
const Ge =
|
|
608
|
-
var
|
|
609
|
-
const
|
|
611
|
+
const Ge = rl.exports;
|
|
612
|
+
var at = /* @__PURE__ */ ((a) => (a.DISABLED = "disabled", a.STATIC_CATEGORY = "static-category", a))(at || {}), de = /* @__PURE__ */ ((a) => (a.SELECT_CATEGORY = "select-category", a.UNSELECT_CATEGORY = "unselect-category", a.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", a))(de || {});
|
|
613
|
+
const cl = {
|
|
610
614
|
"de-DE": {
|
|
611
615
|
categoryClosed: "{category} geschlossen",
|
|
612
616
|
categoryOpened: "{category} geöffnet"
|
|
@@ -647,14 +651,14 @@ const ul = {
|
|
|
647
651
|
categoryClosed: "{category} 已关闭",
|
|
648
652
|
categoryOpened: "{category} 已打开"
|
|
649
653
|
}
|
|
650
|
-
},
|
|
651
|
-
i18n: { messages:
|
|
654
|
+
}, ul = U({
|
|
655
|
+
i18n: { messages: cl },
|
|
652
656
|
name: "bento-listbox-multi-select-category",
|
|
653
657
|
components: {
|
|
654
|
-
BentoTypography:
|
|
658
|
+
BentoTypography: re,
|
|
655
659
|
BentoListboxOption: Be,
|
|
656
|
-
ChevronDownIcon:
|
|
657
|
-
ChevronUpIcon:
|
|
660
|
+
ChevronDownIcon: Qe,
|
|
661
|
+
ChevronUpIcon: et,
|
|
658
662
|
DecorativeCheckbox: Ge
|
|
659
663
|
},
|
|
660
664
|
props: {
|
|
@@ -706,70 +710,70 @@ const ul = {
|
|
|
706
710
|
de.TOGGLE_CATEGORY_VISIBILITY
|
|
707
711
|
],
|
|
708
712
|
setup(a, { emit: e }) {
|
|
709
|
-
const l =
|
|
710
|
-
() => a.category.items.every((
|
|
711
|
-
),
|
|
712
|
-
[`b-listbox-multi-select-category--${
|
|
713
|
-
})),
|
|
714
|
-
|
|
715
|
-
}, f = (
|
|
716
|
-
var
|
|
717
|
-
const
|
|
718
|
-
return { isDisabled:
|
|
719
|
-
},
|
|
720
|
-
() => a.category.items.filter((
|
|
721
|
-
const { isDisabled:
|
|
722
|
-
return
|
|
713
|
+
const l = E(!1), { t } = fe(), o = ie("category-group"), s = ie("category-name"), i = (I) => a.isOptionDisabled ? a.isOptionDisabled(I) : !1, r = n(
|
|
714
|
+
() => a.category.items.every((I) => i(I))
|
|
715
|
+
), _ = W(a, "staticCategories"), p = n(() => l.value || a.staticCategories), c = n(() => ({
|
|
716
|
+
[`b-listbox-multi-select-category--${at.DISABLED}`]: r.value
|
|
717
|
+
})), m = (I, k) => {
|
|
718
|
+
I.preventDefault(), l.value = k !== void 0 ? k : !l.value, e(de.TOGGLE_CATEGORY_VISIBILITY, a.category.value);
|
|
719
|
+
}, f = (I) => {
|
|
720
|
+
var A;
|
|
721
|
+
const k = i(I), v = ((A = a.selectedItemsList) == null ? void 0 : A.includes(I.value)) || !1;
|
|
722
|
+
return { isDisabled: k, isPreSelected: v };
|
|
723
|
+
}, d = n(
|
|
724
|
+
() => a.category.items.filter((I) => {
|
|
725
|
+
const { isDisabled: k, isPreSelected: v } = f(I);
|
|
726
|
+
return k && v || !k;
|
|
723
727
|
})
|
|
724
728
|
), S = n(
|
|
725
729
|
() => {
|
|
726
|
-
var
|
|
727
|
-
return (
|
|
728
|
-
({ value:
|
|
729
|
-
var
|
|
730
|
-
return (
|
|
730
|
+
var I;
|
|
731
|
+
return (I = d.value) == null ? void 0 : I.filter(
|
|
732
|
+
({ value: k }) => {
|
|
733
|
+
var v;
|
|
734
|
+
return (v = a.selectedItemsList) == null ? void 0 : v.includes(k);
|
|
731
735
|
}
|
|
732
736
|
);
|
|
733
737
|
}
|
|
734
|
-
),
|
|
735
|
-
const
|
|
736
|
-
return t(
|
|
737
|
-
}),
|
|
738
|
+
), y = n(() => {
|
|
739
|
+
const I = l.value ? "categoryOpened" : "categoryClosed";
|
|
740
|
+
return t(I, { category: a.category.label });
|
|
741
|
+
}), B = () => {
|
|
738
742
|
e(de.SELECT_CATEGORY);
|
|
739
|
-
},
|
|
743
|
+
}, R = () => {
|
|
740
744
|
e(de.UNSELECT_CATEGORY);
|
|
741
|
-
}, { isAllSelected: b, isIndeterminate: O, toggleSelectAll:
|
|
745
|
+
}, { isAllSelected: b, isIndeterminate: O, toggleSelectAll: L } = tt(
|
|
742
746
|
S,
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
),
|
|
747
|
-
w.value = !w.value,
|
|
747
|
+
d,
|
|
748
|
+
B,
|
|
749
|
+
R
|
|
750
|
+
), T = n(() => O.value ? "mixed" : `${b.value}`), w = E(b.value), F = () => {
|
|
751
|
+
w.value = !w.value, L(w.value);
|
|
748
752
|
};
|
|
749
|
-
return
|
|
753
|
+
return oe(b, () => {
|
|
750
754
|
w.value = b.value;
|
|
751
755
|
}), {
|
|
752
756
|
// Values
|
|
753
|
-
chevronTitle:
|
|
757
|
+
chevronTitle: y,
|
|
754
758
|
conditionalClass: c,
|
|
755
759
|
hasAllPropsDisabled: r,
|
|
756
760
|
isOpen: l,
|
|
757
761
|
isAllSelected: b,
|
|
758
762
|
isIndeterminate: O,
|
|
759
|
-
isStaticCategory:
|
|
760
|
-
categoryGroupId:
|
|
761
|
-
categoryNameId:
|
|
763
|
+
isStaticCategory: _,
|
|
764
|
+
categoryGroupId: o,
|
|
765
|
+
categoryNameId: s,
|
|
762
766
|
// Computed
|
|
763
|
-
showItemChildren:
|
|
764
|
-
ariaCheckedComputed:
|
|
767
|
+
showItemChildren: p,
|
|
768
|
+
ariaCheckedComputed: T,
|
|
765
769
|
// Methods
|
|
766
|
-
handleSelectAll:
|
|
767
|
-
toggleOpen:
|
|
768
|
-
toggleSelectAll:
|
|
770
|
+
handleSelectAll: F,
|
|
771
|
+
toggleOpen: m,
|
|
772
|
+
toggleSelectAll: L
|
|
769
773
|
};
|
|
770
774
|
}
|
|
771
775
|
});
|
|
772
|
-
var
|
|
776
|
+
var dl = function() {
|
|
773
777
|
var e = this, l = e._self._c;
|
|
774
778
|
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) {
|
|
775
779
|
return t.preventDefault(), e.handleSelectAll.apply(null, arguments);
|
|
@@ -780,22 +784,22 @@ var fl = function() {
|
|
|
780
784
|
}] } }, [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) {
|
|
781
785
|
return t.stopPropagation(), e.toggleOpen.apply(null, arguments);
|
|
782
786
|
} } }, [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")], 2)], 1);
|
|
783
|
-
},
|
|
787
|
+
}, pl = [], fl = /* @__PURE__ */ G(
|
|
788
|
+
ul,
|
|
789
|
+
dl,
|
|
784
790
|
pl,
|
|
785
|
-
fl,
|
|
786
|
-
bl,
|
|
787
791
|
!1,
|
|
788
792
|
null,
|
|
789
793
|
"00ccd708"
|
|
790
794
|
);
|
|
791
|
-
const
|
|
792
|
-
var
|
|
793
|
-
const
|
|
795
|
+
const bl = fl.exports;
|
|
796
|
+
var ae = /* @__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))(ae || {});
|
|
797
|
+
const vl = U({
|
|
794
798
|
name: "listbox-multi-select-options",
|
|
795
799
|
components: {
|
|
796
800
|
BentoListboxOption: Be,
|
|
797
|
-
BentoTypography:
|
|
798
|
-
ListboxMultiSelectCategory:
|
|
801
|
+
BentoTypography: re,
|
|
802
|
+
ListboxMultiSelectCategory: bl,
|
|
799
803
|
DecorativeCheckbox: Ge
|
|
800
804
|
},
|
|
801
805
|
inheritAttrs: !1,
|
|
@@ -866,23 +870,23 @@ const _l = U({
|
|
|
866
870
|
}
|
|
867
871
|
},
|
|
868
872
|
emits: [
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
+
ae.TOGGLE_CHECKBOX_SELECTION,
|
|
874
|
+
ae.SELECT_CATEGORY,
|
|
875
|
+
ae.UNSELECT_CATEGORY,
|
|
876
|
+
ae.TOGGLE_CATEGORY_VISIBILITY
|
|
873
877
|
],
|
|
874
878
|
setup(a, { emit: e }) {
|
|
875
|
-
const l = (
|
|
876
|
-
a.isOptionDisabled(
|
|
877
|
-
}, t = (
|
|
879
|
+
const l = (p) => {
|
|
880
|
+
a.isOptionDisabled(p) || e(ae.TOGGLE_CHECKBOX_SELECTION, p);
|
|
881
|
+
}, t = (p) => !!p.items, o = (p) => {
|
|
878
882
|
const c = a.isMultiLevel && a.searching;
|
|
879
|
-
return
|
|
880
|
-
},
|
|
881
|
-
if (t(
|
|
882
|
-
const c =
|
|
883
|
-
e(c,
|
|
883
|
+
return p.description && (!a.isMultiLevel || c);
|
|
884
|
+
}, s = (p) => p.items ? !!p.items.find((c) => a.selectedItemsList.includes(c.value)) : a.selectedItemsList.includes(p.value), i = (p) => {
|
|
885
|
+
if (t(p)) {
|
|
886
|
+
const c = s(p) ? ae.UNSELECT_CATEGORY : ae.SELECT_CATEGORY;
|
|
887
|
+
e(c, p);
|
|
884
888
|
} else
|
|
885
|
-
l(
|
|
889
|
+
l(p);
|
|
886
890
|
};
|
|
887
891
|
return {
|
|
888
892
|
// Values
|
|
@@ -891,65 +895,65 @@ const _l = U({
|
|
|
891
895
|
"b-listbox-multi-select-options__category-option": a.categoryItems
|
|
892
896
|
})),
|
|
893
897
|
// Methods
|
|
894
|
-
isOptionSelected:
|
|
895
|
-
shouldShowDescription:
|
|
898
|
+
isOptionSelected: s,
|
|
899
|
+
shouldShowDescription: o,
|
|
896
900
|
toggleCheckboxSelection: l,
|
|
897
901
|
toggleSearchOption: i,
|
|
898
|
-
computedTabindex: (
|
|
902
|
+
computedTabindex: (p) => a.itemsIndex[p] === a.focusedIndex ? 0 : -1,
|
|
899
903
|
// Enums
|
|
900
|
-
BentoListboxEvent:
|
|
901
|
-
ListboxMultiSelectOptionsEvent:
|
|
904
|
+
BentoListboxEvent: u,
|
|
905
|
+
ListboxMultiSelectOptionsEvent: ae
|
|
902
906
|
};
|
|
903
907
|
}
|
|
904
908
|
});
|
|
905
|
-
var
|
|
909
|
+
var ml = function() {
|
|
906
910
|
var e = this, l = e._self._c;
|
|
907
911
|
return e._self._setupProxy, l("div", e._l(e.items, function(t) {
|
|
908
|
-
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(
|
|
912
|
+
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) {
|
|
909
913
|
return e.toggleSearchOption(t);
|
|
910
|
-
}, "enter-pressed": function(
|
|
914
|
+
}, "enter-pressed": function(o) {
|
|
911
915
|
return e.toggleSearchOption(t);
|
|
912
|
-
}, "space-pressed": function(
|
|
913
|
-
return
|
|
916
|
+
}, "space-pressed": function(o) {
|
|
917
|
+
return o.preventDefault(), e.toggleSearchOption(t);
|
|
914
918
|
} } }, [l("decorative-checkbox", { attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, checked: e.isOptionSelected(t) } }), e._t("default", function() {
|
|
915
919
|
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)];
|
|
916
|
-
}, 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, tabindex: e.computedTabindex(t.value) }, on: { "select-category": function(
|
|
920
|
+
}, 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, tabindex: e.computedTabindex(t.value) }, on: { "select-category": function(o) {
|
|
917
921
|
return e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, t);
|
|
918
|
-
}, "unselect-category": function(
|
|
922
|
+
}, "unselect-category": function(o) {
|
|
919
923
|
return e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, t);
|
|
920
|
-
}, "toggle-category-visibility": function(
|
|
921
|
-
return e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY,
|
|
922
|
-
} } }, [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, role: e.$attrs.role || "option" }, on: { "toggle-checkbox-selection": (
|
|
924
|
+
}, "toggle-category-visibility": function(o) {
|
|
925
|
+
return e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY, o);
|
|
926
|
+
} } }, [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, 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) {
|
|
923
927
|
return e.toggleCheckboxSelection(t);
|
|
924
|
-
}, "enter-pressed": function(
|
|
928
|
+
}, "enter-pressed": function(o) {
|
|
925
929
|
return e.toggleCheckboxSelection(t);
|
|
926
|
-
}, "space-pressed": function(
|
|
927
|
-
return
|
|
930
|
+
}, "space-pressed": function(o) {
|
|
931
|
+
return o.preventDefault(), e.toggleCheckboxSelection(t);
|
|
928
932
|
} } }, [l("decorative-checkbox", { attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, checked: e.isOptionSelected(t) } }), e._t("default", function() {
|
|
929
933
|
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)];
|
|
930
934
|
}, null, t)], 2)]], 2);
|
|
931
935
|
}), 0);
|
|
932
|
-
},
|
|
936
|
+
}, _l = [], yl = /* @__PURE__ */ G(
|
|
937
|
+
vl,
|
|
938
|
+
ml,
|
|
933
939
|
_l,
|
|
934
|
-
yl,
|
|
935
|
-
gl,
|
|
936
940
|
!1,
|
|
937
941
|
null,
|
|
938
942
|
"0985e0a4"
|
|
939
943
|
);
|
|
940
|
-
const
|
|
944
|
+
const gl = yl.exports, ot = (a) => {
|
|
941
945
|
const e = n(() => {
|
|
942
946
|
var t;
|
|
943
|
-
return !!((t = a.value) != null && t.find(({ items:
|
|
947
|
+
return !!((t = a.value) != null && t.find(({ items: o }) => !!o));
|
|
944
948
|
}), l = n(() => {
|
|
945
949
|
var t;
|
|
946
|
-
return e.value ? (t = a.value) == null ? void 0 : t.reduce((
|
|
950
|
+
return e.value ? (t = a.value) == null ? void 0 : t.reduce((o, s) => (s.items ? o.push(...s.items.flat()) : o.push(s), o), []) : a.value;
|
|
947
951
|
});
|
|
948
952
|
return {
|
|
949
953
|
isMultiLevelSelect: e,
|
|
950
954
|
flattenedItemsList: l
|
|
951
955
|
};
|
|
952
|
-
},
|
|
956
|
+
}, hl = {
|
|
953
957
|
"de-DE": {
|
|
954
958
|
allSelected: "Alle ausgewählt ({total})",
|
|
955
959
|
numberOfTotalSelected: "{number} von {total} ausgewählt",
|
|
@@ -1010,8 +1014,8 @@ const Sl = hl.exports, nt = (a) => {
|
|
|
1010
1014
|
numbersSelected: "已选择 {number} 个",
|
|
1011
1015
|
selectAll: "选择全部({total})个"
|
|
1012
1016
|
}
|
|
1013
|
-
},
|
|
1014
|
-
...
|
|
1017
|
+
}, Sl = { i18n: { messages: hl } }, xl = /* @__PURE__ */ U({
|
|
1018
|
+
...Sl,
|
|
1015
1019
|
__name: "listbox-multi-select",
|
|
1016
1020
|
props: {
|
|
1017
1021
|
hasMoreItems: { type: Boolean, default: !1 },
|
|
@@ -1024,107 +1028,107 @@ const Sl = hl.exports, nt = (a) => {
|
|
|
1024
1028
|
},
|
|
1025
1029
|
emits: ["select"],
|
|
1026
1030
|
setup(a, { expose: e, emit: l }) {
|
|
1027
|
-
const t = a, { t:
|
|
1031
|
+
const t = a, { t: o, n: s } = fe(), i = Oe(), r = Ve(), _ = n(
|
|
1028
1032
|
() => {
|
|
1029
|
-
var
|
|
1033
|
+
var h, x, C, D;
|
|
1030
1034
|
return {
|
|
1031
|
-
"aria-label": (
|
|
1035
|
+
"aria-label": (h = r["aria-label"]) == null ? void 0 : h.toString(),
|
|
1032
1036
|
"aria-busy": (x = r["aria-busy"]) == null ? void 0 : x.toString(),
|
|
1033
1037
|
"aria-atomic": (C = r["aria-atomic"]) == null ? void 0 : C.toString(),
|
|
1034
1038
|
"aria-live": (D = r["aria-live"]) == null ? void 0 : D.toString(),
|
|
1035
1039
|
"aria-multiselectable": !0
|
|
1036
1040
|
};
|
|
1037
1041
|
}
|
|
1038
|
-
),
|
|
1042
|
+
), p = E(null), c = E(null), m = E(null), f = E(null), d = n(() => t.selectedValues.map(({ value: h }) => h)), { isMultiLevelSelect: S, flattenedItemsList: y } = ot(W(t, "items")), B = n(() => S.value && !t.staticCategories), R = n(() => B.value ? "tree" : "listbox"), b = n(() => B.value ? "treeitem" : "option"), O = (h) => {
|
|
1039
1043
|
var D;
|
|
1040
|
-
const x = t.isOptionDisabled(
|
|
1044
|
+
const x = t.isOptionDisabled(h), C = ((D = d.value) == null ? void 0 : D.includes(h.value)) || !1;
|
|
1041
1045
|
return { isDisabled: x, isPreSelected: C };
|
|
1042
|
-
},
|
|
1046
|
+
}, L = n(() => {
|
|
1043
1047
|
if (t.searching && S)
|
|
1044
1048
|
return t.items;
|
|
1045
|
-
const
|
|
1049
|
+
const h = y.value.filter((x) => {
|
|
1046
1050
|
const { isDisabled: C, isPreSelected: D } = O(x);
|
|
1047
1051
|
return C && D || !C;
|
|
1048
1052
|
});
|
|
1049
1053
|
return t.selectedValues.forEach((x) => {
|
|
1050
|
-
|
|
1051
|
-
}),
|
|
1052
|
-
}),
|
|
1054
|
+
h.find((C) => C.value === x.value) || h.push(x);
|
|
1055
|
+
}), h;
|
|
1056
|
+
}), T = n(
|
|
1053
1057
|
() => {
|
|
1054
|
-
var
|
|
1055
|
-
return (
|
|
1058
|
+
var h;
|
|
1059
|
+
return (h = L.value) == null ? void 0 : h.filter((x) => {
|
|
1056
1060
|
var C;
|
|
1057
1061
|
return x.items && S.value && t.searching ? x.items.filter(
|
|
1058
|
-
(
|
|
1059
|
-
).length === x.items.length : (C =
|
|
1062
|
+
($) => (t.selectedValues ?? []).includes($.value)
|
|
1063
|
+
).length === x.items.length : (C = d.value) == null ? void 0 : C.includes(x.value);
|
|
1060
1064
|
});
|
|
1061
1065
|
}
|
|
1062
|
-
), w = () => S.value && !t.searching ?
|
|
1066
|
+
), w = () => S.value && !t.searching ? y.value.length : t.items.length, F = n(() => {
|
|
1063
1067
|
var D;
|
|
1064
|
-
const
|
|
1065
|
-
return C === 0 ?
|
|
1066
|
-
}),
|
|
1068
|
+
const h = L.value.length, x = w(), C = ((D = T.value) == null ? void 0 : D.length) || 0;
|
|
1069
|
+
return C === 0 ? o("selectAll", { total: s(h) }) : C === x ? o("allSelected", { total: s(x) }) : C <= x ? o("numberOfTotalSelected", { number: s(C), total: s(x) }) : o("numbersSelected", { number: s(C) });
|
|
1070
|
+
}), I = (h) => {
|
|
1067
1071
|
const x = (D) => {
|
|
1068
|
-
const { isDisabled:
|
|
1069
|
-
return
|
|
1070
|
-
}, C =
|
|
1072
|
+
const { isDisabled: $, isPreSelected: X } = O(D);
|
|
1073
|
+
return $ && X || !$;
|
|
1074
|
+
}, C = h.filter(x).filter((D) => !d.value.includes(D.value));
|
|
1071
1075
|
l("select", [...t.selectedValues, ...C]);
|
|
1072
|
-
},
|
|
1073
|
-
const x = (
|
|
1074
|
-
const { isDisabled: X, isPreSelected:
|
|
1075
|
-
return !(X &&
|
|
1076
|
-
}, C =
|
|
1076
|
+
}, k = (h) => {
|
|
1077
|
+
const x = ($) => {
|
|
1078
|
+
const { isDisabled: X, isPreSelected: V } = O($);
|
|
1079
|
+
return !(X && V);
|
|
1080
|
+
}, C = h.filter(x).map(({ value: $ }) => $), D = t.selectedValues.filter(($) => !(C != null && C.includes($.value)));
|
|
1077
1081
|
l("select", D);
|
|
1078
|
-
},
|
|
1079
|
-
|
|
1080
|
-
},
|
|
1081
|
-
|
|
1082
|
-
}, { isAllSelected:
|
|
1083
|
-
L,
|
|
1082
|
+
}, v = () => {
|
|
1083
|
+
I(y.value);
|
|
1084
|
+
}, A = () => {
|
|
1085
|
+
k(y.value);
|
|
1086
|
+
}, { isAllSelected: M, isIndeterminate: g, toggleSelectAll: N } = tt(
|
|
1084
1087
|
T,
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1088
|
+
L,
|
|
1089
|
+
v,
|
|
1090
|
+
A
|
|
1091
|
+
), se = n(() => g.value ? "mixed" : `${M.value}`), K = E(M.value), le = () => {
|
|
1092
|
+
K.value = !K.value, N(K.value);
|
|
1089
1093
|
};
|
|
1090
|
-
|
|
1091
|
-
|
|
1094
|
+
oe(M, () => {
|
|
1095
|
+
K.value = M.value;
|
|
1092
1096
|
});
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1095
|
-
},
|
|
1096
|
-
h
|
|
1097
|
-
}, he = (
|
|
1097
|
+
const q = (h) => {
|
|
1098
|
+
I(h.items);
|
|
1099
|
+
}, ee = (h) => {
|
|
1100
|
+
k(h.items);
|
|
1101
|
+
}, he = (h, x) => {
|
|
1098
1102
|
let C = !1;
|
|
1099
|
-
const D = t.selectedValues.filter(({ value:
|
|
1100
|
-
C || D.push(x), l(
|
|
1103
|
+
const D = t.selectedValues.filter(({ value: $ }) => x.value === $ ? (C = !0, !1) : !0);
|
|
1104
|
+
C || D.push(x), l(h, D);
|
|
1101
1105
|
}, Re = n(() => {
|
|
1102
1106
|
if (!S.value)
|
|
1103
1107
|
return t.selectedValues;
|
|
1104
|
-
const
|
|
1105
|
-
(
|
|
1106
|
-
), D = C.filter((
|
|
1107
|
-
C.forEach((
|
|
1108
|
-
var
|
|
1109
|
-
|
|
1108
|
+
const h = (V) => d.value.includes(V.value), x = (V) => !t.staticCategories && V.every((ue) => h(ue)), C = t.items.flatMap(
|
|
1109
|
+
(V) => V.items && !x(V.items) ? V.items : V
|
|
1110
|
+
), D = C.filter((V) => V.items ? !0 : h(V)), $ = /* @__PURE__ */ new Set();
|
|
1111
|
+
C.forEach((V) => {
|
|
1112
|
+
var ue;
|
|
1113
|
+
$.add(V.value), (ue = V.items) == null || ue.forEach((P) => $.add(P.value));
|
|
1110
1114
|
});
|
|
1111
|
-
const X = t.selectedValues.filter((
|
|
1115
|
+
const X = t.selectedValues.filter((V) => !$.has(V.value));
|
|
1112
1116
|
return [...D, ...X];
|
|
1113
1117
|
}), Me = n(() => {
|
|
1114
|
-
var C, D,
|
|
1115
|
-
const
|
|
1116
|
-
return
|
|
1117
|
-
}), be = n(() => ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), J =
|
|
1118
|
-
|
|
1118
|
+
var C, D, $, X;
|
|
1119
|
+
const h = ["automatic", "button"].includes(t.lazyLoadType), x = ((C = t.selectedValues) == null ? void 0 : C.length) > 0 && ((D = T.value) == null ? void 0 : D.length) !== (($ = y.value) == null ? void 0 : $.length);
|
|
1120
|
+
return h && t.hasMoreItems ? !!((X = t.selectedValues) != null && X.length) : x;
|
|
1121
|
+
}), be = n(() => ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), J = E([]), { visibleDomOptions: ce, updateVisibleDomOptions: Se } = Ue(
|
|
1122
|
+
p,
|
|
1119
1123
|
W(t, "items"),
|
|
1120
1124
|
b
|
|
1121
|
-
), Ee = (
|
|
1122
|
-
J.value.includes(
|
|
1125
|
+
), Ee = (h) => {
|
|
1126
|
+
J.value.includes(h) ? J.value = J.value.filter((x) => x !== h) : J.value.push(h), j(() => {
|
|
1123
1127
|
Se();
|
|
1124
1128
|
});
|
|
1125
|
-
}, Ie = (
|
|
1129
|
+
}, Ie = (h) => {
|
|
1126
1130
|
var x;
|
|
1127
|
-
(x =
|
|
1131
|
+
(x = ce.value[h]) == null || x.focus();
|
|
1128
1132
|
}, {
|
|
1129
1133
|
moveToNextElement: Le,
|
|
1130
1134
|
moveToPreviousElement: ve,
|
|
@@ -1133,14 +1137,14 @@ const Sl = hl.exports, nt = (a) => {
|
|
|
1133
1137
|
preventDefault: _e,
|
|
1134
1138
|
focusedIndex: ye,
|
|
1135
1139
|
setListboxFocusedIndex: Ce
|
|
1136
|
-
} =
|
|
1140
|
+
} = lt(
|
|
1137
1141
|
{
|
|
1138
|
-
items:
|
|
1142
|
+
items: ce
|
|
1139
1143
|
},
|
|
1140
1144
|
Ie
|
|
1141
1145
|
), Te = {
|
|
1142
|
-
[z.ARROW_UP]: (
|
|
1143
|
-
[z.ARROW_DOWN]: (
|
|
1146
|
+
[z.ARROW_UP]: (h) => ve(h),
|
|
1147
|
+
[z.ARROW_DOWN]: (h) => Le(h),
|
|
1144
1148
|
[z.HOME]: xe,
|
|
1145
1149
|
[z.END]: me
|
|
1146
1150
|
};
|
|
@@ -1155,51 +1159,51 @@ const Sl = hl.exports, nt = (a) => {
|
|
|
1155
1159
|
[z.ARROW_UP]: _e,
|
|
1156
1160
|
[z.ARROW_DOWN]: _e
|
|
1157
1161
|
}, we = n(() => {
|
|
1158
|
-
let
|
|
1162
|
+
let h = be.value ? 1 : 0;
|
|
1159
1163
|
const x = {};
|
|
1160
1164
|
return t.items.forEach((C) => {
|
|
1161
1165
|
let D = J.value.includes(C.value);
|
|
1162
|
-
C.items ? (t.staticCategories ? D = !0 : x[C.value] =
|
|
1166
|
+
C.items ? (t.staticCategories ? D = !0 : x[C.value] = h++, D && C.items.forEach(($) => x[$.value] = h++)) : x[C.value] = h++;
|
|
1163
1167
|
}), x;
|
|
1164
1168
|
});
|
|
1165
|
-
return { __sfc: !0, props: t, emit: l, t:
|
|
1169
|
+
return { __sfc: !0, props: t, emit: l, t: o, n: s, slots: i, attrs: r, ariaAttributes: _, listboxRef: p, selectAllListboxItemsRef: c, selectedListboxItemsRef: m, listboxItemsRef: f, selectedItemsList: d, isMultiLevelSelect: S, flattenedItemsList: y, isTreePattern: B, computedRole: R, computedOptionRole: b, optionStates: O, enabledItems: L, visibleSelectedList: T, calculateTotalItems: w, selectAllCheckboxText: F, selectAll: I, unselectAll: k, selectAllItems: v, unselectAllItems: A, isAllSelected: M, isIndeterminate: g, toggleSelectAll: N, ariaCheckedComputed: se, isSelectAllOn: K, handleSelectAll: le, selectAllCategory: q, unselectAllCategory: ee, toggleCheckboxSelection: he, selectedOptions: Re, showSelectedItems: Me, showSelectAllCheckbox: be, expandedCategories: J, visibleDomOptions: ce, updateVisibleDomOptions: Se, toggleCategoryVisibility: Ee, focusItem: Ie, moveToNextElement: Le, moveToPreviousElement: ve, moveToFirstElement: xe, moveToLastElement: me, preventDefault: _e, focusedIndex: ye, setListboxFocusedIndex: Ce, listboxListeners: Te, chipsSectionListeners: Ne, computedItemsIndex: we, DecorativeCheckbox: Ge, BentoTypography: re, BentoChip: St, BentoListboxOption: Be, ListboxMultiSelectOptions: gl, vBentoKeyboardNavigationDirective: ke, BentoListboxEvent: u };
|
|
1166
1170
|
}
|
|
1167
1171
|
});
|
|
1168
|
-
var
|
|
1172
|
+
var Cl = function() {
|
|
1169
1173
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
1170
|
-
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(
|
|
1171
|
-
return l("li", { key:
|
|
1172
|
-
|
|
1174
|
+
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) {
|
|
1175
|
+
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) {
|
|
1176
|
+
o.items ? t.unselectAllCategory(o) : t.toggleCheckboxSelection("select", o);
|
|
1173
1177
|
} } })], 1);
|
|
1174
|
-
}), 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(
|
|
1175
|
-
return
|
|
1176
|
-
} } }, [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(
|
|
1177
|
-
return t.toggleCheckboxSelection("select",
|
|
1178
|
-
}, "select-category": t.selectAllCategory, "unselect-category": t.unselectAllCategory, "toggle-category-visibility": t.toggleCategoryVisibility, "space-pressed": function(
|
|
1179
|
-
return t.toggleCheckboxSelection(t.BentoListboxEvent.SPACE,
|
|
1180
|
-
}, "tab-pressed": function(
|
|
1181
|
-
return t.toggleCheckboxSelection(t.BentoListboxEvent.TAB,
|
|
1182
|
-
}, "enter-pressed": function(
|
|
1183
|
-
return t.toggleCheckboxSelection(t.BentoListboxEvent.ENTER,
|
|
1184
|
-
} }, scopedSlots: e._u([e._l(t.slots, function(
|
|
1185
|
-
return { key:
|
|
1186
|
-
return [e._t(
|
|
1178
|
+
}), 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) {
|
|
1179
|
+
return o.preventDefault(), t.handleSelectAll.apply(null, arguments);
|
|
1180
|
+
} } }, [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) {
|
|
1181
|
+
return t.toggleCheckboxSelection("select", o);
|
|
1182
|
+
}, "select-category": t.selectAllCategory, "unselect-category": t.unselectAllCategory, "toggle-category-visibility": t.toggleCategoryVisibility, "space-pressed": function(o) {
|
|
1183
|
+
return t.toggleCheckboxSelection(t.BentoListboxEvent.SPACE, o);
|
|
1184
|
+
}, "tab-pressed": function(o) {
|
|
1185
|
+
return t.toggleCheckboxSelection(t.BentoListboxEvent.TAB, o);
|
|
1186
|
+
}, "enter-pressed": function(o) {
|
|
1187
|
+
return t.toggleCheckboxSelection(t.BentoListboxEvent.ENTER, o);
|
|
1188
|
+
} }, scopedSlots: e._u([e._l(t.slots, function(o, s) {
|
|
1189
|
+
return { key: s, fn: function(i) {
|
|
1190
|
+
return [e._t(s, null, null, i)];
|
|
1187
1191
|
} };
|
|
1188
1192
|
})], null, !0) })], 1)]);
|
|
1189
|
-
},
|
|
1193
|
+
}, Ol = [], El = /* @__PURE__ */ G(
|
|
1194
|
+
xl,
|
|
1195
|
+
Cl,
|
|
1190
1196
|
Ol,
|
|
1191
|
-
El,
|
|
1192
|
-
Il,
|
|
1193
1197
|
!1,
|
|
1194
1198
|
null,
|
|
1195
1199
|
"81f4ab88"
|
|
1196
1200
|
);
|
|
1197
|
-
const
|
|
1201
|
+
const je = El.exports, st = (a, e = 300) => {
|
|
1198
1202
|
let l;
|
|
1199
|
-
return (...
|
|
1200
|
-
l && clearTimeout(l), l = setTimeout(() => a(...
|
|
1203
|
+
return (...o) => {
|
|
1204
|
+
l && clearTimeout(l), l = setTimeout(() => a(...o), e);
|
|
1201
1205
|
};
|
|
1202
|
-
},
|
|
1206
|
+
}, Il = {
|
|
1203
1207
|
"de-DE": {
|
|
1204
1208
|
loading: "Laden",
|
|
1205
1209
|
showMore: "Mehr anzeigen"
|
|
@@ -1240,18 +1244,18 @@ const Je = Ll.exports, it = (a, e = 300) => {
|
|
|
1240
1244
|
loading: "正在加载",
|
|
1241
1245
|
showMore: "显示更多"
|
|
1242
1246
|
}
|
|
1243
|
-
},
|
|
1247
|
+
}, Ll = 36, Tl = U({
|
|
1244
1248
|
name: "bento-listbox",
|
|
1245
1249
|
components: {
|
|
1246
|
-
BentoEmptyState:
|
|
1247
|
-
BentoListboxSingleSelect:
|
|
1248
|
-
BentoListboxMultiSelect:
|
|
1249
|
-
BentoTypography:
|
|
1250
|
-
BentoLoadingIndicator:
|
|
1251
|
-
BentoLoadingButton:
|
|
1250
|
+
BentoEmptyState: _t,
|
|
1251
|
+
BentoListboxSingleSelect: Zt,
|
|
1252
|
+
BentoListboxMultiSelect: je,
|
|
1253
|
+
BentoTypography: re,
|
|
1254
|
+
BentoLoadingIndicator: mt,
|
|
1255
|
+
BentoLoadingButton: xt
|
|
1252
1256
|
},
|
|
1253
1257
|
directives: { BentoKeyboardNavigationDirective: ke },
|
|
1254
|
-
i18n: { messages:
|
|
1258
|
+
i18n: { messages: Il },
|
|
1255
1259
|
props: {
|
|
1256
1260
|
/**
|
|
1257
1261
|
* Defines a string value that labels an interactive element.
|
|
@@ -1307,8 +1311,8 @@ const Je = Ll.exports, it = (a, e = 300) => {
|
|
|
1307
1311
|
*/
|
|
1308
1312
|
lazyLoadType: {
|
|
1309
1313
|
type: String,
|
|
1310
|
-
default:
|
|
1311
|
-
validator: (a) => Object.values(
|
|
1314
|
+
default: ne.NONE,
|
|
1315
|
+
validator: (a) => Object.values(ne).includes(a)
|
|
1312
1316
|
},
|
|
1313
1317
|
/**
|
|
1314
1318
|
* Indicates the listbox is loading filtered items.
|
|
@@ -1332,7 +1336,7 @@ const Je = Ll.exports, it = (a, e = 300) => {
|
|
|
1332
1336
|
*
|
|
1333
1337
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
1334
1338
|
*/
|
|
1335
|
-
searching:
|
|
1339
|
+
searching: je.props.searching,
|
|
1336
1340
|
/**
|
|
1337
1341
|
* The `input` value.
|
|
1338
1342
|
* Providing an empty string or empty array will select no options.
|
|
@@ -1352,130 +1356,130 @@ const Je = Ll.exports, it = (a, e = 300) => {
|
|
|
1352
1356
|
}
|
|
1353
1357
|
},
|
|
1354
1358
|
emits: [
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1359
|
+
u.SELECT,
|
|
1360
|
+
u.SPACE,
|
|
1361
|
+
u.SHOW_MORE,
|
|
1362
|
+
u.ENTER,
|
|
1363
|
+
u.ESCAPE,
|
|
1364
|
+
u.TAB
|
|
1361
1365
|
],
|
|
1362
|
-
setup(a, { emit: e, slots: l }) {
|
|
1363
|
-
const
|
|
1364
|
-
var
|
|
1365
|
-
return typeof (a == null ? void 0 : a.virtualScroll) == "object" && ((
|
|
1366
|
-
},
|
|
1367
|
-
containerRef:
|
|
1368
|
-
containerProps:
|
|
1369
|
-
onScroll:
|
|
1370
|
-
list:
|
|
1371
|
-
wrapperProps:
|
|
1372
|
-
scrollToIndex:
|
|
1373
|
-
startIndex:
|
|
1374
|
-
} =
|
|
1375
|
-
itemHeight:
|
|
1366
|
+
setup(a, { emit: e, slots: l, expose: t }) {
|
|
1367
|
+
const o = E([]), s = W(a, "items"), { t: i } = fe(), r = n(() => a.lazyLoadType !== ne.AUTOMATIC), _ = n(() => a.lazyLoadType === ne.AUTOMATIC), p = () => {
|
|
1368
|
+
var q;
|
|
1369
|
+
return typeof (a == null ? void 0 : a.virtualScroll) == "object" && ((q = a == null ? void 0 : a.virtualScroll) != null && q.itemHeight) ? a.virtualScroll.itemHeight : Ll;
|
|
1370
|
+
}, c = !(a != null && a.multiple) && (a == null ? void 0 : a.virtualScroll) !== !1 && (a == null ? void 0 : a.lazyLoadType) === "none", {
|
|
1371
|
+
containerRef: m,
|
|
1372
|
+
containerProps: f,
|
|
1373
|
+
onScroll: d,
|
|
1374
|
+
list: S,
|
|
1375
|
+
wrapperProps: y,
|
|
1376
|
+
scrollToIndex: B,
|
|
1377
|
+
startIndex: R
|
|
1378
|
+
} = Tt(s, {
|
|
1379
|
+
itemHeight: p(),
|
|
1376
1380
|
// Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
|
|
1377
|
-
disabled: !
|
|
1378
|
-
}),
|
|
1379
|
-
() => a.componentLoading !== void 0 ||
|
|
1380
|
-
), O = n(
|
|
1381
|
-
() => i.value && a.loading || a.componentLoading ? "true" : "false"
|
|
1382
|
-
), T = n(
|
|
1383
|
-
() => i.value || a.componentLoading !== void 0 ? "polite" : void 0
|
|
1381
|
+
disabled: !c
|
|
1382
|
+
}), b = n(() => c ? s.value.length : 0), O = n(
|
|
1383
|
+
() => a.componentLoading !== void 0 || r.value ? "true" : void 0
|
|
1384
1384
|
), L = n(
|
|
1385
|
+
() => r.value && a.loading || a.componentLoading ? "true" : "false"
|
|
1386
|
+
), T = n(
|
|
1387
|
+
() => r.value || a.componentLoading !== void 0 ? "polite" : void 0
|
|
1388
|
+
), w = n(
|
|
1385
1389
|
() => ({
|
|
1386
1390
|
"aria-label": a.ariaLabel,
|
|
1387
|
-
"aria-busy":
|
|
1388
|
-
"aria-atomic":
|
|
1391
|
+
"aria-busy": L.value,
|
|
1392
|
+
"aria-atomic": O.value,
|
|
1389
1393
|
"aria-live": T.value
|
|
1390
1394
|
})
|
|
1391
|
-
),
|
|
1395
|
+
), F = n(
|
|
1392
1396
|
() => a.componentLoading ? {
|
|
1393
|
-
...
|
|
1397
|
+
...w.value,
|
|
1394
1398
|
role: "alert"
|
|
1395
1399
|
} : {}
|
|
1396
|
-
),
|
|
1397
|
-
e(
|
|
1398
|
-
},
|
|
1399
|
-
e(
|
|
1400
|
-
},
|
|
1401
|
-
const
|
|
1402
|
-
if (!
|
|
1400
|
+
), I = (q) => (ee) => {
|
|
1401
|
+
e(q, ee);
|
|
1402
|
+
}, k = () => {
|
|
1403
|
+
e(u.SHOW_MORE);
|
|
1404
|
+
}, v = st(() => {
|
|
1405
|
+
const q = m.value;
|
|
1406
|
+
if (!q)
|
|
1403
1407
|
return;
|
|
1404
|
-
const
|
|
1405
|
-
a.hasMoreItems &&
|
|
1406
|
-
}),
|
|
1407
|
-
|
|
1408
|
-
},
|
|
1409
|
-
var
|
|
1410
|
-
return ((
|
|
1411
|
-
}),
|
|
1412
|
-
() => a.lazyLoadType ===
|
|
1413
|
-
),
|
|
1414
|
-
() => a.loading ?
|
|
1415
|
-
),
|
|
1408
|
+
const ee = Math.round(q.scrollTop) + q.clientHeight >= q.scrollHeight;
|
|
1409
|
+
a.hasMoreItems && ee && !a.loading && k();
|
|
1410
|
+
}), A = () => {
|
|
1411
|
+
_.value ? v() : d();
|
|
1412
|
+
}, M = n(() => {
|
|
1413
|
+
var q;
|
|
1414
|
+
return ((q = a.items) == null ? void 0 : q.length) === 0;
|
|
1415
|
+
}), g = n(
|
|
1416
|
+
() => a.lazyLoadType === ne.BUTTON && a.hasMoreItems
|
|
1417
|
+
), N = n(
|
|
1418
|
+
() => a.loading ? Ke.LOADING : Ke.START
|
|
1419
|
+
), se = n(() => a.loading ? i("loading") : i("showMore")), K = n(() => ({
|
|
1416
1420
|
...a.emptyState,
|
|
1417
1421
|
variant: "condensed"
|
|
1418
|
-
})),
|
|
1419
|
-
[
|
|
1420
|
-
[
|
|
1421
|
-
[
|
|
1422
|
-
[
|
|
1422
|
+
})), le = {
|
|
1423
|
+
[u.SELECT]: I(u.SELECT),
|
|
1424
|
+
[u.SPACE]: I(u.SPACE),
|
|
1425
|
+
[u.TAB]: I(u.TAB),
|
|
1426
|
+
[u.ENTER]: I(u.ENTER)
|
|
1423
1427
|
};
|
|
1424
|
-
return {
|
|
1428
|
+
return t({ listboxRef: m, listboxItemRef: o }), {
|
|
1425
1429
|
// Refs
|
|
1426
|
-
listboxRef:
|
|
1427
|
-
listboxItemRef:
|
|
1430
|
+
listboxRef: m,
|
|
1431
|
+
listboxItemRef: o,
|
|
1428
1432
|
// a11y
|
|
1429
|
-
ariaAttributes:
|
|
1430
|
-
listboxContainerAttributes:
|
|
1433
|
+
ariaAttributes: w,
|
|
1434
|
+
listboxContainerAttributes: F,
|
|
1431
1435
|
// Values
|
|
1432
|
-
containerProps:
|
|
1433
|
-
isSearchResultEmpty:
|
|
1434
|
-
limitedEmptyStateProps:
|
|
1435
|
-
loadingButtonState:
|
|
1436
|
+
containerProps: f,
|
|
1437
|
+
isSearchResultEmpty: M,
|
|
1438
|
+
limitedEmptyStateProps: K,
|
|
1439
|
+
loadingButtonState: N,
|
|
1436
1440
|
slots: l,
|
|
1437
|
-
shouldDisplayShowMoreButton:
|
|
1438
|
-
showMoreButtonText:
|
|
1439
|
-
virtualisedItems:
|
|
1440
|
-
wrapperProps:
|
|
1441
|
+
shouldDisplayShowMoreButton: g,
|
|
1442
|
+
showMoreButtonText: se,
|
|
1443
|
+
virtualisedItems: S,
|
|
1444
|
+
wrapperProps: y,
|
|
1441
1445
|
// Virtual scroll
|
|
1442
|
-
totalItemCount:
|
|
1443
|
-
scrollToIndex:
|
|
1444
|
-
virtualScrollStartIndex:
|
|
1446
|
+
totalItemCount: b,
|
|
1447
|
+
scrollToIndex: B,
|
|
1448
|
+
virtualScrollStartIndex: R,
|
|
1445
1449
|
// Enums
|
|
1446
1450
|
BentoKeyboardNavigationKeyDownEvent: z,
|
|
1447
|
-
BentoListboxEvent:
|
|
1451
|
+
BentoListboxEvent: u,
|
|
1448
1452
|
// Methods
|
|
1449
|
-
onListboxContainerScroll:
|
|
1450
|
-
onOptionSelected:
|
|
1451
|
-
emitShowMore:
|
|
1452
|
-
listboxListeners:
|
|
1453
|
+
onListboxContainerScroll: A,
|
|
1454
|
+
onOptionSelected: I,
|
|
1455
|
+
emitShowMore: k,
|
|
1456
|
+
listboxListeners: le
|
|
1453
1457
|
};
|
|
1454
1458
|
}
|
|
1455
1459
|
});
|
|
1456
|
-
var
|
|
1460
|
+
var wl = function() {
|
|
1457
1461
|
var t;
|
|
1458
1462
|
var e = this, l = e._self._c;
|
|
1459
|
-
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: (t = e.containerProps) == null ? void 0 : t.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(
|
|
1460
|
-
return { key:
|
|
1461
|
-
return [e._t(
|
|
1463
|
+
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: (t = e.containerProps) == null ? void 0 : t.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(o, s) {
|
|
1464
|
+
return { key: s, fn: function(i) {
|
|
1465
|
+
return [e._t(s, null, null, i)];
|
|
1462
1466
|
} };
|
|
1463
|
-
})], 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(
|
|
1464
|
-
return { key:
|
|
1465
|
-
return [e._t(
|
|
1467
|
+
})], 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(o, s) {
|
|
1468
|
+
return { key: s, fn: function(i) {
|
|
1469
|
+
return [e._t(s, null, null, i)];
|
|
1466
1470
|
} };
|
|
1467
|
-
})], null, !0) }, "bento-listbox-single-select", e.ariaAttributes, !1), e.listboxListeners))], e.shouldDisplayShowMoreButton ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-button", { attrs: { state: e.loadingButtonState, variant: "secondary" }, on: { "!click": function(
|
|
1471
|
+
})], null, !0) }, "bento-listbox-single-select", e.ariaAttributes, !1), e.listboxListeners))], e.shouldDisplayShowMoreButton ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-button", { attrs: { state: e.loadingButtonState, variant: "secondary" }, on: { "!click": function(o) {
|
|
1468
1472
|
return e.emitShowMore.apply(null, arguments);
|
|
1469
1473
|
} } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-indicator")], 1) : e._e()]], 2)]);
|
|
1470
|
-
},
|
|
1474
|
+
}, Al = [], Dl = /* @__PURE__ */ G(
|
|
1475
|
+
Tl,
|
|
1476
|
+
wl,
|
|
1471
1477
|
Al,
|
|
1472
|
-
Dl,
|
|
1473
|
-
kl,
|
|
1474
1478
|
!1,
|
|
1475
1479
|
null,
|
|
1476
|
-
"
|
|
1480
|
+
"4f0fbc9e"
|
|
1477
1481
|
);
|
|
1478
|
-
const Pe =
|
|
1482
|
+
const Pe = Dl.exports, Fe = (a, e) => {
|
|
1479
1483
|
for (const l of a) {
|
|
1480
1484
|
if (l.value === e)
|
|
1481
1485
|
return l;
|
|
@@ -1486,52 +1490,52 @@ const Pe = Bl.exports, Fe = (a, e) => {
|
|
|
1486
1490
|
}
|
|
1487
1491
|
}
|
|
1488
1492
|
return null;
|
|
1489
|
-
},
|
|
1490
|
-
const
|
|
1491
|
-
l.value ?
|
|
1493
|
+
}, kl = (a) => typeof a == "object" && a !== null && "value" in a && "label" in a, Bl = (a, e, l, t) => {
|
|
1494
|
+
const o = E([]), s = E(), i = (c) => {
|
|
1495
|
+
l.value ? s.value = c.map(({ value: m }) => m) : s.value = c.length > 0 ? c[0].value : null;
|
|
1492
1496
|
}, r = (c) => {
|
|
1493
|
-
l.value ?
|
|
1494
|
-
},
|
|
1495
|
-
|
|
1496
|
-
},
|
|
1497
|
-
|
|
1497
|
+
l.value ? s.value = c.map(({ value: m, label: f }) => ({ value: m, label: f })) : s.value = c.length > 0 ? { value: c[0].value, label: c[0].label } : null;
|
|
1498
|
+
}, _ = (c) => {
|
|
1499
|
+
o.value = c, t != null && t.value ? r(c) : i(c);
|
|
1500
|
+
}, p = () => {
|
|
1501
|
+
o.value = [], s.value = null;
|
|
1498
1502
|
};
|
|
1499
|
-
return
|
|
1503
|
+
return oe(
|
|
1500
1504
|
() => e.value,
|
|
1501
1505
|
() => {
|
|
1502
1506
|
if (!e.value && e.value !== 0) {
|
|
1503
|
-
|
|
1507
|
+
p();
|
|
1504
1508
|
return;
|
|
1505
1509
|
}
|
|
1506
|
-
const c = !Array.isArray(e.value),
|
|
1507
|
-
|
|
1508
|
-
const f = (
|
|
1509
|
-
if (
|
|
1510
|
-
|
|
1510
|
+
const c = !Array.isArray(e.value), m = [...o.value];
|
|
1511
|
+
p();
|
|
1512
|
+
const f = (d) => {
|
|
1513
|
+
if (kl(d))
|
|
1514
|
+
o.value.push(d);
|
|
1511
1515
|
else {
|
|
1512
|
-
let S = Fe(a.value,
|
|
1513
|
-
S || (S = Fe(
|
|
1516
|
+
let S = Fe(a.value, d);
|
|
1517
|
+
S || (S = Fe(m, d)), S || (S = { value: d, label: d.toString() }), o.value.push(S);
|
|
1514
1518
|
}
|
|
1515
1519
|
};
|
|
1516
1520
|
if (c) {
|
|
1517
|
-
const
|
|
1518
|
-
f(
|
|
1521
|
+
const d = e.value;
|
|
1522
|
+
f(d), t != null && t.value ? r(o.value) : i(o.value);
|
|
1519
1523
|
return;
|
|
1520
1524
|
}
|
|
1521
|
-
e.value.forEach(f), t != null && t.value ? r(
|
|
1525
|
+
e.value.forEach(f), t != null && t.value ? r(o.value) : i(o.value);
|
|
1522
1526
|
},
|
|
1523
1527
|
{ immediate: !0 }
|
|
1524
1528
|
), {
|
|
1525
1529
|
// Values
|
|
1526
|
-
cachedSelectedListboxOptions:
|
|
1527
|
-
cachedListboxSelectedValues:
|
|
1530
|
+
cachedSelectedListboxOptions: o,
|
|
1531
|
+
cachedListboxSelectedValues: s,
|
|
1528
1532
|
// Methods
|
|
1529
|
-
resetCache:
|
|
1530
|
-
setCachedValues:
|
|
1533
|
+
resetCache: p,
|
|
1534
|
+
setCachedValues: _
|
|
1531
1535
|
};
|
|
1532
1536
|
};
|
|
1533
1537
|
var ge = /* @__PURE__ */ ((a) => (a.DEFAULT = "DropdownInputDefault", a.SMALL = "DropdownInputSmall", a))(ge || {});
|
|
1534
|
-
const
|
|
1538
|
+
const Rl = {
|
|
1535
1539
|
"de-DE": {
|
|
1536
1540
|
apply: "Anwenden",
|
|
1537
1541
|
cancel: "Abbrechen",
|
|
@@ -1582,62 +1586,62 @@ const Nl = {
|
|
|
1582
1586
|
cancel: "取消",
|
|
1583
1587
|
noOptionsMatchThisSearch: "没有符合此搜索条件的选项"
|
|
1584
1588
|
}
|
|
1585
|
-
},
|
|
1586
|
-
const
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
+
}, Ml = (a, e, l, t) => {
|
|
1590
|
+
const o = E(a.value), { t: s } = fe();
|
|
1591
|
+
oe(a, () => {
|
|
1592
|
+
o.value = a.value;
|
|
1589
1593
|
});
|
|
1590
1594
|
const i = n(
|
|
1591
|
-
() => JSON.stringify(
|
|
1595
|
+
() => JSON.stringify(o.value) === JSON.stringify(a.value)
|
|
1592
1596
|
), r = () => {
|
|
1593
|
-
t(
|
|
1594
|
-
},
|
|
1595
|
-
|
|
1596
|
-
},
|
|
1597
|
-
l.value && e.value && (
|
|
1597
|
+
t(u.SELECT, o.value), t(u.CLOSE_DROPDOWN);
|
|
1598
|
+
}, _ = () => {
|
|
1599
|
+
o.value = a.value, t(u.CLOSE_DROPDOWN);
|
|
1600
|
+
}, p = () => {
|
|
1601
|
+
l.value && e.value && (o.value = a.value);
|
|
1598
1602
|
}, c = n(() => [
|
|
1599
1603
|
{
|
|
1600
|
-
title:
|
|
1604
|
+
title: s("apply"),
|
|
1601
1605
|
event: r,
|
|
1602
1606
|
disabled: i.value
|
|
1603
1607
|
},
|
|
1604
1608
|
{
|
|
1605
|
-
title:
|
|
1606
|
-
event:
|
|
1609
|
+
title: s("cancel"),
|
|
1610
|
+
event: _
|
|
1607
1611
|
}
|
|
1608
|
-
]),
|
|
1609
|
-
|
|
1612
|
+
]), m = (b) => {
|
|
1613
|
+
o.value = b, e.value || t(u.SELECT, b);
|
|
1610
1614
|
}, f = (b) => {
|
|
1611
|
-
|
|
1612
|
-
},
|
|
1613
|
-
|
|
1615
|
+
m(b), t(u.TAB);
|
|
1616
|
+
}, d = (b) => {
|
|
1617
|
+
m(b), t(u.ENTER);
|
|
1614
1618
|
}, S = (b) => {
|
|
1615
|
-
|
|
1616
|
-
},
|
|
1617
|
-
|
|
1618
|
-
},
|
|
1619
|
-
t(
|
|
1620
|
-
},
|
|
1621
|
-
[
|
|
1622
|
-
[
|
|
1623
|
-
[
|
|
1624
|
-
[
|
|
1625
|
-
[
|
|
1619
|
+
m(b), t(u.SPACE);
|
|
1620
|
+
}, y = () => {
|
|
1621
|
+
_(), t(u.ESCAPE);
|
|
1622
|
+
}, B = () => {
|
|
1623
|
+
t(u.SHOW_MORE);
|
|
1624
|
+
}, R = {
|
|
1625
|
+
[u.SELECT]: m,
|
|
1626
|
+
[u.SHOW_MORE]: B,
|
|
1627
|
+
[u.TAB]: f,
|
|
1628
|
+
[u.SPACE]: S,
|
|
1629
|
+
[u.ENTER]: d
|
|
1626
1630
|
};
|
|
1627
1631
|
return {
|
|
1628
1632
|
// Values
|
|
1629
1633
|
actions: c,
|
|
1630
|
-
internalSelectedValue:
|
|
1634
|
+
internalSelectedValue: o,
|
|
1631
1635
|
// Methods
|
|
1632
|
-
listeners:
|
|
1633
|
-
onEscapeKey:
|
|
1634
|
-
onOutsideDropdownClick:
|
|
1636
|
+
listeners: R,
|
|
1637
|
+
onEscapeKey: y,
|
|
1638
|
+
onOutsideDropdownClick: p
|
|
1635
1639
|
};
|
|
1636
|
-
},
|
|
1637
|
-
i18n: { messages:
|
|
1640
|
+
}, Nl = U({
|
|
1641
|
+
i18n: { messages: Rl },
|
|
1638
1642
|
name: "bento-dropdown-options-container"
|
|
1639
|
-
}),
|
|
1640
|
-
...
|
|
1643
|
+
}), $l = /* @__PURE__ */ U({
|
|
1644
|
+
...Nl,
|
|
1641
1645
|
props: {
|
|
1642
1646
|
/**
|
|
1643
1647
|
* Defines a string value that labels an interactive element.
|
|
@@ -1696,8 +1700,8 @@ const Nl = {
|
|
|
1696
1700
|
*/
|
|
1697
1701
|
lazyLoadType: {
|
|
1698
1702
|
type: String,
|
|
1699
|
-
default:
|
|
1700
|
-
validator: (a) => Object.values(
|
|
1703
|
+
default: ne.AUTOMATIC,
|
|
1704
|
+
validator: (a) => Object.values(ne).includes(a)
|
|
1701
1705
|
},
|
|
1702
1706
|
/**
|
|
1703
1707
|
* Indicates if new options are lazy loading.
|
|
@@ -1736,7 +1740,7 @@ const Nl = {
|
|
|
1736
1740
|
* Reference to the DOM element or Vue component for positioning
|
|
1737
1741
|
* the Dropdown container.
|
|
1738
1742
|
*/
|
|
1739
|
-
targetElement: { type:
|
|
1743
|
+
targetElement: { type: qe.props.targetElement.type, required: !0 },
|
|
1740
1744
|
/**
|
|
1741
1745
|
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
1742
1746
|
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
@@ -1748,28 +1752,28 @@ const Nl = {
|
|
|
1748
1752
|
},
|
|
1749
1753
|
emits: [],
|
|
1750
1754
|
setup(a, { expose: e, emit: l }) {
|
|
1751
|
-
const t = a,
|
|
1755
|
+
const t = a, o = Oe(), { selectedValue: s, multiple: i } = Xe(t), r = E(null), { t: _ } = fe(), p = n(() => t.open && !t.disabled), c = n(() => _("noOptionsMatchThisSearch")), m = n(() => ({
|
|
1752
1756
|
"b-dropdown-options-container--single": !(t != null && t.multiple)
|
|
1753
1757
|
})), f = n(() => ({
|
|
1754
1758
|
"b-dropdown-options-container__listbox--single": !(t != null && t.multiple)
|
|
1755
|
-
})), { actions:
|
|
1756
|
-
var
|
|
1757
|
-
const
|
|
1758
|
-
"min-width": `${(
|
|
1759
|
+
})), { actions: d, internalSelectedValue: S, listeners: y, onEscapeKey: B, onOutsideDropdownClick: R } = Ml(s, i, p, l), b = n(() => t != null && t.multiple ? Ct : qe), O = n(() => {
|
|
1760
|
+
var T;
|
|
1761
|
+
const L = {
|
|
1762
|
+
"min-width": `${(T = t == null ? void 0 : t.targetElement) == null ? void 0 : T.clientWidth}px`,
|
|
1759
1763
|
"max-width": "min(500px, 95%)"
|
|
1760
1764
|
};
|
|
1761
1765
|
return t != null && t.multiple ? {
|
|
1762
1766
|
actionsLayout: "space-between",
|
|
1763
1767
|
ariaLabel: t.ariaLabel,
|
|
1764
|
-
actions:
|
|
1768
|
+
actions: d.value,
|
|
1765
1769
|
divider: !0,
|
|
1766
1770
|
fallbackPosition: ["top-start"],
|
|
1767
|
-
id:
|
|
1771
|
+
id: ie(`dropdown-options-${t.id}`),
|
|
1768
1772
|
open: t.open,
|
|
1769
1773
|
position: "bottom-start",
|
|
1770
1774
|
style: {
|
|
1771
1775
|
width: "auto",
|
|
1772
|
-
...
|
|
1776
|
+
...L
|
|
1773
1777
|
},
|
|
1774
1778
|
targetElement: t.targetElement
|
|
1775
1779
|
} : {
|
|
@@ -1777,39 +1781,40 @@ const Nl = {
|
|
|
1777
1781
|
offset: [0, 8],
|
|
1778
1782
|
position: "bottom-start",
|
|
1779
1783
|
style: {
|
|
1780
|
-
display:
|
|
1781
|
-
...
|
|
1784
|
+
display: p.value ? "block" : "none",
|
|
1785
|
+
...L
|
|
1782
1786
|
},
|
|
1783
1787
|
targetElement: t.targetElement
|
|
1784
1788
|
};
|
|
1785
1789
|
});
|
|
1786
1790
|
return e({
|
|
1787
|
-
onOutsideDropdownClick:
|
|
1788
|
-
|
|
1791
|
+
onOutsideDropdownClick: R,
|
|
1792
|
+
dropdownOptionsListboxRef: r
|
|
1793
|
+
}), { __sfc: !0, slots: o, emit: l, props: t, selectedValue: s, multiple: i, dropdownOptionsListboxRef: r, t: _, isDropdownOpen: p, noResultsMessage: c, conditionalClasses: m, conditionalListboxClasses: f, actions: d, internalSelectedValue: S, listeners: y, onEscapeKey: B, onOutsideDropdownClick: R, popperContainerOrPopoverComponent: b, popperContainerOrPopoverProps: O, BentoListbox: Pe };
|
|
1789
1794
|
}
|
|
1790
1795
|
});
|
|
1791
|
-
var
|
|
1796
|
+
var Pl = function() {
|
|
1792
1797
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
1793
|
-
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(
|
|
1794
|
-
|
|
1795
|
-
}, function(
|
|
1796
|
-
return !
|
|
1797
|
-
}] } }, [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(
|
|
1798
|
-
return { key:
|
|
1799
|
-
return [e._t(
|
|
1798
|
+
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) {
|
|
1799
|
+
o.stopPropagation();
|
|
1800
|
+
}, function(o) {
|
|
1801
|
+
return !o.type.indexOf("key") && e._k(o.keyCode, "esc", 27, o.key, ["Esc", "Escape"]) ? null : t.onEscapeKey.apply(null, arguments);
|
|
1802
|
+
}] } }, [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(o, s) {
|
|
1803
|
+
return { key: s, fn: function(i) {
|
|
1804
|
+
return [e._t(s, null, null, i)];
|
|
1800
1805
|
} };
|
|
1801
1806
|
})], null, !0) }, t.listeners))], 1)]) : e._e();
|
|
1802
|
-
},
|
|
1807
|
+
}, Fl = [], Vl = /* @__PURE__ */ G(
|
|
1808
|
+
$l,
|
|
1809
|
+
Pl,
|
|
1803
1810
|
Fl,
|
|
1804
|
-
Vl,
|
|
1805
|
-
zl,
|
|
1806
1811
|
!1,
|
|
1807
1812
|
null,
|
|
1808
|
-
"
|
|
1813
|
+
"1254877d"
|
|
1809
1814
|
);
|
|
1810
|
-
const
|
|
1815
|
+
const zl = Vl.exports;
|
|
1811
1816
|
var Q = /* @__PURE__ */ ((a) => (a.DISABLED = "disabled", a.READONLY = "readonly", a.HAS_ITEMS = "has-items", a.OPENED = "opened", a.ERROR = "error", a))(Q || {}), Y = /* @__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))(Y || {});
|
|
1812
|
-
const
|
|
1817
|
+
const Ul = /* @__PURE__ */ Symbol("dropdown small size injection key"), nt = /* @__PURE__ */ Symbol("dropdown underline style injection key"), Gl = {
|
|
1813
1818
|
"de-DE": {
|
|
1814
1819
|
clearSearch: "Suche löschen"
|
|
1815
1820
|
},
|
|
@@ -1840,12 +1845,12 @@ const Kl = /* @__PURE__ */ Symbol("dropdown small size injection key"), rt = /*
|
|
|
1840
1845
|
"zh-CN": {
|
|
1841
1846
|
clearSearch: "清除搜索"
|
|
1842
1847
|
}
|
|
1843
|
-
},
|
|
1844
|
-
i18n: { messages:
|
|
1848
|
+
}, Kl = U({
|
|
1849
|
+
i18n: { messages: Gl },
|
|
1845
1850
|
name: "dropdown-base-textbox",
|
|
1846
1851
|
inheritAttrs: !1
|
|
1847
|
-
}),
|
|
1848
|
-
...
|
|
1852
|
+
}), ql = /* @__PURE__ */ U({
|
|
1853
|
+
...Kl,
|
|
1849
1854
|
props: {
|
|
1850
1855
|
/**
|
|
1851
1856
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -1931,93 +1936,93 @@ const Kl = /* @__PURE__ */ Symbol("dropdown small size injection key"), rt = /*
|
|
|
1931
1936
|
},
|
|
1932
1937
|
emits: [],
|
|
1933
1938
|
setup(a, { expose: e, emit: l }) {
|
|
1934
|
-
const t = a, { t:
|
|
1939
|
+
const t = a, { t: o } = fe(), s = Ve(), i = Oe(), r = Ze(i), _ = E(null), p = ie("textbox"), c = ze(nt, !1), m = n(() => ({
|
|
1935
1940
|
[`b-dropdown-base-textbox--${Q.DISABLED}`]: t.disabled,
|
|
1936
1941
|
[`b-dropdown-base-textbox--${Q.READONLY}`]: t.readonly,
|
|
1937
1942
|
[`b-dropdown-base-textbox--${Q.HAS_ITEMS}`]: !!t.additionalItemsSelected,
|
|
1938
1943
|
"b-dropdown-base-textbox--underline": c
|
|
1939
1944
|
})), f = n(
|
|
1940
|
-
() =>
|
|
1941
|
-
),
|
|
1945
|
+
() => R.value && s["aria-required"] ? "true" : null
|
|
1946
|
+
), d = n(() => ({
|
|
1942
1947
|
"b-dropdown-base-textbox__input--dynamic-filtering": t.dynamicFiltering
|
|
1943
|
-
})), S = n(() => t.dynamicFiltering && !!t.value && t.open),
|
|
1948
|
+
})), S = n(() => t.dynamicFiltering && !!t.value && t.open), y = n(
|
|
1944
1949
|
() => {
|
|
1945
|
-
var
|
|
1950
|
+
var v;
|
|
1946
1951
|
return {
|
|
1947
1952
|
"aria-haspopup": "listbox",
|
|
1948
1953
|
"aria-controls": t.ariaControls,
|
|
1949
|
-
"aria-describedby": (
|
|
1954
|
+
"aria-describedby": (v = s["aria-describedby"]) == null ? void 0 : v.toString(),
|
|
1950
1955
|
"aria-expanded": t.ariaExpanded ? "true" : "false",
|
|
1951
1956
|
"aria-labelledby": t.ariaLabelledby,
|
|
1952
1957
|
"aria-label": t.ariaLabelledby ? null : t.ariaLabel,
|
|
1953
1958
|
"aria-invalid": t.isInvalid,
|
|
1954
1959
|
"aria-disabled": t.disabled ? !0 : null,
|
|
1955
|
-
"aria-required":
|
|
1960
|
+
"aria-required": s["aria-required"]
|
|
1956
1961
|
};
|
|
1957
1962
|
}
|
|
1958
|
-
),
|
|
1963
|
+
), B = n(
|
|
1959
1964
|
() => t.multiple ? t.selectedValueItem : []
|
|
1960
|
-
),
|
|
1961
|
-
() => t.multiple && t.selectedValueItem &&
|
|
1965
|
+
), R = n(() => t.dynamicFiltering && (t.open || t.alwaysComboboxIsInput)), b = n(() => t.selectedValueItem && !t.multiple), O = n(
|
|
1966
|
+
() => t.multiple && t.selectedValueItem && B.value.length > 0 && t.showSlotContentInMultiple
|
|
1962
1967
|
);
|
|
1963
|
-
|
|
1964
|
-
() =>
|
|
1968
|
+
oe(
|
|
1969
|
+
() => R.value,
|
|
1965
1970
|
() => {
|
|
1966
|
-
|
|
1967
|
-
|
|
1971
|
+
R.value && !t.alwaysComboboxIsInput && j(() => {
|
|
1972
|
+
_.value.focus();
|
|
1968
1973
|
});
|
|
1969
1974
|
}
|
|
1970
1975
|
);
|
|
1971
|
-
const
|
|
1972
|
-
!t.disabled && !t.readonly && (l(Y.OPEN), await j(),
|
|
1973
|
-
},
|
|
1974
|
-
t.open && (
|
|
1975
|
-
}, w = (
|
|
1976
|
-
l(Y.CLEAR), l(Y.INPUT, ""),
|
|
1977
|
-
},
|
|
1978
|
-
!t.readonly && !t.disabled ? l(Y.INPUT,
|
|
1979
|
-
},
|
|
1980
|
-
|
|
1976
|
+
const L = async () => {
|
|
1977
|
+
!t.disabled && !t.readonly && (l(Y.OPEN), await j(), _.value.focus());
|
|
1978
|
+
}, T = (v) => {
|
|
1979
|
+
t.open && (v && pe(v), _.value.focus(), l(Y.CLOSE));
|
|
1980
|
+
}, w = (v) => t.open && v.target.tagName === "INPUT" ? null : t.open ? T() : L(), F = () => {
|
|
1981
|
+
l(Y.CLEAR), l(Y.INPUT, ""), _.value.focus();
|
|
1982
|
+
}, I = (v) => {
|
|
1983
|
+
!t.readonly && !t.disabled ? l(Y.INPUT, v.target.value) : (v.preventDefault(), v.stopPropagation());
|
|
1984
|
+
}, k = () => {
|
|
1985
|
+
_.value.focus();
|
|
1981
1986
|
};
|
|
1982
1987
|
return e({
|
|
1983
|
-
focus:
|
|
1984
|
-
}), { __sfc: !0, t:
|
|
1988
|
+
focus: k
|
|
1989
|
+
}), { __sfc: !0, t: o, attrs: s, slots: i, hasSlot: r, props: t, emit: l, textbox: _, textboxId: p, isUnderlineStyle: c, conditionalClasses: m, showRequiredAttribute: f, comboboxConditionalClasses: d, isFiltering: S, ariaAttributes: y, selectedValueItems: B, shouldShowInput: R, shouldShowSingleSelectSlot: b, shouldShowMultipleSlot: O, onOpenDropdown: L, onCloseDropdown: T, onToggleDropdown: w, onClearSearch: F, onInputEvent: I, focus: k, BentoTypography: re, DropdownBaseTextboxEvent: Y, CrossCircleFillIcon: dt, CrossCircleFillSmallIcon: pt, BentoDropdownSize: ge };
|
|
1985
1990
|
}
|
|
1986
1991
|
});
|
|
1987
|
-
var
|
|
1992
|
+
var Yl = function() {
|
|
1988
1993
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
1989
|
-
return l("div", { class: e.$attrs.class, attrs: { "data-testid": "textbox-wrapper" }, on: { click: t.onToggleDropdown, keydown: function(
|
|
1990
|
-
return !
|
|
1991
|
-
} } }, [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: e.open ? e.value : e.displayValue }, on: { keydown: [function(
|
|
1992
|
-
return e.$emit(t.DropdownBaseTextboxEvent.KEYDOWN,
|
|
1993
|
-
}, function(
|
|
1994
|
-
return !
|
|
1994
|
+
return l("div", { class: e.$attrs.class, attrs: { "data-testid": "textbox-wrapper" }, on: { click: t.onToggleDropdown, keydown: function(o) {
|
|
1995
|
+
return !o.type.indexOf("key") && e._k(o.keyCode, "escape", void 0, o.key, void 0) ? null : t.onCloseDropdown.apply(null, arguments);
|
|
1996
|
+
} } }, [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: e.open ? e.value : e.displayValue }, on: { keydown: [function(o) {
|
|
1997
|
+
return e.$emit(t.DropdownBaseTextboxEvent.KEYDOWN, o);
|
|
1998
|
+
}, function(o) {
|
|
1999
|
+
return !o.type.indexOf("key") && e._k(o.keyCode, "enter", 13, o.key, "Enter") ? null : t.onToggleDropdown.apply(null, arguments);
|
|
1995
2000
|
}], 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() {
|
|
1996
2001
|
return [e._v(" " + e._s(e.displayValue) + " ")];
|
|
1997
|
-
}, null, e.selectedValueItem)] : t.shouldShowMultipleSlot ? [l("div", { staticClass: "b-dropdown-base-textbox__input-multiple-selected" }, e._l(t.selectedValueItems, function(
|
|
1998
|
-
return l("div", { key:
|
|
2002
|
+
}, null, e.selectedValueItem)] : t.shouldShowMultipleSlot ? [l("div", { staticClass: "b-dropdown-base-textbox__input-multiple-selected" }, e._l(t.selectedValueItems, function(o) {
|
|
2003
|
+
return l("div", { key: o.value }, [l("div", { staticClass: "b-dropdown-base-textbox__input-selected-element" }, [e._t("default", function() {
|
|
1999
2004
|
return [e._v(" " + e._s(e.displayValue) + " ")];
|
|
2000
|
-
}, null,
|
|
2001
|
-
}), 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(
|
|
2002
|
-
return
|
|
2003
|
-
}, keydown: function(
|
|
2004
|
-
return !
|
|
2005
|
-
}, keyup: function(
|
|
2006
|
-
return !
|
|
2005
|
+
}, null, o)], 2)]);
|
|
2006
|
+
}), 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) {
|
|
2007
|
+
return o.stopPropagation(), t.onClearSearch.apply(null, arguments);
|
|
2008
|
+
}, keydown: function(o) {
|
|
2009
|
+
return !o.type.indexOf("key") && e._k(o.keyCode, "enter", 13, o.key, "Enter") ? null : (o.stopPropagation(), t.onClearSearch.apply(null, arguments));
|
|
2010
|
+
}, keyup: function(o) {
|
|
2011
|
+
return !o.type.indexOf("key") && e._k(o.keyCode, "space", 32, o.key, [" ", "Spacebar"]) ? null : t.onClearSearch.apply(null, arguments);
|
|
2007
2012
|
} } }, [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);
|
|
2008
|
-
},
|
|
2013
|
+
}, Wl = [], jl = /* @__PURE__ */ G(
|
|
2014
|
+
ql,
|
|
2015
|
+
Yl,
|
|
2009
2016
|
Wl,
|
|
2010
|
-
jl,
|
|
2011
|
-
Hl,
|
|
2012
2017
|
!1,
|
|
2013
2018
|
null,
|
|
2014
2019
|
"20b3acdb"
|
|
2015
2020
|
);
|
|
2016
|
-
const
|
|
2021
|
+
const it = jl.exports, Hl = U({
|
|
2017
2022
|
name: "dropdown-default-textbox",
|
|
2018
2023
|
inheritAttrs: !1
|
|
2019
|
-
}),
|
|
2020
|
-
...
|
|
2024
|
+
}), Jl = /* @__PURE__ */ U({
|
|
2025
|
+
...Hl,
|
|
2021
2026
|
props: {
|
|
2022
2027
|
/**
|
|
2023
2028
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -2105,94 +2110,94 @@ const ct = Jl.exports, Xl = U({
|
|
|
2105
2110
|
},
|
|
2106
2111
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
2107
2112
|
setup(a, { expose: e, emit: l }) {
|
|
2108
|
-
const t = a,
|
|
2113
|
+
const t = a, o = Oe(), s = E(null), i = n(() => ({
|
|
2109
2114
|
[`b-dropdown-default-textbox--${Q.ERROR}`]: !t.disabled && !t.readonly && t.isInvalid,
|
|
2110
2115
|
[`b-dropdown-default-textbox--${Q.DISABLED}`]: t.disabled,
|
|
2111
2116
|
[`b-dropdown-default-textbox--${Q.READONLY}`]: t.readonly,
|
|
2112
2117
|
[`b-dropdown-default-textbox--${Q.OPENED}`]: t.open,
|
|
2113
2118
|
"b-dropdown-default-textbox--condensed": t.condensed
|
|
2114
|
-
})), r = n(() => t.open && !t.disabled && !t.readonly),
|
|
2115
|
-
l("input",
|
|
2116
|
-
},
|
|
2117
|
-
l("keydown",
|
|
2118
|
-
}, c = (
|
|
2119
|
-
|
|
2120
|
-
},
|
|
2121
|
-
|
|
2122
|
-
}, f = (
|
|
2123
|
-
|
|
2124
|
-
},
|
|
2125
|
-
[Y.INPUT]:
|
|
2119
|
+
})), r = n(() => t.open && !t.disabled && !t.readonly), _ = (y) => {
|
|
2120
|
+
l("input", y);
|
|
2121
|
+
}, p = (y) => {
|
|
2122
|
+
l("keydown", y);
|
|
2123
|
+
}, c = (y) => {
|
|
2124
|
+
pe(y), l("open");
|
|
2125
|
+
}, m = (y) => {
|
|
2126
|
+
pe(y), l("close");
|
|
2127
|
+
}, f = (y) => {
|
|
2128
|
+
pe(y), l("clear");
|
|
2129
|
+
}, d = {
|
|
2130
|
+
[Y.INPUT]: _,
|
|
2126
2131
|
[Y.OPEN]: c,
|
|
2127
|
-
[Y.CLOSE]:
|
|
2132
|
+
[Y.CLOSE]: m,
|
|
2128
2133
|
[Y.CLEAR]: f,
|
|
2129
|
-
[Y.KEYDOWN]:
|
|
2134
|
+
[Y.KEYDOWN]: p
|
|
2130
2135
|
}, S = () => {
|
|
2131
|
-
|
|
2136
|
+
s.value.focus();
|
|
2132
2137
|
};
|
|
2133
2138
|
return e({
|
|
2134
2139
|
focus: S
|
|
2135
|
-
}), { __sfc: !0, emit: l, slots:
|
|
2140
|
+
}), { __sfc: !0, emit: l, slots: o, props: t, baseTextbox: s, conditionalClasses: i, isDropdownOpen: r, onInput: _, onKeyDown: p, openDropdown: c, closeDropdown: m, clearValue: f, listeners: d, focus: S, DropdownBaseTextbox: it, ChevronDownIcon: Qe, ChevronUpIcon: et };
|
|
2136
2141
|
}
|
|
2137
2142
|
});
|
|
2138
|
-
var
|
|
2143
|
+
var Xl = function() {
|
|
2139
2144
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
2140
|
-
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(
|
|
2141
|
-
return { key:
|
|
2142
|
-
return [e._t(
|
|
2145
|
+
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) {
|
|
2146
|
+
return { key: s, fn: function(i) {
|
|
2147
|
+
return [e._t(s, null, null, i ?? {})];
|
|
2143
2148
|
} };
|
|
2144
2149
|
}), { key: "icon", fn: function() {
|
|
2145
2150
|
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)];
|
|
2146
2151
|
}, proxy: !0 }], null, !0) }, "dropdown-base-textbox", { ...e.$attrs, ...e.$props }, !1), t.listeners))], 1);
|
|
2147
|
-
},
|
|
2152
|
+
}, Zl = [], Ql = /* @__PURE__ */ G(
|
|
2153
|
+
Jl,
|
|
2154
|
+
Xl,
|
|
2148
2155
|
Zl,
|
|
2149
|
-
Ql,
|
|
2150
|
-
ea,
|
|
2151
2156
|
!1,
|
|
2152
2157
|
null,
|
|
2153
2158
|
"bf2d43b0"
|
|
2154
2159
|
);
|
|
2155
|
-
const
|
|
2156
|
-
let
|
|
2157
|
-
const
|
|
2160
|
+
const ea = Ql.exports;
|
|
2161
|
+
let He = 0;
|
|
2162
|
+
const ta = {
|
|
2158
2163
|
beforeCreate() {
|
|
2159
|
-
this.uuid =
|
|
2164
|
+
this.uuid = He.toString(), He += 1;
|
|
2160
2165
|
}
|
|
2161
2166
|
};
|
|
2162
|
-
var
|
|
2167
|
+
var la = function() {
|
|
2163
2168
|
var e = this, l = e._self._c;
|
|
2164
2169
|
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" } })]);
|
|
2165
|
-
},
|
|
2170
|
+
}, aa = [], oa = /* @__PURE__ */ G(
|
|
2171
|
+
ta,
|
|
2172
|
+
la,
|
|
2166
2173
|
aa,
|
|
2167
|
-
sa,
|
|
2168
|
-
oa,
|
|
2169
2174
|
!1,
|
|
2170
2175
|
null,
|
|
2171
2176
|
null
|
|
2172
2177
|
);
|
|
2173
|
-
const
|
|
2174
|
-
let
|
|
2175
|
-
const
|
|
2178
|
+
const sa = oa.exports;
|
|
2179
|
+
let Je = 0;
|
|
2180
|
+
const na = {
|
|
2176
2181
|
beforeCreate() {
|
|
2177
|
-
this.uuid =
|
|
2182
|
+
this.uuid = Je.toString(), Je += 1;
|
|
2178
2183
|
}
|
|
2179
2184
|
};
|
|
2180
|
-
var
|
|
2185
|
+
var ia = function() {
|
|
2181
2186
|
var e = this, l = e._self._c;
|
|
2182
2187
|
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" } })]);
|
|
2183
|
-
},
|
|
2188
|
+
}, ra = [], ca = /* @__PURE__ */ G(
|
|
2189
|
+
na,
|
|
2190
|
+
ia,
|
|
2184
2191
|
ra,
|
|
2185
|
-
ca,
|
|
2186
|
-
da,
|
|
2187
2192
|
!1,
|
|
2188
2193
|
null,
|
|
2189
2194
|
null
|
|
2190
2195
|
);
|
|
2191
|
-
const
|
|
2196
|
+
const ua = ca.exports, da = U({
|
|
2192
2197
|
name: "dropdown-small-textbox",
|
|
2193
2198
|
inheritAttrs: !1
|
|
2194
|
-
}),
|
|
2195
|
-
...
|
|
2199
|
+
}), pa = /* @__PURE__ */ U({
|
|
2200
|
+
...da,
|
|
2196
2201
|
props: {
|
|
2197
2202
|
/**
|
|
2198
2203
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -2249,160 +2254,160 @@ const pa = ua.exports, fa = U({
|
|
|
2249
2254
|
},
|
|
2250
2255
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
2251
2256
|
setup(a, { expose: e, emit: l }) {
|
|
2252
|
-
const t = a,
|
|
2257
|
+
const t = a, o = E(null), s = ze(nt, !1), i = n(() => ({
|
|
2253
2258
|
[`b-dropdown-small-textbox--${Q.DISABLED}`]: t.disabled,
|
|
2254
2259
|
[`b-dropdown-small-textbox--${Q.READONLY}`]: t.readonly,
|
|
2255
2260
|
[`b-dropdown-small-textbox--${Q.OPENED}`]: t.open,
|
|
2256
|
-
"b-dropdown-small-textbox--underline":
|
|
2257
|
-
})), r = n(() => t.open && !t.disabled && !t.readonly),
|
|
2258
|
-
l("input",
|
|
2259
|
-
},
|
|
2260
|
-
l("keydown",
|
|
2261
|
-
}, c = (
|
|
2262
|
-
|
|
2263
|
-
},
|
|
2264
|
-
|
|
2265
|
-
}, f = (
|
|
2266
|
-
|
|
2267
|
-
},
|
|
2268
|
-
[Y.INPUT]:
|
|
2261
|
+
"b-dropdown-small-textbox--underline": s
|
|
2262
|
+
})), r = n(() => t.open && !t.disabled && !t.readonly), _ = (y) => {
|
|
2263
|
+
l("input", y);
|
|
2264
|
+
}, p = (y) => {
|
|
2265
|
+
l("keydown", y);
|
|
2266
|
+
}, c = (y) => {
|
|
2267
|
+
pe(y), l("open");
|
|
2268
|
+
}, m = (y) => {
|
|
2269
|
+
pe(y), l("close");
|
|
2270
|
+
}, f = (y) => {
|
|
2271
|
+
pe(y), l("clear");
|
|
2272
|
+
}, d = {
|
|
2273
|
+
[Y.INPUT]: _,
|
|
2269
2274
|
[Y.OPEN]: c,
|
|
2270
|
-
[Y.CLOSE]:
|
|
2275
|
+
[Y.CLOSE]: m,
|
|
2271
2276
|
[Y.CLEAR]: f,
|
|
2272
|
-
[Y.KEYDOWN]:
|
|
2277
|
+
[Y.KEYDOWN]: p
|
|
2273
2278
|
}, S = () => {
|
|
2274
|
-
|
|
2279
|
+
o.value.focus();
|
|
2275
2280
|
};
|
|
2276
2281
|
return e({
|
|
2277
2282
|
focus: S
|
|
2278
|
-
}), { __sfc: !0, emit: l, props: t, baseTextbox:
|
|
2283
|
+
}), { __sfc: !0, emit: l, props: t, baseTextbox: o, isUnderlineStyle: s, conditionalClasses: i, isDropdownOpen: r, onInput: _, onKeyDown: p, openDropdown: c, closeDropdown: m, clearValue: f, listeners: d, focus: S, BentoDropdownSize: ge, DropdownBaseTextbox: it, ChevronDownSmallIcon: sa, ChevronUpSmallIcon: ua };
|
|
2279
2284
|
}
|
|
2280
2285
|
});
|
|
2281
|
-
var
|
|
2286
|
+
var fa = function() {
|
|
2282
2287
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
2283
2288
|
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([{ key: "icon", fn: function() {
|
|
2284
2289
|
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)];
|
|
2285
2290
|
}, proxy: !0 }]) }, "dropdown-base-textbox", { ...e.$attrs, ...e.$props }, !1), t.listeners))], 1);
|
|
2286
|
-
},
|
|
2291
|
+
}, ba = [], va = /* @__PURE__ */ G(
|
|
2292
|
+
pa,
|
|
2293
|
+
fa,
|
|
2287
2294
|
ba,
|
|
2288
|
-
va,
|
|
2289
|
-
ma,
|
|
2290
2295
|
!1,
|
|
2291
2296
|
null,
|
|
2292
2297
|
"fa225e76"
|
|
2293
2298
|
);
|
|
2294
|
-
const
|
|
2299
|
+
const ma = va.exports, _a = (a, e) => e.value.reduce((l, t) => {
|
|
2295
2300
|
if (t.items) {
|
|
2296
|
-
const
|
|
2301
|
+
const o = t.items.filter(
|
|
2297
2302
|
(i) => a.value.find((r) => r.value === i.value)
|
|
2298
2303
|
);
|
|
2299
|
-
|
|
2304
|
+
o.length === t.items.length ? l.push(t.displayValue ?? t.label) : o.forEach(({ label: i, displayValue: r }) => l.push(r ?? i));
|
|
2300
2305
|
}
|
|
2301
|
-
return a.value.find((
|
|
2302
|
-
}, []).join(", "),
|
|
2303
|
-
const
|
|
2306
|
+
return a.value.find((o) => o.value === t.value) && l.push(t.displayValue ?? t.label), l;
|
|
2307
|
+
}, []).join(", "), ya = ({ items: a, placeholder: e, selectedValues: l, isMultiSelect: t }) => {
|
|
2308
|
+
const o = n(
|
|
2304
2309
|
() => t.value && a.value.find((i) => {
|
|
2305
2310
|
var r;
|
|
2306
2311
|
return (r = i.items) == null ? void 0 : r.length;
|
|
2307
2312
|
})
|
|
2308
2313
|
);
|
|
2309
|
-
return n(() => l.value.length ?
|
|
2310
|
-
},
|
|
2314
|
+
return n(() => l.value.length ? o.value ? _a(l, a) : l.value.map(({ label: i, displayValue: r }) => r ?? i).join(", ") : e.value || null);
|
|
2315
|
+
}, rt = (a) => {
|
|
2311
2316
|
var e;
|
|
2312
2317
|
(e = a.value.$children) == null || e[0].$refs.textbox.focus();
|
|
2313
|
-
},
|
|
2318
|
+
}, ga = ({
|
|
2314
2319
|
inputContainerRef: a,
|
|
2315
2320
|
optionsContainerRef: e,
|
|
2316
2321
|
selectedValueIndex: l,
|
|
2317
2322
|
isDropdownOpen: t,
|
|
2318
|
-
isDynamicFltering:
|
|
2319
|
-
items:
|
|
2323
|
+
isDynamicFltering: o,
|
|
2324
|
+
items: s,
|
|
2320
2325
|
isMultiple: i,
|
|
2321
2326
|
totalItemCount: r,
|
|
2322
|
-
isVirtualScroll:
|
|
2323
|
-
},
|
|
2324
|
-
const f = async (
|
|
2325
|
-
var
|
|
2326
|
-
|
|
2327
|
-
},
|
|
2328
|
-
var
|
|
2329
|
-
|
|
2330
|
-
const
|
|
2327
|
+
isVirtualScroll: _
|
|
2328
|
+
}, p, c, m) => {
|
|
2329
|
+
const f = async (g) => {
|
|
2330
|
+
var N;
|
|
2331
|
+
o.value && await j(), (N = s.value[g]) == null || N.focus();
|
|
2332
|
+
}, d = async (g) => {
|
|
2333
|
+
var se, K;
|
|
2334
|
+
o.value && await j();
|
|
2335
|
+
const N = (se = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : se.$el.querySelectorAll(
|
|
2331
2336
|
"button"
|
|
2332
2337
|
);
|
|
2333
|
-
|
|
2334
|
-
}, S = (
|
|
2335
|
-
var
|
|
2336
|
-
return (
|
|
2337
|
-
|
|
2338
|
+
N != null && N.length ? (K = N[g]) == null || K.focus() : f(g);
|
|
2339
|
+
}, S = (g) => {
|
|
2340
|
+
var N;
|
|
2341
|
+
return (N = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : N.setListboxFocusedIndex(
|
|
2342
|
+
g
|
|
2338
2343
|
);
|
|
2339
|
-
},
|
|
2340
|
-
var
|
|
2341
|
-
await ((
|
|
2342
|
-
},
|
|
2344
|
+
}, y = async (g) => {
|
|
2345
|
+
var N;
|
|
2346
|
+
await ((N = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : N.navigateToItem(g));
|
|
2347
|
+
}, B = (g) => {
|
|
2343
2348
|
j(() => {
|
|
2344
|
-
|
|
2349
|
+
_ ? y(g) : (S(g), f(g));
|
|
2345
2350
|
});
|
|
2346
|
-
},
|
|
2347
|
-
t.value || c(),
|
|
2351
|
+
}, R = () => {
|
|
2352
|
+
t.value || c(), B(0);
|
|
2348
2353
|
}, b = () => {
|
|
2349
2354
|
t.value || c(), j(() => {
|
|
2350
|
-
|
|
2355
|
+
B(_ ? r.value - 1 : s.value.length - 1);
|
|
2351
2356
|
});
|
|
2352
|
-
}, O = (
|
|
2353
|
-
|
|
2354
|
-
},
|
|
2355
|
-
O(
|
|
2356
|
-
},
|
|
2357
|
-
O(
|
|
2358
|
-
}, w = ({ detail:
|
|
2359
|
-
O(
|
|
2360
|
-
},
|
|
2361
|
-
O(
|
|
2362
|
-
},
|
|
2363
|
-
O(
|
|
2364
|
-
},
|
|
2365
|
-
O(
|
|
2366
|
-
},
|
|
2367
|
-
|
|
2368
|
-
},
|
|
2369
|
-
|
|
2357
|
+
}, O = (g) => {
|
|
2358
|
+
g.preventDefault(), g.stopPropagation();
|
|
2359
|
+
}, L = ({ detail: g }) => {
|
|
2360
|
+
O(g), R();
|
|
2361
|
+
}, T = ({ detail: g }) => {
|
|
2362
|
+
O(g), b();
|
|
2363
|
+
}, w = ({ detail: g }) => {
|
|
2364
|
+
O(g), R();
|
|
2365
|
+
}, F = ({ detail: g }) => {
|
|
2366
|
+
O(g), b();
|
|
2367
|
+
}, I = ({ detail: g }) => {
|
|
2368
|
+
O(g), p(), t.value && (i ? d(0) : B(l.value));
|
|
2369
|
+
}, k = ({ detail: g }) => {
|
|
2370
|
+
O(g), p(), t.value && (i ? d(0) : B(l.value));
|
|
2371
|
+
}, v = ({ detail: g }) => {
|
|
2372
|
+
g.stopPropagation(), t.value && m();
|
|
2373
|
+
}, A = ({ detail: g }) => {
|
|
2374
|
+
g.stopPropagation(), t.value && (m(), rt(a));
|
|
2370
2375
|
};
|
|
2371
2376
|
return n(() => ({
|
|
2372
|
-
[z.ARROW_DOWN]:
|
|
2373
|
-
[z.ARROW_UP]:
|
|
2377
|
+
[z.ARROW_DOWN]: L,
|
|
2378
|
+
[z.ARROW_UP]: T,
|
|
2374
2379
|
[z.HOME]: w,
|
|
2375
|
-
[z.END]:
|
|
2376
|
-
...
|
|
2377
|
-
[z.ENTER]:
|
|
2378
|
-
...
|
|
2379
|
-
[z.ESCAPE]:
|
|
2380
|
+
[z.END]: F,
|
|
2381
|
+
...o.value ? {} : { [z.SPACE]: I },
|
|
2382
|
+
[z.ENTER]: k,
|
|
2383
|
+
...o.value ? {} : { [z.TAB]: v },
|
|
2384
|
+
[z.ESCAPE]: A
|
|
2380
2385
|
}));
|
|
2381
|
-
},
|
|
2386
|
+
}, ha = ({ inputContainerRef: a, isDropdownOpen: e }, l) => {
|
|
2382
2387
|
const t = () => {
|
|
2383
2388
|
e.value && l(), j(() => {
|
|
2384
|
-
|
|
2389
|
+
rt(a);
|
|
2385
2390
|
});
|
|
2386
2391
|
};
|
|
2387
2392
|
return {
|
|
2388
|
-
[
|
|
2389
|
-
[
|
|
2390
|
-
[
|
|
2391
|
-
[
|
|
2393
|
+
[u.ENTER]: t,
|
|
2394
|
+
[u.ESCAPE]: t,
|
|
2395
|
+
[u.TAB]: t,
|
|
2396
|
+
[u.SPACE]: t
|
|
2392
2397
|
};
|
|
2393
2398
|
};
|
|
2394
|
-
function
|
|
2395
|
-
const
|
|
2396
|
-
return
|
|
2397
|
-
|
|
2399
|
+
function Sa(a, e, l, t, o) {
|
|
2400
|
+
const s = E(a), i = E(e), r = (c, m = []) => m.flatMap((f) => f.label.toLocaleLowerCase().includes(c) ? t != null && t.value && f.items ? [...r(c, f.items)] : [f, ...r(c, f.items)] : f.items ? [...r(c, f.items)] : []), _ = l !== void 0 ? st(() => l(s.value), o ?? 300) : void 0;
|
|
2401
|
+
return oe(s, () => {
|
|
2402
|
+
_ !== void 0 && _();
|
|
2398
2403
|
}), n(() => {
|
|
2399
|
-
if (!
|
|
2404
|
+
if (!s.value || l !== void 0)
|
|
2400
2405
|
return i.value;
|
|
2401
|
-
const c =
|
|
2406
|
+
const c = s.value.toLocaleLowerCase();
|
|
2402
2407
|
return r(c, i.value);
|
|
2403
2408
|
});
|
|
2404
2409
|
}
|
|
2405
|
-
const
|
|
2410
|
+
const xa = {
|
|
2406
2411
|
"de-DE": {
|
|
2407
2412
|
all: "Alle",
|
|
2408
2413
|
ariaLabelFallback: "Dropdown",
|
|
@@ -2453,16 +2458,16 @@ const Oa = {
|
|
|
2453
2458
|
ariaLabelFallback: "下拉菜单",
|
|
2454
2459
|
clearSearch: "清除筛选器"
|
|
2455
2460
|
}
|
|
2456
|
-
},
|
|
2457
|
-
i18n: { messages:
|
|
2461
|
+
}, Ca = U({
|
|
2462
|
+
i18n: { messages: xa },
|
|
2458
2463
|
name: "b-dropdown",
|
|
2459
2464
|
components: {
|
|
2460
|
-
DropdownInputDefault:
|
|
2461
|
-
DropdownInputSmall:
|
|
2465
|
+
DropdownInputDefault: ea,
|
|
2466
|
+
DropdownInputSmall: ma
|
|
2462
2467
|
},
|
|
2463
2468
|
model: { prop: "modelValue" }
|
|
2464
|
-
}),
|
|
2465
|
-
...
|
|
2469
|
+
}), Oa = /* @__PURE__ */ U({
|
|
2470
|
+
...Ca,
|
|
2466
2471
|
props: {
|
|
2467
2472
|
description: { default: null },
|
|
2468
2473
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -2497,118 +2502,118 @@ const Oa = {
|
|
|
2497
2502
|
},
|
|
2498
2503
|
emits: ["input", "update:model-value", "show-more", "open"],
|
|
2499
2504
|
setup(a, { expose: e, emit: l }) {
|
|
2500
|
-
var
|
|
2501
|
-
const t = a,
|
|
2505
|
+
var V, ue;
|
|
2506
|
+
const t = a, o = Ve(), s = Oe(), i = Ze(s), { t: r } = fe(), { emitValue: _ } = bt(l), p = E(null), c = E(null), m = E(null), f = E(!1), d = ie("bento-dropdown-options-container"), S = ie("dropdown-label"), y = ie("dropdown-description"), B = ie("dropdown-error"), { isReadOnly: R } = vt(W(t, "readonly")), b = n(() => t.modelValue ?? t.value), { cachedSelectedListboxOptions: O, cachedListboxSelectedValues: L, setCachedValues: T } = Bl(
|
|
2502
2507
|
W(t, "items"),
|
|
2503
2508
|
b,
|
|
2504
2509
|
W(t, "multiple"),
|
|
2505
2510
|
W(t, "enableValueLabelPair")
|
|
2506
|
-
), w =
|
|
2511
|
+
), w = E(o["aria-label"]), F = E(o["aria-describedby"]), { ariaLabel: I, label: k } = Xe(t), v = n(() => r("ariaLabelFallback")), A = ft({
|
|
2507
2512
|
// TODO: take ariaLabel ref away when aria-label prop is removed
|
|
2508
|
-
ariaLabel:
|
|
2509
|
-
label:
|
|
2510
|
-
defaultFallback:
|
|
2511
|
-
}),
|
|
2513
|
+
ariaLabel: I.value || w,
|
|
2514
|
+
label: k,
|
|
2515
|
+
defaultFallback: v
|
|
2516
|
+
}), M = t.size === ge.SMALL || ze(Ul, !1), g = n(() => M ? ge.SMALL : ge.DEFAULT), N = n(() => ({
|
|
2512
2517
|
"b-dropdown--condensed": t.condensed
|
|
2513
|
-
})),
|
|
2518
|
+
})), se = n(() => ({
|
|
2514
2519
|
"b-dropdown__description--error": !!t.errorMessage
|
|
2515
|
-
})),
|
|
2520
|
+
})), K = E(""), le = W(t, "items"), q = W(t, "staticCategories"), ee = Sa(
|
|
2521
|
+
K,
|
|
2522
|
+
le,
|
|
2523
|
+
(V = t == null ? void 0 : t.search) == null ? void 0 : V.searchEvent,
|
|
2516
2524
|
q,
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
(ce = t == null ? void 0 : t.search) == null ? void 0 : ce.debounceTime
|
|
2521
|
-
), he = n(() => t.dynamicFiltering && !!q.value), Re = ha({
|
|
2522
|
-
items: V,
|
|
2525
|
+
(ue = t == null ? void 0 : t.search) == null ? void 0 : ue.debounceTime
|
|
2526
|
+
), he = n(() => t.dynamicFiltering && !!K.value), Re = ya({
|
|
2527
|
+
items: le,
|
|
2523
2528
|
placeholder: W(t, "placeholder"),
|
|
2524
2529
|
isMultiSelect: W(t, "multiple"),
|
|
2525
2530
|
selectedValues: O
|
|
2526
2531
|
}), Me = n(() => {
|
|
2527
2532
|
if (t != null && t.multiple && Array.isArray(b.value))
|
|
2528
2533
|
return t.items.filter(
|
|
2529
|
-
({ value:
|
|
2534
|
+
({ value: P }) => (t == null ? void 0 : t.value) && (t == null ? void 0 : t.value).includes(P)
|
|
2530
2535
|
);
|
|
2531
2536
|
if (!t.multiple && t.staticCategories) {
|
|
2532
|
-
const
|
|
2533
|
-
(
|
|
2534
|
-
var
|
|
2535
|
-
return (
|
|
2537
|
+
const P = t.items.find(
|
|
2538
|
+
(te) => {
|
|
2539
|
+
var Z;
|
|
2540
|
+
return (Z = te.items) == null ? void 0 : Z.some((Ae) => Ae.value === b.value);
|
|
2536
2541
|
}
|
|
2537
2542
|
);
|
|
2538
|
-
return (
|
|
2543
|
+
return (P ? P.items.find((te) => te.value === b.value) : t.items.find(({ value: te }) => te === b.value)) ?? null;
|
|
2539
2544
|
}
|
|
2540
|
-
return t.items.find(({ value:
|
|
2545
|
+
return t.items.find(({ value: P }) => P === b.value);
|
|
2541
2546
|
}), be = n(() => {
|
|
2542
|
-
const H = (J.value ?
|
|
2543
|
-
var
|
|
2544
|
-
return t.enableValueLabelPair ? ((
|
|
2547
|
+
const H = (J.value ? ce.value : ee.value).findIndex(({ value: te }) => {
|
|
2548
|
+
var Z;
|
|
2549
|
+
return t.enableValueLabelPair ? ((Z = b.value) == null ? void 0 : Z.value) === te : b.value === te;
|
|
2545
2550
|
});
|
|
2546
2551
|
return H > -1 ? H : 0;
|
|
2547
|
-
}), { isMultiLevelSelect: J, flattenedItemsList:
|
|
2552
|
+
}), { isMultiLevelSelect: J, flattenedItemsList: ce } = ot(le), Se = n(() => J.value && !t.staticCategories), Ee = n(() => Se.value ? "treeitem" : "option"), Ie = n(() => {
|
|
2548
2553
|
if (t.multiple) {
|
|
2549
|
-
const
|
|
2550
|
-
return
|
|
2554
|
+
const P = Array.isArray(b.value) ? b.value.length : 0, H = J.value ? ce.value.length : le.value.length;
|
|
2555
|
+
return P === 0 ? null : !t.hasMoreItems && H > 0 && H === P ? r("all") : P;
|
|
2551
2556
|
}
|
|
2552
2557
|
return null;
|
|
2553
2558
|
}), Le = n(
|
|
2554
2559
|
() => [
|
|
2555
|
-
t.description ?
|
|
2556
|
-
|
|
2557
|
-
t.errorMessage ?
|
|
2560
|
+
t.description ? y : null,
|
|
2561
|
+
F.value,
|
|
2562
|
+
t.errorMessage ? B : null
|
|
2558
2563
|
].filter(Boolean).join(" ") || null
|
|
2559
2564
|
), ve = n(() => {
|
|
2560
|
-
var
|
|
2561
|
-
return (
|
|
2565
|
+
var P;
|
|
2566
|
+
return (P = m.value) == null ? void 0 : P.$el;
|
|
2562
2567
|
}), { visibleDomOptions: xe, updateVisibleDomOptions: me } = Ue(
|
|
2563
2568
|
ve,
|
|
2564
|
-
|
|
2569
|
+
ee,
|
|
2565
2570
|
Ee
|
|
2566
2571
|
), _e = () => {
|
|
2567
|
-
|
|
2572
|
+
R.value || (f.value = !0, j(() => {
|
|
2568
2573
|
me();
|
|
2569
2574
|
}));
|
|
2570
2575
|
}, ye = () => {
|
|
2571
2576
|
f.value = !1;
|
|
2572
2577
|
}, Ce = () => {
|
|
2573
|
-
|
|
2578
|
+
R.value || (f.value = !f.value, j(() => {
|
|
2574
2579
|
me();
|
|
2575
|
-
}), he.value && (
|
|
2580
|
+
}), he.value && (K.value = ""));
|
|
2576
2581
|
}, Te = () => {
|
|
2577
|
-
he.value && (
|
|
2582
|
+
he.value && (K.value = ""), f.value && (f.value = !1, m.value.onOutsideDropdownClick());
|
|
2578
2583
|
}, Ne = n(() => [
|
|
2579
2584
|
Te,
|
|
2580
2585
|
{
|
|
2581
2586
|
ignore: [ve]
|
|
2582
2587
|
}
|
|
2583
|
-
]), we = async (
|
|
2584
|
-
t.multiple || (
|
|
2585
|
-
},
|
|
2586
|
-
l(
|
|
2587
|
-
}, x =
|
|
2588
|
+
]), we = async (P) => {
|
|
2589
|
+
t.multiple || (K.value = "", f.value = !1), T(P), _(L.value), t.multiple || (await j(), $());
|
|
2590
|
+
}, h = () => {
|
|
2591
|
+
l(u.SHOW_MORE);
|
|
2592
|
+
}, x = ga(
|
|
2588
2593
|
{
|
|
2589
|
-
inputContainerRef:
|
|
2590
|
-
optionsContainerRef:
|
|
2594
|
+
inputContainerRef: p,
|
|
2595
|
+
optionsContainerRef: m,
|
|
2591
2596
|
selectedValueIndex: be,
|
|
2592
2597
|
isDropdownOpen: f,
|
|
2593
2598
|
isDynamicFltering: W(t, "dynamicFiltering"),
|
|
2594
2599
|
items: xe,
|
|
2595
2600
|
isMultiple: t.multiple,
|
|
2596
|
-
totalItemCount: n(() =>
|
|
2601
|
+
totalItemCount: n(() => ee.value.length),
|
|
2597
2602
|
isVirtualScroll: !(t != null && t.multiple) && (t == null ? void 0 : t.virtualScroll) !== !1 && (t == null ? void 0 : t.lazyLoadType) === "none"
|
|
2598
2603
|
},
|
|
2599
2604
|
Ce,
|
|
2600
2605
|
_e,
|
|
2601
2606
|
ye
|
|
2602
|
-
), C =
|
|
2607
|
+
), C = ha(
|
|
2603
2608
|
{
|
|
2604
|
-
inputContainerRef:
|
|
2609
|
+
inputContainerRef: p,
|
|
2605
2610
|
isDropdownOpen: f
|
|
2606
2611
|
},
|
|
2607
2612
|
ye
|
|
2608
2613
|
), D = {
|
|
2609
|
-
[
|
|
2610
|
-
[
|
|
2611
|
-
[
|
|
2614
|
+
[u.CLOSE_DROPDOWN]: ye,
|
|
2615
|
+
[u.SELECT]: we,
|
|
2616
|
+
[u.SHOW_MORE]: h,
|
|
2612
2617
|
...C
|
|
2613
2618
|
};
|
|
2614
2619
|
t.error && $e(
|
|
@@ -2623,67 +2628,67 @@ const Oa = {
|
|
|
2623
2628
|
Use the "v-model" or "model-value" property instead.`,
|
|
2624
2629
|
"2.0.0"
|
|
2625
2630
|
);
|
|
2626
|
-
const
|
|
2627
|
-
|
|
2631
|
+
const $ = () => {
|
|
2632
|
+
p.value.focus();
|
|
2628
2633
|
}, X = async () => {
|
|
2629
|
-
var
|
|
2630
|
-
if (await j(), !f.value || t.multiple || !
|
|
2634
|
+
var Ae;
|
|
2635
|
+
if (await j(), !f.value || t.multiple || !m.value)
|
|
2631
2636
|
return;
|
|
2632
|
-
const
|
|
2633
|
-
if (
|
|
2637
|
+
const P = be.value;
|
|
2638
|
+
if (P <= 0)
|
|
2634
2639
|
return;
|
|
2635
|
-
const H =
|
|
2636
|
-
(
|
|
2640
|
+
const H = m.value.dropdownOptionsListboxRef, te = H == null ? void 0 : H.listboxRef, Z = H == null ? void 0 : H.listboxItemRef;
|
|
2641
|
+
(Ae = Z == null ? void 0 : Z.scrollToItem) == null || Ae.call(Z, P, te);
|
|
2637
2642
|
};
|
|
2638
|
-
return
|
|
2643
|
+
return oe(
|
|
2639
2644
|
() => f.value,
|
|
2640
|
-
(
|
|
2641
|
-
|
|
2645
|
+
(P) => {
|
|
2646
|
+
P && (l("open"), X());
|
|
2642
2647
|
}
|
|
2643
2648
|
), e({
|
|
2644
|
-
focus:
|
|
2645
|
-
}), { __sfc: !0, attrs:
|
|
2649
|
+
focus: $
|
|
2650
|
+
}), { __sfc: !0, attrs: o, slots: s, hasSlot: i, props: t, emit: l, t: r, emitValue: _, inputContainerRef: p, inputContainerRefWrapper: c, optionsContainerRef: m, isDropdownOpen: f, dropdownOptionsContainerId: d, labelId: S, descriptionId: y, errorId: B, isReadOnly: R, dropdownValue: b, cachedSelectedListboxOptions: O, cachedListboxSelectedValues: L, setCachedValues: T, ariaLabelAttribute: w, ariaDescribedByAttribute: F, ariaLabel: I, label: k, computedAriaLabelFallbackMessage: v, computedAriaLabel: A, isInputComponent: M, computedSize: g, conditionalClasses: N, descriptionConditionalClasses: se, searchTerm: K, items: le, staticCategories: q, filteredItems: ee, isSearching: he, displayValue: Re, selectedValueItem: Me, selectedValueIndex: be, isMultiLevelSelect: J, flattenedItemsList: ce, isTreePattern: Se, computedOptionRole: Ee, additionalItemsSelected: Ie, ariaDescribedBy: Le, listboxRef: ve, visibleDomOptions: xe, updateVisibleDomOptions: me, openDropdown: _e, closeDropdown: ye, toggleDropdown: Ce, clickOutsideDropdown: Te, clickOutsideDropdownOptions: Ne, onOptionSelected: we, emitShowMoreEvent: h, textboxKeyboardNavigationListeners: x, listboxKeyboardNavigationListeners: C, listboxListeners: D, focus: $, scrollToSelectedOption: X, BentoDropdownOptionsContainer: zl, BentoTypography: re, ErrorMessage: Lt, FieldLabel: It, BentoTeleport: Ot, vBentoClickOutsideDirective: Et, vBentoKeyboardNavigationDirective: ke };
|
|
2646
2651
|
}
|
|
2647
2652
|
});
|
|
2648
|
-
var
|
|
2649
|
-
var
|
|
2653
|
+
var Ea = function() {
|
|
2654
|
+
var o, s;
|
|
2650
2655
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
2651
2656
|
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(i) {
|
|
2652
2657
|
t.searchTerm = i;
|
|
2653
2658
|
}, open: t.toggleDropdown, close: t.toggleDropdown }, scopedSlots: e._u([e._l(t.slots, function(i, r) {
|
|
2654
|
-
return { key: r, fn: function(
|
|
2655
|
-
return [e._t(r, null, null,
|
|
2659
|
+
return { key: r, fn: function(_) {
|
|
2660
|
+
return [e._t(r, null, null, _)];
|
|
2656
2661
|
} };
|
|
2657
|
-
})], null, !0) })], 1), t.inputContainerRef ? l(t.BentoTeleport, { attrs: { disabled: (
|
|
2658
|
-
return { key: r, fn: function(
|
|
2659
|
-
return [e._t(r, null, null,
|
|
2662
|
+
})], null, !0) })], 1), t.inputContainerRef ? l(t.BentoTeleport, { attrs: { disabled: (o = e.teleport) == null ? void 0 : o.disabled, to: (s = e.teleport) == null ? void 0 : s.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(i, r) {
|
|
2663
|
+
return { key: r, fn: function(_) {
|
|
2664
|
+
return [e._t(r, null, null, _)];
|
|
2660
2665
|
} };
|
|
2661
2666
|
})], 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() {
|
|
2662
2667
|
return [e._v(" " + e._s(e.description) + " ")];
|
|
2663
2668
|
})], 2) : e._e()], 1);
|
|
2664
|
-
},
|
|
2669
|
+
}, Ia = [], La = /* @__PURE__ */ G(
|
|
2670
|
+
Oa,
|
|
2671
|
+
Ea,
|
|
2665
2672
|
Ia,
|
|
2666
|
-
La,
|
|
2667
|
-
Ta,
|
|
2668
2673
|
!1,
|
|
2669
2674
|
null,
|
|
2670
|
-
"
|
|
2675
|
+
"4caa4c9f"
|
|
2671
2676
|
);
|
|
2672
|
-
const
|
|
2677
|
+
const lo = La.exports;
|
|
2673
2678
|
export {
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
+
lo as B,
|
|
2680
|
+
Ut as C,
|
|
2681
|
+
ea as D,
|
|
2682
|
+
u as a,
|
|
2683
|
+
ne as b,
|
|
2679
2684
|
ge as c,
|
|
2680
2685
|
Pe as d,
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
+
ot as e,
|
|
2687
|
+
Sa as f,
|
|
2688
|
+
st as g,
|
|
2689
|
+
Ul as h,
|
|
2690
|
+
nt as i,
|
|
2686
2691
|
Ge as j,
|
|
2687
|
-
|
|
2692
|
+
Bl as u
|
|
2688
2693
|
};
|
|
2689
|
-
//# sourceMappingURL=dropdown.
|
|
2694
|
+
//# sourceMappingURL=dropdown.C0k4Mkmd.js.map
|