@adyen/bento-vue3 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +77 -77
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/card/card.vue.d.ts +7 -1
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateColumnWidth/useCalculateColumnWidth.d.ts +6 -2
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateStickyElementHeight/useCalculateStickyElementHeight.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useColumnReorderer/useColumnReorderer.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useConfigSettings/useConfigSettings.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +49 -11
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +32 -33
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +60 -60
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/boolean-filter/boolean-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-filter/date-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/components/input-filter/input-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/range-filter/range-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/select-filter.vue.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +7 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +11 -1
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue.d.ts +17 -1
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-tip.types.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/info-icon/info-icon.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/internal/base-button/base-button.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/fixed-scroller/composables/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/fixed-scroller/composables/useFixedScroller.d.ts +15 -0
- package/dist/@types/packages/vue2/src/components/internal/fixed-scroller/fixed-scroller.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/internal/fixed-scroller/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/menu/components/menu-item/menu-item.vue.d.ts +4 -5
- package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +10 -1
- package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/status/status.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/tag/tag.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +24 -52
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +13 -13
- package/dist/@types/packages/vue2/src/composables/use-expandable-content-height/use-expandable-content-height.d.ts +4 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.types.d.ts +6 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +77 -1
- package/dist/@types/packages/vue2/src/templates/data-grid-template/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/utils/ts/truncate.d.ts +1 -1
- package/dist/accordion.js +42 -47
- package/dist/accordion.js.map +1 -1
- package/dist/alert.js +4 -4
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -0
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/loading-button.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +5 -5
- package/dist/card.js +135 -121
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +24 -25
- package/dist/checkbox.js.map +1 -1
- package/dist/chunks/{base-button.9740f320.js → base-button.90687c75.js} +3 -3
- package/dist/chunks/{base-button.9740f320.js.map → base-button.90687c75.js.map} +1 -1
- package/dist/chunks/{base-modal.be77971f.js → base-modal.c956b084.js} +58 -58
- package/dist/chunks/base-modal.c956b084.js.map +1 -0
- package/dist/chunks/{button.7072457f.js → button.9d72e2d7.js} +3 -3
- package/dist/chunks/{button.7072457f.js.map → button.9d72e2d7.js.map} +1 -1
- package/dist/chunks/{calendar.1e50c7d1.js → calendar.e7db78d0.js} +6 -5
- package/dist/chunks/{calendar.1e50c7d1.js.map → calendar.e7db78d0.js.map} +1 -1
- package/dist/chunks/{checkbox.638bab98.js → checkbox.ecbb4f0c.js} +4 -4
- package/dist/chunks/{checkbox.638bab98.js.map → checkbox.ecbb4f0c.js.map} +1 -1
- package/dist/chunks/{controls-group.efcf4e8d.js → controls-group.34f1f82a.js} +2 -2
- package/dist/chunks/{controls-group.efcf4e8d.js.map → controls-group.34f1f82a.js.map} +1 -1
- package/dist/chunks/{copy.527c3d76.js → copy.aaec57b6.js} +3 -3
- package/dist/chunks/{copy.527c3d76.js.map → copy.aaec57b6.js.map} +1 -1
- package/dist/chunks/date-input.9186a0bf.js.map +1 -1
- package/dist/chunks/{dropdown-default-textbox.a1789dc7.js → dropdown-default-textbox.88a42e9b.js} +3 -3
- package/dist/chunks/{dropdown-default-textbox.a1789dc7.js.map → dropdown-default-textbox.88a42e9b.js.map} +1 -1
- package/dist/chunks/{dropdown.22e51667.js → dropdown.6a484461.js} +182 -177
- package/dist/chunks/dropdown.6a484461.js.map +1 -0
- package/dist/chunks/{error-message.37b6c7aa.js → error-message.11e1fa1f.js} +2 -2
- package/dist/chunks/{error-message.37b6c7aa.js.map → error-message.11e1fa1f.js.map} +1 -1
- package/dist/chunks/{footer-actions.5275203a.js → footer-actions.a65cb2e3.js} +3 -3
- package/dist/chunks/{footer-actions.5275203a.js.map → footer-actions.a65cb2e3.js.map} +1 -1
- package/dist/chunks/{grid-layout.c98e6bc7.js → grid-layout.7c919507.js} +2 -2
- package/dist/chunks/{grid-layout.c98e6bc7.js.map → grid-layout.7c919507.js.map} +1 -1
- package/dist/chunks/{index.c22c4278.js → index.424e2ea4.js} +6 -6
- package/dist/chunks/{index.c22c4278.js.map → index.424e2ea4.js.map} +1 -1
- package/dist/chunks/{index.dd20095f.js → index.655b761f.js} +3 -3
- package/dist/chunks/{index.dd20095f.js.map → index.655b761f.js.map} +1 -1
- package/dist/chunks/{index.c62ea69f.js → index.754349ff.js} +2 -2
- package/dist/chunks/{index.c62ea69f.js.map → index.754349ff.js.map} +1 -1
- package/dist/chunks/{index.a57930ba.js → index.84f6360f.js} +11 -10
- package/dist/chunks/{index.a57930ba.js.map → index.84f6360f.js.map} +1 -1
- package/dist/chunks/{index.32ed68b7.js → index.9fc54b60.js} +2 -2
- package/dist/chunks/{index.32ed68b7.js.map → index.9fc54b60.js.map} +1 -1
- package/dist/chunks/{index.604da8e9.js → index.bc9e0cde.js} +3 -3
- package/dist/chunks/{index.604da8e9.js.map → index.bc9e0cde.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.fa70334e.js → listbox-option-tag.ea9f377f.js} +3 -3
- package/dist/chunks/{listbox-option-tag.fa70334e.js.map → listbox-option-tag.ea9f377f.js.map} +1 -1
- package/dist/chunks/{listbox.4205c0de.js → listbox.a7255ce1.js} +4 -4
- package/dist/chunks/{listbox.4205c0de.js.map → listbox.a7255ce1.js.map} +1 -1
- package/dist/chunks/{loading-button.41c15584.js → loading-button.fb1f20a3.js} +32 -32
- package/dist/chunks/loading-button.fb1f20a3.js.map +1 -0
- package/dist/chunks/on-click-outside.3e0c3e2a.js.map +1 -1
- package/dist/chunks/{tooltip.c8350cd0.js → tooltip.6af06509.js} +64 -63
- package/dist/chunks/tooltip.6af06509.js.map +1 -0
- package/dist/chunks/use-expandable-content-height.62fc84e5.js +17 -0
- package/dist/chunks/use-expandable-content-height.62fc84e5.js.map +1 -0
- package/dist/chunks/use-has-slot.4d98bf29.js +15 -0
- package/dist/chunks/use-has-slot.4d98bf29.js.map +1 -0
- package/dist/code-snippet.js +7 -7
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +944 -888
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +7 -7
- 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 +990 -904
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +81 -70
- package/dist/form-layout.js.map +1 -1
- package/dist/header.js +92 -87
- package/dist/header.js.map +1 -1
- package/dist/index.js +14 -14
- package/dist/info-icon.js +12 -12
- package/dist/info-icon.js.map +1 -1
- package/dist/input-field.js +115 -110
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +144 -18
- package/dist/internal.js.map +1 -1
- package/dist/link.js +38 -35
- package/dist/link.js.map +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +8 -6
- package/dist/menu.js.map +1 -1
- package/dist/modal.js +52 -44
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +4 -4
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +4 -4
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +5 -5
- package/dist/search-bar.js +7 -7
- package/dist/search-bar.js.map +1 -1
- package/dist/segmented-control.js +4 -4
- package/dist/sidepanel.js +19 -19
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +5 -5
- package/dist/tabs.js +64 -64
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -3
- package/dist/textarea.js +188 -229
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +37 -37
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +4 -4
- package/dist/toggle.js +3 -3
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +5 -3
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateColumnHeadersTopPosition/useCalculateColumnHeadersTopPosition.d.ts +0 -2
- package/dist/chunks/base-modal.be77971f.js.map +0 -1
- package/dist/chunks/dropdown.22e51667.js.map +0 -1
- package/dist/chunks/loading-button.41c15584.js.map +0 -1
- package/dist/chunks/tooltip.c8350cd0.js.map +0 -1
- package/dist/chunks/use-has-slot.3daaffc6.js +0 -17
- package/dist/chunks/use-has-slot.3daaffc6.js.map +0 -1
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { ref as $, watch as be, computed as
|
|
2
|
-
import { a as s, B as ee, b as te } from "./listbox.
|
|
1
|
+
import { ref as $, watch as be, computed as f, defineComponent as ne, toRefs as ve, resolveComponent as R, openBlock as b, createBlock as I, resolveDynamicComponent as ye, mergeProps as A, withCtx as L, createElementVNode as U, withKeys as Ne, createVNode as k, toHandlers as W, createSlots as Z, renderList as Y, renderSlot as G, normalizeProps as Q, guardReactiveProps as X, createElementBlock as E, toDisplayString as P, createCommentVNode as O, pushScopeId as ge, popScopeId as he, normalizeClass as we, withDirectives as q, vShow as de, nextTick as B, toRef as N, resolveDirective as ue, createTextVNode as x } from "vue";
|
|
2
|
+
import { a as s, B as ee, b as te } from "./listbox.a7255ce1.js";
|
|
3
3
|
import { B as Me } from "./directive.0408e565.js";
|
|
4
4
|
import { B as D, a as Pe } from "./keyboard-navigation.ca47dfa8.js";
|
|
5
|
-
import { D as Ke, a as M, b as j, c as ke } from "./dropdown-default-textbox.
|
|
6
|
-
import { _ as
|
|
7
|
-
import { B as ze, d as Fe } from "./index.
|
|
8
|
-
import { g as
|
|
5
|
+
import { D as Ke, a as M, b as j, c as ke } from "./dropdown-default-textbox.88a42e9b.js";
|
|
6
|
+
import { _ as z } from "./_plugin-vue_export-helper.dad06003.js";
|
|
7
|
+
import { B as ze, d as Fe } from "./index.9fc54b60.js";
|
|
8
|
+
import { g as K } from "./unique-id.a2a2b458.js";
|
|
9
9
|
import { u as le } from "./i18n.6c402773.js";
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
10
|
+
import { u as xe } from "./aria-label.ac9651a5.js";
|
|
11
|
+
import { u as We } from "./use-form-layout-loading.d03e5d48.js";
|
|
12
12
|
import { PopperContainer as J } from "../popper-container.js";
|
|
13
13
|
import { BentoPopover as ce } from "../popover.js";
|
|
14
|
-
import {
|
|
15
|
-
import { E as Ue } from "./error-message.37b6c7aa.js";
|
|
14
|
+
import { E as qe } from "./error-message.11e1fa1f.js";
|
|
16
15
|
import "../assets/dropdown.css";
|
|
17
16
|
var T = /* @__PURE__ */ ((e) => (e.DEFAULT = "DropdownInputDefault", e.SMALL = "DropdownInputSmall", e))(T || {});
|
|
18
17
|
const oe = {
|
|
@@ -21,18 +20,18 @@ const oe = {
|
|
|
21
20
|
cancel: "Cancel",
|
|
22
21
|
noOptionsMatchThisSearch: "No options match this search"
|
|
23
22
|
}
|
|
24
|
-
},
|
|
23
|
+
}, Ue = (e, o, n) => {
|
|
25
24
|
const t = $(e.value), { t: a } = le({ messages: oe });
|
|
26
25
|
be(e, () => {
|
|
27
26
|
t.value = e.value;
|
|
28
27
|
});
|
|
29
|
-
const i =
|
|
28
|
+
const i = f(
|
|
30
29
|
() => JSON.stringify(t.value) === JSON.stringify(e.value)
|
|
31
30
|
), r = () => {
|
|
32
31
|
n(s.SELECT, t.value), n(s.CLOSE_DROPDOWN);
|
|
33
32
|
}, d = () => {
|
|
34
33
|
t.value = e.value, n(s.CLOSE_DROPDOWN);
|
|
35
|
-
}, l =
|
|
34
|
+
}, l = f(() => [
|
|
36
35
|
{
|
|
37
36
|
title: a("apply"),
|
|
38
37
|
event: r,
|
|
@@ -42,24 +41,24 @@ const oe = {
|
|
|
42
41
|
title: a("cancel"),
|
|
43
42
|
event: d
|
|
44
43
|
}
|
|
45
|
-
]),
|
|
44
|
+
]), c = (v) => {
|
|
46
45
|
t.value = v, o.value || n(s.SELECT, v);
|
|
47
46
|
}, _ = (v) => {
|
|
48
|
-
|
|
49
|
-
}, y = (v) => {
|
|
50
|
-
f(v), n(s.ENTER);
|
|
47
|
+
c(v), n(s.TAB);
|
|
51
48
|
}, g = (v) => {
|
|
52
|
-
|
|
49
|
+
c(v), n(s.ENTER);
|
|
50
|
+
}, y = (v) => {
|
|
51
|
+
c(v), n(s.SPACE);
|
|
53
52
|
}, m = () => {
|
|
54
53
|
d(), n(s.ESCAPE);
|
|
55
54
|
}, h = () => {
|
|
56
55
|
n(s.SHOW_MORE);
|
|
57
56
|
}, C = {
|
|
58
|
-
[s.SELECT]:
|
|
57
|
+
[s.SELECT]: c,
|
|
59
58
|
[s.SHOW_MORE]: h,
|
|
60
59
|
[s.TAB]: _,
|
|
61
|
-
[s.SPACE]:
|
|
62
|
-
[s.ENTER]:
|
|
60
|
+
[s.SPACE]: y,
|
|
61
|
+
[s.ENTER]: g
|
|
63
62
|
};
|
|
64
63
|
return {
|
|
65
64
|
// Values
|
|
@@ -69,7 +68,7 @@ const oe = {
|
|
|
69
68
|
listeners: C,
|
|
70
69
|
onEscapeKey: m
|
|
71
70
|
};
|
|
72
|
-
},
|
|
71
|
+
}, He = ne({
|
|
73
72
|
i18n: { messages: oe },
|
|
74
73
|
name: "bento-dropdown-options-container",
|
|
75
74
|
components: {
|
|
@@ -180,70 +179,76 @@ const oe = {
|
|
|
180
179
|
s.TAB
|
|
181
180
|
],
|
|
182
181
|
setup(e, { emit: o, slots: n }) {
|
|
183
|
-
|
|
182
|
+
var u;
|
|
183
|
+
const { selectedValue: t, multiple: a } = ve(e), i = $(null), { t: r } = le({ messages: oe }), d = f(() => e.open && !e.disabled), l = f(() => r("noOptionsMatchThisSearch")), c = {
|
|
184
|
+
"min-width": `${(u = e == null ? void 0 : e.targetElement) == null ? void 0 : u.clientWidth}px`,
|
|
185
|
+
"max-width": "min(500px, 95%)"
|
|
186
|
+
}, _ = f(() => ({
|
|
184
187
|
"b-dropdown-options-container--single": !(e != null && e.multiple)
|
|
185
|
-
})),
|
|
188
|
+
})), g = f(() => ({
|
|
186
189
|
"b-dropdown-options-container__listbox--small": e.inputSize === T.SMALL,
|
|
187
190
|
"b-dropdown-options-container__listbox--single": !(e != null && e.multiple)
|
|
188
|
-
})), { actions: y, internalSelectedValue:
|
|
191
|
+
})), { actions: y, internalSelectedValue: m, listeners: h, onEscapeKey: C } = Ue(
|
|
189
192
|
t,
|
|
190
193
|
a,
|
|
191
194
|
o
|
|
192
|
-
),
|
|
195
|
+
), v = f(
|
|
193
196
|
() => e != null && e.multiple ? ce : J
|
|
194
|
-
),
|
|
195
|
-
() => {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
197
|
+
), F = f(
|
|
198
|
+
() => e != null && e.multiple ? {
|
|
199
|
+
actionsLayout: "space-between",
|
|
200
|
+
actions: y.value,
|
|
201
|
+
divider: !0,
|
|
202
|
+
fallbackPosition: ["top-start"],
|
|
203
|
+
id: K(`dropdown-options-${e.id}`),
|
|
204
|
+
open: e.open,
|
|
205
|
+
position: "bottom-start",
|
|
206
|
+
style: {
|
|
207
|
+
width: "auto",
|
|
208
|
+
...c
|
|
209
|
+
},
|
|
210
|
+
targetElement: e.targetElement
|
|
211
|
+
} : {
|
|
212
|
+
fallbackPosition: ["top-start"],
|
|
213
|
+
offset: [0, 8],
|
|
214
|
+
position: "bottom-start",
|
|
215
|
+
style: {
|
|
216
|
+
display: d.value ? "block" : "none",
|
|
217
|
+
...c
|
|
218
|
+
},
|
|
219
|
+
targetElement: e.targetElement
|
|
215
220
|
}
|
|
216
221
|
);
|
|
217
222
|
return {
|
|
218
223
|
// Values
|
|
219
224
|
isDropdownOpen: d,
|
|
220
|
-
conditionalClasses:
|
|
221
|
-
conditionalListboxClasses:
|
|
225
|
+
conditionalClasses: _,
|
|
226
|
+
conditionalListboxClasses: g,
|
|
222
227
|
noResultsMessage: l,
|
|
223
228
|
slots: n,
|
|
224
229
|
actions: y,
|
|
225
|
-
internalSelectedValue:
|
|
230
|
+
internalSelectedValue: m,
|
|
226
231
|
// Component wrapper
|
|
227
|
-
popperContainerOrPopoverComponent:
|
|
228
|
-
popperContainerOrPopoverProps:
|
|
232
|
+
popperContainerOrPopoverComponent: v,
|
|
233
|
+
popperContainerOrPopoverProps: F,
|
|
229
234
|
// Refs
|
|
230
235
|
dropdownOptionsListboxRef: i,
|
|
231
236
|
// Events
|
|
232
|
-
onEscapeKey:
|
|
233
|
-
listeners:
|
|
237
|
+
onEscapeKey: C,
|
|
238
|
+
listeners: h
|
|
234
239
|
};
|
|
235
240
|
}
|
|
236
241
|
});
|
|
237
|
-
function
|
|
242
|
+
function Ve(e, o, n, t, a, i) {
|
|
238
243
|
const r = R("bento-listbox");
|
|
239
|
-
return b(),
|
|
244
|
+
return b(), I(ye(e.popperContainerOrPopoverComponent), A({
|
|
240
245
|
class: ["b-dropdown-options-container", e.conditionalClasses]
|
|
241
246
|
}, e.popperContainerOrPopoverProps), {
|
|
242
|
-
default:
|
|
247
|
+
default: L(() => [
|
|
243
248
|
U("div", {
|
|
244
249
|
onKeydown: o[0] || (o[0] = Ne((...d) => e.onEscapeKey && e.onEscapeKey(...d), ["esc"]))
|
|
245
250
|
}, [
|
|
246
|
-
|
|
251
|
+
k(r, A({
|
|
247
252
|
id: e.id,
|
|
248
253
|
ref: "dropdownOptionsListboxRef",
|
|
249
254
|
"aria-label": e.ariaLabel,
|
|
@@ -257,11 +262,11 @@ function je(e, o, n, t, a, i) {
|
|
|
257
262
|
loading: e.loading,
|
|
258
263
|
"lazy-load-type": e.lazyLoadType,
|
|
259
264
|
"has-more-items": e.hasMoreItems
|
|
260
|
-
},
|
|
265
|
+
}, W(e.listeners)), Z({ _: 2 }, [
|
|
261
266
|
Y(e.slots, (d, l) => ({
|
|
262
267
|
name: l,
|
|
263
|
-
fn:
|
|
264
|
-
G(e.$slots, l, Q(X(
|
|
268
|
+
fn: L((c) => [
|
|
269
|
+
G(e.$slots, l, Q(X(c)), void 0, !0)
|
|
265
270
|
])
|
|
266
271
|
}))
|
|
267
272
|
]), 1040, ["id", "aria-label", "class", "is-option-disabled", "items", "selected-value", "multiple", "no-results-message", "searching", "loading", "lazy-load-type", "has-more-items"])
|
|
@@ -270,55 +275,55 @@ function je(e, o, n, t, a, i) {
|
|
|
270
275
|
_: 3
|
|
271
276
|
}, 16, ["class"]);
|
|
272
277
|
}
|
|
273
|
-
const
|
|
278
|
+
const je = /* @__PURE__ */ z(He, [["render", Ve], ["__scopeId", "data-v-2e5620d7"]]);
|
|
274
279
|
let fe = 0;
|
|
275
|
-
const
|
|
280
|
+
const Je = {
|
|
276
281
|
beforeCreate() {
|
|
277
282
|
this.uuid = fe.toString(), fe += 1;
|
|
278
283
|
}
|
|
279
|
-
},
|
|
284
|
+
}, Ze = (e) => (ge("data-v-18645fe6"), e = e(), he(), e), Ye = { key: 0 }, Ge = /* @__PURE__ */ Ze(() => /* @__PURE__ */ U("path", {
|
|
280
285
|
fill: "#00112C",
|
|
281
286
|
"fill-rule": "evenodd",
|
|
282
287
|
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",
|
|
283
288
|
"clip-rule": "evenodd"
|
|
284
289
|
}, null, -1));
|
|
285
|
-
function
|
|
286
|
-
return b(),
|
|
290
|
+
function Qe(e, o, n, t, a, i) {
|
|
291
|
+
return b(), E("svg", A({ role: "img" }, e.$attrs, {
|
|
287
292
|
xmlns: "http://www.w3.org/2000/svg",
|
|
288
293
|
width: "16",
|
|
289
294
|
height: "16",
|
|
290
295
|
fill: "none"
|
|
291
296
|
}), [
|
|
292
|
-
e.$attrs["svg-title"] ? (b(),
|
|
293
|
-
|
|
297
|
+
e.$attrs["svg-title"] ? (b(), E("title", Ye, P(e.$attrs["svg-title"]), 1)) : O("", !0),
|
|
298
|
+
Ge
|
|
294
299
|
], 16);
|
|
295
300
|
}
|
|
296
|
-
const
|
|
301
|
+
const Xe = /* @__PURE__ */ z(Je, [["render", Qe], ["__scopeId", "data-v-18645fe6"]]);
|
|
297
302
|
let pe = 0;
|
|
298
|
-
const
|
|
303
|
+
const et = {
|
|
299
304
|
beforeCreate() {
|
|
300
305
|
this.uuid = pe.toString(), pe += 1;
|
|
301
306
|
}
|
|
302
|
-
},
|
|
307
|
+
}, tt = (e) => (ge("data-v-6f20d431"), e = e(), he(), e), ot = { key: 0 }, nt = /* @__PURE__ */ tt(() => /* @__PURE__ */ U("path", {
|
|
303
308
|
fill: "#00112C",
|
|
304
309
|
"fill-rule": "evenodd",
|
|
305
310
|
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",
|
|
306
311
|
"clip-rule": "evenodd"
|
|
307
312
|
}, null, -1));
|
|
308
|
-
function
|
|
309
|
-
return b(),
|
|
313
|
+
function lt(e, o, n, t, a, i) {
|
|
314
|
+
return b(), E("svg", A({ role: "img" }, e.$attrs, {
|
|
310
315
|
xmlns: "http://www.w3.org/2000/svg",
|
|
311
316
|
width: "16",
|
|
312
317
|
height: "16",
|
|
313
318
|
fill: "none"
|
|
314
319
|
}), [
|
|
315
|
-
e.$attrs["svg-title"] ? (b(),
|
|
316
|
-
|
|
320
|
+
e.$attrs["svg-title"] ? (b(), E("title", ot, P(e.$attrs["svg-title"]), 1)) : O("", !0),
|
|
321
|
+
nt
|
|
317
322
|
], 16);
|
|
318
323
|
}
|
|
319
|
-
const
|
|
324
|
+
const at = /* @__PURE__ */ z(et, [["render", lt], ["__scopeId", "data-v-6f20d431"]]), it = ne({
|
|
320
325
|
name: "dropdown-small-textbox",
|
|
321
|
-
components: { ChevronDownSmallIcon:
|
|
326
|
+
components: { ChevronDownSmallIcon: Xe, ChevronUpSmallIcon: at, DropdownBaseTextbox: Ke },
|
|
322
327
|
inheritAttrs: !1,
|
|
323
328
|
props: {
|
|
324
329
|
/**
|
|
@@ -392,11 +397,11 @@ const it = /* @__PURE__ */ F(tt, [["render", at], ["__scopeId", "data-v-6f20d431
|
|
|
392
397
|
},
|
|
393
398
|
emits: [M.OPEN, M.CLOSE],
|
|
394
399
|
setup(e, { emit: o }) {
|
|
395
|
-
const n =
|
|
400
|
+
const n = f(() => ({
|
|
396
401
|
[`b-dropdown-small-textbox--${j.DISABLED}`]: e.disabled,
|
|
397
402
|
[`b-dropdown-small-textbox--${j.READONLY}`]: e.readonly,
|
|
398
403
|
[`b-dropdown-small-textbox--${j.OPENED}`]: e.open
|
|
399
|
-
})), t =
|
|
404
|
+
})), t = f(() => e.open && !e.disabled && !e.readonly), a = () => {
|
|
400
405
|
o(M.OPEN);
|
|
401
406
|
}, i = () => {
|
|
402
407
|
o(M.CLOSE);
|
|
@@ -413,19 +418,19 @@ const it = /* @__PURE__ */ F(tt, [["render", at], ["__scopeId", "data-v-6f20d431
|
|
|
413
418
|
};
|
|
414
419
|
}
|
|
415
420
|
});
|
|
416
|
-
const
|
|
417
|
-
function
|
|
421
|
+
const st = { class: "b-dropdown-small-textbox__chevron" };
|
|
422
|
+
function rt(e, o, n, t, a, i) {
|
|
418
423
|
const r = R("chevron-up-small-icon"), d = R("chevron-down-small-icon"), l = R("dropdown-base-textbox");
|
|
419
|
-
return b(),
|
|
424
|
+
return b(), E("div", {
|
|
420
425
|
class: we(["b-dropdown-small-textbox", e.conditionalClasses])
|
|
421
426
|
}, [
|
|
422
|
-
|
|
423
|
-
icon:
|
|
424
|
-
U("div",
|
|
425
|
-
q(
|
|
427
|
+
k(l, A({ ...e.$attrs, ...e.$props }, { class: "b-dropdown-small-textbox__textbox" }, W(e.listeners)), {
|
|
428
|
+
icon: L(() => [
|
|
429
|
+
U("div", st, [
|
|
430
|
+
q(k(r, { "svg-title": "opened" }, null, 512), [
|
|
426
431
|
[de, e.isDropdownOpen]
|
|
427
432
|
]),
|
|
428
|
-
q(
|
|
433
|
+
q(k(d, { "svg-title": "closed" }, null, 512), [
|
|
429
434
|
[de, !e.isDropdownOpen]
|
|
430
435
|
])
|
|
431
436
|
])
|
|
@@ -434,28 +439,28 @@ function dt(e, o, n, t, a, i) {
|
|
|
434
439
|
}, 16)
|
|
435
440
|
], 2);
|
|
436
441
|
}
|
|
437
|
-
const
|
|
438
|
-
function
|
|
439
|
-
const t = $(e), a = $(o), i = (d, l = []) => l.flatMap((
|
|
442
|
+
const dt = /* @__PURE__ */ z(it, [["render", rt], ["__scopeId", "data-v-55bc3614"]]);
|
|
443
|
+
function ut(e, o, n) {
|
|
444
|
+
const t = $(e), a = $(o), i = (d, l = []) => l.flatMap((c) => c.label.toLocaleLowerCase().includes(d) ? [c, ...i(d, c.items)] : c.items ? [...i(d, c.items)] : []);
|
|
440
445
|
return be(t, () => {
|
|
441
446
|
n !== void 0 && n(t.value);
|
|
442
|
-
}),
|
|
447
|
+
}), f(() => {
|
|
443
448
|
if (!t.value || n !== void 0)
|
|
444
449
|
return a.value;
|
|
445
450
|
const d = t.value.toLocaleLowerCase();
|
|
446
451
|
return i(d, a.value);
|
|
447
452
|
});
|
|
448
453
|
}
|
|
449
|
-
const
|
|
454
|
+
const ct = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
450
455
|
const t = e.value.find(({ value: a }) => a === n.value);
|
|
451
456
|
return (t == null ? void 0 : t.label) || o.value || null;
|
|
452
|
-
},
|
|
457
|
+
}, ft = ({ selectedValues: e, items: o, placeholder: n }) => {
|
|
453
458
|
var t;
|
|
454
459
|
return !e.value || ((t = e.value) == null ? void 0 : t.length) === 0 ? n.value || null : e.value.map((a) => {
|
|
455
460
|
const { label: i } = o.value.find(({ value: r }) => r === a);
|
|
456
461
|
return i;
|
|
457
462
|
}).join(", ");
|
|
458
|
-
},
|
|
463
|
+
}, pt = ({ selectedValues: e, items: o, placeholder: n }) => {
|
|
459
464
|
var t;
|
|
460
465
|
return !e.value || !((t = e.value) != null && t.length) ? n.value || null : o.value.reduce((a, i) => {
|
|
461
466
|
if (i.items) {
|
|
@@ -466,12 +471,12 @@ const ft = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
|
466
471
|
}
|
|
467
472
|
return e.value.includes(i.value) && a.push(i.label), a;
|
|
468
473
|
}, []).join(", ");
|
|
469
|
-
},
|
|
470
|
-
const a =
|
|
474
|
+
}, mt = ({ items: e, placeholder: o, value: n, multiple: t }) => {
|
|
475
|
+
const a = f(() => e.value.find((r) => {
|
|
471
476
|
var d;
|
|
472
477
|
return (d = r.items) == null ? void 0 : d.length;
|
|
473
478
|
}));
|
|
474
|
-
return
|
|
479
|
+
return f(() => t.value ? a.value ? pt({ selectedValues: n, placeholder: o, items: e }) : ft({ selectedValues: n, items: e, placeholder: o }) : ct({ items: e, placeholder: o, selectedValue: n }));
|
|
475
480
|
}, me = {
|
|
476
481
|
"en-US": {
|
|
477
482
|
optional: "optional",
|
|
@@ -482,7 +487,7 @@ const ft = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
|
482
487
|
}, $e = (e) => {
|
|
483
488
|
var o;
|
|
484
489
|
(o = e.value.$children) == null || o[0].$refs.textbox.focus();
|
|
485
|
-
},
|
|
490
|
+
}, bt = ({
|
|
486
491
|
inputContainerRef: e,
|
|
487
492
|
optionsContainerRef: o,
|
|
488
493
|
selectedValueIndex: n,
|
|
@@ -490,19 +495,19 @@ const ft = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
|
490
495
|
isDynamicFltering: a,
|
|
491
496
|
items: i,
|
|
492
497
|
isMultiple: r
|
|
493
|
-
}, d, l,
|
|
498
|
+
}, d, l, c) => {
|
|
494
499
|
const _ = ({ detail: u }) => {
|
|
495
|
-
u.preventDefault(), t.value || (l(),
|
|
500
|
+
u.preventDefault(), t.value || (l(), B(() => {
|
|
496
501
|
var p, S;
|
|
497
502
|
r ? (p = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || p[0].$el.focus() : (S = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || S[n.value].$el.focus();
|
|
498
503
|
}));
|
|
499
|
-
},
|
|
500
|
-
u.preventDefault(), t.value || (l(),
|
|
504
|
+
}, g = ({ detail: u }) => {
|
|
505
|
+
u.preventDefault(), t.value || (l(), B(() => {
|
|
501
506
|
var p;
|
|
502
507
|
(p = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || p[0].$el.focus();
|
|
503
508
|
}));
|
|
504
|
-
},
|
|
505
|
-
t.value || (l(),
|
|
509
|
+
}, y = () => {
|
|
510
|
+
t.value || (l(), B(() => {
|
|
506
511
|
var u, p;
|
|
507
512
|
if (r) {
|
|
508
513
|
const S = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children;
|
|
@@ -511,35 +516,35 @@ const ft = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
|
511
516
|
(p = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || p[i.length - 1].$el.focus();
|
|
512
517
|
}));
|
|
513
518
|
}, m = () => {
|
|
514
|
-
t.value && (
|
|
519
|
+
t.value && (c(), $e(e));
|
|
515
520
|
}, h = () => {
|
|
516
|
-
t.value || l(),
|
|
521
|
+
t.value || l(), B(() => {
|
|
517
522
|
var u;
|
|
518
523
|
(u = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || u[0].$el.focus();
|
|
519
524
|
});
|
|
520
525
|
}, C = ({ detail: u }) => {
|
|
521
|
-
u.preventDefault(), d(), t.value &&
|
|
526
|
+
u.preventDefault(), d(), t.value && B(() => {
|
|
522
527
|
var p, S;
|
|
523
528
|
r ? (p = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || p[0].$el.focus() : (S = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || S[n.value].$el.focus();
|
|
524
529
|
});
|
|
525
530
|
}, v = () => {
|
|
526
|
-
d(), t.value &&
|
|
531
|
+
d(), t.value && B(() => {
|
|
527
532
|
var u, p;
|
|
528
533
|
r ? (u = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || u[0].$el.focus() : (p = o.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef.$children) == null || p[n.value].$el.focus();
|
|
529
534
|
});
|
|
530
535
|
};
|
|
531
|
-
return
|
|
536
|
+
return f(() => ({
|
|
532
537
|
...a.value ? {} : { [D.SPACE]: C },
|
|
533
538
|
[D.ENTER]: v,
|
|
534
539
|
[D.ARROW_DOWN]: _,
|
|
535
|
-
[D.ARROW_UP]:
|
|
536
|
-
[D.END]:
|
|
540
|
+
[D.ARROW_UP]: g,
|
|
541
|
+
[D.END]: y,
|
|
537
542
|
[D.ESCAPE]: m,
|
|
538
543
|
[D.HOME]: h
|
|
539
544
|
}));
|
|
540
|
-
},
|
|
545
|
+
}, vt = ({ inputContainerRef: e, isDropdownOpen: o }, n) => {
|
|
541
546
|
const t = () => {
|
|
542
|
-
o.value && n(),
|
|
547
|
+
o.value && n(), B(() => {
|
|
543
548
|
$e(e);
|
|
544
549
|
});
|
|
545
550
|
};
|
|
@@ -549,15 +554,15 @@ const ft = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
|
549
554
|
[s.TAB]: t,
|
|
550
555
|
[s.SPACE]: t
|
|
551
556
|
};
|
|
552
|
-
},
|
|
557
|
+
}, yt = ne({
|
|
553
558
|
i18n: { messages: me },
|
|
554
559
|
name: "b-dropdown",
|
|
555
560
|
components: {
|
|
556
|
-
BentoDropdownOptionsContainer:
|
|
561
|
+
BentoDropdownOptionsContainer: je,
|
|
557
562
|
BentoTypography: ze,
|
|
558
563
|
DropdownInputDefault: ke,
|
|
559
|
-
DropdownInputSmall:
|
|
560
|
-
ErrorMessage:
|
|
564
|
+
DropdownInputSmall: dt,
|
|
565
|
+
ErrorMessage: qe
|
|
561
566
|
},
|
|
562
567
|
directives: { BentoClickOutsideDirective: Me, BentoKeyboardNavigationDirective: Pe },
|
|
563
568
|
props: {
|
|
@@ -695,47 +700,47 @@ const ft = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
|
695
700
|
emits: ["input", s.SHOW_MORE],
|
|
696
701
|
setup(e, { attrs: o, emit: n, slots: t }) {
|
|
697
702
|
var re;
|
|
698
|
-
const { t: a } = le({ messages: me }), i = $(null), r = $(null), d = $(null), l = $(!1),
|
|
703
|
+
const { t: a } = le({ messages: me }), i = $(null), r = $(null), d = $(null), l = $(!1), c = K("bento-dropdown-options-container"), _ = K("dropdown-label"), g = K("dropdown-description"), y = K("dropdown-error"), { isReadOnly: m } = We(N(e, "readonly")), h = $(o["aria-label"]), { ariaLabel: C } = ve(e), v = xe({
|
|
699
704
|
ariaLabel: h.value,
|
|
700
705
|
// TODO: take this line away when the aria-label props is removed
|
|
701
706
|
label: C,
|
|
702
707
|
defaultFallback: a("ariaLabelFallback")
|
|
703
|
-
}),
|
|
708
|
+
}), F = f(() => ({
|
|
704
709
|
"b-dropdown__description--error": !!e.errorMessage
|
|
705
|
-
})), u = $(""), p = N(e, "items"), S =
|
|
710
|
+
})), u = $(""), p = N(e, "items"), S = ut(u, p, (re = e == null ? void 0 : e.search) == null ? void 0 : re.searchEvent), H = f(() => e.dynamicFiltering && !!u.value), _e = mt({
|
|
706
711
|
items: p,
|
|
707
712
|
multiple: N(e, "multiple"),
|
|
708
713
|
placeholder: N(e, "placeholder"),
|
|
709
714
|
value: N(e, "value")
|
|
710
|
-
}), Se =
|
|
715
|
+
}), Se = f(() => e.size === T.DEFAULT), Le = f(
|
|
711
716
|
() => e != null && e.multiple ? e.items.filter(
|
|
712
717
|
({ value: w }) => (e == null ? void 0 : e.value) && (e == null ? void 0 : e.value).includes(w)
|
|
713
718
|
) : e.items.find(({ value: w }) => w === (e == null ? void 0 : e.value))
|
|
714
|
-
),
|
|
719
|
+
), Oe = f(() => {
|
|
715
720
|
const w = e.items.findIndex(({ value: Ae }) => e.value === Ae);
|
|
716
721
|
return w > 0 ? w : 0;
|
|
717
|
-
}),
|
|
722
|
+
}), Ee = f(() => {
|
|
718
723
|
var w;
|
|
719
724
|
return e.multiple ? (w = e == null ? void 0 : e.value) == null ? void 0 : w.length : null;
|
|
720
|
-
}), Ce =
|
|
721
|
-
() => `${e.description ?
|
|
725
|
+
}), Ce = f(
|
|
726
|
+
() => `${e.description ? g : ""} ${e.errorMessage ? y : ""}`.trim() || null
|
|
722
727
|
), De = () => {
|
|
723
728
|
m.value || (l.value = !0);
|
|
724
729
|
}, V = () => {
|
|
725
730
|
l.value = !1;
|
|
726
731
|
}, ae = () => {
|
|
727
732
|
m.value || (l.value = !l.value, H.value && (u.value = ""));
|
|
728
|
-
},
|
|
733
|
+
}, Ie = () => {
|
|
729
734
|
H.value && (u.value = ""), l.value && (l.value = !1);
|
|
730
735
|
}, ie = (w) => {
|
|
731
736
|
e.multiple || (u.value = "", l.value = !1), n("input", w);
|
|
732
737
|
}, se = () => {
|
|
733
738
|
n(s.SHOW_MORE);
|
|
734
|
-
},
|
|
739
|
+
}, Be = bt(
|
|
735
740
|
{
|
|
736
741
|
inputContainerRef: i,
|
|
737
742
|
optionsContainerRef: d,
|
|
738
|
-
selectedValueIndex:
|
|
743
|
+
selectedValueIndex: Oe,
|
|
739
744
|
isDropdownOpen: l,
|
|
740
745
|
isDynamicFltering: N(e, "dynamicFiltering"),
|
|
741
746
|
items: e.items,
|
|
@@ -744,7 +749,7 @@ const ft = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
|
744
749
|
ae,
|
|
745
750
|
De,
|
|
746
751
|
V
|
|
747
|
-
), Re =
|
|
752
|
+
), Re = vt(
|
|
748
753
|
{
|
|
749
754
|
inputContainerRef: i,
|
|
750
755
|
isDropdownOpen: l
|
|
@@ -765,82 +770,82 @@ const ft = ({ items: e, placeholder: o, selectedValue: n }) => {
|
|
|
765
770
|
), {
|
|
766
771
|
// Values
|
|
767
772
|
computedAriaLabel: v,
|
|
768
|
-
additionalItemsSelected:
|
|
773
|
+
additionalItemsSelected: Ee,
|
|
769
774
|
idDefaultSize: Se,
|
|
770
775
|
isDropdownOpen: l,
|
|
771
776
|
displayValue: _e,
|
|
772
|
-
dropdownOptionsContainerId:
|
|
777
|
+
dropdownOptionsContainerId: c,
|
|
773
778
|
filteredItems: S,
|
|
774
779
|
isSearching: H,
|
|
775
780
|
isReadOnly: m,
|
|
776
781
|
searchTerm: u,
|
|
777
782
|
labelId: _,
|
|
778
|
-
descriptionId:
|
|
779
|
-
errorId:
|
|
783
|
+
descriptionId: g,
|
|
784
|
+
errorId: y,
|
|
780
785
|
ariaDescribedBy: Ce,
|
|
781
|
-
selectedValueItem:
|
|
786
|
+
selectedValueItem: Le,
|
|
782
787
|
// Conciliation of Vue2 $scopedSlots and Vue3 $scopes.
|
|
783
788
|
// The setup method and the "useSlots" composible define
|
|
784
789
|
// { slots } as a proxy of $scopedSlots and $scopes in their
|
|
785
790
|
// respective Vue version. Source: https://github.com/vuejs/composition-api/issues/84#issuecomment-524885445
|
|
786
791
|
slots: t,
|
|
787
|
-
descriptionConditionalClasses:
|
|
792
|
+
descriptionConditionalClasses: F,
|
|
788
793
|
// Refs
|
|
789
794
|
inputContainerRef: i,
|
|
790
795
|
inputContainerRefWrapper: r,
|
|
791
796
|
optionsContainerRef: d,
|
|
792
797
|
// Events
|
|
793
|
-
closeOpenedDropdown:
|
|
798
|
+
closeOpenedDropdown: Ie,
|
|
794
799
|
toggleDropdown: ae,
|
|
795
800
|
onOptionSelected: ie,
|
|
796
801
|
emitShowMoreEvent: se,
|
|
797
|
-
textboxKeyboardNavigationListeners:
|
|
802
|
+
textboxKeyboardNavigationListeners: Be,
|
|
798
803
|
listboxListeners: Te
|
|
799
804
|
};
|
|
800
805
|
}
|
|
801
806
|
});
|
|
802
|
-
const
|
|
803
|
-
function
|
|
804
|
-
var
|
|
805
|
-
const r = R("bento-typography"), d = R("bento-dropdown-options-container"), l = R("error-message"),
|
|
806
|
-
return q((b(),
|
|
807
|
-
e.label ? (b(),
|
|
807
|
+
const gt = { class: "b-dropdown" }, ht = ["id"];
|
|
808
|
+
function wt(e, o, n, t, a, i) {
|
|
809
|
+
var g;
|
|
810
|
+
const r = R("bento-typography"), d = R("bento-dropdown-options-container"), l = R("error-message"), c = ue("bento-keyboard-navigation-directive"), _ = ue("bento-click-outside-directive");
|
|
811
|
+
return q((b(), E("div", gt, [
|
|
812
|
+
e.label ? (b(), E("div", {
|
|
808
813
|
key: 0,
|
|
809
814
|
id: e.labelId,
|
|
810
815
|
class: "b-dropdown__label"
|
|
811
816
|
}, [
|
|
812
|
-
|
|
817
|
+
k(r, {
|
|
813
818
|
el: "span",
|
|
814
819
|
stronger: ""
|
|
815
820
|
}, {
|
|
816
|
-
default:
|
|
817
|
-
|
|
821
|
+
default: L(() => [
|
|
822
|
+
x(P(e.label), 1)
|
|
818
823
|
]),
|
|
819
824
|
_: 1
|
|
820
825
|
}),
|
|
821
|
-
e.optional ? (b(),
|
|
826
|
+
e.optional ? (b(), I(r, {
|
|
822
827
|
key: 0,
|
|
823
828
|
class: "b-dropdown__label-requirement",
|
|
824
829
|
el: "span"
|
|
825
830
|
}, {
|
|
826
|
-
default:
|
|
827
|
-
|
|
831
|
+
default: L(() => [
|
|
832
|
+
x(" (" + P(e.$t("optional")) + ") ", 1)
|
|
828
833
|
]),
|
|
829
834
|
_: 1
|
|
830
|
-
})) :
|
|
831
|
-
e.required ? (b(),
|
|
835
|
+
})) : O("", !0),
|
|
836
|
+
e.required ? (b(), I(r, {
|
|
832
837
|
key: 1,
|
|
833
838
|
class: "b-dropdown__label-requirement",
|
|
834
839
|
el: "span"
|
|
835
840
|
}, {
|
|
836
|
-
default:
|
|
837
|
-
|
|
841
|
+
default: L(() => [
|
|
842
|
+
x(" (" + P(e.$t("required")) + ") ", 1)
|
|
838
843
|
]),
|
|
839
844
|
_: 1
|
|
840
|
-
})) :
|
|
841
|
-
], 8,
|
|
842
|
-
q((b(),
|
|
843
|
-
(b(),
|
|
845
|
+
})) : O("", !0)
|
|
846
|
+
], 8, ht)) : O("", !0),
|
|
847
|
+
q((b(), E("div", A({ ref: "inputContainerRefWrapper" }, W(e.textboxKeyboardNavigationListeners, !0)), [
|
|
848
|
+
(b(), I(ye(e.size), {
|
|
844
849
|
ref: "inputContainerRef",
|
|
845
850
|
value: e.searchTerm,
|
|
846
851
|
"additional-items-selected": e.additionalItemsSelected,
|
|
@@ -859,26 +864,26 @@ function $t(e, o, n, t, a, i) {
|
|
|
859
864
|
open: e.isDropdownOpen,
|
|
860
865
|
"selected-value-item": e.idDefaultSize ? e.selectedValueItem : void 0,
|
|
861
866
|
"show-slot-content-in-multiple": e.showSlotContentInMultiple,
|
|
862
|
-
onInput: o[0] || (o[0] = (
|
|
867
|
+
onInput: o[0] || (o[0] = (y) => e.searchTerm = y),
|
|
863
868
|
onOpen: e.toggleDropdown,
|
|
864
869
|
onClose: e.toggleDropdown
|
|
865
870
|
}, Z({ _: 2 }, [
|
|
866
|
-
Y(e.slots, (
|
|
871
|
+
Y(e.slots, (y, m) => ({
|
|
867
872
|
name: m,
|
|
868
|
-
fn:
|
|
873
|
+
fn: L((h) => [
|
|
869
874
|
G(e.$slots, m, Q(X(h)), void 0, !0)
|
|
870
875
|
])
|
|
871
876
|
}))
|
|
872
877
|
]), 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"]))
|
|
873
878
|
], 16)), [
|
|
874
|
-
[
|
|
879
|
+
[c]
|
|
875
880
|
]),
|
|
876
|
-
e.inputContainerRef ? (b(),
|
|
881
|
+
e.inputContainerRef ? (b(), I(d, A({
|
|
877
882
|
key: 1,
|
|
878
883
|
id: e.dropdownOptionsContainerId,
|
|
879
884
|
ref: "optionsContainerRef",
|
|
880
885
|
"aria-label": e.computedAriaLabel,
|
|
881
|
-
"debounce-time": (
|
|
886
|
+
"debounce-time": (g = e.search) == null ? void 0 : g.debounceTime,
|
|
882
887
|
disabled: e.disabled,
|
|
883
888
|
"input-size": e.size,
|
|
884
889
|
"is-option-disabled": e.isOptionDisabled,
|
|
@@ -891,39 +896,39 @@ function $t(e, o, n, t, a, i) {
|
|
|
891
896
|
loading: e.loading,
|
|
892
897
|
"has-more-items": e.hasMoreItems,
|
|
893
898
|
"lazy-load-type": e.lazyLoadType
|
|
894
|
-
},
|
|
895
|
-
Y(e.slots, (
|
|
899
|
+
}, W(e.listboxListeners)), Z({ _: 2 }, [
|
|
900
|
+
Y(e.slots, (y, m) => ({
|
|
896
901
|
name: m,
|
|
897
|
-
fn:
|
|
902
|
+
fn: L((h) => [
|
|
898
903
|
G(e.$slots, m, Q(X(h)), void 0, !0)
|
|
899
904
|
])
|
|
900
905
|
}))
|
|
901
|
-
]), 1040, ["id", "aria-label", "debounce-time", "disabled", "input-size", "is-option-disabled", "items", "multiple", "open", "selected-value", "searching", "target-element", "loading", "has-more-items", "lazy-load-type"])) :
|
|
902
|
-
e.errorMessage ? (b(),
|
|
906
|
+
]), 1040, ["id", "aria-label", "debounce-time", "disabled", "input-size", "is-option-disabled", "items", "multiple", "open", "selected-value", "searching", "target-element", "loading", "has-more-items", "lazy-load-type"])) : O("", !0),
|
|
907
|
+
e.errorMessage ? (b(), I(l, {
|
|
903
908
|
key: 2,
|
|
904
909
|
id: e.errorId,
|
|
905
910
|
"error-message": e.errorMessage,
|
|
906
911
|
class: "b-dropdown__error-message"
|
|
907
|
-
}, null, 8, ["id", "error-message"])) :
|
|
908
|
-
e.description ? (b(),
|
|
912
|
+
}, null, 8, ["id", "error-message"])) : O("", !0),
|
|
913
|
+
e.description ? (b(), I(r, {
|
|
909
914
|
key: 3,
|
|
910
915
|
id: e.descriptionId,
|
|
911
916
|
class: we(["b-dropdown__description", e.descriptionConditionalClasses]),
|
|
912
917
|
el: "span"
|
|
913
918
|
}, {
|
|
914
|
-
default:
|
|
915
|
-
|
|
919
|
+
default: L(() => [
|
|
920
|
+
x(P(e.description), 1)
|
|
916
921
|
]),
|
|
917
922
|
_: 1
|
|
918
|
-
}, 8, ["id", "class"])) :
|
|
923
|
+
}, 8, ["id", "class"])) : O("", !0)
|
|
919
924
|
])), [
|
|
920
925
|
[_, e.closeOpenedDropdown]
|
|
921
926
|
]);
|
|
922
927
|
}
|
|
923
|
-
const
|
|
928
|
+
const Mt = /* @__PURE__ */ z(yt, [["render", wt], ["__scopeId", "data-v-79de8f04"]]);
|
|
924
929
|
export {
|
|
925
|
-
|
|
930
|
+
Mt as B,
|
|
926
931
|
T as a,
|
|
927
|
-
|
|
932
|
+
ut as u
|
|
928
933
|
};
|
|
929
|
-
//# sourceMappingURL=dropdown.
|
|
934
|
+
//# sourceMappingURL=dropdown.6a484461.js.map
|