bitboss-ui 3.0.0-beta.56 → 3.0.0-beta.57

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 (229) hide show
  1. package/README.md +24 -0
  2. package/bin/bitboss-ui-mcp.mjs +14 -5
  3. package/bin/bitboss-ui.mjs +6 -1
  4. package/dist/ai/BbBreadcrumbs.md +1 -1
  5. package/dist/ai/BbCheckbox.md +1 -1
  6. package/dist/ai/BbCheckboxGroup.md +1 -1
  7. package/dist/ai/BbColorInput.md +2 -2
  8. package/dist/ai/BbColorPalette.md +1 -1
  9. package/dist/ai/BbConfirm.md +1 -1
  10. package/dist/ai/BbDatePicker.md +1 -1
  11. package/dist/ai/BbDatePickerInput.md +2 -2
  12. package/dist/ai/BbDialog.md +438 -197
  13. package/dist/ai/BbDropdown.md +1 -1
  14. package/dist/ai/BbDropdownButton.md +1 -1
  15. package/dist/ai/BbDropzone.md +1 -1
  16. package/dist/ai/BbForm.md +7 -4
  17. package/dist/ai/BbHost.md +1 -1
  18. package/dist/ai/BbNumberInput.md +1 -1
  19. package/dist/ai/BbOffCanvas.md +323 -186
  20. package/dist/ai/BbPopover.md +1 -1
  21. package/dist/ai/BbRadio.md +1 -1
  22. package/dist/ai/BbRadioGroup.md +1 -1
  23. package/dist/ai/BbRating.md +1 -1
  24. package/dist/ai/BbSelect.md +2 -2
  25. package/dist/ai/BbSelectPopover.md +8 -9
  26. package/dist/ai/BbSlider.md +1 -1
  27. package/dist/ai/BbSwitch.md +1 -1
  28. package/dist/ai/BbSwitchGroup.md +1 -1
  29. package/dist/ai/BbTag.md +1 -1
  30. package/dist/ai/BbTextInput.md +1 -1
  31. package/dist/ai/BbTextarea.md +1 -1
  32. package/dist/ai/BbTimePicker.md +1 -1
  33. package/dist/ai/BbTimePickerInput.md +2 -2
  34. package/dist/ai/changelog.json +110 -4
  35. package/dist/ai/components.json +35 -34
  36. package/dist/ai/composables/useBbDialogContext.md +3 -2
  37. package/dist/ai/composables/useBbFormContext.md +3 -1
  38. package/dist/ai/composables/useBbOffCanvasContext.md +2 -1
  39. package/dist/ai/guides/eslint-rules.md +2 -0
  40. package/dist/ai/guides/installation-and-plugin-setup.md +1 -0
  41. package/dist/ai/guides/migration/components/bb-dialog.md +13 -12
  42. package/dist/ai/guides/migration/components/bb-offcanvas.md +10 -9
  43. package/dist/ai/guides/migration/v2-to-v3.md +35 -0
  44. package/dist/ai/helpers/inertia/manifest.json +1 -1
  45. package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
  46. package/dist/ai/manifest/components/BbCheckbox.json +1 -1
  47. package/dist/ai/manifest/components/BbCheckboxGroup.json +1 -1
  48. package/dist/ai/manifest/components/BbColorInput.json +2 -2
  49. package/dist/ai/manifest/components/BbColorInput.tree.json +1 -1
  50. package/dist/ai/manifest/components/BbColorPalette.json +1 -1
  51. package/dist/ai/manifest/components/BbColorPalette.tree.json +1 -1
  52. package/dist/ai/manifest/components/BbConfirm.tree.json +1 -1
  53. package/dist/ai/manifest/components/BbDatePicker.json +1 -1
  54. package/dist/ai/manifest/components/BbDatePicker.tree.json +1 -1
  55. package/dist/ai/manifest/components/BbDatePickerInput.json +2 -2
  56. package/dist/ai/manifest/components/BbDatePickerInput.tree.json +1 -1
  57. package/dist/ai/manifest/components/BbDialog.json +18 -9
  58. package/dist/ai/manifest/components/BbDialog.tree.json +1 -1
  59. package/dist/ai/manifest/components/BbDropdown.json +1 -1
  60. package/dist/ai/manifest/components/BbDropdown.tree.json +1 -1
  61. package/dist/ai/manifest/components/BbDropdownButton.json +1 -1
  62. package/dist/ai/manifest/components/BbDropdownButton.tree.json +1 -1
  63. package/dist/ai/manifest/components/BbDropzone.json +1 -1
  64. package/dist/ai/manifest/components/BbHost.tree.json +1 -1
  65. package/dist/ai/manifest/components/BbNumberInput.json +1 -1
  66. package/dist/ai/manifest/components/BbOffCanvas.json +17 -8
  67. package/dist/ai/manifest/components/BbOffCanvas.tree.json +10 -0
  68. package/dist/ai/manifest/components/BbPopover.json +1 -1
  69. package/dist/ai/manifest/components/BbPopover.tree.json +1 -1
  70. package/dist/ai/manifest/components/BbRadio.json +1 -1
  71. package/dist/ai/manifest/components/BbRadioGroup.json +1 -1
  72. package/dist/ai/manifest/components/BbRating.json +1 -1
  73. package/dist/ai/manifest/components/BbSelect.json +2 -2
  74. package/dist/ai/manifest/components/BbSelect.tree.json +1 -1
  75. package/dist/ai/manifest/components/BbSelectPopover.json +1 -1
  76. package/dist/ai/manifest/components/BbSelectPopover.tree.json +1 -1
  77. package/dist/ai/manifest/components/BbSlider.json +1 -1
  78. package/dist/ai/manifest/components/BbSwitch.json +1 -1
  79. package/dist/ai/manifest/components/BbSwitchGroup.json +1 -1
  80. package/dist/ai/manifest/components/BbTag.json +1 -1
  81. package/dist/ai/manifest/components/BbTextInput.json +1 -1
  82. package/dist/ai/manifest/components/BbTextarea.json +1 -1
  83. package/dist/ai/manifest/components/BbTimePicker.json +1 -1
  84. package/dist/ai/manifest/components/BbTimePicker.tree.json +1 -1
  85. package/dist/ai/manifest/components/BbTimePickerInput.json +2 -2
  86. package/dist/ai/manifest/components/BbTimePickerInput.tree.json +1 -1
  87. package/dist/ai/manifest/index.json +2 -2
  88. package/dist/ai/manifest/meta.json +1 -0
  89. package/dist/ai/manifest/types.advanced.json +2 -2
  90. package/dist/ai/manifest/types.api.json +2 -1
  91. package/dist/ai/recipes/inertia/approvals-inbox.md +13 -12
  92. package/dist/ai/recipes/inertia/record-form.md +6 -33
  93. package/dist/ai/recipes/inertia/records-workspace.md +0 -1
  94. package/dist/ai/recipes/inertia/settings-workspace.md +107 -137
  95. package/dist/ai/recipes/nuxt/approvals-inbox.md +13 -12
  96. package/dist/ai/recipes/nuxt/record-form.md +6 -33
  97. package/dist/ai/recipes/nuxt/records-workspace.md +0 -1
  98. package/dist/ai/recipes/nuxt/settings-workspace.md +107 -138
  99. package/dist/ai/recipes/vue/approvals-inbox.md +13 -12
  100. package/dist/ai/recipes/vue/record-form.md +6 -33
  101. package/dist/ai/recipes/vue/records-workspace.md +0 -1
  102. package/dist/ai/recipes/vue/settings-workspace.md +107 -138
  103. package/dist/ai/source/BbButton.md +13 -3
  104. package/dist/ai/source/BbCheckbox.md +3 -1
  105. package/dist/ai/source/BbCheckboxGroup.md +3 -1
  106. package/dist/ai/source/BbColorInput.md +3 -1
  107. package/dist/ai/source/BbDatePickerInput.md +3 -1
  108. package/dist/ai/source/BbDialog.md +156 -18
  109. package/dist/ai/source/BbDropzone.md +3 -1
  110. package/dist/ai/source/BbForm.md +13 -0
  111. package/dist/ai/source/BbNumberInput.md +3 -1
  112. package/dist/ai/source/BbOffCanvas.md +714 -21
  113. package/dist/ai/source/BbRadio.md +6 -2
  114. package/dist/ai/source/BbRadioGroup.md +3 -1
  115. package/dist/ai/source/BbRating.md +3 -1
  116. package/dist/ai/source/BbSelect.md +3 -1
  117. package/dist/ai/source/BbSlider.md +7 -4
  118. package/dist/ai/source/BbSwitch.md +2 -0
  119. package/dist/ai/source/BbSwitchGroup.md +2 -0
  120. package/dist/ai/source/BbTag.md +3 -1
  121. package/dist/ai/source/BbTextInput.md +3 -1
  122. package/dist/ai/source/BbTextarea.md +3 -1
  123. package/dist/ai/source/BbTimePickerInput.md +3 -1
  124. package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +5 -5
  125. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +75 -74
  126. package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +90 -89
  127. package/dist/components/BbCheckbox/types.d.ts +1 -1
  128. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +91 -90
  129. package/dist/components/BbCheckboxGroup/types.d.ts +1 -1
  130. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +69 -68
  131. package/dist/components/BbColorInput/types.d.ts +1 -1
  132. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +288 -287
  133. package/dist/components/BbDatePickerInput/types.d.ts +1 -1
  134. package/dist/components/BbDialog/BbDialog.vue.d.ts +9 -0
  135. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +233 -189
  136. package/dist/components/BbDialog/types.d.ts +58 -5
  137. package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +150 -149
  138. package/dist/components/BbDropzone/types.d.ts +1 -1
  139. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +154 -148
  140. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +143 -142
  141. package/dist/components/BbNumberInput/types.d.ts +1 -1
  142. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +10 -0
  143. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +495 -255
  144. package/dist/components/BbOffCanvas/sheetSnap.d.ts +64 -0
  145. package/dist/components/BbOffCanvas/sheetSnap.js +58 -0
  146. package/dist/components/BbOffCanvas/types.d.ts +59 -5
  147. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +68 -68
  148. package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +66 -65
  149. package/dist/components/BbRadio/types.d.ts +1 -1
  150. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +96 -95
  151. package/dist/components/BbRadioGroup/types.d.ts +1 -1
  152. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +79 -78
  153. package/dist/components/BbRating/types.d.ts +1 -1
  154. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +153 -152
  155. package/dist/components/BbSelect/types.d.ts +1 -1
  156. package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +106 -105
  157. package/dist/components/BbSlider/types.d.ts +1 -1
  158. package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +86 -85
  159. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +131 -130
  160. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +64 -63
  161. package/dist/components/BbTag/types.d.ts +1 -1
  162. package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +71 -70
  163. package/dist/components/BbTextInput/types.d.ts +1 -1
  164. package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +81 -80
  165. package/dist/components/BbTextarea/types.d.ts +1 -1
  166. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +169 -168
  167. package/dist/components/BbTimePickerInput/types.d.ts +1 -1
  168. package/dist/composables/hostOpenings.js +1 -1
  169. package/dist/composables/overlayRegistry.d.ts +36 -1
  170. package/dist/composables/overlayRegistry.js +167 -101
  171. package/dist/composables/useBbDialogContext.d.ts +17 -3
  172. package/dist/composables/useBbDialogContext.js +30 -27
  173. package/dist/composables/useBbFormContext.d.ts +7 -0
  174. package/dist/composables/useBbFormContext.js +40 -34
  175. package/dist/composables/useBbTabsContext.js +140 -171
  176. package/dist/composables/useKeyboardInset.js +10 -20
  177. package/dist/composables/useOverlayNavigation.d.ts +37 -0
  178. package/dist/composables/useOverlayNavigation.js +89 -0
  179. package/dist/composables/useUrlQueryParam.d.ts +21 -0
  180. package/dist/composables/useUrlQueryParam.js +48 -0
  181. package/dist/directives/overlayTrigger.js +41 -41
  182. package/dist/i18n/locales/cs.json +4 -1
  183. package/dist/i18n/locales/da.json +4 -1
  184. package/dist/i18n/locales/de-CH.json +4 -1
  185. package/dist/i18n/locales/de.json +4 -1
  186. package/dist/i18n/locales/el.json +4 -1
  187. package/dist/i18n/locales/en-GB.json +4 -1
  188. package/dist/i18n/locales/en.json +4 -1
  189. package/dist/i18n/locales/es-MX.json +4 -1
  190. package/dist/i18n/locales/es.json +4 -1
  191. package/dist/i18n/locales/fi.json +4 -1
  192. package/dist/i18n/locales/fr.json +4 -1
  193. package/dist/i18n/locales/hu.json +4 -1
  194. package/dist/i18n/locales/it.json +4 -1
  195. package/dist/i18n/locales/ja.json +4 -1
  196. package/dist/i18n/locales/ko.json +4 -1
  197. package/dist/i18n/locales/nb.json +4 -1
  198. package/dist/i18n/locales/nl.json +4 -1
  199. package/dist/i18n/locales/pl.json +4 -1
  200. package/dist/i18n/locales/pt-BR.json +4 -1
  201. package/dist/i18n/locales/pt-PT.json +4 -1
  202. package/dist/i18n/locales/ro.json +4 -1
  203. package/dist/i18n/locales/ru.json +4 -1
  204. package/dist/i18n/locales/sv.json +4 -1
  205. package/dist/i18n/locales/tr.json +4 -1
  206. package/dist/i18n/locales/uk.json +4 -1
  207. package/dist/i18n/locales/zh-CN.json +4 -1
  208. package/dist/i18n/locales/zh-HK.json +4 -1
  209. package/dist/i18n/locales/zh-TW.json +4 -1
  210. package/dist/index.d.ts +1 -1
  211. package/dist/index.js +73 -73
  212. package/dist/llms-full.txt +1250 -999
  213. package/dist/llms-medium.txt +1 -0
  214. package/dist/locale-blueprint.json +4 -1
  215. package/dist/plugin.js +28 -27
  216. package/dist/styles.css +2 -2
  217. package/dist/utilities/functions/isTextEntry.d.ts +5 -0
  218. package/dist/utilities/functions/isTextEntry.js +15 -0
  219. package/dist/utilities/misc/autofocus.d.ts +20 -0
  220. package/dist/utilities/misc/autofocus.js +11 -0
  221. package/dist/utils/copyData.d.ts +8 -5
  222. package/dist/utils/copyData.js +6 -6
  223. package/dist/utils/versionCheck.js +1 -1
  224. package/package.json +1 -1
  225. package/scripts/lib/eslint-disable.mjs +19 -0
  226. package/scripts/lib/eslint-plugin.d.ts +2 -0
  227. package/scripts/lib/eslint-plugin.mjs +57 -0
  228. package/scripts/lib/prefer-v-bb-dialog.mjs +455 -0
  229. package/scripts/lib/validate-bb-markup.mjs +11 -1
