@adyen/bento-vue2 1.76.2 → 1.77.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.
Files changed (145) hide show
  1. package/dist/@types/index.d.ts +300 -35
  2. package/dist/assets/accordion-item.css +1 -1
  3. package/dist/assets/action-bar.css +1 -1
  4. package/dist/assets/base-modal.css +1 -1
  5. package/dist/assets/button-actions.css +1 -1
  6. package/dist/assets/card.css +1 -1
  7. package/dist/assets/data-grid.css +1 -1
  8. package/dist/assets/date-picker.css +1 -1
  9. package/dist/assets/date-range-picker.css +1 -1
  10. package/dist/assets/dialog-page.css +1 -1
  11. package/dist/assets/dropdown-default-textbox.css +1 -1
  12. package/dist/assets/dropdown-tag.css +1 -1
  13. package/dist/assets/dropdown.css +1 -1
  14. package/dist/assets/file-uploader.css +1 -1
  15. package/dist/assets/filter-bar.css +1 -1
  16. package/dist/assets/input-field-phone-number.css +1 -1
  17. package/dist/assets/input-field.css +1 -1
  18. package/dist/assets/inspector.css +1 -1
  19. package/dist/assets/modal-fullscreen.css +1 -1
  20. package/dist/assets/pagination.css +1 -1
  21. package/dist/assets/payment-method.css +1 -1
  22. package/dist/assets/secondary-nav.css +1 -1
  23. package/dist/assets/sidepanel.css +1 -1
  24. package/dist/assets/tag.css +1 -1
  25. package/dist/assets/textarea.css +1 -1
  26. package/dist/assets/timeline-item.css +1 -1
  27. package/dist/checkbox.js +2 -2
  28. package/dist/chunks/{checkbox-group.CtNVRcmP.js → checkbox-group.C3RH5Gcg.js} +2 -2
  29. package/dist/chunks/{checkbox-group.CtNVRcmP.js.map → checkbox-group.C3RH5Gcg.js.map} +1 -1
  30. package/dist/chunks/{checkbox.nyUc0gLb.js → checkbox.itbBlXev.js} +3 -3
  31. package/dist/chunks/{checkbox.nyUc0gLb.js.map → checkbox.itbBlXev.js.map} +1 -1
  32. package/dist/chunks/{code-snippet.DFf3KMSi.js → code-snippet.BEbA1bIn.js} +2 -2
  33. package/dist/chunks/{code-snippet.DFf3KMSi.js.map → code-snippet.BEbA1bIn.js.map} +1 -1
  34. package/dist/chunks/{currency.AvvbekWO.js → currency.Cwhzzxw2.js} +2 -2
  35. package/dist/chunks/{currency.AvvbekWO.js.map → currency.Cwhzzxw2.js.map} +1 -1
  36. package/dist/chunks/{data-grid.C07AmPwV.js → data-grid.B-kBw540.js} +7 -7
  37. package/dist/chunks/{data-grid.C07AmPwV.js.map → data-grid.B-kBw540.js.map} +1 -1
  38. package/dist/chunks/date-picker.CKaQJcPa.js +168 -0
  39. package/dist/chunks/date-picker.CKaQJcPa.js.map +1 -0
  40. package/dist/chunks/date-picker.types.Ckt7zxGy.js +5 -0
  41. package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -0
  42. package/dist/chunks/date-range-picker.BtPxkPN0.js +942 -0
  43. package/dist/chunks/date-range-picker.BtPxkPN0.js.map +1 -0
  44. package/dist/chunks/{dropdown-default-textbox.yLeN0E2z.js → dropdown-default-textbox.BCOVaw-a.js} +10 -10
  45. package/dist/chunks/dropdown-default-textbox.BCOVaw-a.js.map +1 -0
  46. package/dist/chunks/dropdown-tag.BXMgDH3v.js +294 -0
  47. package/dist/chunks/dropdown-tag.BXMgDH3v.js.map +1 -0
  48. package/dist/chunks/{dropdown.RxD2TqnP.js → dropdown.-3x2IBDg.js} +305 -297
  49. package/dist/chunks/{dropdown.RxD2TqnP.js.map → dropdown.-3x2IBDg.js.map} +1 -1
  50. package/dist/chunks/es6.MoTTyETW.js.map +1 -1
  51. package/dist/chunks/{file-uploader.BGoCYrnw.js → file-uploader.BkTtqgvQ.js} +296 -295
  52. package/dist/chunks/{file-uploader.BGoCYrnw.js.map → file-uploader.BkTtqgvQ.js.map} +1 -1
  53. package/dist/chunks/{filter-bar.DVqgwt2p.js → filter-bar.BLnSnOlj.js} +201 -201
  54. package/dist/chunks/filter-bar.BLnSnOlj.js.map +1 -0
  55. package/dist/chunks/form-field.BBqLu-vs.js +10 -0
  56. package/dist/chunks/form-field.BBqLu-vs.js.map +1 -0
  57. package/dist/chunks/get-slot-text.Bjb9dTSV.js +12 -0
  58. package/dist/chunks/get-slot-text.Bjb9dTSV.js.map +1 -0
  59. package/dist/chunks/{header-with-views.jnhILkoQ.js → header-with-views.C6Y7mAkq.js} +3 -3
  60. package/dist/chunks/{header-with-views.jnhILkoQ.js.map → header-with-views.C6Y7mAkq.js.map} +1 -1
  61. package/dist/chunks/{input-field-password.CHn2GUcL.js → input-field-password.sthICA2L.js} +3 -3
  62. package/dist/chunks/{input-field-password.CHn2GUcL.js.map → input-field-password.sthICA2L.js.map} +1 -1
  63. package/dist/chunks/{input-field-phone-number.CpnfVw6w.js → input-field-phone-number.BjinuvOl.js} +5 -5
  64. package/dist/chunks/{input-field-phone-number.CpnfVw6w.js.map → input-field-phone-number.BjinuvOl.js.map} +1 -1
  65. package/dist/chunks/{input-field.sGmuIXiw.js → input-field.CwKD3p3q.js} +34 -34
  66. package/dist/chunks/input-field.CwKD3p3q.js.map +1 -0
  67. package/dist/chunks/link.D8qpqg3W.js.map +1 -1
  68. package/dist/chunks/{listbox-option-tag.Dl8GwHLT.js → listbox-option-tag.DkPz3wPc.js} +2 -2
  69. package/dist/chunks/{listbox-option-tag.Dl8GwHLT.js.map → listbox-option-tag.DkPz3wPc.js.map} +1 -1
  70. package/dist/chunks/{pagination.C0YW_A_o.js → pagination.BzyyZJy6.js} +7 -7
  71. package/dist/chunks/pagination.BzyyZJy6.js.map +1 -0
  72. package/dist/chunks/{payment-method.DtvfUnit.js → payment-method.CcASYR3B.js} +12 -12
  73. package/dist/chunks/payment-method.CcASYR3B.js.map +1 -0
  74. package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
  75. package/dist/chunks/{radio-group.AcYMFudv.js → radio-group.B8ukv-pw.js} +3 -3
  76. package/dist/chunks/{radio-group.AcYMFudv.js.map → radio-group.B8ukv-pw.js.map} +1 -1
  77. package/dist/chunks/{rich-text-editor.eYW8X_YP.js → rich-text-editor.DzH-Z5oi.js} +2 -2
  78. package/dist/chunks/{rich-text-editor.eYW8X_YP.js.map → rich-text-editor.DzH-Z5oi.js.map} +1 -1
  79. package/dist/chunks/{search-bar.D8SJsbze.js → search-bar.CgzPXP8r.js} +3 -3
  80. package/dist/chunks/{search-bar.D8SJsbze.js.map → search-bar.CgzPXP8r.js.map} +1 -1
  81. package/dist/chunks/{secondary-nav.BFiTQaag.js → secondary-nav.3eZKyb8K.js} +4 -4
  82. package/dist/chunks/secondary-nav.3eZKyb8K.js.map +1 -0
  83. package/dist/chunks/{summary-grid.types.B80533d1.js → summary-grid.types.CaYrtyVO.js} +2 -2
  84. package/dist/chunks/{summary-grid.types.B80533d1.js.map → summary-grid.types.CaYrtyVO.js.map} +1 -1
  85. package/dist/chunks/tag.BltIbSh3.js +44 -0
  86. package/dist/chunks/tag.BltIbSh3.js.map +1 -0
  87. package/dist/chunks/textarea.h-WF62HP.js +173 -0
  88. package/dist/chunks/textarea.h-WF62HP.js.map +1 -0
  89. package/dist/chunks/{timeline-item.CZBuknZ_.js → timeline-item.BLhS7uNF.js} +5 -5
  90. package/dist/chunks/timeline-item.BLhS7uNF.js.map +1 -0
  91. package/dist/chunks/{toggle.BJMXpHRu.js → toggle.D2wmNu7m.js} +2 -2
  92. package/dist/chunks/{toggle.BJMXpHRu.js.map → toggle.D2wmNu7m.js.map} +1 -1
  93. package/dist/code-snippet.js +1 -1
  94. package/dist/currency.js +1 -1
  95. package/dist/data-grid.js +1 -1
  96. package/dist/date-picker.js +7 -6
  97. package/dist/date-picker.js.map +1 -1
  98. package/dist/date-range-picker.js +1 -1
  99. package/dist/dropdown.js +3 -3
  100. package/dist/file-uploader.js +1 -1
  101. package/dist/filter-bar.js +1 -1
  102. package/dist/header-with-views.js +1 -1
  103. package/dist/index.js +247 -246
  104. package/dist/index.js.map +1 -1
  105. package/dist/input-field-password.js +1 -1
  106. package/dist/input-field-phone-number.js +1 -1
  107. package/dist/input-field.js +1 -1
  108. package/dist/internal.js +1 -1
  109. package/dist/pagination.js +1 -1
  110. package/dist/payment-method.js +1 -1
  111. package/dist/radio-group.js +1 -1
  112. package/dist/rich-text-editor.js +1 -1
  113. package/dist/search-bar.js +2 -2
  114. package/dist/secondary-nav.js +1 -1
  115. package/dist/styles/bento-dark.css +4 -0
  116. package/dist/styles/bento-light.css +4 -0
  117. package/dist/styles/bento.css +4 -0
  118. package/dist/styles/legacy.css +4 -0
  119. package/dist/styles/styleguide.css +4 -0
  120. package/dist/summary-grid.js +1 -1
  121. package/dist/tag.js +1 -1
  122. package/dist/textarea.js +1 -1
  123. package/dist/timeline.js +1 -1
  124. package/dist/toggle.js +1 -1
  125. package/dist/web-types.json +144 -6
  126. package/package.json +6 -6
  127. package/dist/chunks/date-picker.DImAYvoM.js +0 -158
  128. package/dist/chunks/date-picker.DImAYvoM.js.map +0 -1
  129. package/dist/chunks/date-range-picker.NAG_5i8I.js +0 -914
  130. package/dist/chunks/date-range-picker.NAG_5i8I.js.map +0 -1
  131. package/dist/chunks/dropdown-default-textbox.yLeN0E2z.js.map +0 -1
  132. package/dist/chunks/dropdown-tag.CpvU8eSZ.js +0 -260
  133. package/dist/chunks/dropdown-tag.CpvU8eSZ.js.map +0 -1
  134. package/dist/chunks/filter-bar.DVqgwt2p.js.map +0 -1
  135. package/dist/chunks/get-slot-text.BQS5Olxm.js +0 -12
  136. package/dist/chunks/get-slot-text.BQS5Olxm.js.map +0 -1
  137. package/dist/chunks/input-field.sGmuIXiw.js.map +0 -1
  138. package/dist/chunks/pagination.C0YW_A_o.js.map +0 -1
  139. package/dist/chunks/payment-method.DtvfUnit.js.map +0 -1
  140. package/dist/chunks/secondary-nav.BFiTQaag.js.map +0 -1
  141. package/dist/chunks/tag.BwKc2d2E.js +0 -44
  142. package/dist/chunks/tag.BwKc2d2E.js.map +0 -1
  143. package/dist/chunks/textarea.CIQuLWQ8.js +0 -165
  144. package/dist/chunks/textarea.CIQuLWQ8.js.map +0 -1
  145. package/dist/chunks/timeline-item.CZBuknZ_.js.map +0 -1
