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
@@ -40,14 +40,23 @@ around.
40
40
  The avatar resolves what to show in a fixed order:
41
41
 
42
42
  1. **Image** — when `src` (or `srcset`) is set and loads correctly.
43
- 2. **Default slot** — when there is no source or the image fails: put initials
44
- (or any markup) here.
45
- 3. **Built-in user icon** — when you supply no slot either.
43
+ 2. **Default slot** — when there is no source or the image fails: any markup
44
+ of your own.
45
+ 3. **Initials from `name`** — no slot: the first letters of the first and the
46
+ last word, uppercased with the locale's rules (`Ada King Lovelace` → `AL`,
47
+ `Ada` → `A`). Words that don't start with a letter are skipped
48
+ (`42 Ada` → `A`).
49
+ 4. **Built-in user icon** — no slot, and no `name` (or none of its words
50
+ starts with a letter).
46
51
 
47
52
  A failed load flips to the fallback automatically, and changing `src`/`srcset`
48
- resets the attempt — so swapping users in place retries the new photo. Always
49
- set `alt`: it labels the photo, and for a fallback it becomes the avatar's
50
- accessible name.
53
+ resets the attempt — so swapping users in place retries the new photo. Pass
54
+ `name` for a person: it gives the initials and the accessible name. `alt`
55
+ describes the photo and wins as the name when written.
56
+
57
+ ```vue
58
+ <BbAvatar :src="user.photoUrl" :name="user.fullName" color />
59
+ ```
51
60
 
52
61
  **Photo, initials, and the built-in fallback**
53
62
 
@@ -61,7 +70,7 @@ accessible name.
61
70
  src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' fill='%23fde2d4'/%3E%3Ccircle cx='32' cy='25' r='11' fill='%23b45a3c'/%3E%3Cpath d='M11 64c1-13 10-20 21-20s20 7 21 20z' fill='%23b45a3c'/%3E%3C/svg%3E"
62
71
  alt="Ada Lovelace"
63
72
  />
64
- <BbAvatar size="56" alt="Grace Hopper">GH</BbAvatar>
73
+ <BbAvatar size="56" name="Grace Hopper" />
65
74
  <BbAvatar size="56" alt="Unknown user" />
66
75
  </div>
67
76
  ```
@@ -94,36 +103,53 @@ Composed demos below use the larger end of that range (and a few explicit px
94
103
  sizes) so faces stay readable in Storybook — `xs`/`sm` are for dense chrome,
95
104
  not hero examples.
96
105
 
97
- The fallback surface is **always painted with the primary design token** —
98
- `--bb-primary` behind, `--bb-primary-fg` for the initials/icon, the same
99
- pairing as a primary button — so initials stay legible in light and dark and
100
- every avatar matches your theme automatically.
106
+ By default the fallback surface is **painted with the primary design token**
107
+ — `--bb-primary` behind, `--bb-primary-fg` for the initials/icon, the same
108
+ pairing as a primary button — so it matches your theme in light and dark.
109
+
110
+ ### Colour per person: `color`
101
111
 
102
- There is no tinting **prop**, but there are two component locals on
103
- `.bb-avatar` for the cases the theme cannot cover — a per-tenant or
104
- per-user colour: `--bg` (fallback surface, defaults to `--bb-primary`) and
105
- `--fg` (initials and slotted fallback, `--bb-primary-fg`). The built-in person
106
- glyph mixes `--fg` over `--bg`, so there is no third local. Set both on the
107
- avatar or on a class you put on it:
112
+ `color` tells people apart in a list (assignees, a comment thread). It is
113
+ decoration, never state, so it is off by default:
114
+
115
+ - **`color` (`true`)** — one of ten palette hues, picked from a stable hash
116
+ of `name`: the same person gets the same colour on every page, render and
117
+ server render (no hydration repaint), whatever the case or spacing of the
118
+ name. A soft fill with deep ink in light, a deep fill with light ink in
119
+ dark; every pair clears 4.5:1. The palette is the `--bb-avatar-*` theme
120
+ tokens (design-tokens guide § Avatar palette). Without `name` the avatar
121
+ keeps the default look.
122
+ - **A string** — any CSS colour or `var()`, used as the fill as is (a
123
+ tenant's brand colour). The ink is black or white, whichever reads
124
+ (`contrast-color()` where the browser has it, else picked from the
125
+ colour's OKLCH lightness).
126
+
127
+ **Palette colours from names, and a brand colour**
108
128
 
109
129
  ```vue
