@adyen/bento-vue2 1.65.0 → 1.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/index.d.ts +416 -234
- package/dist/action-bar.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions-with-menu.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/copy.css +1 -1
- package/dist/assets/data-grid-template.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/info-icon.css +1 -1
- package/dist/assets/input-field-password.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/pagination.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/assets/summary-grid.css +1 -1
- package/dist/assets/tab.css +1 -0
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.DHdrZtmW.js → action-bar.C8zeHAJG.js} +31 -31
- package/dist/chunks/action-bar.C8zeHAJG.js.map +1 -0
- package/dist/chunks/button-actions-with-menu.BVU1NS0m.js +83 -0
- package/dist/chunks/button-actions-with-menu.BVU1NS0m.js.map +1 -0
- package/dist/chunks/calendar.DvIQEYwN.js +2086 -0
- package/dist/chunks/calendar.DvIQEYwN.js.map +1 -0
- package/dist/chunks/{checkbox-group.DVX0GFm9.js → checkbox-group.BVMGnokj.js} +4 -4
- package/dist/chunks/{checkbox-group.DVX0GFm9.js.map → checkbox-group.BVMGnokj.js.map} +1 -1
- package/dist/chunks/{checkbox.nHrvoKfp.js → checkbox.Bg5FM5Oa.js} +2 -2
- package/dist/chunks/{checkbox.nHrvoKfp.js.map → checkbox.Bg5FM5Oa.js.map} +1 -1
- package/dist/chunks/{code-snippet.W8Zp0zQP.js → code-snippet.BcoVTIs2.js} +3 -3
- package/dist/chunks/{code-snippet.W8Zp0zQP.js.map → code-snippet.BcoVTIs2.js.map} +1 -1
- package/dist/chunks/{controls-group.BWAmz7Tg.js → controls-group.CccuLkgP.js} +2 -2
- package/dist/chunks/{controls-group.BWAmz7Tg.js.map → controls-group.CccuLkgP.js.map} +1 -1
- package/dist/chunks/copy.CF8Fzu2Y.js +96 -0
- package/dist/chunks/copy.CF8Fzu2Y.js.map +1 -0
- package/dist/chunks/{dashboard-section.Bz54Z6Hh.js → dashboard-section.CcEIwDqX.js} +3 -3
- package/dist/chunks/{dashboard-section.Bz54Z6Hh.js.map → dashboard-section.CcEIwDqX.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DtFRjaR8.js → data-grid-template.DJQcVuPs.js} +16 -14
- package/dist/chunks/data-grid-template.DJQcVuPs.js.map +1 -0
- package/dist/chunks/{data-grid.D4oeTUhn.js → data-grid.t4fCoE2Y.js} +10 -10
- package/dist/chunks/{data-grid.D4oeTUhn.js.map → data-grid.t4fCoE2Y.js.map} +1 -1
- package/dist/chunks/{date-picker.k0g6anfy.js → date-picker.DOAWsba5.js} +6 -7
- package/dist/chunks/{date-picker.k0g6anfy.js.map → date-picker.DOAWsba5.js.map} +1 -1
- package/dist/chunks/{date-range-picker.D9lyIoO-.js → date-range-picker.DYxZygbL.js} +22 -23
- package/dist/chunks/{date-range-picker.D9lyIoO-.js.map → date-range-picker.DYxZygbL.js.map} +1 -1
- package/dist/chunks/date.BfyWX2PY.js +160 -0
- package/dist/chunks/date.BfyWX2PY.js.map +1 -0
- package/dist/chunks/{dropdown-tag.DKhxBV52.js → dropdown-tag.DYg5l6HT.js} +2 -2
- package/dist/chunks/{dropdown-tag.DKhxBV52.js.map → dropdown-tag.DYg5l6HT.js.map} +1 -1
- package/dist/chunks/{dropdown.DV7uhHNP.js → dropdown.BWsU98dn.js} +265 -270
- package/dist/chunks/{dropdown.DV7uhHNP.js.map → dropdown.BWsU98dn.js.map} +1 -1
- package/dist/chunks/{error-message.1Em7Lis3.js → error-message.BgxnwPLF.js} +2 -2
- package/dist/chunks/{error-message.1Em7Lis3.js.map → error-message.BgxnwPLF.js.map} +1 -1
- package/dist/chunks/es6.n1ewaW31.js.map +1 -1
- package/dist/chunks/{file-uploader.DyjdNLOa.js → file-uploader.BPslxGI8.js} +323 -323
- package/dist/chunks/file-uploader.BPslxGI8.js.map +1 -0
- package/dist/chunks/{filter-bar.BxDEplt3.js → filter-bar.Bx3wivl8.js} +664 -649
- package/dist/chunks/{filter-bar.BxDEplt3.js.map → filter-bar.Bx3wivl8.js.map} +1 -1
- package/dist/chunks/{get-date-locale.BN8xEjY0.js → get-date-locale.CAyOIbcp.js} +288 -649
- package/dist/chunks/get-date-locale.CAyOIbcp.js.map +1 -0
- package/dist/chunks/{header-with-views.Ds9mcwmp.js → header-with-views.B6mwBJjk.js} +13 -13
- package/dist/chunks/{header-with-views.Ds9mcwmp.js.map → header-with-views.B6mwBJjk.js.map} +1 -1
- package/dist/chunks/{header.Cb644uAi.js → header.hTMmMN8n.js} +25 -24
- package/dist/chunks/{header.Cb644uAi.js.map → header.hTMmMN8n.js.map} +1 -1
- package/dist/chunks/index.BrH1t1iu.js +407 -0
- package/dist/chunks/index.BrH1t1iu.js.map +1 -0
- package/dist/chunks/info-icon.CYOXx8CL.js +37 -0
- package/dist/chunks/info-icon.CYOXx8CL.js.map +1 -0
- package/dist/chunks/input-field-password.B8qWGzaB.js +252 -0
- package/dist/chunks/input-field-password.B8qWGzaB.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.B3qzZKuP.js → input-field-phone-number.Bi4TJhbX.js} +3 -3
- package/dist/chunks/{input-field-phone-number.B3qzZKuP.js.map → input-field-phone-number.Bi4TJhbX.js.map} +1 -1
- package/dist/chunks/{input-field.B_3nZFYz.js → input-field.L5bWjTpB.js} +3 -3
- package/dist/chunks/{input-field.B_3nZFYz.js.map → input-field.L5bWjTpB.js.map} +1 -1
- package/dist/chunks/{pagination.Cl7SzoId.js → pagination.CW_1yX5C.js} +115 -115
- package/dist/chunks/pagination.CW_1yX5C.js.map +1 -0
- package/dist/chunks/{radio-group.CtPG_iiI.js → radio-group.4_KKjvAm.js} +3 -3
- package/dist/chunks/{radio-group.CtPG_iiI.js.map → radio-group.4_KKjvAm.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.CLxVaskq.js → rich-text-editor.BpaFd2-y.js} +3 -3
- package/dist/chunks/{rich-text-editor.CLxVaskq.js.map → rich-text-editor.BpaFd2-y.js.map} +1 -1
- package/dist/chunks/{search-bar.CadVBoj0.js → search-bar.5JHI6li0.js} +3 -3
- package/dist/chunks/{search-bar.CadVBoj0.js.map → search-bar.5JHI6li0.js.map} +1 -1
- package/dist/chunks/{secondary-nav.OwimHNCb.js → secondary-nav.D4hrWvf7.js} +2 -2
- package/dist/chunks/{secondary-nav.OwimHNCb.js.map → secondary-nav.D4hrWvf7.js.map} +1 -1
- package/dist/chunks/{selection-card-group.CoqBRUT8.js → selection-card-group.0o5T4tab.js} +3 -3
- package/dist/chunks/{selection-card-group.CoqBRUT8.js.map → selection-card-group.0o5T4tab.js.map} +1 -1
- package/dist/chunks/step.DMMofD4B.js +217 -0
- package/dist/chunks/step.DMMofD4B.js.map +1 -0
- package/dist/chunks/{structured-list-item.tox2Kcb6.js → structured-list-item.Bnn6-Z3q.js} +3 -3
- package/dist/chunks/{structured-list-item.tox2Kcb6.js.map → structured-list-item.Bnn6-Z3q.js.map} +1 -1
- package/dist/chunks/summary-grid.types.Cwri2Y3T.js +337 -0
- package/dist/chunks/summary-grid.types.Cwri2Y3T.js.map +1 -0
- package/dist/chunks/tab.BhWPBxcB.js +192 -0
- package/dist/chunks/tab.BhWPBxcB.js.map +1 -0
- package/dist/chunks/{tabs.keys.Bc2pSKRw.js → tabs.keys.Cb4Vw5Jh.js} +3 -3
- package/dist/chunks/{tabs.keys.Bc2pSKRw.js.map → tabs.keys.Cb4Vw5Jh.js.map} +1 -1
- package/dist/chunks/{textarea.BPeDUAPL.js → textarea.RAU710Uw.js} +83 -80
- package/dist/chunks/textarea.RAU710Uw.js.map +1 -0
- package/dist/chunks/{timeline-item.CS9ZDOsm.js → timeline-item.DK2d00rt.js} +10 -11
- package/dist/chunks/timeline-item.DK2d00rt.js.map +1 -0
- package/dist/chunks/{use-cached-selected-values.DNOmzQVy.js → use-cached-selected-values.CusB5KBl.js} +568 -528
- package/dist/chunks/use-cached-selected-values.CusB5KBl.js.map +1 -0
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/data-grid-template.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.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +34 -34
- package/dist/info-icon.js +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 +6 -6
- package/dist/pagination.js +1 -1
- package/dist/radio-group.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/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +1 -0
- package/dist/styles/bento-light.css +1 -0
- package/dist/styles/bento.css +1 -0
- package/dist/styles/legacy.css +1 -0
- package/dist/styles/styleguide.css +1 -0
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/web-types.json +197 -79
- package/package.json +5 -5
- package/dist/assets/tabs.css +0 -1
- package/dist/chunks/action-bar.DHdrZtmW.js.map +0 -1
- package/dist/chunks/button-actions-with-menu.CYkEoiee.js +0 -166
- package/dist/chunks/button-actions-with-menu.CYkEoiee.js.map +0 -1
- package/dist/chunks/calendar.DbTC35rM.js +0 -1167
- package/dist/chunks/calendar.DbTC35rM.js.map +0 -1
- package/dist/chunks/copy.CXeLbvUP.js +0 -129
- package/dist/chunks/copy.CXeLbvUP.js.map +0 -1
- package/dist/chunks/data-grid-template.DtFRjaR8.js.map +0 -1
- package/dist/chunks/date.dYFFEunA.js +0 -987
- package/dist/chunks/date.dYFFEunA.js.map +0 -1
- package/dist/chunks/file-uploader.DyjdNLOa.js.map +0 -1
- package/dist/chunks/get-date-locale.BN8xEjY0.js.map +0 -1
- package/dist/chunks/index.BDuTpjD8.js +0 -40
- package/dist/chunks/index.BDuTpjD8.js.map +0 -1
- package/dist/chunks/index.DD7TppDb.js +0 -10
- package/dist/chunks/index.DD7TppDb.js.map +0 -1
- package/dist/chunks/info-icon.B9aTl1nU.js +0 -41
- package/dist/chunks/info-icon.B9aTl1nU.js.map +0 -1
- package/dist/chunks/input-field-password.Bloa-rqx.js +0 -252
- package/dist/chunks/input-field-password.Bloa-rqx.js.map +0 -1
- package/dist/chunks/pagination.Cl7SzoId.js.map +0 -1
- package/dist/chunks/step.dNTg2rtW.js +0 -217
- package/dist/chunks/step.dNTg2rtW.js.map +0 -1
- package/dist/chunks/summary-grid.types.CkUIw703.js +0 -301
- package/dist/chunks/summary-grid.types.CkUIw703.js.map +0 -1
- package/dist/chunks/tabs.Dx6teJGW.js +0 -205
- package/dist/chunks/tabs.Dx6teJGW.js.map +0 -1
- package/dist/chunks/textarea.BPeDUAPL.js.map +0 -1
- package/dist/chunks/timeline-item.CS9ZDOsm.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.DNOmzQVy.js.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { d as
|
|
3
|
-
import { a as V, b as
|
|
1
|
+
import { ref as S, watch as be, computed as d, defineComponent as N, useSlots as ye, toRefs as _e, nextTick as h, useAttrs as Te, toRef as w, inject as Ne } from "vue";
|
|
2
|
+
import { d as pe, B as Ae } from "./typography.J1v_SPG3.js";
|
|
3
|
+
import { a as V, b as $, c as Re, B as P, D as Me } from "./dropdown-default-textbox.BNuuA4ES.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { n as
|
|
5
|
+
import { n as F } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
6
|
import { s as J } from "./events.CMzGybJJ.js";
|
|
7
|
-
import { g as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import {
|
|
13
|
-
import { B as
|
|
14
|
-
import { B as
|
|
15
|
-
import { F as
|
|
16
|
-
import { P as
|
|
17
|
-
import { B as
|
|
7
|
+
import { g as k } from "./generate-uid.NJ8tVoha.js";
|
|
8
|
+
import { u as $e } from "./aria-label.CaUURpnB.js";
|
|
9
|
+
import { u as Q } from "./i18n.BQkEbtPM.js";
|
|
10
|
+
import { a as p, b as Y, B as Z, c as Pe, u as ke, d as Fe } from "./use-cached-selected-values.CusB5KBl.js";
|
|
11
|
+
import { u as Ke } from "./use-form-layout-loading.D3lALhtC.js";
|
|
12
|
+
import { u as ze } from "./use-has-slot.C9lQZ6nz.js";
|
|
13
|
+
import { B as E, a as je } from "./keyboard-navigation.pB8weElW.js";
|
|
14
|
+
import { B as We } from "./directive.Cbdox5VL.js";
|
|
15
|
+
import { F as Ue, E as qe } from "./error-message.BgxnwPLF.js";
|
|
16
|
+
import { P as fe } from "./popper-container.DIFqmRsp.js";
|
|
17
|
+
import { B as He } from "./popover.B05xkQ4e.js";
|
|
18
18
|
import "../assets/dropdown.css";
|
|
19
|
-
const
|
|
19
|
+
const Ve = {
|
|
20
20
|
"en-US": {
|
|
21
21
|
apply: "Apply",
|
|
22
22
|
cancel: "Cancel",
|
|
@@ -30,47 +30,47 @@ const We = {
|
|
|
30
30
|
apply: "Aplicar",
|
|
31
31
|
cancel: "Cancelar"
|
|
32
32
|
}
|
|
33
|
-
},
|
|
34
|
-
const a =
|
|
35
|
-
|
|
33
|
+
}, Je = (n, t, o, e) => {
|
|
34
|
+
const a = S(n.value), { t: l } = Q();
|
|
35
|
+
be(n, () => {
|
|
36
36
|
a.value = n.value;
|
|
37
37
|
});
|
|
38
|
-
const
|
|
38
|
+
const s = d(
|
|
39
39
|
() => JSON.stringify(a.value) === JSON.stringify(n.value)
|
|
40
40
|
), i = () => {
|
|
41
41
|
e(p.SELECT, a.value), e(p.CLOSE_DROPDOWN);
|
|
42
|
-
},
|
|
42
|
+
}, c = () => {
|
|
43
43
|
a.value = n.value, e(p.CLOSE_DROPDOWN);
|
|
44
|
-
},
|
|
44
|
+
}, b = () => {
|
|
45
45
|
o.value && t.value && (a.value = n.value);
|
|
46
|
-
}, r =
|
|
46
|
+
}, r = d(() => [
|
|
47
47
|
{
|
|
48
|
-
title:
|
|
48
|
+
title: l("apply"),
|
|
49
49
|
event: i,
|
|
50
|
-
disabled:
|
|
50
|
+
disabled: s.value
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
title:
|
|
54
|
-
event:
|
|
53
|
+
title: l("cancel"),
|
|
54
|
+
event: c
|
|
55
55
|
}
|
|
56
|
-
]),
|
|
57
|
-
a.value =
|
|
58
|
-
}, _ = (
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
|
|
56
|
+
]), u = (y) => {
|
|
57
|
+
a.value = y, t.value || e(p.SELECT, y);
|
|
58
|
+
}, _ = (y) => {
|
|
59
|
+
u(y), e(p.TAB);
|
|
60
|
+
}, g = (y) => {
|
|
61
|
+
u(y), e(p.ENTER);
|
|
62
|
+
}, f = (y) => {
|
|
63
|
+
u(y), e(p.SPACE);
|
|
64
64
|
}, O = () => {
|
|
65
|
-
|
|
65
|
+
c(), e(p.ESCAPE);
|
|
66
66
|
}, L = () => {
|
|
67
67
|
e(p.SHOW_MORE);
|
|
68
68
|
}, x = {
|
|
69
|
-
[p.SELECT]:
|
|
69
|
+
[p.SELECT]: u,
|
|
70
70
|
[p.SHOW_MORE]: L,
|
|
71
71
|
[p.TAB]: _,
|
|
72
|
-
[p.SPACE]:
|
|
73
|
-
[p.ENTER]:
|
|
72
|
+
[p.SPACE]: f,
|
|
73
|
+
[p.ENTER]: g
|
|
74
74
|
};
|
|
75
75
|
return {
|
|
76
76
|
// Values
|
|
@@ -79,13 +79,13 @@ const We = {
|
|
|
79
79
|
// Methods
|
|
80
80
|
listeners: x,
|
|
81
81
|
onEscapeKey: O,
|
|
82
|
-
onOutsideDropdownClick:
|
|
82
|
+
onOutsideDropdownClick: b
|
|
83
83
|
};
|
|
84
|
-
},
|
|
85
|
-
i18n: { messages:
|
|
84
|
+
}, Ye = N({
|
|
85
|
+
i18n: { messages: Ve },
|
|
86
86
|
name: "bento-dropdown-options-container"
|
|
87
|
-
}),
|
|
88
|
-
...
|
|
87
|
+
}), Ze = /* @__PURE__ */ N({
|
|
88
|
+
...Ye,
|
|
89
89
|
props: {
|
|
90
90
|
/**
|
|
91
91
|
* Defines a string value that labels an interactive element.
|
|
@@ -184,7 +184,7 @@ const We = {
|
|
|
184
184
|
* Reference to the DOM element or Vue component for positioning
|
|
185
185
|
* the Dropdown container.
|
|
186
186
|
*/
|
|
187
|
-
targetElement: { type:
|
|
187
|
+
targetElement: { type: fe.props.targetElement.type, required: !0 },
|
|
188
188
|
/**
|
|
189
189
|
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
190
190
|
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
@@ -196,28 +196,28 @@ const We = {
|
|
|
196
196
|
},
|
|
197
197
|
emits: [],
|
|
198
198
|
setup(n, { expose: t, emit: o }) {
|
|
199
|
-
const e = n, a =
|
|
199
|
+
const e = n, a = ye(), { selectedValue: l, multiple: s } = _e(e), i = S(null), { t: c } = Q(), b = d(() => e.open && !e.disabled), r = d(() => c("noOptionsMatchThisSearch")), u = d(() => ({
|
|
200
200
|
"b-dropdown-options-container--single": !(e != null && e.multiple)
|
|
201
|
-
})), _ =
|
|
201
|
+
})), _ = d(() => ({
|
|
202
202
|
"b-dropdown-options-container__listbox--single": !(e != null && e.multiple)
|
|
203
|
-
})), { actions:
|
|
204
|
-
var
|
|
205
|
-
const
|
|
206
|
-
"min-width": `${(
|
|
203
|
+
})), { actions: g, internalSelectedValue: f, listeners: O, onEscapeKey: L, onOutsideDropdownClick: x } = Je(l, s, b, o), y = d(() => e != null && e.multiple ? He : fe), B = d(() => {
|
|
204
|
+
var I;
|
|
205
|
+
const D = {
|
|
206
|
+
"min-width": `${(I = e == null ? void 0 : e.targetElement) == null ? void 0 : I.clientWidth}px`,
|
|
207
207
|
"max-width": "min(500px, 95%)"
|
|
208
208
|
};
|
|
209
209
|
return e != null && e.multiple ? {
|
|
210
210
|
actionsLayout: "space-between",
|
|
211
211
|
ariaLabel: e.ariaLabel,
|
|
212
|
-
actions:
|
|
212
|
+
actions: g.value,
|
|
213
213
|
divider: !0,
|
|
214
214
|
fallbackPosition: ["top-start"],
|
|
215
|
-
id:
|
|
215
|
+
id: k(`dropdown-options-${e.id}`),
|
|
216
216
|
open: e.open,
|
|
217
217
|
position: "bottom-start",
|
|
218
218
|
style: {
|
|
219
219
|
width: "auto",
|
|
220
|
-
...
|
|
220
|
+
...D
|
|
221
221
|
},
|
|
222
222
|
targetElement: e.targetElement
|
|
223
223
|
} : {
|
|
@@ -225,75 +225,75 @@ const We = {
|
|
|
225
225
|
offset: [0, 8],
|
|
226
226
|
position: "bottom-start",
|
|
227
227
|
style: {
|
|
228
|
-
display:
|
|
229
|
-
...
|
|
228
|
+
display: b.value ? "block" : "none",
|
|
229
|
+
...D
|
|
230
230
|
},
|
|
231
231
|
targetElement: e.targetElement
|
|
232
232
|
};
|
|
233
233
|
});
|
|
234
234
|
return t({
|
|
235
235
|
onOutsideDropdownClick: x
|
|
236
|
-
}), { __sfc: !0, slots: a, emit: o, props: e, selectedValue:
|
|
236
|
+
}), { __sfc: !0, slots: a, emit: o, props: e, selectedValue: l, multiple: s, dropdownOptionsListboxRef: i, t: c, isDropdownOpen: b, noResultsMessage: r, conditionalClasses: u, conditionalListboxClasses: _, actions: g, internalSelectedValue: f, listeners: O, onEscapeKey: L, onOutsideDropdownClick: x, popperContainerOrPopoverComponent: y, popperContainerOrPopoverProps: B, BentoListbox: Y };
|
|
237
237
|
}
|
|
238
238
|
});
|
|
239
|
-
var
|
|
239
|
+
var Qe = function() {
|
|
240
240
|
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
241
241
|
return o(e.popperContainerOrPopoverComponent, t._b({ tag: "component", staticClass: "b-dropdown-options-container", class: e.conditionalClasses }, "component", e.popperContainerOrPopoverProps, !1), [o("div", { on: { keydown: function(a) {
|
|
242
242
|
return !a.type.indexOf("key") && t._k(a.keyCode, "esc", 27, a.key, ["Esc", "Escape"]) ? null : e.onEscapeKey.apply(null, arguments);
|
|
243
|
-
} } }, [o(e.BentoListbox, t._g({ ref: "dropdownOptionsListboxRef", staticClass: "b-dropdown-options-container__listbox", class: e.conditionalListboxClasses, attrs: { id: t.id, "aria-label": t.ariaLabel, "component-loading": t.componentLoading, "empty-state": t.emptyState, "is-option-disabled": t.isOptionDisabled, items: t.items, "selected-value": e.internalSelectedValue, multiple: e.multiple, "static-categories": t.staticCategories, "no-results-message": e.noResultsMessage, searching: t.searching, loading: t.loading, "lazy-load-type": t.lazyLoadType, "has-more-items": t.hasMoreItems, "virtual-scroll": t.virtualScroll }, scopedSlots: t._u([t._l(e.slots, function(a,
|
|
244
|
-
return { key:
|
|
245
|
-
return [t._t(
|
|
243
|
+
} } }, [o(e.BentoListbox, t._g({ ref: "dropdownOptionsListboxRef", staticClass: "b-dropdown-options-container__listbox", class: e.conditionalListboxClasses, attrs: { id: t.id, "aria-label": t.ariaLabel, "component-loading": t.componentLoading, "empty-state": t.emptyState, "is-option-disabled": t.isOptionDisabled, items: t.items, "selected-value": e.internalSelectedValue, multiple: e.multiple, "static-categories": t.staticCategories, "no-results-message": e.noResultsMessage, searching: t.searching, loading: t.loading, "lazy-load-type": t.lazyLoadType, "has-more-items": t.hasMoreItems, "virtual-scroll": t.virtualScroll }, scopedSlots: t._u([t._l(e.slots, function(a, l) {
|
|
244
|
+
return { key: l, fn: function(s) {
|
|
245
|
+
return [t._t(l, null, null, s)];
|
|
246
246
|
} };
|
|
247
247
|
})], null, !0) }, e.listeners))], 1)]);
|
|
248
|
-
},
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
248
|
+
}, Xe = [], Ge = /* @__PURE__ */ F(
|
|
249
|
+
Ze,
|
|
250
|
+
Qe,
|
|
251
|
+
Xe,
|
|
252
252
|
!1,
|
|
253
253
|
null,
|
|
254
254
|
"d774d15c"
|
|
255
255
|
);
|
|
256
|
-
const
|
|
257
|
-
let
|
|
258
|
-
const
|
|
256
|
+
const et = Ge.exports;
|
|
257
|
+
let ve = 0;
|
|
258
|
+
const tt = {
|
|
259
259
|
beforeCreate() {
|
|
260
|
-
this.uuid =
|
|
260
|
+
this.uuid = ve.toString(), ve += 1;
|
|
261
261
|
}
|
|
262
262
|
};
|
|
263
|
-
var
|
|
263
|
+
var ot = function() {
|
|
264
264
|
var t = this, o = t._self._c;
|
|
265
265
|
return o("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? o("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), o("path", { attrs: { fill: "#001222", d: "M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z" } })]);
|
|
266
|
-
},
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
266
|
+
}, at = [], nt = /* @__PURE__ */ F(
|
|
267
|
+
tt,
|
|
268
|
+
ot,
|
|
269
|
+
at,
|
|
270
270
|
!1,
|
|
271
271
|
null,
|
|
272
272
|
null
|
|
273
273
|
);
|
|
274
|
-
const
|
|
275
|
-
let
|
|
276
|
-
const
|
|
274
|
+
const st = nt.exports;
|
|
275
|
+
let me = 0;
|
|
276
|
+
const lt = {
|
|
277
277
|
beforeCreate() {
|
|
278
|
-
this.uuid =
|
|
278
|
+
this.uuid = me.toString(), me += 1;
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
|
-
var
|
|
281
|
+
var it = function() {
|
|
282
282
|
var t = this, o = t._self._c;
|
|
283
283
|
return o("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? o("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), o("path", { attrs: { fill: "#001222", d: "M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z" } })]);
|
|
284
|
-
},
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
284
|
+
}, rt = [], dt = /* @__PURE__ */ F(
|
|
285
|
+
lt,
|
|
286
|
+
it,
|
|
287
|
+
rt,
|
|
288
288
|
!1,
|
|
289
289
|
null,
|
|
290
290
|
null
|
|
291
291
|
);
|
|
292
|
-
const
|
|
292
|
+
const ct = dt.exports, ut = N({
|
|
293
293
|
name: "dropdown-small-textbox",
|
|
294
294
|
inheritAttrs: !1
|
|
295
|
-
}),
|
|
296
|
-
...
|
|
295
|
+
}), pt = /* @__PURE__ */ N({
|
|
296
|
+
...ut,
|
|
297
297
|
props: {
|
|
298
298
|
/**
|
|
299
299
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -354,133 +354,133 @@ const st = lt.exports, it = A({
|
|
|
354
354
|
},
|
|
355
355
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
356
356
|
setup(n, { expose: t, emit: o }) {
|
|
357
|
-
const e = n, a =
|
|
357
|
+
const e = n, a = S(null), l = d(() => ({
|
|
358
358
|
[`b-dropdown-small-textbox--${V.DISABLED}`]: e.disabled,
|
|
359
359
|
[`b-dropdown-small-textbox--${V.READONLY}`]: e.readonly,
|
|
360
360
|
[`b-dropdown-small-textbox--${V.OPENED}`]: e.open
|
|
361
|
-
})),
|
|
362
|
-
o("input",
|
|
363
|
-
},
|
|
364
|
-
o("keydown",
|
|
365
|
-
},
|
|
366
|
-
J(
|
|
367
|
-
}, r = (
|
|
368
|
-
J(
|
|
369
|
-
},
|
|
370
|
-
J(
|
|
361
|
+
})), s = d(() => e.open && !e.disabled && !e.readonly), i = (f) => {
|
|
362
|
+
o("input", f);
|
|
363
|
+
}, c = (f) => {
|
|
364
|
+
o("keydown", f);
|
|
365
|
+
}, b = (f) => {
|
|
366
|
+
J(f), o("open");
|
|
367
|
+
}, r = (f) => {
|
|
368
|
+
J(f), o("close");
|
|
369
|
+
}, u = (f) => {
|
|
370
|
+
J(f), o("clear");
|
|
371
371
|
}, _ = {
|
|
372
|
-
[
|
|
373
|
-
[
|
|
374
|
-
[
|
|
375
|
-
[
|
|
376
|
-
[
|
|
377
|
-
},
|
|
372
|
+
[$.INPUT]: i,
|
|
373
|
+
[$.OPEN]: b,
|
|
374
|
+
[$.CLOSE]: r,
|
|
375
|
+
[$.CLEAR]: u,
|
|
376
|
+
[$.KEYDOWN]: c
|
|
377
|
+
}, g = () => {
|
|
378
378
|
a.value.focus();
|
|
379
379
|
};
|
|
380
380
|
return t({
|
|
381
|
-
focus:
|
|
382
|
-
}), { __sfc: !0, emit: o, props: e, baseTextbox: a, conditionalClasses:
|
|
381
|
+
focus: g
|
|
382
|
+
}), { __sfc: !0, emit: o, props: e, baseTextbox: a, conditionalClasses: l, isDropdownOpen: s, onInput: i, onKeyDown: c, openDropdown: b, closeDropdown: r, clearValue: u, listeners: _, focus: g, BentoDropdownSize: P, DropdownBaseTextbox: Re, ChevronDownSmallIcon: st, ChevronUpSmallIcon: ct };
|
|
383
383
|
}
|
|
384
384
|
});
|
|
385
|
-
var
|
|
385
|
+
var ft = function() {
|
|
386
386
|
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
387
387
|
return o("div", { staticClass: "b-dropdown-small-textbox", class: e.conditionalClasses }, [o(e.DropdownBaseTextbox, t._g(t._b({ ref: "baseTextbox", staticClass: "b-dropdown-small-textbox__textbox", attrs: { size: e.BentoDropdownSize.SMALL }, scopedSlots: t._u([{ key: "icon", fn: function() {
|
|
388
388
|
return [o("div", { staticClass: "b-dropdown-small-textbox__chevron" }, [o(e.ChevronUpSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: e.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), o(e.ChevronDownSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: !e.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
|
|
389
389
|
}, proxy: !0 }]) }, "dropdown-base-textbox", { ...t.$attrs, ...t.$props }, !1), e.listeners))], 1);
|
|
390
|
-
},
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
390
|
+
}, vt = [], mt = /* @__PURE__ */ F(
|
|
391
|
+
pt,
|
|
392
|
+
ft,
|
|
393
|
+
vt,
|
|
394
394
|
!1,
|
|
395
395
|
null,
|
|
396
396
|
"d0e53db8"
|
|
397
397
|
);
|
|
398
|
-
const
|
|
398
|
+
const bt = mt.exports, yt = (n, t) => t.value.reduce((o, e) => {
|
|
399
399
|
if (e.items) {
|
|
400
400
|
const a = e.items.filter(
|
|
401
|
-
(
|
|
401
|
+
(s) => n.value.find((i) => i.value === s.value)
|
|
402
402
|
);
|
|
403
|
-
a.length === e.items.length ? o.push(e.displayValue ?? e.label) : a.forEach(({ label:
|
|
403
|
+
a.length === e.items.length ? o.push(e.displayValue ?? e.label) : a.forEach(({ label: s, displayValue: i }) => o.push(i ?? s));
|
|
404
404
|
}
|
|
405
405
|
return n.value.find((a) => a.value === e.value) && o.push(e.displayValue ?? e.label), o;
|
|
406
|
-
}, []).join(", "),
|
|
407
|
-
const a =
|
|
408
|
-
() => e.value && n.value.find((
|
|
406
|
+
}, []).join(", "), _t = ({ items: n, placeholder: t, selectedValues: o, isMultiSelect: e }) => {
|
|
407
|
+
const a = d(
|
|
408
|
+
() => e.value && n.value.find((s) => {
|
|
409
409
|
var i;
|
|
410
|
-
return (i =
|
|
410
|
+
return (i = s.items) == null ? void 0 : i.length;
|
|
411
411
|
})
|
|
412
412
|
);
|
|
413
|
-
return
|
|
414
|
-
},
|
|
413
|
+
return d(() => o.value.length ? a.value ? yt(o, n) : o.value.map(({ label: s, displayValue: i }) => i ?? s).join(", ") : t.value || null);
|
|
414
|
+
}, ge = (n) => {
|
|
415
415
|
var t;
|
|
416
416
|
(t = n.value.$children) == null || t[0].$refs.textbox.focus();
|
|
417
|
-
},
|
|
417
|
+
}, gt = ({
|
|
418
418
|
inputContainerRef: n,
|
|
419
419
|
optionsContainerRef: t,
|
|
420
420
|
selectedValueIndex: o,
|
|
421
421
|
isDropdownOpen: e,
|
|
422
422
|
isDynamicFltering: a,
|
|
423
|
-
items:
|
|
424
|
-
isMultiple:
|
|
425
|
-
}, i,
|
|
423
|
+
items: l,
|
|
424
|
+
isMultiple: s
|
|
425
|
+
}, i, c, b) => {
|
|
426
426
|
const r = async (m) => {
|
|
427
|
-
var
|
|
428
|
-
a.value && await
|
|
429
|
-
},
|
|
430
|
-
var
|
|
431
|
-
a.value && await
|
|
432
|
-
const
|
|
427
|
+
var C;
|
|
428
|
+
a.value && await h(), (C = l.value[m]) == null || C.focus();
|
|
429
|
+
}, u = async (m) => {
|
|
430
|
+
var K, A;
|
|
431
|
+
a.value && await h();
|
|
432
|
+
const C = (K = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : K.$el.querySelectorAll(
|
|
433
433
|
"button"
|
|
434
434
|
);
|
|
435
|
-
|
|
435
|
+
C.length ? (A = C[m]) == null || A.focus() : r(m);
|
|
436
436
|
}, _ = (m) => {
|
|
437
|
-
var
|
|
438
|
-
return (
|
|
437
|
+
var C;
|
|
438
|
+
return (C = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : C.setListboxFocusedIndex(
|
|
439
439
|
m
|
|
440
440
|
);
|
|
441
|
-
},
|
|
442
|
-
m.preventDefault(), e.value ||
|
|
443
|
-
|
|
441
|
+
}, g = ({ detail: m }) => {
|
|
442
|
+
m.preventDefault(), e.value || c(), h(() => {
|
|
443
|
+
s ? u(0) : (_(o.value), r(o.value));
|
|
444
444
|
});
|
|
445
|
-
},
|
|
446
|
-
m.preventDefault(), e.value ||
|
|
447
|
-
|
|
445
|
+
}, f = ({ detail: m }) => {
|
|
446
|
+
m.preventDefault(), e.value || c(), h(() => {
|
|
447
|
+
s ? u(0) : (_(o.value), r(o.value));
|
|
448
448
|
});
|
|
449
449
|
}, O = () => {
|
|
450
|
-
e.value || (
|
|
451
|
-
_(
|
|
450
|
+
e.value || (c(), h(() => {
|
|
451
|
+
_(l.value.length - 1), r(l.value.length - 1);
|
|
452
452
|
}));
|
|
453
453
|
}, L = () => {
|
|
454
|
-
e.value && (
|
|
454
|
+
e.value && (b(), ge(n));
|
|
455
455
|
}, x = () => {
|
|
456
|
-
e.value &&
|
|
457
|
-
},
|
|
458
|
-
e.value ||
|
|
456
|
+
e.value && b();
|
|
457
|
+
}, y = () => {
|
|
458
|
+
e.value || c(), h(() => {
|
|
459
459
|
r(0);
|
|
460
460
|
});
|
|
461
|
-
}, I = ({ detail: m }) => {
|
|
462
|
-
m.preventDefault(), i(), e.value && g(() => {
|
|
463
|
-
l ? c(0) : (_(o.value), r(o.value));
|
|
464
|
-
});
|
|
465
461
|
}, B = ({ detail: m }) => {
|
|
466
|
-
m.preventDefault(), i(), e.value &&
|
|
467
|
-
|
|
462
|
+
m.preventDefault(), i(), e.value && h(() => {
|
|
463
|
+
s ? u(0) : (_(o.value), r(o.value));
|
|
464
|
+
});
|
|
465
|
+
}, D = ({ detail: m }) => {
|
|
466
|
+
m.preventDefault(), i(), e.value && h(() => {
|
|
467
|
+
s ? u(0) : (_(o.value), r(o.value));
|
|
468
468
|
});
|
|
469
469
|
};
|
|
470
|
-
return
|
|
471
|
-
...a.value ? {} : { [
|
|
472
|
-
[
|
|
473
|
-
[
|
|
474
|
-
[
|
|
475
|
-
[
|
|
476
|
-
[
|
|
477
|
-
[
|
|
478
|
-
[
|
|
470
|
+
return d(() => ({
|
|
471
|
+
...a.value ? {} : { [E.SPACE]: B },
|
|
472
|
+
[E.ENTER]: D,
|
|
473
|
+
[E.ARROW_DOWN]: g,
|
|
474
|
+
[E.ARROW_UP]: f,
|
|
475
|
+
[E.END]: O,
|
|
476
|
+
[E.ESCAPE]: L,
|
|
477
|
+
[E.HOME]: y,
|
|
478
|
+
[E.TAB]: x
|
|
479
479
|
}));
|
|
480
|
-
},
|
|
480
|
+
}, Ct = ({ inputContainerRef: n, isDropdownOpen: t }, o) => {
|
|
481
481
|
const e = () => {
|
|
482
|
-
t.value && o(),
|
|
483
|
-
|
|
482
|
+
t.value && o(), h(() => {
|
|
483
|
+
ge(n);
|
|
484
484
|
});
|
|
485
485
|
};
|
|
486
486
|
return {
|
|
@@ -490,18 +490,18 @@ const pt = ut.exports, ft = (n, t) => t.value.reduce((o, e) => {
|
|
|
490
490
|
[p.SPACE]: e
|
|
491
491
|
};
|
|
492
492
|
};
|
|
493
|
-
function
|
|
494
|
-
const a =
|
|
495
|
-
return
|
|
493
|
+
function ht(n, t, o, e) {
|
|
494
|
+
const a = S(n), l = S(t), s = (c, b = []) => b.flatMap((r) => r.label.toLocaleLowerCase().includes(c) ? e != null && e.value && r.items ? [...s(c, r.items)] : [r, ...s(c, r.items)] : r.items ? [...s(c, r.items)] : []);
|
|
495
|
+
return be(a, () => {
|
|
496
496
|
o !== void 0 && o(a.value);
|
|
497
|
-
}),
|
|
497
|
+
}), d(() => {
|
|
498
498
|
if (!a.value || o !== void 0)
|
|
499
|
-
return
|
|
500
|
-
const
|
|
501
|
-
return
|
|
499
|
+
return l.value;
|
|
500
|
+
const c = a.value.toLocaleLowerCase();
|
|
501
|
+
return s(c, l.value);
|
|
502
502
|
});
|
|
503
503
|
}
|
|
504
|
-
const
|
|
504
|
+
const St = {
|
|
505
505
|
"en-US": {
|
|
506
506
|
all: "All",
|
|
507
507
|
ariaLabelFallback: "Dropdown",
|
|
@@ -515,15 +515,15 @@ const _t = {
|
|
|
515
515
|
all: "Todos",
|
|
516
516
|
clearFilter: "Limpar filtro"
|
|
517
517
|
}
|
|
518
|
-
},
|
|
519
|
-
i18n: { messages:
|
|
518
|
+
}, wt = Symbol("input field component injection key"), Ht = Symbol("input field hint injection key"), Vt = Symbol("input field parent component injection key"), Lt = N({
|
|
519
|
+
i18n: { messages: St },
|
|
520
520
|
name: "b-dropdown",
|
|
521
521
|
components: {
|
|
522
|
-
DropdownInputDefault:
|
|
523
|
-
DropdownInputSmall:
|
|
522
|
+
DropdownInputDefault: Me,
|
|
523
|
+
DropdownInputSmall: bt
|
|
524
524
|
}
|
|
525
|
-
}),
|
|
526
|
-
...
|
|
525
|
+
}), xt = /* @__PURE__ */ N({
|
|
526
|
+
...Lt,
|
|
527
527
|
props: {
|
|
528
528
|
/**
|
|
529
529
|
* @deprecated from version 2.0.0. Use the aria-label attribute instead.
|
|
@@ -655,7 +655,7 @@ const _t = {
|
|
|
655
655
|
size: {
|
|
656
656
|
type: String,
|
|
657
657
|
default: null,
|
|
658
|
-
validator: (n) => Object.values(
|
|
658
|
+
validator: (n) => Object.values(P).includes(n)
|
|
659
659
|
},
|
|
660
660
|
/**
|
|
661
661
|
* If enabled, dropdown will display non-selectable, static categories
|
|
@@ -699,147 +699,142 @@ const _t = {
|
|
|
699
699
|
},
|
|
700
700
|
emits: ["input", "show-more"],
|
|
701
701
|
setup(n, { expose: t, emit: o }) {
|
|
702
|
-
var
|
|
703
|
-
const e = n, a =
|
|
702
|
+
var ue;
|
|
703
|
+
const e = n, a = Te(), l = ye(), s = ze(l), { t: i } = Q(), c = S(null), b = S(null), r = S(null), u = S(!1), _ = k("bento-dropdown-options-container"), g = k("dropdown-label"), f = k("dropdown-description"), O = k("dropdown-error"), { isReadOnly: L } = Ke(w(e, "readonly")), { cachedSelectedListboxOptions: x, cachedListboxSelectedValues: y, setCachedValues: B } = Pe(
|
|
704
704
|
w(e, "items"),
|
|
705
705
|
w(e, "value"),
|
|
706
706
|
w(e, "multiple"),
|
|
707
707
|
w(e, "enableValueLabelPair")
|
|
708
|
-
),
|
|
708
|
+
), D = S(a["aria-label"]), { ariaLabel: I, label: m } = _e(e), C = d(() => i("ariaLabelFallback")), K = $e({
|
|
709
709
|
// TODO: take ariaLabel ref away when aria-label prop is removed
|
|
710
|
-
ariaLabel:
|
|
710
|
+
ariaLabel: I.value || D,
|
|
711
711
|
label: m,
|
|
712
|
-
defaultFallback:
|
|
713
|
-
}),
|
|
712
|
+
defaultFallback: C
|
|
713
|
+
}), A = e.size === P.SMALL || Ne(wt, !1), Ce = d(() => A ? P.SMALL : P.DEFAULT), he = d(() => ({
|
|
714
714
|
"b-dropdown--condensed": e.condensed
|
|
715
|
-
})),
|
|
715
|
+
})), Se = d(() => ({
|
|
716
716
|
"b-dropdown__description--error": !!e.errorMessage
|
|
717
|
-
})),
|
|
718
|
-
items:
|
|
717
|
+
})), T = S(""), R = w(e, "items"), X = w(e, "staticCategories"), j = ht(T, R, (ue = e == null ? void 0 : e.search) == null ? void 0 : ue.searchEvent, X), W = d(() => e.dynamicFiltering && !!T.value), we = _t({
|
|
718
|
+
items: R,
|
|
719
719
|
placeholder: w(e, "placeholder"),
|
|
720
720
|
isMultiSelect: w(e, "multiple"),
|
|
721
721
|
selectedValues: x
|
|
722
|
-
}),
|
|
722
|
+
}), Le = d(() => {
|
|
723
723
|
if (e != null && e.multiple && Array.isArray(e.value))
|
|
724
724
|
return e.items.filter(
|
|
725
|
-
({ value:
|
|
725
|
+
({ value: v }) => (e == null ? void 0 : e.value) && (e == null ? void 0 : e.value).includes(v)
|
|
726
726
|
);
|
|
727
727
|
if (!e.multiple && e.staticCategories) {
|
|
728
|
-
const
|
|
729
|
-
(
|
|
728
|
+
const v = e.items.find(
|
|
729
|
+
(H) => H.items.some((Ie) => Ie.value === e.value)
|
|
730
730
|
);
|
|
731
|
-
return
|
|
731
|
+
return v ? v.items.find((H) => H.value === e.value) : null;
|
|
732
732
|
}
|
|
733
|
-
return e.items.find(({ value:
|
|
734
|
-
}),
|
|
735
|
-
const
|
|
736
|
-
return
|
|
737
|
-
}), { isMultiLevelSelect:
|
|
733
|
+
return e.items.find(({ value: v }) => v === (e == null ? void 0 : e.value));
|
|
734
|
+
}), G = d(() => {
|
|
735
|
+
const v = j.value.findIndex(({ value: M }) => e.value === M);
|
|
736
|
+
return v > -1 ? v : 0;
|
|
737
|
+
}), { isMultiLevelSelect: U, flattenedItemsList: ee } = ke(R), te = d(() => U.value && !e.staticCategories), oe = d(() => te.value ? "treeitem" : "option"), xe = d(() => {
|
|
738
738
|
if (e.multiple) {
|
|
739
|
-
const
|
|
740
|
-
return
|
|
739
|
+
const v = Array.isArray(e.value) ? e.value.length : 0, M = U.value ? ee.value.length : R.value.length;
|
|
740
|
+
return v === 0 ? null : !e.hasMoreItems && M > 0 && M === v ? i("all") : v;
|
|
741
741
|
}
|
|
742
742
|
return null;
|
|
743
|
-
}),
|
|
744
|
-
() => `${e.description ?
|
|
745
|
-
), ae = () => {
|
|
746
|
-
|
|
747
|
-
|
|
743
|
+
}), Oe = d(
|
|
744
|
+
() => `${e.description ? f : ""} ${e.errorMessage ? O : ""}`.trim() || null
|
|
745
|
+
), ae = d(() => {
|
|
746
|
+
var v;
|
|
747
|
+
return (v = r.value) == null ? void 0 : v.$el;
|
|
748
|
+
}), { visibleDomOptions: ne, updateVisibleDomOptions: q } = Fe(
|
|
749
|
+
ae,
|
|
750
|
+
j,
|
|
751
|
+
oe
|
|
752
|
+
), se = () => {
|
|
753
|
+
L.value || (u.value = !0, h(() => {
|
|
754
|
+
q();
|
|
748
755
|
}));
|
|
749
|
-
},
|
|
750
|
-
|
|
751
|
-
},
|
|
752
|
-
L.value || (
|
|
753
|
-
|
|
754
|
-
}),
|
|
755
|
-
},
|
|
756
|
-
|
|
757
|
-
},
|
|
758
|
-
e.multiple || (
|
|
759
|
-
},
|
|
756
|
+
}, z = () => {
|
|
757
|
+
u.value = !1;
|
|
758
|
+
}, le = () => {
|
|
759
|
+
L.value || (u.value = !u.value, h(() => {
|
|
760
|
+
q();
|
|
761
|
+
}), W.value && (T.value = ""));
|
|
762
|
+
}, Ee = () => {
|
|
763
|
+
W.value && (T.value = ""), u.value && (u.value = !1, r.value.onOutsideDropdownClick());
|
|
764
|
+
}, ie = (v) => {
|
|
765
|
+
e.multiple || (T.value = "", u.value = !1), B(v), o("input", y.value);
|
|
766
|
+
}, re = () => {
|
|
760
767
|
o(p.SHOW_MORE);
|
|
761
|
-
},
|
|
762
|
-
var E;
|
|
763
|
-
const f = (E = r.value) == null ? void 0 : E.$el;
|
|
764
|
-
!f || f.nodeType === Node.COMMENT_NODE || (H.value = Array.from(
|
|
765
|
-
f.querySelectorAll('[role="option"]')
|
|
766
|
-
).filter(($) => $.checkVisibility()));
|
|
767
|
-
};
|
|
768
|
-
Q(U, () => {
|
|
769
|
-
g(() => {
|
|
770
|
-
W();
|
|
771
|
-
});
|
|
772
|
-
});
|
|
773
|
-
const xe = mt(
|
|
768
|
+
}, De = gt(
|
|
774
769
|
{
|
|
775
|
-
inputContainerRef:
|
|
770
|
+
inputContainerRef: c,
|
|
776
771
|
optionsContainerRef: r,
|
|
777
|
-
selectedValueIndex:
|
|
778
|
-
isDropdownOpen:
|
|
772
|
+
selectedValueIndex: G,
|
|
773
|
+
isDropdownOpen: u,
|
|
779
774
|
isDynamicFltering: w(e, "dynamicFiltering"),
|
|
780
|
-
items:
|
|
775
|
+
items: ne,
|
|
781
776
|
isMultiple: e.multiple
|
|
782
777
|
},
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
),
|
|
778
|
+
le,
|
|
779
|
+
se,
|
|
780
|
+
z
|
|
781
|
+
), de = Ct(
|
|
787
782
|
{
|
|
788
|
-
inputContainerRef:
|
|
789
|
-
isDropdownOpen:
|
|
783
|
+
inputContainerRef: c,
|
|
784
|
+
isDropdownOpen: u
|
|
790
785
|
},
|
|
791
|
-
|
|
792
|
-
),
|
|
793
|
-
[p.CLOSE_DROPDOWN]:
|
|
794
|
-
[p.SELECT]:
|
|
795
|
-
[p.SHOW_MORE]:
|
|
796
|
-
...
|
|
786
|
+
z
|
|
787
|
+
), Be = {
|
|
788
|
+
[p.CLOSE_DROPDOWN]: z,
|
|
789
|
+
[p.SELECT]: ie,
|
|
790
|
+
[p.SHOW_MORE]: re,
|
|
791
|
+
...de
|
|
797
792
|
};
|
|
798
|
-
e.error &&
|
|
793
|
+
e.error && pe(
|
|
799
794
|
'BentoDropdown "error" property',
|
|
800
795
|
`Use the BentoDropdown "errorMessage" property instead to indicate that there is a modifier error.
|
|
801
796
|
Having the field as "undefined" will hide/remove the error.
|
|
802
797
|
<bento-dropdown errorMessage="Error message text" />`,
|
|
803
798
|
"2.0.0"
|
|
804
|
-
), e.size &&
|
|
805
|
-
const
|
|
806
|
-
|
|
799
|
+
), e.size && pe('BentoDropdown "size" property', "Do not use. Only 'default' size should be used.", "2.0.0");
|
|
800
|
+
const ce = () => {
|
|
801
|
+
c.value.focus();
|
|
807
802
|
};
|
|
808
803
|
return t({
|
|
809
|
-
focus:
|
|
810
|
-
}), { __sfc: !0, attrs: a, slots:
|
|
804
|
+
focus: ce
|
|
805
|
+
}), { __sfc: !0, attrs: a, slots: l, hasSlot: s, props: e, emit: o, t: i, inputContainerRef: c, inputContainerRefWrapper: b, optionsContainerRef: r, isDropdownOpen: u, dropdownOptionsContainerId: _, labelId: g, descriptionId: f, errorId: O, isReadOnly: L, cachedSelectedListboxOptions: x, cachedListboxSelectedValues: y, setCachedValues: B, ariaLabelAttribute: D, ariaLabel: I, label: m, computedAriaLabelFallbackMessage: C, computedAriaLabel: K, isInputComponent: A, computedSize: Ce, conditionalClasses: he, descriptionConditionalClasses: Se, searchTerm: T, items: R, staticCategories: X, filteredItems: j, isSearching: W, displayValue: we, selectedValueItem: Le, selectedValueIndex: G, isMultiLevelSelect: U, flattenedItemsList: ee, isTreePattern: te, computedOptionRole: oe, additionalItemsSelected: xe, ariaDescribedBy: Oe, listboxRef: ae, visibleDomOptions: ne, updateVisibleDomOptions: q, openDropdown: se, closeDropdown: z, toggleDropdown: le, clickOutsideDropdown: Ee, onOptionSelected: ie, emitShowMoreEvent: re, textboxKeyboardNavigationListeners: De, listboxKeyboardNavigationListeners: de, listboxListeners: Be, focus: ce, BentoDropdownOptionsContainer: et, BentoTypography: Ae, ErrorMessage: qe, FieldLabel: Ue, vBentoClickOutsideDirective: We, vBentoKeyboardNavigationDirective: je };
|
|
811
806
|
}
|
|
812
807
|
});
|
|
813
|
-
var
|
|
808
|
+
var Ot = function() {
|
|
814
809
|
var a;
|
|
815
810
|
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
816
|
-
return o("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.clickOutsideDropdown, expression: "clickOutsideDropdown" }], staticClass: "b-dropdown", class: e.conditionalClasses }, [e.label ? o(e.FieldLabel, { attrs: { id: e.labelId, condensed: t.condensed, label: e.label, "tooltip-text": t.tooltipText, optional: t.optional, required: t.required } }) : t._e(), o("div", t._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "inputContainerRefWrapper" }, e.textboxKeyboardNavigationListeners), [o(e.computedSize, { ref: "inputContainerRef", tag: "component", attrs: { condensed: t.condensed, value: e.searchTerm, "additional-items-selected": e.additionalItemsSelected, "aria-controls": e.dropdownOptionsContainerId, ariaExpanded: e.isDropdownOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, "aria-label": e.computedAriaLabel, "aria-readonly": e.isReadOnly, readonly: e.isReadOnly, disabled: t.disabled, "display-value": e.displayValue, "dynamic-filtering": t.dynamicFiltering, "is-invalid": !!t.errorMessage || t.error, multiple: t.multiple, open: e.isDropdownOpen, "selected-value-item": e.isInputComponent ? void 0 : e.selectedValueItem, "show-slot-content-in-multiple": t.showSlotContentInMultiple }, on: { input: function(
|
|
817
|
-
e.searchTerm =
|
|
818
|
-
}, open: e.toggleDropdown, close: e.toggleDropdown }, scopedSlots: t._u([t._l(e.slots, function(
|
|
819
|
-
return { key:
|
|
820
|
-
return [t._t(
|
|
811
|
+
return o("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.clickOutsideDropdown, expression: "clickOutsideDropdown" }], staticClass: "b-dropdown", class: e.conditionalClasses }, [e.label ? o(e.FieldLabel, { attrs: { id: e.labelId, condensed: t.condensed, label: e.label, "tooltip-text": t.tooltipText, optional: t.optional, required: t.required } }) : t._e(), o("div", t._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "inputContainerRefWrapper" }, e.textboxKeyboardNavigationListeners), [o(e.computedSize, { ref: "inputContainerRef", tag: "component", attrs: { condensed: t.condensed, value: e.searchTerm, "additional-items-selected": e.additionalItemsSelected, "aria-controls": e.dropdownOptionsContainerId, ariaExpanded: e.isDropdownOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, "aria-label": e.computedAriaLabel, "aria-readonly": e.isReadOnly, readonly: e.isReadOnly, disabled: t.disabled, "display-value": e.displayValue, "dynamic-filtering": t.dynamicFiltering, "is-invalid": !!t.errorMessage || t.error, multiple: t.multiple, open: e.isDropdownOpen, "selected-value-item": e.isInputComponent ? void 0 : e.selectedValueItem, "show-slot-content-in-multiple": t.showSlotContentInMultiple }, on: { input: function(l) {
|
|
812
|
+
e.searchTerm = l;
|
|
813
|
+
}, open: e.toggleDropdown, close: e.toggleDropdown }, scopedSlots: t._u([t._l(e.slots, function(l, s) {
|
|
814
|
+
return { key: s, fn: function(i) {
|
|
815
|
+
return [t._t(s, null, null, i)];
|
|
821
816
|
} };
|
|
822
|
-
})], null, !0) })], 1), e.inputContainerRef ? o(e.BentoDropdownOptionsContainer, t._g({ ref: "optionsContainerRef", attrs: { id: e.dropdownOptionsContainerId, "aria-label": e.computedAriaLabel, "component-loading": t.componentLoading, "empty-state": t.emptyState, "debounce-time": (a = t.search) == null ? void 0 : a.debounceTime, disabled: t.disabled, "is-option-disabled": t.isOptionDisabled, items: e.filteredItems, multiple: t.multiple, "static-categories": e.staticCategories, open: e.isDropdownOpen, "selected-value": e.cachedSelectedListboxOptions, searching: e.isSearching, "target-element": e.inputContainerRefWrapper, loading: t.loading, "has-more-items": t.hasMoreItems, "lazy-load-type": t.lazyLoadType, "virtual-scroll": t.virtualScroll }, scopedSlots: t._u([t._l(e.slots, function(
|
|
823
|
-
return { key:
|
|
824
|
-
return [t._t(
|
|
817
|
+
})], null, !0) })], 1), e.inputContainerRef ? o(e.BentoDropdownOptionsContainer, t._g({ ref: "optionsContainerRef", attrs: { id: e.dropdownOptionsContainerId, "aria-label": e.computedAriaLabel, "component-loading": t.componentLoading, "empty-state": t.emptyState, "debounce-time": (a = t.search) == null ? void 0 : a.debounceTime, disabled: t.disabled, "is-option-disabled": t.isOptionDisabled, items: e.filteredItems, multiple: t.multiple, "static-categories": e.staticCategories, open: e.isDropdownOpen, "selected-value": e.cachedSelectedListboxOptions, searching: e.isSearching, "target-element": e.inputContainerRefWrapper, loading: t.loading, "has-more-items": t.hasMoreItems, "lazy-load-type": t.lazyLoadType, "virtual-scroll": t.virtualScroll }, scopedSlots: t._u([t._l(e.slots, function(l, s) {
|
|
818
|
+
return { key: s, fn: function(i) {
|
|
819
|
+
return [t._t(s, null, null, i)];
|
|
825
820
|
} };
|
|
826
821
|
})], null, !0) }, e.listboxListeners)) : t._e(), t.errorMessage ? o(e.ErrorMessage, { staticClass: "b-dropdown__error-message", attrs: { id: e.errorId, "error-message": t.errorMessage } }) : t._e(), t.description || e.hasSlot("description") ? o(e.BentoTypography, { staticClass: "b-dropdown__description", class: e.descriptionConditionalClasses, attrs: { id: e.descriptionId, el: "span" } }, [t._t("description", function() {
|
|
827
822
|
return [t._v(" " + t._s(t.description) + " ")];
|
|
828
823
|
})], 2) : t._e()], 1);
|
|
829
|
-
},
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
824
|
+
}, Et = [], Dt = /* @__PURE__ */ F(
|
|
825
|
+
xt,
|
|
826
|
+
Ot,
|
|
827
|
+
Et,
|
|
833
828
|
!1,
|
|
834
829
|
null,
|
|
835
|
-
"
|
|
830
|
+
"0a1282c1"
|
|
836
831
|
);
|
|
837
|
-
const
|
|
832
|
+
const Jt = Dt.exports;
|
|
838
833
|
export {
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
834
|
+
Jt as B,
|
|
835
|
+
Ht as I,
|
|
836
|
+
wt as a,
|
|
837
|
+
Vt as b,
|
|
838
|
+
ht as u
|
|
844
839
|
};
|
|
845
|
-
//# sourceMappingURL=dropdown.
|
|
840
|
+
//# sourceMappingURL=dropdown.BWsU98dn.js.map
|