@adyen/bento-vue2 1.6.1 → 1.7.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/packages/core/src/components/button/button.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +43 -0
- package/dist/@types/packages/vue2/src/components/action-bar/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +290 -281
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +4 -3
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +53 -70
- package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +20 -2
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +18 -0
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +20 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +45 -27
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +21 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +24 -6
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +21 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +21 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +21 -3
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.types.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +22 -4
- package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +5 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +234 -12
- package/dist/@types/packages/vue2/src/components/filter-bar/components/boolean-filter/boolean-filter.vue.d.ts +12 -5
- package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +12 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +10 -0
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/info-icon/info-icon.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +21 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +18 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/calendar-month.vue.d.ts +19 -0
- package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/fixed-scroller/fixed-scroller.vue.d.ts +22 -1
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +94 -8
- package/dist/@types/packages/vue2/src/components/internal/teleport/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/teleport/teleport.vue.d.ts +50 -0
- package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/menu/menu.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +15 -11
- package/dist/@types/packages/vue2/src/components/pagination/components/pagination-context/pagination-context.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +10 -5
- package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +21 -0
- package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +21 -5
- package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +1 -2
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tabs/tabs.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +6 -3
- package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +9 -2
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +13 -13
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue.d.ts +226 -0
- package/dist/@types/packages/vue2/src/components/tutorial/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/tutorial/tutorial.types.d.ts +13 -0
- package/dist/@types/packages/vue2/src/components/tutorial/tutorial.vue.d.ts +16 -0
- package/dist/@types/packages/vue2/src/composables/index.d.ts +5 -2
- package/dist/@types/packages/vue2/src/composables/use-click-outside/use-click-outside.d.ts +3 -0
- package/dist/@types/packages/vue2/src/composables/use-form-validate/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.d.ts +12 -0
- package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.types.d.ts +5 -0
- package/dist/@types/packages/vue2/src/composables/use-virtual-list/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.d.ts +15 -0
- package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.types.d.ts +20 -0
- package/dist/@types/packages/vue2/src/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/types/listbox.d.ts +12 -0
- package/dist/accordion.js +41 -32
- package/dist/accordion.js.map +1 -1
- package/dist/action-bar.js +191 -0
- package/dist/action-bar.js.map +1 -0
- package/dist/alert.js +3 -3
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions-with-menu.css +1 -0
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/checkmark.css +1 -0
- package/dist/assets/chevron-left.css +1 -0
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/fixed-scroller.css +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -0
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/listbox.css +1 -1
- package/dist/assets/refresh.css +1 -0
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +21 -14
- package/dist/button.js.map +1 -1
- package/dist/card.js +54 -54
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{base-button.d1ba66cd.js → base-button.7886a7e6.js} +2 -2
- package/dist/chunks/{base-button.d1ba66cd.js.map → base-button.7886a7e6.js.map} +1 -1
- package/dist/chunks/{base-modal.ec74044e.js → base-modal.88e7b9d4.js} +4 -4
- package/dist/chunks/{base-modal.ec74044e.js.map → base-modal.88e7b9d4.js.map} +1 -1
- package/dist/chunks/button-actions-with-menu.a5413243.js +105 -0
- package/dist/chunks/button-actions-with-menu.a5413243.js.map +1 -0
- package/dist/chunks/button.e09d5980.js +125 -0
- package/dist/chunks/button.e09d5980.js.map +1 -0
- package/dist/chunks/{calendar.b74f8a0f.js → calendar.24d0ac04.js} +294 -272
- package/dist/chunks/calendar.24d0ac04.js.map +1 -0
- package/dist/chunks/{checkbox.96ee3f71.js → checkbox.5343e28e.js} +7 -7
- package/dist/chunks/{checkbox.96ee3f71.js.map → checkbox.5343e28e.js.map} +1 -1
- package/dist/chunks/checkmark.78f3ed9c.js +26 -0
- package/dist/chunks/checkmark.78f3ed9c.js.map +1 -0
- package/dist/chunks/{chevron-right.3b826337.js → chevron-left.c10778d3.js} +8 -8
- package/dist/chunks/chevron-left.c10778d3.js.map +1 -0
- package/dist/chunks/{controls-group.e9537e45.js → controls-group.2a21bd83.js} +2 -2
- package/dist/chunks/{controls-group.e9537e45.js.map → controls-group.2a21bd83.js.map} +1 -1
- package/dist/chunks/{copy.2ff56819.js → copy.346eadb1.js} +4 -4
- package/dist/chunks/{copy.2ff56819.js.map → copy.346eadb1.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.3df0bf23.js → dropdown-default-textbox.25134789.js} +4 -4
- package/dist/chunks/dropdown-default-textbox.25134789.js.map +1 -0
- package/dist/chunks/{dropdown.3f198167.js → dropdown.f1253a54.js} +111 -81
- package/dist/chunks/dropdown.f1253a54.js.map +1 -0
- package/dist/chunks/{error-message.f5454f19.js → error-message.8302a46c.js} +2 -2
- package/dist/chunks/{error-message.f5454f19.js.map → error-message.8302a46c.js.map} +1 -1
- package/dist/chunks/fixed-scroller.8994e30a.js +108 -0
- package/dist/chunks/fixed-scroller.8994e30a.js.map +1 -0
- package/dist/chunks/{footer-actions.00d20947.js → footer-actions.c9b2cb74.js} +3 -3
- package/dist/chunks/{footer-actions.00d20947.js.map → footer-actions.c9b2cb74.js.map} +1 -1
- package/dist/chunks/{index.c39c64c9.js → index.2625175a.js} +2 -2
- package/dist/chunks/{index.c39c64c9.js.map → index.2625175a.js.map} +1 -1
- package/dist/chunks/index.37283390.js +475 -0
- package/dist/chunks/index.37283390.js.map +1 -0
- package/dist/chunks/index.8ac70774.js +1328 -0
- package/dist/chunks/index.8ac70774.js.map +1 -0
- package/dist/chunks/{index.2fce7703.js → index.965ac1af.js} +2 -2
- package/dist/chunks/{index.2fce7703.js.map → index.965ac1af.js.map} +1 -1
- package/dist/chunks/{index.eb52e785.js → index.a201f750.js} +6 -5
- package/dist/chunks/{index.eb52e785.js.map → index.a201f750.js.map} +1 -1
- package/dist/chunks/{index.a709a6b0.js → index.b83f8b7e.js} +2 -2
- package/dist/chunks/{index.a709a6b0.js.map → index.b83f8b7e.js.map} +1 -1
- package/dist/chunks/{index.298f5eed.js → index.d6b5f5e1.js} +6 -6
- package/dist/chunks/{index.298f5eed.js.map → index.d6b5f5e1.js.map} +1 -1
- package/dist/chunks/{index.31949c1a.js → index.e566354f.js} +91 -74
- package/dist/chunks/index.e566354f.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.1362a2d7.js → listbox-option-tag.6a09e8e2.js} +8 -7
- package/dist/chunks/{listbox-option-tag.1362a2d7.js.map → listbox-option-tag.6a09e8e2.js.map} +1 -1
- package/dist/chunks/{listbox.e7bf46e4.js → listbox.73c38f38.js} +479 -385
- package/dist/chunks/listbox.73c38f38.js.map +1 -0
- package/dist/chunks/{loading-button.0ad06c99.js → loading-button.c65682d6.js} +2 -2
- package/dist/chunks/{loading-button.0ad06c99.js.map → loading-button.c65682d6.js.map} +1 -1
- package/dist/chunks/refresh.eb485c6f.js +26 -0
- package/dist/chunks/refresh.eb485c6f.js.map +1 -0
- package/dist/chunks/summary-grid.keys.1d1028c2.js +5 -0
- package/dist/chunks/summary-grid.keys.1d1028c2.js.map +1 -0
- package/dist/chunks/{tooltip.68e81e9c.js → tooltip.104e5fac.js} +39 -36
- package/dist/chunks/{tooltip.68e81e9c.js.map → tooltip.104e5fac.js.map} +1 -1
- package/dist/code-snippet.js +7 -7
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +537 -528
- package/dist/country.js.map +1 -1
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +10 -10
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +99 -89
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +8 -7
- package/dist/empty-state.js.map +1 -1
- package/dist/filter-bar.js +500 -486
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header.js +104 -183
- package/dist/header.js.map +1 -1
- package/dist/image.js +3 -3
- package/dist/index.js +171 -169
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +7 -7
- package/dist/internal.js +20 -106
- package/dist/internal.js.map +1 -1
- package/dist/link.js +2 -2
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +3 -466
- package/dist/menu.js.map +1 -1
- package/dist/modal.js +3 -3
- package/dist/pagination.js +40 -26
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +33 -26
- package/dist/payment-method.js.map +1 -1
- package/dist/popover.js +4 -4
- package/dist/popper-container.js +6 -1270
- package/dist/popper-container.js.map +1 -1
- package/dist/radio-group.js +97 -81
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/segmented-control.js +100 -70
- package/dist/segmented-control.js.map +1 -1
- package/dist/sidepanel.js +53 -51
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +109 -119
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +81 -71
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +170 -162
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +3 -3
- package/dist/toggle.js +6 -6
- package/dist/tutorial.js +307 -0
- package/dist/tutorial.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/web-types.json +828 -122
- package/package.json +7 -4
- package/dist/assets/chevron-right.css +0 -1
- package/dist/chunks/button.eb60d460.js +0 -117
- package/dist/chunks/button.eb60d460.js.map +0 -1
- package/dist/chunks/calendar.b74f8a0f.js.map +0 -1
- package/dist/chunks/chevron-right.3b826337.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.3df0bf23.js.map +0 -1
- package/dist/chunks/dropdown.3f198167.js.map +0 -1
- package/dist/chunks/index.31949c1a.js.map +0 -1
- package/dist/chunks/listbox.e7bf46e4.js.map +0 -1
|
@@ -1,34 +1,112 @@
|
|
|
1
|
-
import { computed as r,
|
|
2
|
-
import { B as
|
|
3
|
-
import { BentoLoadingIndicator as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { B as
|
|
9
|
-
import {
|
|
10
|
-
import { B as
|
|
1
|
+
import { computed as r, ref as h, onMounted as J, onUnmounted as ve, watch as Q, defineComponent as D, toRef as Z } from "vue";
|
|
2
|
+
import { B as F } from "./index.965ac1af.js";
|
|
3
|
+
import { BentoLoadingIndicator as _e } from "../loading-indicator.js";
|
|
4
|
+
import { BentoEmptyState as me } from "../empty-state.js";
|
|
5
|
+
import { u as K } from "./i18n.155748d6.js";
|
|
6
|
+
import { d as fe } from "./debounce.b5ef6acf.js";
|
|
7
|
+
import { C as ge } from "./checkmark.78f3ed9c.js";
|
|
8
|
+
import { B, a as q } from "./keyboard-navigation.ca47dfa8.js";
|
|
9
|
+
import { n as N } from "./_plugin-vue2_normalizer.71e2aa87.js";
|
|
10
|
+
import { B as j } from "./checkbox.5343e28e.js";
|
|
11
|
+
import "./index.af05ced4.js";
|
|
12
|
+
import { C as ye, a as Ee } from "./chevron-up.674ec2e5.js";
|
|
13
|
+
import { B as Se, a as H } from "./loading-button.c65682d6.js";
|
|
14
|
+
import { o as xe } from "./resize.a041304d.js";
|
|
11
15
|
import "../assets/listbox.css";
|
|
12
|
-
const
|
|
16
|
+
const ee = (t, e, l, s) => {
|
|
13
17
|
const n = r(
|
|
14
18
|
() => {
|
|
15
|
-
var
|
|
16
|
-
return !!((
|
|
19
|
+
var c, v;
|
|
20
|
+
return !!((c = t.value) != null && c.length) && ((v = t.value) == null ? void 0 : v.length) === e.value.length;
|
|
17
21
|
}
|
|
18
|
-
),
|
|
19
|
-
var
|
|
20
|
-
return t.value == null || t.value.length === 0 ? !1 : ((
|
|
22
|
+
), o = r(() => {
|
|
23
|
+
var c;
|
|
24
|
+
return t.value == null || t.value.length === 0 ? !1 : ((c = t.value) == null ? void 0 : c.length) !== e.value.length;
|
|
21
25
|
});
|
|
22
26
|
return {
|
|
23
27
|
isAllSelected: n,
|
|
24
|
-
isIndeterminate:
|
|
25
|
-
toggleSelectAll: (
|
|
26
|
-
|
|
28
|
+
isIndeterminate: o,
|
|
29
|
+
toggleSelectAll: (c) => {
|
|
30
|
+
c ? l() : s();
|
|
27
31
|
}
|
|
28
32
|
};
|
|
29
33
|
};
|
|
30
|
-
|
|
31
|
-
const
|
|
34
|
+
function pe(t, { disabled: e, itemHeight: l, overscan: s = 5, prefixHeight: n }) {
|
|
35
|
+
const o = h(null), _ = h([]), c = h(0), v = h(0), b = h(0);
|
|
36
|
+
let S;
|
|
37
|
+
const L = r(() => {
|
|
38
|
+
const d = typeof l == "number" ? t.value.length * l : t.value.reduce((g, x, C) => g + l(C), 0), y = typeof l == "number" ? c.value * l : t.value.slice(0, c.value).reduce((g, x, C) => g + l(C), 0);
|
|
39
|
+
return {
|
|
40
|
+
style: {
|
|
41
|
+
marginTop: `${y}px`,
|
|
42
|
+
height: `${d - y}px`
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}), p = () => {
|
|
46
|
+
const d = (n == null ? void 0 : n.value) ?? 0, y = Math.max(o.value.scrollTop - d, 0);
|
|
47
|
+
if (typeof l == "number")
|
|
48
|
+
return Math.floor(y / l);
|
|
49
|
+
let g = 0, x = 0;
|
|
50
|
+
for (let C = 0; C < t.value.length; C += 1) {
|
|
51
|
+
const M = l(C);
|
|
52
|
+
if (g += M, g >= y) {
|
|
53
|
+
x = C;
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return x;
|
|
58
|
+
}, f = () => {
|
|
59
|
+
if (b.value = o.value.clientHeight, typeof l == "number")
|
|
60
|
+
return Math.ceil(b.value / l);
|
|
61
|
+
const d = c.value ?? 0;
|
|
62
|
+
let y = 0, g = 0;
|
|
63
|
+
for (let x = d; x < t.value.length; x += 1) {
|
|
64
|
+
const C = l(x);
|
|
65
|
+
if (y += C, g = x, y > b.value)
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
return g - d;
|
|
69
|
+
}, T = () => {
|
|
70
|
+
if (o.value) {
|
|
71
|
+
const d = f();
|
|
72
|
+
c.value = p(), v.value = Math.min(c.value + d + s, t.value.length), _.value = t.value.slice(c.value, v.value);
|
|
73
|
+
}
|
|
74
|
+
}, I = () => {
|
|
75
|
+
T();
|
|
76
|
+
};
|
|
77
|
+
e || (J(() => {
|
|
78
|
+
o.value && (b.value = o.value.clientHeight, S = xe(o.value, ({ clientHeight: d }) => {
|
|
79
|
+
b.value = d, T();
|
|
80
|
+
}), T());
|
|
81
|
+
}), ve(() => {
|
|
82
|
+
S == null || S.disconnect();
|
|
83
|
+
}), Q(
|
|
84
|
+
() => t.value,
|
|
85
|
+
() => {
|
|
86
|
+
T();
|
|
87
|
+
}
|
|
88
|
+
));
|
|
89
|
+
const A = {
|
|
90
|
+
ref: o,
|
|
91
|
+
style: { overflowY: "auto" }
|
|
92
|
+
};
|
|
93
|
+
return e ? {
|
|
94
|
+
containerRef: o,
|
|
95
|
+
containerProps: A,
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
97
|
+
onScroll: () => {
|
|
98
|
+
},
|
|
99
|
+
list: t
|
|
100
|
+
} : {
|
|
101
|
+
containerRef: o,
|
|
102
|
+
containerProps: A,
|
|
103
|
+
onScroll: I,
|
|
104
|
+
list: _,
|
|
105
|
+
wrapperProps: L
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
var i = /* @__PURE__ */ ((t) => (t.SELECT = "select", t.SHOW_MORE = "show-more", t.ESCAPE = "escape-pressed", t.CLICK = "click", t.ENTER = "enter-pressed", t.SPACE = "space-pressed", t.TAB = "tab-pressed", t.CLOSE_DROPDOWN = "close-dropdown", t))(i || {}), P = /* @__PURE__ */ ((t) => (t.AUTOMATIC = "automatic", t.BUTTON = "button", t.NONE = "none", t))(P || {});
|
|
109
|
+
const Ce = D({
|
|
32
110
|
name: "bento-listbox-option",
|
|
33
111
|
props: {
|
|
34
112
|
/**
|
|
@@ -40,7 +118,7 @@ const Ee = k({
|
|
|
40
118
|
*/
|
|
41
119
|
selected: { type: Boolean, default: !1 }
|
|
42
120
|
},
|
|
43
|
-
emits: [
|
|
121
|
+
emits: [i.CLICK, i.ENTER, i.SPACE, i.TAB],
|
|
44
122
|
setup(t, { emit: e }) {
|
|
45
123
|
const l = r(() => ({
|
|
46
124
|
"b-listbox-option--disabled": t.disabled,
|
|
@@ -48,21 +126,21 @@ const Ee = k({
|
|
|
48
126
|
}));
|
|
49
127
|
return {
|
|
50
128
|
// Enums
|
|
51
|
-
BentoKeyboardNavigationKeyDownEvent:
|
|
52
|
-
BentoListboxEvent:
|
|
129
|
+
BentoKeyboardNavigationKeyDownEvent: B,
|
|
130
|
+
BentoListboxEvent: i,
|
|
53
131
|
// Values
|
|
54
132
|
conditionalClasses: l,
|
|
55
133
|
// Events
|
|
56
|
-
onClick: (
|
|
57
|
-
e(
|
|
134
|
+
onClick: (o) => {
|
|
135
|
+
e(i.CLICK, o);
|
|
58
136
|
},
|
|
59
|
-
onOptionSelected: (
|
|
60
|
-
e(
|
|
137
|
+
onOptionSelected: (o, _) => {
|
|
138
|
+
e(o, _);
|
|
61
139
|
}
|
|
62
140
|
};
|
|
63
141
|
}
|
|
64
142
|
});
|
|
65
|
-
var
|
|
143
|
+
var he = function() {
|
|
66
144
|
var e = this, l = e._self._c;
|
|
67
145
|
return e._self._setupProxy, l("label", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(s) {
|
|
68
146
|
return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.onOptionSelected(e.BentoListboxEvent.ENTER, s);
|
|
@@ -71,42 +149,22 @@ var xe = function() {
|
|
|
71
149
|
}, function(s) {
|
|
72
150
|
return !s.type.indexOf("key") && e._k(s.keyCode, "tab", 9, s.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, s);
|
|
73
151
|
}] } }, "label", e.$attrs, !1), [e._t("default")], 2);
|
|
74
|
-
},
|
|
75
|
-
Ee,
|
|
76
|
-
xe,
|
|
77
|
-
ye,
|
|
78
|
-
!1,
|
|
79
|
-
null,
|
|
80
|
-
"d7fb415c",
|
|
81
|
-
null,
|
|
82
|
-
null
|
|
83
|
-
);
|
|
84
|
-
const P = Se.exports;
|
|
85
|
-
let V = 0;
|
|
86
|
-
const Ce = {
|
|
87
|
-
beforeCreate() {
|
|
88
|
-
this.uuid = V.toString(), V += 1;
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
var he = function() {
|
|
92
|
-
var e = this, l = e._self._c;
|
|
93
|
-
return l("svg", e._b({ attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#00112C", "fill-rule": "evenodd", d: "M14.5303 4.53033C14.8232 4.23744 14.8232 3.76256 14.5303 3.46967C14.2374 3.17678 13.7626 3.17678 13.4697 3.46967L6 10.9393L2.53033 7.46967C2.23744 7.17678 1.76256 7.17678 1.46967 7.46967C1.17678 7.76256 1.17678 8.23744 1.46967 8.53033L5.46967 12.5303C5.50628 12.5669 5.54574 12.599 5.58732 12.6264C5.87844 12.8186 6.27405 12.7866 6.53033 12.5303L14.5303 4.53033Z", "clip-rule": "evenodd" } })]);
|
|
94
|
-
}, Le = [], Oe = /* @__PURE__ */ R(
|
|
152
|
+
}, Te = [], Oe = /* @__PURE__ */ N(
|
|
95
153
|
Ce,
|
|
96
154
|
he,
|
|
97
|
-
|
|
155
|
+
Te,
|
|
98
156
|
!1,
|
|
99
157
|
null,
|
|
100
|
-
"
|
|
158
|
+
"d7fb415c",
|
|
101
159
|
null,
|
|
102
160
|
null
|
|
103
161
|
);
|
|
104
|
-
const
|
|
162
|
+
const U = Oe.exports, Le = D({
|
|
105
163
|
name: "bento-listbox-single-select-option",
|
|
106
164
|
components: {
|
|
107
|
-
BentoListboxOption:
|
|
108
|
-
BentoTypography:
|
|
109
|
-
CheckmarkIcon:
|
|
165
|
+
BentoListboxOption: U,
|
|
166
|
+
BentoTypography: F,
|
|
167
|
+
CheckmarkIcon: ge
|
|
110
168
|
},
|
|
111
169
|
props: {
|
|
112
170
|
/**
|
|
@@ -126,24 +184,24 @@ const Te = Oe.exports, Ae = k({
|
|
|
126
184
|
*/
|
|
127
185
|
selected: { type: Boolean, default: !1 }
|
|
128
186
|
},
|
|
129
|
-
emits: [
|
|
187
|
+
emits: [i.ENTER, i.SELECT, i.SPACE, i.TAB],
|
|
130
188
|
setup(t, { emit: e }) {
|
|
131
|
-
const l = (
|
|
132
|
-
t.disabled || e(
|
|
133
|
-
}, s = r(() => t.disabled ? !0 : null), n = r(() => t.selected ? !0 : null),
|
|
189
|
+
const l = (_) => {
|
|
190
|
+
t.disabled || e(_, t.option.value);
|
|
191
|
+
}, s = r(() => t.disabled ? !0 : null), n = r(() => t.selected ? !0 : null), o = r(() => t.disabled ? -1 : 0);
|
|
134
192
|
return {
|
|
135
193
|
// Values
|
|
136
194
|
ariaDisabled: s,
|
|
137
195
|
ariaSelected: n,
|
|
138
|
-
tabIndex:
|
|
196
|
+
tabIndex: o,
|
|
139
197
|
// Enums
|
|
140
|
-
BentoListboxEvent:
|
|
198
|
+
BentoListboxEvent: i,
|
|
141
199
|
// Events
|
|
142
200
|
onOptionSelected: l
|
|
143
201
|
};
|
|
144
202
|
}
|
|
145
203
|
});
|
|
146
|
-
var
|
|
204
|
+
var Ae = function() {
|
|
147
205
|
var e = this, l = e._self._c;
|
|
148
206
|
return e._self._setupProxy, l("bento-listbox-option", { staticClass: "b-listbox-single-select-option", attrs: { disabled: e.disabled, selected: e.selected, "aria-selected": e.ariaSelected, "aria-disabled": e.ariaDisabled, tabindex: e.tabIndex }, on: e._d({ click: function(s) {
|
|
149
207
|
return e.onOptionSelected(e.BentoListboxEvent.SELECT);
|
|
@@ -156,23 +214,23 @@ var Ie = function() {
|
|
|
156
214
|
}]) }, [e._t("default", function() {
|
|
157
215
|
return [l("span", { staticClass: "b-listbox-single-select-option__text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.option.label))]), e.option.description ? l("bento-typography", { staticClass: "b-listbox-single-select-option__description", attrs: { el: "span" } }, [e._v(" " + e._s(e.option.description) + " ")]) : e._e()], 1)];
|
|
158
216
|
}, null, e.option), l("span", { staticClass: "b-listbox-single-select-option__check-icon" }, [l("checkmark-icon", { directives: [{ name: "show", rawName: "v-show", value: e.selected, expression: "selected" }], attrs: { "svg-title": "selected" } })], 1)], 2);
|
|
159
|
-
},
|
|
217
|
+
}, Ie = [], Be = /* @__PURE__ */ N(
|
|
218
|
+
Le,
|
|
160
219
|
Ae,
|
|
161
220
|
Ie,
|
|
162
|
-
Be,
|
|
163
221
|
!1,
|
|
164
222
|
null,
|
|
165
223
|
"092ed5ee",
|
|
166
224
|
null,
|
|
167
225
|
null
|
|
168
226
|
);
|
|
169
|
-
const
|
|
170
|
-
const s = r(() => t.value.length - 1), n =
|
|
171
|
-
|
|
172
|
-
e && (n.value = t.value.findIndex((
|
|
227
|
+
const Re = Be.exports, te = ({ items: t, isOptionDisabled: e }, l) => {
|
|
228
|
+
const s = r(() => t.value.length - 1), n = h(0);
|
|
229
|
+
J(() => {
|
|
230
|
+
e && (n.value = t.value.findIndex((f) => !e(f)));
|
|
173
231
|
});
|
|
174
|
-
const
|
|
175
|
-
switch (
|
|
232
|
+
const o = (f) => !e || !!e && e(t.value[f]), _ = (f) => !e || !!e && !e(t.value[f]), c = (f) => {
|
|
233
|
+
switch (f) {
|
|
176
234
|
case "increase":
|
|
177
235
|
n.value += 1;
|
|
178
236
|
break;
|
|
@@ -180,47 +238,47 @@ const ke = Re.exports, W = ({ items: t, isOptionDisabled: e }, l) => {
|
|
|
180
238
|
n.value -= 1;
|
|
181
239
|
break;
|
|
182
240
|
}
|
|
183
|
-
},
|
|
184
|
-
n.value !==
|
|
185
|
-
},
|
|
186
|
-
const
|
|
187
|
-
|
|
241
|
+
}, v = ({ edgeCaseItem: f, isItemBeforeEdgeCaseItem: T }, I, A) => {
|
|
242
|
+
n.value !== f && (T ? _(f) && c(A) : (c(A), o(n.value) && I()), l(n.value));
|
|
243
|
+
}, b = () => {
|
|
244
|
+
const f = n.value === s.value - 2;
|
|
245
|
+
v(
|
|
188
246
|
{
|
|
189
|
-
isItemBeforeEdgeCaseItem:
|
|
247
|
+
isItemBeforeEdgeCaseItem: f,
|
|
190
248
|
edgeCaseItem: s.value
|
|
191
249
|
},
|
|
192
|
-
|
|
250
|
+
b,
|
|
193
251
|
"increase"
|
|
194
252
|
/* INCREASE */
|
|
195
253
|
);
|
|
196
|
-
},
|
|
197
|
-
const
|
|
198
|
-
|
|
254
|
+
}, S = () => {
|
|
255
|
+
const f = n.value === 1;
|
|
256
|
+
v(
|
|
199
257
|
{
|
|
200
258
|
edgeCaseItem: 0,
|
|
201
|
-
isItemBeforeEdgeCaseItem:
|
|
259
|
+
isItemBeforeEdgeCaseItem: f
|
|
202
260
|
},
|
|
203
|
-
|
|
261
|
+
S,
|
|
204
262
|
"decrease"
|
|
205
263
|
/* DECREASE */
|
|
206
264
|
);
|
|
207
265
|
};
|
|
208
266
|
return {
|
|
209
267
|
moveToFirstElement: () => {
|
|
210
|
-
n.value = 0,
|
|
268
|
+
n.value = 0, o(n.value) ? b() : l(n.value);
|
|
211
269
|
},
|
|
212
270
|
moveToLastElement: () => {
|
|
213
|
-
n.value = s.value,
|
|
271
|
+
n.value = s.value, o(n.value) ? S() : l(n.value);
|
|
214
272
|
},
|
|
215
|
-
moveToNextElement:
|
|
216
|
-
moveToPreviousElement:
|
|
273
|
+
moveToNextElement: b,
|
|
274
|
+
moveToPreviousElement: S
|
|
217
275
|
};
|
|
218
|
-
},
|
|
276
|
+
}, ke = D({
|
|
219
277
|
name: "bento-listbox-single-select",
|
|
220
278
|
components: {
|
|
221
|
-
BentoListboxSingleSelectOption:
|
|
279
|
+
BentoListboxSingleSelectOption: Re
|
|
222
280
|
},
|
|
223
|
-
directives: { BentoKeyboardNavigationDirective:
|
|
281
|
+
directives: { BentoKeyboardNavigationDirective: q },
|
|
224
282
|
inheritAttrs: !1,
|
|
225
283
|
props: {
|
|
226
284
|
/**
|
|
@@ -257,76 +315,76 @@ const ke = Re.exports, W = ({ items: t, isOptionDisabled: e }, l) => {
|
|
|
257
315
|
default: void 0
|
|
258
316
|
}
|
|
259
317
|
},
|
|
260
|
-
emits: [
|
|
318
|
+
emits: [i.SELECT, i.ENTER, i.SPACE, i.TAB],
|
|
261
319
|
setup(t, { emit: e, slots: l }) {
|
|
262
|
-
const s =
|
|
263
|
-
e(
|
|
264
|
-
},
|
|
320
|
+
const s = h([]), n = (p) => (f) => {
|
|
321
|
+
e(p, f);
|
|
322
|
+
}, o = (p) => s.value[p].$el.focus(), { moveToNextElement: _, moveToPreviousElement: c, moveToFirstElement: v, moveToLastElement: b } = te(
|
|
265
323
|
{
|
|
266
|
-
items:
|
|
324
|
+
items: Z(t, "items"),
|
|
267
325
|
isOptionDisabled: t.isOptionDisabled
|
|
268
326
|
},
|
|
269
|
-
|
|
270
|
-
),
|
|
271
|
-
[
|
|
272
|
-
[
|
|
273
|
-
[
|
|
274
|
-
[
|
|
275
|
-
},
|
|
276
|
-
[
|
|
277
|
-
[
|
|
278
|
-
[
|
|
279
|
-
[
|
|
327
|
+
o
|
|
328
|
+
), S = {
|
|
329
|
+
[B.ARROW_UP]: c,
|
|
330
|
+
[B.ARROW_DOWN]: _,
|
|
331
|
+
[B.HOME]: v,
|
|
332
|
+
[B.END]: b
|
|
333
|
+
}, L = {
|
|
334
|
+
[i.SELECT]: n(i.SELECT),
|
|
335
|
+
[i.SPACE]: n(i.SPACE),
|
|
336
|
+
[i.TAB]: n(i.TAB),
|
|
337
|
+
[i.ENTER]: n(i.ENTER)
|
|
280
338
|
};
|
|
281
339
|
return {
|
|
282
340
|
// Enums
|
|
283
|
-
BentoListboxEvent:
|
|
341
|
+
BentoListboxEvent: i,
|
|
284
342
|
// Values
|
|
285
343
|
listboxItemRef: s,
|
|
286
344
|
slots: l,
|
|
287
345
|
// Methods
|
|
288
346
|
onOptionSelected: n,
|
|
289
347
|
// Keyboard navigation
|
|
290
|
-
listboxListeners:
|
|
291
|
-
listboxOptionListeners:
|
|
348
|
+
listboxListeners: S,
|
|
349
|
+
listboxOptionListeners: L
|
|
292
350
|
};
|
|
293
351
|
}
|
|
294
352
|
});
|
|
295
|
-
var
|
|
353
|
+
var De = function() {
|
|
296
354
|
var e = this, l = e._self._c;
|
|
297
355
|
return e._self._setupProxy, l("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }] }, e.listboxListeners), e._l(e.items, function(s) {
|
|
298
|
-
return l("bento-listbox-single-select-option", e._g({ key: s.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: s, disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null, selected: s.value === e.selectedValue }, scopedSlots: e._u([e._l(e.slots, function(n,
|
|
299
|
-
return { key:
|
|
300
|
-
return [e._t(
|
|
356
|
+
return l("bento-listbox-single-select-option", e._g({ key: s.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: s, disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null, selected: s.value === e.selectedValue }, scopedSlots: e._u([e._l(e.slots, function(n, o) {
|
|
357
|
+
return { key: o, fn: function(_) {
|
|
358
|
+
return [e._t(o, null, null, _)];
|
|
301
359
|
} };
|
|
302
360
|
})], null, !0) }, e.listboxOptionListeners));
|
|
303
361
|
}), 1);
|
|
304
|
-
},
|
|
362
|
+
}, Ne = [], Pe = /* @__PURE__ */ N(
|
|
363
|
+
ke,
|
|
305
364
|
De,
|
|
306
365
|
Ne,
|
|
307
|
-
$e,
|
|
308
366
|
!1,
|
|
309
367
|
null,
|
|
310
368
|
null,
|
|
311
369
|
null,
|
|
312
370
|
null
|
|
313
371
|
);
|
|
314
|
-
const
|
|
315
|
-
var
|
|
316
|
-
const
|
|
372
|
+
const Me = Pe.exports;
|
|
373
|
+
var le = /* @__PURE__ */ ((t) => (t.DISABLED = "disabled", t))(le || {}), G = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.UNSELECT_CATEGORY = "unselect-category", t))(G || {});
|
|
374
|
+
const $e = {
|
|
317
375
|
"en-US": {
|
|
318
376
|
categoryClosed: "{category} closed",
|
|
319
377
|
categoryOpened: "{category} opened"
|
|
320
378
|
}
|
|
321
|
-
},
|
|
322
|
-
i18n: { messages:
|
|
379
|
+
}, we = D({
|
|
380
|
+
i18n: { messages: $e },
|
|
323
381
|
name: "bento-listbox-multi-select-category",
|
|
324
382
|
components: {
|
|
325
|
-
BentoCheckbox:
|
|
326
|
-
BentoTypography:
|
|
327
|
-
BentoListboxOption:
|
|
328
|
-
ChevronDownIcon:
|
|
329
|
-
ChevronUpIcon:
|
|
383
|
+
BentoCheckbox: j,
|
|
384
|
+
BentoTypography: F,
|
|
385
|
+
BentoListboxOption: U,
|
|
386
|
+
ChevronDownIcon: ye,
|
|
387
|
+
ChevronUpIcon: Ee
|
|
330
388
|
},
|
|
331
389
|
props: {
|
|
332
390
|
/**
|
|
@@ -363,57 +421,57 @@ const Me = {
|
|
|
363
421
|
default: () => []
|
|
364
422
|
}
|
|
365
423
|
},
|
|
366
|
-
emits: [
|
|
424
|
+
emits: [G.SELECT_CATEGORY, G.UNSELECT_CATEGORY],
|
|
367
425
|
setup(t, { emit: e }) {
|
|
368
|
-
const l =
|
|
369
|
-
() => t.category.items.every((
|
|
370
|
-
),
|
|
371
|
-
[`b-listbox-multi-select-category--${
|
|
372
|
-
})),
|
|
373
|
-
|
|
374
|
-
},
|
|
375
|
-
var
|
|
376
|
-
const
|
|
377
|
-
return { isDisabled:
|
|
378
|
-
},
|
|
379
|
-
() => t.category.items.filter((
|
|
380
|
-
const { isDisabled:
|
|
381
|
-
return
|
|
426
|
+
const l = h(!1), { t: s } = K(), n = (d) => t.isOptionDisabled ? t.isOptionDisabled(d) : !1, o = r(
|
|
427
|
+
() => t.category.items.every((d) => n(d))
|
|
428
|
+
), _ = r(() => ({
|
|
429
|
+
[`b-listbox-multi-select-category--${le.DISABLED}`]: o.value
|
|
430
|
+
})), c = (d) => {
|
|
431
|
+
d.preventDefault(), l.value = !l.value;
|
|
432
|
+
}, v = (d) => {
|
|
433
|
+
var x;
|
|
434
|
+
const y = n(d), g = ((x = t.selectedItemsList) == null ? void 0 : x.includes(d.value)) || !1;
|
|
435
|
+
return { isDisabled: y, isPreSelected: g };
|
|
436
|
+
}, b = r(
|
|
437
|
+
() => t.category.items.filter((d) => {
|
|
438
|
+
const { isDisabled: y, isPreSelected: g } = v(d);
|
|
439
|
+
return y && g || !y;
|
|
382
440
|
})
|
|
383
|
-
),
|
|
441
|
+
), S = r(
|
|
384
442
|
() => {
|
|
385
|
-
var
|
|
386
|
-
return (
|
|
387
|
-
({ value:
|
|
388
|
-
var
|
|
389
|
-
return (
|
|
443
|
+
var d;
|
|
444
|
+
return (d = b.value) == null ? void 0 : d.filter(
|
|
445
|
+
({ value: y }) => {
|
|
446
|
+
var g;
|
|
447
|
+
return (g = t.selectedItemsList) == null ? void 0 : g.includes(y);
|
|
390
448
|
}
|
|
391
449
|
);
|
|
392
450
|
}
|
|
393
|
-
),
|
|
394
|
-
const
|
|
395
|
-
return s(
|
|
396
|
-
}),
|
|
397
|
-
e(
|
|
398
|
-
},
|
|
399
|
-
e(
|
|
400
|
-
}, { isAllSelected:
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
451
|
+
), L = r(() => {
|
|
452
|
+
const d = l.value ? "categoryOpened" : "categoryClosed";
|
|
453
|
+
return s(d, { category: t.category.label });
|
|
454
|
+
}), p = () => {
|
|
455
|
+
e(G.SELECT_CATEGORY);
|
|
456
|
+
}, f = () => {
|
|
457
|
+
e(G.UNSELECT_CATEGORY);
|
|
458
|
+
}, { isAllSelected: T, isIndeterminate: I, toggleSelectAll: A } = ee(
|
|
459
|
+
S,
|
|
460
|
+
b,
|
|
461
|
+
p,
|
|
462
|
+
f
|
|
405
463
|
);
|
|
406
464
|
return {
|
|
407
465
|
// Values
|
|
408
|
-
chevronTitle:
|
|
409
|
-
conditionalClass:
|
|
410
|
-
hasAllPropsDisabled:
|
|
466
|
+
chevronTitle: L,
|
|
467
|
+
conditionalClass: _,
|
|
468
|
+
hasAllPropsDisabled: o,
|
|
411
469
|
isOpen: l,
|
|
412
|
-
isAllSelected:
|
|
413
|
-
isIndeterminate:
|
|
470
|
+
isAllSelected: T,
|
|
471
|
+
isIndeterminate: I,
|
|
414
472
|
// Methods
|
|
415
|
-
toggleOpen:
|
|
416
|
-
toggleSelectAll:
|
|
473
|
+
toggleOpen: c,
|
|
474
|
+
toggleSelectAll: A
|
|
417
475
|
};
|
|
418
476
|
}
|
|
419
477
|
});
|
|
@@ -422,25 +480,25 @@ var Ge = function() {
|
|
|
422
480
|
return e._self._setupProxy, l("div", [l("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass }, [l("bento-checkbox", { attrs: { "model-value": e.isAllSelected, indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, "aria-label": e.category.label, value: e.category.value }, on: { "update:model-value": e.toggleSelectAll } }), l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { el: "span" } }, [e._v(" " + e._s(e.category.label) + " ")]), l("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "data-testid": "toggle-listbox" }, on: { "!click": function(s) {
|
|
423
481
|
return e.toggleOpen.apply(null, arguments);
|
|
424
482
|
} } }, [e.isOpen ? l("chevron-up-icon", { attrs: { "svg-title": e.chevronTitle } }) : l("chevron-down-icon", { attrs: { "svg-title": e.chevronTitle } })], 1)], 1)], 1), l("div", { directives: [{ name: "show", rawName: "v-show", value: e.isOpen, expression: "isOpen" }] }, [e._t("default")], 2)], 1);
|
|
425
|
-
},
|
|
426
|
-
|
|
483
|
+
}, Fe = [], Ue = /* @__PURE__ */ N(
|
|
484
|
+
we,
|
|
427
485
|
Ge,
|
|
428
|
-
|
|
486
|
+
Fe,
|
|
429
487
|
!1,
|
|
430
488
|
null,
|
|
431
489
|
"360ce3ac",
|
|
432
490
|
null,
|
|
433
491
|
null
|
|
434
492
|
);
|
|
435
|
-
const
|
|
436
|
-
var
|
|
437
|
-
const
|
|
493
|
+
const Ye = Ue.exports;
|
|
494
|
+
var k = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", t.UNSELECT_CATEGORY = "unselect-category", t))(k || {});
|
|
495
|
+
const Ve = D({
|
|
438
496
|
name: "listbox-multi-select-options",
|
|
439
497
|
components: {
|
|
440
|
-
BentoCheckbox:
|
|
441
|
-
BentoListboxOption:
|
|
442
|
-
BentoTypography:
|
|
443
|
-
ListboxMultiSelectCategory:
|
|
498
|
+
BentoCheckbox: j,
|
|
499
|
+
BentoListboxOption: U,
|
|
500
|
+
BentoTypography: F,
|
|
501
|
+
ListboxMultiSelectCategory: Ye
|
|
444
502
|
},
|
|
445
503
|
props: {
|
|
446
504
|
/**
|
|
@@ -494,20 +552,20 @@ const He = k({
|
|
|
494
552
|
}
|
|
495
553
|
},
|
|
496
554
|
emits: [
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
555
|
+
k.TOGGLE_CHECKBOX_SELECTION,
|
|
556
|
+
k.SELECT_CATEGORY,
|
|
557
|
+
k.UNSELECT_CATEGORY
|
|
500
558
|
],
|
|
501
559
|
setup(t, { emit: e }) {
|
|
502
|
-
const l = (
|
|
503
|
-
e(
|
|
504
|
-
}, s = (
|
|
505
|
-
const
|
|
506
|
-
return
|
|
507
|
-
},
|
|
508
|
-
if (s(
|
|
509
|
-
return e(
|
|
510
|
-
l(
|
|
560
|
+
const l = (v) => {
|
|
561
|
+
e(k.TOGGLE_CHECKBOX_SELECTION, v);
|
|
562
|
+
}, s = (v) => !!v.items, n = (v) => {
|
|
563
|
+
const b = t.isMultiLevel && t.searching;
|
|
564
|
+
return v.description && (!t.isMultiLevel || b);
|
|
565
|
+
}, o = (v) => v.items ? !!v.items.find((b) => t.selectedItemsList.includes(b.value)) : t.selectedItemsList.includes(v.value), _ = (v, b) => {
|
|
566
|
+
if (s(b))
|
|
567
|
+
return e(v ? k.SELECT_CATEGORY : k.UNSELECT_CATEGORY, b);
|
|
568
|
+
l(b.value);
|
|
511
569
|
};
|
|
512
570
|
return {
|
|
513
571
|
// Values
|
|
@@ -516,17 +574,17 @@ const He = k({
|
|
|
516
574
|
})),
|
|
517
575
|
// Methods
|
|
518
576
|
isCategory: s,
|
|
519
|
-
isOptionSelected:
|
|
577
|
+
isOptionSelected: o,
|
|
520
578
|
shouldShowDescription: n,
|
|
521
579
|
toggleCheckboxSelection: l,
|
|
522
|
-
selectSearch:
|
|
580
|
+
selectSearch: _,
|
|
523
581
|
// Enums
|
|
524
|
-
BentoListboxEvent:
|
|
525
|
-
ListboxMultiSelectOptionsEvent:
|
|
582
|
+
BentoListboxEvent: i,
|
|
583
|
+
ListboxMultiSelectOptionsEvent: k
|
|
526
584
|
};
|
|
527
585
|
}
|
|
528
586
|
});
|
|
529
|
-
var
|
|
587
|
+
var ze = function() {
|
|
530
588
|
var e = this, l = e._self._c;
|
|
531
589
|
return e._self._setupProxy, l("div", e._l(e.items, function(s) {
|
|
532
590
|
return l("div", { key: `selected-${s.value}` }, [e.searching && e.isMultiLevel ? [l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null } }, [l("bento-checkbox", { attrs: { "model-value": e.isOptionSelected(s), "aria-label": s.label, disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null, value: s.value }, on: { "update:model-value": (n) => e.selectSearch(n, s) } }), e._t("default", function() {
|
|
@@ -541,9 +599,9 @@ var Ke = function() {
|
|
|
541
599
|
return [l("span", { staticClass: "b-listbox-multi-select__option-text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(s.label))]), e.shouldShowDescription(s) ? l("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(s.description) + " ")]) : e._e()], 1)];
|
|
542
600
|
}, null, s)], 2)]], 2);
|
|
543
601
|
}), 0);
|
|
544
|
-
}, We = [],
|
|
545
|
-
|
|
546
|
-
|
|
602
|
+
}, We = [], Ke = /* @__PURE__ */ N(
|
|
603
|
+
Ve,
|
|
604
|
+
ze,
|
|
547
605
|
We,
|
|
548
606
|
!1,
|
|
549
607
|
null,
|
|
@@ -551,22 +609,22 @@ var Ke = function() {
|
|
|
551
609
|
null,
|
|
552
610
|
null
|
|
553
611
|
);
|
|
554
|
-
const
|
|
612
|
+
const qe = Ke.exports, je = {
|
|
555
613
|
"en-US": {
|
|
556
614
|
allSelected: "All selected ({total})",
|
|
557
615
|
numberOfTotalSelected: "{number} of {total} selected",
|
|
558
616
|
selectAll: "Select all ({total})"
|
|
559
617
|
}
|
|
560
|
-
},
|
|
618
|
+
}, He = D({
|
|
561
619
|
i18n: { messages: je },
|
|
562
620
|
name: "bento-listbox-multi-select",
|
|
563
621
|
components: {
|
|
564
|
-
BentoCheckbox:
|
|
565
|
-
BentoListboxOption:
|
|
566
|
-
BentoTypography:
|
|
567
|
-
ListboxMultiSelectOptions:
|
|
622
|
+
BentoCheckbox: j,
|
|
623
|
+
BentoListboxOption: U,
|
|
624
|
+
BentoTypography: F,
|
|
625
|
+
ListboxMultiSelectOptions: qe
|
|
568
626
|
},
|
|
569
|
-
directives: { BentoKeyboardNavigationDirective:
|
|
627
|
+
directives: { BentoKeyboardNavigationDirective: q },
|
|
570
628
|
props: {
|
|
571
629
|
/**
|
|
572
630
|
* Function that allows the options to be disabled
|
|
@@ -608,145 +666,145 @@ const ze = qe.exports, je = {
|
|
|
608
666
|
default: () => []
|
|
609
667
|
}
|
|
610
668
|
},
|
|
611
|
-
emits: [
|
|
669
|
+
emits: [i.SELECT],
|
|
612
670
|
setup(t, { emit: e, slots: l }) {
|
|
613
|
-
const { t: s } =
|
|
614
|
-
|
|
671
|
+
const { t: s } = K(), n = h(null), o = h(null), _ = h(null), c = h();
|
|
672
|
+
Q(
|
|
615
673
|
() => t.selectedValues,
|
|
616
674
|
() => {
|
|
617
|
-
|
|
675
|
+
c.value = [...t.selectedValues ?? []];
|
|
618
676
|
},
|
|
619
677
|
{
|
|
620
678
|
immediate: !0
|
|
621
679
|
}
|
|
622
680
|
);
|
|
623
|
-
const
|
|
624
|
-
var
|
|
625
|
-
const
|
|
626
|
-
return { isDisabled:
|
|
627
|
-
},
|
|
628
|
-
() => t.searching &&
|
|
629
|
-
const { isDisabled:
|
|
630
|
-
return
|
|
681
|
+
const v = r(() => !!t.items.find(({ items: a }) => !!a)), b = r(() => v.value ? t.items.reduce((a, u) => (u.items ? a.push(...u.items.flat()) : a.push(u), a), []) : t.items), S = (a) => {
|
|
682
|
+
var m;
|
|
683
|
+
const u = t.isOptionDisabled(a), E = ((m = c.value) == null ? void 0 : m.includes(a.value)) || !1;
|
|
684
|
+
return { isDisabled: u, isPreSelected: E };
|
|
685
|
+
}, L = r(
|
|
686
|
+
() => t.searching && v ? t.items : b.value.filter((a) => {
|
|
687
|
+
const { isDisabled: u, isPreSelected: E } = S(a);
|
|
688
|
+
return u && E || !u;
|
|
631
689
|
})
|
|
632
|
-
),
|
|
690
|
+
), p = r(
|
|
633
691
|
() => {
|
|
634
|
-
var
|
|
635
|
-
return (
|
|
636
|
-
var
|
|
637
|
-
return
|
|
638
|
-
(
|
|
639
|
-
|
|
692
|
+
var a;
|
|
693
|
+
return (a = L.value) == null ? void 0 : a.filter((u) => {
|
|
694
|
+
var E;
|
|
695
|
+
return u.items && v.value && t.searching ? u.items.filter(
|
|
696
|
+
(R) => (t.selectedValues ?? []).includes(
|
|
697
|
+
R.value
|
|
640
698
|
)
|
|
641
|
-
).length ===
|
|
699
|
+
).length === u.items.length : (E = c.value) == null ? void 0 : E.includes(u.value);
|
|
642
700
|
});
|
|
643
701
|
}
|
|
644
|
-
),
|
|
645
|
-
var
|
|
646
|
-
const
|
|
647
|
-
return
|
|
648
|
-
}),
|
|
649
|
-
const
|
|
650
|
-
const { isDisabled:
|
|
651
|
-
return
|
|
652
|
-
},
|
|
653
|
-
|
|
654
|
-
},
|
|
655
|
-
const
|
|
656
|
-
const { isDisabled:
|
|
657
|
-
return !(
|
|
658
|
-
},
|
|
659
|
-
|
|
660
|
-
},
|
|
661
|
-
|
|
662
|
-
},
|
|
663
|
-
|
|
664
|
-
}, { isAllSelected:
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
),
|
|
670
|
-
|
|
671
|
-
},
|
|
672
|
-
|
|
673
|
-
},
|
|
674
|
-
let
|
|
675
|
-
|
|
676
|
-
},
|
|
677
|
-
const
|
|
678
|
-
return t.items.filter((
|
|
679
|
-
}),
|
|
680
|
-
var
|
|
681
|
-
return ((
|
|
682
|
-
}),
|
|
702
|
+
), f = () => v.value && !t.searching ? L.value.length : t.items.length, T = r(() => {
|
|
703
|
+
var E;
|
|
704
|
+
const a = f(), u = ((E = p.value) == null ? void 0 : E.length) || 0;
|
|
705
|
+
return u === 0 ? s("selectAll", { total: a }) : u === a ? s("allSelected", { total: a }) : s("numberOfTotalSelected", { number: u, total: a });
|
|
706
|
+
}), I = (a) => {
|
|
707
|
+
const u = (m) => {
|
|
708
|
+
const { isDisabled: R, isPreSelected: W } = S(m);
|
|
709
|
+
return R && W || !R;
|
|
710
|
+
}, E = a.filter(u).filter((m) => !c.value.includes(m.value)).map(({ value: m }) => m);
|
|
711
|
+
c.value = [...c.value, ...E], e(i.SELECT, c.value);
|
|
712
|
+
}, A = (a) => {
|
|
713
|
+
const u = (m) => {
|
|
714
|
+
const { isDisabled: R, isPreSelected: W } = S(m);
|
|
715
|
+
return !(R && W);
|
|
716
|
+
}, E = a.filter(u).map(({ value: m }) => m);
|
|
717
|
+
c.value = c.value.filter((m) => !(E != null && E.includes(m))), e(i.SELECT, c.value);
|
|
718
|
+
}, d = () => {
|
|
719
|
+
I(b.value);
|
|
720
|
+
}, y = () => {
|
|
721
|
+
A(b.value);
|
|
722
|
+
}, { isAllSelected: g, isIndeterminate: x, toggleSelectAll: C } = ee(
|
|
723
|
+
p,
|
|
724
|
+
L,
|
|
725
|
+
d,
|
|
726
|
+
y
|
|
727
|
+
), M = (a) => {
|
|
728
|
+
I(a.items);
|
|
729
|
+
}, Y = (a) => {
|
|
730
|
+
A(a.items);
|
|
731
|
+
}, V = (a, u) => {
|
|
732
|
+
let E = !1;
|
|
733
|
+
c.value = c.value.filter((m) => u === m ? (E = !0, !1) : !0), E || c.value.push(u), e(a, c.value);
|
|
734
|
+
}, $ = r(() => {
|
|
735
|
+
const a = (m) => c.value.includes(m.value), u = (m) => !!m.find((R) => a(R));
|
|
736
|
+
return t.items.filter((m) => m.items && u(m.items) ? !0 : a(m));
|
|
737
|
+
}), z = r(() => {
|
|
738
|
+
var a;
|
|
739
|
+
return ((a = $.value) == null ? void 0 : a.length) > 0;
|
|
740
|
+
}), O = r(
|
|
683
741
|
() => {
|
|
684
|
-
var
|
|
685
|
-
return ((
|
|
742
|
+
var a, u;
|
|
743
|
+
return ((a = p.value) == null ? void 0 : a.length) === ((u = b.value) == null ? void 0 : u.length);
|
|
686
744
|
}
|
|
687
|
-
),
|
|
745
|
+
), w = r(
|
|
688
746
|
() => n.value ? [n.value] : []
|
|
689
|
-
),
|
|
747
|
+
), se = r(
|
|
690
748
|
() => {
|
|
691
|
-
var
|
|
692
|
-
return (
|
|
749
|
+
var a, u;
|
|
750
|
+
return (u = (a = o.value) == null ? void 0 : a.$children) != null && u.length ? o.value.$children : [];
|
|
693
751
|
}
|
|
694
|
-
),
|
|
752
|
+
), ne = r(
|
|
695
753
|
() => {
|
|
696
|
-
var
|
|
697
|
-
return (
|
|
754
|
+
var a, u;
|
|
755
|
+
return (u = (a = _.value) == null ? void 0 : a.$children) != null && u.length ? _.value.$children : [];
|
|
698
756
|
}
|
|
699
|
-
),
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
...
|
|
703
|
-
]),
|
|
757
|
+
), oe = r(() => ({ label: T, value: g })), ie = r(() => [
|
|
758
|
+
oe,
|
|
759
|
+
...$.value,
|
|
760
|
+
...b.value
|
|
761
|
+
]), ae = (a) => {
|
|
704
762
|
[
|
|
705
|
-
...
|
|
706
|
-
...
|
|
707
|
-
...
|
|
708
|
-
][
|
|
709
|
-
}, { moveToNextElement:
|
|
763
|
+
...w.value,
|
|
764
|
+
...se.value,
|
|
765
|
+
...ne.value
|
|
766
|
+
][a].$el.focus();
|
|
767
|
+
}, { moveToNextElement: ce, moveToPreviousElement: re, moveToFirstElement: ue, moveToLastElement: de } = te(
|
|
710
768
|
{
|
|
711
|
-
items:
|
|
769
|
+
items: h(ie),
|
|
712
770
|
isOptionDisabled: t.isOptionDisabled
|
|
713
771
|
},
|
|
714
|
-
|
|
715
|
-
),
|
|
716
|
-
[
|
|
717
|
-
[
|
|
718
|
-
[
|
|
719
|
-
[
|
|
772
|
+
ae
|
|
773
|
+
), be = {
|
|
774
|
+
[B.ARROW_UP]: re,
|
|
775
|
+
[B.ARROW_DOWN]: ce,
|
|
776
|
+
[B.HOME]: ue,
|
|
777
|
+
[B.END]: de
|
|
720
778
|
};
|
|
721
779
|
return {
|
|
722
780
|
// Refs
|
|
723
781
|
selectAllListboxItemsRef: n,
|
|
724
|
-
selectedListboxItemsRef:
|
|
725
|
-
listboxItemsRef:
|
|
782
|
+
selectedListboxItemsRef: o,
|
|
783
|
+
listboxItemsRef: _,
|
|
726
784
|
// Values
|
|
727
|
-
isAllSelected:
|
|
728
|
-
isAllItemsIncludingDisabled:
|
|
729
|
-
isAnOptionSelected:
|
|
730
|
-
isIndeterminate:
|
|
731
|
-
isMultiLevelSelect:
|
|
732
|
-
flattenedItemsList:
|
|
733
|
-
selectedItemsList:
|
|
734
|
-
selectAllCheckboxText:
|
|
735
|
-
selectedOptions:
|
|
785
|
+
isAllSelected: g,
|
|
786
|
+
isAllItemsIncludingDisabled: O,
|
|
787
|
+
isAnOptionSelected: z,
|
|
788
|
+
isIndeterminate: x,
|
|
789
|
+
isMultiLevelSelect: v,
|
|
790
|
+
flattenedItemsList: b,
|
|
791
|
+
selectedItemsList: c,
|
|
792
|
+
selectAllCheckboxText: T,
|
|
793
|
+
selectedOptions: $,
|
|
736
794
|
slots: l,
|
|
737
795
|
// Enums
|
|
738
|
-
BentoListboxEvent:
|
|
796
|
+
BentoListboxEvent: i,
|
|
739
797
|
// Methods
|
|
740
|
-
selectAllCategory:
|
|
741
|
-
toggleCheckboxSelection:
|
|
742
|
-
toggleSelectAll:
|
|
743
|
-
unselectAllCategory:
|
|
798
|
+
selectAllCategory: M,
|
|
799
|
+
toggleCheckboxSelection: V,
|
|
800
|
+
toggleSelectAll: C,
|
|
801
|
+
unselectAllCategory: Y,
|
|
744
802
|
// Events
|
|
745
|
-
listboxListeners:
|
|
803
|
+
listboxListeners: be
|
|
746
804
|
};
|
|
747
805
|
}
|
|
748
806
|
});
|
|
749
|
-
var
|
|
807
|
+
var Xe = function() {
|
|
750
808
|
var e = this, l = e._self._c;
|
|
751
809
|
return e._self._setupProxy, l("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox-multi-select" }, e.listboxListeners), [l("bento-listbox-option", { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option" }, [l("bento-checkbox", { attrs: { "aria-label": e.selectAllCheckboxText, "model-value": e.isAllSelected, indeterminate: e.isIndeterminate }, on: { "update:model-value": e.toggleSelectAll } }), l("bento-typography", { attrs: { el: "span" } }, [e._v(" " + e._s(e.selectAllCheckboxText) + " ")])], 1), e.isAnOptionSelected ? l("div", [l("hr", { staticClass: "b-listbox-multi-select__divider" }), l("listbox-multi-select-options", { ref: "selectedListboxItemsRef", attrs: { items: e.selectedOptions, "is-option-disabled": e.isOptionDisabled, "is-multi-level": e.isMultiLevelSelect, searching: e.searching, "selected-items-list": e.selectedItemsList }, on: e._d({ "select-category": e.selectAllCategory, "unselect-category": e.unselectAllCategory, "toggle-checkbox-selection": function(s) {
|
|
752
810
|
return e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, s);
|
|
@@ -757,8 +815,8 @@ var Ze = function() {
|
|
|
757
815
|
}, e.BentoListboxEvent.ENTER, function(s) {
|
|
758
816
|
return e.toggleCheckboxSelection(e.BentoListboxEvent.ENTER, s);
|
|
759
817
|
}]), scopedSlots: e._u([e._l(e.slots, function(s, n) {
|
|
760
|
-
return { key: n, fn: function(
|
|
761
|
-
return [e._t(n, null, null,
|
|
818
|
+
return { key: n, fn: function(o) {
|
|
819
|
+
return [e._t(n, null, null, o)];
|
|
762
820
|
} };
|
|
763
821
|
})], null, !0) })], 1) : e._e(), l("div", { directives: [{ name: "show", rawName: "v-show", value: !e.isAllItemsIncludingDisabled, expression: "!isAllItemsIncludingDisabled" }] }, [l("hr", { staticClass: "b-listbox-multi-select__divider" }), l("listbox-multi-select-options", { ref: "listboxItemsRef", attrs: { items: e.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": e.isMultiLevelSelect, searching: e.searching, "selected-items-list": e.selectedItemsList }, on: e._d({ "toggle-checkbox-selection": function(s) {
|
|
764
822
|
return e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, s);
|
|
@@ -769,13 +827,13 @@ var Ze = function() {
|
|
|
769
827
|
}, e.BentoListboxEvent.ENTER, function(s) {
|
|
770
828
|
return e.toggleCheckboxSelection(e.BentoListboxEvent.ENTER, s);
|
|
771
829
|
}]), scopedSlots: e._u([e._l(e.slots, function(s, n) {
|
|
772
|
-
return { key: n, fn: function(
|
|
773
|
-
return [e._t(n, null, null,
|
|
830
|
+
return { key: n, fn: function(o) {
|
|
831
|
+
return [e._t(n, null, null, o)];
|
|
774
832
|
} };
|
|
775
833
|
})], null, !0) })], 1)], 1);
|
|
776
|
-
}, Je = [], Qe = /* @__PURE__ */
|
|
834
|
+
}, Je = [], Qe = /* @__PURE__ */ N(
|
|
835
|
+
He,
|
|
777
836
|
Xe,
|
|
778
|
-
Ze,
|
|
779
837
|
Je,
|
|
780
838
|
!1,
|
|
781
839
|
null,
|
|
@@ -783,27 +841,35 @@ var Ze = function() {
|
|
|
783
841
|
null,
|
|
784
842
|
null
|
|
785
843
|
);
|
|
786
|
-
const
|
|
844
|
+
const X = Qe.exports, Ze = {
|
|
787
845
|
"en-US": {
|
|
788
846
|
showMore: "Show more",
|
|
789
847
|
loading: "Loading"
|
|
790
848
|
}
|
|
791
|
-
}, tt =
|
|
849
|
+
}, et = 36, tt = D({
|
|
792
850
|
name: "bento-listbox",
|
|
793
851
|
components: {
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
852
|
+
BentoEmptyState: me,
|
|
853
|
+
BentoListboxSingleSelect: Me,
|
|
854
|
+
BentoListboxMultiSelect: X,
|
|
855
|
+
BentoTypography: F,
|
|
856
|
+
BentoLoadingIndicator: _e,
|
|
857
|
+
BentoLoadingButton: Se
|
|
799
858
|
},
|
|
800
|
-
directives: { BentoKeyboardNavigationDirective:
|
|
801
|
-
i18n: { messages:
|
|
859
|
+
directives: { BentoKeyboardNavigationDirective: q },
|
|
860
|
+
i18n: { messages: Ze },
|
|
802
861
|
props: {
|
|
803
862
|
/**
|
|
804
863
|
* Defines a string value that labels an interactive element.
|
|
805
864
|
*/
|
|
806
865
|
ariaLabel: { type: String, default: null },
|
|
866
|
+
/**
|
|
867
|
+
* Empty state props that will be used with the inner empty state component to be displayed when no search results are found.
|
|
868
|
+
*/
|
|
869
|
+
emptyState: {
|
|
870
|
+
type: Object,
|
|
871
|
+
default: void 0
|
|
872
|
+
},
|
|
807
873
|
/**
|
|
808
874
|
* Indicates whether there are more items to load
|
|
809
875
|
*/
|
|
@@ -847,8 +913,8 @@ const H = Qe.exports, et = {
|
|
|
847
913
|
*/
|
|
848
914
|
lazyLoadType: {
|
|
849
915
|
type: String,
|
|
850
|
-
default:
|
|
851
|
-
validator: (t) => Object.values(
|
|
916
|
+
default: P.NONE,
|
|
917
|
+
validator: (t) => Object.values(P).includes(t)
|
|
852
918
|
},
|
|
853
919
|
/**
|
|
854
920
|
* If enabled, the user will be able to select multiple items.
|
|
@@ -864,7 +930,7 @@ const H = Qe.exports, et = {
|
|
|
864
930
|
*
|
|
865
931
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
866
932
|
*/
|
|
867
|
-
searching:
|
|
933
|
+
searching: X.props.searching,
|
|
868
934
|
/**
|
|
869
935
|
* The `input` value.
|
|
870
936
|
* Providing an empty string or empty array will select no options.
|
|
@@ -873,97 +939,125 @@ const H = Qe.exports, et = {
|
|
|
873
939
|
selectedValue: {
|
|
874
940
|
type: [String, Number, Array],
|
|
875
941
|
default: void 0
|
|
942
|
+
},
|
|
943
|
+
/**
|
|
944
|
+
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
945
|
+
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
946
|
+
*/
|
|
947
|
+
virtualScroll: {
|
|
948
|
+
type: [Boolean, Object],
|
|
949
|
+
default: !1
|
|
876
950
|
}
|
|
877
951
|
},
|
|
878
952
|
emits: [
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
953
|
+
i.SELECT,
|
|
954
|
+
i.SPACE,
|
|
955
|
+
i.SHOW_MORE,
|
|
956
|
+
i.ENTER,
|
|
957
|
+
i.ESCAPE,
|
|
958
|
+
i.TAB
|
|
885
959
|
],
|
|
886
960
|
setup(t, { emit: e, slots: l }) {
|
|
887
|
-
const
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
t.
|
|
900
|
-
}), O = r(() => {
|
|
901
|
-
var p;
|
|
902
|
-
return t.searching && ((p = t.items) == null ? void 0 : p.length) === 0;
|
|
961
|
+
const s = h([]), n = Z(t, "items"), { t: o } = K(), _ = r(() => t.lazyLoadType !== P.AUTOMATIC), c = r(() => t.lazyLoadType === P.AUTOMATIC), v = () => {
|
|
962
|
+
var O;
|
|
963
|
+
return typeof (t == null ? void 0 : t.virtualScroll) == "object" && ((O = t == null ? void 0 : t.virtualScroll) != null && O.itemHeight) ? t.virtualScroll.itemHeight : et;
|
|
964
|
+
}, {
|
|
965
|
+
containerRef: b,
|
|
966
|
+
containerProps: S,
|
|
967
|
+
onScroll: L,
|
|
968
|
+
list: p,
|
|
969
|
+
wrapperProps: f
|
|
970
|
+
} = pe(n, {
|
|
971
|
+
itemHeight: v(),
|
|
972
|
+
// Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
|
|
973
|
+
disabled: (t == null ? void 0 : t.multiple) || (t == null ? void 0 : t.virtualScroll) === !1 || (t == null ? void 0 : t.lazyLoadType) !== "none"
|
|
903
974
|
}), T = r(
|
|
904
|
-
() =>
|
|
905
|
-
),
|
|
906
|
-
() => t.loading ?
|
|
907
|
-
),
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
975
|
+
() => _.value ? "true" : void 0
|
|
976
|
+
), I = r(
|
|
977
|
+
() => _.value && t.loading ? "true" : "false"
|
|
978
|
+
), A = r(
|
|
979
|
+
() => _.value ? "polite" : void 0
|
|
980
|
+
), d = (O) => (w) => {
|
|
981
|
+
e(O, w);
|
|
982
|
+
}, y = () => {
|
|
983
|
+
e(i.SHOW_MORE);
|
|
984
|
+
}, g = fe(() => {
|
|
985
|
+
const O = b.value, w = O.scrollTop + O.clientHeight >= O.scrollHeight;
|
|
986
|
+
t.hasMoreItems && w && !t.loading && y();
|
|
987
|
+
}), x = () => {
|
|
988
|
+
c.value ? g() : L();
|
|
989
|
+
}, C = r(() => {
|
|
990
|
+
var O;
|
|
991
|
+
return t.searching && ((O = t.items) == null ? void 0 : O.length) === 0;
|
|
992
|
+
}), M = r(
|
|
993
|
+
() => t.lazyLoadType === P.BUTTON && t.hasMoreItems
|
|
994
|
+
), Y = r(
|
|
995
|
+
() => t.loading ? H.LOADING : H.START
|
|
996
|
+
), V = r(() => t.loading ? o("loading") : o("showMore")), $ = r(() => ({
|
|
997
|
+
...t.emptyState,
|
|
998
|
+
variant: "condensed"
|
|
999
|
+
})), z = {
|
|
1000
|
+
[i.SELECT]: d(i.SELECT),
|
|
1001
|
+
[i.SPACE]: d(i.SPACE),
|
|
1002
|
+
[i.TAB]: d(i.TAB),
|
|
1003
|
+
[i.ENTER]: d(i.ENTER)
|
|
912
1004
|
};
|
|
913
1005
|
return {
|
|
914
1006
|
// Refs
|
|
915
|
-
listboxRef:
|
|
916
|
-
listboxItemRef:
|
|
1007
|
+
listboxRef: b,
|
|
1008
|
+
listboxItemRef: s,
|
|
917
1009
|
// a11y
|
|
918
|
-
ariaAtomic:
|
|
919
|
-
ariaBusy:
|
|
920
|
-
ariaLive:
|
|
1010
|
+
ariaAtomic: T,
|
|
1011
|
+
ariaBusy: I,
|
|
1012
|
+
ariaLive: A,
|
|
921
1013
|
// Values
|
|
922
|
-
|
|
923
|
-
isSearchResultEmpty:
|
|
924
|
-
|
|
1014
|
+
containerProps: S,
|
|
1015
|
+
isSearchResultEmpty: C,
|
|
1016
|
+
limitedEmptyStateProps: $,
|
|
1017
|
+
loadingButtonState: Y,
|
|
925
1018
|
slots: l,
|
|
926
|
-
shouldDisplayShowMoreButton:
|
|
927
|
-
showMoreButtonText:
|
|
1019
|
+
shouldDisplayShowMoreButton: M,
|
|
1020
|
+
showMoreButtonText: V,
|
|
1021
|
+
virtualisedItems: p,
|
|
1022
|
+
wrapperProps: f,
|
|
928
1023
|
// Enums
|
|
929
|
-
BentoKeyboardNavigationKeyDownEvent:
|
|
930
|
-
BentoListboxEvent:
|
|
1024
|
+
BentoKeyboardNavigationKeyDownEvent: B,
|
|
1025
|
+
BentoListboxEvent: i,
|
|
931
1026
|
// Methods
|
|
932
|
-
|
|
933
|
-
|
|
1027
|
+
onListboxContainerScroll: x,
|
|
1028
|
+
onOptionSelected: d,
|
|
934
1029
|
emitShowMore: y,
|
|
935
|
-
listboxListeners:
|
|
1030
|
+
listboxListeners: z
|
|
936
1031
|
};
|
|
937
1032
|
}
|
|
938
1033
|
});
|
|
939
|
-
var
|
|
1034
|
+
var lt = function() {
|
|
940
1035
|
var e = this, l = e._self._c;
|
|
941
|
-
return e._self._setupProxy, l("div", { directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }],
|
|
942
|
-
return { key: n, fn: function(
|
|
943
|
-
return [e._t(n, null, null,
|
|
1036
|
+
return e._self._setupProxy, l("div", e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox", attrs: { id: e.id, role: "listbox", tabindex: "-1", "aria-busy": e.ariaBusy, "aria-atomic": e.ariaAtomic, "aria-label": e.ariaLabel, "aria-live": e.ariaLive }, on: { scroll: e.onListboxContainerScroll } }, "div", e.containerProps, !1), [l("div", e._b({}, "div", e.wrapperProps, !1), [e.isSearchResultEmpty ? l("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? l("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [l("bento-listbox-multi-select", e._g({ ref: "listboxItemRef", attrs: { items: e.items, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(s, n) {
|
|
1037
|
+
return { key: n, fn: function(o) {
|
|
1038
|
+
return [e._t(n, null, null, o)];
|
|
944
1039
|
} };
|
|
945
|
-
})], null, !0) }, e.listboxListeners))] : [l("bento-listbox-single-select", e._g({ ref: "listboxItemRef", attrs: { items: e.
|
|
946
|
-
return { key: n, fn: function(
|
|
947
|
-
return [e._t(n, null, null,
|
|
1040
|
+
})], null, !0) }, e.listboxListeners))] : [l("bento-listbox-single-select", e._g({ ref: "listboxItemRef", attrs: { items: e.virtualisedItems, "selected-value": e.selectedValue, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(s, n) {
|
|
1041
|
+
return { key: n, fn: function(o) {
|
|
1042
|
+
return [e._t(n, null, null, o)];
|
|
948
1043
|
} };
|
|
949
1044
|
})], null, !0) }, e.listboxListeners))], e.shouldDisplayShowMoreButton ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-button", { attrs: { state: e.loadingButtonState, variant: "secondary" }, on: { "!click": function(s) {
|
|
950
1045
|
return e.emitShowMore.apply(null, arguments);
|
|
951
|
-
} } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-indicator")], 1) : e._e()]], 2);
|
|
952
|
-
},
|
|
1046
|
+
} } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-indicator")], 1) : e._e()]], 2)]);
|
|
1047
|
+
}, st = [], nt = /* @__PURE__ */ N(
|
|
953
1048
|
tt,
|
|
954
|
-
st,
|
|
955
1049
|
lt,
|
|
1050
|
+
st,
|
|
956
1051
|
!1,
|
|
957
1052
|
null,
|
|
958
|
-
"
|
|
1053
|
+
"d5d56fed",
|
|
959
1054
|
null,
|
|
960
1055
|
null
|
|
961
1056
|
);
|
|
962
|
-
const
|
|
1057
|
+
const Et = nt.exports;
|
|
963
1058
|
export {
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
mt as b
|
|
1059
|
+
Et as B,
|
|
1060
|
+
i as a,
|
|
1061
|
+
P as b
|
|
968
1062
|
};
|
|
969
|
-
//# sourceMappingURL=listbox.
|
|
1063
|
+
//# sourceMappingURL=listbox.73c38f38.js.map
|