bitboss-ui 3.0.0-beta.33 → 3.0.0-beta.35

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 (206) hide show
  1. package/README.md +21 -0
  2. package/bin/bitboss-ui.mjs +94 -6
  3. package/dist/ai/BbAccordion.md +19 -19
  4. package/dist/ai/BbBadge.md +12 -11
  5. package/dist/ai/BbBadgeButton.md +7 -6
  6. package/dist/ai/BbBreadcrumbs.md +2 -2
  7. package/dist/ai/BbButton.md +7 -6
  8. package/dist/ai/BbCalendar.md +5 -4
  9. package/dist/ai/BbCheckboxGroup.md +1 -1
  10. package/dist/ai/BbColorInput.md +1 -1
  11. package/dist/ai/BbConfirm.md +3 -2
  12. package/dist/ai/BbDatePicker.md +8 -8
  13. package/dist/ai/BbDatePickerInput.md +2 -2
  14. package/dist/ai/BbDialog.md +5 -4
  15. package/dist/ai/BbDropdown.md +97 -11
  16. package/dist/ai/BbDropdownButton.md +25 -11
  17. package/dist/ai/BbDropdownGroup.md +4 -3
  18. package/dist/ai/BbIndicator.md +6 -6
  19. package/dist/ai/BbNumberInput.md +1 -1
  20. package/dist/ai/BbOffCanvas.md +6 -6
  21. package/dist/ai/BbPagination.md +1 -1
  22. package/dist/ai/BbPopover.md +3 -3
  23. package/dist/ai/BbProgress.md +21 -16
  24. package/dist/ai/BbRadioGroup.md +1 -1
  25. package/dist/ai/BbRating.md +108 -26
  26. package/dist/ai/BbSelect.md +8 -4
  27. package/dist/ai/BbSelectPopover.md +14 -13
  28. package/dist/ai/BbSlider.md +44 -26
  29. package/dist/ai/BbSwitch.md +2 -2
  30. package/dist/ai/BbSwitchGroup.md +1 -1
  31. package/dist/ai/BbTable.md +6 -6
  32. package/dist/ai/BbTabs.md +2 -2
  33. package/dist/ai/BbTag.md +7 -6
  34. package/dist/ai/BbTextInput.md +1 -1
  35. package/dist/ai/BbTextarea.md +1 -1
  36. package/dist/ai/BbTimePicker.md +8 -0
  37. package/dist/ai/BbTimePickerInput.md +1 -1
  38. package/dist/ai/BbToast.md +1 -1
  39. package/dist/ai/ChipsBox.md +6 -5
  40. package/dist/ai/changelog.json +210 -4
  41. package/dist/ai/components.json +982 -319
  42. package/dist/ai/guides/design-language.md +11 -11
  43. package/dist/ai/guides/design-tokens.md +37 -23
  44. package/dist/ai/guides/icons-policy.md +1 -1
  45. package/dist/ai/guides/installation-and-plugin-setup.md +54 -17
  46. package/dist/ai/guides/migration/components/bb-accordion.md +8 -0
  47. package/dist/ai/guides/migration/components/bb-button.md +3 -3
  48. package/dist/ai/guides/migration/components/bb-dropdown-button.md +7 -1
  49. package/dist/ai/guides/migration/components/bb-popover.md +7 -0
  50. package/dist/ai/guides/migration/components/bb-table.md +6 -4
  51. package/dist/ai/guides/migration/v2-to-v3.md +101 -70
  52. package/dist/ai/guides/passthrough.md +16 -4
  53. package/dist/ai/recipes/inertia/inline-edit-workspace.md +6 -6
  54. package/dist/ai/recipes/inertia/onboarding.md +2 -2
  55. package/dist/ai/recipes/inertia/upload-center.md +2 -2
  56. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +6 -6
  57. package/dist/ai/recipes/nuxt/onboarding.md +2 -2
  58. package/dist/ai/recipes/nuxt/upload-center.md +1 -1
  59. package/dist/ai/recipes/vue/inline-edit-workspace.md +6 -6
  60. package/dist/ai/recipes/vue/onboarding.md +2 -2
  61. package/dist/ai/recipes/vue/upload-center.md +2 -2
  62. package/dist/ai/source/BbAccordion.md +3 -3
  63. package/dist/ai/source/BbBadge.md +33 -32
  64. package/dist/ai/source/BbBadgeButton.md +33 -32
  65. package/dist/ai/source/BbButton.md +10 -9
  66. package/dist/ai/source/BbCalendar.md +6 -6
  67. package/dist/ai/source/BbCheckboxGroup.md +6 -4
  68. package/dist/ai/source/BbColorInput.md +5 -1
  69. package/dist/ai/source/BbDatePicker.md +12 -12
  70. package/dist/ai/source/BbDatePickerInput.md +5 -1
  71. package/dist/ai/source/BbDialog.md +30 -23
  72. package/dist/ai/source/BbDropdown.md +28 -10
  73. package/dist/ai/source/BbDropdownButton.md +36 -9
  74. package/dist/ai/source/BbDropdownGroup.md +16 -3
  75. package/dist/ai/source/BbDropzone.md +6 -4
  76. package/dist/ai/source/BbIndicator.md +18 -18
  77. package/dist/ai/source/BbNumberInput.md +5 -1
  78. package/dist/ai/source/BbOffCanvas.md +8 -2
  79. package/dist/ai/source/BbPagination.md +2 -2
  80. package/dist/ai/source/BbPopover.md +4 -4
  81. package/dist/ai/source/BbProgress.md +22 -20
  82. package/dist/ai/source/BbRadioGroup.md +6 -4
  83. package/dist/ai/source/BbRating.md +43 -34
  84. package/dist/ai/source/BbSelect.md +16 -2
  85. package/dist/ai/source/BbSelectPopover.md +1 -1
  86. package/dist/ai/source/BbSlider.md +149 -95
  87. package/dist/ai/source/BbSwitchGroup.md +3 -3
  88. package/dist/ai/source/BbTable.md +18 -20
  89. package/dist/ai/source/BbTag.md +5 -1
  90. package/dist/ai/source/BbTextInput.md +5 -1
  91. package/dist/ai/source/BbTextarea.md +5 -1
  92. package/dist/ai/source/BbTimePickerInput.md +7 -1
  93. package/dist/ai/source/CommonField.md +17 -12
  94. package/dist/ai/source/CommonFieldInput.md +3 -1
  95. package/dist/ai/source/CommonTimeSelector.md +1 -1
  96. package/dist/assets/svgs/star.svg_raw.js +4 -0
  97. package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +3 -3
  98. package/dist/components/BbAccordion/types.d.ts +1 -1
  99. package/dist/components/BbCalendar/types.d.ts +1 -1
  100. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +6 -6
  101. package/dist/components/BbCheckboxGroup/types.d.ts +3 -1
  102. package/dist/components/BbColorInput/BbColorInput.vue.d.ts +14 -14
  103. package/dist/components/BbColorInput/types.d.ts +5 -1
  104. package/dist/components/BbDatePicker/types.d.ts +1 -1
  105. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +4 -4
  106. package/dist/components/BbDatePickerInput/types.d.ts +5 -1
  107. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +2 -2
  108. package/dist/components/BbDialog/types.d.ts +6 -1
  109. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +3 -3
  110. package/dist/components/BbDropdown/normalizeGroups.js +1 -0
  111. package/dist/components/BbDropdown/types.d.ts +15 -2
  112. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +5 -0
  113. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +34 -5
  114. package/dist/components/BbDropdownButton/types.d.ts +19 -7
  115. package/dist/components/BbDropdownButton/types.js +2 -0
  116. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +2 -2
  117. package/dist/components/BbIndicator/types.d.ts +1 -1
  118. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +6 -6
  119. package/dist/components/BbNumberInput/types.d.ts +5 -1
  120. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +1 -1
  121. package/dist/components/BbOffCanvas/types.d.ts +6 -1
  122. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +2 -2
  123. package/dist/components/BbPopover/types.d.ts +2 -2
  124. package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +1 -1
  125. package/dist/components/BbProgress/types.d.ts +3 -2
  126. package/dist/components/BbRadio/BbRadio.vue.d.ts +6 -6
  127. package/dist/components/BbRadioGroup/types.d.ts +3 -1
  128. package/dist/components/BbRating/BbRating.vue.d.ts +6 -6
  129. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +105 -109
  130. package/dist/components/BbRating/types.d.ts +10 -2
  131. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +20 -0
  132. package/dist/components/BbSelect/types.d.ts +12 -4
  133. package/dist/components/BbSelect/types.js +2 -0
  134. package/dist/components/BbSlider/BbSlider.vue.d.ts +4 -4
  135. package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +227 -191
  136. package/dist/components/BbSlider/types.d.ts +22 -6
  137. package/dist/components/BbSlider/types.js +5 -0
  138. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +6 -6
  139. package/dist/components/BbTag/BbTag.vue.d.ts +6 -6
  140. package/dist/components/BbTag/types.d.ts +5 -1
  141. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +6 -6
  142. package/dist/components/BbTextInput/types.d.ts +5 -1
  143. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +6 -6
  144. package/dist/components/BbTextarea/types.d.ts +5 -1
  145. package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +2 -2
  146. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +4 -4
  147. package/dist/components/BbTimePickerInput/types.d.ts +7 -1
  148. package/dist/deprecation/ai-deprecations.json.d.ts +115 -104
  149. package/dist/deprecation/ai-deprecations.json.js +1 -1
  150. package/dist/i18n/index.d.ts +10 -16
  151. package/dist/index.d.ts +0 -17
  152. package/dist/llms-full.txt +728 -384
  153. package/dist/llms-medium.txt +65 -28
  154. package/dist/nuxt-module.d.ts +0 -17
  155. package/dist/nuxt.js +1 -1
  156. package/dist/plugin.js +18 -17
  157. package/dist/project-dts.d.ts +48 -0
  158. package/dist/project-dts.js +99 -0
  159. package/dist/runtime/nuxt-plugin.js +24 -23
  160. package/dist/styles.css +3 -2
  161. package/dist/types/AlertVariant.d.ts +10 -1
  162. package/dist/types/BadgeVariant.d.ts +10 -1
  163. package/dist/types/ButtonVariant.d.ts +12 -1
  164. package/dist/types/ConfirmVariant.d.ts +8 -1
  165. package/dist/types/DropdownItemVariant.d.ts +8 -1
  166. package/dist/types/IndicatorVariant.d.ts +11 -1
  167. package/dist/types/InputVariant.d.ts +9 -1
  168. package/dist/types/PtScope.d.ts +8 -6
  169. package/dist/types/RegistryKey.d.ts +10 -0
  170. package/dist/types/TabsVariant.d.ts +9 -1
  171. package/dist/types/ToastVariant.d.ts +11 -1
  172. package/dist/types/TooltipVariant.d.ts +8 -1
  173. package/dist/types/ptComponentMap.d.ts +3 -3
  174. package/dist/utils/versionCheck.d.ts +19 -0
  175. package/dist/utils/versionCheck.js +18 -0
  176. package/dist/validated/BbCheckbox.vue.d.ts +2 -2
  177. package/dist/validated/BbColorInput.vue.d.ts +2 -2
  178. package/dist/validated/BbDropzone.vue.d.ts +2 -2
  179. package/dist/validated/BbNumberInput.vue.d.ts +2 -2
  180. package/dist/validated/BbSelect.vue.d.ts +18 -0
  181. package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +18 -0
  182. package/dist/validated/BbSlider.vue_vue_type_script_setup_true_lang.js +35 -0
  183. package/dist/validated/BbSwitch.vue.d.ts +2 -2
  184. package/dist/validated/BbTextInput.vue.d.ts +2 -2
  185. package/dist/validated/BbTextarea.vue.d.ts +2 -2
  186. package/dist/validated/index.d.ts +0 -17
  187. package/dist/vite-plugin.d.ts +63 -29
  188. package/dist/vite.js +332 -354
  189. package/package.json +5 -2
  190. package/scripts/lib/check-fix.mjs +129 -0
  191. package/scripts/lib/eslint-disable.mjs +119 -0
  192. package/scripts/lib/eslint-plugin.d.ts +3 -1
  193. package/scripts/lib/eslint-plugin.mjs +159 -0
  194. package/scripts/lib/html-attributes.mjs +1 -1
  195. package/dist/alert-variants.d.ts +0 -19
  196. package/dist/badge-variants.d.ts +0 -19
  197. package/dist/button-variants.d.ts +0 -21
  198. package/dist/confirm-variants.d.ts +0 -17
  199. package/dist/dropdown-item-variants.d.ts +0 -17
  200. package/dist/indicator-variants.d.ts +0 -20
  201. package/dist/input-variants.d.ts +0 -18
  202. package/dist/locale-registry.d.ts +0 -37
  203. package/dist/pt-scope-registry.d.ts +0 -15
  204. package/dist/tabs-variants.d.ts +0 -18
  205. package/dist/toast-variants.d.ts +0 -20
  206. package/dist/tooltip-variants.d.ts +0 -17