110
- <BbAvatar
111
- alt="Acme Studio"
112
- :style="{ '--bg': tenant.color, '--fg': tenant.fg }"
113
- >
114
- AS
115
- </BbAvatar>
130
+ <div class="flex items-center gap-3">
131
+ <BbAvatar size="40" name="Ada Lovelace" color />
132
+ <BbAvatar size="40" name="Grace Hopper" color />
133
+ <BbAvatar size="40" name="Alan Turing" color />
134
+ <BbAvatar size="40" name="Katherine Johnson" color />
135
+ <BbAvatar size="40" name="Acme Studio" color="#1e293b" />
136
+ </div>
116
137
  ```
117
138
 
139
+ The two component locals stay for anything else: `--bg` (fallback surface)
140
+ and `--fg` (initials and slotted fallback). The built-in person glyph mixes
141
+ `--fg` over `--bg`, so there is no third local. A pinned ink for a brand
142
+ colour: `:style="{ '--fg': tenant.fg }"` beside `:color="tenant.color"`.
143
+
118
144
  **The size scale**
119
145
 
120
146
  ```vue
121
147
  <div class="flex items-end gap-3">
122
- <BbAvatar size="md" alt="Joan Clarke">JC</BbAvatar>
123
- <BbAvatar size="lg" alt="Joan Clarke">JC</BbAvatar>
124
- <BbAvatar size="xl" alt="Joan Clarke">JC</BbAvatar>
125
- <BbAvatar size="2xl" alt="Joan Clarke">JC</BbAvatar>
126
- <BbAvatar size="56" alt="Joan Clarke">JC</BbAvatar>
148
+ <BbAvatar size="md" name="Joan Clarke" />
149
+ <BbAvatar size="lg" name="Joan Clarke" />
150
+ <BbAvatar size="xl" name="Joan Clarke" />
151
+ <BbAvatar size="2xl" name="Joan Clarke" />
152
+ <BbAvatar size="56" name="Joan Clarke" />
127
153
  </div>
