@adyen/bento-vue2 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +2 -0
- package/dist/@types/packages/core/src/components/button/button.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +11 -0
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +7 -2
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +28 -18
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +25 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +13 -1
- package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types.d.ts +6 -2
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +153 -12
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +18 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +320 -21
- 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 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +30 -24
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.types.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +11 -1
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.types.d.ts +13 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.types.d.ts +14 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-memory.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-memory.types.d.ts +22 -0
- package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/field-label/field-label.vue.d.ts +48 -0
- package/dist/@types/packages/vue2/src/components/internal/field-label/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/grid-layout/grid-layout.vue.d.ts +11 -0
- package/dist/@types/packages/vue2/src/components/internal/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/popover/popover.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +16 -22
- package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/structured-list/structured-list.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/structured-list/structured-list.vue.d.ts +20 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +19 -2
- package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +4 -2
- package/dist/@types/packages/vue2/src/components/timeline/timeline.vue.d.ts +18 -2
- package/dist/@types/packages/vue2/src/index.d.ts +1 -0
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +112 -93
- package/dist/action-bar.js.map +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/field-label.css +1 -0
- package/dist/assets/grid-layout.css +1 -1
- package/dist/assets/index.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/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/loading-button.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +38 -35
- package/dist/button.js.map +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +5 -5
- package/dist/chunks/{base-modal.88e7b9d4.js → base-modal.31634fe8.js} +60 -49
- package/dist/chunks/base-modal.31634fe8.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.a5413243.js → button-actions-with-menu.5faea13e.js} +5 -5
- package/dist/chunks/{button-actions-with-menu.a5413243.js.map → button-actions-with-menu.5faea13e.js.map} +1 -1
- package/dist/chunks/button.e09d5980.js.map +1 -1
- package/dist/chunks/calendar.47e9e755.js +959 -0
- package/dist/chunks/calendar.47e9e755.js.map +1 -0
- package/dist/chunks/{checkbox.5343e28e.js → checkbox.2277450e.js} +67 -56
- package/dist/chunks/checkbox.2277450e.js.map +1 -0
- package/dist/chunks/controls-group.6c5bfccd.js +79 -0
- package/dist/chunks/controls-group.6c5bfccd.js.map +1 -0
- package/dist/chunks/{copy.346eadb1.js → copy.a85c2e9f.js} +3 -3
- package/dist/chunks/{copy.346eadb1.js.map → copy.a85c2e9f.js.map} +1 -1
- package/dist/chunks/{dropdown.f1253a54.js → dropdown.ce937989.js} +200 -196
- package/dist/chunks/dropdown.ce937989.js.map +1 -0
- package/dist/chunks/field-label.330edb60.js +107 -0
- package/dist/chunks/field-label.330edb60.js.map +1 -0
- package/dist/chunks/{grid-layout.b7e0d964.js → grid-layout.a806acb2.js} +36 -27
- package/dist/chunks/grid-layout.a806acb2.js.map +1 -0
- package/dist/chunks/index.210d2169.js +290 -0
- package/dist/chunks/index.210d2169.js.map +1 -0
- package/dist/chunks/{index.8ac70774.js → index.66503760.js} +3 -3
- package/dist/chunks/{index.8ac70774.js.map → index.66503760.js.map} +1 -1
- package/dist/chunks/{index.2625175a.js → index.86fc63ca.js} +30 -28
- package/dist/chunks/{index.2625175a.js.map → index.86fc63ca.js.map} +1 -1
- package/dist/chunks/{index.a201f750.js → index.89942d3a.js} +4 -5
- package/dist/chunks/{index.a201f750.js.map → index.89942d3a.js.map} +1 -1
- package/dist/chunks/index.a5de5242.js +130 -0
- package/dist/chunks/index.a5de5242.js.map +1 -0
- package/dist/chunks/index.a99ffd48.js +634 -0
- package/dist/chunks/index.a99ffd48.js.map +1 -0
- package/dist/chunks/index.d80206ed.js +10 -0
- package/dist/chunks/index.d80206ed.js.map +1 -0
- package/dist/chunks/{index.37283390.js → index.d8bd7596.js} +96 -99
- package/dist/chunks/{index.37283390.js.map → index.d8bd7596.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.6a09e8e2.js → listbox-option-tag.97af47fc.js} +6 -7
- package/dist/chunks/{listbox-option-tag.6a09e8e2.js.map → listbox-option-tag.97af47fc.js.map} +1 -1
- package/dist/chunks/{listbox.73c38f38.js → listbox.d039b178.js} +5 -6
- package/dist/chunks/{listbox.73c38f38.js.map → listbox.d039b178.js.map} +1 -1
- package/dist/chunks/loading-button.9a9cbbad.js +89 -0
- package/dist/chunks/loading-button.9a9cbbad.js.map +1 -0
- package/dist/chunks/{tooltip.104e5fac.js → tooltip.ecd0f707.js} +2 -2
- package/dist/chunks/{tooltip.104e5fac.js.map → tooltip.ecd0f707.js.map} +1 -1
- package/dist/code-snippet.js +4 -4
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +1 -1
- package/dist/data-grid.js +563 -541
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +83 -80
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/empty-state.js +1 -1
- package/dist/filter-bar.js +13 -12
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header.js +63 -67
- package/dist/header.js.map +1 -1
- package/dist/index.js +211 -209
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +57 -55
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +13 -12
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +2 -2
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +3 -305
- package/dist/popover.js.map +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +3 -3
- package/dist/search-bar.js +2 -2
- package/dist/segmented-control.js +2 -2
- package/dist/sidepanel.js +2 -2
- package/dist/status.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +2 -2
- package/dist/textarea.js +59 -56
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +226 -173
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +7 -7
- package/dist/web-types.json +519 -393
- package/package.json +3 -3
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +0 -118
- package/dist/assets/error-message.css +0 -1
- package/dist/chunks/base-modal.88e7b9d4.js.map +0 -1
- package/dist/chunks/calendar.24d0ac04.js +0 -821
- package/dist/chunks/calendar.24d0ac04.js.map +0 -1
- package/dist/chunks/checkbox.5343e28e.js.map +0 -1
- package/dist/chunks/controls-group.2a21bd83.js +0 -87
- package/dist/chunks/controls-group.2a21bd83.js.map +0 -1
- package/dist/chunks/dropdown.f1253a54.js.map +0 -1
- package/dist/chunks/error-message.8302a46c.js +0 -47
- package/dist/chunks/error-message.8302a46c.js.map +0 -1
- package/dist/chunks/grid-layout.b7e0d964.js.map +0 -1
- package/dist/chunks/index.d6b5f5e1.js +0 -112
- package/dist/chunks/index.d6b5f5e1.js.map +0 -1
- package/dist/chunks/index.e566354f.js +0 -532
- package/dist/chunks/index.e566354f.js.map +0 -1
- package/dist/chunks/loading-button.c65682d6.js +0 -86
- package/dist/chunks/loading-button.c65682d6.js.map +0 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ref as m, watch as V, computed as c, defineComponent as F, toRefs as J, nextTick as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { g as
|
|
6
|
-
import { u as k } from "./i18n.155748d6.js";
|
|
1
|
+
import { ref as m, watch as V, computed as c, defineComponent as F, toRefs as J, nextTick as L, toRef as E } from "vue";
|
|
2
|
+
import { B as re, d as de } from "./index.965ac1af.js";
|
|
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";
|
|
5
|
+
import { g as R } from "./unique-id.a2a2b458.js";
|
|
7
6
|
import { u as fe } from "./aria-label.ac9651a5.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { a as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
7
|
+
import { u as k } from "./i18n.155748d6.js";
|
|
8
|
+
import { u as pe } from "./use-form-layout-loading.d03e5d48.js";
|
|
9
|
+
import { a as s, B as M, b as P } from "./listbox.d039b178.js";
|
|
10
|
+
import { B as O, a as ve } from "./keyboard-navigation.ca47dfa8.js";
|
|
11
|
+
import { a as N } from "./index.66503760.js";
|
|
12
|
+
import { a as j } from "./index.210d2169.js";
|
|
13
|
+
import { E as be, F as me } from "./field-label.330edb60.js";
|
|
14
|
+
import { B as _e } from "./directive.0408e565.js";
|
|
15
15
|
import "../assets/dropdown.css";
|
|
16
|
-
var
|
|
17
|
-
const
|
|
16
|
+
var C = /* @__PURE__ */ ((t) => (t.DEFAULT = "DropdownInputDefault", t.SMALL = "DropdownInputSmall", t))(C || {});
|
|
17
|
+
const ye = {
|
|
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 = m(t.value), { t:
|
|
23
|
+
}, ge = (t, e, n) => {
|
|
24
|
+
const l = m(t.value), { t: a } = k();
|
|
25
25
|
V(t, () => {
|
|
26
26
|
l.value = t.value;
|
|
27
27
|
});
|
|
28
|
-
const
|
|
28
|
+
const o = c(
|
|
29
29
|
() => JSON.stringify(l.value) === JSON.stringify(t.value)
|
|
30
30
|
), r = () => {
|
|
31
31
|
n(s.SELECT, l.value), n(s.CLOSE_DROPDOWN);
|
|
@@ -33,32 +33,32 @@ const _e = {
|
|
|
33
33
|
l.value = t.value, n(s.CLOSE_DROPDOWN);
|
|
34
34
|
}, i = c(() => [
|
|
35
35
|
{
|
|
36
|
-
title:
|
|
36
|
+
title: a("apply"),
|
|
37
37
|
event: r,
|
|
38
|
-
disabled:
|
|
38
|
+
disabled: o.value
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
|
-
title:
|
|
41
|
+
title: a("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
|
-
|
|
48
|
-
}, x = (v) => {
|
|
49
|
-
f(v), n(s.ENTER);
|
|
47
|
+
p(v), n(s.TAB);
|
|
50
48
|
}, _ = (v) => {
|
|
51
|
-
|
|
49
|
+
p(v), n(s.ENTER);
|
|
50
|
+
}, x = (v) => {
|
|
51
|
+
p(v), n(s.SPACE);
|
|
52
52
|
}, y = () => {
|
|
53
53
|
u(), n(s.ESCAPE);
|
|
54
54
|
}, h = () => {
|
|
55
55
|
n(s.SHOW_MORE);
|
|
56
56
|
}, S = {
|
|
57
|
-
[s.SELECT]:
|
|
57
|
+
[s.SELECT]: p,
|
|
58
58
|
[s.SHOW_MORE]: h,
|
|
59
59
|
[s.TAB]: w,
|
|
60
|
-
[s.SPACE]:
|
|
61
|
-
[s.ENTER]:
|
|
60
|
+
[s.SPACE]: x,
|
|
61
|
+
[s.ENTER]: _
|
|
62
62
|
};
|
|
63
63
|
return {
|
|
64
64
|
// Values
|
|
@@ -68,13 +68,13 @@ const _e = {
|
|
|
68
68
|
listeners: S,
|
|
69
69
|
onEscapeKey: y
|
|
70
70
|
};
|
|
71
|
-
},
|
|
72
|
-
i18n: { messages:
|
|
71
|
+
}, xe = F({
|
|
72
|
+
i18n: { messages: ye },
|
|
73
73
|
name: "bento-dropdown-options-container",
|
|
74
74
|
components: {
|
|
75
75
|
BentoListbox: M,
|
|
76
76
|
PopperContainer: N,
|
|
77
|
-
BentoPopover:
|
|
77
|
+
BentoPopover: j
|
|
78
78
|
},
|
|
79
79
|
props: {
|
|
80
80
|
/**
|
|
@@ -118,8 +118,8 @@ const _e = {
|
|
|
118
118
|
*/
|
|
119
119
|
inputSize: {
|
|
120
120
|
type: String,
|
|
121
|
-
default:
|
|
122
|
-
validator: (t) => Object.values(
|
|
121
|
+
default: C.DEFAULT,
|
|
122
|
+
validator: (t) => Object.values(C).includes(t)
|
|
123
123
|
},
|
|
124
124
|
/**
|
|
125
125
|
* The option elements to populate the dropdown with.
|
|
@@ -194,33 +194,34 @@ const _e = {
|
|
|
194
194
|
s.TAB
|
|
195
195
|
],
|
|
196
196
|
setup(t, { emit: e, slots: n }) {
|
|
197
|
-
|
|
198
|
-
const { selectedValue: l, multiple: o } = J(t), a = m(null), { t: r } = k(), u = c(() => t.open && !t.disabled), i = c(() => r("noOptionsMatchThisSearch")), f = {
|
|
199
|
-
"min-width": `${(d = t == null ? void 0 : t.targetElement) == null ? void 0 : d.clientWidth}px`,
|
|
200
|
-
"max-width": "min(500px, 95%)"
|
|
201
|
-
}, w = c(() => ({
|
|
197
|
+
const { selectedValue: l, multiple: a } = J(t), o = m(null), { t: r } = k(), u = c(() => t.open && !t.disabled), i = c(() => r("noOptionsMatchThisSearch")), p = c(() => ({
|
|
202
198
|
"b-dropdown-options-container--single": !(t != null && t.multiple)
|
|
203
|
-
})),
|
|
204
|
-
"b-dropdown-options-container__listbox--small": t.inputSize ===
|
|
199
|
+
})), w = c(() => ({
|
|
200
|
+
"b-dropdown-options-container__listbox--small": t.inputSize === C.SMALL,
|
|
205
201
|
"b-dropdown-options-container__listbox--single": !(t != null && t.multiple)
|
|
206
|
-
})), { actions: _, internalSelectedValue:
|
|
202
|
+
})), { actions: _, internalSelectedValue: x, listeners: y, onEscapeKey: h } = ge(
|
|
207
203
|
l,
|
|
208
|
-
|
|
204
|
+
a,
|
|
209
205
|
e
|
|
210
|
-
),
|
|
211
|
-
() => t != null && t.multiple ?
|
|
212
|
-
),
|
|
213
|
-
|
|
206
|
+
), S = c(
|
|
207
|
+
() => t != null && t.multiple ? j : N
|
|
208
|
+
), v = c(() => {
|
|
209
|
+
var d;
|
|
210
|
+
const D = {
|
|
211
|
+
"min-width": `${(d = t == null ? void 0 : t.targetElement) == null ? void 0 : d.clientWidth}px`,
|
|
212
|
+
"max-width": "min(500px, 95%)"
|
|
213
|
+
};
|
|
214
|
+
return t != null && t.multiple ? {
|
|
214
215
|
actionsLayout: "space-between",
|
|
215
216
|
actions: _.value,
|
|
216
217
|
divider: !0,
|
|
217
218
|
fallbackPosition: ["top-start"],
|
|
218
|
-
id:
|
|
219
|
+
id: R(`dropdown-options-${t.id}`),
|
|
219
220
|
open: t.open,
|
|
220
221
|
position: "bottom-start",
|
|
221
222
|
style: {
|
|
222
223
|
width: "auto",
|
|
223
|
-
...
|
|
224
|
+
...D
|
|
224
225
|
},
|
|
225
226
|
targetElement: t.targetElement
|
|
226
227
|
} : {
|
|
@@ -229,93 +230,93 @@ const _e = {
|
|
|
229
230
|
position: "bottom-start",
|
|
230
231
|
style: {
|
|
231
232
|
display: u.value ? "block" : "none",
|
|
232
|
-
...
|
|
233
|
+
...D
|
|
233
234
|
},
|
|
234
235
|
targetElement: t.targetElement
|
|
235
|
-
}
|
|
236
|
-
);
|
|
236
|
+
};
|
|
237
|
+
});
|
|
237
238
|
return {
|
|
238
239
|
// Values
|
|
239
240
|
isDropdownOpen: u,
|
|
240
|
-
conditionalClasses:
|
|
241
|
-
conditionalListboxClasses:
|
|
241
|
+
conditionalClasses: p,
|
|
242
|
+
conditionalListboxClasses: w,
|
|
242
243
|
noResultsMessage: i,
|
|
243
244
|
slots: n,
|
|
244
245
|
actions: _,
|
|
245
|
-
internalSelectedValue:
|
|
246
|
+
internalSelectedValue: x,
|
|
246
247
|
// Component wrapper
|
|
247
|
-
popperContainerOrPopoverComponent:
|
|
248
|
-
popperContainerOrPopoverProps:
|
|
248
|
+
popperContainerOrPopoverComponent: S,
|
|
249
|
+
popperContainerOrPopoverProps: v,
|
|
249
250
|
// Refs
|
|
250
|
-
dropdownOptionsListboxRef:
|
|
251
|
+
dropdownOptionsListboxRef: o,
|
|
251
252
|
// Events
|
|
252
|
-
onEscapeKey:
|
|
253
|
-
listeners:
|
|
253
|
+
onEscapeKey: h,
|
|
254
|
+
listeners: y
|
|
254
255
|
};
|
|
255
256
|
}
|
|
256
257
|
});
|
|
257
|
-
var
|
|
258
|
+
var we = function() {
|
|
258
259
|
var e = this, n = e._self._c;
|
|
259
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) {
|
|
260
261
|
return !l.type.indexOf("key") && e._k(l.keyCode, "esc", 27, l.key, ["Esc", "Escape"]) ? null : e.onEscapeKey.apply(null, arguments);
|
|
261
|
-
} } }, [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,
|
|
262
|
-
return { key:
|
|
263
|
-
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, a) {
|
|
263
|
+
return { key: a, fn: function(o) {
|
|
264
|
+
return [e._t(a, null, null, o)];
|
|
264
265
|
} };
|
|
265
266
|
})], null, !0) }, e.listeners))], 1)]);
|
|
266
|
-
},
|
|
267
|
-
ge,
|
|
267
|
+
}, he = [], Se = /* @__PURE__ */ B(
|
|
268
268
|
xe,
|
|
269
269
|
we,
|
|
270
|
+
he,
|
|
270
271
|
!1,
|
|
271
272
|
null,
|
|
272
|
-
"
|
|
273
|
+
"c9901f59",
|
|
273
274
|
null,
|
|
274
275
|
null
|
|
275
276
|
);
|
|
276
|
-
const
|
|
277
|
-
let
|
|
278
|
-
const
|
|
277
|
+
const Oe = Se.exports;
|
|
278
|
+
let H = 0;
|
|
279
|
+
const Le = {
|
|
279
280
|
beforeCreate() {
|
|
280
|
-
this.uuid =
|
|
281
|
+
this.uuid = H.toString(), H += 1;
|
|
281
282
|
}
|
|
282
283
|
};
|
|
283
284
|
var Ce = function() {
|
|
284
285
|
var e = this, n = e._self._c;
|
|
285
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", "fill-rule": "evenodd", d: "M4.4697 5.96967C4.76259 5.67678 5.23747 5.67678 5.53036 5.96967L8.00003 8.43934L10.4697 5.96967C10.7626 5.67678 11.2375 5.67678 11.5304 5.96967C11.8233 6.26256 11.8233 6.73744 11.5304 7.03033L8.53036 10.0303C8.23747 10.3232 7.76259 10.3232 7.4697 10.0303L4.4697 7.03033C4.17681 6.73744 4.17681 6.26256 4.4697 5.96967Z", "clip-rule": "evenodd" } })]);
|
|
286
|
-
},
|
|
287
|
-
Oe,
|
|
288
|
-
Ce,
|
|
287
|
+
}, Ee = [], $e = /* @__PURE__ */ B(
|
|
289
288
|
Le,
|
|
289
|
+
Ce,
|
|
290
|
+
Ee,
|
|
290
291
|
!1,
|
|
291
292
|
null,
|
|
292
293
|
"18645fe6",
|
|
293
294
|
null,
|
|
294
295
|
null
|
|
295
296
|
);
|
|
296
|
-
const
|
|
297
|
-
let
|
|
298
|
-
const
|
|
297
|
+
const De = $e.exports;
|
|
298
|
+
let q = 0;
|
|
299
|
+
const Re = {
|
|
299
300
|
beforeCreate() {
|
|
300
|
-
this.uuid =
|
|
301
|
+
this.uuid = q.toString(), q += 1;
|
|
301
302
|
}
|
|
302
303
|
};
|
|
303
|
-
var
|
|
304
|
+
var Be = function() {
|
|
304
305
|
var e = this, n = e._self._c;
|
|
305
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", "fill-rule": "evenodd", d: "M11.5303 10.0303C11.2374 10.3232 10.7626 10.3232 10.4697 10.0303L8 7.56066L5.53033 10.0303C5.23744 10.3232 4.76256 10.3232 4.46967 10.0303C4.17678 9.73744 4.17678 9.26256 4.46967 8.96967L7.46967 5.96967C7.61032 5.82902 7.80109 5.75 8 5.75C8.19891 5.75 8.38968 5.82902 8.53033 5.96967L11.5303 8.96967C11.8232 9.26256 11.8232 9.73744 11.5303 10.0303Z", "clip-rule": "evenodd" } })]);
|
|
306
|
-
},
|
|
307
|
-
De,
|
|
307
|
+
}, Ie = [], Te = /* @__PURE__ */ B(
|
|
308
308
|
Re,
|
|
309
309
|
Be,
|
|
310
|
+
Ie,
|
|
310
311
|
!1,
|
|
311
312
|
null,
|
|
312
313
|
"6f20d431",
|
|
313
314
|
null,
|
|
314
315
|
null
|
|
315
316
|
);
|
|
316
|
-
const
|
|
317
|
+
const Ae = Te.exports, Ne = F({
|
|
317
318
|
name: "dropdown-small-textbox",
|
|
318
|
-
components: { ChevronDownSmallIcon:
|
|
319
|
+
components: { ChevronDownSmallIcon: De, ChevronUpSmallIcon: Ae, DropdownBaseTextbox: ue },
|
|
319
320
|
inheritAttrs: !1,
|
|
320
321
|
props: {
|
|
321
322
|
/**
|
|
@@ -393,13 +394,13 @@ const Te = Ie.exports, Ae = F({
|
|
|
393
394
|
[`b-dropdown-small-textbox--${A.DISABLED}`]: t.disabled,
|
|
394
395
|
[`b-dropdown-small-textbox--${A.READONLY}`]: t.readonly,
|
|
395
396
|
[`b-dropdown-small-textbox--${A.OPENED}`]: t.open
|
|
396
|
-
})), l = c(() => t.open && !t.disabled && !t.readonly),
|
|
397
|
+
})), l = c(() => t.open && !t.disabled && !t.readonly), a = () => {
|
|
397
398
|
e($.OPEN);
|
|
398
|
-
},
|
|
399
|
+
}, o = () => {
|
|
399
400
|
e($.CLOSE);
|
|
400
401
|
}, r = {
|
|
401
|
-
[$.OPEN]:
|
|
402
|
-
[$.CLOSE]:
|
|
402
|
+
[$.OPEN]: a,
|
|
403
|
+
[$.CLOSE]: o
|
|
403
404
|
};
|
|
404
405
|
return {
|
|
405
406
|
// Values
|
|
@@ -410,66 +411,47 @@ const Te = Ie.exports, Ae = F({
|
|
|
410
411
|
};
|
|
411
412
|
}
|
|
412
413
|
});
|
|
413
|
-
var
|
|
414
|
+
var Me = function() {
|
|
414
415
|
var e = this, n = e._self._c;
|
|
415
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() {
|
|
416
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)];
|
|
417
418
|
}, proxy: !0 }]) }, "dropdown-base-textbox", { ...e.$attrs, ...e.$props }, !1), e.listeners))], 1);
|
|
418
|
-
},
|
|
419
|
-
Ae,
|
|
419
|
+
}, Pe = [], Fe = /* @__PURE__ */ B(
|
|
420
420
|
Ne,
|
|
421
421
|
Me,
|
|
422
|
+
Pe,
|
|
422
423
|
!1,
|
|
423
424
|
null,
|
|
424
425
|
"d9e6eff4",
|
|
425
426
|
null,
|
|
426
427
|
null
|
|
427
428
|
);
|
|
428
|
-
const
|
|
429
|
-
|
|
430
|
-
const l = m(t), o = m(e), a = (u, i = []) => i.flatMap((f) => f.label.toLocaleLowerCase().includes(u) ? [f, ...a(u, f.items)] : f.items ? [...a(u, f.items)] : []);
|
|
431
|
-
return V(l, () => {
|
|
432
|
-
n !== void 0 && n(l.value);
|
|
433
|
-
}), c(() => {
|
|
434
|
-
if (!l.value || n !== void 0)
|
|
435
|
-
return o.value;
|
|
436
|
-
const u = l.value.toLocaleLowerCase();
|
|
437
|
-
return a(u, o.value);
|
|
438
|
-
});
|
|
439
|
-
}
|
|
440
|
-
const Ke = ({ items: t, placeholder: e, selectedValue: n }) => {
|
|
441
|
-
const l = t.value.find(({ value: o }) => o === n.value);
|
|
429
|
+
const ke = Fe.exports, Ke = ({ items: t, placeholder: e, selectedValue: n }) => {
|
|
430
|
+
const l = t.value.find(({ value: a }) => a === n.value);
|
|
442
431
|
return (l == null ? void 0 : l.label) || e.value || null;
|
|
443
432
|
}, We = ({ selectedValues: t, items: e, placeholder: n }) => {
|
|
444
433
|
var l;
|
|
445
|
-
return !t.value || ((l = t.value) == null ? void 0 : l.length) === 0 ? n.value || null : t.value.map((
|
|
446
|
-
const { label:
|
|
447
|
-
return
|
|
434
|
+
return !t.value || ((l = t.value) == null ? void 0 : l.length) === 0 ? n.value || null : t.value.map((a) => {
|
|
435
|
+
const { label: o } = e.value.find(({ value: r }) => r === a);
|
|
436
|
+
return o;
|
|
448
437
|
}).join(", ");
|
|
449
438
|
}, ze = ({ selectedValues: t, items: e, placeholder: n }) => {
|
|
450
439
|
var l;
|
|
451
|
-
return !t.value || !((l = t.value) != null && l.length) ? n.value || null : e.value.reduce((
|
|
452
|
-
if (
|
|
453
|
-
const r =
|
|
440
|
+
return !t.value || !((l = t.value) != null && l.length) ? n.value || null : e.value.reduce((a, o) => {
|
|
441
|
+
if (o.items) {
|
|
442
|
+
const r = o.items.filter(
|
|
454
443
|
(i) => t.value.includes(i.value)
|
|
455
444
|
);
|
|
456
|
-
r.length ===
|
|
445
|
+
r.length === o.items.length ? a.push(o.label) : r.forEach(({ label: i }) => a.push(i));
|
|
457
446
|
}
|
|
458
|
-
return t.value.includes(
|
|
447
|
+
return t.value.includes(o.value) && a.push(o.label), a;
|
|
459
448
|
}, []).join(", ");
|
|
460
|
-
},
|
|
461
|
-
const
|
|
449
|
+
}, Ue = ({ items: t, placeholder: e, value: n, multiple: l }) => {
|
|
450
|
+
const a = c(() => t.value.find((r) => {
|
|
462
451
|
var u;
|
|
463
452
|
return (u = r.items) == null ? void 0 : u.length;
|
|
464
453
|
}));
|
|
465
|
-
return c(() => l.value ?
|
|
466
|
-
}, Ue = {
|
|
467
|
-
"en-US": {
|
|
468
|
-
optional: "optional",
|
|
469
|
-
required: "required",
|
|
470
|
-
clearSearch: "Clear filter",
|
|
471
|
-
ariaLabelFallback: "Dropdown"
|
|
472
|
-
}
|
|
454
|
+
return c(() => l.value ? a.value ? ze({ selectedValues: n, placeholder: e, items: t }) : We({ selectedValues: n, items: t, placeholder: e }) : Ke({ items: t, placeholder: e, selectedValue: n }));
|
|
473
455
|
}, Z = (t) => {
|
|
474
456
|
var e;
|
|
475
457
|
(e = t.value.$children) == null || e[0].$refs.textbox.focus();
|
|
@@ -478,59 +460,59 @@ const Ke = ({ items: t, placeholder: e, selectedValue: n }) => {
|
|
|
478
460
|
optionsContainerRef: e,
|
|
479
461
|
selectedValueIndex: n,
|
|
480
462
|
isDropdownOpen: l,
|
|
481
|
-
isDynamicFltering:
|
|
482
|
-
items:
|
|
463
|
+
isDynamicFltering: a,
|
|
464
|
+
items: o,
|
|
483
465
|
isMultiple: r
|
|
484
|
-
}, u, i,
|
|
466
|
+
}, u, i, p) => {
|
|
485
467
|
const w = ({ detail: d }) => {
|
|
486
|
-
d.preventDefault(), l.value || (i(),
|
|
487
|
-
var
|
|
488
|
-
r ? (
|
|
468
|
+
d.preventDefault(), l.value || (i(), L(() => {
|
|
469
|
+
var f, g;
|
|
470
|
+
r ? (f = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || f[0].$el.focus() : (g = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || g[n.value].$el.focus();
|
|
489
471
|
}));
|
|
490
|
-
},
|
|
491
|
-
d.preventDefault(), l.value || (i(),
|
|
492
|
-
var
|
|
493
|
-
(
|
|
472
|
+
}, _ = ({ detail: d }) => {
|
|
473
|
+
d.preventDefault(), l.value || (i(), L(() => {
|
|
474
|
+
var f;
|
|
475
|
+
(f = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || f[0].$el.focus();
|
|
494
476
|
}));
|
|
495
|
-
},
|
|
496
|
-
l.value || (i(),
|
|
497
|
-
var d,
|
|
477
|
+
}, x = () => {
|
|
478
|
+
l.value || (i(), L(() => {
|
|
479
|
+
var d, f;
|
|
498
480
|
if (r) {
|
|
499
481
|
const g = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children;
|
|
500
|
-
(d = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || d[g.length - 1].$children[
|
|
482
|
+
(d = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || d[g.length - 1].$children[o.length - 1].$el.focus();
|
|
501
483
|
} else
|
|
502
|
-
(
|
|
484
|
+
(f = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || f[o.length - 1].$el.focus();
|
|
503
485
|
}));
|
|
504
486
|
}, y = () => {
|
|
505
|
-
l.value && (
|
|
487
|
+
l.value && (p(), Z(t));
|
|
506
488
|
}, h = () => {
|
|
507
|
-
l.value || i(),
|
|
489
|
+
l.value || i(), L(() => {
|
|
508
490
|
var d;
|
|
509
491
|
(d = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || d[0].$el.focus();
|
|
510
492
|
});
|
|
511
493
|
}, S = ({ detail: d }) => {
|
|
512
|
-
d.preventDefault(), u(), l.value &&
|
|
513
|
-
var
|
|
514
|
-
r ? (
|
|
494
|
+
d.preventDefault(), u(), l.value && L(() => {
|
|
495
|
+
var f, g;
|
|
496
|
+
r ? (f = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || f[0].$el.focus() : (g = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || g[n.value].$el.focus();
|
|
515
497
|
});
|
|
516
498
|
}, v = () => {
|
|
517
|
-
u(), l.value &&
|
|
518
|
-
var d,
|
|
519
|
-
r ? (d = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || d[0].$el.focus() : (
|
|
499
|
+
u(), l.value && L(() => {
|
|
500
|
+
var d, f;
|
|
501
|
+
r ? (d = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || d[0].$el.focus() : (f = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || f[n.value].$el.focus();
|
|
520
502
|
});
|
|
521
503
|
};
|
|
522
504
|
return c(() => ({
|
|
523
|
-
...
|
|
505
|
+
...a.value ? {} : { [O.SPACE]: S },
|
|
524
506
|
[O.ENTER]: v,
|
|
525
507
|
[O.ARROW_DOWN]: w,
|
|
526
|
-
[O.ARROW_UP]:
|
|
527
|
-
[O.END]:
|
|
508
|
+
[O.ARROW_UP]: _,
|
|
509
|
+
[O.END]: x,
|
|
528
510
|
[O.ESCAPE]: y,
|
|
529
511
|
[O.HOME]: h
|
|
530
512
|
}));
|
|
531
513
|
}, He = ({ inputContainerRef: t, isDropdownOpen: e }, n) => {
|
|
532
514
|
const l = () => {
|
|
533
|
-
e.value && n(),
|
|
515
|
+
e.value && n(), L(() => {
|
|
534
516
|
Z(t);
|
|
535
517
|
});
|
|
536
518
|
};
|
|
@@ -540,17 +522,35 @@ const Ke = ({ items: t, placeholder: e, selectedValue: n }) => {
|
|
|
540
522
|
[s.TAB]: l,
|
|
541
523
|
[s.SPACE]: l
|
|
542
524
|
};
|
|
543
|
-
}
|
|
544
|
-
|
|
525
|
+
};
|
|
526
|
+
function qe(t, e, n) {
|
|
527
|
+
const l = m(t), a = m(e), o = (u, i = []) => i.flatMap((p) => p.label.toLocaleLowerCase().includes(u) ? [p, ...o(u, p.items)] : p.items ? [...o(u, p.items)] : []);
|
|
528
|
+
return V(l, () => {
|
|
529
|
+
n !== void 0 && n(l.value);
|
|
530
|
+
}), c(() => {
|
|
531
|
+
if (!l.value || n !== void 0)
|
|
532
|
+
return a.value;
|
|
533
|
+
const u = l.value.toLocaleLowerCase();
|
|
534
|
+
return o(u, a.value);
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
const Ve = {
|
|
538
|
+
"en-US": {
|
|
539
|
+
clearSearch: "Clear filter",
|
|
540
|
+
ariaLabelFallback: "Dropdown"
|
|
541
|
+
}
|
|
542
|
+
}, Je = F({
|
|
543
|
+
i18n: { messages: Ve },
|
|
545
544
|
name: "b-dropdown",
|
|
546
545
|
components: {
|
|
547
|
-
BentoDropdownOptionsContainer:
|
|
548
|
-
BentoTypography:
|
|
549
|
-
DropdownInputDefault:
|
|
550
|
-
DropdownInputSmall:
|
|
551
|
-
ErrorMessage: be
|
|
546
|
+
BentoDropdownOptionsContainer: Oe,
|
|
547
|
+
BentoTypography: re,
|
|
548
|
+
DropdownInputDefault: ce,
|
|
549
|
+
DropdownInputSmall: ke,
|
|
550
|
+
ErrorMessage: be,
|
|
551
|
+
FieldLabel: me
|
|
552
552
|
},
|
|
553
|
-
directives: { BentoClickOutsideDirective:
|
|
553
|
+
directives: { BentoClickOutsideDirective: _e, BentoKeyboardNavigationDirective: ve },
|
|
554
554
|
props: {
|
|
555
555
|
/**
|
|
556
556
|
* @deprecated from version 2.0.0. Use the aria-label attribute instead.
|
|
@@ -669,9 +669,13 @@ const Ke = ({ items: t, placeholder: e, selectedValue: n }) => {
|
|
|
669
669
|
*/
|
|
670
670
|
size: {
|
|
671
671
|
type: String,
|
|
672
|
-
default:
|
|
673
|
-
validator: (t) => Object.values(
|
|
672
|
+
default: C.DEFAULT,
|
|
673
|
+
validator: (t) => Object.values(C).includes(t)
|
|
674
674
|
},
|
|
675
|
+
/**
|
|
676
|
+
* Adds a info icon next to the label to display the passed tooltip message.
|
|
677
|
+
*/
|
|
678
|
+
tooltipText: { type: String, default: null },
|
|
675
679
|
/**
|
|
676
680
|
* The `input` value.
|
|
677
681
|
* Providing an empty string will select no options.
|
|
@@ -700,20 +704,20 @@ const Ke = ({ items: t, placeholder: e, selectedValue: n }) => {
|
|
|
700
704
|
},
|
|
701
705
|
emits: ["input", s.SHOW_MORE],
|
|
702
706
|
setup(t, { attrs: e, emit: n, slots: l }) {
|
|
703
|
-
var
|
|
704
|
-
const { t:
|
|
707
|
+
var U;
|
|
708
|
+
const { t: a } = k(), o = m(null), r = m(null), u = m(null), i = m(!1), p = R("bento-dropdown-options-container"), w = R("dropdown-label"), _ = R("dropdown-description"), x = R("dropdown-error"), { isReadOnly: y } = pe(E(t, "readonly")), h = m(e["aria-label"]), { ariaLabel: S } = J(t), v = fe({
|
|
705
709
|
ariaLabel: h.value,
|
|
706
710
|
// TODO: take this line away when the aria-label props is removed
|
|
707
711
|
label: S,
|
|
708
|
-
defaultFallback:
|
|
709
|
-
}),
|
|
712
|
+
defaultFallback: a("ariaLabelFallback")
|
|
713
|
+
}), D = c(() => ({
|
|
710
714
|
"b-dropdown__description--error": !!t.errorMessage
|
|
711
|
-
})), d = m(""),
|
|
712
|
-
items:
|
|
715
|
+
})), d = m(""), f = E(t, "items"), g = qe(d, f, (U = t == null ? void 0 : t.search) == null ? void 0 : U.searchEvent), I = c(() => t.dynamicFiltering && !!d.value), Y = Ue({
|
|
716
|
+
items: f,
|
|
713
717
|
multiple: E(t, "multiple"),
|
|
714
718
|
placeholder: E(t, "placeholder"),
|
|
715
719
|
value: E(t, "value")
|
|
716
|
-
}), G = c(() => t.size ===
|
|
720
|
+
}), G = c(() => t.size === C.DEFAULT), Q = c(
|
|
717
721
|
() => t != null && t.multiple ? t.items.filter(
|
|
718
722
|
({ value: b }) => (t == null ? void 0 : t.value) && (t == null ? void 0 : t.value).includes(b)
|
|
719
723
|
) : t.items.find(({ value: b }) => b === (t == null ? void 0 : t.value))
|
|
@@ -724,7 +728,7 @@ const Ke = ({ items: t, placeholder: e, selectedValue: n }) => {
|
|
|
724
728
|
var b;
|
|
725
729
|
return t.multiple ? (b = t == null ? void 0 : t.value) == null ? void 0 : b.length : null;
|
|
726
730
|
}), te = c(
|
|
727
|
-
() => `${t.description ?
|
|
731
|
+
() => `${t.description ? _ : ""} ${t.errorMessage ? x : ""}`.trim() || null
|
|
728
732
|
), ne = () => {
|
|
729
733
|
y.value || (i.value = !0);
|
|
730
734
|
}, T = () => {
|
|
@@ -737,9 +741,9 @@ const Ke = ({ items: t, placeholder: e, selectedValue: n }) => {
|
|
|
737
741
|
t.multiple || (d.value = "", i.value = !1), n("input", b);
|
|
738
742
|
}, z = () => {
|
|
739
743
|
n(s.SHOW_MORE);
|
|
740
|
-
},
|
|
744
|
+
}, oe = je(
|
|
741
745
|
{
|
|
742
|
-
inputContainerRef:
|
|
746
|
+
inputContainerRef: o,
|
|
743
747
|
optionsContainerRef: u,
|
|
744
748
|
selectedValueIndex: X,
|
|
745
749
|
isDropdownOpen: i,
|
|
@@ -750,9 +754,9 @@ const Ke = ({ items: t, placeholder: e, selectedValue: n }) => {
|
|
|
750
754
|
K,
|
|
751
755
|
ne,
|
|
752
756
|
T
|
|
753
|
-
),
|
|
757
|
+
), ae = He(
|
|
754
758
|
{
|
|
755
|
-
inputContainerRef:
|
|
759
|
+
inputContainerRef: o,
|
|
756
760
|
isDropdownOpen: i
|
|
757
761
|
},
|
|
758
762
|
T
|
|
@@ -760,9 +764,9 @@ const Ke = ({ items: t, placeholder: e, selectedValue: n }) => {
|
|
|
760
764
|
[s.CLOSE_DROPDOWN]: T,
|
|
761
765
|
[s.SELECT]: W,
|
|
762
766
|
[s.SHOW_MORE]: z,
|
|
763
|
-
...
|
|
767
|
+
...ae
|
|
764
768
|
};
|
|
765
|
-
return t.error &&
|
|
769
|
+
return t.error && de(
|
|
766
770
|
'BentoDropdown "error" property',
|
|
767
771
|
`Use the BentoDropdown "errorMessage" property instead to indicate that there is a modifier error.
|
|
768
772
|
Having the field as "undefined" will hide/remove the error.
|
|
@@ -775,14 +779,14 @@ const Ke = ({ items: t, placeholder: e, selectedValue: n }) => {
|
|
|
775
779
|
idDefaultSize: G,
|
|
776
780
|
isDropdownOpen: i,
|
|
777
781
|
displayValue: Y,
|
|
778
|
-
dropdownOptionsContainerId:
|
|
782
|
+
dropdownOptionsContainerId: p,
|
|
779
783
|
filteredItems: g,
|
|
780
784
|
isSearching: I,
|
|
781
785
|
isReadOnly: y,
|
|
782
786
|
searchTerm: d,
|
|
783
787
|
labelId: w,
|
|
784
|
-
descriptionId:
|
|
785
|
-
errorId:
|
|
788
|
+
descriptionId: _,
|
|
789
|
+
errorId: x,
|
|
786
790
|
ariaDescribedBy: te,
|
|
787
791
|
selectedValueItem: Q,
|
|
788
792
|
// Conciliation of Vue2 $scopedSlots and Vue3 $scopes.
|
|
@@ -790,9 +794,9 @@ const Ke = ({ items: t, placeholder: e, selectedValue: n }) => {
|
|
|
790
794
|
// { slots } as a proxy of $scopedSlots and $scopes in their
|
|
791
795
|
// respective Vue version. Source: https://github.com/vuejs/composition-api/issues/84#issuecomment-524885445
|
|
792
796
|
slots: l,
|
|
793
|
-
descriptionConditionalClasses:
|
|
797
|
+
descriptionConditionalClasses: D,
|
|
794
798
|
// Refs
|
|
795
|
-
inputContainerRef:
|
|
799
|
+
inputContainerRef: o,
|
|
796
800
|
inputContainerRefWrapper: r,
|
|
797
801
|
optionsContainerRef: u,
|
|
798
802
|
// Events
|
|
@@ -800,39 +804,39 @@ const Ke = ({ items: t, placeholder: e, selectedValue: n }) => {
|
|
|
800
804
|
toggleDropdown: K,
|
|
801
805
|
onOptionSelected: W,
|
|
802
806
|
emitShowMoreEvent: z,
|
|
803
|
-
textboxKeyboardNavigationListeners:
|
|
807
|
+
textboxKeyboardNavigationListeners: oe,
|
|
804
808
|
listboxListeners: se
|
|
805
809
|
};
|
|
806
810
|
}
|
|
807
811
|
});
|
|
808
|
-
var
|
|
812
|
+
var Ze = function() {
|
|
809
813
|
var l;
|
|
810
814
|
var e = this, n = e._self._c;
|
|
811
|
-
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("
|
|
812
|
-
e.searchTerm =
|
|
813
|
-
}, open: e.toggleDropdown, close: e.toggleDropdown }, scopedSlots: e._u([e._l(e.slots, function(
|
|
814
|
-
return { key:
|
|
815
|
-
return [e._t(
|
|
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(a) {
|
|
816
|
+
e.searchTerm = a;
|
|
817
|
+
}, open: e.toggleDropdown, close: e.toggleDropdown }, scopedSlots: e._u([e._l(e.slots, function(a, o) {
|
|
818
|
+
return { key: o, fn: function(r) {
|
|
819
|
+
return [e._t(o, null, null, r)];
|
|
816
820
|
} };
|
|
817
|
-
})], 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(
|
|
818
|
-
return { key:
|
|
819
|
-
return [e._t(
|
|
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(a, o) {
|
|
822
|
+
return { key: o, fn: function(r) {
|
|
823
|
+
return [e._t(o, null, null, r)];
|
|
820
824
|
} };
|
|
821
825
|
})], 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);
|
|
822
|
-
},
|
|
823
|
-
Ve,
|
|
826
|
+
}, Ye = [], Ge = /* @__PURE__ */ B(
|
|
824
827
|
Je,
|
|
825
828
|
Ze,
|
|
829
|
+
Ye,
|
|
826
830
|
!1,
|
|
827
831
|
null,
|
|
828
|
-
"
|
|
832
|
+
"dff16eb9",
|
|
829
833
|
null,
|
|
830
834
|
null
|
|
831
835
|
);
|
|
832
|
-
const
|
|
836
|
+
const ft = Ge.exports;
|
|
833
837
|
export {
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
838
|
+
ft as B,
|
|
839
|
+
C as a,
|
|
840
|
+
qe as u
|
|
837
841
|
};
|
|
838
|
-
//# sourceMappingURL=dropdown.
|
|
842
|
+
//# sourceMappingURL=dropdown.ce937989.js.map
|