package/README.md CHANGED
@@ -440,6 +440,27 @@ entry is the state itself and is never reported:
440
440
  />
441
441
  ```
442
442
 
443
+ #### Rating star colours: `no-star-color`
444
+
445
+ `bitboss-ui/no-star-color` flags any colour utility in `BbRating`'s `pt:item`,
446
+ in the base entry or any state: `text-*`, `fill-*` and `stroke-*`, whether a
447
+ shade (`text-amber-500`), a keyword (`fill-current`), a variable
448
+ (`text-(--bb-text-faint)`) or an arbitrary colour (`text-[#f59e0b]`). Sizes and
449
+ widths (`text-sm`, `stroke-2`) are never reported. The rating paints each
450
+ star's colour per state (filled, the hover preview, the error tint), and a
451
+ colour utility beats those rules, so it looks right at rest and freezes the
452
+ stars. The fix lives on another attribute, so the rule explains it rather
453
+ than rewriting:
454
+
455
+ ```vue
456
+ <!-- errors: no hover preview, no error tint -->
457
+ <BbRating pt:item="text-(--bb-text-faint)" pt:item:selected="text-amber-500" />
458
+ <!-- same look, the preview and the states keep working -->
459
+ <BbRating
460
+ pt:root="[--empty:var(--bb-text-faint)] [--accent:var(--color-amber-500)]"
461
+ />
462
+ ```
463
+
443
464
  #### The one rule that reads CSS: `no-unknown-token`
444
465
 
445
466
  `bitboss-ui/no-unknown-token` flags a bare `var(--bb-…)` naming a token the
@@ -46,9 +46,13 @@
46
46
  */
47
47
 
48
48
  import { spawnSync } from 'node:child_process';
49
+ // `globSync` is read off the namespace, not imported by name: it only exists
50
+ // from Node 22, and a named import of a missing builtin export is a
51
+ // SyntaxError at load time, which killed every command on Node 20 (Sail
52
+ // images still ship it). Only quoted glob arguments need it (Q46.4).
53
+ import * as fs from 'node:fs';
49
54
  import {
50
55
  existsSync,
51
- globSync,
52
56
  mkdirSync,
53
57
  readdirSync,
54
58
  readFileSync,
@@ -59,6 +63,11 @@ import {
59
63
  findHandRollHints,
60
64
  loadKnownTokens,
61
65
  } from '../scripts/lib/hand-roll-hints.mjs';
66
+ import {
67
+ disabledChecker,
68
+ ruleForFinding,
69
+ } from '../scripts/lib/eslint-disable.mjs';
70
+ import { applyBitbossFixes } from '../scripts/lib/check-fix.mjs';
62
71
  import { dirname, isAbsolute, join, relative, resolve } from 'node:path';
63
72
  import { fileURLToPath } from 'node:url';
64
73
  import { parseArgs } from 'node:util';
@@ -437,7 +446,13 @@ function resolveCheckFiles(cwd, patterns) {
437
446
  continue;
438
447
  }
439
448
  }
440
- const dirents = globSync(pattern, {
449
+ if (typeof fs.globSync !== 'function') {
450
+ console.error(
451
+ `[bitboss-ui] quoted glob patterns need Node >= 22 (this is ${process.version}): "${pattern}". Pass the directory, or leave the pattern unquoted so the shell expands it.`
452
+ );
453
+ process.exit(1);
454
+ }
455
+ const dirents = fs.globSync(pattern, {
441
456
  cwd,
442
457
  withFileTypes: true,
443
458
  // Pruning is a traversal shortcut; the inSkippedDir filter below is
@@ -710,9 +725,15 @@ function manifestVersionOf(manifestPath) {
710
725
  }
711
726
  }
712
727
 
713
- function checkCommand(
728
+ async function checkCommand(
714
729
  globs,
715
- { json: jsonMode, allowEmpty, allowComponents, manifest: manifestOverride }
730
+ {
731
+ json: jsonMode,
732
+ allowEmpty,
733
+ allowComponents,
734
+ manifest: manifestOverride,
735
+ fix,
736
+ }
716
737
  ) {
717
738
  const projectRoot = process.cwd();
718
739
 
@@ -770,9 +791,40 @@ function checkCommand(
770
791
  ...configuredAllowComponents(projectRoot),
771
792
  ...allowComponents,
772
793
  ];
794
+
795
+ // Q46.8: `--fix` applies the ESLint plugin's fixes (the registered v2→v3
796
+ // migrations) with ONLY the bitboss rules, then the check below reports
797
+ // what is left, so one command migrates and verifies.
798
+ if (fix) {
799
+ const outcome = await applyBitbossFixes({
800
+ projectRoot,
801
+ files,
802
+ manifestPath: manifestOverride ? manifestPath : undefined,
803
+ allowComponents: allowedComponents,
804
+ });
805
+ if ('error' in outcome) {
806
+ console.error(`[bitboss-ui] ${outcome.error}`);
807
+ process.exit(1);
808
+ }
809
+ const log = jsonMode ? console.error : console.log;
810
+ log(
811
+ outcome.fixed.length
812
+ ? `[bitboss-ui] check --fix: fixed ${outcome.fixed.length} file(s):\n${outcome.fixed
813
+ .map((file) => ` ${relative(projectRoot, file)}`)
814
+ .join('\n')}`
815
+ : '[bitboss-ui] check --fix: nothing to fix.'
816
+ );
817
+ if (outcome.skipped?.length)
818
+ log(
819
+ `[bitboss-ui] check --fix: ESLint ignored ${outcome.skipped.length} file(s), not fixed:\n${outcome.skipped
820
+ .map((file) => ` ${relative(projectRoot, file)}`)
821
+ .join('\n')}`
822
+ );
823
+ }
773
824
  const validateOptions = { allowComponents: allowedComponents };
774
825
 
775
826
  const findings = [];
827
+ let suppressed = 0;
776
828
  /*
777
829
  * Advisory only — see scripts/lib/hand-roll-hints.mjs. Hints never touch the
778
830
  * exit code, so a guess can never fail a consumer's build. `--no-hints`
@@ -786,7 +838,18 @@ function checkCommand(
786
838
  const { findings: fileFindings } = file.endsWith('.md')
787
839
  ? validateMarkdown(content, manifest, validateOptions)
788
840
  : validateVueSnippet(content, manifest, validateOptions);
841
+ // Q46.9: a finding the author silenced for ESLint (`eslint-disable*`,
842
+ // usually with a reason) is silenced here too, or `check` cannot gate
843
+ // CI next to a lint step that passes. `.md` lines are fence-relative,
844
+ // and docs carry no directives, so only `.vue` files are filtered.
845
+ const isDisabled = file.endsWith('.vue')
846
+ ? disabledChecker(content)
847
+ : () => false;
789
848
  for (const finding of fileFindings) {
849
+ if (isDisabled(finding.line, ruleForFinding(finding))) {
850
+ suppressed++;
851
+ continue;
852
+ }
790
853
  findings.push({ file: relPath, ...finding });
791
854
  }
792
855
  // .md files are documentation ABOUT components; a round <img> in a doc
@@ -798,6 +861,14 @@ function checkCommand(
798
861
  }
799
862
  }
800
863
 
864
+ /** One line, so a silenced finding is never invisible. */
865
+ const printSuppressed = () => {
866
+ if (suppressed === 0) return;
867
+ console.log(
868
+ `[bitboss-ui] ${suppressed} finding(s) silenced by eslint-disable comments.`
869
+ );
870
+ };
871
+
801
872
  /** Advisory block, printed on success and on failure alike. Never fatal. */
802
873
  const printHints = () => {
803
874
  if (hints.length === 0) return;
@@ -837,6 +908,7 @@ function checkCommand(
837
908
  {
838
909
  findings,
839
910
  hints,
911
+ suppressed,
840
912
  files: files.length,
841
913
  manifestVersion: judgedAgainst,
842
914
  installedVersion: packageVersion(),
@@ -874,10 +946,12 @@ function checkCommand(
874
946
  console.log(
875
947
  `[bitboss-ui] check OK — ${summarizeFileCounts(files)} file(s), zero unknown Bb* props/v-models/slots/nav-attrs.`
876
948
  );
949
+ printSuppressed();
877
950
  printHints();
878
951
  return;
879
952
  }
880
953
 
954
+ printSuppressed();
881
955
  const fileCount = new Set(findings.map((f) => f.file)).size;
882
956
  console.error(
883
957
  `[bitboss-ui] check FAILED — ${findings.length} finding(s) across ${fileCount} file(s):`
@@ -932,7 +1006,7 @@ Commands:
932
1006
  \`--no-mcp\` skips the server and the install. Idempotent —
933
1007
  safe to re-run after upgrades.
934
1008
  check [glob…] [--json] [--allow-empty] [--allow-component <Name>]
935
- [--no-hints] [--manifest <path>]
1009
+ [--no-hints] [--manifest <path>] [--fix]
936
1010
  Validate \`Bb*\` markup in .vue/.md files against the
937
1011
  installed components.json manifest (unknown/removed props,
938
1012
  bad v-models, unknown \`<template #slot>\` names,
@@ -945,6 +1019,18 @@ Commands:
945
1019
  nothing (a typo'd CI path validates zero files silently) —
946
1020
  pass \`--allow-empty\` when an empty match is expected.
947
1021
 
1022
+ \`--fix\` first applies the ESLint plugin's fixes (the
1023
+ registered v2→v3 renames, polarity flips and value
1024
+ remaps) to the matched .vue files with ONLY the
1025
+ bitboss-ui rules — your own ESLint config is not used —
1026
+ then reports what is left. Needs \`eslint\` and
1027
+ \`vue-eslint-parser\` in the project.
1028
+
1029
+ Honours ESLint disable comments in .vue files: a finding
1030
+ silenced for the matching \`bitboss-ui/*\` rule (or by a
1031
+ bare \`eslint-disable\`) is not reported, only counted:
1032
+ <!-- eslint-disable-next-line bitboss-ui/require-table-slot-prop -- why -->
1033
+
948
1034
  \`--manifest <path>\` judges against another version's
949
1035
  components.json instead of the installed one — the answer
950
1036
  to "which of my files break if I upgrade", BEFORE you
@@ -1034,6 +1120,7 @@ switch (command) {
1034
1120
  json: { type: 'boolean' },
1035
1121
  'allow-empty': { type: 'boolean' },
1036
1122
  'allow-component': { type: 'string', multiple: true },
1123
+ fix: { type: 'boolean' },
1037
1124
  manifest: { type: 'string' },
1038
1125
  // Accepted and ignored here — read straight off argv inside
1039
1126
  // checkCommand, but parseArgs is strict, so it must be declared.
@@ -1041,7 +1128,8 @@ switch (command) {
1041
1128
  },
1042
1129
  { allowPositionals: true }
1043
1130
  );
1044
- checkCommand(positionals, {
1131
+ await checkCommand(positionals, {
1132
+ fix: values.fix ?? false,
1045
1133
  json: values.json ?? false,
1046
1134
  allowEmpty: values['allow-empty'] ?? false,
1047
1135
  allowComponents: values['allow-component'] ?? [],
@@ -63,14 +63,14 @@ through `pt:panel` or `.bb-accordion__panel` — collapses with the body.
63
63
  v-model="faq.open"
64
64
  :class="index ? 'border-t border-(--bb-border)' : ''"
65
65
  >
66
- <template #header="{ value }">
66
+ <template #header="{ open }">
67
67
  <div
68
68
  class="flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-sm font-medium"
69
69
  >
70
70
  <span>{{ faq.question }}</span>
71
71
  <span
72
72
  class="shrink-0 text-(--bb-text-muted) transition-transform duration-200"
73
- :class="value ? 'rotate-180' : ''"
73
+ :class="open ? 'rotate-180' : ''"
74
74
  >
75
75
  <BbIcon icon="lucide:chevron-down" size="sm" />
76
76
  </span>
@@ -137,7 +137,7 @@ on the row, badge included, toggles the panel.
137
137
  v-model="endpoint.open"
138
138
  :class="index ? 'border-t border-(--bb-border)' : ''"
139
139
  >
140
- <template #header="{ value }">
140
+ <template #header="{ open }">
141
141
  <div class="flex w-full items-center gap-2 px-3 py-2 text-left">
142
142
  <BbBadge size="xs" :variant="METHOD_VARIANT[endpoint.method]">{{
143
143
  endpoint.method
@@ -145,7 +145,7 @@ on the row, badge included, toggles the panel.
145
145
  <code class="truncate font-mono text-xs">{{ endpoint.path }}</code>
146
146
  <span
147
147
  class="ml-auto shrink-0 text-(--bb-text-muted) transition-transform duration-200"
148
- :class="value ? 'rotate-180' : ''"
148
+ :class="open ? 'rotate-180' : ''"
149
149
  >
150
150
  <BbIcon icon="lucide:chevron-down" size="sm" />
151
151
  </span>
@@ -247,9 +247,9 @@ const endpoints = ref<Endpoint[]>([
247
247
  .bb-badge.bb-badge--soft-red {
248
248
  --bg: color-mix(in oklab, var(--accent) 15%, var(--bb-panel));
249
249
  --fg: color-mix(in oklab, var(--accent) 80%, var(--bb-text));
250
- --border-width: 1px;
250
+ --bw: 1px;
251
251
  --border-color: color-mix(in oklab, var(--accent) 25%, var(--bb-panel));
252
- --ring: color-mix(in oklab, var(--accent) 45%, transparent);
252
+ --ring-color: color-mix(in oklab, var(--accent) 45%, transparent);
253
253
  }
254
254
  </style>
255
255
  ```
@@ -257,9 +257,9 @@ const endpoints = ref<Endpoint[]>([
257
257
  ### Slot scope: the open flag and the toggle handle
258
258
 
259
259
  Both slots — `header` and the default (body) slot — receive the same scope,
260
- `{ value, toggle }`:
260
+ `{ open, toggle }`:
261
261
 
262
- - `value` mirrors the open state (one-way — assigning to it does nothing). Use
262
+ - `open` mirrors the open state (one-way — assigning to it does nothing). Use
263
263
  it to spin a chevron or swap header copy.
264
264
  - `toggle()` flips the panel. In the header it is redundant (the button already
265
265
  toggles); its real use is in the **body**, for a "Show less" affordance that
@@ -274,14 +274,14 @@ Both slots — `header` and the default (body) slot — receive the same scope,
274
274
  class="max-w-md overflow-hidden rounded-(--bb-radius) border border-(--bb-border)"
275
275
  >
276
276
  <BbAccordion v-model="notes">
277
- <template #header="{ value }">
277
+ <template #header="{ open }">
278
278
  <div
279
279
  class="flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-sm font-medium"
280
280
  >
281
281
  <span>Release notes</span>
282
282
  <span
283
283
  class="shrink-0 text-(--bb-text-muted) transition-transform duration-200"
284
- :class="value ? 'rotate-180' : ''"
284
+ :class="open ? 'rotate-180' : ''"
285
285
  >
286
286
  <BbIcon icon="lucide:chevron-down" size="sm" />
287
287
  </span>
@@ -334,7 +334,7 @@ to `null`). Prefer a stable key over an index when the list can reorder.
334
334
  :model-value="openIndex === index"
335
335
  @update:model-value="openIndex = $event ? index : null"
336
336
  >
337
- <template #header="{ value }">
337
+ <template #header="{ open }">
338
338
  <div
339
339
  class="flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-sm"
340
340
  >
@@ -343,7 +343,7 @@ to `null`). Prefer a stable key over an index when the list can reorder.
343
343
  {{ plan.price }}
344
344
  <span
345
345
  class="shrink-0 transition-transform duration-200"
346
- :class="value ? 'rotate-180' : ''"
346
+ :class="open ? 'rotate-180' : ''"
347
347
  >
348
348
  <BbIcon icon="lucide:chevron-down" size="sm" />
349
349
  </span>
@@ -403,14 +403,14 @@ padding on the nested body content.
403
403
  class="max-w-md overflow-hidden rounded-(--bb-radius) border border-(--bb-border)"
404
404
  >
405
405
  <BbAccordion v-model="notifications">
406
- <template #header="{ value }">
406
+ <template #header="{ open }">
407
407
  <div
408
408
  class="flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-sm font-medium"
409
409
  >
410
410
  <span>Notifications</span>
411
411
  <span
412
412
  class="shrink-0 text-(--bb-text-muted) transition-transform duration-200"
413
- :class="value ? 'rotate-180' : ''"
413
+ :class="open ? 'rotate-180' : ''"
414
414
  >
415
415
  <BbIcon icon="lucide:chevron-down" size="sm" />
416
416
  </span>
@@ -420,14 +420,14 @@ padding on the nested body content.
420
420
  <BbCheckbox v-model="mentions" label="Mentions" />
421
421
  <BbCheckbox v-model="digests" label="Weekly digest" />
422
422
  <BbAccordion v-model="advanced">
423
- <template #header="{ value }">
423
+ <template #header="{ open }">
424
424
  <div
425
425
  class="flex w-full items-center justify-between gap-2 py-1 text-left text-sm text-(--bb-text-muted)"
426
426
  >
427
427
  <span>Advanced</span>
428
428
  <span
429
429
  class="shrink-0 transition-transform duration-200"
430
- :class="value ? 'rotate-180' : ''"
430
+ :class="open ? 'rotate-180' : ''"
431
431
  >
432
432
  <BbIcon icon="lucide:chevron-down" size="sm" />
433
433
  </span>
@@ -519,11 +519,11 @@ collapses with the body.
519
519
  pt:panel="text-sm"
520
520
  :pt:root="index ? 'border-t border-(--bb-border)' : ''"
521
521
  >
522
- <template #header="{ value }">
522
+ <template #header="{ open }">
523
523
  <span>{{ faq.question }}</span>
524
524
  <span
525
525
  class="shrink-0 text-(--bb-text-muted) transition-transform duration-200"
526
- :class="value ? 'rotate-180' : ''"
526
+ :class="open ? 'rotate-180' : ''"
527
527
  >
528
528
  <BbIcon icon="lucide:chevron-down" size="sm" />
529
529
  </span>
@@ -575,7 +575,7 @@ grammar, the merge rules and the global map are in the
575
575
 
576
576
  ### Works well with
577
577
 
578
- - `BbIcon` — a rotating chevron in the header, driven by the slot's `value` (see
578
+ - `BbIcon` — a rotating chevron in the header, driven by the slot's `open` (see
579
579
  the FAQ example).
580
580
  - `BbBadge` — counts or soft method/status pills in the header (see the API
581
581
  reference example); non-interactive content stays click-transparent.
@@ -183,9 +183,9 @@ const invoices: InvoiceRow[] = [
183
183
  .bb-badge.bb-badge--soft-red {
184
184
  --bg: color-mix(in oklab, var(--accent) 15%, var(--bb-panel));
185
185
  --fg: color-mix(in oklab, var(--accent) 80%, var(--bb-text));
186
- --border-width: 1px;
186
+ --bw: 1px;
187
187
  --border-color: color-mix(in oklab, var(--accent) 25%, var(--bb-panel));
188
- --ring: color-mix(in oklab, var(--accent) 45%, transparent);
188
+ --ring-color: color-mix(in oklab, var(--accent) 45%, transparent);
189
189
  }
190
190
  </style>
191
191
  ```
@@ -779,10 +779,10 @@ const endpoints: Endpoint[] = [
779
779
  .bb-badge.bb-badge--soft-green,
780
780
  .bb-badge.bb-badge--soft-red {
781
781
  --bg: color-mix(in oklab, var(--accent) 15%, var(--bb-panel));
782
- --color: color-mix(in oklab, var(--accent) 80%, var(--bb-text));
783
- --border-width: 1px;
782
+ --fg: color-mix(in oklab, var(--accent) 80%, var(--bb-text));
783
+ --bw: 1px;
784
784
  --border-color: color-mix(in oklab, var(--accent) 25%, var(--bb-panel));
785
- --ring: color-mix(in oklab, var(--accent) 45%, transparent);
785
+ --ring-color: color-mix(in oklab, var(--accent) 45%, transparent);
786
786
  }
787
787
  </style>
788
788
  ```
@@ -888,20 +888,21 @@ Set these on the element, or on a class you put on it, to retune this component
888
888
  | --- | --- | --- | --- |
889
889
  | `--bg` | `.bb-badge` | `var(--bb-primary)` | pill fill |
890
890
  | `--fg` | `.bb-badge` | `var(--bb-primary-fg)` | label, icons and the clear glyph |
891
- | `--border-width` | `.bb-badge` | `0px` | Pill border. The `border` shorthand is always present, so the width is what turns it on — the filled variants leave it at 0 and the bordered ones (secondary/destructive/outline) step up to `--bb-border-w-sm`. Nothing compensates for it: the… |
891
+ | `--bw` | `.bb-badge` | `0px` | Pill border. The `border` shorthand is always present, so the width is what turns it on — the filled variants leave it at 0 and the bordered ones (secondary/destructive/outline) step up to `--bb-border-w-sm`. Nothing compensates for it: the… |
892
892
  | `--border-color` | `.bb-badge` | `transparent` | |
893
- | `--ring` | `.bb-badge` | `var(--bb-primary-ring)` | focus ring, per variant |
893
+ | `--ring-color` | `.bb-badge` | `var(--bb-primary-ring)` | focus ring colour, per variant |
894
+ | `--ring-size` | `.bb-badge` | `var(--bb-ring-size)` | focus ring width |
894
895
  | `--min-size-md` | `.bb-badge` | `calc(var(--bb-control-h) - 16px)` | 16px at the default |
895
896
  | `--min-size` | `.bb-badge` | `var(--min-size-md)` | pill min height and min width |
896
897
  | `--elev` | `.bb-badge` | `var(--bb-elev-sm)` | Resting lift. Invisible while `--bb-elev` is its default transparent layer. A chip is small enough that a theme wanting a different lift here than on a button sets `--elev` on this class. |
897
898
  | `--r` | `.bb-badge` | `calc(var(--bb-radius) * 0.5)` | Pill corners; the body and trailing wrappers round their outer edges to match |
898
- | `--font-size` | `.bb-badge` | `calc(var(--bb-fs) - 4px)` | Label. Sizes are offsets from the density masters (--bb-fs, --bb-control-h), like BbButton's, so a denser theme scales the pill. |
899
+ | `--fs` | `.bb-badge` | `calc(var(--bb-fs) - 4px)` | Label. Sizes are offsets from the density masters (--bb-fs, --bb-control-h), like BbButton's, so a denser theme scales the pill. |
899
900
  | `--icon-size` | `.bb-badge` | `12px` | leading/append icons (passed to BbIcon as --size) |
900
901
  | `--gap` | `.bb-badge` | `3px` | space between label, icons and the trailing side |
901
- | `--padding-inline` | `.bb-badge` | `6px` | base side padding; the modifiers below scale it per side |
902
+ | `--px` | `.bb-badge` | `6px` | base side padding; the modifiers below scale it per side |
902
903
  | `--clear-size` | `.bb-badge` | `12px` | clear button's glyph box (the circle painted on hover is 2px smaller) |
903
- | `--pad-left` | `.bb-badge` | `var(--padding-inline)` | Side-owned padding: the body and trailing wrappers carry the pill's inline padding (and its radius) so their hit areas run flush to the border. The modifiers below retune these vars instead of the pill's own padding. |
904
- | `--pad-right` | `.bb-badge` | `var(--padding-inline)` | |
904
+ | `--pad-left` | `.bb-badge` | `var(--px)` | Side-owned padding: the body and trailing wrappers carry the pill's inline padding (and its radius) so their hit areas run flush to the border. The modifiers below retune these vars instead of the pill's own padding. |
905
+ | `--pad-right` | `.bb-badge` | `var(--px)` | |
905
906
  | `--size` | `.bb-badge__icon` | `var(--icon-size)` | |
906
907
 
907
908
  ## Component tree
@@ -84,20 +84,21 @@ Set these on the element, or on a class you put on it, to retune this component
84
84
  | --- | --- | --- | --- |
85
85
  | `--bg` | `.bb-badge` | `var(--bb-primary)` | pill fill |
86
86
  | `--fg` | `.bb-badge` | `var(--bb-primary-fg)` | label, icons and the clear glyph |
87
- | `--border-width` | `.bb-badge` | `0px` | Pill border. The `border` shorthand is always present, so the width is what turns it on — the filled variants leave it at 0 and the bordered ones (secondary/destructive/outline) step up to `--bb-border-w-sm`. Nothing compensates for it: the… |
87
+ | `--bw` | `.bb-badge` | `0px` | Pill border. The `border` shorthand is always present, so the width is what turns it on — the filled variants leave it at 0 and the bordered ones (secondary/destructive/outline) step up to `--bb-border-w-sm`. Nothing compensates for it: the… |
88
88
  | `--border-color` | `.bb-badge` | `transparent` | |
89
- | `--ring` | `.bb-badge` | `var(--bb-primary-ring)` | focus ring, per variant |
89
+ | `--ring-color` | `.bb-badge` | `var(--bb-primary-ring)` | focus ring colour, per variant |
90
+ | `--ring-size` | `.bb-badge` | `var(--bb-ring-size)` | focus ring width |
90
91
  | `--min-size-md` | `.bb-badge` | `calc(var(--bb-control-h) - 16px)` | 16px at the default |
91
92
  | `--min-size` | `.bb-badge` | `var(--min-size-md)` | pill min height and min width |
92
93
  | `--elev` | `.bb-badge` | `var(--bb-elev-sm)` | Resting lift. Invisible while `--bb-elev` is its default transparent layer. A chip is small enough that a theme wanting a different lift here than on a button sets `--elev` on this class. |
93
94
  | `--r` | `.bb-badge` | `calc(var(--bb-radius) * 0.5)` | Pill corners; the body and trailing wrappers round their outer edges to match |
94
- | `--font-size` | `.bb-badge` | `calc(var(--bb-fs) - 4px)` | Label. Sizes are offsets from the density masters (--bb-fs, --bb-control-h), like BbButton's, so a denser theme scales the pill. |
95
+ | `--fs` | `.bb-badge` | `calc(var(--bb-fs) - 4px)` | Label. Sizes are offsets from the density masters (--bb-fs, --bb-control-h), like BbButton's, so a denser theme scales the pill. |
95
96
  | `--icon-size` | `.bb-badge` | `12px` | leading/append icons (passed to BbIcon as --size) |
96
97
  | `--gap` | `.bb-badge` | `3px` | space between label, icons and the trailing side |
97
- | `--padding-inline` | `.bb-badge` | `6px` | base side padding; the modifiers below scale it per side |
98
+ | `--px` | `.bb-badge` | `6px` | base side padding; the modifiers below scale it per side |
98
99
  | `--clear-size` | `.bb-badge` | `12px` | clear button's glyph box (the circle painted on hover is 2px smaller) |
99
- | `--pad-left` | `.bb-badge` | `var(--padding-inline)` | Side-owned padding: the body and trailing wrappers carry the pill's inline padding (and its radius) so their hit areas run flush to the border. The modifiers below retune these vars instead of the pill's own padding. |
100
- | `--pad-right` | `.bb-badge` | `var(--padding-inline)` | |
100
+ | `--pad-left` | `.bb-badge` | `var(--px)` | Side-owned padding: the body and trailing wrappers carry the pill's inline padding (and its radius) so their hit areas run flush to the border. The modifiers below retune these vars instead of the pill's own padding. |
101
+ | `--pad-right` | `.bb-badge` | `var(--px)` | |
101
102
  | `--size` | `.bb-badge__icon` | `var(--icon-size)` | |
102
103
 
103
104
  ## Component tree
@@ -724,11 +724,11 @@ States are listed in precedence order: when two are on at once and their entries
724
724
  - `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
725
725
  - `BbDropdown` _(public — [contract](./BbDropdown.md))_ — its own pt parts (`BbDropdown`): `panel` → `CommonPopover`, `root` → `CommonPopover`, `header` → `div.bb-dropdown__header`, `list` → `span.bb-dropdown__items-container`, `footer` → `div.bb-dropdown__footer`; documented CSS variables: `--menu-inset`; also mounts `CommonPopover`, `DropdownPipelineResolver`
726
726
  - `BbDropdownList` _(internal — not importable, reach it through `BbDropdown`)_ — also mounts `BbBaseButton`, `BbIcon`, `CommonPopover`, `BbDropdownList`
727
- - `BbBadge` _(public — [contract](./BbBadge.md))_ — its own pt parts (`BbBadge`): `spinner` → `BbSpinner`, `icon` → `BbIcon`, `clear` → `button.bb-badge__clear-button`; documented CSS variables: `--bg`, `--fg`, `--border-width`, `--ring`, `--min-size-md`, `--min-size`, `--elev`, `--r`, `--font-size`, `--icon-size`, `--gap`, `--padding-inline`, `--clear-size`, `--pad-left`; also mounts `BbIcon`, `BbSpinner`, `BadgeBodyContent`
727
+ - `BbBadge` _(public — [contract](./BbBadge.md))_ — its own pt parts (`BbBadge`): `spinner` → `BbSpinner`, `icon` → `BbIcon`, `clear` → `button.bb-badge__clear-button`; documented CSS variables: `--bg`, `--fg`, `--bw`, `--ring-color`, `--ring-size`, `--min-size-md`, `--min-size`, `--elev`, `--r`, `--fs`, `--icon-size`, `--gap`, `--px`, `--clear-size`, `--pad-left`; also mounts `BbIcon`, `BbSpinner`, `BadgeBodyContent`
728
728
  - `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`
729
729
  - `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__body`, `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`
730
730
  - `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`
731
- - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `BbIcon`, `text` → `span.bb-button__content`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring`, `--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`
731
+ - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `BbIcon`, `text` → `span.bb-button__content`; 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`
732
732
  - Also mounts `BbIcon`
733
733
 
734
734
  ## See Also
@@ -109,7 +109,7 @@ restate a state:
109
109
  --bg-hover: color-mix(in oklab, var(--bb-primary) 90%, black);
110
110
  --bg-pressed: color-mix(in oklab, var(--bb-primary) 80%, black);
111
111
  --fg: var(--bb-primary-fg);
112
- --ring: var(--bb-ring);
112
+ --ring-color: var(--bb-ring);
113
113
  }
114
114
  ```
115
115
 
@@ -156,10 +156,10 @@ design and never reads the disabled trio — see _Loading and async actions_.)
156
156
  Never use a variant name that is neither built-in nor registered in the
157
157
  project's `vite.config.*` / `nuxt.config.*`. Unsure what's currently legal in
158
158
  a given project (built-ins plus whatever it has registered)? Don't guess from
159
- an example — the plugin regenerates
160
- `node_modules/bitboss-ui/button-variants.d.ts` on every build; that file
161
- **is** the closed, machine-readable list of every legal `variant` value for
162
- that project, registrations included (see
159
+ an example: the built-ins are `primary`, `outline`, `secondary`, `ghost`,
160
+ `destructive` and `link`, and the project's own names are the
161
+ `ButtonVariantRegistry` entries in its committed `bitboss-ui.d.ts` (the file
162
+ the plugin writes from `buttonVariants`; see
163
163
  [Installation and Plugin Setup](./guides/installation-and-plugin-setup.md) §
164
164
  variants).
165
165
 
@@ -1183,7 +1183,8 @@ Set these on the element, or on a class you put on it, to retune this component
1183
1183
  | `--bg-pressed` | `var(--bg)` | fill while [aria-pressed='true'] |
1184
1184
  | `--fg` | `initial` | label and icons (icons paint currentColor) |
1185
1185
  | `--border-color` | `transparent` | the frame; its width is --bw |
1186
- | `--ring` | `transparent` | focus ring, drawn --bb-ring-size outside the border |
1186
+ | `--ring-color` | `transparent` | focus ring colour, per variant |
1187
+ | `--ring-size` | `var(--bb-ring-size)` | focus ring width, outside the border |
1187
1188
  | `--bw` | `var(--bb-border-w)` | border width |
1188
1189
  | `--fg-hover` | `var(--fg)` | label and icons on hover (and focus-visible) |
1189
1190
  | `--border-hover` | `var(--border-color)` | the frame on hover (and focus-visible) |
@@ -468,7 +468,7 @@ box carries no role of its own and only the grid inside is announced.
468
468
  `pt` reaches a named part with a class list — or, in the object form, a style
469
469
  and attributes — optionally only while a state is on. Parts: `root` (the
470
470
  calendar's box, where a consumer `class` lands too; it carries the sizing
471
- tokens, so `pt:root="[--pad-x:2px]"` tightens the padding and the grid width
471
+ tokens, so `pt:root="[--px:2px]"` tightens the padding and the grid width
472
472
  follows), `header` (the navigation bar), `arrow` (the previous / next
473
473
  buttons), `month` and `year` (the heading buttons), `columnHeader` (each
474
474
  weekday letter), `day` (one whole day cell) and `dayButton` (the button
@@ -547,7 +547,7 @@ the page is `BbDatePicker`.
547
547
 
548
548
  | Part | What it is |
549
549
  | --- | --- |
550
- | `root` | The calendar's box: the grid and, with `type="datetime"`, the time rail beside it. A consumer `class` lands here. It carries the sizing tokens — `pt:root="[--cell:36px]"` widens the whole calendar, `pt:root="[--pad-x:2px]"` tightens its padding — and the grid's width follows. |
550
+ | `root` | The calendar's box: the grid and, with `type="datetime"`, the time rail beside it. A consumer `class` lands here. It carries the sizing tokens — `pt:root="[--cell:36px]"` widens the whole calendar, `pt:root="[--px:2px]"` tightens its padding — and the grid's width follows. |
551
551
  | `header` | The navigation bar: the previous / next arrows and the month / year headings. |
552
552
  | `arrow` | The previous / next buttons — a broadcast. |
553
553
  | `month` | The month heading button; it opens the month panel. |
@@ -593,9 +593,10 @@ Set these on the element, or on a class you put on it, to retune this component
593
593
 
594
594
  | Property | Set on | Default | What it is |
595
595
  | --- | --- | --- | --- |
596
+ | `--bg` | `.bb-calendar__button-menu` | `var(--bb-panel)` | |
596
597
  | `--cell` | `.bb-calendar` | `28px` | Cell size drives all grid math: 224px ÷ 7 = 32px exactly |
597
- | `--pad-x` | `.bb-calendar` | `6px` | |
598
- | `--pad-y` | `.bb-calendar` | `8px` | |
598
+ | `--px` | `.bb-calendar` | `6px` | |
599
+ | `--py` | `.bb-calendar` | `8px` | |
599
600
  | `--nav-button-h` | `.bb-calendar` | `24px` | |
600
601
  | `--day-slot-allowance` | `.bb-calendar` | `0px` | Allowance for the day slot append area - needed for the slot to be visible |
601
602
  | `--unit-row` | `.bb-calendar` | `calc(var(--cell) * 1.25)` | Row pitch for the coarse grids (month/year), where a "row" is one of four month rows rather than a week. Roomier than --cell because twelve months in a 4×3 grid have space the 6×7 day grid does not. |
@@ -943,7 +943,7 @@ and the global map are in the [passthrough guide](./guides/passthrough.md).
943
943
  | --- | --- | --- | --- | --- |
944
944
  | `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`. |
945
945
  | `autofocus` | `Booleanish \| undefined` | | | Sets autofocus on page load. |
946
- | `compact` | `boolean \| undefined` | `false` | | Displays the component in a compact version. |
946
+ | `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. |
947
947
  | `dependencies` | `unknown[] \| undefined` | | | Defines an array of dependencies that will trigger actions in the component upon change. |
948
948
  | `depsDebounceTime` | `number \| undefined` | | | Timeout used to debounce response to changes to dependencies. |
949
949
  | `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`). |
@@ -671,7 +671,7 @@ of it. The full grammar, the merge rules and the global map are in the
671
671
  | `autocomplete` | `string \| undefined` | `"off"` | | Guides the browser as to the type of information expected in the field. |
672
672
  | `autofocus` | `Booleanish \| undefined` | | | Sets autofocus on page load. |
673
673
  | `clearable` | `boolean \| undefined` | `false` | | Displays a clear button when the input has a value and is being interacted with. |
674
- | `compact` | `boolean \| undefined` | `false` | | Displays the component in a compact version. |
674
+ | `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-… |
675
675
  | `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`). |
676
676
  | `disabled` | `boolean \| undefined` | `false` | | Disables the component. |
677
677
  | `errors` | `string \| string[] \| undefined` | | | Can be a string or an array of string containing the messages to display. They render in an `aria-live="polite"` region (announced when they appear) and, while the list is non-empty, are referenced FIRST from the control's `aria-describedby… |
@@ -32,7 +32,8 @@
32
32
  | `--bg-pressed` | `pt:action` | `BbButton` | fill while [aria-pressed='true'] |
33
33
  | `--fg` | `pt:action` | `BbButton` | label and icons (icons paint currentColor) |
34
34
  | `--border-color` | `pt:action` | `BbButton` | the frame; its width is --bw |
35
- | `--ring` | `pt:action` | `BbButton` | focus ring, drawn --bb-ring-size outside the border |
35
+ | `--ring-color` | `pt:action` | `BbButton` | focus ring colour, per variant |
36
+ | `--ring-size` | `pt:action` | `BbButton` | focus ring width, outside the border |
36
37
  | `--bw` | `pt:action` | `BbButton` | border width |
37
38
  | `--fg-hover` | `pt:action` | `BbButton` | label and icons on hover (and focus-visible) |
38
39
  | `--border-hover` | `pt:action` | `BbButton` | the frame on hover (and focus-visible) |
@@ -835,7 +836,7 @@ States are listed in precedence order: when two are on at once and their entries
835
836
  - `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__body`, `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`
836
837
  - `CloseButton` _(internal — not importable, reach it through `BbDialog`)_ — documented CSS variables: `--size`, `--p`
837
838
  - `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__body`, `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`
838
- - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `BbIcon`, `text` → `span.bb-button__content`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbIcon`, `BbSpinner`
839
+ - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `BbIcon`, `text` → `span.bb-button__content`; 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`
839
840
  - `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
840
841
 
841
842
  ## See Also
@@ -296,7 +296,7 @@ style and attributes — optionally only while a state is on. Parts: `root`
296
296
  (the floating element — an invisible positioning wrapper, no node on a
297
297
  phone), `panel` (the calendar surface you see: the popover's painted bubble on
298
298
  desktop, the sheet itself on a phone — it also carries the sizing tokens, so
299
- `pt:panel="[--pad-x:2px]"` tightens the padding and the grid width follows), `sheet` (the
299
+ `pt:panel="[--px:2px]"` tightens the padding and the grid width follows), `sheet` (the
300
300
  bottom sheet on a phone only, applied after `panel`), `header` (the
301
301
  navigation bar), `arrow` (the previous / next buttons), `month` and `year`
302
302
  (the heading buttons), `columnHeader` (each weekday letter), `day` (one whole
@@ -448,7 +448,7 @@ and digit typeahead; the time rail exposes labelled columns. Always pass a
448
448
  | `dayButton` | The button inside a day cell — the mark that shows selection. A broadcast resolved per day. |
449
449
  | `monthItem` | One month button of the month panel (the home grid of `type="month"`) — a broadcast resolved per month. |
450
450
  | `yearItem` | One year button of the year list — a broadcast resolved per year. |
451
- | `panel` | The calendar surface you see — the popover's painted bubble on desktop, the sheet itself on a phone. It carries the sizing tokens: `pt:panel="[--cell:36px]"` widens the calendar, `[--pad-x:2px]` tightens. |
451
+ | `panel` | The calendar surface you see — the popover's painted bubble on desktop, the sheet itself on a phone. It carries the sizing tokens: `pt:panel="[--cell:36px]"` widens the calendar, `[--px:2px]` tightens. |
452
452
  | `sheet` | The bottom sheet on a phone only (the `BbOffCanvas` root). Applied after `panel`, so it wins a conflict there. |
453
453
 
454
454
  States are listed in precedence order: when two are on at once and their entries conflict, the later one wins.
@@ -493,22 +493,22 @@ Set these on the element, or on a class you put on it, to retune this component
493
493
  | Property | Set on | Default | What it is |
494
494
  | --- | --- | --- | --- |
495
495
  | `--cell` | `.bb-date-picker__panel` | `28px` | Cell size drives all grid math: 224px ÷ 7 = 32px exactly |
496
- | `--pad-x` | `.bb-date-picker__panel` | `6px` | |
497
- | `--pad-y` | `.bb-date-picker__panel` | `8px` | |
496
+ | `--px` | `.bb-date-picker__panel` | `6px` | |
497
+ | `--py` | `.bb-date-picker__panel` | `8px` | |
498
498
  | `--nav-button-h` | `.bb-date-picker__panel` | `24px` | |
499
499
  | `--day-slot-allowance` | `.bb-date-picker__panel` | `0px` | Allowance for the day slot append area - needed for the slot to be visible |
500
500
  | `--unit-row` | `.bb-date-picker__panel` | `calc(var(--cell) * 1.25)` | Row pitch for the coarse grids (month/year), where a "row" is one of four month rows rather than a week. Roomier than --cell because twelve months in a 4×3 grid have space the 6×7 day grid does not. |
501
501
  | `--sheet-cell` | `.bb-date-picker-offcanvas` | `40px` | |
502
502
  | `--cell` | `.bb-date-picker-offcanvas` | `var(--sheet-cell)` | |
503
- | `--pad-x` | `.bb-date-picker-offcanvas` | `6px` | |
504
- | `--pad-y` | `.bb-date-picker-offcanvas` | `8px` | |
503
+ | `--px` | `.bb-date-picker-offcanvas` | `6px` | |
504
+ | `--py` | `.bb-date-picker-offcanvas` | `8px` | |
505
505
  | `--nav-button-h` | `.bb-date-picker-offcanvas` | `40px` | |
506
506
  | `--day-slot-allowance` | `.bb-date-picker-offcanvas` | `0px` | |
507
507
  | `--unit-row` | `.bb-date-picker-offcanvas` | `calc(var(--cell) * 1.25)` | |
508
508
  | `--sheet-cell` | `.bb-date-picker__panel--sheet` | `inherit` | |
509
509
  | `--cell` | `.bb-date-picker__panel--sheet` | `inherit` | |
510
- | `--pad-x` | `.bb-date-picker__panel--sheet` | `inherit` | |
511
- | `--pad-y` | `.bb-date-picker__panel--sheet` | `inherit` | |
510
+ | `--px` | `.bb-date-picker__panel--sheet` | `inherit` | |
511
+ | `--py` | `.bb-date-picker__panel--sheet` | `inherit` | |
512
512
  | `--nav-button-h` | `.bb-date-picker__panel--sheet` | `inherit` | |
513
513
  | `--day-slot-allowance` | `.bb-date-picker__panel--sheet` | `inherit` | |
514
514
  | `--unit-row` | `.bb-date-picker__panel--sheet` | `inherit` | |