128
154
  ```
129
155
 
@@ -284,9 +310,7 @@ list — the row markup stays identical whether a member has a photo or not.
284
310
  "
285
311
  :variant="member.online ? 'success' : 'default'"
286
312
  >
287
- <BbAvatar :alt="member.name" size="40" :src="member.src">
288
- {{ member.initials }}
289
- </BbAvatar>
313
+ <BbAvatar color :name="member.name" size="40" :src="member.src" />
290
314
  </BbIndicator>
291
315
  <span class="flex min-w-0 flex-1 flex-col">
292
316
  <span class="truncate font-medium">{{ member.name }}</span>
@@ -320,11 +344,10 @@ type Member = {
320
344
  role: string;
321
345
  online: boolean;
322
346
  src?: string;
323
- initials?: string;
324
347
  };
325
348
 
326
- // Some members have a photo; others fall back to initials on the
327
- // primary-token surface — both flow through the same row markup.
349
+ // Some members have a photo; the others fall back to the initials from
350
+ // `name`, each in their own palette colour (`color`) — the same row markup.
328
351
  const members: Member[] = [
329
352
  {
330
353
  name: 'Ada Lovelace',
@@ -336,7 +359,6 @@ const members: Member[] = [
336
359
  name: 'Grace Hopper',
337
360
  role: 'Design',
338
361
  online: true,
339
- initials: 'GH',
340
362
  },
341
363
  {
342
364
  name: 'Alan Turing',
@@ -348,13 +370,11 @@ const members: Member[] = [
348
370
  name: 'Katherine Johnson',
349
371
  role: 'Data',
350
372
  online: true,
351
- initials: 'KJ',
352
373
  },
353
374
  {
354
375
  name: 'Linus Torvalds',
355
376
  role: 'Platform',
356
377
  online: false,
357
- initials: 'LT',
358
378
  },
359
379
  ];
360
380
 
@@ -488,12 +508,14 @@ keys.
488
508
  ### Restyling with passthrough
489
509
 
490
510
  `pt` reaches each part with a class list — or, in the object form, a
491
- style and attributes. Parts: `root` (the avatar frame) and `icon` (the default
492
- user glyph). No states — nothing it paints is a state.
493
-
494
- `icon` exists only while the fallback shows (no image, or it failed) and the
495
- default slot is not overridden; when a photo or your own initials render,
496
- `pt:icon` lands nowhere. For the frame, `pt:root` is plain `class` with extra
511
+ style and attributes. Parts: `root` (the avatar frame), `initials` (the
512
+ letters from `name`) and `icon` (the default user glyph). No states — nothing
513
+ it paints is a state.
514
+
515
+ `initials` and `icon` exist only while the fallback shows (no image, or it
516
+ failed) and the default slot is not overridden — `initials` with a `name`
517
+ that gives letters, `icon` otherwise; when a photo or your own slot renders,
518
+ they land nowhere. For the frame, `pt:root` is plain `class` with extra
497
519
  letters: write `class` / `style` on the tag, as on any element. `pt:root`
498
520
  stays for uniformity — the global map, the object form and a wrapper that
499
521
  spreads props address every component the same way.
@@ -558,10 +580,11 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
558
580
 
559
581
  ### Gotchas & anti-patterns
560
582
 
561
- - **There is no `color` prop, and no `variant` either.** The fallback is always
562
- primary-token colored; don't reach for per-avatar inline backgrounds. If the
563
- palette is wrong, retheme `--bb-primary` / `--bb-primary-fg` — theming here
564
- happens through the tokens, not a prop.
583
+ - **Don't hash names into colours yourself** — `color` does it, stable and
584
+ SSR-safe, from the themed palette. There is no `variant`: the default look
585
+ follows `--bb-primary` / `--bb-primary-fg`.
586
+ - **Don't type initials into the slot** when you have the name: `name` does
587
+ it, locale-aware, and labels the avatar too.
565
588
  - **Default `timeout` can false-fallback slow images** (see above) — tune it,
566
589
  don't reimplement image loading around the component.
567
590
  - Don't hand-position presence dots with absolute CSS — `BbIndicator dot`
@@ -575,24 +598,27 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
575
598
  by the frame, so it follows.
576
599
  - Don't pre-crop sources to circles — the component center-crops; ship square
577
600
  or larger originals.
578
- - Don't leave `alt` empty for meaningful avatars: fallbacks lose their
579
- accessible name entirely.
601
+ - Don't leave both `name` and `alt` empty for meaningful avatars: fallbacks
602
+ lose their accessible name entirely.
580
603
 
581
604
  ### Accessibility
582
605
 
583
- Always set `alt`. With an image it labels the photo; with a fallback the
584
- component adds `role="img"` + `aria-label` (from `alt`) to the fallback, so
585
- assistive tech announces the person, not the raw initials. If `alt` is empty,
586
- the fallback renders with no role and no name — acceptable only for purely
587
- decorative avatars. A presence dot is decorative — make the same status
606
+ Set `name` (or `alt`). With an image, `alt` labels the photo (`name` when
607
+ `alt` is empty); with a fallback the component adds `role="img"` +
608
+ `aria-label` (`alt`, else `name`) to the fallback, so assistive tech
609
+ announces the person, not the raw initials. With neither, the fallback
610
+ renders with no role and no name — acceptable only for purely decorative
611
+ avatars. A presence dot is decorative — make the same status
588
612
  available in visible text or an adjacent label.
589
613
 
590
614
  ## Props
591
615
 
592
616
  | Prop | Type | Default | Required | Description |
593
617
  | --- | --- | --- | --- | --- |
594
- | `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: `icon`, `root`. States: —. 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 `BbAvatarProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
595
- | `alt` | `string \| undefined` | `""` | | Alternative text for the image, used for accessibility. |
618
+ | `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: `icon`, `initials`, `root`. States: —. 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 `BbAvatarProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
619
+ | `alt` | `string \| undefined` | `""` | | Alternative text for the image, used for accessibility. Without it the avatar is labelled with `name`. |
620
+ | `color` | `string \| boolean \| undefined` | `false` | | Paints the fallback (initials or icon). `true`: a palette colour picked from `name`, stable across renders and the server. A string: any CSS colour or `var()` as the background, with black or white ink, whichever reads. Unset: the primary colour. |
621
+ | `name` | `string \| undefined` | | | The person's name. With no image and no default slot, the avatar shows its initials (first letters of the first and last word; none: the person icon). Also the accessible name when `alt` is empty, and the input of `color`. |
596
622
  | `size` | `number \| CssSize \| keyof Sizes \| undefined` | `"md"` | | Defines the component size. Accepted values: - A key from the provided size map (`keyof T`), e.g. `'sm' \| 'md' \| 'lg'` - A custom CSS size string (e.g. `'20px'`, `'1.5rem'`, `'2em'`) - A number, typically interpreted as pixels by size parsers |
597
623
  | `sizes` | `string \| undefined` | | | Sizes attribute for the image, used with `srcset`. |
598
624
  | `src` | `string \| undefined` | | | Source URL of the avatar image. |
@@ -606,7 +632,8 @@ available in visible text or an adjacent label.
606
632
  | Part | What it is |
607
633
  | --- | --- |
608
634
  | `root` | The avatar frame, with the image or the fallback inside. |
609
- | `icon` | The default user glyph — rendered only while there is no image to show and the default slot is not overridden, so it lands nowhere otherwise. |
635
+ | `icon` | The default user glyph — rendered only while there is no image to show, the default slot is not overridden and `name` gives no initials, so it lands nowhere otherwise. |
636
+ | `initials` | The initials from `name` — rendered only while there is no image to show and the default slot is not overridden. |
610
637
 
611
638
  ## Events
612
639
 
@@ -626,6 +653,7 @@ Set these on the element, or on a class you put on it, to retune this component
626
653
  | `--fg` | `.bb-avatar` | `var(--bb-primary-fg)` | Initials; the built-in icon is an 80/20 mix of this toward --bg |
627
654
  | `--default-icon-size` | `.bb-avatar` | `clamp(14px, calc(var(--size) * 0.7), 48px)` | Built-in fallback icon: 70% of the avatar, floored at 14px and capped at 48px. `--size` is the avatar's own box, set inline from the `size` prop. |
628
655
  | `--fs` | `.bb-avatar` | `max(8px, calc(var(--size) * 0.4))` | Initials: 40% of the avatar, floored at 8px |
656
+ | `--hue` | `.bb-avatar` | `0` | The palette hue `color` picks (a modifier class sets it). |
629
657
  | `--elev` | `.bb-avatar` | `var(--bb-elev-sm)` | The theme's resting lift on small chrome, declared here so an ancestor's `--elev` cannot reach in; `--elev: none` flattens one. |
630
658
  | `--size` | `.bb-avatar__default-icon` | `var(--default-icon-size)` | |
631
659
 
@@ -638,7 +666,7 @@ Set these on the element, or on a class you put on it, to retune this component
638
666
  - **CSS custom properties** listed on a node are declared on THAT node's root and read by elements inside it. Set one on that node's root or on the element inside it that reads it — the pt part that lands there is how you reach it (`pt:box="[--border-color:…]"` on a text input) — never on `BbAvatar`'s root, where the node's own declaration masks it (design-tokens guide, _Overriding one from a consumer app_, rule 0).
639
667
  - Listed nodes are the ones `BbAvatar`'s API reaches or that declare a documented CSS variable; the rest fold into "also mounts". The complete tree, undocumented locals included, is `manifest/components/BbAvatar.tree.json` (a public component in it is a name: its own tree file has the rest).
640
668
 
641
- - `BbAvatar` _(this component)_ — its own template binds: `icon` → `BbIcon`
669
+ - `BbAvatar` _(this component)_ — its own template binds: `initials` → `span.bb-avatar__initials`, `icon` → `BbIcon`
642
670
  - Also mounts `BbIcon`
643
671
 
644
672
  ## See Also
@@ -266,7 +266,7 @@ hidden accessible name — always write it.
266
266
  ```
