@adyen/bento-vue2 1.9.0 → 1.10.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 (253) hide show
  1. package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +19 -3580
  2. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +2 -0
  3. package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +3 -3
  4. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +2 -0
  5. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +2 -0
  6. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell-actions/data-grid-cell-actions.types.d.ts +14 -0
  7. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell-actions/data-grid-cell-actions.vue.d.ts +33 -0
  8. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns-types.d.ts +1 -0
  9. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +20 -4
  10. package/dist/@types/packages/vue2/src/components/data-grid/components/index.d.ts +1 -0
  11. package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateColumnWidth/useCalculateColumnWidth.d.ts +1 -0
  12. package/dist/@types/packages/vue2/src/components/data-grid/composables/useColumnReorderer/useColumnReorderer.d.ts +54 -0
  13. package/dist/@types/packages/vue2/src/components/data-grid/composables/useConfigSettings/useConfigSettings.d.ts +81 -0
  14. package/dist/@types/packages/vue2/src/components/data-grid/composables/useSelector.d.ts +1 -1
  15. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +5 -2
  16. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +16 -7
  17. package/dist/@types/packages/vue2/src/components/divider/divider.keys.d.ts +1 -0
  18. package/dist/@types/packages/vue2/src/components/divider/divider.vue.d.ts +1 -1
  19. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.d.ts +1 -1
  20. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +3 -3
  21. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +3 -3
  22. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +9 -0
  23. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +3 -3
  24. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +9 -0
  25. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +9 -0
  26. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +9 -0
  27. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +9 -0
  28. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +9 -0
  29. package/dist/@types/packages/vue2/src/components/dropdown/composables/useDisplayValue.types.d.ts +1 -0
  30. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +11 -1
  31. package/dist/@types/packages/vue2/src/components/empty-state/empty-state.types.d.ts +1 -0
  32. package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +3 -3
  33. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +84 -12
  34. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +2 -0
  35. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +2 -0
  36. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +3 -1
  37. package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +8 -0
  38. package/dist/@types/packages/vue2/src/components/internal/copy/copy.types.d.ts +8 -0
  39. package/dist/@types/packages/vue2/src/components/internal/copy/copy.vue.d.ts +20 -0
  40. package/dist/@types/packages/vue2/src/components/internal/copy/index.d.ts +1 -0
  41. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.types.d.ts +2 -1
  42. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue.d.ts +82 -0
  43. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue.d.ts +10 -0
  44. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +9 -0
  45. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/components/listbox-single-select-category/index.d.ts +1 -0
  46. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/components/listbox-single-select-category/listbox-single-select-category.vue.d.ts +12 -0
  47. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue.d.ts +10 -0
  48. package/dist/@types/packages/vue2/src/components/internal/listbox/composables/use-multi-level-items/use-multi-level-items.d.ts +6 -0
  49. package/dist/@types/packages/vue2/src/components/internal/listbox/index.d.ts +1 -0
  50. package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +12 -3
  51. package/dist/@types/packages/vue2/src/components/menu/components/menu-item/menu-item.types.d.ts +1 -0
  52. package/dist/@types/packages/vue2/src/components/menu/components/menu-item/menu-item.vue.d.ts +1 -1
  53. package/dist/@types/packages/vue2/src/components/menu/components/sub-menu-item-list/sub-menu-item-list.vue.d.ts +2 -0
  54. package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +1 -0
  55. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +1 -1
  56. package/dist/@types/packages/vue2/src/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +251 -3
  57. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +1 -0
  58. package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +3 -4
  59. package/dist/@types/packages/vue2/src/components/structured-list/structured-list.types.d.ts +2 -0
  60. package/dist/@types/packages/vue2/src/components/structured-list/structured-list.vue.d.ts +16 -3
  61. package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +15 -10
  62. package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +9 -0
  63. package/dist/@types/packages/vue2/src/types/elements.d.ts +2 -1
  64. package/dist/accordion.js +2 -2
  65. package/dist/action-bar.js +5 -5
  66. package/dist/alert.js +8 -8
  67. package/dist/alert.js.map +1 -1
  68. package/dist/assets/base-modal.css +1 -1
  69. package/dist/assets/button.css +1 -1
  70. package/dist/assets/checkbox.css +1 -1
  71. package/dist/assets/controls-group.css +1 -1
  72. package/dist/assets/copy.css +1 -1
  73. package/dist/assets/dropdown-default-textbox.css +1 -1
  74. package/dist/assets/dropdown.css +1 -1
  75. package/dist/assets/index.css +1 -1
  76. package/dist/assets/index10.css +1 -1
  77. package/dist/assets/index11.css +1 -1
  78. package/dist/assets/index12.css +1 -1
  79. package/dist/assets/index13.css +1 -1
  80. package/dist/assets/index14.css +1 -1
  81. package/dist/assets/index15.css +1 -1
  82. package/dist/assets/index16.css +1 -1
  83. package/dist/assets/index17.css +1 -1
  84. package/dist/assets/index18.css +1 -1
  85. package/dist/assets/index19.css +1 -1
  86. package/dist/assets/index2.css +1 -1
  87. package/dist/assets/index20.css +1 -1
  88. package/dist/assets/index21.css +1 -1
  89. package/dist/assets/index22.css +1 -1
  90. package/dist/assets/index23.css +1 -1
  91. package/dist/assets/index24.css +1 -1
  92. package/dist/assets/index25.css +1 -1
  93. package/dist/assets/index26.css +1 -1
  94. package/dist/assets/index27.css +1 -1
  95. package/dist/assets/index28.css +1 -1
  96. package/dist/assets/index29.css +1 -1
  97. package/dist/assets/index3.css +1 -1
  98. package/dist/assets/index30.css +1 -1
  99. package/dist/assets/index31.css +1 -1
  100. package/dist/assets/index32.css +1 -1
  101. package/dist/assets/index33.css +1 -1
  102. package/dist/assets/index34.css +1 -1
  103. package/dist/assets/index35.css +1 -1
  104. package/dist/assets/index36.css +1 -1
  105. package/dist/assets/index37.css +1 -1
  106. package/dist/assets/index38.css +1 -1
  107. package/dist/assets/index39.css +1 -1
  108. package/dist/assets/index4.css +1 -1
  109. package/dist/assets/index40.css +1 -1
  110. package/dist/assets/index41.css +1 -1
  111. package/dist/assets/index42.css +1 -1
  112. package/dist/assets/index43.css +1 -1
  113. package/dist/assets/index44.css +1 -1
  114. package/dist/assets/index45.css +1 -1
  115. package/dist/assets/index5.css +1 -1
  116. package/dist/assets/index6.css +1 -1
  117. package/dist/assets/index7.css +1 -1
  118. package/dist/assets/index8.css +1 -1
  119. package/dist/assets/index9.css +1 -1
  120. package/dist/assets/listbox.css +1 -1
  121. package/dist/assets/loading-button.css +1 -1
  122. package/dist/avatar-image.js +1 -1
  123. package/dist/badge.js +1 -1
  124. package/dist/button.js +20 -18
  125. package/dist/button.js.map +1 -1
  126. package/dist/card.js +2 -2
  127. package/dist/checkbox.js +61 -48
  128. package/dist/checkbox.js.map +1 -1
  129. package/dist/chunks/{base-button.df9a9bea.js → base-button.46843461.js} +2 -2
  130. package/dist/chunks/{base-button.df9a9bea.js.map → base-button.46843461.js.map} +1 -1
  131. package/dist/chunks/{base-modal.75319f4e.js → base-modal.193ce866.js} +33 -33
  132. package/dist/chunks/base-modal.193ce866.js.map +1 -0
  133. package/dist/chunks/{button-actions-with-menu.32770485.js → button-actions-with-menu.11988565.js} +3 -3
  134. package/dist/chunks/{button-actions-with-menu.32770485.js.map → button-actions-with-menu.11988565.js.map} +1 -1
  135. package/dist/chunks/button.f3f05408.js +100 -0
  136. package/dist/chunks/button.f3f05408.js.map +1 -0
  137. package/dist/chunks/{calendar.a885d8fc.js → calendar.7dbac3b8.js} +4 -4
  138. package/dist/chunks/{calendar.a885d8fc.js.map → calendar.7dbac3b8.js.map} +1 -1
  139. package/dist/chunks/checkbox.f6f6ce39.js +188 -0
  140. package/dist/chunks/checkbox.f6f6ce39.js.map +1 -0
  141. package/dist/chunks/{controls-group.dd967ccf.js → controls-group.24a9efb1.js} +15 -11
  142. package/dist/chunks/controls-group.24a9efb1.js.map +1 -0
  143. package/dist/chunks/copy.f4019f8d.js +122 -0
  144. package/dist/chunks/copy.f4019f8d.js.map +1 -0
  145. package/dist/chunks/{cross-circle-fill.7c07d16a.js → cross-circle-fill.27580c4b.js} +5 -5
  146. package/dist/chunks/{cross-circle-fill.7c07d16a.js.map → cross-circle-fill.27580c4b.js.map} +1 -1
  147. package/dist/chunks/{dropdown-default-textbox.465db4d4.js → dropdown-default-textbox.a1240b9d.js} +11 -11
  148. package/dist/chunks/dropdown-default-textbox.a1240b9d.js.map +1 -0
  149. package/dist/chunks/{dropdown.6461dbe3.js → dropdown.f784ac67.js} +258 -221
  150. package/dist/chunks/dropdown.f784ac67.js.map +1 -0
  151. package/dist/chunks/{field-label.01df3cba.js → field-label.bdf22f47.js} +5 -5
  152. package/dist/chunks/{field-label.01df3cba.js.map → field-label.bdf22f47.js.map} +1 -1
  153. package/dist/chunks/{fixed-scroller.42354ccc.js → fixed-scroller.28158c25.js} +2 -2
  154. package/dist/chunks/{fixed-scroller.42354ccc.js.map → fixed-scroller.28158c25.js.map} +1 -1
  155. package/dist/chunks/{footer-actions.2cd9079e.js → footer-actions.08a8323b.js} +3 -3
  156. package/dist/chunks/{footer-actions.2cd9079e.js.map → footer-actions.08a8323b.js.map} +1 -1
  157. package/dist/chunks/{index.02da8d63.js → index.1036f656.js} +3 -3
  158. package/dist/chunks/{index.02da8d63.js.map → index.1036f656.js.map} +1 -1
  159. package/dist/chunks/{index.322692c8.js → index.158c522b.js} +2 -2
  160. package/dist/chunks/{index.322692c8.js.map → index.158c522b.js.map} +1 -1
  161. package/dist/chunks/{index.f358c4bd.js → index.4824eab5.js} +163 -155
  162. package/dist/chunks/index.4824eab5.js.map +1 -0
  163. package/dist/chunks/{index.6cef7328.js → index.6c299479.js} +2 -2
  164. package/dist/chunks/{index.6cef7328.js.map → index.6c299479.js.map} +1 -1
  165. package/dist/chunks/{index.152b2b16.js → index.7039d901.js} +3 -3
  166. package/dist/chunks/{index.152b2b16.js.map → index.7039d901.js.map} +1 -1
  167. package/dist/chunks/{index.b201e81d.js → index.858b0720.js} +2 -2
  168. package/dist/chunks/{index.b201e81d.js.map → index.858b0720.js.map} +1 -1
  169. package/dist/chunks/{index.16914bb1.js → index.9051abfc.js} +9 -9
  170. package/dist/chunks/{index.16914bb1.js.map → index.9051abfc.js.map} +1 -1
  171. package/dist/chunks/index.9bdf4d78.js +147 -0
  172. package/dist/chunks/index.9bdf4d78.js.map +1 -0
  173. package/dist/chunks/{index.d1beb704.js → index.ad4b770b.js} +5 -5
  174. package/dist/chunks/{index.d1beb704.js.map → index.ad4b770b.js.map} +1 -1
  175. package/dist/chunks/index.f651209d.js +32 -0
  176. package/dist/chunks/index.f651209d.js.map +1 -0
  177. package/dist/chunks/{listbox-option-tag.55cd9c16.js → listbox-option-tag.60c0beca.js} +3 -3
  178. package/dist/chunks/{listbox-option-tag.55cd9c16.js.map → listbox-option-tag.60c0beca.js.map} +1 -1
  179. package/dist/chunks/{listbox.a117e6d4.js → listbox.163433c5.js} +475 -392
  180. package/dist/chunks/listbox.163433c5.js.map +1 -0
  181. package/dist/chunks/{loading-button.459b9ab4.js → loading-button.7b5d0c22.js} +20 -20
  182. package/dist/chunks/{loading-button.459b9ab4.js.map → loading-button.7b5d0c22.js.map} +1 -1
  183. package/dist/chunks/{tooltip.b8929659.js → tooltip.4a1300d5.js} +22 -22
  184. package/dist/chunks/tooltip.4a1300d5.js.map +1 -0
  185. package/dist/chunks/use-has-slot.fbeb19ec.js.map +1 -1
  186. package/dist/code-snippet.js +7 -7
  187. package/dist/code-snippet.js.map +1 -1
  188. package/dist/country.js +2 -2
  189. package/dist/currency.js +1 -1
  190. package/dist/data-grid.js +858 -668
  191. package/dist/data-grid.js.map +1 -1
  192. package/dist/date-picker.js +8 -8
  193. package/dist/date-range-picker.js +2 -2
  194. package/dist/date.js +1 -1
  195. package/dist/divider.js +2 -18
  196. package/dist/divider.js.map +1 -1
  197. package/dist/dropdown.js +4 -4
  198. package/dist/empty-state.js +18 -18
  199. package/dist/empty-state.js.map +1 -1
  200. package/dist/filter-bar.js +408 -399
  201. package/dist/filter-bar.js.map +1 -1
  202. package/dist/focus-trap.js +1 -1
  203. package/dist/form-layout.js +2 -2
  204. package/dist/header.js +3 -3
  205. package/dist/index.js +66 -65
  206. package/dist/info-icon.js +3 -3
  207. package/dist/input-field.js +4 -4
  208. package/dist/internal.js +17 -15
  209. package/dist/link.js +2 -2
  210. package/dist/loading-indicator.js +1 -1
  211. package/dist/menu.js +1 -1
  212. package/dist/modal.js +62 -60
  213. package/dist/modal.js.map +1 -1
  214. package/dist/pagination.js +4 -4
  215. package/dist/payment-method.js +2 -2
  216. package/dist/popover.js +1 -1
  217. package/dist/popper-container.js +1 -1
  218. package/dist/radio-group.js +46 -45
  219. package/dist/radio-group.js.map +1 -1
  220. package/dist/search-bar.js +10 -10
  221. package/dist/segmented-control.js +3 -3
  222. package/dist/sidepanel.js +5 -5
  223. package/dist/status.js +2 -2
  224. package/dist/stepper.js +3 -3
  225. package/dist/structured-list.js +1 -1
  226. package/dist/summary-grid.js +3 -3
  227. package/dist/tabs.js +3 -3
  228. package/dist/tag.js +3 -3
  229. package/dist/textarea.js +95 -88
  230. package/dist/textarea.js.map +1 -1
  231. package/dist/timeline.js +198 -191
  232. package/dist/timeline.js.map +1 -1
  233. package/dist/toast.js +3 -3
  234. package/dist/toggle.js +2 -2
  235. package/dist/tutorial.js +5 -5
  236. package/dist/typography.js +1 -1
  237. package/dist/web-types.json +646 -361
  238. package/package.json +2 -2
  239. package/dist/chunks/base-modal.75319f4e.js.map +0 -1
  240. package/dist/chunks/button.7dd8d4de.js +0 -125
  241. package/dist/chunks/button.7dd8d4de.js.map +0 -1
  242. package/dist/chunks/checkbox.65743b08.js +0 -184
  243. package/dist/chunks/checkbox.65743b08.js.map +0 -1
  244. package/dist/chunks/controls-group.dd967ccf.js.map +0 -1
  245. package/dist/chunks/copy.e12b418e.js +0 -103
  246. package/dist/chunks/copy.e12b418e.js.map +0 -1
  247. package/dist/chunks/dropdown-default-textbox.465db4d4.js.map +0 -1
  248. package/dist/chunks/dropdown.6461dbe3.js.map +0 -1
  249. package/dist/chunks/index.0890dc99.js +0 -130
  250. package/dist/chunks/index.0890dc99.js.map +0 -1
  251. package/dist/chunks/index.f358c4bd.js.map +0 -1
  252. package/dist/chunks/listbox.a117e6d4.js.map +0 -1
  253. package/dist/chunks/tooltip.b8929659.js.map +0 -1
