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
@@ -50,13 +50,13 @@ An `items` entry is one of three shapes, and you can mix them freely:
50
50
 
51
51
  - a **menu item** — an object with a `value` and a `label`; a string or
52
52
  number row is its own text and value (`items: ['Google', 'Bing']`);
53
- - a **separator section** — a nested `[ … ]` array, rendered as its own
54
- divider-separated anonymous group;
53
+ - a **divider run** — a nested `[ … ]` array: its rows, with a divider before
54
+ and after, and nothing else (no title, no value of its own);
55
55
  - a **group object** — `{ id, label?, items, selectable?, … }`, a titled and/or
56
- selectable section (next sections). A group with plain rows and no
56
+ selectable group (described below). A group with plain rows and no
57
57
  `selectable` needs `group: true` to be a group rather than a submenu row;
58
- [Titled sections](#titled-sections-group-true-or-groupby) compares it with
59
- `groupBy`, which titles the rows of one group. A group's heading is its `label` too;
58
+ [Headings](#headings-group-true-or-groupby) compares it with
59
+ `groupBy`, which puts the rows of one group under headings. A group's heading is its `label` too;
60
60
  add `hideLabel` to keep the `label` for the adaptive sheet title / chips /
61
61
  `useBbDropdown` while rendering no heading in the menu.
62
62
 
@@ -165,7 +165,7 @@ const items: BbDropdownItem[] = [
165
165
  href: '#preview',
166
166
  target: '_blank',
167
167
  },
168
- // A nested array becomes its own divider-separated section. A destructive
168
+ // A nested array becomes its own divider run. A destructive
169
169
  // item never acts directly: its onClick awaits useConfirm and only
170
170
  // proceeds on a yes.
171
171
  [
@@ -674,20 +674,21 @@ rows distinct values when it matters:
674
674
  - **Submenu parents.** A row that opens a submenu needs a value unique in the
675
675
  whole menu; the flyout is addressed by it.
676
676
 
677
- ### Titled sections: `group: true` or `groupBy`
677
+ ### Headings: `group: true` or `groupBy`
678
678
 
679
679
  Two ways to put headings in a menu, for two different needs:
680
680
 
681
- - **Independent sections, each its own group: `group: true`.** A group object
682
- with `group: true` is a titled section (its `label` is the heading) without
683
- being selectable; give it `selectable` and it becomes its own chooser. Each
681
+ - **Independent groups, each its own chooser: `group: true`.** A group object
682
+ with `group: true` is titled (its `label` is the heading) without being
683
+ selectable; give it `selectable` and it becomes its own chooser. Each
684
684
  group keeps **its own** value (its own companion and `v-model`) and, when
685
- `searchable`, its own search field. Use it for sections that answer
685
+ `searchable`, its own search field. Use it for groups that answer
686
686
  different questions ("Sort by" / "Show").
687
687
  - **One choice, sorted under headings: `groupBy` on one group.** The rows of a
688
- single group are listed under section headings, and it stays one group:
688
+ single group are listed under headings, and it stays one group:
689
689
  **one** `v-model`, **one** search field. Use it when the headings only
690
690
  organise the options of one question (categories under their sector).
691
+ Its headings are sticky, as `BbSelect`'s group headers are.
691
692
 
692
693
  ```vue
693
694
  <BbDropdown
@@ -713,14 +714,23 @@ Two ways to put headings in a menu, for two different needs:
713
714
  - `groupBy` is a field path (`'sector'`, `'owner.team'`) read off each row,
714
715
  or a function `(row) => string | null | undefined`. On a fetched group it
715
716
  reads the **raw item**, so `items: ({ query }) => …` groups the same way.
716
- - Sections keep the order of their first row. Rows whose `groupBy` gives
717
- `null`, `undefined` or `''` have no section: they are listed **first**,
717
+ - Headings keep the order of their first row. Rows whose `groupBy` gives
718
+ `null`, `undefined` or `''` have no heading: they are listed **first**,
718
719
  before every heading — the same rule as `BbSelect`'s `group-by`.
719
720
  - A heading is not a row: the arrows and typeahead skip it, and it is never
720
- selected. A search hides a section left without a matching row, heading
721
- included.
722
- - Each titled section is a `role="group"` labelled by its heading, with the
723
- look of a group heading. The adaptive sheet shows the same sections.
721
+ selected. A search hides a heading left without a matching row.
722
+ - The rows under each heading are a `role="group"` labelled by it, with the
723
+ look of a group title. The adaptive sheet shows the same headings.
724
+ - `#group` replaces every heading's content, `#<groupId>:group` one group's,
725
+ with `BbSelect`'s `#group` scope: `{ text, item, index, length, disabled }`
726
+ (`item` is the raw `groupBy` value, `length` the rows under it, `disabled`
727
+ whether all of them are). A count and a divider, for example:
728
+
729
+ ```vue
730
+ <template #category:group="{ text, length }">
731
+ {{ text }} <span class="ms-auto text-xs">{{ length }}</span>
732
+ </template>
733
+ ```
724
734
 
725
735
  ### Loading options on demand
726
736
 
@@ -743,9 +753,10 @@ The full grammar:
743
753
  need the mapping. On a **`searchable`** group the context also carries
744
754
  `query` (what the user typed, and `reason: 'search'` when they did) —
745
755
  the same shape `BbSelect` passes, which is why one provider drops into both.
746
- A getter **throws** to fail: the group shows its failure row (an error
747
- icon and `failedText`) instead of "no data", even when `#empty` is
748
- slotted: `#empty` means empty.
756
+ A getter **throws** to fail: the panel shows the group's failure row (an
757
+ error icon, `failedText` and a "Try again" button that runs the failed call
758
+ again with the same query) next to the menu, instead of "no data", even
759
+ when `#empty` is slotted: `#empty` means empty.
749
760
  - `itemText` / `itemValue` — a path string or getter producing each raw item's
750
761
  label and value; without them a row reads its own `label` (else `text`) and
751
762
  `value`. `v-model` on the companion surfaces the selected value(s);
@@ -1223,7 +1234,7 @@ What each knob does:
1223
1234
  ranked search (case and accents ignored; exact, then starts-with, then word
1224
1235
  starts, then contains, then a code typed without separators; one typo per
1225
1236
  word of 5+ letters only when nothing else matched; ranked inside each
1226
- `groupBy` section), and on an async group passes the typed text to the getter as
1237
+ `groupBy` heading), and on an async group passes the typed text to the getter as
1227
1238
  `query` in its context object (`reason: 'search'`), the same shape
1228
1239
  `BbSelect` uses, so one provider serves both.
1229
1240
  - **`filterBy`** picks which raw fields the local search reads. Empty
@@ -1241,9 +1252,11 @@ What each knob does:
1241
1252
  `searchable`, which is the one place the three-state `prefill` differs from a
1242
1253
  plain menu group (`'interaction'`, the default, fetches when the group is
1243
1254
  first reached; `true` fetches on mount).
1244
- - **A minimum query length** is the getter's call and the `#empty` slot's
1245
- copy: return `[]` below it, and read `query` in the slot. The slot also
1246
- replaces the search-first hint, so one condition covers both:
1255
+ - **`minQueryLength`** (as on `BbSelect`): below that many characters
1256
+ (trimmed) the query counts as empty, so no `'search'` call and no filtering
1257
+ run, and the field says how many characters to type (on a search-first
1258
+ group, its hint row too: "Type at least 2 characters"). Slots still get the
1259
+ typed `query`. No guard in the getter:
1247
1260
 
1248
1261
  ```vue
1249
1262
  <BbDropdown
@@ -1254,15 +1267,12 @@ What each knob does:
1254
1267
  searchable: true,
1255
1268
  selectable: true,
1256
1269
  prefill: false,
1270
+ minQueryLength: 2,
1257
1271
  filterBy: false,
1258
- items: ({ query }) => (query.length < 2 ? [] : api.zones({ q: query })),
1272
+ items: ({ query }) => api.zones({ q: query }),
1259
1273
  },
1260
1274
  ]"
1261
- >
1262
- <template #empty="{ query, text }">
1263
- {{ query.length < 2 ? 'Type at least 2 characters' : text }}
1264
- </template>
1265
- </BbDropdown>
1275
+ />
1266
1276
  ```
1267
1277
 
1268
1278
  - **`stash`** accumulates the items behind _selected_ keys so they stay
@@ -1337,12 +1347,13 @@ and `"deleteFile"` all → `#delete-file`. For a value with accents, non-Latin l
1337
1347
  when unsure, write `#[slotKey('Qualità')]` (`import { slotKey } from
1338
1348
  'bitboss-ui'`) instead of spelling it by hand.
1339
1349
 
1340
- | Slot | Renders for |
1341
- | ------------------------------------------------------------- | --------------------------------------------------------- |
1342
- | `#<value>`, `#<value>:prepend`, `#<value>:append` | one row — its content, leading or trailing region |
1343
- | `#<groupId>:item`, `#<groupId>:item:prepend`, `…:item:append` | **every row of that group**, and nothing else |
1344
- | `#<groupId>`, `#<groupId>:prepend`, `#<groupId>:append` | that group's title line |
1345
- | `item:prepend`, `item:append` | every row **and** every group title line, across the menu |
1350
+ | Slot | Renders for |
1351
+ | ------------------------------------------------------------- | ---------------------------------------------------------- |
1352
+ | `#<value>`, `#<value>:prepend`, `#<value>:append` | one row — its content, leading or trailing region |
1353
+ | `#<groupId>:item`, `#<groupId>:item:prepend`, `…:item:append` | **every row of that group**, and nothing else |
1354
+ | `#<groupId>:label`, `#<groupId>:prepend`, `#<groupId>:append` | that group's title line — its content, leading or trailing |
1355
+ | `#group`, `#<groupId>:group` | the `groupBy` headings — every group's, or one group's |
1356
+ | `item:prepend`, `item:append` | every row **and** every group title line, across the menu |
1346
1357
 
1347
1358
  Each edge of a row has **one occupant** — nothing renders side by side. From
1348
1359
  strongest to weakest:
@@ -1356,7 +1367,9 @@ strongest to weakest:
1356
1367
  | `item:prepend` | `item:append` |
1357
1368
  | `prepend:icon` | `append:icon` |
1358
1369
 
1359
- So a slot always replaces the row's icon and the most specific slot wins. A
1370
+ So a slot replaces the row's icon and the most specific slot wins. A slot
1371
+ that renders nothing for a row (its content behind a `v-if` that is false
1372
+ there) is skipped: the next one down draws, down to the row's own icon. A
1360
1373
  row's own `#<value>:append` is written for that one row, so it may replace its
1361
1374
  submenu chevron; the group-wide and shared append slots never do, so a submenu
1362
1375
  row keeps its chevron unless you name it. The check beats everything — as in
@@ -1622,8 +1635,9 @@ Two things this replaces, both seen in real apps:
1622
1635
  `v-else-if="clinicsById.get(item.value)"`) to tell a record row from an action
