bitboss-ui 3.0.0-beta.74 → 3.0.0-beta.75

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 (249) hide show
  1. package/dist/ai/BbAvatar.md +86 -58
  2. package/dist/ai/BbBadge.md +1 -1
  3. package/dist/ai/BbBreadcrumbs.md +2 -2
  4. package/dist/ai/BbButton.md +2 -2
  5. package/dist/ai/BbCalendar.md +5 -2
  6. package/dist/ai/BbCheckboxGroup.md +5 -4
  7. package/dist/ai/BbColorInput.md +12 -0
  8. package/dist/ai/BbColorPalette.md +11 -6
  9. package/dist/ai/BbDatePicker.md +12 -0
  10. package/dist/ai/BbDatePickerInput.md +17 -1
  11. package/dist/ai/BbDialog.md +3 -1
  12. package/dist/ai/BbDropdown.md +155 -60
  13. package/dist/ai/BbDropdownButton.md +25 -6
  14. package/dist/ai/BbNumberInput.md +3 -1
  15. package/dist/ai/BbRadioGroup.md +4 -4
  16. package/dist/ai/BbSelect.md +79 -67
  17. package/dist/ai/BbSelectPopover.md +24 -5
  18. package/dist/ai/BbSwitchGroup.md +5 -4
  19. package/dist/ai/BbTable.md +17 -16
  20. package/dist/ai/BbTimePicker.md +12 -0
  21. package/dist/ai/BbTimePickerInput.md +15 -1
  22. package/dist/ai/BbToast.md +3 -2
  23. package/dist/ai/BbTree.md +5 -1
  24. package/dist/ai/CommonPopover.md +1 -0
  25. package/dist/ai/FlatListBox.md +1 -0
  26. package/dist/ai/GroupedListBox.md +1 -0
  27. package/dist/ai/ListBox.md +1 -0
  28. package/dist/ai/OptionsContainer.md +4 -4
  29. package/dist/ai/changelog.json +163 -6
  30. package/dist/ai/components.json +32 -34
  31. package/dist/ai/composables/useToast.md +2 -2
  32. package/dist/ai/design-tokens.json +60 -0
  33. package/dist/ai/guides/agent-contract.md +8 -4
  34. package/dist/ai/guides/design-tokens.md +13 -0
  35. package/dist/ai/guides/fetch-items-playbook.md +7 -11
  36. package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
  37. package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
  38. package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
  39. package/dist/ai/guides/migration/components/bb-table.md +2 -1
  40. package/dist/ai/guides/migration/components/bb-toast.md +2 -2
  41. package/dist/ai/guides/migration/v2-to-v3.md +22 -5
  42. package/dist/ai/guides/migration/v3-beta-tooling.md +1 -0
  43. package/dist/ai/guides/passthrough.md +3 -3
  44. package/dist/ai/helpers/inertia/manifest.json +1 -1
  45. package/dist/ai/index.md +1 -1
  46. package/dist/ai/manifest/common.json +1 -0
  47. package/dist/ai/manifest/components/BbAvatar.json +5 -2
  48. package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
  49. package/dist/ai/manifest/components/BbCarousel.json +0 -3
  50. package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
  51. package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
  52. package/dist/ai/manifest/components/BbColorInput.json +5 -2
  53. package/dist/ai/manifest/components/BbColorPalette.json +5 -2
  54. package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
  55. package/dist/ai/manifest/components/BbDatePicker.json +3 -0
  56. package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
  57. package/dist/ai/manifest/components/BbDialog.tree.json +2 -0
  58. package/dist/ai/manifest/components/BbDropdown.json +20 -14
  59. package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
  60. package/dist/ai/manifest/components/BbDropdown.tree.json +13 -3
  61. package/dist/ai/manifest/components/BbDropdownButton.json +13 -7
  62. package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
  63. package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
  64. package/dist/ai/manifest/components/BbOffCanvas.tree.json +2 -0
  65. package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
  66. package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
  67. package/dist/ai/manifest/components/BbSelect.json +10 -7
  68. package/dist/ai/manifest/components/BbSelectPopover.json +6 -3
  69. package/dist/ai/manifest/components/BbSelectPopover.tree.json +5 -1
  70. package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
  71. package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
  72. package/dist/ai/manifest/components/BbTable.json +6 -6
  73. package/dist/ai/manifest/components/BbTable.tree.json +4 -0
  74. package/dist/ai/manifest/components/BbTimePicker.json +5 -2
  75. package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
  76. package/dist/ai/manifest/components/BbTree.json +1 -1
  77. package/dist/ai/manifest/components/CommonPopover.json +1 -0
  78. package/dist/ai/manifest/components/FlatListBox.json +2 -1
  79. package/dist/ai/manifest/components/GroupedListBox.json +2 -1
  80. package/dist/ai/manifest/components/ListBox.json +2 -1
  81. package/dist/ai/manifest/components/OptionsContainer.json +6 -4
  82. package/dist/ai/manifest/index.json +2 -2
  83. package/dist/ai/manifest/meta.json +0 -3
  84. package/dist/ai/manifest/types.advanced.json +6 -6
  85. package/dist/ai/manifest/types.api.json +1 -3
  86. package/dist/ai/source/BbAvatar.md +119 -9
  87. package/dist/ai/source/BbBadge.md +12 -5
  88. package/dist/ai/source/BbBreadcrumbs.md +52 -54
  89. package/dist/ai/source/BbButton.md +41 -25
  90. package/dist/ai/source/BbCarousel.md +31 -28
  91. package/dist/ai/source/BbCheckboxGroup.md +15 -9
  92. package/dist/ai/source/BbColorInput.md +19 -0
  93. package/dist/ai/source/BbColorPalette.md +18 -0
  94. package/dist/ai/source/BbDatePicker.md +18 -0
  95. package/dist/ai/source/BbDatePickerInput.md +40 -1
  96. package/dist/ai/source/BbDialog.md +14 -1
  97. package/dist/ai/source/BbDropdown.md +211 -39
  98. package/dist/ai/source/BbDropdownButton.md +27 -2
  99. package/dist/ai/source/BbDropdownGroup.md +104 -38
  100. package/dist/ai/source/BbGallery.md +76 -55
  101. package/dist/ai/source/BbHost.md +12 -0
  102. package/dist/ai/source/BbNumberInput.md +17 -10
  103. package/dist/ai/source/BbOffCanvas.md +14 -1
  104. package/dist/ai/source/BbRadioGroup.md +12 -5
  105. package/dist/ai/source/BbSelect.md +35 -20
  106. package/dist/ai/source/BbSelectPopover.md +116 -8
  107. package/dist/ai/source/BbSwitchGroup.md +11 -4
  108. package/dist/ai/source/BbTable.md +72 -26
  109. package/dist/ai/source/BbTimePicker.md +19 -0
  110. package/dist/ai/source/BbTimePickerInput.md +15 -0
  111. package/dist/ai/source/BbToast.md +2 -2
  112. package/dist/ai/source/BbToastPortal.md +2 -2
  113. package/dist/ai/source/BbTree.md +1 -1
  114. package/dist/ai/source/CommonPopover.md +24 -1
  115. package/dist/ai/source/FlatListBox.md +26 -5
  116. package/dist/ai/source/GroupedListBox.md +63 -11
  117. package/dist/ai/source/ListBox.md +4 -0
  118. package/dist/ai/source/OptionsContainer.md +29 -11
  119. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
  120. package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +61 -43
  121. package/dist/components/BbAvatar/avatarIdentity.js +25 -0
  122. package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
  123. package/dist/components/BbAvatar/types.d.ts +24 -5
  124. package/dist/components/BbAvatar/types.js +5 -1
  125. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
  126. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +80 -79
  127. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +152 -158
  128. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
  129. package/dist/components/BbCalendar/useDayGrid.js +120 -123
  130. package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +7 -7
  131. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
  132. package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
  133. package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
  134. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
  135. package/dist/components/BbColorInput/types.d.ts +7 -0
  136. package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
  137. package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +213 -202
  138. package/dist/components/BbColorPalette/types.d.ts +7 -0
  139. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +3 -1
  140. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +84 -73
  141. package/dist/components/BbDatePicker/types.d.ts +7 -0
  142. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -1
  143. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +495 -510
  144. package/dist/components/BbDatePickerInput/types.d.ts +7 -0
  145. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +219 -211
  146. package/dist/components/BbDialog/leaveGhost.js +22 -17
  147. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +92 -87
  148. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
  149. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +412 -369
  150. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +382 -338
  151. package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
  152. package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
  153. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +117 -102
  154. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +73 -45
  155. package/dist/components/BbDropdown/normalizeGroups.js +6 -2
  156. package/dist/components/BbDropdown/ptKeys.generated.d.ts +8 -0
  157. package/dist/components/BbDropdown/types.d.ts +65 -41
  158. package/dist/components/BbDropdown/types.js +1 -0
  159. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -0
  160. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +93 -72
  161. package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +48 -0
  162. package/dist/components/BbDropdownButton/types.d.ts +13 -2
  163. package/dist/components/BbDropdownButton/types.js +2 -0
  164. package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +318 -296
  165. package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
  166. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +9 -5
  167. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +152 -144
  168. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -104
  169. package/dist/components/BbRadioGroup/types.d.ts +4 -7
  170. package/dist/components/BbSelect/BbSelect.vue.d.ts +3 -1
  171. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +167 -163
  172. package/dist/components/BbSelect/types.d.ts +23 -20
  173. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +3 -1
  174. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +680 -637
  175. package/dist/components/BbSelectPopover/types.d.ts +10 -4
  176. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
  177. package/dist/components/BbSwitchGroup/types.d.ts +3 -6
  178. package/dist/components/BbTable/BbTable.vue.d.ts +1 -3
  179. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1086 -1069
  180. package/dist/components/BbTable/types.d.ts +11 -10
  181. package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +3 -1
  182. package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +145 -134
  183. package/dist/components/BbTimePicker/types.d.ts +7 -0
  184. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +3 -1
  185. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +268 -259
  186. package/dist/components/BbTimePickerInput/types.d.ts +7 -0
  187. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +12 -12
  188. package/dist/components/BbToast/types.d.ts +2 -2
  189. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
  190. package/dist/components/BbTree/types.d.ts +1 -1
  191. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +13 -1
  192. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +115 -96
  193. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +194 -166
  194. package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
  195. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
  196. package/dist/composables/useItemsGetter.js +34 -32
  197. package/dist/composables/useOpenModel.js +20 -0
  198. package/dist/deprecation/ai-deprecations.json.js +1 -1
  199. package/dist/i18n/locales/ar.json +2 -0
  200. package/dist/i18n/locales/cs.json +2 -0
  201. package/dist/i18n/locales/da.json +2 -0
  202. package/dist/i18n/locales/de-CH.json +2 -0
  203. package/dist/i18n/locales/de.json +2 -0
  204. package/dist/i18n/locales/el.json +2 -0
  205. package/dist/i18n/locales/en-GB.json +2 -0
  206. package/dist/i18n/locales/en.json +2 -0
  207. package/dist/i18n/locales/es-MX.json +2 -0
  208. package/dist/i18n/locales/es.json +2 -0
  209. package/dist/i18n/locales/fa.json +2 -0
  210. package/dist/i18n/locales/fi.json +2 -0
  211. package/dist/i18n/locales/fr.json +2 -0
  212. package/dist/i18n/locales/he.json +2 -0
  213. package/dist/i18n/locales/hu.json +2 -0
  214. package/dist/i18n/locales/it.json +2 -0
  215. package/dist/i18n/locales/ja.json +2 -0
  216. package/dist/i18n/locales/ko.json +2 -0
  217. package/dist/i18n/locales/nb.json +2 -0
  218. package/dist/i18n/locales/nl.json +2 -0
  219. package/dist/i18n/locales/pl.json +2 -0
  220. package/dist/i18n/locales/pt-BR.json +2 -0
  221. package/dist/i18n/locales/pt-PT.json +2 -0
  222. package/dist/i18n/locales/ro.json +2 -0
  223. package/dist/i18n/locales/ru.json +2 -0
  224. package/dist/i18n/locales/sv.json +2 -0
  225. package/dist/i18n/locales/tr.json +2 -0
  226. package/dist/i18n/locales/uk.json +2 -0
  227. package/dist/i18n/locales/zh-CN.json +2 -0
  228. package/dist/i18n/locales/zh-HK.json +2 -0
  229. package/dist/i18n/locales/zh-TW.json +2 -0
  230. package/dist/icon-scan.js +68 -61
  231. package/dist/index.d.ts +2 -2
  232. package/dist/llms-full.txt +573 -276
  233. package/dist/llms-medium.txt +8 -4
  234. package/dist/llms.txt +1 -1
  235. package/dist/locale-blueprint.json +2 -0
  236. package/dist/styles.css +2 -2
  237. package/dist/types/ActionButton.d.ts +2 -3
  238. package/dist/types/Option.d.ts +10 -0
  239. package/dist/types/ptComponentMap.d.ts +3 -3
  240. package/dist/utilities/functions/slotContent.js +19 -0
  241. package/dist/utils/loadRetry.js +8 -0
  242. package/dist/utils/versionCheck.js +1 -1
  243. package/dist/vite.js +4 -1
  244. package/llms.txt +1 -1
  245. package/package.json +3 -1
  246. package/scripts/README.md +2 -0
  247. package/scripts/lib/agent-setup.mjs +44 -26
  248. package/scripts/lib/validate-bb-markup.mjs +20 -0
  249. package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
