@adyen/bento-vue3 1.62.0 → 1.63.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 (146) hide show
  1. package/dist/@types/index.d.ts +181 -235
  2. package/dist/accordion.js +1 -1
  3. package/dist/action-bar.js +1 -1
  4. package/dist/assets/accordion-item.css +1 -1
  5. package/dist/assets/action-bar.css +1 -1
  6. package/dist/assets/base-modal.css +1 -1
  7. package/dist/assets/card.css +1 -1
  8. package/dist/assets/checkbox-input.css +1 -1
  9. package/dist/assets/data-grid.css +1 -1
  10. package/dist/assets/date-range-picker.css +1 -1
  11. package/dist/assets/dialog-page.css +1 -1
  12. package/dist/assets/file-uploader.css +1 -1
  13. package/dist/assets/header-with-views.css +1 -1
  14. package/dist/assets/inspector.css +1 -1
  15. package/dist/assets/listbox-option-tag.css +1 -1
  16. package/dist/assets/menu.css +1 -1
  17. package/dist/assets/modal-fullscreen.css +1 -1
  18. package/dist/assets/popover.css +1 -1
  19. package/dist/assets/sidepanel.css +1 -1
  20. package/dist/assets/use-cached-selected-values.css +1 -1
  21. package/dist/card.js +1 -1
  22. package/dist/checkbox.js +3 -3
  23. package/dist/chunks/{accordion-item.QL3wdbhL.js → accordion-item.DOnW0OnU.js} +16 -15
  24. package/dist/chunks/{accordion-item.QL3wdbhL.js.map → accordion-item.DOnW0OnU.js.map} +1 -1
  25. package/dist/chunks/{action-bar.DZhxAMLL.js → action-bar.D8eibCuD.js} +2 -2
  26. package/dist/chunks/{action-bar.DZhxAMLL.js.map → action-bar.D8eibCuD.js.map} +1 -1
  27. package/dist/chunks/{button-actions-with-menu.DhqEdBBQ.js → button-actions-with-menu.BS4gewjn.js} +2 -2
  28. package/dist/chunks/{button-actions-with-menu.DhqEdBBQ.js.map → button-actions-with-menu.BS4gewjn.js.map} +1 -1
  29. package/dist/chunks/{calendar.DW8Uy3b_.js → calendar.CLpwW_-k.js} +2 -2
  30. package/dist/chunks/{calendar.DW8Uy3b_.js.map → calendar.CLpwW_-k.js.map} +1 -1
  31. package/dist/chunks/card.DiBtLuRU.js +227 -0
  32. package/dist/chunks/card.DiBtLuRU.js.map +1 -0
  33. package/dist/chunks/{checkbox-group.Dsmy9OW5.js → checkbox-group.Aqtco8Q5.js} +2 -2
  34. package/dist/chunks/{checkbox-group.Dsmy9OW5.js.map → checkbox-group.Aqtco8Q5.js.map} +1 -1
  35. package/dist/chunks/checkbox-input.DFkwZ4GM.js +144 -0
  36. package/dist/chunks/checkbox-input.DFkwZ4GM.js.map +1 -0
  37. package/dist/chunks/{checkbox.C4dJVYbB.js → checkbox.Hl6-8Sai.js} +22 -21
  38. package/dist/chunks/{checkbox.C4dJVYbB.js.map → checkbox.Hl6-8Sai.js.map} +1 -1
  39. package/dist/chunks/chevron-down.DCQ6ZLaq.js +29 -0
  40. package/dist/chunks/chevron-down.DCQ6ZLaq.js.map +1 -0
  41. package/dist/chunks/{chevron-left.Cfn1uGLH.js → chevron-right.Brdj0WlO.js} +5 -5
  42. package/dist/chunks/chevron-right.Brdj0WlO.js.map +1 -0
  43. package/dist/chunks/chevron-up.kfuLRpZb.js +29 -0
  44. package/dist/chunks/chevron-up.kfuLRpZb.js.map +1 -0
  45. package/dist/chunks/{code-snippet.Cn2Lcvup.js → code-snippet.DyAfzpUj.js} +2 -2
  46. package/dist/chunks/{code-snippet.Cn2Lcvup.js.map → code-snippet.DyAfzpUj.js.map} +1 -1
  47. package/dist/chunks/{dashboard-section.BEpgS9FV.js → dashboard-section.Bff7RNHI.js} +3 -3
  48. package/dist/chunks/{dashboard-section.BEpgS9FV.js.map → dashboard-section.Bff7RNHI.js.map} +1 -1
  49. package/dist/chunks/{data-grid-template.DCJc9gFg.js → data-grid-template.Dt-4ta3L.js} +3 -3
  50. package/dist/chunks/{data-grid-template.DCJc9gFg.js.map → data-grid-template.Dt-4ta3L.js.map} +1 -1
  51. package/dist/chunks/{data-grid.CMwzTU-b.js → data-grid.dnbCuBF7.js} +1266 -1278
  52. package/dist/chunks/data-grid.dnbCuBF7.js.map +1 -0
  53. package/dist/chunks/{date-picker.BcquOXbz.js → date-picker.Bfemi1um.js} +15 -15
  54. package/dist/chunks/{date-picker.BcquOXbz.js.map → date-picker.Bfemi1um.js.map} +1 -1
  55. package/dist/chunks/date-range-picker.BJm2xOoG.js +1209 -0
  56. package/dist/chunks/date-range-picker.BJm2xOoG.js.map +1 -0
  57. package/dist/chunks/{dropdown-default-textbox.CtsO8vqZ.js → dropdown-default-textbox.B05elQig.js} +7 -6
  58. package/dist/chunks/{dropdown-default-textbox.CtsO8vqZ.js.map → dropdown-default-textbox.B05elQig.js.map} +1 -1
  59. package/dist/chunks/{dropdown-tag.6DqQdI4d.js → dropdown-tag.CQMkfl3K.js} +3 -3
  60. package/dist/chunks/{dropdown-tag.6DqQdI4d.js.map → dropdown-tag.CQMkfl3K.js.map} +1 -1
  61. package/dist/chunks/{dropdown.OG72_pRK.js → dropdown.BPQS22Kl.js} +27 -27
  62. package/dist/chunks/{dropdown.OG72_pRK.js.map → dropdown.BPQS22Kl.js.map} +1 -1
  63. package/dist/chunks/es6.n1ewaW31.js.map +1 -1
  64. package/dist/chunks/{filter-bar.CV9gc16N.js → filter-bar.BNMR3HZ5.js} +15 -14
  65. package/dist/chunks/{filter-bar.CV9gc16N.js.map → filter-bar.BNMR3HZ5.js.map} +1 -1
  66. package/dist/chunks/{fixed-scroller.Cmi0TpjZ.js → fixed-scroller.D5nAPPbo.js} +31 -31
  67. package/dist/chunks/fixed-scroller.D5nAPPbo.js.map +1 -0
  68. package/dist/chunks/{header-with-views.B3WWqTtt.js → header-with-views.go02TaiU.js} +435 -435
  69. package/dist/chunks/header-with-views.go02TaiU.js.map +1 -0
  70. package/dist/chunks/{header.D94roWI-.js → header.CLg3TLJs.js} +2 -2
  71. package/dist/chunks/{header.D94roWI-.js.map → header.CLg3TLJs.js.map} +1 -1
  72. package/dist/chunks/{input-field-password.BsH_9lnw.js → input-field-password.B5zx9e4K.js} +3 -3
  73. package/dist/chunks/{input-field-password.BsH_9lnw.js.map → input-field-password.B5zx9e4K.js.map} +1 -1
  74. package/dist/chunks/{input-field-phone-number.CiicWtuZ.js → input-field-phone-number.DqfmWaJ2.js} +3 -3
  75. package/dist/chunks/{input-field-phone-number.CiicWtuZ.js.map → input-field-phone-number.DqfmWaJ2.js.map} +1 -1
  76. package/dist/chunks/{input-field.D3z0nJ43.js → input-field.CfsdWr4t.js} +2 -2
  77. package/dist/chunks/{input-field.D3z0nJ43.js.map → input-field.CfsdWr4t.js.map} +1 -1
  78. package/dist/chunks/listbox-option-tag.0fIXV0Bs.js +57 -0
  79. package/dist/chunks/listbox-option-tag.0fIXV0Bs.js.map +1 -0
  80. package/dist/chunks/menu.CCDxWQPw.js +679 -0
  81. package/dist/chunks/menu.CCDxWQPw.js.map +1 -0
  82. package/dist/chunks/minus-small.DYIyF5XW.js +32 -0
  83. package/dist/chunks/minus-small.DYIyF5XW.js.map +1 -0
  84. package/dist/chunks/{pagination.B_d4N-RQ.js → pagination.BKyr5hq_.js} +2 -2
  85. package/dist/chunks/{pagination.B_d4N-RQ.js.map → pagination.BKyr5hq_.js.map} +1 -1
  86. package/dist/chunks/{rich-text-editor.CnoXCpHV.js → rich-text-editor.BK2zdyOm.js} +2 -2
  87. package/dist/chunks/{rich-text-editor.CnoXCpHV.js.map → rich-text-editor.BK2zdyOm.js.map} +1 -1
  88. package/dist/chunks/{search-bar.BeOwzjq4.js → search-bar.DgOHq0ns.js} +3 -3
  89. package/dist/chunks/{search-bar.BeOwzjq4.js.map → search-bar.DgOHq0ns.js.map} +1 -1
  90. package/dist/chunks/{secondary-nav.GRqyqoMi.js → secondary-nav.BHpoi5U4.js} +2 -2
  91. package/dist/chunks/{secondary-nav.GRqyqoMi.js.map → secondary-nav.BHpoi5U4.js.map} +1 -1
  92. package/dist/chunks/{selection-card-group.0tHKJZ1M.js → selection-card-group.-8bXRhOW.js} +2 -2
  93. package/dist/chunks/{selection-card-group.0tHKJZ1M.js.map → selection-card-group.-8bXRhOW.js.map} +1 -1
  94. package/dist/chunks/{tabs.CkDHEdGa.js → tabs.Cq1fdzVh.js} +2 -2
  95. package/dist/chunks/{tabs.CkDHEdGa.js.map → tabs.Cq1fdzVh.js.map} +1 -1
  96. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.20XC06Eu.js → tutorial.vue_vue_type_script_setup_true_lang.BlSsK0Rr.js} +2 -2
  97. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.20XC06Eu.js.map → tutorial.vue_vue_type_script_setup_true_lang.BlSsK0Rr.js.map} +1 -1
  98. package/dist/chunks/{use-cached-selected-values.CUi4XfMa.js → use-cached-selected-values.swt0cdsA.js} +603 -571
  99. package/dist/chunks/use-cached-selected-values.swt0cdsA.js.map +1 -0
  100. package/dist/code-snippet.js +1 -1
  101. package/dist/dashboard-template.js +1 -1
  102. package/dist/data-grid-template.js +1 -1
  103. package/dist/data-grid.js +1 -1
  104. package/dist/date-picker.js +2 -2
  105. package/dist/date-range-picker.js +2 -2
  106. package/dist/dropdown.js +4 -4
  107. package/dist/filter-bar.js +1 -1
  108. package/dist/header-with-views.js +1 -1
  109. package/dist/header.js +1 -1
  110. package/dist/index.js +31 -31
  111. package/dist/input-field-password.js +1 -1
  112. package/dist/input-field-phone-number.js +1 -1
  113. package/dist/input-field.js +1 -1
  114. package/dist/internal.js +5 -5
  115. package/dist/menu.js +1 -1
  116. package/dist/pagination.js +1 -1
  117. package/dist/rich-text-editor.js +1 -1
  118. package/dist/search-bar.js +2 -2
  119. package/dist/secondary-nav.js +1 -1
  120. package/dist/selection-card.js +1 -1
  121. package/dist/styles/bento-dark.css +4 -0
  122. package/dist/styles/bento-light.css +4 -0
  123. package/dist/styles/bento.css +4 -0
  124. package/dist/styles/legacy.css +4 -0
  125. package/dist/styles/styleguide.css +4 -0
  126. package/dist/tabs.js +1 -1
  127. package/dist/tutorial.js +1 -1
  128. package/dist/web-types.json +1 -1
  129. package/package.json +6 -6
  130. package/dist/chunks/card.CxeuIcpZ.js +0 -213
  131. package/dist/chunks/card.CxeuIcpZ.js.map +0 -1
  132. package/dist/chunks/checkbox-input.BhAIj6Cq.js +0 -168
  133. package/dist/chunks/checkbox-input.BhAIj6Cq.js.map +0 -1
  134. package/dist/chunks/chevron-left.Cfn1uGLH.js.map +0 -1
  135. package/dist/chunks/chevron-up.MAa3Ksgd.js +0 -52
  136. package/dist/chunks/chevron-up.MAa3Ksgd.js.map +0 -1
  137. package/dist/chunks/data-grid.CMwzTU-b.js.map +0 -1
  138. package/dist/chunks/date-range-picker.DSgv57wo.js +0 -1181
  139. package/dist/chunks/date-range-picker.DSgv57wo.js.map +0 -1
  140. package/dist/chunks/fixed-scroller.Cmi0TpjZ.js.map +0 -1
  141. package/dist/chunks/header-with-views.B3WWqTtt.js.map +0 -1
  142. package/dist/chunks/listbox-option-tag.WzftYVP_.js +0 -55
  143. package/dist/chunks/listbox-option-tag.WzftYVP_.js.map +0 -1
  144. package/dist/chunks/menu.DOKYXlFy.js +0 -768
  145. package/dist/chunks/menu.DOKYXlFy.js.map +0 -1
  146. package/dist/chunks/use-cached-selected-values.CUi4XfMa.js.map +0 -1