1623
1636
  row, and a lookup map rebuilt from the fetch to get the record back. The
1624
1637
  group row slot is the "which rows" answer; `item.meta` is the record.
1625
- - **Re-drawing the other rows' icons**, because a shared `item:prepend`
1626
- replaces every row's `prepend:icon`.
1638
+ - **Re-drawing the other rows' icons** in a shared `item:prepend`. A shared
1639
+ slot that renders nothing for a row leaves that row its `prepend:icon`, but
1640
+ the group row slot never has to ask.
1627
1641
 
1628
1642
  ### Header and footer
1629
1643
 
@@ -1639,6 +1653,12 @@ in one `<div>`: a single wrapping element stretches across the sheet and lays
1639
1653
  out its children itself. The example below does that, so the button spans the
1640
1654
  footer on both surfaces.
1641
1655
 
1656
+ A note in the footer (a sentence, not a button) is text like any other: with
1657
+ the default `width="auto"` the menu grows to fit it, and it wraps only once
1658
+ the menu reaches the space it has, so a long note makes a wide menu over short
1659
+ rows. Set `width` on the dropdown (`:width="240"`) and the note wraps at that
1660
+ width instead. No zero-width wrapper or `nowrap` override is needed.
1661
+
1642
1662
  **Pinned header and footer**
1643
1663
 
1644
1664
  ```vue
@@ -1752,6 +1772,66 @@ const items: BbDropdownItem[] = [
1752
1772
  </script>
1753
1773
  ```
1754
1774
 
