@adyen/bento-vue2 1.96.1 → 1.97.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 +162 -127
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/alert.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/country.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/date-time-picker.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/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/navigation-menu-group.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/summary-grid.css +1 -1
- package/dist/assets/textarea.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.Chu-0oVy.js → action-bar.B890LCTe.js} +3 -3
- package/dist/chunks/{action-bar.Chu-0oVy.js.map → action-bar.B890LCTe.js.map} +1 -1
- package/dist/chunks/{ai-tag.DVmvni7U.js → ai-tag.C8RxACNj.js} +2 -2
- package/dist/chunks/{ai-tag.DVmvni7U.js.map → ai-tag.C8RxACNj.js.map} +1 -1
- package/dist/chunks/{alert.B4bHCE8V.js → alert.BDkEbdf4.js} +10 -10
- package/dist/chunks/{alert.B4bHCE8V.js.map → alert.BDkEbdf4.js.map} +1 -1
- package/dist/chunks/{base-modal.CC7gm9fc.js → base-modal.CDMoF3b_.js} +3 -3
- package/dist/chunks/{base-modal.CC7gm9fc.js.map → base-modal.CDMoF3b_.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BlOBDvdL.js → button-actions-with-menu.DqDQ_gVX.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.BlOBDvdL.js.map → button-actions-with-menu.DqDQ_gVX.js.map} +1 -1
- package/dist/chunks/{button-actions.D1jRC1fs.js → button-actions.DKc63aCb.js} +122 -110
- package/dist/chunks/{button-actions.D1jRC1fs.js.map → button-actions.DKc63aCb.js.map} +1 -1
- package/dist/chunks/calendar.BckAv9N_.js +1235 -0
- package/dist/chunks/calendar.BckAv9N_.js.map +1 -0
- package/dist/chunks/{card.ErZLKN0q.js → card.ChBURa5R.js} +2 -2
- package/dist/chunks/{card.ErZLKN0q.js.map → card.ChBURa5R.js.map} +1 -1
- package/dist/chunks/{checkbox-group.CNTMMwQr.js → checkbox-group.BAjvgXlc.js} +2 -2
- package/dist/chunks/{checkbox-group.CNTMMwQr.js.map → checkbox-group.BAjvgXlc.js.map} +1 -1
- package/dist/chunks/{checkbox.BIzqX_eH.js → checkbox.BAQDBNL6.js} +18 -18
- package/dist/chunks/{checkbox.BIzqX_eH.js.map → checkbox.BAQDBNL6.js.map} +1 -1
- package/dist/chunks/{code-snippet.lcQRsLdZ.js → code-snippet.nUo9bjhC.js} +3 -3
- package/dist/chunks/{code-snippet.lcQRsLdZ.js.map → code-snippet.nUo9bjhC.js.map} +1 -1
- package/dist/chunks/{country.BEwW8TQo.js → country.nGZJwp_A.js} +2 -2
- package/dist/chunks/country.nGZJwp_A.js.map +1 -0
- package/dist/chunks/{dashboard-section.DiGQXS9L.js → dashboard-section.BDDVJpxY.js} +2 -2
- package/dist/chunks/{dashboard-section.DiGQXS9L.js.map → dashboard-section.BDDVJpxY.js.map} +1 -1
- package/dist/chunks/{dashed-underline.Cl07OQID.js → dashed-underline.CfEmbgOv.js} +2 -2
- package/dist/chunks/{dashed-underline.Cl07OQID.js.map → dashed-underline.CfEmbgOv.js.map} +1 -1
- package/dist/chunks/{data-grid-template.BVppx9kZ.js → data-grid-template.BUlLHTYe.js} +2 -2
- package/dist/chunks/{data-grid-template.BVppx9kZ.js.map → data-grid-template.BUlLHTYe.js.map} +1 -1
- package/dist/chunks/{data-grid.DQwAkw4U.js → data-grid.0OiCQjFc.js} +28 -29
- package/dist/chunks/{data-grid.DQwAkw4U.js.map → data-grid.0OiCQjFc.js.map} +1 -1
- package/dist/chunks/date-picker.CsFSskqf.js +245 -0
- package/dist/chunks/date-picker.CsFSskqf.js.map +1 -0
- package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/date-range-picker.Bczgdu5X.js +1250 -0
- package/dist/chunks/date-range-picker.Bczgdu5X.js.map +1 -0
- package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/date-time-picker.DT54TiG4.js +177 -0
- package/dist/chunks/date-time-picker.DT54TiG4.js.map +1 -0
- package/dist/chunks/{draggable-handle.DIhHtHG9.js → draggable-handle.DwJBaf5y.js} +2 -2
- package/dist/chunks/{draggable-handle.DIhHtHG9.js.map → draggable-handle.DwJBaf5y.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.CuDxdSfb.js → dropdown-tag.BqSrkuwj.js} +2 -2
- package/dist/chunks/{dropdown-tag.CuDxdSfb.js.map → dropdown-tag.BqSrkuwj.js.map} +1 -1
- package/dist/chunks/dropdown.CIEm6MBB.js +2660 -0
- package/dist/chunks/dropdown.CIEm6MBB.js.map +1 -0
- package/dist/chunks/{file-uploader.CO2MeHwl.js → file-uploader.DOvQMUHC.js} +2 -2
- package/dist/chunks/{file-uploader.CO2MeHwl.js.map → file-uploader.DOvQMUHC.js.map} +1 -1
- package/dist/chunks/{filter-bar.DQ9fJXq1.js → filter-bar.DVRPM9tf.js} +318 -319
- package/dist/chunks/filter-bar.DVRPM9tf.js.map +1 -0
- package/dist/chunks/{footer-actions.CZE9dcmA.js → footer-actions.C1sXd7ti.js} +2 -2
- package/dist/chunks/{footer-actions.CZE9dcmA.js.map → footer-actions.C1sXd7ti.js.map} +1 -1
- package/dist/chunks/{form-layout-title.CXXdsiK5.js → form-layout-title.xrix5vY3.js} +2 -2
- package/dist/chunks/{form-layout-title.CXXdsiK5.js.map → form-layout-title.xrix5vY3.js.map} +1 -1
- package/dist/chunks/{header-meta.6rZdOgXD.js → header-meta.D1eb37QJ.js} +2 -2
- package/dist/chunks/{header-meta.6rZdOgXD.js.map → header-meta.D1eb37QJ.js.map} +1 -1
- package/dist/chunks/{header-with-views.4VNHbNk0.js → header-with-views.Bk6ly102.js} +8 -8
- package/dist/chunks/{header-with-views.4VNHbNk0.js.map → header-with-views.Bk6ly102.js.map} +1 -1
- package/dist/chunks/{header.BsroOD5b.js → header.CszOmM16.js} +3 -3
- package/dist/chunks/{header.BsroOD5b.js.map → header.CszOmM16.js.map} +1 -1
- package/dist/chunks/{input-field-password.CRqYWZGS.js → input-field-password.C4Wxsl16.js} +3 -3
- package/dist/chunks/{input-field-password.CRqYWZGS.js.map → input-field-password.C4Wxsl16.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.DHiuL0cF.js → input-field-phone-number.BhYTU628.js} +2 -2
- package/dist/chunks/{input-field-phone-number.DHiuL0cF.js.map → input-field-phone-number.BhYTU628.js.map} +1 -1
- package/dist/chunks/{input-field.BkQZ6Qzl.js → input-field.3tzX7t2y.js} +2 -2
- package/dist/chunks/{input-field.BkQZ6Qzl.js.map → input-field.3tzX7t2y.js.map} +1 -1
- package/dist/chunks/{input-time.BiOHvUEA.js → input-time.Bf-ZrCPX.js} +34 -34
- package/dist/chunks/{input-time.BiOHvUEA.js.map → input-time.Bf-ZrCPX.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.OS6KhVdg.js → modal-fullscreen.Dg1Hi3jB.js} +2 -2
- package/dist/chunks/{modal-fullscreen.OS6KhVdg.js.map → modal-fullscreen.Dg1Hi3jB.js.map} +1 -1
- package/dist/chunks/{modal.DHL3TGHv.js → modal.DZTEFM_E.js} +4 -4
- package/dist/chunks/{modal.DHL3TGHv.js.map → modal.DZTEFM_E.js.map} +1 -1
- package/dist/chunks/{pagination.DItyAwy1.js → pagination.C6HIPq58.js} +2 -2
- package/dist/chunks/{pagination.DItyAwy1.js.map → pagination.C6HIPq58.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.D5URbwnM.js → rich-text-editor.-B96ibAd.js} +3 -3
- package/dist/chunks/{rich-text-editor.D5URbwnM.js.map → rich-text-editor.-B96ibAd.js.map} +1 -1
- package/dist/chunks/{search-bar.D-WK8eMQ.js → search-bar.DunTxVmZ.js} +5 -5
- package/dist/chunks/{search-bar.D-WK8eMQ.js.map → search-bar.DunTxVmZ.js.map} +1 -1
- package/dist/chunks/{secondary-nav.C7lEDaoj.js → secondary-nav.CGGPkYpc.js} +2 -2
- package/dist/chunks/{secondary-nav.C7lEDaoj.js.map → secondary-nav.CGGPkYpc.js.map} +1 -1
- package/dist/chunks/{selection-card-group.CiFW4AZR.js → selection-card-group.ZZ_qF1L1.js} +8 -8
- package/dist/chunks/{selection-card-group.CiFW4AZR.js.map → selection-card-group.ZZ_qF1L1.js.map} +1 -1
- package/dist/chunks/{sidepanel.B8zQp_MJ.js → sidepanel.ChuW63J7.js} +3 -3
- package/dist/chunks/{sidepanel.B8zQp_MJ.js.map → sidepanel.ChuW63J7.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.CkqRXOKv.js → summary-grid.types.BnEhhDQz.js} +3 -3
- package/dist/chunks/summary-grid.types.BnEhhDQz.js.map +1 -0
- package/dist/chunks/{timeline-item.sdxvTjmS.js → timeline-item.DzMh520x.js} +3 -3
- package/dist/chunks/{timeline-item.sdxvTjmS.js.map → timeline-item.DzMh520x.js.map} +1 -1
- package/dist/chunks/{tutorial.Ba9dqb2j.js → tutorial.CkeL_7Je.js} +2 -2
- package/dist/chunks/{tutorial.Ba9dqb2j.js.map → tutorial.CkeL_7Je.js.map} +1 -1
- package/dist/chunks/use-bento-delayed-hover.D4rfUUOr.js.map +1 -1
- package/dist/chunks/{use-date-input-formatter.B5GQd3s2.js → use-date-input-formatter.Dq9C0nc9.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.B5GQd3s2.js.map → use-date-input-formatter.Dq9C0nc9.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +1 -1
- 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 +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date-time-picker.js +1 -1
- package/dist/draggable.js +1 -1
- package/dist/dropdown.js +10 -11
- package/dist/dropdown.js.map +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +269 -270
- 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/input-time.js +1 -1
- package/dist/internal.js +13 -13
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.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/sidepanel.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +205 -2
- package/package.json +3 -3
- package/dist/assets/use-cached-selected-values.css +0 -1
- package/dist/chunks/calendar.D0JIbmoS.js +0 -1151
- package/dist/chunks/calendar.D0JIbmoS.js.map +0 -1
- package/dist/chunks/country.BEwW8TQo.js.map +0 -1
- package/dist/chunks/date-picker.BWxvyK5J.js +0 -245
- package/dist/chunks/date-picker.BWxvyK5J.js.map +0 -1
- package/dist/chunks/date-range-picker.gfRJmzXn.js +0 -1114
- package/dist/chunks/date-range-picker.gfRJmzXn.js.map +0 -1
- package/dist/chunks/date-time-picker.BIl9kFLh.js +0 -129
- package/dist/chunks/date-time-picker.BIl9kFLh.js.map +0 -1
- package/dist/chunks/dropdown.C70AlvOT.js +0 -1155
- package/dist/chunks/dropdown.C70AlvOT.js.map +0 -1
- package/dist/chunks/filter-bar.DQ9fJXq1.js.map +0 -1
- package/dist/chunks/summary-grid.types.CkqRXOKv.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.D0s14AxT.js +0 -1520
- package/dist/chunks/use-cached-selected-values.D0s14AxT.js.map +0 -1
|
@@ -1,1155 +0,0 @@
|
|
|
1
|
-
import { ref as L, watch as Z, computed as n, defineComponent as A, useSlots as Q, toRefs as Ie, useAttrs as De, inject as ie, nextTick as B, toRef as T } from "vue";
|
|
2
|
-
import { B as Be, d as se } from "./typography.C8lPlsbD.js";
|
|
3
|
-
import { g as q } from "./generate-uid.NJ8tVoha.js";
|
|
4
|
-
import { u as G } from "./index.B6WW_F-J.js";
|
|
5
|
-
import { u as Ae } from "./use-has-slot.C9lQZ6nz.js";
|
|
6
|
-
import { C as ze } from "./cross-circle-fill.DTDtgLMf.js";
|
|
7
|
-
import { C as Ue } from "./cross-circle-fill-small.DfxDedRr.js";
|
|
8
|
-
import { n as M } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
9
|
-
import { s as z } from "./events.BQOQSSb7.js";
|
|
10
|
-
import { C as We } from "./chevron-down.eYtgv5ly.js";
|
|
11
|
-
import { C as je } from "./chevron-up.d8cwIlA_.js";
|
|
12
|
-
/* empty css */
|
|
13
|
-
import { u as He } from "./aria-label.CaUURpnB.js";
|
|
14
|
-
import { u as Ye } from "./form-field.D_2g7vaP.js";
|
|
15
|
-
import { B as m, b as re, a as Ce, d as Je, u as Xe, c as Ze, e as Qe } from "./use-cached-selected-values.D0s14AxT.js";
|
|
16
|
-
import { u as Ge } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
17
|
-
import { B as R, a as et } from "./keyboard-navigation.DWmhelVv.js";
|
|
18
|
-
import { B as tt } from "./directive.BBWhsNtO.js";
|
|
19
|
-
import { h as at, e as ot } from "./button-actions.D1jRC1fs.js";
|
|
20
|
-
import { F as lt } from "./field-label.CdVbAfK-.js";
|
|
21
|
-
import { E as nt } from "./error-message.CyERcfdt.js";
|
|
22
|
-
import { P as Le } from "./popper-container.CFYFCz6u.js";
|
|
23
|
-
import "../assets/dropdown.css";
|
|
24
|
-
var U = /* @__PURE__ */ ((l) => (l.DEFAULT = "DropdownInputDefault", l.SMALL = "DropdownInputSmall", l))(U || {});
|
|
25
|
-
const st = {
|
|
26
|
-
"de-DE": {
|
|
27
|
-
apply: "Anwenden",
|
|
28
|
-
cancel: "Abbrechen",
|
|
29
|
-
noOptionsMatchThisSearch: "Für diese Suche wurden keine Ergebnisse gefunden."
|
|
30
|
-
},
|
|
31
|
-
"en-GB": {
|
|
32
|
-
apply: "Apply",
|
|
33
|
-
cancel: "Cancel",
|
|
34
|
-
noOptionsMatchThisSearch: "No options match this search"
|
|
35
|
-
},
|
|
36
|
-
"en-US": {
|
|
37
|
-
apply: "Apply",
|
|
38
|
-
cancel: "Cancel",
|
|
39
|
-
noOptionsMatchThisSearch: "No options match this search"
|
|
40
|
-
},
|
|
41
|
-
"es-ES": {
|
|
42
|
-
apply: "Aplicar",
|
|
43
|
-
cancel: "Cancelar",
|
|
44
|
-
noOptionsMatchThisSearch: "No hay opciones que coincidan con esta búsqueda"
|
|
45
|
-
},
|
|
46
|
-
"es-MX": {
|
|
47
|
-
apply: "Aplicar",
|
|
48
|
-
cancel: "Cancelar",
|
|
49
|
-
noOptionsMatchThisSearch: "No hay opciones que coincidan con esta búsqueda"
|
|
50
|
-
},
|
|
51
|
-
"fr-FR": {
|
|
52
|
-
apply: "Appliquer",
|
|
53
|
-
cancel: "Annuler",
|
|
54
|
-
noOptionsMatchThisSearch: "Aucune option ne correspond à cette recherche"
|
|
55
|
-
},
|
|
56
|
-
"it-IT": {
|
|
57
|
-
apply: "Applica",
|
|
58
|
-
cancel: "Annulla",
|
|
59
|
-
noOptionsMatchThisSearch: "Nessun risultato corrispondente a questa ricerca"
|
|
60
|
-
},
|
|
61
|
-
"ja-JP": {
|
|
62
|
-
apply: "適用",
|
|
63
|
-
cancel: "キャンセル",
|
|
64
|
-
noOptionsMatchThisSearch: "この検索に一致するオプションはありません"
|
|
65
|
-
},
|
|
66
|
-
"pt-BR": {
|
|
67
|
-
apply: "Aplicar",
|
|
68
|
-
cancel: "Cancelar",
|
|
69
|
-
noOptionsMatchThisSearch: "Nenhuma opção corresponde a esta busca"
|
|
70
|
-
},
|
|
71
|
-
"zh-CN": {
|
|
72
|
-
apply: "应用",
|
|
73
|
-
cancel: "取消",
|
|
74
|
-
noOptionsMatchThisSearch: "没有符合此搜索条件的选项"
|
|
75
|
-
}
|
|
76
|
-
}, rt = (l, t, a, e) => {
|
|
77
|
-
const o = L(l.value), { t: s } = G();
|
|
78
|
-
Z(l, () => {
|
|
79
|
-
o.value = l.value;
|
|
80
|
-
});
|
|
81
|
-
const r = n(
|
|
82
|
-
() => JSON.stringify(o.value) === JSON.stringify(l.value)
|
|
83
|
-
), i = () => {
|
|
84
|
-
e(m.SELECT, o.value), e(m.CLOSE_DROPDOWN);
|
|
85
|
-
}, c = () => {
|
|
86
|
-
o.value = l.value, e(m.CLOSE_DROPDOWN);
|
|
87
|
-
}, v = () => {
|
|
88
|
-
a.value && t.value && (o.value = l.value);
|
|
89
|
-
}, b = n(() => [
|
|
90
|
-
{
|
|
91
|
-
title: s("apply"),
|
|
92
|
-
event: i,
|
|
93
|
-
disabled: r.value
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
title: s("cancel"),
|
|
97
|
-
event: c
|
|
98
|
-
}
|
|
99
|
-
]), f = (p) => {
|
|
100
|
-
o.value = p, t.value || e(m.SELECT, p);
|
|
101
|
-
}, d = (p) => {
|
|
102
|
-
f(p), e(m.TAB);
|
|
103
|
-
}, S = (p) => {
|
|
104
|
-
f(p), e(m.ENTER);
|
|
105
|
-
}, x = (p) => {
|
|
106
|
-
f(p), e(m.SPACE);
|
|
107
|
-
}, u = () => {
|
|
108
|
-
c(), e(m.ESCAPE);
|
|
109
|
-
}, C = () => {
|
|
110
|
-
e(m.SHOW_MORE);
|
|
111
|
-
}, g = {
|
|
112
|
-
[m.SELECT]: f,
|
|
113
|
-
[m.SHOW_MORE]: C,
|
|
114
|
-
[m.TAB]: d,
|
|
115
|
-
[m.SPACE]: x,
|
|
116
|
-
[m.ENTER]: S
|
|
117
|
-
};
|
|
118
|
-
return {
|
|
119
|
-
// Values
|
|
120
|
-
actions: b,
|
|
121
|
-
internalSelectedValue: o,
|
|
122
|
-
// Methods
|
|
123
|
-
listeners: g,
|
|
124
|
-
onEscapeKey: u,
|
|
125
|
-
onOutsideDropdownClick: v
|
|
126
|
-
};
|
|
127
|
-
}, it = A({
|
|
128
|
-
i18n: { messages: st },
|
|
129
|
-
name: "bento-dropdown-options-container"
|
|
130
|
-
}), dt = /* @__PURE__ */ A({
|
|
131
|
-
...it,
|
|
132
|
-
props: {
|
|
133
|
-
/**
|
|
134
|
-
* Defines a string value that labels an interactive element.
|
|
135
|
-
*/
|
|
136
|
-
ariaLabel: { type: String, default: null },
|
|
137
|
-
/**
|
|
138
|
-
* Indicates that dropdown items are loading
|
|
139
|
-
*/
|
|
140
|
-
componentLoading: { type: Boolean, default: !1 },
|
|
141
|
-
/**
|
|
142
|
-
* Empty state props used with the inner empty state component which is displayed when no search results are found.
|
|
143
|
-
*/
|
|
144
|
-
emptyState: {
|
|
145
|
-
type: Object,
|
|
146
|
-
default: void 0
|
|
147
|
-
},
|
|
148
|
-
/**
|
|
149
|
-
* Disables dropdown functionality
|
|
150
|
-
*/
|
|
151
|
-
disabled: { type: Boolean, default: !1 },
|
|
152
|
-
/**
|
|
153
|
-
* Indicates whether there are more items to load
|
|
154
|
-
*/
|
|
155
|
-
hasMoreItems: { type: Boolean, default: !1 },
|
|
156
|
-
/**
|
|
157
|
-
* Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.
|
|
158
|
-
*/
|
|
159
|
-
id: { type: String, required: !0 },
|
|
160
|
-
/**
|
|
161
|
-
* Function that allows the options to be disabled
|
|
162
|
-
*
|
|
163
|
-
* @type {BentoDropdownIsOptionDisabled}
|
|
164
|
-
* @param {BentoDropdownOptionItem} option - Dropdown option object
|
|
165
|
-
* @param {string} option.label - Option's label text
|
|
166
|
-
* @param {string|number} option.value - Option's value
|
|
167
|
-
* @param {unknown} option.data - Option's extra data to be passed to the default slot
|
|
168
|
-
*/
|
|
169
|
-
isOptionDisabled: {
|
|
170
|
-
type: Function,
|
|
171
|
-
default: void 0
|
|
172
|
-
},
|
|
173
|
-
/**
|
|
174
|
-
* The option elements to populate the dropdown with.
|
|
175
|
-
* It must be an array of {@see BentoDropdownOptionItem }
|
|
176
|
-
* * @property {string} value.label - Text to be displayed in the option
|
|
177
|
-
* * @property {string,number} value.value - Value of the option
|
|
178
|
-
*/
|
|
179
|
-
items: {
|
|
180
|
-
type: Array,
|
|
181
|
-
required: !0
|
|
182
|
-
},
|
|
183
|
-
/**
|
|
184
|
-
* The type of `Lazy Load`.
|
|
185
|
-
* Type "automatic" will enable infinite scrolling
|
|
186
|
-
* Type "button" will enable lazy loading with "Show more" button
|
|
187
|
-
*/
|
|
188
|
-
lazyLoadType: {
|
|
189
|
-
type: String,
|
|
190
|
-
default: Ce.AUTOMATIC,
|
|
191
|
-
validator: (l) => Object.values(Ce).includes(l)
|
|
192
|
-
},
|
|
193
|
-
/**
|
|
194
|
-
* Indicates if new options are lazy loading.
|
|
195
|
-
*/
|
|
196
|
-
loading: { type: Boolean, default: !1 },
|
|
197
|
-
/**
|
|
198
|
-
* If enabled, the user will be able to select multiple items.
|
|
199
|
-
*/
|
|
200
|
-
multiple: { type: Boolean, default: !1 },
|
|
201
|
-
/**
|
|
202
|
-
* Indicates if the dropdown is open so that
|
|
203
|
-
* the container can be displayed.
|
|
204
|
-
*/
|
|
205
|
-
open: { type: Boolean, required: !0 },
|
|
206
|
-
/**
|
|
207
|
-
* The `input` value.
|
|
208
|
-
* Providing an empty string or empty array will select no options.
|
|
209
|
-
* Set to an empty string `''` if you don't want any of the available options to be selected for single select
|
|
210
|
-
*/
|
|
211
|
-
selectedValue: {
|
|
212
|
-
type: Array,
|
|
213
|
-
default: null
|
|
214
|
-
},
|
|
215
|
-
/**
|
|
216
|
-
* Flag that indicates that an external search it's being made
|
|
217
|
-
* to filter out the items inside the the multi-select listbox
|
|
218
|
-
*
|
|
219
|
-
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
220
|
-
*/
|
|
221
|
-
searching: re.props.searching,
|
|
222
|
-
/**
|
|
223
|
-
* If enabled, dropdown will display non-selectable, static categories
|
|
224
|
-
*/
|
|
225
|
-
staticCategories: { type: Boolean, default: !1 },
|
|
226
|
-
/**
|
|
227
|
-
* Reference to the DOM element or Vue component for positioning
|
|
228
|
-
* the Dropdown container.
|
|
229
|
-
*/
|
|
230
|
-
targetElement: { type: Le.props.targetElement.type, required: !0 },
|
|
231
|
-
/**
|
|
232
|
-
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
233
|
-
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
234
|
-
*/
|
|
235
|
-
virtualScroll: {
|
|
236
|
-
type: [Boolean, Object],
|
|
237
|
-
default: !1
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
emits: [],
|
|
241
|
-
setup(l, { expose: t, emit: a }) {
|
|
242
|
-
const e = l, o = Q(), { selectedValue: s, multiple: r } = Ie(e), i = L(null), { t: c } = G(), v = n(() => e.open && !e.disabled), b = n(() => c("noOptionsMatchThisSearch")), f = n(() => ({
|
|
243
|
-
"b-dropdown-options-container--single": !(e != null && e.multiple)
|
|
244
|
-
})), d = n(() => ({
|
|
245
|
-
"b-dropdown-options-container__listbox--single": !(e != null && e.multiple)
|
|
246
|
-
})), { actions: S, internalSelectedValue: x, listeners: u, onEscapeKey: C, onOutsideDropdownClick: g } = rt(s, r, v, a), p = n(() => e != null && e.multiple ? at : Le), k = n(() => {
|
|
247
|
-
var D;
|
|
248
|
-
const I = {
|
|
249
|
-
"min-width": `${(D = e == null ? void 0 : e.targetElement) == null ? void 0 : D.clientWidth}px`,
|
|
250
|
-
"max-width": "min(500px, 95%)"
|
|
251
|
-
};
|
|
252
|
-
return e != null && e.multiple ? {
|
|
253
|
-
actionsLayout: "space-between",
|
|
254
|
-
ariaLabel: e.ariaLabel,
|
|
255
|
-
actions: S.value,
|
|
256
|
-
divider: !0,
|
|
257
|
-
fallbackPosition: ["top-start"],
|
|
258
|
-
id: q(`dropdown-options-${e.id}`),
|
|
259
|
-
open: e.open,
|
|
260
|
-
position: "bottom-start",
|
|
261
|
-
style: {
|
|
262
|
-
width: "auto",
|
|
263
|
-
...I
|
|
264
|
-
},
|
|
265
|
-
targetElement: e.targetElement
|
|
266
|
-
} : {
|
|
267
|
-
fallbackPosition: ["top-start"],
|
|
268
|
-
offset: [0, 8],
|
|
269
|
-
position: "bottom-start",
|
|
270
|
-
style: {
|
|
271
|
-
display: v.value ? "block" : "none",
|
|
272
|
-
...I
|
|
273
|
-
},
|
|
274
|
-
targetElement: e.targetElement
|
|
275
|
-
};
|
|
276
|
-
});
|
|
277
|
-
return t({
|
|
278
|
-
onOutsideDropdownClick: g
|
|
279
|
-
}), { __sfc: !0, slots: o, emit: a, props: e, selectedValue: s, multiple: r, dropdownOptionsListboxRef: i, t: c, isDropdownOpen: v, noResultsMessage: b, conditionalClasses: f, conditionalListboxClasses: d, actions: S, internalSelectedValue: x, listeners: u, onEscapeKey: C, onOutsideDropdownClick: g, popperContainerOrPopoverComponent: p, popperContainerOrPopoverProps: k, BentoListbox: re };
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
var ct = function() {
|
|
283
|
-
var t = this, a = t._self._c, e = t._self._setupProxy;
|
|
284
|
-
return e.isDropdownOpen ? a(e.popperContainerOrPopoverComponent, t._b({ tag: "component", staticClass: "b-dropdown-options-container", class: e.conditionalClasses }, "component", e.popperContainerOrPopoverProps, !1), [a("div", { on: { keydown: function(o) {
|
|
285
|
-
return !o.type.indexOf("key") && t._k(o.keyCode, "esc", 27, o.key, ["Esc", "Escape"]) ? null : e.onEscapeKey.apply(null, arguments);
|
|
286
|
-
} } }, [a(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(o, s) {
|
|
287
|
-
return { key: s, fn: function(r) {
|
|
288
|
-
return [t._t(s, null, null, r)];
|
|
289
|
-
} };
|
|
290
|
-
})], null, !0) }, e.listeners))], 1)]) : t._e();
|
|
291
|
-
}, ut = [], pt = /* @__PURE__ */ M(
|
|
292
|
-
dt,
|
|
293
|
-
ct,
|
|
294
|
-
ut,
|
|
295
|
-
!1,
|
|
296
|
-
null,
|
|
297
|
-
"eb9fd4be"
|
|
298
|
-
);
|
|
299
|
-
const ft = pt.exports;
|
|
300
|
-
var E = /* @__PURE__ */ ((l) => (l.DISABLED = "disabled", l.READONLY = "readonly", l.HAS_ITEMS = "has-items", l.OPENED = "opened", l.ERROR = "error", l))(E || {}), h = /* @__PURE__ */ ((l) => (l.OPEN = "dropdown-base-open", l.KEYDOWN = "dropdown-base-keydown", l.CLOSE = "dropdown-base-close", l.INPUT = "dropdown-base-input", l.CLEAR = "dropdown-base-clear", l))(h || {});
|
|
301
|
-
const bt = /* @__PURE__ */ Symbol("dropdown small size injection key"), Te = /* @__PURE__ */ Symbol("dropdown underline style injection key"), yt = {
|
|
302
|
-
"de-DE": {
|
|
303
|
-
clearSearch: "Suche löschen"
|
|
304
|
-
},
|
|
305
|
-
"en-GB": {
|
|
306
|
-
clearSearch: "Clear search"
|
|
307
|
-
},
|
|
308
|
-
"en-US": {
|
|
309
|
-
clearSearch: "Clear search"
|
|
310
|
-
},
|
|
311
|
-
"es-ES": {
|
|
312
|
-
clearSearch: "Borrar búsqueda"
|
|
313
|
-
},
|
|
314
|
-
"es-MX": {
|
|
315
|
-
clearSearch: "Borrar búsqueda"
|
|
316
|
-
},
|
|
317
|
-
"fr-FR": {
|
|
318
|
-
clearSearch: "Effacer la recherche"
|
|
319
|
-
},
|
|
320
|
-
"it-IT": {
|
|
321
|
-
clearSearch: "Cancella ricerca"
|
|
322
|
-
},
|
|
323
|
-
"ja-JP": {
|
|
324
|
-
clearSearch: "検索をクリア"
|
|
325
|
-
},
|
|
326
|
-
"pt-BR": {
|
|
327
|
-
clearSearch: "Limpar busca"
|
|
328
|
-
},
|
|
329
|
-
"zh-CN": {
|
|
330
|
-
clearSearch: "清除搜索"
|
|
331
|
-
}
|
|
332
|
-
}, vt = A({
|
|
333
|
-
i18n: { messages: yt },
|
|
334
|
-
name: "dropdown-base-textbox",
|
|
335
|
-
inheritAttrs: !1
|
|
336
|
-
}), mt = /* @__PURE__ */ A({
|
|
337
|
-
...vt,
|
|
338
|
-
props: {
|
|
339
|
-
/**
|
|
340
|
-
* The number of additional items that have been selected in the dropdown.
|
|
341
|
-
*/
|
|
342
|
-
additionalItemsSelected: { type: [Number, String], default: 0 },
|
|
343
|
-
/**
|
|
344
|
-
* If the combobox DOM element should be an `input` element.
|
|
345
|
-
*/
|
|
346
|
-
alwaysComboboxIsInput: {
|
|
347
|
-
type: Boolean,
|
|
348
|
-
default: !1
|
|
349
|
-
},
|
|
350
|
-
/**
|
|
351
|
-
* Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.
|
|
352
|
-
*/
|
|
353
|
-
ariaControls: { type: String, required: !0 },
|
|
354
|
-
/**
|
|
355
|
-
* Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.
|
|
356
|
-
*/
|
|
357
|
-
ariaExpanded: {
|
|
358
|
-
type: [String, Boolean],
|
|
359
|
-
required: !0
|
|
360
|
-
},
|
|
361
|
-
/**
|
|
362
|
-
* If no label element is used then the aria-label is be set should be set.
|
|
363
|
-
*/
|
|
364
|
-
ariaLabel: { type: String, default: null },
|
|
365
|
-
/**
|
|
366
|
-
* Corresponds to the label's id that labels the textbox element.
|
|
367
|
-
*/
|
|
368
|
-
ariaLabelledby: { type: String, default: null },
|
|
369
|
-
/**
|
|
370
|
-
* Disables any textbox functionality
|
|
371
|
-
*/
|
|
372
|
-
disabled: { type: Boolean, default: !1 },
|
|
373
|
-
/**
|
|
374
|
-
* Selected option's label
|
|
375
|
-
*/
|
|
376
|
-
displayValue: { type: String, default: null },
|
|
377
|
-
/**
|
|
378
|
-
* Sets the possibility to type into the textbox.
|
|
379
|
-
*/
|
|
380
|
-
dynamicFiltering: { type: Boolean, default: !1 },
|
|
381
|
-
/**
|
|
382
|
-
* Marks the textbox as invalid, rendering an error state
|
|
383
|
-
*/
|
|
384
|
-
isInvalid: { type: Boolean, default: !1 },
|
|
385
|
-
/*
|
|
386
|
-
* If enabled, the user will be able to select multiple items.
|
|
387
|
-
*/
|
|
388
|
-
multiple: { type: Boolean, default: !1 },
|
|
389
|
-
/**
|
|
390
|
-
* Indicates if the dropdown is open so that
|
|
391
|
-
* the respective event can be emitted
|
|
392
|
-
*/
|
|
393
|
-
open: { type: Boolean, default: !1 },
|
|
394
|
-
/**
|
|
395
|
-
* Sets the dropdown to readonly state
|
|
396
|
-
*/
|
|
397
|
-
readonly: { type: Boolean, default: !1 },
|
|
398
|
-
/**
|
|
399
|
-
* The input value
|
|
400
|
-
*/
|
|
401
|
-
value: { type: String, default: "" },
|
|
402
|
-
/**
|
|
403
|
-
* The selected value's list box item.
|
|
404
|
-
*/
|
|
405
|
-
selectedValueItem: {
|
|
406
|
-
type: [Object, Array],
|
|
407
|
-
default: void 0
|
|
408
|
-
},
|
|
409
|
-
/**
|
|
410
|
-
* Toggles whether to use the slot content select items shown in the textbox in multiple mode.
|
|
411
|
-
*/
|
|
412
|
-
showSlotContentInMultiple: { type: Boolean, default: !1 },
|
|
413
|
-
/**
|
|
414
|
-
* Dropdown size
|
|
415
|
-
*/
|
|
416
|
-
size: {
|
|
417
|
-
type: String,
|
|
418
|
-
default: null
|
|
419
|
-
}
|
|
420
|
-
},
|
|
421
|
-
emits: [],
|
|
422
|
-
setup(l, { expose: t, emit: a }) {
|
|
423
|
-
const e = l, { t: o } = G(), s = De(), r = Q(), i = Ae(r), c = L(null), v = q("textbox"), b = ie(Te, !1), f = n(() => ({
|
|
424
|
-
[`b-dropdown-base-textbox--${E.DISABLED}`]: e.disabled,
|
|
425
|
-
[`b-dropdown-base-textbox--${E.READONLY}`]: e.readonly,
|
|
426
|
-
[`b-dropdown-base-textbox--${E.HAS_ITEMS}`]: !!e.additionalItemsSelected,
|
|
427
|
-
"b-dropdown-base-textbox--underline": b
|
|
428
|
-
})), d = n(
|
|
429
|
-
() => g.value && s["aria-required"] ? "true" : null
|
|
430
|
-
), S = n(() => ({
|
|
431
|
-
"b-dropdown-base-textbox__input--dynamic-filtering": e.dynamicFiltering
|
|
432
|
-
})), x = n(() => e.dynamicFiltering && !!e.value && e.open), u = n(
|
|
433
|
-
() => {
|
|
434
|
-
var O;
|
|
435
|
-
return {
|
|
436
|
-
"aria-haspopup": "listbox",
|
|
437
|
-
"aria-controls": e.ariaControls,
|
|
438
|
-
"aria-describedby": (O = s["aria-describedby"]) == null ? void 0 : O.toString(),
|
|
439
|
-
"aria-expanded": e.ariaExpanded ? "true" : "false",
|
|
440
|
-
"aria-labelledby": e.ariaLabelledby,
|
|
441
|
-
"aria-label": e.ariaLabelledby ? null : e.ariaLabel,
|
|
442
|
-
"aria-invalid": e.isInvalid,
|
|
443
|
-
"aria-disabled": e.disabled ? !0 : null,
|
|
444
|
-
"aria-required": s["aria-required"]
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
), C = n(
|
|
448
|
-
() => e.multiple ? e.selectedValueItem : []
|
|
449
|
-
), g = n(() => e.dynamicFiltering && (e.open || e.alwaysComboboxIsInput)), p = n(() => e.selectedValueItem && !e.multiple), k = n(
|
|
450
|
-
() => e.multiple && e.selectedValueItem && C.value.length > 0 && e.showSlotContentInMultiple
|
|
451
|
-
);
|
|
452
|
-
Z(
|
|
453
|
-
() => g.value,
|
|
454
|
-
() => {
|
|
455
|
-
g.value && !e.alwaysComboboxIsInput && B(() => {
|
|
456
|
-
c.value.focus();
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
);
|
|
460
|
-
const I = async () => {
|
|
461
|
-
!e.disabled && !e.readonly && (a(h.OPEN), await B(), c.value.focus());
|
|
462
|
-
}, D = () => {
|
|
463
|
-
e.open && (c.value.focus(), a(h.CLOSE));
|
|
464
|
-
}, F = (O) => e.open && O.target.tagName === "INPUT" ? null : e.open ? D() : I(), P = () => {
|
|
465
|
-
a(h.CLEAR), a(h.INPUT, ""), c.value.focus();
|
|
466
|
-
}, $ = (O) => {
|
|
467
|
-
!e.readonly && !e.disabled ? a(h.INPUT, O.target.value) : (O.preventDefault(), O.stopPropagation());
|
|
468
|
-
}, N = () => {
|
|
469
|
-
c.value.focus();
|
|
470
|
-
};
|
|
471
|
-
return t({
|
|
472
|
-
focus: N
|
|
473
|
-
}), { __sfc: !0, t: o, attrs: s, slots: r, hasSlot: i, props: e, emit: a, textbox: c, textboxId: v, isUnderlineStyle: b, conditionalClasses: f, showRequiredAttribute: d, comboboxConditionalClasses: S, isFiltering: x, ariaAttributes: u, selectedValueItems: C, shouldShowInput: g, shouldShowSingleSelectSlot: p, shouldShowMultipleSlot: k, onOpenDropdown: I, onCloseDropdown: D, onToggleDropdown: F, onClearSearch: P, onInputEvent: $, focus: N, BentoTypography: Be, DropdownBaseTextboxEvent: h, CrossCircleFillIcon: ze, CrossCircleFillSmallIcon: Ue, BentoDropdownSize: U };
|
|
474
|
-
}
|
|
475
|
-
});
|
|
476
|
-
var _t = function() {
|
|
477
|
-
var t = this, a = t._self._c, e = t._self._setupProxy;
|
|
478
|
-
return a("div", { class: t.$attrs.class, attrs: { "data-testid": "textbox-wrapper" }, on: { click: e.onToggleDropdown, keydown: function(o) {
|
|
479
|
-
return !o.type.indexOf("key") && t._k(o.keyCode, "escape", void 0, o.key, void 0) ? null : e.onCloseDropdown.apply(null, arguments);
|
|
480
|
-
} } }, [a(e.BentoTypography, { staticClass: "b-dropdown-base-textbox", class: e.conditionalClasses, attrs: { variant: e.isUnderlineStyle ? "title" : "body", el: "div", "data-testid": "base-textbox" } }, [e.shouldShowInput ? a("input", t._b({ ref: "textbox", staticClass: "b-dropdown-base-textbox__input", attrs: { id: e.textboxId, role: "combobox", type: "text", "aria-autocomplete": "list", size: "1", disabled: t.disabled ? !0 : null, readonly: t.readonly, required: e.showRequiredAttribute }, domProps: { value: t.open ? t.value : t.displayValue }, on: { keydown: [function(o) {
|
|
481
|
-
return t.$emit(e.DropdownBaseTextboxEvent.KEYDOWN, o);
|
|
482
|
-
}, function(o) {
|
|
483
|
-
return !o.type.indexOf("key") && t._k(o.keyCode, "enter", 13, o.key, "Enter") ? null : e.onToggleDropdown.apply(null, arguments);
|
|
484
|
-
}], input: e.onInputEvent } }, "input", e.ariaAttributes, !1)) : a("div", t._b({ ref: "textbox", staticClass: "b-dropdown-base-textbox__input", class: e.comboboxConditionalClasses, attrs: { id: e.textboxId, "aria-readonly": t.readonly ? "true" : null, role: "combobox", tabindex: t.disabled ? -1 : 0 } }, "div", e.ariaAttributes, !1), [e.shouldShowSingleSelectSlot ? [e.hasSlot("display-value") ? t._t("display-value", null, null, t.selectedValueItem) : t._t("default", function() {
|
|
485
|
-
return [t._v(" " + t._s(t.displayValue) + " ")];
|
|
486
|
-
}, null, t.selectedValueItem)] : e.shouldShowMultipleSlot ? [a("div", { staticClass: "b-dropdown-base-textbox__input-multiple-selected" }, t._l(e.selectedValueItems, function(o) {
|
|
487
|
-
return a("div", { key: o.value }, [a("div", { staticClass: "b-dropdown-base-textbox__input-selected-element" }, [t._t("default", function() {
|
|
488
|
-
return [t._v(" " + t._s(t.displayValue) + " ")];
|
|
489
|
-
}, null, o)], 2)]);
|
|
490
|
-
}), 0)] : [t._v(t._s(t.displayValue))]], 2), t.additionalItemsSelected ? a("span", { staticClass: "b-dropdown-base-textbox__additional-items" }, [t._v(" " + t._s(t.additionalItemsSelected) + " ")]) : t._e(), e.hasSlot("icon") && !e.isFiltering ? a("span", { staticClass: "b-dropdown-base-textbox__icon", attrs: { "aria-hidden": "true" } }, [t._t("icon")], 2) : t._e(), e.isFiltering ? a("span", { staticClass: "b-dropdown-base-textbox__clear-search", attrs: { tabindex: t.disabled ? -1 : 0, "data-testid": "clear-search-button" }, on: { click: function(o) {
|
|
491
|
-
return o.stopPropagation(), e.onClearSearch.apply(null, arguments);
|
|
492
|
-
}, keydown: function(o) {
|
|
493
|
-
return !o.type.indexOf("key") && t._k(o.keyCode, "enter", 13, o.key, "Enter") ? null : (o.stopPropagation(), e.onClearSearch.apply(null, arguments));
|
|
494
|
-
}, keyup: function(o) {
|
|
495
|
-
return !o.type.indexOf("key") && t._k(o.keyCode, "space", 32, o.key, [" ", "Spacebar"]) ? null : e.onClearSearch.apply(null, arguments);
|
|
496
|
-
} } }, [t.size === e.BentoDropdownSize.SMALL ? a(e.CrossCircleFillSmallIcon, { attrs: { "svg-title": e.t("clearSearch") } }) : a(e.CrossCircleFillIcon, { attrs: { "svg-title": e.t("clearSearch") } })], 1) : t._e()])], 1);
|
|
497
|
-
}, ht = [], gt = /* @__PURE__ */ M(
|
|
498
|
-
mt,
|
|
499
|
-
_t,
|
|
500
|
-
ht,
|
|
501
|
-
!1,
|
|
502
|
-
null,
|
|
503
|
-
"4d2fd594"
|
|
504
|
-
);
|
|
505
|
-
const ke = gt.exports, St = A({
|
|
506
|
-
name: "dropdown-default-textbox",
|
|
507
|
-
inheritAttrs: !1
|
|
508
|
-
}), xt = /* @__PURE__ */ A({
|
|
509
|
-
...St,
|
|
510
|
-
props: {
|
|
511
|
-
/**
|
|
512
|
-
* The number of additional items that have been selected in the dropdown.
|
|
513
|
-
*/
|
|
514
|
-
additionalItemsSelected: { type: [Number, String], default: 0 },
|
|
515
|
-
/**
|
|
516
|
-
* Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.
|
|
517
|
-
*/
|
|
518
|
-
ariaControls: {
|
|
519
|
-
type: String,
|
|
520
|
-
required: !0
|
|
521
|
-
},
|
|
522
|
-
/**
|
|
523
|
-
* Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.
|
|
524
|
-
*/
|
|
525
|
-
ariaExpanded: {
|
|
526
|
-
type: [String, Boolean],
|
|
527
|
-
required: !0
|
|
528
|
-
},
|
|
529
|
-
/**
|
|
530
|
-
* If no label element is used then the aria-label is be set should be set.
|
|
531
|
-
*/
|
|
532
|
-
ariaLabel: {
|
|
533
|
-
type: String,
|
|
534
|
-
default: null
|
|
535
|
-
},
|
|
536
|
-
/**
|
|
537
|
-
* Corresponds to the label's id that labels the textbox element.
|
|
538
|
-
*/
|
|
539
|
-
ariaLabelledby: {
|
|
540
|
-
type: String,
|
|
541
|
-
default: null
|
|
542
|
-
},
|
|
543
|
-
/**
|
|
544
|
-
* Renders the dropdown with a condensed style.
|
|
545
|
-
*/
|
|
546
|
-
condensed: { type: Boolean, default: !1 },
|
|
547
|
-
/**
|
|
548
|
-
* Disables any textbox functionality
|
|
549
|
-
*/
|
|
550
|
-
disabled: { type: Boolean, default: !1 },
|
|
551
|
-
/**
|
|
552
|
-
* Selected option's label
|
|
553
|
-
*/
|
|
554
|
-
displayValue: { type: String, default: null },
|
|
555
|
-
/**
|
|
556
|
-
* Sets the possibility to type into the textbox
|
|
557
|
-
*/
|
|
558
|
-
dynamicFiltering: {
|
|
559
|
-
type: Boolean,
|
|
560
|
-
default: !1
|
|
561
|
-
},
|
|
562
|
-
/**
|
|
563
|
-
* Marks the textbox as invalid, rendering an error state
|
|
564
|
-
*/
|
|
565
|
-
isInvalid: { type: Boolean, default: !1 },
|
|
566
|
-
/**
|
|
567
|
-
* Indicates if the dropdown is open so that
|
|
568
|
-
* the respective event can be emitted
|
|
569
|
-
*/
|
|
570
|
-
open: { type: Boolean, default: !1 },
|
|
571
|
-
/**
|
|
572
|
-
* Sets the dropdown to readonly state
|
|
573
|
-
*/
|
|
574
|
-
readonly: { type: Boolean, default: !1 },
|
|
575
|
-
/**
|
|
576
|
-
* The selected value's list box item.
|
|
577
|
-
*/
|
|
578
|
-
selectedValueItem: {
|
|
579
|
-
type: [Object, Array],
|
|
580
|
-
default: void 0
|
|
581
|
-
},
|
|
582
|
-
/**
|
|
583
|
-
* Toggles whether to use the slot content select items shown in the textbox in multiple mode.
|
|
584
|
-
*/
|
|
585
|
-
showSlotContentInMultiple: { type: Boolean, default: !1 },
|
|
586
|
-
/**
|
|
587
|
-
* The input value
|
|
588
|
-
*/
|
|
589
|
-
value: { type: String, default: "" },
|
|
590
|
-
/*
|
|
591
|
-
* If enabled, the user will be able to select multiple items.
|
|
592
|
-
*/
|
|
593
|
-
multiple: { type: Boolean, default: !1 }
|
|
594
|
-
},
|
|
595
|
-
emits: ["clear", "close", "input", "keydown", "open"],
|
|
596
|
-
setup(l, { expose: t, emit: a }) {
|
|
597
|
-
const e = l, o = Q(), s = L(null), r = n(() => ({
|
|
598
|
-
[`b-dropdown-default-textbox--${E.ERROR}`]: !e.disabled && !e.readonly && e.isInvalid,
|
|
599
|
-
[`b-dropdown-default-textbox--${E.DISABLED}`]: e.disabled,
|
|
600
|
-
[`b-dropdown-default-textbox--${E.READONLY}`]: e.readonly,
|
|
601
|
-
[`b-dropdown-default-textbox--${E.OPENED}`]: e.open,
|
|
602
|
-
"b-dropdown-default-textbox--condensed": e.condensed
|
|
603
|
-
})), i = n(() => e.open && !e.disabled && !e.readonly), c = (u) => {
|
|
604
|
-
a("input", u);
|
|
605
|
-
}, v = (u) => {
|
|
606
|
-
a("keydown", u);
|
|
607
|
-
}, b = (u) => {
|
|
608
|
-
z(u), a("open");
|
|
609
|
-
}, f = (u) => {
|
|
610
|
-
z(u), a("close");
|
|
611
|
-
}, d = (u) => {
|
|
612
|
-
z(u), a("clear");
|
|
613
|
-
}, S = {
|
|
614
|
-
[h.INPUT]: c,
|
|
615
|
-
[h.OPEN]: b,
|
|
616
|
-
[h.CLOSE]: f,
|
|
617
|
-
[h.CLEAR]: d,
|
|
618
|
-
[h.KEYDOWN]: v
|
|
619
|
-
}, x = () => {
|
|
620
|
-
s.value.focus();
|
|
621
|
-
};
|
|
622
|
-
return t({
|
|
623
|
-
focus: x
|
|
624
|
-
}), { __sfc: !0, emit: a, slots: o, props: e, baseTextbox: s, conditionalClasses: r, isDropdownOpen: i, onInput: c, onKeyDown: v, openDropdown: b, closeDropdown: f, clearValue: d, listeners: S, focus: x, DropdownBaseTextbox: ke, ChevronDownIcon: We, ChevronUpIcon: je };
|
|
625
|
-
}
|
|
626
|
-
});
|
|
627
|
-
var wt = function() {
|
|
628
|
-
var t = this, a = t._self._c, e = t._self._setupProxy;
|
|
629
|
-
return a("div", { staticClass: "b-dropdown-default-textbox", class: e.conditionalClasses, attrs: { "data-testid": "default-textbox" } }, [a(e.DropdownBaseTextbox, t._g(t._b({ ref: "baseTextbox", staticClass: "b-dropdown-default-textbox__textbox", attrs: { value: t.value }, scopedSlots: t._u([t._l(e.slots, function(o, s) {
|
|
630
|
-
return { key: s, fn: function(r) {
|
|
631
|
-
return [t._t(s, null, null, r ?? {})];
|
|
632
|
-
} };
|
|
633
|
-
}), { key: "icon", fn: function() {
|
|
634
|
-
return [a("div", { staticClass: "b-dropdown-default-textbox__chevron" }, [a(e.ChevronUpIcon, { directives: [{ name: "show", rawName: "v-show", value: e.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), a(e.ChevronDownIcon, { directives: [{ name: "show", rawName: "v-show", value: !e.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
|
|
635
|
-
}, proxy: !0 }], null, !0) }, "dropdown-base-textbox", { ...t.$attrs, ...t.$props }, !1), e.listeners))], 1);
|
|
636
|
-
}, Ct = [], Lt = /* @__PURE__ */ M(
|
|
637
|
-
xt,
|
|
638
|
-
wt,
|
|
639
|
-
Ct,
|
|
640
|
-
!1,
|
|
641
|
-
null,
|
|
642
|
-
"bf2d43b0"
|
|
643
|
-
);
|
|
644
|
-
const Ot = Lt.exports;
|
|
645
|
-
let Oe = 0;
|
|
646
|
-
const Et = {
|
|
647
|
-
beforeCreate() {
|
|
648
|
-
this.uuid = Oe.toString(), Oe += 1;
|
|
649
|
-
}
|
|
650
|
-
};
|
|
651
|
-
var It = function() {
|
|
652
|
-
var t = this, a = t._self._c;
|
|
653
|
-
return a("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"] ? a("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), a("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" } })]);
|
|
654
|
-
}, Dt = [], Bt = /* @__PURE__ */ M(
|
|
655
|
-
Et,
|
|
656
|
-
It,
|
|
657
|
-
Dt,
|
|
658
|
-
!1,
|
|
659
|
-
null,
|
|
660
|
-
null
|
|
661
|
-
);
|
|
662
|
-
const At = Bt.exports;
|
|
663
|
-
let Ee = 0;
|
|
664
|
-
const Tt = {
|
|
665
|
-
beforeCreate() {
|
|
666
|
-
this.uuid = Ee.toString(), Ee += 1;
|
|
667
|
-
}
|
|
668
|
-
};
|
|
669
|
-
var kt = function() {
|
|
670
|
-
var t = this, a = t._self._c;
|
|
671
|
-
return a("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"] ? a("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), a("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" } })]);
|
|
672
|
-
}, Rt = [], Nt = /* @__PURE__ */ M(
|
|
673
|
-
Tt,
|
|
674
|
-
kt,
|
|
675
|
-
Rt,
|
|
676
|
-
!1,
|
|
677
|
-
null,
|
|
678
|
-
null
|
|
679
|
-
);
|
|
680
|
-
const Mt = Nt.exports, Ft = A({
|
|
681
|
-
name: "dropdown-small-textbox",
|
|
682
|
-
inheritAttrs: !1
|
|
683
|
-
}), Pt = /* @__PURE__ */ A({
|
|
684
|
-
...Ft,
|
|
685
|
-
props: {
|
|
686
|
-
/**
|
|
687
|
-
* The number of additional items that have been selected in the dropdown.
|
|
688
|
-
*/
|
|
689
|
-
additionalItemsSelected: { type: [Number, String], default: 0 },
|
|
690
|
-
/**
|
|
691
|
-
* Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.
|
|
692
|
-
*/
|
|
693
|
-
ariaControls: { type: String, required: !0 },
|
|
694
|
-
/**
|
|
695
|
-
* Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.
|
|
696
|
-
*/
|
|
697
|
-
ariaExpanded: {
|
|
698
|
-
type: [String, Boolean],
|
|
699
|
-
required: !0
|
|
700
|
-
},
|
|
701
|
-
/**
|
|
702
|
-
* If no label element is used then the aria-label is be set should be set.
|
|
703
|
-
*/
|
|
704
|
-
ariaLabel: { type: String, default: null },
|
|
705
|
-
/**
|
|
706
|
-
* Corresponds to the label's id that labels the textbox element.
|
|
707
|
-
*/
|
|
708
|
-
ariaLabelledby: { type: String, default: null },
|
|
709
|
-
/**
|
|
710
|
-
* Disables any textbox functionality
|
|
711
|
-
*/
|
|
712
|
-
disabled: { type: Boolean, default: !1 },
|
|
713
|
-
/**
|
|
714
|
-
* Selected option's label
|
|
715
|
-
*/
|
|
716
|
-
displayValue: { type: String, default: null },
|
|
717
|
-
/**
|
|
718
|
-
* Sets the possibility to type into the textbox
|
|
719
|
-
*/
|
|
720
|
-
dynamicFiltering: { type: Boolean, default: !1 },
|
|
721
|
-
/**
|
|
722
|
-
* Marks the textbox as invalid, rendering an error state
|
|
723
|
-
*/
|
|
724
|
-
isInvalid: { type: Boolean, default: !1 },
|
|
725
|
-
/**
|
|
726
|
-
* Indicates if the dropdown is open so that
|
|
727
|
-
* the respective event can be emitted
|
|
728
|
-
*/
|
|
729
|
-
open: { type: Boolean, default: !1 },
|
|
730
|
-
/**
|
|
731
|
-
* Sets the dropdown to readonly state
|
|
732
|
-
*/
|
|
733
|
-
readonly: { type: Boolean, default: !1 },
|
|
734
|
-
/**
|
|
735
|
-
* The input value
|
|
736
|
-
*/
|
|
737
|
-
value: { type: String, default: "" }
|
|
738
|
-
},
|
|
739
|
-
emits: ["clear", "close", "input", "keydown", "open"],
|
|
740
|
-
setup(l, { expose: t, emit: a }) {
|
|
741
|
-
const e = l, o = L(null), s = ie(Te, !1), r = n(() => ({
|
|
742
|
-
[`b-dropdown-small-textbox--${E.DISABLED}`]: e.disabled,
|
|
743
|
-
[`b-dropdown-small-textbox--${E.READONLY}`]: e.readonly,
|
|
744
|
-
[`b-dropdown-small-textbox--${E.OPENED}`]: e.open,
|
|
745
|
-
"b-dropdown-small-textbox--underline": s
|
|
746
|
-
})), i = n(() => e.open && !e.disabled && !e.readonly), c = (u) => {
|
|
747
|
-
a("input", u);
|
|
748
|
-
}, v = (u) => {
|
|
749
|
-
a("keydown", u);
|
|
750
|
-
}, b = (u) => {
|
|
751
|
-
z(u), a("open");
|
|
752
|
-
}, f = (u) => {
|
|
753
|
-
z(u), a("close");
|
|
754
|
-
}, d = (u) => {
|
|
755
|
-
z(u), a("clear");
|
|
756
|
-
}, S = {
|
|
757
|
-
[h.INPUT]: c,
|
|
758
|
-
[h.OPEN]: b,
|
|
759
|
-
[h.CLOSE]: f,
|
|
760
|
-
[h.CLEAR]: d,
|
|
761
|
-
[h.KEYDOWN]: v
|
|
762
|
-
}, x = () => {
|
|
763
|
-
o.value.focus();
|
|
764
|
-
};
|
|
765
|
-
return t({
|
|
766
|
-
focus: x
|
|
767
|
-
}), { __sfc: !0, emit: a, props: e, baseTextbox: o, isUnderlineStyle: s, conditionalClasses: r, isDropdownOpen: i, onInput: c, onKeyDown: v, openDropdown: b, closeDropdown: f, clearValue: d, listeners: S, focus: x, BentoDropdownSize: U, DropdownBaseTextbox: ke, ChevronDownSmallIcon: At, ChevronUpSmallIcon: Mt };
|
|
768
|
-
}
|
|
769
|
-
});
|
|
770
|
-
var $t = function() {
|
|
771
|
-
var t = this, a = t._self._c, e = t._self._setupProxy;
|
|
772
|
-
return a("div", { staticClass: "b-dropdown-small-textbox", class: e.conditionalClasses }, [a(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() {
|
|
773
|
-
return [a("div", { staticClass: "b-dropdown-small-textbox__chevron" }, [a(e.ChevronUpSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: e.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), a(e.ChevronDownSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: !e.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
|
|
774
|
-
}, proxy: !0 }]) }, "dropdown-base-textbox", { ...t.$attrs, ...t.$props }, !1), e.listeners))], 1);
|
|
775
|
-
}, Vt = [], Kt = /* @__PURE__ */ M(
|
|
776
|
-
Pt,
|
|
777
|
-
$t,
|
|
778
|
-
Vt,
|
|
779
|
-
!1,
|
|
780
|
-
null,
|
|
781
|
-
"fa225e76"
|
|
782
|
-
);
|
|
783
|
-
const qt = Kt.exports, zt = (l, t) => t.value.reduce((a, e) => {
|
|
784
|
-
if (e.items) {
|
|
785
|
-
const o = e.items.filter(
|
|
786
|
-
(r) => l.value.find((i) => i.value === r.value)
|
|
787
|
-
);
|
|
788
|
-
o.length === e.items.length ? a.push(e.displayValue ?? e.label) : o.forEach(({ label: r, displayValue: i }) => a.push(i ?? r));
|
|
789
|
-
}
|
|
790
|
-
return l.value.find((o) => o.value === e.value) && a.push(e.displayValue ?? e.label), a;
|
|
791
|
-
}, []).join(", "), Ut = ({ items: l, placeholder: t, selectedValues: a, isMultiSelect: e }) => {
|
|
792
|
-
const o = n(
|
|
793
|
-
() => e.value && l.value.find((r) => {
|
|
794
|
-
var i;
|
|
795
|
-
return (i = r.items) == null ? void 0 : i.length;
|
|
796
|
-
})
|
|
797
|
-
);
|
|
798
|
-
return n(() => a.value.length ? o.value ? zt(a, l) : a.value.map(({ label: r, displayValue: i }) => i ?? r).join(", ") : t.value || null);
|
|
799
|
-
}, Re = (l) => {
|
|
800
|
-
var t;
|
|
801
|
-
(t = l.value.$children) == null || t[0].$refs.textbox.focus();
|
|
802
|
-
}, Wt = ({
|
|
803
|
-
inputContainerRef: l,
|
|
804
|
-
optionsContainerRef: t,
|
|
805
|
-
selectedValueIndex: a,
|
|
806
|
-
isDropdownOpen: e,
|
|
807
|
-
isDynamicFltering: o,
|
|
808
|
-
items: s,
|
|
809
|
-
isMultiple: r,
|
|
810
|
-
totalItemCount: i,
|
|
811
|
-
isVirtualScroll: c
|
|
812
|
-
}, v, b, f) => {
|
|
813
|
-
const d = async (y) => {
|
|
814
|
-
var w;
|
|
815
|
-
o.value && await B(), (w = s.value[y]) == null || w.focus();
|
|
816
|
-
}, S = async (y) => {
|
|
817
|
-
var H, Y;
|
|
818
|
-
o.value && await B();
|
|
819
|
-
const w = (H = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : H.$el.querySelectorAll(
|
|
820
|
-
"button"
|
|
821
|
-
);
|
|
822
|
-
w != null && w.length ? (Y = w[y]) == null || Y.focus() : d(y);
|
|
823
|
-
}, x = (y) => {
|
|
824
|
-
var w;
|
|
825
|
-
return (w = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : w.setListboxFocusedIndex(
|
|
826
|
-
y
|
|
827
|
-
);
|
|
828
|
-
}, u = async (y) => {
|
|
829
|
-
var w;
|
|
830
|
-
await ((w = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : w.navigateToItem(y));
|
|
831
|
-
}, C = (y) => {
|
|
832
|
-
B(() => {
|
|
833
|
-
c ? u(y) : (x(y), d(y));
|
|
834
|
-
});
|
|
835
|
-
}, g = () => {
|
|
836
|
-
e.value || b(), C(0);
|
|
837
|
-
}, p = () => {
|
|
838
|
-
e.value || b(), B(() => {
|
|
839
|
-
C(c ? i.value - 1 : s.value.length - 1);
|
|
840
|
-
});
|
|
841
|
-
}, k = ({ detail: y }) => {
|
|
842
|
-
y.preventDefault(), g();
|
|
843
|
-
}, I = ({ detail: y }) => {
|
|
844
|
-
y.preventDefault(), p();
|
|
845
|
-
}, D = () => {
|
|
846
|
-
g();
|
|
847
|
-
}, F = () => {
|
|
848
|
-
p();
|
|
849
|
-
}, P = ({ detail: y }) => {
|
|
850
|
-
y.preventDefault(), v(), e.value && (r ? S(0) : C(a.value));
|
|
851
|
-
}, $ = ({ detail: y }) => {
|
|
852
|
-
y.preventDefault(), v(), e.value && (r ? S(0) : C(a.value));
|
|
853
|
-
}, N = () => {
|
|
854
|
-
e.value && f();
|
|
855
|
-
}, O = () => {
|
|
856
|
-
e.value && (f(), Re(l));
|
|
857
|
-
};
|
|
858
|
-
return n(() => ({
|
|
859
|
-
[R.ARROW_DOWN]: k,
|
|
860
|
-
[R.ARROW_UP]: I,
|
|
861
|
-
[R.HOME]: D,
|
|
862
|
-
[R.END]: F,
|
|
863
|
-
...o.value ? {} : { [R.SPACE]: P },
|
|
864
|
-
[R.ENTER]: $,
|
|
865
|
-
...o.value ? {} : { [R.TAB]: N },
|
|
866
|
-
[R.ESCAPE]: O
|
|
867
|
-
}));
|
|
868
|
-
}, jt = ({ inputContainerRef: l, isDropdownOpen: t }, a) => {
|
|
869
|
-
const e = () => {
|
|
870
|
-
t.value && a(), B(() => {
|
|
871
|
-
Re(l);
|
|
872
|
-
});
|
|
873
|
-
};
|
|
874
|
-
return {
|
|
875
|
-
[m.ENTER]: e,
|
|
876
|
-
[m.ESCAPE]: e,
|
|
877
|
-
[m.TAB]: e,
|
|
878
|
-
[m.SPACE]: e
|
|
879
|
-
};
|
|
880
|
-
};
|
|
881
|
-
function Ht(l, t, a, e, o) {
|
|
882
|
-
const s = L(l), r = L(t), i = (b, f = []) => f.flatMap((d) => d.label.toLocaleLowerCase().includes(b) ? e != null && e.value && d.items ? [...i(b, d.items)] : [d, ...i(b, d.items)] : d.items ? [...i(b, d.items)] : []), c = a !== void 0 ? Je(() => a(s.value), o ?? 300) : void 0;
|
|
883
|
-
return Z(s, () => {
|
|
884
|
-
c !== void 0 && c();
|
|
885
|
-
}), n(() => {
|
|
886
|
-
if (!s.value || a !== void 0)
|
|
887
|
-
return r.value;
|
|
888
|
-
const b = s.value.toLocaleLowerCase();
|
|
889
|
-
return i(b, r.value);
|
|
890
|
-
});
|
|
891
|
-
}
|
|
892
|
-
const Yt = {
|
|
893
|
-
"de-DE": {
|
|
894
|
-
all: "Alle",
|
|
895
|
-
ariaLabelFallback: "Dropdown",
|
|
896
|
-
clearSearch: "Filter löschen"
|
|
897
|
-
},
|
|
898
|
-
"en-GB": {
|
|
899
|
-
all: "All",
|
|
900
|
-
ariaLabelFallback: "Dropdown",
|
|
901
|
-
clearSearch: "Clear filter"
|
|
902
|
-
},
|
|
903
|
-
"en-US": {
|
|
904
|
-
all: "All",
|
|
905
|
-
ariaLabelFallback: "Dropdown",
|
|
906
|
-
clearSearch: "Clear filter"
|
|
907
|
-
},
|
|
908
|
-
"es-ES": {
|
|
909
|
-
all: "Todos",
|
|
910
|
-
ariaLabelFallback: "Menú desplegable",
|
|
911
|
-
clearSearch: "Limpiar filtro"
|
|
912
|
-
},
|
|
913
|
-
"es-MX": {
|
|
914
|
-
all: "Todos",
|
|
915
|
-
ariaLabelFallback: "Menú desplegable",
|
|
916
|
-
clearSearch: "Limpiar filtro"
|
|
917
|
-
},
|
|
918
|
-
"fr-FR": {
|
|
919
|
-
all: "Tous",
|
|
920
|
-
ariaLabelFallback: "Menu déroulant",
|
|
921
|
-
clearSearch: "Effacer le filtre"
|
|
922
|
-
},
|
|
923
|
-
"it-IT": {
|
|
924
|
-
all: "Tutti",
|
|
925
|
-
ariaLabelFallback: "Menu a discesa",
|
|
926
|
-
clearSearch: "Cancella filtro"
|
|
927
|
-
},
|
|
928
|
-
"ja-JP": {
|
|
929
|
-
all: "すべて",
|
|
930
|
-
ariaLabelFallback: "ドロップダウン",
|
|
931
|
-
clearSearch: "フィルターをクリア"
|
|
932
|
-
},
|
|
933
|
-
"pt-BR": {
|
|
934
|
-
all: "Todos",
|
|
935
|
-
ariaLabelFallback: "Menu suspenso",
|
|
936
|
-
clearSearch: "Limpar filtro"
|
|
937
|
-
},
|
|
938
|
-
"zh-CN": {
|
|
939
|
-
all: "全部",
|
|
940
|
-
ariaLabelFallback: "下拉菜单",
|
|
941
|
-
clearSearch: "清除筛选器"
|
|
942
|
-
}
|
|
943
|
-
}, Jt = A({
|
|
944
|
-
i18n: { messages: Yt },
|
|
945
|
-
name: "b-dropdown",
|
|
946
|
-
components: {
|
|
947
|
-
DropdownInputDefault: Ot,
|
|
948
|
-
DropdownInputSmall: qt
|
|
949
|
-
},
|
|
950
|
-
model: { prop: "modelValue" }
|
|
951
|
-
}), Xt = /* @__PURE__ */ A({
|
|
952
|
-
...Jt,
|
|
953
|
-
props: {
|
|
954
|
-
description: { default: null },
|
|
955
|
-
disabled: { type: Boolean, default: !1 },
|
|
956
|
-
errorMessage: { default: null },
|
|
957
|
-
label: { default: null },
|
|
958
|
-
optional: { type: Boolean, default: !1 },
|
|
959
|
-
placeholder: { default: null },
|
|
960
|
-
readonly: { type: Boolean, default: !1 },
|
|
961
|
-
required: { type: Boolean, default: !1 },
|
|
962
|
-
tooltipText: { default: null },
|
|
963
|
-
ariaLabel: { default: null },
|
|
964
|
-
condensed: { type: Boolean, default: !1 },
|
|
965
|
-
emptyState: { default: void 0 },
|
|
966
|
-
dynamicFiltering: { type: Boolean, default: !1 },
|
|
967
|
-
error: { type: Boolean, default: !1 },
|
|
968
|
-
hasMoreItems: { type: Boolean, default: !1 },
|
|
969
|
-
isOptionDisabled: { type: Function, default: void 0 },
|
|
970
|
-
items: { default: () => [] },
|
|
971
|
-
loading: { type: Boolean, default: !1 },
|
|
972
|
-
componentLoading: { type: Boolean, default: !1 },
|
|
973
|
-
lazyLoadType: { default: re.props.lazyLoadType.default },
|
|
974
|
-
multiple: { type: Boolean, default: !1 },
|
|
975
|
-
search: { default: void 0 },
|
|
976
|
-
showSlotContentInMultiple: { type: Boolean, default: !1 },
|
|
977
|
-
size: { default: null },
|
|
978
|
-
staticCategories: { type: Boolean, default: !1 },
|
|
979
|
-
teleport: { default: () => ({ disabled: !0 }) },
|
|
980
|
-
value: { default: null },
|
|
981
|
-
modelValue: { default: null },
|
|
982
|
-
virtualScroll: { type: Boolean, default: !1 },
|
|
983
|
-
enableValueLabelPair: { type: Boolean, default: !1 }
|
|
984
|
-
},
|
|
985
|
-
emits: ["input", "update:model-value", "show-more", "open"],
|
|
986
|
-
setup(l, { expose: t, emit: a }) {
|
|
987
|
-
var Se, xe;
|
|
988
|
-
const e = l, o = De(), s = Q(), r = Ae(s), { t: i } = G(), { emitValue: c } = Ye(a), v = L(null), b = L(null), f = L(null), d = L(!1), S = q("bento-dropdown-options-container"), x = q("dropdown-label"), u = q("dropdown-description"), C = q("dropdown-error"), { isReadOnly: g } = Ge(T(e, "readonly")), p = n(() => e.modelValue ?? e.value), { cachedSelectedListboxOptions: k, cachedListboxSelectedValues: I, setCachedValues: D } = Xe(
|
|
989
|
-
T(e, "items"),
|
|
990
|
-
p,
|
|
991
|
-
T(e, "multiple"),
|
|
992
|
-
T(e, "enableValueLabelPair")
|
|
993
|
-
), F = L(o["aria-label"]), P = L(o["aria-describedby"]), { ariaLabel: $, label: N } = Ie(e), O = n(() => i("ariaLabelFallback")), ee = He({
|
|
994
|
-
// TODO: take ariaLabel ref away when aria-label prop is removed
|
|
995
|
-
ariaLabel: $.value || F,
|
|
996
|
-
label: N,
|
|
997
|
-
defaultFallback: O
|
|
998
|
-
}), y = e.size === U.SMALL || ie(bt, !1), w = n(() => y ? U.SMALL : U.DEFAULT), H = n(() => ({
|
|
999
|
-
"b-dropdown--condensed": e.condensed
|
|
1000
|
-
})), Y = n(() => ({
|
|
1001
|
-
"b-dropdown__description--error": !!e.errorMessage
|
|
1002
|
-
})), V = L(""), W = T(e, "items"), de = T(e, "staticCategories"), J = Ht(
|
|
1003
|
-
V,
|
|
1004
|
-
W,
|
|
1005
|
-
(Se = e == null ? void 0 : e.search) == null ? void 0 : Se.searchEvent,
|
|
1006
|
-
de,
|
|
1007
|
-
(xe = e == null ? void 0 : e.search) == null ? void 0 : xe.debounceTime
|
|
1008
|
-
), te = n(() => e.dynamicFiltering && !!V.value), Ne = Ut({
|
|
1009
|
-
items: W,
|
|
1010
|
-
placeholder: T(e, "placeholder"),
|
|
1011
|
-
isMultiSelect: T(e, "multiple"),
|
|
1012
|
-
selectedValues: k
|
|
1013
|
-
}), Me = n(() => {
|
|
1014
|
-
if (e != null && e.multiple && Array.isArray(p.value))
|
|
1015
|
-
return e.items.filter(
|
|
1016
|
-
({ value: _ }) => (e == null ? void 0 : e.value) && (e == null ? void 0 : e.value).includes(_)
|
|
1017
|
-
);
|
|
1018
|
-
if (!e.multiple && e.staticCategories) {
|
|
1019
|
-
const _ = e.items.find(
|
|
1020
|
-
(j) => {
|
|
1021
|
-
var we;
|
|
1022
|
-
return (we = j.items) == null ? void 0 : we.some((qe) => qe.value === p.value);
|
|
1023
|
-
}
|
|
1024
|
-
);
|
|
1025
|
-
return (_ ? _.items.find((j) => j.value === p.value) : e.items.find(({ value: j }) => j === p.value)) ?? null;
|
|
1026
|
-
}
|
|
1027
|
-
return e.items.find(({ value: _ }) => _ === p.value);
|
|
1028
|
-
}), ce = n(() => {
|
|
1029
|
-
const _ = J.value.findIndex(({ value: K }) => e.enableValueLabelPair ? p.value.value === K : p.value === K);
|
|
1030
|
-
return _ > -1 ? _ : 0;
|
|
1031
|
-
}), { isMultiLevelSelect: ae, flattenedItemsList: ue } = Ze(W), pe = n(() => ae.value && !e.staticCategories), fe = n(() => pe.value ? "treeitem" : "option"), Fe = n(() => {
|
|
1032
|
-
if (e.multiple) {
|
|
1033
|
-
const _ = Array.isArray(p.value) ? p.value.length : 0, K = ae.value ? ue.value.length : W.value.length;
|
|
1034
|
-
return _ === 0 ? null : !e.hasMoreItems && K > 0 && K === _ ? i("all") : _;
|
|
1035
|
-
}
|
|
1036
|
-
return null;
|
|
1037
|
-
}), Pe = n(
|
|
1038
|
-
() => [
|
|
1039
|
-
e.description ? u : null,
|
|
1040
|
-
P.value,
|
|
1041
|
-
e.errorMessage ? C : null
|
|
1042
|
-
].filter(Boolean).join(" ") || null
|
|
1043
|
-
), oe = n(() => {
|
|
1044
|
-
var _;
|
|
1045
|
-
return (_ = f.value) == null ? void 0 : _.$el;
|
|
1046
|
-
}), { visibleDomOptions: be, updateVisibleDomOptions: le } = Qe(
|
|
1047
|
-
oe,
|
|
1048
|
-
J,
|
|
1049
|
-
fe
|
|
1050
|
-
), ye = () => {
|
|
1051
|
-
g.value || (d.value = !0, B(() => {
|
|
1052
|
-
le();
|
|
1053
|
-
}));
|
|
1054
|
-
}, X = () => {
|
|
1055
|
-
d.value = !1;
|
|
1056
|
-
}, ve = () => {
|
|
1057
|
-
g.value || (d.value = !d.value, B(() => {
|
|
1058
|
-
le();
|
|
1059
|
-
}), te.value && (V.value = ""));
|
|
1060
|
-
}, me = () => {
|
|
1061
|
-
te.value && (V.value = ""), d.value && (d.value = !1, f.value.onOutsideDropdownClick());
|
|
1062
|
-
}, $e = n(() => [
|
|
1063
|
-
me,
|
|
1064
|
-
{
|
|
1065
|
-
ignore: [oe]
|
|
1066
|
-
}
|
|
1067
|
-
]), _e = async (_) => {
|
|
1068
|
-
e.multiple || (V.value = "", d.value = !1), D(_), c(I.value), e.multiple || (await B(), ne());
|
|
1069
|
-
}, he = () => {
|
|
1070
|
-
a(m.SHOW_MORE);
|
|
1071
|
-
}, Ve = Wt(
|
|
1072
|
-
{
|
|
1073
|
-
inputContainerRef: v,
|
|
1074
|
-
optionsContainerRef: f,
|
|
1075
|
-
selectedValueIndex: ce,
|
|
1076
|
-
isDropdownOpen: d,
|
|
1077
|
-
isDynamicFltering: T(e, "dynamicFiltering"),
|
|
1078
|
-
items: be,
|
|
1079
|
-
isMultiple: e.multiple,
|
|
1080
|
-
totalItemCount: n(() => J.value.length),
|
|
1081
|
-
isVirtualScroll: !(e != null && e.multiple) && (e == null ? void 0 : e.virtualScroll) !== !1 && (e == null ? void 0 : e.lazyLoadType) === "none"
|
|
1082
|
-
},
|
|
1083
|
-
ve,
|
|
1084
|
-
ye,
|
|
1085
|
-
X
|
|
1086
|
-
), ge = jt(
|
|
1087
|
-
{
|
|
1088
|
-
inputContainerRef: v,
|
|
1089
|
-
isDropdownOpen: d
|
|
1090
|
-
},
|
|
1091
|
-
X
|
|
1092
|
-
), Ke = {
|
|
1093
|
-
[m.CLOSE_DROPDOWN]: X,
|
|
1094
|
-
[m.SELECT]: _e,
|
|
1095
|
-
[m.SHOW_MORE]: he,
|
|
1096
|
-
...ge
|
|
1097
|
-
};
|
|
1098
|
-
e.error && se(
|
|
1099
|
-
'BentoDropdown "error" property',
|
|
1100
|
-
`Use the BentoDropdown "errorMessage" property instead to indicate that there is a modifier error.
|
|
1101
|
-
Having the field as "undefined" will hide/remove the error.
|
|
1102
|
-
<bento-dropdown errorMessage="Error message text" />`,
|
|
1103
|
-
"2.0.0"
|
|
1104
|
-
), e.size && se('BentoDropdown "size" property', "Do not use. Only 'default' size should be used.", "2.0.0"), e.value && se(
|
|
1105
|
-
'BentoDropdown "value" property',
|
|
1106
|
-
`The use of "value" prop in "BentoDropdown" is no longer supported.
|
|
1107
|
-
Use the "v-model" or "model-value" property instead.`,
|
|
1108
|
-
"2.0.0"
|
|
1109
|
-
);
|
|
1110
|
-
const ne = () => {
|
|
1111
|
-
v.value.focus();
|
|
1112
|
-
};
|
|
1113
|
-
return Z(
|
|
1114
|
-
() => d.value,
|
|
1115
|
-
(_) => {
|
|
1116
|
-
_ && a("open");
|
|
1117
|
-
}
|
|
1118
|
-
), t({
|
|
1119
|
-
focus: ne
|
|
1120
|
-
}), { __sfc: !0, attrs: o, slots: s, hasSlot: r, props: e, emit: a, t: i, emitValue: c, inputContainerRef: v, inputContainerRefWrapper: b, optionsContainerRef: f, isDropdownOpen: d, dropdownOptionsContainerId: S, labelId: x, descriptionId: u, errorId: C, isReadOnly: g, dropdownValue: p, cachedSelectedListboxOptions: k, cachedListboxSelectedValues: I, setCachedValues: D, ariaLabelAttribute: F, ariaDescribedByAttribute: P, ariaLabel: $, label: N, computedAriaLabelFallbackMessage: O, computedAriaLabel: ee, isInputComponent: y, computedSize: w, conditionalClasses: H, descriptionConditionalClasses: Y, searchTerm: V, items: W, staticCategories: de, filteredItems: J, isSearching: te, displayValue: Ne, selectedValueItem: Me, selectedValueIndex: ce, isMultiLevelSelect: ae, flattenedItemsList: ue, isTreePattern: pe, computedOptionRole: fe, additionalItemsSelected: Fe, ariaDescribedBy: Pe, listboxRef: oe, visibleDomOptions: be, updateVisibleDomOptions: le, openDropdown: ye, closeDropdown: X, toggleDropdown: ve, clickOutsideDropdown: me, clickOutsideDropdownOptions: $e, onOptionSelected: _e, emitShowMoreEvent: he, textboxKeyboardNavigationListeners: Ve, listboxKeyboardNavigationListeners: ge, listboxListeners: Ke, focus: ne, BentoDropdownOptionsContainer: ft, BentoTypography: Be, ErrorMessage: nt, FieldLabel: lt, BentoTeleport: ot, vBentoClickOutsideDirective: tt, vBentoKeyboardNavigationDirective: et };
|
|
1121
|
-
}
|
|
1122
|
-
});
|
|
1123
|
-
var Zt = function() {
|
|
1124
|
-
var o, s;
|
|
1125
|
-
var t = this, a = t._self._c, e = t._self._setupProxy;
|
|
1126
|
-
return a("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.clickOutsideDropdownOptions, expression: "clickOutsideDropdownOptions" }], staticClass: "b-dropdown", class: e.conditionalClasses }, [e.label ? a(e.FieldLabel, { attrs: { id: e.labelId, condensed: t.condensed, label: e.label, "tooltip-text": t.tooltipText, optional: t.optional, required: t.required } }) : t._e(), a("div", t._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "inputContainerRefWrapper" }, e.textboxKeyboardNavigationListeners), [a(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, "aria-required": t.required, 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(r) {
|
|
1127
|
-
e.searchTerm = r;
|
|
1128
|
-
}, open: e.toggleDropdown, close: e.toggleDropdown }, scopedSlots: t._u([t._l(e.slots, function(r, i) {
|
|
1129
|
-
return { key: i, fn: function(c) {
|
|
1130
|
-
return [t._t(i, null, null, c)];
|
|
1131
|
-
} };
|
|
1132
|
-
})], null, !0) })], 1), e.inputContainerRef ? a(e.BentoTeleport, { attrs: { disabled: (o = t.teleport) == null ? void 0 : o.disabled, to: (s = t.teleport) == null ? void 0 : s.to } }, [a(e.BentoDropdownOptionsContainer, t._g({ ref: "optionsContainerRef", attrs: { id: e.dropdownOptionsContainerId, "aria-label": e.computedAriaLabel, "component-loading": t.componentLoading, "empty-state": t.emptyState, 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(r, i) {
|
|
1133
|
-
return { key: i, fn: function(c) {
|
|
1134
|
-
return [t._t(i, null, null, c)];
|
|
1135
|
-
} };
|
|
1136
|
-
})], null, !0) }, e.listboxListeners))], 1) : t._e(), t.errorMessage ? a(e.ErrorMessage, { staticClass: "b-dropdown__error-message", attrs: { id: e.errorId, "error-message": t.errorMessage } }) : t._e(), t.description || e.hasSlot("description") ? a(e.BentoTypography, { staticClass: "b-dropdown__description", class: e.descriptionConditionalClasses, attrs: { id: e.descriptionId, el: "span" } }, [t._t("description", function() {
|
|
1137
|
-
return [t._v(" " + t._s(t.description) + " ")];
|
|
1138
|
-
})], 2) : t._e()], 1);
|
|
1139
|
-
}, Qt = [], Gt = /* @__PURE__ */ M(
|
|
1140
|
-
Xt,
|
|
1141
|
-
Zt,
|
|
1142
|
-
Qt,
|
|
1143
|
-
!1,
|
|
1144
|
-
null,
|
|
1145
|
-
"a36ac3b0"
|
|
1146
|
-
);
|
|
1147
|
-
const xa = Gt.exports;
|
|
1148
|
-
export {
|
|
1149
|
-
xa as B,
|
|
1150
|
-
Ot as D,
|
|
1151
|
-
U as a,
|
|
1152
|
-
bt as b,
|
|
1153
|
-
Ht as u
|
|
1154
|
-
};
|
|
1155
|
-
//# sourceMappingURL=dropdown.C70AlvOT.js.map
|