package/README.md CHANGED
@@ -599,6 +599,30 @@ script, a switch bound to the same ref and your own components are never
599
599
  reported. `BbAccordion` wires all of it for you.
600
600
  `bitboss-ui check` reports the same as `collapsible-trigger-aria`.
601
601
 
602
+ #### A dialog opened through a ref: `prefer-v-bb-dialog`
603
+
604
+ A `ref(false)` whose only jobs are a `BbDialog` / `BbOffCanvas` `v-model` and
605
+ `@click="open = true"` is wiring the library does for you.
606
+ `bitboss-ui/prefer-v-bb-dialog` (warn, a suggestion) reports it and points at
607
+ the id form, where the trigger also gets `aria-haspopup`, `aria-expanded`,
608
+ `aria-controls` and focus back:
609
+
610
+ ```vue
611
+ <template>
612
+ <BbButton v-bb-dialog="'create-label'">New label</BbButton>
613
+ <BbDialog id="create-label" title="Create label">…</BbDialog>
614
+ </template>
615
+ ```
616
+
617
+ `--fix` rewrites it only when nothing else uses the ref: it drops the
618
+ declaration (and the `ref` import once unused), turns the `v-model` into an
619
+ `id` and each click into `v-bb-dialog` (`v-bb-off-canvas` on a `BbOffCanvas`).
620
+ A ref the code also writes (`open = false` in a Cancel, `open.value = false`
621
+ after a save) is reported without a fix: those closes become the slots'
622
+ `close` / `complete`. A ref anything reads (`v-if="open"`, `watch(open)`, a
623
+ toggle) is never reported, since the page needs the state.
624
+ `bitboss-ui check` reports the same as `prefer-v-bb-dialog` (a warning).
625
+
602
626
  #### A rule nobody registered: `no-unregistered-rule`
