@adyen/bento-vue3 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 +25 -13
- 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 +12 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +319 -96
- 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/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 +18 -24
- 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 +21 -3
- package/dist/@types/packages/vue2/src/index.d.ts +1 -0
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +146 -116
- package/dist/action-bar.js.map +1 -1
- package/dist/alert.js +3 -3
- 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/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/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/index46.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 +53 -51
- package/dist/button.js.map +1 -1
- package/dist/card.js +2 -2
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{base-button.7897a95e.js → base-button.aa085dfa.js} +2 -2
- package/dist/chunks/{base-button.7897a95e.js.map → base-button.aa085dfa.js.map} +1 -1
- package/dist/chunks/{base-modal.0c85e7cb.js → base-modal.3dcf8376.js} +119 -105
- package/dist/chunks/base-modal.3dcf8376.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.fa35390c.js → button-actions-with-menu.3f52ea2d.js} +7 -7
- package/dist/chunks/{button-actions-with-menu.fa35390c.js.map → button-actions-with-menu.3f52ea2d.js.map} +1 -1
- package/dist/chunks/{button.e5177388.js → button.82ed953e.js} +2 -2
- package/dist/chunks/button.82ed953e.js.map +1 -0
- package/dist/chunks/calendar.d4ab387d.js +1037 -0
- package/dist/chunks/calendar.d4ab387d.js.map +1 -0
- package/dist/chunks/checkbox.03c4b0fe.js +265 -0
- package/dist/chunks/checkbox.03c4b0fe.js.map +1 -0
- package/dist/chunks/controls-group.807b5fb0.js +95 -0
- package/dist/chunks/controls-group.807b5fb0.js.map +1 -0
- package/dist/chunks/{copy.86236c8d.js → copy.28bd4298.js} +4 -4
- package/dist/chunks/{copy.86236c8d.js.map → copy.28bd4298.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.0b38fac3.js → dropdown-default-textbox.74c4584a.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.0b38fac3.js.map → dropdown-default-textbox.74c4584a.js.map} +1 -1
- package/dist/chunks/{dropdown.afff433b.js → dropdown.502e1f5c.js} +314 -337
- package/dist/chunks/dropdown.502e1f5c.js.map +1 -0
- package/dist/chunks/field-label.61679178.js +132 -0
- package/dist/chunks/field-label.61679178.js.map +1 -0
- package/dist/chunks/{fixed-scroller.e5aa7b00.js → fixed-scroller.92bb77a6.js} +2 -2
- package/dist/chunks/{fixed-scroller.e5aa7b00.js.map → fixed-scroller.92bb77a6.js.map} +1 -1
- package/dist/chunks/{footer-actions.1ce44374.js → footer-actions.cefaf1e2.js} +3 -3
- package/dist/chunks/{footer-actions.1ce44374.js.map → footer-actions.cefaf1e2.js.map} +1 -1
- package/dist/chunks/{grid-layout.7c919507.js → grid-layout.c2fe3057.js} +43 -34
- package/dist/chunks/grid-layout.c2fe3057.js.map +1 -0
- package/dist/chunks/{index.fa7b44f1.js → index.0ee895e0.js} +2 -2
- package/dist/chunks/{index.fa7b44f1.js.map → index.0ee895e0.js.map} +1 -1
- package/dist/chunks/{index.bcc58fdd.js → index.7262642e.js} +3 -3
- package/dist/chunks/{index.bcc58fdd.js.map → index.7262642e.js.map} +1 -1
- package/dist/chunks/index.726e2f3c.js +339 -0
- package/dist/chunks/index.726e2f3c.js.map +1 -0
- package/dist/chunks/{index.2bd3812b.js → index.75f3672e.js} +2 -2
- package/dist/chunks/{index.2bd3812b.js.map → index.75f3672e.js.map} +1 -1
- package/dist/chunks/{index.6a665ade.js → index.abb2a1d5.js} +3 -3
- package/dist/chunks/{index.6a665ade.js.map → index.abb2a1d5.js.map} +1 -1
- package/dist/chunks/index.b043371e.js +150 -0
- package/dist/chunks/index.b043371e.js.map +1 -0
- package/dist/chunks/{index.e579bc02.js → index.cf0d3be3.js} +19 -17
- package/dist/chunks/{index.e579bc02.js.map → index.cf0d3be3.js.map} +1 -1
- package/dist/chunks/{index.c207e9ab.js → index.d2542c6a.js} +132 -135
- package/dist/chunks/index.d2542c6a.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.e9156fe3.js +817 -0
- package/dist/chunks/index.e9156fe3.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.809ec40e.js → listbox-option-tag.5b00c85f.js} +3 -3
- package/dist/chunks/{listbox-option-tag.809ec40e.js.map → listbox-option-tag.5b00c85f.js.map} +1 -1
- package/dist/chunks/{listbox.f6e5a11d.js → listbox.d07c24e6.js} +4 -4
- package/dist/chunks/{listbox.f6e5a11d.js.map → listbox.d07c24e6.js.map} +1 -1
- package/dist/chunks/loading-button.ad7cfaee.js +108 -0
- package/dist/chunks/loading-button.ad7cfaee.js.map +1 -0
- package/dist/chunks/{tooltip.f769eb14.js → tooltip.054d2eb6.js} +3 -3
- package/dist/chunks/{tooltip.f769eb14.js.map → tooltip.054d2eb6.js.map} +1 -1
- package/dist/code-snippet.js +6 -6
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +847 -820
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +114 -138
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +17 -16
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header.js +76 -80
- package/dist/header.js.map +1 -1
- package/dist/index.js +207 -205
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +136 -158
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +14 -13
- package/dist/link.js +2 -2
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +4 -4
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +4 -4
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +3 -359
- package/dist/popover.js.map +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +4 -4
- package/dist/search-bar.js +2 -2
- package/dist/segmented-control.js +3 -3
- package/dist/sidepanel.js +5 -5
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +4 -4
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +3 -3
- package/dist/tag.js +3 -3
- package/dist/textarea.js +125 -149
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +312 -229
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +3 -3
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +49 -49
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +0 -120
- package/dist/assets/error-message.css +0 -1
- package/dist/chunks/base-modal.0c85e7cb.js.map +0 -1
- package/dist/chunks/button.e5177388.js.map +0 -1
- package/dist/chunks/calendar.c83d4e99.js +0 -898
- package/dist/chunks/calendar.c83d4e99.js.map +0 -1
- package/dist/chunks/checkbox.3cdbdd52.js +0 -235
- package/dist/chunks/checkbox.3cdbdd52.js.map +0 -1
- package/dist/chunks/controls-group.38b436f6.js +0 -136
- package/dist/chunks/controls-group.38b436f6.js.map +0 -1
- package/dist/chunks/dropdown.afff433b.js.map +0 -1
- package/dist/chunks/error-message.64e1964b.js +0 -49
- package/dist/chunks/error-message.64e1964b.js.map +0 -1
- package/dist/chunks/grid-layout.7c919507.js.map +0 -1
- package/dist/chunks/index.369b0e66.js +0 -734
- package/dist/chunks/index.369b0e66.js.map +0 -1
- package/dist/chunks/index.77f35162.js +0 -134
- package/dist/chunks/index.77f35162.js.map +0 -1
- package/dist/chunks/index.c207e9ab.js.map +0 -1
- package/dist/chunks/loading-button.746b7fa1.js +0 -109
- package/dist/chunks/loading-button.746b7fa1.js.map +0 -1
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import {
|
|
3
|
-
import { B as Me } from "./directive.0408e565.js";
|
|
4
|
-
import { B as D, a as Pe } from "./keyboard-navigation.ca47dfa8.js";
|
|
5
|
-
import { D as Ke, a as M, b as V, c as ke } from "./dropdown-default-textbox.0b38fac3.js";
|
|
6
|
-
import { _ as z } from "./_plugin-vue_export-helper.dad06003.js";
|
|
7
|
-
import { B as ze, d as Fe } from "./index.2bd3812b.js";
|
|
1
|
+
import { ref as $, watch as me, computed as c, defineComponent as te, toRefs as be, resolveComponent as E, openBlock as y, createBlock as A, resolveDynamicComponent as ve, mergeProps as I, withCtx as M, createElementVNode as W, withKeys as Ae, createVNode as F, toHandlers as z, createSlots as V, renderList as J, renderSlot as Z, normalizeProps as Y, guardReactiveProps as G, createElementBlock as B, toDisplayString as oe, createCommentVNode as N, pushScopeId as ye, popScopeId as ge, normalizeClass as he, withDirectives as x, vShow as re, nextTick as C, toRef as R, resolveDirective as de, createTextVNode as Ne } from "vue";
|
|
2
|
+
import { B as Me, d as Pe } from "./index.75f3672e.js";
|
|
8
3
|
import { g as K } from "./unique-id.a2a2b458.js";
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import { a as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
4
|
+
import { u as Ke } from "./aria-label.ac9651a5.js";
|
|
5
|
+
import { u as ne } from "./i18n.6c402773.js";
|
|
6
|
+
import { u as ke } from "./use-form-layout-loading.d03e5d48.js";
|
|
7
|
+
import { B as _, a as Fe } from "./keyboard-navigation.ca47dfa8.js";
|
|
8
|
+
import { a as s, B as Q, b as X } from "./listbox.d07c24e6.js";
|
|
9
|
+
import { B as ze } from "./directive.0408e565.js";
|
|
10
|
+
import { a as H } from "./index.7262642e.js";
|
|
11
|
+
import { a as ue } from "./index.726e2f3c.js";
|
|
12
|
+
import { _ as k } from "./_plugin-vue_export-helper.dad06003.js";
|
|
13
|
+
import { D as xe, a as T, b as q, c as We } from "./dropdown-default-textbox.74c4584a.js";
|
|
14
|
+
import { E as Ue, F as je } from "./field-label.61679178.js";
|
|
15
15
|
import "../assets/dropdown.css";
|
|
16
|
-
var
|
|
17
|
-
const
|
|
16
|
+
var D = /* @__PURE__ */ ((e) => (e.DEFAULT = "DropdownInputDefault", e.SMALL = "DropdownInputSmall", e))(D || {});
|
|
17
|
+
const ee = {
|
|
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 t =
|
|
25
|
-
|
|
23
|
+
}, He = (e, o, n) => {
|
|
24
|
+
const t = $(e.value), { t: a } = ne({ messages: ee });
|
|
25
|
+
me(e, () => {
|
|
26
26
|
t.value = e.value;
|
|
27
27
|
});
|
|
28
|
-
const i =
|
|
28
|
+
const i = c(
|
|
29
29
|
() => JSON.stringify(t.value) === JSON.stringify(e.value)
|
|
30
|
-
),
|
|
30
|
+
), d = () => {
|
|
31
31
|
n(s.SELECT, t.value), n(s.CLOSE_DROPDOWN);
|
|
32
|
-
},
|
|
32
|
+
}, r = () => {
|
|
33
33
|
t.value = e.value, n(s.CLOSE_DROPDOWN);
|
|
34
|
-
}, l =
|
|
34
|
+
}, l = c(() => [
|
|
35
35
|
{
|
|
36
36
|
title: a("apply"),
|
|
37
|
-
event:
|
|
37
|
+
event: d,
|
|
38
38
|
disabled: i.value
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
title: a("cancel"),
|
|
42
|
-
event:
|
|
42
|
+
event: r
|
|
43
43
|
}
|
|
44
|
-
]),
|
|
45
|
-
t.value =
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
}, g = (
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
},
|
|
44
|
+
]), p = (m) => {
|
|
45
|
+
t.value = m, o.value || n(s.SELECT, m);
|
|
46
|
+
}, O = (m) => {
|
|
47
|
+
p(m), n(s.TAB);
|
|
48
|
+
}, g = (m) => {
|
|
49
|
+
p(m), n(s.ENTER);
|
|
50
|
+
}, h = (m) => {
|
|
51
|
+
p(m), n(s.SPACE);
|
|
52
|
+
}, b = () => {
|
|
53
|
+
r(), n(s.ESCAPE);
|
|
54
|
+
}, v = () => {
|
|
55
55
|
n(s.SHOW_MORE);
|
|
56
|
-
},
|
|
57
|
-
[s.SELECT]:
|
|
58
|
-
[s.SHOW_MORE]:
|
|
59
|
-
[s.TAB]:
|
|
60
|
-
[s.SPACE]:
|
|
56
|
+
}, w = {
|
|
57
|
+
[s.SELECT]: p,
|
|
58
|
+
[s.SHOW_MORE]: v,
|
|
59
|
+
[s.TAB]: O,
|
|
60
|
+
[s.SPACE]: h,
|
|
61
61
|
[s.ENTER]: g
|
|
62
62
|
};
|
|
63
63
|
return {
|
|
@@ -65,16 +65,16 @@ const oe = {
|
|
|
65
65
|
actions: l,
|
|
66
66
|
internalSelectedValue: t,
|
|
67
67
|
// Methods
|
|
68
|
-
listeners:
|
|
69
|
-
onEscapeKey:
|
|
68
|
+
listeners: w,
|
|
69
|
+
onEscapeKey: b
|
|
70
70
|
};
|
|
71
|
-
},
|
|
72
|
-
i18n: { messages:
|
|
71
|
+
}, qe = te({
|
|
72
|
+
i18n: { messages: ee },
|
|
73
73
|
name: "bento-dropdown-options-container",
|
|
74
74
|
components: {
|
|
75
|
-
BentoListbox:
|
|
76
|
-
PopperContainer:
|
|
77
|
-
BentoPopover:
|
|
75
|
+
BentoListbox: Q,
|
|
76
|
+
PopperContainer: H,
|
|
77
|
+
BentoPopover: ue
|
|
78
78
|
},
|
|
79
79
|
props: {
|
|
80
80
|
/**
|
|
@@ -118,8 +118,8 @@ const oe = {
|
|
|
118
118
|
*/
|
|
119
119
|
inputSize: {
|
|
120
120
|
type: String,
|
|
121
|
-
default:
|
|
122
|
-
validator: (e) => Object.values(
|
|
121
|
+
default: D.DEFAULT,
|
|
122
|
+
validator: (e) => Object.values(D).includes(e)
|
|
123
123
|
},
|
|
124
124
|
/**
|
|
125
125
|
* The option elements to populate the dropdown with.
|
|
@@ -142,8 +142,8 @@ const oe = {
|
|
|
142
142
|
*/
|
|
143
143
|
lazyLoadType: {
|
|
144
144
|
type: String,
|
|
145
|
-
default:
|
|
146
|
-
validator: (e) => Object.values(
|
|
145
|
+
default: X.AUTOMATIC,
|
|
146
|
+
validator: (e) => Object.values(X).includes(e)
|
|
147
147
|
},
|
|
148
148
|
/**
|
|
149
149
|
* If enabled, the user will be able to select multiple items.
|
|
@@ -169,12 +169,12 @@ const oe = {
|
|
|
169
169
|
*
|
|
170
170
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
171
171
|
*/
|
|
172
|
-
searching:
|
|
172
|
+
searching: Q.props.searching,
|
|
173
173
|
/**
|
|
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: H.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,25 +194,26 @@ const oe = {
|
|
|
194
194
|
s.TAB
|
|
195
195
|
],
|
|
196
196
|
setup(e, { emit: o, slots: n }) {
|
|
197
|
-
|
|
198
|
-
const { selectedValue: t, multiple: a } = ve(e), i = S(null), { t: r } = le({ messages: oe }), d = p(() => e.open && !e.disabled), l = p(() => r("noOptionsMatchThisSearch")), c = {
|
|
199
|
-
"min-width": `${(u = e == null ? void 0 : e.targetElement) == null ? void 0 : u.clientWidth}px`,
|
|
200
|
-
"max-width": "min(500px, 95%)"
|
|
201
|
-
}, $ = p(() => ({
|
|
197
|
+
const { selectedValue: t, multiple: a } = be(e), i = $(null), { t: d } = ne({ messages: ee }), r = c(() => e.open && !e.disabled), l = c(() => d("noOptionsMatchThisSearch")), p = c(() => ({
|
|
202
198
|
"b-dropdown-options-container--single": !(e != null && e.multiple)
|
|
203
|
-
})),
|
|
204
|
-
"b-dropdown-options-container__listbox--small": e.inputSize ===
|
|
199
|
+
})), O = c(() => ({
|
|
200
|
+
"b-dropdown-options-container__listbox--small": e.inputSize === D.SMALL,
|
|
205
201
|
"b-dropdown-options-container__listbox--single": !(e != null && e.multiple)
|
|
206
|
-
})), { actions:
|
|
202
|
+
})), { actions: g, internalSelectedValue: h, listeners: b, onEscapeKey: v } = He(
|
|
207
203
|
t,
|
|
208
204
|
a,
|
|
209
205
|
o
|
|
210
|
-
),
|
|
211
|
-
() => e != null && e.multiple ?
|
|
212
|
-
),
|
|
213
|
-
|
|
206
|
+
), w = c(
|
|
207
|
+
() => e != null && e.multiple ? ue : H
|
|
208
|
+
), m = c(() => {
|
|
209
|
+
var u;
|
|
210
|
+
const P = {
|
|
211
|
+
"min-width": `${(u = e == null ? void 0 : e.targetElement) == null ? void 0 : u.clientWidth}px`,
|
|
212
|
+
"max-width": "min(500px, 95%)"
|
|
213
|
+
};
|
|
214
|
+
return e != null && e.multiple ? {
|
|
214
215
|
actionsLayout: "space-between",
|
|
215
|
-
actions:
|
|
216
|
+
actions: g.value,
|
|
216
217
|
divider: !0,
|
|
217
218
|
fallbackPosition: ["top-start"],
|
|
218
219
|
id: K(`dropdown-options-${e.id}`),
|
|
@@ -220,7 +221,7 @@ const oe = {
|
|
|
220
221
|
position: "bottom-start",
|
|
221
222
|
style: {
|
|
222
223
|
width: "auto",
|
|
223
|
-
...
|
|
224
|
+
...P
|
|
224
225
|
},
|
|
225
226
|
targetElement: e.targetElement
|
|
226
227
|
} : {
|
|
@@ -228,42 +229,42 @@ const oe = {
|
|
|
228
229
|
offset: [0, 8],
|
|
229
230
|
position: "bottom-start",
|
|
230
231
|
style: {
|
|
231
|
-
display:
|
|
232
|
-
...
|
|
232
|
+
display: r.value ? "block" : "none",
|
|
233
|
+
...P
|
|
233
234
|
},
|
|
234
235
|
targetElement: e.targetElement
|
|
235
|
-
}
|
|
236
|
-
);
|
|
236
|
+
};
|
|
237
|
+
});
|
|
237
238
|
return {
|
|
238
239
|
// Values
|
|
239
|
-
isDropdownOpen:
|
|
240
|
-
conditionalClasses:
|
|
241
|
-
conditionalListboxClasses:
|
|
240
|
+
isDropdownOpen: r,
|
|
241
|
+
conditionalClasses: p,
|
|
242
|
+
conditionalListboxClasses: O,
|
|
242
243
|
noResultsMessage: l,
|
|
243
244
|
slots: n,
|
|
244
|
-
actions:
|
|
245
|
-
internalSelectedValue:
|
|
245
|
+
actions: g,
|
|
246
|
+
internalSelectedValue: h,
|
|
246
247
|
// Component wrapper
|
|
247
|
-
popperContainerOrPopoverComponent:
|
|
248
|
-
popperContainerOrPopoverProps:
|
|
248
|
+
popperContainerOrPopoverComponent: w,
|
|
249
|
+
popperContainerOrPopoverProps: m,
|
|
249
250
|
// Refs
|
|
250
251
|
dropdownOptionsListboxRef: i,
|
|
251
252
|
// Events
|
|
252
|
-
onEscapeKey:
|
|
253
|
-
listeners:
|
|
253
|
+
onEscapeKey: v,
|
|
254
|
+
listeners: b
|
|
254
255
|
};
|
|
255
256
|
}
|
|
256
257
|
});
|
|
257
|
-
function
|
|
258
|
-
const
|
|
259
|
-
return
|
|
258
|
+
function Ve(e, o, n, t, a, i) {
|
|
259
|
+
const d = E("bento-listbox");
|
|
260
|
+
return y(), A(ve(e.popperContainerOrPopoverComponent), I({
|
|
260
261
|
class: ["b-dropdown-options-container", e.conditionalClasses]
|
|
261
262
|
}, e.popperContainerOrPopoverProps), {
|
|
262
|
-
default:
|
|
263
|
-
|
|
264
|
-
onKeydown: o[0] || (o[0] =
|
|
263
|
+
default: M(() => [
|
|
264
|
+
W("div", {
|
|
265
|
+
onKeydown: o[0] || (o[0] = Ae((...r) => e.onEscapeKey && e.onEscapeKey(...r), ["esc"]))
|
|
265
266
|
}, [
|
|
266
|
-
|
|
267
|
+
F(d, I({
|
|
267
268
|
id: e.id,
|
|
268
269
|
ref: "dropdownOptionsListboxRef",
|
|
269
270
|
"aria-label": e.ariaLabel,
|
|
@@ -279,11 +280,11 @@ function He(e, o, n, t, a, i) {
|
|
|
279
280
|
"lazy-load-type": e.lazyLoadType,
|
|
280
281
|
"has-more-items": e.hasMoreItems,
|
|
281
282
|
"virtual-scroll": e.virtualScroll
|
|
282
|
-
},
|
|
283
|
-
|
|
283
|
+
}, z(e.listeners)), V({ _: 2 }, [
|
|
284
|
+
J(e.slots, (r, l) => ({
|
|
284
285
|
name: l,
|
|
285
|
-
fn:
|
|
286
|
-
|
|
286
|
+
fn: M((p) => [
|
|
287
|
+
Z(e.$slots, l, Y(G(p)), void 0, !0)
|
|
287
288
|
])
|
|
288
289
|
}))
|
|
289
290
|
]), 1040, ["id", "aria-label", "class", "empty-state", "is-option-disabled", "items", "selected-value", "multiple", "no-results-message", "searching", "loading", "lazy-load-type", "has-more-items", "virtual-scroll"])
|
|
@@ -292,55 +293,55 @@ function He(e, o, n, t, a, i) {
|
|
|
292
293
|
_: 3
|
|
293
294
|
}, 16, ["class"]);
|
|
294
295
|
}
|
|
295
|
-
const
|
|
296
|
-
let
|
|
297
|
-
const
|
|
296
|
+
const Je = /* @__PURE__ */ k(qe, [["render", Ve], ["__scopeId", "data-v-470172b0"]]);
|
|
297
|
+
let ce = 0;
|
|
298
|
+
const Ze = {
|
|
298
299
|
beforeCreate() {
|
|
299
|
-
this.uuid =
|
|
300
|
+
this.uuid = ce.toString(), ce += 1;
|
|
300
301
|
}
|
|
301
|
-
},
|
|
302
|
+
}, Ye = (e) => (ye("data-v-18645fe6"), e = e(), ge(), e), Ge = { key: 0 }, Qe = /* @__PURE__ */ Ye(() => /* @__PURE__ */ W("path", {
|
|
302
303
|
fill: "#00112C",
|
|
303
304
|
"fill-rule": "evenodd",
|
|
304
305
|
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",
|
|
305
306
|
"clip-rule": "evenodd"
|
|
306
307
|
}, null, -1));
|
|
307
|
-
function
|
|
308
|
-
return
|
|
308
|
+
function Xe(e, o, n, t, a, i) {
|
|
309
|
+
return y(), B("svg", I({ role: "img" }, e.$attrs, {
|
|
309
310
|
xmlns: "http://www.w3.org/2000/svg",
|
|
310
311
|
width: "16",
|
|
311
312
|
height: "16",
|
|
312
313
|
fill: "none"
|
|
313
314
|
}), [
|
|
314
|
-
e.$attrs["svg-title"] ? (
|
|
315
|
-
|
|
315
|
+
e.$attrs["svg-title"] ? (y(), B("title", Ge, oe(e.$attrs["svg-title"]), 1)) : N("", !0),
|
|
316
|
+
Qe
|
|
316
317
|
], 16);
|
|
317
318
|
}
|
|
318
|
-
const
|
|
319
|
-
let
|
|
320
|
-
const
|
|
319
|
+
const et = /* @__PURE__ */ k(Ze, [["render", Xe], ["__scopeId", "data-v-18645fe6"]]);
|
|
320
|
+
let pe = 0;
|
|
321
|
+
const tt = {
|
|
321
322
|
beforeCreate() {
|
|
322
|
-
this.uuid =
|
|
323
|
+
this.uuid = pe.toString(), pe += 1;
|
|
323
324
|
}
|
|
324
|
-
},
|
|
325
|
+
}, ot = (e) => (ye("data-v-6f20d431"), e = e(), ge(), e), nt = { key: 0 }, lt = /* @__PURE__ */ ot(() => /* @__PURE__ */ W("path", {
|
|
325
326
|
fill: "#00112C",
|
|
326
327
|
"fill-rule": "evenodd",
|
|
327
328
|
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",
|
|
328
329
|
"clip-rule": "evenodd"
|
|
329
330
|
}, null, -1));
|
|
330
|
-
function
|
|
331
|
-
return
|
|
331
|
+
function at(e, o, n, t, a, i) {
|
|
332
|
+
return y(), B("svg", I({ role: "img" }, e.$attrs, {
|
|
332
333
|
xmlns: "http://www.w3.org/2000/svg",
|
|
333
334
|
width: "16",
|
|
334
335
|
height: "16",
|
|
335
336
|
fill: "none"
|
|
336
337
|
}), [
|
|
337
|
-
e.$attrs["svg-title"] ? (
|
|
338
|
-
|
|
338
|
+
e.$attrs["svg-title"] ? (y(), B("title", nt, oe(e.$attrs["svg-title"]), 1)) : N("", !0),
|
|
339
|
+
lt
|
|
339
340
|
], 16);
|
|
340
341
|
}
|
|
341
|
-
const
|
|
342
|
+
const it = /* @__PURE__ */ k(tt, [["render", at], ["__scopeId", "data-v-6f20d431"]]), st = te({
|
|
342
343
|
name: "dropdown-small-textbox",
|
|
343
|
-
components: { ChevronDownSmallIcon:
|
|
344
|
+
components: { ChevronDownSmallIcon: et, ChevronUpSmallIcon: it, DropdownBaseTextbox: xe },
|
|
344
345
|
inheritAttrs: !1,
|
|
345
346
|
props: {
|
|
346
347
|
/**
|
|
@@ -412,43 +413,43 @@ const at = /* @__PURE__ */ z(et, [["render", lt], ["__scopeId", "data-v-6f20d431
|
|
|
412
413
|
*/
|
|
413
414
|
value: { type: String, default: "" }
|
|
414
415
|
},
|
|
415
|
-
emits: [
|
|
416
|
+
emits: [T.OPEN, T.CLOSE],
|
|
416
417
|
setup(e, { emit: o }) {
|
|
417
|
-
const n =
|
|
418
|
-
[`b-dropdown-small-textbox--${
|
|
419
|
-
[`b-dropdown-small-textbox--${
|
|
420
|
-
[`b-dropdown-small-textbox--${
|
|
421
|
-
})), t =
|
|
422
|
-
o(
|
|
418
|
+
const n = c(() => ({
|
|
419
|
+
[`b-dropdown-small-textbox--${q.DISABLED}`]: e.disabled,
|
|
420
|
+
[`b-dropdown-small-textbox--${q.READONLY}`]: e.readonly,
|
|
421
|
+
[`b-dropdown-small-textbox--${q.OPENED}`]: e.open
|
|
422
|
+
})), t = c(() => e.open && !e.disabled && !e.readonly), a = () => {
|
|
423
|
+
o(T.OPEN);
|
|
423
424
|
}, i = () => {
|
|
424
|
-
o(
|
|
425
|
-
},
|
|
426
|
-
[
|
|
427
|
-
[
|
|
425
|
+
o(T.CLOSE);
|
|
426
|
+
}, d = {
|
|
427
|
+
[T.OPEN]: a,
|
|
428
|
+
[T.CLOSE]: i
|
|
428
429
|
};
|
|
429
430
|
return {
|
|
430
431
|
// Values
|
|
431
432
|
conditionalClasses: n,
|
|
432
433
|
isDropdownOpen: t,
|
|
433
434
|
// Events
|
|
434
|
-
listeners:
|
|
435
|
+
listeners: d
|
|
435
436
|
};
|
|
436
437
|
}
|
|
437
438
|
});
|
|
438
|
-
const
|
|
439
|
-
function
|
|
440
|
-
const
|
|
441
|
-
return
|
|
442
|
-
class:
|
|
439
|
+
const rt = { class: "b-dropdown-small-textbox__chevron" };
|
|
440
|
+
function dt(e, o, n, t, a, i) {
|
|
441
|
+
const d = E("chevron-up-small-icon"), r = E("chevron-down-small-icon"), l = E("dropdown-base-textbox");
|
|
442
|
+
return y(), B("div", {
|
|
443
|
+
class: he(["b-dropdown-small-textbox", e.conditionalClasses])
|
|
443
444
|
}, [
|
|
444
|
-
|
|
445
|
-
icon:
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
[
|
|
445
|
+
F(l, I({ ...e.$attrs, ...e.$props }, { class: "b-dropdown-small-textbox__textbox" }, z(e.listeners)), {
|
|
446
|
+
icon: M(() => [
|
|
447
|
+
W("div", rt, [
|
|
448
|
+
x(F(d, { "svg-title": "opened" }, null, 512), [
|
|
449
|
+
[re, e.isDropdownOpen]
|
|
449
450
|
]),
|
|
450
|
-
|
|
451
|
-
[
|
|
451
|
+
x(F(r, { "svg-title": "closed" }, null, 512), [
|
|
452
|
+
[re, !e.isDropdownOpen]
|
|
452
453
|
])
|
|
453
454
|
])
|
|
454
455
|
]),
|
|
@@ -456,52 +457,33 @@ function rt(e, o, n, t, a, i) {
|
|
|
456
457
|
}, 16)
|
|
457
458
|
], 2);
|
|
458
459
|
}
|
|
459
|
-
const
|
|
460
|
-
function ut(e, o, n) {
|
|
461
|
-
const t = S(e), a = S(o), i = (d, l = []) => l.flatMap((c) => c.label.toLocaleLowerCase().includes(d) ? [c, ...i(d, c.items)] : c.items ? [...i(d, c.items)] : []);
|
|
462
|
-
return be(t, () => {
|
|
463
|
-
n !== void 0 && n(t.value);
|
|
464
|
-
}), p(() => {
|
|
465
|
-
if (!t.value || n !== void 0)
|
|
466
|
-
return a.value;
|
|
467
|
-
const d = t.value.toLocaleLowerCase();
|
|
468
|
-
return i(d, a.value);
|
|
469
|
-
});
|
|
470
|
-
}
|
|
471
|
-
const ct = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
460
|
+
const ut = /* @__PURE__ */ k(st, [["render", dt], ["__scopeId", "data-v-55bc3614"]]), ct = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
472
461
|
const t = e.value.find(({ value: a }) => a === n.value);
|
|
473
462
|
return (t == null ? void 0 : t.label) || o.value || null;
|
|
474
463
|
}, pt = ({ selectedValues: e, items: o, placeholder: n }) => {
|
|
475
464
|
var t;
|
|
476
465
|
return !e.value || ((t = e.value) == null ? void 0 : t.length) === 0 ? n.value || null : e.value.map((a) => {
|
|
477
|
-
const { label: i } = o.value.find(({ value:
|
|
466
|
+
const { label: i } = o.value.find(({ value: d }) => d === a);
|
|
478
467
|
return i;
|
|
479
468
|
}).join(", ");
|
|
480
469
|
}, ft = ({ selectedValues: e, items: o, placeholder: n }) => {
|
|
481
470
|
var t;
|
|
482
471
|
return !e.value || !((t = e.value) != null && t.length) ? n.value || null : o.value.reduce((a, i) => {
|
|
483
472
|
if (i.items) {
|
|
484
|
-
const
|
|
473
|
+
const d = i.items.filter(
|
|
485
474
|
(l) => e.value.includes(l.value)
|
|
486
475
|
);
|
|
487
|
-
|
|
476
|
+
d.length === i.items.length ? a.push(i.label) : d.forEach(({ label: l }) => a.push(l));
|
|
488
477
|
}
|
|
489
478
|
return e.value.includes(i.value) && a.push(i.label), a;
|
|
490
479
|
}, []).join(", ");
|
|
491
480
|
}, mt = ({ items: e, placeholder: o, value: n, multiple: t }) => {
|
|
492
|
-
const a =
|
|
493
|
-
var
|
|
494
|
-
return (
|
|
481
|
+
const a = c(() => e.value.find((d) => {
|
|
482
|
+
var r;
|
|
483
|
+
return (r = d.items) == null ? void 0 : r.length;
|
|
495
484
|
}));
|
|
496
|
-
return
|
|
497
|
-
},
|
|
498
|
-
"en-US": {
|
|
499
|
-
optional: "optional",
|
|
500
|
-
required: "required",
|
|
501
|
-
clearSearch: "Clear filter",
|
|
502
|
-
ariaLabelFallback: "Dropdown"
|
|
503
|
-
}
|
|
504
|
-
}, Se = (e) => {
|
|
485
|
+
return c(() => t.value ? a.value ? ft({ selectedValues: n, placeholder: o, items: e }) : pt({ selectedValues: n, items: e, placeholder: o }) : ct({ items: e, placeholder: o, selectedValue: n }));
|
|
486
|
+
}, we = (e) => {
|
|
505
487
|
var o;
|
|
506
488
|
(o = e.value.$children) == null || o[0].$refs.textbox.focus();
|
|
507
489
|
}, bt = ({
|
|
@@ -511,58 +493,58 @@ const ct = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
|
511
493
|
isDropdownOpen: t,
|
|
512
494
|
isDynamicFltering: a,
|
|
513
495
|
items: i,
|
|
514
|
-
isMultiple:
|
|
515
|
-
},
|
|
516
|
-
const
|
|
517
|
-
u.preventDefault(), t.value || (l(),
|
|
518
|
-
var f,
|
|
519
|
-
|
|
496
|
+
isMultiple: d
|
|
497
|
+
}, r, l, p) => {
|
|
498
|
+
const O = ({ detail: u }) => {
|
|
499
|
+
u.preventDefault(), t.value || (l(), C(() => {
|
|
500
|
+
var f, L;
|
|
501
|
+
d ? (f = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || f[0].$el.focus() : (L = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || L[n.value].$el.focus();
|
|
520
502
|
}));
|
|
521
503
|
}, g = ({ detail: u }) => {
|
|
522
|
-
u.preventDefault(), t.value || (l(),
|
|
504
|
+
u.preventDefault(), t.value || (l(), C(() => {
|
|
523
505
|
var f;
|
|
524
506
|
(f = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || f[0].$el.focus();
|
|
525
507
|
}));
|
|
526
|
-
},
|
|
527
|
-
t.value || (l(),
|
|
508
|
+
}, h = () => {
|
|
509
|
+
t.value || (l(), C(() => {
|
|
528
510
|
var u, f;
|
|
529
|
-
if (
|
|
530
|
-
const
|
|
531
|
-
(u = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || u[
|
|
511
|
+
if (d) {
|
|
512
|
+
const L = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children;
|
|
513
|
+
(u = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || u[L.length - 1].$children[i.length - 1].$el.focus();
|
|
532
514
|
} else
|
|
533
515
|
(f = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || f[i.length - 1].$el.focus();
|
|
534
516
|
}));
|
|
535
|
-
},
|
|
536
|
-
t.value && (
|
|
537
|
-
},
|
|
538
|
-
t.value || l(),
|
|
517
|
+
}, b = () => {
|
|
518
|
+
t.value && (p(), we(e));
|
|
519
|
+
}, v = () => {
|
|
520
|
+
t.value || l(), C(() => {
|
|
539
521
|
var u;
|
|
540
522
|
(u = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || u[0].$el.focus();
|
|
541
523
|
});
|
|
542
|
-
},
|
|
543
|
-
u.preventDefault(),
|
|
544
|
-
var f,
|
|
545
|
-
|
|
524
|
+
}, w = ({ detail: u }) => {
|
|
525
|
+
u.preventDefault(), r(), t.value && C(() => {
|
|
526
|
+
var f, L;
|
|
527
|
+
d ? (f = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || f[0].$el.focus() : (L = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || L[n.value].$el.focus();
|
|
546
528
|
});
|
|
547
|
-
},
|
|
548
|
-
|
|
529
|
+
}, m = () => {
|
|
530
|
+
r(), t.value && C(() => {
|
|
549
531
|
var u, f;
|
|
550
|
-
|
|
532
|
+
d ? (u = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || u[0].$el.focus() : (f = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || f[n.value].$el.focus();
|
|
551
533
|
});
|
|
552
534
|
};
|
|
553
|
-
return
|
|
554
|
-
...a.value ? {} : { [
|
|
555
|
-
[
|
|
556
|
-
[
|
|
557
|
-
[
|
|
558
|
-
[
|
|
559
|
-
[
|
|
560
|
-
[
|
|
535
|
+
return c(() => ({
|
|
536
|
+
...a.value ? {} : { [_.SPACE]: w },
|
|
537
|
+
[_.ENTER]: m,
|
|
538
|
+
[_.ARROW_DOWN]: O,
|
|
539
|
+
[_.ARROW_UP]: g,
|
|
540
|
+
[_.END]: h,
|
|
541
|
+
[_.ESCAPE]: b,
|
|
542
|
+
[_.HOME]: v
|
|
561
543
|
}));
|
|
562
544
|
}, vt = ({ inputContainerRef: e, isDropdownOpen: o }, n) => {
|
|
563
545
|
const t = () => {
|
|
564
|
-
o.value && n(),
|
|
565
|
-
|
|
546
|
+
o.value && n(), C(() => {
|
|
547
|
+
we(e);
|
|
566
548
|
});
|
|
567
549
|
};
|
|
568
550
|
return {
|
|
@@ -571,17 +553,35 @@ const ct = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
|
571
553
|
[s.TAB]: t,
|
|
572
554
|
[s.SPACE]: t
|
|
573
555
|
};
|
|
574
|
-
}
|
|
575
|
-
|
|
556
|
+
};
|
|
557
|
+
function yt(e, o, n) {
|
|
558
|
+
const t = $(e), a = $(o), i = (r, l = []) => l.flatMap((p) => p.label.toLocaleLowerCase().includes(r) ? [p, ...i(r, p.items)] : p.items ? [...i(r, p.items)] : []);
|
|
559
|
+
return me(t, () => {
|
|
560
|
+
n !== void 0 && n(t.value);
|
|
561
|
+
}), c(() => {
|
|
562
|
+
if (!t.value || n !== void 0)
|
|
563
|
+
return a.value;
|
|
564
|
+
const r = t.value.toLocaleLowerCase();
|
|
565
|
+
return i(r, a.value);
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
const fe = {
|
|
569
|
+
"en-US": {
|
|
570
|
+
clearSearch: "Clear filter",
|
|
571
|
+
ariaLabelFallback: "Dropdown"
|
|
572
|
+
}
|
|
573
|
+
}, gt = te({
|
|
574
|
+
i18n: { messages: fe },
|
|
576
575
|
name: "b-dropdown",
|
|
577
576
|
components: {
|
|
578
|
-
BentoDropdownOptionsContainer:
|
|
579
|
-
BentoTypography:
|
|
580
|
-
DropdownInputDefault:
|
|
581
|
-
DropdownInputSmall:
|
|
582
|
-
ErrorMessage:
|
|
577
|
+
BentoDropdownOptionsContainer: Je,
|
|
578
|
+
BentoTypography: Me,
|
|
579
|
+
DropdownInputDefault: We,
|
|
580
|
+
DropdownInputSmall: ut,
|
|
581
|
+
ErrorMessage: Ue,
|
|
582
|
+
FieldLabel: je
|
|
583
583
|
},
|
|
584
|
-
directives: { BentoClickOutsideDirective:
|
|
584
|
+
directives: { BentoClickOutsideDirective: ze, BentoKeyboardNavigationDirective: Fe },
|
|
585
585
|
props: {
|
|
586
586
|
/**
|
|
587
587
|
* @deprecated from version 2.0.0. Use the aria-label attribute instead.
|
|
@@ -671,8 +671,8 @@ const ct = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
|
671
671
|
*/
|
|
672
672
|
lazyLoadType: {
|
|
673
673
|
type: String,
|
|
674
|
-
default:
|
|
675
|
-
validator: (e) => Object.values(
|
|
674
|
+
default: Q.props.lazyLoadType.default,
|
|
675
|
+
validator: (e) => Object.values(X).includes(e)
|
|
676
676
|
},
|
|
677
677
|
/*
|
|
678
678
|
* If enabled, the user will be able to select multiple items.
|
|
@@ -700,9 +700,13 @@ const ct = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
|
700
700
|
*/
|
|
701
701
|
size: {
|
|
702
702
|
type: String,
|
|
703
|
-
default:
|
|
704
|
-
validator: (e) => Object.values(
|
|
703
|
+
default: D.DEFAULT,
|
|
704
|
+
validator: (e) => Object.values(D).includes(e)
|
|
705
705
|
},
|
|
706
|
+
/**
|
|
707
|
+
* Adds a info icon next to the label to display the passed tooltip message.
|
|
708
|
+
*/
|
|
709
|
+
tooltipText: { type: String, default: null },
|
|
706
710
|
/**
|
|
707
711
|
* The `input` value.
|
|
708
712
|
* Providing an empty string will select no options.
|
|
@@ -731,69 +735,69 @@ const ct = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
|
731
735
|
},
|
|
732
736
|
emits: ["input", s.SHOW_MORE],
|
|
733
737
|
setup(e, { attrs: o, emit: n, slots: t }) {
|
|
734
|
-
var
|
|
735
|
-
const { t: a } =
|
|
736
|
-
ariaLabel:
|
|
738
|
+
var se;
|
|
739
|
+
const { t: a } = ne({ messages: fe }), i = $(null), d = $(null), r = $(null), l = $(!1), p = K("bento-dropdown-options-container"), O = K("dropdown-label"), g = K("dropdown-description"), h = K("dropdown-error"), { isReadOnly: b } = ke(R(e, "readonly")), v = $(o["aria-label"]), { ariaLabel: w } = be(e), m = Ke({
|
|
740
|
+
ariaLabel: v.value,
|
|
737
741
|
// TODO: take this line away when the aria-label props is removed
|
|
738
|
-
label:
|
|
742
|
+
label: w,
|
|
739
743
|
defaultFallback: a("ariaLabelFallback")
|
|
740
|
-
}),
|
|
744
|
+
}), P = c(() => ({
|
|
741
745
|
"b-dropdown__description--error": !!e.errorMessage
|
|
742
|
-
})), u =
|
|
746
|
+
})), u = $(""), f = R(e, "items"), L = yt(u, f, (se = e == null ? void 0 : e.search) == null ? void 0 : se.searchEvent), U = c(() => e.dynamicFiltering && !!u.value), Se = mt({
|
|
743
747
|
items: f,
|
|
744
|
-
multiple:
|
|
745
|
-
placeholder:
|
|
746
|
-
value:
|
|
747
|
-
}),
|
|
748
|
+
multiple: R(e, "multiple"),
|
|
749
|
+
placeholder: R(e, "placeholder"),
|
|
750
|
+
value: R(e, "value")
|
|
751
|
+
}), $e = c(() => e.size === D.DEFAULT), Oe = c(
|
|
748
752
|
() => e != null && e.multiple ? e.items.filter(
|
|
749
|
-
({ value:
|
|
750
|
-
) : e.items.find(({ value:
|
|
751
|
-
), Le =
|
|
752
|
-
const
|
|
753
|
-
return
|
|
754
|
-
}), Ee =
|
|
755
|
-
var
|
|
756
|
-
return e.multiple ? (
|
|
757
|
-
}),
|
|
758
|
-
() => `${e.description ? g : ""} ${e.errorMessage ?
|
|
759
|
-
),
|
|
760
|
-
|
|
761
|
-
},
|
|
753
|
+
({ value: S }) => (e == null ? void 0 : e.value) && (e == null ? void 0 : e.value).includes(S)
|
|
754
|
+
) : e.items.find(({ value: S }) => S === (e == null ? void 0 : e.value))
|
|
755
|
+
), Le = c(() => {
|
|
756
|
+
const S = e.items.findIndex(({ value: Te }) => e.value === Te);
|
|
757
|
+
return S > 0 ? S : 0;
|
|
758
|
+
}), Ee = c(() => {
|
|
759
|
+
var S;
|
|
760
|
+
return e.multiple ? (S = e == null ? void 0 : e.value) == null ? void 0 : S.length : null;
|
|
761
|
+
}), _e = c(
|
|
762
|
+
() => `${e.description ? g : ""} ${e.errorMessage ? h : ""}`.trim() || null
|
|
763
|
+
), Ce = () => {
|
|
764
|
+
b.value || (l.value = !0);
|
|
765
|
+
}, j = () => {
|
|
762
766
|
l.value = !1;
|
|
763
|
-
},
|
|
764
|
-
|
|
765
|
-
},
|
|
766
|
-
|
|
767
|
-
},
|
|
768
|
-
e.multiple || (u.value = "", l.value = !1), n("input",
|
|
769
|
-
},
|
|
767
|
+
}, le = () => {
|
|
768
|
+
b.value || (l.value = !l.value, U.value && (u.value = ""));
|
|
769
|
+
}, De = () => {
|
|
770
|
+
U.value && (u.value = ""), l.value && (l.value = !1);
|
|
771
|
+
}, ae = (S) => {
|
|
772
|
+
e.multiple || (u.value = "", l.value = !1), n("input", S);
|
|
773
|
+
}, ie = () => {
|
|
770
774
|
n(s.SHOW_MORE);
|
|
771
|
-
},
|
|
775
|
+
}, Ie = bt(
|
|
772
776
|
{
|
|
773
777
|
inputContainerRef: i,
|
|
774
|
-
optionsContainerRef:
|
|
778
|
+
optionsContainerRef: r,
|
|
775
779
|
selectedValueIndex: Le,
|
|
776
780
|
isDropdownOpen: l,
|
|
777
|
-
isDynamicFltering:
|
|
781
|
+
isDynamicFltering: R(e, "dynamicFiltering"),
|
|
778
782
|
items: e.items,
|
|
779
783
|
isMultiple: e.multiple
|
|
780
784
|
},
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
),
|
|
785
|
+
le,
|
|
786
|
+
Ce,
|
|
787
|
+
j
|
|
788
|
+
), Be = vt(
|
|
785
789
|
{
|
|
786
790
|
inputContainerRef: i,
|
|
787
791
|
isDropdownOpen: l
|
|
788
792
|
},
|
|
789
|
-
|
|
790
|
-
),
|
|
791
|
-
[s.CLOSE_DROPDOWN]:
|
|
792
|
-
[s.SELECT]:
|
|
793
|
-
[s.SHOW_MORE]:
|
|
794
|
-
...
|
|
793
|
+
j
|
|
794
|
+
), Re = {
|
|
795
|
+
[s.CLOSE_DROPDOWN]: j,
|
|
796
|
+
[s.SELECT]: ae,
|
|
797
|
+
[s.SHOW_MORE]: ie,
|
|
798
|
+
...Be
|
|
795
799
|
};
|
|
796
|
-
return e.error &&
|
|
800
|
+
return e.error && Pe(
|
|
797
801
|
'BentoDropdown "error" property',
|
|
798
802
|
`Use the BentoDropdown "errorMessage" property instead to indicate that there is a modifier error.
|
|
799
803
|
Having the field as "undefined" will hide/remove the error.
|
|
@@ -801,83 +805,56 @@ const ct = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
|
801
805
|
"2.0.0"
|
|
802
806
|
), {
|
|
803
807
|
// Values
|
|
804
|
-
computedAriaLabel:
|
|
808
|
+
computedAriaLabel: m,
|
|
805
809
|
additionalItemsSelected: Ee,
|
|
806
|
-
idDefaultSize:
|
|
810
|
+
idDefaultSize: $e,
|
|
807
811
|
isDropdownOpen: l,
|
|
808
|
-
displayValue:
|
|
809
|
-
dropdownOptionsContainerId:
|
|
810
|
-
filteredItems:
|
|
811
|
-
isSearching:
|
|
812
|
-
isReadOnly:
|
|
812
|
+
displayValue: Se,
|
|
813
|
+
dropdownOptionsContainerId: p,
|
|
814
|
+
filteredItems: L,
|
|
815
|
+
isSearching: U,
|
|
816
|
+
isReadOnly: b,
|
|
813
817
|
searchTerm: u,
|
|
814
|
-
labelId:
|
|
818
|
+
labelId: O,
|
|
815
819
|
descriptionId: g,
|
|
816
|
-
errorId:
|
|
817
|
-
ariaDescribedBy:
|
|
820
|
+
errorId: h,
|
|
821
|
+
ariaDescribedBy: _e,
|
|
818
822
|
selectedValueItem: Oe,
|
|
819
823
|
// Conciliation of Vue2 $scopedSlots and Vue3 $scopes.
|
|
820
824
|
// The setup method and the "useSlots" composible define
|
|
821
825
|
// { slots } as a proxy of $scopedSlots and $scopes in their
|
|
822
826
|
// respective Vue version. Source: https://github.com/vuejs/composition-api/issues/84#issuecomment-524885445
|
|
823
827
|
slots: t,
|
|
824
|
-
descriptionConditionalClasses:
|
|
828
|
+
descriptionConditionalClasses: P,
|
|
825
829
|
// Refs
|
|
826
830
|
inputContainerRef: i,
|
|
827
|
-
inputContainerRefWrapper:
|
|
828
|
-
optionsContainerRef:
|
|
831
|
+
inputContainerRefWrapper: d,
|
|
832
|
+
optionsContainerRef: r,
|
|
829
833
|
// Events
|
|
830
|
-
closeOpenedDropdown:
|
|
831
|
-
toggleDropdown:
|
|
832
|
-
onOptionSelected:
|
|
833
|
-
emitShowMoreEvent:
|
|
834
|
-
textboxKeyboardNavigationListeners:
|
|
835
|
-
listboxListeners:
|
|
834
|
+
closeOpenedDropdown: De,
|
|
835
|
+
toggleDropdown: le,
|
|
836
|
+
onOptionSelected: ae,
|
|
837
|
+
emitShowMoreEvent: ie,
|
|
838
|
+
textboxKeyboardNavigationListeners: Ie,
|
|
839
|
+
listboxListeners: Re
|
|
836
840
|
};
|
|
837
841
|
}
|
|
838
842
|
});
|
|
839
|
-
const
|
|
843
|
+
const ht = { class: "b-dropdown" };
|
|
840
844
|
function wt(e, o, n, t, a, i) {
|
|
841
|
-
var
|
|
842
|
-
const
|
|
843
|
-
return
|
|
844
|
-
e.label ? (
|
|
845
|
+
var h;
|
|
846
|
+
const d = E("field-label"), r = E("bento-dropdown-options-container"), l = E("error-message"), p = E("bento-typography"), O = de("bento-keyboard-navigation-directive"), g = de("bento-click-outside-directive");
|
|
847
|
+
return x((y(), B("div", ht, [
|
|
848
|
+
e.label ? (y(), A(d, {
|
|
845
849
|
key: 0,
|
|
846
850
|
id: e.labelId,
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
W(P(e.label), 1)
|
|
855
|
-
]),
|
|
856
|
-
_: 1
|
|
857
|
-
}),
|
|
858
|
-
e.optional ? (b(), I(r, {
|
|
859
|
-
key: 0,
|
|
860
|
-
class: "b-dropdown__label-requirement",
|
|
861
|
-
el: "span"
|
|
862
|
-
}, {
|
|
863
|
-
default: O(() => [
|
|
864
|
-
W(" (" + P(e.$t("optional")) + ") ", 1)
|
|
865
|
-
]),
|
|
866
|
-
_: 1
|
|
867
|
-
})) : L("", !0),
|
|
868
|
-
e.required ? (b(), I(r, {
|
|
869
|
-
key: 1,
|
|
870
|
-
class: "b-dropdown__label-requirement",
|
|
871
|
-
el: "span"
|
|
872
|
-
}, {
|
|
873
|
-
default: O(() => [
|
|
874
|
-
W(" (" + P(e.$t("required")) + ") ", 1)
|
|
875
|
-
]),
|
|
876
|
-
_: 1
|
|
877
|
-
})) : L("", !0)
|
|
878
|
-
], 8, ht)) : L("", !0),
|
|
879
|
-
q((b(), E("div", A({ ref: "inputContainerRefWrapper" }, x(e.textboxKeyboardNavigationListeners, !0)), [
|
|
880
|
-
(b(), I(ye(e.size), {
|
|
851
|
+
label: e.label,
|
|
852
|
+
"tooltip-text": e.tooltipText,
|
|
853
|
+
optional: e.optional,
|
|
854
|
+
required: e.required
|
|
855
|
+
}, null, 8, ["id", "label", "tooltip-text", "optional", "required"])) : N("", !0),
|
|
856
|
+
x((y(), B("div", I({ ref: "inputContainerRefWrapper" }, z(e.textboxKeyboardNavigationListeners, !0)), [
|
|
857
|
+
(y(), A(ve(e.size), {
|
|
881
858
|
ref: "inputContainerRef",
|
|
882
859
|
value: e.searchTerm,
|
|
883
860
|
"additional-items-selected": e.additionalItemsSelected,
|
|
@@ -896,27 +873,27 @@ function wt(e, o, n, t, a, i) {
|
|
|
896
873
|
open: e.isDropdownOpen,
|
|
897
874
|
"selected-value-item": e.idDefaultSize ? e.selectedValueItem : void 0,
|
|
898
875
|
"show-slot-content-in-multiple": e.showSlotContentInMultiple,
|
|
899
|
-
onInput: o[0] || (o[0] = (
|
|
876
|
+
onInput: o[0] || (o[0] = (b) => e.searchTerm = b),
|
|
900
877
|
onOpen: e.toggleDropdown,
|
|
901
878
|
onClose: e.toggleDropdown
|
|
902
|
-
},
|
|
903
|
-
|
|
904
|
-
name:
|
|
905
|
-
fn:
|
|
906
|
-
|
|
879
|
+
}, V({ _: 2 }, [
|
|
880
|
+
J(e.slots, (b, v) => ({
|
|
881
|
+
name: v,
|
|
882
|
+
fn: M((w) => [
|
|
883
|
+
Z(e.$slots, v, Y(G(w)), void 0, !0)
|
|
907
884
|
])
|
|
908
885
|
}))
|
|
909
886
|
]), 1064, ["value", "additional-items-selected", "ariaControls", "ariaExpanded", "aria-labelledby", "aria-describedby", "aria-label", "aria-readonly", "readonly", "disabled", "display-value", "dynamic-filtering", "is-invalid", "multiple", "open", "selected-value-item", "show-slot-content-in-multiple", "onOpen", "onClose"]))
|
|
910
887
|
], 16)), [
|
|
911
|
-
[
|
|
888
|
+
[O]
|
|
912
889
|
]),
|
|
913
|
-
e.inputContainerRef ? (
|
|
890
|
+
e.inputContainerRef ? (y(), A(r, I({
|
|
914
891
|
key: 1,
|
|
915
892
|
id: e.dropdownOptionsContainerId,
|
|
916
893
|
ref: "optionsContainerRef",
|
|
917
894
|
"aria-label": e.computedAriaLabel,
|
|
918
895
|
"empty-state": e.emptyState,
|
|
919
|
-
"debounce-time": (
|
|
896
|
+
"debounce-time": (h = e.search) == null ? void 0 : h.debounceTime,
|
|
920
897
|
disabled: e.disabled,
|
|
921
898
|
"input-size": e.size,
|
|
922
899
|
"is-option-disabled": e.isOptionDisabled,
|
|
@@ -930,39 +907,39 @@ function wt(e, o, n, t, a, i) {
|
|
|
930
907
|
"has-more-items": e.hasMoreItems,
|
|
931
908
|
"lazy-load-type": e.lazyLoadType,
|
|
932
909
|
"virtual-scroll": e.virtualScroll
|
|
933
|
-
},
|
|
934
|
-
|
|
935
|
-
name:
|
|
936
|
-
fn:
|
|
937
|
-
|
|
910
|
+
}, z(e.listboxListeners)), V({ _: 2 }, [
|
|
911
|
+
J(e.slots, (b, v) => ({
|
|
912
|
+
name: v,
|
|
913
|
+
fn: M((w) => [
|
|
914
|
+
Z(e.$slots, v, Y(G(w)), void 0, !0)
|
|
938
915
|
])
|
|
939
916
|
}))
|
|
940
|
-
]), 1040, ["id", "aria-label", "empty-state", "debounce-time", "disabled", "input-size", "is-option-disabled", "items", "multiple", "open", "selected-value", "searching", "target-element", "loading", "has-more-items", "lazy-load-type", "virtual-scroll"])) :
|
|
941
|
-
e.errorMessage ? (
|
|
917
|
+
]), 1040, ["id", "aria-label", "empty-state", "debounce-time", "disabled", "input-size", "is-option-disabled", "items", "multiple", "open", "selected-value", "searching", "target-element", "loading", "has-more-items", "lazy-load-type", "virtual-scroll"])) : N("", !0),
|
|
918
|
+
e.errorMessage ? (y(), A(l, {
|
|
942
919
|
key: 2,
|
|
943
920
|
id: e.errorId,
|
|
944
921
|
"error-message": e.errorMessage,
|
|
945
922
|
class: "b-dropdown__error-message"
|
|
946
|
-
}, null, 8, ["id", "error-message"])) :
|
|
947
|
-
e.description ? (
|
|
923
|
+
}, null, 8, ["id", "error-message"])) : N("", !0),
|
|
924
|
+
e.description ? (y(), A(p, {
|
|
948
925
|
key: 3,
|
|
949
926
|
id: e.descriptionId,
|
|
950
|
-
class:
|
|
927
|
+
class: he(["b-dropdown__description", e.descriptionConditionalClasses]),
|
|
951
928
|
el: "span"
|
|
952
929
|
}, {
|
|
953
|
-
default:
|
|
954
|
-
|
|
930
|
+
default: M(() => [
|
|
931
|
+
Ne(oe(e.description), 1)
|
|
955
932
|
]),
|
|
956
933
|
_: 1
|
|
957
|
-
}, 8, ["id", "class"])) :
|
|
934
|
+
}, 8, ["id", "class"])) : N("", !0)
|
|
958
935
|
])), [
|
|
959
|
-
[
|
|
936
|
+
[g, e.closeOpenedDropdown]
|
|
960
937
|
]);
|
|
961
938
|
}
|
|
962
|
-
const Mt = /* @__PURE__ */
|
|
939
|
+
const Mt = /* @__PURE__ */ k(gt, [["render", wt], ["__scopeId", "data-v-a24ee2cb"]]);
|
|
963
940
|
export {
|
|
964
941
|
Mt as B,
|
|
965
|
-
|
|
966
|
-
|
|
942
|
+
D as a,
|
|
943
|
+
yt as u
|
|
967
944
|
};
|
|
968
|
-
//# sourceMappingURL=dropdown.
|
|
945
|
+
//# sourceMappingURL=dropdown.502e1f5c.js.map
|