@@ -1,89 +1,89 @@
1
- import { computed as r, ref as T, onMounted as J, onUnmounted as ve, watch as Q, defineComponent as D, toRef as Z } from "vue";
2
- import { B as F } from "./index.b201e81d.js";
3
- import { BentoLoadingIndicator as _e } from "../loading-indicator.js";
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.858b0720.js";
3
+ import { BentoLoadingIndicator as ve } from "../loading-indicator.js";
4
4
  import { BentoEmptyState as me } from "../empty-state.js";
5
- import { u as K } from "./i18n.eb5b985b.js";
5
+ import { u as j } from "./i18n.eb5b985b.js";
6
6
  import { d as fe } from "./debounce.b5ef6acf.js";
7
+ import { n as P } from "./_plugin-vue2_normalizer.71e2aa87.js";
7
8
  import { C as ge } from "./checkmark.a6ed8f47.js";
8
- import { B, a as q } from "./keyboard-navigation.ca47dfa8.js";
9
- import { n as N } from "./_plugin-vue2_normalizer.71e2aa87.js";
10
- import { B as j } from "./checkbox.65743b08.js";
9
+ import { B as k, a as H } from "./keyboard-navigation.ca47dfa8.js";
10
+ import { B as X } from "./checkbox.f6f6ce39.js";
11
11
  import "./index.4c062058.js";