@@ -1,90 +1,92 @@
1
- import { computed as g, ref as k, onMounted as je, onUnmounted as He, watch as fe, defineComponent as Q, resolveComponent as I, createElementBlock as T, openBlock as b, createVNode as P, createElementVNode as H, withCtx as L, createTextVNode as F, toDisplayString as z, renderSlot as Y, mergeProps as U, withKeys as pe, createCommentVNode as j, createBlock as B, withModifiers as ie, normalizeProps as ne, guardReactiveProps as be, withDirectives as ae, vShow as ke, toRef as ee, resolveDirective as Re, toHandlers as te, Fragment as se, renderList as q, createSlots as me, normalizeClass as ye, useSlots as Ve, unref as M, normalizeStyle as Xe } from "vue";
2
- import { B as G, a as ve } from "./keyboard-navigation.CqgGzfZQ.js";
1
+ import { computed as m, ref as B, onMounted as Ve, onUnmounted as Xe, watch as ge, defineComponent as Z, resolveComponent as L, createElementBlock as _, openBlock as d, createVNode as P, createElementVNode as W, withCtx as T, createTextVNode as Y, toDisplayString as F, renderSlot as q, mergeProps as U, withKeys as Se, createCommentVNode as K, createBlock as $, withModifiers as ie, normalizeProps as ne, guardReactiveProps as be, withDirectives as ae, vShow as Be, toRef as te, resolveDirective as Re, toHandlers as se, Fragment as le, renderList as V, createSlots as me, normalizeClass as ve, unref as R, useSlots as Je, normalizeStyle as Ze } from "vue";
2
+ import { B as z, a as pe } from "./keyboard-navigation.CqgGzfZQ.js";
3
3
  import "./events.FNmSWp_P.js";
4
4
  import { B as re } from "./typography.DN5eC5ch.js";
5
- import { B as Je } from "./loading-indicator.DEepb9Wl.js";
6
- import { B as Ze } from "./empty-state.D7llINgF.js";
7
- import { u as he } from "./i18n.B6g5VX0q.js";
8
- import { d as Qe } from "./debounce.DUTu11PS.js";
9
- import { B as Ee } from "./checkbox.C4dJVYbB.js";
10
- import { B as et } from "./chip.CneNX2_j.js";
5
+ import { B as Qe } from "./loading-indicator.DEepb9Wl.js";
6
+ import { B as et } from "./empty-state.D7llINgF.js";
7
+ import { u as Ee } from "./i18n.B6g5VX0q.js";
8
+ import { d as tt } from "./debounce.DUTu11PS.js";
9
+ import { B as st } from "./chip.CneNX2_j.js";
11
10
  import { _ as X } from "./_plugin-vue_export-helper.CHgC5LLL.js";
12
- import { C as tt, a as st } from "./chevron-up.MAa3Ksgd.js";
13
- import { d as lt, e as Le } from "./button-actions.D1pXI1AJ.js";
11
+ import { C as fe, N as lt } from "./minus-small.DYIyF5XW.js";
12
+ import { C as ot } from "./checkmark-small.x-gmK2Dt.js";
13
+ import { C as nt } from "./chevron-down.DCQ6ZLaq.js";
14
+ import { C as it } from "./chevron-up.kfuLRpZb.js";
15
+ import { d as at, e as Le } from "./button-actions.D1pXI1AJ.js";
14
16
  /* empty css */
15
- import { o as ot } from "./resize.Bqks3WUm.js";
17
+ import { o as rt } from "./resize.Bqks3WUm.js";
16
18
  import "../assets/use-cached-selected-values.css";
