@adyen/bento-vue2 1.12.0 → 1.13.1

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 (216) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +10 -22
  3. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +23 -0
  4. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-scroller/use-scroller.d.ts +2 -1
  5. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +3 -1
  6. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +9 -0
  7. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +520 -0
  8. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +1 -0
  9. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +4 -1
  10. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-chips/index.d.ts +1 -0
  11. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-chips/listbox-multi-select-chips.vue.d.ts +28 -0
  12. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +3 -4
  13. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue.d.ts +2 -2
  14. package/dist/@types/packages/vue2/src/components/internal/listbox/composables/useListboxKeyboardNavigation.d.ts +2 -2
  15. package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +3 -2
  16. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.keys.d.ts +1 -0
  17. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/index.d.ts +2 -0
  18. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.types.d.ts +1 -0
  19. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +22 -26
  20. package/dist/@types/packages/vue2/src/components/radio-group/index.d.ts +2 -1
  21. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.keys.d.ts +1 -0
  22. package/dist/accordion.js +2 -2
  23. package/dist/action-bar.js +5 -5
  24. package/dist/alert.js +17 -16
  25. package/dist/alert.js.map +1 -1
  26. package/dist/assets/base-modal.css +1 -1
  27. package/dist/assets/button.css +1 -1
  28. package/dist/assets/checkbox.css +1 -1
  29. package/dist/assets/controls-group.css +1 -1
  30. package/dist/assets/index.css +1 -1
  31. package/dist/assets/index10.css +1 -1
  32. package/dist/assets/index11.css +1 -1
  33. package/dist/assets/index12.css +1 -1
  34. package/dist/assets/index13.css +1 -1
  35. package/dist/assets/index14.css +1 -1
  36. package/dist/assets/index15.css +1 -1
  37. package/dist/assets/index16.css +1 -1
  38. package/dist/assets/index17.css +1 -1
  39. package/dist/assets/index18.css +1 -1
  40. package/dist/assets/index19.css +1 -1
  41. package/dist/assets/index2.css +1 -1
  42. package/dist/assets/index20.css +1 -1
  43. package/dist/assets/index21.css +1 -1
  44. package/dist/assets/index22.css +1 -1
  45. package/dist/assets/index23.css +1 -1
  46. package/dist/assets/index24.css +1 -1
  47. package/dist/assets/index25.css +1 -1
  48. package/dist/assets/index26.css +1 -1
  49. package/dist/assets/index28.css +1 -1
  50. package/dist/assets/index29.css +1 -1
  51. package/dist/assets/index3.css +1 -1
  52. package/dist/assets/index30.css +1 -1
  53. package/dist/assets/index31.css +1 -1
  54. package/dist/assets/index32.css +1 -1
  55. package/dist/assets/index33.css +1 -1
  56. package/dist/assets/index34.css +1 -1
  57. package/dist/assets/index35.css +1 -1
  58. package/dist/assets/index36.css +1 -1
  59. package/dist/assets/index37.css +1 -1
  60. package/dist/assets/index39.css +1 -1
  61. package/dist/assets/index4.css +1 -1
  62. package/dist/assets/index40.css +1 -1
  63. package/dist/assets/index41.css +1 -1
  64. package/dist/assets/index42.css +1 -1
  65. package/dist/assets/index43.css +1 -1
  66. package/dist/assets/index44.css +1 -1
  67. package/dist/assets/index45.css +1 -1
  68. package/dist/assets/index46.css +1 -1
  69. package/dist/assets/index5.css +1 -1
  70. package/dist/assets/index6.css +1 -1
  71. package/dist/assets/index7.css +1 -1
  72. package/dist/assets/index8.css +1 -1
  73. package/dist/assets/index9.css +1 -1
  74. package/dist/assets/listbox.css +1 -1
  75. package/dist/avatar-image.js +1 -1
  76. package/dist/badge.js +1 -1
  77. package/dist/button.js +45 -52
  78. package/dist/button.js.map +1 -1
  79. package/dist/card.js +2 -2
  80. package/dist/checkbox.js +6 -6
  81. package/dist/chunks/arrow-left.2db60716.js.map +1 -1
  82. package/dist/chunks/{base-button.1f07b7c1.js → base-button.f9080a52.js} +2 -2
  83. package/dist/chunks/{base-button.1f07b7c1.js.map → base-button.f9080a52.js.map} +1 -1
  84. package/dist/chunks/{base-modal.9d63bdaf.js → base-modal.a580438d.js} +42 -40
  85. package/dist/chunks/base-modal.a580438d.js.map +1 -0
  86. package/dist/chunks/{button-actions-with-menu.4c5091f4.js → button-actions-with-menu.a9087340.js} +3 -3
  87. package/dist/chunks/{button-actions-with-menu.4c5091f4.js.map → button-actions-with-menu.a9087340.js.map} +1 -1
  88. package/dist/chunks/{button.133f145e.js → button.bb0d7584.js} +7 -7
  89. package/dist/chunks/{button.133f145e.js.map → button.bb0d7584.js.map} +1 -1
  90. package/dist/chunks/{calendar.9a8605d1.js → calendar.17ab99de.js} +66 -66
  91. package/dist/chunks/{calendar.9a8605d1.js.map → calendar.17ab99de.js.map} +1 -1
  92. package/dist/chunks/{checkbox.d8b810c7.js → checkbox.51cdb397.js} +3 -3
  93. package/dist/chunks/checkbox.51cdb397.js.map +1 -0
  94. package/dist/chunks/checkmark-circle-fill.345311d2.js.map +1 -1
  95. package/dist/chunks/checkmark-small.520f01b1.js.map +1 -1
  96. package/dist/chunks/checkmark.a6ed8f47.js.map +1 -1
  97. package/dist/chunks/chevron-left.5edf02ac.js.map +1 -1
  98. package/dist/chunks/chevron-up.81185563.js.map +1 -1
  99. package/dist/chunks/{controls-group.bf152dea.js → controls-group.3716f4b4.js} +4 -4
  100. package/dist/chunks/{controls-group.bf152dea.js.map → controls-group.3716f4b4.js.map} +1 -1
  101. package/dist/chunks/{copy.68a7d416.js → copy.54cc3ab4.js} +4 -4
  102. package/dist/chunks/copy.54cc3ab4.js.map +1 -0
  103. package/dist/chunks/cross-circle-fill.27580c4b.js.map +1 -1
  104. package/dist/chunks/cross-small.e851e0de.js +26 -0
  105. package/dist/chunks/cross-small.e851e0de.js.map +1 -0
  106. package/dist/chunks/cross.04678d81.js.map +1 -1
  107. package/dist/chunks/{dropdown-default-textbox.c595fd31.js → dropdown-default-textbox.13b5054e.js} +2 -2
  108. package/dist/chunks/{dropdown-default-textbox.c595fd31.js.map → dropdown-default-textbox.13b5054e.js.map} +1 -1
  109. package/dist/chunks/{dropdown.eaee22a3.js → dropdown.4d800c61.js} +14 -14
  110. package/dist/chunks/dropdown.4d800c61.js.map +1 -0
  111. package/dist/chunks/{field-label.66f52c8f.js → field-label.7328b82b.js} +2 -2
  112. package/dist/chunks/{field-label.66f52c8f.js.map → field-label.7328b82b.js.map} +1 -1
  113. package/dist/chunks/{fixed-scroller.01fc96f7.js → fixed-scroller.d6c11166.js} +2 -2
  114. package/dist/chunks/{fixed-scroller.01fc96f7.js.map → fixed-scroller.d6c11166.js.map} +1 -1
  115. package/dist/chunks/{footer-actions.38e99891.js → footer-actions.bc0cb7e0.js} +3 -3
  116. package/dist/chunks/{footer-actions.38e99891.js.map → footer-actions.bc0cb7e0.js.map} +1 -1
  117. package/dist/chunks/{index.d90c5838.js → index.170ac16b.js} +3 -3
  118. package/dist/chunks/{index.d90c5838.js.map → index.170ac16b.js.map} +1 -1
  119. package/dist/chunks/{index.18773b0b.js → index.339f15c4.js} +26 -26
  120. package/dist/chunks/{index.18773b0b.js.map → index.339f15c4.js.map} +1 -1
  121. package/dist/chunks/{index.3b7d40b7.js → index.541cce1c.js} +2 -2
  122. package/dist/chunks/{index.3b7d40b7.js.map → index.541cce1c.js.map} +1 -1
  123. package/dist/chunks/{index.9b669c12.js → index.5742fba4.js} +7 -7
  124. package/dist/chunks/index.5742fba4.js.map +1 -0
  125. package/dist/chunks/{index.99a2184a.js → index.6ac01113.js} +2 -2
  126. package/dist/chunks/{index.99a2184a.js.map → index.6ac01113.js.map} +1 -1
  127. package/dist/chunks/{index.b38a191d.js → index.772a5595.js} +2 -2
  128. package/dist/chunks/{index.b38a191d.js.map → index.772a5595.js.map} +1 -1
  129. package/dist/chunks/{index.14758ff7.js → index.82ff40be.js} +3 -3
  130. package/dist/chunks/{index.14758ff7.js.map → index.82ff40be.js.map} +1 -1
  131. package/dist/chunks/{index.eb527b75.js → index.a4a820fd.js} +6 -6
  132. package/dist/chunks/{index.eb527b75.js.map → index.a4a820fd.js.map} +1 -1
  133. package/dist/chunks/{index.2cfe4a09.js → index.af238ed6.js} +2 -2
  134. package/dist/chunks/{index.2cfe4a09.js.map → index.af238ed6.js.map} +1 -1
  135. package/dist/chunks/index.d1f65246.js +80 -0
  136. package/dist/chunks/index.d1f65246.js.map +1 -0
  137. package/dist/chunks/{index.45aa17fc.js → index.ec0743da.js} +5 -5
  138. package/dist/chunks/{index.45aa17fc.js.map → index.ec0743da.js.map} +1 -1
  139. package/dist/chunks/{info-filled.27bd4bfb.js → info-filled.c37e091d.js} +12 -33
  140. package/dist/chunks/{info-filled.27bd4bfb.js.map → info-filled.c37e091d.js.map} +1 -1
  141. package/dist/chunks/{listbox-option-tag.168c794c.js → listbox-option-tag.6f3e922c.js} +3 -3
  142. package/dist/chunks/{listbox-option-tag.168c794c.js.map → listbox-option-tag.6f3e922c.js.map} +1 -1
  143. package/dist/chunks/{listbox.23c6b393.js → listbox.e5d70b9b.js} +471 -422
  144. package/dist/chunks/listbox.e5d70b9b.js.map +1 -0
  145. package/dist/chunks/{loading-button.44d698b9.js → loading-button.7301cc2e.js} +2 -2
  146. package/dist/chunks/{loading-button.44d698b9.js.map → loading-button.7301cc2e.js.map} +1 -1
  147. package/dist/chunks/refresh.71a03998.js.map +1 -1
  148. package/dist/chunks/search.471270fe.js.map +1 -1
  149. package/dist/chunks/sidepanel.keys.3f8d69c1.js +7 -0
  150. package/dist/chunks/sidepanel.keys.3f8d69c1.js.map +1 -0
  151. package/dist/chunks/{tooltip.f91b2040.js → tooltip.46858ae6.js} +3 -3
  152. package/dist/chunks/{tooltip.f91b2040.js.map → tooltip.46858ae6.js.map} +1 -1
  153. package/dist/code-snippet.js +7 -7
  154. package/dist/code-snippet.js.map +1 -1
  155. package/dist/country.js +2 -2
  156. package/dist/currency.js +1 -1
  157. package/dist/data-grid.js +692 -683
  158. package/dist/data-grid.js.map +1 -1
  159. package/dist/date-picker.js +18 -18
  160. package/dist/date-range-picker.js +2 -2
  161. package/dist/date.js +1 -1
  162. package/dist/divider.js +1 -1
  163. package/dist/dropdown.js +6 -6
  164. package/dist/empty-state.js +3 -3
  165. package/dist/filter-bar.js +477 -471
  166. package/dist/filter-bar.js.map +1 -1
  167. package/dist/focus-trap.js +1 -1
  168. package/dist/form-layout.js +2 -2
  169. package/dist/header.js +3 -3
  170. package/dist/index.js +208 -205
  171. package/dist/info-icon.js +3 -3
  172. package/dist/info-icon.js.map +1 -1
  173. package/dist/input-field.js +4 -4
  174. package/dist/internal.js +7 -7
  175. package/dist/link.js +3 -56
  176. package/dist/link.js.map +1 -1
  177. package/dist/loading-indicator.js +1 -1
  178. package/dist/menu.js +1 -1
  179. package/dist/modal.js +4 -4
  180. package/dist/pagination.js +4 -4
  181. package/dist/pagination.js.map +1 -1
  182. package/dist/payment-method.js +2 -2
  183. package/dist/popover.js +1 -1
  184. package/dist/popper-container.js +1 -1
  185. package/dist/radio-group.js +84 -101
  186. package/dist/radio-group.js.map +1 -1
  187. package/dist/search-bar.js +1 -1
  188. package/dist/secondary-nav.js +2 -2
  189. package/dist/segmented-control.js +3 -3
  190. package/dist/sidepanel.js +73 -71
  191. package/dist/sidepanel.js.map +1 -1
  192. package/dist/status.js +2 -2
  193. package/dist/stepper.js +3 -3
  194. package/dist/stepper.js.map +1 -1
  195. package/dist/structured-list.js +1 -1
  196. package/dist/summary-grid.js +3 -3
  197. package/dist/tabs.js +3 -3
  198. package/dist/tag.js +3 -3
  199. package/dist/textarea.js +91 -87
  200. package/dist/textarea.js.map +1 -1
  201. package/dist/timeline.js +6 -6
  202. package/dist/timeline.js.map +1 -1
  203. package/dist/toast.js +8 -7
  204. package/dist/toast.js.map +1 -1
  205. package/dist/toggle.js +2 -2
  206. package/dist/tutorial.js +4 -4
  207. package/dist/tutorial.js.map +1 -1
  208. package/dist/typography.js +1 -1
  209. package/dist/web-types.json +139 -55
  210. package/package.json +2 -2
  211. package/dist/chunks/base-modal.9d63bdaf.js.map +0 -1
  212. package/dist/chunks/checkbox.d8b810c7.js.map +0 -1
  213. package/dist/chunks/copy.68a7d416.js.map +0 -1
  214. package/dist/chunks/dropdown.eaee22a3.js.map +0 -1
  215. package/dist/chunks/index.9b669c12.js.map +0 -1
  216. package/dist/chunks/listbox.23c6b393.js.map +0 -1