12
- import { C as ye, a as Ee } from "./chevron-up.81185563.js";
13
- import { B as Se, a as H } from "./loading-button.459b9ab4.js";
14
- import { o as xe } from "./resize.a041304d.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.7b5d0c22.js";
14
+ import { o as Se } from "./resize.a041304d.js";
15
15
  import "../assets/listbox.css";
16
- const ee = (t, e, l, s) => {
17
- const n = r(
16
+ const te = (t, e, l, s) => {
17
+ const n = c(
18
18
  () => {
19
- var c, v;
20
- return !!((c = t.value) != null && c.length) && ((v = t.value) == null ? void 0 : v.length) === e.value.length;
19
+ var a, d;
20
+ return !!((a = t.value) != null && a.length) && ((d = t.value) == null ? void 0 : d.length) === e.value.length;
21
21
  }
22
- ), o = r(() => {
23
- var c;
24
- return t.value == null || t.value.length === 0 ? !1 : ((c = t.value) == null ? void 0 : c.length) !== e.value.length;
22
+ ), o = c(() => {
23
+ var a;
24
+ return t.value == null || t.value.length === 0 ? !1 : ((a = t.value) == null ? void 0 : a.length) !== e.value.length;
25
25
  });
26
26
  return {
27
27
  isAllSelected: n,
28
28
  isIndeterminate: o,
29
- toggleSelectAll: (c) => {
30
- c ? l() : s();
29
+ toggleSelectAll: (a) => {
30
+ a ? l() : s();
31
31
  }
32
32
  };
33
33
  };
34
- function pe(t, { disabled: e, itemHeight: l, overscan: s = 5, prefixHeight: n }) {
35
- const o = T(null), _ = T([]), c = T(0), v = T(0), b = T(0);
36
- let S;
37
- const L = r(() => {
38
- const d = typeof l == "number" ? t.value.length * l : t.value.reduce((g, x, C) => g + l(C), 0), y = typeof l == "number" ? c.value * l : t.value.slice(0, c.value).reduce((g, x, C) => g + l(C), 0);
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);
39
39
  return {
40
40
  style: {
41
- marginTop: `${y}px`,
42
- height: `${d - y}px`
41
+ marginTop: `${C}px`,
42
+ height: `${g - C}px`
43
43
  }
44
44
  };
45
- }), p = () => {
46
- const d = (n == null ? void 0 : n.value) ?? 0, y = Math.max(o.value.scrollTop - d, 0);
45
+ }), L = () => {
46
+ const g = (n == null ? void 0 : n.value) ?? 0, C = Math.max(o.value.scrollTop - g, 0);
47
47
  if (typeof l == "number")
48
- return Math.floor(y / l);
49
- let g = 0, x = 0;
50
- for (let C = 0; C < t.value.length; C += 1) {
51
- const M = l(C);
52
- if (g += M, g >= y) {
53
- x = C;
48
+ return Math.floor(C / l);
49
+ let S = 0, _ = 0;
50
+ for (let y = 0; y < t.value.length; y += 1) {
51
+ const I = l(y);
52
+ if (S += I, S >= C) {
53
+ _ = y;
54
54
  break;
55
55
  }
56
56
  }
57
- return x;
57
+ return _;
58
58
  }, f = () => {
59
- if (b.value = o.value.clientHeight, typeof l == "number")
60
- return Math.ceil(b.value / l);
61
- const d = c.value ?? 0;
62
- let y = 0, g = 0;
63
- for (let x = d; x < t.value.length; x += 1) {
64
- const C = l(x);
65
- if (y += C, g = x, y > b.value)
59
+ if (u.value = o.value.clientHeight, typeof l == "number")
60
+ return Math.ceil(u.value / l);
61
+ 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)
66
66
  break;
67
67
  }
68
- return g - d;
69
- }, O = () => {
68
+ return S - g;
69
+ }, E = () => {
70
70
  if (o.value) {
71
- const d = f();
72
- c.value = p(), v.value = Math.min(c.value + d + s, t.value.length), _.value = t.value.slice(c.value, v.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
73
  }
74
- }, I = () => {
75
- O();
74
+ }, B = () => {
75
+ E();
76
76
  };
77
- e || (J(() => {
78
- o.value && (b.value = o.value.clientHeight, S = xe(o.value, ({ clientHeight: d }) => {
79
- b.value = d, O();
80
- }), O());
81
- }), ve(() => {
82
- S == null || S.disconnect();
83
- }), Q(
77
+ e || (Z(() => {
78
+ o.value && (u.value = o.value.clientHeight, x = Se(o.value, ({ clientHeight: g }) => {
79
+ u.value = g, E();
80
+ }), E());
81
+ }), _e(() => {
82
+ x == null || x.disconnect();
83
+ }), ee(
84
84
  () => t.value,
85
85
  () => {
86
- O();
86
+ E();
87
87
  }
88
88
  ));
89
89
  const A = {
@@ -100,13 +100,41 @@ function pe(t, { disabled: e, itemHeight: l, overscan: s = 5, prefixHeight: n })
100
100
  } : {
101
101
  containerRef: o,
102
102
  containerProps: A,
103
- onScroll: I,
104
- list: _,
105
- wrapperProps: L
103
+ onScroll: B,
104
+ list: m,
105
+ wrapperProps: O
106
106
  };
107
107
  }
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 || {}), P = /* @__PURE__ */ ((t) => (t.AUTOMATIC = "automatic", t.BUTTON = "button", t.NONE = "none", t))(P || {});
109
- const Ce = D({
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
+ name: "bento-listbox-static-category",
111
+ components: {
112
+ BentoTypography: w
113
+ },
114
+ props: {
115
+ /**
116
+ * Category label text
117
+ */
118
+ categoryLabel: {
119
+ type: String,
120
+ required: !0
121
+ }
122
+ }
123
+ });
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,
129
+ he,
130
+ Te,
131
+ !1,
132
+ null,
133
+ "4aa8cc6e",
134
+ null,
135
+ null
136
+ );
137
+ const Le = Oe.exports, Ae = N({
110
138
  name: "bento-listbox-option",
111
139
  props: {
112
140
  /**
@@ -120,13 +148,13 @@ const Ce = D({
120
148
  },
121
149
  emits: [i.CLICK, i.ENTER, i.SPACE, i.TAB],
122
150
  setup(t, { emit: e }) {
123
- const l = r(() => ({
151
+ const l = c(() => ({
124
152
  "b-listbox-option--disabled": t.disabled,
125
153
  "b-listbox-option--selected": t.selected
126
154
  }));
127
155
  return {
128
156
  // Enums
129
- BentoKeyboardNavigationKeyDownEvent: B,
157
+ BentoKeyboardNavigationKeyDownEvent: k,
130
158
  BentoListboxEvent: i,
131
159
  // Values
132
160
  conditionalClasses: l,
@@ -134,13 +162,13 @@ const Ce = D({
134
162
  onClick: (o) => {
135
163
  e(i.CLICK, o);
136
164
  },
137
- onOptionSelected: (o, _) => {
138
- e(o, _);
165
+ onOptionSelected: (o, m) => {
166
+ e(o, m);
139
167
  }
140
168
  };
141
169
  }
142
170
  });
143
- var he = function() {
171
+ var Ie = function() {
144
172
  var e = this, l = e._self._c;
145
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) {
146
174
  return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.onOptionSelected(e.BentoListboxEvent.ENTER, s);
@@ -149,21 +177,21 @@ var he = function() {
149
177
  }, function(s) {
150
178
  return !s.type.indexOf("key") && e._k(s.keyCode, "tab", 9, s.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, s);
151
179
  }] } }, "label", e.$attrs, !1), [e._t("default")], 2);
152
- }, Te = [], Oe = /* @__PURE__ */ N(
153
- Ce,
154
- he,
155
- Te,
180
+ }, Be = [], Re = /* @__PURE__ */ P(
181
+ Ae,
182
+ Ie,
183
+ Be,
156
184
  !1,
157
185
  null,
158
186
  "d7fb415c",
159
187
  null,
160
188
  null
161
189
  );
162
- const U = Oe.exports, Le = D({
190
+ const V = Re.exports, ke = N({
163
191
  name: "bento-listbox-single-select-option",
164
192
  components: {
165
- BentoListboxOption: U,
166
- BentoTypography: F,
193
+ BentoListboxOption: V,
194
+ BentoTypography: w,
167
195
  CheckmarkIcon: ge
168
196
  },
169
197
  props: {
@@ -186,9 +214,9 @@ const U = Oe.exports, Le = D({
186
214
  },
187
215
  emits: [i.ENTER, i.SELECT, i.SPACE, i.TAB],
188
216
  setup(t, { emit: e }) {
189
- const l = (_) => {
190
- t.disabled || e(_, t.option.value);
191
- }, s = r(() => t.disabled ? !0 : null), n = r(() => t.selected ? !0 : null), o = r(() => t.disabled ? -1 : 0);
217
+ const l = (m) => {
218
+ 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);
192
220
  return {
193
221
  // Values
194
222
  ariaDisabled: s,
@@ -201,7 +229,7 @@ const U = Oe.exports, Le = D({
201
229
  };
202
230
  }
203
231
  });
204
- var Ae = function() {
232
+ var De = function() {
205
233
  var e = this, l = e._self._c;
206
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) {
207
235
  return e.onOptionSelected(e.BentoListboxEvent.SELECT);
@@ -214,22 +242,22 @@ var Ae = function() {
214
242
  }]) }, [e._t("default", function() {
215
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)];
216
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);
217
- }, Ie = [], Be = /* @__PURE__ */ N(
218
- Le,
219
- Ae,
220
- Ie,
245
+ }, Ne = [], Pe = /* @__PURE__ */ P(
246
+ ke,
247
+ De,
248
+ Ne,
221
249
  !1,
222
250
  null,
223
251
  "092ed5ee",
224
252
  null,
225
253
  null
226
254
  );
227
- const Re = Be.exports, te = ({ items: t, isOptionDisabled: e }, l) => {
228
- const s = r(() => t.value.length - 1), n = T(0);
229
- J(() => {
255
+ const Me = Pe.exports, se = ({ items: t, isOptionDisabled: e }, l) => {
256
+ const s = c(() => t.value.length - 1), n = T(0);
257
+ Z(() => {
230
258
  e && (n.value = t.value.findIndex((f) => !e(f)));
231
259
  });
232
- const o = (f) => !e || !!e && e(t.value[f]), _ = (f) => !e || !!e && !e(t.value[f]), c = (f) => {
260
+ const o = (f) => !e || !!e && e(t.value[f]), m = (f) => !e || !!e && !e(t.value[f]), a = (f) => {
233
261
  switch (f) {
234
262
  case "increase":
235
263
  n.value += 1;
@@ -238,47 +266,48 @@ const Re = Be.exports, te = ({ items: t, isOptionDisabled: e }, l) => {
238
266
  n.value -= 1;
239
267
  break;
240
268
  }
241
- }, v = ({ edgeCaseItem: f, isItemBeforeEdgeCaseItem: O }, I, A) => {
242
- n.value !== f && (O ? _(f) && c(A) : (c(A), o(n.value) && I()), l(n.value));
243
- }, b = () => {
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 = () => {
244
272
  const f = n.value === s.value - 2;
245
- v(
273
+ d(
246
274
  {
247
275
  isItemBeforeEdgeCaseItem: f,
248
276
  edgeCaseItem: s.value
249
277
  },
250
- b,
278
+ u,
251
279
  "increase"
252
280
  /* INCREASE */
253
281
  );
254
- }, S = () => {
282
+ }, x = () => {
255
283
  const f = n.value === 1;
256
- v(
284
+ d(
257
285
  {
258
286
  edgeCaseItem: 0,
259
287
  isItemBeforeEdgeCaseItem: f
260
288
  },
261
- S,
289
+ x,
262
290
  "decrease"
263
291
  /* DECREASE */
264
292
  );
265
293
  };
266
294
  return {
267
295
  moveToFirstElement: () => {
268
- n.value = 0, o(n.value) ? b() : l(n.value);
296
+ n.value = 0, o(n.value) ? u() : l(n.value);
269
297
  },
270
298
  moveToLastElement: () => {
271
- n.value = s.value, o(n.value) ? S() : l(n.value);
299
+ n.value = s.value, o(n.value) ? x() : l(n.value);
272
300
  },
273
- moveToNextElement: b,
274
- moveToPreviousElement: S
301
+ moveToNextElement: u,
302
+ moveToPreviousElement: x
275
303
  };
276
- }, ke = D({
304
+ }, $e = N({
277
305
  name: "bento-listbox-single-select",
278
306
  components: {
279
- BentoListboxSingleSelectOption: Re
307
+ BentoListboxSingleSelectCategory: Le,
308
+ BentoListboxSingleSelectOption: Me
280
309
  },
281
- directives: { BentoKeyboardNavigationDirective: q },
310
+ directives: { BentoKeyboardNavigationDirective: H },
282
311
  inheritAttrs: !1,
283
312
  props: {
284
313
  /**
@@ -313,28 +342,32 @@ const Re = Be.exports, te = ({ items: t, isOptionDisabled: e }, l) => {
313
342
  selectedValue: {
314
343
  type: [String, Number],
315
344
  default: void 0
316
- }
345
+ },
346
+ /**
347
+ * If enabled, dropdown will display non-selectable, static categories
348
+ */
349
+ staticCategories: { type: Boolean, default: !1 }
317
350
  },
318
351
  emits: [i.SELECT, i.ENTER, i.SPACE, i.TAB],
319
352
  setup(t, { emit: e, slots: l }) {
320
- const s = T([]), n = (p) => (f) => {
321
- e(p, f);
322
- }, o = (p) => s.value[p].$el.focus(), { moveToNextElement: _, moveToPreviousElement: c, moveToFirstElement: v, moveToLastElement: b } = te(
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(
323
356
  {
324
- items: Z(t, "items"),
357
+ items: Y(t, "items"),
325
358
  isOptionDisabled: t.isOptionDisabled
326
359
  },
327
- o
328
- ), S = {
329
- [B.ARROW_UP]: c,
330
- [B.ARROW_DOWN]: _,
331
- [B.HOME]: v,
332
- [B.END]: b
360
+ m
361
+ ), O = {
362
+ [k.ARROW_UP]: d,
363
+ [k.ARROW_DOWN]: a,
364
+ [k.HOME]: u,
365
+ [k.END]: x
333
366
  }, L = {
334
- [i.SELECT]: n(i.SELECT),
335
- [i.SPACE]: n(i.SPACE),
336
- [i.TAB]: n(i.TAB),
337
- [i.ENTER]: n(i.ENTER)
367
+ [i.SELECT]: o(i.SELECT),
368
+ [i.SPACE]: o(i.SPACE),
369
+ [i.TAB]: o(i.TAB),
370
+ [i.ENTER]: o(i.ENTER)
338
371
  };
339
372
  return {
340
373
  // Enums
@@ -342,49 +375,59 @@ const Re = Be.exports, te = ({ items: t, isOptionDisabled: e }, l) => {
342
375
  // Values
343
376
  listboxItemRef: s,
344
377
  slots: l,
378
+ // Computed
379
+ hasCategories: n,
345
380
  // Methods
346
- onOptionSelected: n,
381
+ onOptionSelected: o,
347
382
  // Keyboard navigation
348
- listboxListeners: S,
383
+ listboxListeners: O,
349
384
  listboxOptionListeners: L
350
385
  };
351
386
  }
352
387
  });
353
- var De = function() {
388
+ var we = function() {
354
389
  var e = this, l = e._self._c;
355
- return e._self._setupProxy, l("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }] }, e.listboxListeners), e._l(e.items, function(s) {
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) {
393
+ return { key: m, fn: function(a) {
394
+ return [e._t(m, null, null, a)];
395
+ } };
396
+ })], null, !0) }, e.listboxOptionListeners));
397
+ }), 1);
398
+ }) : e._l(e.items, function(s) {
356
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) {
357
- return { key: o, fn: function(_) {
358
- return [e._t(o, null, null, _)];
400
+ return { key: o, fn: function(m) {
401
+ return [e._t(o, null, null, m)];
359
402
  } };
360
403
  })], null, !0) }, e.listboxOptionListeners));
361
- }), 1);
362
- }, Ne = [], Pe = /* @__PURE__ */ N(
363
- ke,
364
- De,
365
- Ne,
404
+ })], 2);
405
+ }, Ge = [], Fe = /* @__PURE__ */ P(
406
+ $e,
407
+ we,
408
+ Ge,
366
409
  !1,
367
410
  null,
368
411
  null,
369
412
  null,
370
413
  null
371
414
  );
372
- const Me = Pe.exports;
373
- var le = /* @__PURE__ */ ((t) => (t.DISABLED = "disabled", t))(le || {}), G = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.UNSELECT_CATEGORY = "unselect-category", t))(G || {});
374
- const $e = {
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 = {
375
418
  "en-US": {
376
419
  categoryClosed: "{category} closed",
377
420
  categoryOpened: "{category} opened"
378
421
  }
379
- }, we = D({
380
- i18n: { messages: $e },
422
+ }, Ve = N({
423
+ i18n: { messages: Ye },
381
424
  name: "bento-listbox-multi-select-category",
382
425
  components: {
383
- BentoCheckbox: j,
384
- BentoTypography: F,
385
- BentoListboxOption: U,
426
+ BentoCheckbox: X,
427
+ BentoTypography: w,
428
+ BentoListboxOption: V,
386
429
  ChevronDownIcon: ye,
387
- ChevronUpIcon: Ee
430
+ ChevronUpIcon: pe
388
431
  },
389
432
  props: {
390
433
  /**
@@ -419,86 +462,100 @@ const $e = {
419
462
  selectedItemsList: {
420
463
  type: Array,
421
464
  default: () => []
422
- }
465
+ },
466
+ /**
467
+ * If enabled, dropdown will display non-selectable, static categories
468
+ */
469
+ staticCategories: { type: Boolean, default: !1 }
423
470
  },
424
- emits: [G.SELECT_CATEGORY, G.UNSELECT_CATEGORY],
471
+ emits: [U.SELECT_CATEGORY, U.UNSELECT_CATEGORY],
425
472
  setup(t, { emit: e }) {
426
- const l = T(!1), { t: s } = K(), n = (d) => t.isOptionDisabled ? t.isOptionDisabled(d) : !1, o = r(
427
- () => t.category.items.every((d) => n(d))
428
- ), _ = r(() => ({
429
- [`b-listbox-multi-select-category--${le.DISABLED}`]: o.value
430
- })), c = (d) => {
431
- d.preventDefault(), l.value = !l.value;
432
- }, v = (d) => {
433
- var x;
434
- const y = n(d), g = ((x = t.selectedItemsList) == null ? void 0 : x.includes(d.value)) || !1;
435
- return { isDisabled: y, isPreSelected: g };
436
- }, b = r(
437
- () => t.category.items.filter((d) => {
438
- const { isDisabled: y, isPreSelected: g } = v(d);
439
- return y && g || !y;
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 = (_) => {
481
+ 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;
440
488
  })
441
- ), S = r(
489
+ ), L = c(
442
490
  () => {
443
- var d;
444
- return (d = b.value) == null ? void 0 : d.filter(
491
+ var _;
492
+ return (_ = O.value) == null ? void 0 : _.filter(
445
493
  ({ value: y }) => {
446
- var g;
447
- return (g = t.selectedItemsList) == null ? void 0 : g.includes(y);
494
+ var I;
495
+ return (I = t.selectedItemsList) == null ? void 0 : I.includes(y);
448
496
  }
449
497
  );
450
498
  }
451
- ), L = r(() => {
452
- const d = l.value ? "categoryOpened" : "categoryClosed";
453
- return s(d, { category: t.category.label });
454
- }), p = () => {
455
- e(G.SELECT_CATEGORY);
456
- }, f = () => {
457
- e(G.UNSELECT_CATEGORY);
458
- }, { isAllSelected: O, isIndeterminate: I, toggleSelectAll: A } = ee(
459
- S,
460
- b,
461
- p,
462
- f
499
+ ), f = c(() => {
500
+ const _ = l.value ? "categoryOpened" : "categoryClosed";
501
+ return s(_, { category: t.category.label });
502
+ }), E = c(
503
+ () => ({
504
+ el: "span",
505
+ variant: t.staticCategories ? "caption" : "body"
506
+ })
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
463
516
  );
464
517
  return {
465
518
  // Values
466
- chevronTitle: L,
467
- conditionalClass: _,
519
+ chevronTitle: f,
520
+ conditionalClass: d,
468
521
  hasAllPropsDisabled: o,
469
522
  isOpen: l,
470
- isAllSelected: O,
471
- isIndeterminate: I,
523
+ isAllSelected: g,
524
+ isIndeterminate: C,
525
+ isStaticCategory: m,
526
+ // Computed
527
+ showItemChildren: a,
528
+ categoryLabelProps: E,
472
529
  // Methods
473
- toggleOpen: c,
474
- toggleSelectAll: A
530
+ toggleOpen: u,
531
+ toggleSelectAll: S
475
532
  };
476
533
  }
477
534
  });
478
- var Ge = function() {
535
+ var ze = function() {
479
536
  var e = this, l = e._self._c;
480
- return e._self._setupProxy, l("div", [l("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass }, [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", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { el: "span" } }, [e._v(" " + e._s(e.category.label) + " ")]), l("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "data-testid": "toggle-listbox" }, on: { "!click": function(s) {
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) {
481
538
  return e.toggleOpen.apply(null, arguments);
482
- } } }, [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.isOpen, expression: "isOpen" }] }, [e._t("default")], 2)], 1);
483
- }, Fe = [], Ue = /* @__PURE__ */ N(
484
- we,
485
- Ge,
486
- Fe,
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,
542
+ ze,
543
+ We,
487
544
  !1,
488
545
  null,
489
- "360ce3ac",
546
+ "f360ac3d",
490
547
  null,
491
548
  null
492
549
  );