267
267
 
268
268
  The slots named after the props (`#prepend:icon`, `#append:icon`)
269
- replace them and render inside the `icon` part, so `pt:icon`, `--icon-size`
269
+ replace them (one that renders nothing falls back to the prop) and render inside the `icon` part, so `pt:icon`, `--icon-size`
270
270
  and the loading spinner still apply. Their scope is the badge's states,
271
271
  `{ activeLink, exactActiveLink, loading }`: a filter chip linking to a page
272
272
  can show a solid glyph while that page is open. What you put in a slot is
@@ -757,10 +757,10 @@ Set these on the element, or on a class you put on it, to retune this component
757
757
 
758
758
  - `BbBreadcrumbs` _(this component)_ — its own template binds: `item` → `li.bb-breadcrumbs__item`, `icon` → `BbIcon`, `text` → `span.bb-breadcrumbs__text`
759
759
  - `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
760
- - `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`
760
+ - `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`
761
761
  - `BbDropdownList` _(internal — not importable, reach it through `BbDropdown`)_ — also mounts `BbIcon`, `ErrorIcon`, `CommonPopover`, `BbDropdownList`
762
762
  - `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`
763
- - `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`
763
+ - `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`
764
764
  - `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`
765
765
  - `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`, `--icon-size`; also mounts `BbIcon`
766
766
  - `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 `BbBaseButton`, `BbSpinner`, `BbIcon`