17
- const Be = (e, s, t, c) => {
18
- const i = g(
19
+ const Ne = (e, s, t, c) => {
20
+ const i = m(
19
21
  () => {
20
- var m, C;
21
- return !!((m = e.value) != null && m.length) && ((C = e.value) == null ? void 0 : C.length) === s.value.length;
22
+ var v, h;
23
+ return !!((v = e.value) != null && v.length) && ((h = e.value) == null ? void 0 : h.length) === s.value.length;
22
24
  }
23
- ), l = g(() => {
24
- var m;
25
- return e.value == null || e.value.length === 0 ? !1 : ((m = e.value) == null ? void 0 : m.length) !== s.value.length;
25
+ ), l = m(() => {
26
+ var v;
27
+ return e.value == null || e.value.length === 0 ? !1 : ((v = e.value) == null ? void 0 : v.length) !== s.value.length;
26
28
  });
27
29
  return {
28
30
  isAllSelected: i,
29
31
  isIndeterminate: l,
30
- toggleSelectAll: (m) => {
31
- m ? t() : c();
32
+ toggleSelectAll: (v) => {
33
+ v ? t() : c();
32
34
  }
33
35
  };
34
36
  };
35
- function nt(e, { disabled: s, itemHeight: t, overscan: c = 5, prefixHeight: i }) {
36
- const l = k(null), r = k([]), m = k(0), C = k(0), n = k(0);
37
+ function ct(e, { disabled: s, itemHeight: t, overscan: c = 5, prefixHeight: i }) {
38
+ const l = B(null), r = B([]), v = B(0), h = B(0), n = B(0);
37
39
  let a;
38
- const o = g(() => {
39
- const S = typeof t == "number" ? e.value.length * t : e.value.reduce((D, R, N) => D + t(N), 0), $ = typeof t == "number" ? m.value * t : e.value.slice(0, m.value).reduce((D, R, N) => D + t(N), 0);
40
+ const o = m(() => {
41
+ const S = typeof t == "number" ? e.value.length * t : e.value.reduce((N, x, D) => N + t(D), 0), A = typeof t == "number" ? v.value * t : e.value.slice(0, v.value).reduce((N, x, D) => N + t(D), 0);
40
42
  return {
41
43
  style: {
42
- marginTop: `${$}px`,
43
- height: `${S - $}px`
44
+ marginTop: `${A}px`,
45
+ height: `${S - A}px`
44
46
  }
45
47
  };
46
- }), h = () => {
47
- const S = (i == null ? void 0 : i.value) ?? 0, $ = Math.max(l.value.scrollTop - S, 0);
48
+ }), C = () => {
49
+ const S = (i == null ? void 0 : i.value) ?? 0, A = Math.max(l.value.scrollTop - S, 0);
48
50
  if (typeof t == "number")
49
- return Math.floor($ / t);
50
- let D = 0, R = 0;
51
- for (let N = 0; N < e.value.length; N += 1) {
52
- const _ = t(N);
53
- if (D += _, D >= $) {
54
- R = N;
51
+ return Math.floor(A / t);
52
+ let N = 0, x = 0;
53
+ for (let D = 0; D < e.value.length; D += 1) {
54
+ const G = t(D);
55
+ if (N += G, N >= A) {
56
+ x = D;
55
57
  break;
56
58
  }
57
59
  }
58
- return R;
59
- }, p = () => {
60
+ return x;
61
+ }, g = () => {
60
62
  if (n.value = l.value.clientHeight, typeof t == "number")
61
63
  return Math.ceil(n.value / t);
62
- const S = m.value ?? 0;
63
- let $ = 0, D = 0;
64
- for (let R = S; R < e.value.length; R += 1) {
65
- const N = t(R);
66
- if ($ += N, D = R, $ > n.value)
64
+ const S = v.value ?? 0;
65
+ let A = 0, N = 0;
66
+ for (let x = S; x < e.value.length; x += 1) {
67
+ const D = t(x);
68
+ if (A += D, N = x, A > n.value)
67
69
  break;
68
70
  }
69
- return D - S;
70
- }, f = () => {
71
+ return N - S;
72
+ }, p = () => {
71
73
  if (l.value) {
72
- const S = p();
73
- m.value = h(), C.value = Math.min(m.value + S + c, e.value.length), r.value = e.value.slice(m.value, C.value);
74
+ const S = g();
75
+ v.value = C(), h.value = Math.min(v.value + S + c, e.value.length), r.value = e.value.slice(v.value, h.value);
74
76
  }
75
- }, A = () => {
76
- f();
77
+ }, k = () => {
78
+ p();
77
79
  };
78
- s || (je(() => {
79
- l.value && (n.value = l.value.clientHeight, a = ot(l.value, ({ clientHeight: S }) => {
80
- n.value = S, f();
81
- }), f());
82
- }), He(() => {
80
+ s || (Ve(() => {
81
+ l.value && (n.value = l.value.clientHeight, a = rt(l.value, ({ clientHeight: S }) => {
82
+ n.value = S, p();
83
+ }), p());
84
+ }), Xe(() => {
83
85
  a == null || a.disconnect();
84
- }), fe(
86
+ }), ge(
85
87
  () => e.value,
86
88
  () => {
87
- f();
89
+ p();
88
90
  }
89
91
  ));
90
92
  const w = {
@@ -101,13 +103,13 @@ function nt(e, { disabled: s, itemHeight: t, overscan: c = 5, prefixHeight: i })
101
103
  } : {
102
104
  containerRef: l,
103
105
  containerProps: w,
104
- onScroll: A,
106
+ onScroll: k,
105
107
  list: r,
106
108
  wrapperProps: o
107
109
  };
108
110
  }
109
- var u = /* @__PURE__ */ ((e) => (e.SELECT = "select", e.SHOW_MORE = "show-more", e.ESCAPE = "escape-pressed", e.CLICK = "click", e.ENTER = "enter-pressed", e.SPACE = "space-pressed", e.TAB = "tab-pressed", e.CLOSE_DROPDOWN = "close-dropdown", e))(u || {}), oe = /* @__PURE__ */ ((e) => (e.AUTOMATIC = "automatic", e.BUTTON = "button", e.NONE = "none", e))(oe || {});
110
- const it = Q({
111
+ var b = /* @__PURE__ */ ((e) => (e.SELECT = "select", e.SHOW_MORE = "show-more", e.ESCAPE = "escape-pressed", e.CLICK = "click", e.ENTER = "enter-pressed", e.SPACE = "space-pressed", e.TAB = "tab-pressed", e.CLOSE_DROPDOWN = "close-dropdown", e))(b || {}), oe = /* @__PURE__ */ ((e) => (e.AUTOMATIC = "automatic", e.BUTTON = "button", e.NONE = "none", e))(oe || {});
112
+ const dt = Z({
111
113
  name: "bento-listbox-static-category",
112
114
  components: {
113
115
  BentoTypography: re
@@ -121,26 +123,26 @@ const it = Q({
121
123
  required: !0
122
124
  }
123
125
  }
124
- }), at = { class: "b-listbox-single-select-category" };
125
- function rt(e, s, t, c, i, l) {
126
- const r = I("bento-typography");
127
- return b(), T("div", at, [
126
+ }), ut = { class: "b-listbox-single-select-category" };
127
+ function bt(e, s, t, c, i, l) {
128
+ const r = L("bento-typography");
129
+ return d(), _("div", ut, [
128
130
  P(r, {
129
131
  variant: "caption",
130
132
  el: "span",
131
133
  class: "b-listbox-single-select-category__label-text"
132
134
  }, {
133
- default: L(() => [
134
- F(z(e.categoryLabel), 1)
135
+ default: T(() => [
136
+ Y(F(e.categoryLabel), 1)
135
137
  ]),
136
138
  _: 1
137
139
  }),
138
- H("div", null, [
139
- Y(e.$slots, "default", {}, void 0, !0)
140
+ W("div", null, [
141
+ q(e.$slots, "default", {}, void 0, !0)
140
142
  ])
141
143
  ]);
142
144
  }
143
- const ct = /* @__PURE__ */ X(it, [["render", rt], ["__scopeId", "data-v-a90eff17"]]), dt = Q({
145
+ const mt = /* @__PURE__ */ X(dt, [["render", bt], ["__scopeId", "data-v-a90eff17"]]), vt = Z({
144
146
  name: "bento-listbox-option",
145
147
  props: {
146
148
  /**
@@ -152,21 +154,21 @@ const ct = /* @__PURE__ */ X(it, [["render", rt], ["__scopeId", "data-v-a90eff17
152
154
  */
153
155
  selected: { type: Boolean, default: !1 }
154
156
  },
155
- emits: [u.CLICK, u.ENTER, u.SPACE, u.TAB],
157
+ emits: [b.CLICK, b.ENTER, b.SPACE, b.TAB],
156
158
  setup(e, { emit: s }) {
157
- const t = g(() => ({
159
+ const t = m(() => ({
158
160
  "b-listbox-option--disabled": e.disabled,
159
161
  "b-listbox-option--selected": e.selected
160
162
  }));
161
163
  return {
162
164
  // Enums
163
- BentoKeyboardNavigationKeyDownEvent: G,
164
- BentoListboxEvent: u,
165
+ BentoKeyboardNavigationKeyDownEvent: z,
166
+ BentoListboxEvent: b,
165
167
  // Values
166
168
  conditionalClasses: t,
167
169
  // Events
168
170
  onClick: (l) => {
169
- s(u.CLICK, l);
171
+ s(b.CLICK, l);
170
172
  },
171
173
  onOptionSelected: (l, r) => {
172
174
  s(l, r);
@@ -174,49 +176,49 @@ const ct = /* @__PURE__ */ X(it, [["render", rt], ["__scopeId", "data-v-a90eff17
174
176
  };
175
177
  }
176
178
  });
177
- function ut(e, s, t, c, i, l) {
178
- return b(), T("div", U({
179
+ function ft(e, s, t, c, i, l) {
180
+ return d(), _("div", U({
179
181
  class: ["b-listbox-option", e.conditionalClasses],
180
182
  role: "option"
181
183
  }, e.$attrs, {
182
184
  onClick: s[0] || (s[0] = (...r) => e.onClick && e.onClick(...r)),
183
185
  onKeydown: [
184
- s[1] || (s[1] = pe((r) => e.onOptionSelected(e.BentoListboxEvent.ENTER, r), ["enter"])),
185
- s[2] || (s[2] = pe((r) => e.onOptionSelected(e.BentoListboxEvent.SPACE, r), ["space"])),
186
- s[3] || (s[3] = pe((r) => e.onOptionSelected(e.BentoListboxEvent.TAB, r), ["tab"]))
186
+ s[1] || (s[1] = Se((r) => e.onOptionSelected(e.BentoListboxEvent.ENTER, r), ["enter"])),
187
+ s[2] || (s[2] = Se((r) => e.onOptionSelected(e.BentoListboxEvent.SPACE, r), ["space"])),
188
+ s[3] || (s[3] = Se((r) => e.onOptionSelected(e.BentoListboxEvent.TAB, r), ["tab"]))
187
189
  ]
188
190
  }), [
189
- Y(e.$slots, "default", {}, void 0, !0)
191
+ q(e.$slots, "default", {}, void 0, !0)
190
192
  ], 16);
191
193
  }
192
- const ge = /* @__PURE__ */ X(dt, [["render", ut], ["__scopeId", "data-v-b7af43a6"]]);
193
- let Ae = 0;
194
- const bt = {
194
+ const ye = /* @__PURE__ */ X(vt, [["render", ft], ["__scopeId", "data-v-b7af43a6"]]);
195
+ let Ie = 0;
196
+ const pt = {
195
197
  beforeCreate() {
196
- this.uuid = Ae.toString(), Ae += 1;
198
+ this.uuid = Ie.toString(), Ie += 1;
197
199
  }
198
- }, mt = { key: 0 };
199
- function vt(e, s, t, c, i, l) {
200
- return b(), T("svg", U({ role: "img" }, e.$attrs, {
200
+ }, gt = { key: 0 };
201
+ function yt(e, s, t, c, i, l) {
202
+ return d(), _("svg", U({ role: "img" }, e.$attrs, {
201
203
  class: "ui-assets-icons-16",
202
204
  xmlns: "http://www.w3.org/2000/svg",
203
205
  width: "16",
204
206
  height: "16",
205
207
  fill: "none"
206
208
  }), [
207
- e.$attrs["svg-title"] ? (b(), T("title", mt, z(e.$attrs["svg-title"]), 1)) : j("", !0),
208
- s[0] || (s[0] = H("path", {
209
+ e.$attrs["svg-title"] ? (d(), _("title", gt, F(e.$attrs["svg-title"]), 1)) : K("", !0),
210
+ s[0] || (s[0] = W("path", {
209
211
  fill: "#001222",
210
212
  d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z"
211
213
  }, null, -1))
212
214
  ], 16);
213
215
  }
214
- const ft = /* @__PURE__ */ X(bt, [["render", vt]]), gt = Q({
216
+ const St = /* @__PURE__ */ X(pt, [["render", yt]]), ht = Z({
215
217
  name: "bento-listbox-single-select-option",
216
218
  components: {
217
- BentoListboxOption: ge,
219
+ BentoListboxOption: ye,
218
220
  BentoTypography: re,
219
- CheckmarkIcon: ft
221
+ CheckmarkIcon: St
220
222
  },
221
223
  props: {
222
224
  /**
@@ -236,26 +238,26 @@ const ft = /* @__PURE__ */ X(bt, [["render", vt]]), gt = Q({
236
238
  */
237
239
  selected: { type: Boolean, default: !1 }
238
240
  },
239
- emits: [u.ENTER, u.SELECT, u.SPACE, u.TAB],
241
+ emits: [b.ENTER, b.SELECT, b.SPACE, b.TAB],
240
242
  setup(e, { emit: s }) {
241
243
  const t = (r) => {
242
244
  e.disabled || s(r, e.option);
243
- }, c = g(() => e.disabled ? !0 : null), i = g(() => e.selected ? !0 : null), l = g(() => e.disabled ? -1 : 0);
245
+ }, c = m(() => e.disabled ? !0 : null), i = m(() => e.selected ? !0 : null), l = m(() => e.disabled ? -1 : 0);
244
246
  return {
245
247
  // Values
246
248
  ariaDisabled: c,
247
249
  ariaSelected: i,
248
250
  tabIndex: l,
249
251
  // Enums
250
- BentoListboxEvent: u,
252
+ BentoListboxEvent: b,
251
253
  // Events
252
254
  onOptionSelected: t
253
255
  };
254
256
  }
255
- }), pt = { class: "b-listbox-single-select-option__text" }, yt = { class: "b-listbox-single-select-option__check-icon" };
256
- function St(e, s, t, c, i, l) {
257
- const r = I("bento-typography"), m = I("checkmark-icon"), C = I("bento-listbox-option");
258
- return b(), B(C, {
257
+ }), Ct = { class: "b-listbox-single-select-option__text" }, Et = { class: "b-listbox-single-select-option__check-icon" };
258
+ function _t(e, s, t, c, i, l) {
259
+ const r = L("bento-typography"), v = L("checkmark-icon"), h = L("bento-listbox-option");
260
+ return d(), $(h, {
259
261
  class: "b-listbox-single-select-option",
260
262
  disabled: e.disabled,
261
263
  selected: e.selected,
@@ -267,41 +269,41 @@ function St(e, s, t, c, i, l) {
267
269
  onSpacePressed: s[2] || (s[2] = ie((n) => e.onOptionSelected(e.BentoListboxEvent.SPACE), ["prevent"])),
268
270
  onTabPressed: s[3] || (s[3] = (n) => e.onOptionSelected(e.BentoListboxEvent.TAB))
269
271
  }, {
270
- default: L(() => [
271
- Y(e.$slots, "default", ne(be(e.option)), () => [
272
- H("span", pt, [
272
+ default: T(() => [
273
+ q(e.$slots, "default", ne(be(e.option)), () => [
274
+ W("span", Ct, [
273
275
  P(r, { el: "span" }, {
274
- default: L(() => [
275
- F(z(e.option.label), 1)
276
+ default: T(() => [
277
+ Y(F(e.option.label), 1)
276
278
  ]),
277
279
  _: 1
278
280
  }),
279
- e.option.description ? (b(), B(r, {
281
+ e.option.description ? (d(), $(r, {
280
282
  key: 0,
281
283
  class: "b-listbox-single-select-option__description",
282
284
  el: "span"
283
285
  }, {
284
- default: L(() => [
285
- F(z(e.option.description), 1)
286
+ default: T(() => [
287
+ Y(F(e.option.description), 1)
286
288
  ]),
287
289
  _: 1
288
- })) : j("", !0)
290
+ })) : K("", !0)
289
291
  ])
290
292
  ], !0),
291
- H("span", yt, [
292
- ae(P(m, { "svg-title": "selected" }, null, 512), [
293
- [ke, e.selected]
293
+ W("span", Et, [
294
+ ae(P(v, { "svg-title": "selected" }, null, 512), [
295
+ [Be, e.selected]
294
296
  ])
295
297
  ])
296
298
  ]),
297
299
  _: 3
298
300
  }, 8, ["disabled", "selected", "aria-selected", "aria-disabled", "tabindex"]);
299
301
  }
300
- const Ct = /* @__PURE__ */ X(gt, [["render", St], ["__scopeId", "data-v-226f4c84"]]), De = ({ items: e, hasStaticCategories: s }, t) => {
301
- const c = g(
302
- () => s.value ? e.value.flatMap((f) => f.items) : e.value
303
- ), i = g(() => c.value.length - 1), l = k(0), r = (f) => {
304
- switch (f) {
302
+ const Ot = /* @__PURE__ */ X(ht, [["render", _t], ["__scopeId", "data-v-226f4c84"]]), Pe = ({ items: e, hasStaticCategories: s }, t) => {
303
+ const c = m(
304
+ () => s.value ? e.value.flatMap((p) => p.items) : e.value
305
+ ), i = m(() => c.value.length - 1), l = B(0), r = (p) => {
306
+ switch (p) {
305
307
  case "increase":
306
308
  l.value += 1;
307
309
  break;
@@ -309,18 +311,18 @@ const Ct = /* @__PURE__ */ X(gt, [["render", St], ["__scopeId", "data-v-226f4c84
309
311
  l.value -= 1;
310
312
  break;
311
313
  }
312
- }, m = ({ edgeCaseItem: f }, A) => {
313
- l.value !== f && (r(A), t(l.value));
314
- }, C = (f) => {
315
- p(f), m(
314
+ }, v = ({ edgeCaseItem: p }, k) => {
315
+ l.value !== p && (r(k), t(l.value));
316
+ }, h = (p) => {
317
+ g(p), v(
316
318
  {
317
319
  edgeCaseItem: i.value
318
320
  },
319
321
  "increase"
320
322
  /* INCREASE */
321
323
  );
322
- }, n = (f) => {
323
- p(f), m(
324
+ }, n = (p) => {
325
+ g(p), v(
324
326
  {
325
327
  edgeCaseItem: 0
326
328
  },
@@ -331,28 +333,28 @@ const Ct = /* @__PURE__ */ X(gt, [["render", St], ["__scopeId", "data-v-226f4c84
331
333
  l.value = 0, t(l.value);
332
334
  }, o = () => {
333
335
  l.value = i.value, t(l.value);
334
- }, h = (f) => {
335
- l.value = f;
336
- }, p = (f) => {
337
- var A;
338
- (A = f == null ? void 0 : f.detail) == null || A.preventDefault();
336
+ }, C = (p) => {
337
+ l.value = p;
338
+ }, g = (p) => {
339
+ var k;
340
+ (k = p == null ? void 0 : p.detail) == null || k.preventDefault();
339
341
  };
340
342
  return {
341
343
  moveToFirstElement: a,
342
344
  moveToLastElement: o,
343
- moveToNextElement: C,
345
+ moveToNextElement: h,
344
346
  moveToPreviousElement: n,
345
- setListboxFocusedIndex: h,
346
- preventDefault: p,
347
+ setListboxFocusedIndex: C,
348
+ preventDefault: g,
347
349
  focusedIndex: l
348
350
  };
349
- }, ht = Q({
351
+ }, Tt = Z({
350
352
  name: "bento-listbox-single-select",
351
353
  components: {
352
- BentoListboxSingleSelectCategory: ct,
353
- BentoListboxSingleSelectOption: Ct
354
+ BentoListboxSingleSelectCategory: mt,
355
+ BentoListboxSingleSelectOption: Ot
354
356
  },
355
- directives: { BentoKeyboardNavigationDirective: ve },
357
+ directives: { BentoKeyboardNavigationDirective: pe },
356
358
  inheritAttrs: !1,
357
359
  props: {
358
360
  /**
@@ -393,38 +395,38 @@ const Ct = /* @__PURE__ */ X(gt, [["render", St], ["__scopeId", "data-v-226f4c84
393
395
  */
394
396
  staticCategories: { type: Boolean, default: !1 }
395
397
  },
396
- emits: [u.SELECT, u.ENTER, u.SPACE, u.TAB],
398
+ emits: [b.SELECT, b.ENTER, b.SPACE, b.TAB],
397
399
  setup(e, { emit: s, expose: t, slots: c }) {
398
- const i = k(null), l = k([]), r = g(() => {
400
+ const i = B(null), l = B([]), r = m(() => {
399
401
  var S;
400
402
  return !!((S = e.selectedValue) != null && S.length) && e.selectedValue.at(0);
401
- }), m = g(() => !!e.items.some(({ items: S }) => !!S)), C = (S) => ($) => {
402
- s(S, [$]);
403
+ }), v = m(() => !!e.items.some(({ items: S }) => !!S)), h = (S) => (A) => {
404
+ s(S, [A]);
403
405
  }, n = (S) => {
404
- var $;
405
- ($ = i.value.querySelectorAll('[role="option"]')[S]) == null || $.focus();
406
+ var A;
407
+ (A = i.value.querySelectorAll('[role="option"]')[S]) == null || A.focus();
406
408
  }, {
407
409
  moveToNextElement: a,
408
410
  moveToPreviousElement: o,
409
- moveToFirstElement: h,
410
- moveToLastElement: p,
411
- setListboxFocusedIndex: f
412
- } = De(
411
+ moveToFirstElement: C,
412
+ moveToLastElement: g,
413
+ setListboxFocusedIndex: p
414
+ } = Pe(
413
415
  {
414
- items: ee(e, "items"),
415
- hasStaticCategories: ee(e, "staticCategories")
416
+ items: te(e, "items"),
417
+ hasStaticCategories: te(e, "staticCategories")
416
418
  },
417
419
  n
418
- ), A = {
419
- [G.ARROW_UP]: o,
420
- [G.ARROW_DOWN]: a,
421
- [G.HOME]: h,
422
- [G.END]: p
420
+ ), k = {
421
+ [z.ARROW_UP]: o,
422
+ [z.ARROW_DOWN]: a,
423
+ [z.HOME]: C,
424
+ [z.END]: g
423
425
  }, w = {
424
- [u.SELECT]: C(u.SELECT),
425
- [u.SPACE]: C(u.SPACE),
426
- [u.TAB]: C(u.TAB),
427
- [u.ENTER]: C(u.ENTER)
426
+ [b.SELECT]: h(b.SELECT),
427
+ [b.SPACE]: h(b.SPACE),
428
+ [b.TAB]: h(b.TAB),
429
+ [b.ENTER]: h(b.ENTER)
428
430
  };
429
431
  return t({
430
432
  /**
@@ -436,35 +438,35 @@ const Ct = /* @__PURE__ */ X(gt, [["render", St], ["__scopeId", "data-v-226f4c84
436
438
  * Method to set the index of the item to be focused on
437
439
  * Used for focus management to be kept in-sync with parent e.g. dropdowns
438
440
  */
439
- setListboxFocusedIndex: f
441
+ setListboxFocusedIndex: p
440
442
  }), {
441
443
  // Enums
442
- BentoListboxEvent: u,
444
+ BentoListboxEvent: b,
443
445
  // Values
444
446
  listboxRef: i,
445
447
  listboxItemRef: l,
446
448
  selectedItem: r,
447
449
  slots: c,
448
450
  // Computed
449
- hasCategories: m,
451
+ hasCategories: v,
450
452
  // Methods
451
- onOptionSelected: C,
453
+ onOptionSelected: h,
452
454
  // Keyboard navigation
453
- listboxListeners: A,
455
+ listboxListeners: k,
454
456
  listboxOptionListeners: w
455
457
  };
456
458
  }
457
459
  });
458
- function Et(e, s, t, c, i, l) {
459
- const r = I("bento-listbox-single-select-option"), m = I("bento-listbox-single-select-category"), C = Re("bento-keyboard-navigation-directive");
460
- return ae((b(), T("div", U({ ref: "listboxRef" }, te(e.listboxListeners, !0)), [
461
- e.hasCategories && e.staticCategories ? (b(!0), T(se, { key: 0 }, q(e.items, (n) => (b(), B(m, {
460
+ function kt(e, s, t, c, i, l) {
461
+ const r = L("bento-listbox-single-select-option"), v = L("bento-listbox-single-select-category"), h = Re("bento-keyboard-navigation-directive");
462
+ return ae((d(), _("div", U({ ref: "listboxRef" }, se(e.listboxListeners, !0)), [
463
+ e.hasCategories && e.staticCategories ? (d(!0), _(le, { key: 0 }, V(e.items, (n) => (d(), $(v, {
462
464
  key: n.value,
463
465
  "category-label": n.label,
464
466
  role: "group"
465
467
  }, {
466
- default: L(() => [
467
- (b(!0), T(se, null, q(n.items, (a) => (b(), B(r, U({
468
+ default: T(() => [
469
+ (d(!0), _(le, null, V(n.items, (a) => (d(), $(r, U({
468
470
  key: a.value,
469
471
  ref_for: !0,
470
472
  ref: "listboxItemRef",
@@ -472,17 +474,17 @@ function Et(e, s, t, c, i, l) {
472
474
  option: a,
473
475
  disabled: e.isOptionDisabled ? e.isOptionDisabled(a) : null,
474
476
  selected: a.value === e.selectedItem.value
475
- }, te(e.listboxOptionListeners)), me({ _: 2 }, [
476
- q(e.slots, (o, h) => ({
477
- name: h,
478
- fn: L((p) => [
479
- Y(e.$slots, h, U({ ref_for: !0 }, p))
477
+ }, se(e.listboxOptionListeners)), me({ _: 2 }, [
478
+ V(e.slots, (o, C) => ({
479
+ name: C,
480
+ fn: T((g) => [
481
+ q(e.$slots, C, U({ ref_for: !0 }, g))
480
482
  ])
481
483
  }))
482
484
  ]), 1040, ["option", "disabled", "selected"]))), 128))
483
485
  ]),
484
486
  _: 2
485
- }, 1032, ["category-label"]))), 128)) : (b(!0), T(se, { key: 1 }, q(e.items, (n) => (b(), B(r, U({
487
+ }, 1032, ["category-label"]))), 128)) : (d(!0), _(le, { key: 1 }, V(e.items, (n) => (d(), $(r, U({
486
488
  key: n.value,
487
489
  ref_for: !0,
488
490
  ref: "listboxItemRef",
@@ -490,34 +492,70 @@ function Et(e, s, t, c, i, l) {
490
492
  option: n,
491
493
  disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null,
492
494
  selected: n.value === e.selectedItem.value
493
- }, te(e.listboxOptionListeners)), me({ _: 2 }, [
494
- q(e.slots, (a, o) => ({
495
+ }, se(e.listboxOptionListeners)), me({ _: 2 }, [
496
+ V(e.slots, (a, o) => ({
495
497
  name: o,
496
- fn: L((h) => [
497
- Y(e.$slots, o, U({ ref_for: !0 }, h))
498
+ fn: T((C) => [
499
+ q(e.$slots, o, U({ ref_for: !0 }, C))
498
500
  ])
499
501
  }))
500
502
  ]), 1040, ["option", "disabled", "selected"]))), 128))
501
503
  ], 16)), [
502
- [C]
504
+ [h]
503
505
  ]);
504
506
  }
505
- const Ot = /* @__PURE__ */ X(ht, [["render", Et]]);
506
- var Se = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(Se || {}), ue = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.UNSELECT_CATEGORY = "unselect-category", e))(ue || {});
507
- const Tt = {
507
+ const At = /* @__PURE__ */ X(Tt, [["render", kt]]), Lt = {}, It = /* @__PURE__ */ Z({
508
+ ...Lt,
509
+ __name: "listbox-decorative-checkbox",
510
+ props: {
511
+ disabled: { type: Boolean, default: !1 },
512
+ indeterminate: { type: Boolean, default: !1 },
513
+ checked: { type: Boolean, default: !1 }
514
+ },
515
+ setup(e) {
516
+ const s = e, t = m(() => ({
517
+ [`b-checkbox-input--${fe.DISABLED}`]: s.disabled
518
+ })), c = m(() => ({
519
+ [`b-checkbox-input__outline--${fe.UNCHECKED}`]: !s.checked && !s.indeterminate,
520
+ [`b-checkbox-input__outline--${fe.CHECKED}`]: s.checked && !s.indeterminate,
521
+ [`b-checkbox-input__outline--${fe.INDETERMINATE}`]: s.indeterminate
522
+ }));
523
+ return (i, l) => (d(), _("div", {
524
+ class: ve(["b-checkbox-input", t.value]),
525
+ role: "presentation"
526
+ }, [
527
+ i.indeterminate ? (d(), $(R(lt), {
528
+ key: 0,
529
+ class: "b-checkbox-input__icon",
530
+ "svg-title": "",
531
+ "aria-hidden": "true"
532
+ })) : i.checked ? (d(), $(R(ot), {
533
+ key: 1,
534
+ class: "b-checkbox-input__icon",
535
+ "svg-title": "",
536
+ "aria-hidden": "true"
537
+ })) : K("", !0),
538
+ W("div", {
539
+ class: ve(["b-checkbox-input__outline", c.value])
540
+ }, null, 2)
541
+ ], 2));
542
+ }
543
+ }), _e = /* @__PURE__ */ X(It, [["__scopeId", "data-v-c604b68a"]]);
544
+ var he = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(he || {}), ue = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.UNSELECT_CATEGORY = "unselect-category", e))(ue || {});
545
+ const $t = {
508
546
  "en-US": {
509
547
  categoryClosed: "{category} closed",
510
548
  categoryOpened: "{category} opened"
511
549
  }
512
- }, _t = Q({
513
- i18n: { messages: Tt },
550
+ }, Dt = Z({
551
+ i18n: { messages: $t },
514
552
  name: "bento-listbox-multi-select-category",
515
553
  components: {
516
- BentoCheckbox: Ee,
517
554
  BentoTypography: re,
518
- BentoListboxOption: ge,
519
- ChevronDownIcon: st,
520
- ChevronUpIcon: tt
555
+ BentoListboxOption: ye,
556
+ ChevronDownIcon: nt,
557
+ ChevronUpIcon: it,
558
+ ListboxDecorativeCheckbox: _e
521
559
  },
522
560
  props: {
523
561
  /**
@@ -564,110 +602,110 @@ const Tt = {
564
602
  },
565
603
  emits: [ue.SELECT_CATEGORY, ue.UNSELECT_CATEGORY],
566
604
  setup(e, { emit: s }) {
567
- const t = k(!1), { t: c } = he(), i = (_) => e.isOptionDisabled ? e.isOptionDisabled(_) : !1, l = g(
568
- () => e.category.items.every((_) => i(_))
569
- ), r = ee(e, "staticCategories"), m = g(() => t.value || e.staticCategories), C = g(() => ({
570
- [`b-listbox-multi-select-category--${Se.DISABLED}`]: l.value,
571
- [`b-listbox-multi-select-category--${Se.STATIC_CATEGORY}`]: e.staticCategories
572
- })), n = (_) => {
573
- _.preventDefault(), t.value = !t.value;
574
- }, a = (_) => {
575
- var V;
576
- const W = i(_), K = ((V = e.selectedItemsList) == null ? void 0 : V.includes(_.value)) || !1;
577
- return { isDisabled: W, isPreSelected: K };
578
- }, o = g(
579
- () => e.category.items.filter((_) => {
580
- const { isDisabled: W, isPreSelected: K } = a(_);
581
- return W && K || !W;
605
+ const t = B(!1), { t: c } = Ee(), i = (I) => e.isOptionDisabled ? e.isOptionDisabled(I) : !1, l = m(
606
+ () => e.category.items.every((I) => i(I))
607
+ ), r = te(e, "staticCategories"), v = m(() => t.value || e.staticCategories), h = m(() => ({
608
+ [`b-listbox-multi-select-category--${he.DISABLED}`]: l.value,
609
+ [`b-listbox-multi-select-category--${he.STATIC_CATEGORY}`]: e.staticCategories
610
+ })), n = (I) => {
611
+ I.preventDefault(), t.value = !t.value;
612
+ }, a = (I) => {
613
+ var J;
614
+ const H = i(I), j = ((J = e.selectedItemsList) == null ? void 0 : J.includes(I.value)) || !1;
615
+ return { isDisabled: H, isPreSelected: j };
616
+ }, o = m(
617
+ () => e.category.items.filter((I) => {
618
+ const { isDisabled: H, isPreSelected: j } = a(I);
619
+ return H && j || !H;
582
620
  })
583
- ), h = g(
621
+ ), C = m(
584
622
  () => {
585
- var _;
586
- return (_ = o.value) == null ? void 0 : _.filter(
587
- ({ value: W }) => {
588
- var K;
589
- return (K = e.selectedItemsList) == null ? void 0 : K.includes(W);
623
+ var I;
624
+ return (I = o.value) == null ? void 0 : I.filter(
625
+ ({ value: H }) => {
626
+ var j;
627
+ return (j = e.selectedItemsList) == null ? void 0 : j.includes(H);
590
628
  }
591
629
  );
592
630
  }
593
- ), p = g(() => {
594
- const _ = t.value ? "categoryOpened" : "categoryClosed";
595
- return c(_, { category: e.category.label });
596
- }), f = g(
631
+ ), g = m(() => {
632
+ const I = t.value ? "categoryOpened" : "categoryClosed";
633
+ return c(I, { category: e.category.label });
634
+ }), p = m(
597
635
  () => ({
598
636
  el: "span",
599
637
  variant: e.staticCategories ? "caption" : "body"
600
638
  })
601
- ), A = () => {
639
+ ), k = () => {
602
640
  s(ue.SELECT_CATEGORY);
603
641
  }, w = () => {
604
642
  s(ue.UNSELECT_CATEGORY);
605
- }, { isAllSelected: S, isIndeterminate: $, toggleSelectAll: D } = Be(
606
- h,
643
+ }, { isAllSelected: S, isIndeterminate: A, toggleSelectAll: N } = Ne(
644
+ C,
607
645
  o,
608
- A,
646
+ k,
609
647
  w
610
- ), R = k(S.value), N = () => {
611
- R.value = !R.value, D(R.value);
648
+ ), x = m(() => A.value ? "mixed" : `${S.value}`), D = B(S.value), G = () => {
649
+ D.value = !D.value, N(D.value);
612
650
  };
613
- return fe(S, () => {
614
- R.value = S.value;
651
+ return ge(S, () => {
652
+ D.value = S.value;
615
653
  }), {
616
654
  // Values
617
- chevronTitle: p,
618
- conditionalClass: C,
655
+ chevronTitle: g,
656
+ conditionalClass: h,
619
657
  hasAllPropsDisabled: l,
620
658
  isOpen: t,
621
659
  isAllSelected: S,
622
- isIndeterminate: $,
660
+ isIndeterminate: A,
623
661
  isStaticCategory: r,
624
662
  // Computed
625
- showItemChildren: m,
626
- categoryLabelProps: f,
663
+ showItemChildren: v,
664
+ categoryLabelProps: p,
665
+ ariaCheckedComputed: x,
627
666
  // Methods
628
- handleSelectAll: N,
667
+ handleSelectAll: G,
629
668
  toggleOpen: n,
630
- toggleSelectAll: D
669
+ toggleSelectAll: N
631
670
  };
632
671
  }
633
- }), Lt = { class: "b-listbox-multi-select-category__label" };
634
- function At(e, s, t, c, i, l) {
635
- const r = I("bento-checkbox"), m = I("bento-typography"), C = I("chevron-up-icon"), n = I("chevron-down-icon"), a = I("bento-listbox-option");
636
- return b(), T("div", null, [
672
+ }), Bt = { class: "b-listbox-multi-select-category__label" };
673
+ function Rt(e, s, t, c, i, l) {
674
+ const r = L("listbox-decorative-checkbox"), v = L("bento-typography"), h = L("chevron-up-icon"), n = L("chevron-down-icon"), a = L("bento-listbox-option");
675
+ return d(), _("div", null, [
637
676
  P(a, {
638
- class: ye(["b-listbox-multi-select-category__option", e.conditionalClass]),
677
+ class: ve(["b-listbox-multi-select-category__option", e.conditionalClass]),
639
678
  tabindex: e.tabindex,
679
+ "aria-checked": e.ariaCheckedComputed,
680
+ "aria-disabled": e.hasAllPropsDisabled,
640
681
  onClick: e.handleSelectAll,
641
682
  onEnterPressed: e.handleSelectAll,
642
683
  onSpacePressed: ie(e.handleSelectAll, ["prevent"])
643
684
  }, {
644
- default: L(() => [
645
- e.isStaticCategory ? j("", !0) : (b(), B(r, {
685
+ default: T(() => [
686
+ e.isStaticCategory ? K("", !0) : (d(), $(r, {
646
687
  key: 0,
647
- "model-value": e.isAllSelected,
648
688
  indeterminate: e.isIndeterminate,
649
689
  disabled: e.hasAllPropsDisabled,
650
- "aria-label": e.category.label,
651
- value: e.category.value,
652
- tabindex: -1
653
- }, null, 8, ["model-value", "indeterminate", "disabled", "aria-label", "value"])),
654
- H("span", Lt, [
655
- P(m, U(e.categoryLabelProps, { class: "b-listbox-multi-select-category__label-text" }), {
656
- default: L(() => [
657
- F(z(e.category.label), 1)
690
+ checked: e.isAllSelected
691
+ }, null, 8, ["indeterminate", "disabled", "checked"])),
692
+ W("span", Bt, [
693
+ P(v, U(e.categoryLabelProps, { class: "b-listbox-multi-select-category__label-text" }), {
694
+ default: T(() => [
695
+ Y(F(e.category.label), 1)
658
696
  ]),
659
697
  _: 1
660
698
  }, 16),
661
- e.isStaticCategory ? j("", !0) : (b(), T("div", {
699
+ e.isStaticCategory ? K("", !0) : (d(), _("div", {
662
700
  key: 0,
663
701
  class: "b-listbox-multi-select-category__label-chevron",
664
702
  "data-testid": "toggle-listbox",
665
703
  onClickCapture: s[0] || (s[0] = ie((...o) => e.toggleOpen && e.toggleOpen(...o), ["stop"]))
666
704
  }, [
667
- e.isOpen ? (b(), B(C, {
705
+ e.isOpen ? (d(), $(h, {
668
706
  key: 0,
669
707
  "svg-title": e.chevronTitle
670
- }, null, 8, ["svg-title"])) : (b(), B(n, {
708
+ }, null, 8, ["svg-title"])) : (d(), $(n, {
671
709
  key: 1,
672
710
  "svg-title": e.chevronTitle
673
711
  }, null, 8, ["svg-title"]))
@@ -675,23 +713,23 @@ function At(e, s, t, c, i, l) {
675
713
  ])
676
714
  ]),
677
715
  _: 1
678
- }, 8, ["class", "tabindex", "onClick", "onEnterPressed", "onSpacePressed"]),
679
- ae(H("div", null, [
680
- Y(e.$slots, "default", {}, void 0, !0)
716
+ }, 8, ["class", "tabindex", "aria-checked", "aria-disabled", "onClick", "onEnterPressed", "onSpacePressed"]),
717
+ ae(W("div", null, [
718
+ q(e.$slots, "default", {}, void 0, !0)
681
719
  ], 512), [
682
- [ke, e.showItemChildren]
720
+ [Be, e.showItemChildren]
683
721
  ])
684
722
  ]);
685
723
  }
686
- const It = /* @__PURE__ */ X(_t, [["render", At], ["__scopeId", "data-v-92af4c61"]]);
687
- var Z = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", e.UNSELECT_CATEGORY = "unselect-category", e))(Z || {});
688
- const $t = Q({
724
+ const Nt = /* @__PURE__ */ X(Dt, [["render", Rt], ["__scopeId", "data-v-c59132dd"]]);
725
+ var ee = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", e.UNSELECT_CATEGORY = "unselect-category", e))(ee || {});
726
+ const Pt = Z({
689
727
  name: "listbox-multi-select-options",
690
728
  components: {
691
- BentoCheckbox: Ee,
692
- BentoListboxOption: ge,
729
+ BentoListboxOption: ye,
693
730
  BentoTypography: re,
694
- ListboxMultiSelectCategory: It
731
+ ListboxMultiSelectCategory: Nt,
732
+ ListboxDecorativeCheckbox: _e
695
733
  },
696
734
  props: {
697
735
  /**
@@ -753,26 +791,26 @@ const $t = Q({
753
791
  staticCategories: { type: Boolean, default: !1 }
754
792
  },
755
793
  emits: [
756
- Z.TOGGLE_CHECKBOX_SELECTION,
757
- Z.SELECT_CATEGORY,
758
- Z.UNSELECT_CATEGORY
794
+ ee.TOGGLE_CHECKBOX_SELECTION,
795
+ ee.SELECT_CATEGORY,
796
+ ee.UNSELECT_CATEGORY
759
797
  ],
760
798
  setup(e, { emit: s }) {
761
799
  const t = (n) => {
762
- e.isOptionDisabled(n) || s(Z.TOGGLE_CHECKBOX_SELECTION, n);
800
+ e.isOptionDisabled(n) || s(ee.TOGGLE_CHECKBOX_SELECTION, n);
763
801
  }, c = (n) => !!n.items, i = (n) => {
764
802
  const a = e.isMultiLevel && e.searching;
765
803
  return n.description && (!e.isMultiLevel || a);
766
804
  }, l = (n) => n.items ? !!n.items.find((a) => e.selectedItemsList.includes(a.value)) : e.selectedItemsList.includes(n.value), r = (n) => {
767
805
  if (c(n)) {
768
- const a = l(n) ? Z.UNSELECT_CATEGORY : Z.SELECT_CATEGORY;
806
+ const a = l(n) ? ee.UNSELECT_CATEGORY : ee.SELECT_CATEGORY;
769
807
  s(a, n);
770
808
  } else
771
809
  t(n);
772
810
  };
773
811
  return {
774
812
  // Values
775
- conditionalClasses: g(() => ({
813
+ conditionalClasses: m(() => ({
776
814
  "b-listbox-multi-select-options__static-category-option": e.staticCategories,
777
815
  "b-listbox-multi-select-options__category-option": e.categoryItems
778
816
  })),
@@ -783,68 +821,67 @@ const $t = Q({
783
821
  toggleSearchOption: r,
784
822
  computedTabindex: (n) => n + 1 === e.focusedIndex ? 0 : -1,
785
823
  // Enums
786
- BentoListboxEvent: u,
787
- ListboxMultiSelectOptionsEvent: Z
824
+ BentoListboxEvent: b,
825
+ ListboxMultiSelectOptionsEvent: ee
788
826
  };
789
827
  }
790
- }), kt = { class: "b-listbox-multi-select__option-text" }, Rt = { class: "b-listbox-multi-select__option-text" };
791
- function Bt(e, s, t, c, i, l) {
792
- const r = I("bento-checkbox"), m = I("bento-typography"), C = I("bento-listbox-option"), n = I("listbox-multi-select-options", !0), a = I("listbox-multi-select-category");
793
- return b(), T("div", null, [
794
- (b(!0), T(se, null, q(e.items, (o, h) => (b(), T("div", {
828
+ }), Mt = { class: "b-listbox-multi-select__option-text" }, wt = { class: "b-listbox-multi-select__option-text" };
829
+ function xt(e, s, t, c, i, l) {
830
+ const r = L("listbox-decorative-checkbox"), v = L("bento-typography"), h = L("bento-listbox-option"), n = L("listbox-multi-select-options", !0), a = L("listbox-multi-select-category");
831
+ return d(), _("div", null, [
832
+ (d(!0), _(le, null, V(e.items, (o, C) => (d(), _("div", {
795
833
  key: `selected-${o.value}`
796
834
  }, [
797
- e.searching && e.isMultiLevel ? (b(), B(C, {
835
+ e.searching && e.isMultiLevel ? (d(), $(h, {
798
836
  key: 0,
799
- class: ye(["b-listbox-multi-select-options", e.conditionalClasses]),
837
+ class: ve(["b-listbox-multi-select-options", e.conditionalClasses]),
800
838
  disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null,
801
- tabindex: e.computedTabindex(h),
802
- onClick: (p) => e.toggleSearchOption(o),
803
- onEnterPressed: (p) => e.toggleSearchOption(o),
804
- onSpacePressed: ie((p) => e.toggleSearchOption(o), ["prevent"])
839
+ tabindex: e.computedTabindex(C),
840
+ "aria-checked": `${e.isOptionSelected(o)}`,
841
+ "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(o) : null,
842
+ onClick: (g) => e.toggleSearchOption(o),
843
+ onEnterPressed: (g) => e.toggleSearchOption(o),
844
+ onSpacePressed: ie((g) => e.toggleSearchOption(o), ["prevent"])
805
845
  }, {
806
- default: L(() => [
846
+ default: T(() => [
807
847
  P(r, {
808
- "model-value": e.isOptionSelected(o),
809
- "aria-label": o.label,
810
848
  disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null,
811
- value: o.value,
812
- tabindex: "-1"
813
- }, null, 8, ["model-value", "aria-label", "disabled", "value"]),
814
- Y(e.$slots, "default", U({ ref_for: !0 }, o), () => [
815
- H("span", kt, [
816
- P(m, { el: "span" }, {
817
- default: L(() => [
818
- F(z(o.label), 1)
849
+ checked: e.isOptionSelected(o)
850
+ }, null, 8, ["disabled", "checked"]),
851
+ q(e.$slots, "default", U({ ref_for: !0 }, o), () => [
852
+ W("span", Mt, [
853
+ P(v, { el: "span" }, {
854
+ default: T(() => [
855
+ Y(F(o.label), 1)
819
856
  ]),
820
857
  _: 2
821
858
  }, 1024),
822
- e.shouldShowDescription(o) ? (b(), B(m, {
859
+ e.shouldShowDescription(o) ? (d(), $(v, {
823
860
  key: 0,
824
861
  class: "b-listbox-multi-select__option-description",
825
862
  el: "span"
826
863
  }, {
827
- default: L(() => [
828
- F(z(o.description), 1)
864
+ default: T(() => [
865
+ Y(F(o.description), 1)
829
866
  ]),
830
867
  _: 2
831
- }, 1024)) : j("", !0)
868
+ }, 1024)) : K("", !0)
832
869
  ])
833
870
  ], !0)
834
871
  ]),
835
872
  _: 2
836
- }, 1032, ["class", "disabled", "tabindex", "onClick", "onEnterPressed", "onSpacePressed"])) : (b(), T(se, { key: 1 }, [
837
- o.items ? (b(), B(a, {
873
+ }, 1032, ["class", "disabled", "tabindex", "aria-checked", "aria-disabled", "onClick", "onEnterPressed", "onSpacePressed"])) : (d(), _(le, { key: 1 }, [
874
+ o.items ? (d(), $(a, {
838
875
  key: 0,
839
876
  category: o,
840
877
  "static-categories": e.staticCategories,
841
878
  "is-option-disabled": e.isOptionDisabled,
842
879
  "selected-items-list": e.selectedItemsList,
843
- tabindex: e.computedTabindex(h),
844
- onSelectCategory: (p) => e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, o),
845
- onUnselectCategory: (p) => e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, o)
880
+ tabindex: e.computedTabindex(C),
881
+ onSelectCategory: (g) => e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, o),
882
+ onUnselectCategory: (g) => e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, o)
846
883
  }, {
847
- default: L(() => [
884
+ default: T(() => [
848
885
  P(n, {
849
886
  "category-items": "",
850
887
  items: o.items,
@@ -854,59 +891,58 @@ function Bt(e, s, t, c, i, l) {
854
891
  "static-categories": e.staticCategories,
855
892
  "selected-items-list": e.selectedItemsList,
856
893
  searching: e.searching,
857
- onToggleCheckboxSelection: s[0] || (s[0] = (p) => e.toggleCheckboxSelection(p))
894
+ onToggleCheckboxSelection: s[0] || (s[0] = (g) => e.toggleCheckboxSelection(g))
858
895
  }, null, 8, ["items", "is-option-disabled", "focused-index", "is-multi-level", "static-categories", "selected-items-list", "searching"])
859
896
  ]),
860
897
  _: 2
861
- }, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (b(), B(C, {
898
+ }, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (d(), $(h, {
862
899
  key: 1,
863
- class: ye(["b-listbox-multi-select-options", e.conditionalClasses]),
900
+ class: ve(["b-listbox-multi-select-options", e.conditionalClasses]),
864
901
  disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null,
865
- tabindex: e.computedTabindex(h),
866
- onClick: (p) => e.toggleCheckboxSelection(o),
867
- onEnterPressed: (p) => e.toggleCheckboxSelection(o),
868
- onSpacePressed: ie((p) => e.toggleCheckboxSelection(o), ["prevent"])
902
+ tabindex: e.computedTabindex(C),
903
+ "aria-checked": `${e.isOptionSelected(o)}`,
904
+ "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(o) : null,
905
+ onClick: (g) => e.toggleCheckboxSelection(o),
906
+ onEnterPressed: (g) => e.toggleCheckboxSelection(o),
907
+ onSpacePressed: ie((g) => e.toggleCheckboxSelection(o), ["prevent"])
869
908
  }, {
870
- default: L(() => [
909
+ default: T(() => [
871
910
  P(r, {
872
- "model-value": e.selectedItemsList,
873
- "aria-label": o.label,
874
911
  disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null,
875
- value: o.value,
876
- tabindex: -1
877
- }, null, 8, ["model-value", "aria-label", "disabled", "value"]),
878
- Y(e.$slots, "default", U({ ref_for: !0 }, o), () => [
879
- H("span", Rt, [
880
- P(m, { el: "span" }, {
881
- default: L(() => [
882
- F(z(o.label), 1)
912
+ checked: e.isOptionSelected(o)
913
+ }, null, 8, ["disabled", "checked"]),
914
+ q(e.$slots, "default", U({ ref_for: !0 }, o), () => [
915
+ W("span", wt, [
916
+ P(v, { el: "span" }, {
917
+ default: T(() => [
918
+ Y(F(o.label), 1)
883
919
  ]),
884
920
  _: 2
885
921
  }, 1024),
886
- e.shouldShowDescription(o) ? (b(), B(m, {
922
+ e.shouldShowDescription(o) ? (d(), $(v, {
887
923
  key: 0,
888
924
  class: "b-listbox-multi-select__option-description",
889
925
  el: "span"
890
926
  }, {
891
- default: L(() => [
892
- F(z(o.description), 1)
927
+ default: T(() => [
928
+ Y(F(o.description), 1)
893
929
  ]),
894
930
  _: 2
895
- }, 1024)) : j("", !0)
931
+ }, 1024)) : K("", !0)
896
932
  ])
897
933
  ], !0)
898
934
  ]),
899
935
  _: 2
900
- }, 1032, ["class", "disabled", "tabindex", "onClick", "onEnterPressed", "onSpacePressed"]))
936
+ }, 1032, ["class", "disabled", "tabindex", "aria-checked", "aria-disabled", "onClick", "onEnterPressed", "onSpacePressed"]))
901
937
  ], 64))
902
938
  ]))), 128))
903
939
  ]);
904
940
  }
905
- const Dt = /* @__PURE__ */ X($t, [["render", Bt], ["__scopeId", "data-v-c9ae45d6"]]), Pt = (e) => {
906
- const s = g(() => {
941
+ const Ut = /* @__PURE__ */ X(Pt, [["render", xt], ["__scopeId", "data-v-5778456e"]]), Gt = (e) => {
942
+ const s = m(() => {
907
943
  var c;
908
944
  return !!((c = e.value) != null && c.find(({ items: i }) => !!i));
909
- }), t = g(() => {
945
+ }), t = m(() => {
910
946
  var c;
911
947
  return s.value ? (c = e.value) == null ? void 0 : c.reduce((i, l) => (l.items ? i.push(...l.items.flat()) : i.push(l), i), []) : e.value;
912
948
  });
@@ -914,18 +950,18 @@ const Dt = /* @__PURE__ */ X($t, [["render", Bt], ["__scopeId", "data-v-c9ae45d6
914
950
  isMultiLevelSelect: s,
915
951
  flattenedItemsList: t
916
952
  };
917
- }, Pe = {
953
+ }, Me = {
918
954
  "en-US": {
919
955
  allSelected: "All selected ({total})",
920
956
  numberOfTotalSelected: "{number} of {total} selected",
921
957
  numbersSelected: "{number} selected",
922
958
  selectAll: "Select all ({total})"
923
959
  }
924
- }, Nt = { key: 0 }, Mt = {
960
+ }, zt = { key: 0 }, Ft = {
925
961
  key: 1,
926
962
  class: "b-listbox-multi-select__divider"
927
- }, wt = { i18n: { messages: Pe } }, xt = /* @__PURE__ */ Q({
928
- ...wt,
963
+ }, Yt = { i18n: { messages: Me } }, Kt = /* @__PURE__ */ Z({
964
+ ...Yt,
929
965
  __name: "listbox-multi-select",
930
966
  props: {
931
967
  hasMoreItems: { type: Boolean, default: !1 },
@@ -938,193 +974,189 @@ const Dt = /* @__PURE__ */ X($t, [["render", Bt], ["__scopeId", "data-v-c9ae45d6
938
974
  },
939
975
  emits: ["select"],
940
976
  setup(e, { emit: s }) {
941
- const t = e, c = s, { t: i } = he({ messages: Pe }), l = Ve(), r = k(null), m = k(null), C = k(null), n = k(null), a = g(() => t.selectedValues.map(({ value: v }) => v)), { isMultiLevelSelect: o, flattenedItemsList: h } = Pt(ee(t, "items")), p = (v) => {
977
+ const t = e, c = s, { t: i } = Ee({ messages: Me }), l = Je(), r = B(null), v = B(null), h = B(null), n = B(null), a = m(() => t.selectedValues.map(({ value: f }) => f)), { isMultiLevelSelect: o, flattenedItemsList: C } = Gt(te(t, "items")), g = (f) => {
942
978
  var O;
943
- const y = t.isOptionDisabled(v), d = ((O = a.value) == null ? void 0 : O.includes(v.value)) || !1;
944
- return { isDisabled: y, isPreSelected: d };
945
- }, f = g(() => {
979
+ const y = t.isOptionDisabled(f), u = ((O = a.value) == null ? void 0 : O.includes(f.value)) || !1;
980
+ return { isDisabled: y, isPreSelected: u };
981
+ }, p = m(() => {
946
982
  if (t.searching && o)
947
983
  return t.items;
948
- const v = h.value.filter((y) => {
949
- const { isDisabled: d, isPreSelected: O } = p(y);
950
- return d && O || !d;
984
+ const f = C.value.filter((y) => {
985
+ const { isDisabled: u, isPreSelected: O } = g(y);
986
+ return u && O || !u;
951
987
  });
952
988
  return t.selectedValues.forEach((y) => {
953
- v.find((d) => d.value === y.value) || v.push(y);
954
- }), v;
955
- }), A = g(
989
+ f.find((u) => u.value === y.value) || f.push(y);
990
+ }), f;
991
+ }), k = m(
956
992
  () => {
957
- var v;
958
- return (v = f.value) == null ? void 0 : v.filter((y) => {
959
- var d;
993
+ var f;
994
+ return (f = p.value) == null ? void 0 : f.filter((y) => {
995
+ var u;
960
996
  return y.items && o.value && t.searching ? y.items.filter(
961
997
  (E) => (t.selectedValues ?? []).includes(E.value)
962
- ).length === y.items.length : (d = a.value) == null ? void 0 : d.includes(y.value);
998
+ ).length === y.items.length : (u = a.value) == null ? void 0 : u.includes(y.value);
963
999
  });
964
1000
  }
965
- ), w = () => o.value && !t.searching ? h.value.length : t.items.length, S = g(() => {
1001
+ ), w = () => o.value && !t.searching ? C.value.length : t.items.length, S = m(() => {
966
1002
  var O;
967
- const v = f.value.length, y = w(), d = ((O = A.value) == null ? void 0 : O.length) || 0;
968
- return d === 0 ? i("selectAll", { total: v }) : d === y ? i("allSelected", { total: y }) : d <= y ? i("numberOfTotalSelected", { number: d, total: y }) : i("numbersSelected", { number: d });
969
- }), $ = (v) => {
1003
+ const f = p.value.length, y = w(), u = ((O = k.value) == null ? void 0 : O.length) || 0;
1004
+ return u === 0 ? i("selectAll", { total: f }) : u === y ? i("allSelected", { total: y }) : u <= y ? i("numberOfTotalSelected", { number: u, total: y }) : i("numbersSelected", { number: u });
1005
+ }), A = (f) => {
970
1006
  const y = (O) => {
971
- const { isDisabled: E, isPreSelected: J } = p(O);
972
- return E && J || !E;
973
- }, d = v.filter(y).filter((O) => !a.value.includes(O.value));
974
- c("select", [...t.selectedValues, ...d]);
975
- }, D = (v) => {
1007
+ const { isDisabled: E, isPreSelected: Q } = g(O);
1008
+ return E && Q || !E;
1009
+ }, u = f.filter(y).filter((O) => !a.value.includes(O.value));
1010
+ c("select", [...t.selectedValues, ...u]);
1011
+ }, N = (f) => {
976
1012
  const y = (E) => {
977
- const { isDisabled: J, isPreSelected: qe } = p(E);
978
- return !(J && qe);
979
- }, d = v.filter(y).map(({ value: E }) => E), O = t.selectedValues.filter((E) => !(d != null && d.includes(E.value)));
1013
+ const { isDisabled: Q, isPreSelected: je } = g(E);
1014
+ return !(Q && je);
1015
+ }, u = f.filter(y).map(({ value: E }) => E), O = t.selectedValues.filter((E) => !(u != null && u.includes(E.value)));
980
1016
  c("select", O);
981
- }, R = () => {
982
- $(h.value);
983
- }, N = () => {
984
- D(h.value);
985
- }, { isAllSelected: _, isIndeterminate: W, toggleSelectAll: K } = Be(
986
- A,
987
- f,
988
- R,
989
- N
990
- ), V = k(_.value), ce = () => {
991
- V.value = !V.value, K(V.value);
1017
+ }, x = () => {
1018
+ A(C.value);
1019
+ }, D = () => {
1020
+ N(C.value);
1021
+ }, { isAllSelected: G, isIndeterminate: I, toggleSelectAll: H } = Ne(
1022
+ k,
1023
+ p,
1024
+ x,
1025
+ D
1026
+ ), j = m(() => I.value ? "mixed" : `${G.value}`), J = B(G.value), M = () => {
1027
+ J.value = !J.value, H(J.value);
992
1028
  };
993
- fe(_, () => {
994
- V.value = _.value;
1029
+ ge(G, () => {
1030
+ J.value = G.value;
995
1031
  });
996
- const x = (v) => {
997
- $(v.items);
998
- }, le = (v) => {
999
- D(v.items);
1000
- }, de = (v, y) => {
1001
- let d = !1;
1002
- const O = t.selectedValues.filter(({ value: E }) => y.value === E ? (d = !0, !1) : !0);
1003
- d || O.push(y), c(v, O);
1004
- }, Ne = g(() => {
1032
+ const ce = (f) => {
1033
+ A(f.items);
1034
+ }, Oe = (f) => {
1035
+ N(f.items);
1036
+ }, de = (f, y) => {
1037
+ let u = !1;
1038
+ const O = t.selectedValues.filter(({ value: E }) => y.value === E ? (u = !0, !1) : !0);
1039
+ u || O.push(y), c(f, O);
1040
+ }, we = m(() => {
1005
1041
  if (!o.value)
1006
1042
  return t.selectedValues;
1007
- const v = (E) => a.value.includes(E.value), y = (E) => !t.staticCategories && E.every((J) => v(J));
1043
+ const f = (E) => a.value.includes(E.value), y = (E) => !t.staticCategories && E.every((Q) => f(Q));
1008
1044
  return t.items.flatMap(
1009
1045
  (E) => E.items && !y(E.items) ? E.items : E
1010
- ).filter((E) => E.items ? !0 : v(E));
1011
- }), Me = g(() => {
1012
- var d, O, E, J;
1013
- const v = ["automatic", "button"].includes(t.lazyLoadType), y = ((d = t.selectedValues) == null ? void 0 : d.length) > 0 && ((O = A.value) == null ? void 0 : O.length) !== ((E = h.value) == null ? void 0 : E.length);
1014
- return v && t.hasMoreItems ? !!((J = t.selectedValues) != null && J.length) : y;
1015
- }), Oe = g(() => ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), we = g(() => ({ label: S, value: _ })), xe = g(() => [we, ...ee(t, "items").value]), Ue = (v) => {
1016
- var d;
1017
- (d = Array.from(
1046
+ ).filter((E) => E.items ? !0 : f(E));
1047
+ }), xe = m(() => {
1048
+ var u, O, E, Q;
1049
+ const f = ["automatic", "button"].includes(t.lazyLoadType), y = ((u = t.selectedValues) == null ? void 0 : u.length) > 0 && ((O = k.value) == null ? void 0 : O.length) !== ((E = C.value) == null ? void 0 : E.length);
1050
+ return f && t.hasMoreItems ? !!((Q = t.selectedValues) != null && Q.length) : y;
1051
+ }), Te = m(() => ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), Ue = m(() => ({ label: S, value: G })), Ge = m(() => [Ue, ...te(t, "items").value]), ze = (f) => {
1052
+ var u;
1053
+ (u = Array.from(
1018
1054
  r.value.querySelectorAll('[role="option"]')
1019
- ).filter((O) => O.checkVisibility())[v]) == null || d.focus();
1055
+ ).filter((O) => O.checkVisibility())[f]) == null || u.focus();
1020
1056
  }, {
1021
- moveToNextElement: Ge,
1022
- moveToPreviousElement: ze,
1023
- moveToFirstElement: Fe,
1024
- moveToLastElement: Ye,
1025
- preventDefault: Te,
1026
- focusedIndex: _e
1027
- } = De(
1057
+ moveToNextElement: Fe,
1058
+ moveToPreviousElement: Ye,
1059
+ moveToFirstElement: Ke,
1060
+ moveToLastElement: We,
1061
+ preventDefault: ke,
1062
+ focusedIndex: Ae
1063
+ } = Pe(
1028
1064
  {
1029
- items: k(xe),
1030
- hasStaticCategories: ee(t, "staticCategories")
1065
+ items: B(Ge),
1066
+ hasStaticCategories: te(t, "staticCategories")
1031
1067
  },
1032
- Ue
1033
- ), We = {
1034
- [G.ARROW_UP]: (v) => ze(v),
1035
- [G.ARROW_DOWN]: (v) => Ge(v),
1036
- [G.HOME]: Fe,
1037
- [G.END]: Ye
1038
- }, Ke = {
1039
- [G.ARROW_UP]: Te,
1040
- [G.ARROW_DOWN]: Te
1068
+ ze
1069
+ ), qe = {
1070
+ [z.ARROW_UP]: (f) => Ye(f),
1071
+ [z.ARROW_DOWN]: (f) => Fe(f),
1072
+ [z.HOME]: Ke,
1073
+ [z.END]: We
1074
+ }, He = {
1075
+ [z.ARROW_UP]: ke,
1076
+ [z.ARROW_DOWN]: ke
1041
1077
  };
1042
- return (v, y) => (b(), T("div", {
1078
+ return (f, y) => (d(), _("div", {
1043
1079
  ref_key: "listboxRef",
1044
1080
  ref: r,
1045
1081
  class: "b-listbox-multi-select"
1046
1082
  }, [
1047
- Me.value ? (b(), T("div", Nt, [
1048
- ae((b(), T("ul", U({ class: "b-listbox-multi-select__chips" }, te(Ke, !0)), [
1049
- (b(!0), T(se, null, q(Ne.value, (d) => (b(), T("li", {
1050
- key: d.value
1083
+ xe.value ? (d(), _("div", zt, [
1084
+ ae((d(), _("ul", U({ class: "b-listbox-multi-select__chips" }, se(He, !0)), [
1085
+ (d(!0), _(le, null, V(we.value, (u) => (d(), _("li", {
1086
+ key: u.value
1051
1087
  }, [
1052
- P(M(et), {
1088
+ P(R(st), {
1053
1089
  ref_for: !0,
1054
1090
  ref_key: "selectedListboxItemsRef",
1055
- ref: C,
1056
- disabled: v.isOptionDisabled(d),
1057
- label: d.label,
1091
+ ref: h,
1092
+ disabled: f.isOptionDisabled(u),
1093
+ label: u.label,
1058
1094
  condensed: "",
1059
- onClick: (O) => d.items ? le(d) : de("select", d)
1095
+ onClick: (O) => u.items ? Oe(u) : de("select", u)
1060
1096
  }, null, 8, ["disabled", "label", "onClick"])
1061
1097
  ]))), 128))
1062
1098
  ], 16)), [
1063
- [M(ve)]
1099
+ [R(pe)]
1064
1100
  ]),
1065
- y[4] || (y[4] = H("hr", { class: "b-listbox-multi-select__divider" }, null, -1))
1066
- ])) : j("", !0),
1067
- ae((b(), T("div", te(We, !0), [
1068
- Oe.value ? (b(), B(M(ge), {
1101
+ y[4] || (y[4] = W("hr", { class: "b-listbox-multi-select__divider" }, null, -1))
1102
+ ])) : K("", !0),
1103
+ ae((d(), _("div", se(qe, !0), [
1104
+ Te.value ? (d(), $(R(ye), {
1069
1105
  key: 0,
1070
1106
  ref_key: "selectAllListboxItemsRef",
1071
- ref: m,
1107
+ ref: v,
1072
1108
  class: "b-listbox-multi-select__option",
1073
- tabindex: M(_e) === 0 ? 0 : -1,
1074
- onClick: ce,
1075
- onEnterPressed: ce,
1076
- onSpacePressed: ie(ce, ["prevent"])
1109
+ tabindex: R(Ae) === 0 ? 0 : -1,
1110
+ "aria-checked": j.value,
1111
+ onClick: M,
1112
+ onEnterPressed: M,
1113
+ onSpacePressed: ie(M, ["prevent"])
1077
1114
  }, {
1078
- default: L(() => [
1079
- P(M(Ee), {
1080
- "aria-label": S.value,
1081
- "model-value": M(_),
1082
- indeterminate: M(W),
1083
- tabindex: -1
1084
- }, null, 8, ["aria-label", "model-value", "indeterminate"]),
1085
- P(M(re), {
1086
- el: "span",
1087
- "aria-hidden": "true"
1088
- }, {
1089
- default: L(() => [
1090
- F(z(S.value), 1)
1115
+ default: T(() => [
1116
+ P(R(_e), {
1117
+ checked: R(G),
1118
+ indeterminate: R(I)
1119
+ }, null, 8, ["checked", "indeterminate"]),
1120
+ P(R(re), { el: "span" }, {
1121
+ default: T(() => [
1122
+ Y(F(S.value), 1)
1091
1123
  ]),
1092
1124
  _: 1
1093
1125
  })
1094
1126
  ]),
1095
1127
  _: 1
1096
- }, 8, ["tabindex"])) : j("", !0),
1097
- Oe.value ? (b(), T("hr", Mt)) : j("", !0),
1098
- P(M(Dt), {
1128
+ }, 8, ["tabindex", "aria-checked"])) : K("", !0),
1129
+ Te.value ? (d(), _("hr", Ft)) : K("", !0),
1130
+ P(R(Ut), {
1099
1131
  ref_key: "listboxItemsRef",
1100
1132
  ref: n,
1101
- items: v.items,
1102
- "is-option-disabled": v.isOptionDisabled,
1103
- "is-multi-level": M(o),
1104
- "static-categories": v.staticCategories,
1105
- searching: v.searching,
1133
+ items: f.items,
1134
+ "is-option-disabled": f.isOptionDisabled,
1135
+ "is-multi-level": R(o),
1136
+ "static-categories": f.staticCategories,
1137
+ searching: f.searching,
1106
1138
  "selected-items-list": a.value,
1107
- "focused-index": M(_e),
1108
- onToggleCheckboxSelection: y[0] || (y[0] = (d) => de("select", d)),
1109
- onSelectCategory: x,
1110
- onUnselectCategory: le,
1111
- onSpacePressed: y[1] || (y[1] = (d) => de(M(u).SPACE, d)),
1112
- onTabPressed: y[2] || (y[2] = (d) => de(M(u).TAB, d)),
1113
- onEnterPressed: y[3] || (y[3] = (d) => de(M(u).ENTER, d))
1139
+ "focused-index": R(Ae),
1140
+ onToggleCheckboxSelection: y[0] || (y[0] = (u) => de("select", u)),
1141
+ onSelectCategory: ce,
1142
+ onUnselectCategory: Oe,
1143
+ onSpacePressed: y[1] || (y[1] = (u) => de(R(b).SPACE, u)),
1144
+ onTabPressed: y[2] || (y[2] = (u) => de(R(b).TAB, u)),
1145
+ onEnterPressed: y[3] || (y[3] = (u) => de(R(b).ENTER, u))
1114
1146
  }, me({ _: 2 }, [
1115
- q(M(l), (d, O) => ({
1147
+ V(R(l), (u, O) => ({
1116
1148
  name: O,
1117
- fn: L((E) => [
1118
- Y(v.$slots, O, ne(be(E)), void 0, !0)
1149
+ fn: T((E) => [
1150
+ q(f.$slots, O, ne(be(E)), void 0, !0)
1119
1151
  ])
1120
1152
  }))
1121
1153
  ]), 1032, ["items", "is-option-disabled", "is-multi-level", "static-categories", "searching", "selected-items-list", "focused-index"])
1122
1154
  ], 16)), [
1123
- [M(ve)]
1155
+ [R(pe)]
1124
1156
  ])
1125
1157
  ], 512));
1126
1158
  }
1127
- }), Ie = /* @__PURE__ */ X(xt, [["__scopeId", "data-v-36c6ac8d"]]), $e = {
1159
+ }), $e = /* @__PURE__ */ X(Kt, [["__scopeId", "data-v-1997b63d"]]), De = {
1128
1160
  "en-US": {
1129
1161
  loading: "Loading",
1130
1162
  showMore: "Show more"
@@ -1137,18 +1169,18 @@ const Dt = /* @__PURE__ */ X($t, [["render", Bt], ["__scopeId", "data-v-c9ae45d6
1137
1169
  loading: "Carregando",
1138
1170
  showMore: "Mostrar mais"
1139
1171
  }
1140
- }, Ut = 36, Gt = Q({
1172
+ }, Wt = 36, qt = Z({
1141
1173
  name: "bento-listbox",
1142
1174
  components: {
1143
- BentoEmptyState: Ze,
1144
- BentoListboxSingleSelect: Ot,
1145
- BentoListboxMultiSelect: Ie,
1175
+ BentoEmptyState: et,
1176
+ BentoListboxSingleSelect: At,
1177
+ BentoListboxMultiSelect: $e,
1146
1178
  BentoTypography: re,
1147
- BentoLoadingIndicator: Je,
1148
- BentoLoadingButton: lt
1179
+ BentoLoadingIndicator: Qe,
1180
+ BentoLoadingButton: at
1149
1181
  },
1150
- directives: { BentoKeyboardNavigationDirective: ve },
1151
- i18n: { messages: $e },
1182
+ directives: { BentoKeyboardNavigationDirective: pe },
1183
+ i18n: { messages: De },
1152
1184
  props: {
1153
1185
  /**
1154
1186
  * Defines a string value that labels an interactive element.
@@ -1229,7 +1261,7 @@ const Dt = /* @__PURE__ */ X($t, [["render", Bt], ["__scopeId", "data-v-c9ae45d6
1229
1261
  *
1230
1262
  * If enabled, hides the "Select all" checkbox in "multiple" mode.
1231
1263
  */
1232
- searching: Ie.props.searching,
1264
+ searching: $e.props.searching,
1233
1265
  /**
1234
1266
  * The `input` value.
1235
1267
  * Providing an empty string or empty array will select no options.
@@ -1249,106 +1281,106 @@ const Dt = /* @__PURE__ */ X($t, [["render", Bt], ["__scopeId", "data-v-c9ae45d6
1249
1281
  }
1250
1282
  },
1251
1283
  emits: [
1252
- u.SELECT,
1253
- u.SPACE,
1254
- u.SHOW_MORE,
1255
- u.ENTER,
1256
- u.ESCAPE,
1257
- u.TAB
1284
+ b.SELECT,
1285
+ b.SPACE,
1286
+ b.SHOW_MORE,
1287
+ b.ENTER,
1288
+ b.ESCAPE,
1289
+ b.TAB
1258
1290
  ],
1259
1291
  setup(e, { emit: s, slots: t }) {
1260
- const c = k([]), i = ee(e, "items"), { t: l } = he({ messages: $e }), r = g(() => e.lazyLoadType !== oe.AUTOMATIC), m = g(() => e.lazyLoadType === oe.AUTOMATIC), C = () => {
1261
- var x;
1262
- return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((x = e == null ? void 0 : e.virtualScroll) != null && x.itemHeight) ? e.virtualScroll.itemHeight : Ut;
1292
+ const c = B([]), i = te(e, "items"), { t: l } = Ee({ messages: De }), r = m(() => e.lazyLoadType !== oe.AUTOMATIC), v = m(() => e.lazyLoadType === oe.AUTOMATIC), h = () => {
1293
+ var M;
1294
+ return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((M = e == null ? void 0 : e.virtualScroll) != null && M.itemHeight) ? e.virtualScroll.itemHeight : Wt;
1263
1295
  }, {
1264
1296
  containerRef: n,
1265
1297
  containerProps: a,
1266
1298
  onScroll: o,
1267
- list: h,
1268
- wrapperProps: p
1269
- } = nt(i, {
1270
- itemHeight: C(),
1299
+ list: C,
1300
+ wrapperProps: g
1301
+ } = ct(i, {
1302
+ itemHeight: h(),
1271
1303
  // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
1272
1304
  disabled: (e == null ? void 0 : e.multiple) || (e == null ? void 0 : e.virtualScroll) === !1 || (e == null ? void 0 : e.lazyLoadType) !== "none"
1273
- }), f = g(
1305
+ }), p = m(
1274
1306
  () => e.componentLoading !== void 0 || r.value ? "true" : void 0
1275
- ), A = g(
1307
+ ), k = m(
1276
1308
  () => r.value && e.loading || e.componentLoading ? "true" : "false"
1277
- ), w = g(
1309
+ ), w = m(
1278
1310
  () => r.value || e.componentLoading !== void 0 ? "polite" : void 0
1279
- ), S = (x) => (le) => {
1280
- s(x, le);
1281
- }, $ = () => {
1282
- s(u.SHOW_MORE);
1283
- }, D = Qe(() => {
1284
- const x = n.value;
1285
- if (!x)
1311
+ ), S = (M) => (ce) => {
1312
+ s(M, ce);
1313
+ }, A = () => {
1314
+ s(b.SHOW_MORE);
1315
+ }, N = tt(() => {
1316
+ const M = n.value;
1317
+ if (!M)
1286
1318
  return;
1287
- const le = Math.round(x.scrollTop) + x.clientHeight >= x.scrollHeight;
1288
- e.hasMoreItems && le && !e.loading && $();
1289
- }), R = () => {
1290
- m.value ? D() : o();
1291
- }, N = g(() => {
1292
- var x;
1293
- return ((x = e.items) == null ? void 0 : x.length) === 0;
1294
- }), _ = g(
1319
+ const ce = Math.round(M.scrollTop) + M.clientHeight >= M.scrollHeight;
1320
+ e.hasMoreItems && ce && !e.loading && A();
1321
+ }), x = () => {
1322
+ v.value ? N() : o();
1323
+ }, D = m(() => {
1324
+ var M;
1325
+ return ((M = e.items) == null ? void 0 : M.length) === 0;
1326
+ }), G = m(
1295
1327
  () => e.lazyLoadType === oe.BUTTON && e.hasMoreItems
1296
- ), W = g(
1328
+ ), I = m(
1297
1329
  () => e.loading ? Le.LOADING : Le.START
1298
- ), K = g(() => e.loading ? l("loading") : l("showMore")), V = g(() => ({
1330
+ ), H = m(() => e.loading ? l("loading") : l("showMore")), j = m(() => ({
1299
1331
  ...e.emptyState,
1300
1332
  variant: "condensed"
1301
- })), ce = {
1302
- [u.SELECT]: S(u.SELECT),
1303
- [u.SPACE]: S(u.SPACE),
1304
- [u.TAB]: S(u.TAB),
1305
- [u.ENTER]: S(u.ENTER)
1333
+ })), J = {
1334
+ [b.SELECT]: S(b.SELECT),
1335
+ [b.SPACE]: S(b.SPACE),
1336
+ [b.TAB]: S(b.TAB),
1337
+ [b.ENTER]: S(b.ENTER)
1306
1338
  };
1307
1339
  return {
1308
1340
  // Refs
1309
1341
  listboxRef: n,
1310
1342
  listboxItemRef: c,
1311
1343
  // a11y
1312
- ariaAtomic: f,
1313
- ariaBusy: A,
1344
+ ariaAtomic: p,
1345
+ ariaBusy: k,
1314
1346
  ariaLive: w,
1315
1347
  // Values
1316
1348
  containerProps: a,
1317
- isSearchResultEmpty: N,
1318
- limitedEmptyStateProps: V,
1319
- loadingButtonState: W,
1349
+ isSearchResultEmpty: D,
1350
+ limitedEmptyStateProps: j,
1351
+ loadingButtonState: I,
1320
1352
  slots: t,
1321
- shouldDisplayShowMoreButton: _,
1322
- showMoreButtonText: K,
1323
- virtualisedItems: h,
1324
- wrapperProps: p,
1353
+ shouldDisplayShowMoreButton: G,
1354
+ showMoreButtonText: H,
1355
+ virtualisedItems: C,
1356
+ wrapperProps: g,
1325
1357
  // Enums
1326
- BentoKeyboardNavigationKeyDownEvent: G,
1327
- BentoListboxEvent: u,
1358
+ BentoKeyboardNavigationKeyDownEvent: z,
1359
+ BentoListboxEvent: b,
1328
1360
  // Methods
1329
- onListboxContainerScroll: R,
1361
+ onListboxContainerScroll: x,
1330
1362
  onOptionSelected: S,
1331
- emitShowMore: $,
1332
- listboxListeners: ce
1363
+ emitShowMore: A,
1364
+ listboxListeners: J
1333
1365
  };
1334
1366
  }
1335
- }), zt = ["id", "aria-busy", "aria-atomic", "aria-label", "aria-live"], Ft = {
1367
+ }), Ht = ["id", "aria-busy", "aria-atomic", "aria-label", "aria-live"], jt = {
1336
1368
  key: 0,
1337
1369
  class: "b-listbox__loading-filtered-items"
1338
- }, Yt = {
1370
+ }, Vt = {
1339
1371
  key: 1,
1340
1372
  class: "b-listbox__empty-search-message"
1341
- }, Wt = {
1373
+ }, Xt = {
1342
1374
  key: 2,
1343
1375
  class: "b-listbox__lazy-load"
1344
- }, Kt = {
1376
+ }, Jt = {
1345
1377
  key: 3,
1346
1378
  class: "b-listbox__lazy-load"
1347
1379
  };
1348
- function qt(e, s, t, c, i, l) {
1349
- var p;
1350
- const r = I("bento-loading-indicator"), m = I("bento-empty-state"), C = I("bento-typography"), n = I("bento-listbox-multi-select"), a = I("bento-listbox-single-select"), o = I("bento-loading-button"), h = Re("bento-keyboard-navigation-directive");
1351
- return ae((b(), T("div", {
1380
+ function Zt(e, s, t, c, i, l) {
1381
+ var g;
1382
+ const r = L("bento-loading-indicator"), v = L("bento-empty-state"), h = L("bento-typography"), n = L("bento-listbox-multi-select"), a = L("bento-listbox-single-select"), o = L("bento-loading-button"), C = Re("bento-keyboard-navigation-directive");
1383
+ return ae((d(), _("div", {
1352
1384
  id: e.id,
1353
1385
  ref: "listboxRef",
1354
1386
  class: "b-listbox",
@@ -1358,24 +1390,24 @@ function qt(e, s, t, c, i, l) {
1358
1390
  "aria-atomic": e.ariaAtomic,
1359
1391
  "aria-label": e.ariaLabel,
1360
1392
  "aria-live": e.ariaLive,
1361
- style: Xe((p = e.containerProps) == null ? void 0 : p.style),
1362
- onScroll: s[0] || (s[0] = (...f) => e.onListboxContainerScroll && e.onListboxContainerScroll(...f))
1393
+ style: Ze((g = e.containerProps) == null ? void 0 : g.style),
1394
+ onScroll: s[0] || (s[0] = (...p) => e.onListboxContainerScroll && e.onListboxContainerScroll(...p))
1363
1395
  }, [
1364
- H("div", ne(be(e.wrapperProps)), [
1365
- e.componentLoading ? (b(), T("div", Ft, [
1396
+ W("div", ne(be(e.wrapperProps)), [
1397
+ e.componentLoading ? (d(), _("div", jt, [
1366
1398
  P(r)
1367
- ])) : e.isSearchResultEmpty ? (b(), T("div", Yt, [
1368
- e.emptyState ? (b(), B(m, ne(U({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (b(), B(C, {
1399
+ ])) : e.isSearchResultEmpty ? (d(), _("div", Vt, [
1400
+ e.emptyState ? (d(), $(v, ne(U({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (d(), $(h, {
1369
1401
  key: 1,
1370
1402
  el: "span"
1371
1403
  }, {
1372
- default: L(() => [
1373
- F(z(e.noResultsMessage), 1)
1404
+ default: T(() => [
1405
+ Y(F(e.noResultsMessage), 1)
1374
1406
  ]),
1375
1407
  _: 1
1376
1408
  }))
1377
- ])) : (b(), T(se, { key: 2 }, [
1378
- e.multiple ? (b(), B(n, U({
1409
+ ])) : (d(), _(le, { key: 2 }, [
1410
+ e.multiple ? (d(), $(n, U({
1379
1411
  key: 0,
1380
1412
  ref: "listboxItemRef",
1381
1413
  "has-more-items": e.hasMoreItems,
@@ -1385,49 +1417,49 @@ function qt(e, s, t, c, i, l) {
1385
1417
  "selected-values": e.selectedValue,
1386
1418
  searching: e.searching,
1387
1419
  "is-option-disabled": e.isOptionDisabled
1388
- }, te(e.listboxListeners)), me({ _: 2 }, [
1389
- q(e.slots, (f, A) => ({
1390
- name: A,
1391
- fn: L((w) => [
1392
- Y(e.$slots, A, ne(be(w)), void 0, !0)
1420
+ }, se(e.listboxListeners)), me({ _: 2 }, [
1421
+ V(e.slots, (p, k) => ({
1422
+ name: k,
1423
+ fn: T((w) => [
1424
+ q(e.$slots, k, ne(be(w)), void 0, !0)
1393
1425
  ])
1394
1426
  }))
1395
- ]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (b(), B(a, U({
1427
+ ]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (d(), $(a, U({
1396
1428
  key: 1,
1397
1429
  ref: "listboxItemRef",
1398
1430
  items: e.virtualisedItems,
1399
1431
  "selected-value": e.selectedValue,
1400
1432
  "static-categories": e.staticCategories,
1401
1433
  "is-option-disabled": e.isOptionDisabled
1402
- }, te(e.listboxListeners)), me({ _: 2 }, [
1403
- q(e.slots, (f, A) => ({
1404
- name: A,
1405
- fn: L((w) => [
1406
- Y(e.$slots, A, ne(be(w)), void 0, !0)
1434
+ }, se(e.listboxListeners)), me({ _: 2 }, [
1435
+ V(e.slots, (p, k) => ({
1436
+ name: k,
1437
+ fn: T((w) => [
1438
+ q(e.$slots, k, ne(be(w)), void 0, !0)
1407
1439
  ])
1408
1440
  }))
1409
1441
  ]), 1040, ["items", "selected-value", "static-categories", "is-option-disabled"])),
1410
- e.shouldDisplayShowMoreButton ? (b(), T("div", Wt, [
1442
+ e.shouldDisplayShowMoreButton ? (d(), _("div", Xt, [
1411
1443
  P(o, {
1412
1444
  state: e.loadingButtonState,
1413
1445
  variant: "secondary",
1414
1446
  onClickCapture: e.emitShowMore
1415
1447
  }, {
1416
- default: L(() => [
1417
- F(z(e.showMoreButtonText), 1)
1448
+ default: T(() => [
1449
+ Y(F(e.showMoreButtonText), 1)
1418
1450
  ]),
1419
1451
  _: 1
1420
1452
  }, 8, ["state", "onClickCapture"])
1421
- ])) : e.loading ? (b(), T("div", Kt, [
1453
+ ])) : e.loading ? (d(), _("div", Jt, [
1422
1454
  P(r)
1423
- ])) : j("", !0)
1455
+ ])) : K("", !0)
1424
1456
  ], 64))
1425
1457
  ], 16)
1426
- ], 44, zt)), [
1427
- [h]
1458
+ ], 44, Ht)), [
1459
+ [C]
1428
1460
  ]);
1429
1461
  }
1430
- const cs = /* @__PURE__ */ X(Gt, [["render", qt], ["__scopeId", "data-v-7b74fe4e"]]), Ce = (e, s) => {
1462
+ const gs = /* @__PURE__ */ X(qt, [["render", Zt], ["__scopeId", "data-v-7b74fe4e"]]), Ce = (e, s) => {
1431
1463
  for (const t of e) {
1432
1464
  if (t.value === s)
1433
1465
  return t;
@@ -1438,18 +1470,18 @@ const cs = /* @__PURE__ */ X(Gt, [["render", qt], ["__scopeId", "data-v-7b74fe4e
1438
1470
  }
1439
1471
  }
1440
1472
  return null;
1441
- }, jt = (e) => typeof e == "object" && e !== null && "value" in e && "label" in e, ds = (e, s, t, c) => {
1442
- const i = k([]), l = k(), r = (a) => {
1473
+ }, Qt = (e) => typeof e == "object" && e !== null && "value" in e && "label" in e, ys = (e, s, t, c) => {
1474
+ const i = B([]), l = B(), r = (a) => {
1443
1475
  t.value ? l.value = a.map(({ value: o }) => o) : l.value = a.length > 0 ? a[0].value : null;
1444
- }, m = (a) => {
1445
- t.value ? l.value = a.map(({ value: o, label: h }) => ({ value: o, label: h })) : l.value = a.length > 0 ? { value: a[0].value, label: a[0].label } : null;
1446
- }, C = (a) => {
1447
- i.value = a, c != null && c.value ? m(a) : r(a);
1476
+ }, v = (a) => {
1477
+ t.value ? l.value = a.map(({ value: o, label: C }) => ({ value: o, label: C })) : l.value = a.length > 0 ? { value: a[0].value, label: a[0].label } : null;
1478
+ }, h = (a) => {
1479
+ i.value = a, c != null && c.value ? v(a) : r(a);
1448
1480
  }, n = () => {
1449
1481
  i.value = [], l.value = null;
1450
1482
  };
1451
- return fe(
1452
- [() => e.value, () => s.value],
1483
+ return ge(
1484
+ () => s.value,
1453
1485
  () => {
1454
1486
  if (!s.value && s.value !== 0) {
1455
1487
  n();
@@ -1457,20 +1489,20 @@ const cs = /* @__PURE__ */ X(Gt, [["render", qt], ["__scopeId", "data-v-7b74fe4e
1457
1489
  }
1458
1490
  const a = !Array.isArray(s.value), o = [...i.value];
1459
1491
  n();
1460
- const h = (p) => {
1461
- if (jt(p))
1462
- i.value.push(p);
1492
+ const C = (g) => {
1493
+ if (Qt(g))
1494
+ i.value.push(g);
1463
1495
  else {
1464
- let f = Ce(e.value, p);
1465
- f || (f = Ce(o, p)), f || (f = { value: p, label: p.toString() }), i.value.push(f);
1496
+ let p = Ce(e.value, g);
1497
+ p || (p = Ce(o, g)), p || (p = { value: g, label: g.toString() }), i.value.push(p);
1466
1498
  }
1467
1499
  };
1468
1500
  if (a) {
1469
- const p = s.value;
1470
- h(p), c != null && c.value ? m(i.value) : r(i.value);
1501
+ const g = s.value;
1502
+ C(g), c != null && c.value ? v(i.value) : r(i.value);
1471
1503
  return;
1472
1504
  }
1473
- s.value.forEach(h), c != null && c.value ? m(i.value) : r(i.value);
1505
+ s.value.forEach(C), c != null && c.value ? v(i.value) : r(i.value);
1474
1506
  },
1475
1507
  { immediate: !0 }
1476
1508
  ), {
@@ -1479,14 +1511,14 @@ const cs = /* @__PURE__ */ X(Gt, [["render", qt], ["__scopeId", "data-v-7b74fe4e
1479
1511
  cachedListboxSelectedValues: l,
1480
1512
  // Methods
1481
1513
  resetCache: n,
1482
- setCachedValues: C
1514
+ setCachedValues: h
1483
1515
  };
1484
1516
  };
1485
1517
  export {
1486
1518
  oe as B,
1487
- u as a,
1488
- cs as b,
1489
- ds as c,
1490
- Pt as u
1519
+ b as a,
1520
+ gs as b,
1521
+ ys as c,
1522
+ Gt as u
1491
1523
  };
1492
- //# sourceMappingURL=use-cached-selected-values.CUi4XfMa.js.map
1524
+ //# sourceMappingURL=use-cached-selected-values.swt0cdsA.js.map