@adyen/bento-vue3 1.90.0 → 1.91.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/components.d.ts +2 -0
- package/dist/@types/index.d.ts +559 -419
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.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/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/dialog-page.css +1 -1
- package/dist/assets/draggable-handle.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/field-label.css +1 -0
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/input-time.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.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.Pe_hvtja.js → action-bar.BPS3wPde.js} +3 -3
- package/dist/chunks/{action-bar.Pe_hvtja.js.map → action-bar.BPS3wPde.js.map} +1 -1
- package/dist/chunks/{ai-tag.BSlc78DU.js → ai-tag.D7shWB_x.js} +2 -2
- package/dist/chunks/{ai-tag.BSlc78DU.js.map → ai-tag.D7shWB_x.js.map} +1 -1
- package/dist/chunks/{base-modal.BjjDrx0z.js → base-modal.BxcS7Pao.js} +4 -4
- package/dist/chunks/{base-modal.BjjDrx0z.js.map → base-modal.BxcS7Pao.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.DvkS16ur.js → button-actions-with-menu.BKdNXYgU.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.DvkS16ur.js.map → button-actions-with-menu.BKdNXYgU.js.map} +1 -1
- package/dist/chunks/{button-actions.Bh_PZ_fV.js → button-actions.DLiM8KZL.js} +2 -2
- package/dist/chunks/{button-actions.Bh_PZ_fV.js.map → button-actions.DLiM8KZL.js.map} +1 -1
- package/dist/chunks/{calendar.CH-1Vgeb.js → calendar.qm-kFNQv.js} +275 -257
- package/dist/chunks/calendar.qm-kFNQv.js.map +1 -0
- package/dist/chunks/{card.BzCGCCzH.js → card.BEChcEqg.js} +2 -2
- package/dist/chunks/{card.BzCGCCzH.js.map → card.BEChcEqg.js.map} +1 -1
- package/dist/chunks/{checkbox-group.D_fN6Glu.js → checkbox-group.i3W8WO-7.js} +4 -4
- package/dist/chunks/{checkbox-group.D_fN6Glu.js.map → checkbox-group.i3W8WO-7.js.map} +1 -1
- package/dist/chunks/{checkbox.BlAhQl9N.js → checkbox.BPrymcRl.js} +18 -18
- package/dist/chunks/{checkbox.BlAhQl9N.js.map → checkbox.BPrymcRl.js.map} +1 -1
- package/dist/chunks/{click-outside.BPylIosK.js → click-outside.B0whuTUU.js} +2 -2
- package/dist/chunks/{click-outside.BPylIosK.js.map → click-outside.B0whuTUU.js.map} +1 -1
- package/dist/chunks/{code-snippet.BePxxR3q.js → code-snippet.BG5ZmCrb.js} +3 -3
- package/dist/chunks/{code-snippet.BePxxR3q.js.map → code-snippet.BG5ZmCrb.js.map} +1 -1
- package/dist/chunks/{controls-group.Cxk-0fCy.js → controls-group.DqRpF9bh.js} +2 -2
- package/dist/chunks/{controls-group.Cxk-0fCy.js.map → controls-group.DqRpF9bh.js.map} +1 -1
- package/dist/chunks/{dashboard-section.CiNDItU2.js → dashboard-section.C7mfUXOl.js} +2 -2
- package/dist/chunks/{dashboard-section.CiNDItU2.js.map → dashboard-section.C7mfUXOl.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CwdpUz76.js → dashed-underline.B50DIXjK.js} +2 -2
- package/dist/chunks/{dashed-underline.CwdpUz76.js.map → dashed-underline.B50DIXjK.js.map} +1 -1
- package/dist/chunks/{data-grid-template.nXn1dLCw.js → data-grid-template.CKdZb6EN.js} +2 -2
- package/dist/chunks/{data-grid-template.nXn1dLCw.js.map → data-grid-template.CKdZb6EN.js.map} +1 -1
- package/dist/chunks/{data-grid.CXWaoqzi.js → data-grid.DvMe72LK.js} +411 -406
- package/dist/chunks/{data-grid.CXWaoqzi.js.map → data-grid.DvMe72LK.js.map} +1 -1
- package/dist/chunks/date-picker.CidHad1p.js +269 -0
- package/dist/chunks/date-picker.CidHad1p.js.map +1 -0
- package/dist/chunks/date-range-picker.c5OwESTS.js +1027 -0
- package/dist/chunks/date-range-picker.c5OwESTS.js.map +1 -0
- package/dist/chunks/{directive.Dpivxq_t.js → directive.C8kY-ZW-.js} +2 -2
- package/dist/chunks/{directive.Dpivxq_t.js.map → directive.C8kY-ZW-.js.map} +1 -1
- package/dist/{draggable-handle.js → chunks/draggable-handle.CySRx1tb.js} +56 -47
- package/dist/chunks/draggable-handle.CySRx1tb.js.map +1 -0
- package/dist/chunks/{dropdown-tag.B7OA_Yv9.js → dropdown-tag.wcJ6Mgqe.js} +2 -2
- package/dist/chunks/{dropdown-tag.B7OA_Yv9.js.map → dropdown-tag.wcJ6Mgqe.js.map} +1 -1
- package/dist/chunks/dropdown.DHoL50gV.js +1214 -0
- package/dist/chunks/dropdown.DHoL50gV.js.map +1 -0
- package/dist/chunks/error-message.Dyvrw6ZB.js +55 -0
- package/dist/chunks/error-message.Dyvrw6ZB.js.map +1 -0
- package/dist/chunks/field-label.DZYFjFgr.js +111 -0
- package/dist/chunks/field-label.DZYFjFgr.js.map +1 -0
- package/dist/chunks/{file-uploader.BUvDU_cn.js → file-uploader.Dbg3vfZ_.js} +5 -4
- package/dist/chunks/{file-uploader.BUvDU_cn.js.map → file-uploader.Dbg3vfZ_.js.map} +1 -1
- package/dist/chunks/{filter-bar.fowl40RS.js → filter-bar.Dt-cU3zy.js} +1473 -1455
- package/dist/chunks/filter-bar.Dt-cU3zy.js.map +1 -0
- package/dist/chunks/{footer-actions.uoNbOGAQ.js → footer-actions.CYBdKDPo.js} +2 -2
- package/dist/chunks/{footer-actions.uoNbOGAQ.js.map → footer-actions.CYBdKDPo.js.map} +1 -1
- package/dist/chunks/{form-layout-title.Cr3wdpK_.js → form-layout-title.B3ePK3yi.js} +78 -64
- package/dist/chunks/form-layout-title.B3ePK3yi.js.map +1 -0
- package/dist/chunks/{header-meta.CmH6SnjE.js → header-meta.COak4D8-.js} +2 -2
- package/dist/chunks/{header-meta.CmH6SnjE.js.map → header-meta.COak4D8-.js.map} +1 -1
- package/dist/chunks/{header-with-views.B2pPBcTf.js → header-with-views.DqioajcO.js} +10 -10
- package/dist/chunks/{header-with-views.B2pPBcTf.js.map → header-with-views.DqioajcO.js.map} +1 -1
- package/dist/chunks/{header.BVM8Usdi.js → header.C21yzWrk.js} +3 -3
- package/dist/chunks/{header.BVM8Usdi.js.map → header.C21yzWrk.js.map} +1 -1
- package/dist/chunks/{input-field-password.CHb2Ros_.js → input-field-password.DyUphhxB.js} +4 -4
- package/dist/chunks/{input-field-password.CHb2Ros_.js.map → input-field-password.DyUphhxB.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.DM2rmZkQ.js → input-field-phone-number.BXVaC5ra.js} +3 -3
- package/dist/chunks/{input-field-phone-number.DM2rmZkQ.js.map → input-field-phone-number.BXVaC5ra.js.map} +1 -1
- package/dist/chunks/{input-field.DnYjM6yy.js → input-field.DkUFvIWt.js} +113 -109
- package/dist/chunks/input-field.DkUFvIWt.js.map +1 -0
- package/dist/chunks/input-time.WI_qdwJc.js +122 -0
- package/dist/chunks/input-time.WI_qdwJc.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.9CSTqFQc.js → modal-fullscreen.c6QphYQo.js} +2 -2
- package/dist/chunks/{modal-fullscreen.9CSTqFQc.js.map → modal-fullscreen.c6QphYQo.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BAxTkaQM.js → modal.vue_vue_type_script_setup_true_lang.ImqHKH-g.js} +4 -4
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BAxTkaQM.js.map → modal.vue_vue_type_script_setup_true_lang.ImqHKH-g.js.map} +1 -1
- package/dist/chunks/on-click-outside.BgIzQ2G1.js +108 -0
- package/dist/chunks/on-click-outside.BgIzQ2G1.js.map +1 -0
- package/dist/chunks/{pagination.DL-h8OLF.js → pagination.Cu85Lqms.js} +100 -100
- package/dist/chunks/{pagination.DL-h8OLF.js.map → pagination.Cu85Lqms.js.map} +1 -1
- package/dist/chunks/{radio-group.DzhQgXv9.js → radio-group.CfMr1fmW.js} +3 -3
- package/dist/chunks/{radio-group.DzhQgXv9.js.map → radio-group.CfMr1fmW.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.Ij2t4pyI.js → rich-text-editor.Bf9EWzNk.js} +6 -5
- package/dist/chunks/{rich-text-editor.Ij2t4pyI.js.map → rich-text-editor.Bf9EWzNk.js.map} +1 -1
- package/dist/chunks/{search-bar.DfNwnjes.js → search-bar.p6kHCCvT.js} +4 -4
- package/dist/chunks/{search-bar.DfNwnjes.js.map → search-bar.p6kHCCvT.js.map} +1 -1
- package/dist/chunks/{secondary-nav.CvipTDRh.js → secondary-nav.CaxiyVaO.js} +2 -2
- package/dist/chunks/{secondary-nav.CvipTDRh.js.map → secondary-nav.CaxiyVaO.js.map} +1 -1
- package/dist/chunks/{selection-card-group.CcOWQAUC.js → selection-card-group.58XZj_SJ.js} +11 -11
- package/dist/chunks/{selection-card-group.CcOWQAUC.js.map → selection-card-group.58XZj_SJ.js.map} +1 -1
- package/dist/chunks/{sidepanel.BObSv8UU.js → sidepanel.CAVhSs-O.js} +4 -4
- package/dist/chunks/{sidepanel.BObSv8UU.js.map → sidepanel.CAVhSs-O.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.DKPhtHw3.js → summary-grid.types.CDithi8M.js} +2 -2
- package/dist/chunks/{summary-grid.types.DKPhtHw3.js.map → summary-grid.types.CDithi8M.js.map} +1 -1
- package/dist/chunks/{textarea.C-sBemuo.js → textarea.JGXAlpx9.js} +19 -18
- package/dist/chunks/{textarea.C-sBemuo.js.map → textarea.JGXAlpx9.js.map} +1 -1
- package/dist/chunks/{timeline-item.CHk8wXeT.js → timeline-item.BNFPpQz1.js} +4 -4
- package/dist/chunks/{timeline-item.CHk8wXeT.js.map → timeline-item.BNFPpQz1.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CUDeriBU.js → tutorial.vue_vue_type_script_setup_true_lang.C1cF-adv.js} +2 -2
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CUDeriBU.js.map → tutorial.vue_vue_type_script_setup_true_lang.C1cF-adv.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.DIbfa5F1.js → use-cached-selected-values.Bx8uuky9.js} +170 -165
- package/dist/chunks/use-cached-selected-values.Bx8uuky9.js.map +1 -0
- package/dist/chunks/{use-date-input-formatter.BiIraXZZ.js → use-date-input-formatter.BOuXpRb-.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.BiIraXZZ.js.map → use-date-input-formatter.BOuXpRb-.js.map} +1 -1
- package/dist/chunks/use-touch-device.DTqFAbXh.js +11 -0
- package/dist/chunks/use-touch-device.DTqFAbXh.js.map +1 -0
- package/dist/click-outside.js +1 -1
- package/dist/code-snippet.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/draggable.js +1383 -0
- package/dist/draggable.js.map +1 -0
- 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 +277 -274
- 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 +24 -23
- package/dist/internal.js.map +1 -1
- 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/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +7 -10
- package/dist/assets/dropdown-default-textbox.css +0 -1
- package/dist/chunks/calendar.CH-1Vgeb.js.map +0 -1
- package/dist/chunks/date-picker.DPjCROIP.js +0 -238
- package/dist/chunks/date-picker.DPjCROIP.js.map +0 -1
- package/dist/chunks/date-range-picker.fyrfFd04.js +0 -998
- package/dist/chunks/date-range-picker.fyrfFd04.js.map +0 -1
- package/dist/chunks/debounce.DUTu11PS.js +0 -10
- package/dist/chunks/debounce.DUTu11PS.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.aYsTZDZ7.js +0 -415
- package/dist/chunks/dropdown-default-textbox.aYsTZDZ7.js.map +0 -1
- package/dist/chunks/dropdown.Do-mZiI6.js +0 -813
- package/dist/chunks/dropdown.Do-mZiI6.js.map +0 -1
- package/dist/chunks/error-message.849uzpkq.js +0 -157
- package/dist/chunks/error-message.849uzpkq.js.map +0 -1
- package/dist/chunks/filter-bar.fowl40RS.js.map +0 -1
- package/dist/chunks/form-layout-title.Cr3wdpK_.js.map +0 -1
- package/dist/chunks/input-field.DnYjM6yy.js.map +0 -1
- package/dist/chunks/input-time.DeJ8lDio.js +0 -103
- package/dist/chunks/input-time.DeJ8lDio.js.map +0 -1
- package/dist/chunks/on-click-outside.ZUMLlxE_.js +0 -90
- package/dist/chunks/on-click-outside.ZUMLlxE_.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.DIbfa5F1.js.map +0 -1
- package/dist/draggable-handle.js.map +0 -1
|
@@ -1,813 +0,0 @@
|
|
|
1
|
-
import { ref as w, watch as be, computed as r, defineComponent as V, useSlots as Ie, toRefs as xe, openBlock as L, createBlock as z, resolveDynamicComponent as Ne, mergeProps as R, withCtx as q, createElementVNode as te, withKeys as ot, unref as l, createVNode as G, toHandlers as Q, createSlots as ue, renderList as ce, renderSlot as X, normalizeProps as pe, guardReactiveProps as fe, createCommentVNode as $, createElementBlock as F, toDisplayString as ye, normalizeClass as me, withDirectives as ee, vShow as Be, nextTick as O, useAttrs as lt, toRef as M, inject as nt, createTextVNode as st } from "vue";
|
|
2
|
-
import { d as ie, B as it } from "./typography.B3J6_tYk.js";
|
|
3
|
-
import { a as re, b as U, c as rt, B as Z, D as dt } from "./dropdown-default-textbox.aYsTZDZ7.js";
|
|
4
|
-
/* empty css */
|
|
5
|
-
import { _ as H } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
-
import { s as de } from "./events.BQOQSSb7.js";
|
|
7
|
-
import { g as j } from "./generate-uid.DBWe4g6T.js";
|
|
8
|
-
import { u as ut } from "./aria-label.CaUURpnB.js";
|
|
9
|
-
import { u as he } from "./index.B875RXHM.js";
|
|
10
|
-
import { u as ct } from "./form-field.D_2g7vaP.js";
|
|
11
|
-
import { B as m, b as ve, a as De, u as pt, c as ft, d as mt } from "./use-cached-selected-values.DIbfa5F1.js";
|
|
12
|
-
import { u as vt } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
13
|
-
import { d as bt } from "./debounce.DUTu11PS.js";
|
|
14
|
-
import { B as yt } from "./directive.Dpivxq_t.js";
|
|
15
|
-
import { B as I, a as ht } from "./keyboard-navigation.DWmhelVv.js";
|
|
16
|
-
import { u as gt } from "./use-has-slot.CyMiImRQ.js";
|
|
17
|
-
import { F as St, E as Lt } from "./error-message.849uzpkq.js";
|
|
18
|
-
import { P as Te } from "./popper-container.DMN8n5iC.js";
|
|
19
|
-
import { h as wt } from "./button-actions.Bh_PZ_fV.js";
|
|
20
|
-
import "../assets/dropdown.css";
|
|
21
|
-
const ge = {
|
|
22
|
-
"de-DE": { apply: "Anwenden", cancel: "Abbrechen", noOptionsMatchThisSearch: "Für diese Suche wurden keine Ergebnisse gefunden." },
|
|
23
|
-
"en-GB": { apply: "Apply", cancel: "Cancel", noOptionsMatchThisSearch: "No options match this search" },
|
|
24
|
-
"en-US": { apply: "Apply", cancel: "Cancel", noOptionsMatchThisSearch: "No options match this search" },
|
|
25
|
-
"es-ES": { apply: "Aplicar", cancel: "Cancelar", noOptionsMatchThisSearch: "No hay opciones que coincidan con esta búsqueda" },
|
|
26
|
-
"es-MX": { apply: "Aplicar", cancel: "Cancelar", noOptionsMatchThisSearch: "No hay opciones que coincidan con esta búsqueda" },
|
|
27
|
-
"fr-FR": { apply: "Appliquer", cancel: "Annuler", noOptionsMatchThisSearch: "Aucune option ne correspond à cette recherche" },
|
|
28
|
-
"it-IT": { apply: "Applica", cancel: "Annulla", noOptionsMatchThisSearch: "Nessun risultato corrispondente a questa ricerca" },
|
|
29
|
-
"ja-JP": { apply: "適用", cancel: "キャンセル", noOptionsMatchThisSearch: "この検索に一致するオプションはありません" },
|
|
30
|
-
"pt-BR": { apply: "Aplicar", cancel: "Cancelar", noOptionsMatchThisSearch: "Nenhuma opção corresponde a esta busca" },
|
|
31
|
-
"zh-CN": { apply: "应用", cancel: "取消", noOptionsMatchThisSearch: "没有符合此搜索条件的选项" }
|
|
32
|
-
}, Et = (t, u, i, a) => {
|
|
33
|
-
const n = w(t.value), { t: s } = he({ messages: ge });
|
|
34
|
-
be(t, () => {
|
|
35
|
-
n.value = t.value;
|
|
36
|
-
});
|
|
37
|
-
const e = r(
|
|
38
|
-
() => JSON.stringify(n.value) === JSON.stringify(t.value)
|
|
39
|
-
), c = () => {
|
|
40
|
-
a(m.SELECT, n.value), a(m.CLOSE_DROPDOWN);
|
|
41
|
-
}, g = () => {
|
|
42
|
-
n.value = t.value, a(m.CLOSE_DROPDOWN);
|
|
43
|
-
}, E = () => {
|
|
44
|
-
i.value && u.value && (n.value = t.value);
|
|
45
|
-
}, d = r(() => [
|
|
46
|
-
{
|
|
47
|
-
title: s("apply"),
|
|
48
|
-
event: c,
|
|
49
|
-
disabled: e.value
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
title: s("cancel"),
|
|
53
|
-
event: g
|
|
54
|
-
}
|
|
55
|
-
]), y = (h) => {
|
|
56
|
-
n.value = h, u.value || a(m.SELECT, h);
|
|
57
|
-
}, p = (h) => {
|
|
58
|
-
y(h), a(m.TAB);
|
|
59
|
-
}, f = (h) => {
|
|
60
|
-
y(h), a(m.ENTER);
|
|
61
|
-
}, C = (h) => {
|
|
62
|
-
y(h), a(m.SPACE);
|
|
63
|
-
}, v = () => {
|
|
64
|
-
g(), a(m.ESCAPE);
|
|
65
|
-
}, B = () => {
|
|
66
|
-
a(m.SHOW_MORE);
|
|
67
|
-
}, D = {
|
|
68
|
-
[m.SELECT]: y,
|
|
69
|
-
[m.SHOW_MORE]: B,
|
|
70
|
-
[m.TAB]: p,
|
|
71
|
-
[m.SPACE]: C,
|
|
72
|
-
[m.ENTER]: f
|
|
73
|
-
};
|
|
74
|
-
return {
|
|
75
|
-
// Values
|
|
76
|
-
actions: d,
|
|
77
|
-
internalSelectedValue: n,
|
|
78
|
-
// Methods
|
|
79
|
-
listeners: D,
|
|
80
|
-
onEscapeKey: v,
|
|
81
|
-
onOutsideDropdownClick: E
|
|
82
|
-
};
|
|
83
|
-
}, Ct = V({
|
|
84
|
-
i18n: { messages: ge },
|
|
85
|
-
name: "bento-dropdown-options-container"
|
|
86
|
-
}), Ot = /* @__PURE__ */ V({
|
|
87
|
-
...Ct,
|
|
88
|
-
props: {
|
|
89
|
-
/**
|
|
90
|
-
* Defines a string value that labels an interactive element.
|
|
91
|
-
*/
|
|
92
|
-
ariaLabel: { type: String, default: null },
|
|
93
|
-
/**
|
|
94
|
-
* Indicates that dropdown items are loading
|
|
95
|
-
*/
|
|
96
|
-
componentLoading: { type: Boolean, default: !1 },
|
|
97
|
-
/**
|
|
98
|
-
* Empty state props used with the inner empty state component which is displayed when no search results are found.
|
|
99
|
-
*/
|
|
100
|
-
emptyState: {
|
|
101
|
-
type: Object,
|
|
102
|
-
default: void 0
|
|
103
|
-
},
|
|
104
|
-
/**
|
|
105
|
-
* Disables dropdown functionality
|
|
106
|
-
*/
|
|
107
|
-
disabled: { type: Boolean, default: !1 },
|
|
108
|
-
/**
|
|
109
|
-
* Indicates whether there are more items to load
|
|
110
|
-
*/
|
|
111
|
-
hasMoreItems: { type: Boolean, default: !1 },
|
|
112
|
-
/**
|
|
113
|
-
* Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.
|
|
114
|
-
*/
|
|
115
|
-
id: { type: String, required: !0 },
|
|
116
|
-
/**
|
|
117
|
-
* Function that allows the options to be disabled
|
|
118
|
-
*
|
|
119
|
-
* @type {BentoDropdownIsOptionDisabled}
|
|
120
|
-
* @param {BentoDropdownOptionItem} option - Dropdown option object
|
|
121
|
-
* @param {string} option.label - Option's label text
|
|
122
|
-
* @param {string|number} option.value - Option's value
|
|
123
|
-
* @param {unknown} option.data - Option's extra data to be passed to the default slot
|
|
124
|
-
*/
|
|
125
|
-
isOptionDisabled: {
|
|
126
|
-
type: Function,
|
|
127
|
-
default: void 0
|
|
128
|
-
},
|
|
129
|
-
/**
|
|
130
|
-
* The option elements to populate the dropdown with.
|
|
131
|
-
* It must be an array of {@see BentoDropdownOptionItem }
|
|
132
|
-
* * @property {string} value.label - Text to be displayed in the option
|
|
133
|
-
* * @property {string,number} value.value - Value of the option
|
|
134
|
-
*/
|
|
135
|
-
items: {
|
|
136
|
-
type: Array,
|
|
137
|
-
required: !0
|
|
138
|
-
},
|
|
139
|
-
/**
|
|
140
|
-
* The type of `Lazy Load`.
|
|
141
|
-
* Type "automatic" will enable infinite scrolling
|
|
142
|
-
* Type "button" will enable lazy loading with "Show more" button
|
|
143
|
-
*/
|
|
144
|
-
lazyLoadType: {
|
|
145
|
-
type: String,
|
|
146
|
-
default: De.AUTOMATIC,
|
|
147
|
-
validator: (t) => Object.values(De).includes(t)
|
|
148
|
-
},
|
|
149
|
-
/**
|
|
150
|
-
* Indicates if new options are lazy loading.
|
|
151
|
-
*/
|
|
152
|
-
loading: { type: Boolean, default: !1 },
|
|
153
|
-
/**
|
|
154
|
-
* If enabled, the user will be able to select multiple items.
|
|
155
|
-
*/
|
|
156
|
-
multiple: { type: Boolean, default: !1 },
|
|
157
|
-
/**
|
|
158
|
-
* Indicates if the dropdown is open so that
|
|
159
|
-
* the container can be displayed.
|
|
160
|
-
*/
|
|
161
|
-
open: { type: Boolean, required: !0 },
|
|
162
|
-
/**
|
|
163
|
-
* The `input` value.
|
|
164
|
-
* Providing an empty string or empty array will select no options.
|
|
165
|
-
* Set to an empty string `''` if you don't want any of the available options to be selected for single select
|
|
166
|
-
*/
|
|
167
|
-
selectedValue: {
|
|
168
|
-
type: Array,
|
|
169
|
-
default: null
|
|
170
|
-
},
|
|
171
|
-
/**
|
|
172
|
-
* Flag that indicates that an external search it's being made
|
|
173
|
-
* to filter out the items inside the the multi-select listbox
|
|
174
|
-
*
|
|
175
|
-
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
176
|
-
*/
|
|
177
|
-
searching: ve.props.searching,
|
|
178
|
-
/**
|
|
179
|
-
* If enabled, dropdown will display non-selectable, static categories
|
|
180
|
-
*/
|
|
181
|
-
staticCategories: { type: Boolean, default: !1 },
|
|
182
|
-
/**
|
|
183
|
-
* Reference to the DOM element or Vue component for positioning
|
|
184
|
-
* the Dropdown container.
|
|
185
|
-
*/
|
|
186
|
-
targetElement: { type: Te.props.targetElement.type, required: !0 },
|
|
187
|
-
/**
|
|
188
|
-
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
189
|
-
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
190
|
-
*/
|
|
191
|
-
virtualScroll: {
|
|
192
|
-
type: [Boolean, Object],
|
|
193
|
-
default: !1
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
setup(t, { expose: u, emit: i }) {
|
|
197
|
-
const a = Ie(), n = i, s = t, { selectedValue: e, multiple: c } = xe(s), g = w(null), { t: E } = he({ messages: ge }), d = r(() => s.open && !s.disabled), y = r(() => E("noOptionsMatchThisSearch")), p = r(() => ({
|
|
198
|
-
"b-dropdown-options-container--single": !s?.multiple
|
|
199
|
-
})), f = r(() => ({
|
|
200
|
-
"b-dropdown-options-container__listbox--single": !s?.multiple
|
|
201
|
-
})), { actions: C, internalSelectedValue: v, listeners: B, onEscapeKey: D, onOutsideDropdownClick: h } = Et(e, c, d, n), S = r(() => s?.multiple ? wt : Te), P = r(() => {
|
|
202
|
-
const A = {
|
|
203
|
-
"min-width": `${s?.targetElement?.clientWidth}px`,
|
|
204
|
-
"max-width": "min(500px, 95%)"
|
|
205
|
-
};
|
|
206
|
-
return s?.multiple ? {
|
|
207
|
-
actionsLayout: "space-between",
|
|
208
|
-
ariaLabel: s.ariaLabel,
|
|
209
|
-
actions: C.value,
|
|
210
|
-
divider: !0,
|
|
211
|
-
fallbackPosition: ["top-start"],
|
|
212
|
-
id: j(`dropdown-options-${s.id}`),
|
|
213
|
-
open: s.open,
|
|
214
|
-
position: "bottom-start",
|
|
215
|
-
style: {
|
|
216
|
-
width: "auto",
|
|
217
|
-
...A
|
|
218
|
-
},
|
|
219
|
-
targetElement: s.targetElement
|
|
220
|
-
} : {
|
|
221
|
-
fallbackPosition: ["top-start"],
|
|
222
|
-
offset: [0, 8],
|
|
223
|
-
position: "bottom-start",
|
|
224
|
-
style: {
|
|
225
|
-
display: d.value ? "block" : "none",
|
|
226
|
-
...A
|
|
227
|
-
},
|
|
228
|
-
targetElement: s.targetElement
|
|
229
|
-
};
|
|
230
|
-
});
|
|
231
|
-
return u({
|
|
232
|
-
onOutsideDropdownClick: h
|
|
233
|
-
}), (A, _) => d.value ? (L(), z(Ne(S.value), R({
|
|
234
|
-
key: 0,
|
|
235
|
-
class: ["b-dropdown-options-container", p.value]
|
|
236
|
-
}, P.value), {
|
|
237
|
-
default: q(() => [
|
|
238
|
-
te("div", {
|
|
239
|
-
onKeydown: _[0] || (_[0] = ot(
|
|
240
|
-
//@ts-ignore
|
|
241
|
-
(...W) => l(D) && l(D)(...W),
|
|
242
|
-
["esc"]
|
|
243
|
-
))
|
|
244
|
-
}, [
|
|
245
|
-
G(l(ve), R({
|
|
246
|
-
id: t.id,
|
|
247
|
-
ref_key: "dropdownOptionsListboxRef",
|
|
248
|
-
ref: g,
|
|
249
|
-
"aria-label": t.ariaLabel,
|
|
250
|
-
class: ["b-dropdown-options-container__listbox", f.value],
|
|
251
|
-
"component-loading": t.componentLoading,
|
|
252
|
-
"empty-state": t.emptyState,
|
|
253
|
-
"is-option-disabled": t.isOptionDisabled,
|
|
254
|
-
items: t.items,
|
|
255
|
-
"selected-value": l(v),
|
|
256
|
-
multiple: l(c),
|
|
257
|
-
"static-categories": t.staticCategories,
|
|
258
|
-
"no-results-message": y.value,
|
|
259
|
-
searching: t.searching,
|
|
260
|
-
loading: t.loading,
|
|
261
|
-
"lazy-load-type": t.lazyLoadType,
|
|
262
|
-
"has-more-items": t.hasMoreItems,
|
|
263
|
-
"virtual-scroll": t.virtualScroll
|
|
264
|
-
}, Q(l(B))), ue({ _: 2 }, [
|
|
265
|
-
ce(l(a), (W, b) => ({
|
|
266
|
-
name: b,
|
|
267
|
-
fn: q((K) => [
|
|
268
|
-
X(A.$slots, b, pe(fe(K)), void 0, !0)
|
|
269
|
-
])
|
|
270
|
-
}))
|
|
271
|
-
]), 1040, ["id", "aria-label", "class", "component-loading", "empty-state", "is-option-disabled", "items", "selected-value", "multiple", "static-categories", "no-results-message", "searching", "loading", "lazy-load-type", "has-more-items", "virtual-scroll"])
|
|
272
|
-
], 32)
|
|
273
|
-
]),
|
|
274
|
-
_: 3
|
|
275
|
-
}, 16, ["class"])) : $("", !0);
|
|
276
|
-
}
|
|
277
|
-
}), Bt = /* @__PURE__ */ H(Ot, [["__scopeId", "data-v-abf92e14"]]);
|
|
278
|
-
let Me = 0;
|
|
279
|
-
const Dt = {
|
|
280
|
-
beforeCreate() {
|
|
281
|
-
this.uuid = Me.toString(), Me += 1;
|
|
282
|
-
}
|
|
283
|
-
}, Tt = { key: 0 };
|
|
284
|
-
function Mt(t, u, i, a, n, s) {
|
|
285
|
-
return L(), F("svg", R({ role: "img" }, t.$attrs, {
|
|
286
|
-
class: "ui-assets-icons-16",
|
|
287
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
288
|
-
width: "16",
|
|
289
|
-
height: "16",
|
|
290
|
-
fill: "none"
|
|
291
|
-
}), [
|
|
292
|
-
t.$attrs["svg-title"] ? (L(), F("title", Tt, ye(t.$attrs["svg-title"]), 1)) : $("", !0),
|
|
293
|
-
u[0] || (u[0] = te("path", {
|
|
294
|
-
fill: "#001222",
|
|
295
|
-
d: "M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z"
|
|
296
|
-
}, null, -1))
|
|
297
|
-
], 16);
|
|
298
|
-
}
|
|
299
|
-
const At = /* @__PURE__ */ H(Dt, [["render", Mt]]);
|
|
300
|
-
let Ae = 0;
|
|
301
|
-
const It = {
|
|
302
|
-
beforeCreate() {
|
|
303
|
-
this.uuid = Ae.toString(), Ae += 1;
|
|
304
|
-
}
|
|
305
|
-
}, xt = { key: 0 };
|
|
306
|
-
function Nt(t, u, i, a, n, s) {
|
|
307
|
-
return L(), F("svg", R({ role: "img" }, t.$attrs, {
|
|
308
|
-
class: "ui-assets-icons-16",
|
|
309
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
310
|
-
width: "16",
|
|
311
|
-
height: "16",
|
|
312
|
-
fill: "none"
|
|
313
|
-
}), [
|
|
314
|
-
t.$attrs["svg-title"] ? (L(), F("title", xt, ye(t.$attrs["svg-title"]), 1)) : $("", !0),
|
|
315
|
-
u[0] || (u[0] = te("path", {
|
|
316
|
-
fill: "#001222",
|
|
317
|
-
d: "M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z"
|
|
318
|
-
}, null, -1))
|
|
319
|
-
], 16);
|
|
320
|
-
}
|
|
321
|
-
const kt = /* @__PURE__ */ H(It, [["render", Nt]]), $t = { class: "b-dropdown-small-textbox__chevron" }, Rt = V({
|
|
322
|
-
name: "dropdown-small-textbox",
|
|
323
|
-
inheritAttrs: !1
|
|
324
|
-
}), Ft = /* @__PURE__ */ V({
|
|
325
|
-
...Rt,
|
|
326
|
-
props: {
|
|
327
|
-
/**
|
|
328
|
-
* The number of additional items that have been selected in the dropdown.
|
|
329
|
-
*/
|
|
330
|
-
additionalItemsSelected: { type: [Number, String], default: 0 },
|
|
331
|
-
/**
|
|
332
|
-
* Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.
|
|
333
|
-
*/
|
|
334
|
-
ariaControls: { type: String, required: !0 },
|
|
335
|
-
/**
|
|
336
|
-
* 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.
|
|
337
|
-
*/
|
|
338
|
-
ariaExpanded: {
|
|
339
|
-
type: [String, Boolean],
|
|
340
|
-
required: !0
|
|
341
|
-
},
|
|
342
|
-
/**
|
|
343
|
-
* If no label element is used then the aria-label is be set should be set.
|
|
344
|
-
*/
|
|
345
|
-
ariaLabel: { type: String, default: null },
|
|
346
|
-
/**
|
|
347
|
-
* Corresponds to the label's id that labels the textbox element.
|
|
348
|
-
*/
|
|
349
|
-
ariaLabelledby: { type: String, default: null },
|
|
350
|
-
/**
|
|
351
|
-
* Disables any textbox functionality
|
|
352
|
-
*/
|
|
353
|
-
disabled: { type: Boolean, default: !1 },
|
|
354
|
-
/**
|
|
355
|
-
* Selected option's label
|
|
356
|
-
*/
|
|
357
|
-
displayValue: { type: String, default: null },
|
|
358
|
-
/**
|
|
359
|
-
* Sets the possibility to type into the textbox
|
|
360
|
-
*/
|
|
361
|
-
dynamicFiltering: { type: Boolean, default: !1 },
|
|
362
|
-
/**
|
|
363
|
-
* Marks the textbox as invalid, rendering an error state
|
|
364
|
-
*/
|
|
365
|
-
isInvalid: { type: Boolean, default: !1 },
|
|
366
|
-
/**
|
|
367
|
-
* Indicates if the dropdown is open so that
|
|
368
|
-
* the respective event can be emitted
|
|
369
|
-
*/
|
|
370
|
-
open: { type: Boolean, default: !1 },
|
|
371
|
-
/**
|
|
372
|
-
* Sets the dropdown to readonly state
|
|
373
|
-
*/
|
|
374
|
-
readonly: { type: Boolean, default: !1 },
|
|
375
|
-
/**
|
|
376
|
-
* The input value
|
|
377
|
-
*/
|
|
378
|
-
value: { type: String, default: "" }
|
|
379
|
-
},
|
|
380
|
-
emits: ["clear", "close", "input", "keydown", "open"],
|
|
381
|
-
setup(t, { expose: u, emit: i }) {
|
|
382
|
-
const a = i, n = t, s = w(null), e = r(() => ({
|
|
383
|
-
[`b-dropdown-small-textbox--${re.DISABLED}`]: n.disabled,
|
|
384
|
-
[`b-dropdown-small-textbox--${re.READONLY}`]: n.readonly,
|
|
385
|
-
[`b-dropdown-small-textbox--${re.OPENED}`]: n.open
|
|
386
|
-
})), c = r(() => n.open && !n.disabled && !n.readonly), g = (v) => {
|
|
387
|
-
a("input", v);
|
|
388
|
-
}, E = (v) => {
|
|
389
|
-
a("keydown", v);
|
|
390
|
-
}, d = (v) => {
|
|
391
|
-
de(v), a("open");
|
|
392
|
-
}, y = (v) => {
|
|
393
|
-
de(v), a("close");
|
|
394
|
-
}, p = (v) => {
|
|
395
|
-
de(v), a("clear");
|
|
396
|
-
}, f = {
|
|
397
|
-
[U.INPUT]: g,
|
|
398
|
-
[U.OPEN]: d,
|
|
399
|
-
[U.CLOSE]: y,
|
|
400
|
-
[U.CLEAR]: p,
|
|
401
|
-
[U.KEYDOWN]: E
|
|
402
|
-
};
|
|
403
|
-
return u({
|
|
404
|
-
focus: () => {
|
|
405
|
-
s.value.focus();
|
|
406
|
-
}
|
|
407
|
-
}), (v, B) => (L(), F("div", {
|
|
408
|
-
class: me(["b-dropdown-small-textbox", e.value])
|
|
409
|
-
}, [
|
|
410
|
-
G(rt, R({
|
|
411
|
-
ref_key: "baseTextbox",
|
|
412
|
-
ref: s
|
|
413
|
-
}, { ...v.$attrs, ...v.$props }, {
|
|
414
|
-
class: "b-dropdown-small-textbox__textbox",
|
|
415
|
-
size: l(Z).SMALL
|
|
416
|
-
}, Q(f)), {
|
|
417
|
-
icon: q(() => [
|
|
418
|
-
te("div", $t, [
|
|
419
|
-
ee(G(l(kt), { "svg-title": "opened" }, null, 512), [
|
|
420
|
-
[Be, c.value]
|
|
421
|
-
]),
|
|
422
|
-
ee(G(l(At), { "svg-title": "closed" }, null, 512), [
|
|
423
|
-
[Be, !c.value]
|
|
424
|
-
])
|
|
425
|
-
])
|
|
426
|
-
]),
|
|
427
|
-
_: 1
|
|
428
|
-
}, 16, ["size"])
|
|
429
|
-
], 2));
|
|
430
|
-
}
|
|
431
|
-
}), Pt = /* @__PURE__ */ H(Ft, [["__scopeId", "data-v-39ce3ec8"]]), _t = (t, u) => u.value.reduce((i, a) => {
|
|
432
|
-
if (a.items) {
|
|
433
|
-
const n = a.items.filter(
|
|
434
|
-
(e) => t.value.find((c) => c.value === e.value)
|
|
435
|
-
);
|
|
436
|
-
n.length === a.items.length ? i.push(a.displayValue ?? a.label) : n.forEach(({ label: e, displayValue: c }) => i.push(c ?? e));
|
|
437
|
-
}
|
|
438
|
-
return t.value.find((n) => n.value === a.value) && i.push(a.displayValue ?? a.label), i;
|
|
439
|
-
}, []).join(", "), Kt = ({ items: t, placeholder: u, selectedValues: i, isMultiSelect: a }) => {
|
|
440
|
-
const n = r(
|
|
441
|
-
() => a.value && t.value.find((e) => e.items?.length)
|
|
442
|
-
);
|
|
443
|
-
return r(() => i.value.length ? n.value ? _t(i, t) : i.value.map(({ label: e, displayValue: c }) => c ?? e).join(", ") : u.value || null);
|
|
444
|
-
}, ke = (t) => {
|
|
445
|
-
t.value.$children?.[0].$refs.textbox.focus();
|
|
446
|
-
}, zt = ({
|
|
447
|
-
inputContainerRef: t,
|
|
448
|
-
optionsContainerRef: u,
|
|
449
|
-
selectedValueIndex: i,
|
|
450
|
-
isDropdownOpen: a,
|
|
451
|
-
isDynamicFltering: n,
|
|
452
|
-
items: s,
|
|
453
|
-
isMultiple: e
|
|
454
|
-
}, c, g, E) => {
|
|
455
|
-
const d = async (b) => {
|
|
456
|
-
n.value && await O(), s.value[b]?.focus();
|
|
457
|
-
}, y = async (b) => {
|
|
458
|
-
n.value && await O();
|
|
459
|
-
const K = u.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.$el.querySelectorAll(
|
|
460
|
-
"button"
|
|
461
|
-
);
|
|
462
|
-
K.length ? K[b]?.focus() : d(b);
|
|
463
|
-
}, p = (b) => u.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.setListboxFocusedIndex(
|
|
464
|
-
b
|
|
465
|
-
), f = () => {
|
|
466
|
-
a.value || g(), O(() => {
|
|
467
|
-
p(0), d(0);
|
|
468
|
-
});
|
|
469
|
-
}, C = () => {
|
|
470
|
-
a.value || g(), O(() => {
|
|
471
|
-
p(s.value.length - 1), d(s.value.length - 1);
|
|
472
|
-
});
|
|
473
|
-
}, v = ({ detail: b }) => {
|
|
474
|
-
b.preventDefault(), f();
|
|
475
|
-
}, B = ({ detail: b }) => {
|
|
476
|
-
b.preventDefault(), C();
|
|
477
|
-
}, D = () => {
|
|
478
|
-
f();
|
|
479
|
-
}, h = () => {
|
|
480
|
-
C();
|
|
481
|
-
}, S = ({ detail: b }) => {
|
|
482
|
-
b.preventDefault(), c(), a.value && O(() => {
|
|
483
|
-
e ? y(0) : (p(i.value), d(i.value));
|
|
484
|
-
});
|
|
485
|
-
}, P = ({ detail: b }) => {
|
|
486
|
-
b.preventDefault(), c(), a.value && O(() => {
|
|
487
|
-
e ? y(0) : (p(i.value), d(i.value));
|
|
488
|
-
});
|
|
489
|
-
}, A = () => {
|
|
490
|
-
a.value && E();
|
|
491
|
-
}, _ = () => {
|
|
492
|
-
a.value && (E(), ke(t));
|
|
493
|
-
};
|
|
494
|
-
return r(() => ({
|
|
495
|
-
[I.ARROW_DOWN]: v,
|
|
496
|
-
[I.ARROW_UP]: B,
|
|
497
|
-
[I.HOME]: D,
|
|
498
|
-
[I.END]: h,
|
|
499
|
-
...n.value ? {} : { [I.SPACE]: S },
|
|
500
|
-
[I.ENTER]: P,
|
|
501
|
-
[I.TAB]: A,
|
|
502
|
-
[I.ESCAPE]: _
|
|
503
|
-
}));
|
|
504
|
-
}, qt = ({ inputContainerRef: t, isDropdownOpen: u }, i) => {
|
|
505
|
-
const a = () => {
|
|
506
|
-
u.value && i(), O(() => {
|
|
507
|
-
ke(t);
|
|
508
|
-
});
|
|
509
|
-
};
|
|
510
|
-
return {
|
|
511
|
-
[m.ENTER]: a,
|
|
512
|
-
[m.ESCAPE]: a,
|
|
513
|
-
[m.TAB]: a,
|
|
514
|
-
[m.SPACE]: a
|
|
515
|
-
};
|
|
516
|
-
};
|
|
517
|
-
function Vt(t, u, i, a, n) {
|
|
518
|
-
const s = w(t), e = w(u), c = (d, y = []) => y.flatMap((p) => p.label.toLocaleLowerCase().includes(d) ? a?.value && p.items ? [...c(d, p.items)] : [p, ...c(d, p.items)] : p.items ? [...c(d, p.items)] : []), g = i !== void 0 ? bt(() => i(s.value), n ?? 300) : void 0;
|
|
519
|
-
return be(s, () => {
|
|
520
|
-
g !== void 0 && g();
|
|
521
|
-
}), r(() => {
|
|
522
|
-
if (!s.value || i !== void 0)
|
|
523
|
-
return e.value;
|
|
524
|
-
const d = s.value.toLocaleLowerCase();
|
|
525
|
-
return c(d, e.value);
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
const $e = {
|
|
529
|
-
"de-DE": { all: "Alle", ariaLabelFallback: "Dropdown", clearSearch: "Filter löschen" },
|
|
530
|
-
"en-GB": { all: "All", ariaLabelFallback: "Dropdown", clearSearch: "Clear filter" },
|
|
531
|
-
"en-US": { all: "All", ariaLabelFallback: "Dropdown", clearSearch: "Clear filter" },
|
|
532
|
-
"es-ES": { all: "Todos", ariaLabelFallback: "Menú desplegable", clearSearch: "Limpiar filtro" },
|
|
533
|
-
"es-MX": { all: "Todos", ariaLabelFallback: "Menú desplegable", clearSearch: "Limpiar filtro" },
|
|
534
|
-
"fr-FR": { all: "Tous", ariaLabelFallback: "Menu déroulant", clearSearch: "Effacer le filtre" },
|
|
535
|
-
"it-IT": { all: "Tutti", ariaLabelFallback: "Menu a discesa", clearSearch: "Cancella filtro" },
|
|
536
|
-
"ja-JP": { all: "すべて", ariaLabelFallback: "ドロップダウン", clearSearch: "フィルターをクリア" },
|
|
537
|
-
"pt-BR": { all: "Todos", ariaLabelFallback: "Menu suspenso", clearSearch: "Limpar filtro" },
|
|
538
|
-
"zh-CN": { all: "全部", ariaLabelFallback: "下拉菜单", clearSearch: "清除筛选器" }
|
|
539
|
-
}, Wt = /* @__PURE__ */ Symbol("input field component injection key"), pa = /* @__PURE__ */ Symbol("input field hint injection key"), fa = /* @__PURE__ */ Symbol("input field parent component injection key"), Ut = V({
|
|
540
|
-
i18n: { messages: $e },
|
|
541
|
-
name: "b-dropdown",
|
|
542
|
-
components: {
|
|
543
|
-
DropdownInputDefault: dt,
|
|
544
|
-
DropdownInputSmall: Pt
|
|
545
|
-
},
|
|
546
|
-
model: { prop: "modelValue" }
|
|
547
|
-
}), jt = /* @__PURE__ */ V({
|
|
548
|
-
...Ut,
|
|
549
|
-
props: {
|
|
550
|
-
ariaLabel: { default: null },
|
|
551
|
-
condensed: { type: Boolean, default: !1 },
|
|
552
|
-
emptyState: { default: void 0 },
|
|
553
|
-
dynamicFiltering: { type: Boolean, default: !1 },
|
|
554
|
-
error: { type: Boolean, default: !1 },
|
|
555
|
-
hasMoreItems: { type: Boolean, default: !1 },
|
|
556
|
-
isOptionDisabled: { type: Function, default: void 0 },
|
|
557
|
-
items: { default: () => [] },
|
|
558
|
-
loading: { type: Boolean, default: !1 },
|
|
559
|
-
componentLoading: { type: Boolean, default: !1 },
|
|
560
|
-
lazyLoadType: { default: ve.props.lazyLoadType.default },
|
|
561
|
-
multiple: { type: Boolean, default: !1 },
|
|
562
|
-
search: { default: void 0 },
|
|
563
|
-
showSlotContentInMultiple: { type: Boolean, default: !1 },
|
|
564
|
-
size: { default: null },
|
|
565
|
-
staticCategories: { type: Boolean, default: !1 },
|
|
566
|
-
value: { default: null },
|
|
567
|
-
modelValue: { default: null },
|
|
568
|
-
virtualScroll: { type: [Boolean, Object], default: !1 },
|
|
569
|
-
enableValueLabelPair: { type: Boolean, default: !1 },
|
|
570
|
-
description: { default: null },
|
|
571
|
-
disabled: { type: Boolean, default: !1 },
|
|
572
|
-
errorMessage: { default: null },
|
|
573
|
-
label: { default: null },
|
|
574
|
-
optional: { type: Boolean, default: !1 },
|
|
575
|
-
placeholder: { default: null },
|
|
576
|
-
readonly: { type: Boolean, default: !1 },
|
|
577
|
-
required: { type: Boolean, default: !1 },
|
|
578
|
-
tooltipText: { default: null }
|
|
579
|
-
},
|
|
580
|
-
emits: ["input", "update:model-value", "show-more", "open"],
|
|
581
|
-
setup(t, { expose: u, emit: i }) {
|
|
582
|
-
const a = lt(), n = Ie(), s = gt(n), e = t, c = i, { t: g } = he({ messages: $e }), { emitValue: E } = ct(c), d = w(null), y = w(null), p = w(null), f = w(!1), C = j("bento-dropdown-options-container"), v = j("dropdown-label"), B = j("dropdown-description"), D = j("dropdown-error"), { isReadOnly: h } = vt(M(e, "readonly")), S = r(() => e.modelValue ?? e.value), { cachedSelectedListboxOptions: P, cachedListboxSelectedValues: A, setCachedValues: _ } = pt(
|
|
583
|
-
M(e, "items"),
|
|
584
|
-
S,
|
|
585
|
-
M(e, "multiple"),
|
|
586
|
-
M(e, "enableValueLabelPair")
|
|
587
|
-
), W = w(a["aria-label"]), b = w(a["aria-describedby"]), { ariaLabel: K, label: J } = xe(e), Re = r(() => g("ariaLabelFallback")), Se = ut({
|
|
588
|
-
// TODO: take ariaLabel ref away when aria-label prop is removed
|
|
589
|
-
ariaLabel: K.value || W,
|
|
590
|
-
label: J,
|
|
591
|
-
defaultFallback: Re
|
|
592
|
-
}), Le = e.size === Z.SMALL || nt(Wt, !1), Fe = r(() => Le ? Z.SMALL : Z.DEFAULT), Pe = r(() => ({
|
|
593
|
-
"b-dropdown--condensed": e.condensed
|
|
594
|
-
})), _e = r(() => ({
|
|
595
|
-
"b-dropdown__description--error": !!e.errorMessage
|
|
596
|
-
})), x = w(""), Y = M(e, "items"), we = M(e, "staticCategories"), ae = Vt(
|
|
597
|
-
x,
|
|
598
|
-
Y,
|
|
599
|
-
e?.search?.searchEvent,
|
|
600
|
-
we,
|
|
601
|
-
e?.search?.debounceTime
|
|
602
|
-
), oe = r(() => e.dynamicFiltering && !!x.value), Ke = Kt({
|
|
603
|
-
items: Y,
|
|
604
|
-
placeholder: M(e, "placeholder"),
|
|
605
|
-
isMultiSelect: M(e, "multiple"),
|
|
606
|
-
selectedValues: P
|
|
607
|
-
}), ze = r(() => {
|
|
608
|
-
if (e?.multiple && Array.isArray(S.value))
|
|
609
|
-
return e.items.filter(
|
|
610
|
-
({ value: o }) => e?.value && (e?.value).includes(o)
|
|
611
|
-
);
|
|
612
|
-
if (!e.multiple && e.staticCategories) {
|
|
613
|
-
const o = e.items.find(
|
|
614
|
-
(N) => N.items.some((k) => k.value === S.value)
|
|
615
|
-
);
|
|
616
|
-
return o ? o.items.find((N) => N.value === S.value) : null;
|
|
617
|
-
}
|
|
618
|
-
return e.items.find(({ value: o }) => o === S.value);
|
|
619
|
-
}), qe = r(() => {
|
|
620
|
-
const o = ae.value.findIndex(({ value: T }) => e.enableValueLabelPair ? S.value.value === T : S.value === T);
|
|
621
|
-
return o > -1 ? o : 0;
|
|
622
|
-
}), { isMultiLevelSelect: Ee, flattenedItemsList: Ve } = ft(Y), We = r(() => Ee.value && !e.staticCategories), Ue = r(() => We.value ? "treeitem" : "option"), je = r(() => {
|
|
623
|
-
if (e.multiple) {
|
|
624
|
-
const o = Array.isArray(S.value) ? S.value.length : 0, T = Ee.value ? Ve.value.length : Y.value.length;
|
|
625
|
-
return o === 0 ? null : !e.hasMoreItems && T > 0 && T === o ? g("all") : o;
|
|
626
|
-
}
|
|
627
|
-
return null;
|
|
628
|
-
}), He = r(
|
|
629
|
-
() => [
|
|
630
|
-
e.description ? B : null,
|
|
631
|
-
b.value,
|
|
632
|
-
e.errorMessage ? D : null
|
|
633
|
-
].filter(Boolean).join(" ") || null
|
|
634
|
-
), Je = r(() => p.value?.$el), { visibleDomOptions: Ye, updateVisibleDomOptions: Ce } = mt(
|
|
635
|
-
Je,
|
|
636
|
-
ae,
|
|
637
|
-
Ue
|
|
638
|
-
), Ge = () => {
|
|
639
|
-
h.value || (f.value = !0, O(() => {
|
|
640
|
-
Ce();
|
|
641
|
-
}));
|
|
642
|
-
}, le = () => {
|
|
643
|
-
f.value = !1;
|
|
644
|
-
}, ne = () => {
|
|
645
|
-
h.value || (f.value = !f.value, O(() => {
|
|
646
|
-
Ce();
|
|
647
|
-
}), oe.value && (x.value = ""));
|
|
648
|
-
}, Xe = () => {
|
|
649
|
-
oe.value && (x.value = ""), f.value && (f.value = !1, p.value.onOutsideDropdownClick());
|
|
650
|
-
}, Ze = async (o) => {
|
|
651
|
-
e.multiple || (x.value = "", f.value = !1), _(o), E(A.value), e.multiple || (await O(), Oe());
|
|
652
|
-
}, Qe = () => {
|
|
653
|
-
c(m.SHOW_MORE);
|
|
654
|
-
}, et = zt(
|
|
655
|
-
{
|
|
656
|
-
inputContainerRef: d,
|
|
657
|
-
optionsContainerRef: p,
|
|
658
|
-
selectedValueIndex: qe,
|
|
659
|
-
isDropdownOpen: f,
|
|
660
|
-
isDynamicFltering: M(e, "dynamicFiltering"),
|
|
661
|
-
items: Ye,
|
|
662
|
-
isMultiple: e.multiple
|
|
663
|
-
},
|
|
664
|
-
ne,
|
|
665
|
-
Ge,
|
|
666
|
-
le
|
|
667
|
-
), tt = qt(
|
|
668
|
-
{
|
|
669
|
-
inputContainerRef: d,
|
|
670
|
-
isDropdownOpen: f
|
|
671
|
-
},
|
|
672
|
-
le
|
|
673
|
-
), at = {
|
|
674
|
-
[m.CLOSE_DROPDOWN]: le,
|
|
675
|
-
[m.SELECT]: Ze,
|
|
676
|
-
[m.SHOW_MORE]: Qe,
|
|
677
|
-
...tt
|
|
678
|
-
};
|
|
679
|
-
e.error && ie(
|
|
680
|
-
'BentoDropdown "error" property',
|
|
681
|
-
`Use the BentoDropdown "errorMessage" property instead to indicate that there is a modifier error.
|
|
682
|
-
Having the field as "undefined" will hide/remove the error.
|
|
683
|
-
<bento-dropdown errorMessage="Error message text" />`,
|
|
684
|
-
"2.0.0"
|
|
685
|
-
), e.size && ie('BentoDropdown "size" property', "Do not use. Only 'default' size should be used.", "2.0.0"), e.value && ie(
|
|
686
|
-
'BentoDropdown "value" property',
|
|
687
|
-
`The use of "value" prop in "BentoDropdown" is no longer supported.
|
|
688
|
-
Use the "v-model" or "model-value" property instead.`,
|
|
689
|
-
"2.0.0"
|
|
690
|
-
);
|
|
691
|
-
const Oe = () => {
|
|
692
|
-
d.value.focus();
|
|
693
|
-
};
|
|
694
|
-
return be(
|
|
695
|
-
() => f.value,
|
|
696
|
-
(o) => {
|
|
697
|
-
o && c("open");
|
|
698
|
-
}
|
|
699
|
-
), u({
|
|
700
|
-
focus: Oe
|
|
701
|
-
}), (o, T) => ee((L(), F("div", {
|
|
702
|
-
class: me(["b-dropdown", Pe.value])
|
|
703
|
-
}, [
|
|
704
|
-
l(J) ? (L(), z(l(St), {
|
|
705
|
-
key: 0,
|
|
706
|
-
id: l(v),
|
|
707
|
-
condensed: o.condensed,
|
|
708
|
-
label: l(J),
|
|
709
|
-
"tooltip-text": o.tooltipText,
|
|
710
|
-
optional: o.optional,
|
|
711
|
-
required: o.required
|
|
712
|
-
}, null, 8, ["id", "condensed", "label", "tooltip-text", "optional", "required"])) : $("", !0),
|
|
713
|
-
ee((L(), F("div", R({
|
|
714
|
-
ref_key: "inputContainerRefWrapper",
|
|
715
|
-
ref: y
|
|
716
|
-
}, Q(l(et), !0)), [
|
|
717
|
-
(L(), z(Ne(Fe.value), {
|
|
718
|
-
ref_key: "inputContainerRef",
|
|
719
|
-
ref: d,
|
|
720
|
-
condensed: o.condensed,
|
|
721
|
-
value: x.value,
|
|
722
|
-
"additional-items-selected": je.value,
|
|
723
|
-
"aria-controls": l(C),
|
|
724
|
-
ariaExpanded: f.value,
|
|
725
|
-
"aria-labelledby": l(J) ? l(v) : null,
|
|
726
|
-
"aria-describedby": He.value,
|
|
727
|
-
"aria-label": l(Se),
|
|
728
|
-
"aria-readonly": l(h),
|
|
729
|
-
"aria-required": o.required,
|
|
730
|
-
readonly: l(h),
|
|
731
|
-
disabled: o.disabled,
|
|
732
|
-
"display-value": l(Ke),
|
|
733
|
-
"dynamic-filtering": o.dynamicFiltering,
|
|
734
|
-
"is-invalid": !!o.errorMessage || o.error,
|
|
735
|
-
multiple: o.multiple,
|
|
736
|
-
open: f.value,
|
|
737
|
-
"selected-value-item": l(Le) ? void 0 : ze.value,
|
|
738
|
-
"show-slot-content-in-multiple": o.showSlotContentInMultiple,
|
|
739
|
-
onInput: T[0] || (T[0] = (N) => x.value = N),
|
|
740
|
-
onOpen: ne,
|
|
741
|
-
onClose: ne
|
|
742
|
-
}, ue({ _: 2 }, [
|
|
743
|
-
ce(l(n), (N, k) => ({
|
|
744
|
-
name: k,
|
|
745
|
-
fn: q((se) => [
|
|
746
|
-
X(o.$slots, k, pe(fe(se)), void 0, !0)
|
|
747
|
-
])
|
|
748
|
-
}))
|
|
749
|
-
]), 1064, ["condensed", "value", "additional-items-selected", "aria-controls", "ariaExpanded", "aria-labelledby", "aria-describedby", "aria-label", "aria-readonly", "aria-required", "readonly", "disabled", "display-value", "dynamic-filtering", "is-invalid", "multiple", "open", "selected-value-item", "show-slot-content-in-multiple"]))
|
|
750
|
-
], 16)), [
|
|
751
|
-
[l(ht)]
|
|
752
|
-
]),
|
|
753
|
-
d.value ? (L(), z(l(Bt), R({
|
|
754
|
-
key: 1,
|
|
755
|
-
id: l(C),
|
|
756
|
-
ref_key: "optionsContainerRef",
|
|
757
|
-
ref: p,
|
|
758
|
-
"aria-label": l(Se),
|
|
759
|
-
"component-loading": o.componentLoading,
|
|
760
|
-
"empty-state": o.emptyState,
|
|
761
|
-
disabled: o.disabled,
|
|
762
|
-
"is-option-disabled": o.isOptionDisabled,
|
|
763
|
-
items: l(ae),
|
|
764
|
-
multiple: o.multiple,
|
|
765
|
-
"static-categories": we.value,
|
|
766
|
-
open: f.value,
|
|
767
|
-
"selected-value": l(P),
|
|
768
|
-
searching: oe.value,
|
|
769
|
-
"target-element": y.value,
|
|
770
|
-
loading: o.loading,
|
|
771
|
-
"has-more-items": o.hasMoreItems,
|
|
772
|
-
"lazy-load-type": o.lazyLoadType,
|
|
773
|
-
"virtual-scroll": o.virtualScroll
|
|
774
|
-
}, Q(at)), ue({ _: 2 }, [
|
|
775
|
-
ce(l(n), (N, k) => ({
|
|
776
|
-
name: k,
|
|
777
|
-
fn: q((se) => [
|
|
778
|
-
X(o.$slots, k, pe(fe(se)), void 0, !0)
|
|
779
|
-
])
|
|
780
|
-
}))
|
|
781
|
-
]), 1040, ["id", "aria-label", "component-loading", "empty-state", "disabled", "is-option-disabled", "items", "multiple", "static-categories", "open", "selected-value", "searching", "target-element", "loading", "has-more-items", "lazy-load-type", "virtual-scroll"])) : $("", !0),
|
|
782
|
-
o.errorMessage ? (L(), z(l(Lt), {
|
|
783
|
-
key: 2,
|
|
784
|
-
id: l(D),
|
|
785
|
-
"error-message": o.errorMessage,
|
|
786
|
-
class: "b-dropdown__error-message"
|
|
787
|
-
}, null, 8, ["id", "error-message"])) : $("", !0),
|
|
788
|
-
o.description || l(s)("description") ? (L(), z(l(it), {
|
|
789
|
-
key: 3,
|
|
790
|
-
id: l(B),
|
|
791
|
-
class: me(["b-dropdown__description", _e.value]),
|
|
792
|
-
el: "span"
|
|
793
|
-
}, {
|
|
794
|
-
default: q(() => [
|
|
795
|
-
X(o.$slots, "description", {}, () => [
|
|
796
|
-
st(ye(o.description), 1)
|
|
797
|
-
], !0)
|
|
798
|
-
]),
|
|
799
|
-
_: 3
|
|
800
|
-
}, 8, ["id", "class"])) : $("", !0)
|
|
801
|
-
], 2)), [
|
|
802
|
-
[l(yt), Xe]
|
|
803
|
-
]);
|
|
804
|
-
}
|
|
805
|
-
}), ma = /* @__PURE__ */ H(jt, [["__scopeId", "data-v-06d3531c"]]);
|
|
806
|
-
export {
|
|
807
|
-
ma as B,
|
|
808
|
-
pa as I,
|
|
809
|
-
Wt as a,
|
|
810
|
-
fa as b,
|
|
811
|
-
Vt as u
|
|
812
|
-
};
|
|
813
|
-
//# sourceMappingURL=dropdown.Do-mZiI6.js.map
|