@adyen/bento-vue2 1.67.0 → 1.68.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 +2066 -2264
- 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.BxX3I27_.js → action-bar.Dy6tfK8c.js} +4 -4
- package/dist/chunks/{action-bar.BxX3I27_.js.map → action-bar.Dy6tfK8c.js.map} +1 -1
- package/dist/chunks/{base-modal.QGDM_kjG.js → base-modal.CkkfT6r6.js} +55 -118
- package/dist/chunks/base-modal.CkkfT6r6.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.itkbcqzk.js → button-actions-with-menu.CcxUTbsI.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.itkbcqzk.js.map → button-actions-with-menu.CcxUTbsI.js.map} +1 -1
- package/dist/chunks/{button-actions.BKdI_ooV.js → button-actions.Ju27CRNG.js} +2 -2
- package/dist/chunks/button-actions.Ju27CRNG.js.map +1 -0
- package/dist/chunks/{card.BktfAMv5.js → card.CASAAsuJ.js} +2 -2
- package/dist/chunks/{card.BktfAMv5.js.map → card.CASAAsuJ.js.map} +1 -1
- package/dist/chunks/{checkbox-group.BVMGnokj.js → checkbox-group.QdX-NrSG.js} +2 -2
- package/dist/chunks/{checkbox-group.BVMGnokj.js.map → checkbox-group.QdX-NrSG.js.map} +1 -1
- package/dist/chunks/{checkbox.Bg5FM5Oa.js → checkbox.DCD6SSXC.js} +38 -37
- package/dist/chunks/checkbox.DCD6SSXC.js.map +1 -0
- package/dist/chunks/{code-snippet.DDiQ9R3o.js → code-snippet.dIKi0D7d.js} +3 -3
- package/dist/chunks/{code-snippet.DDiQ9R3o.js.map → code-snippet.dIKi0D7d.js.map} +1 -1
- package/dist/chunks/{country.Df7erZov.js → country.melpzEsY.js} +2 -2
- package/dist/chunks/{country.Df7erZov.js.map → country.melpzEsY.js.map} +1 -1
- package/dist/chunks/{dashboard-section.Beep1lY8.js → dashboard-section.DBT99mLj.js} +2 -2
- package/dist/chunks/{dashboard-section.Beep1lY8.js.map → dashboard-section.DBT99mLj.js.map} +1 -1
- package/dist/chunks/{dashed-underline.BQwLgzz6.js → dashed-underline.BbH6Lnd2.js} +2 -2
- package/dist/chunks/{dashed-underline.BQwLgzz6.js.map → dashed-underline.BbH6Lnd2.js.map} +1 -1
- package/dist/chunks/{data-grid-template.nkx0pCMA.js → data-grid-template.B2lDfM2o.js} +2 -2
- package/dist/chunks/{data-grid-template.nkx0pCMA.js.map → data-grid-template.B2lDfM2o.js.map} +1 -1
- package/dist/chunks/{data-grid.CkwZVy3a.js → data-grid.B7Z9_WDY.js} +1198 -1143
- package/dist/chunks/data-grid.B7Z9_WDY.js.map +1 -0
- package/dist/chunks/{date-picker.BLBXaDHv.js → date-picker.DGIS6Pp-.js} +2 -2
- package/dist/chunks/{date-picker.BLBXaDHv.js.map → date-picker.DGIS6Pp-.js.map} +1 -1
- package/dist/chunks/{date-range-picker.am63DgMj.js → date-range-picker.CIaKRXIQ.js} +5 -5
- package/dist/chunks/{date-range-picker.am63DgMj.js.map → date-range-picker.CIaKRXIQ.js.map} +1 -1
- package/dist/chunks/dropdown-default-textbox.94q6opSD.js.map +1 -1
- package/dist/chunks/dropdown-tag.BaosvGGZ.js +240 -0
- package/dist/chunks/dropdown-tag.BaosvGGZ.js.map +1 -0
- package/dist/chunks/{dropdown.HA6ISg2h.js → dropdown.DazYAy4B.js} +220 -363
- package/dist/chunks/dropdown.DazYAy4B.js.map +1 -0
- package/dist/chunks/es6.n1ewaW31.js.map +1 -1
- package/dist/chunks/{filter-bar.DbqsoAI1.js → filter-bar.DL19SXF1.js} +674 -669
- package/dist/chunks/filter-bar.DL19SXF1.js.map +1 -0
- package/dist/chunks/{footer-actions.BUfQFz7J.js → footer-actions.BE_zzX-e.js} +2 -2
- package/dist/chunks/{footer-actions.BUfQFz7J.js.map → footer-actions.BE_zzX-e.js.map} +1 -1
- package/dist/chunks/header-meta.CfloYa86.js +183 -0
- package/dist/chunks/header-meta.CfloYa86.js.map +1 -0
- package/dist/chunks/{header-with-views.JllLR2nW.js → header-with-views.Bxvu8mq_.js} +526 -520
- package/dist/chunks/header-with-views.Bxvu8mq_.js.map +1 -0
- package/dist/chunks/header.DvHS-PnC.js +103 -0
- package/dist/chunks/header.DvHS-PnC.js.map +1 -0
- package/dist/chunks/{input-field-password.BtOdV0gF.js → input-field-password.C1zTapiN.js} +4 -4
- package/dist/chunks/{input-field-password.BtOdV0gF.js.map → input-field-password.C1zTapiN.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.Dq-LnGag.js → input-field-phone-number.K8BYjWfa.js} +623 -607
- package/dist/chunks/{input-field-phone-number.Dq-LnGag.js.map → input-field-phone-number.K8BYjWfa.js.map} +1 -1
- package/dist/chunks/{input-field.Bg77qHT2.js → input-field.5S-pUNxA.js} +7 -7
- package/dist/chunks/input-field.5S-pUNxA.js.map +1 -0
- package/dist/chunks/{menu.EgYjFAku.js → menu.dX3_vU05.js} +154 -153
- package/dist/chunks/{menu.EgYjFAku.js.map → menu.dX3_vU05.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.BNTUOC7o.js → modal-fullscreen.DHotw1RI.js} +76 -63
- package/dist/chunks/modal-fullscreen.DHotw1RI.js.map +1 -0
- package/dist/chunks/{modal.OvB4kEGR.js → modal.eoNQ6E3U.js} +4 -4
- package/dist/chunks/{modal.OvB4kEGR.js.map → modal.eoNQ6E3U.js.map} +1 -1
- package/dist/chunks/{pagination.Dw153NzQ.js → pagination.4J7ZMyf5.js} +2 -2
- package/dist/chunks/{pagination.Dw153NzQ.js.map → pagination.4J7ZMyf5.js.map} +1 -1
- package/dist/chunks/popover.Bo4Bkudr.js +145 -0
- package/dist/chunks/popover.Bo4Bkudr.js.map +1 -0
- package/dist/chunks/popover.types.CBqyA4ly.js +6 -0
- package/dist/chunks/popover.types.CBqyA4ly.js.map +1 -0
- package/dist/chunks/{rich-text-editor.CRJRvfJn.js → rich-text-editor.BUKLdRkN.js} +2 -2
- package/dist/chunks/{rich-text-editor.CRJRvfJn.js.map → rich-text-editor.BUKLdRkN.js.map} +1 -1
- package/dist/chunks/{search-bar.BTZSePJh.js → search-bar.CuBj5FAE.js} +3 -3
- package/dist/chunks/{search-bar.BTZSePJh.js.map → search-bar.CuBj5FAE.js.map} +1 -1
- package/dist/chunks/{secondary-nav.BBhSBNn7.js → secondary-nav.C6usurfD.js} +2 -2
- package/dist/chunks/{secondary-nav.BBhSBNn7.js.map → secondary-nav.C6usurfD.js.map} +1 -1
- package/dist/chunks/{sidepanel.Dt-BnFzN.js → sidepanel.DyThBUgV.js} +2 -2
- package/dist/chunks/{sidepanel.Dt-BnFzN.js.map → sidepanel.DyThBUgV.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.DsvtLg3D.js → summary-grid.types.D_FU3sUq.js} +4 -4
- package/dist/chunks/summary-grid.types.D_FU3sUq.js.map +1 -0
- package/dist/chunks/{textarea.RAU710Uw.js → textarea.UPM6N9V1.js} +7 -7
- package/dist/chunks/textarea.UPM6N9V1.js.map +1 -0
- package/dist/chunks/{timeline-item.Dz66luo5.js → timeline-item.DqLhj0Lb.js} +3 -3
- package/dist/chunks/{timeline-item.Dz66luo5.js.map → timeline-item.DqLhj0Lb.js.map} +1 -1
- package/dist/chunks/{tutorial.DAKO-fKz.js → tutorial.DRRfp81j.js} +7 -6
- package/dist/chunks/{tutorial.DAKO-fKz.js.map → tutorial.DRRfp81j.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.DQPABFfG.js → use-cached-selected-values.0EeyFfyF.js} +413 -410
- package/dist/chunks/use-cached-selected-values.0EeyFfyF.js.map +1 -0
- package/dist/chunks/{use-country-items.HFnjuDsG.js → use-country-items.BllTb5MK.js} +2 -2
- package/dist/chunks/{use-country-items.HFnjuDsG.js.map → use-country-items.BllTb5MK.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 +155 -154
- 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 +265 -51
- package/package.json +6 -6
- package/dist/assets/info-icon-with-popover.css +0 -1
- package/dist/chunks/base-modal.QGDM_kjG.js.map +0 -1
- package/dist/chunks/button-actions.BKdI_ooV.js.map +0 -1
- package/dist/chunks/checkbox.Bg5FM5Oa.js.map +0 -1
- package/dist/chunks/data-grid.CkwZVy3a.js.map +0 -1
- package/dist/chunks/dropdown-tag.DYIkCBa6.js +0 -215
- package/dist/chunks/dropdown-tag.DYIkCBa6.js.map +0 -1
- package/dist/chunks/dropdown.HA6ISg2h.js.map +0 -1
- package/dist/chunks/filter-bar.DbqsoAI1.js.map +0 -1
- package/dist/chunks/header-with-views.JllLR2nW.js.map +0 -1
- package/dist/chunks/header.04Y0unpy.js +0 -188
- package/dist/chunks/header.04Y0unpy.js.map +0 -1
- package/dist/chunks/info-icon-with-popover.B1DnkW4B.js +0 -71
- package/dist/chunks/info-icon-with-popover.B1DnkW4B.js.map +0 -1
- package/dist/chunks/input-field.Bg77qHT2.js.map +0 -1
- package/dist/chunks/modal-fullscreen.BNTUOC7o.js.map +0 -1
- package/dist/chunks/popover.BGHbPUOr.js +0 -295
- package/dist/chunks/popover.BGHbPUOr.js.map +0 -1
- package/dist/chunks/summary-grid.types.DsvtLg3D.js.map +0 -1
- package/dist/chunks/textarea.RAU710Uw.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.DQPABFfG.js.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { d as
|
|
3
|
-
import { a as
|
|
1
|
+
import { ref as h, watch as _e, computed as r, defineComponent as R, useSlots as ge, toRefs as Ce, nextTick as S, useAttrs as Te, toRef as w, inject as Ne } from "vue";
|
|
2
|
+
import { d as fe, B as Re } from "./typography.J1v_SPG3.js";
|
|
3
|
+
import { a as Y, b as M, c as Ae, B as W, D as Me } from "./dropdown-default-textbox.94q6opSD.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { n as
|
|
6
|
-
import { s as
|
|
7
|
-
import { g as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { a as p, b as
|
|
5
|
+
import { n as $ } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
|
+
import { s as Z } from "./events.CMzGybJJ.js";
|
|
7
|
+
import { g as P } from "./generate-uid.NJ8tVoha.js";
|
|
8
|
+
import { u as Pe } from "./aria-label.CaUURpnB.js";
|
|
9
|
+
import { u as X } from "./i18n.BQkEbtPM.js";
|
|
10
|
+
import { a as p, b as Q, B as ve, c as $e, u as ke, d as Fe } from "./use-cached-selected-values.0EeyFfyF.js";
|
|
11
11
|
import { u as Ke } from "./use-form-layout-loading.D3lALhtC.js";
|
|
12
12
|
import { u as ze } from "./use-has-slot.C9lQZ6nz.js";
|
|
13
|
-
import { B as E, a as
|
|
14
|
-
import { B as
|
|
15
|
-
import { F as
|
|
16
|
-
import { P as
|
|
17
|
-
import { B as
|
|
13
|
+
import { B as E, a as We } from "./keyboard-navigation.pB8weElW.js";
|
|
14
|
+
import { B as Ue } from "./directive.Cbdox5VL.js";
|
|
15
|
+
import { F as Ve, E as je } from "./error-message.BgxnwPLF.js";
|
|
16
|
+
import { P as me } from "./popper-container.DIFqmRsp.js";
|
|
17
|
+
import { B as qe } from "./popover.Bo4Bkudr.js";
|
|
18
18
|
import "../assets/dropdown.css";
|
|
19
|
-
const
|
|
19
|
+
const He = {
|
|
20
20
|
"en-US": {
|
|
21
21
|
apply: "Apply",
|
|
22
22
|
cancel: "Cancel",
|
|
@@ -30,20 +30,20 @@ const Ve = {
|
|
|
30
30
|
apply: "Aplicar",
|
|
31
31
|
cancel: "Cancelar"
|
|
32
32
|
}
|
|
33
|
-
}, Je = (
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
}, Je = (a, t, o, e) => {
|
|
34
|
+
const n = h(a.value), { t: l } = X();
|
|
35
|
+
_e(a, () => {
|
|
36
|
+
n.value = a.value;
|
|
37
37
|
});
|
|
38
|
-
const s =
|
|
39
|
-
() => JSON.stringify(
|
|
38
|
+
const s = r(
|
|
39
|
+
() => JSON.stringify(n.value) === JSON.stringify(a.value)
|
|
40
40
|
), i = () => {
|
|
41
|
-
e(p.SELECT,
|
|
41
|
+
e(p.SELECT, n.value), e(p.CLOSE_DROPDOWN);
|
|
42
42
|
}, c = () => {
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
o.value && t.value && (
|
|
46
|
-
},
|
|
43
|
+
n.value = a.value, e(p.CLOSE_DROPDOWN);
|
|
44
|
+
}, m = () => {
|
|
45
|
+
o.value && t.value && (n.value = a.value);
|
|
46
|
+
}, d = r(() => [
|
|
47
47
|
{
|
|
48
48
|
title: l("apply"),
|
|
49
49
|
event: i,
|
|
@@ -54,7 +54,7 @@ const Ve = {
|
|
|
54
54
|
event: c
|
|
55
55
|
}
|
|
56
56
|
]), u = (y) => {
|
|
57
|
-
|
|
57
|
+
n.value = y, t.value || e(p.SELECT, y);
|
|
58
58
|
}, _ = (y) => {
|
|
59
59
|
u(y), e(p.TAB);
|
|
60
60
|
}, g = (y) => {
|
|
@@ -74,17 +74,17 @@ const Ve = {
|
|
|
74
74
|
};
|
|
75
75
|
return {
|
|
76
76
|
// Values
|
|
77
|
-
actions:
|
|
78
|
-
internalSelectedValue:
|
|
77
|
+
actions: d,
|
|
78
|
+
internalSelectedValue: n,
|
|
79
79
|
// Methods
|
|
80
80
|
listeners: x,
|
|
81
81
|
onEscapeKey: O,
|
|
82
|
-
onOutsideDropdownClick:
|
|
82
|
+
onOutsideDropdownClick: m
|
|
83
83
|
};
|
|
84
|
-
}, Ye =
|
|
85
|
-
i18n: { messages:
|
|
84
|
+
}, Ye = R({
|
|
85
|
+
i18n: { messages: He },
|
|
86
86
|
name: "bento-dropdown-options-container"
|
|
87
|
-
}), Ze = /* @__PURE__ */
|
|
87
|
+
}), Ze = /* @__PURE__ */ R({
|
|
88
88
|
...Ye,
|
|
89
89
|
props: {
|
|
90
90
|
/**
|
|
@@ -144,8 +144,8 @@ const Ve = {
|
|
|
144
144
|
*/
|
|
145
145
|
lazyLoadType: {
|
|
146
146
|
type: String,
|
|
147
|
-
default:
|
|
148
|
-
validator: (
|
|
147
|
+
default: ve.AUTOMATIC,
|
|
148
|
+
validator: (a) => Object.values(ve).includes(a)
|
|
149
149
|
},
|
|
150
150
|
/**
|
|
151
151
|
* Indicates if new options are lazy loading.
|
|
@@ -175,7 +175,7 @@ const Ve = {
|
|
|
175
175
|
*
|
|
176
176
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
177
177
|
*/
|
|
178
|
-
searching:
|
|
178
|
+
searching: Q.props.searching,
|
|
179
179
|
/**
|
|
180
180
|
* If enabled, dropdown will display non-selectable, static categories
|
|
181
181
|
*/
|
|
@@ -184,7 +184,7 @@ const Ve = {
|
|
|
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: me.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.
|
|
@@ -195,15 +195,15 @@ const Ve = {
|
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
197
|
emits: [],
|
|
198
|
-
setup(
|
|
199
|
-
const e =
|
|
198
|
+
setup(a, { expose: t, emit: o }) {
|
|
199
|
+
const e = a, n = ge(), { selectedValue: l, multiple: s } = Ce(e), i = h(null), { t: c } = X(), m = r(() => e.open && !e.disabled), d = r(() => c("noOptionsMatchThisSearch")), u = r(() => ({
|
|
200
200
|
"b-dropdown-options-container--single": !(e != null && e.multiple)
|
|
201
|
-
})), _ =
|
|
201
|
+
})), _ = r(() => ({
|
|
202
202
|
"b-dropdown-options-container__listbox--single": !(e != null && e.multiple)
|
|
203
|
-
})), { actions: g, internalSelectedValue: f, listeners: O, onEscapeKey: L, onOutsideDropdownClick: x } = Je(l, s,
|
|
204
|
-
var
|
|
203
|
+
})), { actions: g, internalSelectedValue: f, listeners: O, onEscapeKey: L, onOutsideDropdownClick: x } = Je(l, s, m, o), y = r(() => e != null && e.multiple ? qe : me), I = r(() => {
|
|
204
|
+
var B;
|
|
205
205
|
const D = {
|
|
206
|
-
"min-width": `${(
|
|
206
|
+
"min-width": `${(B = e == null ? void 0 : e.targetElement) == null ? void 0 : B.clientWidth}px`,
|
|
207
207
|
"max-width": "min(500px, 95%)"
|
|
208
208
|
};
|
|
209
209
|
return e != null && e.multiple ? {
|
|
@@ -212,7 +212,7 @@ const Ve = {
|
|
|
212
212
|
actions: g.value,
|
|
213
213
|
divider: !0,
|
|
214
214
|
fallbackPosition: ["top-start"],
|
|
215
|
-
id:
|
|
215
|
+
id: P(`dropdown-options-${e.id}`),
|
|
216
216
|
open: e.open,
|
|
217
217
|
position: "bottom-start",
|
|
218
218
|
style: {
|
|
@@ -225,7 +225,7 @@ const Ve = {
|
|
|
225
225
|
offset: [0, 8],
|
|
226
226
|
position: "bottom-start",
|
|
227
227
|
style: {
|
|
228
|
-
display:
|
|
228
|
+
display: m.value ? "block" : "none",
|
|
229
229
|
...D
|
|
230
230
|
},
|
|
231
231
|
targetElement: e.targetElement
|
|
@@ -233,19 +233,19 @@ const Ve = {
|
|
|
233
233
|
});
|
|
234
234
|
return t({
|
|
235
235
|
onOutsideDropdownClick: x
|
|
236
|
-
}), { __sfc: !0, slots:
|
|
236
|
+
}), { __sfc: !0, slots: n, emit: o, props: e, selectedValue: l, multiple: s, dropdownOptionsListboxRef: i, t: c, isDropdownOpen: m, noResultsMessage: d, conditionalClasses: u, conditionalListboxClasses: _, actions: g, internalSelectedValue: f, listeners: O, onEscapeKey: L, onOutsideDropdownClick: x, popperContainerOrPopoverComponent: y, popperContainerOrPopoverProps: I, BentoListbox: Q };
|
|
237
237
|
}
|
|
238
238
|
});
|
|
239
239
|
var Qe = function() {
|
|
240
240
|
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
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(
|
|
242
|
-
return !
|
|
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(
|
|
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(n) {
|
|
242
|
+
return !n.type.indexOf("key") && t._k(n.keyCode, "esc", 27, n.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(n, l) {
|
|
244
244
|
return { key: l, fn: function(s) {
|
|
245
245
|
return [t._t(l, null, null, s)];
|
|
246
246
|
} };
|
|
247
247
|
})], null, !0) }, e.listeners))], 1)]);
|
|
248
|
-
}, Xe = [], Ge = /* @__PURE__ */
|
|
248
|
+
}, Xe = [], Ge = /* @__PURE__ */ $(
|
|
249
249
|
Ze,
|
|
250
250
|
Qe,
|
|
251
251
|
Xe,
|
|
@@ -254,34 +254,34 @@ var Qe = function() {
|
|
|
254
254
|
"d774d15c"
|
|
255
255
|
);
|
|
256
256
|
const et = Ge.exports;
|
|
257
|
-
let
|
|
257
|
+
let be = 0;
|
|
258
258
|
const tt = {
|
|
259
259
|
beforeCreate() {
|
|
260
|
-
this.uuid =
|
|
260
|
+
this.uuid = be.toString(), be += 1;
|
|
261
261
|
}
|
|
262
262
|
};
|
|
263
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
|
-
},
|
|
266
|
+
}, nt = [], at = /* @__PURE__ */ $(
|
|
267
267
|
tt,
|
|
268
268
|
ot,
|
|
269
|
-
|
|
269
|
+
nt,
|
|
270
270
|
!1,
|
|
271
271
|
null,
|
|
272
272
|
null
|
|
273
273
|
);
|
|
274
|
-
const st =
|
|
275
|
-
let
|
|
274
|
+
const st = at.exports;
|
|
275
|
+
let ye = 0;
|
|
276
276
|
const lt = {
|
|
277
277
|
beforeCreate() {
|
|
278
|
-
this.uuid =
|
|
278
|
+
this.uuid = ye.toString(), ye += 1;
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
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
|
-
}, rt = [], dt = /* @__PURE__ */
|
|
284
|
+
}, rt = [], dt = /* @__PURE__ */ $(
|
|
285
285
|
lt,
|
|
286
286
|
it,
|
|
287
287
|
rt,
|
|
@@ -289,10 +289,10 @@ var it = function() {
|
|
|
289
289
|
null,
|
|
290
290
|
null
|
|
291
291
|
);
|
|
292
|
-
const ct = dt.exports, ut =
|
|
292
|
+
const ct = dt.exports, ut = R({
|
|
293
293
|
name: "dropdown-small-textbox",
|
|
294
294
|
inheritAttrs: !1
|
|
295
|
-
}), pt = /* @__PURE__ */
|
|
295
|
+
}), pt = /* @__PURE__ */ R({
|
|
296
296
|
...ut,
|
|
297
297
|
props: {
|
|
298
298
|
/**
|
|
@@ -353,33 +353,33 @@ const ct = dt.exports, ut = N({
|
|
|
353
353
|
value: { type: String, default: "" }
|
|
354
354
|
},
|
|
355
355
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
356
|
-
setup(
|
|
357
|
-
const e =
|
|
358
|
-
[`b-dropdown-small-textbox--${
|
|
359
|
-
[`b-dropdown-small-textbox--${
|
|
360
|
-
[`b-dropdown-small-textbox--${
|
|
361
|
-
})), s =
|
|
356
|
+
setup(a, { expose: t, emit: o }) {
|
|
357
|
+
const e = a, n = h(null), l = r(() => ({
|
|
358
|
+
[`b-dropdown-small-textbox--${Y.DISABLED}`]: e.disabled,
|
|
359
|
+
[`b-dropdown-small-textbox--${Y.READONLY}`]: e.readonly,
|
|
360
|
+
[`b-dropdown-small-textbox--${Y.OPENED}`]: e.open
|
|
361
|
+
})), s = r(() => e.open && !e.disabled && !e.readonly), i = (f) => {
|
|
362
362
|
o("input", f);
|
|
363
363
|
}, c = (f) => {
|
|
364
364
|
o("keydown", f);
|
|
365
|
-
},
|
|
366
|
-
|
|
367
|
-
},
|
|
368
|
-
|
|
365
|
+
}, m = (f) => {
|
|
366
|
+
Z(f), o("open");
|
|
367
|
+
}, d = (f) => {
|
|
368
|
+
Z(f), o("close");
|
|
369
369
|
}, u = (f) => {
|
|
370
|
-
|
|
370
|
+
Z(f), o("clear");
|
|
371
371
|
}, _ = {
|
|
372
|
-
[
|
|
373
|
-
[
|
|
374
|
-
[
|
|
375
|
-
[
|
|
376
|
-
[
|
|
372
|
+
[M.INPUT]: i,
|
|
373
|
+
[M.OPEN]: m,
|
|
374
|
+
[M.CLOSE]: d,
|
|
375
|
+
[M.CLEAR]: u,
|
|
376
|
+
[M.KEYDOWN]: c
|
|
377
377
|
}, g = () => {
|
|
378
|
-
|
|
378
|
+
n.value.focus();
|
|
379
379
|
};
|
|
380
380
|
return t({
|
|
381
381
|
focus: g
|
|
382
|
-
}), { __sfc: !0, emit: o, props: e, baseTextbox:
|
|
382
|
+
}), { __sfc: !0, emit: o, props: e, baseTextbox: n, conditionalClasses: l, isDropdownOpen: s, onInput: i, onKeyDown: c, openDropdown: m, closeDropdown: d, clearValue: u, listeners: _, focus: g, BentoDropdownSize: W, DropdownBaseTextbox: Ae, ChevronDownSmallIcon: st, ChevronUpSmallIcon: ct };
|
|
383
383
|
}
|
|
384
384
|
});
|
|
385
385
|
var ft = function() {
|
|
@@ -387,7 +387,7 @@ var ft = function() {
|
|
|
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
|
-
}, vt = [], mt = /* @__PURE__ */
|
|
390
|
+
}, vt = [], mt = /* @__PURE__ */ $(
|
|
391
391
|
pt,
|
|
392
392
|
ft,
|
|
393
393
|
vt,
|
|
@@ -395,92 +395,92 @@ var ft = function() {
|
|
|
395
395
|
null,
|
|
396
396
|
"d0e53db8"
|
|
397
397
|
);
|
|
398
|
-
const bt = mt.exports, yt = (
|
|
398
|
+
const bt = mt.exports, yt = (a, t) => t.value.reduce((o, e) => {
|
|
399
399
|
if (e.items) {
|
|
400
|
-
const
|
|
401
|
-
(s) =>
|
|
400
|
+
const n = e.items.filter(
|
|
401
|
+
(s) => a.value.find((i) => i.value === s.value)
|
|
402
402
|
);
|
|
403
|
-
|
|
403
|
+
n.length === e.items.length ? o.push(e.displayValue ?? e.label) : n.forEach(({ label: s, displayValue: i }) => o.push(i ?? s));
|
|
404
404
|
}
|
|
405
|
-
return
|
|
406
|
-
}, []).join(", "), _t = ({ items:
|
|
407
|
-
const
|
|
408
|
-
() => e.value &&
|
|
405
|
+
return a.value.find((n) => n.value === e.value) && o.push(e.displayValue ?? e.label), o;
|
|
406
|
+
}, []).join(", "), _t = ({ items: a, placeholder: t, selectedValues: o, isMultiSelect: e }) => {
|
|
407
|
+
const n = r(
|
|
408
|
+
() => e.value && a.value.find((s) => {
|
|
409
409
|
var i;
|
|
410
410
|
return (i = s.items) == null ? void 0 : i.length;
|
|
411
411
|
})
|
|
412
412
|
);
|
|
413
|
-
return
|
|
414
|
-
},
|
|
413
|
+
return r(() => o.value.length ? n.value ? yt(o, a) : o.value.map(({ label: s, displayValue: i }) => i ?? s).join(", ") : t.value || null);
|
|
414
|
+
}, he = (a) => {
|
|
415
415
|
var t;
|
|
416
|
-
(t =
|
|
416
|
+
(t = a.value.$children) == null || t[0].$refs.textbox.focus();
|
|
417
417
|
}, gt = ({
|
|
418
|
-
inputContainerRef:
|
|
418
|
+
inputContainerRef: a,
|
|
419
419
|
optionsContainerRef: t,
|
|
420
420
|
selectedValueIndex: o,
|
|
421
421
|
isDropdownOpen: e,
|
|
422
|
-
isDynamicFltering:
|
|
422
|
+
isDynamicFltering: n,
|
|
423
423
|
items: l,
|
|
424
424
|
isMultiple: s
|
|
425
|
-
}, i, c,
|
|
426
|
-
const
|
|
425
|
+
}, i, c, m) => {
|
|
426
|
+
const d = async (b) => {
|
|
427
427
|
var C;
|
|
428
|
-
|
|
429
|
-
}, u = async (
|
|
430
|
-
var
|
|
431
|
-
|
|
432
|
-
const C = (
|
|
428
|
+
n.value && await S(), (C = l.value[b]) == null || C.focus();
|
|
429
|
+
}, u = async (b) => {
|
|
430
|
+
var F, K;
|
|
431
|
+
n.value && await S();
|
|
432
|
+
const C = (F = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : F.$el.querySelectorAll(
|
|
433
433
|
"button"
|
|
434
434
|
);
|
|
435
|
-
C.length ? (
|
|
436
|
-
}, _ = (
|
|
435
|
+
C.length ? (K = C[b]) == null || K.focus() : d(b);
|
|
436
|
+
}, _ = (b) => {
|
|
437
437
|
var C;
|
|
438
438
|
return (C = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : C.setListboxFocusedIndex(
|
|
439
|
-
|
|
439
|
+
b
|
|
440
440
|
);
|
|
441
|
-
}, g = (
|
|
442
|
-
|
|
443
|
-
|
|
441
|
+
}, g = () => {
|
|
442
|
+
e.value || c(), S(() => {
|
|
443
|
+
_(0), d(0);
|
|
444
444
|
});
|
|
445
|
-
}, f = (
|
|
446
|
-
|
|
447
|
-
|
|
445
|
+
}, f = () => {
|
|
446
|
+
e.value || c(), S(() => {
|
|
447
|
+
_(l.value.length - 1), d(l.value.length - 1);
|
|
448
448
|
});
|
|
449
|
-
}, O = () => {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
}, L = () => {
|
|
454
|
-
e.value && (b(), ge(n));
|
|
449
|
+
}, O = ({ detail: b }) => {
|
|
450
|
+
b.preventDefault(), g();
|
|
451
|
+
}, L = ({ detail: b }) => {
|
|
452
|
+
b.preventDefault(), f();
|
|
455
453
|
}, x = () => {
|
|
456
|
-
|
|
454
|
+
g();
|
|
457
455
|
}, y = () => {
|
|
458
|
-
|
|
459
|
-
|
|
456
|
+
f();
|
|
457
|
+
}, I = ({ detail: b }) => {
|
|
458
|
+
b.preventDefault(), i(), e.value && S(() => {
|
|
459
|
+
s ? u(0) : (_(o.value), d(o.value));
|
|
460
460
|
});
|
|
461
|
-
},
|
|
462
|
-
|
|
463
|
-
s ? u(0) : (_(o.value),
|
|
464
|
-
});
|
|
465
|
-
}, D = ({ detail: m }) => {
|
|
466
|
-
m.preventDefault(), i(), e.value && h(() => {
|
|
467
|
-
s ? u(0) : (_(o.value), r(o.value));
|
|
461
|
+
}, D = ({ detail: b }) => {
|
|
462
|
+
b.preventDefault(), i(), e.value && S(() => {
|
|
463
|
+
s ? u(0) : (_(o.value), d(o.value));
|
|
468
464
|
});
|
|
465
|
+
}, B = () => {
|
|
466
|
+
e.value && m();
|
|
467
|
+
}, k = () => {
|
|
468
|
+
e.value && (m(), he(a));
|
|
469
469
|
};
|
|
470
|
-
return
|
|
471
|
-
|
|
470
|
+
return r(() => ({
|
|
471
|
+
[E.ARROW_DOWN]: O,
|
|
472
|
+
[E.ARROW_UP]: L,
|
|
473
|
+
[E.HOME]: x,
|
|
474
|
+
[E.END]: y,
|
|
475
|
+
...n.value ? {} : { [E.SPACE]: I },
|
|
472
476
|
[E.ENTER]: D,
|
|
473
|
-
[E.
|
|
474
|
-
[E.
|
|
475
|
-
[E.END]: O,
|
|
476
|
-
[E.ESCAPE]: L,
|
|
477
|
-
[E.HOME]: y,
|
|
478
|
-
[E.TAB]: x
|
|
477
|
+
[E.TAB]: B,
|
|
478
|
+
[E.ESCAPE]: k
|
|
479
479
|
}));
|
|
480
|
-
}, Ct = ({ inputContainerRef:
|
|
480
|
+
}, Ct = ({ inputContainerRef: a, isDropdownOpen: t }, o) => {
|
|
481
481
|
const e = () => {
|
|
482
|
-
t.value && o(),
|
|
483
|
-
|
|
482
|
+
t.value && o(), S(() => {
|
|
483
|
+
he(a);
|
|
484
484
|
});
|
|
485
485
|
};
|
|
486
486
|
return {
|
|
@@ -490,18 +490,18 @@ const bt = mt.exports, yt = (n, t) => t.value.reduce((o, e) => {
|
|
|
490
490
|
[p.SPACE]: e
|
|
491
491
|
};
|
|
492
492
|
};
|
|
493
|
-
function ht(
|
|
494
|
-
const
|
|
495
|
-
return
|
|
496
|
-
o !== void 0 && o(
|
|
497
|
-
}),
|
|
498
|
-
if (!
|
|
493
|
+
function ht(a, t, o, e) {
|
|
494
|
+
const n = h(a), l = h(t), s = (c, m = []) => m.flatMap((d) => d.label.toLocaleLowerCase().includes(c) ? e != null && e.value && d.items ? [...s(c, d.items)] : [d, ...s(c, d.items)] : d.items ? [...s(c, d.items)] : []);
|
|
495
|
+
return _e(n, () => {
|
|
496
|
+
o !== void 0 && o(n.value);
|
|
497
|
+
}), r(() => {
|
|
498
|
+
if (!n.value || o !== void 0)
|
|
499
499
|
return l.value;
|
|
500
|
-
const c =
|
|
500
|
+
const c = n.value.toLocaleLowerCase();
|
|
501
501
|
return s(c, l.value);
|
|
502
502
|
});
|
|
503
503
|
}
|
|
504
|
-
const
|
|
504
|
+
const wt = {
|
|
505
505
|
"en-US": {
|
|
506
506
|
all: "All",
|
|
507
507
|
ariaLabelFallback: "Dropdown",
|
|
@@ -515,270 +515,127 @@ const St = {
|
|
|
515
515
|
all: "Todos",
|
|
516
516
|
clearFilter: "Limpar filtro"
|
|
517
517
|
}
|
|
518
|
-
},
|
|
519
|
-
i18n: { messages:
|
|
518
|
+
}, Lt = Symbol("input field component injection key"), qt = Symbol("input field hint injection key"), Ht = Symbol("input field parent component injection key"), xt = R({
|
|
519
|
+
i18n: { messages: wt },
|
|
520
520
|
name: "b-dropdown",
|
|
521
521
|
components: {
|
|
522
522
|
DropdownInputDefault: Me,
|
|
523
523
|
DropdownInputSmall: bt
|
|
524
524
|
}
|
|
525
|
-
}),
|
|
526
|
-
...
|
|
525
|
+
}), St = /* @__PURE__ */ R({
|
|
526
|
+
...xt,
|
|
527
527
|
props: {
|
|
528
|
-
|
|
529
|
-
* @deprecated from version 2.0.0. Use the aria-label attribute instead.
|
|
530
|
-
*/
|
|
531
|
-
/**
|
|
532
|
-
* Defines a string value that labels an interactive element.
|
|
533
|
-
*/
|
|
534
|
-
ariaLabel: { type: String, default: null },
|
|
535
|
-
/**
|
|
536
|
-
* Renders the dropdown with a condensed style.
|
|
537
|
-
*/
|
|
528
|
+
ariaLabel: { default: null },
|
|
538
529
|
condensed: { type: Boolean, default: !1 },
|
|
539
|
-
|
|
540
|
-
* Empty state props used with the inner empty state component which is displayed when no search results are found.
|
|
541
|
-
*/
|
|
542
|
-
emptyState: {
|
|
543
|
-
type: Object,
|
|
544
|
-
default: void 0
|
|
545
|
-
},
|
|
546
|
-
/**
|
|
547
|
-
* Disables dropdown functionality.
|
|
548
|
-
*/
|
|
530
|
+
emptyState: { default: void 0 },
|
|
549
531
|
disabled: { type: Boolean, default: !1 },
|
|
550
|
-
|
|
551
|
-
* Sets the possibility to type into the textbox.
|
|
552
|
-
*/
|
|
553
|
-
dynamicFiltering: {
|
|
554
|
-
type: Boolean,
|
|
555
|
-
default: !1
|
|
556
|
-
},
|
|
557
|
-
/**
|
|
558
|
-
* Highlights the dropdown in an erroneous state.
|
|
559
|
-
*
|
|
560
|
-
* @deprecated Use "errorMessage" prop instead
|
|
561
|
-
*/
|
|
532
|
+
dynamicFiltering: { type: Boolean, default: !1 },
|
|
562
533
|
error: { type: Boolean, default: !1 },
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
*/
|
|
566
|
-
errorMessage: { type: String, default: null },
|
|
567
|
-
/**
|
|
568
|
-
* Descriptive supporting text visbile underneath the dropdown.
|
|
569
|
-
*/
|
|
570
|
-
description: { type: String, default: null },
|
|
571
|
-
/**
|
|
572
|
-
* Indicates whether there are more items to load
|
|
573
|
-
*/
|
|
534
|
+
errorMessage: { default: null },
|
|
535
|
+
description: { default: null },
|
|
574
536
|
hasMoreItems: { type: Boolean, default: !1 },
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
* @type {BentoListboxIsOptionDisabled}
|
|
579
|
-
* @param {BentoListboxOptionItem} option - Dropdown option object
|
|
580
|
-
* @param {string} option.label - Option's label text
|
|
581
|
-
* @param {string|number} option.value - Option's value
|
|
582
|
-
* @param {unknown} option.data - Option's extra data to be passed to the default slot
|
|
583
|
-
*/
|
|
584
|
-
isOptionDisabled: {
|
|
585
|
-
type: Function,
|
|
586
|
-
default: void 0
|
|
587
|
-
},
|
|
588
|
-
/**
|
|
589
|
-
* The option elements to populate the dropdown with.
|
|
590
|
-
* It must be an array of {@see BentoListboxOptionItem }
|
|
591
|
-
* * @property {string} value.label - Text to be displayed in the option
|
|
592
|
-
* * @property {string,number} value.value - Value of the option
|
|
593
|
-
*/
|
|
594
|
-
items: {
|
|
595
|
-
type: Array,
|
|
596
|
-
default: () => []
|
|
597
|
-
},
|
|
598
|
-
/**
|
|
599
|
-
* Text that is displayed as a label above the element.
|
|
600
|
-
*/
|
|
601
|
-
label: { type: String, default: null },
|
|
602
|
-
/**
|
|
603
|
-
* Indicates if new options are lazy loading.
|
|
604
|
-
*/
|
|
537
|
+
isOptionDisabled: { default: void 0 },
|
|
538
|
+
items: { default: () => [] },
|
|
539
|
+
label: { default: null },
|
|
605
540
|
loading: { type: Boolean, default: !1 },
|
|
606
|
-
/**
|
|
607
|
-
* Indicates that dropdown items are loading
|
|
608
|
-
*/
|
|
609
541
|
componentLoading: { type: Boolean, default: !1 },
|
|
610
|
-
|
|
611
|
-
* The type of `Lazy Load`.
|
|
612
|
-
* Type "automatic" will enable infinite scrolling
|
|
613
|
-
* Type "button" will enable lazy loading with "Show more" button
|
|
614
|
-
*/
|
|
615
|
-
lazyLoadType: {
|
|
616
|
-
type: String,
|
|
617
|
-
default: Y.props.lazyLoadType.default,
|
|
618
|
-
validator: (n) => Object.values(Z).includes(n)
|
|
619
|
-
},
|
|
620
|
-
/*
|
|
621
|
-
* If enabled, the user will be able to select multiple items.
|
|
622
|
-
*/
|
|
542
|
+
lazyLoadType: { default: Q.props.lazyLoadType.default },
|
|
623
543
|
multiple: { type: Boolean, default: !1 },
|
|
624
|
-
/**
|
|
625
|
-
* Highlights the dropdown is optional.
|
|
626
|
-
*/
|
|
627
544
|
optional: { type: Boolean, default: !1 },
|
|
628
|
-
|
|
629
|
-
* Text that appears in the form control when it has no value set
|
|
630
|
-
*/
|
|
631
|
-
placeholder: { type: String, default: null },
|
|
632
|
-
/**
|
|
633
|
-
* Sets the dropdown to readonly state
|
|
634
|
-
*/
|
|
545
|
+
placeholder: { default: null },
|
|
635
546
|
readonly: { type: Boolean, default: !1 },
|
|
636
|
-
/**
|
|
637
|
-
* Highlights the dropdown is required.
|
|
638
|
-
*/
|
|
639
547
|
required: { type: Boolean, default: !1 },
|
|
640
|
-
|
|
641
|
-
* Dropdown search options and events.
|
|
642
|
-
* @see BentoDropdownSearchOptions
|
|
643
|
-
*/
|
|
644
|
-
search: {
|
|
645
|
-
type: Object,
|
|
646
|
-
default: void 0
|
|
647
|
-
},
|
|
648
|
-
/**
|
|
649
|
-
* Toggles whether to use the slot content select items shown in the textbox in multiple mode.
|
|
650
|
-
*/
|
|
548
|
+
search: { default: void 0 },
|
|
651
549
|
showSlotContentInMultiple: { type: Boolean, default: !1 },
|
|
652
|
-
|
|
653
|
-
* @deprecated Do not use. Only 'default' size should be used.
|
|
654
|
-
*/
|
|
655
|
-
size: {
|
|
656
|
-
type: String,
|
|
657
|
-
default: null,
|
|
658
|
-
validator: (n) => Object.values(P).includes(n)
|
|
659
|
-
},
|
|
660
|
-
/**
|
|
661
|
-
* If enabled, dropdown will display non-selectable, static categories
|
|
662
|
-
*/
|
|
550
|
+
size: { default: null },
|
|
663
551
|
staticCategories: { type: Boolean, default: !1 },
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
tooltipText: { type: String, default: null },
|
|
668
|
-
/**
|
|
669
|
-
* The `input` value.
|
|
670
|
-
* Providing an empty string will select no options.
|
|
671
|
-
* Set to an empty string `''` if you don't want any of the available options to be selected.
|
|
672
|
-
*/
|
|
673
|
-
value: {
|
|
674
|
-
type: [String, Number, Array, Object],
|
|
675
|
-
default: null
|
|
676
|
-
},
|
|
677
|
-
/**
|
|
678
|
-
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
679
|
-
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
680
|
-
*/
|
|
681
|
-
virtualScroll: {
|
|
682
|
-
type: [Boolean, Object],
|
|
683
|
-
default: !1
|
|
684
|
-
},
|
|
685
|
-
/**
|
|
686
|
-
* Enables value/label value handling. When `true`, the component expects and emits value/label
|
|
687
|
-
* pair objects instead of primitive values.
|
|
688
|
-
*
|
|
689
|
-
* This affects both the `value` prop and the `input` event payload.
|
|
690
|
-
*
|
|
691
|
-
* - **Input (`value` prop):** Expects a `{ value: string | number, label: string }` object (or an array of them for multi-select).
|
|
692
|
-
* - **Output (`input` event):** Emits a `{ value: string | number, label: string }` object (or an array of them) upon selection.
|
|
693
|
-
*
|
|
694
|
-
* This is particularly useful when a selected item's label is not available in the `items` prop,
|
|
695
|
-
* allowing the component to display the correct label for values loaded from external sources.
|
|
696
|
-
* @default false
|
|
697
|
-
*/
|
|
552
|
+
tooltipText: { default: null },
|
|
553
|
+
value: { default: null },
|
|
554
|
+
virtualScroll: { default: !1 },
|
|
698
555
|
enableValueLabelPair: { type: Boolean, default: !1 }
|
|
699
556
|
},
|
|
700
557
|
emits: ["input", "show-more"],
|
|
701
|
-
setup(
|
|
702
|
-
var
|
|
703
|
-
const e =
|
|
558
|
+
setup(a, { expose: t, emit: o }) {
|
|
559
|
+
var pe;
|
|
560
|
+
const e = a, n = Te(), l = ge(), s = ze(l), { t: i } = X(), c = h(null), m = h(null), d = h(null), u = h(!1), _ = P("bento-dropdown-options-container"), g = P("dropdown-label"), f = P("dropdown-description"), O = P("dropdown-error"), { isReadOnly: L } = Ke(w(e, "readonly")), { cachedSelectedListboxOptions: x, cachedListboxSelectedValues: y, setCachedValues: I } = $e(
|
|
704
561
|
w(e, "items"),
|
|
705
562
|
w(e, "value"),
|
|
706
563
|
w(e, "multiple"),
|
|
707
564
|
w(e, "enableValueLabelPair")
|
|
708
|
-
), D =
|
|
565
|
+
), D = h(n["aria-label"]), { ariaLabel: B, label: k } = Ce(e), U = r(() => i("ariaLabelFallback")), b = Pe({
|
|
709
566
|
// TODO: take ariaLabel ref away when aria-label prop is removed
|
|
710
|
-
ariaLabel:
|
|
711
|
-
label:
|
|
712
|
-
defaultFallback:
|
|
713
|
-
}),
|
|
567
|
+
ariaLabel: B.value || D,
|
|
568
|
+
label: k,
|
|
569
|
+
defaultFallback: U
|
|
570
|
+
}), C = e.size === W.SMALL || Ne(Lt, !1), F = r(() => C ? W.SMALL : W.DEFAULT), K = r(() => ({
|
|
714
571
|
"b-dropdown--condensed": e.condensed
|
|
715
|
-
})),
|
|
572
|
+
})), we = r(() => ({
|
|
716
573
|
"b-dropdown__description--error": !!e.errorMessage
|
|
717
|
-
})), T =
|
|
718
|
-
items:
|
|
574
|
+
})), T = h(""), A = w(e, "items"), G = w(e, "staticCategories"), V = ht(T, A, (pe = e == null ? void 0 : e.search) == null ? void 0 : pe.searchEvent, G), j = r(() => e.dynamicFiltering && !!T.value), Le = _t({
|
|
575
|
+
items: A,
|
|
719
576
|
placeholder: w(e, "placeholder"),
|
|
720
577
|
isMultiSelect: w(e, "multiple"),
|
|
721
578
|
selectedValues: x
|
|
722
|
-
}),
|
|
579
|
+
}), xe = r(() => {
|
|
723
580
|
if (e != null && e.multiple && Array.isArray(e.value))
|
|
724
581
|
return e.items.filter(
|
|
725
582
|
({ value: v }) => (e == null ? void 0 : e.value) && (e == null ? void 0 : e.value).includes(v)
|
|
726
583
|
);
|
|
727
584
|
if (!e.multiple && e.staticCategories) {
|
|
728
585
|
const v = e.items.find(
|
|
729
|
-
(
|
|
586
|
+
(J) => J.items.some((Ie) => Ie.value === e.value)
|
|
730
587
|
);
|
|
731
|
-
return v ? v.items.find((
|
|
588
|
+
return v ? v.items.find((J) => J.value === e.value) : null;
|
|
732
589
|
}
|
|
733
590
|
return e.items.find(({ value: v }) => v === (e == null ? void 0 : e.value));
|
|
734
|
-
}),
|
|
735
|
-
const v =
|
|
591
|
+
}), ee = r(() => {
|
|
592
|
+
const v = V.value.findIndex(({ value: N }) => e.enableValueLabelPair ? e.value.value === N : e.value === N);
|
|
736
593
|
return v > -1 ? v : 0;
|
|
737
|
-
}), { isMultiLevelSelect:
|
|
594
|
+
}), { isMultiLevelSelect: q, flattenedItemsList: te } = ke(A), oe = r(() => q.value && !e.staticCategories), ne = r(() => oe.value ? "treeitem" : "option"), Se = r(() => {
|
|
738
595
|
if (e.multiple) {
|
|
739
|
-
const v = Array.isArray(e.value) ? e.value.length : 0,
|
|
740
|
-
return v === 0 ? null : !e.hasMoreItems &&
|
|
596
|
+
const v = Array.isArray(e.value) ? e.value.length : 0, N = q.value ? te.value.length : A.value.length;
|
|
597
|
+
return v === 0 ? null : !e.hasMoreItems && N > 0 && N === v ? i("all") : v;
|
|
741
598
|
}
|
|
742
599
|
return null;
|
|
743
|
-
}), Oe =
|
|
600
|
+
}), Oe = r(
|
|
744
601
|
() => `${e.description ? f : ""} ${e.errorMessage ? O : ""}`.trim() || null
|
|
745
|
-
), ae =
|
|
602
|
+
), ae = r(() => {
|
|
746
603
|
var v;
|
|
747
|
-
return (v =
|
|
748
|
-
}), { visibleDomOptions:
|
|
604
|
+
return (v = d.value) == null ? void 0 : v.$el;
|
|
605
|
+
}), { visibleDomOptions: se, updateVisibleDomOptions: H } = Fe(
|
|
749
606
|
ae,
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
),
|
|
753
|
-
L.value || (u.value = !0,
|
|
754
|
-
|
|
607
|
+
V,
|
|
608
|
+
ne
|
|
609
|
+
), le = () => {
|
|
610
|
+
L.value || (u.value = !0, S(() => {
|
|
611
|
+
H();
|
|
755
612
|
}));
|
|
756
613
|
}, z = () => {
|
|
757
614
|
u.value = !1;
|
|
758
|
-
},
|
|
759
|
-
L.value || (u.value = !u.value,
|
|
760
|
-
|
|
761
|
-
}),
|
|
615
|
+
}, ie = () => {
|
|
616
|
+
L.value || (u.value = !u.value, S(() => {
|
|
617
|
+
H();
|
|
618
|
+
}), j.value && (T.value = ""));
|
|
762
619
|
}, Ee = () => {
|
|
763
|
-
|
|
764
|
-
},
|
|
765
|
-
e.multiple || (T.value = "", u.value = !1),
|
|
766
|
-
},
|
|
620
|
+
j.value && (T.value = ""), u.value && (u.value = !1, d.value.onOutsideDropdownClick());
|
|
621
|
+
}, re = (v) => {
|
|
622
|
+
e.multiple || (T.value = "", u.value = !1), I(v), o("input", y.value);
|
|
623
|
+
}, de = () => {
|
|
767
624
|
o(p.SHOW_MORE);
|
|
768
625
|
}, De = gt(
|
|
769
626
|
{
|
|
770
627
|
inputContainerRef: c,
|
|
771
|
-
optionsContainerRef:
|
|
772
|
-
selectedValueIndex:
|
|
628
|
+
optionsContainerRef: d,
|
|
629
|
+
selectedValueIndex: ee,
|
|
773
630
|
isDropdownOpen: u,
|
|
774
631
|
isDynamicFltering: w(e, "dynamicFiltering"),
|
|
775
|
-
items:
|
|
632
|
+
items: se,
|
|
776
633
|
isMultiple: e.multiple
|
|
777
634
|
},
|
|
635
|
+
ie,
|
|
778
636
|
le,
|
|
779
|
-
se,
|
|
780
637
|
z
|
|
781
|
-
),
|
|
638
|
+
), ce = Ct(
|
|
782
639
|
{
|
|
783
640
|
inputContainerRef: c,
|
|
784
641
|
isDropdownOpen: u
|
|
@@ -786,27 +643,27 @@ const St = {
|
|
|
786
643
|
z
|
|
787
644
|
), Be = {
|
|
788
645
|
[p.CLOSE_DROPDOWN]: z,
|
|
789
|
-
[p.SELECT]:
|
|
790
|
-
[p.SHOW_MORE]:
|
|
791
|
-
...
|
|
646
|
+
[p.SELECT]: re,
|
|
647
|
+
[p.SHOW_MORE]: de,
|
|
648
|
+
...ce
|
|
792
649
|
};
|
|
793
|
-
e.error &&
|
|
650
|
+
e.error && fe(
|
|
794
651
|
'BentoDropdown "error" property',
|
|
795
652
|
`Use the BentoDropdown "errorMessage" property instead to indicate that there is a modifier error.
|
|
796
653
|
Having the field as "undefined" will hide/remove the error.
|
|
797
654
|
<bento-dropdown errorMessage="Error message text" />`,
|
|
798
655
|
"2.0.0"
|
|
799
|
-
), e.size &&
|
|
800
|
-
const
|
|
656
|
+
), e.size && fe('BentoDropdown "size" property', "Do not use. Only 'default' size should be used.", "2.0.0");
|
|
657
|
+
const ue = () => {
|
|
801
658
|
c.value.focus();
|
|
802
659
|
};
|
|
803
660
|
return t({
|
|
804
|
-
focus:
|
|
805
|
-
}), { __sfc: !0, attrs:
|
|
661
|
+
focus: ue
|
|
662
|
+
}), { __sfc: !0, attrs: n, slots: l, hasSlot: s, props: e, emit: o, t: i, inputContainerRef: c, inputContainerRefWrapper: m, optionsContainerRef: d, isDropdownOpen: u, dropdownOptionsContainerId: _, labelId: g, descriptionId: f, errorId: O, isReadOnly: L, cachedSelectedListboxOptions: x, cachedListboxSelectedValues: y, setCachedValues: I, ariaLabelAttribute: D, ariaLabel: B, label: k, computedAriaLabelFallbackMessage: U, computedAriaLabel: b, isInputComponent: C, computedSize: F, conditionalClasses: K, descriptionConditionalClasses: we, searchTerm: T, items: A, staticCategories: G, filteredItems: V, isSearching: j, displayValue: Le, selectedValueItem: xe, selectedValueIndex: ee, isMultiLevelSelect: q, flattenedItemsList: te, isTreePattern: oe, computedOptionRole: ne, additionalItemsSelected: Se, ariaDescribedBy: Oe, listboxRef: ae, visibleDomOptions: se, updateVisibleDomOptions: H, openDropdown: le, closeDropdown: z, toggleDropdown: ie, clickOutsideDropdown: Ee, onOptionSelected: re, emitShowMoreEvent: de, textboxKeyboardNavigationListeners: De, listboxKeyboardNavigationListeners: ce, listboxListeners: Be, focus: ue, BentoDropdownOptionsContainer: et, BentoTypography: Re, ErrorMessage: je, FieldLabel: Ve, vBentoClickOutsideDirective: Ue, vBentoKeyboardNavigationDirective: We };
|
|
806
663
|
}
|
|
807
664
|
});
|
|
808
665
|
var Ot = function() {
|
|
809
|
-
var
|
|
666
|
+
var n;
|
|
810
667
|
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
811
668
|
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
669
|
e.searchTerm = l;
|
|
@@ -814,27 +671,27 @@ var Ot = function() {
|
|
|
814
671
|
return { key: s, fn: function(i) {
|
|
815
672
|
return [t._t(s, null, null, i)];
|
|
816
673
|
} };
|
|
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": (
|
|
674
|
+
})], 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": (n = t.search) == null ? void 0 : n.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
675
|
return { key: s, fn: function(i) {
|
|
819
676
|
return [t._t(s, null, null, i)];
|
|
820
677
|
} };
|
|
821
678
|
})], 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() {
|
|
822
679
|
return [t._v(" " + t._s(t.description) + " ")];
|
|
823
680
|
})], 2) : t._e()], 1);
|
|
824
|
-
}, Et = [], Dt = /* @__PURE__ */
|
|
825
|
-
|
|
681
|
+
}, Et = [], Dt = /* @__PURE__ */ $(
|
|
682
|
+
St,
|
|
826
683
|
Ot,
|
|
827
684
|
Et,
|
|
828
685
|
!1,
|
|
829
686
|
null,
|
|
830
|
-
"
|
|
687
|
+
"b8f9ffa8"
|
|
831
688
|
);
|
|
832
689
|
const Jt = Dt.exports;
|
|
833
690
|
export {
|
|
834
691
|
Jt as B,
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
692
|
+
qt as I,
|
|
693
|
+
Lt as a,
|
|
694
|
+
Ht as b,
|
|
838
695
|
ht as u
|
|
839
696
|
};
|
|
840
|
-
//# sourceMappingURL=dropdown.
|
|
697
|
+
//# sourceMappingURL=dropdown.DazYAy4B.js.map
|