493
- const Ye = Ue.exports;
494
- var k = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", t.UNSELECT_CATEGORY = "unselect-category", t))(k || {});
495
- const Ve = D({
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({
496
553
  name: "listbox-multi-select-options",
497
554
  components: {
498
- BentoCheckbox: j,
499
- BentoListboxOption: U,
500
- BentoTypography: F,
501
- ListboxMultiSelectCategory: Ye
555
+ BentoCheckbox: X,
556
+ BentoListboxOption: V,
557
+ BentoTypography: w,
558
+ ListboxMultiSelectCategory: qe
502
559
  },
503
560
  props: {
504
561
  /**
@@ -549,27 +606,32 @@ const Ve = D({
549
606
  selectedItemsList: {
550
607
  type: Array,
551
608
  default: () => []
552
- }
609
+ },
610
+ /**
611
+ * If enabled, dropdown will display non-selectable, static categories
612
+ */
613
+ staticCategories: { type: Boolean, default: !1 }
553
614
  },
554
615
  emits: [
555
- k.TOGGLE_CHECKBOX_SELECTION,
556
- k.SELECT_CATEGORY,
557
- k.UNSELECT_CATEGORY
616
+ D.TOGGLE_CHECKBOX_SELECTION,
617
+ D.SELECT_CATEGORY,
618
+ D.UNSELECT_CATEGORY
558
619
  ],
559
620
  setup(t, { emit: e }) {
560
- const l = (v) => {
561
- e(k.TOGGLE_CHECKBOX_SELECTION, v);
562
- }, s = (v) => !!v.items, n = (v) => {
563
- const b = t.isMultiLevel && t.searching;
564
- return v.description && (!t.isMultiLevel || b);
565
- }, o = (v) => v.items ? !!v.items.find((b) => t.selectedItemsList.includes(b.value)) : t.selectedItemsList.includes(v.value), _ = (v, b) => {
566
- if (s(b))
567
- return e(v ? k.SELECT_CATEGORY : k.UNSELECT_CATEGORY, b);
568
- l(b.value);
621
+ const l = (d) => {
622
+ e(D.TOGGLE_CHECKBOX_SELECTION, d);
623
+ }, s = (d) => !!d.items, n = (d) => {
624
+ 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);
569
630
  };
570
631
  return {
571
632
  // Values
572
- conditionalClasses: r(() => ({
633
+ conditionalClasses: c(() => ({
634
+ "b-listbox-multi-select-options__static-category-option": t.staticCategories,
573
635
  "b-listbox-multi-select-options__category-option": t.categoryItems
574
636
  })),
575
637
  // Methods
@@ -577,54 +639,66 @@ const Ve = D({
577
639
  isOptionSelected: o,
578
640
  shouldShowDescription: n,
579
641
  toggleCheckboxSelection: l,
580
- selectSearch: _,
642
+ selectSearch: m,
581
643
  // Enums
582
644
  BentoListboxEvent: i,
583
- ListboxMultiSelectOptionsEvent: k
645
+ ListboxMultiSelectOptionsEvent: D
584
646
  };
585
647
  }
586
648
  });
587
- var ze = function() {
649
+ var He = function() {
588
650
  var e = this, l = e._self._c;
589
651
  return e._self._setupProxy, l("div", e._l(e.items, function(s) {
590
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() {
591
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)];
592
- }, null, s)], 2)] : [s.items ? [l("listbox-multi-select-category", { attrs: { category: s, "is-option-disabled": e.isOptionDisabled, "selected-items-list": e.selectedItemsList }, on: { "select-category": function(n) {
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) {
593
655
  return e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, s);
594
656
  }, "unselect-category": function(n) {
595
657
  return e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, s);
596
- } } }, [l("listbox-multi-select-options", { attrs: { "category-items": "", items: s.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": e.isMultiLevel, "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) {
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) {
597
659
  return e.toggleCheckboxSelection(s.value);
598
660
  } } }), e._t("default", function() {
599
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)];
600
662
  }, null, s)], 2)]], 2);