@@ -1,22 +1,23 @@
1
- import { ref as h, watch as X, computed as r, defineComponent as R, useSlots as ge, toRefs as he, nextTick as S, useAttrs as Ne, toRef as w, inject as Re } from "vue";
2
- import { d as ve, B as Ae } from "./typography.hlOAxsEn.js";
1
+ import { ref as h, watch as G, computed as r, defineComponent as R, useSlots as he, toRefs as we, nextTick as x, useAttrs as Ae, toRef as L, inject as Me } from "vue";
2
+ import { d as Y, B as Pe } from "./typography.hlOAxsEn.js";
3
3
  import { g as $ } from "./generate-uid.NJ8tVoha.js";
4
- import { u as Me } from "./aria-label.CaUURpnB.js";
5
- import { u as G } from "./index.B6WW_F-J.js";
6
- import { a as p, b as Q, B as me, c as Pe, u as $e, d as ke } from "./use-cached-selected-values.BZd3CTeP.js";
7
- import { u as Fe } from "./use-form-layout-loading.D3lALhtC.js";
8
- import { a as Y, b as P, c as Ke, B as W, D as ze } from "./dropdown-default-textbox.yLeN0E2z.js";
9
- import { u as We } from "./use-has-slot.C9lQZ6nz.js";
10
- import { B as E, a as Ue } from "./keyboard-navigation.pB8weElW.js";
11
- import { B as Ve } from "./directive.Cbdox5VL.js";
12
- import { F as je, E as qe } from "./field-label.Auq-Pzho.js";
13
- import { P as be } from "./popper-container.agLYtGwv.js";
14
- import { h as He } from "./button-actions.B81vY51z.js";
4
+ import { u as $e } from "./aria-label.CaUURpnB.js";
5
+ import { u as ee } from "./index.B6WW_F-J.js";
6
+ import { u as ke } from "./form-field.BBqLu-vs.js";
7
+ import { a as p, b as X, B as be, c as Fe, u as Ke, d as ze } from "./use-cached-selected-values.BZd3CTeP.js";
8
+ import { u as Ve } from "./use-form-layout-loading.D3lALhtC.js";
9
+ import { a as Z, b as P, c as We, B as V, D as Ue } from "./dropdown-default-textbox.BCOVaw-a.js";
10
+ import { u as je } from "./use-has-slot.C9lQZ6nz.js";
11
+ import { B as E, a as qe } from "./keyboard-navigation.pB8weElW.js";
12
+ import { B as He } from "./directive.Cbdox5VL.js";
13
+ import { F as Je, E as Ye } from "./field-label.Auq-Pzho.js";
14
+ import { P as ye } from "./popper-container.agLYtGwv.js";
15
+ import { h as Ze } from "./button-actions.B81vY51z.js";
15
16
  import { n as k } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
16
17
  /* empty css */
17
- import { s as Z } from "./events.CMzGybJJ.js";
18
+ import { s as Q } from "./events.CMzGybJJ.js";
18
19
  import "../assets/dropdown.css";