1775
+ ### Opening from code: `v-model`
1776
+
1777
+ `v-model` is whether the menu is open, as on `BbDialog` and `BbOffCanvas`.
1778
+ Bound, your flag controls it: set it to `true` and the menu opens at its
1779
+ activator (or at `anchor`, when there is no activator to open it), with focus
1780
+ on its first row, as a keyboard open; set it to `false` and it closes, focus
1781
+ going back to the activator (or to where it was). The user's opens and closes
1782
+ update the flag. A static `:model-value` with no listener is only the initial
1783
+ state: `:model-value="false"` starts closed, and the activator still opens it.
1784
+
1785
+ The case it is for: one menu's row opens another menu at the same place — a
1786
+ row menu's "Delegate to…" that opens a searchable people menu under the same
1787
+ button, or a dialog header action that opens a menu anchored to it:
1788
+
1789
+ ```vue
1790
+ <script setup lang="ts">
1791
+ import { ref, useTemplateRef } from 'vue';
1792
+ const delegating = ref(false);
1793
+ const rowMenu = useTemplateRef('rowMenu');
1794
+ </script>
1795
+
1796
+ <template>
1797
+ <BbDropdown
1798
+ :items="[
1799
+ { value: 'edit', label: 'Edit' },
1800
+ {
1801
+ value: 'delegate',
1802
+ label: 'Delegate to…',
1803
+ onClick: () => (delegating = true),
1804
+ },
1805
+ ]"
1806
+ >
1807
+ <template #activator="{ props }">
1808
+ <BbButton ref="rowMenu" v-bind="props" icon-only prepend:icon="dots"
1809
+ >More</BbButton
1810
+ >
1811
+ </template>
1812
+ </BbDropdown>
1813
+ <BbDropdown
1814
+ v-model="delegating"
1815
+ :anchor="rowMenu"
1816
+ :items="[
1817
+ {
1818
+ id: 'people',
1819
+ label: 'People',
1820
+ selectable: true,
1821
+ searchable: true,
1822
+ items: searchPeople,
1823
+ },
1824
+ ]"
1825
+ >
1826
+ <BbDropdownGroup id="people" v-model="assignee" />
1827
+ </BbDropdown>
1828
+ </template>
1829
+ ```
1830
+
1831
+ The first menu closes as its row runs, and the second opens under the same
1832
+ button with focus inside it; Escape, an outside press or a pick closes it and
1833
+ sets `delegating` back to `false`.
1834
+
1755
1835
  ### Placement, width and boundaries
1756
1836
 
1757
1837
  - `placement` (default `'bottom'`) accepts every floating-UI placement
@@ -1773,7 +1853,11 @@ const items: BbDropdownItem[] = [
1773
1853
  edge away from the trigger, and only the viewport flips it) tune positioning.
1774
1854
  Pass `boundary` a `useTemplateRef` or a selector, not `$refs.x`: `$refs` is
1775
1855
  not reactive, so a menu in a table cell rendered before the ref was set keeps