@@ -426,8 +426,8 @@ a `local:` file in your `iconDir`, not a hand-made icon component wrapped in a
426
426
 
427
427
  To change the glyph with the button's state (a filled star while a toggle is
428
428
  on, a solid icon on the current page's link), use the slot named after the
429
- prop: `#prepend:icon`, `#append:icon`. The slot replaces the prop and
430
- renders inside the `icon` part, so `pt:icon`, `--icon-size` and the loading
429
+ prop: `#prepend:icon`, `#append:icon`. The slot replaces the prop (one that
430
+ renders nothing falls back to it) and renders inside the `icon` part, so `pt:icon`, `--icon-size` and the loading
431
431
  spinner work as they do on the prop's glyph. Its scope is the button's states:
432
432
  `{ activeLink, exactActiveLink, pressed, loading, disabled }`. What you put in
433
433
  it is yours: a `BbIcon` takes the part's size, anything else you size.
@@ -232,8 +232,11 @@ const summary = computed(() => {
232
232
  </script>
233
233
  ```
234
234
 
235
- With more than one month, the days of the neighbouring months are left blank:
236
- a date belongs to one grid only.
235
+ With one month, the greyed days of the neighbouring months that fill its
236
+ first and last weeks are ordinary days: a click (or Enter / Space on one)
237
+ picks it, single, range or multiple alike, and the view moves to its month.
238
+ `min`, `max` and `selectable` disable them like any other day. With more than
239
+ one month, those days are left blank: a date belongs to one grid only.
237
240
 
238
241
  ### `type` — what you are picking
239
242
 
@@ -808,8 +808,9 @@ called with one context object — `BbCheckboxGroupItemsContext`: `reason`
808
808
  `'model'` when the model changed from outside and the options cannot resolve
809
809
  it), `modelValue` and `signal`; a group has no search field, so no `query`.
810
810
  While it resolves, `loading-text` (or the `#loading` slot) shows; `empty-text`
811
- (or `#empty`) covers the empty result, and `failed-text` (or `#empty` with its
812
- `error` prop) a load that threw. Loading, cancellation and race protection are
811
+ (or `#empty`) covers the empty result, and `failed-text` words the failure
812
+ row of a load that threw (it ends with a built-in "Try again"; `#empty` never
813
+ renders for a failure). Loading, cancellation and race protection are
813
814
  built in — don't wrap the provider in your own `loading` ref or debounce.
814
815
 
815
816
  Tie the option set to external state with `dependencies` (debounced by
@@ -1119,7 +1120,7 @@ for a preset that fits any row type (never `<any>`), not an imported
1119
1120
  | `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'`. |
1120
1121
  | `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. |
1121
1122
  | `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. |
1122
- | `items` | `T[] \| ((context: BbCheckboxGroupItemsContext) => T[] \| Promise<T[]>)` | | yes | The options: an array, or a provider called with a `BbCheckboxGroupItemsContext` (`BbSwitchGroupItemsContext` on a switch group) (`reason`, `modelValue`, `signal`), sync or async. A provider fails by THROWING, never by returning `[]`: the rows clear and `#empty` gets the `error`. |
1123
+ | `items` | `T[] \| ((context: BbCheckboxGroupItemsContext) => T[] \| Promise<T[]>)` | | yes | The options: an array, or a provider called with `{ 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". |
1123
1124
  | `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). |
1124
1125
  | `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`. |
1125
1126
  | `labelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted, `'top'`. |
@@ -1197,7 +1198,7 @@ States are listed in precedence order: when two are on at once and their entries
1197
1198
 
1198
1199
  - `append` — scope: `object` — Content rendered after the last option, inside the options container.
1199
1200
  - `description` — scope: `BbCheckboxGroupDescriptionSlotProps` `{ 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`.
1200
- - `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.
1201
+ - `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").
1201
1202
  - `icon` — scope: `BbCheckboxGroupIconSlotProps<T>` `{ disabled: boolean; readonly: boolean; checked: boolean; indeterminate?: boolean; focused: boolean; focusVisible: boolean; id: string; name: string; falseValue: any; hasErrors: boolean; hasWarnings: boolean; parsedValue: string; trueValue: any; value: any; item: T; text: string }` — Replaces the default checkmark icon for each checkbox option.
1202
1203
  - `label` — scope: `BbCheckboxGroupLabelSlotProps<T>` `{ item: T; text: string; checked: boolean; description: string }` — Replaces the default label text for each option.
1203
1204
  - `legend` — scope: `BbCheckboxGroupLegendSlotProps` `{ showAsterisk?: boolean; text: string; hasErrors: boolean; hasWarnings: boolean }` — Replaces the default fieldset legend text for the group.
@@ -466,6 +466,15 @@ styles the sheet's root only. For what is inside it (header, title, ✕, body)
466
466
  no part of the input reaches there, so put a `pt` in `offCanvasProps`
467
467
  (passthrough guide § Inside the sheet).
468
468
 
469
+ ### Opening from code: `v-model:open`
470
+
471
+ `v-model` is the value; `v-model:open` is whether the palette is open. Bound,
472
+ your ref opens and closes it, and every open and close the user makes is
473
+ written back: a pick, Escape, a click outside, the phone sheet's own dismiss. A static `:open` with no
474
+ listener is only the initial state. An open from code is the same open a
475
+ click makes, and `disabled` / `readonly` refuse it (the ref is set back
476
+ to `false`).
477
+
469
478
  ### Events
470
479
 
471
480
  Beyond `update:modelValue` (see value format above), the native input events are
@@ -674,6 +683,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
674
683
  ## v-model
675
684
 
676
685
  - `v-model` — type: `string \| null \| undefined`
686
+ - `v-model:open` — type: `boolean \| undefined`
677
687
 
678
688
  ## Props
679
689
 
@@ -707,6 +717,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
707
717
  | `modelValue` | `string \| null \| undefined` | `null` | | Used by v-model. |
708
718
  | `name` | `string \| undefined` | | | Defines the name of the input. |
709
719
  | `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. |
720
+ | `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. |
710
721
  | `persistentHint` | `boolean \| undefined` | `false` | | Keeps the hint displayed. |
711
722
  | `placeholder` | `string \| undefined` | | | Text shown while the field is empty. |
712
723
  | `prepend:icon` | `string \| undefined` | | | Name of the icon to be added at the start of the input. |
@@ -778,6 +789,7 @@ States are listed in precedence order: when two are on at once and their entries
778
789
  - `show` — `(): void` — Emitted as soon as the palette (the popover, or the sheet on a phone) starts to open.
779
790
  - `shown` — `(): void` — Emitted once the palette is open and its open transition has finished.
780
791
  - `update:modelValue` — `(value: string \| null): void` — Emitted when the value becomes a valid hex color via typing/masking, when the field is cleared, or when the palette selects a color. Emits: - `#RRGGBB` (or `#RRGGBBAA` when `alpha` is enabled) for valid values - `null` when cleared
792
+ - `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
781
793
 
782
794
  ## Slots
783
795
 
@@ -534,10 +534,12 @@ popover ↔ sheet.
534
534
 
535
535
  ### Open state, disabled and readonly
536
536
 
537
- The palette **owns its open state** — there is no `open` prop or `v-model:open`
538
- to force it. Clicking the activator toggles it; a click on the dialog backdrop or
539
- outside closes it; you _observe_ the state through the slot's `open` flag for
540
- styling (a caret, a highlight). Two props gate interaction:
537
+ Clicking the activator toggles the palette; a pick, Escape or a click outside
538
+ closes it, and the slot's `open` flag shows the state for styling (a caret, a
539
+ highlight). To open it from code, bind `v-model:open` (`v-model` stays the
540
+ color): your ref opens and closes it, and every close is written back. A
541
+ static `:open` with no listener is only the initial state. Two props gate
542
+ interaction:
541
543
 
542
544
  - `disabled` — blocks the activator entirely (no open). The trigger gets
543
545
  `disabled` and `aria-disabled="true"` — through the slot's `props`, or set on
@@ -731,8 +733,8 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
731
733
  represented; enable `alpha` wherever 8-digit values occur.
732
734
  - **Start a bound model at `null`**, not `undefined`: `null` is the empty
733
735
  value the palette reports back.
734
- - **Don't try to force it open via a prop** — the open state is internal; gate
735
- with `disabled`/`readonly`, observe with the slot's `open`.
736
+ - **Open it from code with `v-model:open`**, not by clicking the activator
737
+ from a script; `disabled` / `readonly` refuse that open too.
736
738
 
737
739
  ### Accessibility
738
740
 
@@ -751,6 +753,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
751
753
  ## v-model
752
754
 
753
755
  - `v-model` — type: `string \| null \| undefined`
756
+ - `v-model:open` — type: `boolean \| undefined`
754
757
 
755
758
  ## Props
756
759
 
@@ -770,6 +773,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
770
773
  | `modelValue` | `string \| null \| undefined` | | | v-model: the current color as a `#RRGGBB` hex string (or `#RRGGBBAA` when `alpha` is enabled), or `null` when empty. |
771
774
  | `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. |
772
775
  | `offset` | `number \| undefined` | `4` | | Space the floating container will maintain from the activator. |
776
+ | `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. |
773
777
  | `padding` | `number \| undefined` | `6` | | Minimum empty space to keep from the edge of the page |
774
778
  | `placement` | `Placement \| undefined` | | | Position of the overlay in respect to the related activator. |
775
779
  | `readonly` | `boolean \| undefined` | `false` | | Prevent opening the palette while keeping the activator visible. |
@@ -801,6 +805,7 @@ States are listed in precedence order: when two are on at once and their entries
801
805
  - `show` — `(): void` — Emitted as soon as the palette (the popover, or the sheet on a phone) starts to open.
802
806
  - `shown` — `(): void` — Emitted once the palette is open and its open transition has finished.
803
807
  - `update:modelValue` — `(value: string): void` — Emitted when a color is picked. Payload is a concrete `#RRGGBB` (or `#RRGGBBAA` when alpha is enabled) — the palette always emits a color, never `null`.
808
+ - `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
804
809
 
805
810
  ## Slots
806
811
 
@@ -352,6 +352,15 @@ Reach for the **component** (slot or `activator` prop) when you want the
352
352
  the directive is the shortcut for the bare-trigger cell case, not a replacement
353
353
  for the component's `v-model` in a form.
354
354
 
355
+ ### Opening from code: `v-model:open`
356
+
357
+ `v-model` is the value; `v-model:open` is whether the calendar is open. Bound,
358
+ your ref opens and closes it, and every open and close the user makes is
359
+ written back: a pick, Escape, a click outside, the phone sheet's own dismiss. A static `:open` with no
360
+ listener is only the initial state. An open from code is the same open a
361
+ click makes, and `disabled` / `readonly` refuse it (the ref is set back
362
+ to `false`).
363
+
355
364
  ### Relationship to BbDatePickerInput
356
365
 
357
366
  `BbDatePickerInput` _is_ a `BbDatePicker` with a segmented text field wrapped
@@ -464,6 +473,7 @@ and digit typeahead; the time rail exposes labelled columns. Always pass a
464
473
 
465
474
  - `v-model:activeSegment` — type: `BbCalendarSegment \| undefined`
466
475
  - `v-model` — type: `string \| string[] \| null \| undefined`
476
+ - `v-model:open` — type: `boolean \| undefined`
467
477
  - `v-model:time` — type: `string \| string[] \| null \| undefined`
468
478
 
469
479
  ## Props
@@ -491,6 +501,7 @@ and digit typeahead; the time rail exposes labelled columns. Always pass a
491
501
  | `numberOfMonths` | `number \| undefined` | `1` | | How many months the popover shows side by side (day grids only); the phone sheet always shows one. Too narrow for them all, the months wrap. |
492
502
  | `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. |
493
503
  | `offset` | `number \| undefined` | `4` | | Space the popover keeps from the activator. |
504
+ | `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. |
494
505
  | `padding` | `number \| undefined` | | | Minimum empty space to keep from the edge of the page. |
495
506
  | `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'` | | | Position of the popover relative to the activator/anchor. |
496
507
  | `range` | `boolean` | `false` | | Enables range selection (`[start, end]`). |
@@ -550,6 +561,7 @@ States are listed in precedence order: when two are on at once and their entries
550
561
  - `time-pick` — `(payload: { unit: TimeUnit; value: string; }): void` — Relay of the raw time-rail pick. An embedding host binds this to run its own value engine; clean consumers ignore it and use `update:time`.
551
562
  - `update:activeSegment` — `(value: BbCalendarSegment): void` — The active range end changed (range + `type="datetime"` only).
552
563
  - `update:modelValue` — `(value: string \| string[] \| null): void` — Emitted when the selected date value changes (single/range/null).
564
+ - `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
553
565
  - `update:time` — `(value: string \| string[] \| null): void` — Companion time model, alongside every change while `type="datetime"`.
554
566
 
555
567
  ## Slots
@@ -178,6 +178,8 @@ line: `if (!Array.isArray(value)) return;` before treating it as the range.
178
178
  For a window that often crosses the month line, `:number-of-months="2"` shows
179
179
  two months side by side in the popover (one in the phone sheet). If the
180
180
  popover doesn't have room for both, the second month wraps under the first.
181
+ With one month, the greyed days of the previous and next month are pickable
182
+ too: clicking one picks it and moves the calendar to its month.
181
183
 
182
184
  **Booking — two months in the popover**
183
185
 
@@ -260,7 +262,9 @@ and parses its own digits. Any other attribute lands on the field root; a
260
262
 
261
263
  `min` and `max` (each a `YYYY-MM-DD` string) constrain the selectable window;
262
264
  days outside it render disabled in the calendar, and a typed out-of-range date is
263
- snapped back on commit. **Malformed `min`/`max` throw during setup** on purpose,
265
+ snapped back on commit. A value your app sets past a bound (on mount or later)
266
+ stays as it is while nobody touches the field; once the user focuses it and
267
+ leaves, it snaps like a typed one. **Malformed `min`/`max` throw during setup** on purpose,
264
268
  to catch config mistakes early — always pass the `YYYY-MM-DD` shape.
265
269
 
266
270
  For non-contiguous rules (no weekends, no holidays, only in-stock slots), pass a
@@ -768,6 +772,15 @@ const from = ref<string | null>('2026-05-01');
768
772
  </script>
769
773
  ```
770
774
 
775
+ ### Opening from code: `v-model:open`
776
+
777
+ `v-model` is the value; `v-model:open` is whether the calendar is open. Bound,
778
+ your ref opens and closes it, and every open and close the user makes is
779
+ written back: a pick, Escape, a click outside, the phone sheet's own dismiss. A static `:open` with no
780
+ listener is only the initial state. An open from code is the same open a
781
+ click makes, and `disabled` / `readonly` refuse it (the ref is set back
782
+ to `false`).
783
+
771
784
  ### Events & v-model
772
785
 
773
786
  Because the control is a composite (segmented fields + calendar + optional
@@ -972,6 +985,7 @@ label>')` matches nothing; query each segment by its own label instead. See
972
985
  ## v-model
973
986
 
974
987
  - `v-model` — type: `string \| string[] \| null \| undefined`
988
+ - `v-model:open` — type: `boolean \| undefined`
975
989
  - `v-model:time` — type: `string \| string[] \| null \| undefined`
976
990
 
977
991
  ## Props
@@ -1012,6 +1026,7 @@ label>')` matches nothing; query each segment by its own label instead. See
1012
1026
  | `name` | `string \| undefined` | | | Defines the name of the input. |
1013
1027
  | `numberOfMonths` | `number \| undefined` | `1` | | How many months the calendar popover shows side by side (day grids only); the phone sheet always shows one. Too narrow for them all, the months wrap. |
1014
1028
  | `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. |
1029
+ | `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. |
1015
1030
  | `persistentHint` | `boolean \| undefined` | `false` | | Keeps the hint displayed. |
1016
1031
  | `placeholder` | `string \| undefined` | | | Text shown while the field is empty. |
1017
1032
  | `prepend:icon` | `string \| undefined` | | | Name of the icon to be added at the start of the input. |
@@ -1100,6 +1115,7 @@ States are listed in precedence order: when two are on at once and their entries
1100
1115
  - `show` — `(): void` — Emitted as soon as the calendar surface starts to open (the popover, or the sheet on a phone).
1101
1116
  - `shown` — `(): void` — Emitted once the calendar surface is open and its open transition has finished.
1102
1117
  - `update:modelValue` — `(value: string \| string[] \| null): void` — Emitted whenever the selected date value changes. Payload is `null` for cleared values, a single string for single-date mode, or a two-element array for range mode.
1118
+ - `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
1103
1119
  - `update:time` — `(value: string \| string[] \| null): void` — Companion time model (`v-model:time`), emitted alongside every value change while `type="datetime"` is on. Always 24-hour `HH:mm` (or `HH:mm:ss` with `seconds`); `null` when cleared, an array in range mode.
1104
1120
 
1105
1121
  ## Slots
@@ -359,7 +359,9 @@ const replace = (saved: Member) => {
359
359
  deleted, a route change) still plays its close and hands focus back. An
360
360
  async `@complete` that removed it still decides the result: completed
361
361
  when it succeeds, else `'unmounted'`. So `v-if="item"` on the dialog is
362
- fine.
362
+ fine. In your own tests, the page stays inert for that close (its
363
+ `transition-duration`), as for any close: wait for focus to come back
364
+ before a `focus()`. Clicks driven by Playwright wait on their own.
363
365
  - It settles when the close **starts**, together with `@hide`, so a list can
364
366
  update while the dialog fades out. It never rejects and never hangs. A
365
367
  refused close settles nothing, and a `complete` after a dismissal is