@adyen/bento-vue3 1.48.0 → 1.50.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 +107 -944
- package/dist/action-bar.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/base-modal.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/link.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/payment-method.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/toggle-button.css +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.DWekSxPr.js → action-bar.DkGjsKiy.js} +6 -6
- package/dist/chunks/{action-bar.DWekSxPr.js.map → action-bar.DkGjsKiy.js.map} +1 -1
- package/dist/chunks/{alert.Dd2DYCZ1.js → alert.DGewBB2a.js} +2 -2
- package/dist/chunks/{alert.Dd2DYCZ1.js.map → alert.DGewBB2a.js.map} +1 -1
- package/dist/chunks/{base-modal.DOrcARK1.js → base-modal.gW2mkOwf.js} +5 -5
- package/dist/chunks/{base-modal.DOrcARK1.js.map → base-modal.gW2mkOwf.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BRdRrr4J.js → button-actions-with-menu.BXRKkFiw.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.BRdRrr4J.js.map → button-actions-with-menu.BXRKkFiw.js.map} +1 -1
- package/dist/chunks/{button-actions.ncthaz2m.js → button-actions.BZEKcCbe.js} +2 -2
- package/dist/chunks/{button-actions.ncthaz2m.js.map → button-actions.BZEKcCbe.js.map} +1 -1
- package/dist/chunks/{button.Cneb6rPP.js → button.BXVKUuum.js} +2 -2
- package/dist/chunks/{button.Cneb6rPP.js.map → button.BXVKUuum.js.map} +1 -1
- package/dist/chunks/{calendar.BdLQOioy.js → calendar.DNQlLbkK.js} +2 -2
- package/dist/chunks/{calendar.BdLQOioy.js.map → calendar.DNQlLbkK.js.map} +1 -1
- package/dist/chunks/{card.BAg7yMMT.js → card.Ec-SR2qG.js} +2 -2
- package/dist/chunks/{card.BAg7yMMT.js.map → card.Ec-SR2qG.js.map} +1 -1
- package/dist/chunks/{checkbox-group.C-EmVp5t.js → checkbox-group.KeIRO8lx.js} +4 -4
- package/dist/chunks/{checkbox-group.C-EmVp5t.js.map → checkbox-group.KeIRO8lx.js.map} +1 -1
- package/dist/chunks/{checkbox.BOtqaTUl.js → checkbox.BllRk82F.js} +17 -17
- package/dist/chunks/{checkbox.BOtqaTUl.js.map → checkbox.BllRk82F.js.map} +1 -1
- package/dist/chunks/{code-snippet.C9fCiM5V.js → code-snippet.DfTfz3vU.js} +6 -6
- package/dist/chunks/{code-snippet.C9fCiM5V.js.map → code-snippet.DfTfz3vU.js.map} +1 -1
- package/dist/chunks/{controls-group.BeK9igGT.js → controls-group.BnbQO34k.js} +2 -2
- package/dist/chunks/{controls-group.BeK9igGT.js.map → controls-group.BnbQO34k.js.map} +1 -1
- package/dist/chunks/{copy.HpUjy6OL.js → copy.DAu8GrR9.js} +3 -3
- package/dist/chunks/{copy.HpUjy6OL.js.map → copy.DAu8GrR9.js.map} +1 -1
- package/dist/chunks/currency.DagWnTry.js.map +1 -1
- package/dist/chunks/{dashboard-section.DoGuJKz_.js → dashboard-section.pyg05_v_.js} +4 -4
- package/dist/chunks/{dashboard-section.DoGuJKz_.js.map → dashboard-section.pyg05_v_.js.map} +1 -1
- package/dist/chunks/{dashed-underline.DZuyR-N7.js → dashed-underline.DTZGLrPu.js} +3 -3
- package/dist/chunks/{dashed-underline.DZuyR-N7.js.map → dashed-underline.DTZGLrPu.js.map} +1 -1
- package/dist/chunks/{data-grid-template.BpJbblNT.js → data-grid-template.sUNqCvbt.js} +3 -3
- package/dist/chunks/{data-grid-template.BpJbblNT.js.map → data-grid-template.sUNqCvbt.js.map} +1 -1
- package/dist/chunks/{data-grid.CdTcZ3DP.js → data-grid.BNXoMZf9.js} +1028 -1022
- package/dist/chunks/data-grid.BNXoMZf9.js.map +1 -0
- package/dist/chunks/{date-picker.CjbhJWGH.js → date-picker.DgpHNnu_.js} +17 -17
- package/dist/chunks/{date-picker.CjbhJWGH.js.map → date-picker.DgpHNnu_.js.map} +1 -1
- package/dist/chunks/{date-range-picker.CoonfpYT.js → date-range-picker.CUIOfxjB.js} +26 -26
- package/dist/chunks/{date-range-picker.CoonfpYT.js.map → date-range-picker.CUIOfxjB.js.map} +1 -1
- package/dist/chunks/{dialog-page.D_r_CbyD.js → dialog-page.DK2UKGH8.js} +2 -2
- package/dist/chunks/{dialog-page.D_r_CbyD.js.map → dialog-page.DK2UKGH8.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.B5QFkTl_.js → dropdown-tag.DqfoOcUU.js} +4 -4
- package/dist/chunks/{dropdown-tag.B5QFkTl_.js.map → dropdown-tag.DqfoOcUU.js.map} +1 -1
- package/dist/chunks/{dropdown.BN6DALZa.js → dropdown.a8OeeVAZ.js} +344 -344
- package/dist/chunks/dropdown.a8OeeVAZ.js.map +1 -0
- package/dist/chunks/{empty-state.C2ancCe6.js → empty-state.DkYtiTHG.js} +2 -2
- package/dist/chunks/{empty-state.C2ancCe6.js.map → empty-state.DkYtiTHG.js.map} +1 -1
- package/dist/chunks/{error-message.X-gxnQcx.js → error-message.B3z5WkLF.js} +2 -2
- package/dist/chunks/{error-message.X-gxnQcx.js.map → error-message.B3z5WkLF.js.map} +1 -1
- package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
- package/dist/chunks/{file-uploader.CLZ1rPz0.js → file-uploader.DV4I5Lvf.js} +475 -470
- package/dist/chunks/file-uploader.DV4I5Lvf.js.map +1 -0
- package/dist/chunks/{filter-bar.zvHeHs9B.js → filter-bar.BZkXUVLH.js} +20 -19
- package/dist/chunks/{filter-bar.zvHeHs9B.js.map → filter-bar.BZkXUVLH.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.BZwgM5Io.js → fixed-scroller.B4Eag_Sd.js} +2 -2
- package/dist/chunks/{fixed-scroller.BZwgM5Io.js.map → fixed-scroller.B4Eag_Sd.js.map} +1 -1
- package/dist/chunks/{focus-trap.CnKbO3b1.js → focus-trap.DPJj05sV.js} +6 -3
- package/dist/chunks/{focus-trap.CnKbO3b1.js.map → focus-trap.DPJj05sV.js.map} +1 -1
- package/dist/chunks/{footer-actions.X_RokrtM.js → footer-actions.WvWwFKM8.js} +3 -3
- package/dist/chunks/{footer-actions.X_RokrtM.js.map → footer-actions.WvWwFKM8.js.map} +1 -1
- package/dist/chunks/{form-layout-title.xkALokzl.js → form-layout-title.BHL_MDqT.js} +2 -2
- package/dist/chunks/{form-layout-title.xkALokzl.js.map → form-layout-title.BHL_MDqT.js.map} +1 -1
- package/dist/chunks/{header.CUhyy9NL.js → header.CRC9X7v2.js} +20 -20
- package/dist/chunks/{header.CUhyy9NL.js.map → header.CRC9X7v2.js.map} +1 -1
- package/dist/chunks/{index.BMkVmbZj.js → index.BS3BeXQJ.js} +8 -7
- package/dist/chunks/{index.BMkVmbZj.js.map → index.BS3BeXQJ.js.map} +1 -1
- package/dist/chunks/{info-icon-with-popover.NzQciGvf.js → info-icon-with-popover.BM0esxKN.js} +2 -2
- package/dist/chunks/{info-icon-with-popover.NzQciGvf.js.map → info-icon-with-popover.BM0esxKN.js.map} +1 -1
- package/dist/chunks/{info-icon.BCSBCH-5.js → info-icon.DQn8-VSp.js} +2 -2
- package/dist/chunks/{info-icon.BCSBCH-5.js.map → info-icon.DQn8-VSp.js.map} +1 -1
- package/dist/chunks/{input-field-password.B4HgGilX.js → input-field-password.Bo7FiAOq.js} +6 -6
- package/dist/chunks/{input-field-password.B4HgGilX.js.map → input-field-password.Bo7FiAOq.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.CpY2BLfO.js → input-field-phone-number.DO2uU2XW.js} +2 -2
- package/dist/chunks/{input-field-phone-number.CpY2BLfO.js.map → input-field-phone-number.DO2uU2XW.js.map} +1 -1
- package/dist/chunks/{input-field.DQKiMtZo.js → input-field.rgA0t2sp.js} +3 -3
- package/dist/chunks/{input-field.DQKiMtZo.js.map → input-field.rgA0t2sp.js.map} +1 -1
- package/dist/chunks/inspector.types.Io6ONte7.js +184 -0
- package/dist/chunks/inspector.types.Io6ONte7.js.map +1 -0
- package/dist/chunks/{layout-row.9G7yVMVt.js → layout-row.BAz7JrXo.js} +2 -2
- package/dist/chunks/{layout-row.9G7yVMVt.js.map → layout-row.BAz7JrXo.js.map} +1 -1
- package/dist/chunks/{link.ClFi8uSm.js → link.CyGCtpse.js} +9 -9
- package/dist/chunks/link.CyGCtpse.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.CFNRfAtf.js → listbox-option-tag.DIk4F59J.js} +2 -2
- package/dist/chunks/{listbox-option-tag.CFNRfAtf.js.map → listbox-option-tag.DIk4F59J.js.map} +1 -1
- package/dist/chunks/{menu.DIKy_Pyt.js → menu.DKluB_Dn.js} +45 -44
- package/dist/chunks/menu.DKluB_Dn.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.Fqcd3B6-.js → modal-fullscreen.D1gvJFag.js} +5 -5
- package/dist/chunks/{modal-fullscreen.Fqcd3B6-.js.map → modal-fullscreen.D1gvJFag.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.PEGJemgc.js → modal.vue_vue_type_script_setup_true_lang.91_wyIIq.js} +5 -5
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.PEGJemgc.js.map → modal.vue_vue_type_script_setup_true_lang.91_wyIIq.js.map} +1 -1
- package/dist/chunks/{pagination.DogGVwa2.js → pagination.CGS6fGUm.js} +3 -3
- package/dist/chunks/{pagination.DogGVwa2.js.map → pagination.CGS6fGUm.js.map} +1 -1
- package/dist/chunks/payment-method.CGNHCiy1.js +73 -0
- package/dist/chunks/payment-method.CGNHCiy1.js.map +1 -0
- package/dist/chunks/payment-method.types.CJKfZQN5.js.map +1 -1
- package/dist/chunks/{popover.NEP6wuPa.js → popover.BNOfWuSb.js} +94 -93
- package/dist/chunks/popover.BNOfWuSb.js.map +1 -0
- package/dist/chunks/{popper-container.DKDjRvdv.js → popper-container.BvGYgqiE.js} +2 -2
- package/dist/chunks/{popper-container.DKDjRvdv.js.map → popper-container.BvGYgqiE.js.map} +1 -1
- package/dist/chunks/{promo-banner.DTH4CZ_2.js → promo-banner.BUtq-2iR.js} +3 -3
- package/dist/chunks/{promo-banner.DTH4CZ_2.js.map → promo-banner.BUtq-2iR.js.map} +1 -1
- package/dist/chunks/{radio-group.BLHcC22p.js → radio-group.CivaJaaQ.js} +4 -4
- package/dist/chunks/{radio-group.BLHcC22p.js.map → radio-group.CivaJaaQ.js.map} +1 -1
- package/dist/chunks/{search-bar.CatznIEM.js → search-bar.Zdai5UhB.js} +3 -3
- package/dist/chunks/{search-bar.CatznIEM.js.map → search-bar.Zdai5UhB.js.map} +1 -1
- package/dist/chunks/{secondary-nav.LIzkbQY1.js → secondary-nav.C6D6dcs6.js} +3 -3
- package/dist/chunks/{secondary-nav.LIzkbQY1.js.map → secondary-nav.C6D6dcs6.js.map} +1 -1
- package/dist/chunks/{segmented-control.DOxyrdMz.js → segmented-control.DKWpxDho.js} +2 -2
- package/dist/chunks/{segmented-control.DOxyrdMz.js.map → segmented-control.DKWpxDho.js.map} +1 -1
- package/dist/chunks/{selection-card-group.BKatprYB.js → selection-card-group.DzwIeKQC.js} +12 -12
- package/dist/chunks/{selection-card-group.BKatprYB.js.map → selection-card-group.DzwIeKQC.js.map} +1 -1
- package/dist/chunks/{sidepanel.Be3uyOVd.js → sidepanel.DzF1iCZM.js} +5 -5
- package/dist/chunks/{sidepanel.Be3uyOVd.js.map → sidepanel.DzF1iCZM.js.map} +1 -1
- package/dist/chunks/{structured-list-item.BwgEJywb.js → structured-list-item.DQHvIbQo.js} +5 -5
- package/dist/chunks/{structured-list-item.BwgEJywb.js.map → structured-list-item.DQHvIbQo.js.map} +1 -1
- package/dist/chunks/{summary-grid-item-custom.Vx_YxH7S.js → summary-grid-item-custom.D6s8sw36.js} +4 -4
- package/dist/chunks/{summary-grid-item-custom.Vx_YxH7S.js.map → summary-grid-item-custom.D6s8sw36.js.map} +1 -1
- package/dist/chunks/{tabs.CR2tWuz3.js → tabs.CiTn85aw.js} +2 -2
- package/dist/chunks/{tabs.CR2tWuz3.js.map → tabs.CiTn85aw.js.map} +1 -1
- package/dist/chunks/{tag.Chr4TP7d.js → tag.Bmw9RaOG.js} +2 -2
- package/dist/chunks/{tag.Chr4TP7d.js.map → tag.Bmw9RaOG.js.map} +1 -1
- package/dist/chunks/{textarea.BLhKC_iw.js → textarea.CzuRg2pM.js} +3 -3
- package/dist/chunks/{textarea.BLhKC_iw.js.map → textarea.CzuRg2pM.js.map} +1 -1
- package/dist/chunks/{timeline-item.BVm2YscV.js → timeline-item.CjltBKy0.js} +7 -7
- package/dist/chunks/{timeline-item.BVm2YscV.js.map → timeline-item.CjltBKy0.js.map} +1 -1
- package/dist/chunks/{toast.A5f1_NqV.js → toast.BWxPbCOy.js} +2 -2
- package/dist/chunks/{toast.A5f1_NqV.js.map → toast.BWxPbCOy.js.map} +1 -1
- package/dist/chunks/{toggle-button.CCgvi7TQ.js → toggle-button.B9LWddx9.js} +23 -22
- package/dist/chunks/toggle-button.B9LWddx9.js.map +1 -0
- package/dist/chunks/{tooltip.2MOlGHD9.js → tooltip.DS1ok8gh.js} +2 -2
- package/dist/chunks/{tooltip.2MOlGHD9.js.map → tooltip.DS1ok8gh.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.D4ifiOTn.js → tutorial.vue_vue_type_script_setup_true_lang.CxTHd8yr.js} +5 -5
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.D4ifiOTn.js.map → tutorial.vue_vue_type_script_setup_true_lang.CxTHd8yr.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.CoelUIEy.js → use-cached-selected-values.CxAhnNa6.js} +483 -479
- package/dist/chunks/use-cached-selected-values.CxAhnNa6.js.map +1 -0
- 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/dropdown.js +3 -3
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +54 -54
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +12 -12
- package/dist/layout.js +1 -1
- package/dist/link.js +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/payment-method.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +2 -1
- package/dist/styles/bento-light.css +2 -1
- package/dist/styles/bento.css +2 -1
- package/dist/styles/legacy.css +3 -0
- package/dist/styles/styleguide.css +2 -1
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +4 -4
- package/dist/chunks/data-grid.CdTcZ3DP.js.map +0 -1
- package/dist/chunks/dropdown.BN6DALZa.js.map +0 -1
- package/dist/chunks/file-uploader.CLZ1rPz0.js.map +0 -1
- package/dist/chunks/inspector.types.C-Qos3dV.js +0 -124
- package/dist/chunks/inspector.types.C-Qos3dV.js.map +0 -1
- package/dist/chunks/link.ClFi8uSm.js.map +0 -1
- package/dist/chunks/menu.DIKy_Pyt.js.map +0 -1
- package/dist/chunks/payment-method.NguqkTwG.js +0 -103
- package/dist/chunks/payment-method.NguqkTwG.js.map +0 -1
- package/dist/chunks/popover.NEP6wuPa.js.map +0 -1
- package/dist/chunks/toggle-button.CCgvi7TQ.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.CoelUIEy.js.map +0 -1
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { B as
|
|
1
|
+
import { computed as m, ref as P, onMounted as Oe, onUnmounted as Fe, watch as Ie, defineComponent as W, resolveComponent as T, createElementBlock as O, openBlock as v, createVNode as B, createElementVNode as q, withCtx as _, createTextVNode as G, toDisplayString as U, renderSlot as z, mergeProps as w, withKeys as ve, createCommentVNode as Y, createBlock as D, withModifiers as Ye, normalizeProps as ee, guardReactiveProps as ne, withDirectives as ae, vShow as Ae, toRef as se, resolveDirective as pe, toHandlers as te, Fragment as J, renderList as x, createSlots as ie, normalizeClass as fe, unref as ce, normalizeStyle as qe } from "vue";
|
|
2
|
+
import { B as F, a as Se } from "./keyboard-navigation.CqgGzfZQ.js";
|
|
3
3
|
import "./events.FNmSWp_P.js";
|
|
4
4
|
import { B as Z } from "./typography.DN5eC5ch.js";
|
|
5
|
-
import { B as
|
|
6
|
-
import { B as We } from "./empty-state.
|
|
5
|
+
import { B as Ke } from "./loading-indicator.DEepb9Wl.js";
|
|
6
|
+
import { B as We } from "./empty-state.DkYtiTHG.js";
|
|
7
7
|
import { u as ue } from "./i18n.D9azDLPe.js";
|
|
8
8
|
import { d as je } from "./debounce.DUTu11PS.js";
|
|
9
|
-
import { B as Ce } from "./checkbox.
|
|
9
|
+
import { B as Ce } from "./checkbox.BllRk82F.js";
|
|
10
10
|
import { B as He } from "./base-button.DdNFlbgH.js";
|
|
11
11
|
import { C as Xe } from "./cross-small.Z5EKYRm0.js";
|
|
12
|
-
import { _ as
|
|
12
|
+
import { _ as K } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
13
13
|
import { C as Je, a as Ze } from "./chevron-up.Cu9qXgBY.js";
|
|
14
|
-
import { d as Qe, e as he } from "./button-actions.
|
|
14
|
+
import { d as Qe, e as he } from "./button-actions.BZEKcCbe.js";
|
|
15
15
|
import { o as et } from "./resize.Bqks3WUm.js";
|
|
16
16
|
import "../assets/use-cached-selected-values.css";
|
|
17
17
|
const $e = (e, t, a, c) => {
|
|
18
|
-
const
|
|
18
|
+
const b = m(
|
|
19
19
|
() => {
|
|
20
|
-
var
|
|
21
|
-
return !!((
|
|
20
|
+
var r, n;
|
|
21
|
+
return !!((r = e.value) != null && r.length) && ((n = e.value) == null ? void 0 : n.length) === t.value.length;
|
|
22
22
|
}
|
|
23
|
-
),
|
|
24
|
-
var
|
|
25
|
-
return e.value == null || e.value.length === 0 ? !1 : ((
|
|
23
|
+
), o = m(() => {
|
|
24
|
+
var r;
|
|
25
|
+
return e.value == null || e.value.length === 0 ? !1 : ((r = e.value) == null ? void 0 : r.length) !== t.value.length;
|
|
26
26
|
});
|
|
27
27
|
return {
|
|
28
|
-
isAllSelected:
|
|
29
|
-
isIndeterminate:
|
|
30
|
-
toggleSelectAll: (
|
|
31
|
-
|
|
28
|
+
isAllSelected: b,
|
|
29
|
+
isIndeterminate: o,
|
|
30
|
+
toggleSelectAll: (r) => {
|
|
31
|
+
r ? a() : c();
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
function tt(e, { disabled: t, itemHeight: a, overscan: c = 5, prefixHeight:
|
|
36
|
-
const
|
|
37
|
-
let
|
|
38
|
-
const
|
|
39
|
-
const
|
|
35
|
+
function tt(e, { disabled: t, itemHeight: a, overscan: c = 5, prefixHeight: b }) {
|
|
36
|
+
const o = P(null), s = P([]), r = P(0), n = P(0), i = P(0);
|
|
37
|
+
let p;
|
|
38
|
+
const l = m(() => {
|
|
39
|
+
const y = typeof a == "number" ? e.value.length * a : e.value.reduce((k, C, I) => k + a(I), 0), h = typeof a == "number" ? r.value * a : e.value.slice(0, r.value).reduce((k, C, I) => k + a(I), 0);
|
|
40
40
|
return {
|
|
41
41
|
style: {
|
|
42
|
-
marginTop: `${
|
|
43
|
-
height: `${
|
|
42
|
+
marginTop: `${h}px`,
|
|
43
|
+
height: `${y - h}px`
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
}),
|
|
47
|
-
const
|
|
46
|
+
}), u = () => {
|
|
47
|
+
const y = (b == null ? void 0 : b.value) ?? 0, h = Math.max(o.value.scrollTop - y, 0);
|
|
48
48
|
if (typeof a == "number")
|
|
49
|
-
return Math.floor(
|
|
50
|
-
let k = 0,
|
|
49
|
+
return Math.floor(h / a);
|
|
50
|
+
let k = 0, C = 0;
|
|
51
51
|
for (let I = 0; I < e.value.length; I += 1) {
|
|
52
52
|
const V = a(I);
|
|
53
|
-
if (k += V, k >=
|
|
54
|
-
|
|
53
|
+
if (k += V, k >= h) {
|
|
54
|
+
C = I;
|
|
55
55
|
break;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
return
|
|
58
|
+
return C;
|
|
59
59
|
}, R = () => {
|
|
60
|
-
if (i.value =
|
|
60
|
+
if (i.value = o.value.clientHeight, typeof a == "number")
|
|
61
61
|
return Math.ceil(i.value / a);
|
|
62
|
-
const
|
|
63
|
-
let
|
|
64
|
-
for (let
|
|
65
|
-
const I = a(
|
|
66
|
-
if (
|
|
62
|
+
const y = r.value ?? 0;
|
|
63
|
+
let h = 0, k = 0;
|
|
64
|
+
for (let C = y; C < e.value.length; C += 1) {
|
|
65
|
+
const I = a(C);
|
|
66
|
+
if (h += I, k = C, h > i.value)
|
|
67
67
|
break;
|
|
68
68
|
}
|
|
69
|
-
return k -
|
|
69
|
+
return k - y;
|
|
70
70
|
}, $ = () => {
|
|
71
|
-
if (
|
|
72
|
-
const
|
|
73
|
-
|
|
71
|
+
if (o.value) {
|
|
72
|
+
const y = R();
|
|
73
|
+
r.value = u(), n.value = Math.min(r.value + y + c, e.value.length), s.value = e.value.slice(r.value, n.value);
|
|
74
74
|
}
|
|
75
75
|
}, M = () => {
|
|
76
76
|
$();
|
|
77
77
|
};
|
|
78
78
|
t || (Oe(() => {
|
|
79
|
-
|
|
80
|
-
i.value =
|
|
79
|
+
o.value && (i.value = o.value.clientHeight, p = et(o.value, ({ clientHeight: y }) => {
|
|
80
|
+
i.value = y, $();
|
|
81
81
|
}), $());
|
|
82
|
-
}),
|
|
83
|
-
|
|
82
|
+
}), Fe(() => {
|
|
83
|
+
p == null || p.disconnect();
|
|
84
84
|
}), Ie(
|
|
85
85
|
() => e.value,
|
|
86
86
|
() => {
|
|
87
87
|
$();
|
|
88
88
|
}
|
|
89
89
|
));
|
|
90
|
-
const
|
|
91
|
-
ref:
|
|
90
|
+
const g = {
|
|
91
|
+
ref: o,
|
|
92
92
|
style: { overflowY: "auto" }
|
|
93
93
|
};
|
|
94
94
|
return t ? {
|
|
95
|
-
containerRef:
|
|
96
|
-
containerProps:
|
|
95
|
+
containerRef: o,
|
|
96
|
+
containerProps: g,
|
|
97
97
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
98
98
|
onScroll: () => {
|
|
99
99
|
},
|
|
100
100
|
list: e
|
|
101
101
|
} : {
|
|
102
|
-
containerRef:
|
|
103
|
-
containerProps:
|
|
102
|
+
containerRef: o,
|
|
103
|
+
containerProps: g,
|
|
104
104
|
onScroll: M,
|
|
105
105
|
list: s,
|
|
106
|
-
wrapperProps:
|
|
106
|
+
wrapperProps: l
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
var
|
|
109
|
+
var d = /* @__PURE__ */ ((e) => (e.SELECT = "select", e.SHOW_MORE = "show-more", e.ESCAPE = "escape-pressed", e.CLICK = "click", e.ENTER = "enter-pressed", e.SPACE = "space-pressed", e.TAB = "tab-pressed", e.CLOSE_DROPDOWN = "close-dropdown", e))(d || {}), X = /* @__PURE__ */ ((e) => (e.AUTOMATIC = "automatic", e.BUTTON = "button", e.NONE = "none", e))(X || {});
|
|
110
110
|
const st = W({
|
|
111
111
|
name: "bento-listbox-static-category",
|
|
112
112
|
components: {
|
|
@@ -122,25 +122,25 @@ const st = W({
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}), lt = { class: "b-listbox-single-select-category" };
|
|
125
|
-
function ot(e, t, a, c,
|
|
126
|
-
const s =
|
|
127
|
-
return
|
|
125
|
+
function ot(e, t, a, c, b, o) {
|
|
126
|
+
const s = T("bento-typography");
|
|
127
|
+
return v(), O("div", lt, [
|
|
128
128
|
B(s, {
|
|
129
129
|
variant: "caption",
|
|
130
130
|
el: "span",
|
|
131
131
|
class: "b-listbox-single-select-category__label-text"
|
|
132
132
|
}, {
|
|
133
|
-
default:
|
|
134
|
-
G(
|
|
133
|
+
default: _(() => [
|
|
134
|
+
G(U(e.categoryLabel), 1)
|
|
135
135
|
]),
|
|
136
136
|
_: 1
|
|
137
137
|
}),
|
|
138
|
-
|
|
138
|
+
q("div", null, [
|
|
139
139
|
z(e.$slots, "default", {}, void 0, !0)
|
|
140
140
|
])
|
|
141
141
|
]);
|
|
142
142
|
}
|
|
143
|
-
const nt = /* @__PURE__ */
|
|
143
|
+
const nt = /* @__PURE__ */ K(st, [["render", ot], ["__scopeId", "data-v-a90eff17"]]), it = W({
|
|
144
144
|
name: "bento-listbox-option",
|
|
145
145
|
props: {
|
|
146
146
|
/**
|
|
@@ -152,30 +152,30 @@ const nt = /* @__PURE__ */ q(st, [["render", ot], ["__scopeId", "data-v-a90eff17
|
|
|
152
152
|
*/
|
|
153
153
|
selected: { type: Boolean, default: !1 }
|
|
154
154
|
},
|
|
155
|
-
emits: [
|
|
155
|
+
emits: [d.CLICK, d.ENTER, d.SPACE, d.TAB],
|
|
156
156
|
setup(e, { emit: t }) {
|
|
157
|
-
const a =
|
|
157
|
+
const a = m(() => ({
|
|
158
158
|
"b-listbox-option--disabled": e.disabled,
|
|
159
159
|
"b-listbox-option--selected": e.selected
|
|
160
160
|
}));
|
|
161
161
|
return {
|
|
162
162
|
// Enums
|
|
163
|
-
BentoKeyboardNavigationKeyDownEvent:
|
|
164
|
-
BentoListboxEvent:
|
|
163
|
+
BentoKeyboardNavigationKeyDownEvent: F,
|
|
164
|
+
BentoListboxEvent: d,
|
|
165
165
|
// Values
|
|
166
166
|
conditionalClasses: a,
|
|
167
167
|
// Events
|
|
168
|
-
onClick: (
|
|
169
|
-
t(
|
|
168
|
+
onClick: (o) => {
|
|
169
|
+
t(d.CLICK, o);
|
|
170
170
|
},
|
|
171
|
-
onOptionSelected: (
|
|
172
|
-
t(
|
|
171
|
+
onOptionSelected: (o, s) => {
|
|
172
|
+
t(o, s);
|
|
173
173
|
}
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
176
|
});
|
|
177
|
-
function at(e, t, a, c,
|
|
178
|
-
return
|
|
177
|
+
function at(e, t, a, c, b, o) {
|
|
178
|
+
return v(), O("label", w({
|
|
179
179
|
class: ["b-listbox-option", e.conditionalClasses],
|
|
180
180
|
role: "option"
|
|
181
181
|
}, e.$attrs, {
|
|
@@ -189,29 +189,29 @@ function at(e, t, a, c, u, n) {
|
|
|
189
189
|
z(e.$slots, "default", {}, void 0, !0)
|
|
190
190
|
], 16);
|
|
191
191
|
}
|
|
192
|
-
const de = /* @__PURE__ */
|
|
192
|
+
const de = /* @__PURE__ */ K(it, [["render", at], ["__scopeId", "data-v-18a61f5d"]]);
|
|
193
193
|
let Ee = 0;
|
|
194
194
|
const rt = {
|
|
195
195
|
beforeCreate() {
|
|
196
196
|
this.uuid = Ee.toString(), Ee += 1;
|
|
197
197
|
}
|
|
198
198
|
}, ct = { key: 0 };
|
|
199
|
-
function ut(e, t, a, c,
|
|
200
|
-
return
|
|
199
|
+
function ut(e, t, a, c, b, o) {
|
|
200
|
+
return v(), O("svg", w({ role: "img" }, e.$attrs, {
|
|
201
201
|
class: "ui-assets-icons-16",
|
|
202
202
|
xmlns: "http://www.w3.org/2000/svg",
|
|
203
203
|
width: "16",
|
|
204
204
|
height: "16",
|
|
205
205
|
fill: "none"
|
|
206
206
|
}), [
|
|
207
|
-
e.$attrs["svg-title"] ? (
|
|
208
|
-
t[0] || (t[0] =
|
|
207
|
+
e.$attrs["svg-title"] ? (v(), O("title", ct, U(e.$attrs["svg-title"]), 1)) : Y("", !0),
|
|
208
|
+
t[0] || (t[0] = q("path", {
|
|
209
209
|
fill: "#00112C",
|
|
210
210
|
d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z"
|
|
211
211
|
}, null, -1))
|
|
212
212
|
], 16);
|
|
213
213
|
}
|
|
214
|
-
const dt = /* @__PURE__ */
|
|
214
|
+
const dt = /* @__PURE__ */ K(rt, [["render", ut]]), bt = W({
|
|
215
215
|
name: "bento-listbox-single-select-option",
|
|
216
216
|
components: {
|
|
217
217
|
BentoListboxOption: de,
|
|
@@ -236,26 +236,26 @@ const dt = /* @__PURE__ */ q(rt, [["render", ut]]), bt = W({
|
|
|
236
236
|
*/
|
|
237
237
|
selected: { type: Boolean, default: !1 }
|
|
238
238
|
},
|
|
239
|
-
emits: [
|
|
239
|
+
emits: [d.ENTER, d.SELECT, d.SPACE, d.TAB],
|
|
240
240
|
setup(e, { emit: t }) {
|
|
241
241
|
const a = (s) => {
|
|
242
242
|
e.disabled || t(s, e.option);
|
|
243
|
-
}, c =
|
|
243
|
+
}, c = m(() => e.disabled ? !0 : null), b = m(() => e.selected ? !0 : null), o = m(() => e.disabled ? -1 : 0);
|
|
244
244
|
return {
|
|
245
245
|
// Values
|
|
246
246
|
ariaDisabled: c,
|
|
247
|
-
ariaSelected:
|
|
248
|
-
tabIndex:
|
|
247
|
+
ariaSelected: b,
|
|
248
|
+
tabIndex: o,
|
|
249
249
|
// Enums
|
|
250
|
-
BentoListboxEvent:
|
|
250
|
+
BentoListboxEvent: d,
|
|
251
251
|
// Events
|
|
252
252
|
onOptionSelected: a
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
255
|
}), mt = { class: "b-listbox-single-select-option__text" }, vt = { class: "b-listbox-single-select-option__check-icon" };
|
|
256
|
-
function ft(e, t, a, c,
|
|
257
|
-
const s =
|
|
258
|
-
return
|
|
256
|
+
function ft(e, t, a, c, b, o) {
|
|
257
|
+
const s = T("bento-typography"), r = T("checkmark-icon"), n = T("bento-listbox-option");
|
|
258
|
+
return v(), D(n, {
|
|
259
259
|
class: "b-listbox-single-select-option",
|
|
260
260
|
disabled: e.disabled,
|
|
261
261
|
selected: e.selected,
|
|
@@ -267,29 +267,29 @@ function ft(e, t, a, c, u, n) {
|
|
|
267
267
|
onSpacePressed: t[2] || (t[2] = Ye((i) => e.onOptionSelected(e.BentoListboxEvent.SPACE), ["prevent"])),
|
|
268
268
|
onTabPressed: t[3] || (t[3] = (i) => e.onOptionSelected(e.BentoListboxEvent.TAB))
|
|
269
269
|
}, {
|
|
270
|
-
default:
|
|
270
|
+
default: _(() => [
|
|
271
271
|
z(e.$slots, "default", ee(ne(e.option)), () => [
|
|
272
|
-
|
|
272
|
+
q("span", mt, [
|
|
273
273
|
B(s, { el: "span" }, {
|
|
274
|
-
default:
|
|
275
|
-
G(
|
|
274
|
+
default: _(() => [
|
|
275
|
+
G(U(e.option.label), 1)
|
|
276
276
|
]),
|
|
277
277
|
_: 1
|
|
278
278
|
}),
|
|
279
|
-
e.option.description ? (
|
|
279
|
+
e.option.description ? (v(), D(s, {
|
|
280
280
|
key: 0,
|
|
281
281
|
class: "b-listbox-single-select-option__description",
|
|
282
282
|
el: "span"
|
|
283
283
|
}, {
|
|
284
|
-
default:
|
|
285
|
-
G(
|
|
284
|
+
default: _(() => [
|
|
285
|
+
G(U(e.option.description), 1)
|
|
286
286
|
]),
|
|
287
287
|
_: 1
|
|
288
288
|
})) : Y("", !0)
|
|
289
289
|
])
|
|
290
290
|
], !0),
|
|
291
|
-
|
|
292
|
-
ae(B(
|
|
291
|
+
q("span", vt, [
|
|
292
|
+
ae(B(r, { "svg-title": "selected" }, null, 512), [
|
|
293
293
|
[Ae, e.selected]
|
|
294
294
|
])
|
|
295
295
|
])
|
|
@@ -297,15 +297,15 @@ function ft(e, t, a, c, u, n) {
|
|
|
297
297
|
_: 3
|
|
298
298
|
}, 8, ["disabled", "selected", "aria-selected", "aria-disabled", "tabindex"]);
|
|
299
299
|
}
|
|
300
|
-
const gt = /* @__PURE__ */
|
|
301
|
-
const
|
|
302
|
-
() => a.value ? e.value.flatMap((
|
|
303
|
-
),
|
|
300
|
+
const gt = /* @__PURE__ */ K(bt, [["render", ft], ["__scopeId", "data-v-226f4c84"]]), ke = ({ items: e, isOptionDisabled: t, hasStaticCategories: a }, c) => {
|
|
301
|
+
const b = m(
|
|
302
|
+
() => a.value ? e.value.flatMap((g) => g.items) : e.value
|
|
303
|
+
), o = m(() => b.value.length - 1), s = P(0);
|
|
304
304
|
Oe(() => {
|
|
305
|
-
t && (s.value = e.value.findIndex((
|
|
305
|
+
t && (s.value = e.value.findIndex((g) => !t(g)));
|
|
306
306
|
});
|
|
307
|
-
const
|
|
308
|
-
switch (
|
|
307
|
+
const r = (g) => !t || !!t && t(e.value[g]), n = (g) => !t || !!t && !t(e.value[g]), i = (g) => {
|
|
308
|
+
switch (g) {
|
|
309
309
|
case "increase":
|
|
310
310
|
s.value += 1;
|
|
311
311
|
break;
|
|
@@ -313,46 +313,46 @@ const gt = /* @__PURE__ */ q(bt, [["render", ft], ["__scopeId", "data-v-226f4c84
|
|
|
313
313
|
s.value -= 1;
|
|
314
314
|
break;
|
|
315
315
|
}
|
|
316
|
-
},
|
|
317
|
-
s.value !==
|
|
318
|
-
},
|
|
319
|
-
var
|
|
320
|
-
(
|
|
321
|
-
const
|
|
322
|
-
|
|
316
|
+
}, p = ({ edgeCaseItem: g, isItemBeforeEdgeCaseItem: y }, h, k) => {
|
|
317
|
+
s.value !== g && (y ? n(g) && i(k) : (i(k), r(s.value) && h()), c(s.value));
|
|
318
|
+
}, l = (g) => {
|
|
319
|
+
var h;
|
|
320
|
+
(h = g == null ? void 0 : g.detail) == null || h.preventDefault();
|
|
321
|
+
const y = s.value === o.value - 2;
|
|
322
|
+
p(
|
|
323
323
|
{
|
|
324
|
-
isItemBeforeEdgeCaseItem:
|
|
325
|
-
edgeCaseItem:
|
|
324
|
+
isItemBeforeEdgeCaseItem: y,
|
|
325
|
+
edgeCaseItem: o.value
|
|
326
326
|
},
|
|
327
|
-
|
|
327
|
+
l,
|
|
328
328
|
"increase"
|
|
329
329
|
/* INCREASE */
|
|
330
330
|
);
|
|
331
|
-
},
|
|
332
|
-
var
|
|
333
|
-
(
|
|
334
|
-
const
|
|
335
|
-
|
|
331
|
+
}, u = (g) => {
|
|
332
|
+
var h;
|
|
333
|
+
(h = g == null ? void 0 : g.detail) == null || h.preventDefault();
|
|
334
|
+
const y = s.value === 1;
|
|
335
|
+
p(
|
|
336
336
|
{
|
|
337
337
|
edgeCaseItem: 0,
|
|
338
|
-
isItemBeforeEdgeCaseItem:
|
|
338
|
+
isItemBeforeEdgeCaseItem: y
|
|
339
339
|
},
|
|
340
|
-
|
|
340
|
+
u,
|
|
341
341
|
"decrease"
|
|
342
342
|
/* DECREASE */
|
|
343
343
|
);
|
|
344
344
|
};
|
|
345
345
|
return {
|
|
346
346
|
moveToFirstElement: () => {
|
|
347
|
-
s.value = 0,
|
|
347
|
+
s.value = 0, r(s.value) ? l() : c(s.value);
|
|
348
348
|
},
|
|
349
349
|
moveToLastElement: () => {
|
|
350
|
-
s.value =
|
|
350
|
+
s.value = o.value, r(s.value) ? u() : c(s.value);
|
|
351
351
|
},
|
|
352
|
-
moveToNextElement:
|
|
353
|
-
moveToPreviousElement:
|
|
354
|
-
setListboxFocusedIndex: (
|
|
355
|
-
s.value =
|
|
352
|
+
moveToNextElement: l,
|
|
353
|
+
moveToPreviousElement: u,
|
|
354
|
+
setListboxFocusedIndex: (g) => {
|
|
355
|
+
s.value = g;
|
|
356
356
|
}
|
|
357
357
|
};
|
|
358
358
|
}, yt = W({
|
|
@@ -402,93 +402,97 @@ const gt = /* @__PURE__ */ q(bt, [["render", ft], ["__scopeId", "data-v-226f4c84
|
|
|
402
402
|
*/
|
|
403
403
|
staticCategories: { type: Boolean, default: !1 }
|
|
404
404
|
},
|
|
405
|
-
emits: [
|
|
405
|
+
emits: [d.SELECT, d.ENTER, d.SPACE, d.TAB],
|
|
406
406
|
setup(e, { emit: t, expose: a, slots: c }) {
|
|
407
|
-
const
|
|
408
|
-
var
|
|
409
|
-
return !!((
|
|
410
|
-
}),
|
|
411
|
-
t(
|
|
412
|
-
},
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
407
|
+
const b = P(null), o = P([]), s = m(() => {
|
|
408
|
+
var y;
|
|
409
|
+
return !!((y = e.selectedValue) != null && y.length) && e.selectedValue.at(0);
|
|
410
|
+
}), r = m(() => !!e.items.some(({ items: y }) => !!y)), n = (y) => (h) => {
|
|
411
|
+
t(y, [h]);
|
|
412
|
+
}, i = (y) => {
|
|
413
|
+
var h;
|
|
414
|
+
(h = b.value.querySelectorAll('[role="option"]')[y]) == null || h.focus();
|
|
415
|
+
}, {
|
|
416
|
+
moveToNextElement: p,
|
|
417
|
+
moveToPreviousElement: l,
|
|
418
|
+
moveToFirstElement: u,
|
|
419
|
+
moveToLastElement: R,
|
|
420
|
+
setListboxFocusedIndex: $
|
|
418
421
|
} = ke(
|
|
419
422
|
{
|
|
420
423
|
items: se(e, "items"),
|
|
421
424
|
isOptionDisabled: e.isOptionDisabled,
|
|
422
425
|
hasStaticCategories: se(e, "staticCategories")
|
|
423
426
|
},
|
|
424
|
-
|
|
425
|
-
),
|
|
426
|
-
[
|
|
427
|
-
[
|
|
428
|
-
[
|
|
429
|
-
[
|
|
430
|
-
},
|
|
431
|
-
[
|
|
432
|
-
[
|
|
433
|
-
[
|
|
434
|
-
[
|
|
427
|
+
i
|
|
428
|
+
), M = {
|
|
429
|
+
[F.ARROW_UP]: l,
|
|
430
|
+
[F.ARROW_DOWN]: p,
|
|
431
|
+
[F.HOME]: u,
|
|
432
|
+
[F.END]: R
|
|
433
|
+
}, g = {
|
|
434
|
+
[d.SELECT]: n(d.SELECT),
|
|
435
|
+
[d.SPACE]: n(d.SPACE),
|
|
436
|
+
[d.TAB]: n(d.TAB),
|
|
437
|
+
[d.ENTER]: n(d.ENTER)
|
|
435
438
|
};
|
|
436
439
|
return a({
|
|
437
440
|
/**
|
|
438
441
|
* Reference for a single listbox item.
|
|
439
442
|
* Required for keyboard navigation in dropdown as $children is removed in vue@3
|
|
440
443
|
*/
|
|
441
|
-
listboxItemRef:
|
|
444
|
+
listboxItemRef: o,
|
|
442
445
|
/**
|
|
443
446
|
* Method to set the index of the item to be focused on
|
|
444
447
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
445
448
|
*/
|
|
446
|
-
setListboxFocusedIndex:
|
|
449
|
+
setListboxFocusedIndex: $
|
|
447
450
|
}), {
|
|
448
451
|
// Enums
|
|
449
|
-
BentoListboxEvent:
|
|
452
|
+
BentoListboxEvent: d,
|
|
450
453
|
// Values
|
|
451
|
-
|
|
452
|
-
|
|
454
|
+
listboxRef: b,
|
|
455
|
+
listboxItemRef: o,
|
|
456
|
+
selectedItem: s,
|
|
453
457
|
slots: c,
|
|
454
458
|
// Computed
|
|
455
|
-
hasCategories:
|
|
459
|
+
hasCategories: r,
|
|
456
460
|
// Methods
|
|
457
|
-
onOptionSelected:
|
|
461
|
+
onOptionSelected: n,
|
|
458
462
|
// Keyboard navigation
|
|
459
|
-
listboxListeners:
|
|
460
|
-
listboxOptionListeners:
|
|
463
|
+
listboxListeners: M,
|
|
464
|
+
listboxOptionListeners: g
|
|
461
465
|
};
|
|
462
466
|
}
|
|
463
467
|
});
|
|
464
|
-
function pt(e, t, a, c,
|
|
465
|
-
const s =
|
|
466
|
-
return ae((
|
|
467
|
-
e.hasCategories && e.staticCategories ? (
|
|
468
|
+
function pt(e, t, a, c, b, o) {
|
|
469
|
+
const s = T("bento-listbox-single-select-option"), r = T("bento-listbox-single-select-category"), n = pe("bento-keyboard-navigation-directive");
|
|
470
|
+
return ae((v(), O("div", w({ ref: "listboxRef" }, te(e.listboxListeners, !0)), [
|
|
471
|
+
e.hasCategories && e.staticCategories ? (v(!0), O(J, { key: 0 }, x(e.items, (i) => (v(), D(r, {
|
|
468
472
|
key: i.value,
|
|
469
473
|
"category-label": i.label,
|
|
470
474
|
role: "group"
|
|
471
475
|
}, {
|
|
472
|
-
default:
|
|
473
|
-
(
|
|
474
|
-
key:
|
|
476
|
+
default: _(() => [
|
|
477
|
+
(v(!0), O(J, null, x(i.items, (p) => (v(), D(s, w({
|
|
478
|
+
key: p.value,
|
|
475
479
|
ref_for: !0,
|
|
476
480
|
ref: "listboxItemRef",
|
|
477
481
|
role: "option",
|
|
478
|
-
option:
|
|
479
|
-
disabled: e.isOptionDisabled ? e.isOptionDisabled(
|
|
480
|
-
selected:
|
|
482
|
+
option: p,
|
|
483
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(p) : null,
|
|
484
|
+
selected: p.value === e.selectedItem.value
|
|
481
485
|
}, te(e.listboxOptionListeners)), ie({ _: 2 }, [
|
|
482
|
-
|
|
483
|
-
name:
|
|
484
|
-
fn:
|
|
485
|
-
z(e.$slots,
|
|
486
|
+
x(e.slots, (l, u) => ({
|
|
487
|
+
name: u,
|
|
488
|
+
fn: _((R) => [
|
|
489
|
+
z(e.$slots, u, w({ ref_for: !0 }, R))
|
|
486
490
|
])
|
|
487
491
|
}))
|
|
488
492
|
]), 1040, ["option", "disabled", "selected"]))), 128))
|
|
489
493
|
]),
|
|
490
494
|
_: 2
|
|
491
|
-
}, 1032, ["category-label"]))), 128)) : (
|
|
495
|
+
}, 1032, ["category-label"]))), 128)) : (v(!0), O(J, { key: 1 }, x(e.items, (i) => (v(), D(s, w({
|
|
492
496
|
key: i.value,
|
|
493
497
|
ref_for: !0,
|
|
494
498
|
ref: "listboxItemRef",
|
|
@@ -497,18 +501,18 @@ function pt(e, t, a, c, u, n) {
|
|
|
497
501
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(i) : null,
|
|
498
502
|
selected: i.value === e.selectedItem.value
|
|
499
503
|
}, te(e.listboxOptionListeners)), ie({ _: 2 }, [
|
|
500
|
-
|
|
501
|
-
name:
|
|
502
|
-
fn:
|
|
503
|
-
z(e.$slots,
|
|
504
|
+
x(e.slots, (p, l) => ({
|
|
505
|
+
name: l,
|
|
506
|
+
fn: _((u) => [
|
|
507
|
+
z(e.$slots, l, w({ ref_for: !0 }, u))
|
|
504
508
|
])
|
|
505
509
|
}))
|
|
506
510
|
]), 1040, ["option", "disabled", "selected"]))), 128))
|
|
507
511
|
], 16)), [
|
|
508
|
-
[
|
|
512
|
+
[n]
|
|
509
513
|
]);
|
|
510
514
|
}
|
|
511
|
-
const St = /* @__PURE__ */
|
|
515
|
+
const St = /* @__PURE__ */ K(yt, [["render", pt]]);
|
|
512
516
|
var ge = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(ge || {}), oe = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.UNSELECT_CATEGORY = "unselect-category", e))(oe || {});
|
|
513
517
|
const Ct = {
|
|
514
518
|
"en-US": {
|
|
@@ -566,61 +570,61 @@ const Ct = {
|
|
|
566
570
|
},
|
|
567
571
|
emits: [oe.SELECT_CATEGORY, oe.UNSELECT_CATEGORY],
|
|
568
572
|
setup(e, { emit: t }) {
|
|
569
|
-
const a = P(!1), { t: c } = ue(),
|
|
570
|
-
() => e.category.items.every((
|
|
571
|
-
), s = se(e, "staticCategories"),
|
|
572
|
-
[`b-listbox-multi-select-category--${ge.DISABLED}`]:
|
|
573
|
+
const a = P(!1), { t: c } = ue(), b = (C) => e.isOptionDisabled ? e.isOptionDisabled(C) : !1, o = m(
|
|
574
|
+
() => e.category.items.every((C) => b(C))
|
|
575
|
+
), s = se(e, "staticCategories"), r = m(() => a.value || e.staticCategories), n = m(() => ({
|
|
576
|
+
[`b-listbox-multi-select-category--${ge.DISABLED}`]: o.value,
|
|
573
577
|
[`b-listbox-multi-select-category--${ge.STATIC_CATEGORY}`]: e.staticCategories
|
|
574
|
-
})), i = (
|
|
575
|
-
|
|
576
|
-
},
|
|
578
|
+
})), i = (C) => {
|
|
579
|
+
C.preventDefault(), a.value = !a.value;
|
|
580
|
+
}, p = (C) => {
|
|
577
581
|
var Q;
|
|
578
|
-
const I =
|
|
582
|
+
const I = b(C), V = ((Q = e.selectedItemsList) == null ? void 0 : Q.includes(C.value)) || !1;
|
|
579
583
|
return { isDisabled: I, isPreSelected: V };
|
|
580
|
-
},
|
|
581
|
-
() => e.category.items.filter((
|
|
582
|
-
const { isDisabled: I, isPreSelected: V } =
|
|
584
|
+
}, l = m(
|
|
585
|
+
() => e.category.items.filter((C) => {
|
|
586
|
+
const { isDisabled: I, isPreSelected: V } = p(C);
|
|
583
587
|
return I && V || !I;
|
|
584
588
|
})
|
|
585
|
-
),
|
|
589
|
+
), u = m(
|
|
586
590
|
() => {
|
|
587
|
-
var
|
|
588
|
-
return (
|
|
591
|
+
var C;
|
|
592
|
+
return (C = l.value) == null ? void 0 : C.filter(
|
|
589
593
|
({ value: I }) => {
|
|
590
594
|
var V;
|
|
591
595
|
return (V = e.selectedItemsList) == null ? void 0 : V.includes(I);
|
|
592
596
|
}
|
|
593
597
|
);
|
|
594
598
|
}
|
|
595
|
-
), R =
|
|
596
|
-
const
|
|
597
|
-
return c(
|
|
598
|
-
}), $ =
|
|
599
|
+
), R = m(() => {
|
|
600
|
+
const C = a.value ? "categoryOpened" : "categoryClosed";
|
|
601
|
+
return c(C, { category: e.category.label });
|
|
602
|
+
}), $ = m(
|
|
599
603
|
() => ({
|
|
600
604
|
el: "span",
|
|
601
605
|
variant: e.staticCategories ? "caption" : "body"
|
|
602
606
|
})
|
|
603
607
|
), M = () => {
|
|
604
608
|
t(oe.SELECT_CATEGORY);
|
|
605
|
-
},
|
|
609
|
+
}, g = () => {
|
|
606
610
|
t(oe.UNSELECT_CATEGORY);
|
|
607
|
-
}, { isAllSelected:
|
|
608
|
-
|
|
609
|
-
|
|
611
|
+
}, { isAllSelected: y, isIndeterminate: h, toggleSelectAll: k } = $e(
|
|
612
|
+
u,
|
|
613
|
+
l,
|
|
610
614
|
M,
|
|
611
|
-
|
|
615
|
+
g
|
|
612
616
|
);
|
|
613
617
|
return {
|
|
614
618
|
// Values
|
|
615
619
|
chevronTitle: R,
|
|
616
|
-
conditionalClass:
|
|
617
|
-
hasAllPropsDisabled:
|
|
620
|
+
conditionalClass: n,
|
|
621
|
+
hasAllPropsDisabled: o,
|
|
618
622
|
isOpen: a,
|
|
619
|
-
isAllSelected:
|
|
620
|
-
isIndeterminate:
|
|
623
|
+
isAllSelected: y,
|
|
624
|
+
isIndeterminate: h,
|
|
621
625
|
isStaticCategory: s,
|
|
622
626
|
// Computed
|
|
623
|
-
showItemChildren:
|
|
627
|
+
showItemChildren: r,
|
|
624
628
|
categoryLabelProps: $,
|
|
625
629
|
// Methods
|
|
626
630
|
toggleOpen: i,
|
|
@@ -628,14 +632,14 @@ const Ct = {
|
|
|
628
632
|
};
|
|
629
633
|
}
|
|
630
634
|
}), Et = { class: "b-listbox-multi-select-category__label" };
|
|
631
|
-
function Lt(e, t, a, c,
|
|
632
|
-
const s =
|
|
633
|
-
return
|
|
634
|
-
B(
|
|
635
|
+
function Lt(e, t, a, c, b, o) {
|
|
636
|
+
const s = T("bento-checkbox"), r = T("bento-typography"), n = T("chevron-up-icon"), i = T("chevron-down-icon"), p = T("bento-listbox-option");
|
|
637
|
+
return v(), O("div", null, [
|
|
638
|
+
B(p, {
|
|
635
639
|
class: fe(["b-listbox-multi-select-category__option", e.conditionalClass])
|
|
636
640
|
}, {
|
|
637
|
-
default:
|
|
638
|
-
e.isStaticCategory ? Y("", !0) : (
|
|
641
|
+
default: _(() => [
|
|
642
|
+
e.isStaticCategory ? Y("", !0) : (v(), D(s, {
|
|
639
643
|
key: 0,
|
|
640
644
|
"model-value": e.isAllSelected,
|
|
641
645
|
indeterminate: e.isIndeterminate,
|
|
@@ -644,23 +648,23 @@ function Lt(e, t, a, c, u, n) {
|
|
|
644
648
|
value: e.category.value,
|
|
645
649
|
"onUpdate:modelValue": e.toggleSelectAll
|
|
646
650
|
}, null, 8, ["model-value", "indeterminate", "disabled", "aria-label", "value", "onUpdate:modelValue"])),
|
|
647
|
-
|
|
648
|
-
B(
|
|
649
|
-
default:
|
|
650
|
-
G(
|
|
651
|
+
q("span", Et, [
|
|
652
|
+
B(r, w(e.categoryLabelProps, { class: "b-listbox-multi-select-category__label-text" }), {
|
|
653
|
+
default: _(() => [
|
|
654
|
+
G(U(e.category.label), 1)
|
|
651
655
|
]),
|
|
652
656
|
_: 1
|
|
653
657
|
}, 16),
|
|
654
|
-
e.isStaticCategory ? Y("", !0) : (
|
|
658
|
+
e.isStaticCategory ? Y("", !0) : (v(), O("div", {
|
|
655
659
|
key: 0,
|
|
656
660
|
class: "b-listbox-multi-select-category__label-chevron",
|
|
657
661
|
"data-testid": "toggle-listbox",
|
|
658
|
-
onClickCapture: t[0] || (t[0] = (...
|
|
662
|
+
onClickCapture: t[0] || (t[0] = (...l) => e.toggleOpen && e.toggleOpen(...l))
|
|
659
663
|
}, [
|
|
660
|
-
e.isOpen ? (
|
|
664
|
+
e.isOpen ? (v(), D(n, {
|
|
661
665
|
key: 0,
|
|
662
666
|
"svg-title": e.chevronTitle
|
|
663
|
-
}, null, 8, ["svg-title"])) : (
|
|
667
|
+
}, null, 8, ["svg-title"])) : (v(), D(i, {
|
|
664
668
|
key: 1,
|
|
665
669
|
"svg-title": e.chevronTitle
|
|
666
670
|
}, null, 8, ["svg-title"]))
|
|
@@ -669,14 +673,14 @@ function Lt(e, t, a, c, u, n) {
|
|
|
669
673
|
]),
|
|
670
674
|
_: 1
|
|
671
675
|
}, 8, ["class"]),
|
|
672
|
-
ae(
|
|
676
|
+
ae(q("div", null, [
|
|
673
677
|
z(e.$slots, "default", {}, void 0, !0)
|
|
674
678
|
], 512), [
|
|
675
679
|
[Ae, e.showItemChildren]
|
|
676
680
|
])
|
|
677
681
|
]);
|
|
678
682
|
}
|
|
679
|
-
const Tt = /* @__PURE__ */
|
|
683
|
+
const Tt = /* @__PURE__ */ K(ht, [["render", Lt], ["__scopeId", "data-v-9a00de22"]]);
|
|
680
684
|
var H = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", e.UNSELECT_CATEGORY = "unselect-category", e))(H || {});
|
|
681
685
|
const _t = W({
|
|
682
686
|
name: "listbox-multi-select-options",
|
|
@@ -747,67 +751,67 @@ const _t = W({
|
|
|
747
751
|
H.UNSELECT_CATEGORY
|
|
748
752
|
],
|
|
749
753
|
setup(e, { emit: t }) {
|
|
750
|
-
const a = (
|
|
751
|
-
t(H.TOGGLE_CHECKBOX_SELECTION,
|
|
752
|
-
}, c = (
|
|
754
|
+
const a = (n) => {
|
|
755
|
+
t(H.TOGGLE_CHECKBOX_SELECTION, n);
|
|
756
|
+
}, c = (n) => !!n.items, b = (n) => {
|
|
753
757
|
const i = e.isMultiLevel && e.searching;
|
|
754
|
-
return
|
|
755
|
-
},
|
|
758
|
+
return n.description && (!e.isMultiLevel || i);
|
|
759
|
+
}, o = (n) => n.items ? !!n.items.find((i) => e.selectedItemsList.includes(i.value)) : e.selectedItemsList.includes(n.value), s = (n, i) => {
|
|
756
760
|
if (c(i))
|
|
757
|
-
return t(
|
|
761
|
+
return t(n ? H.SELECT_CATEGORY : H.UNSELECT_CATEGORY, i);
|
|
758
762
|
a(i.value);
|
|
759
763
|
};
|
|
760
764
|
return {
|
|
761
765
|
// Values
|
|
762
|
-
conditionalClasses:
|
|
766
|
+
conditionalClasses: m(() => ({
|
|
763
767
|
"b-listbox-multi-select-options__static-category-option": e.staticCategories,
|
|
764
768
|
"b-listbox-multi-select-options__category-option": e.categoryItems
|
|
765
769
|
})),
|
|
766
770
|
// Methods
|
|
767
|
-
isOptionSelected:
|
|
768
|
-
shouldShowDescription:
|
|
771
|
+
isOptionSelected: o,
|
|
772
|
+
shouldShowDescription: b,
|
|
769
773
|
toggleCheckboxSelection: a,
|
|
770
774
|
selectSearch: s,
|
|
771
775
|
// Enums
|
|
772
|
-
BentoListboxEvent:
|
|
776
|
+
BentoListboxEvent: d,
|
|
773
777
|
ListboxMultiSelectOptionsEvent: H
|
|
774
778
|
};
|
|
775
779
|
}
|
|
776
780
|
}), Ot = { class: "b-listbox-multi-select__option-text" }, It = { class: "b-listbox-multi-select__option-text" };
|
|
777
|
-
function At(e, t, a, c,
|
|
778
|
-
const s =
|
|
779
|
-
return
|
|
780
|
-
(
|
|
781
|
-
key: `selected-${
|
|
781
|
+
function At(e, t, a, c, b, o) {
|
|
782
|
+
const s = T("bento-checkbox"), r = T("bento-typography"), n = T("bento-listbox-option"), i = T("listbox-multi-select-options", !0), p = T("listbox-multi-select-category");
|
|
783
|
+
return v(), O("div", null, [
|
|
784
|
+
(v(!0), O(J, null, x(e.items, (l) => (v(), O("div", {
|
|
785
|
+
key: `selected-${l.value}`
|
|
782
786
|
}, [
|
|
783
|
-
e.searching && e.isMultiLevel ? (
|
|
787
|
+
e.searching && e.isMultiLevel ? (v(), D(n, {
|
|
784
788
|
key: 0,
|
|
785
789
|
class: fe(["b-listbox-multi-select-options", e.conditionalClasses]),
|
|
786
|
-
disabled: e.isOptionDisabled ? e.isOptionDisabled(
|
|
790
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null
|
|
787
791
|
}, {
|
|
788
|
-
default:
|
|
792
|
+
default: _(() => [
|
|
789
793
|
B(s, {
|
|
790
|
-
"model-value": e.isOptionSelected(
|
|
791
|
-
"aria-label":
|
|
792
|
-
disabled: e.isOptionDisabled ? e.isOptionDisabled(
|
|
793
|
-
value:
|
|
794
|
-
"onUpdate:modelValue": (
|
|
794
|
+
"model-value": e.isOptionSelected(l),
|
|
795
|
+
"aria-label": l.label,
|
|
796
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
797
|
+
value: l.value,
|
|
798
|
+
"onUpdate:modelValue": (u) => e.selectSearch(u, l)
|
|
795
799
|
}, null, 8, ["model-value", "aria-label", "disabled", "value", "onUpdate:modelValue"]),
|
|
796
|
-
z(e.$slots, "default",
|
|
797
|
-
|
|
798
|
-
B(
|
|
799
|
-
default:
|
|
800
|
-
G(
|
|
800
|
+
z(e.$slots, "default", w({ ref_for: !0 }, l), () => [
|
|
801
|
+
q("span", Ot, [
|
|
802
|
+
B(r, { el: "span" }, {
|
|
803
|
+
default: _(() => [
|
|
804
|
+
G(U(l.label), 1)
|
|
801
805
|
]),
|
|
802
806
|
_: 2
|
|
803
807
|
}, 1024),
|
|
804
|
-
e.shouldShowDescription(
|
|
808
|
+
e.shouldShowDescription(l) ? (v(), D(r, {
|
|
805
809
|
key: 0,
|
|
806
810
|
class: "b-listbox-multi-select__option-description",
|
|
807
811
|
el: "span"
|
|
808
812
|
}, {
|
|
809
|
-
default:
|
|
810
|
-
G(
|
|
813
|
+
default: _(() => [
|
|
814
|
+
G(U(l.description), 1)
|
|
811
815
|
]),
|
|
812
816
|
_: 2
|
|
813
817
|
}, 1024)) : Y("", !0)
|
|
@@ -815,57 +819,57 @@ function At(e, t, a, c, u, n) {
|
|
|
815
819
|
], !0)
|
|
816
820
|
]),
|
|
817
821
|
_: 2
|
|
818
|
-
}, 1032, ["class", "disabled"])) : (
|
|
819
|
-
|
|
822
|
+
}, 1032, ["class", "disabled"])) : (v(), O(J, { key: 1 }, [
|
|
823
|
+
l.items ? (v(), D(p, {
|
|
820
824
|
key: 0,
|
|
821
|
-
category:
|
|
825
|
+
category: l,
|
|
822
826
|
"static-categories": e.staticCategories,
|
|
823
827
|
"is-option-disabled": e.isOptionDisabled,
|
|
824
828
|
"selected-items-list": e.selectedItemsList,
|
|
825
|
-
onSelectCategory: (
|
|
826
|
-
onUnselectCategory: (
|
|
829
|
+
onSelectCategory: (u) => e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, l),
|
|
830
|
+
onUnselectCategory: (u) => e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, l)
|
|
827
831
|
}, {
|
|
828
|
-
default:
|
|
832
|
+
default: _(() => [
|
|
829
833
|
B(i, {
|
|
830
834
|
"category-items": "",
|
|
831
|
-
items:
|
|
835
|
+
items: l.items,
|
|
832
836
|
"is-option-disabled": e.isOptionDisabled,
|
|
833
837
|
"is-multi-level": e.isMultiLevel,
|
|
834
838
|
"static-categories": e.staticCategories,
|
|
835
839
|
"selected-items-list": e.selectedItemsList,
|
|
836
840
|
searching: e.searching,
|
|
837
|
-
onToggleCheckboxSelection: t[0] || (t[0] = (
|
|
841
|
+
onToggleCheckboxSelection: t[0] || (t[0] = (u) => e.toggleCheckboxSelection(u))
|
|
838
842
|
}, null, 8, ["items", "is-option-disabled", "is-multi-level", "static-categories", "selected-items-list", "searching"])
|
|
839
843
|
]),
|
|
840
844
|
_: 2
|
|
841
|
-
}, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "onSelectCategory", "onUnselectCategory"])) : (
|
|
845
|
+
}, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "onSelectCategory", "onUnselectCategory"])) : (v(), D(n, {
|
|
842
846
|
key: 1,
|
|
843
847
|
class: fe(["b-listbox-multi-select-options", e.conditionalClasses]),
|
|
844
|
-
disabled: e.isOptionDisabled ? e.isOptionDisabled(
|
|
848
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null
|
|
845
849
|
}, {
|
|
846
|
-
default:
|
|
850
|
+
default: _(() => [
|
|
847
851
|
B(s, {
|
|
848
852
|
"model-value": e.selectedItemsList,
|
|
849
|
-
"aria-label":
|
|
850
|
-
disabled: e.isOptionDisabled ? e.isOptionDisabled(
|
|
851
|
-
value:
|
|
852
|
-
"onUpdate:modelValue": (
|
|
853
|
+
"aria-label": l.label,
|
|
854
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
855
|
+
value: l.value,
|
|
856
|
+
"onUpdate:modelValue": (u) => e.toggleCheckboxSelection(l)
|
|
853
857
|
}, null, 8, ["model-value", "aria-label", "disabled", "value", "onUpdate:modelValue"]),
|
|
854
|
-
z(e.$slots, "default",
|
|
855
|
-
|
|
856
|
-
B(
|
|
857
|
-
default:
|
|
858
|
-
G(
|
|
858
|
+
z(e.$slots, "default", w({ ref_for: !0 }, l), () => [
|
|
859
|
+
q("span", It, [
|
|
860
|
+
B(r, { el: "span" }, {
|
|
861
|
+
default: _(() => [
|
|
862
|
+
G(U(l.label), 1)
|
|
859
863
|
]),
|
|
860
864
|
_: 2
|
|
861
865
|
}, 1024),
|
|
862
|
-
e.shouldShowDescription(
|
|
866
|
+
e.shouldShowDescription(l) ? (v(), D(r, {
|
|
863
867
|
key: 0,
|
|
864
868
|
class: "b-listbox-multi-select__option-description",
|
|
865
869
|
el: "span"
|
|
866
870
|
}, {
|
|
867
|
-
default:
|
|
868
|
-
G(
|
|
871
|
+
default: _(() => [
|
|
872
|
+
G(U(l.description), 1)
|
|
869
873
|
]),
|
|
870
874
|
_: 2
|
|
871
875
|
}, 1024)) : Y("", !0)
|
|
@@ -878,7 +882,7 @@ function At(e, t, a, c, u, n) {
|
|
|
878
882
|
]))), 128))
|
|
879
883
|
]);
|
|
880
884
|
}
|
|
881
|
-
const $t = /* @__PURE__ */
|
|
885
|
+
const $t = /* @__PURE__ */ K(_t, [["render", At], ["__scopeId", "data-v-25938a72"]]), Be = {
|
|
882
886
|
"en-US": {
|
|
883
887
|
remove: "Remove"
|
|
884
888
|
},
|
|
@@ -915,29 +919,29 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
915
919
|
},
|
|
916
920
|
emits: ["unselect-item", "unselect-category"],
|
|
917
921
|
setup(e, { emit: t }) {
|
|
918
|
-
const a = t, { t: c } = ue({ messages: Be }),
|
|
919
|
-
return (
|
|
920
|
-
(
|
|
921
|
-
key: `selected-${
|
|
922
|
+
const a = t, { t: c } = ue({ messages: Be }), b = (o) => o.items ? a("unselect-category", o) : a("unselect-item", o);
|
|
923
|
+
return (o, s) => (v(), O("div", kt, [
|
|
924
|
+
(v(!0), O(J, null, x(e.items, (r) => (v(), O("div", {
|
|
925
|
+
key: `selected-${r.value}`
|
|
922
926
|
}, [
|
|
923
927
|
B(ce(He), {
|
|
924
928
|
class: "b-listbox-multi-select-chips__chip",
|
|
925
|
-
disabled: e.isOptionDisabled ? e.isOptionDisabled(
|
|
926
|
-
onClick: (
|
|
929
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(r) : null,
|
|
930
|
+
onClick: (n) => b(r)
|
|
927
931
|
}, {
|
|
928
|
-
iconRight:
|
|
932
|
+
iconRight: _(() => [
|
|
929
933
|
B(ce(Xe), {
|
|
930
934
|
"svg-title": ce(c)("remove")
|
|
931
935
|
}, null, 8, ["svg-title"])
|
|
932
936
|
]),
|
|
933
|
-
default:
|
|
937
|
+
default: _(() => [
|
|
934
938
|
B(ce(Z), {
|
|
935
939
|
el: "span",
|
|
936
940
|
variant: "caption",
|
|
937
941
|
class: "b-listbox-multi-select-chips__option-text"
|
|
938
942
|
}, {
|
|
939
|
-
default:
|
|
940
|
-
G(
|
|
943
|
+
default: _(() => [
|
|
944
|
+
G(U(r.label), 1)
|
|
941
945
|
]),
|
|
942
946
|
_: 2
|
|
943
947
|
}, 1024)
|
|
@@ -947,7 +951,7 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
947
951
|
]))), 128))
|
|
948
952
|
]));
|
|
949
953
|
}
|
|
950
|
-
}), Dt = /* @__PURE__ */
|
|
954
|
+
}), Dt = /* @__PURE__ */ K(Rt, [["__scopeId", "data-v-7c5f8bdb"]]), Le = {
|
|
951
955
|
"en-US": {
|
|
952
956
|
allSelected: "All selected ({total})",
|
|
953
957
|
numberOfTotalSelected: "{number} of {total} selected",
|
|
@@ -955,12 +959,12 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
955
959
|
selectAll: "Select all ({total})"
|
|
956
960
|
}
|
|
957
961
|
}, Mt = (e) => {
|
|
958
|
-
const t =
|
|
962
|
+
const t = m(() => {
|
|
959
963
|
var c;
|
|
960
|
-
return !!((c = e.value) != null && c.find(({ items:
|
|
961
|
-
}), a =
|
|
964
|
+
return !!((c = e.value) != null && c.find(({ items: b }) => !!b));
|
|
965
|
+
}), a = m(() => {
|
|
962
966
|
var c;
|
|
963
|
-
return t.value ? (c = e.value) == null ? void 0 : c.reduce((
|
|
967
|
+
return t.value ? (c = e.value) == null ? void 0 : c.reduce((b, o) => (o.items ? b.push(...o.items.flat()) : b.push(o), b), []) : e.value;
|
|
964
968
|
});
|
|
965
969
|
return {
|
|
966
970
|
isMultiLevelSelect: t,
|
|
@@ -1036,100 +1040,100 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
1036
1040
|
*/
|
|
1037
1041
|
staticCategories: { type: Boolean, default: !1 }
|
|
1038
1042
|
},
|
|
1039
|
-
emits: [
|
|
1043
|
+
emits: [d.SELECT],
|
|
1040
1044
|
setup(e, { emit: t, slots: a }) {
|
|
1041
|
-
const { t: c } = ue({ messages: Le }),
|
|
1042
|
-
() => e.selectedValues.map(({ value:
|
|
1043
|
-
), { isMultiLevelSelect:
|
|
1045
|
+
const { t: c } = ue({ messages: Le }), b = P(null), o = P(null), s = P(null), r = m(
|
|
1046
|
+
() => e.selectedValues.map(({ value: f }) => f)
|
|
1047
|
+
), { isMultiLevelSelect: n, flattenedItemsList: i } = Mt(se(e, "items")), p = (f) => {
|
|
1044
1048
|
var A;
|
|
1045
|
-
const
|
|
1046
|
-
return { isDisabled:
|
|
1047
|
-
},
|
|
1048
|
-
if (e.searching &&
|
|
1049
|
+
const S = e.isOptionDisabled(f), E = ((A = r.value) == null ? void 0 : A.includes(f.value)) || !1;
|
|
1050
|
+
return { isDisabled: S, isPreSelected: E };
|
|
1051
|
+
}, l = m(() => {
|
|
1052
|
+
if (e.searching && n)
|
|
1049
1053
|
return e.items;
|
|
1050
|
-
const
|
|
1051
|
-
const { isDisabled:
|
|
1052
|
-
return
|
|
1054
|
+
const f = i.value.filter((S) => {
|
|
1055
|
+
const { isDisabled: E, isPreSelected: A } = p(S);
|
|
1056
|
+
return E && A || !E;
|
|
1053
1057
|
});
|
|
1054
|
-
return e.selectedValues.forEach((
|
|
1055
|
-
|
|
1056
|
-
}),
|
|
1057
|
-
}),
|
|
1058
|
+
return e.selectedValues.forEach((S) => {
|
|
1059
|
+
f.find((E) => E.value === S.value) || f.push(S);
|
|
1060
|
+
}), f;
|
|
1061
|
+
}), u = m(
|
|
1058
1062
|
() => {
|
|
1059
|
-
var
|
|
1060
|
-
return (
|
|
1061
|
-
var
|
|
1062
|
-
return
|
|
1063
|
-
(
|
|
1064
|
-
).length ===
|
|
1063
|
+
var f;
|
|
1064
|
+
return (f = l.value) == null ? void 0 : f.filter((S) => {
|
|
1065
|
+
var E;
|
|
1066
|
+
return S.items && n.value && e.searching ? S.items.filter(
|
|
1067
|
+
(L) => (e.selectedValues ?? []).includes(L.value)
|
|
1068
|
+
).length === S.items.length : (E = r.value) == null ? void 0 : E.includes(S.value);
|
|
1065
1069
|
});
|
|
1066
1070
|
}
|
|
1067
|
-
), R = () =>
|
|
1071
|
+
), R = () => n.value && !e.searching ? i.value.length : e.items.length, $ = m(() => {
|
|
1068
1072
|
var A;
|
|
1069
|
-
const
|
|
1070
|
-
return
|
|
1071
|
-
}), M = (
|
|
1072
|
-
const
|
|
1073
|
-
const { isDisabled:
|
|
1074
|
-
return
|
|
1075
|
-
},
|
|
1076
|
-
t(
|
|
1077
|
-
},
|
|
1078
|
-
const
|
|
1079
|
-
const { isDisabled: j, isPreSelected:
|
|
1080
|
-
return !(j &&
|
|
1081
|
-
},
|
|
1082
|
-
t(
|
|
1083
|
-
},
|
|
1073
|
+
const f = l.value.length, S = R(), E = ((A = u.value) == null ? void 0 : A.length) || 0;
|
|
1074
|
+
return E === 0 ? c("selectAll", { total: f }) : E === S ? c("allSelected", { total: S }) : E <= S ? c("numberOfTotalSelected", { number: E, total: S }) : c("numbersSelected", { number: E });
|
|
1075
|
+
}), M = (f) => {
|
|
1076
|
+
const S = (A) => {
|
|
1077
|
+
const { isDisabled: L, isPreSelected: j } = p(A);
|
|
1078
|
+
return L && j || !L;
|
|
1079
|
+
}, E = f.filter(S).filter((A) => !r.value.includes(A.value));
|
|
1080
|
+
t(d.SELECT, [...e.selectedValues, ...E]);
|
|
1081
|
+
}, g = (f) => {
|
|
1082
|
+
const S = (L) => {
|
|
1083
|
+
const { isDisabled: j, isPreSelected: xe } = p(L);
|
|
1084
|
+
return !(j && xe);
|
|
1085
|
+
}, E = f.filter(S).map(({ value: L }) => L), A = e.selectedValues.filter((L) => !(E != null && E.includes(L.value)));
|
|
1086
|
+
t(d.SELECT, A);
|
|
1087
|
+
}, y = () => {
|
|
1084
1088
|
M(i.value);
|
|
1085
|
-
},
|
|
1086
|
-
|
|
1087
|
-
}, { isAllSelected: k, isIndeterminate:
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
), V = (
|
|
1093
|
-
M(
|
|
1094
|
-
}, Q = (
|
|
1095
|
-
|
|
1096
|
-
}, be = (
|
|
1097
|
-
let
|
|
1098
|
-
const A = e.selectedValues.filter(({ value:
|
|
1099
|
-
|
|
1100
|
-
}, re =
|
|
1101
|
-
if (!
|
|
1089
|
+
}, h = () => {
|
|
1090
|
+
g(i.value);
|
|
1091
|
+
}, { isAllSelected: k, isIndeterminate: C, toggleSelectAll: I } = $e(
|
|
1092
|
+
u,
|
|
1093
|
+
l,
|
|
1094
|
+
y,
|
|
1095
|
+
h
|
|
1096
|
+
), V = (f) => {
|
|
1097
|
+
M(f.items);
|
|
1098
|
+
}, Q = (f) => {
|
|
1099
|
+
g(f.items);
|
|
1100
|
+
}, be = (f, S) => {
|
|
1101
|
+
let E = !1;
|
|
1102
|
+
const A = e.selectedValues.filter(({ value: L }) => S.value === L ? (E = !0, !1) : !0);
|
|
1103
|
+
E || A.push(S), t(f, A);
|
|
1104
|
+
}, re = m(() => {
|
|
1105
|
+
if (!n.value)
|
|
1102
1106
|
return e.selectedValues;
|
|
1103
|
-
const
|
|
1107
|
+
const f = (L) => r.value.includes(L.value), S = (L) => !e.staticCategories && L.every((j) => f(j));
|
|
1104
1108
|
return e.items.flatMap(
|
|
1105
|
-
(
|
|
1106
|
-
).filter((
|
|
1107
|
-
}), me =
|
|
1108
|
-
var
|
|
1109
|
-
const
|
|
1110
|
-
return
|
|
1111
|
-
}), N =
|
|
1112
|
-
() =>
|
|
1113
|
-
), Re =
|
|
1109
|
+
(L) => L.items && !S(L.items) ? L.items : L
|
|
1110
|
+
).filter((L) => L.items ? !0 : f(L));
|
|
1111
|
+
}), me = m(() => {
|
|
1112
|
+
var E, A, L, j;
|
|
1113
|
+
const f = ["automatic", "button"].includes(e.lazyLoadType), S = ((E = e.selectedValues) == null ? void 0 : E.length) > 0 && ((A = u.value) == null ? void 0 : A.length) !== ((L = i.value) == null ? void 0 : L.length);
|
|
1114
|
+
return f && e.hasMoreItems ? !!((j = e.selectedValues) != null && j.length) : S;
|
|
1115
|
+
}), N = m(() => ["automatic", "button"].includes(e.lazyLoadType) ? !e.hasMoreItems : !0), le = m(
|
|
1116
|
+
() => b.value ? [b.value] : []
|
|
1117
|
+
), Re = m(
|
|
1114
1118
|
() => {
|
|
1115
|
-
var
|
|
1116
|
-
return (
|
|
1119
|
+
var f, S;
|
|
1120
|
+
return (S = (f = o.value) == null ? void 0 : f.$children) != null && S.length ? o.value.$children : [];
|
|
1117
1121
|
}
|
|
1118
|
-
), De =
|
|
1122
|
+
), De = m(
|
|
1119
1123
|
() => {
|
|
1120
|
-
var
|
|
1121
|
-
return (
|
|
1124
|
+
var f, S;
|
|
1125
|
+
return (S = (f = s.value) == null ? void 0 : f.$children) != null && S.length ? s.value.$children : [];
|
|
1122
1126
|
}
|
|
1123
|
-
), Me =
|
|
1127
|
+
), Me = m(() => ({ label: $, value: k })), Pe = m(() => [
|
|
1124
1128
|
Me,
|
|
1125
1129
|
...re.value,
|
|
1126
1130
|
...i.value
|
|
1127
|
-
]), Ne = (
|
|
1131
|
+
]), Ne = (f) => {
|
|
1128
1132
|
[
|
|
1129
1133
|
...le.value,
|
|
1130
1134
|
...Re.value,
|
|
1131
1135
|
...De.value
|
|
1132
|
-
][
|
|
1136
|
+
][f].$el.focus();
|
|
1133
1137
|
}, { moveToNextElement: we, moveToPreviousElement: Ue, moveToFirstElement: Ve, moveToLastElement: Ge } = ke(
|
|
1134
1138
|
{
|
|
1135
1139
|
items: P(Pe),
|
|
@@ -1138,29 +1142,29 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
1138
1142
|
},
|
|
1139
1143
|
Ne
|
|
1140
1144
|
), ze = {
|
|
1141
|
-
[
|
|
1142
|
-
[
|
|
1143
|
-
[
|
|
1144
|
-
[
|
|
1145
|
+
[F.ARROW_UP]: (f) => Ue(f),
|
|
1146
|
+
[F.ARROW_DOWN]: (f) => we(f),
|
|
1147
|
+
[F.HOME]: Ve,
|
|
1148
|
+
[F.END]: Ge
|
|
1145
1149
|
};
|
|
1146
1150
|
return {
|
|
1147
1151
|
// Refs
|
|
1148
|
-
selectAllListboxItemsRef:
|
|
1149
|
-
selectedListboxItemsRef:
|
|
1152
|
+
selectAllListboxItemsRef: b,
|
|
1153
|
+
selectedListboxItemsRef: o,
|
|
1150
1154
|
listboxItemsRef: s,
|
|
1151
1155
|
// Values
|
|
1152
1156
|
isAllSelected: k,
|
|
1153
1157
|
showSelectedItems: me,
|
|
1154
|
-
isIndeterminate:
|
|
1155
|
-
isMultiLevelSelect:
|
|
1158
|
+
isIndeterminate: C,
|
|
1159
|
+
isMultiLevelSelect: n,
|
|
1156
1160
|
flattenedItemsList: i,
|
|
1157
|
-
selectedItemsList:
|
|
1161
|
+
selectedItemsList: r,
|
|
1158
1162
|
selectAllCheckboxText: $,
|
|
1159
1163
|
selectedOptions: re,
|
|
1160
1164
|
showSelectAllCheckbox: N,
|
|
1161
1165
|
slots: a,
|
|
1162
1166
|
// Enums
|
|
1163
|
-
BentoListboxEvent:
|
|
1167
|
+
BentoListboxEvent: d,
|
|
1164
1168
|
// Methods
|
|
1165
1169
|
selectAllCategory: V,
|
|
1166
1170
|
toggleCheckboxSelection: be,
|
|
@@ -1174,45 +1178,45 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
1174
1178
|
key: 1,
|
|
1175
1179
|
class: "b-listbox-multi-select__divider"
|
|
1176
1180
|
}, wt = { key: 2 };
|
|
1177
|
-
function Ut(e, t, a, c,
|
|
1178
|
-
const s =
|
|
1179
|
-
return ae((
|
|
1180
|
-
e.showSelectAllCheckbox ? (
|
|
1181
|
+
function Ut(e, t, a, c, b, o) {
|
|
1182
|
+
const s = T("bento-checkbox"), r = T("bento-typography"), n = T("bento-listbox-option"), i = T("listbox-multi-select-chips"), p = T("listbox-multi-select-options"), l = pe("bento-keyboard-navigation-directive");
|
|
1183
|
+
return ae((v(), O("div", w({ class: "b-listbox-multi-select" }, te(e.listboxListeners, !0)), [
|
|
1184
|
+
e.showSelectAllCheckbox ? (v(), D(n, {
|
|
1181
1185
|
key: 0,
|
|
1182
1186
|
ref: "selectAllListboxItemsRef",
|
|
1183
1187
|
class: "b-listbox-multi-select__option"
|
|
1184
1188
|
}, {
|
|
1185
|
-
default:
|
|
1189
|
+
default: _(() => [
|
|
1186
1190
|
B(s, {
|
|
1187
1191
|
"aria-label": e.selectAllCheckboxText,
|
|
1188
1192
|
"model-value": e.isAllSelected,
|
|
1189
1193
|
indeterminate: e.isIndeterminate,
|
|
1190
1194
|
"onUpdate:modelValue": e.toggleSelectAll
|
|
1191
1195
|
}, null, 8, ["aria-label", "model-value", "indeterminate", "onUpdate:modelValue"]),
|
|
1192
|
-
B(
|
|
1196
|
+
B(r, {
|
|
1193
1197
|
el: "span",
|
|
1194
1198
|
"aria-hidden": "true"
|
|
1195
1199
|
}, {
|
|
1196
|
-
default:
|
|
1197
|
-
G(
|
|
1200
|
+
default: _(() => [
|
|
1201
|
+
G(U(e.selectAllCheckboxText), 1)
|
|
1198
1202
|
]),
|
|
1199
1203
|
_: 1
|
|
1200
1204
|
})
|
|
1201
1205
|
]),
|
|
1202
1206
|
_: 1
|
|
1203
1207
|
}, 512)) : Y("", !0),
|
|
1204
|
-
e.showSelectAllCheckbox ? (
|
|
1205
|
-
e.showSelectedItems ? (
|
|
1208
|
+
e.showSelectAllCheckbox ? (v(), O("hr", Nt)) : Y("", !0),
|
|
1209
|
+
e.showSelectedItems ? (v(), O("div", wt, [
|
|
1206
1210
|
B(i, {
|
|
1207
1211
|
ref: "selectedListboxItemsRef",
|
|
1208
1212
|
items: e.selectedOptions,
|
|
1209
1213
|
"is-option-disabled": e.isOptionDisabled,
|
|
1210
1214
|
onUnselectCategory: e.unselectAllCategory,
|
|
1211
|
-
onUnselectItem: t[0] || (t[0] = (
|
|
1215
|
+
onUnselectItem: t[0] || (t[0] = (u) => e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, u))
|
|
1212
1216
|
}, null, 8, ["items", "is-option-disabled", "onUnselectCategory"]),
|
|
1213
|
-
t[5] || (t[5] =
|
|
1217
|
+
t[5] || (t[5] = q("hr", { class: "b-listbox-multi-select__divider" }, null, -1))
|
|
1214
1218
|
])) : Y("", !0),
|
|
1215
|
-
B(
|
|
1219
|
+
B(p, {
|
|
1216
1220
|
ref: "listboxItemsRef",
|
|
1217
1221
|
items: e.items,
|
|
1218
1222
|
"is-option-disabled": e.isOptionDisabled,
|
|
@@ -1220,25 +1224,25 @@ function Ut(e, t, a, c, u, n) {
|
|
|
1220
1224
|
"static-categories": e.staticCategories,
|
|
1221
1225
|
searching: e.searching,
|
|
1222
1226
|
"selected-items-list": e.selectedItemsList,
|
|
1223
|
-
onToggleCheckboxSelection: t[1] || (t[1] = (
|
|
1227
|
+
onToggleCheckboxSelection: t[1] || (t[1] = (u) => e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, u)),
|
|
1224
1228
|
onSelectCategory: e.selectAllCategory,
|
|
1225
1229
|
onUnselectCategory: e.unselectAllCategory,
|
|
1226
|
-
onSpacePressed: t[2] || (t[2] = (
|
|
1227
|
-
onTabPressed: t[3] || (t[3] = (
|
|
1228
|
-
onEnterPressed: t[4] || (t[4] = (
|
|
1230
|
+
onSpacePressed: t[2] || (t[2] = (u) => e.toggleCheckboxSelection(e.BentoListboxEvent.SPACE, u)),
|
|
1231
|
+
onTabPressed: t[3] || (t[3] = (u) => e.toggleCheckboxSelection(e.BentoListboxEvent.TAB, u)),
|
|
1232
|
+
onEnterPressed: t[4] || (t[4] = (u) => e.toggleCheckboxSelection(e.BentoListboxEvent.ENTER, u))
|
|
1229
1233
|
}, ie({ _: 2 }, [
|
|
1230
|
-
|
|
1234
|
+
x(e.slots, (u, R) => ({
|
|
1231
1235
|
name: R,
|
|
1232
|
-
fn:
|
|
1236
|
+
fn: _(($) => [
|
|
1233
1237
|
z(e.$slots, R, ee(ne($)), void 0, !0)
|
|
1234
1238
|
])
|
|
1235
1239
|
}))
|
|
1236
1240
|
]), 1032, ["items", "is-option-disabled", "is-multi-level", "static-categories", "searching", "selected-items-list", "onSelectCategory", "onUnselectCategory"])
|
|
1237
1241
|
], 16)), [
|
|
1238
|
-
[
|
|
1242
|
+
[l]
|
|
1239
1243
|
]);
|
|
1240
1244
|
}
|
|
1241
|
-
const Te = /* @__PURE__ */
|
|
1245
|
+
const Te = /* @__PURE__ */ K(Pt, [["render", Ut], ["__scopeId", "data-v-282f5857"]]), _e = {
|
|
1242
1246
|
"en-US": {
|
|
1243
1247
|
loading: "Loading",
|
|
1244
1248
|
showMore: "Show more"
|
|
@@ -1258,7 +1262,7 @@ const Te = /* @__PURE__ */ q(Pt, [["render", Ut], ["__scopeId", "data-v-282f5857
|
|
|
1258
1262
|
BentoListboxSingleSelect: St,
|
|
1259
1263
|
BentoListboxMultiSelect: Te,
|
|
1260
1264
|
BentoTypography: Z,
|
|
1261
|
-
BentoLoadingIndicator:
|
|
1265
|
+
BentoLoadingIndicator: Ke,
|
|
1262
1266
|
BentoLoadingButton: Qe
|
|
1263
1267
|
},
|
|
1264
1268
|
directives: { BentoKeyboardNavigationDirective: Se },
|
|
@@ -1359,60 +1363,60 @@ const Te = /* @__PURE__ */ q(Pt, [["render", Ut], ["__scopeId", "data-v-282f5857
|
|
|
1359
1363
|
}
|
|
1360
1364
|
},
|
|
1361
1365
|
emits: [
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1366
|
+
d.SELECT,
|
|
1367
|
+
d.SPACE,
|
|
1368
|
+
d.SHOW_MORE,
|
|
1369
|
+
d.ENTER,
|
|
1370
|
+
d.ESCAPE,
|
|
1371
|
+
d.TAB
|
|
1368
1372
|
],
|
|
1369
1373
|
setup(e, { emit: t, slots: a }) {
|
|
1370
|
-
const c = P([]),
|
|
1374
|
+
const c = P([]), b = se(e, "items"), { t: o } = ue({ messages: _e }), s = m(() => e.lazyLoadType !== X.AUTOMATIC), r = m(() => e.lazyLoadType === X.AUTOMATIC), n = () => {
|
|
1371
1375
|
var N;
|
|
1372
1376
|
return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((N = e == null ? void 0 : e.virtualScroll) != null && N.itemHeight) ? e.virtualScroll.itemHeight : Vt;
|
|
1373
1377
|
}, {
|
|
1374
1378
|
containerRef: i,
|
|
1375
|
-
containerProps:
|
|
1376
|
-
onScroll:
|
|
1377
|
-
list:
|
|
1379
|
+
containerProps: p,
|
|
1380
|
+
onScroll: l,
|
|
1381
|
+
list: u,
|
|
1378
1382
|
wrapperProps: R
|
|
1379
|
-
} = tt(
|
|
1380
|
-
itemHeight:
|
|
1383
|
+
} = tt(b, {
|
|
1384
|
+
itemHeight: n(),
|
|
1381
1385
|
// Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
|
|
1382
1386
|
disabled: (e == null ? void 0 : e.multiple) || (e == null ? void 0 : e.virtualScroll) === !1 || (e == null ? void 0 : e.lazyLoadType) !== "none"
|
|
1383
|
-
}), $ =
|
|
1387
|
+
}), $ = m(
|
|
1384
1388
|
() => s.value ? "true" : void 0
|
|
1385
|
-
), M =
|
|
1389
|
+
), M = m(
|
|
1386
1390
|
() => s.value && e.loading ? "true" : "false"
|
|
1387
|
-
),
|
|
1391
|
+
), g = m(
|
|
1388
1392
|
() => s.value ? "polite" : void 0
|
|
1389
|
-
),
|
|
1393
|
+
), y = (N) => (le) => {
|
|
1390
1394
|
t(N, le);
|
|
1391
|
-
},
|
|
1392
|
-
t(
|
|
1395
|
+
}, h = () => {
|
|
1396
|
+
t(d.SHOW_MORE);
|
|
1393
1397
|
}, k = je(() => {
|
|
1394
1398
|
const N = i.value;
|
|
1395
1399
|
if (!N)
|
|
1396
1400
|
return;
|
|
1397
1401
|
const le = Math.round(N.scrollTop) + N.clientHeight >= N.scrollHeight;
|
|
1398
|
-
e.hasMoreItems && le && !e.loading &&
|
|
1399
|
-
}),
|
|
1400
|
-
|
|
1401
|
-
}, I =
|
|
1402
|
+
e.hasMoreItems && le && !e.loading && h();
|
|
1403
|
+
}), C = () => {
|
|
1404
|
+
r.value ? k() : l();
|
|
1405
|
+
}, I = m(() => {
|
|
1402
1406
|
var N;
|
|
1403
1407
|
return ((N = e.items) == null ? void 0 : N.length) === 0;
|
|
1404
|
-
}), V =
|
|
1408
|
+
}), V = m(
|
|
1405
1409
|
() => e.lazyLoadType === X.BUTTON && e.hasMoreItems
|
|
1406
|
-
), Q =
|
|
1410
|
+
), Q = m(
|
|
1407
1411
|
() => e.loading ? he.LOADING : he.START
|
|
1408
|
-
), be =
|
|
1412
|
+
), be = m(() => e.loading ? o("loading") : o("showMore")), re = m(() => ({
|
|
1409
1413
|
...e.emptyState,
|
|
1410
1414
|
variant: "condensed"
|
|
1411
1415
|
})), me = {
|
|
1412
|
-
[
|
|
1413
|
-
[
|
|
1414
|
-
[
|
|
1415
|
-
[
|
|
1416
|
+
[d.SELECT]: y(d.SELECT),
|
|
1417
|
+
[d.SPACE]: y(d.SPACE),
|
|
1418
|
+
[d.TAB]: y(d.TAB),
|
|
1419
|
+
[d.ENTER]: y(d.ENTER)
|
|
1416
1420
|
};
|
|
1417
1421
|
return {
|
|
1418
1422
|
// Refs
|
|
@@ -1421,41 +1425,41 @@ const Te = /* @__PURE__ */ q(Pt, [["render", Ut], ["__scopeId", "data-v-282f5857
|
|
|
1421
1425
|
// a11y
|
|
1422
1426
|
ariaAtomic: $,
|
|
1423
1427
|
ariaBusy: M,
|
|
1424
|
-
ariaLive:
|
|
1428
|
+
ariaLive: g,
|
|
1425
1429
|
// Values
|
|
1426
|
-
containerProps:
|
|
1430
|
+
containerProps: p,
|
|
1427
1431
|
isSearchResultEmpty: I,
|
|
1428
1432
|
limitedEmptyStateProps: re,
|
|
1429
1433
|
loadingButtonState: Q,
|
|
1430
1434
|
slots: a,
|
|
1431
1435
|
shouldDisplayShowMoreButton: V,
|
|
1432
1436
|
showMoreButtonText: be,
|
|
1433
|
-
virtualisedItems:
|
|
1437
|
+
virtualisedItems: u,
|
|
1434
1438
|
wrapperProps: R,
|
|
1435
1439
|
// Enums
|
|
1436
|
-
BentoKeyboardNavigationKeyDownEvent:
|
|
1437
|
-
BentoListboxEvent:
|
|
1440
|
+
BentoKeyboardNavigationKeyDownEvent: F,
|
|
1441
|
+
BentoListboxEvent: d,
|
|
1438
1442
|
// Methods
|
|
1439
|
-
onListboxContainerScroll:
|
|
1440
|
-
onOptionSelected:
|
|
1441
|
-
emitShowMore:
|
|
1443
|
+
onListboxContainerScroll: C,
|
|
1444
|
+
onOptionSelected: y,
|
|
1445
|
+
emitShowMore: h,
|
|
1442
1446
|
listboxListeners: me
|
|
1443
1447
|
};
|
|
1444
1448
|
}
|
|
1445
|
-
}), zt = ["id", "aria-busy", "aria-atomic", "aria-label", "aria-live"],
|
|
1449
|
+
}), zt = ["id", "aria-busy", "aria-atomic", "aria-label", "aria-live"], xt = {
|
|
1446
1450
|
key: 0,
|
|
1447
1451
|
class: "b-listbox__empty-search-message"
|
|
1448
|
-
},
|
|
1452
|
+
}, Ft = {
|
|
1449
1453
|
key: 2,
|
|
1450
1454
|
class: "b-listbox__lazy-load"
|
|
1451
1455
|
}, Yt = {
|
|
1452
1456
|
key: 3,
|
|
1453
1457
|
class: "b-listbox__lazy-load"
|
|
1454
1458
|
};
|
|
1455
|
-
function
|
|
1459
|
+
function qt(e, t, a, c, b, o) {
|
|
1456
1460
|
var R;
|
|
1457
|
-
const s =
|
|
1458
|
-
return ae((
|
|
1461
|
+
const s = T("bento-empty-state"), r = T("bento-typography"), n = T("bento-listbox-multi-select"), i = T("bento-listbox-single-select"), p = T("bento-loading-button"), l = T("bento-loading-indicator"), u = pe("bento-keyboard-navigation-directive");
|
|
1462
|
+
return ae((v(), O("div", {
|
|
1459
1463
|
id: e.id,
|
|
1460
1464
|
ref: "listboxRef",
|
|
1461
1465
|
class: "b-listbox",
|
|
@@ -1465,22 +1469,22 @@ function Kt(e, t, a, c, u, n) {
|
|
|
1465
1469
|
"aria-atomic": e.ariaAtomic,
|
|
1466
1470
|
"aria-label": e.ariaLabel,
|
|
1467
1471
|
"aria-live": e.ariaLive,
|
|
1468
|
-
style:
|
|
1472
|
+
style: qe((R = e.containerProps) == null ? void 0 : R.style),
|
|
1469
1473
|
onScroll: t[0] || (t[0] = (...$) => e.onListboxContainerScroll && e.onListboxContainerScroll(...$))
|
|
1470
1474
|
}, [
|
|
1471
|
-
|
|
1472
|
-
e.isSearchResultEmpty ? (
|
|
1473
|
-
e.emptyState ? (
|
|
1475
|
+
q("div", ee(ne(e.wrapperProps)), [
|
|
1476
|
+
e.isSearchResultEmpty ? (v(), O("div", xt, [
|
|
1477
|
+
e.emptyState ? (v(), D(s, ee(w({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (v(), D(r, {
|
|
1474
1478
|
key: 1,
|
|
1475
1479
|
el: "span"
|
|
1476
1480
|
}, {
|
|
1477
|
-
default:
|
|
1478
|
-
G(
|
|
1481
|
+
default: _(() => [
|
|
1482
|
+
G(U(e.noResultsMessage), 1)
|
|
1479
1483
|
]),
|
|
1480
1484
|
_: 1
|
|
1481
1485
|
}))
|
|
1482
|
-
])) : (
|
|
1483
|
-
e.multiple ? (
|
|
1486
|
+
])) : (v(), O(J, { key: 1 }, [
|
|
1487
|
+
e.multiple ? (v(), D(n, w({
|
|
1484
1488
|
key: 0,
|
|
1485
1489
|
ref: "listboxItemRef",
|
|
1486
1490
|
"has-more-items": e.hasMoreItems,
|
|
@@ -1491,13 +1495,13 @@ function Kt(e, t, a, c, u, n) {
|
|
|
1491
1495
|
searching: e.searching,
|
|
1492
1496
|
"is-option-disabled": e.isOptionDisabled
|
|
1493
1497
|
}, te(e.listboxListeners)), ie({ _: 2 }, [
|
|
1494
|
-
|
|
1498
|
+
x(e.slots, ($, M) => ({
|
|
1495
1499
|
name: M,
|
|
1496
|
-
fn:
|
|
1497
|
-
z(e.$slots, M, ee(ne(
|
|
1500
|
+
fn: _((g) => [
|
|
1501
|
+
z(e.$slots, M, ee(ne(g)), void 0, !0)
|
|
1498
1502
|
])
|
|
1499
1503
|
}))
|
|
1500
|
-
]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (
|
|
1504
|
+
]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (v(), D(i, w({
|
|
1501
1505
|
key: 1,
|
|
1502
1506
|
ref: "listboxItemRef",
|
|
1503
1507
|
items: e.virtualisedItems,
|
|
@@ -1505,34 +1509,34 @@ function Kt(e, t, a, c, u, n) {
|
|
|
1505
1509
|
"static-categories": e.staticCategories,
|
|
1506
1510
|
"is-option-disabled": e.isOptionDisabled
|
|
1507
1511
|
}, te(e.listboxListeners)), ie({ _: 2 }, [
|
|
1508
|
-
|
|
1512
|
+
x(e.slots, ($, M) => ({
|
|
1509
1513
|
name: M,
|
|
1510
|
-
fn:
|
|
1511
|
-
z(e.$slots, M, ee(ne(
|
|
1514
|
+
fn: _((g) => [
|
|
1515
|
+
z(e.$slots, M, ee(ne(g)), void 0, !0)
|
|
1512
1516
|
])
|
|
1513
1517
|
}))
|
|
1514
1518
|
]), 1040, ["items", "selected-value", "static-categories", "is-option-disabled"])),
|
|
1515
|
-
e.shouldDisplayShowMoreButton ? (
|
|
1516
|
-
B(
|
|
1519
|
+
e.shouldDisplayShowMoreButton ? (v(), O("div", Ft, [
|
|
1520
|
+
B(p, {
|
|
1517
1521
|
state: e.loadingButtonState,
|
|
1518
1522
|
variant: "secondary",
|
|
1519
1523
|
onClickCapture: e.emitShowMore
|
|
1520
1524
|
}, {
|
|
1521
|
-
default:
|
|
1522
|
-
G(
|
|
1525
|
+
default: _(() => [
|
|
1526
|
+
G(U(e.showMoreButtonText), 1)
|
|
1523
1527
|
]),
|
|
1524
1528
|
_: 1
|
|
1525
1529
|
}, 8, ["state", "onClickCapture"])
|
|
1526
|
-
])) : e.loading ? (
|
|
1527
|
-
B(
|
|
1530
|
+
])) : e.loading ? (v(), O("div", Yt, [
|
|
1531
|
+
B(l)
|
|
1528
1532
|
])) : Y("", !0)
|
|
1529
1533
|
], 64))
|
|
1530
1534
|
], 16)
|
|
1531
1535
|
], 44, zt)), [
|
|
1532
|
-
[
|
|
1536
|
+
[u]
|
|
1533
1537
|
]);
|
|
1534
1538
|
}
|
|
1535
|
-
const as = /* @__PURE__ */
|
|
1539
|
+
const as = /* @__PURE__ */ K(Gt, [["render", qt], ["__scopeId", "data-v-3d72f45a"]]), ye = (e, t) => {
|
|
1536
1540
|
for (const a of e) {
|
|
1537
1541
|
if (a.value === t)
|
|
1538
1542
|
return a;
|
|
@@ -1544,48 +1548,48 @@ const as = /* @__PURE__ */ q(Gt, [["render", Kt], ["__scopeId", "data-v-3d72f45a
|
|
|
1544
1548
|
}
|
|
1545
1549
|
return null;
|
|
1546
1550
|
}, rs = (e, t, a) => {
|
|
1547
|
-
const c = P([]),
|
|
1548
|
-
|
|
1549
|
-
}, s = (
|
|
1550
|
-
c.value =
|
|
1551
|
-
},
|
|
1552
|
-
c.value = [],
|
|
1551
|
+
const c = P([]), b = P(), o = (n) => {
|
|
1552
|
+
b.value = a.value ? n.map(({ value: i }) => i) : n[0].value;
|
|
1553
|
+
}, s = (n) => {
|
|
1554
|
+
c.value = n, o(n);
|
|
1555
|
+
}, r = () => {
|
|
1556
|
+
c.value = [], b.value = null;
|
|
1553
1557
|
};
|
|
1554
1558
|
return Ie(
|
|
1555
1559
|
() => t.value,
|
|
1556
1560
|
() => {
|
|
1557
1561
|
if (!t.value) {
|
|
1558
|
-
|
|
1562
|
+
r();
|
|
1559
1563
|
return;
|
|
1560
1564
|
}
|
|
1561
|
-
const
|
|
1562
|
-
|
|
1563
|
-
const
|
|
1564
|
-
let
|
|
1565
|
-
|
|
1565
|
+
const n = !Array.isArray(t.value), i = [...c.value];
|
|
1566
|
+
r();
|
|
1567
|
+
const p = (l) => {
|
|
1568
|
+
let u = ye(e.value, l);
|
|
1569
|
+
u || (u = ye(i, l)), u || (u = { value: l, label: l.toString() }), c.value.push(u);
|
|
1566
1570
|
};
|
|
1567
|
-
if (
|
|
1568
|
-
const
|
|
1569
|
-
|
|
1571
|
+
if (n) {
|
|
1572
|
+
const l = t.value;
|
|
1573
|
+
p(l), o(c.value);
|
|
1570
1574
|
return;
|
|
1571
1575
|
}
|
|
1572
|
-
t.value.forEach(
|
|
1576
|
+
t.value.forEach(p), o(c.value);
|
|
1573
1577
|
},
|
|
1574
1578
|
{ immediate: !0 }
|
|
1575
1579
|
), {
|
|
1576
1580
|
// Values
|
|
1577
1581
|
cachedSelectedListboxOptions: c,
|
|
1578
|
-
cachedListboxSelectedValues:
|
|
1582
|
+
cachedListboxSelectedValues: b,
|
|
1579
1583
|
// Methods
|
|
1580
|
-
resetCache:
|
|
1584
|
+
resetCache: r,
|
|
1581
1585
|
setCachedValues: s
|
|
1582
1586
|
};
|
|
1583
1587
|
};
|
|
1584
1588
|
export {
|
|
1585
1589
|
X as B,
|
|
1586
|
-
|
|
1590
|
+
d as a,
|
|
1587
1591
|
as as b,
|
|
1588
1592
|
rs as c,
|
|
1589
1593
|
Mt as u
|
|
1590
1594
|
};
|
|
1591
|
-
//# sourceMappingURL=use-cached-selected-values.
|
|
1595
|
+
//# sourceMappingURL=use-cached-selected-values.CxAhnNa6.js.map
|