1776
- no boundary until that row happens to re-render. `eager` pre-renders the panel
1856
+ no boundary until that row happens to re-render. Inside a `BbTable` (a row
1857
+ menu, a cell's ⋯) the default keeps the menu within the table's left and
1858
+ right edges only: it still opens below its trigger, or flips above at the
1859
+ viewport, never at the table's bottom. A `boundary` replaces that default
1860
+ entirely. `eager` pre-renders the panel
1777
1861
  before first open; `transitionDuration` controls the open/close animation.
1778
1862
  - The menu closes itself on outside click/focus, on `Escape`, when another
1779
1863
  dropdown opens, and when the activator scrolls out of view. `disabled`
@@ -1954,8 +2038,11 @@ object form, a style and attributes — optionally only while a state is on.
1954
2038
  Parts: `root` (the flyout — an invisible positioning wrapper, no node on
1955
2039
  mobile), `panel` (the menu surface you see — background, border, radius and
1956
2040
  shadow live here; the sheet itself on mobile), `sheet` (the bottom sheet the surface becomes on a phone — only that sheet, never the desktop surface; applied after `panel`, so it wins a conflict there),
1957
- `header`, `footer`, `input` (every `searchable` group's search field — a
1958
- broadcast, on the flyout and the phone sheet alike; its magnifier is chrome),
2041
+ `header`, `footer`, `box` (every `searchable` group's search box, around the
2042
+ field and its magnifier: what `box` is on a field — border, background and
2043
+ radius go here; on the flyout and the phone sheet alike), `input` (every
2044
+ `searchable` group's search field — a broadcast, on the flyout and the phone
2045
+ sheet alike; its magnifier is chrome),
1959
2046
  `list` (the top-level entries container between the bands
1960
2047
  — a flex column with a 1px gap; a submenu's list is not reached), `item` — every entry, submenus included, a broadcast
1961
2048
  resolved per entry — and `itemText` / `itemIcon` / `itemDescription`, that
@@ -2292,11 +2379,10 @@ own sizes.
2292
2379
  `<BbDropdownGroup>` companions; a button there opens nothing. Use
2293
2380
  `<template #activator="{ props }">` + `v-bind="props"`, or `v-bb-dropdown`
2294
2381
  (`bitboss-ui/dropdown-default-slot` and `check` report it).
2295
- - **There is no open flag to bind.** The menu keeps its open state internal
2296
- (no `v-model:open`, by design): the activator opens it, a pick or an outside
2297
- press closes it, and `@show` / `@hide` tell you when. Don't reopen it from a
2298
- `@focus` handler on the activator — closing returns focus there, and the two
2299
- fight in a loop.
2382
+ - **Open it from code with `v-model`, never with a hidden activator's
2383
+ `.click()`** (§ Opening from code). Don't reopen it from a `@focus` handler
2384
+ on the activator — closing returns focus there, and the two fight in a
2385
+ loop.
2300
2386
  - **Don't navigate from `onClick`** (`router.push`, `window.location`) — give
2301
2387
  the item `href`/`to` and let it render a real link.
2302
2388
  - **Don't rebuild selection** with `onClick` + your own state — mark the group
@@ -2408,26 +2494,31 @@ uses `ArrowRight` / `ArrowLeft` and its back control; `Escape` on a drilled-in
2408
2494
  level (row or search box) goes back one level, focus on the row that opened
2409
2495
  it, and at the top level closes the sheet.
2410
2496
 
2497
+ ## v-model
2498
+
2499
+ - `v-model` — type: `boolean \| undefined`
2500
+
2411
2501
  ## Props
2412
2502
 
2413
2503
  | Prop | Type | Default | Required | Description |
2414
2504
  | --- | --- | --- | --- | --- |
2415
- | `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `check`, `footer`, `header`, `input`, `item`, `itemDescription`, `itemIcon`, `itemText`, `list`, `panel`, `root`, `sheet`, `submenu`. States: `activeLink`, `default`, `destructive`, `disabled`, `exactActiveLink`, `open`, `selected`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbDropdownProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
2505
+ | `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `box`, `check`, `footer`, `header`, `input`, `item`, `itemDescription`, `itemIcon`, `itemText`, `list`, `panel`, `root`, `sheet`, `submenu`. States: `open`, `activeLink`, `default`, `destructive`, `disabled`, `exactActiveLink`, `selected`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbDropdownProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
2416
2506
  | `activator` | `ElementOrComponentRef \| undefined` | | | An external activator (element or component ref): the slot isn't rendered; the listeners and ARIA (`aria-haspopup` / `aria-expanded` / `aria-controls`) go on it, so don't add your own. |
2417
2507
  | `adaptive` | `boolean \| undefined` | ``all.adaptive` (`true`)` | | On mobile (below `config.mobileMaxWidth`), renders the menu as a bottom sheet that drills into submenus one level at a time instead of hover flyouts; slots and selection are unchanged. Unset: the global `all.adaptive`. |
2418
2508
  | `anchor` | `ElementOrComponentRef \| VirtualAnchor \| undefined` | `the activator element` | | What the panel positions against instead of the activator (e.g. a wrapper around it): an element, a component ref or a virtual box. It also sets a percentage `width`. Ignored with `placement="cursor"`. |
2419
- | `boundary` | `string \| ElementOrComponentRef \| undefined` | | | Keeps the panel inside this element beside its trigger (sideways for a menu above or below); away from it the panel may pass the edge, and only the viewport flips it. An element, a component ref or a CSS selector (a `useTemplateRef`, not `$refs.x`: not reactive). |
2509
+ | `boundary` | `string \| ElementOrComponentRef \| undefined` | | | Keeps the panel inside this element beside its trigger (sideways under a menu); away from it only the viewport flips it. An element, component ref or CSS selector (a `useTemplateRef`, not `$refs.x`). Default in a `BbTable`: the table's left and right edges. |
2420
2510
  | `closeOnSelect` | `boolean \| undefined` | `unset (close after a single-choice change)` | | Whether a selection closes the menu. Unset: a change in a single-choice group closes it (an untick too, at any depth); a `multiple` group stays open. `true`: every selection change closes it. `false`: none does. |
2421
2511
  | `compact` | `boolean \| undefined` | `undefined` | | Compact density, the `BbSelect` ladder: flyout rows 28px → 24px, sheet rows 44px → 36px (a sheet row stays a touch target). The label size does not change. |
2422
2512
  | `disabled` | `boolean \| undefined` | `false` | | Disables the component |
2423
2513
  | `eager` | `boolean \| undefined` | `false` | | Renders the menu panel at mount instead of on the first open (the phone sheet's too), and keeps its rows after a close. Without it the rows mount on each open and go once the menu has closed. |
2424
- | `emptyText` | `string \| undefined` | | | Default placeholder text shown when a pipeline group resolves to no items. A group's own `emptyText` overrides this; both fall back to the localized `common.emptyText` (`'No data to display'`). |
2514
+ | `emptyText` | `string \| undefined` | | | A pipeline group's no-items row; its own `emptyText` wins. Default: `common.emptyText`. |
2425
2515
  | `enforceCoherence` | `boolean \| undefined` | `false` | | Default for pipeline groups: drop selections that are no longer present in a group's current items (e.g. after a `dependencies` re-fetch) from the selection and `v-model`. A group's own `enforceCoherence` overrides this. |
2426
- | `failedText` | `string \| undefined` | | | Default placeholder text shown when a pipeline group's latest load FAILED (its `items` getter threw). A group's own `failedText` overrides this; both fall back to the localized `common.failedText` (`"Couldn't load items"`). |
2516
+ | `failedText` | `string \| undefined` | | | A pipeline group's failed-load row (its getter threw); its own `failedText` wins. Default: `common.failedText`. |
2427
2517
  | `id` | `string \| undefined` | | | Names this dropdown: the activator's id (unless it already has one), the menu's `menu_<id>`, and the key `useBbDropdown(id)` and a companion `BbDropdownGroup` pair by. Generated when omitted. |
2428
- | `items` | `(BbDropdownItem \| PrimitiveRow)[]` | `[]` | yes | The menu rows, each a `BbBaseButton` (`button`, `a` or `router-link`): a flat array for one group, nested arrays for divider-separated groups, or `InternalGroup` objects for titled / selectable sections. A row's own `items` opens a submenu. |
2518
+ | `items` | `(BbDropdownItem \| PrimitiveRow)[]` | `[]` | yes | The menu rows, each a `BbBaseButton` (`button`, `a` or `router-link`): a flat array for one group, nested arrays for divider-separated groups, or `InternalGroup` objects for titled / selectable groups. A row's own `items` opens a submenu. |
2429
2519
  | `keepActivator` | `boolean \| undefined` | `false` | | Keeps the trigger when no row is visible (by default it is hidden): inert, no popup ARIA, `empty` in the activator slot. A `contextMenu` trigger always stays. |
2430
- | `loadingText` | `string \| undefined` | | | Default placeholder text shown while a pipeline group's async items load. A group's own `loadingText` overrides this; both fall back to the localized `common.loadingText` (`'Loading...'`). |
2520
+ | `loadingText` | `string \| undefined` | | | A pipeline group's loading row; its own `loadingText` wins. Default: `common.loadingText`. |
2521
+ | `modelValue` | `boolean \| undefined` | `undefined` | | Whether the menu is open (`v-model`): `true` opens it from code at its activator or `anchor`. Unbound: the initial state. |
2431
2522
  | `offCanvasProps` | `Partial<BbOffCanvasProps> \| undefined` | | | Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on mobile), spread over its defaults. A `pt` inside it styles only the sheet (passthrough guide § Inside the sheet). The sheet hides its ✕; `{ hideClose: false }` brings it back. |
2432
2523
  | `offset` | `number \| undefined` | `4` | | Space the floating container will maintain from the activator. |
2433
2524
  | `padding` | `number \| undefined` | `10` | | Minimum empty space to keep from the edge of the page |
@@ -2448,6 +2539,7 @@ it, and at the top level closes the sheet.
2448
2539
  | `sheet` | The bottom sheet the menu becomes on a phone (the `BbOffCanvas` root) — never the desktop surface. Applied after `panel`, so it wins a conflict there. |
2449
2540
  | `header` | The menu's header band. |
2450
2541
  | `footer` | The menu's footer band. |
2542
+ | `box` | Every searchable group's search box (field and magnifier), as `box` on a field; desktop and phone. |
2451
2543
  | `input` | A searchable group's search field — a broadcast: it lands on every searchable group's field, desktop and phone alike. Its magnifier glyph is chrome. |
2452
2544
  | `list` | The top-level items container between the bands — the node that lays the entries out (a flex column with a 1px gap; on a phone, the sheet's items container). A submenu's list is not reached. Groups, headings and dividers are not parts. |
2453
2545
  | `item` | One menu entry, submenus included — a broadcast resolved per entry. Also takes a per-item function, called with the entry. |
@@ -2477,6 +2569,7 @@ States are listed in precedence order: when two are on at once and their entries
2477
2569
  - `item:unselected` — `(value: any): void` — The user unselected a row (a multiple toggle, a `clearable` re-click, a chip ×, or the old value a single pick replaces). Payload is the item's resolved value, matching `item:selected`.
2478
2570
  - `show` — `(): void` — Emitted as soon as the menu (the popover, or the sheet on a phone) starts to open.
2479
2571
  - `shown` — `(): void` — Emitted once the menu is open and its open transition has finished.
2572
+ - `update:modelValue` — `(value: boolean): void` — The menu opened or closed (`v-model`): `true` on open, `false` on close.
2480
2573
 
2481
2574
  ## Slots
2482
2575
 
@@ -2484,19 +2577,21 @@ States are listed in precedence order: when two are on at once and their entries
2484
2577
  - `default` — scope: `any` — Hosts `<BbDropdownGroup>` companions. They register their group with the dropdown and render nothing themselves.
2485
2578
  - `empty` — scope: `BbDropdownPlaceholderSlotProps` `{ groupId?: string; query: string; text: string }` — Replaces the default "no data" placeholder row shown in a pipeline group that resolved to no items. Rendered once per empty group. A failed load is not empty: it keeps its own row (the error icon and `failedText`).
2486
2579
  - `footer` — scope: `BbDropdownEdgeSlotProps` `{ disabled?: boolean; open: boolean; placement: Placement \| "cursor" }` — Pinned below the rows, outside their scroll, with a divider — for action buttons.
2580
+ - `group` — scope: `BbDropdownGroupSlotProps` `{ text: string; item: unknown; index: number; length: number; disabled: boolean }` — Every group's `groupBy` headings (`BbSelect`'s `#group` scope); `#<groupId>:group` beats it.
2487
2581
  - `header` — scope: `BbDropdownEdgeSlotProps` `{ disabled?: boolean; open: boolean; placement: Placement \| "cursor" }` — Pinned above the rows, outside their scroll, with a divider — for a title or a filter field.
2488
- - `item:append` — scope: `BbDropdownItemSlotProps` `{ description?: string; disabled?: boolean; group: BbDropdownSlotGroup; groupTitle: boolean; level: number; index: number; item: InternalItem; loading: boolean; open: boolean; placement: Placement \| "cursor"; selected: boolean; label: string; activeLink?: boolean; exactActiveLink?: boolean }` — The trailing region of every row (and group title line), replacing its `append:icon`. A named slot wins over it; the submenu chevron and the check on a selected row take its place.
2489
- - `item:prepend` — scope: `BbDropdownItemSlotProps` `{ description?: string; disabled?: boolean; group: BbDropdownSlotGroup; groupTitle: boolean; level: number; index: number; item: InternalItem; loading: boolean; open: boolean; placement: Placement \| "cursor"; selected: boolean; label: string; activeLink?: boolean; exactActiveLink?: boolean }` — The leading region of every row (and group title line), replacing its `prepend:icon`. A row's own or its group's named slot wins over it.
2582
+ - `item:append` — scope: `BbDropdownItemSlotProps` `{ description?: string; disabled?: boolean; group: BbDropdownSlotGroup; groupTitle: boolean; level: number; index: number; item: InternalItem; loading: boolean; open: boolean; placement: Placement \| "cursor"; selected: boolean; label: string; activeLink?: boolean; exactActiveLink?: boolean }` — The trailing region of every row (and group title line), replacing its `append:icon` wherever it renders. A named slot wins; the submenu chevron and the check on a selected row take its place.
2583
+ - `item:prepend` — scope: `BbDropdownItemSlotProps` `{ description?: string; disabled?: boolean; group: BbDropdownSlotGroup; groupTitle: boolean; level: number; index: number; item: InternalItem; loading: boolean; open: boolean; placement: Placement \| "cursor"; selected: boolean; label: string; activeLink?: boolean; exactActiveLink?: boolean }` — The leading region of every row (and group title line), replacing its `prepend:icon` wherever it renders. A named slot wins.
2490
2584
  - `loading` — scope: `BbDropdownPlaceholderSlotProps` `{ groupId?: string; query: string; text: string }` — Replaces the default loading placeholder row shown in a pipeline group while its async items load. Rendered once per loading group.
2491
- - `#<value>` (named from data) — scope: `BbDropdownItemSlotProps` — One row's content (label and description), by its value; in a fetched group, by its resolved `itemValue`. Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `activator`, `default`, `empty`, `footer`, `header`, `item`, `loading`.
2585
+ - `#<value>` (named from data) — scope: `BbDropdownItemSlotProps` — One row's content (label and description), by its value; in a fetched group, by its resolved `itemValue`. Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `activator`, `default`, `empty`, `footer`, `group`, `header`, `item`, `loading`.
2492
2586
  - `#<value>:prepend` (named from data) — scope: `BbDropdownItemSlotProps` — One row's leading region; replaces its `prepend:icon`.
2493
2587
  - `#<value>:append` (named from data) — scope: `BbDropdownItemSlotProps` — One row's trailing region; replaces its `append:icon` and its submenu chevron. The check takes its place on the selected row.
2494
2588
  - `#<groupId>:item` (named from data) — scope: `BbDropdownItemSlotProps` — The content of every row of that group, and no other; a row's own `#<value>` still wins.
2495
2589
  - `#<groupId>:item:prepend` (named from data) — scope: `BbDropdownItemSlotProps` — The leading region of every row of that group — e.g. an avatar per record, drawn from `item.meta`, while other rows keep their `prepend:icon`.
2496
2590
  - `#<groupId>:item:append` (named from data) — scope: `BbDropdownItemSlotProps` — The trailing region of every row of that group; replaces their `append:icon`. The check takes its place on the selected row.
2497
- - `#<groupId>` (named from data) — scope: `BbDropdownItemSlotProps` — That group's title line (the group is passed as `item`, `groupTitle` is `true`). Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `activator`, `default`, `empty`, `footer`, `header`, `item`, `loading`.
2591
+ - `#<groupId>:label` (named from data) — scope: `BbDropdownItemSlotProps` — That group's title content (`item` is the group, `groupTitle` is `true`).
2498
2592
  - `#<groupId>:prepend` (named from data) — scope: `BbDropdownItemSlotProps` — The leading region of that group's title line.
2499
2593
  - `#<groupId>:append` (named from data) — scope: `BbDropdownItemSlotProps` — The trailing region of that group's title line.
2594
+ - `#<groupId>:group` (named from data) — scope: `BbDropdownGroupSlotProps` — That group's `groupBy` headings; beats `group`.
2500
2595
 
2501
2596
  ## CSS custom properties
2502
2597
 
@@ -2519,12 +2614,12 @@ Set these on the element, or on a class you put on it, to retune this component
2519
2614
  - `BbDropdown` _(this component)_ — its own template binds: `panel` → `CommonPopover`, `root` → `CommonPopover`, `header` → `div.bb-dropdown__header`, `list` → `span.bb-dropdown__list`, `footer` → `div.bb-dropdown__footer`
2520
2615
  - `BbDropdownList` _(internal — not importable, reach it through `BbDropdown`)_ — also mounts `BbIcon`, `ErrorIcon`, `CommonPopover`, `BbDropdownList`
2521
2616
  - `BbBadge` _(public — [contract](./BbBadge.md))_ — its own pt parts (`BbBadge`): `spinner` → `BbSpinner`, `icon` → `span.bb-badge__append-icon`, `icon` → `BbIcon`, `clear` → `button.bb-badge__clear`; documented CSS variables: `--bg`, `--fg`, `--bw`, `--ring-color`, `--ring-size`, `--min-size-md`, `--min-size`, `--elev`, `--r`, `--fs`, `--icon-size`, `--gap`, `--px`, `--clear-size`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--pad-left`; also mounts `BbIcon`, `BbSpinner`, `BadgeBodyContent`
2522
- - `AdaptiveDropdown` _(internal — not importable, reach it through `BbDropdown`)_ — hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs); also mounts `BbSmoothHeight`, `BbDropdownList`
2617
+ - `AdaptiveDropdown` _(internal — not importable, reach it through `BbDropdown`)_ — hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs); also mounts `BbSmoothHeight`, `BbDropdownList`, `DropdownFailures`
2523
2618
  - `BbOffCanvas` _(public — [contract](./BbOffCanvas.md))_ — its own pt parts (`BbOffCanvas`): `header` → `div.bb-offcanvas__header`, `title` → `span.bb-offcanvas__title`, `description` → `p.bb-offcanvas__description`, `close` → `CloseButton`, `content` → `div.bb-offcanvas__content`, `footer` → `div.bb-offcanvas__footer`; documented CSS variables: `--stack-x`, `--snap-y`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`
2524
2619
  - `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`, `--icon-size`; also mounts `BbIcon`
2525
2620
  - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `span.bb-button__prepend-icon`, `icon` → `BbIcon`, `text` → `span.bb-button__text`, `icon` → `span.bb-button__append-icon`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--ipx`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring-color`, `--ring-size`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbSpinner`, `BbIcon`
2526
2621
  - `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
2527
- - Also mounts `CommonPopover`, `DropdownPipelineResolver`
2622
+ - Also mounts `CommonPopover`, `DropdownFailures`, `DropdownPipelineResolver`
2528
2623
 
2529
2624
  ## See Also
2530
2625
 
@@ -498,8 +498,9 @@ style and attributes — optionally only while a state is on. Parts: `root`
498
498
  (the group), `main` and `toggle` (the two halves, each handed to its button as
499
499
  its `pt:root`), `icon`, `spinner` and `text` (the main button's — handed to it
500
500
  as its own `pt`; the toggle's chevron is chrome), `panel` (the menu), `sheet` (the bottom sheet
501
- the menu becomes on a phone, only), `input` (every `searchable` group's
502
- search field), `item` (every entry), and `itemText` /
501
+ the menu becomes on a phone, only), `box` and `input` (every `searchable`
502
+ group's search box, and the field in it), `list` (the top-level entries
503
+ container), `item` (every entry), and `itemText` /
503
504
  `itemIcon` / `itemDescription` / `check` (an entry's label, its icons, its muted
504
505
  second line and a checked entry's tick), and `submenu` (every submenu's flyout
505
506
  box) — all handed to the `BbDropdown` under the same words, so
@@ -596,6 +597,15 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
596
597
  `pt` prop) is typed as `BbDropdownButtonProps['pt']`, never an imported `PtValue`: see