@@ -1,23 +1,25 @@
1
- import { computed as c, ref as T, onMounted as Z, onUnmounted as _e, watch as ee, defineComponent as N, toRef as Y } from "vue";
2
- import { B as w } from "./index.99a2184a.js";
3
- import { BentoLoadingIndicator as ve } from "../loading-indicator.js";
4
- import { BentoEmptyState as me } from "../empty-state.js";
5
- import { u as j } from "./i18n.eb5b985b.js";
6
- import { d as fe } from "./debounce.b5ef6acf.js";
7
- import { n as P } from "./_plugin-vue2_normalizer.71e2aa87.js";
8
- import { C as ge } from "./checkmark.a6ed8f47.js";
1
+ import { computed as c, ref as L, onMounted as Z, onUnmounted as _e, watch as ee, defineComponent as D, toRef as V } from "vue";
2
+ import { B as $ } from "./index.6ac01113.js";
3
+ import { BentoLoadingIndicator as be } from "../loading-indicator.js";
4
+ import { BentoEmptyState as ve } from "../empty-state.js";
5
+ import { u as z } from "./i18n.eb5b985b.js";
6
+ import { d as me } from "./debounce.b5ef6acf.js";
7
+ import { n as N } from "./_plugin-vue2_normalizer.71e2aa87.js";
8
+ import { C as fe } from "./checkmark.a6ed8f47.js";
9
9
  import { B as k, a as H } from "./keyboard-navigation.ca47dfa8.js";
10
- import { B as X } from "./checkbox.d8b810c7.js";
10
+ import { B as X } from "./checkbox.51cdb397.js";
11
11
  import "./index.4c062058.js";
12
- import { C as ye, a as pe } from "./chevron-up.81185563.js";
13
- import { B as xe, a as J } from "./loading-button.44d698b9.js";
14
- import { o as Se } from "./resize.a041304d.js";
12
+ import { C as ge, a as ye } from "./chevron-up.81185563.js";
13
+ import { B as pe } from "./base-button.f9080a52.js";
14
+ import { C as xe } from "./cross-small.e851e0de.js";
15
+ import { B as Se, a as J } from "./loading-button.7301cc2e.js";
16
+ import { o as Ce } from "./resize.a041304d.js";
15
17
  import "../assets/listbox.css";