@@ -3,35 +3,35 @@ import { isNotNil as t } from "../../utilities/functions/isNotNil.js";
3
3
  import { hash as n } from "../../utilities/functions/hash.js";
4
4
  import { useLocale as r } from "../../composables/useLocale.js";
5
5
  import { useListboxFocus as ee } from "../../composables/useListboxFocus.js";
6
- import { useTouchRowLadder as i } from "../../composables/useSheetSurface.js";
7
- import { listboxOptionFontSize as te, listboxOptionHeight as ne } from "../../utilities/misc/listboxMetrics.js";
8
- import a from "../BbIcon/BbIcon.vue.js";
9
- import o from "../ErrorIcon/ErrorIcon.vue.js";
10
- import s from "../../assets/svgs/check_stroke.svg_raw.js";
11
- import { transitions as c } from "../../utilities/misc/transitions.js";
12
- import { Fragment as re, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, mergeProps as _, normalizeClass as v, normalizeStyle as y, openBlock as b, ref as x, renderList as S, renderSlot as C, toDisplayString as w, unref as T, useId as ie, useSlots as ae, useTemplateRef as E, watch as D, withModifiers as O } from "vue";
13
- import { useVirtualizer as oe } from "@tanstack/vue-virtual";
6
+ import { useTouchRowLadder as te } from "../../composables/useSheetSurface.js";
7
+ import { listboxOptionFontSize as ne, listboxOptionHeight as re } from "../../utilities/misc/listboxMetrics.js";
8
+ import i from "../BbIcon/BbIcon.vue.js";
9
+ import a from "../ErrorIcon/ErrorIcon.vue.js";
10
+ import o from "../../assets/svgs/check_stroke.svg_raw.js";
11
+ import { transitions as s } from "../../utilities/misc/transitions.js";
12
+ import { Fragment as ie, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, mergeProps as g, normalizeClass as _, normalizeStyle as v, openBlock as y, ref as b, renderList as x, renderSlot as S, toDisplayString as C, unref as w, useId as ae, useSlots as oe, useTemplateRef as T, watch as E, withModifiers as D } from "vue";
13
+ import { useVirtualizer as se } from "@tanstack/vue-virtual";
14
14
  // src/components/FlatListBox/FlatListBox.vue?vue&type=script&setup=true&lang.ts
