bitboss-ui 3.0.0-beta.21 → 3.0.0-beta.22
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.
- package/README.md +55 -3
- package/bin/bitboss-ui-mcp.mjs +419 -9
- package/bin/bitboss-ui.mjs +293 -22
- package/dist/ai/BbAccordion.md +21 -23
- package/dist/ai/BbAlert.md +6 -12
- package/dist/ai/BbAvatar.md +60 -24
- package/dist/ai/BbBadge.md +12 -20
- package/dist/ai/BbBaseButton.md +14 -16
- package/dist/ai/BbBaseCheckboxIcon.md +6 -10
- package/dist/ai/BbBaseRadioIcon.md +6 -10
- package/dist/ai/BbBaseSwitchIcon.md +5 -9
- package/dist/ai/BbBreadcrumbs.md +23 -34
- package/dist/ai/BbButton.md +35 -47
- package/dist/ai/BbCheckbox.md +21 -37
- package/dist/ai/BbCheckboxGroup.md +13 -13
- package/dist/ai/BbCollapsible.md +14 -26
- package/dist/ai/BbColorInput.md +13 -23
- package/dist/ai/BbColorPalette.md +23 -35
- package/dist/ai/BbConfirm.md +17 -32
- package/dist/ai/BbDatePickerInput.md +15 -21
- package/dist/ai/BbDialog.md +159 -62
- package/dist/ai/BbDropdown.md +21 -25
- package/dist/ai/BbDropdownButton.md +13 -30
- package/dist/ai/BbDropzone.md +9 -11
- package/dist/ai/BbIcon.md +44 -33
- package/dist/ai/BbIndicator.md +2 -2
- package/dist/ai/BbNumberInput.md +18 -20
- package/dist/ai/BbOffCanvas.md +42 -42
- package/dist/ai/BbPagination.md +21 -23
- package/dist/ai/BbPopover.md +15 -17
- package/dist/ai/BbProgress.md +40 -51
- package/dist/ai/BbRadio.md +9 -9
- package/dist/ai/BbRadioGroup.md +7 -11
- package/dist/ai/BbRating.md +8 -12
- package/dist/ai/BbSelect.md +32 -36
- package/dist/ai/BbSelectPopover.md +19 -31
- package/dist/ai/BbSlider.md +15 -19
- package/dist/ai/BbSmoothHeight.md +16 -31
- package/dist/ai/BbSpinner.md +118 -74
- package/dist/ai/BbSwitch.md +25 -18
- package/dist/ai/BbSwitchGroup.md +9 -14
- package/dist/ai/BbTable.md +102 -55
- package/dist/ai/BbTabs.md +59 -82
- package/dist/ai/BbTag.md +12 -23
- package/dist/ai/BbTextInput.md +20 -26
- package/dist/ai/BbTextarea.md +28 -34
- package/dist/ai/BbToast.md +14 -34
- package/dist/ai/BbTooltip.md +22 -20
- package/dist/ai/BbTree.md +46 -72
- package/dist/ai/changelog.json +169 -62
- package/dist/ai/components.json +1467 -9
- package/dist/ai/composables/useConfirm.md +5 -2
- package/dist/ai/composables/useToast.md +4 -2
- package/dist/ai/guides/agent-contract.md +7 -4
- package/dist/ai/guides/ai-router.md +37 -22
- package/dist/ai/guides/component-picker.md +23 -18
- package/dist/ai/guides/design-language.md +141 -13
- package/dist/ai/guides/design-tokens.md +29 -4
- package/dist/ai/guides/icons-policy.md +46 -21
- package/dist/ai/guides/installation-and-plugin-setup.md +253 -17
- package/dist/ai/guides/migration/components/bb-rating.md +26 -1
- package/dist/ai/guides/migration/components/bb-tooltip.md +18 -0
- package/dist/ai/guides/migration/v2-to-v3.md +50 -23
- package/dist/ai/index.md +1 -1
- package/dist/ai/recipes/inertia/approvals-inbox.md +3 -3
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +2 -2
- package/dist/ai/recipes/inertia/onboarding.md +2 -2
- package/dist/ai/recipes/inertia/ownership-atlas.md +6 -6
- package/dist/ai/recipes/inertia/record-form.md +5 -5
- package/dist/ai/recipes/inertia/records-workspace.md +4 -4
- package/dist/ai/recipes/inertia/upload-center.md +6 -6
- package/dist/ai/recipes/inertia/wizard-form.md +5 -5
- package/dist/ai/recipes/nuxt/approvals-inbox.md +3 -3
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +2 -2
- package/dist/ai/recipes/nuxt/onboarding.md +2 -2
- package/dist/ai/recipes/nuxt/record-form.md +5 -5
- package/dist/ai/recipes/nuxt/records-workspace.md +4 -4
- package/dist/ai/recipes/nuxt/upload-center.md +6 -6
- package/dist/ai/recipes/nuxt/wizard-form.md +5 -5
- package/dist/ai/recipes/vue/approvals-inbox.md +3 -3
- package/dist/ai/recipes/vue/inline-edit-workspace.md +2 -2
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/recipes/vue/record-form.md +10 -10
- package/dist/ai/recipes/vue/records-workspace.md +4 -4
- package/dist/ai/recipes/vue/upload-center.md +6 -6
- package/dist/ai/recipes/vue/wizard-form.md +5 -5
- package/dist/ai/source/BbBadge.md +1 -1
- package/dist/ai/source/BbBaseCheckbox.md +1 -1
- package/dist/ai/source/BbBaseDatePicker.md +5 -5
- package/dist/ai/source/BbBaseDatePickerInput.md +2 -2
- package/dist/ai/source/BbBaseRadio.md +1 -1
- package/dist/ai/source/BbBaseRating.md +5 -5
- package/dist/ai/source/BbBaseSelect.md +1 -1
- package/dist/ai/source/BbBaseSlider.md +5 -5
- package/dist/ai/source/BbBaseSwitch.md +1 -1
- package/dist/ai/source/BbBaseTimePickerInput.md +1 -1
- package/dist/ai/source/BbBreadcrumbs.md +20 -1
- package/dist/ai/source/BbButton.md +2 -2
- package/dist/ai/source/BbDialog.md +39 -8
- package/dist/ai/source/BbDropdown.md +1 -1
- package/dist/ai/source/BbDropzone.md +5 -5
- package/dist/ai/source/BbIcon.md +23 -10
- package/dist/ai/source/BbOffCanvas.md +50 -28
- package/dist/ai/source/BbPagination.md +2 -2
- package/dist/ai/source/BbPopover.md +12 -1
- package/dist/ai/source/BbSelectPopover.md +45 -7
- package/dist/ai/source/BbSpinner.md +2 -2
- package/dist/ai/source/BbTable.md +11 -11
- package/dist/ai/source/BbTooltip.md +57 -10
- package/dist/ai/source/ChipsBox.md +1 -1
- package/dist/ai/source/CommaBox.md +1 -1
- package/dist/ai/source/GuidesComponent.md +14 -7
- package/dist/ai/source/OptionsContainer.md +1 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.d.ts +1 -1
- package/dist/components/BbBaseRadio/BbBaseRadio.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +71 -71
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +102 -97
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +58 -58
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +33 -35
- package/dist/components/BbIcon/iconCache.d.ts +30 -0
- package/dist/components/BbIcon/iconCache.js +21 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +57 -56
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +138 -138
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +43 -43
- package/dist/components/BbSpinner/BbSpinner.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbSpinner/types.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/BbTable/BbTableDataRow.js +2 -2
- package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +62 -62
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +81 -78
- package/dist/components/BbTooltip/types.d.ts +8 -1
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/CommaBox/CommaBox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/composables/useConfirm.d.ts +22 -0
- package/dist/composables/useConfirm.js +43 -40
- package/dist/composables/useSafeAreaInternal.js +1 -1
- package/dist/composables/useToast.d.ts +16 -0
- package/dist/composables/useToast.js +20 -16
- package/dist/composables/useViewportWidth.d.ts +20 -6
- package/dist/composables/useViewportWidth.js +8 -7
- package/dist/icon-scan.d.ts +276 -0
- package/dist/icon-scan.js +485 -0
- package/dist/icons-whitelist.d.ts +5 -4
- package/dist/llms-full.txt +1979 -1527
- package/dist/llms-medium.txt +461 -74
- package/dist/llms.txt +1 -1
- package/dist/nuxt.js +10 -7
- package/dist/plugin.js +1 -0
- package/dist/runtime/nuxt-plugin.js +2 -1
- package/dist/styles.css +1 -1
- package/dist/types/Config.d.ts +18 -0
- package/dist/utils/cssLayers.d.ts +91 -0
- package/dist/utils/cssLayers.js +43 -0
- package/dist/utils/injectLibraryStyles.d.ts +3 -1
- package/dist/utils/injectLibraryStyles.js +24 -23
- package/dist/vite-plugin.d.ts +74 -11
- package/dist/vite.js +292 -253
- package/llms.txt +1 -1
- package/package.json +7 -5
- package/scripts/lib/ensure-manifest.mjs +28 -5
- package/scripts/lib/eslint-plugin.d.ts +35 -0
- package/scripts/lib/eslint-plugin.mjs +299 -3
- package/scripts/lib/hand-roll-hints.mjs +50 -6
- package/scripts/lib/html-attributes.mjs +42 -0
- package/scripts/lib/mcp-config.mjs +38 -34
- package/scripts/lib/public-type-exports.mjs +246 -0
- package/scripts/lib/validate-bb-markup.mjs +205 -12
package/dist/ai/BbTextarea.md
CHANGED
|
@@ -51,10 +51,10 @@ form or read from `FormData`.
|
|
|
51
51
|
|
|
52
52
|
```vue
|
|
53
53
|
<template>
|
|
54
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
54
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-4">
|
|
55
55
|
<div>
|
|
56
56
|
<p class="text-sm font-medium">Member profile</p>
|
|
57
|
-
<p class="text-xs text-
|
|
57
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
58
58
|
Label stays required — hide it visually or customize the slot.
|
|
59
59
|
</p>
|
|
60
60
|
</div>
|
|
@@ -69,11 +69,7 @@ form or read from `FormData`.
|
|
|
69
69
|
<template #label="{ text, hasErrors }">
|
|
70
70
|
{{ text }}
|
|
71
71
|
<span
|
|
72
|
-
:class="
|
|
73
|
-
hasErrors
|
|
74
|
-
? 'text-[color:var(--bb-danger)]'
|
|
75
|
-
: 'text-[color:var(--bb-text-muted)]'
|
|
76
|
-
"
|
|
72
|
+
:class="hasErrors ? 'text-(--bb-danger)' : 'text-(--bb-text-muted)'"
|
|
77
73
|
>
|
|
78
74
|
*
|
|
79
75
|
</span>
|
|
@@ -118,10 +114,10 @@ label and the placeholder occupy the same spot.
|
|
|
118
114
|
|
|
119
115
|
```vue
|
|
120
116
|
<template>
|
|
121
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
117
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-4">
|
|
122
118
|
<div>
|
|
123
119
|
<p class="text-sm font-medium">Checkout · shipping</p>
|
|
124
|
-
<p class="text-xs text-
|
|
120
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
125
121
|
Floating and inside labels — skip placeholders on floating fields.
|
|
126
122
|
</p>
|
|
127
123
|
</div>
|
|
@@ -191,10 +187,10 @@ validation layer should still drive `errors`.
|
|
|
191
187
|
```vue
|
|
192
188
|
<template>
|
|
193
189
|
<div class="grid max-w-sm gap-3">
|
|
194
|
-
<div class="grid gap-3 rounded-
|
|
190
|
+
<div class="grid gap-3 rounded-(--bb-radius) border p-4">
|
|
195
191
|
<div>
|
|
196
192
|
<p class="text-sm font-medium">Public profile</p>
|
|
197
|
-
<p class="text-xs text-
|
|
193
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
198
194
|
Description before typing; hint while focused.
|
|
199
195
|
</p>
|
|
200
196
|
</div>
|
|
@@ -210,12 +206,10 @@ validation layer should still drive `errors`.
|
|
|
210
206
|
:rows="3"
|
|
211
207
|
/>
|
|
212
208
|
</div>
|
|
213
|
-
<div class="grid gap-3 rounded-
|
|
209
|
+
<div class="grid gap-3 rounded-(--bb-radius) border p-4">
|
|
214
210
|
<div>
|
|
215
211
|
<p class="text-sm font-medium">Request a refund</p>
|
|
216
|
-
<p class="text-xs text-
|
|
217
|
-
INV-2048 · Acme Studio
|
|
218
|
-
</p>
|
|
212
|
+
<p class="text-xs text-(--bb-text-muted)">INV-2048 · Acme Studio</p>
|
|
219
213
|
</div>
|
|
220
214
|
<BbTextarea
|
|
221
215
|
v-model="reason"
|
|
@@ -265,10 +259,10 @@ Two ways to size the box — and they compose:
|
|
|
265
259
|
|
|
266
260
|
```vue
|
|
267
261
|
<template>
|
|
268
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
262
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-4">
|
|
269
263
|
<div>
|
|
270
264
|
<p class="text-sm font-medium">Issue description</p>
|
|
271
|
-
<p class="text-xs text-
|
|
265
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
272
266
|
Fixed rows, auto-grow, or rows as a minimum floor.
|
|
273
267
|
</p>
|
|
274
268
|
</div>
|
|
@@ -320,10 +314,10 @@ while the comment saves:
|
|
|
320
314
|
|
|
321
315
|
```vue
|
|
322
316
|
<template>
|
|
323
|
-
<div class="grid max-w-md gap-3 rounded-
|
|
317
|
+
<div class="grid max-w-md gap-3 rounded-(--bb-radius) border p-3">
|
|
324
318
|
<div>
|
|
325
319
|
<p class="text-sm font-medium">PR #2048 · Review</p>
|
|
326
|
-
<p class="text-xs text-
|
|
320
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
327
321
|
feat/command-palette · 2 comments
|
|
328
322
|
</p>
|
|
329
323
|
</div>
|
|
@@ -332,7 +326,7 @@ while the comment saves:
|
|
|
332
326
|
:key="comment.id"
|
|
333
327
|
class="grid gap-0.5 border-t pt-2 first:border-t-0 first:pt-0"
|
|
334
328
|
>
|
|
335
|
-
<p class="text-xs text-
|
|
329
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
336
330
|
{{ comment.author }} · {{ comment.postedAt }}
|
|
337
331
|
</p>
|
|
338
332
|
<p class="text-sm">{{ comment.body }}</p>
|
|
@@ -409,10 +403,10 @@ informed. For a simple inline readout the `suffix` slot is enough:
|
|
|
409
403
|
|
|
410
404
|
```vue
|
|
411
405
|
<template>
|
|
412
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
406
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-4">
|
|
413
407
|
<div>
|
|
414
408
|
<p class="text-sm font-medium">Status update</p>
|
|
415
|
-
<p class="text-xs text-
|
|
409
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
416
410
|
Inline suffix counter — visual only, no hard cap.
|
|
417
411
|
</p>
|
|
418
412
|
</div>
|
|
@@ -445,10 +439,10 @@ companion SFC:
|
|
|
445
439
|
|
|
446
440
|
```vue
|
|
447
441
|
<template>
|
|
448
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
442
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-4">
|
|
449
443
|
<div>
|
|
450
444
|
<p class="text-sm font-medium">Contact support</p>
|
|
451
|
-
<p class="text-xs text-
|
|
445
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
452
446
|
Ticket #4812 · counter is visual; cap is enforced via errors.
|
|
453
447
|
</p>
|
|
454
448
|
</div>
|
|
@@ -509,10 +503,10 @@ The full slot ring, inside → out:
|
|
|
509
503
|
|
|
510
504
|
```vue
|
|
511
505
|
<template>
|
|
512
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
506
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-4">
|
|
513
507
|
<div>
|
|
514
508
|
<p class="text-sm font-medium">Deal notes</p>
|
|
515
|
-
<p class="text-xs text-
|
|
509
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
516
510
|
Icons inside the chrome; copy actions sit in append-outer.
|
|
517
511
|
</p>
|
|
518
512
|
</div>
|
|
@@ -568,10 +562,10 @@ change mid-operation (e.g. an autosave round-trip). They compose freely.
|
|
|
568
562
|
|
|
569
563
|
```vue
|
|
570
564
|
<template>
|
|
571
|
-
<div class="grid max-w-sm gap-3 rounded-
|
|
565
|
+
<div class="grid max-w-sm gap-3 rounded-(--bb-radius) border p-4">
|
|
572
566
|
<div>
|
|
573
567
|
<p class="text-sm font-medium">Meeting notes</p>
|
|
574
|
-
<p class="text-xs text-
|
|
568
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
575
569
|
Q3 roadmap sync · clearable draft and autosave spinner.
|
|
576
570
|
</p>
|
|
577
571
|
</div>
|
|
@@ -619,10 +613,10 @@ content — screen-reader and keyboard users can still reach it.
|
|
|
619
613
|
```vue
|
|
620
614
|
<template>
|
|
621
615
|
<div class="grid max-w-sm gap-3">
|
|
622
|
-
<div class="grid gap-3 rounded-
|
|
616
|
+
<div class="grid gap-3 rounded-(--bb-radius) border p-4">
|
|
623
617
|
<div>
|
|
624
618
|
<p class="text-sm font-medium">Refund policy</p>
|
|
625
|
-
<p class="text-xs text-
|
|
619
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
626
620
|
Readonly keeps terms focusable and copyable.
|
|
627
621
|
</p>
|
|
628
622
|
</div>
|
|
@@ -635,10 +629,10 @@ content — screen-reader and keyboard users can still reach it.
|
|
|
635
629
|
:rows="3"
|
|
636
630
|
/>
|
|
637
631
|
</div>
|
|
638
|
-
<div class="grid gap-3 rounded-
|
|
632
|
+
<div class="grid gap-3 rounded-(--bb-radius) border p-4">
|
|
639
633
|
<div>
|
|
640
634
|
<p class="text-sm font-medium">Deploy log</p>
|
|
641
|
-
<p class="text-xs text-
|
|
635
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
642
636
|
Disabled greys the field and blocks interaction.
|
|
643
637
|
</p>
|
|
644
638
|
</div>
|
|
@@ -678,10 +672,10 @@ order. This makes it a good pick for label-beside-field settings rows.
|
|
|
678
672
|
|
|
679
673
|
```vue
|
|
680
674
|
<template>
|
|
681
|
-
<div class="grid max-w-md gap-3 rounded-
|
|
675
|
+
<div class="grid max-w-md gap-3 rounded-(--bb-radius) border p-4">
|
|
682
676
|
<div>
|
|
683
677
|
<p class="text-sm font-medium">Issue properties</p>
|
|
684
|
-
<p class="text-xs text-
|
|
678
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
685
679
|
Horizontal outside labels + compact density on the whole panel.
|
|
686
680
|
</p>
|
|
687
681
|
</div>
|
package/dist/ai/BbToast.md
CHANGED
|
@@ -70,14 +70,10 @@ per-message options. Built-in variants: `default`, `success`, `info`,
|
|
|
70
70
|
|
|
71
71
|
```vue
|
|
72
72
|
<template>
|
|
73
|
-
<div
|
|
74
|
-
class="flex max-w-sm flex-col gap-3 rounded-[var(--bb-radius)] border p-3"
|
|
75
|
-
>
|
|
73
|
+
<div class="flex max-w-sm flex-col gap-3 rounded-(--bb-radius) border p-3">
|
|
76
74
|
<div class="flex flex-col gap-0.5">
|
|
77
75
|
<p class="text-sm font-medium">Alex Rivera</p>
|
|
78
|
-
<p class="text-xs text-
|
|
79
|
-
alex@northwind.co · Product
|
|
80
|
-
</p>
|
|
76
|
+
<p class="text-xs text-(--bb-text-muted)">alex@northwind.co · Product</p>
|
|
81
77
|
</div>
|
|
82
78
|
|
|
83
79
|
<div class="flex flex-wrap items-center gap-2">
|
|
@@ -196,14 +192,10 @@ the spinner and the pinning stay).
|
|
|
196
192
|
|
|
197
193
|
```vue
|
|
198
194
|
<template>
|
|
199
|
-
<div
|
|
200
|
-
class="flex max-w-sm flex-col gap-3 rounded-[var(--bb-radius)] border p-3"
|
|
201
|
-
>
|
|
195
|
+
<div class="flex max-w-sm flex-col gap-3 rounded-(--bb-radius) border p-3">
|
|
202
196
|
<div class="flex flex-col gap-0.5">
|
|
203
197
|
<p class="text-sm font-medium">invoice-INV-1042.pdf</p>
|
|
204
|
-
<p class="text-xs text-
|
|
205
|
-
248 KB · ready to upload
|
|
206
|
-
</p>
|
|
198
|
+
<p class="text-xs text-(--bb-text-muted)">248 KB · ready to upload</p>
|
|
207
199
|
</div>
|
|
208
200
|
|
|
209
201
|
<BbButton prepend:icon="lucide:upload" variant="primary" @click="upload">
|
|
@@ -261,12 +253,10 @@ status, "copied" — so hammering the action never floods the corner.
|
|
|
261
253
|
|
|
262
254
|
```vue
|
|
263
255
|
<template>
|
|
264
|
-
<div
|
|
265
|
-
class="flex max-w-sm flex-col gap-3 rounded-[var(--bb-radius)] border p-3"
|
|
266
|
-
>
|
|
256
|
+
<div class="flex max-w-sm flex-col gap-3 rounded-(--bb-radius) border p-3">
|
|
267
257
|
<div class="flex flex-col gap-0.5">
|
|
268
258
|
<p class="text-sm font-medium">Proposal — Acme Studio</p>
|
|
269
|
-
<p class="text-xs text-
|
|
259
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
270
260
|
Draft · last edited just now · {{ saveCount }} saves this session
|
|
271
261
|
</p>
|
|
272
262
|
</div>
|
|
@@ -362,12 +352,10 @@ toast expires, the delete simply stands.
|
|
|
362
352
|
|
|
363
353
|
```vue
|
|
364
354
|
<template>
|
|
365
|
-
<div
|
|
366
|
-
class="flex max-w-sm flex-col gap-3 rounded-[var(--bb-radius)] border p-3"
|
|
367
|
-
>
|
|
355
|
+
<div class="flex max-w-sm flex-col gap-3 rounded-(--bb-radius) border p-3">
|
|
368
356
|
<div class="flex flex-col gap-0.5">
|
|
369
357
|
<p class="text-sm font-medium">Saved replies</p>
|
|
370
|
-
<p class="text-xs text-
|
|
358
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
371
359
|
Delete commits immediately — Undo lives on the toast.
|
|
372
360
|
</p>
|
|
373
361
|
</div>
|
|
@@ -389,9 +377,7 @@ toast expires, the delete simply stands.
|
|
|
389
377
|
</BbButton>
|
|
390
378
|
</li>
|
|
391
379
|
</ul>
|
|
392
|
-
<p v-else class="text-sm text-
|
|
393
|
-
No saved replies left.
|
|
394
|
-
</p>
|
|
380
|
+
<p v-else class="text-sm text-(--bb-text-muted)">No saved replies left.</p>
|
|
395
381
|
|
|
396
382
|
<!--
|
|
397
383
|
Standalone example: it mounts its own host because it has no app root.
|
|
@@ -449,12 +435,10 @@ morphs in place with a fresh countdown (e.g. into a success confirmation).
|
|
|
449
435
|
|
|
450
436
|
```vue
|
|
451
437
|
<template>
|
|
452
|
-
<div
|
|
453
|
-
class="flex max-w-sm flex-col gap-3 rounded-[var(--bb-radius)] border p-3"
|
|
454
|
-
>
|
|
438
|
+
<div class="flex max-w-sm flex-col gap-3 rounded-(--bb-radius) border p-3">
|
|
455
439
|
<div class="flex flex-col gap-0.5">
|
|
456
440
|
<p class="text-sm font-medium">Workspace sync</p>
|
|
457
|
-
<p class="text-xs text-
|
|
441
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
458
442
|
Northwind · last synced 12 minutes ago
|
|
459
443
|
</p>
|
|
460
444
|
</div>
|
|
@@ -546,12 +530,10 @@ overlays unless `hideClose`.
|
|
|
546
530
|
|
|
547
531
|
```vue
|
|
548
532
|
<template>
|
|
549
|
-
<div
|
|
550
|
-
class="flex max-w-sm flex-col gap-3 rounded-[var(--bb-radius)] border p-3"
|
|
551
|
-
>
|
|
533
|
+
<div class="flex max-w-sm flex-col gap-3 rounded-(--bb-radius) border p-3">
|
|
552
534
|
<div class="flex flex-col gap-0.5">
|
|
553
535
|
<p class="text-sm font-medium">Invite teammate</p>
|
|
554
|
-
<p class="text-xs text-
|
|
536
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
555
537
|
Portal toast with avatar + custom actions.
|
|
556
538
|
</p>
|
|
557
539
|
</div>
|
|
@@ -572,9 +554,7 @@ overlays unless `hideClose`.
|
|
|
572
554
|
<BbAvatar size="32">{{ props.initials }}</BbAvatar>
|
|
573
555
|
<div class="min-w-0 flex-1">
|
|
574
556
|
<p class="text-sm font-semibold">{{ props.name }} was invited</p>
|
|
575
|
-
<p class="text-xs text-
|
|
576
|
-
Northwind · Design
|
|
577
|
-
</p>
|
|
557
|
+
<p class="text-xs text-(--bb-text-muted)">Northwind · Design</p>
|
|
578
558
|
<div class="mt-2 flex gap-2">
|
|
579
559
|
<BbButton size="xs" @click="close">Got it</BbButton>
|
|
580
560
|
<BbButton size="xs" variant="outline" @click="close">Undo</BbButton>
|
package/dist/ai/BbTooltip.md
CHANGED
|
@@ -128,30 +128,28 @@ bubbles from flickering while the pointer crosses the dense toolbar.
|
|
|
128
128
|
```vue
|
|
129
129
|
<template>
|
|
130
130
|
<div
|
|
131
|
-
class="flex max-w-sm flex-col gap-2 rounded-
|
|
131
|
+
class="flex max-w-sm flex-col gap-2 rounded-(--bb-radius) border border-(--bb-border) p-3"
|
|
132
132
|
>
|
|
133
133
|
<div class="flex items-start justify-between gap-2">
|
|
134
134
|
<div class="flex min-w-0 flex-col gap-0.5">
|
|
135
135
|
<span class="truncate text-sm font-medium">Q3 board deck</span>
|
|
136
|
-
<span class="text-xs text-
|
|
136
|
+
<span class="text-xs text-(--bb-text-muted)">
|
|
137
137
|
Shared draft · Acme Studio · edited 2h ago
|
|
138
138
|
</span>
|
|
139
139
|
</div>
|
|
140
|
-
<span class="shrink-0 text-xs text-
|
|
141
|
-
>PDF</span
|
|
142
|
-
>
|
|
140
|
+
<span class="shrink-0 text-xs text-(--bb-text-muted)">PDF</span>
|
|
143
141
|
</div>
|
|
144
142
|
|
|
145
143
|
<div
|
|
146
144
|
aria-label="Document actions"
|
|
147
|
-
class="inline-flex w-fit items-center gap-0.5 rounded-
|
|
145
|
+
class="inline-flex w-fit items-center gap-0.5 rounded-(--bb-radius) border border-(--bb-border) p-0.5"
|
|
148
146
|
role="toolbar"
|
|
149
147
|
>
|
|
150
148
|
<template v-for="action in actions" :key="action.label">
|
|
151
149
|
<span
|
|
152
150
|
v-if="action.startsGroup"
|
|
153
151
|
aria-hidden="true"
|
|
154
|
-
class="mx-0.5 h-4 w-px bg-
|
|
152
|
+
class="mx-0.5 h-4 w-px bg-(--bb-border)"
|
|
155
153
|
></span>
|
|
156
154
|
<BbTooltip :delay="400" :text="action.label">
|
|
157
155
|
<template #activator="{ props }">
|
|
@@ -211,7 +209,7 @@ works on any variant.
|
|
|
211
209
|
</template>
|
|
212
210
|
<span class="flex items-center gap-1.5">
|
|
213
211
|
Search
|
|
214
|
-
<kbd class="rounded border border-current px-1 font-mono text-[10px] leading-4 opacity-75">⌘K</kbd>
|
|
212
|
+
<kbd class="rounded-sm border border-current px-1 font-mono text-[10px] leading-4 opacity-75">⌘K</kbd>
|
|
215
213
|
</span>
|
|
216
214
|
</BbTooltip>
|
|
217
215
|
<BbTooltip>
|
|
@@ -226,7 +224,7 @@ works on any variant.
|
|
|
226
224
|
</template>
|
|
227
225
|
<span class="flex items-center gap-1.5">
|
|
228
226
|
Toggle sidebar
|
|
229
|
-
<kbd class="rounded border border-current px-1 font-mono text-[10px] leading-4 opacity-75">⌘B</kbd>
|
|
227
|
+
<kbd class="rounded-sm border border-current px-1 font-mono text-[10px] leading-4 opacity-75">⌘B</kbd>
|
|
230
228
|
</span>
|
|
231
229
|
</BbTooltip>
|
|
232
230
|
</div>
|
|
@@ -244,8 +242,14 @@ is concerned — the whole label (shortcut included) is flattened into the
|
|
|
244
242
|
useful on dense toolbars to avoid a flicker of bubbles while the cursor passes
|
|
245
243
|
over. It delays only the **open**; the close is always a short debounce (so the
|
|
246
244
|
pointer can travel from the trigger into the bubble without it vanishing).
|
|
247
|
-
- `width` caps the bubble
|
|
248
|
-
|
|
245
|
+
- `width` caps the bubble so long hints wrap instead of stretching across the
|
|
246
|
+
screen. It is a **maximum, not a fixed width** — the bubble still shrinks to
|
|
247
|
+
short text, so a one-line hint never sits in an oversized box. A bare number
|
|
248
|
+
is pixels, a percentage is measured against the activator, and any other CSS
|
|
249
|
+
length (`'20rem'`, `'min(320px, 90vw)'`) passes through. Bubbles already cap
|
|
250
|
+
at `40ch` without it; reach for the prop when a specific hint wants a
|
|
251
|
+
different measure, and for a library-wide change set `--max-w` on
|
|
252
|
+
`.bb-tooltip` in your own CSS.
|
|
249
253
|
- `disabled` suppresses the tooltip entirely — and dismisses it if already open,
|
|
250
254
|
so you can bind it to skip a hint when the label is already visible elsewhere.
|
|
251
255
|
- Content is **lazy** (rendered on first open); `eager` renders it up front, and
|
|
@@ -339,25 +343,23 @@ brief settle, matching dense toolbars.
|
|
|
339
343
|
```vue
|
|
340
344
|
<template>
|
|
341
345
|
<div
|
|
342
|
-
class="max-w-sm overflow-hidden rounded-
|
|
346
|
+
class="max-w-sm overflow-hidden rounded-(--bb-radius) border border-(--bb-border)"
|
|
343
347
|
>
|
|
344
348
|
<div
|
|
345
|
-
class="flex items-baseline justify-between gap-2 border-b border-
|
|
349
|
+
class="flex items-baseline justify-between gap-2 border-b border-(--bb-border) px-3 py-2"
|
|
346
350
|
>
|
|
347
351
|
<span class="text-sm font-medium">Attachments</span>
|
|
348
|
-
<span class="text-xs text-
|
|
349
|
-
>INV-1042 · 3 files</span
|
|
350
|
-
>
|
|
352
|
+
<span class="text-xs text-(--bb-text-muted)">INV-1042 · 3 files</span>
|
|
351
353
|
</div>
|
|
352
354
|
|
|
353
|
-
<div class="divide-y divide-
|
|
355
|
+
<div class="divide-y divide-(--bb-border)">
|
|
354
356
|
<div
|
|
355
357
|
v-for="file in files"
|
|
356
358
|
:key="file.name"
|
|
357
359
|
class="flex items-center gap-2 px-3 py-1.5 text-sm"
|
|
358
360
|
>
|
|
359
361
|
<BbIcon
|
|
360
|
-
class="shrink-0 text-
|
|
362
|
+
class="shrink-0 text-(--bb-text-muted)"
|
|
361
363
|
:icon="file.icon"
|
|
362
364
|
size="sm"
|
|
363
365
|
/>
|
|
@@ -369,7 +371,7 @@ brief settle, matching dense toolbars.
|
|
|
369
371
|
>
|
|
370
372
|
{{ file.name }}
|
|
371
373
|
</span>
|
|
372
|
-
<span class="shrink-0 text-xs text-
|
|
374
|
+
<span class="shrink-0 text-xs text-(--bb-text-muted)">{{
|
|
373
375
|
file.size
|
|
374
376
|
}}</span>
|
|
375
377
|
</div>
|
|
@@ -468,7 +470,7 @@ const files: SharedFile[] = [
|
|
|
468
470
|
| `text` | `string \| undefined` | | | Text content of the component. |
|
|
469
471
|
| `transitionDuration` | `number \| undefined` | `250` | | How long the transition has to last in milliseconds |
|
|
470
472
|
| `variant` | `keyof TooltipVariantRegistry \| undefined` | `"default"` | | Visual variant. `'default'` is the inverted (primary) bubble, `'destructive'` is the danger-tinted bubble for warnings. Any other string is applied as a `bb-tooltip--<name>` class hook. |
|
|
471
|
-
| `width` | `string \| number \| undefined` | | |
|
|
473
|
+
| `width` | `string \| number \| undefined` | | | Caps the width of the tooltip bubble: it wraps at this measure but still shrinks to its text, so a short hint never sits in an oversized bubble. A bare number is read as pixels, a percentage is measured against the activator, and any other … |
|
|
472
474
|
|
|
473
475
|
## Events
|
|
474
476
|
|