@adyen/bento-vue2 1.8.0 → 1.9.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/data-grid/composables/useKeyboardNavigator/useKeyboardNavigator.d.ts +6 -2
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useScroller/useScroller.d.ts +6 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +23 -391
- package/dist/@types/packages/vue2/src/components/divider/divider.vue.d.ts +1 -5
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +10 -0
- 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/dropdown.vue.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/input-field/input-field.types.d.ts +1 -3
- package/dist/@types/packages/vue2/src/components/internal/field-label/field-label.vue.d.ts +9 -0
- package/dist/accordion.js +3 -3
- package/dist/action-bar.js +8 -8
- package/dist/alert.js +26 -26
- package/dist/alert.js.map +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/copy.css +1 -1
- package/dist/assets/cross.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/field-label.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/avatar-image.js +1 -1
- package/dist/badge.js +2 -2
- package/dist/button.js +5 -5
- package/dist/card.js +5 -5
- package/dist/checkbox.js +6 -6
- package/dist/chunks/arrow-left.2db60716.js +26 -0
- package/dist/chunks/arrow-left.2db60716.js.map +1 -0
- package/dist/chunks/{base-button.7886a7e6.js → base-button.df9a9bea.js} +3 -3
- package/dist/chunks/{base-button.7886a7e6.js.map → base-button.df9a9bea.js.map} +1 -1
- package/dist/chunks/{base-modal.31634fe8.js → base-modal.75319f4e.js} +8 -8
- package/dist/chunks/{base-modal.31634fe8.js.map → base-modal.75319f4e.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.5faea13e.js → button-actions-with-menu.32770485.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.5faea13e.js.map → button-actions-with-menu.32770485.js.map} +1 -1
- package/dist/chunks/{button.e09d5980.js → button.7dd8d4de.js} +3 -3
- package/dist/chunks/{button.e09d5980.js.map → button.7dd8d4de.js.map} +1 -1
- package/dist/chunks/{calendar.47e9e755.js → calendar.a885d8fc.js} +6 -6
- package/dist/chunks/{calendar.47e9e755.js.map → calendar.a885d8fc.js.map} +1 -1
- package/dist/chunks/{checkbox.2277450e.js → checkbox.65743b08.js} +33 -33
- package/dist/chunks/checkbox.65743b08.js.map +1 -0
- package/dist/chunks/checkmark-circle-fill.345311d2.js +26 -0
- package/dist/chunks/checkmark-circle-fill.345311d2.js.map +1 -0
- package/dist/chunks/checkmark-small.520f01b1.js +26 -0
- package/dist/chunks/checkmark-small.520f01b1.js.map +1 -0
- package/dist/chunks/checkmark.a6ed8f47.js +26 -0
- package/dist/chunks/checkmark.a6ed8f47.js.map +1 -0
- package/dist/chunks/chevron-left.5edf02ac.js +47 -0
- package/dist/chunks/chevron-left.5edf02ac.js.map +1 -0
- package/dist/chunks/chevron-up.81185563.js +47 -0
- package/dist/chunks/chevron-up.81185563.js.map +1 -0
- package/dist/chunks/{controls-group.6c5bfccd.js → controls-group.dd967ccf.js} +3 -3
- package/dist/chunks/{controls-group.6c5bfccd.js.map → controls-group.dd967ccf.js.map} +1 -1
- package/dist/chunks/copy.e12b418e.js +103 -0
- package/dist/chunks/copy.e12b418e.js.map +1 -0
- package/dist/chunks/cross-circle-fill.7c07d16a.js +26 -0
- package/dist/chunks/cross-circle-fill.7c07d16a.js.map +1 -0
- package/dist/chunks/cross.04678d81.js +26 -0
- package/dist/chunks/cross.04678d81.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.25134789.js → dropdown-default-textbox.465db4d4.js} +29 -24
- package/dist/chunks/{dropdown-default-textbox.25134789.js.map → dropdown-default-textbox.465db4d4.js.map} +1 -1
- package/dist/chunks/{dropdown.ce937989.js → dropdown.6461dbe3.js} +212 -205
- package/dist/chunks/dropdown.6461dbe3.js.map +1 -0
- package/dist/chunks/field-label.01df3cba.js +111 -0
- package/dist/chunks/field-label.01df3cba.js.map +1 -0
- package/dist/chunks/{fixed-scroller.8994e30a.js → fixed-scroller.42354ccc.js} +4 -4
- package/dist/chunks/{fixed-scroller.8994e30a.js.map → fixed-scroller.42354ccc.js.map} +1 -1
- package/dist/chunks/{footer-actions.c9b2cb74.js → footer-actions.2cd9079e.js} +3 -3
- package/dist/chunks/{footer-actions.c9b2cb74.js.map → footer-actions.2cd9079e.js.map} +1 -1
- package/dist/chunks/{get-slot-text.c1114034.js → get-slot-text.99c3d860.js} +2 -2
- package/dist/chunks/{get-slot-text.c1114034.js.map → get-slot-text.99c3d860.js.map} +1 -1
- package/dist/chunks/{grid-layout.a806acb2.js → grid-layout.e0025286.js} +2 -2
- package/dist/chunks/{grid-layout.a806acb2.js.map → grid-layout.e0025286.js.map} +1 -1
- package/dist/chunks/{i18n.155748d6.js → i18n.eb5b985b.js} +2 -2
- package/dist/chunks/{i18n.155748d6.js.map → i18n.eb5b985b.js.map} +1 -1
- package/dist/chunks/{index.89942d3a.js → index.02da8d63.js} +6 -5
- package/dist/chunks/{index.89942d3a.js.map → index.02da8d63.js.map} +1 -1
- package/dist/chunks/{index.a5de5242.js → index.0890dc99.js} +7 -7
- package/dist/chunks/{index.a5de5242.js.map → index.0890dc99.js.map} +1 -1
- package/dist/chunks/{index.66503760.js → index.152b2b16.js} +4 -4
- package/dist/chunks/{index.66503760.js.map → index.152b2b16.js.map} +1 -1
- package/dist/chunks/{index.a99ffd48.js → index.16914bb1.js} +30 -29
- package/dist/chunks/{index.a99ffd48.js.map → index.16914bb1.js.map} +1 -1
- package/dist/chunks/{index.b83f8b7e.js → index.322692c8.js} +3 -3
- package/dist/chunks/{index.b83f8b7e.js.map → index.322692c8.js.map} +1 -1
- package/dist/chunks/index.4c062058.js +8 -0
- package/dist/chunks/{index.af05ced4.js.map → index.4c062058.js.map} +1 -1
- package/dist/chunks/{index.86fc63ca.js → index.6cef7328.js} +3 -3
- package/dist/chunks/{index.86fc63ca.js.map → index.6cef7328.js.map} +1 -1
- package/dist/chunks/{index.965ac1af.js → index.b201e81d.js} +2 -2
- package/dist/chunks/{index.965ac1af.js.map → index.b201e81d.js.map} +1 -1
- package/dist/chunks/{index.210d2169.js → index.d1beb704.js} +7 -7
- package/dist/chunks/{index.210d2169.js.map → index.d1beb704.js.map} +1 -1
- package/dist/chunks/{index.d8bd7596.js → index.f358c4bd.js} +9 -9
- package/dist/chunks/index.f358c4bd.js.map +1 -0
- package/dist/chunks/info-filled.27bd4bfb.js +47 -0
- package/dist/chunks/info-filled.27bd4bfb.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.97af47fc.js → listbox-option-tag.55cd9c16.js} +8 -7
- package/dist/chunks/{listbox-option-tag.97af47fc.js.map → listbox-option-tag.55cd9c16.js.map} +1 -1
- package/dist/chunks/{listbox.d039b178.js → listbox.a117e6d4.js} +45 -41
- package/dist/chunks/{listbox.d039b178.js.map → listbox.a117e6d4.js.map} +1 -1
- package/dist/chunks/{loading-button.9a9cbbad.js → loading-button.459b9ab4.js} +4 -4
- package/dist/chunks/{loading-button.9a9cbbad.js.map → loading-button.459b9ab4.js.map} +1 -1
- package/dist/chunks/refresh.71a03998.js +26 -0
- package/dist/chunks/refresh.71a03998.js.map +1 -0
- package/dist/chunks/search.471270fe.js +26 -0
- package/dist/chunks/search.471270fe.js.map +1 -0
- package/dist/chunks/{toastController.0e01443d.js → toastController.fd667b68.js} +2 -2
- package/dist/chunks/{toastController.0e01443d.js.map → toastController.fd667b68.js.map} +1 -1
- package/dist/chunks/{tooltip.ecd0f707.js → tooltip.b8929659.js} +4 -4
- package/dist/chunks/{tooltip.ecd0f707.js.map → tooltip.b8929659.js.map} +1 -1
- package/dist/chunks/{use-default-slot-validator.cbdfe693.js → use-default-slot-validator.b9bff4c6.js} +2 -2
- package/dist/chunks/{use-default-slot-validator.cbdfe693.js.map → use-default-slot-validator.b9bff4c6.js.map} +1 -1
- package/dist/chunks/use-has-slot.fbeb19ec.js +6 -0
- package/dist/chunks/{use-has-slot.6052d56a.js.map → use-has-slot.fbeb19ec.js.map} +1 -1
- package/dist/chunks/{useCountryItems.5d7b436e.js → useCountryItems.34ac8740.js} +2 -2
- package/dist/chunks/{useCountryItems.5d7b436e.js.map → useCountryItems.34ac8740.js.map} +1 -1
- package/dist/code-snippet.js +106 -106
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +3 -3
- package/dist/currency.js +2 -2
- package/dist/data-grid.js +768 -832
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +23 -22
- 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 +13 -27
- package/dist/divider.js.map +1 -1
- package/dist/dropdown.js +5 -5
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +695 -565
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +3 -3
- package/dist/header.js +5 -5
- package/dist/index.js +16 -16
- package/dist/info-icon.js +5 -5
- package/dist/info-icon.js.map +1 -1
- package/dist/input-field.js +40 -42
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +8 -8
- package/dist/link.js +2 -2
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +5 -5
- package/dist/pagination.js +45 -45
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +3 -3
- package/dist/payment-method.js.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +7 -7
- package/dist/search-bar.js +5 -5
- package/dist/segmented-control.js +5 -5
- package/dist/sidepanel.js +8 -8
- package/dist/status.js +2 -2
- package/dist/stepper.js +40 -40
- package/dist/stepper.js.map +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +5 -5
- package/dist/tabs.js +3 -3
- package/dist/tag.js +4 -4
- package/dist/textarea.js +21 -21
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +113 -113
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +6 -6
- package/dist/toggle.js +6 -6
- package/dist/tutorial.js +71 -71
- package/dist/tutorial.js.map +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +650 -615
- package/package.json +4 -4
- package/dist/assets/arrow-left.css +0 -1
- package/dist/assets/checkmark-circle-fill.css +0 -1
- package/dist/assets/checkmark-small.css +0 -1
- package/dist/assets/checkmark.css +0 -1
- package/dist/assets/chevron-left.css +0 -1
- package/dist/assets/chevron-up.css +0 -1
- package/dist/assets/cross-circle-fill.css +0 -1
- package/dist/assets/info-filled.css +0 -1
- package/dist/assets/refresh.css +0 -1
- package/dist/assets/search.css +0 -1
- package/dist/chunks/arrow-left.1d5d08bd.js +0 -26
- package/dist/chunks/arrow-left.1d5d08bd.js.map +0 -1
- package/dist/chunks/checkbox.2277450e.js.map +0 -1
- package/dist/chunks/checkmark-circle-fill.2cfbb81b.js +0 -26
- package/dist/chunks/checkmark-circle-fill.2cfbb81b.js.map +0 -1
- package/dist/chunks/checkmark-small.5ca15f00.js +0 -26
- package/dist/chunks/checkmark-small.5ca15f00.js.map +0 -1
- package/dist/chunks/checkmark.78f3ed9c.js +0 -26
- package/dist/chunks/checkmark.78f3ed9c.js.map +0 -1
- package/dist/chunks/chevron-left.c10778d3.js +0 -47
- package/dist/chunks/chevron-left.c10778d3.js.map +0 -1
- package/dist/chunks/chevron-up.674ec2e5.js +0 -47
- package/dist/chunks/chevron-up.674ec2e5.js.map +0 -1
- package/dist/chunks/copy.a85c2e9f.js +0 -103
- package/dist/chunks/copy.a85c2e9f.js.map +0 -1
- package/dist/chunks/cross-circle-fill.d5e9ae44.js +0 -26
- package/dist/chunks/cross-circle-fill.d5e9ae44.js.map +0 -1
- package/dist/chunks/cross.a2cadac5.js +0 -26
- package/dist/chunks/cross.a2cadac5.js.map +0 -1
- package/dist/chunks/dropdown.ce937989.js.map +0 -1
- package/dist/chunks/field-label.330edb60.js +0 -107
- package/dist/chunks/field-label.330edb60.js.map +0 -1
- package/dist/chunks/index.af05ced4.js +0 -7
- package/dist/chunks/index.d8bd7596.js.map +0 -1
- package/dist/chunks/info-filled.48f3268f.js +0 -47
- package/dist/chunks/info-filled.48f3268f.js.map +0 -1
- package/dist/chunks/refresh.eb485c6f.js +0 -26
- package/dist/chunks/refresh.eb485c6f.js.map +0 -1
- package/dist/chunks/search.a8055e95.js +0 -26
- package/dist/chunks/search.a8055e95.js.map +0 -1
- package/dist/chunks/use-has-slot.6052d56a.js +0 -6
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { B as
|
|
3
|
-
import { D as ue, a as $, b as A, c as ce } from "./dropdown-default-textbox.25134789.js";
|
|
4
|
-
import { n as B } from "./_plugin-vue2_normalizer.71e2aa87.js";
|
|
1
|
+
import { ref as _, watch as V, computed as d, defineComponent as F, toRefs as J, nextTick as L, toRef as C } from "vue";
|
|
2
|
+
import { B as de, d as ue } from "./index.b201e81d.js";
|
|
5
3
|
import { g as R } from "./unique-id.a2a2b458.js";
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as k } from "./i18n.
|
|
8
|
-
import { u as
|
|
9
|
-
import { a as s, B as M, b as P } from "./listbox.
|
|
10
|
-
import { B as O, a as
|
|
11
|
-
import { a as
|
|
12
|
-
import { a as j } from "./index.
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
4
|
+
import { u as ce } from "./aria-label.ac9651a5.js";
|
|
5
|
+
import { u as k } from "./i18n.eb5b985b.js";
|
|
6
|
+
import { u as fe } from "./use-form-layout-loading.d03e5d48.js";
|
|
7
|
+
import { a as s, B as M, b as P } from "./listbox.a117e6d4.js";
|
|
8
|
+
import { B as O, a as pe } from "./keyboard-navigation.ca47dfa8.js";
|
|
9
|
+
import { a as A } from "./index.152b2b16.js";
|
|
10
|
+
import { a as j } from "./index.d1beb704.js";
|
|
11
|
+
import { n as B } from "./_plugin-vue2_normalizer.71e2aa87.js";
|
|
12
|
+
import { D as ve, a as $, b as N, c as me } from "./dropdown-default-textbox.465db4d4.js";
|
|
13
|
+
import { E as be, F as _e } from "./field-label.01df3cba.js";
|
|
14
|
+
import { B as ye } from "./directive.0408e565.js";
|
|
15
15
|
import "../assets/dropdown.css";
|
|
16
|
-
var
|
|
17
|
-
const
|
|
16
|
+
var E = /* @__PURE__ */ ((t) => (t.DEFAULT = "DropdownInputDefault", t.SMALL = "DropdownInputSmall", t))(E || {});
|
|
17
|
+
const ge = {
|
|
18
18
|
"en-US": {
|
|
19
19
|
apply: "Apply",
|
|
20
20
|
cancel: "Cancel",
|
|
21
21
|
noOptionsMatchThisSearch: "No options match this search"
|
|
22
22
|
}
|
|
23
|
-
},
|
|
24
|
-
const l =
|
|
23
|
+
}, xe = (t, e, n) => {
|
|
24
|
+
const l = _(t.value), { t: o } = k();
|
|
25
25
|
V(t, () => {
|
|
26
26
|
l.value = t.value;
|
|
27
27
|
});
|
|
28
|
-
const
|
|
28
|
+
const a = d(
|
|
29
29
|
() => JSON.stringify(l.value) === JSON.stringify(t.value)
|
|
30
30
|
), r = () => {
|
|
31
31
|
n(s.SELECT, l.value), n(s.CLOSE_DROPDOWN);
|
|
32
32
|
}, u = () => {
|
|
33
33
|
l.value = t.value, n(s.CLOSE_DROPDOWN);
|
|
34
|
-
}, i =
|
|
34
|
+
}, i = d(() => [
|
|
35
35
|
{
|
|
36
|
-
title:
|
|
36
|
+
title: o("apply"),
|
|
37
37
|
event: r,
|
|
38
|
-
disabled:
|
|
38
|
+
disabled: a.value
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
|
-
title:
|
|
41
|
+
title: o("cancel"),
|
|
42
42
|
event: u
|
|
43
43
|
}
|
|
44
44
|
]), p = (v) => {
|
|
45
45
|
l.value = v, e.value || n(s.SELECT, v);
|
|
46
46
|
}, w = (v) => {
|
|
47
47
|
p(v), n(s.TAB);
|
|
48
|
-
},
|
|
48
|
+
}, y = (v) => {
|
|
49
49
|
p(v), n(s.ENTER);
|
|
50
50
|
}, x = (v) => {
|
|
51
51
|
p(v), n(s.SPACE);
|
|
52
|
-
},
|
|
52
|
+
}, g = () => {
|
|
53
53
|
u(), n(s.ESCAPE);
|
|
54
54
|
}, h = () => {
|
|
55
55
|
n(s.SHOW_MORE);
|
|
@@ -58,7 +58,7 @@ const ye = {
|
|
|
58
58
|
[s.SHOW_MORE]: h,
|
|
59
59
|
[s.TAB]: w,
|
|
60
60
|
[s.SPACE]: x,
|
|
61
|
-
[s.ENTER]:
|
|
61
|
+
[s.ENTER]: y
|
|
62
62
|
};
|
|
63
63
|
return {
|
|
64
64
|
// Values
|
|
@@ -66,14 +66,14 @@ const ye = {
|
|
|
66
66
|
internalSelectedValue: l,
|
|
67
67
|
// Methods
|
|
68
68
|
listeners: S,
|
|
69
|
-
onEscapeKey:
|
|
69
|
+
onEscapeKey: g
|
|
70
70
|
};
|
|
71
|
-
},
|
|
72
|
-
i18n: { messages:
|
|
71
|
+
}, we = F({
|
|
72
|
+
i18n: { messages: ge },
|
|
73
73
|
name: "bento-dropdown-options-container",
|
|
74
74
|
components: {
|
|
75
75
|
BentoListbox: M,
|
|
76
|
-
PopperContainer:
|
|
76
|
+
PopperContainer: A,
|
|
77
77
|
BentoPopover: j
|
|
78
78
|
},
|
|
79
79
|
props: {
|
|
@@ -118,8 +118,8 @@ const ye = {
|
|
|
118
118
|
*/
|
|
119
119
|
inputSize: {
|
|
120
120
|
type: String,
|
|
121
|
-
default:
|
|
122
|
-
validator: (t) => Object.values(
|
|
121
|
+
default: E.DEFAULT,
|
|
122
|
+
validator: (t) => Object.values(E).includes(t)
|
|
123
123
|
},
|
|
124
124
|
/**
|
|
125
125
|
* The option elements to populate the dropdown with.
|
|
@@ -174,7 +174,7 @@ const ye = {
|
|
|
174
174
|
* Reference to the DOM element or Vue component for positioning
|
|
175
175
|
* the Dropdown container.
|
|
176
176
|
*/
|
|
177
|
-
targetElement: { type:
|
|
177
|
+
targetElement: { type: A.props.targetElement.type, required: !0 },
|
|
178
178
|
/**
|
|
179
179
|
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
180
180
|
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
@@ -194,26 +194,26 @@ const ye = {
|
|
|
194
194
|
s.TAB
|
|
195
195
|
],
|
|
196
196
|
setup(t, { emit: e, slots: n }) {
|
|
197
|
-
const { selectedValue: l, multiple:
|
|
197
|
+
const { selectedValue: l, multiple: o } = J(t), a = _(null), { t: r } = k(), u = d(() => t.open && !t.disabled), i = d(() => r("noOptionsMatchThisSearch")), p = d(() => ({
|
|
198
198
|
"b-dropdown-options-container--single": !(t != null && t.multiple)
|
|
199
|
-
})), w =
|
|
200
|
-
"b-dropdown-options-container__listbox--small": t.inputSize ===
|
|
199
|
+
})), w = d(() => ({
|
|
200
|
+
"b-dropdown-options-container__listbox--small": t.inputSize === E.SMALL,
|
|
201
201
|
"b-dropdown-options-container__listbox--single": !(t != null && t.multiple)
|
|
202
|
-
})), { actions:
|
|
202
|
+
})), { actions: y, internalSelectedValue: x, listeners: g, onEscapeKey: h } = xe(
|
|
203
203
|
l,
|
|
204
|
-
|
|
204
|
+
o,
|
|
205
205
|
e
|
|
206
|
-
), S =
|
|
207
|
-
() => t != null && t.multiple ? j :
|
|
208
|
-
), v =
|
|
209
|
-
var
|
|
206
|
+
), S = d(
|
|
207
|
+
() => t != null && t.multiple ? j : A
|
|
208
|
+
), v = d(() => {
|
|
209
|
+
var f;
|
|
210
210
|
const D = {
|
|
211
|
-
"min-width": `${(
|
|
211
|
+
"min-width": `${(f = t == null ? void 0 : t.targetElement) == null ? void 0 : f.clientWidth}px`,
|
|
212
212
|
"max-width": "min(500px, 95%)"
|
|
213
213
|
};
|
|
214
214
|
return t != null && t.multiple ? {
|
|
215
215
|
actionsLayout: "space-between",
|
|
216
|
-
actions:
|
|
216
|
+
actions: y.value,
|
|
217
217
|
divider: !0,
|
|
218
218
|
fallbackPosition: ["top-start"],
|
|
219
219
|
id: R(`dropdown-options-${t.id}`),
|
|
@@ -242,81 +242,81 @@ const ye = {
|
|
|
242
242
|
conditionalListboxClasses: w,
|
|
243
243
|
noResultsMessage: i,
|
|
244
244
|
slots: n,
|
|
245
|
-
actions:
|
|
245
|
+
actions: y,
|
|
246
246
|
internalSelectedValue: x,
|
|
247
247
|
// Component wrapper
|
|
248
248
|
popperContainerOrPopoverComponent: S,
|
|
249
249
|
popperContainerOrPopoverProps: v,
|
|
250
250
|
// Refs
|
|
251
|
-
dropdownOptionsListboxRef:
|
|
251
|
+
dropdownOptionsListboxRef: a,
|
|
252
252
|
// Events
|
|
253
253
|
onEscapeKey: h,
|
|
254
|
-
listeners:
|
|
254
|
+
listeners: g
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
257
|
});
|
|
258
|
-
var
|
|
258
|
+
var he = function() {
|
|
259
259
|
var e = this, n = e._self._c;
|
|
260
260
|
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
261
|
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,
|
|
263
|
-
return { key:
|
|
264
|
-
return [e._t(
|
|
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) {
|
|
263
|
+
return { key: o, fn: function(a) {
|
|
264
|
+
return [e._t(o, null, null, a)];
|
|
265
265
|
} };
|
|
266
266
|
})], null, !0) }, e.listeners))], 1)]);
|
|
267
|
-
},
|
|
268
|
-
xe,
|
|
267
|
+
}, Se = [], Oe = /* @__PURE__ */ B(
|
|
269
268
|
we,
|
|
270
269
|
he,
|
|
270
|
+
Se,
|
|
271
271
|
!1,
|
|
272
272
|
null,
|
|
273
273
|
"c9901f59",
|
|
274
274
|
null,
|
|
275
275
|
null
|
|
276
276
|
);
|
|
277
|
-
const
|
|
277
|
+
const Le = Oe.exports;
|
|
278
278
|
let H = 0;
|
|
279
|
-
const
|
|
279
|
+
const Ee = {
|
|
280
280
|
beforeCreate() {
|
|
281
281
|
this.uuid = H.toString(), H += 1;
|
|
282
282
|
}
|
|
283
283
|
};
|
|
284
284
|
var Ce = function() {
|
|
285
285
|
var e = this, n = e._self._c;
|
|
286
|
-
return n("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"] ? n("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), n("path", { attrs: { fill: "#00112C",
|
|
287
|
-
},
|
|
288
|
-
Le,
|
|
289
|
-
Ce,
|
|
286
|
+
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
|
+
}, $e = [], De = /* @__PURE__ */ B(
|
|
290
288
|
Ee,
|
|
289
|
+
Ce,
|
|
290
|
+
$e,
|
|
291
291
|
!1,
|
|
292
292
|
null,
|
|
293
|
-
|
|
293
|
+
null,
|
|
294
294
|
null,
|
|
295
295
|
null
|
|
296
296
|
);
|
|
297
|
-
const
|
|
297
|
+
const Re = De.exports;
|
|
298
298
|
let q = 0;
|
|
299
|
-
const
|
|
299
|
+
const Be = {
|
|
300
300
|
beforeCreate() {
|
|
301
301
|
this.uuid = q.toString(), q += 1;
|
|
302
302
|
}
|
|
303
303
|
};
|
|
304
|
-
var
|
|
304
|
+
var Ie = function() {
|
|
305
305
|
var e = this, n = e._self._c;
|
|
306
|
-
return n("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"] ? n("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), n("path", { attrs: { fill: "#00112C",
|
|
307
|
-
},
|
|
308
|
-
Re,
|
|
306
|
+
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
|
+
}, Te = [], Ae = /* @__PURE__ */ B(
|
|
309
308
|
Be,
|
|
310
309
|
Ie,
|
|
310
|
+
Te,
|
|
311
311
|
!1,
|
|
312
312
|
null,
|
|
313
|
-
|
|
313
|
+
null,
|
|
314
314
|
null,
|
|
315
315
|
null
|
|
316
316
|
);
|
|
317
|
-
const
|
|
317
|
+
const Ne = Ae.exports, Me = F({
|
|
318
318
|
name: "dropdown-small-textbox",
|
|
319
|
-
components: { ChevronDownSmallIcon:
|
|
319
|
+
components: { ChevronDownSmallIcon: Re, ChevronUpSmallIcon: Ne, DropdownBaseTextbox: ve },
|
|
320
320
|
inheritAttrs: !1,
|
|
321
321
|
props: {
|
|
322
322
|
/**
|
|
@@ -390,17 +390,17 @@ const Ae = Te.exports, Ne = F({
|
|
|
390
390
|
},
|
|
391
391
|
emits: [$.OPEN, $.CLOSE],
|
|
392
392
|
setup(t, { emit: e }) {
|
|
393
|
-
const n =
|
|
394
|
-
[`b-dropdown-small-textbox--${
|
|
395
|
-
[`b-dropdown-small-textbox--${
|
|
396
|
-
[`b-dropdown-small-textbox--${
|
|
397
|
-
})), l =
|
|
393
|
+
const n = d(() => ({
|
|
394
|
+
[`b-dropdown-small-textbox--${N.DISABLED}`]: t.disabled,
|
|
395
|
+
[`b-dropdown-small-textbox--${N.READONLY}`]: t.readonly,
|
|
396
|
+
[`b-dropdown-small-textbox--${N.OPENED}`]: t.open
|
|
397
|
+
})), l = d(() => t.open && !t.disabled && !t.readonly), o = () => {
|
|
398
398
|
e($.OPEN);
|
|
399
|
-
},
|
|
399
|
+
}, a = () => {
|
|
400
400
|
e($.CLOSE);
|
|
401
401
|
}, r = {
|
|
402
|
-
[$.OPEN]:
|
|
403
|
-
[$.CLOSE]:
|
|
402
|
+
[$.OPEN]: o,
|
|
403
|
+
[$.CLOSE]: a
|
|
404
404
|
};
|
|
405
405
|
return {
|
|
406
406
|
// Values
|
|
@@ -411,106 +411,106 @@ const Ae = Te.exports, Ne = F({
|
|
|
411
411
|
};
|
|
412
412
|
}
|
|
413
413
|
});
|
|
414
|
-
var
|
|
414
|
+
var Pe = function() {
|
|
415
415
|
var e = this, n = e._self._c;
|
|
416
416
|
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
417
|
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
418
|
}, proxy: !0 }]) }, "dropdown-base-textbox", { ...e.$attrs, ...e.$props }, !1), e.listeners))], 1);
|
|
419
|
-
},
|
|
420
|
-
Ne,
|
|
419
|
+
}, Fe = [], ke = /* @__PURE__ */ B(
|
|
421
420
|
Me,
|
|
422
421
|
Pe,
|
|
422
|
+
Fe,
|
|
423
423
|
!1,
|
|
424
424
|
null,
|
|
425
425
|
"d9e6eff4",
|
|
426
426
|
null,
|
|
427
427
|
null
|
|
428
428
|
);
|
|
429
|
-
const
|
|
430
|
-
const l = t.value.find(({ value:
|
|
429
|
+
const Ke = ke.exports, We = ({ items: t, placeholder: e, selectedValue: n }) => {
|
|
430
|
+
const l = t.value.find(({ value: o }) => o === n.value);
|
|
431
431
|
return (l == null ? void 0 : l.label) || e.value || null;
|
|
432
|
-
},
|
|
432
|
+
}, ze = ({ selectedValues: t, items: e, placeholder: n }) => {
|
|
433
433
|
var l;
|
|
434
|
-
return !t.value || ((l = t.value) == null ? void 0 : l.length) === 0 ? n.value || null : t.value.map((
|
|
435
|
-
const { label:
|
|
436
|
-
return
|
|
434
|
+
return !t.value || ((l = t.value) == null ? void 0 : l.length) === 0 ? n.value || null : t.value.map((o) => {
|
|
435
|
+
const { label: a } = e.value.find(({ value: r }) => r === o);
|
|
436
|
+
return a;
|
|
437
437
|
}).join(", ");
|
|
438
|
-
},
|
|
438
|
+
}, Ue = ({ selectedValues: t, items: e, placeholder: n }) => {
|
|
439
439
|
var l;
|
|
440
|
-
return !t.value || !((l = t.value) != null && l.length) ? n.value || null : e.value.reduce((
|
|
441
|
-
if (
|
|
442
|
-
const r =
|
|
440
|
+
return !t.value || !((l = t.value) != null && l.length) ? n.value || null : e.value.reduce((o, a) => {
|
|
441
|
+
if (a.items) {
|
|
442
|
+
const r = a.items.filter(
|
|
443
443
|
(i) => t.value.includes(i.value)
|
|
444
444
|
);
|
|
445
|
-
r.length ===
|
|
445
|
+
r.length === a.items.length ? o.push(a.label) : r.forEach(({ label: i }) => o.push(i));
|
|
446
446
|
}
|
|
447
|
-
return t.value.includes(
|
|
447
|
+
return t.value.includes(a.value) && o.push(a.label), o;
|
|
448
448
|
}, []).join(", ");
|
|
449
|
-
},
|
|
450
|
-
const
|
|
449
|
+
}, je = ({ items: t, placeholder: e, value: n, multiple: l }) => {
|
|
450
|
+
const o = d(() => t.value.find((r) => {
|
|
451
451
|
var u;
|
|
452
452
|
return (u = r.items) == null ? void 0 : u.length;
|
|
453
453
|
}));
|
|
454
|
-
return
|
|
454
|
+
return d(() => l.value ? o.value ? Ue({ selectedValues: n, placeholder: e, items: t }) : ze({ selectedValues: n, items: t, placeholder: e }) : We({ items: t, placeholder: e, selectedValue: n }));
|
|
455
455
|
}, Z = (t) => {
|
|
456
456
|
var e;
|
|
457
457
|
(e = t.value.$children) == null || e[0].$refs.textbox.focus();
|
|
458
|
-
},
|
|
458
|
+
}, He = ({
|
|
459
459
|
inputContainerRef: t,
|
|
460
460
|
optionsContainerRef: e,
|
|
461
461
|
selectedValueIndex: n,
|
|
462
462
|
isDropdownOpen: l,
|
|
463
|
-
isDynamicFltering:
|
|
464
|
-
items:
|
|
463
|
+
isDynamicFltering: o,
|
|
464
|
+
items: a,
|
|
465
465
|
isMultiple: r
|
|
466
466
|
}, u, i, p) => {
|
|
467
|
-
const w = ({ detail:
|
|
468
|
-
|
|
469
|
-
var
|
|
470
|
-
r ? (
|
|
467
|
+
const w = ({ detail: f }) => {
|
|
468
|
+
f.preventDefault(), l.value || (i(), L(() => {
|
|
469
|
+
var c, b;
|
|
470
|
+
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
471
|
}));
|
|
472
|
-
},
|
|
473
|
-
|
|
474
|
-
var
|
|
475
|
-
(
|
|
472
|
+
}, y = ({ detail: f }) => {
|
|
473
|
+
f.preventDefault(), l.value || (i(), L(() => {
|
|
474
|
+
var c;
|
|
475
|
+
(c = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || c[0].$el.focus();
|
|
476
476
|
}));
|
|
477
477
|
}, x = () => {
|
|
478
478
|
l.value || (i(), L(() => {
|
|
479
|
-
var
|
|
479
|
+
var f, c;
|
|
480
480
|
if (r) {
|
|
481
|
-
const
|
|
482
|
-
(
|
|
481
|
+
const b = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children;
|
|
482
|
+
(f = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || f[b.length - 1].$children[a.length - 1].$el.focus();
|
|
483
483
|
} else
|
|
484
|
-
(
|
|
484
|
+
(c = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || c[a.length - 1].$el.focus();
|
|
485
485
|
}));
|
|
486
|
-
},
|
|
486
|
+
}, g = () => {
|
|
487
487
|
l.value && (p(), Z(t));
|
|
488
488
|
}, h = () => {
|
|
489
489
|
l.value || i(), L(() => {
|
|
490
|
-
var
|
|
491
|
-
(
|
|
490
|
+
var f;
|
|
491
|
+
(f = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || f[0].$el.focus();
|
|
492
492
|
});
|
|
493
|
-
}, S = ({ detail:
|
|
494
|
-
|
|
495
|
-
var
|
|
496
|
-
r ? (
|
|
493
|
+
}, S = ({ detail: f }) => {
|
|
494
|
+
f.preventDefault(), u(), l.value && L(() => {
|
|
495
|
+
var c, b;
|
|
496
|
+
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
497
|
});
|
|
498
498
|
}, v = () => {
|
|
499
499
|
u(), l.value && L(() => {
|
|
500
|
-
var
|
|
501
|
-
r ? (
|
|
500
|
+
var f, c;
|
|
501
|
+
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
502
|
});
|
|
503
503
|
};
|
|
504
|
-
return
|
|
505
|
-
...
|
|
504
|
+
return d(() => ({
|
|
505
|
+
...o.value ? {} : { [O.SPACE]: S },
|
|
506
506
|
[O.ENTER]: v,
|
|
507
507
|
[O.ARROW_DOWN]: w,
|
|
508
|
-
[O.ARROW_UP]:
|
|
508
|
+
[O.ARROW_UP]: y,
|
|
509
509
|
[O.END]: x,
|
|
510
|
-
[O.ESCAPE]:
|
|
510
|
+
[O.ESCAPE]: g,
|
|
511
511
|
[O.HOME]: h
|
|
512
512
|
}));
|
|
513
|
-
},
|
|
513
|
+
}, qe = ({ inputContainerRef: t, isDropdownOpen: e }, n) => {
|
|
514
514
|
const l = () => {
|
|
515
515
|
e.value && n(), L(() => {
|
|
516
516
|
Z(t);
|
|
@@ -523,34 +523,34 @@ const ke = Fe.exports, Ke = ({ items: t, placeholder: e, selectedValue: n }) =>
|
|
|
523
523
|
[s.SPACE]: l
|
|
524
524
|
};
|
|
525
525
|
};
|
|
526
|
-
function
|
|
527
|
-
const l =
|
|
526
|
+
function Ve(t, e, n) {
|
|
527
|
+
const l = _(t), o = _(e), a = (u, i = []) => i.flatMap((p) => p.label.toLocaleLowerCase().includes(u) ? [p, ...a(u, p.items)] : p.items ? [...a(u, p.items)] : []);
|
|
528
528
|
return V(l, () => {
|
|
529
529
|
n !== void 0 && n(l.value);
|
|
530
|
-
}),
|
|
530
|
+
}), d(() => {
|
|
531
531
|
if (!l.value || n !== void 0)
|
|
532
|
-
return
|
|
532
|
+
return o.value;
|
|
533
533
|
const u = l.value.toLocaleLowerCase();
|
|
534
|
-
return
|
|
534
|
+
return a(u, o.value);
|
|
535
535
|
});
|
|
536
536
|
}
|
|
537
|
-
const
|
|
537
|
+
const Je = {
|
|
538
538
|
"en-US": {
|
|
539
539
|
clearSearch: "Clear filter",
|
|
540
540
|
ariaLabelFallback: "Dropdown"
|
|
541
541
|
}
|
|
542
|
-
},
|
|
543
|
-
i18n: { messages:
|
|
542
|
+
}, Ze = F({
|
|
543
|
+
i18n: { messages: Je },
|
|
544
544
|
name: "b-dropdown",
|
|
545
545
|
components: {
|
|
546
|
-
BentoDropdownOptionsContainer:
|
|
547
|
-
BentoTypography:
|
|
548
|
-
DropdownInputDefault:
|
|
549
|
-
DropdownInputSmall:
|
|
546
|
+
BentoDropdownOptionsContainer: Le,
|
|
547
|
+
BentoTypography: de,
|
|
548
|
+
DropdownInputDefault: me,
|
|
549
|
+
DropdownInputSmall: Ke,
|
|
550
550
|
ErrorMessage: be,
|
|
551
|
-
FieldLabel:
|
|
551
|
+
FieldLabel: _e
|
|
552
552
|
},
|
|
553
|
-
directives: { BentoClickOutsideDirective:
|
|
553
|
+
directives: { BentoClickOutsideDirective: ye, BentoKeyboardNavigationDirective: pe },
|
|
554
554
|
props: {
|
|
555
555
|
/**
|
|
556
556
|
* @deprecated from version 2.0.0. Use the aria-label attribute instead.
|
|
@@ -559,6 +559,10 @@ const Ve = {
|
|
|
559
559
|
* Defines a string value that labels an interactive element.
|
|
560
560
|
*/
|
|
561
561
|
ariaLabel: { type: String, default: null },
|
|
562
|
+
/**
|
|
563
|
+
* Renders the dropdown with a condensed style.
|
|
564
|
+
*/
|
|
565
|
+
condensed: { type: Boolean, default: !1 },
|
|
562
566
|
/**
|
|
563
567
|
* Empty state props used with the inner empty state component which is displayed when no search results are found.
|
|
564
568
|
*/
|
|
@@ -669,8 +673,8 @@ const Ve = {
|
|
|
669
673
|
*/
|
|
670
674
|
size: {
|
|
671
675
|
type: String,
|
|
672
|
-
default:
|
|
673
|
-
validator: (t) => Object.values(
|
|
676
|
+
default: E.DEFAULT,
|
|
677
|
+
validator: (t) => Object.values(E).includes(t)
|
|
674
678
|
},
|
|
675
679
|
/**
|
|
676
680
|
* Adds a info icon next to the label to display the passed tooltip message.
|
|
@@ -705,68 +709,70 @@ const Ve = {
|
|
|
705
709
|
emits: ["input", s.SHOW_MORE],
|
|
706
710
|
setup(t, { attrs: e, emit: n, slots: l }) {
|
|
707
711
|
var U;
|
|
708
|
-
const { t:
|
|
712
|
+
const { t: o } = k(), a = _(null), r = _(null), u = _(null), i = _(!1), p = R("bento-dropdown-options-container"), w = R("dropdown-label"), y = R("dropdown-description"), x = R("dropdown-error"), { isReadOnly: g } = fe(C(t, "readonly")), h = _(e["aria-label"]), { ariaLabel: S } = J(t), v = ce({
|
|
709
713
|
ariaLabel: h.value,
|
|
710
714
|
// TODO: take this line away when the aria-label props is removed
|
|
711
715
|
label: S,
|
|
712
|
-
defaultFallback:
|
|
713
|
-
}), D =
|
|
716
|
+
defaultFallback: o("ariaLabelFallback")
|
|
717
|
+
}), D = d(() => ({
|
|
718
|
+
"b-dropdown--condensed": t.condensed
|
|
719
|
+
})), f = d(() => ({
|
|
714
720
|
"b-dropdown__description--error": !!t.errorMessage
|
|
715
|
-
})),
|
|
716
|
-
items:
|
|
717
|
-
multiple:
|
|
718
|
-
placeholder:
|
|
719
|
-
value:
|
|
720
|
-
}),
|
|
721
|
+
})), c = _(""), b = C(t, "items"), Y = Ve(c, b, (U = t == null ? void 0 : t.search) == null ? void 0 : U.searchEvent), I = d(() => t.dynamicFiltering && !!c.value), G = je({
|
|
722
|
+
items: b,
|
|
723
|
+
multiple: C(t, "multiple"),
|
|
724
|
+
placeholder: C(t, "placeholder"),
|
|
725
|
+
value: C(t, "value")
|
|
726
|
+
}), Q = d(() => t.size === E.DEFAULT), X = d(
|
|
721
727
|
() => t != null && t.multiple ? t.items.filter(
|
|
722
|
-
({ value:
|
|
723
|
-
) : t.items.find(({ value:
|
|
724
|
-
),
|
|
725
|
-
const
|
|
726
|
-
return
|
|
727
|
-
}),
|
|
728
|
-
var
|
|
729
|
-
return t.multiple ? (
|
|
730
|
-
}),
|
|
731
|
-
() => `${t.description ?
|
|
732
|
-
),
|
|
733
|
-
|
|
728
|
+
({ value: m }) => (t == null ? void 0 : t.value) && (t == null ? void 0 : t.value).includes(m)
|
|
729
|
+
) : t.items.find(({ value: m }) => m === (t == null ? void 0 : t.value))
|
|
730
|
+
), ee = d(() => {
|
|
731
|
+
const m = t.items.findIndex(({ value: re }) => t.value === re);
|
|
732
|
+
return m > 0 ? m : 0;
|
|
733
|
+
}), te = d(() => {
|
|
734
|
+
var m;
|
|
735
|
+
return t.multiple ? (m = t == null ? void 0 : t.value) == null ? void 0 : m.length : null;
|
|
736
|
+
}), ne = d(
|
|
737
|
+
() => `${t.description ? y : ""} ${t.errorMessage ? x : ""}`.trim() || null
|
|
738
|
+
), le = () => {
|
|
739
|
+
g.value || (i.value = !0);
|
|
734
740
|
}, T = () => {
|
|
735
741
|
i.value = !1;
|
|
736
742
|
}, K = () => {
|
|
737
|
-
|
|
738
|
-
},
|
|
739
|
-
I.value && (
|
|
740
|
-
}, W = (
|
|
741
|
-
t.multiple || (
|
|
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);
|
|
742
748
|
}, z = () => {
|
|
743
749
|
n(s.SHOW_MORE);
|
|
744
|
-
}, oe =
|
|
750
|
+
}, oe = He(
|
|
745
751
|
{
|
|
746
|
-
inputContainerRef:
|
|
752
|
+
inputContainerRef: a,
|
|
747
753
|
optionsContainerRef: u,
|
|
748
|
-
selectedValueIndex:
|
|
754
|
+
selectedValueIndex: ee,
|
|
749
755
|
isDropdownOpen: i,
|
|
750
|
-
isDynamicFltering:
|
|
756
|
+
isDynamicFltering: C(t, "dynamicFiltering"),
|
|
751
757
|
items: t.items,
|
|
752
758
|
isMultiple: t.multiple
|
|
753
759
|
},
|
|
754
760
|
K,
|
|
755
|
-
|
|
761
|
+
le,
|
|
756
762
|
T
|
|
757
|
-
),
|
|
763
|
+
), se = qe(
|
|
758
764
|
{
|
|
759
|
-
inputContainerRef:
|
|
765
|
+
inputContainerRef: a,
|
|
760
766
|
isDropdownOpen: i
|
|
761
767
|
},
|
|
762
768
|
T
|
|
763
|
-
),
|
|
769
|
+
), ie = {
|
|
764
770
|
[s.CLOSE_DROPDOWN]: T,
|
|
765
771
|
[s.SELECT]: W,
|
|
766
772
|
[s.SHOW_MORE]: z,
|
|
767
|
-
...
|
|
773
|
+
...se
|
|
768
774
|
};
|
|
769
|
-
return t.error &&
|
|
775
|
+
return t.error && ue(
|
|
770
776
|
'BentoDropdown "error" property',
|
|
771
777
|
`Use the BentoDropdown "errorMessage" property instead to indicate that there is a modifier error.
|
|
772
778
|
Having the field as "undefined" will hide/remove the error.
|
|
@@ -774,69 +780,70 @@ const Ve = {
|
|
|
774
780
|
"2.0.0"
|
|
775
781
|
), {
|
|
776
782
|
// Values
|
|
783
|
+
conditionalClasses: D,
|
|
777
784
|
computedAriaLabel: v,
|
|
778
|
-
additionalItemsSelected:
|
|
779
|
-
idDefaultSize:
|
|
785
|
+
additionalItemsSelected: te,
|
|
786
|
+
idDefaultSize: Q,
|
|
780
787
|
isDropdownOpen: i,
|
|
781
|
-
displayValue:
|
|
788
|
+
displayValue: G,
|
|
782
789
|
dropdownOptionsContainerId: p,
|
|
783
|
-
filteredItems:
|
|
790
|
+
filteredItems: Y,
|
|
784
791
|
isSearching: I,
|
|
785
|
-
isReadOnly:
|
|
786
|
-
searchTerm:
|
|
792
|
+
isReadOnly: g,
|
|
793
|
+
searchTerm: c,
|
|
787
794
|
labelId: w,
|
|
788
|
-
descriptionId:
|
|
795
|
+
descriptionId: y,
|
|
789
796
|
errorId: x,
|
|
790
|
-
ariaDescribedBy:
|
|
791
|
-
selectedValueItem:
|
|
797
|
+
ariaDescribedBy: ne,
|
|
798
|
+
selectedValueItem: X,
|
|
792
799
|
// Conciliation of Vue2 $scopedSlots and Vue3 $scopes.
|
|
793
800
|
// The setup method and the "useSlots" composible define
|
|
794
801
|
// { slots } as a proxy of $scopedSlots and $scopes in their
|
|
795
802
|
// respective Vue version. Source: https://github.com/vuejs/composition-api/issues/84#issuecomment-524885445
|
|
796
803
|
slots: l,
|
|
797
|
-
descriptionConditionalClasses:
|
|
804
|
+
descriptionConditionalClasses: f,
|
|
798
805
|
// Refs
|
|
799
|
-
inputContainerRef:
|
|
806
|
+
inputContainerRef: a,
|
|
800
807
|
inputContainerRefWrapper: r,
|
|
801
808
|
optionsContainerRef: u,
|
|
802
809
|
// Events
|
|
803
|
-
closeOpenedDropdown:
|
|
810
|
+
closeOpenedDropdown: ae,
|
|
804
811
|
toggleDropdown: K,
|
|
805
812
|
onOptionSelected: W,
|
|
806
813
|
emitShowMoreEvent: z,
|
|
807
814
|
textboxKeyboardNavigationListeners: oe,
|
|
808
|
-
listboxListeners:
|
|
815
|
+
listboxListeners: ie
|
|
809
816
|
};
|
|
810
817
|
}
|
|
811
818
|
});
|
|
812
|
-
var
|
|
819
|
+
var Ye = function() {
|
|
813
820
|
var l;
|
|
814
821
|
var e = this, n = e._self._c;
|
|
815
|
-
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" }, [e.label ? n("field-label", { attrs: { id: e.labelId, 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: { 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(
|
|
816
|
-
e.searchTerm =
|
|
817
|
-
}, open: e.toggleDropdown, close: e.toggleDropdown }, scopedSlots: e._u([e._l(e.slots, function(
|
|
818
|
-
return { key:
|
|
819
|
-
return [e._t(
|
|
822
|
+
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) {
|
|
823
|
+
e.searchTerm = o;
|
|
824
|
+
}, open: e.toggleDropdown, close: e.toggleDropdown }, scopedSlots: e._u([e._l(e.slots, function(o, a) {
|
|
825
|
+
return { key: a, fn: function(r) {
|
|
826
|
+
return [e._t(a, null, null, r)];
|
|
820
827
|
} };
|
|
821
|
-
})], 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(
|
|
822
|
-
return { key:
|
|
823
|
-
return [e._t(
|
|
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) {
|
|
829
|
+
return { key: a, fn: function(r) {
|
|
830
|
+
return [e._t(a, null, null, r)];
|
|
824
831
|
} };
|
|
825
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._v(" " + e._s(e.description) + " ")]) : e._e()], 1);
|
|
826
|
-
},
|
|
827
|
-
Je,
|
|
833
|
+
}, Ge = [], Qe = /* @__PURE__ */ B(
|
|
828
834
|
Ze,
|
|
829
835
|
Ye,
|
|
836
|
+
Ge,
|
|
830
837
|
!1,
|
|
831
838
|
null,
|
|
832
|
-
"
|
|
839
|
+
"16755398",
|
|
833
840
|
null,
|
|
834
841
|
null
|
|
835
842
|
);
|
|
836
|
-
const
|
|
843
|
+
const pt = Qe.exports;
|
|
837
844
|
export {
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
845
|
+
pt as B,
|
|
846
|
+
E as a,
|
|
847
|
+
Ve as u
|
|
841
848
|
};
|
|
842
|
-
//# sourceMappingURL=dropdown.
|
|
849
|
+
//# sourceMappingURL=dropdown.6461dbe3.js.map
|