@adyen/bento-vue2 1.9.0 → 1.10.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/packages/vue2/src/components/button/button.vue.d.ts +19 -3580
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +2 -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 +2 -0
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell-actions/data-grid-cell-actions.types.d.ts +14 -0
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell-actions/data-grid-cell-actions.vue.d.ts +33 -0
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns-types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +20 -4
- package/dist/@types/packages/vue2/src/components/data-grid/components/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateColumnWidth/useCalculateColumnWidth.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useColumnReorderer/useColumnReorderer.d.ts +54 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useConfigSettings/useConfigSettings.d.ts +81 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useSelector.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +5 -2
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +16 -7
- package/dist/@types/packages/vue2/src/components/divider/divider.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/divider/divider.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/useDisplayValue.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +11 -1
- package/dist/@types/packages/vue2/src/components/empty-state/empty-state.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +84 -12
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +8 -0
- package/dist/@types/packages/vue2/src/components/internal/copy/copy.types.d.ts +8 -0
- package/dist/@types/packages/vue2/src/components/internal/copy/copy.vue.d.ts +20 -0
- package/dist/@types/packages/vue2/src/components/internal/copy/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue.d.ts +82 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue.d.ts +10 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/components/listbox-single-select-category/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/components/listbox-single-select-category/listbox-single-select-category.vue.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue.d.ts +10 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/composables/use-multi-level-items/use-multi-level-items.d.ts +6 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +12 -3
- package/dist/@types/packages/vue2/src/components/menu/components/menu-item/menu-item.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/menu/components/menu-item/menu-item.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/menu/components/sub-menu-item-list/sub-menu-item-list.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +251 -3
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +3 -4
- package/dist/@types/packages/vue2/src/components/structured-list/structured-list.types.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/structured-list/structured-list.vue.d.ts +16 -3
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +15 -10
- package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +9 -0
- package/dist/@types/packages/vue2/src/types/elements.d.ts +2 -1
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +5 -5
- package/dist/alert.js +8 -8
- package/dist/alert.js.map +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/copy.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- 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/index38.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 -1
- 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/loading-button.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +20 -18
- package/dist/button.js.map +1 -1
- package/dist/card.js +2 -2
- package/dist/checkbox.js +61 -48
- package/dist/checkbox.js.map +1 -1
- package/dist/chunks/{base-button.df9a9bea.js → base-button.46843461.js} +2 -2
- package/dist/chunks/{base-button.df9a9bea.js.map → base-button.46843461.js.map} +1 -1
- package/dist/chunks/{base-modal.75319f4e.js → base-modal.193ce866.js} +33 -33
- package/dist/chunks/base-modal.193ce866.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.32770485.js → button-actions-with-menu.11988565.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.32770485.js.map → button-actions-with-menu.11988565.js.map} +1 -1
- package/dist/chunks/button.f3f05408.js +100 -0
- package/dist/chunks/button.f3f05408.js.map +1 -0
- package/dist/chunks/{calendar.a885d8fc.js → calendar.7dbac3b8.js} +4 -4
- package/dist/chunks/{calendar.a885d8fc.js.map → calendar.7dbac3b8.js.map} +1 -1
- package/dist/chunks/checkbox.f6f6ce39.js +188 -0
- package/dist/chunks/checkbox.f6f6ce39.js.map +1 -0
- package/dist/chunks/{controls-group.dd967ccf.js → controls-group.24a9efb1.js} +15 -11
- package/dist/chunks/controls-group.24a9efb1.js.map +1 -0
- package/dist/chunks/copy.f4019f8d.js +122 -0
- package/dist/chunks/copy.f4019f8d.js.map +1 -0
- package/dist/chunks/{cross-circle-fill.7c07d16a.js → cross-circle-fill.27580c4b.js} +5 -5
- package/dist/chunks/{cross-circle-fill.7c07d16a.js.map → cross-circle-fill.27580c4b.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.465db4d4.js → dropdown-default-textbox.a1240b9d.js} +11 -11
- package/dist/chunks/dropdown-default-textbox.a1240b9d.js.map +1 -0
- package/dist/chunks/{dropdown.6461dbe3.js → dropdown.f784ac67.js} +258 -221
- package/dist/chunks/dropdown.f784ac67.js.map +1 -0
- package/dist/chunks/{field-label.01df3cba.js → field-label.bdf22f47.js} +5 -5
- package/dist/chunks/{field-label.01df3cba.js.map → field-label.bdf22f47.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.42354ccc.js → fixed-scroller.28158c25.js} +2 -2
- package/dist/chunks/{fixed-scroller.42354ccc.js.map → fixed-scroller.28158c25.js.map} +1 -1
- package/dist/chunks/{footer-actions.2cd9079e.js → footer-actions.08a8323b.js} +3 -3
- package/dist/chunks/{footer-actions.2cd9079e.js.map → footer-actions.08a8323b.js.map} +1 -1
- package/dist/chunks/{index.02da8d63.js → index.1036f656.js} +3 -3
- package/dist/chunks/{index.02da8d63.js.map → index.1036f656.js.map} +1 -1
- package/dist/chunks/{index.322692c8.js → index.158c522b.js} +2 -2
- package/dist/chunks/{index.322692c8.js.map → index.158c522b.js.map} +1 -1
- package/dist/chunks/{index.f358c4bd.js → index.4824eab5.js} +163 -155
- package/dist/chunks/index.4824eab5.js.map +1 -0
- package/dist/chunks/{index.6cef7328.js → index.6c299479.js} +2 -2
- package/dist/chunks/{index.6cef7328.js.map → index.6c299479.js.map} +1 -1
- package/dist/chunks/{index.152b2b16.js → index.7039d901.js} +3 -3
- package/dist/chunks/{index.152b2b16.js.map → index.7039d901.js.map} +1 -1
- package/dist/chunks/{index.b201e81d.js → index.858b0720.js} +2 -2
- package/dist/chunks/{index.b201e81d.js.map → index.858b0720.js.map} +1 -1
- package/dist/chunks/{index.16914bb1.js → index.9051abfc.js} +9 -9
- package/dist/chunks/{index.16914bb1.js.map → index.9051abfc.js.map} +1 -1
- package/dist/chunks/index.9bdf4d78.js +147 -0
- package/dist/chunks/index.9bdf4d78.js.map +1 -0
- package/dist/chunks/{index.d1beb704.js → index.ad4b770b.js} +5 -5
- package/dist/chunks/{index.d1beb704.js.map → index.ad4b770b.js.map} +1 -1
- package/dist/chunks/index.f651209d.js +32 -0
- package/dist/chunks/index.f651209d.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.55cd9c16.js → listbox-option-tag.60c0beca.js} +3 -3
- package/dist/chunks/{listbox-option-tag.55cd9c16.js.map → listbox-option-tag.60c0beca.js.map} +1 -1
- package/dist/chunks/{listbox.a117e6d4.js → listbox.163433c5.js} +475 -392
- package/dist/chunks/listbox.163433c5.js.map +1 -0
- package/dist/chunks/{loading-button.459b9ab4.js → loading-button.7b5d0c22.js} +20 -20
- package/dist/chunks/{loading-button.459b9ab4.js.map → loading-button.7b5d0c22.js.map} +1 -1
- package/dist/chunks/{tooltip.b8929659.js → tooltip.4a1300d5.js} +22 -22
- package/dist/chunks/tooltip.4a1300d5.js.map +1 -0
- package/dist/chunks/use-has-slot.fbeb19ec.js.map +1 -1
- package/dist/code-snippet.js +7 -7
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +858 -668
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +8 -8
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +2 -18
- package/dist/divider.js.map +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +18 -18
- package/dist/empty-state.js.map +1 -1
- package/dist/filter-bar.js +408 -399
- 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 +3 -3
- package/dist/index.js +66 -65
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +4 -4
- package/dist/internal.js +17 -15
- package/dist/link.js +2 -2
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +62 -60
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +4 -4
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +46 -45
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +10 -10
- package/dist/segmented-control.js +3 -3
- package/dist/sidepanel.js +5 -5
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/tabs.js +3 -3
- package/dist/tag.js +3 -3
- package/dist/textarea.js +95 -88
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +198 -191
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +3 -3
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +5 -5
- package/dist/typography.js +1 -1
- package/dist/web-types.json +646 -361
- package/package.json +2 -2
- package/dist/chunks/base-modal.75319f4e.js.map +0 -1
- package/dist/chunks/button.7dd8d4de.js +0 -125
- package/dist/chunks/button.7dd8d4de.js.map +0 -1
- package/dist/chunks/checkbox.65743b08.js +0 -184
- package/dist/chunks/checkbox.65743b08.js.map +0 -1
- package/dist/chunks/controls-group.dd967ccf.js.map +0 -1
- package/dist/chunks/copy.e12b418e.js +0 -103
- package/dist/chunks/copy.e12b418e.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.465db4d4.js.map +0 -1
- package/dist/chunks/dropdown.6461dbe3.js.map +0 -1
- package/dist/chunks/index.0890dc99.js +0 -130
- package/dist/chunks/index.0890dc99.js.map +0 -1
- package/dist/chunks/index.f358c4bd.js.map +0 -1
- package/dist/chunks/listbox.a117e6d4.js.map +0 -1
- package/dist/chunks/tooltip.b8929659.js.map +0 -1
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { B as
|
|
3
|
-
import { g as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { a as s, B as
|
|
8
|
-
import { B as O, a as
|
|
9
|
-
import {
|
|
10
|
-
import { a as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
import { ref as y, watch as Z, computed as u, defineComponent as K, toRefs as Y, nextTick as C, toRef as L } from "vue";
|
|
2
|
+
import { B as ve, d as pe } from "./index.858b0720.js";
|
|
3
|
+
import { g as B } from "./unique-id.a2a2b458.js";
|
|
4
|
+
import { u as me } from "./aria-label.ac9651a5.js";
|
|
5
|
+
import { u as W } from "./i18n.eb5b985b.js";
|
|
6
|
+
import { u as be } from "./use-form-layout-loading.d03e5d48.js";
|
|
7
|
+
import { a as s, B as F, b as k, u as ye } from "./listbox.163433c5.js";
|
|
8
|
+
import { B as O, a as _e } from "./keyboard-navigation.ca47dfa8.js";
|
|
9
|
+
import { u as ge } from "./use-has-slot.fbeb19ec.js";
|
|
10
|
+
import { a as N } from "./index.7039d901.js";
|
|
11
|
+
import { a as q } from "./index.ad4b770b.js";
|
|
12
|
+
import { n as I } from "./_plugin-vue2_normalizer.71e2aa87.js";
|
|
13
|
+
import { D as xe, a as $, b as P, c as he } from "./dropdown-default-textbox.a1240b9d.js";
|
|
14
|
+
import { E as we, F as Se } from "./field-label.bdf22f47.js";
|
|
15
|
+
import { B as Le } from "./directive.0408e565.js";
|
|
15
16
|
import "../assets/dropdown.css";
|
|
16
17
|
var E = /* @__PURE__ */ ((t) => (t.DEFAULT = "DropdownInputDefault", t.SMALL = "DropdownInputSmall", t))(E || {});
|
|
17
|
-
const
|
|
18
|
+
const Oe = {
|
|
18
19
|
"en-US": {
|
|
19
20
|
apply: "Apply",
|
|
20
21
|
cancel: "Cancel",
|
|
21
22
|
noOptionsMatchThisSearch: "No options match this search"
|
|
22
23
|
}
|
|
23
|
-
},
|
|
24
|
-
const l =
|
|
25
|
-
|
|
24
|
+
}, Ce = (t, e, n) => {
|
|
25
|
+
const l = y(t.value), { t: o } = W();
|
|
26
|
+
Z(t, () => {
|
|
26
27
|
l.value = t.value;
|
|
27
28
|
});
|
|
28
|
-
const a =
|
|
29
|
+
const a = u(
|
|
29
30
|
() => JSON.stringify(l.value) === JSON.stringify(t.value)
|
|
30
31
|
), r = () => {
|
|
31
32
|
n(s.SELECT, l.value), n(s.CLOSE_DROPDOWN);
|
|
32
|
-
},
|
|
33
|
+
}, d = () => {
|
|
33
34
|
l.value = t.value, n(s.CLOSE_DROPDOWN);
|
|
34
|
-
}, i =
|
|
35
|
+
}, i = u(() => [
|
|
35
36
|
{
|
|
36
37
|
title: o("apply"),
|
|
37
38
|
event: r,
|
|
@@ -39,26 +40,26 @@ const ge = {
|
|
|
39
40
|
},
|
|
40
41
|
{
|
|
41
42
|
title: o("cancel"),
|
|
42
|
-
event:
|
|
43
|
+
event: d
|
|
43
44
|
}
|
|
44
|
-
]),
|
|
45
|
-
l.value =
|
|
46
|
-
},
|
|
47
|
-
p
|
|
48
|
-
},
|
|
49
|
-
p
|
|
50
|
-
}, x = (
|
|
51
|
-
p
|
|
45
|
+
]), v = (p) => {
|
|
46
|
+
l.value = p, e.value || n(s.SELECT, p);
|
|
47
|
+
}, h = (p) => {
|
|
48
|
+
v(p), n(s.TAB);
|
|
49
|
+
}, _ = (p) => {
|
|
50
|
+
v(p), n(s.ENTER);
|
|
51
|
+
}, x = (p) => {
|
|
52
|
+
v(p), n(s.SPACE);
|
|
52
53
|
}, g = () => {
|
|
53
|
-
|
|
54
|
-
},
|
|
54
|
+
d(), n(s.ESCAPE);
|
|
55
|
+
}, w = () => {
|
|
55
56
|
n(s.SHOW_MORE);
|
|
56
57
|
}, S = {
|
|
57
|
-
[s.SELECT]:
|
|
58
|
-
[s.SHOW_MORE]:
|
|
59
|
-
[s.TAB]:
|
|
58
|
+
[s.SELECT]: v,
|
|
59
|
+
[s.SHOW_MORE]: w,
|
|
60
|
+
[s.TAB]: h,
|
|
60
61
|
[s.SPACE]: x,
|
|
61
|
-
[s.ENTER]:
|
|
62
|
+
[s.ENTER]: _
|
|
62
63
|
};
|
|
63
64
|
return {
|
|
64
65
|
// Values
|
|
@@ -68,13 +69,13 @@ const ge = {
|
|
|
68
69
|
listeners: S,
|
|
69
70
|
onEscapeKey: g
|
|
70
71
|
};
|
|
71
|
-
},
|
|
72
|
-
i18n: { messages:
|
|
72
|
+
}, Ee = K({
|
|
73
|
+
i18n: { messages: Oe },
|
|
73
74
|
name: "bento-dropdown-options-container",
|
|
74
75
|
components: {
|
|
75
|
-
BentoListbox:
|
|
76
|
-
PopperContainer:
|
|
77
|
-
BentoPopover:
|
|
76
|
+
BentoListbox: F,
|
|
77
|
+
PopperContainer: N,
|
|
78
|
+
BentoPopover: q
|
|
78
79
|
},
|
|
79
80
|
props: {
|
|
80
81
|
/**
|
|
@@ -142,13 +143,17 @@ const ge = {
|
|
|
142
143
|
*/
|
|
143
144
|
lazyLoadType: {
|
|
144
145
|
type: String,
|
|
145
|
-
default:
|
|
146
|
-
validator: (t) => Object.values(
|
|
146
|
+
default: k.AUTOMATIC,
|
|
147
|
+
validator: (t) => Object.values(k).includes(t)
|
|
147
148
|
},
|
|
148
149
|
/**
|
|
149
150
|
* If enabled, the user will be able to select multiple items.
|
|
150
151
|
*/
|
|
151
152
|
multiple: { type: Boolean, default: !1 },
|
|
153
|
+
/**
|
|
154
|
+
* If enabled, dropdown will display non-selectable, static categories
|
|
155
|
+
*/
|
|
156
|
+
staticCategories: { type: Boolean, default: !1 },
|
|
152
157
|
/**
|
|
153
158
|
* Indicates if the dropdown is open so that
|
|
154
159
|
* the container can be displayed.
|
|
@@ -169,12 +174,12 @@ const ge = {
|
|
|
169
174
|
*
|
|
170
175
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
171
176
|
*/
|
|
172
|
-
searching:
|
|
177
|
+
searching: F.props.searching,
|
|
173
178
|
/**
|
|
174
179
|
* Reference to the DOM element or Vue component for positioning
|
|
175
180
|
* the Dropdown container.
|
|
176
181
|
*/
|
|
177
|
-
targetElement: { type:
|
|
182
|
+
targetElement: { type: N.props.targetElement.type, required: !0 },
|
|
178
183
|
/**
|
|
179
184
|
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
180
185
|
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
@@ -194,18 +199,18 @@ const ge = {
|
|
|
194
199
|
s.TAB
|
|
195
200
|
],
|
|
196
201
|
setup(t, { emit: e, slots: n }) {
|
|
197
|
-
const { selectedValue: l, multiple: o } =
|
|
202
|
+
const { selectedValue: l, multiple: o } = Y(t), a = y(null), { t: r } = W(), d = u(() => t.open && !t.disabled), i = u(() => r("noOptionsMatchThisSearch")), v = u(() => ({
|
|
198
203
|
"b-dropdown-options-container--single": !(t != null && t.multiple)
|
|
199
|
-
})),
|
|
204
|
+
})), h = u(() => ({
|
|
200
205
|
"b-dropdown-options-container__listbox--small": t.inputSize === E.SMALL,
|
|
201
206
|
"b-dropdown-options-container__listbox--single": !(t != null && t.multiple)
|
|
202
|
-
})), { actions:
|
|
207
|
+
})), { actions: _, internalSelectedValue: x, listeners: g, onEscapeKey: w } = Ce(
|
|
203
208
|
l,
|
|
204
209
|
o,
|
|
205
210
|
e
|
|
206
|
-
), S =
|
|
207
|
-
() => t != null && t.multiple ?
|
|
208
|
-
),
|
|
211
|
+
), S = u(
|
|
212
|
+
() => t != null && t.multiple ? q : N
|
|
213
|
+
), p = u(() => {
|
|
209
214
|
var f;
|
|
210
215
|
const D = {
|
|
211
216
|
"min-width": `${(f = t == null ? void 0 : t.targetElement) == null ? void 0 : f.clientWidth}px`,
|
|
@@ -213,10 +218,10 @@ const ge = {
|
|
|
213
218
|
};
|
|
214
219
|
return t != null && t.multiple ? {
|
|
215
220
|
actionsLayout: "space-between",
|
|
216
|
-
actions:
|
|
221
|
+
actions: _.value,
|
|
217
222
|
divider: !0,
|
|
218
223
|
fallbackPosition: ["top-start"],
|
|
219
|
-
id:
|
|
224
|
+
id: B(`dropdown-options-${t.id}`),
|
|
220
225
|
open: t.open,
|
|
221
226
|
position: "bottom-start",
|
|
222
227
|
style: {
|
|
@@ -229,7 +234,7 @@ const ge = {
|
|
|
229
234
|
offset: [0, 8],
|
|
230
235
|
position: "bottom-start",
|
|
231
236
|
style: {
|
|
232
|
-
display:
|
|
237
|
+
display: d.value ? "block" : "none",
|
|
233
238
|
...D
|
|
234
239
|
},
|
|
235
240
|
targetElement: t.targetElement
|
|
@@ -237,92 +242,92 @@ const ge = {
|
|
|
237
242
|
});
|
|
238
243
|
return {
|
|
239
244
|
// Values
|
|
240
|
-
isDropdownOpen:
|
|
241
|
-
conditionalClasses:
|
|
242
|
-
conditionalListboxClasses:
|
|
245
|
+
isDropdownOpen: d,
|
|
246
|
+
conditionalClasses: v,
|
|
247
|
+
conditionalListboxClasses: h,
|
|
243
248
|
noResultsMessage: i,
|
|
244
249
|
slots: n,
|
|
245
|
-
actions:
|
|
250
|
+
actions: _,
|
|
246
251
|
internalSelectedValue: x,
|
|
247
252
|
// Component wrapper
|
|
248
253
|
popperContainerOrPopoverComponent: S,
|
|
249
|
-
popperContainerOrPopoverProps:
|
|
254
|
+
popperContainerOrPopoverProps: p,
|
|
250
255
|
// Refs
|
|
251
256
|
dropdownOptionsListboxRef: a,
|
|
252
257
|
// Events
|
|
253
|
-
onEscapeKey:
|
|
258
|
+
onEscapeKey: w,
|
|
254
259
|
listeners: g
|
|
255
260
|
};
|
|
256
261
|
}
|
|
257
262
|
});
|
|
258
|
-
var
|
|
263
|
+
var $e = function() {
|
|
259
264
|
var e = this, n = e._self._c;
|
|
260
265
|
return e._self._setupProxy, n(e.popperContainerOrPopoverComponent, e._b({ tag: "component", staticClass: "b-dropdown-options-container", class: e.conditionalClasses }, "component", e.popperContainerOrPopoverProps, !1), [n("div", { on: { keydown: function(l) {
|
|
261
266
|
return !l.type.indexOf("key") && e._k(l.keyCode, "esc", 27, l.key, ["Esc", "Escape"]) ? null : e.onEscapeKey.apply(null, arguments);
|
|
262
|
-
} } }, [n("bento-listbox", e._g({ ref: "dropdownOptionsListboxRef", staticClass: "b-dropdown-options-container__listbox", class: e.conditionalListboxClasses, attrs: { id: e.id, "aria-label": e.ariaLabel, "empty-state": e.emptyState, "is-option-disabled": e.isOptionDisabled, items: e.items, "selected-value": e.internalSelectedValue, multiple: e.multiple, "no-results-message": e.noResultsMessage, searching: e.searching, loading: e.loading, "lazy-load-type": e.lazyLoadType, "has-more-items": e.hasMoreItems, "virtual-scroll": e.virtualScroll }, scopedSlots: e._u([e._l(e.slots, function(l, o) {
|
|
267
|
+
} } }, [n("bento-listbox", e._g({ ref: "dropdownOptionsListboxRef", staticClass: "b-dropdown-options-container__listbox", class: e.conditionalListboxClasses, attrs: { id: e.id, "aria-label": e.ariaLabel, "empty-state": e.emptyState, "is-option-disabled": e.isOptionDisabled, items: e.items, "selected-value": e.internalSelectedValue, multiple: e.multiple, "static-categories": e.staticCategories, "no-results-message": e.noResultsMessage, searching: e.searching, loading: e.loading, "lazy-load-type": e.lazyLoadType, "has-more-items": e.hasMoreItems, "virtual-scroll": e.virtualScroll }, scopedSlots: e._u([e._l(e.slots, function(l, o) {
|
|
263
268
|
return { key: o, fn: function(a) {
|
|
264
269
|
return [e._t(o, null, null, a)];
|
|
265
270
|
} };
|
|
266
271
|
})], null, !0) }, e.listeners))], 1)]);
|
|
267
|
-
},
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
272
|
+
}, De = [], Re = /* @__PURE__ */ I(
|
|
273
|
+
Ee,
|
|
274
|
+
$e,
|
|
275
|
+
De,
|
|
271
276
|
!1,
|
|
272
277
|
null,
|
|
273
|
-
"
|
|
278
|
+
"f198cd45",
|
|
274
279
|
null,
|
|
275
280
|
null
|
|
276
281
|
);
|
|
277
|
-
const
|
|
278
|
-
let
|
|
279
|
-
const
|
|
282
|
+
const Be = Re.exports;
|
|
283
|
+
let V = 0;
|
|
284
|
+
const Ie = {
|
|
280
285
|
beforeCreate() {
|
|
281
|
-
this.uuid =
|
|
286
|
+
this.uuid = V.toString(), V += 1;
|
|
282
287
|
}
|
|
283
288
|
};
|
|
284
|
-
var
|
|
289
|
+
var Te = function() {
|
|
285
290
|
var e = this, n = e._self._c;
|
|
286
291
|
return n("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? n("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), n("path", { attrs: { fill: "#00112C", d: "M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z" } })]);
|
|
287
|
-
},
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
292
|
+
}, Ae = [], Me = /* @__PURE__ */ I(
|
|
293
|
+
Ie,
|
|
294
|
+
Te,
|
|
295
|
+
Ae,
|
|
291
296
|
!1,
|
|
292
297
|
null,
|
|
293
298
|
null,
|
|
294
299
|
null,
|
|
295
300
|
null
|
|
296
301
|
);
|
|
297
|
-
const
|
|
298
|
-
let
|
|
299
|
-
const
|
|
302
|
+
const Ne = Me.exports;
|
|
303
|
+
let J = 0;
|
|
304
|
+
const Pe = {
|
|
300
305
|
beforeCreate() {
|
|
301
|
-
this.uuid =
|
|
306
|
+
this.uuid = J.toString(), J += 1;
|
|
302
307
|
}
|
|
303
308
|
};
|
|
304
|
-
var
|
|
309
|
+
var Fe = function() {
|
|
305
310
|
var e = this, n = e._self._c;
|
|
306
311
|
return n("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? n("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), n("path", { attrs: { fill: "#00112C", d: "M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z" } })]);
|
|
307
|
-
},
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
312
|
+
}, ke = [], Ke = /* @__PURE__ */ I(
|
|
313
|
+
Pe,
|
|
314
|
+
Fe,
|
|
315
|
+
ke,
|
|
311
316
|
!1,
|
|
312
317
|
null,
|
|
313
318
|
null,
|
|
314
319
|
null,
|
|
315
320
|
null
|
|
316
321
|
);
|
|
317
|
-
const
|
|
322
|
+
const We = Ke.exports, ze = K({
|
|
318
323
|
name: "dropdown-small-textbox",
|
|
319
|
-
components: { ChevronDownSmallIcon:
|
|
324
|
+
components: { ChevronDownSmallIcon: Ne, ChevronUpSmallIcon: We, DropdownBaseTextbox: xe },
|
|
320
325
|
inheritAttrs: !1,
|
|
321
326
|
props: {
|
|
322
327
|
/**
|
|
323
328
|
* The number of additional items that have been selected in the dropdown.
|
|
324
329
|
*/
|
|
325
|
-
additionalItemsSelected: { type: Number, default: 0 },
|
|
330
|
+
additionalItemsSelected: { type: [Number, String], default: 0 },
|
|
326
331
|
/**
|
|
327
332
|
* Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.
|
|
328
333
|
*/
|
|
@@ -390,11 +395,11 @@ const Ne = Ae.exports, Me = F({
|
|
|
390
395
|
},
|
|
391
396
|
emits: [$.OPEN, $.CLOSE],
|
|
392
397
|
setup(t, { emit: e }) {
|
|
393
|
-
const n =
|
|
394
|
-
[`b-dropdown-small-textbox--${
|
|
395
|
-
[`b-dropdown-small-textbox--${
|
|
396
|
-
[`b-dropdown-small-textbox--${
|
|
397
|
-
})), l =
|
|
398
|
+
const n = u(() => ({
|
|
399
|
+
[`b-dropdown-small-textbox--${P.DISABLED}`]: t.disabled,
|
|
400
|
+
[`b-dropdown-small-textbox--${P.READONLY}`]: t.readonly,
|
|
401
|
+
[`b-dropdown-small-textbox--${P.OPENED}`]: t.open
|
|
402
|
+
})), l = u(() => t.open && !t.disabled && !t.readonly), o = () => {
|
|
398
403
|
e($.OPEN);
|
|
399
404
|
}, a = () => {
|
|
400
405
|
e($.CLOSE);
|
|
@@ -411,31 +416,36 @@ const Ne = Ae.exports, Me = F({
|
|
|
411
416
|
};
|
|
412
417
|
}
|
|
413
418
|
});
|
|
414
|
-
var
|
|
419
|
+
var Ue = function() {
|
|
415
420
|
var e = this, n = e._self._c;
|
|
416
421
|
return e._self._setupProxy, n("div", { staticClass: "b-dropdown-small-textbox", class: e.conditionalClasses }, [n("dropdown-base-textbox", e._g(e._b({ staticClass: "b-dropdown-small-textbox__textbox", scopedSlots: e._u([{ key: "icon", fn: function() {
|
|
417
422
|
return [n("div", { staticClass: "b-dropdown-small-textbox__chevron" }, [n("chevron-up-small-icon", { directives: [{ name: "show", rawName: "v-show", value: e.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), n("chevron-down-small-icon", { directives: [{ name: "show", rawName: "v-show", value: !e.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
|
|
418
423
|
}, proxy: !0 }]) }, "dropdown-base-textbox", { ...e.$attrs, ...e.$props }, !1), e.listeners))], 1);
|
|
419
|
-
},
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
424
|
+
}, je = [], He = /* @__PURE__ */ I(
|
|
425
|
+
ze,
|
|
426
|
+
Ue,
|
|
427
|
+
je,
|
|
423
428
|
!1,
|
|
424
429
|
null,
|
|
425
|
-
"
|
|
430
|
+
"bc324b09",
|
|
426
431
|
null,
|
|
427
432
|
null
|
|
428
433
|
);
|
|
429
|
-
const
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
434
|
+
const qe = He.exports, Ve = ({ items: t, placeholder: e, selectedValue: n, staticCategories: l }) => {
|
|
435
|
+
let o;
|
|
436
|
+
if (l) {
|
|
437
|
+
const a = t.value.find((r) => r.items.some((d) => d.value === n.value));
|
|
438
|
+
o = a == null ? void 0 : a.items.find((r) => r.value === n.value);
|
|
439
|
+
} else
|
|
440
|
+
o = t.value.find(({ value: a }) => a === n.value);
|
|
441
|
+
return (o == null ? void 0 : o.label) || e.value || null;
|
|
442
|
+
}, Je = ({ selectedValues: t, items: e, placeholder: n }) => {
|
|
433
443
|
var l;
|
|
434
444
|
return !t.value || ((l = t.value) == null ? void 0 : l.length) === 0 ? n.value || null : t.value.map((o) => {
|
|
435
445
|
const { label: a } = e.value.find(({ value: r }) => r === o);
|
|
436
446
|
return a;
|
|
437
447
|
}).join(", ");
|
|
438
|
-
},
|
|
448
|
+
}, Ze = ({ selectedValues: t, items: e, placeholder: n }) => {
|
|
439
449
|
var l;
|
|
440
450
|
return !t.value || !((l = t.value) != null && l.length) ? n.value || null : e.value.reduce((o, a) => {
|
|
441
451
|
if (a.items) {
|
|
@@ -446,16 +456,21 @@ const Ke = ke.exports, We = ({ items: t, placeholder: e, selectedValue: n }) =>
|
|
|
446
456
|
}
|
|
447
457
|
return t.value.includes(a.value) && o.push(a.label), o;
|
|
448
458
|
}, []).join(", ");
|
|
449
|
-
},
|
|
450
|
-
const
|
|
451
|
-
var
|
|
452
|
-
return (
|
|
459
|
+
}, Ye = ({ items: t, placeholder: e, value: n, multiple: l, staticCategories: o }) => {
|
|
460
|
+
const a = u(() => t.value.find((d) => {
|
|
461
|
+
var i;
|
|
462
|
+
return (i = d.items) == null ? void 0 : i.length;
|
|
463
|
+
}));
|
|
464
|
+
return u(() => l.value ? a.value ? Ze({ selectedValues: n, placeholder: e, items: t }) : Je({ selectedValues: n, items: t, placeholder: e }) : Ve({
|
|
465
|
+
items: t,
|
|
466
|
+
placeholder: e,
|
|
467
|
+
selectedValue: n,
|
|
468
|
+
staticCategories: o.value
|
|
453
469
|
}));
|
|
454
|
-
|
|
455
|
-
}, Z = (t) => {
|
|
470
|
+
}, G = (t) => {
|
|
456
471
|
var e;
|
|
457
472
|
(e = t.value.$children) == null || e[0].$refs.textbox.focus();
|
|
458
|
-
},
|
|
473
|
+
}, Ge = ({
|
|
459
474
|
inputContainerRef: t,
|
|
460
475
|
optionsContainerRef: e,
|
|
461
476
|
selectedValueIndex: n,
|
|
@@ -463,19 +478,19 @@ const Ke = ke.exports, We = ({ items: t, placeholder: e, selectedValue: n }) =>
|
|
|
463
478
|
isDynamicFltering: o,
|
|
464
479
|
items: a,
|
|
465
480
|
isMultiple: r
|
|
466
|
-
},
|
|
467
|
-
const
|
|
468
|
-
f.preventDefault(), l.value || (i(),
|
|
481
|
+
}, d, i, v) => {
|
|
482
|
+
const h = ({ detail: f }) => {
|
|
483
|
+
f.preventDefault(), l.value || (i(), C(() => {
|
|
469
484
|
var c, b;
|
|
470
485
|
r ? (c = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || c[0].$el.focus() : (b = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || b[n.value].$el.focus();
|
|
471
486
|
}));
|
|
472
|
-
},
|
|
473
|
-
f.preventDefault(), l.value || (i(),
|
|
487
|
+
}, _ = ({ detail: f }) => {
|
|
488
|
+
f.preventDefault(), l.value || (i(), C(() => {
|
|
474
489
|
var c;
|
|
475
490
|
(c = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || c[0].$el.focus();
|
|
476
491
|
}));
|
|
477
492
|
}, x = () => {
|
|
478
|
-
l.value || (i(),
|
|
493
|
+
l.value || (i(), C(() => {
|
|
479
494
|
var f, c;
|
|
480
495
|
if (r) {
|
|
481
496
|
const b = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children;
|
|
@@ -484,36 +499,36 @@ const Ke = ke.exports, We = ({ items: t, placeholder: e, selectedValue: n }) =>
|
|
|
484
499
|
(c = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || c[a.length - 1].$el.focus();
|
|
485
500
|
}));
|
|
486
501
|
}, g = () => {
|
|
487
|
-
l.value && (
|
|
488
|
-
},
|
|
489
|
-
l.value || i(),
|
|
502
|
+
l.value && (v(), G(t));
|
|
503
|
+
}, w = () => {
|
|
504
|
+
l.value || i(), C(() => {
|
|
490
505
|
var f;
|
|
491
506
|
(f = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || f[0].$el.focus();
|
|
492
507
|
});
|
|
493
508
|
}, S = ({ detail: f }) => {
|
|
494
|
-
f.preventDefault(),
|
|
509
|
+
f.preventDefault(), d(), l.value && C(() => {
|
|
495
510
|
var c, b;
|
|
496
511
|
r ? (c = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || c[0].$el.focus() : (b = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || b[n.value].$el.focus();
|
|
497
512
|
});
|
|
498
|
-
},
|
|
499
|
-
|
|
513
|
+
}, p = () => {
|
|
514
|
+
d(), l.value && C(() => {
|
|
500
515
|
var f, c;
|
|
501
516
|
r ? (f = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || f[0].$el.focus() : (c = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || c[n.value].$el.focus();
|
|
502
517
|
});
|
|
503
518
|
};
|
|
504
|
-
return
|
|
519
|
+
return u(() => ({
|
|
505
520
|
...o.value ? {} : { [O.SPACE]: S },
|
|
506
|
-
[O.ENTER]:
|
|
507
|
-
[O.ARROW_DOWN]:
|
|
508
|
-
[O.ARROW_UP]:
|
|
521
|
+
[O.ENTER]: p,
|
|
522
|
+
[O.ARROW_DOWN]: h,
|
|
523
|
+
[O.ARROW_UP]: _,
|
|
509
524
|
[O.END]: x,
|
|
510
525
|
[O.ESCAPE]: g,
|
|
511
|
-
[O.HOME]:
|
|
526
|
+
[O.HOME]: w
|
|
512
527
|
}));
|
|
513
|
-
},
|
|
528
|
+
}, Qe = ({ inputContainerRef: t, isDropdownOpen: e }, n) => {
|
|
514
529
|
const l = () => {
|
|
515
|
-
e.value && n(),
|
|
516
|
-
|
|
530
|
+
e.value && n(), C(() => {
|
|
531
|
+
G(t);
|
|
517
532
|
});
|
|
518
533
|
};
|
|
519
534
|
return {
|
|
@@ -523,34 +538,35 @@ const Ke = ke.exports, We = ({ items: t, placeholder: e, selectedValue: n }) =>
|
|
|
523
538
|
[s.SPACE]: l
|
|
524
539
|
};
|
|
525
540
|
};
|
|
526
|
-
function
|
|
527
|
-
const l =
|
|
528
|
-
return
|
|
541
|
+
function Xe(t, e, n) {
|
|
542
|
+
const l = y(t), o = y(e), a = (d, i = []) => i.flatMap((v) => v.label.toLocaleLowerCase().includes(d) ? [v, ...a(d, v.items)] : v.items ? [...a(d, v.items)] : []);
|
|
543
|
+
return Z(l, () => {
|
|
529
544
|
n !== void 0 && n(l.value);
|
|
530
|
-
}),
|
|
545
|
+
}), u(() => {
|
|
531
546
|
if (!l.value || n !== void 0)
|
|
532
547
|
return o.value;
|
|
533
|
-
const
|
|
534
|
-
return a(
|
|
548
|
+
const d = l.value.toLocaleLowerCase();
|
|
549
|
+
return a(d, o.value);
|
|
535
550
|
});
|
|
536
551
|
}
|
|
537
|
-
const
|
|
552
|
+
const et = {
|
|
538
553
|
"en-US": {
|
|
554
|
+
all: "All",
|
|
539
555
|
clearSearch: "Clear filter",
|
|
540
556
|
ariaLabelFallback: "Dropdown"
|
|
541
557
|
}
|
|
542
|
-
},
|
|
543
|
-
i18n: { messages:
|
|
558
|
+
}, tt = K({
|
|
559
|
+
i18n: { messages: et },
|
|
544
560
|
name: "b-dropdown",
|
|
545
561
|
components: {
|
|
546
|
-
BentoDropdownOptionsContainer:
|
|
547
|
-
BentoTypography:
|
|
548
|
-
DropdownInputDefault:
|
|
549
|
-
DropdownInputSmall:
|
|
550
|
-
ErrorMessage:
|
|
551
|
-
FieldLabel:
|
|
562
|
+
BentoDropdownOptionsContainer: Be,
|
|
563
|
+
BentoTypography: ve,
|
|
564
|
+
DropdownInputDefault: he,
|
|
565
|
+
DropdownInputSmall: qe,
|
|
566
|
+
ErrorMessage: we,
|
|
567
|
+
FieldLabel: Se
|
|
552
568
|
},
|
|
553
|
-
directives: { BentoClickOutsideDirective:
|
|
569
|
+
directives: { BentoClickOutsideDirective: Le, BentoKeyboardNavigationDirective: _e },
|
|
554
570
|
props: {
|
|
555
571
|
/**
|
|
556
572
|
* @deprecated from version 2.0.0. Use the aria-label attribute instead.
|
|
@@ -644,8 +660,8 @@ const Je = {
|
|
|
644
660
|
*/
|
|
645
661
|
lazyLoadType: {
|
|
646
662
|
type: String,
|
|
647
|
-
default:
|
|
648
|
-
validator: (t) => Object.values(
|
|
663
|
+
default: F.props.lazyLoadType.default,
|
|
664
|
+
validator: (t) => Object.values(k).includes(t)
|
|
649
665
|
},
|
|
650
666
|
/*
|
|
651
667
|
* If enabled, the user will be able to select multiple items.
|
|
@@ -680,6 +696,10 @@ const Je = {
|
|
|
680
696
|
* Adds a info icon next to the label to display the passed tooltip message.
|
|
681
697
|
*/
|
|
682
698
|
tooltipText: { type: String, default: null },
|
|
699
|
+
/**
|
|
700
|
+
* If enabled, dropdown will display non-selectable, static categories
|
|
701
|
+
*/
|
|
702
|
+
staticCategories: { type: Boolean, default: !1 },
|
|
683
703
|
/**
|
|
684
704
|
* The `input` value.
|
|
685
705
|
* Providing an empty string will select no options.
|
|
@@ -708,71 +728,84 @@ const Je = {
|
|
|
708
728
|
},
|
|
709
729
|
emits: ["input", s.SHOW_MORE],
|
|
710
730
|
setup(t, { attrs: e, emit: n, slots: l }) {
|
|
711
|
-
var
|
|
712
|
-
const { t: o } =
|
|
713
|
-
ariaLabel:
|
|
731
|
+
var H;
|
|
732
|
+
const { t: o } = W(), a = y(null), r = y(null), d = y(null), i = y(!1), v = B("bento-dropdown-options-container"), h = B("dropdown-label"), _ = B("dropdown-description"), x = B("dropdown-error"), { isReadOnly: g } = be(L(t, "readonly")), w = y(e["aria-label"]), { ariaLabel: S } = Y(t), p = me({
|
|
733
|
+
ariaLabel: w.value,
|
|
714
734
|
// TODO: take this line away when the aria-label props is removed
|
|
715
735
|
label: S,
|
|
716
736
|
defaultFallback: o("ariaLabelFallback")
|
|
717
|
-
}), D =
|
|
737
|
+
}), D = u(() => ({
|
|
718
738
|
"b-dropdown--condensed": t.condensed
|
|
719
|
-
})), f =
|
|
739
|
+
})), f = u(() => ({
|
|
720
740
|
"b-dropdown__description--error": !!t.errorMessage
|
|
721
|
-
})), c =
|
|
741
|
+
})), c = y(""), b = L(t, "items"), Q = Xe(c, b, (H = t == null ? void 0 : t.search) == null ? void 0 : H.searchEvent), A = u(() => t.dynamicFiltering && !!c.value), X = Ye({
|
|
722
742
|
items: b,
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
743
|
+
staticCategories: L(t, "staticCategories"),
|
|
744
|
+
multiple: L(t, "multiple"),
|
|
745
|
+
placeholder: L(t, "placeholder"),
|
|
746
|
+
value: L(t, "value")
|
|
747
|
+
}), ee = u(() => t.size === E.DEFAULT), te = u(() => {
|
|
748
|
+
if (t != null && t.multiple)
|
|
749
|
+
return t.items.filter(
|
|
750
|
+
({ value: m }) => (t == null ? void 0 : t.value) && (t == null ? void 0 : t.value).includes(m)
|
|
751
|
+
);
|
|
752
|
+
if (!t.multiple && t.staticCategories) {
|
|
753
|
+
const m = t.items.find(
|
|
754
|
+
(T) => T.items.some((fe) => fe.value === t.value)
|
|
755
|
+
);
|
|
756
|
+
return m ? m.items.find((T) => T.value === t.value) : null;
|
|
757
|
+
}
|
|
758
|
+
return t.items.find(({ value: m }) => m === (t == null ? void 0 : t.value));
|
|
759
|
+
}), ne = u(() => {
|
|
760
|
+
const m = t.items.findIndex(({ value: R }) => t.value === R);
|
|
732
761
|
return m > 0 ? m : 0;
|
|
733
|
-
}),
|
|
762
|
+
}), { isMultiLevelSelect: le, flattenedItemsList: ae } = ye(b), oe = u(() => {
|
|
734
763
|
var m;
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
764
|
+
if (t.multiple) {
|
|
765
|
+
const R = (m = t == null ? void 0 : t.value) == null ? void 0 : m.length;
|
|
766
|
+
return (le.value ? ae.value.length : b.value.length) === R ? o("all") : R;
|
|
767
|
+
}
|
|
768
|
+
return null;
|
|
769
|
+
}), se = u(
|
|
770
|
+
() => `${t.description ? _ : ""} ${t.errorMessage ? x : ""}`.trim() || null
|
|
771
|
+
), ie = () => {
|
|
739
772
|
g.value || (i.value = !0);
|
|
740
|
-
},
|
|
773
|
+
}, M = () => {
|
|
741
774
|
i.value = !1;
|
|
742
|
-
}, K = () => {
|
|
743
|
-
g.value || (i.value = !i.value, I.value && (c.value = ""));
|
|
744
|
-
}, ae = () => {
|
|
745
|
-
I.value && (c.value = ""), i.value && (i.value = !1);
|
|
746
|
-
}, W = (m) => {
|
|
747
|
-
t.multiple || (c.value = "", i.value = !1), n("input", m);
|
|
748
775
|
}, z = () => {
|
|
776
|
+
g.value || (i.value = !i.value, A.value && (c.value = ""));
|
|
777
|
+
}, re = () => {
|
|
778
|
+
A.value && (c.value = ""), i.value && (i.value = !1);
|
|
779
|
+
}, U = (m) => {
|
|
780
|
+
t.multiple || (c.value = "", i.value = !1), n("input", m);
|
|
781
|
+
}, j = () => {
|
|
749
782
|
n(s.SHOW_MORE);
|
|
750
|
-
},
|
|
783
|
+
}, de = Ge(
|
|
751
784
|
{
|
|
752
785
|
inputContainerRef: a,
|
|
753
|
-
optionsContainerRef:
|
|
754
|
-
selectedValueIndex:
|
|
786
|
+
optionsContainerRef: d,
|
|
787
|
+
selectedValueIndex: ne,
|
|
755
788
|
isDropdownOpen: i,
|
|
756
|
-
isDynamicFltering:
|
|
789
|
+
isDynamicFltering: L(t, "dynamicFiltering"),
|
|
757
790
|
items: t.items,
|
|
758
791
|
isMultiple: t.multiple
|
|
759
792
|
},
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
),
|
|
793
|
+
z,
|
|
794
|
+
ie,
|
|
795
|
+
M
|
|
796
|
+
), ue = Qe(
|
|
764
797
|
{
|
|
765
798
|
inputContainerRef: a,
|
|
766
799
|
isDropdownOpen: i
|
|
767
800
|
},
|
|
768
|
-
|
|
769
|
-
),
|
|
770
|
-
[s.CLOSE_DROPDOWN]:
|
|
771
|
-
[s.SELECT]:
|
|
772
|
-
[s.SHOW_MORE]:
|
|
773
|
-
...
|
|
801
|
+
M
|
|
802
|
+
), ce = {
|
|
803
|
+
[s.CLOSE_DROPDOWN]: M,
|
|
804
|
+
[s.SELECT]: U,
|
|
805
|
+
[s.SHOW_MORE]: j,
|
|
806
|
+
...ue
|
|
774
807
|
};
|
|
775
|
-
return t.error &&
|
|
808
|
+
return t.error && pe(
|
|
776
809
|
'BentoDropdown "error" property',
|
|
777
810
|
`Use the BentoDropdown "errorMessage" property instead to indicate that there is a modifier error.
|
|
778
811
|
Having the field as "undefined" will hide/remove the error.
|
|
@@ -781,42 +814,44 @@ const Je = {
|
|
|
781
814
|
), {
|
|
782
815
|
// Values
|
|
783
816
|
conditionalClasses: D,
|
|
784
|
-
computedAriaLabel:
|
|
785
|
-
additionalItemsSelected:
|
|
786
|
-
idDefaultSize:
|
|
817
|
+
computedAriaLabel: p,
|
|
818
|
+
additionalItemsSelected: oe,
|
|
819
|
+
idDefaultSize: ee,
|
|
787
820
|
isDropdownOpen: i,
|
|
788
|
-
displayValue:
|
|
789
|
-
dropdownOptionsContainerId:
|
|
790
|
-
filteredItems:
|
|
791
|
-
isSearching:
|
|
821
|
+
displayValue: X,
|
|
822
|
+
dropdownOptionsContainerId: v,
|
|
823
|
+
filteredItems: Q,
|
|
824
|
+
isSearching: A,
|
|
792
825
|
isReadOnly: g,
|
|
793
826
|
searchTerm: c,
|
|
794
|
-
labelId:
|
|
795
|
-
descriptionId:
|
|
827
|
+
labelId: h,
|
|
828
|
+
descriptionId: _,
|
|
796
829
|
errorId: x,
|
|
797
|
-
ariaDescribedBy:
|
|
798
|
-
selectedValueItem:
|
|
830
|
+
ariaDescribedBy: se,
|
|
831
|
+
selectedValueItem: te,
|
|
799
832
|
// Conciliation of Vue2 $scopedSlots and Vue3 $scopes.
|
|
800
833
|
// The setup method and the "useSlots" composible define
|
|
801
834
|
// { slots } as a proxy of $scopedSlots and $scopes in their
|
|
802
835
|
// respective Vue version. Source: https://github.com/vuejs/composition-api/issues/84#issuecomment-524885445
|
|
803
836
|
slots: l,
|
|
804
837
|
descriptionConditionalClasses: f,
|
|
838
|
+
// Methods
|
|
839
|
+
hasSlot: ge(l),
|
|
805
840
|
// Refs
|
|
806
841
|
inputContainerRef: a,
|
|
807
842
|
inputContainerRefWrapper: r,
|
|
808
|
-
optionsContainerRef:
|
|
843
|
+
optionsContainerRef: d,
|
|
809
844
|
// Events
|
|
810
|
-
closeOpenedDropdown:
|
|
811
|
-
toggleDropdown:
|
|
812
|
-
onOptionSelected:
|
|
813
|
-
emitShowMoreEvent:
|
|
814
|
-
textboxKeyboardNavigationListeners:
|
|
815
|
-
listboxListeners:
|
|
845
|
+
closeOpenedDropdown: re,
|
|
846
|
+
toggleDropdown: z,
|
|
847
|
+
onOptionSelected: U,
|
|
848
|
+
emitShowMoreEvent: j,
|
|
849
|
+
textboxKeyboardNavigationListeners: de,
|
|
850
|
+
listboxListeners: ce
|
|
816
851
|
};
|
|
817
852
|
}
|
|
818
853
|
});
|
|
819
|
-
var
|
|
854
|
+
var nt = function() {
|
|
820
855
|
var l;
|
|
821
856
|
var e = this, n = e._self._c;
|
|
822
857
|
return e._self._setupProxy, n("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.closeOpenedDropdown, expression: "closeOpenedDropdown" }], staticClass: "b-dropdown", class: e.conditionalClasses }, [e.label ? n("field-label", { attrs: { id: e.labelId, condensed: e.condensed, label: e.label, "tooltip-text": e.tooltipText, optional: e.optional, required: e.required } }) : e._e(), n("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "inputContainerRefWrapper" }, e.textboxKeyboardNavigationListeners), [n(e.size, { ref: "inputContainerRef", tag: "component", attrs: { condensed: e.condensed, value: e.searchTerm, "additional-items-selected": e.additionalItemsSelected, ariaControls: e.dropdownOptionsContainerId, ariaExpanded: e.isDropdownOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, "aria-label": e.computedAriaLabel, "aria-readonly": e.isReadOnly, readonly: e.isReadOnly, disabled: e.disabled, "display-value": e.displayValue, "dynamic-filtering": e.dynamicFiltering, "is-invalid": !!e.errorMessage || e.error, multiple: e.multiple, open: e.isDropdownOpen, "selected-value-item": e.idDefaultSize ? e.selectedValueItem : void 0, "show-slot-content-in-multiple": e.showSlotContentInMultiple }, on: { input: function(o) {
|
|
@@ -825,25 +860,27 @@ var Ye = function() {
|
|
|
825
860
|
return { key: a, fn: function(r) {
|
|
826
861
|
return [e._t(a, null, null, r)];
|
|
827
862
|
} };
|
|
828
|
-
})], null, !0) })], 1), e.inputContainerRef ? n("bento-dropdown-options-container", e._g({ ref: "optionsContainerRef", attrs: { id: e.dropdownOptionsContainerId, "aria-label": e.computedAriaLabel, "empty-state": e.emptyState, "debounce-time": (l = e.search) == null ? void 0 : l.debounceTime, disabled: e.disabled, "input-size": e.size, "is-option-disabled": e.isOptionDisabled, items: e.filteredItems, multiple: e.multiple, open: e.isDropdownOpen, "selected-value": e.value, searching: e.isSearching, "target-element": e.inputContainerRefWrapper, loading: e.loading, "has-more-items": e.hasMoreItems, "lazy-load-type": e.lazyLoadType, "virtual-scroll": e.virtualScroll }, scopedSlots: e._u([e._l(e.slots, function(o, a) {
|
|
863
|
+
})], null, !0) })], 1), e.inputContainerRef ? n("bento-dropdown-options-container", e._g({ ref: "optionsContainerRef", attrs: { id: e.dropdownOptionsContainerId, "aria-label": e.computedAriaLabel, "empty-state": e.emptyState, "debounce-time": (l = e.search) == null ? void 0 : l.debounceTime, disabled: e.disabled, "input-size": e.size, "is-option-disabled": e.isOptionDisabled, items: e.filteredItems, multiple: e.multiple, "static-categories": e.staticCategories, open: e.isDropdownOpen, "selected-value": e.value, searching: e.isSearching, "target-element": e.inputContainerRefWrapper, loading: e.loading, "has-more-items": e.hasMoreItems, "lazy-load-type": e.lazyLoadType, "virtual-scroll": e.virtualScroll }, scopedSlots: e._u([e._l(e.slots, function(o, a) {
|
|
829
864
|
return { key: a, fn: function(r) {
|
|
830
865
|
return [e._t(a, null, null, r)];
|
|
831
866
|
} };
|
|
832
|
-
})], null, !0) }, e.listboxListeners)) : e._e(), e.errorMessage ? n("error-message", { staticClass: "b-dropdown__error-message", attrs: { id: e.errorId, "error-message": e.errorMessage } }) : e._e(), e.description ? n("bento-typography", { staticClass: "b-dropdown__description", class: e.descriptionConditionalClasses, attrs: { id: e.descriptionId, el: "span" } }, [e.
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
867
|
+
})], null, !0) }, e.listboxListeners)) : e._e(), e.errorMessage ? n("error-message", { staticClass: "b-dropdown__error-message", attrs: { id: e.errorId, "error-message": e.errorMessage } }) : e._e(), e.description || e.hasSlot("description") ? n("bento-typography", { staticClass: "b-dropdown__description", class: e.descriptionConditionalClasses, attrs: { id: e.descriptionId, el: "span" } }, [e._t("description", function() {
|
|
868
|
+
return [e._v(" " + e._s(e.description) + " ")];
|
|
869
|
+
})], 2) : e._e()], 1);
|
|
870
|
+
}, lt = [], at = /* @__PURE__ */ I(
|
|
871
|
+
tt,
|
|
872
|
+
nt,
|
|
873
|
+
lt,
|
|
837
874
|
!1,
|
|
838
875
|
null,
|
|
839
|
-
"
|
|
876
|
+
"99b7ce4a",
|
|
840
877
|
null,
|
|
841
878
|
null
|
|
842
879
|
);
|
|
843
|
-
const
|
|
880
|
+
const xt = at.exports;
|
|
844
881
|
export {
|
|
845
|
-
|
|
882
|
+
xt as B,
|
|
846
883
|
E as a,
|
|
847
|
-
|
|
884
|
+
Xe as u
|
|
848
885
|
};
|
|
849
|
-
//# sourceMappingURL=dropdown.
|
|
886
|
+
//# sourceMappingURL=dropdown.f784ac67.js.map
|