19
- const Je = {
20
+ const Qe = {
20
21
  "en-US": {
21
22
  apply: "Apply",
22
23
  cancel: "Cancel",
@@ -30,62 +31,62 @@ const Je = {
30
31
  apply: "Aplicar",
31
32
  cancel: "Cancelar"
32
33
  }
33
- }, Ye = (a, t, o, e) => {
34
- const n = h(a.value), { t: l } = G();
35
- X(a, () => {
36
- n.value = a.value;
34
+ }, Xe = (n, t, o, e) => {
35
+ const a = h(n.value), { t: s } = ee();
36
+ G(n, () => {
37
+ a.value = n.value;
37
38
  });
38
- const s = r(
39
- () => JSON.stringify(n.value) === JSON.stringify(a.value)
39
+ const l = r(
40
+ () => JSON.stringify(a.value) === JSON.stringify(n.value)
40
41
  ), i = () => {
41
- e(p.SELECT, n.value), e(p.CLOSE_DROPDOWN);
42
- }, c = () => {
43
- n.value = a.value, e(p.CLOSE_DROPDOWN);
44
- }, b = () => {
45
- o.value && t.value && (n.value = a.value);
46
- }, d = r(() => [
42
+ e(p.SELECT, a.value), e(p.CLOSE_DROPDOWN);
43
+ }, f = () => {
44
+ a.value = n.value, e(p.CLOSE_DROPDOWN);
45
+ }, m = () => {
46
+ o.value && t.value && (a.value = n.value);
47
+ }, u = r(() => [
47
48
  {
48
- title: l("apply"),
49
+ title: s("apply"),
49
50
  event: i,
50
- disabled: s.value
51
+ disabled: l.value
51
52
  },
52
53
  {
53
- title: l("cancel"),
54
- event: c
54
+ title: s("cancel"),
55
+ event: f
55
56
  }
56
- ]), u = (y) => {
57
- n.value = y, t.value || e(p.SELECT, y);
58
- }, _ = (y) => {
59
- u(y), e(p.TAB);
60
- }, g = (y) => {
61
- u(y), e(p.ENTER);
62
- }, v = (y) => {
63
- u(y), e(p.SPACE);
57
+ ]), y = (d) => {
58
+ a.value = d, t.value || e(p.SELECT, d);
59
+ }, c = (d) => {
60
+ y(d), e(p.TAB);
61
+ }, g = (d) => {
62
+ y(d), e(p.ENTER);
63
+ }, b = (d) => {
64
+ y(d), e(p.SPACE);
65
+ }, S = () => {
66
+ f(), e(p.ESCAPE);
64
67
  }, O = () => {
65
- c(), e(p.ESCAPE);
66
- }, L = () => {
67
68
  e(p.SHOW_MORE);
68
- }, x = {
69
- [p.SELECT]: u,
70
- [p.SHOW_MORE]: L,
71
- [p.TAB]: _,
72
- [p.SPACE]: v,
69
+ }, C = {
70
+ [p.SELECT]: y,
71
+ [p.SHOW_MORE]: O,
72
+ [p.TAB]: c,
73
+ [p.SPACE]: b,
73
74
  [p.ENTER]: g
74
75
  };
75
76
  return {
76
77
  // Values
77
- actions: d,
78
- internalSelectedValue: n,
78
+ actions: u,
79
+ internalSelectedValue: a,
79
80
  // Methods
80
- listeners: x,
81
- onEscapeKey: O,
82
- onOutsideDropdownClick: b
81
+ listeners: C,
82
+ onEscapeKey: S,
83
+ onOutsideDropdownClick: m
83
84
  };
84
- }, Ze = R({
85
- i18n: { messages: Je },
85
+ }, Ge = R({
86
+ i18n: { messages: Qe },
86
87
  name: "bento-dropdown-options-container"
87
- }), Qe = /* @__PURE__ */ R({
88
- ...Ze,
88
+ }), et = /* @__PURE__ */ R({
89
+ ...Ge,
89
90
  props: {
90
91
  /**
91
92
  * Defines a string value that labels an interactive element.
@@ -144,8 +145,8 @@ const Je = {
144
145
  */
145
146
  lazyLoadType: {
146
147
  type: String,
147
- default: me.AUTOMATIC,
148
- validator: (a) => Object.values(me).includes(a)
148
+ default: be.AUTOMATIC,
149
+ validator: (n) => Object.values(be).includes(n)
149
150
  },
150
151
  /**
151
152
  * Indicates if new options are lazy loading.
@@ -175,7 +176,7 @@ const Je = {
175
176
  *
176
177
  * If enabled, hides the "Select all" checkbox in "multiple" mode.
177
178
  */
178
- searching: Q.props.searching,
179
+ searching: X.props.searching,
179
180
  /**
180
181
  * If enabled, dropdown will display non-selectable, static categories
181
182
  */
@@ -184,7 +185,7 @@ const Je = {
184
185
  * Reference to the DOM element or Vue component for positioning
185
186
  * the Dropdown container.
186
187
  */
187
- targetElement: { type: be.props.targetElement.type, required: !0 },
188
+ targetElement: { type: ye.props.targetElement.type, required: !0 },
188
189
  /**
189
190
  * Enables virtual scrolling if set to true or by providing an object with itemHeight function.
190
191
  * The itemHeight function is used to calculate the height of rendered item given it's index.
@@ -195,12 +196,12 @@ const Je = {
195
196
  }
196
197
  },
197
198
  emits: [],
198
- setup(a, { expose: t, emit: o }) {
199
- const e = a, n = ge(), { selectedValue: l, multiple: s } = he(e), i = h(null), { t: c } = G(), b = r(() => e.open && !e.disabled), d = r(() => c("noOptionsMatchThisSearch")), u = r(() => ({
199
+ setup(n, { expose: t, emit: o }) {
200
+ const e = n, a = he(), { selectedValue: s, multiple: l } = we(e), i = h(null), { t: f } = ee(), m = r(() => e.open && !e.disabled), u = r(() => f("noOptionsMatchThisSearch")), y = r(() => ({
200
201
  "b-dropdown-options-container--single": !(e != null && e.multiple)
201
- })), _ = r(() => ({
202
+ })), c = r(() => ({
202
203
  "b-dropdown-options-container__listbox--single": !(e != null && e.multiple)
203
- })), { actions: g, internalSelectedValue: v, listeners: O, onEscapeKey: L, onOutsideDropdownClick: x } = Ye(l, s, b, o), y = r(() => e != null && e.multiple ? He : be), I = r(() => {
204
+ })), { actions: g, internalSelectedValue: b, listeners: S, onEscapeKey: O, onOutsideDropdownClick: C } = Xe(s, l, m, o), d = r(() => e != null && e.multiple ? Ze : ye), I = r(() => {
204
205
  var B;
205
206
  const D = {
206
207
  "min-width": `${(B = e == null ? void 0 : e.targetElement) == null ? void 0 : B.clientWidth}px`,
@@ -225,75 +226,75 @@ const Je = {
225
226
  offset: [0, 8],
226
227
  position: "bottom-start",
227
228
  style: {
228
- display: b.value ? "block" : "none",
229
+ display: m.value ? "block" : "none",
229
230
  ...D
230
231
  },
231
232
  targetElement: e.targetElement
232
233
  };
233
234
  });
234
235
  return t({
235
- onOutsideDropdownClick: x
236
- }), { __sfc: !0, slots: n, emit: o, props: e, selectedValue: l, multiple: s, dropdownOptionsListboxRef: i, t: c, isDropdownOpen: b, noResultsMessage: d, conditionalClasses: u, conditionalListboxClasses: _, actions: g, internalSelectedValue: v, listeners: O, onEscapeKey: L, onOutsideDropdownClick: x, popperContainerOrPopoverComponent: y, popperContainerOrPopoverProps: I, BentoListbox: Q };
236
+ onOutsideDropdownClick: C
237
+ }), { __sfc: !0, slots: a, emit: o, props: e, selectedValue: s, multiple: l, dropdownOptionsListboxRef: i, t: f, isDropdownOpen: m, noResultsMessage: u, conditionalClasses: y, conditionalListboxClasses: c, actions: g, internalSelectedValue: b, listeners: S, onEscapeKey: O, onOutsideDropdownClick: C, popperContainerOrPopoverComponent: d, popperContainerOrPopoverProps: I, BentoListbox: X };
237
238
  }
238
239
  });
239
- var Xe = function() {
240
+ var tt = function() {
240
241
  var t = this, o = t._self._c, e = t._self._setupProxy;
241
- return o(e.popperContainerOrPopoverComponent, t._b({ tag: "component", staticClass: "b-dropdown-options-container", class: e.conditionalClasses }, "component", e.popperContainerOrPopoverProps, !1), [o("div", { on: { keydown: function(n) {
242
- return !n.type.indexOf("key") && t._k(n.keyCode, "esc", 27, n.key, ["Esc", "Escape"]) ? null : e.onEscapeKey.apply(null, arguments);
243
- } } }, [o(e.BentoListbox, t._g({ ref: "dropdownOptionsListboxRef", staticClass: "b-dropdown-options-container__listbox", class: e.conditionalListboxClasses, attrs: { id: t.id, "aria-label": t.ariaLabel, "component-loading": t.componentLoading, "empty-state": t.emptyState, "is-option-disabled": t.isOptionDisabled, items: t.items, "selected-value": e.internalSelectedValue, multiple: e.multiple, "static-categories": t.staticCategories, "no-results-message": e.noResultsMessage, searching: t.searching, loading: t.loading, "lazy-load-type": t.lazyLoadType, "has-more-items": t.hasMoreItems, "virtual-scroll": t.virtualScroll }, scopedSlots: t._u([t._l(e.slots, function(n, l) {
244
- return { key: l, fn: function(s) {
245
- return [t._t(l, null, null, s)];
242
+ return o(e.popperContainerOrPopoverComponent, t._b({ tag: "component", staticClass: "b-dropdown-options-container", class: e.conditionalClasses }, "component", e.popperContainerOrPopoverProps, !1), [o("div", { on: { keydown: function(a) {
243
+ return !a.type.indexOf("key") && t._k(a.keyCode, "esc", 27, a.key, ["Esc", "Escape"]) ? null : e.onEscapeKey.apply(null, arguments);
244
+ } } }, [o(e.BentoListbox, t._g({ ref: "dropdownOptionsListboxRef", staticClass: "b-dropdown-options-container__listbox", class: e.conditionalListboxClasses, attrs: { id: t.id, "aria-label": t.ariaLabel, "component-loading": t.componentLoading, "empty-state": t.emptyState, "is-option-disabled": t.isOptionDisabled, items: t.items, "selected-value": e.internalSelectedValue, multiple: e.multiple, "static-categories": t.staticCategories, "no-results-message": e.noResultsMessage, searching: t.searching, loading: t.loading, "lazy-load-type": t.lazyLoadType, "has-more-items": t.hasMoreItems, "virtual-scroll": t.virtualScroll }, scopedSlots: t._u([t._l(e.slots, function(a, s) {
245
+ return { key: s, fn: function(l) {
246
+ return [t._t(s, null, null, l)];
246
247
  } };
247
248
  })], null, !0) }, e.listeners))], 1)]);
248
- }, Ge = [], et = /* @__PURE__ */ k(
249
- Qe,
250
- Xe,
251
- Ge,
249
+ }, ot = [], at = /* @__PURE__ */ k(
250
+ et,
251
+ tt,
252
+ ot,
252
253
  !1,
253
254
  null,
254
255
  "ddc50615"
255
256
  );
256
- const tt = et.exports;
257
- let ye = 0;
258
- const ot = {
257
+ const nt = at.exports;
258
+ let _e = 0;
259
+ const lt = {
259
260
  beforeCreate() {
260
- this.uuid = ye.toString(), ye += 1;
261
+ this.uuid = _e.toString(), _e += 1;
261
262
  }
262
263
  };
263
- var nt = function() {
264
+ var st = function() {
264
265
  var t = this, o = t._self._c;
265
266
  return o("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? o("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), o("path", { attrs: { fill: "#001222", d: "M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z" } })]);
266
- }, at = [], st = /* @__PURE__ */ k(
267
- ot,
268
- nt,
269
- at,
267
+ }, it = [], rt = /* @__PURE__ */ k(
268
+ lt,
269
+ st,
270
+ it,
270
271
  !1,
271
272
  null,
272
273
  null
273
274
  );
274
- const lt = st.exports;
275
- let _e = 0;
276
- const it = {
275
+ const dt = rt.exports;
276
+ let ge = 0;
277
+ const ut = {
277
278
  beforeCreate() {
278
- this.uuid = _e.toString(), _e += 1;
279
+ this.uuid = ge.toString(), ge += 1;
279
280
  }
280
281
  };
281
- var rt = function() {
282
+ var ct = function() {
282
283
  var t = this, o = t._self._c;
283
284
  return o("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? o("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), o("path", { attrs: { fill: "#001222", d: "M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z" } })]);
284
- }, dt = [], ut = /* @__PURE__ */ k(
285
- it,
286
- rt,
287
- dt,
285
+ }, pt = [], ft = /* @__PURE__ */ k(
286
+ ut,
287
+ ct,
288
+ pt,
288
289
  !1,
289
290
  null,
290
291
  null
291
292
  );
292
- const ct = ut.exports, pt = R({
293
+ const vt = ft.exports, mt = R({
293
294
  name: "dropdown-small-textbox",
294
295
  inheritAttrs: !1
295
- }), ft = /* @__PURE__ */ R({
296
- ...pt,
296
+ }), bt = /* @__PURE__ */ R({
297
+ ...mt,
297
298
  props: {
298
299
  /**
299
300
  * The number of additional items that have been selected in the dropdown.
@@ -353,134 +354,134 @@ const ct = ut.exports, pt = R({
353
354
  value: { type: String, default: "" }
354
355
  },
355
356
  emits: ["clear", "close", "input", "keydown", "open"],
356
- setup(a, { expose: t, emit: o }) {
357
- const e = a, n = h(null), l = r(() => ({
358
- [`b-dropdown-small-textbox--${Y.DISABLED}`]: e.disabled,
359
- [`b-dropdown-small-textbox--${Y.READONLY}`]: e.readonly,
360
- [`b-dropdown-small-textbox--${Y.OPENED}`]: e.open
361
- })), s = r(() => e.open && !e.disabled && !e.readonly), i = (v) => {
362
- o("input", v);
363
- }, c = (v) => {
364
- o("keydown", v);
365
- }, b = (v) => {
366
- Z(v), o("open");
367
- }, d = (v) => {
368
- Z(v), o("close");
369
- }, u = (v) => {
370
- Z(v), o("clear");
371
- }, _ = {
357
+ setup(n, { expose: t, emit: o }) {
358
+ const e = n, a = h(null), s = r(() => ({
359
+ [`b-dropdown-small-textbox--${Z.DISABLED}`]: e.disabled,
360
+ [`b-dropdown-small-textbox--${Z.READONLY}`]: e.readonly,
361
+ [`b-dropdown-small-textbox--${Z.OPENED}`]: e.open
362
+ })), l = r(() => e.open && !e.disabled && !e.readonly), i = (b) => {
363
+ o("input", b);
364
+ }, f = (b) => {
365
+ o("keydown", b);
366
+ }, m = (b) => {
367
+ Q(b), o("open");
368
+ }, u = (b) => {
369
+ Q(b), o("close");
370
+ }, y = (b) => {
371
+ Q(b), o("clear");
372
+ }, c = {
372
373
  [P.INPUT]: i,
373
- [P.OPEN]: b,
374
- [P.CLOSE]: d,
375
- [P.CLEAR]: u,
376
- [P.KEYDOWN]: c
374
+ [P.OPEN]: m,
375
+ [P.CLOSE]: u,
376
+ [P.CLEAR]: y,
377
+ [P.KEYDOWN]: f
377
378
  }, g = () => {
378
- n.value.focus();
379
+ a.value.focus();
379
380
  };
380
381
  return t({
381
382
  focus: g
382
- }), { __sfc: !0, emit: o, props: e, baseTextbox: n, conditionalClasses: l, isDropdownOpen: s, onInput: i, onKeyDown: c, openDropdown: b, closeDropdown: d, clearValue: u, listeners: _, focus: g, BentoDropdownSize: W, DropdownBaseTextbox: Ke, ChevronDownSmallIcon: lt, ChevronUpSmallIcon: ct };
383
+ }), { __sfc: !0, emit: o, props: e, baseTextbox: a, conditionalClasses: s, isDropdownOpen: l, onInput: i, onKeyDown: f, openDropdown: m, closeDropdown: u, clearValue: y, listeners: c, focus: g, BentoDropdownSize: V, DropdownBaseTextbox: We, ChevronDownSmallIcon: dt, ChevronUpSmallIcon: vt };
383
384
  }
384
385
  });
385
- var vt = function() {
386
+ var yt = function() {
386
387
  var t = this, o = t._self._c, e = t._self._setupProxy;
387
388
  return o("div", { staticClass: "b-dropdown-small-textbox", class: e.conditionalClasses }, [o(e.DropdownBaseTextbox, t._g(t._b({ ref: "baseTextbox", staticClass: "b-dropdown-small-textbox__textbox", attrs: { size: e.BentoDropdownSize.SMALL }, scopedSlots: t._u([{ key: "icon", fn: function() {
388
389
  return [o("div", { staticClass: "b-dropdown-small-textbox__chevron" }, [o(e.ChevronUpSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: e.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), o(e.ChevronDownSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: !e.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
389
390
  }, proxy: !0 }]) }, "dropdown-base-textbox", { ...t.$attrs, ...t.$props }, !1), e.listeners))], 1);
390
- }, mt = [], bt = /* @__PURE__ */ k(
391
- ft,
392
- vt,
393
- mt,
391
+ }, _t = [], gt = /* @__PURE__ */ k(
392
+ bt,
393
+ yt,
394
+ _t,
394
395
  !1,
395
396
  null,
396
397
  "2e5cb799"
397
398
  );
398
- const yt = bt.exports, _t = (a, t) => t.value.reduce((o, e) => {
399
+ const ht = gt.exports, wt = (n, t) => t.value.reduce((o, e) => {
399
400
  if (e.items) {
400
- const n = e.items.filter(
401
- (s) => a.value.find((i) => i.value === s.value)
401
+ const a = e.items.filter(
402
+ (l) => n.value.find((i) => i.value === l.value)
402
403
  );
403
- n.length === e.items.length ? o.push(e.displayValue ?? e.label) : n.forEach(({ label: s, displayValue: i }) => o.push(i ?? s));
404
+ a.length === e.items.length ? o.push(e.displayValue ?? e.label) : a.forEach(({ label: l, displayValue: i }) => o.push(i ?? l));
404
405
  }
405
- return a.value.find((n) => n.value === e.value) && o.push(e.displayValue ?? e.label), o;
406
- }, []).join(", "), gt = ({ items: a, placeholder: t, selectedValues: o, isMultiSelect: e }) => {
407
- const n = r(
408
- () => e.value && a.value.find((s) => {
406
+ return n.value.find((a) => a.value === e.value) && o.push(e.displayValue ?? e.label), o;
407
+ }, []).join(", "), Ct = ({ items: n, placeholder: t, selectedValues: o, isMultiSelect: e }) => {
408
+ const a = r(
409
+ () => e.value && n.value.find((l) => {
409
410
  var i;
410
- return (i = s.items) == null ? void 0 : i.length;
411
+ return (i = l.items) == null ? void 0 : i.length;
411
412
  })
412
413
  );
413
- return r(() => o.value.length ? n.value ? _t(o, a) : o.value.map(({ label: s, displayValue: i }) => i ?? s).join(", ") : t.value || null);
414
- }, Ce = (a) => {
414
+ return r(() => o.value.length ? a.value ? wt(o, n) : o.value.map(({ label: l, displayValue: i }) => i ?? l).join(", ") : t.value || null);
415
+ }, Ce = (n) => {
415
416
  var t;
416
- (t = a.value.$children) == null || t[0].$refs.textbox.focus();
417
- }, ht = ({
418
- inputContainerRef: a,
417
+ (t = n.value.$children) == null || t[0].$refs.textbox.focus();
418
+ }, Lt = ({
419
+ inputContainerRef: n,
419
420
  optionsContainerRef: t,
420
421
  selectedValueIndex: o,
421
422
  isDropdownOpen: e,
422
- isDynamicFltering: n,
423
- items: l,
424
- isMultiple: s
425
- }, i, c, b) => {
426
- const d = async (m) => {
427
- var C;
428
- n.value && await S(), (C = l.value[m]) == null || C.focus();
429
- }, u = async (m) => {
423
+ isDynamicFltering: a,
424
+ items: s,
425
+ isMultiple: l
426
+ }, i, f, m) => {
427
+ const u = async (_) => {
428
+ var w;
429
+ a.value && await x(), (w = s.value[_]) == null || w.focus();
430
+ }, y = async (_) => {
430
431
  var A, K;
431
- n.value && await S();
432
- const C = (A = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : A.$el.querySelectorAll(
432
+ a.value && await x();
433
+ const w = (A = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : A.$el.querySelectorAll(
433
434
  "button"
434
435
  );
435
- C.length ? (K = C[m]) == null || K.focus() : d(m);
436
- }, _ = (m) => {
437
- var C;
438
- return (C = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : C.setListboxFocusedIndex(
439
- m
436
+ w.length ? (K = w[_]) == null || K.focus() : u(_);
437
+ }, c = (_) => {
438
+ var w;
439
+ return (w = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : w.setListboxFocusedIndex(
440
+ _
440
441
  );
441
442
  }, g = () => {
442
- e.value || c(), S(() => {
443
- _(0), d(0);
443
+ e.value || f(), x(() => {
444
+ c(0), u(0);
444
445
  });
445
- }, v = () => {
446
- e.value || c(), S(() => {
447
- _(l.value.length - 1), d(l.value.length - 1);
446
+ }, b = () => {
447
+ e.value || f(), x(() => {
448
+ c(s.value.length - 1), u(s.value.length - 1);
448
449
  });
449
- }, O = ({ detail: m }) => {
450
- m.preventDefault(), g();
451
- }, L = ({ detail: m }) => {
452
- m.preventDefault(), v();
453
- }, x = () => {
450
+ }, S = ({ detail: _ }) => {
451
+ _.preventDefault(), g();
452
+ }, O = ({ detail: _ }) => {
453
+ _.preventDefault(), b();
454
+ }, C = () => {
454
455
  g();
455
- }, y = () => {
456
- v();
457
- }, I = ({ detail: m }) => {
458
- m.preventDefault(), i(), e.value && S(() => {
459
- s ? u(0) : (_(o.value), d(o.value));
456
+ }, d = () => {
457
+ b();
458
+ }, I = ({ detail: _ }) => {
459
+ _.preventDefault(), i(), e.value && x(() => {
460
+ l ? y(0) : (c(o.value), u(o.value));
460
461
  });
461
- }, D = ({ detail: m }) => {
462
- m.preventDefault(), i(), e.value && S(() => {
463
- s ? u(0) : (_(o.value), d(o.value));
462
+ }, D = ({ detail: _ }) => {
463
+ _.preventDefault(), i(), e.value && x(() => {
464
+ l ? y(0) : (c(o.value), u(o.value));
464
465
  });
465
466
  }, B = () => {
466
- e.value && b();
467
+ e.value && m();
467
468
  }, F = () => {
468
- e.value && (b(), Ce(a));
469
+ e.value && (m(), Ce(n));
469
470
  };
470
471
  return r(() => ({
471
- [E.ARROW_DOWN]: O,
472
- [E.ARROW_UP]: L,
473
- [E.HOME]: x,
474
- [E.END]: y,
475
- ...n.value ? {} : { [E.SPACE]: I },
472
+ [E.ARROW_DOWN]: S,
473
+ [E.ARROW_UP]: O,
474
+ [E.HOME]: C,
475
+ [E.END]: d,
476
+ ...a.value ? {} : { [E.SPACE]: I },
476
477
  [E.ENTER]: D,
477
478
  [E.TAB]: B,
478
479
  [E.ESCAPE]: F
479
480
  }));
480
- }, Ct = ({ inputContainerRef: a, isDropdownOpen: t }, o) => {
481
+ }, xt = ({ inputContainerRef: n, isDropdownOpen: t }, o) => {
481
482
  const e = () => {
482
- t.value && o(), S(() => {
483
- Ce(a);
483
+ t.value && o(), x(() => {
484
+ Ce(n);
484
485
  });
485
486
  };
486
487
  return {
@@ -490,18 +491,18 @@ const yt = bt.exports, _t = (a, t) => t.value.reduce((o, e) => {
490
491
  [p.SPACE]: e
491
492
  };
492
493
  };
493
- function wt(a, t, o, e) {
494
- const n = h(a), l = h(t), s = (c, b = []) => b.flatMap((d) => d.label.toLocaleLowerCase().includes(c) ? e != null && e.value && d.items ? [...s(c, d.items)] : [d, ...s(c, d.items)] : d.items ? [...s(c, d.items)] : []);
495
- return X(n, () => {
496
- o !== void 0 && o(n.value);
494
+ function St(n, t, o, e) {
495
+ const a = h(n), s = h(t), l = (f, m = []) => m.flatMap((u) => u.label.toLocaleLowerCase().includes(f) ? e != null && e.value && u.items ? [...l(f, u.items)] : [u, ...l(f, u.items)] : u.items ? [...l(f, u.items)] : []);
496
+ return G(a, () => {
497
+ o !== void 0 && o(a.value);
497
498
  }), r(() => {
498
- if (!n.value || o !== void 0)
499
- return l.value;
500
- const c = n.value.toLocaleLowerCase();
501
- return s(c, l.value);
499
+ if (!a.value || o !== void 0)
500
+ return s.value;
501
+ const f = a.value.toLocaleLowerCase();
502
+ return l(f, s.value);
502
503
  });
503
504
  }
504
- const Lt = {
505
+ const Ot = {
505
506
  "en-US": {
506
507
  all: "All",
507
508
  ariaLabelFallback: "Dropdown",
@@ -515,15 +516,16 @@ const Lt = {
515
516
  all: "Todos",
516
517
  clearFilter: "Limpar filtro"
517
518
  }
518
- }, xt = Symbol("input field component injection key"), Ht = Symbol("input field hint injection key"), Jt = Symbol("input field parent component injection key"), St = R({
519
- i18n: { messages: Lt },
519
+ }, Et = Symbol("input field component injection key"), Qt = Symbol("input field hint injection key"), Xt = Symbol("input field parent component injection key"), Dt = R({
520
+ i18n: { messages: Ot },
520
521
  name: "b-dropdown",
521
522
  components: {
522
- DropdownInputDefault: ze,
523
- DropdownInputSmall: yt
524
- }
525
- }), Ot = /* @__PURE__ */ R({
526
- ...St,
523
+ DropdownInputDefault: Ue,
524
+ DropdownInputSmall: ht
525
+ },
526
+ model: { prop: "modelValue" }
527
+ }), Bt = /* @__PURE__ */ R({
528
+ ...Dt,
527
529
  props: {
528
530
  description: { default: null },
529
531
  disabled: { type: Boolean, default: !1 },
@@ -544,163 +546,169 @@ const Lt = {
544
546
  items: { default: () => [] },
545
547
  loading: { type: Boolean, default: !1 },
546
548
  componentLoading: { type: Boolean, default: !1 },
547
- lazyLoadType: { default: Q.props.lazyLoadType.default },
549
+ lazyLoadType: { default: X.props.lazyLoadType.default },
548
550
  multiple: { type: Boolean, default: !1 },
549
551
  search: { default: void 0 },
550
552
  showSlotContentInMultiple: { type: Boolean, default: !1 },
551
553
  size: { default: null },
552
554
  staticCategories: { type: Boolean, default: !1 },
553
555
  value: { default: null },
556
+ modelValue: { default: null },
554
557
  virtualScroll: { type: Boolean, default: !1 },
555
558
  enableValueLabelPair: { type: Boolean, default: !1 }
556
559
  },
557
- emits: ["input", "show-more", "open"],
558
- setup(a, { expose: t, emit: o }) {
559
- var fe;
560
- const e = a, n = Ne(), l = ge(), s = We(l), { t: i } = G(), c = h(null), b = h(null), d = h(null), u = h(!1), _ = $("bento-dropdown-options-container"), g = $("dropdown-label"), v = $("dropdown-description"), O = $("dropdown-error"), { isReadOnly: L } = Fe(w(e, "readonly")), { cachedSelectedListboxOptions: x, cachedListboxSelectedValues: y, setCachedValues: I } = Pe(
561
- w(e, "items"),
562
- w(e, "value"),
563
- w(e, "multiple"),
564
- w(e, "enableValueLabelPair")
565
- ), D = h(n["aria-label"]), B = h(n["aria-describedby"]), { ariaLabel: F, label: U } = he(e), m = r(() => i("ariaLabelFallback")), C = Me({
560
+ emits: ["input", "update:model-value", "show-more", "open"],
561
+ setup(n, { expose: t, emit: o }) {
562
+ var me;
563
+ const e = n, a = Ae(), s = he(), l = je(s), { t: i } = ee(), { emitValue: f } = ke(o), m = h(null), u = h(null), y = h(null), c = h(!1), g = $("bento-dropdown-options-container"), b = $("dropdown-label"), S = $("dropdown-description"), O = $("dropdown-error"), { isReadOnly: C } = Ve(L(e, "readonly")), d = r(() => e.modelValue ?? e.value), { cachedSelectedListboxOptions: I, cachedListboxSelectedValues: D, setCachedValues: B } = Fe(
564
+ L(e, "items"),
565
+ d,
566
+ L(e, "multiple"),
567
+ L(e, "enableValueLabelPair")
568
+ ), F = h(a["aria-label"]), W = h(a["aria-describedby"]), { ariaLabel: _, label: w } = we(e), A = r(() => i("ariaLabelFallback")), K = $e({
566
569
  // TODO: take ariaLabel ref away when aria-label prop is removed
567
- ariaLabel: F.value || D,
568
- label: U,
569
- defaultFallback: m
570
- }), A = e.size === W.SMALL || Re(xt, !1), K = r(() => A ? W.SMALL : W.DEFAULT), we = r(() => ({
570
+ ariaLabel: _.value || F,
571
+ label: w,
572
+ defaultFallback: A
573
+ }), te = e.size === V.SMALL || Me(Et, !1), Le = r(() => te ? V.SMALL : V.DEFAULT), xe = r(() => ({
571
574
  "b-dropdown--condensed": e.condensed
572
- })), Le = r(() => ({
575
+ })), Se = r(() => ({
573
576
  "b-dropdown__description--error": !!e.errorMessage
574
- })), T = h(""), M = w(e, "items"), ee = w(e, "staticCategories"), V = wt(T, M, (fe = e == null ? void 0 : e.search) == null ? void 0 : fe.searchEvent, ee), j = r(() => e.dynamicFiltering && !!T.value), xe = gt({
577
+ })), T = h(""), M = L(e, "items"), oe = L(e, "staticCategories"), U = St(T, M, (me = e == null ? void 0 : e.search) == null ? void 0 : me.searchEvent, oe), j = r(() => e.dynamicFiltering && !!T.value), Oe = Ct({
575
578
  items: M,
576
- placeholder: w(e, "placeholder"),
577
- isMultiSelect: w(e, "multiple"),
578
- selectedValues: x
579
- }), Se = r(() => {
580
- if (e != null && e.multiple && Array.isArray(e.value))
579
+ placeholder: L(e, "placeholder"),
580
+ isMultiSelect: L(e, "multiple"),
581
+ selectedValues: I
582
+ }), Ee = r(() => {
583
+ if (e != null && e.multiple && Array.isArray(d.value))
581
584
  return e.items.filter(
582
- ({ value: f }) => (e == null ? void 0 : e.value) && (e == null ? void 0 : e.value).includes(f)
585
+ ({ value: v }) => (e == null ? void 0 : e.value) && (e == null ? void 0 : e.value).includes(v)
583
586
  );
584
587
  if (!e.multiple && e.staticCategories) {
585
- const f = e.items.find(
586
- (J) => J.items.some((Te) => Te.value === e.value)
588
+ const v = e.items.find(
589
+ (J) => J.items.some((Re) => Re.value === d.value)
587
590
  );
588
- return f ? f.items.find((J) => J.value === e.value) : null;
591
+ return v ? v.items.find((J) => J.value === d.value) : null;
589
592
  }
590
- return e.items.find(({ value: f }) => f === (e == null ? void 0 : e.value));
591
- }), te = r(() => {
592
- const f = V.value.findIndex(({ value: N }) => e.enableValueLabelPair ? e.value.value === N : e.value === N);
593
- return f > -1 ? f : 0;
594
- }), { isMultiLevelSelect: q, flattenedItemsList: oe } = $e(M), ne = r(() => q.value && !e.staticCategories), ae = r(() => ne.value ? "treeitem" : "option"), Oe = r(() => {
593
+ return e.items.find(({ value: v }) => v === d.value);
594
+ }), ae = r(() => {
595
+ const v = U.value.findIndex(({ value: N }) => e.enableValueLabelPair ? d.value.value === N : d.value === N);
596
+ return v > -1 ? v : 0;
597
+ }), { isMultiLevelSelect: q, flattenedItemsList: ne } = Ke(M), le = r(() => q.value && !e.staticCategories), se = r(() => le.value ? "treeitem" : "option"), De = r(() => {
595
598
  if (e.multiple) {
596
- const f = Array.isArray(e.value) ? e.value.length : 0, N = q.value ? oe.value.length : M.value.length;
597
- return f === 0 ? null : !e.hasMoreItems && N > 0 && N === f ? i("all") : f;
599
+ const v = Array.isArray(d.value) ? d.value.length : 0, N = q.value ? ne.value.length : M.value.length;
600
+ return v === 0 ? null : !e.hasMoreItems && N > 0 && N === v ? i("all") : v;
598
601
  }
599
602
  return null;
600
- }), Ee = r(
603
+ }), Be = r(
601
604
  () => [
602
- e.description ? v : null,
603
- B.value,
605
+ e.description ? S : null,
606
+ W.value,
604
607
  e.errorMessage ? O : null
605
608
  ].filter(Boolean).join(" ") || null
606
- ), se = r(() => {
607
- var f;
608
- return (f = d.value) == null ? void 0 : f.$el;
609
- }), { visibleDomOptions: le, updateVisibleDomOptions: H } = ke(
610
- se,
611
- V,
612
- ae
613
- ), ie = () => {
614
- L.value || (u.value = !0, S(() => {
609
+ ), ie = r(() => {
610
+ var v;
611
+ return (v = y.value) == null ? void 0 : v.$el;
612
+ }), { visibleDomOptions: re, updateVisibleDomOptions: H } = ze(
613
+ ie,
614
+ U,
615
+ se
616
+ ), de = () => {
617
+ C.value || (c.value = !0, x(() => {
615
618
  H();
616
619
  }));
617
620
  }, z = () => {
618
- u.value = !1;
619
- }, re = () => {
620
- L.value || (u.value = !u.value, S(() => {
621
+ c.value = !1;
622
+ }, ue = () => {
623
+ C.value || (c.value = !c.value, x(() => {
621
624
  H();
622
625
  }), j.value && (T.value = ""));
623
- }, De = () => {
624
- j.value && (T.value = ""), u.value && (u.value = !1, d.value.onOutsideDropdownClick());
625
- }, de = (f) => {
626
- e.multiple || (T.value = "", u.value = !1), I(f), o("input", y.value);
627
- }, ue = () => {
626
+ }, Ie = () => {
627
+ j.value && (T.value = ""), c.value && (c.value = !1, y.value.onOutsideDropdownClick());
628
+ }, ce = (v) => {
629
+ e.multiple || (T.value = "", c.value = !1), B(v), f(D.value);
630
+ }, pe = () => {
628
631
  o(p.SHOW_MORE);
629
- }, Be = ht(
632
+ }, Te = Lt(
630
633
  {
631
- inputContainerRef: c,
632
- optionsContainerRef: d,
633
- selectedValueIndex: te,
634
- isDropdownOpen: u,
635
- isDynamicFltering: w(e, "dynamicFiltering"),
636
- items: le,
634
+ inputContainerRef: m,
635
+ optionsContainerRef: y,
636
+ selectedValueIndex: ae,
637
+ isDropdownOpen: c,
638
+ isDynamicFltering: L(e, "dynamicFiltering"),
639
+ items: re,
637
640
  isMultiple: e.multiple
638
641
  },
639
- re,
640
- ie,
642
+ ue,
643
+ de,
641
644
  z
642
- ), ce = Ct(
645
+ ), fe = xt(
643
646
  {
644
- inputContainerRef: c,
645
- isDropdownOpen: u
647
+ inputContainerRef: m,
648
+ isDropdownOpen: c
646
649
  },
647
650
  z
648
- ), Ie = {
651
+ ), Ne = {
649
652
  [p.CLOSE_DROPDOWN]: z,
650
- [p.SELECT]: de,
651
- [p.SHOW_MORE]: ue,
652
- ...ce
653
+ [p.SELECT]: ce,
654
+ [p.SHOW_MORE]: pe,
655
+ ...fe
653
656
  };
654
- e.error && ve(
657
+ e.error && Y(
655
658
  'BentoDropdown "error" property',
656
659
  `Use the BentoDropdown "errorMessage" property instead to indicate that there is a modifier error.
657
660
  Having the field as "undefined" will hide/remove the error.
658
661
  <bento-dropdown errorMessage="Error message text" />`,
659
662
  "2.0.0"
660
- ), e.size && ve('BentoDropdown "size" property', "Do not use. Only 'default' size should be used.", "2.0.0");
661
- const pe = () => {
662
- c.value.focus();
663
+ ), e.size && Y('BentoDropdown "size" property', "Do not use. Only 'default' size should be used.", "2.0.0"), e.value && Y(
664
+ 'BentoDropdown "value" property',
665
+ `The use of "value" prop in "BentoDropdown" is no longer supported.
666
+ Use the "v-model" or "model-value" property instead.`,
667
+ "2.0.0"
668
+ );
669
+ const ve = () => {
670
+ m.value.focus();
663
671
  };
664
- return X(
665
- () => u.value,
666
- (f) => {
667
- f && o("open");
672
+ return G(
673
+ () => c.value,
674
+ (v) => {
675
+ v && o("open");
668
676
  }
669
677
  ), t({
670
- focus: pe
671
- }), { __sfc: !0, attrs: n, slots: l, hasSlot: s, props: e, emit: o, t: i, inputContainerRef: c, inputContainerRefWrapper: b, optionsContainerRef: d, isDropdownOpen: u, dropdownOptionsContainerId: _, labelId: g, descriptionId: v, errorId: O, isReadOnly: L, cachedSelectedListboxOptions: x, cachedListboxSelectedValues: y, setCachedValues: I, ariaLabelAttribute: D, ariaDescribedByAttribute: B, ariaLabel: F, label: U, computedAriaLabelFallbackMessage: m, computedAriaLabel: C, isInputComponent: A, computedSize: K, conditionalClasses: we, descriptionConditionalClasses: Le, searchTerm: T, items: M, staticCategories: ee, filteredItems: V, isSearching: j, displayValue: xe, selectedValueItem: Se, selectedValueIndex: te, isMultiLevelSelect: q, flattenedItemsList: oe, isTreePattern: ne, computedOptionRole: ae, additionalItemsSelected: Oe, ariaDescribedBy: Ee, listboxRef: se, visibleDomOptions: le, updateVisibleDomOptions: H, openDropdown: ie, closeDropdown: z, toggleDropdown: re, clickOutsideDropdown: De, onOptionSelected: de, emitShowMoreEvent: ue, textboxKeyboardNavigationListeners: Be, listboxKeyboardNavigationListeners: ce, listboxListeners: Ie, focus: pe, BentoDropdownOptionsContainer: tt, BentoTypography: Ae, ErrorMessage: qe, FieldLabel: je, vBentoClickOutsideDirective: Ve, vBentoKeyboardNavigationDirective: Ue };
678
+ focus: ve
679
+ }), { __sfc: !0, attrs: a, slots: s, hasSlot: l, props: e, emit: o, t: i, emitValue: f, inputContainerRef: m, inputContainerRefWrapper: u, optionsContainerRef: y, isDropdownOpen: c, dropdownOptionsContainerId: g, labelId: b, descriptionId: S, errorId: O, isReadOnly: C, dropdownValue: d, cachedSelectedListboxOptions: I, cachedListboxSelectedValues: D, setCachedValues: B, ariaLabelAttribute: F, ariaDescribedByAttribute: W, ariaLabel: _, label: w, computedAriaLabelFallbackMessage: A, computedAriaLabel: K, isInputComponent: te, computedSize: Le, conditionalClasses: xe, descriptionConditionalClasses: Se, searchTerm: T, items: M, staticCategories: oe, filteredItems: U, isSearching: j, displayValue: Oe, selectedValueItem: Ee, selectedValueIndex: ae, isMultiLevelSelect: q, flattenedItemsList: ne, isTreePattern: le, computedOptionRole: se, additionalItemsSelected: De, ariaDescribedBy: Be, listboxRef: ie, visibleDomOptions: re, updateVisibleDomOptions: H, openDropdown: de, closeDropdown: z, toggleDropdown: ue, clickOutsideDropdown: Ie, onOptionSelected: ce, emitShowMoreEvent: pe, textboxKeyboardNavigationListeners: Te, listboxKeyboardNavigationListeners: fe, listboxListeners: Ne, focus: ve, BentoDropdownOptionsContainer: nt, BentoTypography: Pe, ErrorMessage: Ye, FieldLabel: Je, vBentoClickOutsideDirective: He, vBentoKeyboardNavigationDirective: qe };
672
680
  }
673
681
  });
674
- var Et = function() {
675
- var n;
682
+ var It = function() {
683
+ var a;
676
684
  var t = this, o = t._self._c, e = t._self._setupProxy;
677
- return o("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.clickOutsideDropdown, expression: "clickOutsideDropdown" }], staticClass: "b-dropdown", class: e.conditionalClasses }, [e.label ? o(e.FieldLabel, { attrs: { id: e.labelId, condensed: t.condensed, label: e.label, "tooltip-text": t.tooltipText, optional: t.optional, required: t.required } }) : t._e(), o("div", t._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "inputContainerRefWrapper" }, e.textboxKeyboardNavigationListeners), [o(e.computedSize, { ref: "inputContainerRef", tag: "component", attrs: { condensed: t.condensed, value: e.searchTerm, "additional-items-selected": e.additionalItemsSelected, "aria-controls": e.dropdownOptionsContainerId, ariaExpanded: e.isDropdownOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, "aria-label": e.computedAriaLabel, "aria-readonly": e.isReadOnly, readonly: e.isReadOnly, required: t.required, disabled: t.disabled, "display-value": e.displayValue, "dynamic-filtering": t.dynamicFiltering, "is-invalid": !!t.errorMessage || t.error, multiple: t.multiple, open: e.isDropdownOpen, "selected-value-item": e.isInputComponent ? void 0 : e.selectedValueItem, "show-slot-content-in-multiple": t.showSlotContentInMultiple }, on: { input: function(l) {
678
- e.searchTerm = l;
679
- }, open: e.toggleDropdown, close: e.toggleDropdown }, scopedSlots: t._u([t._l(e.slots, function(l, s) {
680
- return { key: s, fn: function(i) {
681
- return [t._t(s, null, null, i)];
685
+ return o("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.clickOutsideDropdown, expression: "clickOutsideDropdown" }], staticClass: "b-dropdown", class: e.conditionalClasses }, [e.label ? o(e.FieldLabel, { attrs: { id: e.labelId, condensed: t.condensed, label: e.label, "tooltip-text": t.tooltipText, optional: t.optional, required: t.required } }) : t._e(), o("div", t._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "inputContainerRefWrapper" }, e.textboxKeyboardNavigationListeners), [o(e.computedSize, { ref: "inputContainerRef", tag: "component", attrs: { condensed: t.condensed, value: e.searchTerm, "additional-items-selected": e.additionalItemsSelected, "aria-controls": e.dropdownOptionsContainerId, ariaExpanded: e.isDropdownOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, "aria-label": e.computedAriaLabel, "aria-readonly": e.isReadOnly, readonly: e.isReadOnly, required: t.required, disabled: t.disabled, "display-value": e.displayValue, "dynamic-filtering": t.dynamicFiltering, "is-invalid": !!t.errorMessage || t.error, multiple: t.multiple, open: e.isDropdownOpen, "selected-value-item": e.isInputComponent ? void 0 : e.selectedValueItem, "show-slot-content-in-multiple": t.showSlotContentInMultiple }, on: { input: function(s) {
686
+ e.searchTerm = s;
687
+ }, open: e.toggleDropdown, close: e.toggleDropdown }, scopedSlots: t._u([t._l(e.slots, function(s, l) {
688
+ return { key: l, fn: function(i) {
689
+ return [t._t(l, null, null, i)];
682
690
  } };
683
- })], null, !0) })], 1), e.inputContainerRef ? o(e.BentoDropdownOptionsContainer, t._g({ ref: "optionsContainerRef", attrs: { id: e.dropdownOptionsContainerId, "aria-label": e.computedAriaLabel, "component-loading": t.componentLoading, "empty-state": t.emptyState, "debounce-time": (n = t.search) == null ? void 0 : n.debounceTime, disabled: t.disabled, "is-option-disabled": t.isOptionDisabled, items: e.filteredItems, multiple: t.multiple, "static-categories": e.staticCategories, open: e.isDropdownOpen, "selected-value": e.cachedSelectedListboxOptions, searching: e.isSearching, "target-element": e.inputContainerRefWrapper, loading: t.loading, "has-more-items": t.hasMoreItems, "lazy-load-type": t.lazyLoadType, "virtual-scroll": t.virtualScroll }, scopedSlots: t._u([t._l(e.slots, function(l, s) {
684
- return { key: s, fn: function(i) {
685
- return [t._t(s, null, null, i)];
691
+ })], null, !0) })], 1), e.inputContainerRef ? o(e.BentoDropdownOptionsContainer, t._g({ ref: "optionsContainerRef", attrs: { id: e.dropdownOptionsContainerId, "aria-label": e.computedAriaLabel, "component-loading": t.componentLoading, "empty-state": t.emptyState, "debounce-time": (a = t.search) == null ? void 0 : a.debounceTime, disabled: t.disabled, "is-option-disabled": t.isOptionDisabled, items: e.filteredItems, multiple: t.multiple, "static-categories": e.staticCategories, open: e.isDropdownOpen, "selected-value": e.cachedSelectedListboxOptions, searching: e.isSearching, "target-element": e.inputContainerRefWrapper, loading: t.loading, "has-more-items": t.hasMoreItems, "lazy-load-type": t.lazyLoadType, "virtual-scroll": t.virtualScroll }, scopedSlots: t._u([t._l(e.slots, function(s, l) {
692
+ return { key: l, fn: function(i) {
693
+ return [t._t(l, null, null, i)];
686
694
  } };
687
695
  })], null, !0) }, e.listboxListeners)) : t._e(), t.errorMessage ? o(e.ErrorMessage, { staticClass: "b-dropdown__error-message", attrs: { id: e.errorId, "error-message": t.errorMessage } }) : t._e(), t.description || e.hasSlot("description") ? o(e.BentoTypography, { staticClass: "b-dropdown__description", class: e.descriptionConditionalClasses, attrs: { id: e.descriptionId, el: "span" } }, [t._t("description", function() {
688
696
  return [t._v(" " + t._s(t.description) + " ")];
689
697
  })], 2) : t._e()], 1);
690
- }, Dt = [], Bt = /* @__PURE__ */ k(
691
- Ot,
692
- Et,
693
- Dt,
698
+ }, Tt = [], Nt = /* @__PURE__ */ k(
699
+ Bt,
700
+ It,
701
+ Tt,
694
702
  !1,
695
703
  null,
696
- "05a0b831"
704
+ "bc2a6da5"
697
705
  );
698
- const Yt = Bt.exports;
706
+ const Gt = Nt.exports;
699
707
  export {
700
- Yt as B,
701
- Ht as I,
702
- xt as a,
703
- Jt as b,
704
- wt as u
708
+ Gt as B,
709
+ Qt as I,
710
+ Et as a,
711
+ Xt as b,
712
+ St as u
705
713
  };
706
- //# sourceMappingURL=dropdown.RxD2TqnP.js.map
714
+ //# sourceMappingURL=dropdown.-3x2IBDg.js.map