16
- const te = (t, e, l, s) => {
18
+ const te = (t, e, s, l) => {
17
19
  const n = c(
18
20
  () => {
19
- var a, d;
20
- return !!((a = t.value) != null && a.length) && ((d = t.value) == null ? void 0 : d.length) === e.value.length;
21
+ var a, b;
22
+ return !!((a = t.value) != null && a.length) && ((b = t.value) == null ? void 0 : b.length) === e.value.length;
21
23
  }
22
24
  ), o = c(() => {
23
25
  var a;
@@ -27,89 +29,89 @@ const te = (t, e, l, s) => {
27
29
  isAllSelected: n,
28
30
  isIndeterminate: o,
29
31
  toggleSelectAll: (a) => {
30
- a ? l() : s();
32
+ a ? s() : l();
31
33
  }
32
34
  };
33
35
  };
34
- function Ee(t, { disabled: e, itemHeight: l, overscan: s = 5, prefixHeight: n }) {
35
- const o = T(null), m = T([]), a = T(0), d = T(0), u = T(0);
36
- let x;
37
- const O = c(() => {
38
- const g = typeof l == "number" ? t.value.length * l : t.value.reduce((S, _, y) => S + l(y), 0), C = typeof l == "number" ? a.value * l : t.value.slice(0, a.value).reduce((S, _, y) => S + l(y), 0);
36
+ function Ee(t, { disabled: e, itemHeight: s, overscan: l = 5, prefixHeight: n }) {
37
+ const o = L(null), m = L([]), a = L(0), b = L(0), u = L(0);
38
+ let S;
39
+ const A = c(() => {
40
+ const g = typeof s == "number" ? t.value.length * s : t.value.reduce((h, v, y) => h + s(y), 0), O = typeof s == "number" ? a.value * s : t.value.slice(0, a.value).reduce((h, v, y) => h + s(y), 0);
39
41
  return {
40
42
  style: {
41
- marginTop: `${C}px`,
42
- height: `${g - C}px`
43
+ marginTop: `${O}px`,
44
+ height: `${g - O}px`
43
45
  }
44
46
  };
45
- }), L = () => {
46
- const g = (n == null ? void 0 : n.value) ?? 0, C = Math.max(o.value.scrollTop - g, 0);
47
- if (typeof l == "number")
48
- return Math.floor(C / l);
49
- let S = 0, _ = 0;
47
+ }), I = () => {
48
+ const g = (n == null ? void 0 : n.value) ?? 0, O = Math.max(o.value.scrollTop - g, 0);
49
+ if (typeof s == "number")
50
+ return Math.floor(O / s);
51
+ let h = 0, v = 0;
50
52
  for (let y = 0; y < t.value.length; y += 1) {
51
- const I = l(y);
52
- if (S += I, S >= C) {
53
- _ = y;
53
+ const R = s(y);
54
+ if (h += R, h >= O) {
55
+ v = y;
54
56
  break;
55
57
  }
56
58
  }
57
- return _;
58
- }, f = () => {
59
- if (u.value = o.value.clientHeight, typeof l == "number")
60
- return Math.ceil(u.value / l);
59
+ return v;
60
+ }, d = () => {
61
+ if (u.value = o.value.clientHeight, typeof s == "number")
62
+ return Math.ceil(u.value / s);
61
63
  const g = a.value ?? 0;
62
- let C = 0, S = 0;
63
- for (let _ = g; _ < t.value.length; _ += 1) {
64
- const y = l(_);
65
- if (C += y, S = _, C > u.value)
64
+ let O = 0, h = 0;
65
+ for (let v = g; v < t.value.length; v += 1) {
66
+ const y = s(v);
67
+ if (O += y, h = v, O > u.value)
66
68
  break;
67
69
  }
68
- return S - g;
69
- }, E = () => {
70
+ return h - g;
71
+ }, x = () => {
70
72
  if (o.value) {
71
- const g = f();
72
- a.value = L(), d.value = Math.min(a.value + g + s, t.value.length), m.value = t.value.slice(a.value, d.value);
73
+ const g = d();
74
+ a.value = I(), b.value = Math.min(a.value + g + l, t.value.length), m.value = t.value.slice(a.value, b.value);
73
75
  }
74
- }, B = () => {
75
- E();
76
+ }, E = () => {
77
+ x();
76
78
  };
77
79
  e || (Z(() => {
78
- o.value && (u.value = o.value.clientHeight, x = Se(o.value, ({ clientHeight: g }) => {
79
- u.value = g, E();
80
- }), E());
80
+ o.value && (u.value = o.value.clientHeight, S = Ce(o.value, ({ clientHeight: g }) => {
81
+ u.value = g, x();
82
+ }), x());
81
83
  }), _e(() => {
82
- x == null || x.disconnect();
84
+ S == null || S.disconnect();
83
85
  }), ee(
84
86
  () => t.value,
85
87
  () => {
86
- E();
88
+ x();
87
89
  }
88
90
  ));
89
- const A = {
91
+ const B = {
90
92
  ref: o,
91
93
  style: { overflowY: "auto" }
92
94
  };
93
95
  return e ? {
94
96
  containerRef: o,
95
- containerProps: A,
97
+ containerProps: B,
96
98
  // eslint-disable-next-line @typescript-eslint/no-empty-function
97
99
  onScroll: () => {
98
100
  },
99
101
  list: t
100
102
  } : {
101
103
  containerRef: o,
102
- containerProps: A,
103
- onScroll: B,
104
+ containerProps: B,
105
+ onScroll: E,
104
106
  list: m,
105
- wrapperProps: O
107
+ wrapperProps: A
106
108
  };
107
109
  }
108
- var i = /* @__PURE__ */ ((t) => (t.SELECT = "select", t.SHOW_MORE = "show-more", t.ESCAPE = "escape-pressed", t.CLICK = "click", t.ENTER = "enter-pressed", t.SPACE = "space-pressed", t.TAB = "tab-pressed", t.CLOSE_DROPDOWN = "close-dropdown", t))(i || {}), $ = /* @__PURE__ */ ((t) => (t.AUTOMATIC = "automatic", t.BUTTON = "button", t.NONE = "none", t))($ || {});
109
- const Ce = N({
110
+ var i = /* @__PURE__ */ ((t) => (t.SELECT = "select", t.SHOW_MORE = "show-more", t.ESCAPE = "escape-pressed", t.CLICK = "click", t.ENTER = "enter-pressed", t.SPACE = "space-pressed", t.TAB = "tab-pressed", t.CLOSE_DROPDOWN = "close-dropdown", t))(i || {}), w = /* @__PURE__ */ ((t) => (t.AUTOMATIC = "automatic", t.BUTTON = "button", t.NONE = "none", t))(w || {});
111
+ const he = D({
110
112
  name: "bento-listbox-static-category",
111
113
  components: {
112
- BentoTypography: w
114
+ BentoTypography: $
113
115
  },
114
116
  props: {
115
117
  /**
@@ -121,12 +123,12 @@ const Ce = N({
121
123
  }
122
124
  }
123
125
  });
124
- var he = function() {
125
- var e = this, l = e._self._c;
126
- return e._self._setupProxy, l("div", { staticClass: "b-listbox-single-select-category" }, [l("bento-typography", { staticClass: "b-listbox-single-select-category__label-text", attrs: { variant: "caption", el: "span" } }, [e._v(" " + e._s(e.categoryLabel) + " ")]), l("div", [e._t("default")], 2)], 1);
127
- }, Te = [], Oe = /* @__PURE__ */ P(
128
- Ce,
126
+ var Oe = function() {
127
+ var e = this, s = e._self._c;
128
+ return e._self._setupProxy, s("div", { staticClass: "b-listbox-single-select-category" }, [s("bento-typography", { staticClass: "b-listbox-single-select-category__label-text", attrs: { variant: "caption", el: "span" } }, [e._v(" " + e._s(e.categoryLabel) + " ")]), s("div", [e._t("default")], 2)], 1);
129
+ }, Te = [], Le = /* @__PURE__ */ N(
129
130
  he,
131
+ Oe,
130
132
  Te,
131
133
  !1,
132
134
  null,
@@ -134,7 +136,7 @@ var he = function() {
134
136
  null,
135
137
  null
136
138
  );
137
- const Le = Oe.exports, Ae = N({
139
+ const Ae = Le.exports, Ie = D({
138
140
  name: "bento-listbox-option",
139
141
  props: {
140
142
  /**
@@ -148,7 +150,7 @@ const Le = Oe.exports, Ae = N({
148
150
  },
149
151
  emits: [i.CLICK, i.ENTER, i.SPACE, i.TAB],
150
152
  setup(t, { emit: e }) {
151
- const l = c(() => ({
153
+ const s = c(() => ({
152
154
  "b-listbox-option--disabled": t.disabled,
153
155
  "b-listbox-option--selected": t.selected
154
156
  }));
@@ -157,7 +159,7 @@ const Le = Oe.exports, Ae = N({
157
159
  BentoKeyboardNavigationKeyDownEvent: k,
158
160
  BentoListboxEvent: i,
159
161
  // Values
160
- conditionalClasses: l,
162
+ conditionalClasses: s,
161
163
  // Events
162
164
  onClick: (o) => {
163
165
  e(i.CLICK, o);
@@ -168,31 +170,31 @@ const Le = Oe.exports, Ae = N({
168
170
  };
169
171
  }
170
172
  });
171
- var Ie = function() {
172
- var e = this, l = e._self._c;
173
- return e._self._setupProxy, l("label", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(s) {
174
- return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.onOptionSelected(e.BentoListboxEvent.ENTER, s);
175
- }, function(s) {
176
- return !s.type.indexOf("key") && e._k(s.keyCode, "space", 32, s.key, [" ", "Spacebar"]) ? null : e.onOptionSelected(e.BentoListboxEvent.SPACE, s);
177
- }, function(s) {
178
- return !s.type.indexOf("key") && e._k(s.keyCode, "tab", 9, s.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, s);
173
+ var Be = function() {
174
+ var e = this, s = e._self._c;
175
+ return e._self._setupProxy, s("label", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(l) {
176
+ return !l.type.indexOf("key") && e._k(l.keyCode, "enter", 13, l.key, "Enter") ? null : e.onOptionSelected(e.BentoListboxEvent.ENTER, l);
177
+ }, function(l) {
178
+ return !l.type.indexOf("key") && e._k(l.keyCode, "space", 32, l.key, [" ", "Spacebar"]) ? null : e.onOptionSelected(e.BentoListboxEvent.SPACE, l);
179
+ }, function(l) {
180
+ return !l.type.indexOf("key") && e._k(l.keyCode, "tab", 9, l.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, l);
179
181
  }] } }, "label", e.$attrs, !1), [e._t("default")], 2);
180
- }, Be = [], Re = /* @__PURE__ */ P(
181
- Ae,
182
+ }, Re = [], ke = /* @__PURE__ */ N(
182
183
  Ie,
183
184
  Be,
185
+ Re,
184
186
  !1,
185
187
  null,
186
188
  "d7fb415c",
187
189
  null,
188
190
  null
189
191
  );
190
- const V = Re.exports, ke = N({
192
+ const W = ke.exports, De = D({
191
193
  name: "bento-listbox-single-select-option",
192
194
  components: {
193
- BentoListboxOption: V,
194
- BentoTypography: w,
195
- CheckmarkIcon: ge
195
+ BentoListboxOption: W,
196
+ BentoTypography: $,
197
+ CheckmarkIcon: fe
196
198
  },
197
199
  props: {
198
200
  /**
@@ -214,51 +216,51 @@ const V = Re.exports, ke = N({
214
216
  },
215
217
  emits: [i.ENTER, i.SELECT, i.SPACE, i.TAB],
216
218
  setup(t, { emit: e }) {
217
- const l = (m) => {
219
+ const s = (m) => {
218
220
  t.disabled || e(m, t.option.value);
219
- }, s = c(() => t.disabled ? !0 : null), n = c(() => t.selected ? !0 : null), o = c(() => t.disabled ? -1 : 0);
221
+ }, l = c(() => t.disabled ? !0 : null), n = c(() => t.selected ? !0 : null), o = c(() => t.disabled ? -1 : 0);
220
222
  return {
221
223
  // Values
222
- ariaDisabled: s,
224
+ ariaDisabled: l,
223
225
  ariaSelected: n,
224
226
  tabIndex: o,
225
227
  // Enums
226
228
  BentoListboxEvent: i,
227
229
  // Events
228
- onOptionSelected: l
230
+ onOptionSelected: s
229
231
  };
230
232
  }
231
233
  });
232
- var De = function() {
233
- var e = this, l = e._self._c;
234
- return e._self._setupProxy, l("bento-listbox-option", { staticClass: "b-listbox-single-select-option", attrs: { disabled: e.disabled, selected: e.selected, "aria-selected": e.ariaSelected, "aria-disabled": e.ariaDisabled, tabindex: e.tabIndex }, on: e._d({ click: function(s) {
234
+ var Ne = function() {
235
+ var e = this, s = e._self._c;
236
+ return e._self._setupProxy, s("bento-listbox-option", { staticClass: "b-listbox-single-select-option", attrs: { disabled: e.disabled, selected: e.selected, "aria-selected": e.ariaSelected, "aria-disabled": e.ariaDisabled, tabindex: e.tabIndex }, on: e._d({ click: function(l) {
235
237
  return e.onOptionSelected(e.BentoListboxEvent.SELECT);
236
- } }, [e.BentoListboxEvent.ENTER, function(s) {
238
+ } }, [e.BentoListboxEvent.ENTER, function(l) {
237
239
  return e.onOptionSelected(e.BentoListboxEvent.ENTER);
238
- }, e.BentoListboxEvent.SPACE, function(s) {
240
+ }, e.BentoListboxEvent.SPACE, function(l) {
239
241
  return e.onOptionSelected(e.BentoListboxEvent.SPACE);
240
- }, e.BentoListboxEvent.TAB, function(s) {
242
+ }, e.BentoListboxEvent.TAB, function(l) {
241
243
  return e.onOptionSelected(e.BentoListboxEvent.TAB);
242
244
  }]) }, [e._t("default", function() {
243
- return [l("span", { staticClass: "b-listbox-single-select-option__text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.option.label))]), e.option.description ? l("bento-typography", { staticClass: "b-listbox-single-select-option__description", attrs: { el: "span" } }, [e._v(" " + e._s(e.option.description) + " ")]) : e._e()], 1)];
244
- }, null, e.option), l("span", { staticClass: "b-listbox-single-select-option__check-icon" }, [l("checkmark-icon", { directives: [{ name: "show", rawName: "v-show", value: e.selected, expression: "selected" }], attrs: { "svg-title": "selected" } })], 1)], 2);
245
- }, Ne = [], Pe = /* @__PURE__ */ P(
246
- ke,
245
+ return [s("span", { staticClass: "b-listbox-single-select-option__text" }, [s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.option.label))]), e.option.description ? s("bento-typography", { staticClass: "b-listbox-single-select-option__description", attrs: { el: "span" } }, [e._v(" " + e._s(e.option.description) + " ")]) : e._e()], 1)];
246
+ }, null, e.option), s("span", { staticClass: "b-listbox-single-select-option__check-icon" }, [s("checkmark-icon", { directives: [{ name: "show", rawName: "v-show", value: e.selected, expression: "selected" }], attrs: { "svg-title": "selected" } })], 1)], 2);
247
+ }, Pe = [], $e = /* @__PURE__ */ N(
247
248
  De,
248
249
  Ne,
250
+ Pe,
249
251
  !1,
250
252
  null,
251
253
  "092ed5ee",
252
254
  null,
253
255
  null
254
256
  );
255
- const Me = Pe.exports, se = ({ items: t, isOptionDisabled: e }, l) => {
256
- const s = c(() => t.value.length - 1), n = T(0);
257
+ const Me = $e.exports, se = ({ items: t, isOptionDisabled: e }, s) => {
258
+ const l = c(() => t.value.length - 1), n = L(0);
257
259
  Z(() => {
258
- e && (n.value = t.value.findIndex((f) => !e(f)));
260
+ e && (n.value = t.value.findIndex((d) => !e(d)));
259
261
  });
260
- const o = (f) => !e || !!e && e(t.value[f]), m = (f) => !e || !!e && !e(t.value[f]), a = (f) => {
261
- switch (f) {
262
+ const o = (d) => !e || !!e && e(t.value[d]), m = (d) => !e || !!e && !e(t.value[d]), a = (d) => {
263
+ switch (d) {
262
264
  case "increase":
263
265
  n.value += 1;
264
266
  break;
@@ -266,45 +268,49 @@ const Me = Pe.exports, se = ({ items: t, isOptionDisabled: e }, l) => {
266
268
  n.value -= 1;
267
269
  break;
268
270
  }
269
- }, d = ({ edgeCaseItem: f, isItemBeforeEdgeCaseItem: E }, B, A) => {
270
- n.value !== f && (E ? m(f) && a(A) : (a(A), o(n.value) && B()), l(n.value));
271
- }, u = () => {
272
- const f = n.value === s.value - 2;
273
- d(
271
+ }, b = ({ edgeCaseItem: d, isItemBeforeEdgeCaseItem: x }, E, B) => {
272
+ n.value !== d && (x ? m(d) && a(B) : (a(B), o(n.value) && E()), s(n.value));
273
+ }, u = (d) => {
274
+ var E;
275
+ (E = d == null ? void 0 : d.detail) == null || E.preventDefault();
276
+ const x = n.value === l.value - 2;
277
+ b(
274
278
  {
275
- isItemBeforeEdgeCaseItem: f,
276
- edgeCaseItem: s.value
279
+ isItemBeforeEdgeCaseItem: x,
280
+ edgeCaseItem: l.value
277
281
  },
278
282
  u,
279
283
  "increase"
280
284
  /* INCREASE */
281
285
  );
282
- }, x = () => {
283
- const f = n.value === 1;
284
- d(
286
+ }, S = (d) => {
287
+ var E;
288
+ (E = d == null ? void 0 : d.detail) == null || E.preventDefault();
289
+ const x = n.value === 1;
290
+ b(
285
291
  {
286
292
  edgeCaseItem: 0,
287
- isItemBeforeEdgeCaseItem: f
293
+ isItemBeforeEdgeCaseItem: x
288
294
  },
289
- x,
295
+ S,
290
296
  "decrease"
291
297
  /* DECREASE */
292
298
  );
293
299
  };
294
300
  return {
295
301
  moveToFirstElement: () => {
296
- n.value = 0, o(n.value) ? u() : l(n.value);
302
+ n.value = 0, o(n.value) ? u() : s(n.value);
297
303
  },
298
304
  moveToLastElement: () => {
299
- n.value = s.value, o(n.value) ? x() : l(n.value);
305
+ n.value = l.value, o(n.value) ? S() : s(n.value);
300
306
  },
301
307
  moveToNextElement: u,
302
- moveToPreviousElement: x
308
+ moveToPreviousElement: S
303
309
  };
304
- }, $e = N({
310
+ }, we = D({
305
311
  name: "bento-listbox-single-select",
306
312
  components: {
307
- BentoListboxSingleSelectCategory: Le,
313
+ BentoListboxSingleSelectCategory: Ae,
308
314
  BentoListboxSingleSelectOption: Me
309
315
  },
310
316
  directives: { BentoKeyboardNavigationDirective: H },
@@ -349,21 +355,21 @@ const Me = Pe.exports, se = ({ items: t, isOptionDisabled: e }, l) => {
349
355
  staticCategories: { type: Boolean, default: !1 }
350
356
  },
351
357
  emits: [i.SELECT, i.ENTER, i.SPACE, i.TAB],
352
- setup(t, { emit: e, slots: l }) {
353
- const s = T([]), n = c(() => !!t.items.find(({ items: f }) => !!f)), o = (f) => (E) => {
354
- e(f, E);
355
- }, m = (f) => s.value[f].$el.focus(), { moveToNextElement: a, moveToPreviousElement: d, moveToFirstElement: u, moveToLastElement: x } = se(
358
+ setup(t, { emit: e, slots: s }) {
359
+ const l = L([]), n = c(() => !!t.items.find(({ items: d }) => !!d)), o = (d) => (x) => {
360
+ e(d, x);
361
+ }, m = (d) => l.value[d].$el.focus(), { moveToNextElement: a, moveToPreviousElement: b, moveToFirstElement: u, moveToLastElement: S } = se(
356
362
  {
357
- items: Y(t, "items"),
363
+ items: V(t, "items"),
358
364
  isOptionDisabled: t.isOptionDisabled
359
365
  },
360
366
  m
361
- ), O = {
362
- [k.ARROW_UP]: d,
367
+ ), A = {
368
+ [k.ARROW_UP]: b,
363
369
  [k.ARROW_DOWN]: a,
364
370
  [k.HOME]: u,
365
- [k.END]: x
366
- }, L = {
371
+ [k.END]: S
372
+ }, I = {
367
373
  [i.SELECT]: o(i.SELECT),
368
374
  [i.SPACE]: o(i.SPACE),
369
375
  [i.TAB]: o(i.TAB),
@@ -373,38 +379,38 @@ const Me = Pe.exports, se = ({ items: t, isOptionDisabled: e }, l) => {
373
379
  // Enums
374
380
  BentoListboxEvent: i,
375
381
  // Values
376
- listboxItemRef: s,
377
- slots: l,
382
+ listboxItemRef: l,
383
+ slots: s,
378
384
  // Computed
379
385
  hasCategories: n,
380
386
  // Methods
381
387
  onOptionSelected: o,
382
388
  // Keyboard navigation
383
- listboxListeners: O,
384
- listboxOptionListeners: L
389
+ listboxListeners: A,
390
+ listboxOptionListeners: I
385
391
  };
386
392
  }
387
393
  });
388
- var we = function() {
389
- var e = this, l = e._self._c;
390
- return e._self._setupProxy, l("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }] }, e.listboxListeners), [e.hasCategories && e.staticCategories ? e._l(e.items, function(s) {
391
- return l("bento-listbox-single-select-category", { key: s.value, attrs: { "category-label": s.label, role: "group" } }, e._l(s.items, function(n) {
392
- return l("bento-listbox-single-select-option", e._g({ key: n.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: n, disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null, selected: n.value === e.selectedValue }, scopedSlots: e._u([e._l(e.slots, function(o, m) {
394
+ var Fe = function() {
395
+ var e = this, s = e._self._c;
396
+ return e._self._setupProxy, s("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }] }, e.listboxListeners), [e.hasCategories && e.staticCategories ? e._l(e.items, function(l) {
397
+ return s("bento-listbox-single-select-category", { key: l.value, attrs: { "category-label": l.label, role: "group" } }, e._l(l.items, function(n) {
398
+ return s("bento-listbox-single-select-option", e._g({ key: n.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: n, disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null, selected: n.value === e.selectedValue }, scopedSlots: e._u([e._l(e.slots, function(o, m) {
393
399
  return { key: m, fn: function(a) {
394
400
  return [e._t(m, null, null, a)];
395
401
  } };
396
402
  })], null, !0) }, e.listboxOptionListeners));
397
403
  }), 1);
398
- }) : e._l(e.items, function(s) {
399
- return l("bento-listbox-single-select-option", e._g({ key: s.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: s, disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null, selected: s.value === e.selectedValue }, scopedSlots: e._u([e._l(e.slots, function(n, o) {
404
+ }) : e._l(e.items, function(l) {
405
+ return s("bento-listbox-single-select-option", e._g({ key: l.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: l, disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null, selected: l.value === e.selectedValue }, scopedSlots: e._u([e._l(e.slots, function(n, o) {
400
406
  return { key: o, fn: function(m) {
401
407
  return [e._t(o, null, null, m)];
402
408
  } };
403
409
  })], null, !0) }, e.listboxOptionListeners));
404
410
  })], 2);
405
- }, Ge = [], Fe = /* @__PURE__ */ P(
406
- $e,
411
+ }, Ge = [], Ue = /* @__PURE__ */ N(
407
412
  we,
413
+ Fe,
408
414
  Ge,
409
415
  !1,
410
416
  null,
@@ -412,22 +418,22 @@ var we = function() {
412
418
  null,
413
419
  null
414
420
  );
415
- const Ue = Fe.exports;
416
- var q = /* @__PURE__ */ ((t) => (t.DISABLED = "disabled", t.STATIC_CATEGORY = "static-category", t))(q || {}), U = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.UNSELECT_CATEGORY = "unselect-category", t))(U || {});
417
- const Ye = {
421
+ const Ye = Ue.exports;
422
+ var j = /* @__PURE__ */ ((t) => (t.DISABLED = "disabled", t.STATIC_CATEGORY = "static-category", t))(j || {}), Y = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.UNSELECT_CATEGORY = "unselect-category", t))(Y || {});
423
+ const Ve = {
418
424
  "en-US": {
419
425
  categoryClosed: "{category} closed",
420
426
  categoryOpened: "{category} opened"
421
427
  }
422
- }, Ve = N({
423
- i18n: { messages: Ye },
428
+ }, ze = D({
429
+ i18n: { messages: Ve },
424
430
  name: "bento-listbox-multi-select-category",
425
431
  components: {
426
432
  BentoCheckbox: X,
427
- BentoTypography: w,
428
- BentoListboxOption: V,
429
- ChevronDownIcon: ye,
430
- ChevronUpIcon: pe
433
+ BentoTypography: $,
434
+ BentoListboxOption: W,
435
+ ChevronDownIcon: ge,
436
+ ChevronUpIcon: ye
431
437
  },
432
438
  props: {
433
439
  /**
@@ -468,94 +474,94 @@ const Ye = {
468
474
  */
469
475
  staticCategories: { type: Boolean, default: !1 }
470
476
  },
471
- emits: [U.SELECT_CATEGORY, U.UNSELECT_CATEGORY],
477
+ emits: [Y.SELECT_CATEGORY, Y.UNSELECT_CATEGORY],
472
478
  setup(t, { emit: e }) {
473
- const l = T(!1), { t: s } = j(), n = (_) => t.isOptionDisabled ? t.isOptionDisabled(_) : !1, o = c(
474
- () => t.category.items.every((_) => n(_))
475
- ), m = Y(t, "staticCategories"), a = c(() => l.value || t.staticCategories), d = c(() => ({
476
- [`b-listbox-multi-select-category--${q.DISABLED}`]: o.value,
477
- [`b-listbox-multi-select-category--${q.STATIC_CATEGORY}`]: t.staticCategories
478
- })), u = (_) => {
479
- _.preventDefault(), l.value = !l.value;
480
- }, x = (_) => {
479
+ const s = L(!1), { t: l } = z(), n = (v) => t.isOptionDisabled ? t.isOptionDisabled(v) : !1, o = c(
480
+ () => t.category.items.every((v) => n(v))
481
+ ), m = V(t, "staticCategories"), a = c(() => s.value || t.staticCategories), b = c(() => ({
482
+ [`b-listbox-multi-select-category--${j.DISABLED}`]: o.value,
483
+ [`b-listbox-multi-select-category--${j.STATIC_CATEGORY}`]: t.staticCategories
484
+ })), u = (v) => {
485
+ v.preventDefault(), s.value = !s.value;
486
+ }, S = (v) => {
481
487
  var M;
482
- const y = n(_), I = ((M = t.selectedItemsList) == null ? void 0 : M.includes(_.value)) || !1;
483
- return { isDisabled: y, isPreSelected: I };
484
- }, O = c(
485
- () => t.category.items.filter((_) => {
486
- const { isDisabled: y, isPreSelected: I } = x(_);
487
- return y && I || !y;
488
+ const y = n(v), R = ((M = t.selectedItemsList) == null ? void 0 : M.includes(v.value)) || !1;
489
+ return { isDisabled: y, isPreSelected: R };
490
+ }, A = c(
491
+ () => t.category.items.filter((v) => {
492
+ const { isDisabled: y, isPreSelected: R } = S(v);
493
+ return y && R || !y;
488
494
  })
489
- ), L = c(
495
+ ), I = c(
490
496
  () => {
491
- var _;
492
- return (_ = O.value) == null ? void 0 : _.filter(
497
+ var v;
498
+ return (v = A.value) == null ? void 0 : v.filter(
493
499
  ({ value: y }) => {
494
- var I;
495
- return (I = t.selectedItemsList) == null ? void 0 : I.includes(y);
500
+ var R;
501
+ return (R = t.selectedItemsList) == null ? void 0 : R.includes(y);
496
502
  }
497
503
  );
498
504
  }
499
- ), f = c(() => {
500
- const _ = l.value ? "categoryOpened" : "categoryClosed";
501
- return s(_, { category: t.category.label });
502
- }), E = c(
505
+ ), d = c(() => {
506
+ const v = s.value ? "categoryOpened" : "categoryClosed";
507
+ return l(v, { category: t.category.label });
508
+ }), x = c(
503
509
  () => ({
504
510
  el: "span",
505
511
  variant: t.staticCategories ? "caption" : "body"
506
512
  })
507
- ), B = () => {
508
- e(U.SELECT_CATEGORY);
509
- }, A = () => {
510
- e(U.UNSELECT_CATEGORY);
511
- }, { isAllSelected: g, isIndeterminate: C, toggleSelectAll: S } = te(
512
- L,
513
- O,
514
- B,
515
- A
513
+ ), E = () => {
514
+ e(Y.SELECT_CATEGORY);
515
+ }, B = () => {
516
+ e(Y.UNSELECT_CATEGORY);
517
+ }, { isAllSelected: g, isIndeterminate: O, toggleSelectAll: h } = te(
518
+ I,
519
+ A,
520
+ E,
521
+ B
516
522
  );
517
523
  return {
518
524
  // Values
519
- chevronTitle: f,
520
- conditionalClass: d,
525
+ chevronTitle: d,
526
+ conditionalClass: b,
521
527
  hasAllPropsDisabled: o,
522
- isOpen: l,
528
+ isOpen: s,
523
529
  isAllSelected: g,
524
- isIndeterminate: C,
530
+ isIndeterminate: O,
525
531
  isStaticCategory: m,
526
532
  // Computed
527
533
  showItemChildren: a,
528
- categoryLabelProps: E,
534
+ categoryLabelProps: x,
529
535
  // Methods
530
536
  toggleOpen: u,
531
- toggleSelectAll: S
537
+ toggleSelectAll: h
532
538
  };
533
539
  }
534
540
  });
535
- var ze = function() {
536
- var e = this, l = e._self._c;
537
- return e._self._setupProxy, l("div", [l("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass }, [e.isStaticCategory ? e._e() : l("bento-checkbox", { attrs: { "model-value": e.isAllSelected, indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, "aria-label": e.category.label, value: e.category.value }, on: { "update:model-value": e.toggleSelectAll } }), l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", e._b({ staticClass: "b-listbox-multi-select-category__label-text" }, "bento-typography", e.categoryLabelProps, !1), [e._v(" " + e._s(e.category.label) + " ")]), e.isStaticCategory ? e._e() : l("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "data-testid": "toggle-listbox" }, on: { "!click": function(s) {
541
+ var We = function() {
542
+ var e = this, s = e._self._c;
543
+ return e._self._setupProxy, s("div", [s("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass }, [e.isStaticCategory ? e._e() : s("bento-checkbox", { attrs: { "model-value": e.isAllSelected, indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, "aria-label": e.category.label, value: e.category.value }, on: { "update:model-value": e.toggleSelectAll } }), s("span", { staticClass: "b-listbox-multi-select-category__label" }, [s("bento-typography", e._b({ staticClass: "b-listbox-multi-select-category__label-text" }, "bento-typography", e.categoryLabelProps, !1), [e._v(" " + e._s(e.category.label) + " ")]), e.isStaticCategory ? e._e() : s("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "data-testid": "toggle-listbox" }, on: { "!click": function(l) {
538
544
  return e.toggleOpen.apply(null, arguments);
539
- } } }, [e.isOpen ? l("chevron-up-icon", { attrs: { "svg-title": e.chevronTitle } }) : l("chevron-down-icon", { attrs: { "svg-title": e.chevronTitle } })], 1)], 1)], 1), l("div", { directives: [{ name: "show", rawName: "v-show", value: e.showItemChildren, expression: "showItemChildren" }] }, [e._t("default")], 2)], 1);
540
- }, We = [], Ke = /* @__PURE__ */ P(
541
- Ve,
545
+ } } }, [e.isOpen ? s("chevron-up-icon", { attrs: { "svg-title": e.chevronTitle } }) : s("chevron-down-icon", { attrs: { "svg-title": e.chevronTitle } })], 1)], 1)], 1), s("div", { directives: [{ name: "show", rawName: "v-show", value: e.showItemChildren, expression: "showItemChildren" }] }, [e._t("default")], 2)], 1);
546
+ }, qe = [], Ke = /* @__PURE__ */ N(
542
547
  ze,
543
548
  We,
549
+ qe,
544
550
  !1,
545
551
  null,
546
552
  "f360ac3d",
547
553
  null,
548
554
  null
549
555
  );
550
- const qe = Ke.exports;
551
- var D = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", t.UNSELECT_CATEGORY = "unselect-category", t))(D || {});
552
- const je = N({
556
+ const je = Ke.exports;
557
+ var P = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", t.UNSELECT_CATEGORY = "unselect-category", t))(P || {});
558
+ const He = D({
553
559
  name: "listbox-multi-select-options",
554
560
  components: {
555
561
  BentoCheckbox: X,
556
- BentoListboxOption: V,
557
- BentoTypography: w,
558
- ListboxMultiSelectCategory: qe
562
+ BentoListboxOption: W,
563
+ BentoTypography: $,
564
+ ListboxMultiSelectCategory: je
559
565
  },
560
566
  props: {
561
567
  /**
@@ -613,20 +619,20 @@ const je = N({
613
619
  staticCategories: { type: Boolean, default: !1 }
614
620
  },
615
621
  emits: [
616
- D.TOGGLE_CHECKBOX_SELECTION,
617
- D.SELECT_CATEGORY,
618
- D.UNSELECT_CATEGORY
622
+ P.TOGGLE_CHECKBOX_SELECTION,
623
+ P.SELECT_CATEGORY,
624
+ P.UNSELECT_CATEGORY
619
625
  ],
620
626
  setup(t, { emit: e }) {
621
- const l = (d) => {
622
- e(D.TOGGLE_CHECKBOX_SELECTION, d);
623
- }, s = (d) => !!d.items, n = (d) => {
627
+ const s = (b) => {
628
+ e(P.TOGGLE_CHECKBOX_SELECTION, b);
629
+ }, l = (b) => !!b.items, n = (b) => {
624
630
  const u = t.isMultiLevel && t.searching;
625
- return d.description && (!t.isMultiLevel || u);
626
- }, o = (d) => d.items ? !!d.items.find((u) => t.selectedItemsList.includes(u.value)) : t.selectedItemsList.includes(d.value), m = (d, u) => {
627
- if (s(u))
628
- return e(d ? D.SELECT_CATEGORY : D.UNSELECT_CATEGORY, u);
629
- l(u.value);
631
+ return b.description && (!t.isMultiLevel || u);
632
+ }, o = (b) => b.items ? !!b.items.find((u) => t.selectedItemsList.includes(u.value)) : t.selectedItemsList.includes(b.value), m = (b, u) => {
633
+ if (l(u))
634
+ return e(b ? P.SELECT_CATEGORY : P.UNSELECT_CATEGORY, u);
635
+ s(u.value);
630
636
  };
631
637
  return {
632
638
  // Values
@@ -635,68 +641,123 @@ const je = N({
635
641
  "b-listbox-multi-select-options__category-option": t.categoryItems
636
642
  })),
637
643
  // Methods
638
- isCategory: s,
644
+ isCategory: l,
639
645
  isOptionSelected: o,
640
646
  shouldShowDescription: n,
641
- toggleCheckboxSelection: l,
647
+ toggleCheckboxSelection: s,
642
648
  selectSearch: m,
643
649
  // Enums
644
650
  BentoListboxEvent: i,
645
- ListboxMultiSelectOptionsEvent: D
651
+ ListboxMultiSelectOptionsEvent: P
646
652
  };
647
653
  }
648
654
  });
649
- var He = function() {
650
- var e = this, l = e._self._c;
651
- return e._self._setupProxy, l("div", e._l(e.items, function(s) {
652
- return l("div", { key: `selected-${s.value}` }, [e.searching && e.isMultiLevel ? [l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null } }, [l("bento-checkbox", { attrs: { "model-value": e.isOptionSelected(s), "aria-label": s.label, disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null, value: s.value }, on: { "update:model-value": (n) => e.selectSearch(n, s) } }), e._t("default", function() {
653
- return [l("span", { staticClass: "b-listbox-multi-select__option-text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(s.label))]), e.shouldShowDescription(s) ? l("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(s.description) + " ")]) : e._e()], 1)];
654
- }, null, s)], 2)] : [s.items ? [l("listbox-multi-select-category", { attrs: { category: s, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled, "selected-items-list": e.selectedItemsList }, on: { "select-category": function(n) {
655
- return e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, s);
655
+ var Xe = function() {
656
+ var e = this, s = e._self._c;
657
+ return e._self._setupProxy, s("div", e._l(e.items, function(l) {
658
+ return s("div", { key: `selected-${l.value}` }, [e.searching && e.isMultiLevel ? [s("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null } }, [s("bento-checkbox", { attrs: { "model-value": e.isOptionSelected(l), "aria-label": l.label, disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null, value: l.value }, on: { "update:model-value": (n) => e.selectSearch(n, l) } }), e._t("default", function() {
659
+ return [s("span", { staticClass: "b-listbox-multi-select__option-text" }, [s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(l.label))]), e.shouldShowDescription(l) ? s("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(l.description) + " ")]) : e._e()], 1)];
660
+ }, null, l)], 2)] : [l.items ? [s("listbox-multi-select-category", { attrs: { category: l, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled, "selected-items-list": e.selectedItemsList }, on: { "select-category": function(n) {
661
+ return e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, l);
656
662
  }, "unselect-category": function(n) {
657
- return e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, s);
658
- } } }, [l("listbox-multi-select-options", { attrs: { "category-items": "", items: s.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": e.isMultiLevel, "static-categories": e.staticCategories, "selected-items-list": e.selectedItemsList, searching: e.searching }, on: { "toggle-checkbox-selection": (n) => e.toggleCheckboxSelection(n) } })], 1)] : l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null } }, [l("bento-checkbox", { attrs: { "model-value": e.selectedItemsList, "aria-label": s.label, disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null, value: s.value }, on: { "update:model-value": function(n) {
659
- return e.toggleCheckboxSelection(s.value);
663
+ return e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, l);
664
+ } } }, [s("listbox-multi-select-options", { attrs: { "category-items": "", items: l.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": e.isMultiLevel, "static-categories": e.staticCategories, "selected-items-list": e.selectedItemsList, searching: e.searching }, on: { "toggle-checkbox-selection": (n) => e.toggleCheckboxSelection(n) } })], 1)] : s("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null } }, [s("bento-checkbox", { attrs: { "model-value": e.selectedItemsList, "aria-label": l.label, disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null, value: l.value }, on: { "update:model-value": function(n) {
665
+ return e.toggleCheckboxSelection(l.value);
660
666
  } } }), e._t("default", function() {
661
- return [l("span", { staticClass: "b-listbox-multi-select__option-text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(s.label))]), e.shouldShowDescription(s) ? l("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(s.description) + " ")]) : e._e()], 1)];
662
- }, null, s)], 2)]], 2);
667
+ return [s("span", { staticClass: "b-listbox-multi-select__option-text" }, [s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(l.label))]), e.shouldShowDescription(l) ? s("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(l.description) + " ")]) : e._e()], 1)];
668
+ }, null, l)], 2)]], 2);
663
669
  }), 0);
664
- }, Xe = [], Je = /* @__PURE__ */ P(
665
- je,
670
+ }, Je = [], Qe = /* @__PURE__ */ N(
666
671
  He,
667
672
  Xe,
673
+ Je,
668
674
  !1,
669
675
  null,
670
676
  "c9b2c61d",
671
677
  null,
672
678
  null
673
679
  );
674
- const Qe = Je.exports, Ze = {
680
+ const Ze = Qe.exports, et = {
681
+ "en-US": {
682
+ remove: "Remove"
683
+ }
684
+ }, tt = {
685
+ i18n: { messages: et }
686
+ }, st = /* @__PURE__ */ D({
687
+ ...tt,
688
+ __name: "listbox-multi-select-chips",
689
+ props: {
690
+ /**
691
+ * Function that defines the options to be disabled
692
+ */
693
+ isOptionDisabled: {
694
+ type: Function,
695
+ default: () => !1
696
+ },
697
+ /**
698
+ * The option elements to populate the listbox with.
699
+ * It must be an array of {@see BentoListboxOptionItem }.
700
+ *
701
+ * @property {string} value.label - Text to be displayed in the option
702
+ * @property {string,number} value.value - Value of the option
703
+ */
704
+ items: {
705
+ type: Array,
706
+ required: !0
707
+ }
708
+ },
709
+ emits: ["unselect-item", "unselect-category"],
710
+ setup(t, { emit: e }) {
711
+ const { t: s } = z();
712
+ return { __sfc: !0, emit: e, t: s, unselectOption: (n) => n.items ? e("unselect-category", n) : e("unselect-item", n.value), BentoTypography: $, BaseButton: pe, CrossSmallIcon: xe };
713
+ }
714
+ });
715
+ var lt = function() {
716
+ var e = this, s = e._self._c, l = e._self._setupProxy;
717
+ return s("div", { staticClass: "b-listbox-multi-select-chips" }, e._l(e.items, function(n) {
718
+ return s("div", { key: `selected-${n.value}` }, [s(l.BaseButton, { staticClass: "b-listbox-multi-select-chips__chip", attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null }, on: { click: function(o) {
719
+ return l.unselectOption(n);
720
+ } }, scopedSlots: e._u([{ key: "iconRight", fn: function() {
721
+ return [s(l.CrossSmallIcon, { attrs: { "svg-title": l.t("remove") } })];
722
+ }, proxy: !0 }], null, !0) }, [s(l.BentoTypography, { staticClass: "b-listbox-multi-select-chips__option-text", attrs: { el: "span", variant: "caption" } }, [e._v(e._s(n.label))])], 1)], 1);
723
+ }), 0);
724
+ }, nt = [], ot = /* @__PURE__ */ N(
725
+ st,
726
+ lt,
727
+ nt,
728
+ !1,
729
+ null,
730
+ "7590db86",
731
+ null,
732
+ null
733
+ );
734
+ const it = ot.exports, at = {
675
735
  "en-US": {
676
736
  allSelected: "All selected ({total})",
677
737
  numberOfTotalSelected: "{number} of {total} selected",
678
738
  selectAll: "Select all ({total})"
679
739
  }
680
- }, et = (t) => {
740
+ }, ct = (t) => {
681
741
  const e = c(() => {
682
- var s;
683
- return !!((s = t.value) != null && s.find(({ items: n }) => !!n));
684
- }), l = c(() => {
685
- var s;
686
- return e.value ? (s = t.value) == null ? void 0 : s.reduce((n, o) => (o.items ? n.push(...o.items.flat()) : n.push(o), n), []) : t.value;
742
+ var l;
743
+ return !!((l = t.value) != null && l.find(({ items: n }) => !!n));
744
+ }), s = c(() => {
745
+ var l;
746
+ return e.value ? (l = t.value) == null ? void 0 : l.reduce((n, o) => (o.items ? n.push(...o.items.flat()) : n.push(o), n), []) : t.value;
687
747
  });
688
748
  return {
689
749
  isMultiLevelSelect: e,
690
- flattenedItemsList: l
750
+ flattenedItemsList: s
691
751
  };
692
- }, tt = N({
693
- i18n: { messages: Ze },
752
+ }, rt = D({
753
+ i18n: { messages: at },
694
754
  name: "bento-listbox-multi-select",
695
755
  components: {
696
756
  BentoCheckbox: X,
697
- BentoListboxOption: V,
698
- BentoTypography: w,
699
- ListboxMultiSelectOptions: Qe
757
+ BentoListboxOption: W,
758
+ BentoTypography: $,
759
+ ListboxMultiSelectOptions: Ze,
760
+ ListboxMultiSelectChips: it
700
761
  },
701
762
  directives: { BentoKeyboardNavigationDirective: H },
702
763
  props: {
@@ -745,8 +806,8 @@ const Qe = Je.exports, Ze = {
745
806
  staticCategories: { type: Boolean, default: !1 }
746
807
  },
747
808
  emits: [i.SELECT],
748
- setup(t, { emit: e, slots: l }) {
749
- const { t: s } = j(), n = T(null), o = T(null), m = T(null), a = T();
809
+ setup(t, { emit: e, slots: s }) {
810
+ const { t: l } = z(), n = L(null), o = L(null), m = L(null), a = L();
750
811
  ee(
751
812
  () => t.selectedValues,
752
813
  () => {
@@ -756,103 +817,102 @@ const Qe = Je.exports, Ze = {
756
817
  immediate: !0
757
818
  }
758
819
  );
759
- const { isMultiLevelSelect: d, flattenedItemsList: u } = et(Y(t, "items")), x = (r) => {
760
- var v;
761
- const b = t.isOptionDisabled(r), p = ((v = a.value) == null ? void 0 : v.includes(r.value)) || !1;
762
- return { isDisabled: b, isPreSelected: p };
763
- }, O = c(
764
- () => t.searching && d ? t.items : u.value.filter((r) => {
765
- const { isDisabled: b, isPreSelected: p } = x(r);
766
- return b && p || !b;
820
+ const { isMultiLevelSelect: b, flattenedItemsList: u } = ct(V(t, "items")), S = (r) => {
821
+ var p;
822
+ const _ = t.isOptionDisabled(r), f = ((p = a.value) == null ? void 0 : p.includes(r.value)) || !1;
823
+ return { isDisabled: _, isPreSelected: f };
824
+ }, A = c(
825
+ () => t.searching && b ? t.items : u.value.filter((r) => {
826
+ const { isDisabled: _, isPreSelected: f } = S(r);
827
+ return _ && f || !_;
767
828
  })
768
- ), L = c(
829
+ ), I = c(
769
830
  () => {
770
831
  var r;
771
- return (r = O.value) == null ? void 0 : r.filter((b) => {
772
- var p;
773
- return b.items && d.value && t.searching ? b.items.filter(
774
- (R) => (t.selectedValues ?? []).includes(
775
- R.value
832
+ return (r = A.value) == null ? void 0 : r.filter((_) => {
833
+ var f;
834
+ return _.items && b.value && t.searching ? _.items.filter(
835
+ (C) => (t.selectedValues ?? []).includes(
836
+ C.value
776
837
  )
777
- ).length === b.items.length : (p = a.value) == null ? void 0 : p.includes(b.value);
838
+ ).length === _.items.length : (f = a.value) == null ? void 0 : f.includes(_.value);
778
839
  });
779
840
  }
780
- ), f = () => d.value && !t.searching ? u.value.length : t.items.length, E = c(() => {
781
- var v;
782
- const r = O.value.length, b = f(), p = ((v = L.value) == null ? void 0 : v.length) || 0;
783
- return p === 0 ? s("selectAll", { total: r }) : p === b ? s("allSelected", { total: b }) : s("numberOfTotalSelected", { number: p, total: b });
784
- }), B = (r) => {
785
- const b = (v) => {
786
- const { isDisabled: R, isPreSelected: K } = x(v);
787
- return R && K || !R;
788
- }, p = r.filter(b).filter((v) => !a.value.includes(v.value)).map(({ value: v }) => v);
789
- a.value = [...a.value, ...p], e(i.SELECT, a.value);
790
- }, A = (r) => {
791
- const b = (v) => {
792
- const { isDisabled: R, isPreSelected: K } = x(v);
793
- return !(R && K);
794
- }, p = r.filter(b).map(({ value: v }) => v);
795
- a.value = a.value.filter((v) => !(p != null && p.includes(v))), e(i.SELECT, a.value);
841
+ ), d = () => b.value && !t.searching ? u.value.length : t.items.length, x = c(() => {
842
+ var p;
843
+ const r = A.value.length, _ = d(), f = ((p = I.value) == null ? void 0 : p.length) || 0;
844
+ return f === 0 ? l("selectAll", { total: r }) : f === _ ? l("allSelected", { total: _ }) : l("numberOfTotalSelected", { number: f, total: _ });
845
+ }), E = (r) => {
846
+ const _ = (p) => {
847
+ const { isDisabled: C, isPreSelected: U } = S(p);
848
+ return C && U || !C;
849
+ }, f = r.filter(_).filter((p) => !a.value.includes(p.value)).map(({ value: p }) => p);
850
+ a.value = [...a.value, ...f], e(i.SELECT, a.value);
851
+ }, B = (r) => {
852
+ const _ = (p) => {
853
+ const { isDisabled: C, isPreSelected: U } = S(p);
854
+ return !(C && U);
855
+ }, f = r.filter(_).map(({ value: p }) => p);
856
+ a.value = a.value.filter((p) => !(f != null && f.includes(p))), e(i.SELECT, a.value);
796
857
  }, g = () => {
858
+ E(u.value);
859
+ }, O = () => {
797
860
  B(u.value);
798
- }, C = () => {
799
- A(u.value);
800
- }, { isAllSelected: S, isIndeterminate: _, toggleSelectAll: y } = te(
801
- L,
802
- O,
861
+ }, { isAllSelected: h, isIndeterminate: v, toggleSelectAll: y } = te(
862
+ I,
863
+ A,
803
864
  g,
804
- C
805
- ), I = (r) => {
806
- B(r.items);
865
+ O
866
+ ), R = (r) => {
867
+ E(r.items);
807
868
  }, M = (r) => {
808
- A(r.items);
809
- }, z = (r, b) => {
810
- let p = !1;
811
- a.value = a.value.filter((v) => b === v ? (p = !0, !1) : !0), p || a.value.push(b), e(r, a.value);
812
- }, G = c(() => {
813
- const r = (v) => a.value.includes(v.value), b = (v) => !!v.find((R) => r(R));
814
- return d.value && t.staticCategories ? t.items.flatMap(({ items: R }) => R.filter(r)) : t.items.filter((v) => v.items && b(v.items) ? !0 : r(v));
815
- }), W = c(() => {
816
- var r;
817
- return ((r = G.value) == null ? void 0 : r.length) > 0;
818
- }), h = c(
869
+ B(r.items);
870
+ }, q = (r, _) => {
871
+ let f = !1;
872
+ a.value = a.value.filter((p) => _ === p ? (f = !0, !1) : !0), f || a.value.push(_), e(r, a.value);
873
+ }, F = c(() => {
874
+ const r = (C) => a.value.includes(C.value), _ = (C) => !t.staticCategories && C.every((U) => r(U));
875
+ return t.items.flatMap(
876
+ (C) => C.items && !_(C.items) ? C.items : C
877
+ ).filter((C) => C.items ? !0 : r(C));
878
+ }), K = c(
819
879
  () => {
820
- var r, b;
821
- return ((r = L.value) == null ? void 0 : r.length) === ((b = u.value) == null ? void 0 : b.length);
880
+ var r, _, f;
881
+ return ((r = F.value) == null ? void 0 : r.length) > 0 && ((_ = I.value) == null ? void 0 : _.length) !== ((f = u.value) == null ? void 0 : f.length);
822
882
  }
823
- ), F = c(
883
+ ), T = c(
824
884
  () => n.value ? [n.value] : []
825
- ), le = c(
885
+ ), G = c(
826
886
  () => {
827
- var r, b;
828
- return (b = (r = o.value) == null ? void 0 : r.$children) != null && b.length ? o.value.$children : [];
887
+ var r, _;
888
+ return (_ = (r = o.value) == null ? void 0 : r.$children) != null && _.length ? o.value.$children : [];
829
889
  }
830
- ), ne = c(
890
+ ), le = c(
831
891
  () => {
832
- var r, b;
833
- return (b = (r = m.value) == null ? void 0 : r.$children) != null && b.length ? m.value.$children : [];
892
+ var r, _;
893
+ return (_ = (r = m.value) == null ? void 0 : r.$children) != null && _.length ? m.value.$children : [];
834
894
  }
835
- ), oe = c(() => ({ label: E, value: S })), ie = c(() => [
836
- oe,
837
- ...G.value,
895
+ ), ne = c(() => ({ label: x, value: h })), oe = c(() => [
896
+ ne,
897
+ ...F.value,
838
898
  ...u.value
839
- ]), ae = (r) => {
899
+ ]), ie = (r) => {
840
900
  [
841
- ...F.value,
842
- ...le.value,
843
- ...ne.value
901
+ ...T.value,
902
+ ...G.value,
903
+ ...le.value
844
904
  ][r].$el.focus();
845
- }, { moveToNextElement: ce, moveToPreviousElement: re, moveToFirstElement: ue, moveToLastElement: de } = se(
905
+ }, { moveToNextElement: ae, moveToPreviousElement: ce, moveToFirstElement: re, moveToLastElement: ue } = se(
846
906
  {
847
- items: T(ie),
907
+ items: L(oe),
848
908
  isOptionDisabled: t.isOptionDisabled
849
909
  },
850
- ae
851
- ), be = {
852
- [k.ARROW_UP]: re,
853
- [k.ARROW_DOWN]: ce,
854
- [k.HOME]: ue,
855
- [k.END]: de
910
+ ie
911
+ ), de = {
912
+ [k.ARROW_UP]: (r) => ce(r),
913
+ [k.ARROW_DOWN]: (r) => ae(r),
914
+ [k.HOME]: re,
915
+ [k.END]: ue
856
916
  };
857
917
  return {
858
918
  // Refs
@@ -860,82 +920,71 @@ const Qe = Je.exports, Ze = {
860
920
  selectedListboxItemsRef: o,
861
921
  listboxItemsRef: m,
862
922
  // Values
863
- isAllSelected: S,
864
- isAllItemsIncludingDisabled: h,
865
- isAnOptionSelected: W,
866
- isIndeterminate: _,
867
- isMultiLevelSelect: d,
923
+ isAllSelected: h,
924
+ showSelectedItems: K,
925
+ isIndeterminate: v,
926
+ isMultiLevelSelect: b,
868
927
  flattenedItemsList: u,
869
928
  selectedItemsList: a,
870
- selectAllCheckboxText: E,
871
- selectedOptions: G,
872
- slots: l,
929
+ selectAllCheckboxText: x,
930
+ selectedOptions: F,
931
+ slots: s,
873
932
  // Enums
874
933
  BentoListboxEvent: i,
875
934
  // Methods
876
- selectAllCategory: I,
877
- toggleCheckboxSelection: z,
935
+ selectAllCategory: R,
936
+ toggleCheckboxSelection: q,
878
937
  toggleSelectAll: y,
879
938
  unselectAllCategory: M,
880
939
  // Events
881
- listboxListeners: be
940
+ listboxListeners: de
882
941
  };
883
942
  }
884
943
  });
885
- var st = function() {
886
- var e = this, l = e._self._c;
887
- return e._self._setupProxy, l("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox-multi-select" }, e.listboxListeners), [l("bento-listbox-option", { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option" }, [l("bento-checkbox", { attrs: { "aria-label": e.selectAllCheckboxText, "model-value": e.isAllSelected, indeterminate: e.isIndeterminate }, on: { "update:model-value": e.toggleSelectAll } }), l("bento-typography", { attrs: { el: "span" } }, [e._v(" " + e._s(e.selectAllCheckboxText) + " ")])], 1), e.isAnOptionSelected ? l("div", [l("hr", { staticClass: "b-listbox-multi-select__divider" }), l("listbox-multi-select-options", { ref: "selectedListboxItemsRef", attrs: { items: e.selectedOptions, "is-option-disabled": e.isOptionDisabled, "is-multi-level": e.isMultiLevelSelect, "static-categories": e.staticCategories, searching: e.searching, "selected-items-list": e.selectedItemsList }, on: e._d({ "select-category": e.selectAllCategory, "unselect-category": e.unselectAllCategory, "toggle-checkbox-selection": function(s) {
888
- return e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, s);
889
- } }, [e.BentoListboxEvent.SPACE, function(s) {
890
- return e.toggleCheckboxSelection(e.BentoListboxEvent.SPACE, s);
891
- }, e.BentoListboxEvent.TAB, function(s) {
892
- return e.toggleCheckboxSelection(e.BentoListboxEvent.TAB, s);
893
- }, e.BentoListboxEvent.ENTER, function(s) {
894
- return e.toggleCheckboxSelection(e.BentoListboxEvent.ENTER, s);
895
- }]), scopedSlots: e._u([e._l(e.slots, function(s, n) {
896
- return { key: n, fn: function(o) {
897
- return [e._t(n, null, null, o)];
898
- } };
899
- })], null, !0) })], 1) : e._e(), l("div", { directives: [{ name: "show", rawName: "v-show", value: !e.isAllItemsIncludingDisabled, expression: "!isAllItemsIncludingDisabled" }] }, [l("hr", { staticClass: "b-listbox-multi-select__divider" }), l("listbox-multi-select-options", { ref: "listboxItemsRef", attrs: { items: e.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": e.isMultiLevelSelect, "static-categories": e.staticCategories, searching: e.searching, "selected-items-list": e.selectedItemsList }, on: e._d({ "toggle-checkbox-selection": function(s) {
900
- return e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, s);
901
- }, "select-category": e.selectAllCategory, "unselect-category": e.unselectAllCategory }, [e.BentoListboxEvent.SPACE, function(s) {
902
- return e.toggleCheckboxSelection(e.BentoListboxEvent.SPACE, s);
903
- }, e.BentoListboxEvent.TAB, function(s) {
904
- return e.toggleCheckboxSelection(e.BentoListboxEvent.TAB, s);
905
- }, e.BentoListboxEvent.ENTER, function(s) {
906
- return e.toggleCheckboxSelection(e.BentoListboxEvent.ENTER, s);
907
- }]), scopedSlots: e._u([e._l(e.slots, function(s, n) {
944
+ var ut = function() {
945
+ var e = this, s = e._self._c;
946
+ return e._self._setupProxy, s("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox-multi-select" }, e.listboxListeners), [s("bento-listbox-option", { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option" }, [s("bento-checkbox", { attrs: { "aria-label": e.selectAllCheckboxText, "model-value": e.isAllSelected, indeterminate: e.isIndeterminate }, on: { "update:model-value": e.toggleSelectAll } }), s("bento-typography", { attrs: { el: "span" } }, [e._v(" " + e._s(e.selectAllCheckboxText) + " ")])], 1), e.showSelectedItems ? s("div", [s("hr", { staticClass: "b-listbox-multi-select__divider" }), s("listbox-multi-select-chips", { ref: "selectedListboxItemsRef", attrs: { items: e.selectedOptions, "is-option-disabled": e.isOptionDisabled }, on: { "unselect-category": e.unselectAllCategory, "unselect-item": function(l) {
947
+ return e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, l);
948
+ } } })], 1) : e._e(), s("hr", { staticClass: "b-listbox-multi-select__divider" }), s("listbox-multi-select-options", { ref: "listboxItemsRef", attrs: { items: e.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": e.isMultiLevelSelect, "static-categories": e.staticCategories, searching: e.searching, "selected-items-list": e.selectedItemsList }, on: e._d({ "toggle-checkbox-selection": function(l) {
949
+ return e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, l);
950
+ }, "select-category": e.selectAllCategory, "unselect-category": e.unselectAllCategory }, [e.BentoListboxEvent.SPACE, function(l) {
951
+ return e.toggleCheckboxSelection(e.BentoListboxEvent.SPACE, l);
952
+ }, e.BentoListboxEvent.TAB, function(l) {
953
+ return e.toggleCheckboxSelection(e.BentoListboxEvent.TAB, l);
954
+ }, e.BentoListboxEvent.ENTER, function(l) {
955
+ return e.toggleCheckboxSelection(e.BentoListboxEvent.ENTER, l);
956
+ }]), scopedSlots: e._u([e._l(e.slots, function(l, n) {
908
957
  return { key: n, fn: function(o) {
909
958
  return [e._t(n, null, null, o)];
910
959
  } };
911
- })], null, !0) })], 1)], 1);
912
- }, lt = [], nt = /* @__PURE__ */ P(
913
- tt,
914
- st,
915
- lt,
960
+ })], null, !0) })], 1);
961
+ }, dt = [], _t = /* @__PURE__ */ N(
962
+ rt,
963
+ ut,
964
+ dt,
916
965
  !1,
917
966
  null,
918
- "2a48c62f",
967
+ "a2c4d112",
919
968
  null,
920
969
  null
921
970
  );
922
- const Q = nt.exports, ot = {
971
+ const Q = _t.exports, bt = {
923
972
  "en-US": {
924
973
  showMore: "Show more",
925
974
  loading: "Loading"
926
975
  }
927
- }, it = 36, at = N({
976
+ }, vt = 36, mt = D({
928
977
  name: "bento-listbox",
929
978
  components: {
930
- BentoEmptyState: me,
931
- BentoListboxSingleSelect: Ue,
979
+ BentoEmptyState: ve,
980
+ BentoListboxSingleSelect: Ye,
932
981
  BentoListboxMultiSelect: Q,
933
- BentoTypography: w,
934
- BentoLoadingIndicator: ve,
935
- BentoLoadingButton: xe
982
+ BentoTypography: $,
983
+ BentoLoadingIndicator: be,
984
+ BentoLoadingButton: Se
936
985
  },
937
986
  directives: { BentoKeyboardNavigationDirective: H },
938
- i18n: { messages: ot },
987
+ i18n: { messages: bt },
939
988
  props: {
940
989
  /**
941
990
  * Defines a string value that labels an interactive element.
@@ -991,8 +1040,8 @@ const Q = nt.exports, ot = {
991
1040
  */
992
1041
  lazyLoadType: {
993
1042
  type: String,
994
- default: $.NONE,
995
- validator: (t) => Object.values($).includes(t)
1043
+ default: w.NONE,
1044
+ validator: (t) => Object.values(w).includes(t)
996
1045
  },
997
1046
  /**
998
1047
  * If enabled, the user will be able to select multiple items.
@@ -1039,49 +1088,49 @@ const Q = nt.exports, ot = {
1039
1088
  i.ESCAPE,
1040
1089
  i.TAB
1041
1090
  ],
1042
- setup(t, { emit: e, slots: l }) {
1043
- const s = T([]), n = Y(t, "items"), { t: o } = j(), m = c(() => t.lazyLoadType !== $.AUTOMATIC), a = c(() => t.lazyLoadType === $.AUTOMATIC), d = () => {
1044
- var h;
1045
- return typeof (t == null ? void 0 : t.virtualScroll) == "object" && ((h = t == null ? void 0 : t.virtualScroll) != null && h.itemHeight) ? t.virtualScroll.itemHeight : it;
1091
+ setup(t, { emit: e, slots: s }) {
1092
+ const l = L([]), n = V(t, "items"), { t: o } = z(), m = c(() => t.lazyLoadType !== w.AUTOMATIC), a = c(() => t.lazyLoadType === w.AUTOMATIC), b = () => {
1093
+ var T;
1094
+ return typeof (t == null ? void 0 : t.virtualScroll) == "object" && ((T = t == null ? void 0 : t.virtualScroll) != null && T.itemHeight) ? t.virtualScroll.itemHeight : vt;
1046
1095
  }, {
1047
1096
  containerRef: u,
1048
- containerProps: x,
1049
- onScroll: O,
1050
- list: L,
1051
- wrapperProps: f
1097
+ containerProps: S,
1098
+ onScroll: A,
1099
+ list: I,
1100
+ wrapperProps: d
1052
1101
  } = Ee(n, {
1053
- itemHeight: d(),
1102
+ itemHeight: b(),
1054
1103
  // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
1055
1104
  disabled: (t == null ? void 0 : t.multiple) || (t == null ? void 0 : t.virtualScroll) === !1 || (t == null ? void 0 : t.lazyLoadType) !== "none"
1056
- }), E = c(
1105
+ }), x = c(
1057
1106
  () => m.value ? "true" : void 0
1058
- ), B = c(
1107
+ ), E = c(
1059
1108
  () => m.value && t.loading ? "true" : "false"
1060
- ), A = c(
1109
+ ), B = c(
1061
1110
  () => m.value ? "polite" : void 0
1062
- ), g = (h) => (F) => {
1063
- e(h, F);
1064
- }, C = () => {
1111
+ ), g = (T) => (G) => {
1112
+ e(T, G);
1113
+ }, O = () => {
1065
1114
  e(i.SHOW_MORE);
1066
- }, S = fe(() => {
1067
- const h = u.value;
1068
- if (!h)
1115
+ }, h = me(() => {
1116
+ const T = u.value;
1117
+ if (!T)
1069
1118
  return;
1070
- const F = Math.round(h.scrollTop) + h.clientHeight >= h.scrollHeight;
1071
- t.hasMoreItems && F && !t.loading && C();
1072
- }), _ = () => {
1073
- a.value ? S() : O();
1119
+ const G = Math.round(T.scrollTop) + T.clientHeight >= T.scrollHeight;
1120
+ t.hasMoreItems && G && !t.loading && O();
1121
+ }), v = () => {
1122
+ a.value ? h() : A();
1074
1123
  }, y = c(() => {
1075
- var h;
1076
- return t.searching && ((h = t.items) == null ? void 0 : h.length) === 0;
1077
- }), I = c(
1078
- () => t.lazyLoadType === $.BUTTON && t.hasMoreItems
1124
+ var T;
1125
+ return t.searching && ((T = t.items) == null ? void 0 : T.length) === 0;
1126
+ }), R = c(
1127
+ () => t.lazyLoadType === w.BUTTON && t.hasMoreItems
1079
1128
  ), M = c(
1080
1129
  () => t.loading ? J.LOADING : J.START
1081
- ), z = c(() => t.loading ? o("loading") : o("showMore")), G = c(() => ({
1130
+ ), q = c(() => t.loading ? o("loading") : o("showMore")), F = c(() => ({
1082
1131
  ...t.emptyState,
1083
1132
  variant: "condensed"
1084
- })), W = {
1133
+ })), K = {
1085
1134
  [i.SELECT]: g(i.SELECT),
1086
1135
  [i.SPACE]: g(i.SPACE),
1087
1136
  [i.TAB]: g(i.TAB),
@@ -1090,60 +1139,60 @@ const Q = nt.exports, ot = {
1090
1139
  return {
1091
1140
  // Refs
1092
1141
  listboxRef: u,
1093
- listboxItemRef: s,
1142
+ listboxItemRef: l,
1094
1143
  // a11y
1095
- ariaAtomic: E,
1096
- ariaBusy: B,
1097
- ariaLive: A,
1144
+ ariaAtomic: x,
1145
+ ariaBusy: E,
1146
+ ariaLive: B,
1098
1147
  // Values
1099
- containerProps: x,
1148
+ containerProps: S,
1100
1149
  isSearchResultEmpty: y,
1101
- limitedEmptyStateProps: G,
1150
+ limitedEmptyStateProps: F,
1102
1151
  loadingButtonState: M,
1103
- slots: l,
1104
- shouldDisplayShowMoreButton: I,
1105
- showMoreButtonText: z,
1106
- virtualisedItems: L,
1107
- wrapperProps: f,
1152
+ slots: s,
1153
+ shouldDisplayShowMoreButton: R,
1154
+ showMoreButtonText: q,
1155
+ virtualisedItems: I,
1156
+ wrapperProps: d,
1108
1157
  // Enums
1109
1158
  BentoKeyboardNavigationKeyDownEvent: k,
1110
1159
  BentoListboxEvent: i,
1111
1160
  // Methods
1112
- onListboxContainerScroll: _,
1161
+ onListboxContainerScroll: v,
1113
1162
  onOptionSelected: g,
1114
- emitShowMore: C,
1115
- listboxListeners: W
1163
+ emitShowMore: O,
1164
+ listboxListeners: K
1116
1165
  };
1117
1166
  }
1118
1167
  });
1119
- var ct = function() {
1120
- var e = this, l = e._self._c;
1121
- return e._self._setupProxy, l("div", e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox", attrs: { id: e.id, role: "listbox", tabindex: "-1", "aria-busy": e.ariaBusy, "aria-atomic": e.ariaAtomic, "aria-label": e.ariaLabel, "aria-live": e.ariaLive }, on: { scroll: e.onListboxContainerScroll } }, "div", e.containerProps, !1), [l("div", e._b({}, "div", e.wrapperProps, !1), [e.isSearchResultEmpty ? l("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? l("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [l("bento-listbox-multi-select", e._g({ ref: "listboxItemRef", attrs: { items: e.items, "static-categories": e.staticCategories, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(s, n) {
1168
+ var ft = function() {
1169
+ var e = this, s = e._self._c;
1170
+ return e._self._setupProxy, s("div", e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox", attrs: { id: e.id, role: "listbox", tabindex: "-1", "aria-busy": e.ariaBusy, "aria-atomic": e.ariaAtomic, "aria-label": e.ariaLabel, "aria-live": e.ariaLive }, on: { scroll: e.onListboxContainerScroll } }, "div", e.containerProps, !1), [s("div", e._b({}, "div", e.wrapperProps, !1), [e.isSearchResultEmpty ? s("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? s("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [s("bento-listbox-multi-select", e._g({ ref: "listboxItemRef", attrs: { items: e.items, "static-categories": e.staticCategories, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(l, n) {
1122
1171
  return { key: n, fn: function(o) {
1123
1172
  return [e._t(n, null, null, o)];
1124
1173
  } };
1125
- })], null, !0) }, e.listboxListeners))] : [l("bento-listbox-single-select", e._g({ ref: "listboxItemRef", attrs: { items: e.virtualisedItems, "selected-value": e.selectedValue, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(s, n) {
1174
+ })], null, !0) }, e.listboxListeners))] : [s("bento-listbox-single-select", e._g({ ref: "listboxItemRef", attrs: { items: e.virtualisedItems, "selected-value": e.selectedValue, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(l, n) {
1126
1175
  return { key: n, fn: function(o) {
1127
1176
  return [e._t(n, null, null, o)];
1128
1177
  } };
1129
- })], null, !0) }, e.listboxListeners))], e.shouldDisplayShowMoreButton ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-button", { attrs: { state: e.loadingButtonState, variant: "secondary" }, on: { "!click": function(s) {
1178
+ })], null, !0) }, e.listboxListeners))], e.shouldDisplayShowMoreButton ? s("div", { staticClass: "b-listbox__lazy-load" }, [s("bento-loading-button", { attrs: { state: e.loadingButtonState, variant: "secondary" }, on: { "!click": function(l) {
1130
1179
  return e.emitShowMore.apply(null, arguments);
1131
- } } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-indicator")], 1) : e._e()]], 2)]);
1132
- }, rt = [], ut = /* @__PURE__ */ P(
1133
- at,
1134
- ct,
1135
- rt,
1180
+ } } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? s("div", { staticClass: "b-listbox__lazy-load" }, [s("bento-loading-indicator")], 1) : e._e()]], 2)]);
1181
+ }, gt = [], yt = /* @__PURE__ */ N(
1182
+ mt,
1183
+ ft,
1184
+ gt,
1136
1185
  !1,
1137
1186
  null,
1138
1187
  "17128845",
1139
1188
  null,
1140
1189
  null
1141
1190
  );
1142
- const Tt = ut.exports;
1191
+ const Pt = yt.exports;
1143
1192
  export {
1144
- Tt as B,
1145
- $ as a,
1193
+ Pt as B,
1194
+ w as a,
1146
1195
  i as b,
1147
- et as u
1196
+ ct as u
1148
1197
  };
1149
- //# sourceMappingURL=listbox.23c6b393.js.map
1198
+ //# sourceMappingURL=listbox.e5d70b9b.js.map