597
598
  [passthrough § Typing `pt` in `<script>`](./guides/passthrough.md#typing-pt-in-script).
598
599
 
600
+ ### Opening from code: `v-model:open`
601
+
602
+ `v-model` is the value; `v-model:open` is whether the menu is open. Bound,
603
+ your ref opens and closes it, and every open and close the user makes is
604
+ written back: a pick, Escape, a click outside. A static `:open` with no
605
+ listener is only the initial state. An open from code is the same open a
606
+ click makes (focus moves to the first row, and back on close), and `disabled` / `readonly` refuse it (the ref is set back
607
+ to `false`).
608
+
599
609
  ### Works well with
600
610
 
601
611
  - [useConfirm](./composables/useConfirm.md) — gate a destructive alternate
@@ -635,11 +645,15 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
635
645
  - While an async action runs, the busy half blocks re-entry automatically;
636
646
  don't disable the other half yourself.
637
647
 
648
+ ## v-model
649
+
650
+ - `v-model:open` — type: `boolean \| undefined`
651
+
638
652
  ## Props
639
653
 
640
654
  | Prop | Type | Default | Required | Description |
641
655
  | --- | --- | --- | --- | --- |
642
- | `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `check`, `footer`, `header`, `icon`, `input`, `item`, `itemDescription`, `itemIcon`, `itemText`, `main`, `panel`, `root`, `sheet`, `spinner`, `submenu`, `text`, `toggle`. States: `activeLink`, `default`, `destructive`, `disabled`, `exactActiveLink`, `loading`, `open`, `selected`, `ghost`, `link`, `outline`, `primary`, `secondary`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbDropdownButtonProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
656
+ | `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `box`, `check`, `footer`, `header`, `icon`, `input`, `item`, `itemDescription`, `itemIcon`, `itemText`, `list`, `main`, `panel`, `root`, `sheet`, `spinner`, `submenu`, `text`, `toggle`. States: `activeLink`, `disabled`, `exactActiveLink`, `loading`, `open`, `default`, `destructive`, `selected`, `ghost`, `link`, `outline`, `primary`, `secondary`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbDropdownButtonProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
643
657
  | `activeClass` | `string \| undefined` | | | Class to apply when the link is active. |
644
658
  | `adaptive` | `boolean \| undefined` | ``all.adaptive` (`true`)` | | On mobile (below `config.mobileMaxWidth`), renders the menu as a bottom sheet that drills into submenus one level at a time instead of hover flyouts; slots and selection are unchanged. Unset: the global `all.adaptive`. |
645
659
  | `append:icon` | `string \| undefined` | | | Icon to be added on the right of the text. |
@@ -682,6 +696,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
682
696
  | `onProgress` | `((progress: { percentage: number \| undefined; }) => void) \| undefined` | | | Progress callback invoked by Inertia with the upload/download percentage when available. |
683
697
  | `onStart` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia when a request starts. |
684
698
  | `onSuccess` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia when a request succeeds. |
699
+ | `open` | `boolean \| undefined` | `false` | | Whether the panel is open (`v-model:open`; `v-model` stays the value). Bound, the app opens and closes it; unbound, the initial state. |
685
700
  | `padding` | `number \| undefined` | `10` | | Minimum empty space to keep from the edge of the page |
686
701
  | `pageProps` | `Record<string, unknown> \| ((currentProps: Record<string, unknown>, sharedProps: Record<string, unknown>) => Record<string, unknown>) \| null \| undefined` | | | Inertia: props to merge into the next page optimistically, before the server responds. Either an object or a function of the current props. Typed platform-agnostically (matching BbButton) so the library's types never require `@inertiajs/vue3` to be installed. |
687
702
  | `placement` | `'start'` \| `'end'` \| `'top'` \| `'bottom'` \| `'left'` \| `'right'` \| `'top-start'` \| `'top-end'` \| `'right-start'` \| `'right-end'` \| `'bottom-start'` \| `'bottom-end'` \| `'left-start'` \| `'left-end'` \| `'start-start'` \| `'start-end'` \| `'end-start'` \| `'end-end'` \| `'cursor'` | `'bottom'` | | Position relative to the activator; `'cursor'` anchors at the mouse/touch point. No arrow (tooltips only). |
@@ -720,7 +735,9 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
720
735
  | `sheet` | The bottom sheet the menu becomes on a phone only. |
721
736
  | `header` | The band around your `#header` slot: at the top of the menu on desktop, the sheet's header on a phone — handed to the `BbDropdown`. |
722
737
  | `footer` | The band around your `#footer` slot: at the bottom of the menu on desktop, the sheet's footer on a phone — handed to the `BbDropdown`. |
738
+ | `box` | A searchable group's search box in the menu (field and magnifier) — handed to the `BbDropdown` as its own `pt:box`. |
723
739
  | `input` | A searchable group's search field in the menu — a broadcast, every searchable group's field — handed to the `BbDropdown` as its own `pt:input`. |
740
+ | `list` | The menu's top-level items container — handed to the `BbDropdown` as its own `pt:list`. |
724
741
  | `item` | One menu entry, submenus included — a broadcast resolved per entry. Also takes a per-item function, called with the entry. |
725
742
  | `itemText` | An entry's label (its `label`) — resolved with that entry's states. A per-entry `#<value>` slot replaces it. Also takes a per-item function. |
726
743
  | `itemIcon` | An entry's prepend / append icons — resolved with that entry's states. Also takes a per-item function. |
@@ -754,6 +771,7 @@ States are listed in precedence order: when two are on at once and their entries
754
771
  - `item:unselected` — `(value: any): void` — A row of a selectable group was unselected (same payload as above).
755
772
  - `show` — `(): void` — Emitted as soon as the menu (the popover, or the sheet on a phone) starts to open.
756
773
  - `shown` — `(): void` — Emitted once the menu is open and its open transition has finished.
774
+ - `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
757
775
 
758
776
  ## Slots
759
777
 
@@ -773,9 +791,10 @@ States are listed in precedence order: when two are on at once and their entries
773
791
  - `#<groupId>:item` (named from data) — scope: `BbDropdownItemSlotProps` — The content of every row of that group, and no other; a row's own `#<value>` still wins.
774
792
  - `#<groupId>:item:prepend` (named from data) — scope: `BbDropdownItemSlotProps` — The leading region of every row of that group — e.g. an avatar per record, drawn from `item.meta`, while other rows keep their `prepend:icon`.
775
793
  - `#<groupId>:item:append` (named from data) — scope: `BbDropdownItemSlotProps` — The trailing region of every row of that group; replaces their `append:icon`. The check takes its place on the selected row.
776
- - `#<groupId>` (named from data) — scope: `BbDropdownItemSlotProps` — That group's title line (the group is passed as `item`, `groupTitle` is `true`). Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `default`, `dropdown`, `empty`, `footer`, `header`, `item`, `loading`.
794
+ - `#<groupId>:label` (named from data) — scope: `BbDropdownItemSlotProps` — That group's title content (`item` is the group, `groupTitle` is `true`).
777
795
  - `#<groupId>:prepend` (named from data) — scope: `BbDropdownItemSlotProps` — The leading region of that group's title line.
778
796
  - `#<groupId>:append` (named from data) — scope: `BbDropdownItemSlotProps` — The trailing region of that group's title line.
797
+ - `#<groupId>:group` (named from data) — scope: `BbDropdownGroupSlotProps` — That group's `groupBy` headings; beats `group`.
779
798
 
780
799
  ## Component tree
781
800
 
@@ -789,10 +808,10 @@ States are listed in precedence order: when two are on at once and their entries
789
808
  - `BbDropdownButton` _(this component)_ — hands `BbButton` the pt map `{ main: 'root', icon: 'icon', spinner: 'spinner', text: 'text' }` (ours → theirs); hands `BbDropdown` the pt map `{ item: 'item', itemText: 'itemText', itemIcon: 'itemIcon', itemDescription: 'itemDescription', check: 'check' }` (ours → theirs); hands `BbButton` the pt map `{ toggle: 'root' }` (ours → theirs)
790
809
  - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `span.bb-button__prepend-icon`, `icon` → `BbIcon`, `text` → `span.bb-button__text`, `icon` → `span.bb-button__append-icon`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--ipx`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring-color`, `--ring-size`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbSpinner`, `BbIcon`
791
810
  - `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
792
- - `BbDropdown` _(public — [contract](./BbDropdown.md))_ — its own pt parts (`BbDropdown`): `panel` → `CommonPopover`, `root` → `CommonPopover`, `header` → `div.bb-dropdown__header`, `list` → `span.bb-dropdown__list`, `footer` → `div.bb-dropdown__footer`; documented CSS variables: `--menu-inset`; also mounts `CommonPopover`, `DropdownPipelineResolver`
811
+ - `BbDropdown` _(public — [contract](./BbDropdown.md))_ — its own pt parts (`BbDropdown`): `panel` → `CommonPopover`, `root` → `CommonPopover`, `header` → `div.bb-dropdown__header`, `list` → `span.bb-dropdown__list`, `footer` → `div.bb-dropdown__footer`; documented CSS variables: `--menu-inset`; also mounts `CommonPopover`, `DropdownFailures`, `DropdownPipelineResolver`
793
812
  - `BbDropdownList` _(internal — not importable, reach it through `BbDropdown`)_ — also mounts `BbIcon`, `ErrorIcon`, `CommonPopover`, `BbDropdownList`
794
813
  - `BbBadge` _(public — [contract](./BbBadge.md))_ — its own pt parts (`BbBadge`): `spinner` → `BbSpinner`, `icon` → `span.bb-badge__append-icon`, `icon` → `BbIcon`, `clear` → `button.bb-badge__clear`; documented CSS variables: `--bg`, `--fg`, `--bw`, `--ring-color`, `--ring-size`, `--min-size-md`, `--min-size`, `--elev`, `--r`, `--fs`, `--icon-size`, `--gap`, `--px`, `--clear-size`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--pad-left`; also mounts `BbIcon`, `BbSpinner`, `BadgeBodyContent`
795
- - `AdaptiveDropdown` _(internal — not importable, reach it through `BbDropdown`)_ — hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs); also mounts `BbSmoothHeight`, `BbButton`, `BbDropdownList`
814
+ - `AdaptiveDropdown` _(internal — not importable, reach it through `BbDropdown`)_ — hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs); also mounts `BbSmoothHeight`, `BbButton`, `BbDropdownList`, `DropdownFailures`
796
815
  - `BbOffCanvas` _(public — [contract](./BbOffCanvas.md))_ — its own pt parts (`BbOffCanvas`): `header` → `div.bb-offcanvas__header`, `title` → `span.bb-offcanvas__title`, `description` → `p.bb-offcanvas__description`, `close` → `CloseButton`, `content` → `div.bb-offcanvas__content`, `footer` → `div.bb-offcanvas__footer`; documented CSS variables: `--stack-x`, `--snap-y`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`
797
816
  - `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`, `--icon-size`; also mounts `BbIcon`
798
817
 
@@ -220,7 +220,9 @@ settles back to `max` at once; `min` waits for blur or Enter, because the
220
220
  digits of a valid number pass through smaller ones (typing `20` into a 16–28
221
221
  field goes through `2`). Leave the field below `min`, or press Enter in it, and
222
222
  it rises to `min` — Enter corrects it before a surrounding form submits, so
223
- `@submit` never receives a value below `min` (defaults are
223
+ `@submit` never receives a value below `min`. A value your app sets past
224
+ either bound stays as it is while nobody touches the field; a focus and a
225
+ blur bring it inside the bounds, as Enter does (defaults are
224
226
  the safe-integer bounds, i.e. effectively unbounded). `maxPrecision` caps the number of decimal places (default `8`),
225
227
  which is how you pin a field to whole numbers (`0`); for money set `currency`,
226
228
  which brings its own decimals. Extra decimals are refused as typed, never
@@ -566,8 +566,8 @@ Keep the set short enough that arrow-cycling stays quick; past ~6 options prefer
566
566
 
567
567
  `items` accepts a provider function for options fetched from an API;
568
568
  `loading-text` / `#loading` and `empty-text` / `#empty` cover the loading
569
- and empty states, `failed-text` (or `#empty` with its `error` prop) a load
570
- that threw, `dependencies` (+ `deps-debounce-time`) trigger re-fetches,
569
+ and empty states, `failed-text` words the failure row of a load that threw
570
+ (with a built-in "Try again"; `#empty` is for empty results only), `dependencies` (+ `deps-debounce-time`) trigger re-fetches,
571
571
  and `enforce-coherence` resets the model to `null` when the current value no
572
572
  longer matches an available option. See the
573
573
  [fetch-items](../../ai/guides/fetch-items-playbook.md) and
@@ -1049,7 +1049,7 @@ for a preset that fits any row type (never `<any>`), not an imported
1049
1049
  | `itemLayout` | `FieldLayout \| undefined` | `'auto'` | | How each row's input and label sit together, in the `layout` keywords: `'auto'`, `'vertical'`, `'horizontal'`, `'label-fill'`, `'input-fill'`, or a two-word ratio pattern like `'xx xxxxx'`. |
1050
1050
  | `itemProps` | `BbOptionGroupItemProps<T> \| undefined` | | | ADDITIONAL row fields, never the text or value: `description`, a muted line under the label (it may wrap; announced as the option's description). An object of paths or getters, or a function of the item; nothing is read implicitly. |
1051
1051
  | `itemReverse` | `boolean \| undefined` | `undefined` | | Swaps each row's input and label from their natural order (input first), in every `item-layout`. `reverse` swaps the legend and the options instead. |
1052
- | `items` | `T[] \| ((context: BbRadioGroupItemsContext) => T[] \| Promise<T[]>)` | | yes | The options: an array, or a provider called with a `BbRadioGroupItemsContext` (`reason`, `modelValue`, `signal`), sync or async. A provider fails by THROWING, never by returning `[]`: the rows clear and `#empty` gets the `error`. |
1052
+ | `items` | `T[] \| ((context: BbRadioGroupItemsContext) => T[] \| Promise<T[]>)` | | yes | The options: an array, or a provider called with a `BbRadioGroupItemsContext` (`reason`, `modelValue`, `signal`), sync or async. A provider fails by THROWING, never by returning `[]`: the rows clear and the failure row shows `failed-text` with "Try again". |
1053
1053
  | `itemText` | `ItemAccessor<T, string> \| undefined` | `own `label`, else `text`, else `JSON.stringify(item)`` | | Defines a path that returns a property of the object to use as text or a function that returns a string. Unset: own `label`, else `text` (`{ label, value }` needs no accessor). |
1054
1054
  | `itemValue` | `ItemAccessor<T> \| undefined` | `own `value`, else the whole item` | | Defines a path that returns a property of the object to use as value or a function that returns any value. Unset: own `value`, even `null`. |
1055
1055
  | `labelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted, `'top'`. |
@@ -1126,7 +1126,7 @@ States are listed in precedence order: when two are on at once and their entries
1126
1126
 
1127
1127
  - `append` — scope: `object` — Content rendered after the last option, inside the options container.
1128
1128
  - `description` — scope: `BbRadioGroupDescriptionSlotProps` `{ text: string; hasErrors: boolean; hasWarnings: boolean }` — Replaces the description text. Provided alone (no `description` prop) it still renders the description region and wires it into `aria-describedby`.
1129
- - `empty` — scope: `{ error: unknown; }` — Content shown when no options are available (replaces the default "no data" text). `error` is what the latest failed load rejected with, untouched, and `null` when nothing failed — a failed load clears the rows, so this slot is where it shows.
1129
+ - `empty` — scope: `object` — Content shown when no options are available (replaces the default "no data" text). Empty only: a failed load shows the library's failure row instead (its message is `failed-text`, and it ends with "Try again").
1130
1130
  - `icon` — scope: `BbRadioGroupIconSlotProps<T>` `{ disabled: boolean; readonly: boolean; checked: boolean; focused: boolean; focusVisible: boolean; id: string; name: string; hasErrors: boolean; hasWarnings: boolean; parsedValue: string; value: any; item: T; text: string }` — Replaces the default radio dot icon for each option. Receives the radio state plus the source item and its display text.
1131
1131
  - `label` — scope: `BbRadioGroupLabelSlotProps<T>` `{ item: T; text: string; checked: boolean; description: string }` — Replaces the default label text for each option.
1132
1132
  - `legend` — scope: `BbRadioGroupLegendSlotProps` `{ showAsterisk?: boolean; text: string; hasErrors: boolean; hasWarnings: boolean }` — Replaces the default fieldset legend text for the group.