15
- var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
15
+ var ce = { class: "bb-listbox__outer-container scrollbar-border" }, le = {
16
16
  ref: "inner",
17
17
  class: "bb-listbox__inner-container",
18
18
  tabindex: "-1"
19
- }, le = {
19
+ }, ue = {
20
20
  class: "bb-listbox__status",
21
21
  role: "status"
22
- }, ue = {
22
+ }, de = {
23
23
  key: 0,
24
24
  class: "bb-listbox__loading"
25
- }, de = {
25
+ }, fe = {
26
26
  key: 1,
27
27
  class: "bb-listbox__empty"
28
- }, fe = [
28
+ }, pe = [
29
29
  "id",
30
30
  "aria-activedescendant",
31
31
  "aria-label",
32
32
  "aria-labelledby",
33
33
  "aria-multiselectable"
34
- ], pe = [
34
+ ], me = [
35
35
  "id",
36
36
  "aria-describedby",
37
37
  "aria-disabled",
@@ -41,13 +41,16 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
41
41
  "aria-setsize",
42
42
  "data-index",
43
43
  "onMouseenter"
44
- ], me = {
44
+ ], he = {
45
+ key: 1,
46
+ class: "bb-listbox__item-text bb-listbox__create"
47
+ }, ge = { class: "bb-listbox__create-query" }, _e = {
45
48
  key: 0,
46
49
  class: "bb-listbox__option-content"
47
- }, he = ["id"], ge = ["id"], k = {
50
+ }, O = ["id"], k = ["id"], A = {
48
51
  key: 1,
49
52
  class: "bb-listbox__loading bb-listbox__loading--below"
50
- }, A = ["id"], j = { class: "bb-listbox__failed-text" }, M = /*@__PURE__*/ g({
53
+ }, j = ["id"], M = /*@__PURE__*/ h({
51
54
  __name: "FlatListBox",
52
55
  props: {
53
56
  passthrough: {},
@@ -60,7 +63,7 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
60
63
  loading: { type: Boolean },
61
64
  loadingBelow: { type: Boolean },
62
65
  multiple: { type: Boolean },
63
- transitionDuration: { default: c.medium },
66
+ transitionDuration: { default: s.medium },
64
67
  loadingText: {},
65
68
  emptyText: {},
66
69
  failedText: {},
@@ -68,19 +71,20 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
68
71
  described: { type: Boolean }
69
72
  },
70
73
  emits: [
74
+ "retry",
71
75
  "option:selected",
72
76
  "option:unselected",
73
77
  "focused:change"
74
78
  ],
75
- setup(c, { expose: g, emit: M }) {
76
- let N = c, P = M, F = ae(), { t: I } = r(), L = E("inner"), _e = E("listbox"), { touch: R } = i(), z = l(() => N.optionHeight ? N.optionHeight : ne(R.value, !!N.compact, !!N.described)), ve = l(() => te(R.value)), B = oe({
79
+ setup(s, { expose: h, emit: M }) {
80
+ let N = s, P = M, F = oe(), { t: I } = r(), L = T("inner"), ve = T("listbox"), { touch: R } = te(), z = c(() => N.optionHeight ? N.optionHeight : re(R.value, !!N.compact, !!N.described)), ye = c(() => ne(R.value)), B = se({
77
81
  get count() {
78
82
  return N.options.length;
79
83
  },
80
84
  getScrollElement: () => L.value ?? null,
81
85
  estimateSize: () => z.value,
82
86
  overscan: 5
83
- }), ye = l(() => B.value.getVirtualItems()), be = l(() => B.value.getTotalSize()), V = l(() => N.options.map((e, t) => ({
87
+ }), be = c(() => B.value.getVirtualItems()), xe = c(() => B.value.getTotalSize()), V = c(() => N.options.map((e, t) => ({
84
88
  index: t,
85
89
  text: e.text,
86
90
  description: e.description,
@@ -90,32 +94,33 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
90
94
  valueHash: e.valueHash,
91
95
  item: e.item,
92
96
  selected: !!e.selected,
93
- disabled: !!e.disabled
94
- }))), xe = ie(), H = (e) => `${xe}-listbox-option-${e}`, U = (e) => `${H(e)}__label`, W = (e) => `${H(e)}__description`, G = (e) => !!e && !F.option, K = l(() => {
97
+ disabled: !!e.disabled,
98
+ create: e.create
99
+ }))), Se = ae(), H = (e) => `${Se}-listbox-option-${e}`, U = (e) => `${H(e)}__label`, W = (e) => `${H(e)}__description`, G = (e) => !!e && !F.option, K = c(() => {
95
100
  if (e(J.value)) return;
96
101
  let t = V.value[J.value];
97
102
  if (t) return H(t.valueHash);
98
- }), q = l(() => V.value.length > 0), { focusedIndex: J, focusNext: Se, focusPrevious: Ce, focusFirst: we, focusLast: Te, focusFirstSelected: Ee, focusLastSelected: De, focusByHash: Oe, focusByPointer: ke, blurPointerFocus: Ae, blur: Y, getHighlighted: je } = ee(() => N.options, { disabled: () => !N.open }), X = x(!1);
99
- D(J, (e) => {
103
+ }), q = c(() => V.value.length > 0), { focusedIndex: J, focusNext: Ce, focusPrevious: we, focusFirst: Te, focusLast: Ee, focusFirstSelected: De, focusLastSelected: Oe, focusByHash: ke, focusByPointer: Ae, blurPointerFocus: je, blur: Y, getHighlighted: Me } = ee(() => N.options, { disabled: () => !N.open }), X = b(!1);
104
+ E(J, (e) => {
100
105
  L.value && t(e) && !X.value && B.value.scrollToIndex(e, { align: "center" }), X.value = !1, P("focused:change", K.value);
101
106
  });
102
107
  let Z = () => B.value.scrollToOffset(0), Q = () => {
103
108
  let e = N.options.findIndex((e) => e.selected);
104
109
  e < 0 ? Z() : B.value.scrollToIndex(e, { align: "start" });
105
110
  };
106
- D(() => N.open && !!L.value, (e) => {
111
+ E(() => N.open && !!L.value, (e) => {
107
112
  e && Q();
108
113
  }, { flush: "post" });
109
- let Me = (e) => {
110
- N.open && (X.value = !0, ke(e));
111
- }, Ne = () => {
112
- Ae();
114
+ let Ne = (e) => {
115
+ N.open && (X.value = !0, Ae(e));
116
+ }, Pe = () => {
117
+ je();
113
118
  }, $ = () => {
114
119
  if (e(J.value) || !N.open) return;
115
120
  let t = V.value[J.value];
116
121
  t.disabled || (t.selected ? P("option:unselected", t) : P("option:selected", t));
117
- }, Pe = (t) => {
118
- if (t.preventDefault(), L.value && t.target instanceof HTMLElement && _e.value) {
122
+ }, Fe = (t) => {
123
+ if (t.preventDefault(), L.value && t.target instanceof HTMLElement && ve.value) {
119
124
  let n = t.target, r = n.dataset.index;
120
125
  for (; e(r) && n.parentElement;) n = n.parentElement, r = n.dataset.index;
121
126
  if (r) {
@@ -124,58 +129,58 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
124
129
  }
125
130
  }
126
131
  };
127
- return D(() => N.options, (e, t) => {
132
+ return E(() => N.options, (e, t) => {
128
133
  n(e.map((e) => e.valueHash)) !== n(t.map((e) => e.valueHash)) && (B.value.measure(), Y());
129
- }, { flush: "post" }), D(z, () => {
134
+ }, { flush: "post" }), E(z, () => {
130
135
  B.value.measure();
131
- }, { flush: "post" }), g({
132
- focusNext: Se,
133
- focusPrevious: Ce,
134
- focusFirst: we,
135
- focusFirstSelected: Ee,
136
- focusLast: Te,
137
- focusLastSelected: De,
136
+ }, { flush: "post" }), h({
137
+ focusNext: Ce,
138
+ focusPrevious: we,
139
+ focusFirst: Te,
140
+ focusFirstSelected: De,
141
+ focusLast: Ee,
142
+ focusLastSelected: Oe,
138
143
  blur: Y,
139
144
  confirmOption: $,
140
- focusByHash: Oe,
141
- getHighlighted: je,
145
+ focusByHash: ke,
146
+ getHighlighted: Me,
142
147
  getActiveDescendantId: () => K.value,
143
148
  scrollToTop: Z,
144
149
  scrollToSelected: Q
145
- }), (e, t) => (b(), f("span", {
146
- class: v(["bb-listbox", {
147
- "bb-listbox--compact": c.compact,
148
- "bb-listbox--described": c.described,
149
- "bb-listbox--loading": c.loading,
150
- "bb-listbox--multiple": c.multiple,
150
+ }), (e, t) => (y(), d("span", {
151
+ class: _(["bb-listbox", {
152
+ "bb-listbox--compact": s.compact,
153
+ "bb-listbox--described": s.described,
154
+ "bb-listbox--loading": s.loading,
155
+ "bb-listbox--multiple": s.multiple,
151
156
  "bb-listbox--empty": !q.value,
152
- "bb-listbox--open": c.open
157
+ "bb-listbox--open": s.open
153
158
  }]),
154
- style: y({
155
- "--transition-duration": `${c.transitionDuration}ms`,
159
+ style: v({
160
+ "--transition-duration": `${s.transitionDuration}ms`,
156
161
  "--option-height": `${z.value}px`,
157
- "--option-font-size": ve.value
162
+ "--option-font-size": ye.value
158
163
  }),
159
- onClickCapture: Pe,
160
- onClick: t[0] ||= O(() => {}, ["stop"]),
161
- onMousedown: t[1] ||= O(() => {}, ["prevent"])
162
- }, [p("span", se, [p("span", ce, [
163
- C(e.$slots, "options:prepend"),
164
- p("span", le, [c.loading && !q.value ? (b(), f("span", ue, [C(e.$slots, "loading", {}, () => [m(w(c.loadingText || T(I)("common.loadingText").value), 1)])])) : !q.value && !c.failedText ? (b(), f("span", de, [C(e.$slots, "empty", {}, () => [m(w(c.emptyText || T(I)("common.emptyText").value), 1)])])) : d("", !0)]),
165
- q.value ? (b(), f("span", _({
164
+ onClickCapture: Fe,
165
+ onClick: t[1] ||= D(() => {}, ["stop"]),
166
+ onMousedown: t[2] ||= D(() => {}, ["prevent"])
167
+ }, [f("span", ce, [f("span", le, [
168
+ S(e.$slots, "options:prepend"),
169
+ f("span", ue, [s.loading && !q.value ? (y(), d("span", de, [S(e.$slots, "loading", {}, () => [p(C(s.loadingText || w(I)("common.loadingText").value), 1)])])) : !q.value && !s.failedText ? (y(), d("span", fe, [S(e.$slots, "empty", {}, () => [p(C(s.emptyText || w(I)("common.emptyText").value), 1)])])) : u("", !0)]),
170
+ q.value ? (y(), d("span", g({
166
171
  key: 0,
167
- id: c.id,
172
+ id: s.id,
168
173
  ref: "listbox",
169
174
  "aria-activedescendant": K.value,
170
- "aria-label": c.listLabelledby ? void 0 : c.listLabel,
171
- "aria-labelledby": c.listLabelledby,
172
- "aria-multiselectable": c.multiple ? !0 : void 0,
175
+ "aria-label": s.listLabelledby ? void 0 : s.listLabel,
176
+ "aria-labelledby": s.listLabelledby,
177
+ "aria-multiselectable": s.multiple ? !0 : void 0,
173
178
  class: "bb-listbox__list",
174
179
  role: "listbox",
175
- style: { height: `${be.value}px` },
180
+ style: { height: `${xe.value}px` },
176
181
  tabindex: "-1",
177
- onMouseleave: Ne
178
- }, c.passthrough?.list), [(b(!0), f(re, null, S(ye.value, (t) => (b(), f("span", _({
182
+ onMouseleave: Pe
183
+ }, s.passthrough?.list), [(y(!0), d(ie, null, x(be.value, (t) => (y(), d("span", g({
179
184
  id: H(V.value[t.index].valueHash),
180
185
  key: V.value[t.index].valueHash,
181
186
  "aria-describedby": G(V.value[t.index].description) ? W(V.value[t.index].valueHash) : void 0,
@@ -185,81 +190,95 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
185
190
  "aria-selected": V.value[t.index].selected,
186
191
  "aria-setsize": N.options.length,
187
192
  class: ["bb-listbox__option", {
188
- "bb-listbox__option--focused": T(J) === t.index,
193
+ "bb-listbox__option--focused": w(J) === t.index,
189
194
  "bb-listbox__option--selected": V.value[t.index].selected,
190
195
  "bb-listbox__option--disabled": V.value[t.index].disabled
191
196
  }],
192
197
  "data-index": t.index,
193
198
  role: "option",
194
199
  style: { transform: `translateY(${t.start}px)` },
195
- onMouseenter: O((e) => Me(t.index), ["stop"])
196
- }, { ref_for: !0 }, c.passthrough?.part?.("option", {
200
+ onMouseenter: D((e) => Ne(t.index), ["stop"])
201
+ }, { ref_for: !0 }, s.passthrough?.part?.("option", {
197
202
  selected: V.value[t.index].selected,
198
203
  disabled: V.value[t.index].disabled || void 0
199
204
  }, V.value[t.index].item)), [
200
- V.value[t.index]["prepend:icon"] ? (b(), u(a, _({
205
+ V.value[t.index]["prepend:icon"] ? (y(), l(i, g({
201
206
  key: 0,
202
207
  "aria-hidden": "true",
203
208
  class: "bb-listbox__item-icon bb-listbox__option-prepend-icon",
204
209
  icon: V.value[t.index]["prepend:icon"]
205
- }, { ref_for: !0 }, c.passthrough?.part?.("itemIcon", {
210
+ }, { ref_for: !0 }, s.passthrough?.part?.("itemIcon", {
206
211
  selected: V.value[t.index].selected,
207
212
  disabled: V.value[t.index].disabled || void 0
208
- }, V.value[t.index].item)), null, 16, ["icon"])) : d("", !0),
209
- C(e.$slots, "option", {
213
+ }, V.value[t.index].item)), null, 16, ["icon"])) : u("", !0),
214
+ V.value[t.index].create ? (y(), d("span", he, [
215
+ p(C(V.value[t.index].create.before), 1),
216
+ f("strong", ge, C(V.value[t.index].create.query), 1),
217
+ p(C(V.value[t.index].create.after), 1)
218
+ ])) : S(e.$slots, "option", {
210
219
  description: V.value[t.index].description,
211
220
  disabled: V.value[t.index].disabled,
212
- focused: T(J) === t.index,
221
+ focused: w(J) === t.index,
213
222
  index: t.index,
214
223
  item: V.value[t.index].item,
215
224
  selected: V.value[t.index].selected,
216
225
  text: V.value[t.index].text,
217
226
  value: V.value[t.index].value
218
- }, () => [V.value[t.index].description ? (b(), f("span", me, [p("span", _({
227
+ }, () => [V.value[t.index].description ? (y(), d("span", _e, [f("span", g({
219
228
  id: U(V.value[t.index].valueHash),
220
229
  class: "bb-listbox__item-text"
221
- }, { ref_for: !0 }, c.passthrough?.part?.("itemText", {
230
+ }, { ref_for: !0 }, s.passthrough?.part?.("itemText", {
222
231
  selected: V.value[t.index].selected,
223
232
  disabled: V.value[t.index].disabled || void 0
224
- }, V.value[t.index].item)), w(V.value[t.index].text), 17, he), p("span", _({
233
+ }, V.value[t.index].item)), C(V.value[t.index].text), 17, O), f("span", g({
225
234
  id: W(V.value[t.index].valueHash),
226
235
  class: "bb-listbox__item-description"
227
- }, { ref_for: !0 }, c.passthrough?.part?.("itemDescription", {
236
+ }, { ref_for: !0 }, s.passthrough?.part?.("itemDescription", {
228
237
  selected: V.value[t.index].selected,
229
238
  disabled: V.value[t.index].disabled || void 0
230
- }, V.value[t.index].item)), w(V.value[t.index].description), 17, ge)])) : (b(), f("span", _({
239
+ }, V.value[t.index].item)), C(V.value[t.index].description), 17, k)])) : (y(), d("span", g({
231
240
  key: 1,
232
241
  class: "bb-listbox__item-text"
233
- }, { ref_for: !0 }, c.passthrough?.part?.("itemText", {
242
+ }, { ref_for: !0 }, s.passthrough?.part?.("itemText", {
234
243
  selected: V.value[t.index].selected,
235
244
  disabled: V.value[t.index].disabled || void 0
236
- }, V.value[t.index].item)), w(V.value[t.index].text), 17))]),
237
- V.value[t.index]["append:icon"] && !V.value[t.index].selected ? (b(), u(a, _({
238
- key: 1,
245
+ }, V.value[t.index].item)), C(V.value[t.index].text), 17))], void 0, 2),
246
+ V.value[t.index]["append:icon"] && !V.value[t.index].selected ? (y(), l(i, g({
247
+ key: 3,
239
248
  "aria-hidden": "true",
240
249
  class: "bb-listbox__item-icon bb-listbox__option-append-icon",
241
250
  icon: V.value[t.index]["append:icon"]
242
- }, { ref_for: !0 }, c.passthrough?.part?.("itemIcon", {
251
+ }, { ref_for: !0 }, s.passthrough?.part?.("itemIcon", {
243
252
  selected: V.value[t.index].selected,
244
253
  disabled: V.value[t.index].disabled || void 0
245
- }, V.value[t.index].item)), null, 16, ["icon"])) : d("", !0),
246
- h(a, _({
254
+ }, V.value[t.index].item)), null, 16, ["icon"])) : u("", !0),
255
+ m(i, g({
247
256
  "aria-hidden": "true",
248
257
  class: "bb-listbox__option-check",
249
- icon: T(s)
250
- }, { ref_for: !0 }, c.passthrough?.part?.("check", {
258
+ icon: w(o)
259
+ }, { ref_for: !0 }, s.passthrough?.part?.("check", {
251
260
  selected: V.value[t.index].selected,
252
261
  disabled: V.value[t.index].disabled || void 0
253
262
  }, V.value[t.index].item)), null, 16, ["icon"])
254
- ], 16, pe))), 128))], 16, fe)) : d("", !0),
255
- c.loading && c.loadingBelow && q.value ? (b(), f("span", k, [C(e.$slots, "loading", {}, () => [m(w(c.loadingText || T(I)("common.loadingText").value), 1)])])) : d("", !0),
256
- C(e.$slots, "options:append")
257
- ], 512)]), c.failedText ? (b(), f("span", {
263
+ ], 16, me))), 128))], 16, pe)) : u("", !0),
264
+ s.loading && s.loadingBelow && q.value ? (y(), d("span", A, [S(e.$slots, "loading", {}, () => [p(C(s.loadingText || w(I)("common.loadingText").value), 1)])])) : u("", !0),
265
+ S(e.$slots, "options:append")
266
+ ], 512)]), s.failedText && !s.loading ? (y(), d("span", {
258
267
  key: 0,
259
- id: `${c.id}_failed`,
260
- class: v(["bb-listbox__failed", { "bb-listbox__failed--divided": q.value }]),
268
+ class: _(["bb-listbox__failed", { "bb-listbox__failed--divided": q.value }]),
261
269
  role: "status"
262
- }, [h(o, { class: "bb-listbox__failed-icon" }), p("span", j, [C(e.$slots, "empty", {}, () => [m(w(c.failedText), 1)])])], 10, A)) : d("", !0)], 38));
270
+ }, [
271
+ m(a, { class: "bb-listbox__failed-icon" }),
272
+ f("span", {
273
+ id: `${s.id}_failed`,
274
+ class: "bb-listbox__failed-text"
275
+ }, C(s.failedText), 9, j),
276
+ f("button", {
277
+ class: "bb-load-retry",
278
+ type: "button",
279
+ onClick: t[0] ||= (e) => P("retry", e)
280
+ }, C(w(I)("common.retryLabel").value), 1)
281
+ ], 2)) : u("", !0)], 38));
263
282
  }
264
283
  });
265
284
  export { M as default };