@adyen/bento-vue3 1.67.0 → 1.68.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/@types/index.d.ts +2154 -2110
- package/dist/action-bar.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/header-meta.css +1 -0
- package/dist/assets/header-with-views.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/input-field-phone-number.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/summary-grid.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.ComuZPet.js → action-bar.C93kgr7l.js} +4 -4
- package/dist/chunks/{action-bar.ComuZPet.js.map → action-bar.C93kgr7l.js.map} +1 -1
- package/dist/chunks/{base-modal.DzJrvis_.js → base-modal.C3_r3rmc.js} +120 -183
- package/dist/chunks/base-modal.C3_r3rmc.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.B0nWCTwZ.js → button-actions-with-menu.DUccmaB2.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.B0nWCTwZ.js.map → button-actions-with-menu.DUccmaB2.js.map} +1 -1
- package/dist/chunks/{button-actions.BwpznQ6c.js → button-actions.CZdO9YOk.js} +7 -7
- package/dist/chunks/button-actions.CZdO9YOk.js.map +1 -0
- package/dist/chunks/{card.JBOvn2BO.js → card.CS34Mi_G.js} +2 -2
- package/dist/chunks/{card.JBOvn2BO.js.map → card.CS34Mi_G.js.map} +1 -1
- package/dist/chunks/{checkbox-group.Dc5Olq0c.js → checkbox-group.JRo6xNpe.js} +2 -2
- package/dist/chunks/{checkbox-group.Dc5Olq0c.js.map → checkbox-group.JRo6xNpe.js.map} +1 -1
- package/dist/chunks/{checkbox.fkPJvdUo.js → checkbox.DGrG3GN1.js} +70 -67
- package/dist/chunks/checkbox.DGrG3GN1.js.map +1 -0
- package/dist/chunks/{code-snippet.vrlSqi9k.js → code-snippet.D5M76Qy6.js} +3 -3
- package/dist/chunks/{code-snippet.vrlSqi9k.js.map → code-snippet.D5M76Qy6.js.map} +1 -1
- package/dist/chunks/{country.BhAcCmRx.js → country.Q95voxeL.js} +2 -2
- package/dist/chunks/{country.BhAcCmRx.js.map → country.Q95voxeL.js.map} +1 -1
- package/dist/chunks/{dashboard-section.Bg0dfNs-.js → dashboard-section.CUcq2ahu.js} +2 -2
- package/dist/chunks/{dashboard-section.Bg0dfNs-.js.map → dashboard-section.CUcq2ahu.js.map} +1 -1
- package/dist/chunks/{dashed-underline.DgE-UB-x.js → dashed-underline.DkzQkpaf.js} +2 -2
- package/dist/chunks/{dashed-underline.DgE-UB-x.js.map → dashed-underline.DkzQkpaf.js.map} +1 -1
- package/dist/chunks/{data-grid-template.Df7j2oxe.js → data-grid-template.CDsV2GFG.js} +2 -2
- package/dist/chunks/{data-grid-template.Df7j2oxe.js.map → data-grid-template.CDsV2GFG.js.map} +1 -1
- package/dist/chunks/data-grid.BbZSu-mA.js +3861 -0
- package/dist/chunks/data-grid.BbZSu-mA.js.map +1 -0
- package/dist/chunks/{date-picker.CZ6zU-NJ.js → date-picker.CAoXTiZR.js} +2 -2
- package/dist/chunks/{date-picker.CZ6zU-NJ.js.map → date-picker.CAoXTiZR.js.map} +1 -1
- package/dist/chunks/{date-range-picker.Dw4R9bIs.js → date-range-picker.DtV4L3L6.js} +5 -5
- package/dist/chunks/{date-range-picker.Dw4R9bIs.js.map → date-range-picker.DtV4L3L6.js.map} +1 -1
- package/dist/chunks/dropdown-default-textbox.Ce5D3ipi.js.map +1 -1
- package/dist/chunks/dropdown-tag.B3fptORX.js +230 -0
- package/dist/chunks/dropdown-tag.B3fptORX.js.map +1 -0
- package/dist/chunks/dropdown.CMOYmQLB.js +814 -0
- package/dist/chunks/dropdown.CMOYmQLB.js.map +1 -0
- package/dist/chunks/es6.n1ewaW31.js.map +1 -1
- package/dist/chunks/{filter-bar.XonJn7ao.js → filter-bar.DoHMLZ4O.js} +848 -833
- package/dist/chunks/filter-bar.DoHMLZ4O.js.map +1 -0
- package/dist/chunks/{footer-actions.CdJLLWNR.js → footer-actions.Bje-DDqw.js} +2 -2
- package/dist/chunks/{footer-actions.CdJLLWNR.js.map → footer-actions.Bje-DDqw.js.map} +1 -1
- package/dist/chunks/header-meta.Yt43-cUI.js +234 -0
- package/dist/chunks/header-meta.Yt43-cUI.js.map +1 -0
- package/dist/chunks/{header-with-views.CHbH1_1V.js → header-with-views.C9ql_Wem.js} +697 -678
- package/dist/chunks/header-with-views.C9ql_Wem.js.map +1 -0
- package/dist/chunks/header.wiq0wlgm.js +141 -0
- package/dist/chunks/header.wiq0wlgm.js.map +1 -0
- package/dist/chunks/{input-field-password.DWZAf1Oh.js → input-field-password.DN0Jro1V.js} +4 -4
- package/dist/chunks/{input-field-password.DWZAf1Oh.js.map → input-field-password.DN0Jro1V.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.CbpRItYf.js → input-field-phone-number.BhPsrafR.js} +548 -532
- package/dist/chunks/{input-field-phone-number.CbpRItYf.js.map → input-field-phone-number.BhPsrafR.js.map} +1 -1
- package/dist/chunks/{input-field.DExw_Cow.js → input-field.su5Cq8Dt.js} +30 -29
- package/dist/chunks/input-field.su5Cq8Dt.js.map +1 -0
- package/dist/chunks/{menu.CeLJ1gIz.js → menu.C-3obPGl.js} +182 -180
- package/dist/chunks/{menu.CeLJ1gIz.js.map → menu.C-3obPGl.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.CZnLS-fQ.js → modal-fullscreen.DBTnoSX9.js} +90 -77
- package/dist/chunks/modal-fullscreen.DBTnoSX9.js.map +1 -0
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CP7dV1Yy.js → modal.vue_vue_type_script_setup_true_lang.Cd-mQUJ8.js} +10 -10
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CP7dV1Yy.js.map → modal.vue_vue_type_script_setup_true_lang.Cd-mQUJ8.js.map} +1 -1
- package/dist/chunks/{pagination.DL9LmFMJ.js → pagination.fYQak4C8.js} +2 -2
- package/dist/chunks/{pagination.DL9LmFMJ.js.map → pagination.fYQak4C8.js.map} +1 -1
- package/dist/chunks/popover.DYgCCUCJ.js +200 -0
- package/dist/chunks/popover.DYgCCUCJ.js.map +1 -0
- package/dist/chunks/popover.types.V8old-GW.js +6 -0
- package/dist/chunks/popover.types.V8old-GW.js.map +1 -0
- package/dist/chunks/{rich-text-editor.Dl9PsYbk.js → rich-text-editor.Dx78coVL.js} +2 -2
- package/dist/chunks/{rich-text-editor.Dl9PsYbk.js.map → rich-text-editor.Dx78coVL.js.map} +1 -1
- package/dist/chunks/{search-bar.a-jzP1UA.js → search-bar.CUrcP_wf.js} +3 -3
- package/dist/chunks/{search-bar.a-jzP1UA.js.map → search-bar.CUrcP_wf.js.map} +1 -1
- package/dist/chunks/{secondary-nav.UrmIAVGD.js → secondary-nav.j3ddtYoZ.js} +2 -2
- package/dist/chunks/{secondary-nav.UrmIAVGD.js.map → secondary-nav.j3ddtYoZ.js.map} +1 -1
- package/dist/chunks/{sidepanel.BuNmgmpj.js → sidepanel.DPN__L3Q.js} +2 -2
- package/dist/chunks/{sidepanel.BuNmgmpj.js.map → sidepanel.DPN__L3Q.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.CoSCUI1V.js → summary-grid.types.CjbbSZBJ.js} +4 -4
- package/dist/chunks/summary-grid.types.CjbbSZBJ.js.map +1 -0
- package/dist/chunks/{textarea.DXSe9MHH.js → textarea.BBhN67-I.js} +41 -40
- package/dist/chunks/textarea.BBhN67-I.js.map +1 -0
- package/dist/chunks/{timeline-item.BRHwCA1F.js → timeline-item.CuCII37W.js} +3 -3
- package/dist/chunks/{timeline-item.BRHwCA1F.js.map → timeline-item.CuCII37W.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CAf69UYO.js → tutorial.vue_vue_type_script_setup_true_lang.nYHtTHqy.js} +28 -27
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CAf69UYO.js.map → tutorial.vue_vue_type_script_setup_true_lang.nYHtTHqy.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.D7dOPJSO.js → use-cached-selected-values.Dyoz6cUK.js} +579 -563
- package/dist/chunks/use-cached-selected-values.Dyoz6cUK.js.map +1 -0
- package/dist/chunks/{use-country-items.4kZgVg_l.js → use-country-items.Duh4bMqW.js} +2 -2
- package/dist/chunks/{use-country-items.4kZgVg_l.js.map → use-country-items.Duh4bMqW.js.map} +1 -1
- package/dist/chunks/{use-country-phon-code.DVgE19zT.js → use-country-phon-code.BOaJ9PDl.js} +507 -498
- package/dist/chunks/{use-country-phon-code.DVgE19zT.js.map → use-country-phon-code.BOaJ9PDl.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +2 -2
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +156 -155
- package/dist/index.js.map +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/internal.js +15 -14
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +11 -11
- package/dist/pagination.js +1 -1
- package/dist/popover.js +3 -2
- package/dist/popover.js.map +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/sidepanel.js +1 -1
- package/dist/styles/bento-dark.css +10 -2
- package/dist/styles/bento-light.css +10 -2
- package/dist/styles/bento.css +10 -2
- package/dist/styles/legacy.css +10 -2
- package/dist/styles/styleguide.css +10 -2
- package/dist/summary-grid.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +23 -6
- package/dist/assets/info-icon-with-popover.css +0 -1
- package/dist/chunks/base-modal.DzJrvis_.js.map +0 -1
- package/dist/chunks/button-actions.BwpznQ6c.js.map +0 -1
- package/dist/chunks/checkbox.fkPJvdUo.js.map +0 -1
- package/dist/chunks/data-grid.rDZadZwc.js +0 -3781
- package/dist/chunks/data-grid.rDZadZwc.js.map +0 -1
- package/dist/chunks/dropdown-tag.BlHovDol.js +0 -202
- package/dist/chunks/dropdown-tag.BlHovDol.js.map +0 -1
- package/dist/chunks/dropdown.B5ZaFDn_.js +0 -957
- package/dist/chunks/dropdown.B5ZaFDn_.js.map +0 -1
- package/dist/chunks/filter-bar.XonJn7ao.js.map +0 -1
- package/dist/chunks/header-with-views.CHbH1_1V.js.map +0 -1
- package/dist/chunks/header.CJJWPB5Z.js +0 -254
- package/dist/chunks/header.CJJWPB5Z.js.map +0 -1
- package/dist/chunks/info-icon-with-popover.DVH46dPy.js +0 -97
- package/dist/chunks/info-icon-with-popover.DVH46dPy.js.map +0 -1
- package/dist/chunks/input-field.DExw_Cow.js.map +0 -1
- package/dist/chunks/modal-fullscreen.CZnLS-fQ.js.map +0 -1
- package/dist/chunks/popover.VI3TrUkL.js +0 -350
- package/dist/chunks/popover.VI3TrUkL.js.map +0 -1
- package/dist/chunks/summary-grid.types.CoSCUI1V.js.map +0 -1
- package/dist/chunks/textarea.DXSe9MHH.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.D7dOPJSO.js.map +0 -1
|
@@ -1,118 +1,119 @@
|
|
|
1
|
-
import { computed as m, ref as
|
|
2
|
-
import { B as
|
|
1
|
+
import { computed as m, ref as k, onMounted as ct, onUnmounted as dt, watch as ye, defineComponent as Z, resolveComponent as L, createElementBlock as O, openBlock as v, createVNode as G, createElementVNode as z, withCtx as A, createTextVNode as K, toDisplayString as V, renderSlot as j, mergeProps as Y, withKeys as me, createCommentVNode as J, createBlock as R, withModifiers as re, normalizeProps as ae, guardReactiveProps as ve, withDirectives as ce, vShow as we, nextTick as Ye, toRef as fe, resolveDirective as Ue, toHandlers as se, Fragment as le, renderList as q, createSlots as pe, normalizeClass as ge, unref as x, useSlots as ut, useAttrs as bt } from "vue";
|
|
2
|
+
import { B as F, a as Ce } from "./keyboard-navigation.CqgGzfZQ.js";
|
|
3
3
|
import "./events.FNmSWp_P.js";
|
|
4
|
-
import { B as
|
|
5
|
-
import { B as
|
|
6
|
-
import { B as
|
|
4
|
+
import { B as de } from "./typography.DN5eC5ch.js";
|
|
5
|
+
import { B as mt } from "./loading-indicator.DEepb9Wl.js";
|
|
6
|
+
import { B as vt } from "./empty-state.D7llINgF.js";
|
|
7
7
|
import { u as Ie } from "./i18n.B6g5VX0q.js";
|
|
8
|
-
import { d as
|
|
9
|
-
import { B as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { C as
|
|
12
|
-
import { C as
|
|
13
|
-
import { C as
|
|
14
|
-
import { C as
|
|
15
|
-
import {
|
|
8
|
+
import { d as ft } from "./debounce.DUTu11PS.js";
|
|
9
|
+
import { B as pt } from "./chip.CneNX2_j.js";
|
|
10
|
+
import { _ as H } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
11
|
+
import { C as he, N as gt } from "./minus-small.DYIyF5XW.js";
|
|
12
|
+
import { C as yt } from "./checkmark-small.x-gmK2Dt.js";
|
|
13
|
+
import { C as St } from "./chevron-down.DCQ6ZLaq.js";
|
|
14
|
+
import { C as ht } from "./chevron-up.kfuLRpZb.js";
|
|
15
|
+
import { g as Ne } from "./generate-uid.NJ8tVoha.js";
|
|
16
|
+
import { d as Ct, e as Pe } from "./button-actions.CZdO9YOk.js";
|
|
16
17
|
/* empty css */
|
|
17
|
-
import { o as
|
|
18
|
+
import { o as Et } from "./resize.Bqks3WUm.js";
|
|
18
19
|
import "../assets/use-cached-selected-values.css";
|
|
19
|
-
const
|
|
20
|
-
const
|
|
20
|
+
const ze = (e, t, i, s) => {
|
|
21
|
+
const r = m(
|
|
21
22
|
() => {
|
|
22
|
-
var p,
|
|
23
|
-
return !!((p = e.value) != null && p.length) && ((
|
|
23
|
+
var p, y;
|
|
24
|
+
return !!((p = e.value) != null && p.length) && ((y = e.value) == null ? void 0 : y.length) === t.value.length;
|
|
24
25
|
}
|
|
25
26
|
), o = m(() => {
|
|
26
27
|
var p;
|
|
27
28
|
return e.value == null || e.value.length === 0 ? !1 : ((p = e.value) == null ? void 0 : p.length) !== t.value.length;
|
|
28
29
|
});
|
|
29
30
|
return {
|
|
30
|
-
isAllSelected:
|
|
31
|
+
isAllSelected: r,
|
|
31
32
|
isIndeterminate: o,
|
|
32
33
|
toggleSelectAll: (p) => {
|
|
33
34
|
p ? i() : s();
|
|
34
35
|
}
|
|
35
36
|
};
|
|
36
37
|
};
|
|
37
|
-
function
|
|
38
|
-
const o =
|
|
38
|
+
function Ot(e, { disabled: t, itemHeight: i, overscan: s = 5, prefixHeight: r }) {
|
|
39
|
+
const o = k(null), n = k([]), p = k(0), y = k(0), a = k(0);
|
|
39
40
|
let u;
|
|
40
41
|
const l = m(() => {
|
|
41
|
-
const
|
|
42
|
+
const D = typeof i == "number" ? e.value.length * i : e.value.reduce((I, S, _) => I + i(_), 0), B = typeof i == "number" ? p.value * i : e.value.slice(0, p.value).reduce((I, S, _) => I + i(_), 0);
|
|
42
43
|
return {
|
|
43
44
|
style: {
|
|
44
|
-
marginTop: `${
|
|
45
|
-
height: `${
|
|
45
|
+
marginTop: `${B}px`,
|
|
46
|
+
height: `${D - B}px`
|
|
46
47
|
}
|
|
47
48
|
};
|
|
48
49
|
}), f = () => {
|
|
49
|
-
const
|
|
50
|
+
const D = (r == null ? void 0 : r.value) ?? 0, B = Math.max(o.value.scrollTop - D, 0);
|
|
50
51
|
if (typeof i == "number")
|
|
51
|
-
return Math.floor(
|
|
52
|
-
let
|
|
52
|
+
return Math.floor(B / i);
|
|
53
|
+
let I = 0, S = 0;
|
|
53
54
|
for (let _ = 0; _ < e.value.length; _ += 1) {
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
|
|
55
|
+
const w = i(_);
|
|
56
|
+
if (I += w, I >= B) {
|
|
57
|
+
S = _;
|
|
57
58
|
break;
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
|
-
return
|
|
61
|
+
return S;
|
|
61
62
|
}, E = () => {
|
|
62
|
-
if (
|
|
63
|
-
return Math.ceil(
|
|
64
|
-
const
|
|
65
|
-
let
|
|
66
|
-
for (let
|
|
67
|
-
const _ = i(
|
|
68
|
-
if (
|
|
63
|
+
if (a.value = o.value.clientHeight, typeof i == "number")
|
|
64
|
+
return Math.ceil(a.value / i);
|
|
65
|
+
const D = p.value ?? 0;
|
|
66
|
+
let B = 0, I = 0;
|
|
67
|
+
for (let S = D; S < e.value.length; S += 1) {
|
|
68
|
+
const _ = i(S);
|
|
69
|
+
if (B += _, I = S, B > a.value)
|
|
69
70
|
break;
|
|
70
71
|
}
|
|
71
|
-
return
|
|
72
|
+
return I - D;
|
|
72
73
|
}, T = () => {
|
|
73
74
|
if (o.value) {
|
|
74
|
-
const
|
|
75
|
-
p.value = f(),
|
|
75
|
+
const D = E();
|
|
76
|
+
p.value = f(), y.value = Math.min(p.value + D + s, e.value.length), n.value = e.value.slice(p.value, y.value);
|
|
76
77
|
}
|
|
77
|
-
},
|
|
78
|
+
}, $ = () => {
|
|
78
79
|
T();
|
|
79
80
|
};
|
|
80
|
-
t || (
|
|
81
|
-
o.value && (
|
|
82
|
-
|
|
81
|
+
t || (ct(() => {
|
|
82
|
+
o.value && (a.value = o.value.clientHeight, u = Et(o.value, ({ clientHeight: D }) => {
|
|
83
|
+
a.value = D, T();
|
|
83
84
|
}), T());
|
|
84
|
-
}),
|
|
85
|
+
}), dt(() => {
|
|
85
86
|
u == null || u.disconnect();
|
|
86
|
-
}),
|
|
87
|
+
}), ye(
|
|
87
88
|
() => e.value,
|
|
88
89
|
() => {
|
|
89
90
|
T();
|
|
90
91
|
}
|
|
91
92
|
));
|
|
92
|
-
const
|
|
93
|
+
const P = {
|
|
93
94
|
ref: o,
|
|
94
95
|
style: { overflowY: "auto" }
|
|
95
96
|
};
|
|
96
97
|
return t ? {
|
|
97
98
|
containerRef: o,
|
|
98
|
-
containerProps:
|
|
99
|
+
containerProps: P,
|
|
99
100
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
100
101
|
onScroll: () => {
|
|
101
102
|
},
|
|
102
103
|
list: e
|
|
103
104
|
} : {
|
|
104
105
|
containerRef: o,
|
|
105
|
-
containerProps:
|
|
106
|
-
onScroll:
|
|
107
|
-
list:
|
|
106
|
+
containerProps: P,
|
|
107
|
+
onScroll: $,
|
|
108
|
+
list: n,
|
|
108
109
|
wrapperProps: l
|
|
109
110
|
};
|
|
110
111
|
}
|
|
111
|
-
var g = /* @__PURE__ */ ((e) => (e.SELECT = "select", e.SHOW_MORE = "show-more", e.ESCAPE = "escape-pressed", e.CLICK = "click", e.ENTER = "enter-pressed", e.SPACE = "space-pressed", e.TAB = "tab-pressed", e.CLOSE_DROPDOWN = "close-dropdown", e))(g || {}),
|
|
112
|
-
const
|
|
112
|
+
var g = /* @__PURE__ */ ((e) => (e.SELECT = "select", e.SHOW_MORE = "show-more", e.ESCAPE = "escape-pressed", e.CLICK = "click", e.ENTER = "enter-pressed", e.SPACE = "space-pressed", e.TAB = "tab-pressed", e.CLOSE_DROPDOWN = "close-dropdown", e))(g || {}), ne = /* @__PURE__ */ ((e) => (e.AUTOMATIC = "automatic", e.BUTTON = "button", e.NONE = "none", e))(ne || {});
|
|
113
|
+
const Tt = Z({
|
|
113
114
|
name: "bento-listbox-static-category",
|
|
114
115
|
components: {
|
|
115
|
-
BentoTypography:
|
|
116
|
+
BentoTypography: de
|
|
116
117
|
},
|
|
117
118
|
props: {
|
|
118
119
|
/**
|
|
@@ -123,26 +124,31 @@ const Ot = J({
|
|
|
123
124
|
required: !0
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
|
-
}),
|
|
127
|
-
function
|
|
128
|
-
const
|
|
129
|
-
return v(), O("div",
|
|
130
|
-
|
|
127
|
+
}), _t = ["aria-label"];
|
|
128
|
+
function It(e, t, i, s, r, o) {
|
|
129
|
+
const n = L("bento-typography");
|
|
130
|
+
return v(), O("div", {
|
|
131
|
+
class: "b-listbox-single-select-category",
|
|
132
|
+
role: "group",
|
|
133
|
+
"aria-label": e.categoryLabel
|
|
134
|
+
}, [
|
|
135
|
+
G(n, {
|
|
131
136
|
variant: "caption",
|
|
132
137
|
el: "span",
|
|
133
|
-
class: "b-listbox-single-select-category__label-text"
|
|
138
|
+
class: "b-listbox-single-select-category__label-text",
|
|
139
|
+
"aria-hidden": "true"
|
|
134
140
|
}, {
|
|
135
141
|
default: A(() => [
|
|
136
|
-
|
|
142
|
+
K(V(e.categoryLabel), 1)
|
|
137
143
|
]),
|
|
138
144
|
_: 1
|
|
139
145
|
}),
|
|
140
|
-
|
|
141
|
-
|
|
146
|
+
z("div", null, [
|
|
147
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
142
148
|
])
|
|
143
|
-
]);
|
|
149
|
+
], 8, _t);
|
|
144
150
|
}
|
|
145
|
-
const
|
|
151
|
+
const At = /* @__PURE__ */ H(Tt, [["render", It], ["__scopeId", "data-v-27c4e09a"]]), kt = Z({
|
|
146
152
|
name: "bento-listbox-option",
|
|
147
153
|
props: {
|
|
148
154
|
/**
|
|
@@ -162,7 +168,7 @@ const It = /* @__PURE__ */ q(Ot, [["render", _t], ["__scopeId", "data-v-a90eff17
|
|
|
162
168
|
}));
|
|
163
169
|
return {
|
|
164
170
|
// Enums
|
|
165
|
-
BentoKeyboardNavigationKeyDownEvent:
|
|
171
|
+
BentoKeyboardNavigationKeyDownEvent: F,
|
|
166
172
|
BentoListboxEvent: g,
|
|
167
173
|
// Values
|
|
168
174
|
conditionalClasses: i,
|
|
@@ -170,35 +176,35 @@ const It = /* @__PURE__ */ q(Ot, [["render", _t], ["__scopeId", "data-v-a90eff17
|
|
|
170
176
|
onClick: (o) => {
|
|
171
177
|
t(g.CLICK, o);
|
|
172
178
|
},
|
|
173
|
-
onOptionSelected: (o,
|
|
174
|
-
t(o,
|
|
179
|
+
onOptionSelected: (o, n) => {
|
|
180
|
+
t(o, n);
|
|
175
181
|
}
|
|
176
182
|
};
|
|
177
183
|
}
|
|
178
184
|
});
|
|
179
|
-
function
|
|
185
|
+
function Lt(e, t, i, s, r, o) {
|
|
180
186
|
return v(), O("div", Y({
|
|
181
187
|
class: ["b-listbox-option", e.conditionalClasses],
|
|
182
188
|
role: "option"
|
|
183
189
|
}, e.$attrs, {
|
|
184
|
-
onClick: t[0] || (t[0] = (...
|
|
190
|
+
onClick: t[0] || (t[0] = (...n) => e.onClick && e.onClick(...n)),
|
|
185
191
|
onKeydown: [
|
|
186
|
-
t[1] || (t[1] =
|
|
187
|
-
t[2] || (t[2] =
|
|
188
|
-
t[3] || (t[3] =
|
|
192
|
+
t[1] || (t[1] = me((n) => e.onOptionSelected(e.BentoListboxEvent.ENTER, n), ["enter"])),
|
|
193
|
+
t[2] || (t[2] = me((n) => e.onOptionSelected(e.BentoListboxEvent.SPACE, n), ["space"])),
|
|
194
|
+
t[3] || (t[3] = me((n) => e.onOptionSelected(e.BentoListboxEvent.TAB, n), ["tab"]))
|
|
189
195
|
]
|
|
190
196
|
}), [
|
|
191
|
-
|
|
197
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
192
198
|
], 16);
|
|
193
199
|
}
|
|
194
|
-
const
|
|
195
|
-
let
|
|
196
|
-
const
|
|
200
|
+
const Ee = /* @__PURE__ */ H(kt, [["render", Lt], ["__scopeId", "data-v-b7af43a6"]]);
|
|
201
|
+
let Me = 0;
|
|
202
|
+
const $t = {
|
|
197
203
|
beforeCreate() {
|
|
198
|
-
this.uuid =
|
|
204
|
+
this.uuid = Me.toString(), Me += 1;
|
|
199
205
|
}
|
|
200
|
-
},
|
|
201
|
-
function
|
|
206
|
+
}, Dt = { key: 0 };
|
|
207
|
+
function Bt(e, t, i, s, r, o) {
|
|
202
208
|
return v(), O("svg", Y({ role: "img" }, e.$attrs, {
|
|
203
209
|
class: "ui-assets-icons-16",
|
|
204
210
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -206,19 +212,19 @@ function Dt(e, t, i, s, n, o) {
|
|
|
206
212
|
height: "16",
|
|
207
213
|
fill: "none"
|
|
208
214
|
}), [
|
|
209
|
-
e.$attrs["svg-title"] ? (v(), O("title",
|
|
210
|
-
t[0] || (t[0] =
|
|
215
|
+
e.$attrs["svg-title"] ? (v(), O("title", Dt, V(e.$attrs["svg-title"]), 1)) : J("", !0),
|
|
216
|
+
t[0] || (t[0] = z("path", {
|
|
211
217
|
fill: "#001222",
|
|
212
218
|
d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z"
|
|
213
219
|
}, null, -1))
|
|
214
220
|
], 16);
|
|
215
221
|
}
|
|
216
|
-
const
|
|
222
|
+
const Rt = /* @__PURE__ */ H($t, [["render", Bt]]), Nt = Z({
|
|
217
223
|
name: "bento-listbox-single-select-option",
|
|
218
224
|
components: {
|
|
219
|
-
BentoListboxOption:
|
|
220
|
-
BentoTypography:
|
|
221
|
-
CheckmarkIcon:
|
|
225
|
+
BentoListboxOption: Ee,
|
|
226
|
+
BentoTypography: de,
|
|
227
|
+
CheckmarkIcon: Rt
|
|
222
228
|
},
|
|
223
229
|
props: {
|
|
224
230
|
/**
|
|
@@ -240,13 +246,13 @@ const Bt = /* @__PURE__ */ q(Lt, [["render", Dt]]), Rt = J({
|
|
|
240
246
|
},
|
|
241
247
|
emits: [g.ENTER, g.SELECT, g.SPACE, g.TAB],
|
|
242
248
|
setup(e, { emit: t }) {
|
|
243
|
-
const i = (
|
|
244
|
-
e.disabled || t(
|
|
245
|
-
}, s = m(() => e.disabled ? !0 : null),
|
|
249
|
+
const i = (n) => {
|
|
250
|
+
e.disabled || t(n, e.option);
|
|
251
|
+
}, s = m(() => e.disabled ? !0 : null), r = m(() => e.selected ? !0 : null), o = m(() => e.disabled ? -1 : 0);
|
|
246
252
|
return {
|
|
247
253
|
// Values
|
|
248
254
|
ariaDisabled: s,
|
|
249
|
-
ariaSelected:
|
|
255
|
+
ariaSelected: r,
|
|
250
256
|
tabIndex: o,
|
|
251
257
|
// Enums
|
|
252
258
|
BentoListboxEvent: g,
|
|
@@ -254,53 +260,53 @@ const Bt = /* @__PURE__ */ q(Lt, [["render", Dt]]), Rt = J({
|
|
|
254
260
|
onOptionSelected: i
|
|
255
261
|
};
|
|
256
262
|
}
|
|
257
|
-
}),
|
|
258
|
-
function
|
|
259
|
-
const
|
|
260
|
-
return v(),
|
|
263
|
+
}), Pt = { class: "b-listbox-single-select-option__text" }, Mt = { class: "b-listbox-single-select-option__check-icon" };
|
|
264
|
+
function xt(e, t, i, s, r, o) {
|
|
265
|
+
const n = L("bento-typography"), p = L("checkmark-icon"), y = L("bento-listbox-option");
|
|
266
|
+
return v(), R(y, {
|
|
261
267
|
class: "b-listbox-single-select-option",
|
|
262
268
|
disabled: e.disabled,
|
|
263
269
|
selected: e.selected,
|
|
264
270
|
"aria-selected": e.ariaSelected,
|
|
265
271
|
"aria-disabled": e.ariaDisabled,
|
|
266
272
|
tabindex: e.tabIndex,
|
|
267
|
-
onClick: t[0] || (t[0] = (
|
|
268
|
-
onEnterPressed: t[1] || (t[1] = (
|
|
269
|
-
onSpacePressed: t[2] || (t[2] =
|
|
270
|
-
onTabPressed: t[3] || (t[3] = (
|
|
273
|
+
onClick: t[0] || (t[0] = (a) => e.onOptionSelected(e.BentoListboxEvent.SELECT)),
|
|
274
|
+
onEnterPressed: t[1] || (t[1] = (a) => e.onOptionSelected(e.BentoListboxEvent.ENTER)),
|
|
275
|
+
onSpacePressed: t[2] || (t[2] = re((a) => e.onOptionSelected(e.BentoListboxEvent.SPACE), ["prevent"])),
|
|
276
|
+
onTabPressed: t[3] || (t[3] = (a) => e.onOptionSelected(e.BentoListboxEvent.TAB))
|
|
271
277
|
}, {
|
|
272
278
|
default: A(() => [
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
279
|
+
j(e.$slots, "default", ae(ve(e.option)), () => [
|
|
280
|
+
z("span", Pt, [
|
|
281
|
+
G(n, { el: "span" }, {
|
|
276
282
|
default: A(() => [
|
|
277
|
-
|
|
283
|
+
K(V(e.option.label), 1)
|
|
278
284
|
]),
|
|
279
285
|
_: 1
|
|
280
286
|
}),
|
|
281
|
-
e.option.description ? (v(),
|
|
287
|
+
e.option.description ? (v(), R(n, {
|
|
282
288
|
key: 0,
|
|
283
289
|
class: "b-listbox-single-select-option__description",
|
|
284
290
|
el: "span"
|
|
285
291
|
}, {
|
|
286
292
|
default: A(() => [
|
|
287
|
-
|
|
293
|
+
K(V(e.option.description), 1)
|
|
288
294
|
]),
|
|
289
295
|
_: 1
|
|
290
|
-
})) :
|
|
296
|
+
})) : J("", !0)
|
|
291
297
|
])
|
|
292
298
|
], !0),
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
[
|
|
299
|
+
z("span", Mt, [
|
|
300
|
+
ce(G(p, { "svg-title": "selected" }, null, 512), [
|
|
301
|
+
[we, e.selected]
|
|
296
302
|
])
|
|
297
303
|
])
|
|
298
304
|
]),
|
|
299
305
|
_: 3
|
|
300
306
|
}, 8, ["disabled", "selected", "aria-selected", "aria-disabled", "tabindex"]);
|
|
301
307
|
}
|
|
302
|
-
const
|
|
303
|
-
const i = m(() => e.value.length - 1), s =
|
|
308
|
+
const Gt = /* @__PURE__ */ H(Nt, [["render", xt], ["__scopeId", "data-v-226f4c84"]]), Ve = ({ items: e }, t) => {
|
|
309
|
+
const i = m(() => e.value.length - 1), s = k(0), r = (f) => {
|
|
304
310
|
switch (f) {
|
|
305
311
|
case "increase":
|
|
306
312
|
s.value += 1;
|
|
@@ -310,8 +316,8 @@ const xt = /* @__PURE__ */ q(Rt, [["render", Mt], ["__scopeId", "data-v-226f4c84
|
|
|
310
316
|
break;
|
|
311
317
|
}
|
|
312
318
|
}, o = ({ edgeCaseItem: f }, E) => {
|
|
313
|
-
s.value !== f && (
|
|
314
|
-
},
|
|
319
|
+
s.value !== f && (r(E), t(s.value));
|
|
320
|
+
}, n = (f) => {
|
|
315
321
|
l(f), o(
|
|
316
322
|
{
|
|
317
323
|
edgeCaseItem: i.value
|
|
@@ -327,9 +333,9 @@ const xt = /* @__PURE__ */ q(Rt, [["render", Mt], ["__scopeId", "data-v-226f4c84
|
|
|
327
333
|
"decrease"
|
|
328
334
|
/* DECREASE */
|
|
329
335
|
);
|
|
330
|
-
},
|
|
336
|
+
}, y = () => {
|
|
331
337
|
s.value = 0, t(s.value);
|
|
332
|
-
},
|
|
338
|
+
}, a = () => {
|
|
333
339
|
s.value = i.value, t(s.value);
|
|
334
340
|
}, u = (f) => {
|
|
335
341
|
s.value = f;
|
|
@@ -338,40 +344,40 @@ const xt = /* @__PURE__ */ q(Rt, [["render", Mt], ["__scopeId", "data-v-226f4c84
|
|
|
338
344
|
(E = f == null ? void 0 : f.detail) == null || E.preventDefault();
|
|
339
345
|
};
|
|
340
346
|
return {
|
|
341
|
-
moveToFirstElement:
|
|
342
|
-
moveToLastElement:
|
|
343
|
-
moveToNextElement:
|
|
347
|
+
moveToFirstElement: y,
|
|
348
|
+
moveToLastElement: a,
|
|
349
|
+
moveToNextElement: n,
|
|
344
350
|
moveToPreviousElement: p,
|
|
345
351
|
setListboxFocusedIndex: u,
|
|
346
352
|
preventDefault: l,
|
|
347
353
|
focusedIndex: s
|
|
348
354
|
};
|
|
349
|
-
},
|
|
350
|
-
const
|
|
355
|
+
}, Fe = (e, t, i = k("option"), s = !0) => {
|
|
356
|
+
const r = k([]), o = async () => {
|
|
351
357
|
if (!e.value || e.value.nodeType === Node.COMMENT_NODE)
|
|
352
358
|
return;
|
|
353
|
-
const
|
|
354
|
-
|
|
359
|
+
const n = Array.from(e.value.querySelectorAll(`[role="${i.value}"]`));
|
|
360
|
+
r.value = s ? n.filter((p) => p.checkVisibility()) : n;
|
|
355
361
|
};
|
|
356
|
-
return
|
|
362
|
+
return ye(
|
|
357
363
|
t,
|
|
358
364
|
() => {
|
|
359
|
-
|
|
365
|
+
Ye(() => {
|
|
360
366
|
o();
|
|
361
367
|
});
|
|
362
368
|
},
|
|
363
369
|
{ immediate: !0 }
|
|
364
370
|
), {
|
|
365
|
-
visibleDomOptions:
|
|
371
|
+
visibleDomOptions: r,
|
|
366
372
|
updateVisibleDomOptions: o
|
|
367
373
|
};
|
|
368
|
-
},
|
|
374
|
+
}, wt = Z({
|
|
369
375
|
name: "bento-listbox-single-select",
|
|
370
376
|
components: {
|
|
371
|
-
BentoListboxSingleSelectCategory:
|
|
372
|
-
BentoListboxSingleSelectOption:
|
|
377
|
+
BentoListboxSingleSelectCategory: At,
|
|
378
|
+
BentoListboxSingleSelectOption: Gt
|
|
373
379
|
},
|
|
374
|
-
directives: { BentoKeyboardNavigationDirective:
|
|
380
|
+
directives: { BentoKeyboardNavigationDirective: Ce },
|
|
375
381
|
inheritAttrs: !1,
|
|
376
382
|
props: {
|
|
377
383
|
/**
|
|
@@ -413,42 +419,42 @@ const xt = /* @__PURE__ */ q(Rt, [["render", Mt], ["__scopeId", "data-v-226f4c84
|
|
|
413
419
|
staticCategories: { type: Boolean, default: !1 }
|
|
414
420
|
},
|
|
415
421
|
emits: [g.SELECT, g.ENTER, g.SPACE, g.TAB],
|
|
416
|
-
setup(e, { emit: t, expose: i, slots: s, attrs:
|
|
417
|
-
const o =
|
|
418
|
-
var
|
|
419
|
-
return !!((
|
|
420
|
-
}),
|
|
422
|
+
setup(e, { emit: t, expose: i, slots: s, attrs: r }) {
|
|
423
|
+
const o = k(null), n = k([]), p = m(() => {
|
|
424
|
+
var S;
|
|
425
|
+
return !!((S = e.selectedValue) != null && S.length) && e.selectedValue.at(0);
|
|
426
|
+
}), y = m(
|
|
421
427
|
() => {
|
|
422
|
-
var
|
|
428
|
+
var S, _, w, Q;
|
|
423
429
|
return {
|
|
424
|
-
"aria-label": (
|
|
425
|
-
"aria-busy": (_ =
|
|
426
|
-
"aria-atomic": (
|
|
427
|
-
"aria-live": (
|
|
430
|
+
"aria-label": (S = r["aria-label"]) == null ? void 0 : S.toString(),
|
|
431
|
+
"aria-busy": (_ = r["aria-busy"]) == null ? void 0 : _.toString(),
|
|
432
|
+
"aria-atomic": (w = r["aria-atomic"]) == null ? void 0 : w.toString(),
|
|
433
|
+
"aria-live": (Q = r["aria-live"]) == null ? void 0 : Q.toString()
|
|
428
434
|
};
|
|
429
435
|
}
|
|
430
|
-
),
|
|
431
|
-
t(
|
|
432
|
-
}, { visibleDomOptions: l } =
|
|
436
|
+
), a = m(() => !!e.items.some(({ items: S }) => !!S)), u = (S) => (_) => {
|
|
437
|
+
t(S, [_]);
|
|
438
|
+
}, { visibleDomOptions: l } = Fe(o, fe(e, "items"), k("option"), !1), f = (S) => {
|
|
433
439
|
var _;
|
|
434
|
-
(_ = l.value[
|
|
440
|
+
(_ = l.value[S]) == null || _.focus();
|
|
435
441
|
}, {
|
|
436
442
|
moveToNextElement: E,
|
|
437
443
|
moveToPreviousElement: T,
|
|
438
|
-
moveToFirstElement:
|
|
439
|
-
moveToLastElement:
|
|
440
|
-
setListboxFocusedIndex:
|
|
441
|
-
} =
|
|
444
|
+
moveToFirstElement: $,
|
|
445
|
+
moveToLastElement: P,
|
|
446
|
+
setListboxFocusedIndex: D
|
|
447
|
+
} = Ve(
|
|
442
448
|
{
|
|
443
449
|
items: l
|
|
444
450
|
},
|
|
445
451
|
f
|
|
446
|
-
),
|
|
447
|
-
[
|
|
448
|
-
[
|
|
449
|
-
[
|
|
450
|
-
[
|
|
451
|
-
},
|
|
452
|
+
), B = {
|
|
453
|
+
[F.ARROW_UP]: T,
|
|
454
|
+
[F.ARROW_DOWN]: E,
|
|
455
|
+
[F.HOME]: $,
|
|
456
|
+
[F.END]: P
|
|
457
|
+
}, I = {
|
|
452
458
|
[g.SELECT]: u(g.SELECT),
|
|
453
459
|
[g.SPACE]: u(g.SPACE),
|
|
454
460
|
[g.TAB]: u(g.TAB),
|
|
@@ -459,41 +465,40 @@ const xt = /* @__PURE__ */ q(Rt, [["render", Mt], ["__scopeId", "data-v-226f4c84
|
|
|
459
465
|
* Reference for a single listbox item.
|
|
460
466
|
* Required for keyboard navigation in dropdown as $children is removed in vue@3
|
|
461
467
|
*/
|
|
462
|
-
listboxItemRef:
|
|
468
|
+
listboxItemRef: n,
|
|
463
469
|
/**
|
|
464
470
|
* Method to set the index of the item to be focused on
|
|
465
471
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
466
472
|
*/
|
|
467
|
-
setListboxFocusedIndex:
|
|
473
|
+
setListboxFocusedIndex: D
|
|
468
474
|
}), {
|
|
469
475
|
// Enums
|
|
470
476
|
BentoListboxEvent: g,
|
|
471
477
|
// Values
|
|
472
478
|
listboxRef: o,
|
|
473
|
-
listboxItemRef:
|
|
479
|
+
listboxItemRef: n,
|
|
474
480
|
selectedItem: p,
|
|
475
481
|
slots: s,
|
|
476
|
-
ariaAttributes:
|
|
482
|
+
ariaAttributes: y,
|
|
477
483
|
// Computed
|
|
478
|
-
hasCategories:
|
|
484
|
+
hasCategories: a,
|
|
479
485
|
// Methods
|
|
480
486
|
onOptionSelected: u,
|
|
481
487
|
// Keyboard navigation
|
|
482
|
-
listboxListeners:
|
|
483
|
-
listboxOptionListeners:
|
|
488
|
+
listboxListeners: B,
|
|
489
|
+
listboxOptionListeners: I
|
|
484
490
|
};
|
|
485
491
|
}
|
|
486
492
|
});
|
|
487
|
-
function
|
|
488
|
-
const
|
|
489
|
-
return
|
|
490
|
-
e.hasCategories && e.staticCategories ? (v(!0), O(
|
|
491
|
-
key:
|
|
492
|
-
"category-label":
|
|
493
|
-
role: "group"
|
|
493
|
+
function Yt(e, t, i, s, r, o) {
|
|
494
|
+
const n = L("bento-listbox-single-select-option"), p = L("bento-listbox-single-select-category"), y = Ue("bento-keyboard-navigation-directive");
|
|
495
|
+
return ce((v(), O("div", Y({ ref: "listboxRef" }, e.ariaAttributes, { role: "listbox" }, se(e.listboxListeners, !0)), [
|
|
496
|
+
e.hasCategories && e.staticCategories ? (v(!0), O(le, { key: 0 }, q(e.items, (a) => (v(), R(p, {
|
|
497
|
+
key: a.value,
|
|
498
|
+
"category-label": a.label
|
|
494
499
|
}, {
|
|
495
500
|
default: A(() => [
|
|
496
|
-
(v(!0), O(
|
|
501
|
+
(v(!0), O(le, null, q(a.items, (u) => (v(), R(n, Y({
|
|
497
502
|
key: u.value,
|
|
498
503
|
ref_for: !0,
|
|
499
504
|
ref: "listboxItemRef",
|
|
@@ -501,38 +506,38 @@ function wt(e, t, i, s, n, o) {
|
|
|
501
506
|
option: u,
|
|
502
507
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(u) : null,
|
|
503
508
|
selected: u.value === e.selectedItem.value
|
|
504
|
-
},
|
|
505
|
-
|
|
509
|
+
}, se(e.listboxOptionListeners)), pe({ _: 2 }, [
|
|
510
|
+
q(e.slots, (l, f) => ({
|
|
506
511
|
name: f,
|
|
507
512
|
fn: A((E) => [
|
|
508
|
-
|
|
513
|
+
j(e.$slots, f, Y({ ref_for: !0 }, E))
|
|
509
514
|
])
|
|
510
515
|
}))
|
|
511
516
|
]), 1040, ["option", "disabled", "selected"]))), 128))
|
|
512
517
|
]),
|
|
513
518
|
_: 2
|
|
514
|
-
}, 1032, ["category-label"]))), 128)) : (v(!0), O(
|
|
515
|
-
key:
|
|
519
|
+
}, 1032, ["category-label"]))), 128)) : (v(!0), O(le, { key: 1 }, q(e.items, (a) => (v(), R(n, Y({
|
|
520
|
+
key: a.value,
|
|
516
521
|
ref_for: !0,
|
|
517
522
|
ref: "listboxItemRef",
|
|
518
523
|
role: "option",
|
|
519
|
-
option:
|
|
520
|
-
disabled: e.isOptionDisabled ? e.isOptionDisabled(
|
|
521
|
-
selected:
|
|
522
|
-
},
|
|
523
|
-
|
|
524
|
+
option: a,
|
|
525
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(a) : null,
|
|
526
|
+
selected: a.value === e.selectedItem.value
|
|
527
|
+
}, se(e.listboxOptionListeners)), pe({ _: 2 }, [
|
|
528
|
+
q(e.slots, (u, l) => ({
|
|
524
529
|
name: l,
|
|
525
530
|
fn: A((f) => [
|
|
526
|
-
|
|
531
|
+
j(e.$slots, l, Y({ ref_for: !0 }, f))
|
|
527
532
|
])
|
|
528
533
|
}))
|
|
529
534
|
]), 1040, ["option", "disabled", "selected"]))), 128))
|
|
530
535
|
], 16)), [
|
|
531
|
-
[
|
|
536
|
+
[y]
|
|
532
537
|
]);
|
|
533
538
|
}
|
|
534
|
-
const
|
|
535
|
-
...
|
|
539
|
+
const Ut = /* @__PURE__ */ H(wt, [["render", Yt]]), zt = {}, Vt = /* @__PURE__ */ Z({
|
|
540
|
+
...zt,
|
|
536
541
|
__name: "listbox-decorative-checkbox",
|
|
537
542
|
props: {
|
|
538
543
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -541,47 +546,47 @@ const Yt = /* @__PURE__ */ q(Gt, [["render", wt]]), Ut = {}, zt = /* @__PURE__ *
|
|
|
541
546
|
},
|
|
542
547
|
setup(e) {
|
|
543
548
|
const t = e, i = m(() => ({
|
|
544
|
-
[`b-checkbox-input--${
|
|
549
|
+
[`b-checkbox-input--${he.DISABLED}`]: t.disabled
|
|
545
550
|
})), s = m(() => ({
|
|
546
|
-
[`b-checkbox-input__outline--${
|
|
547
|
-
[`b-checkbox-input__outline--${
|
|
548
|
-
[`b-checkbox-input__outline--${
|
|
551
|
+
[`b-checkbox-input__outline--${he.UNCHECKED}`]: !t.checked && !t.indeterminate,
|
|
552
|
+
[`b-checkbox-input__outline--${he.CHECKED}`]: t.checked && !t.indeterminate,
|
|
553
|
+
[`b-checkbox-input__outline--${he.INDETERMINATE}`]: t.indeterminate
|
|
549
554
|
}));
|
|
550
|
-
return (
|
|
551
|
-
class:
|
|
555
|
+
return (r, o) => (v(), O("div", {
|
|
556
|
+
class: ge(["b-checkbox-input", i.value]),
|
|
552
557
|
role: "presentation"
|
|
553
558
|
}, [
|
|
554
|
-
|
|
559
|
+
r.indeterminate ? (v(), R(x(gt), {
|
|
555
560
|
key: 0,
|
|
556
561
|
class: "b-checkbox-input__icon",
|
|
557
562
|
"svg-title": "",
|
|
558
563
|
"aria-hidden": "true"
|
|
559
|
-
})) :
|
|
564
|
+
})) : r.checked ? (v(), R(x(yt), {
|
|
560
565
|
key: 1,
|
|
561
566
|
class: "b-checkbox-input__icon",
|
|
562
567
|
"svg-title": "",
|
|
563
568
|
"aria-hidden": "true"
|
|
564
|
-
})) :
|
|
565
|
-
|
|
566
|
-
class:
|
|
569
|
+
})) : J("", !0),
|
|
570
|
+
z("div", {
|
|
571
|
+
class: ge(["b-checkbox-input__outline", s.value])
|
|
567
572
|
}, null, 2)
|
|
568
573
|
], 2));
|
|
569
574
|
}
|
|
570
|
-
}), Ae = /* @__PURE__ */
|
|
571
|
-
var
|
|
572
|
-
const
|
|
575
|
+
}), Ae = /* @__PURE__ */ H(Vt, [["__scopeId", "data-v-c604b68a"]]);
|
|
576
|
+
var Ke = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(Ke || {}), te = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.UNSELECT_CATEGORY = "unselect-category", e.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", e))(te || {});
|
|
577
|
+
const Ft = {
|
|
573
578
|
"en-US": {
|
|
574
579
|
categoryClosed: "{category} closed",
|
|
575
580
|
categoryOpened: "{category} opened"
|
|
576
581
|
}
|
|
577
|
-
},
|
|
578
|
-
i18n: { messages:
|
|
582
|
+
}, Kt = Z({
|
|
583
|
+
i18n: { messages: Ft },
|
|
579
584
|
name: "bento-listbox-multi-select-category",
|
|
580
585
|
components: {
|
|
581
|
-
BentoTypography:
|
|
582
|
-
BentoListboxOption:
|
|
583
|
-
ChevronDownIcon:
|
|
584
|
-
ChevronUpIcon:
|
|
586
|
+
BentoTypography: de,
|
|
587
|
+
BentoListboxOption: Ee,
|
|
588
|
+
ChevronDownIcon: St,
|
|
589
|
+
ChevronUpIcon: ht,
|
|
585
590
|
ListboxDecorativeCheckbox: Ae
|
|
586
591
|
},
|
|
587
592
|
props: {
|
|
@@ -628,133 +633,140 @@ const Vt = {
|
|
|
628
633
|
tabindex: { type: Number, default: -1 }
|
|
629
634
|
},
|
|
630
635
|
emits: [
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
636
|
+
te.SELECT_CATEGORY,
|
|
637
|
+
te.UNSELECT_CATEGORY,
|
|
638
|
+
te.TOGGLE_CATEGORY_VISIBILITY
|
|
634
639
|
],
|
|
635
640
|
setup(e, { emit: t }) {
|
|
636
|
-
const i =
|
|
637
|
-
() => e.category.items.every((
|
|
638
|
-
),
|
|
639
|
-
[`b-listbox-multi-select-category--${
|
|
640
|
-
})),
|
|
641
|
-
|
|
642
|
-
},
|
|
643
|
-
var
|
|
644
|
-
const
|
|
645
|
-
return { isDisabled:
|
|
646
|
-
},
|
|
647
|
-
() => e.category.items.filter((
|
|
648
|
-
const { isDisabled:
|
|
649
|
-
return
|
|
641
|
+
const i = k(!1), { t: s } = Ie(), r = Ne("category-group"), o = Ne("category-name"), n = (N) => e.isOptionDisabled ? e.isOptionDisabled(N) : !1, p = m(
|
|
642
|
+
() => e.category.items.every((N) => n(N))
|
|
643
|
+
), y = fe(e, "staticCategories"), a = m(() => i.value || e.staticCategories), u = m(() => ({
|
|
644
|
+
[`b-listbox-multi-select-category--${Ke.DISABLED}`]: p.value
|
|
645
|
+
})), l = (N, U) => {
|
|
646
|
+
N.preventDefault(), i.value = U !== void 0 ? U : !i.value, t(te.TOGGLE_CATEGORY_VISIBILITY, e.category.value);
|
|
647
|
+
}, f = (N) => {
|
|
648
|
+
var oe;
|
|
649
|
+
const U = n(N), W = ((oe = e.selectedItemsList) == null ? void 0 : oe.includes(N.value)) || !1;
|
|
650
|
+
return { isDisabled: U, isPreSelected: W };
|
|
651
|
+
}, E = m(
|
|
652
|
+
() => e.category.items.filter((N) => {
|
|
653
|
+
const { isDisabled: U, isPreSelected: W } = f(N);
|
|
654
|
+
return U && W || !U;
|
|
650
655
|
})
|
|
651
|
-
),
|
|
656
|
+
), T = m(
|
|
652
657
|
() => {
|
|
653
|
-
var
|
|
654
|
-
return (
|
|
655
|
-
({ value:
|
|
658
|
+
var N;
|
|
659
|
+
return (N = E.value) == null ? void 0 : N.filter(
|
|
660
|
+
({ value: U }) => {
|
|
656
661
|
var W;
|
|
657
|
-
return (W = e.selectedItemsList) == null ? void 0 : W.includes(
|
|
662
|
+
return (W = e.selectedItemsList) == null ? void 0 : W.includes(U);
|
|
658
663
|
}
|
|
659
664
|
);
|
|
660
665
|
}
|
|
661
|
-
),
|
|
662
|
-
const
|
|
663
|
-
return s(
|
|
664
|
-
}),
|
|
665
|
-
t(
|
|
666
|
-
},
|
|
667
|
-
t(
|
|
668
|
-
}, { isAllSelected:
|
|
669
|
-
f,
|
|
670
|
-
l,
|
|
666
|
+
), $ = m(() => {
|
|
667
|
+
const N = i.value ? "categoryOpened" : "categoryClosed";
|
|
668
|
+
return s(N, { category: e.category.label });
|
|
669
|
+
}), P = () => {
|
|
670
|
+
t(te.SELECT_CATEGORY);
|
|
671
|
+
}, D = () => {
|
|
672
|
+
t(te.UNSELECT_CATEGORY);
|
|
673
|
+
}, { isAllSelected: B, isIndeterminate: I, toggleSelectAll: S } = ze(
|
|
671
674
|
T,
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
+
E,
|
|
676
|
+
P,
|
|
677
|
+
D
|
|
678
|
+
), _ = m(() => I.value ? "mixed" : `${B.value}`), w = k(B.value), Q = () => {
|
|
679
|
+
w.value = !w.value, S(w.value);
|
|
675
680
|
};
|
|
676
|
-
return
|
|
677
|
-
|
|
681
|
+
return ye(B, () => {
|
|
682
|
+
w.value = B.value;
|
|
678
683
|
}), {
|
|
679
684
|
// Values
|
|
680
|
-
chevronTitle:
|
|
681
|
-
conditionalClass:
|
|
682
|
-
hasAllPropsDisabled:
|
|
685
|
+
chevronTitle: $,
|
|
686
|
+
conditionalClass: u,
|
|
687
|
+
hasAllPropsDisabled: p,
|
|
683
688
|
isOpen: i,
|
|
684
|
-
isAllSelected:
|
|
685
|
-
isIndeterminate:
|
|
686
|
-
isStaticCategory:
|
|
689
|
+
isAllSelected: B,
|
|
690
|
+
isIndeterminate: I,
|
|
691
|
+
isStaticCategory: y,
|
|
692
|
+
categoryGroupId: r,
|
|
693
|
+
categoryNameId: o,
|
|
687
694
|
// Computed
|
|
688
|
-
showItemChildren:
|
|
689
|
-
ariaCheckedComputed:
|
|
695
|
+
showItemChildren: a,
|
|
696
|
+
ariaCheckedComputed: _,
|
|
690
697
|
// Methods
|
|
691
|
-
handleSelectAll:
|
|
692
|
-
toggleOpen:
|
|
693
|
-
toggleSelectAll:
|
|
698
|
+
handleSelectAll: Q,
|
|
699
|
+
toggleOpen: l,
|
|
700
|
+
toggleSelectAll: S
|
|
694
701
|
};
|
|
695
702
|
}
|
|
696
|
-
}),
|
|
703
|
+
}), Wt = { class: "b-listbox-multi-select-category__label" }, jt = {
|
|
697
704
|
key: 1,
|
|
698
|
-
class: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category"
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
705
|
+
class: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category",
|
|
706
|
+
"aria-hidden": "true"
|
|
707
|
+
}, qt = { class: "b-listbox-multi-select-category__label" }, Ht = ["id", "aria-label"];
|
|
708
|
+
function Xt(e, t, i, s, r, o) {
|
|
709
|
+
const n = L("listbox-decorative-checkbox"), p = L("bento-typography"), y = L("chevron-up-icon"), a = L("chevron-down-icon"), u = L("bento-listbox-option");
|
|
702
710
|
return v(), O("div", null, [
|
|
703
|
-
e.isStaticCategory ? (v(), O("div",
|
|
704
|
-
|
|
705
|
-
|
|
711
|
+
e.isStaticCategory ? (v(), O("div", jt, [
|
|
712
|
+
z("span", qt, [
|
|
713
|
+
G(p, {
|
|
706
714
|
el: "span",
|
|
707
715
|
variant: "caption",
|
|
708
716
|
class: "b-listbox-multi-select-category__label-text"
|
|
709
717
|
}, {
|
|
710
718
|
default: A(() => [
|
|
711
|
-
|
|
719
|
+
K(V(e.category.label), 1)
|
|
712
720
|
]),
|
|
713
721
|
_: 1
|
|
714
722
|
})
|
|
715
723
|
])
|
|
716
|
-
])) : (v(),
|
|
724
|
+
])) : (v(), R(u, {
|
|
717
725
|
key: 0,
|
|
718
|
-
class:
|
|
726
|
+
class: ge(["b-listbox-multi-select-category__option", e.conditionalClass]),
|
|
719
727
|
tabindex: e.tabindex,
|
|
720
728
|
"aria-selected": e.ariaCheckedComputed !== "false",
|
|
721
729
|
"aria-checked": e.ariaCheckedComputed,
|
|
722
730
|
"aria-disabled": e.hasAllPropsDisabled,
|
|
723
|
-
"aria-expanded": e.isOpen
|
|
731
|
+
"aria-expanded": `${e.isOpen}`,
|
|
724
732
|
role: "treeitem",
|
|
733
|
+
"aria-owns": e.categoryGroupId,
|
|
734
|
+
"aria-labelledby": e.categoryNameId,
|
|
725
735
|
onClick: e.handleSelectAll,
|
|
726
736
|
onEnterPressed: e.handleSelectAll,
|
|
727
|
-
onSpacePressed:
|
|
737
|
+
onSpacePressed: re(e.handleSelectAll, ["prevent"]),
|
|
728
738
|
onKeydown: [
|
|
729
|
-
t[1] || (t[1] =
|
|
730
|
-
t[2] || (t[2] =
|
|
739
|
+
t[1] || (t[1] = me((l) => e.toggleOpen(l, !1), ["arrow-left", "native"])),
|
|
740
|
+
t[2] || (t[2] = me((l) => e.toggleOpen(l, !0), ["arrow-right", "native"]))
|
|
731
741
|
]
|
|
732
742
|
}, {
|
|
733
743
|
default: A(() => [
|
|
734
|
-
|
|
744
|
+
G(n, {
|
|
735
745
|
indeterminate: e.isIndeterminate,
|
|
736
746
|
disabled: e.hasAllPropsDisabled,
|
|
737
747
|
checked: e.isAllSelected
|
|
738
748
|
}, null, 8, ["indeterminate", "disabled", "checked"]),
|
|
739
|
-
|
|
740
|
-
|
|
749
|
+
z("span", Wt, [
|
|
750
|
+
G(p, {
|
|
751
|
+
id: e.categoryNameId,
|
|
741
752
|
el: "span",
|
|
742
753
|
class: "b-listbox-multi-select-category__label-text"
|
|
743
754
|
}, {
|
|
744
755
|
default: A(() => [
|
|
745
|
-
|
|
756
|
+
K(V(e.category.label), 1)
|
|
746
757
|
]),
|
|
747
758
|
_: 1
|
|
748
|
-
}),
|
|
749
|
-
|
|
759
|
+
}, 8, ["id"]),
|
|
760
|
+
z("div", {
|
|
761
|
+
"aria-hidden": "true",
|
|
750
762
|
class: "b-listbox-multi-select-category__label-chevron",
|
|
751
763
|
"data-testid": "toggle-listbox",
|
|
752
|
-
onClickCapture: t[0] || (t[0] =
|
|
764
|
+
onClickCapture: t[0] || (t[0] = re((...l) => e.toggleOpen && e.toggleOpen(...l), ["stop"]))
|
|
753
765
|
}, [
|
|
754
|
-
e.isOpen ? (v(),
|
|
766
|
+
e.isOpen ? (v(), R(y, {
|
|
755
767
|
key: 0,
|
|
756
768
|
"svg-title": e.chevronTitle
|
|
757
|
-
}, null, 8, ["svg-title"])) : (v(),
|
|
769
|
+
}, null, 8, ["svg-title"])) : (v(), R(a, {
|
|
758
770
|
key: 1,
|
|
759
771
|
"svg-title": e.chevronTitle
|
|
760
772
|
}, null, 8, ["svg-title"]))
|
|
@@ -762,22 +774,26 @@ function qt(e, t, i, s, n, o) {
|
|
|
762
774
|
])
|
|
763
775
|
]),
|
|
764
776
|
_: 1
|
|
765
|
-
}, 8, ["class", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "aria-expanded", "onClick", "onEnterPressed", "onSpacePressed"])),
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
777
|
+
}, 8, ["class", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "aria-expanded", "aria-owns", "aria-labelledby", "onClick", "onEnterPressed", "onSpacePressed"])),
|
|
778
|
+
ce(z("div", {
|
|
779
|
+
id: e.categoryGroupId,
|
|
780
|
+
role: "group",
|
|
781
|
+
"aria-label": e.category.label
|
|
782
|
+
}, [
|
|
783
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
784
|
+
], 8, Ht), [
|
|
785
|
+
[we, e.showItemChildren]
|
|
770
786
|
])
|
|
771
787
|
]);
|
|
772
788
|
}
|
|
773
|
-
const
|
|
774
|
-
var
|
|
775
|
-
const
|
|
789
|
+
const Jt = /* @__PURE__ */ H(Kt, [["render", Xt], ["__scopeId", "data-v-f331aae2"]]);
|
|
790
|
+
var X = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", e.UNSELECT_CATEGORY = "unselect-category", e.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", e))(X || {});
|
|
791
|
+
const Zt = Z({
|
|
776
792
|
name: "listbox-multi-select-options",
|
|
777
793
|
components: {
|
|
778
|
-
BentoListboxOption:
|
|
779
|
-
BentoTypography:
|
|
780
|
-
ListboxMultiSelectCategory:
|
|
794
|
+
BentoListboxOption: Ee,
|
|
795
|
+
BentoTypography: de,
|
|
796
|
+
ListboxMultiSelectCategory: Jt,
|
|
781
797
|
ListboxDecorativeCheckbox: Ae
|
|
782
798
|
},
|
|
783
799
|
inheritAttrs: !1,
|
|
@@ -848,23 +864,23 @@ const Xt = J({
|
|
|
848
864
|
}
|
|
849
865
|
},
|
|
850
866
|
emits: [
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
867
|
+
X.TOGGLE_CHECKBOX_SELECTION,
|
|
868
|
+
X.SELECT_CATEGORY,
|
|
869
|
+
X.UNSELECT_CATEGORY,
|
|
870
|
+
X.TOGGLE_CATEGORY_VISIBILITY
|
|
855
871
|
],
|
|
856
872
|
setup(e, { emit: t }) {
|
|
857
|
-
const i = (
|
|
858
|
-
e.isOptionDisabled(
|
|
859
|
-
}, s = (
|
|
873
|
+
const i = (a) => {
|
|
874
|
+
e.isOptionDisabled(a) || t(X.TOGGLE_CHECKBOX_SELECTION, a);
|
|
875
|
+
}, s = (a) => !!a.items, r = (a) => {
|
|
860
876
|
const u = e.isMultiLevel && e.searching;
|
|
861
|
-
return
|
|
862
|
-
}, o = (
|
|
863
|
-
if (s(
|
|
864
|
-
const u = o(
|
|
865
|
-
t(u,
|
|
877
|
+
return a.description && (!e.isMultiLevel || u);
|
|
878
|
+
}, o = (a) => a.items ? !!a.items.find((u) => e.selectedItemsList.includes(u.value)) : e.selectedItemsList.includes(a.value), n = (a) => {
|
|
879
|
+
if (s(a)) {
|
|
880
|
+
const u = o(a) ? X.UNSELECT_CATEGORY : X.SELECT_CATEGORY;
|
|
881
|
+
t(u, a);
|
|
866
882
|
} else
|
|
867
|
-
i(
|
|
883
|
+
i(a);
|
|
868
884
|
};
|
|
869
885
|
return {
|
|
870
886
|
// Values
|
|
@@ -874,25 +890,25 @@ const Xt = J({
|
|
|
874
890
|
})),
|
|
875
891
|
// Methods
|
|
876
892
|
isOptionSelected: o,
|
|
877
|
-
shouldShowDescription:
|
|
893
|
+
shouldShowDescription: r,
|
|
878
894
|
toggleCheckboxSelection: i,
|
|
879
|
-
toggleSearchOption:
|
|
880
|
-
computedTabindex: (
|
|
895
|
+
toggleSearchOption: n,
|
|
896
|
+
computedTabindex: (a) => e.itemsIndex[a] === e.focusedIndex ? 0 : -1,
|
|
881
897
|
// Enums
|
|
882
898
|
BentoListboxEvent: g,
|
|
883
|
-
ListboxMultiSelectOptionsEvent:
|
|
899
|
+
ListboxMultiSelectOptionsEvent: X
|
|
884
900
|
};
|
|
885
901
|
}
|
|
886
|
-
}),
|
|
887
|
-
function
|
|
888
|
-
const
|
|
902
|
+
}), Qt = { class: "b-listbox-multi-select__option-text" }, es = { class: "b-listbox-multi-select__option-text" };
|
|
903
|
+
function ts(e, t, i, s, r, o) {
|
|
904
|
+
const n = L("listbox-decorative-checkbox"), p = L("bento-typography"), y = L("bento-listbox-option"), a = L("listbox-multi-select-options", !0), u = L("listbox-multi-select-category");
|
|
889
905
|
return v(), O("div", null, [
|
|
890
|
-
(v(!0), O(
|
|
906
|
+
(v(!0), O(le, null, q(e.items, (l) => (v(), O("div", {
|
|
891
907
|
key: `selected-${l.value}`
|
|
892
908
|
}, [
|
|
893
|
-
e.searching && e.isMultiLevel ? (v(),
|
|
909
|
+
e.searching && e.isMultiLevel ? (v(), R(y, {
|
|
894
910
|
key: 0,
|
|
895
|
-
class:
|
|
911
|
+
class: ge(["b-listbox-multi-select-options", e.conditionalClasses]),
|
|
896
912
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
897
913
|
tabindex: e.computedTabindex(l.value),
|
|
898
914
|
"aria-selected": `${e.isOptionSelected(l)}`,
|
|
@@ -901,37 +917,37 @@ function Qt(e, t, i, s, n, o) {
|
|
|
901
917
|
role: e.$attrs.role,
|
|
902
918
|
onClick: (f) => e.toggleSearchOption(l),
|
|
903
919
|
onEnterPressed: (f) => e.toggleSearchOption(l),
|
|
904
|
-
onSpacePressed:
|
|
920
|
+
onSpacePressed: re((f) => e.toggleSearchOption(l), ["prevent"])
|
|
905
921
|
}, {
|
|
906
922
|
default: A(() => [
|
|
907
|
-
|
|
923
|
+
G(n, {
|
|
908
924
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
909
925
|
checked: e.isOptionSelected(l)
|
|
910
926
|
}, null, 8, ["disabled", "checked"]),
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
927
|
+
j(e.$slots, "default", Y({ ref_for: !0 }, l), () => [
|
|
928
|
+
z("span", Qt, [
|
|
929
|
+
G(p, { el: "span" }, {
|
|
914
930
|
default: A(() => [
|
|
915
|
-
|
|
931
|
+
K(V(l.label), 1)
|
|
916
932
|
]),
|
|
917
933
|
_: 2
|
|
918
934
|
}, 1024),
|
|
919
|
-
e.shouldShowDescription(l) ? (v(),
|
|
935
|
+
e.shouldShowDescription(l) ? (v(), R(p, {
|
|
920
936
|
key: 0,
|
|
921
937
|
class: "b-listbox-multi-select__option-description",
|
|
922
938
|
el: "span"
|
|
923
939
|
}, {
|
|
924
940
|
default: A(() => [
|
|
925
|
-
|
|
941
|
+
K(V(l.description), 1)
|
|
926
942
|
]),
|
|
927
943
|
_: 2
|
|
928
|
-
}, 1024)) :
|
|
944
|
+
}, 1024)) : J("", !0)
|
|
929
945
|
])
|
|
930
946
|
], !0)
|
|
931
947
|
]),
|
|
932
948
|
_: 2
|
|
933
|
-
}, 1032, ["class", "disabled", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "role", "onClick", "onEnterPressed", "onSpacePressed"])) : (v(), O(
|
|
934
|
-
l.items ? (v(),
|
|
949
|
+
}, 1032, ["class", "disabled", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "role", "onClick", "onEnterPressed", "onSpacePressed"])) : (v(), O(le, { key: 1 }, [
|
|
950
|
+
l.items ? (v(), R(u, {
|
|
935
951
|
key: 0,
|
|
936
952
|
category: l,
|
|
937
953
|
"static-categories": e.staticCategories,
|
|
@@ -943,7 +959,7 @@ function Qt(e, t, i, s, n, o) {
|
|
|
943
959
|
onToggleCategoryVisibility: t[1] || (t[1] = (f) => e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY, f))
|
|
944
960
|
}, {
|
|
945
961
|
default: A(() => [
|
|
946
|
-
|
|
962
|
+
G(a, {
|
|
947
963
|
"category-items": "",
|
|
948
964
|
items: l.items,
|
|
949
965
|
"is-option-disabled": e.isOptionDisabled,
|
|
@@ -958,9 +974,9 @@ function Qt(e, t, i, s, n, o) {
|
|
|
958
974
|
}, null, 8, ["items", "is-option-disabled", "items-index", "focused-index", "is-multi-level", "static-categories", "selected-items-list", "searching", "role"])
|
|
959
975
|
]),
|
|
960
976
|
_: 2
|
|
961
|
-
}, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (v(),
|
|
977
|
+
}, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (v(), R(y, {
|
|
962
978
|
key: 1,
|
|
963
|
-
class:
|
|
979
|
+
class: ge(["b-listbox-multi-select-options", e.conditionalClasses]),
|
|
964
980
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
965
981
|
tabindex: e.computedTabindex(l.value),
|
|
966
982
|
"aria-selected": `${e.isOptionSelected(l)}`,
|
|
@@ -969,31 +985,31 @@ function Qt(e, t, i, s, n, o) {
|
|
|
969
985
|
role: e.$attrs.role,
|
|
970
986
|
onClick: (f) => e.toggleCheckboxSelection(l),
|
|
971
987
|
onEnterPressed: (f) => e.toggleCheckboxSelection(l),
|
|
972
|
-
onSpacePressed:
|
|
988
|
+
onSpacePressed: re((f) => e.toggleCheckboxSelection(l), ["prevent"])
|
|
973
989
|
}, {
|
|
974
990
|
default: A(() => [
|
|
975
|
-
|
|
991
|
+
G(n, {
|
|
976
992
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
977
993
|
checked: e.isOptionSelected(l)
|
|
978
994
|
}, null, 8, ["disabled", "checked"]),
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
995
|
+
j(e.$slots, "default", Y({ ref_for: !0 }, l), () => [
|
|
996
|
+
z("span", es, [
|
|
997
|
+
G(p, { el: "span" }, {
|
|
982
998
|
default: A(() => [
|
|
983
|
-
|
|
999
|
+
K(V(l.label), 1)
|
|
984
1000
|
]),
|
|
985
1001
|
_: 2
|
|
986
1002
|
}, 1024),
|
|
987
|
-
e.shouldShowDescription(l) ? (v(),
|
|
1003
|
+
e.shouldShowDescription(l) ? (v(), R(p, {
|
|
988
1004
|
key: 0,
|
|
989
1005
|
class: "b-listbox-multi-select__option-description",
|
|
990
1006
|
el: "span"
|
|
991
1007
|
}, {
|
|
992
1008
|
default: A(() => [
|
|
993
|
-
|
|
1009
|
+
K(V(l.description), 1)
|
|
994
1010
|
]),
|
|
995
1011
|
_: 2
|
|
996
|
-
}, 1024)) :
|
|
1012
|
+
}, 1024)) : J("", !0)
|
|
997
1013
|
])
|
|
998
1014
|
], !0)
|
|
999
1015
|
]),
|
|
@@ -1003,19 +1019,19 @@ function Qt(e, t, i, s, n, o) {
|
|
|
1003
1019
|
]))), 128))
|
|
1004
1020
|
]);
|
|
1005
1021
|
}
|
|
1006
|
-
const
|
|
1022
|
+
const ss = /* @__PURE__ */ H(Zt, [["render", ts], ["__scopeId", "data-v-fd1a6cbe"]]), ls = (e) => {
|
|
1007
1023
|
const t = m(() => {
|
|
1008
1024
|
var s;
|
|
1009
|
-
return !!((s = e.value) != null && s.find(({ items:
|
|
1025
|
+
return !!((s = e.value) != null && s.find(({ items: r }) => !!r));
|
|
1010
1026
|
}), i = m(() => {
|
|
1011
1027
|
var s;
|
|
1012
|
-
return t.value ? (s = e.value) == null ? void 0 : s.reduce((
|
|
1028
|
+
return t.value ? (s = e.value) == null ? void 0 : s.reduce((r, o) => (o.items ? r.push(...o.items.flat()) : r.push(o), r), []) : e.value;
|
|
1013
1029
|
});
|
|
1014
1030
|
return {
|
|
1015
1031
|
isMultiLevelSelect: t,
|
|
1016
1032
|
flattenedItemsList: i
|
|
1017
1033
|
};
|
|
1018
|
-
},
|
|
1034
|
+
}, We = {
|
|
1019
1035
|
"en-US": {
|
|
1020
1036
|
allSelected: "All selected ({total})",
|
|
1021
1037
|
numberOfTotalSelected: "{number} of {total} selected",
|
|
@@ -1034,12 +1050,12 @@ const es = /* @__PURE__ */ q(Xt, [["render", Qt], ["__scopeId", "data-v-fd1a6cbe
|
|
|
1034
1050
|
numbersSelected: "{number} selecionados",
|
|
1035
1051
|
selectAll: "Selecionar todos ({total})"
|
|
1036
1052
|
}
|
|
1037
|
-
},
|
|
1053
|
+
}, os = { key: 0 }, is = ["role"], ns = {
|
|
1038
1054
|
key: 1,
|
|
1039
1055
|
class: "b-listbox-multi-select__divider",
|
|
1040
1056
|
"aria-hidden": "true"
|
|
1041
|
-
},
|
|
1042
|
-
...
|
|
1057
|
+
}, as = { i18n: { messages: We } }, rs = /* @__PURE__ */ Z({
|
|
1058
|
+
...as,
|
|
1043
1059
|
__name: "listbox-multi-select",
|
|
1044
1060
|
props: {
|
|
1045
1061
|
hasMoreItems: { type: Boolean, default: !1 },
|
|
@@ -1052,136 +1068,136 @@ const es = /* @__PURE__ */ q(Xt, [["render", Qt], ["__scopeId", "data-v-fd1a6cbe
|
|
|
1052
1068
|
},
|
|
1053
1069
|
emits: ["select"],
|
|
1054
1070
|
setup(e, { expose: t, emit: i }) {
|
|
1055
|
-
const s = e,
|
|
1071
|
+
const s = e, r = i, { t: o, n } = Ie({ messages: We }), p = ut(), y = bt(), a = m(
|
|
1056
1072
|
() => {
|
|
1057
1073
|
var c, b, d, h;
|
|
1058
1074
|
return {
|
|
1059
|
-
"aria-label": (c =
|
|
1060
|
-
"aria-busy": (b =
|
|
1061
|
-
"aria-atomic": (d =
|
|
1062
|
-
"aria-live": (h =
|
|
1075
|
+
"aria-label": (c = y["aria-label"]) == null ? void 0 : c.toString(),
|
|
1076
|
+
"aria-busy": (b = y["aria-busy"]) == null ? void 0 : b.toString(),
|
|
1077
|
+
"aria-atomic": (d = y["aria-atomic"]) == null ? void 0 : d.toString(),
|
|
1078
|
+
"aria-live": (h = y["aria-live"]) == null ? void 0 : h.toString(),
|
|
1063
1079
|
"aria-multiselectable": !0
|
|
1064
1080
|
};
|
|
1065
1081
|
}
|
|
1066
|
-
), u =
|
|
1082
|
+
), u = k(null), l = k(null), f = k(null), E = k(null), T = m(() => s.selectedValues.map(({ value: c }) => c)), { isMultiLevelSelect: $, flattenedItemsList: P } = ls(fe(s, "items")), D = m(() => $.value && !s.staticCategories), B = m(() => D.value ? "tree" : "listbox"), I = m(() => D.value ? "treeitem" : "option"), S = (c) => {
|
|
1067
1083
|
var h;
|
|
1068
1084
|
const b = s.isOptionDisabled(c), d = ((h = T.value) == null ? void 0 : h.includes(c.value)) || !1;
|
|
1069
1085
|
return { isDisabled: b, isPreSelected: d };
|
|
1070
1086
|
}, _ = m(() => {
|
|
1071
|
-
if (s.searching &&
|
|
1087
|
+
if (s.searching && $)
|
|
1072
1088
|
return s.items;
|
|
1073
|
-
const c =
|
|
1074
|
-
const { isDisabled: d, isPreSelected: h } =
|
|
1089
|
+
const c = P.value.filter((b) => {
|
|
1090
|
+
const { isDisabled: d, isPreSelected: h } = S(b);
|
|
1075
1091
|
return d && h || !d;
|
|
1076
1092
|
});
|
|
1077
1093
|
return s.selectedValues.forEach((b) => {
|
|
1078
1094
|
c.find((d) => d.value === b.value) || c.push(b);
|
|
1079
1095
|
}), c;
|
|
1080
|
-
}),
|
|
1096
|
+
}), w = m(
|
|
1081
1097
|
() => {
|
|
1082
1098
|
var c;
|
|
1083
1099
|
return (c = _.value) == null ? void 0 : c.filter((b) => {
|
|
1084
1100
|
var d;
|
|
1085
|
-
return b.items &&
|
|
1101
|
+
return b.items && $.value && s.searching ? b.items.filter(
|
|
1086
1102
|
(C) => (s.selectedValues ?? []).includes(C.value)
|
|
1087
1103
|
).length === b.items.length : (d = T.value) == null ? void 0 : d.includes(b.value);
|
|
1088
1104
|
});
|
|
1089
1105
|
}
|
|
1090
|
-
),
|
|
1106
|
+
), Q = () => $.value && !s.searching ? P.value.length : s.items.length, N = m(() => {
|
|
1091
1107
|
var h;
|
|
1092
|
-
const c = _.value.length, b =
|
|
1093
|
-
return d === 0 ? o("selectAll", { total:
|
|
1094
|
-
}),
|
|
1108
|
+
const c = _.value.length, b = Q(), d = ((h = w.value) == null ? void 0 : h.length) || 0;
|
|
1109
|
+
return d === 0 ? o("selectAll", { total: n(c) }) : d === b ? o("allSelected", { total: n(b) }) : d <= b ? o("numberOfTotalSelected", { number: n(d), total: n(b) }) : o("numbersSelected", { number: n(d) });
|
|
1110
|
+
}), U = (c) => {
|
|
1095
1111
|
const b = (h) => {
|
|
1096
|
-
const { isDisabled: C, isPreSelected:
|
|
1097
|
-
return C &&
|
|
1112
|
+
const { isDisabled: C, isPreSelected: ee } = S(h);
|
|
1113
|
+
return C && ee || !C;
|
|
1098
1114
|
}, d = c.filter(b).filter((h) => !T.value.includes(h.value));
|
|
1099
|
-
|
|
1100
|
-
},
|
|
1115
|
+
r("select", [...s.selectedValues, ...d]);
|
|
1116
|
+
}, W = (c) => {
|
|
1101
1117
|
const b = (C) => {
|
|
1102
|
-
const { isDisabled:
|
|
1103
|
-
return !(
|
|
1118
|
+
const { isDisabled: ee, isPreSelected: rt } = S(C);
|
|
1119
|
+
return !(ee && rt);
|
|
1104
1120
|
}, d = c.filter(b).map(({ value: C }) => C), h = s.selectedValues.filter((C) => !(d != null && d.includes(C.value)));
|
|
1105
|
-
|
|
1106
|
-
},
|
|
1107
|
-
|
|
1121
|
+
r("select", h);
|
|
1122
|
+
}, oe = () => {
|
|
1123
|
+
U(P.value);
|
|
1108
1124
|
}, Oe = () => {
|
|
1109
|
-
|
|
1110
|
-
}, { isAllSelected:
|
|
1111
|
-
|
|
1125
|
+
W(P.value);
|
|
1126
|
+
}, { isAllSelected: M, isIndeterminate: ie, toggleSelectAll: je } = ze(
|
|
1127
|
+
w,
|
|
1112
1128
|
_,
|
|
1113
|
-
|
|
1129
|
+
oe,
|
|
1114
1130
|
Oe
|
|
1115
|
-
), ke = m(() =>
|
|
1116
|
-
|
|
1131
|
+
), ke = m(() => ie.value ? "mixed" : `${M.value}`), Se = k(M.value), Te = () => {
|
|
1132
|
+
Se.value = !Se.value, je(Se.value);
|
|
1117
1133
|
};
|
|
1118
|
-
|
|
1119
|
-
|
|
1134
|
+
ye(M, () => {
|
|
1135
|
+
Se.value = M.value;
|
|
1120
1136
|
});
|
|
1121
|
-
const
|
|
1122
|
-
|
|
1137
|
+
const qe = (c) => {
|
|
1138
|
+
U(c.items);
|
|
1123
1139
|
}, Le = (c) => {
|
|
1124
|
-
|
|
1125
|
-
},
|
|
1140
|
+
W(c.items);
|
|
1141
|
+
}, ue = (c, b) => {
|
|
1126
1142
|
let d = !1;
|
|
1127
1143
|
const h = s.selectedValues.filter(({ value: C }) => b.value === C ? (d = !0, !1) : !0);
|
|
1128
|
-
d || h.push(b),
|
|
1129
|
-
},
|
|
1130
|
-
if (
|
|
1144
|
+
d || h.push(b), r(c, h);
|
|
1145
|
+
}, He = m(() => {
|
|
1146
|
+
if (!$.value)
|
|
1131
1147
|
return s.selectedValues;
|
|
1132
|
-
const c = (C) => T.value.includes(C.value), b = (C) => !s.staticCategories && C.every((
|
|
1148
|
+
const c = (C) => T.value.includes(C.value), b = (C) => !s.staticCategories && C.every((ee) => c(ee));
|
|
1133
1149
|
return s.items.flatMap(
|
|
1134
1150
|
(C) => C.items && !b(C.items) ? C.items : C
|
|
1135
1151
|
).filter((C) => C.items ? !0 : c(C));
|
|
1136
|
-
}),
|
|
1137
|
-
var d, h, C,
|
|
1138
|
-
const c = ["automatic", "button"].includes(s.lazyLoadType), b = ((d = s.selectedValues) == null ? void 0 : d.length) > 0 && ((h =
|
|
1139
|
-
return c && s.hasMoreItems ? !!((
|
|
1140
|
-
}), $e = m(() => ["automatic", "button"].includes(s.lazyLoadType) ? !s.hasMoreItems : !0),
|
|
1152
|
+
}), Xe = m(() => {
|
|
1153
|
+
var d, h, C, ee;
|
|
1154
|
+
const c = ["automatic", "button"].includes(s.lazyLoadType), b = ((d = s.selectedValues) == null ? void 0 : d.length) > 0 && ((h = w.value) == null ? void 0 : h.length) !== ((C = P.value) == null ? void 0 : C.length);
|
|
1155
|
+
return c && s.hasMoreItems ? !!((ee = s.selectedValues) != null && ee.length) : b;
|
|
1156
|
+
}), $e = m(() => ["automatic", "button"].includes(s.lazyLoadType) ? !s.hasMoreItems : !0), be = k([]), { visibleDomOptions: De, updateVisibleDomOptions: Je } = Fe(
|
|
1141
1157
|
u,
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
),
|
|
1145
|
-
|
|
1146
|
-
|
|
1158
|
+
fe(s, "items"),
|
|
1159
|
+
I
|
|
1160
|
+
), Ze = (c) => {
|
|
1161
|
+
be.value.includes(c) ? be.value = be.value.filter((b) => b !== c) : be.value.push(c), Ye(() => {
|
|
1162
|
+
Je();
|
|
1147
1163
|
});
|
|
1148
|
-
},
|
|
1164
|
+
}, Qe = (c) => {
|
|
1149
1165
|
var b;
|
|
1150
1166
|
(b = De.value[c]) == null || b.focus();
|
|
1151
1167
|
}, {
|
|
1152
|
-
moveToNextElement:
|
|
1153
|
-
moveToPreviousElement:
|
|
1154
|
-
moveToFirstElement:
|
|
1155
|
-
moveToLastElement:
|
|
1168
|
+
moveToNextElement: et,
|
|
1169
|
+
moveToPreviousElement: tt,
|
|
1170
|
+
moveToFirstElement: st,
|
|
1171
|
+
moveToLastElement: lt,
|
|
1156
1172
|
preventDefault: Be,
|
|
1157
1173
|
focusedIndex: Re,
|
|
1158
|
-
setListboxFocusedIndex:
|
|
1159
|
-
} =
|
|
1174
|
+
setListboxFocusedIndex: ot
|
|
1175
|
+
} = Ve(
|
|
1160
1176
|
{
|
|
1161
1177
|
items: De
|
|
1162
1178
|
},
|
|
1163
|
-
|
|
1164
|
-
),
|
|
1165
|
-
[
|
|
1166
|
-
[
|
|
1167
|
-
[
|
|
1168
|
-
[
|
|
1179
|
+
Qe
|
|
1180
|
+
), it = {
|
|
1181
|
+
[F.ARROW_UP]: (c) => tt(c),
|
|
1182
|
+
[F.ARROW_DOWN]: (c) => et(c),
|
|
1183
|
+
[F.HOME]: st,
|
|
1184
|
+
[F.END]: lt
|
|
1169
1185
|
};
|
|
1170
1186
|
t({
|
|
1171
1187
|
/**
|
|
1172
1188
|
* Method to set the index of the item to be focused on
|
|
1173
1189
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
1174
1190
|
*/
|
|
1175
|
-
setListboxFocusedIndex:
|
|
1191
|
+
setListboxFocusedIndex: ot
|
|
1176
1192
|
});
|
|
1177
|
-
const
|
|
1178
|
-
[
|
|
1179
|
-
[
|
|
1180
|
-
},
|
|
1193
|
+
const nt = {
|
|
1194
|
+
[F.ARROW_UP]: Be,
|
|
1195
|
+
[F.ARROW_DOWN]: Be
|
|
1196
|
+
}, at = m(() => {
|
|
1181
1197
|
let c = 1;
|
|
1182
1198
|
const b = {};
|
|
1183
1199
|
return s.items.forEach((d) => {
|
|
1184
|
-
let h =
|
|
1200
|
+
let h = be.value.includes(d.value);
|
|
1185
1201
|
d.items ? (s.staticCategories ? h = !0 : b[d.value] = c++, h && d.items.forEach((C) => b[C.value] = c++)) : b[d.value] = c++;
|
|
1186
1202
|
}), b;
|
|
1187
1203
|
});
|
|
@@ -1190,91 +1206,91 @@ const es = /* @__PURE__ */ q(Xt, [["render", Qt], ["__scopeId", "data-v-fd1a6cbe
|
|
|
1190
1206
|
ref: u,
|
|
1191
1207
|
class: "b-listbox-multi-select"
|
|
1192
1208
|
}, [
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
(v(!0), O(
|
|
1209
|
+
Xe.value ? (v(), O("div", os, [
|
|
1210
|
+
ce((v(), O("ul", Y({ class: "b-listbox-multi-select__chips" }, se(nt, !0)), [
|
|
1211
|
+
(v(!0), O(le, null, q(He.value, (d) => (v(), O("li", {
|
|
1196
1212
|
key: d.value
|
|
1197
1213
|
}, [
|
|
1198
|
-
x(
|
|
1214
|
+
G(x(pt), {
|
|
1199
1215
|
ref_for: !0,
|
|
1200
1216
|
ref_key: "selectedListboxItemsRef",
|
|
1201
1217
|
ref: f,
|
|
1202
1218
|
disabled: c.isOptionDisabled(d),
|
|
1203
1219
|
label: d.label,
|
|
1204
1220
|
condensed: "",
|
|
1205
|
-
onClick: (h) => d.items ? Le(d) :
|
|
1221
|
+
onClick: (h) => d.items ? Le(d) : ue("select", d)
|
|
1206
1222
|
}, null, 8, ["disabled", "label", "onClick"])
|
|
1207
1223
|
]))), 128))
|
|
1208
1224
|
], 16)), [
|
|
1209
|
-
[
|
|
1225
|
+
[x(Ce)]
|
|
1210
1226
|
]),
|
|
1211
|
-
b[4] || (b[4] =
|
|
1227
|
+
b[4] || (b[4] = z("hr", {
|
|
1212
1228
|
class: "b-listbox-multi-select__divider",
|
|
1213
1229
|
"aria-hidden": "true"
|
|
1214
1230
|
}, null, -1))
|
|
1215
|
-
])) :
|
|
1216
|
-
|
|
1217
|
-
$e.value ? (v(),
|
|
1231
|
+
])) : J("", !0),
|
|
1232
|
+
ce((v(), O("div", Y(a.value, { role: B.value }, se(it, !0)), [
|
|
1233
|
+
$e.value ? (v(), R(x(Ee), {
|
|
1218
1234
|
key: 0,
|
|
1219
1235
|
ref_key: "selectAllListboxItemsRef",
|
|
1220
1236
|
ref: l,
|
|
1221
1237
|
class: "b-listbox-multi-select__option",
|
|
1222
|
-
tabindex:
|
|
1238
|
+
tabindex: x(Re) === 0 ? 0 : -1,
|
|
1223
1239
|
"aria-selected": ke.value !== "false",
|
|
1224
1240
|
"aria-checked": ke.value,
|
|
1225
|
-
role:
|
|
1241
|
+
role: I.value,
|
|
1226
1242
|
onClick: Te,
|
|
1227
1243
|
onEnterPressed: Te,
|
|
1228
|
-
onSpacePressed:
|
|
1244
|
+
onSpacePressed: re(Te, ["prevent"])
|
|
1229
1245
|
}, {
|
|
1230
1246
|
default: A(() => [
|
|
1231
|
-
x(
|
|
1232
|
-
checked: M
|
|
1233
|
-
indeterminate:
|
|
1247
|
+
G(x(Ae), {
|
|
1248
|
+
checked: x(M),
|
|
1249
|
+
indeterminate: x(ie)
|
|
1234
1250
|
}, null, 8, ["checked", "indeterminate"]),
|
|
1235
|
-
x(
|
|
1251
|
+
G(x(de), { el: "span" }, {
|
|
1236
1252
|
default: A(() => [
|
|
1237
|
-
|
|
1253
|
+
K(V(N.value), 1)
|
|
1238
1254
|
]),
|
|
1239
1255
|
_: 1
|
|
1240
1256
|
})
|
|
1241
1257
|
]),
|
|
1242
1258
|
_: 1
|
|
1243
|
-
}, 8, ["tabindex", "aria-selected", "aria-checked", "role"])) :
|
|
1244
|
-
$e.value ? (v(), O("hr",
|
|
1245
|
-
x(
|
|
1259
|
+
}, 8, ["tabindex", "aria-selected", "aria-checked", "role"])) : J("", !0),
|
|
1260
|
+
$e.value ? (v(), O("hr", ns)) : J("", !0),
|
|
1261
|
+
G(x(ss), {
|
|
1246
1262
|
ref_key: "listboxItemsRef",
|
|
1247
1263
|
ref: E,
|
|
1248
1264
|
items: c.items,
|
|
1249
1265
|
"is-option-disabled": c.isOptionDisabled,
|
|
1250
|
-
"is-multi-level":
|
|
1266
|
+
"is-multi-level": x($),
|
|
1251
1267
|
"static-categories": c.staticCategories,
|
|
1252
1268
|
searching: c.searching,
|
|
1253
1269
|
"selected-items-list": T.value,
|
|
1254
|
-
"focused-index":
|
|
1255
|
-
"items-index":
|
|
1256
|
-
role:
|
|
1257
|
-
onToggleCheckboxSelection: b[0] || (b[0] = (d) =>
|
|
1258
|
-
onSelectCategory:
|
|
1270
|
+
"focused-index": x(Re),
|
|
1271
|
+
"items-index": at.value,
|
|
1272
|
+
role: I.value,
|
|
1273
|
+
onToggleCheckboxSelection: b[0] || (b[0] = (d) => ue("select", d)),
|
|
1274
|
+
onSelectCategory: qe,
|
|
1259
1275
|
onUnselectCategory: Le,
|
|
1260
|
-
onToggleCategoryVisibility:
|
|
1261
|
-
onSpacePressed: b[1] || (b[1] = (d) =>
|
|
1262
|
-
onTabPressed: b[2] || (b[2] = (d) =>
|
|
1263
|
-
onEnterPressed: b[3] || (b[3] = (d) =>
|
|
1264
|
-
},
|
|
1265
|
-
|
|
1276
|
+
onToggleCategoryVisibility: Ze,
|
|
1277
|
+
onSpacePressed: b[1] || (b[1] = (d) => ue(x(g).SPACE, d)),
|
|
1278
|
+
onTabPressed: b[2] || (b[2] = (d) => ue(x(g).TAB, d)),
|
|
1279
|
+
onEnterPressed: b[3] || (b[3] = (d) => ue(x(g).ENTER, d))
|
|
1280
|
+
}, pe({ _: 2 }, [
|
|
1281
|
+
q(x(p), (d, h) => ({
|
|
1266
1282
|
name: h,
|
|
1267
1283
|
fn: A((C) => [
|
|
1268
|
-
|
|
1284
|
+
j(c.$slots, h, ae(ve(C)), void 0, !0)
|
|
1269
1285
|
])
|
|
1270
1286
|
}))
|
|
1271
1287
|
]), 1032, ["items", "is-option-disabled", "is-multi-level", "static-categories", "searching", "selected-items-list", "focused-index", "items-index", "role"])
|
|
1272
|
-
], 16,
|
|
1273
|
-
[
|
|
1288
|
+
], 16, is)), [
|
|
1289
|
+
[x(Ce)]
|
|
1274
1290
|
])
|
|
1275
1291
|
], 512));
|
|
1276
1292
|
}
|
|
1277
|
-
}),
|
|
1293
|
+
}), xe = /* @__PURE__ */ H(rs, [["__scopeId", "data-v-dc031d72"]]), Ge = {
|
|
1278
1294
|
"en-US": {
|
|
1279
1295
|
loading: "Loading",
|
|
1280
1296
|
showMore: "Show more"
|
|
@@ -1287,18 +1303,18 @@ const es = /* @__PURE__ */ q(Xt, [["render", Qt], ["__scopeId", "data-v-fd1a6cbe
|
|
|
1287
1303
|
loading: "Carregando",
|
|
1288
1304
|
showMore: "Mostrar mais"
|
|
1289
1305
|
}
|
|
1290
|
-
},
|
|
1306
|
+
}, cs = 36, ds = Z({
|
|
1291
1307
|
name: "bento-listbox",
|
|
1292
1308
|
components: {
|
|
1293
|
-
BentoEmptyState:
|
|
1294
|
-
BentoListboxSingleSelect:
|
|
1295
|
-
BentoListboxMultiSelect:
|
|
1296
|
-
BentoTypography:
|
|
1297
|
-
BentoLoadingIndicator:
|
|
1298
|
-
BentoLoadingButton:
|
|
1309
|
+
BentoEmptyState: vt,
|
|
1310
|
+
BentoListboxSingleSelect: Ut,
|
|
1311
|
+
BentoListboxMultiSelect: xe,
|
|
1312
|
+
BentoTypography: de,
|
|
1313
|
+
BentoLoadingIndicator: mt,
|
|
1314
|
+
BentoLoadingButton: Ct
|
|
1299
1315
|
},
|
|
1300
|
-
directives: { BentoKeyboardNavigationDirective:
|
|
1301
|
-
i18n: { messages:
|
|
1316
|
+
directives: { BentoKeyboardNavigationDirective: Ce },
|
|
1317
|
+
i18n: { messages: Ge },
|
|
1302
1318
|
props: {
|
|
1303
1319
|
/**
|
|
1304
1320
|
* Defines a string value that labels an interactive element.
|
|
@@ -1354,8 +1370,8 @@ const es = /* @__PURE__ */ q(Xt, [["render", Qt], ["__scopeId", "data-v-fd1a6cbe
|
|
|
1354
1370
|
*/
|
|
1355
1371
|
lazyLoadType: {
|
|
1356
1372
|
type: String,
|
|
1357
|
-
default:
|
|
1358
|
-
validator: (e) => Object.values(
|
|
1373
|
+
default: ne.NONE,
|
|
1374
|
+
validator: (e) => Object.values(ne).includes(e)
|
|
1359
1375
|
},
|
|
1360
1376
|
/**
|
|
1361
1377
|
* Indicates the listbox is loading filtered items.
|
|
@@ -1379,7 +1395,7 @@ const es = /* @__PURE__ */ q(Xt, [["render", Qt], ["__scopeId", "data-v-fd1a6cbe
|
|
|
1379
1395
|
*
|
|
1380
1396
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
1381
1397
|
*/
|
|
1382
|
-
searching:
|
|
1398
|
+
searching: xe.props.searching,
|
|
1383
1399
|
/**
|
|
1384
1400
|
* The `input` value.
|
|
1385
1401
|
* Providing an empty string or empty array will select no options.
|
|
@@ -1407,109 +1423,109 @@ const es = /* @__PURE__ */ q(Xt, [["render", Qt], ["__scopeId", "data-v-fd1a6cbe
|
|
|
1407
1423
|
g.TAB
|
|
1408
1424
|
],
|
|
1409
1425
|
setup(e, { emit: t, slots: i }) {
|
|
1410
|
-
const s =
|
|
1411
|
-
var
|
|
1412
|
-
return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((
|
|
1426
|
+
const s = k([]), r = fe(e, "items"), { t: o } = Ie({ messages: Ge }), n = m(() => e.lazyLoadType !== ne.AUTOMATIC), p = m(() => e.lazyLoadType === ne.AUTOMATIC), y = () => {
|
|
1427
|
+
var M;
|
|
1428
|
+
return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((M = e == null ? void 0 : e.virtualScroll) != null && M.itemHeight) ? e.virtualScroll.itemHeight : cs;
|
|
1413
1429
|
}, {
|
|
1414
|
-
containerRef:
|
|
1430
|
+
containerRef: a,
|
|
1415
1431
|
containerProps: u,
|
|
1416
1432
|
onScroll: l,
|
|
1417
1433
|
list: f,
|
|
1418
1434
|
wrapperProps: E
|
|
1419
|
-
} =
|
|
1420
|
-
itemHeight:
|
|
1435
|
+
} = Ot(r, {
|
|
1436
|
+
itemHeight: y(),
|
|
1421
1437
|
// Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
|
|
1422
1438
|
disabled: (e == null ? void 0 : e.multiple) || (e == null ? void 0 : e.virtualScroll) === !1 || (e == null ? void 0 : e.lazyLoadType) !== "none"
|
|
1423
1439
|
}), T = m(
|
|
1424
|
-
() => e.componentLoading !== void 0 ||
|
|
1425
|
-
),
|
|
1426
|
-
() =>
|
|
1427
|
-
),
|
|
1428
|
-
() =>
|
|
1429
|
-
),
|
|
1440
|
+
() => e.componentLoading !== void 0 || n.value ? "true" : void 0
|
|
1441
|
+
), $ = m(
|
|
1442
|
+
() => n.value && e.loading || e.componentLoading ? "true" : "false"
|
|
1443
|
+
), P = m(
|
|
1444
|
+
() => n.value || e.componentLoading !== void 0 ? "polite" : void 0
|
|
1445
|
+
), D = m(
|
|
1430
1446
|
() => ({
|
|
1431
1447
|
"aria-label": e.ariaLabel,
|
|
1432
|
-
"aria-busy":
|
|
1448
|
+
"aria-busy": $.value,
|
|
1433
1449
|
"aria-atomic": T.value,
|
|
1434
|
-
"aria-live":
|
|
1450
|
+
"aria-live": P.value
|
|
1435
1451
|
})
|
|
1436
|
-
),
|
|
1452
|
+
), B = m(
|
|
1437
1453
|
() => e.componentLoading ? {
|
|
1438
|
-
...
|
|
1454
|
+
...D.value,
|
|
1439
1455
|
role: "alert"
|
|
1440
1456
|
} : {}
|
|
1441
|
-
),
|
|
1442
|
-
t(
|
|
1443
|
-
},
|
|
1457
|
+
), I = (M) => (ie) => {
|
|
1458
|
+
t(M, ie);
|
|
1459
|
+
}, S = () => {
|
|
1444
1460
|
t(g.SHOW_MORE);
|
|
1445
|
-
}, _ =
|
|
1446
|
-
const
|
|
1447
|
-
if (!
|
|
1461
|
+
}, _ = ft(() => {
|
|
1462
|
+
const M = a.value;
|
|
1463
|
+
if (!M)
|
|
1448
1464
|
return;
|
|
1449
|
-
const
|
|
1450
|
-
e.hasMoreItems &&
|
|
1451
|
-
}),
|
|
1465
|
+
const ie = Math.round(M.scrollTop) + M.clientHeight >= M.scrollHeight;
|
|
1466
|
+
e.hasMoreItems && ie && !e.loading && S();
|
|
1467
|
+
}), w = () => {
|
|
1452
1468
|
p.value ? _() : l();
|
|
1453
|
-
},
|
|
1454
|
-
var
|
|
1455
|
-
return ((
|
|
1456
|
-
}),
|
|
1457
|
-
() => e.lazyLoadType ===
|
|
1458
|
-
),
|
|
1459
|
-
() => e.loading ?
|
|
1460
|
-
),
|
|
1469
|
+
}, Q = m(() => {
|
|
1470
|
+
var M;
|
|
1471
|
+
return ((M = e.items) == null ? void 0 : M.length) === 0;
|
|
1472
|
+
}), N = m(
|
|
1473
|
+
() => e.lazyLoadType === ne.BUTTON && e.hasMoreItems
|
|
1474
|
+
), U = m(
|
|
1475
|
+
() => e.loading ? Pe.LOADING : Pe.START
|
|
1476
|
+
), W = m(() => e.loading ? o("loading") : o("showMore")), oe = m(() => ({
|
|
1461
1477
|
...e.emptyState,
|
|
1462
1478
|
variant: "condensed"
|
|
1463
1479
|
})), Oe = {
|
|
1464
|
-
[g.SELECT]:
|
|
1465
|
-
[g.SPACE]:
|
|
1466
|
-
[g.TAB]:
|
|
1467
|
-
[g.ENTER]:
|
|
1480
|
+
[g.SELECT]: I(g.SELECT),
|
|
1481
|
+
[g.SPACE]: I(g.SPACE),
|
|
1482
|
+
[g.TAB]: I(g.TAB),
|
|
1483
|
+
[g.ENTER]: I(g.ENTER)
|
|
1468
1484
|
};
|
|
1469
1485
|
return {
|
|
1470
1486
|
// Refs
|
|
1471
|
-
listboxRef:
|
|
1487
|
+
listboxRef: a,
|
|
1472
1488
|
listboxItemRef: s,
|
|
1473
1489
|
// a11y
|
|
1474
|
-
ariaAttributes:
|
|
1475
|
-
listboxContainerAttributes:
|
|
1490
|
+
ariaAttributes: D,
|
|
1491
|
+
listboxContainerAttributes: B,
|
|
1476
1492
|
// Values
|
|
1477
1493
|
containerProps: u,
|
|
1478
|
-
isSearchResultEmpty:
|
|
1479
|
-
limitedEmptyStateProps:
|
|
1480
|
-
loadingButtonState:
|
|
1494
|
+
isSearchResultEmpty: Q,
|
|
1495
|
+
limitedEmptyStateProps: oe,
|
|
1496
|
+
loadingButtonState: U,
|
|
1481
1497
|
slots: i,
|
|
1482
|
-
shouldDisplayShowMoreButton:
|
|
1483
|
-
showMoreButtonText:
|
|
1498
|
+
shouldDisplayShowMoreButton: N,
|
|
1499
|
+
showMoreButtonText: W,
|
|
1484
1500
|
virtualisedItems: f,
|
|
1485
1501
|
wrapperProps: E,
|
|
1486
1502
|
// Enums
|
|
1487
|
-
BentoKeyboardNavigationKeyDownEvent:
|
|
1503
|
+
BentoKeyboardNavigationKeyDownEvent: F,
|
|
1488
1504
|
BentoListboxEvent: g,
|
|
1489
1505
|
// Methods
|
|
1490
|
-
onListboxContainerScroll:
|
|
1491
|
-
onOptionSelected:
|
|
1492
|
-
emitShowMore:
|
|
1506
|
+
onListboxContainerScroll: w,
|
|
1507
|
+
onOptionSelected: I,
|
|
1508
|
+
emitShowMore: S,
|
|
1493
1509
|
listboxListeners: Oe
|
|
1494
1510
|
};
|
|
1495
1511
|
}
|
|
1496
|
-
}),
|
|
1512
|
+
}), us = ["id"], bs = {
|
|
1497
1513
|
key: 0,
|
|
1498
1514
|
class: "b-listbox__loading-filtered-items"
|
|
1499
|
-
},
|
|
1515
|
+
}, ms = {
|
|
1500
1516
|
key: 1,
|
|
1501
1517
|
class: "b-listbox__empty-search-message"
|
|
1502
|
-
},
|
|
1518
|
+
}, vs = {
|
|
1503
1519
|
key: 2,
|
|
1504
1520
|
class: "b-listbox__lazy-load"
|
|
1505
|
-
},
|
|
1521
|
+
}, fs = {
|
|
1506
1522
|
key: 3,
|
|
1507
1523
|
class: "b-listbox__lazy-load"
|
|
1508
1524
|
};
|
|
1509
|
-
function
|
|
1525
|
+
function ps(e, t, i, s, r, o) {
|
|
1510
1526
|
var E;
|
|
1511
|
-
const
|
|
1512
|
-
return
|
|
1527
|
+
const n = L("bento-loading-indicator"), p = L("bento-empty-state"), y = L("bento-typography"), a = L("bento-listbox-multi-select"), u = L("bento-listbox-single-select"), l = L("bento-loading-button"), f = Ue("bento-keyboard-navigation-directive");
|
|
1528
|
+
return ce((v(), O("div", Y({
|
|
1513
1529
|
id: e.id,
|
|
1514
1530
|
ref: "listboxRef",
|
|
1515
1531
|
class: "b-listbox",
|
|
@@ -1519,21 +1535,21 @@ function vs(e, t, i, s, n, o) {
|
|
|
1519
1535
|
"data-testid": "listbox-container",
|
|
1520
1536
|
onScroll: t[0] || (t[0] = (...T) => e.onListboxContainerScroll && e.onListboxContainerScroll(...T))
|
|
1521
1537
|
}), [
|
|
1522
|
-
|
|
1523
|
-
e.componentLoading ? (v(), O("div",
|
|
1524
|
-
|
|
1525
|
-
])) : e.isSearchResultEmpty ? (v(), O("div",
|
|
1526
|
-
e.emptyState ? (v(),
|
|
1538
|
+
z("div", ae(ve(e.wrapperProps)), [
|
|
1539
|
+
e.componentLoading ? (v(), O("div", bs, [
|
|
1540
|
+
G(n)
|
|
1541
|
+
])) : e.isSearchResultEmpty ? (v(), O("div", ms, [
|
|
1542
|
+
e.emptyState ? (v(), R(p, ae(Y({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (v(), R(y, {
|
|
1527
1543
|
key: 1,
|
|
1528
1544
|
el: "span"
|
|
1529
1545
|
}, {
|
|
1530
1546
|
default: A(() => [
|
|
1531
|
-
|
|
1547
|
+
K(V(e.noResultsMessage), 1)
|
|
1532
1548
|
]),
|
|
1533
1549
|
_: 1
|
|
1534
1550
|
}))
|
|
1535
|
-
])) : (v(), O(
|
|
1536
|
-
e.multiple ? (v(),
|
|
1551
|
+
])) : (v(), O(le, { key: 2 }, [
|
|
1552
|
+
e.multiple ? (v(), R(a, Y({
|
|
1537
1553
|
key: 0,
|
|
1538
1554
|
ref: "listboxItemRef",
|
|
1539
1555
|
"has-more-items": e.hasMoreItems
|
|
@@ -1544,14 +1560,14 @@ function vs(e, t, i, s, n, o) {
|
|
|
1544
1560
|
"selected-values": e.selectedValue,
|
|
1545
1561
|
searching: e.searching,
|
|
1546
1562
|
"is-option-disabled": e.isOptionDisabled
|
|
1547
|
-
},
|
|
1548
|
-
|
|
1549
|
-
name:
|
|
1550
|
-
fn: A((
|
|
1551
|
-
|
|
1563
|
+
}, se(e.listboxListeners)), pe({ _: 2 }, [
|
|
1564
|
+
q(e.slots, (T, $) => ({
|
|
1565
|
+
name: $,
|
|
1566
|
+
fn: A((P) => [
|
|
1567
|
+
j(e.$slots, $, ae(ve(P)), void 0, !0)
|
|
1552
1568
|
])
|
|
1553
1569
|
}))
|
|
1554
|
-
]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (v(),
|
|
1570
|
+
]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (v(), R(u, Y({
|
|
1555
1571
|
key: 1,
|
|
1556
1572
|
ref: "listboxItemRef",
|
|
1557
1573
|
items: e.virtualisedItems
|
|
@@ -1559,35 +1575,35 @@ function vs(e, t, i, s, n, o) {
|
|
|
1559
1575
|
"selected-value": e.selectedValue,
|
|
1560
1576
|
"static-categories": e.staticCategories,
|
|
1561
1577
|
"is-option-disabled": e.isOptionDisabled
|
|
1562
|
-
},
|
|
1563
|
-
|
|
1564
|
-
name:
|
|
1565
|
-
fn: A((
|
|
1566
|
-
|
|
1578
|
+
}, se(e.listboxListeners)), pe({ _: 2 }, [
|
|
1579
|
+
q(e.slots, (T, $) => ({
|
|
1580
|
+
name: $,
|
|
1581
|
+
fn: A((P) => [
|
|
1582
|
+
j(e.$slots, $, ae(ve(P)), void 0, !0)
|
|
1567
1583
|
])
|
|
1568
1584
|
}))
|
|
1569
1585
|
]), 1040, ["items", "selected-value", "static-categories", "is-option-disabled"])),
|
|
1570
|
-
e.shouldDisplayShowMoreButton ? (v(), O("div",
|
|
1571
|
-
|
|
1586
|
+
e.shouldDisplayShowMoreButton ? (v(), O("div", vs, [
|
|
1587
|
+
G(l, {
|
|
1572
1588
|
state: e.loadingButtonState,
|
|
1573
1589
|
variant: "secondary",
|
|
1574
1590
|
onClickCapture: e.emitShowMore
|
|
1575
1591
|
}, {
|
|
1576
1592
|
default: A(() => [
|
|
1577
|
-
|
|
1593
|
+
K(V(e.showMoreButtonText), 1)
|
|
1578
1594
|
]),
|
|
1579
1595
|
_: 1
|
|
1580
1596
|
}, 8, ["state", "onClickCapture"])
|
|
1581
|
-
])) : e.loading ? (v(), O("div",
|
|
1582
|
-
|
|
1583
|
-
])) :
|
|
1597
|
+
])) : e.loading ? (v(), O("div", fs, [
|
|
1598
|
+
G(n)
|
|
1599
|
+
])) : J("", !0)
|
|
1584
1600
|
], 64))
|
|
1585
1601
|
], 16)
|
|
1586
|
-
], 16,
|
|
1602
|
+
], 16, us)), [
|
|
1587
1603
|
[f]
|
|
1588
1604
|
]);
|
|
1589
1605
|
}
|
|
1590
|
-
const
|
|
1606
|
+
const Ms = /* @__PURE__ */ H(ds, [["render", ps], ["__scopeId", "data-v-c9aaa0e3"]]), _e = (e, t) => {
|
|
1591
1607
|
for (const i of e) {
|
|
1592
1608
|
if (i.value === t)
|
|
1593
1609
|
return i;
|
|
@@ -1598,56 +1614,56 @@ const Rs = /* @__PURE__ */ q(rs, [["render", vs], ["__scopeId", "data-v-c9aaa0e3
|
|
|
1598
1614
|
}
|
|
1599
1615
|
}
|
|
1600
1616
|
return null;
|
|
1601
|
-
},
|
|
1602
|
-
const
|
|
1617
|
+
}, gs = (e) => typeof e == "object" && e !== null && "value" in e && "label" in e, xs = (e, t, i, s) => {
|
|
1618
|
+
const r = k([]), o = k(), n = (u) => {
|
|
1603
1619
|
i.value ? o.value = u.map(({ value: l }) => l) : o.value = u.length > 0 ? u[0].value : null;
|
|
1604
1620
|
}, p = (u) => {
|
|
1605
1621
|
i.value ? o.value = u.map(({ value: l, label: f }) => ({ value: l, label: f })) : o.value = u.length > 0 ? { value: u[0].value, label: u[0].label } : null;
|
|
1606
|
-
},
|
|
1607
|
-
|
|
1608
|
-
},
|
|
1609
|
-
|
|
1622
|
+
}, y = (u) => {
|
|
1623
|
+
r.value = u, s != null && s.value ? p(u) : n(u);
|
|
1624
|
+
}, a = () => {
|
|
1625
|
+
r.value = [], o.value = null;
|
|
1610
1626
|
};
|
|
1611
|
-
return
|
|
1627
|
+
return ye(
|
|
1612
1628
|
() => t.value,
|
|
1613
1629
|
() => {
|
|
1614
1630
|
if (!t.value && t.value !== 0) {
|
|
1615
|
-
|
|
1631
|
+
a();
|
|
1616
1632
|
return;
|
|
1617
1633
|
}
|
|
1618
|
-
const u = !Array.isArray(t.value), l = [...
|
|
1619
|
-
|
|
1634
|
+
const u = !Array.isArray(t.value), l = [...r.value];
|
|
1635
|
+
a();
|
|
1620
1636
|
const f = (E) => {
|
|
1621
|
-
if (
|
|
1622
|
-
|
|
1637
|
+
if (gs(E))
|
|
1638
|
+
r.value.push(E);
|
|
1623
1639
|
else {
|
|
1624
1640
|
let T = _e(e.value, E);
|
|
1625
|
-
T || (T = _e(l, E)), T || (T = { value: E, label: E.toString() }),
|
|
1641
|
+
T || (T = _e(l, E)), T || (T = { value: E, label: E.toString() }), r.value.push(T);
|
|
1626
1642
|
}
|
|
1627
1643
|
};
|
|
1628
1644
|
if (u) {
|
|
1629
1645
|
const E = t.value;
|
|
1630
|
-
f(E), s != null && s.value ? p(
|
|
1646
|
+
f(E), s != null && s.value ? p(r.value) : n(r.value);
|
|
1631
1647
|
return;
|
|
1632
1648
|
}
|
|
1633
|
-
t.value.forEach(f), s != null && s.value ? p(
|
|
1649
|
+
t.value.forEach(f), s != null && s.value ? p(r.value) : n(r.value);
|
|
1634
1650
|
},
|
|
1635
1651
|
{ immediate: !0 }
|
|
1636
1652
|
), {
|
|
1637
1653
|
// Values
|
|
1638
|
-
cachedSelectedListboxOptions:
|
|
1654
|
+
cachedSelectedListboxOptions: r,
|
|
1639
1655
|
cachedListboxSelectedValues: o,
|
|
1640
1656
|
// Methods
|
|
1641
|
-
resetCache:
|
|
1642
|
-
setCachedValues:
|
|
1657
|
+
resetCache: a,
|
|
1658
|
+
setCachedValues: y
|
|
1643
1659
|
};
|
|
1644
1660
|
};
|
|
1645
1661
|
export {
|
|
1646
|
-
|
|
1662
|
+
ne as B,
|
|
1647
1663
|
g as a,
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1664
|
+
Ms as b,
|
|
1665
|
+
xs as c,
|
|
1666
|
+
Fe as d,
|
|
1667
|
+
ls as u
|
|
1652
1668
|
};
|
|
1653
|
-
//# sourceMappingURL=use-cached-selected-values.
|
|
1669
|
+
//# sourceMappingURL=use-cached-selected-values.Dyoz6cUK.js.map
|