603
627
 
604
628
  A string rule is a vee-validate rule name, and vee-validate knows only the
@@ -2533,6 +2533,8 @@ const ROW_FIELDS =
2533
2533
  * as their hand-written `summary`; `detail: 'rows'` → the full rows as before.
2534
2534
  */
2535
2535
  const CHANGES_PAGE = 60;
2536
+ /** The lines' share of a page (the envelope adds ~1K): keeps it under 8K. */
2537
+ const CHANGES_PAGE_CHARS = 6000;
2536
2538
 
2537
2539
  function changeLine(row, focus) {
2538
2540
  // 16 form controls in full is ~250 chars of the line; the component filter
@@ -2575,15 +2577,22 @@ function changeLines(rows, cursor, withClassMap = false, focus) {
2575
2577
  : compareVersions(a, b)
2576
2578
  );
2577
2579
  const start = Math.max(0, Number(cursor ?? 0) || 0);
2578
- const page = lines.slice(start, start + CHANGES_PAGE);
2580
+ // A page ends at CHANGES_PAGE lines or CHANGES_PAGE_CHARS of them, so its
2581
+ // size holds however long the summaries grow; the rest is a cursor away.
2582
+ let end = start;
2583
+ for (let used = 0; end < lines.length && end - start < CHANGES_PAGE; end++) {
2584
+ used += lines[end][1].length + 3;
2585
+ if (used > CHANGES_PAGE_CHARS && end > start) break;
2586
+ }
2579
2587
  const byRelease = {};
2580
- for (const [release, line] of page) (byRelease[release] ??= []).push(line);
2588
+ for (const [release, line] of lines.slice(start, end))
2589
+ (byRelease[release] ??= []).push(line);
2581
2590
  return {
2582
2591
  changes: byRelease,
2583
- ...(start + CHANGES_PAGE < lines.length
2592
+ ...(end < lines.length
2584
2593
  ? {
2585
- nextCursor: String(start + CHANGES_PAGE),
2586
- remaining: lines.length - start - CHANGES_PAGE,
2594
+ nextCursor: String(end),
2595
+ remaining: lines.length - end,
2587
2596
  }
2588
2597
  : {}),
2589
2598
  ...(Object.keys(classRenames).length && start === 0 && !withClassMap
@@ -1711,7 +1711,12 @@ Commands:
1711
1711
  \`<…Portal name>\` nothing opens: no call site and the
1712
1712
  name in no string of the project), \`vue-tsc-major\`
1713
1713
  (\`vue-tsc\` below 3 in package.json: the generic
1714
- components' props go unchecked).
1714
+ components' props go unchecked), \`prefer-v-bb-dialog\`
1715
+ (a \`ref(false)\` only a BbDialog / BbOffCanvas
1716
+ \`v-model\` and \`@click="x = true"\` use: give the
1717
+ dialog an \`id\` and put \`v-bb-dialog\` on the
1718
+ trigger; ESLint's \`--fix\` rewrites it when nothing
1719
+ else uses the ref).
1715
1720
  changelog [--since <version>] [--until <version>] [--json]
1716
1721
  Breaking changes between two releases — "what breaks if I
1717
1722
  bump". \`--since\` is the version you are ON, and is
@@ -750,7 +750,7 @@ States are listed in precedence order: when two are on at once and their entries
750
750
  - `BbDropdownList` _(internal — not importable, reach it through `BbDropdown`)_ — also mounts `BbIcon`, `ErrorIcon`, `CommonPopover`, `BbDropdownList`
751
751
  - `BbBadge` _(public — [contract](./BbBadge.md))_ — its own pt parts (`BbBadge`): `spinner` → `BbSpinner`, `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`
752
752
  - `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`
753
- - `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`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`
753
+ - `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`
754
754
  - `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`
755
755
  - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `BbIcon`, `text` → `span.bb-button__text`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--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 `BbIcon`, `BbBaseButton`, `BbSpinner`
756
756
  - Also mounts `BbIcon`
@@ -709,7 +709,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
709
709
  | Prop | Type | Default | Required | Description |
710
710
  | --- | --- | --- | --- | --- |
711
711
  | `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: `description`, `hint`, `icon`, `label`, `message`, `root`. States: `checked`, `disabled`, `errors`, `focused`, `focusVisible`, `indeterminate`, `readonly`, `warnings`. 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 `BbCheckboxProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
712
- | `autofocus` | `Booleanish \| undefined` | | | Sets autofocus on page load. |
712
+ | `autofocus` | `Booleanish \| undefined` | | | Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field. |
713
713
  | `checked` | `boolean \| undefined` | `undefined` | | Defines the input as checked. |
714
714
  | `compact` | `boolean \| undefined` | `false` | | Compact density. Swaps `--bb-label-spacing-y` for `--bb-label-spacing-y-compact`, so tune a compact field's label gap with the `-compact` token, not the base one. The same meaning as on the checkbox, radio and switch groups. |
715
715
  | `description` | `string \| undefined` | | | Descriptive text displayed below the label and above the input. Unlike the hint it is always visible, and it is linked to the input via `aria-describedby` (after any `errors` / `warnings`, before the `hint`). |
@@ -983,7 +983,7 @@ for a preset that fits any row type (never `<any>`), not an imported
983
983
  | Prop | Type | Default | Required | Description |
984
984
  | --- | --- | --- | --- | --- |
985
985
  | `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: `description`, `hint`, `icon`, `item`, `itemDescription`, `label`, `legend`, `list`, `message`, `root`. States: `disabled`, `errors`, `hasValue`, `loading`, `readonly`, `warnings`, `checked`, `focused`, `focusVisible`. 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 `BbCheckboxGroupProps<Row>['pt']` (`BbCheckboxGroupProps['pt']` for a preset that fits any row type, never `<any>`) (`PtValue` is not exported): § Typing `pt` in `<script>`. |
986
- | `autofocus` | `Booleanish \| undefined` | | | Sets autofocus on page load. |
986
+ | `autofocus` | `Booleanish \| undefined` | | | Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field. |
987
987
  | `compact` | `boolean \| undefined` | `false` | | Compact density. Swaps `--bb-label-spacing-y` for `--bb-label-spacing-y-compact`, so tune a compact group's label gap with the `-compact` token, not the base one. |
988
988
  | `dependencies` | `unknown[] \| undefined` | | | Defines an array of dependencies that will trigger actions in the component upon change. |
989
989
  | `depsDebounceTime` | `number \| undefined` | | | Timeout used to debounce response to changes to dependencies. |
@@ -687,7 +687,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
687
687
  | `alpha` | `boolean \| undefined` | `false` | | Enable the alpha channel. Shows an opacity slider and uses `#RRGGBBAA` hex8 format. |
688
688
  | `append:icon` | `string \| undefined` | | | Name of the icon to be added at the end of the input. |
689
689
  | `autocomplete` | `string \| undefined` | `"off"` | | Guides the browser as to the type of information expected in the field. |
690
- | `autofocus` | `Booleanish \| undefined` | | | Sets autofocus on page load. |
690
+ | `autofocus` | `Booleanish \| undefined` | | | Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field. |
691
691
  | `clearable` | `boolean \| undefined` | `false` | | Displays a clear button when the input has a value and is being interacted with. |
692
692
  | `compact` | `boolean \| undefined` | `false` | | Compact density. Swaps `--bb-input-h`, `--bb-input-py` and `--bb-label-spacing-y` for their `-compact` twins on the field, so a `--bb-input-h` you set on the component is ignored while `compact` is on: size a compact field with `--bb-input-h-compact` (and `--bb-input-py-compact`) instead. |
693
693
  | `description` | `string \| undefined` | | | Descriptive text displayed below the label and above the input. Unlike the hint it is always visible, and it is linked to the input via `aria-describedby` (after any `errors` / `warnings`, before the `hint`). |
@@ -811,7 +811,7 @@ Set these on the element, or on a class you put on it, to retune this component
811
811
  - `CommonField` _(internal — not importable, reach it through `BbColorInput`)_ — `BbColorInput`'s pt parts land here: `root` → `div.bb-field`, `label` → `component`, `description` → `span.bb-field__description`, `hint` → `span.bb-field__hint`, `counter` → `span.bb-field__counter`, `message` → `div.bb-field__message`; documented CSS variables: `--ctrl-line`; also mounts `BbAsterisk`
812
812
  - `CommonFieldInput` _(internal — not importable, reach it through `BbColorInput`)_ — `BbColorInput`'s pt parts land here: `box` → `span.bb-field-input__box`, `prefix` → `span.bb-field-input__prefix`, `icon` → `BbIcon`, `clear` → `ClearableButton`, `spinner` → `BbSpinner`, `suffix` → `span.bb-field-input__suffix`; documented CSS variables: `--bg`, `--bg-hover`, `--bg-focus`, `--bg-disabled`, `--fg-disabled`, `--border-color`, `--border-focus`, `--ring-size`, `--ring-color`, `--elev`, `--frost`, `--inside-label-clearance`; also mounts `ErrorIcon`, `WarningIcon`, `ClearableButton`, `BbIcon`, `BbSpinner`
813
813
  - `BbColorPalette` _(public — [contract](./BbColorPalette.md))_ — its own pt parts (`BbColorPalette`): `swatch` → `button.bb-color-palette__swatch`, `panel` → `div`, `panel` → `CommonPopover`; hands `BbOffCanvas` the pt map `{ panel: 'root', sheet: 'root' }` (ours → theirs); documented CSS variables: `--edge`; also mounts `CommonPopover`
814
- - `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`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`
814
+ - `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`
815
815
  - `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`
816
816
 
817
817
  ## See Also
@@ -821,7 +821,7 @@ Set these on the element, or on a class you put on it, to retune this component
821
821
  - Listed nodes are the ones `BbColorPalette`'s API reaches or that declare a documented CSS variable; the rest fold into "also mounts". The complete tree, repeats and undocumented locals included, is `manifest/components/BbColorPalette.tree.json`.
822
822
 
823
823
  - `BbColorPalette` _(this component)_ — its own template binds: `swatch` → `button.bb-color-palette__swatch`, `panel` → `div`, `panel` → `CommonPopover`; hands `BbOffCanvas` the pt map `{ panel: 'root', sheet: 'root' }` (ours → theirs)
824
- - `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`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`
824
+ - `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`
825
825
  - `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`
826
826
  - Also mounts `CommonPopover`
827
827
 
@@ -821,7 +821,7 @@ States are listed in precedence order: when two are on at once and their entries
821
821
  - `BbConfirm` _(this component)_ — its own template binds: `text` → `div.bb-confirm__text`, `action` → `BbButton`; hands `BbDialog` the pt map `passthrough.forward(DIALOG_PARTS, BB_DIALOG_PT.states)` (ours → theirs)
822
822
  - `BbDialog` _(public — [contract](./BbDialog.md))_ — its own pt parts (`BbDialog`): `header` → `div.bb-dialog__header`, `title` → `span.bb-dialog__title`, `description` → `p.bb-dialog__description`, `close` → `CloseButton`, `content` → `div.bb-dialog__content`, `footer` → `div.bb-dialog__footer`; hands `BbOffCanvas` the pt map `{ root: 'root', header: 'header', title: 'title', description: 'description', content: 'content', footer: 'footer', close: 'close', sheet: 'root', }` (ours → theirs); documented CSS variables: `--px`, `--close-size`
823
823
  - `CloseButton` _(internal — not importable, reach it through `BbDialog`)_ — documented CSS variables: `--size`, `--p`
824
- - `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`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`; also mounts `CloseButton`
824
+ - `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`; also mounts `CloseButton`
825
825
  - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `BbIcon`, `text` → `span.bb-button__text`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--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 `BbIcon`, `BbSpinner`
826
826
  - `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
827
827
 
@@ -540,7 +540,7 @@ Set these on the element, or on a class you put on it, to retune this component
540
540
  - `BbCalendar` _(public — [contract](./BbCalendar.md))_ — its own pt parts (`BbCalendar`): `header` → `div.bb-calendar__header`, `arrow` → `BbBaseButton`, `month` → `BbBaseButton`, `year` → `BbBaseButton`, `day` → `div.bb-calendar__day`, `dayButton` → `button.bb-calendar__day-button`; documented CSS variables: `--cell`, `--unit-row`; also mounts `ScaleFade`, `Slide`, `CalendarMonthPanel`, `CalendarYearPanel`
541
541
  - `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
542
542
  - `CommonTimeSelector` _(internal — not importable, reach it through `BbCalendar`)_ — its own pt parts (`BbCalendar`): `header` → `div.bb-time-selector__header`, `cellColumnHeader` → `div.bb-time-selector__cell-column-header`, `item` → `BbBaseButton`; documented CSS variables: `--time-mark`; also mounts `BbBaseButton`
543
- - `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`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`
543
+ - `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`
544
544
  - `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`
545
545
  - Also mounts `CommonPopover`
546
546
 
@@ -883,7 +883,7 @@ label>')` matches nothing; query each segment by its own label instead. See
883
883
  | `ampm` | `boolean \| undefined` | `false` | | 12-hour display with an AM/PM segment (requires `type="datetime"`). Purely a field-composition concern: `modelValue` and the `time` model stay 24-hour regardless. Type `A`/`P` (or ArrowUp/Down) to set the meridiem. |
884
884
  | `append:icon` | `string \| undefined` | | | Name of the icon to be added at the end of the input. |
885
885
  | `autocomplete` | `string \| undefined` | `"off"` | | Guides the browser as to the type of information expected in the field. |
886
- | `autofocus` | `Booleanish \| undefined` | | | Sets autofocus on page load. |
886
+ | `autofocus` | `Booleanish \| undefined` | | | Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field. |
887
887
  | `clearable` | `boolean \| undefined` | `false` | | Displays a clear button when the input has a value and is being interacted with. |
888
888
  | `compact` | `boolean \| undefined` | `false` | | Compact density. Swaps `--bb-input-h`, `--bb-input-py` and `--bb-label-spacing-y` for their `-compact` twins on the field, so a `--bb-input-h` you set on the component is ignored while `compact` is on: size a compact field with `--bb-input-h-compact` (and `--bb-input-py-compact`) instead. |
889
889
  | `description` | `string \| undefined` | | | Descriptive text displayed below the label and above the input. Unlike the hint it is always visible, and it is linked to the input via `aria-describedby` (after any `errors` / `warnings`, before the `hint`). |
@@ -1033,7 +1033,7 @@ Set these on the element, or on a class you put on it, to retune this component
1033
1033
  - `BbCalendar` _(public — [contract](./BbCalendar.md))_ — its own pt parts (`BbCalendar`): `header` → `div.bb-calendar__header`, `arrow` → `BbBaseButton`, `month` → `BbBaseButton`, `year` → `BbBaseButton`, `day` → `div.bb-calendar__day`, `dayButton` → `button.bb-calendar__day-button`; documented CSS variables: `--cell`, `--unit-row`; also mounts `ScaleFade`, `Slide`, `CalendarMonthPanel`, `CalendarYearPanel`
1034
1034
  - `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
1035
1035
  - `CommonTimeSelector` _(internal — not importable, reach it through `BbCalendar`)_ — its own pt parts (`BbCalendar`): `header` → `div.bb-time-selector__header`, `cellColumnHeader` → `div.bb-time-selector__cell-column-header`, `item` → `BbBaseButton`; documented CSS variables: `--time-mark`; also mounts `BbBaseButton`
1036
- - `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`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`
1036
+ - `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`
1037
1037
  - `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`
1038
1038
  - `CommonField` _(internal — not importable, reach it through `BbDatePickerInput`)_ — `BbDatePickerInput`'s pt parts land here: `root` → `div.bb-field`, `label` → `component`, `description` → `span.bb-field__description`, `hint` → `span.bb-field__hint`, `counter` → `span.bb-field__counter`, `message` → `div.bb-field__message`; documented CSS variables: `--ctrl-line`; also mounts `BbAsterisk`
1039
1039
  - `CommonFieldInput` _(internal — not importable, reach it through `BbDatePickerInput`)_ — `BbDatePickerInput`'s pt parts land here: `box` → `span.bb-field-input__box`, `prefix` → `span.bb-field-input__prefix`, `icon` → `BbIcon`, `clear` → `ClearableButton`, `spinner` → `BbSpinner`, `suffix` → `span.bb-field-input__suffix`; documented CSS variables: `--bg`, `--bg-hover`, `--bg-focus`, `--bg-disabled`, `--fg-disabled`, `--border-color`, `--border-focus`, `--ring-size`, `--ring-color`, `--elev`, `--frost`, `--inside-label-clearance`; also mounts `ErrorIcon`, `WarningIcon`, `ClearableButton`, `BbIcon`, `BbSpinner`