601
663
  }), 0);
602
- }, We = [], Ke = /* @__PURE__ */ N(
603
- Ve,
604
- ze,
605
- We,
664
+ }, Xe = [], Je = /* @__PURE__ */ P(
665
+ je,
666
+ He,
667
+ Xe,
606
668
  !1,
607
669
  null,
608
- "23f75bdb",
670
+ "c9b2c61d",
609
671
  null,
610
672
  null
611
673
  );
612
- const qe = Ke.exports, je = {
674
+ const Qe = Je.exports, Ze = {
613
675
  "en-US": {
614
676
  allSelected: "All selected ({total})",
615
677
  numberOfTotalSelected: "{number} of {total} selected",
616
678
  selectAll: "Select all ({total})"
617
679
  }
618
- }, He = D({
619
- i18n: { messages: je },
680
+ }, et = (t) => {
681
+ 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;
687
+ });
688
+ return {
689
+ isMultiLevelSelect: e,
690
+ flattenedItemsList: l
691
+ };
692
+ }, tt = N({
693
+ i18n: { messages: Ze },
620
694
  name: "bento-listbox-multi-select",
621
695
  components: {
622
- BentoCheckbox: j,
623
- BentoListboxOption: U,
624
- BentoTypography: F,
625
- ListboxMultiSelectOptions: qe
696
+ BentoCheckbox: X,
697
+ BentoListboxOption: V,
698
+ BentoTypography: w,
699
+ ListboxMultiSelectOptions: Qe
626
700
  },
627
- directives: { BentoKeyboardNavigationDirective: q },
701
+ directives: { BentoKeyboardNavigationDirective: H },
628
702
  props: {
629
703
  /**
630
704
  * Function that allows the options to be disabled
@@ -664,149 +738,153 @@ const qe = Ke.exports, je = {
664
738
  selectedValues: {
665
739
  type: Array,
666
740
  default: () => []
667
- }
741
+ },
742
+ /**
743
+ * If enabled, dropdown will display non-selectable, static categories
744
+ */
745
+ staticCategories: { type: Boolean, default: !1 }
668
746
  },
669
747
  emits: [i.SELECT],
670
748
  setup(t, { emit: e, slots: l }) {
671
- const { t: s } = K(), n = T(null), o = T(null), _ = T(null), c = T();
672
- Q(
749
+ const { t: s } = j(), n = T(null), o = T(null), m = T(null), a = T();
750
+ ee(
673
751
  () => t.selectedValues,
674
752
  () => {
675
- c.value = [...t.selectedValues ?? []];
753
+ a.value = [...t.selectedValues ?? []];
676
754
  },
677
755
  {
678
756
  immediate: !0
679
757
  }
680
758
  );
681
- const v = r(() => !!t.items.find(({ items: a }) => !!a)), b = r(() => v.value ? t.items.reduce((a, u) => (u.items ? a.push(...u.items.flat()) : a.push(u), a), []) : t.items), S = (a) => {
682
- var m;
683
- const u = t.isOptionDisabled(a), E = ((m = c.value) == null ? void 0 : m.includes(a.value)) || !1;
684
- return { isDisabled: u, isPreSelected: E };
685
- }, L = r(
686
- () => t.searching && v ? t.items : b.value.filter((a) => {
687
- const { isDisabled: u, isPreSelected: E } = S(a);
688
- return u && E || !u;
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;
689
767
  })
690
- ), p = r(
768
+ ), L = c(
691
769
  () => {
692
- var a;
693
- return (a = L.value) == null ? void 0 : a.filter((u) => {
694
- var E;
695
- return u.items && v.value && t.searching ? u.items.filter(
770
+ 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(
696
774
  (R) => (t.selectedValues ?? []).includes(
697
775
  R.value
698
776
  )
699
- ).length === u.items.length : (E = c.value) == null ? void 0 : E.includes(u.value);
777
+ ).length === b.items.length : (p = a.value) == null ? void 0 : p.includes(b.value);
700
778
  });
701
779
  }
702
- ), f = () => v.value && !t.searching ? L.value.length : t.items.length, O = r(() => {
703
- var E;
704
- const a = f(), u = ((E = p.value) == null ? void 0 : E.length) || 0;
705
- return u === 0 ? s("selectAll", { total: a }) : u === a ? s("allSelected", { total: a }) : s("numberOfTotalSelected", { number: u, total: a });
706
- }), I = (a) => {
707
- const u = (m) => {
708
- const { isDisabled: R, isPreSelected: W } = S(m);
709
- return R && W || !R;
710
- }, E = a.filter(u).filter((m) => !c.value.includes(m.value)).map(({ value: m }) => m);
711
- c.value = [...c.value, ...E], e(i.SELECT, c.value);
712
- }, A = (a) => {
713
- const u = (m) => {
714
- const { isDisabled: R, isPreSelected: W } = S(m);
715
- return !(R && W);
716
- }, E = a.filter(u).map(({ value: m }) => m);
717
- c.value = c.value.filter((m) => !(E != null && E.includes(m))), e(i.SELECT, c.value);
718
- }, d = () => {
719
- I(b.value);
720
- }, y = () => {
721
- A(b.value);
722
- }, { isAllSelected: g, isIndeterminate: x, toggleSelectAll: C } = ee(
723
- p,
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);
796
+ }, g = () => {
797
+ B(u.value);
798
+ }, C = () => {
799
+ A(u.value);
800
+ }, { isAllSelected: S, isIndeterminate: _, toggleSelectAll: y } = te(
724
801
  L,
725
- d,
726
- y
727
- ), M = (a) => {
728
- I(a.items);
729
- }, Y = (a) => {
730
- A(a.items);
731
- }, V = (a, u) => {
732
- let E = !1;
733
- c.value = c.value.filter((m) => u === m ? (E = !0, !1) : !0), E || c.value.push(u), e(a, c.value);
734
- }, $ = r(() => {
735
- const a = (m) => c.value.includes(m.value), u = (m) => !!m.find((R) => a(R));
736
- return t.items.filter((m) => m.items && u(m.items) ? !0 : a(m));
737
- }), z = r(() => {
738
- var a;
739
- return ((a = $.value) == null ? void 0 : a.length) > 0;
740
- }), h = r(
802
+ O,
803
+ g,
804
+ C
805
+ ), I = (r) => {
806
+ B(r.items);
807
+ }, 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(
741
819
  () => {
742
- var a, u;
743
- return ((a = p.value) == null ? void 0 : a.length) === ((u = b.value) == null ? void 0 : u.length);
820
+ var r, b;
821
+ return ((r = L.value) == null ? void 0 : r.length) === ((b = u.value) == null ? void 0 : b.length);
744
822
  }
745
- ), w = r(
823
+ ), F = c(
746
824
  () => n.value ? [n.value] : []
747
- ), se = r(
825
+ ), le = c(
748
826
  () => {
749
- var a, u;
750
- return (u = (a = o.value) == null ? void 0 : a.$children) != null && u.length ? o.value.$children : [];
827
+ var r, b;
828
+ return (b = (r = o.value) == null ? void 0 : r.$children) != null && b.length ? o.value.$children : [];
751
829
  }
752
- ), ne = r(
830
+ ), ne = c(
753
831
  () => {
754
- var a, u;
755
- return (u = (a = _.value) == null ? void 0 : a.$children) != null && u.length ? _.value.$children : [];
832
+ var r, b;
833
+ return (b = (r = m.value) == null ? void 0 : r.$children) != null && b.length ? m.value.$children : [];
756
834
  }
757
- ), oe = r(() => ({ label: O, value: g })), ie = r(() => [
835
+ ), oe = c(() => ({ label: E, value: S })), ie = c(() => [
758
836
  oe,
759
- ...$.value,
760
- ...b.value
761
- ]), ae = (a) => {
837
+ ...G.value,
838
+ ...u.value
839
+ ]), ae = (r) => {
762
840
  [
763
- ...w.value,
764
- ...se.value,
841
+ ...F.value,
842
+ ...le.value,
765
843
  ...ne.value
766
- ][a].$el.focus();
767
- }, { moveToNextElement: ce, moveToPreviousElement: re, moveToFirstElement: ue, moveToLastElement: de } = te(
844
+ ][r].$el.focus();
845
+ }, { moveToNextElement: ce, moveToPreviousElement: re, moveToFirstElement: ue, moveToLastElement: de } = se(
768
846
  {
769
847
  items: T(ie),
770
848
  isOptionDisabled: t.isOptionDisabled
771
849
  },
772
850
  ae
773
851
  ), be = {
774
- [B.ARROW_UP]: re,
775
- [B.ARROW_DOWN]: ce,
776
- [B.HOME]: ue,
777
- [B.END]: de
852
+ [k.ARROW_UP]: re,
853
+ [k.ARROW_DOWN]: ce,
854
+ [k.HOME]: ue,
855
+ [k.END]: de
778
856
  };
779
857
  return {
780
858
  // Refs
781
859
  selectAllListboxItemsRef: n,
782
860
  selectedListboxItemsRef: o,
783
- listboxItemsRef: _,
861
+ listboxItemsRef: m,
784
862
  // Values
785
- isAllSelected: g,
863
+ isAllSelected: S,
786
864
  isAllItemsIncludingDisabled: h,
787
- isAnOptionSelected: z,
788
- isIndeterminate: x,
789
- isMultiLevelSelect: v,
790
- flattenedItemsList: b,
791
- selectedItemsList: c,
792
- selectAllCheckboxText: O,
793
- selectedOptions: $,
865
+ isAnOptionSelected: W,
866
+ isIndeterminate: _,
867
+ isMultiLevelSelect: d,
868
+ flattenedItemsList: u,
869
+ selectedItemsList: a,
870
+ selectAllCheckboxText: E,
871
+ selectedOptions: G,
794
872
  slots: l,
795
873
  // Enums
796
874
  BentoListboxEvent: i,
797
875
  // Methods
798
- selectAllCategory: M,
799
- toggleCheckboxSelection: V,
800
- toggleSelectAll: C,
801
- unselectAllCategory: Y,
876
+ selectAllCategory: I,
877
+ toggleCheckboxSelection: z,
878
+ toggleSelectAll: y,
879
+ unselectAllCategory: M,
802
880
  // Events
803
881
  listboxListeners: be
804
882
  };
805
883
  }
806
884
  });
807
- var Xe = function() {
885
+ var st = function() {
808
886
  var e = this, l = e._self._c;
809
- 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, searching: e.searching, "selected-items-list": e.selectedItemsList }, on: e._d({ "select-category": e.selectAllCategory, "unselect-category": e.unselectAllCategory, "toggle-checkbox-selection": function(s) {
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) {
810
888
  return e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, s);
811
889
  } }, [e.BentoListboxEvent.SPACE, function(s) {
812
890
  return e.toggleCheckboxSelection(e.BentoListboxEvent.SPACE, s);
@@ -818,7 +896,7 @@ var Xe = function() {
818
896
  return { key: n, fn: function(o) {
819
897
  return [e._t(n, null, null, o)];
820
898
  } };
821
- })], 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, searching: e.searching, "selected-items-list": e.selectedItemsList }, on: e._d({ "toggle-checkbox-selection": function(s) {
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) {
822
900
  return e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, s);
823
901
  }, "select-category": e.selectAllCategory, "unselect-category": e.unselectAllCategory }, [e.BentoListboxEvent.SPACE, function(s) {
824
902
  return e.toggleCheckboxSelection(e.BentoListboxEvent.SPACE, s);
@@ -831,33 +909,33 @@ var Xe = function() {
831
909
  return [e._t(n, null, null, o)];
832
910
  } };
833
911
  })], null, !0) })], 1)], 1);
834
- }, Je = [], Qe = /* @__PURE__ */ N(
835
- He,
836
- Xe,
837
- Je,
912
+ }, lt = [], nt = /* @__PURE__ */ P(
913
+ tt,
914
+ st,
915
+ lt,
838
916
  !1,
839
917
  null,
840
- "70173dcf",
918
+ "2a48c62f",
841
919
  null,
842
920
  null
843
921
  );
844
- const X = Qe.exports, Ze = {
922
+ const Q = nt.exports, ot = {
845
923
  "en-US": {
846
924
  showMore: "Show more",
847
925
  loading: "Loading"
848
926
  }
849
- }, et = 36, tt = D({
927
+ }, it = 36, at = N({
850
928
  name: "bento-listbox",
851
929
  components: {
852
930
  BentoEmptyState: me,
853
- BentoListboxSingleSelect: Me,
854
- BentoListboxMultiSelect: X,
855
- BentoTypography: F,
856
- BentoLoadingIndicator: _e,
857
- BentoLoadingButton: Se
931
+ BentoListboxSingleSelect: Ue,
932
+ BentoListboxMultiSelect: Q,
933
+ BentoTypography: w,
934
+ BentoLoadingIndicator: ve,
935
+ BentoLoadingButton: xe
858
936
  },
859
- directives: { BentoKeyboardNavigationDirective: q },
860
- i18n: { messages: Ze },
937
+ directives: { BentoKeyboardNavigationDirective: H },
938
+ i18n: { messages: ot },
861
939
  props: {
862
940
  /**
863
941
  * Defines a string value that labels an interactive element.
@@ -913,13 +991,17 @@ const X = Qe.exports, Ze = {
913
991
  */
914
992
  lazyLoadType: {
915
993
  type: String,
916
- default: P.NONE,
917
- validator: (t) => Object.values(P).includes(t)
994
+ default: $.NONE,
995
+ validator: (t) => Object.values($).includes(t)
918
996
  },
919
997
  /**
920
998
  * If enabled, the user will be able to select multiple items.
921
999
  */
922
1000
  multiple: { type: Boolean, default: !1 },
1001
+ /**
1002
+ * If enabled, dropdown will display non-selectable, static categories
1003
+ */
1004
+ staticCategories: { type: Boolean, default: !1 },
923
1005
  /**
924
1006
  * Messaged displayed when no items are listed in the listbox
925
1007
  */
@@ -930,7 +1012,7 @@ const X = Qe.exports, Ze = {
930
1012
  *
931
1013
  * If enabled, hides the "Select all" checkbox in "multiple" mode.
932
1014
  */
933
- searching: X.props.searching,
1015
+ searching: Q.props.searching,
934
1016
  /**
935
1017
  * The `input` value.
936
1018
  * Providing an empty string or empty array will select no options.
@@ -958,109 +1040,110 @@ const X = Qe.exports, Ze = {
958
1040
  i.TAB
959
1041
  ],
960
1042
  setup(t, { emit: e, slots: l }) {
961
- const s = T([]), n = Z(t, "items"), { t: o } = K(), _ = r(() => t.lazyLoadType !== P.AUTOMATIC), c = r(() => t.lazyLoadType === P.AUTOMATIC), v = () => {
1043
+ const s = T([]), n = Y(t, "items"), { t: o } = j(), m = c(() => t.lazyLoadType !== $.AUTOMATIC), a = c(() => t.lazyLoadType === $.AUTOMATIC), d = () => {
962
1044
  var h;
963
- return typeof (t == null ? void 0 : t.virtualScroll) == "object" && ((h = t == null ? void 0 : t.virtualScroll) != null && h.itemHeight) ? t.virtualScroll.itemHeight : et;
1045
+ return typeof (t == null ? void 0 : t.virtualScroll) == "object" && ((h = t == null ? void 0 : t.virtualScroll) != null && h.itemHeight) ? t.virtualScroll.itemHeight : it;
964
1046
  }, {
965
- containerRef: b,
966
- containerProps: S,
967
- onScroll: L,
968
- list: p,
1047
+ containerRef: u,
1048
+ containerProps: x,
1049
+ onScroll: O,
1050
+ list: L,
969
1051
  wrapperProps: f
970
- } = pe(n, {
971
- itemHeight: v(),
1052
+ } = Ee(n, {
1053
+ itemHeight: d(),
972
1054
  // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
973
1055
  disabled: (t == null ? void 0 : t.multiple) || (t == null ? void 0 : t.virtualScroll) === !1 || (t == null ? void 0 : t.lazyLoadType) !== "none"
974
- }), O = r(
975
- () => _.value ? "true" : void 0
976
- ), I = r(
977
- () => _.value && t.loading ? "true" : "false"
978
- ), A = r(
979
- () => _.value ? "polite" : void 0
980
- ), d = (h) => (w) => {
981
- e(h, w);
982
- }, y = () => {
1056
+ }), E = c(
1057
+ () => m.value ? "true" : void 0
1058
+ ), B = c(
1059
+ () => m.value && t.loading ? "true" : "false"
1060
+ ), A = c(
1061
+ () => m.value ? "polite" : void 0
1062
+ ), g = (h) => (F) => {
1063
+ e(h, F);
1064
+ }, C = () => {
983
1065
  e(i.SHOW_MORE);
984
- }, g = fe(() => {
985
- const h = b.value;
1066
+ }, S = fe(() => {
1067
+ const h = u.value;
986
1068
  if (!h)
987
1069
  return;
988
- const w = Math.round(h.scrollTop) + h.clientHeight >= h.scrollHeight;
989
- t.hasMoreItems && w && !t.loading && y();
990
- }), x = () => {
991
- c.value ? g() : L();
992
- }, C = r(() => {
1070
+ const F = Math.round(h.scrollTop) + h.clientHeight >= h.scrollHeight;
1071
+ t.hasMoreItems && F && !t.loading && C();
1072
+ }), _ = () => {
1073
+ a.value ? S() : O();
1074
+ }, y = c(() => {
993
1075
  var h;
994
1076
  return t.searching && ((h = t.items) == null ? void 0 : h.length) === 0;
995
- }), M = r(
996
- () => t.lazyLoadType === P.BUTTON && t.hasMoreItems
997
- ), Y = r(
998
- () => t.loading ? H.LOADING : H.START
999
- ), V = r(() => t.loading ? o("loading") : o("showMore")), $ = r(() => ({
1077
+ }), I = c(
1078
+ () => t.lazyLoadType === $.BUTTON && t.hasMoreItems
1079
+ ), M = c(
1080
+ () => t.loading ? J.LOADING : J.START
1081
+ ), z = c(() => t.loading ? o("loading") : o("showMore")), G = c(() => ({
1000
1082
  ...t.emptyState,
1001
1083
  variant: "condensed"
1002
- })), z = {
1003
- [i.SELECT]: d(i.SELECT),
1004
- [i.SPACE]: d(i.SPACE),
1005
- [i.TAB]: d(i.TAB),
1006
- [i.ENTER]: d(i.ENTER)
1084
+ })), W = {
1085
+ [i.SELECT]: g(i.SELECT),
1086
+ [i.SPACE]: g(i.SPACE),
1087
+ [i.TAB]: g(i.TAB),
1088
+ [i.ENTER]: g(i.ENTER)
1007
1089
  };
1008
1090
  return {
1009
1091
  // Refs
1010
- listboxRef: b,
1092
+ listboxRef: u,
1011
1093
  listboxItemRef: s,
1012
1094
  // a11y
1013
- ariaAtomic: O,
1014
- ariaBusy: I,
1095
+ ariaAtomic: E,
1096
+ ariaBusy: B,
1015
1097
  ariaLive: A,
1016
1098
  // Values
1017
- containerProps: S,
1018
- isSearchResultEmpty: C,
1019
- limitedEmptyStateProps: $,
1020
- loadingButtonState: Y,
1099
+ containerProps: x,
1100
+ isSearchResultEmpty: y,
1101
+ limitedEmptyStateProps: G,
1102
+ loadingButtonState: M,
1021
1103
  slots: l,
1022
- shouldDisplayShowMoreButton: M,
1023
- showMoreButtonText: V,
1024
- virtualisedItems: p,
1104
+ shouldDisplayShowMoreButton: I,
1105
+ showMoreButtonText: z,
1106
+ virtualisedItems: L,
1025
1107
  wrapperProps: f,
1026
1108
  // Enums
1027
- BentoKeyboardNavigationKeyDownEvent: B,
1109
+ BentoKeyboardNavigationKeyDownEvent: k,
1028
1110
  BentoListboxEvent: i,
1029
1111
  // Methods
1030
- onListboxContainerScroll: x,
1031
- onOptionSelected: d,
1032
- emitShowMore: y,
1033
- listboxListeners: z
1112
+ onListboxContainerScroll: _,
1113
+ onOptionSelected: g,
1114
+ emitShowMore: C,
1115
+ listboxListeners: W
1034
1116
  };
1035
1117
  }
1036
1118
  });
1037
- var lt = function() {
1119
+ var ct = function() {
1038
1120
  var e = this, l = e._self._c;
1039
- 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, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(s, n) {
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) {
1040
1122
  return { key: n, fn: function(o) {
1041
1123
  return [e._t(n, null, null, o)];
1042
1124
  } };
1043
- })], null, !0) }, e.listboxListeners))] : [l("bento-listbox-single-select", e._g({ ref: "listboxItemRef", attrs: { items: e.virtualisedItems, "selected-value": e.selectedValue, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(s, n) {
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) {
1044
1126
  return { key: n, fn: function(o) {
1045
1127
  return [e._t(n, null, null, o)];
1046
1128
  } };
1047
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) {
1048
1130
  return e.emitShowMore.apply(null, arguments);
1049
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)]);
1050
- }, st = [], nt = /* @__PURE__ */ N(
1051
- tt,
1052
- lt,
1053
- st,
1132
+ }, rt = [], ut = /* @__PURE__ */ P(
1133
+ at,
1134
+ ct,
1135
+ rt,
1054
1136
  !1,
1055
1137
  null,
1056
- "bd53a4f9",
1138
+ "17128845",
1057
1139
  null,
1058
1140
  null
1059
1141
  );
1060
- const Et = nt.exports;
1142
+ const Tt = ut.exports;
1061
1143
  export {
1062
- Et as B,
1144
+ Tt as B,
1063
1145
  i as a,
1064
- P as b
1146
+ $ as b,
1147
+ et as u
1065
1148
  };
1066
- //# sourceMappingURL=listbox.a117e6d4.js.map
1149
+ //# sourceMappingURL=listbox.163433c5.js.map