bitboss-ui 3.0.0-beta.4 → 3.0.0-beta.41
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 +317 -98
- package/bin/bitboss-ui-mcp.mjs +1566 -75
- package/bin/bitboss-ui.mjs +716 -72
- package/dist/ai/BbAccordion.md +178 -56
- package/dist/ai/BbAlert.md +140 -28
- package/dist/ai/BbAsterisk.md +61 -4
- package/dist/ai/BbAvatar.md +194 -53
- package/dist/ai/BbBadge.md +250 -50
- package/dist/ai/BbBadgeButton.md +74 -21
- package/dist/ai/BbBaseButton.md +132 -51
- package/dist/ai/BbBaseCheckboxIcon.md +118 -26
- package/dist/ai/BbBaseRadioIcon.md +115 -26
- package/dist/ai/BbBaseSwitchIcon.md +123 -28
- package/dist/ai/BbBreadcrumbs.md +221 -51
- package/dist/ai/BbButton.md +389 -107
- package/dist/ai/BbCalendar.md +667 -0
- package/dist/ai/BbCheckbox.md +242 -80
- package/dist/ai/BbCheckboxGroup.md +575 -66
- package/dist/ai/BbCollapsible.md +158 -39
- package/dist/ai/BbColorInput.md +322 -82
- package/dist/ai/BbColorPalette.md +261 -61
- package/dist/ai/BbConfirm.md +220 -51
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +272 -37
- package/dist/ai/BbDatePickerInput.md +321 -92
- package/dist/ai/BbDialog.md +492 -87
- package/dist/ai/BbDropdown.md +1182 -104
- package/dist/ai/BbDropdownButton.md +239 -61
- package/dist/ai/BbDropdownGroup.md +5 -5
- package/dist/ai/BbDropzone.md +140 -36
- package/dist/ai/BbForm.md +1165 -40
- package/dist/ai/BbIcon.md +100 -33
- package/dist/ai/BbIndicator.md +79 -12
- package/dist/ai/BbNumberInput.md +257 -87
- package/dist/ai/BbOffCanvas.md +396 -91
- package/dist/ai/BbPagination.md +199 -32
- package/dist/ai/BbPopover.md +219 -54
- package/dist/ai/BbProgress.md +137 -71
- package/dist/ai/BbPtScope.md +136 -0
- package/dist/ai/BbRadio.md +234 -43
- package/dist/ai/BbRadioGroup.md +529 -91
- package/dist/ai/BbRating.md +243 -61
- package/dist/ai/BbSelect.md +690 -120
- package/dist/ai/BbSelectPopover.md +434 -122
- package/dist/ai/BbSlider.md +275 -79
- package/dist/ai/BbSmoothHeight.md +142 -34
- package/dist/ai/BbSpinner.md +179 -81
- package/dist/ai/BbSwitch.md +249 -63
- package/dist/ai/BbSwitchGroup.md +394 -65
- package/dist/ai/BbTable.md +1666 -222
- package/dist/ai/BbTabs.md +898 -178
- package/dist/ai/BbTabsList.md +81 -7
- package/dist/ai/BbTabsPanels.md +77 -0
- package/dist/ai/BbTabsRoot.md +16 -15
- package/dist/ai/BbTag.md +256 -76
- package/dist/ai/BbTextInput.md +480 -102
- package/dist/ai/BbTextarea.md +310 -96
- package/dist/ai/BbTimePicker.md +159 -24
- package/dist/ai/BbTimePickerInput.md +277 -46
- package/dist/ai/BbToast.md +286 -40
- package/dist/ai/BbToastPortal.md +3 -3
- package/dist/ai/BbTooltip.md +187 -34
- package/dist/ai/BbTree.md +260 -85
- package/dist/ai/ChipsBox.md +43 -2
- package/dist/ai/ClearableButton.md +12 -0
- package/dist/ai/CommaBox.md +2 -1
- package/dist/ai/CommonField.md +63 -0
- package/dist/ai/CommonFieldInput.md +90 -0
- package/dist/ai/CommonPopover.md +17 -12
- package/dist/ai/CommonTimeSelector.md +63 -0
- package/dist/ai/ErrorIcon.md +20 -0
- package/dist/ai/FlatListBox.md +41 -11
- package/dist/ai/GroupedListBox.md +42 -12
- package/dist/ai/ListBox.md +46 -11
- package/dist/ai/OptionsContainer.md +13 -10
- package/dist/ai/WarningIcon.md +20 -0
- package/dist/ai/changelog.json +4025 -141
- package/dist/ai/components.json +51872 -10136
- package/dist/ai/composables/useBbConfig.md +72 -11
- package/dist/ai/composables/useBbDropdownContext.md +168 -0
- package/dist/ai/composables/useBbFormContext.md +51 -24
- package/dist/ai/composables/useBbFormField.md +134 -0
- package/dist/ai/composables/useBbTableContext.md +41 -19
- package/dist/ai/composables/useConfirm.md +16 -8
- package/dist/ai/composables/useCountdown.md +1 -1
- package/dist/ai/composables/useId.md +10 -10
- package/dist/ai/composables/useMobile.md +17 -10
- package/dist/ai/composables/useToast.md +25 -19
- package/dist/ai/design-tokens.json +940 -0
- package/dist/ai/design-tokens.manifest.yaml +175 -0
- package/dist/ai/guides/agent-contract.md +168 -22
- package/dist/ai/guides/ai-router.md +79 -40
- package/dist/ai/guides/app-layout.md +8 -4
- package/dist/ai/guides/coherence-playbook.md +8 -8
- package/dist/ai/guides/component-picker.md +42 -34
- package/dist/ai/guides/design-language.md +274 -97
- package/dist/ai/guides/design-tokens.md +493 -105
- package/dist/ai/guides/fetch-items-playbook.md +22 -16
- package/dist/ai/guides/icons-policy.md +67 -35
- package/dist/ai/guides/inertia-helpers.md +4 -1
- package/dist/ai/guides/inline-edit-playbook.md +13 -6
- package/dist/ai/guides/installation-and-plugin-setup.md +817 -73
- package/dist/ai/guides/migration/components/bb-accordion.md +37 -0
- package/dist/ai/guides/migration/components/bb-alert.md +2 -2
- package/dist/ai/guides/migration/components/bb-avatar.md +13 -14
- package/dist/ai/guides/migration/components/bb-badge.md +5 -5
- package/dist/ai/guides/migration/components/bb-breadcrumbs.md +9 -8
- package/dist/ai/guides/migration/components/bb-button.md +80 -20
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +116 -29
- package/dist/ai/guides/migration/components/bb-checkbox.md +53 -10
- package/dist/ai/guides/migration/components/bb-chip.md +6 -6
- package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
- package/dist/ai/guides/migration/components/bb-color-input.md +5 -5
- package/dist/ai/guides/migration/components/bb-color-palette.md +16 -9
- package/dist/ai/guides/migration/components/bb-date-picker-input.md +45 -35
- package/dist/ai/guides/migration/components/bb-dialog.md +69 -36
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +7 -1
- package/dist/ai/guides/migration/components/bb-dropdown.md +31 -8
- package/dist/ai/guides/migration/components/bb-dropzone.md +8 -0
- package/dist/ai/guides/migration/components/bb-icon.md +7 -7
- package/dist/ai/guides/migration/components/bb-intersection.md +1 -1
- package/dist/ai/guides/migration/components/bb-offcanvas.md +29 -31
- package/dist/ai/guides/migration/components/bb-pagination.md +10 -0
- package/dist/ai/guides/migration/components/bb-popover.md +19 -11
- package/dist/ai/guides/migration/components/bb-radio-group.md +14 -0
- package/dist/ai/guides/migration/components/bb-rating.md +61 -24
- package/dist/ai/guides/migration/components/bb-select-popover.md +9 -1
- package/dist/ai/guides/migration/components/bb-select.md +21 -4
- package/dist/ai/guides/migration/components/bb-slider.md +14 -6
- package/dist/ai/guides/migration/components/bb-switch-group.md +14 -0
- package/dist/ai/guides/migration/components/bb-table.md +574 -33
- package/dist/ai/guides/migration/components/bb-tabs.md +91 -41
- package/dist/ai/guides/migration/components/bb-tag.md +9 -7
- package/dist/ai/guides/migration/components/bb-text-input.md +12 -12
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/components/bb-tooltip.md +18 -0
- package/dist/ai/guides/migration/components/bb-tree.md +11 -9
- package/dist/ai/guides/migration/components/use-confirm.md +9 -1
- package/dist/ai/guides/migration/v2-to-v3.md +828 -240
- package/dist/ai/guides/migration/v3-beta-css-classes.md +751 -0
- package/dist/ai/guides/migration/v3-beta-tooling.md +119 -0
- package/dist/ai/guides/options-items-playbook.md +161 -12
- package/dist/ai/guides/page-shell.md +1 -1
- package/dist/ai/guides/passthrough.md +958 -0
- package/dist/ai/guides/preset-components.md +361 -0
- package/dist/ai/guides/ssr-prefill.md +127 -0
- package/dist/ai/guides/validated-forms.md +466 -55
- package/dist/ai/guides/validation-libraries.md +171 -0
- package/dist/ai/guides/validation-providers.md +113 -0
- package/dist/ai/index.md +45 -44
- package/dist/ai/recipes/inertia/approvals-inbox.md +26 -10
- package/dist/ai/recipes/inertia/command-palette.md +2 -2
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +46 -30
- package/dist/ai/recipes/inertia/layout-scaffold.md +6 -2
- package/dist/ai/recipes/inertia/onboarding.md +30 -8
- package/dist/ai/recipes/inertia/ownership-atlas.md +72 -49
- package/dist/ai/recipes/inertia/record-form.md +53 -19
- package/dist/ai/recipes/inertia/records-workspace.md +201 -49
- package/dist/ai/recipes/inertia/settings-workspace.md +3809 -0
- package/dist/ai/recipes/inertia/upload-center.md +54 -43
- package/dist/ai/recipes/inertia/wizard-form.md +98 -14
- package/dist/ai/recipes/nuxt/approvals-inbox.md +26 -10
- package/dist/ai/recipes/nuxt/command-palette.md +2 -2
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +68 -52
- package/dist/ai/recipes/nuxt/layout-scaffold.md +6 -2
- package/dist/ai/recipes/nuxt/onboarding.md +30 -8
- package/dist/ai/recipes/nuxt/record-form.md +66 -22
- package/dist/ai/recipes/nuxt/records-workspace.md +199 -48
- package/dist/ai/recipes/nuxt/settings-workspace.md +3898 -0
- package/dist/ai/recipes/nuxt/upload-center.md +52 -41
- package/dist/ai/recipes/nuxt/wizard-form.md +98 -14
- package/dist/ai/recipes/vue/approvals-inbox.md +28 -12
- package/dist/ai/recipes/vue/command-palette.md +2 -2
- package/dist/ai/recipes/vue/inline-edit-workspace.md +69 -53
- package/dist/ai/recipes/vue/layout-scaffold.md +6 -2
- package/dist/ai/recipes/vue/onboarding.md +32 -8
- package/dist/ai/recipes/vue/record-form.md +81 -54
- package/dist/ai/recipes/vue/records-workspace.md +198 -49
- package/dist/ai/recipes/vue/settings-workspace.md +3836 -0
- package/dist/ai/recipes/vue/upload-center.md +53 -42
- package/dist/ai/recipes/vue/wizard-form.md +97 -14
- package/dist/ai/source/BbAccordion.md +90 -24
- package/dist/ai/source/BbAlert.md +209 -62
- package/dist/ai/source/BbAsterisk.md +54 -4
- package/dist/ai/source/BbAvatar.md +73 -16
- package/dist/ai/source/BbBadge.md +265 -97
- package/dist/ai/source/BbBadgeButton.md +218 -79
- package/dist/ai/source/BbBaseButton.md +108 -12
- package/dist/ai/source/BbBaseCheckboxIcon.md +151 -36
- package/dist/ai/source/BbBaseRadioIcon.md +121 -17
- package/dist/ai/source/BbBaseSwitchIcon.md +138 -28
- package/dist/ai/source/BbBreadcrumbs.md +363 -69
- package/dist/ai/source/BbButton.md +563 -174
- package/dist/ai/source/BbCalendar.md +1744 -0
- package/dist/ai/source/BbCheckbox.md +470 -68
- package/dist/ai/source/BbCheckboxGroup.md +976 -95
- package/dist/ai/source/BbCollapsible.md +96 -8
- package/dist/ai/source/BbColorInput.md +597 -67
- package/dist/ai/source/BbColorPalette.md +1284 -65
- package/dist/ai/source/BbConfirm.md +149 -7
- package/dist/ai/source/BbConfirmPortal.md +89 -3
- package/dist/ai/source/BbDatePicker.md +527 -381
- package/dist/ai/source/BbDatePickerInput.md +2015 -118
- package/dist/ai/source/BbDialog.md +531 -64
- package/dist/ai/source/BbDropdown.md +885 -175
- package/dist/ai/source/BbDropdownButton.md +377 -79
- package/dist/ai/source/BbDropdownGroup.md +687 -96
- package/dist/ai/source/BbDropzone.md +140 -31
- package/dist/ai/source/BbForm.md +875 -17
- package/dist/ai/source/BbIcon.md +130 -52
- package/dist/ai/source/BbIndicator.md +117 -60
- package/dist/ai/source/BbNumberInput.md +667 -84
- package/dist/ai/source/BbOffCanvas.md +1007 -261
- package/dist/ai/source/BbPagination.md +203 -31
- package/dist/ai/source/BbPopover.md +267 -90
- package/dist/ai/source/BbProgress.md +88 -26
- package/dist/ai/source/BbPtScope.md +54 -0
- package/dist/ai/source/BbRadio.md +388 -58
- package/dist/ai/source/BbRadioGroup.md +940 -109
- package/dist/ai/source/BbRating.md +736 -84
- package/dist/ai/source/BbSelect.md +1096 -96
- package/dist/ai/source/BbSelectPopover.md +807 -114
- package/dist/ai/source/BbSlider.md +1390 -98
- package/dist/ai/source/BbSmoothHeight.md +48 -2
- package/dist/ai/source/BbSpinner.md +62 -6
- package/dist/ai/source/BbSwitch.md +297 -60
- package/dist/ai/source/BbSwitchGroup.md +761 -83
- package/dist/ai/source/BbTable.md +6950 -1864
- package/dist/ai/source/BbTabs.md +368 -111
- package/dist/ai/source/BbTabsList.md +503 -146
- package/dist/ai/source/BbTabsPanels.md +625 -0
- package/dist/ai/source/BbTabsRoot.md +319 -100
- package/dist/ai/source/BbTag.md +796 -87
- package/dist/ai/source/BbTextInput.md +497 -68
- package/dist/ai/source/BbTextarea.md +550 -65
- package/dist/ai/source/BbTimePicker.md +395 -69
- package/dist/ai/source/BbTimePickerInput.md +1233 -106
- package/dist/ai/source/BbToast.md +250 -74
- package/dist/ai/source/BbToastPortal.md +210 -66
- package/dist/ai/source/BbTooltip.md +181 -30
- package/dist/ai/source/BbTree.md +76 -11
- package/dist/ai/source/ChipsBox.md +25 -5
- package/dist/ai/source/CommaBox.md +21 -6
- package/dist/ai/source/{BbBaseInputContainer.md → CommonField.md} +467 -250
- package/dist/ai/source/CommonFieldInput.md +848 -0
- package/dist/ai/source/CommonPopover.md +116 -30
- package/dist/ai/source/CommonTimeSelector.md +726 -0
- package/dist/ai/source/ErrorIcon.md +2 -2
- package/dist/ai/source/FlatListBox.md +188 -17
- package/dist/ai/source/GroupedListBox.md +236 -44
- package/dist/ai/source/GuidesComponent.md +14 -7
- package/dist/ai/source/ListBox.md +46 -8
- package/dist/ai/source/OptionsContainer.md +288 -60
- package/dist/ai/source/WarningIcon.md +2 -2
- package/dist/assets/css/reset.css_inline.js +1 -1
- package/dist/assets/svgs/star.svg_raw.js +4 -0
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +49 -32
- package/dist/components/BbAccordion/types.d.ts +35 -3
- package/dist/components/BbAccordion/types.js +11 -0
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +46 -30
- package/dist/components/BbAlert/types.d.ts +37 -3
- package/dist/components/BbAlert/types.js +13 -0
- package/dist/components/BbAsterisk/BbAsterisk.vue.d.ts +3 -1
- package/dist/components/BbAsterisk/BbAsterisk.vue_vue_type_script_setup_true_lang.js +23 -8
- package/dist/components/BbAsterisk/types.d.ts +18 -0
- package/dist/components/BbAsterisk/types.js +7 -0
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +57 -44
- package/dist/components/BbAvatar/types.d.ts +23 -0
- package/dist/components/BbAvatar/types.js +7 -0
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -18
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +96 -53
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +27 -8
- package/dist/components/BbBadge/badgeButtonContext.d.ts +25 -8
- package/dist/components/BbBadge/types.d.ts +46 -3
- package/dist/components/BbBadge/types.js +13 -0
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +109 -96
- package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +11 -11
- package/dist/components/BbBaseButton/types.d.ts +33 -3
- package/dist/components/BbBaseButton/types.js +9 -2
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue_vue_type_script_setup_true_lang.js +50 -18
- package/dist/components/BbBaseCheckboxIcon/types.d.ts +31 -2
- package/dist/components/BbBaseCheckboxIcon/types.js +8 -0
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue_vue_type_script_setup_true_lang.js +45 -15
- package/dist/components/BbBaseRadioIcon/types.d.ts +31 -2
- package/dist/components/BbBaseRadioIcon/types.js +8 -0
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue_vue_type_script_setup_true_lang.js +48 -16
- package/dist/components/BbBaseSwitchIcon/types.d.ts +31 -2
- package/dist/components/BbBaseSwitchIcon/types.js +8 -0
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +187 -132
- package/dist/components/BbBreadcrumbs/types.d.ts +45 -3
- package/dist/components/BbBreadcrumbs/types.js +12 -0
- package/dist/components/BbButton/BbButton.vue.d.ts +5 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +107 -81
- package/dist/components/BbButton/types.d.ts +113 -2
- package/dist/components/BbButton/types.js +12 -0
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +34 -0
- package/dist/components/BbCalendar/BbCalendar.vue.js +6 -0
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +608 -0
- package/dist/components/BbCalendar/CalendarMonthPanel.vue.js +5 -0
- package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +124 -0
- package/dist/components/BbCalendar/CalendarYearPanel.vue.js +5 -0
- package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/components/BbCalendar/calendarHost.d.ts +29 -0
- package/dist/components/BbCalendar/calendarHost.js +10 -0
- package/dist/components/BbCalendar/types.d.ts +225 -0
- package/dist/components/BbCalendar/types.js +29 -0
- package/dist/components/{BbBaseDatePicker/useDatePickerContext.d.ts → BbCalendar/useCalendarContext.d.ts} +10 -7
- package/dist/components/BbCalendar/useCalendarContext.js +11 -0
- package/dist/components/BbCalendar/useCalendarGrid.d.ts +208 -0
- package/dist/components/BbCalendar/useCalendarGrid.js +274 -0
- package/dist/components/BbCalendar/useDayGrid.d.ts +79 -0
- package/dist/components/BbCalendar/useDayGrid.js +204 -0
- package/dist/components/BbCalendar/useToday.d.ts +23 -0
- package/dist/components/BbCalendar/useToday.js +21 -0
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +7 -7
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +214 -72
- package/dist/components/BbCheckbox/types.d.ts +180 -13
- package/dist/components/BbCheckbox/types.js +8 -0
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +15 -3
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +338 -90
- package/dist/components/BbCheckboxGroup/types.d.ts +195 -20
- package/dist/components/BbCheckboxGroup/types.js +10 -0
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +2 -1
- package/dist/components/BbCollapsible/BbCollapsible.vue_vue_type_script_setup_true_lang.js +41 -19
- package/dist/components/BbCollapsible/types.d.ts +44 -1
- package/dist/components/BbCollapsible/types.js +7 -0
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +17 -7
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +330 -86
- package/dist/components/BbColorInput/types.d.ts +230 -12
- package/dist/components/BbColorInput/types.js +24 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +10 -2
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +515 -108
- package/dist/components/BbColorPalette/types.d.ts +76 -7
- package/dist/components/BbColorPalette/types.js +12 -0
- package/dist/components/BbConfirm/BbConfirm.vue.d.ts +2 -1
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +125 -76
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +1 -0
- package/dist/components/BbConfirm/types.d.ts +49 -0
- package/dist/components/BbConfirm/types.js +17 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +16 -10
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +320 -223
- package/dist/components/BbDatePicker/types.d.ts +111 -17
- package/dist/components/BbDatePicker/types.js +33 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +16 -4
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +1172 -87
- package/dist/components/BbDatePickerInput/types.d.ts +224 -19
- package/dist/components/BbDatePickerInput/types.js +39 -0
- package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -3
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +227 -136
- package/dist/components/BbDialog/types.d.ts +92 -3
- package/dist/components/BbDialog/types.js +16 -0
- package/dist/components/BbDialog/useDialogStack.d.ts +12 -0
- package/dist/components/BbDialog/useDialogStack.js +9 -2
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +2 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +108 -96
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +10 -2
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +337 -268
- package/dist/components/BbDropdown/BbDropdownGroup.vue.d.ts +5 -1
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +8 -2
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +377 -293
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +129 -118
- package/dist/components/BbDropdown/normalizeGroups.js +55 -31
- package/dist/components/BbDropdown/types.d.ts +288 -30
- package/dist/components/BbDropdown/types.js +21 -2
- package/dist/components/BbDropdown/useDropdownContext.d.ts +10 -4
- package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +1 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +18 -3
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +172 -40
- package/dist/components/BbDropdownButton/types.d.ts +137 -8
- package/dist/components/BbDropdownButton/types.js +35 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +2 -2
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +186 -144
- package/dist/components/BbDropzone/types.d.ts +38 -4
- package/dist/components/BbDropzone/types.js +16 -0
- package/dist/components/BbForm/BbForm.vue.d.ts +94 -0
- package/dist/{validated → components/BbForm}/BbForm.vue.js +1 -1
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +317 -0
- package/dist/components/BbForm/BbFormCustomField.d.ts +14 -0
- package/dist/components/BbForm/BbFormCustomField.js +43 -0
- package/dist/components/BbForm/bindFormField.d.ts +16 -0
- package/dist/components/BbForm/bindFormField.js +85 -0
- package/dist/components/BbForm/formFields.d.ts +64 -0
- package/dist/components/BbForm/formFields.js +11 -0
- package/dist/components/BbForm/formSchema.d.ts +56 -0
- package/dist/components/BbForm/formSchema.js +196 -0
- package/dist/components/BbForm/standardSchema.d.ts +59 -0
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +58 -48
- package/dist/components/BbIcon/iconCache.d.ts +63 -0
- package/dist/components/BbIcon/iconCache.js +35 -0
- package/dist/components/BbIcon/types.d.ts +22 -2
- package/dist/components/BbIcon/types.js +7 -0
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +34 -21
- package/dist/components/BbIndicator/types.d.ts +24 -0
- package/dist/components/BbIndicator/types.js +7 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +12 -8
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +308 -85
- package/dist/components/BbNumberInput/types.d.ts +201 -18
- package/dist/components/BbNumberInput/types.js +8 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +311 -210
- package/dist/components/BbOffCanvas/types.d.ts +79 -6
- package/dist/components/BbOffCanvas/types.js +15 -0
- package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +125 -90
- package/dist/components/BbPagination/types.d.ts +38 -0
- package/dist/components/BbPagination/types.js +13 -0
- package/dist/components/BbPopover/BbPopover.vue.d.ts +4 -4
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +219 -179
- package/dist/components/BbPopover/types.d.ts +51 -5
- package/dist/components/BbPopover/types.js +14 -0
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +29 -16
- package/dist/components/BbProgress/types.d.ts +25 -0
- package/dist/components/BbProgress/types.js +7 -0
- package/dist/components/BbPtScope/BbPtScope.vue.d.ts +12 -0
- package/dist/components/BbPtScope/BbPtScope.vue.js +5 -0
- package/dist/components/BbPtScope/BbPtScope.vue_vue_type_script_setup_true_lang.js +13 -0
- package/dist/components/BbPtScope/types.d.ts +15 -0
- package/dist/components/BbRadio/BbRadio.vue.d.ts +7 -7
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +172 -59
- package/dist/components/BbRadio/types.d.ts +152 -13
- package/dist/components/BbRadio/types.js +8 -0
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +14 -2
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +319 -92
- package/dist/components/BbRadioGroup/types.d.ts +198 -22
- package/dist/components/BbRadioGroup/types.js +10 -0
- package/dist/components/BbRating/BbRating.vue.d.ts +10 -8
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +259 -78
- package/dist/components/BbRating/types.d.ts +174 -13
- package/dist/components/BbRating/types.js +21 -0
- package/dist/components/BbSelect/BbSelect.vue.d.ts +17 -3
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +553 -83
- package/dist/components/BbSelect/types.d.ts +235 -20
- package/dist/components/BbSelect/types.js +41 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +15 -1
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +541 -391
- package/dist/components/BbSelectPopover/types.d.ts +124 -8
- package/dist/components/BbSelectPopover/types.js +24 -0
- package/dist/components/BbSlider/BbSlider.vue.d.ts +13 -8
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +472 -96
- package/dist/components/BbSlider/types.d.ts +202 -13
- package/dist/components/BbSlider/types.js +26 -0
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue_vue_type_script_setup_true_lang.js +60 -48
- package/dist/components/BbSmoothHeight/types.d.ts +19 -0
- package/dist/components/BbSmoothHeight/types.js +7 -0
- package/dist/components/BbSpinner/BbSpinner.vue_vue_type_script_setup_true_lang.js +27 -14
- package/dist/components/BbSpinner/types.d.ts +22 -1
- package/dist/components/BbSpinner/types.js +7 -0
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +7 -7
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +220 -78
- package/dist/components/BbSwitch/types.d.ts +25 -10
- package/dist/components/BbSwitch/types.js +5 -0
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +14 -2
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +338 -90
- package/dist/components/BbSwitchGroup/types.d.ts +30 -7
- package/dist/components/BbSwitchGroup/types.js +5 -0
- package/dist/components/BbTable/BbTable.vue.d.ts +27 -6
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +2013 -685
- package/dist/components/BbTable/BbTableDataRow.d.ts +196 -0
- package/dist/components/BbTable/BbTableDataRow.js +151 -0
- package/dist/components/BbTable/BbTableExpandRow.d.ts +84 -0
- package/dist/components/BbTable/BbTableExpandRow.js +62 -0
- package/dist/components/BbTable/BbTableSelectToggle.d.ts +120 -0
- package/dist/components/BbTable/BbTableSelectToggle.js +122 -0
- package/dist/components/BbTable/gridWidgets.d.ts +30 -0
- package/dist/components/BbTable/gridWidgets.js +14 -0
- package/dist/components/BbTable/types.d.ts +473 -123
- package/dist/components/BbTable/types.js +31 -0
- package/dist/components/BbTable/utils.d.ts +145 -4
- package/dist/components/BbTable/utils.js +154 -37
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -1
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +62 -26
- package/dist/components/BbTabs/BbTabsList.vue.d.ts +3 -10
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +143 -81
- package/dist/components/BbTabs/BbTabsPanels.vue.d.ts +12 -0
- package/dist/components/{BbBaseSwitch/BbBaseSwitch.vue.js → BbTabs/BbTabsPanels.vue.js} +2 -2
- package/dist/components/BbTabs/BbTabsPanels.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/components/BbTabs/BbTabsRoot.vue.d.ts +3 -1
- package/dist/components/BbTabs/BbTabsRoot.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbTabs/types.d.ts +183 -23
- package/dist/components/BbTabs/types.js +34 -0
- package/dist/components/BbTag/BbTag.vue.d.ts +13 -10
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +383 -92
- package/dist/components/BbTag/types.d.ts +139 -14
- package/dist/components/BbTag/types.js +22 -0
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +10 -8
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +257 -84
- package/dist/components/BbTextInput/types.d.ts +168 -13
- package/dist/components/BbTextInput/types.js +8 -0
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +7 -7
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +291 -94
- package/dist/components/BbTextarea/types.d.ts +158 -14
- package/dist/components/BbTextarea/types.js +8 -0
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +12 -4
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +199 -122
- package/dist/components/BbTimePicker/types.d.ts +94 -7
- package/dist/components/BbTimePicker/types.js +18 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +14 -4
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +749 -86
- package/dist/components/BbTimePickerInput/types.d.ts +171 -22
- package/dist/components/BbTimePickerInput/types.js +25 -0
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +63 -25
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +4 -1
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -76
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +1 -0
- package/dist/components/BbToast/BbToastRegion.vue.d.ts +4 -1
- package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +72 -64
- package/dist/components/BbToast/types.d.ts +54 -1
- package/dist/components/BbToast/types.js +28 -0
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +104 -87
- package/dist/components/BbTooltip/types.d.ts +40 -2
- package/dist/components/BbTooltip/types.js +7 -0
- package/dist/components/BbTree/BbTree.vue.d.ts +15 -3
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +51 -29
- package/dist/components/BbTree/BbTreeLevel.vue.d.ts +1 -1
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +17 -16
- package/dist/components/BbTree/context.d.ts +9 -1
- package/dist/components/BbTree/types.d.ts +40 -5
- package/dist/components/BbTree/types.js +7 -0
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +46 -44
- package/dist/components/ChipsBox/types.d.ts +7 -0
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/CommaBox/CommaBox.vue_vue_type_script_setup_true_lang.js +11 -7
- package/dist/components/CommaBox/types.d.ts +7 -0
- package/dist/components/{BbBaseInputContainer/BbBaseInputContainer.vue.d.ts → CommonField/CommonField.vue.d.ts} +5 -5
- package/dist/components/{BbBaseRadio/BbBaseRadio.vue.js → CommonField/CommonField.vue.js} +2 -2
- package/dist/components/CommonField/CommonField.vue_vue_type_script_setup_true_lang.js +189 -0
- package/dist/components/CommonField/messageHeightMatrix.d.ts +2 -0
- package/dist/components/{BbBaseInputContainer → CommonField}/types.d.ts +52 -16
- package/dist/components/{CommonInputWrapper/CommonInputWrapper.vue.d.ts → CommonFieldInput/CommonFieldInput.vue.d.ts} +5 -4
- package/dist/components/{BbBaseRadioGroup/BbBaseRadioGroup.vue.js → CommonFieldInput/CommonFieldInput.vue.js} +2 -2
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +120 -0
- package/dist/components/CommonFieldInput/boxBorderMatrix.d.ts +10 -0
- package/dist/components/{CommonInputWrapper → CommonFieldInput}/types.d.ts +27 -8
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +11 -2
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +76 -63
- package/dist/components/CommonPopover/types.d.ts +27 -8
- package/dist/components/{BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.d.ts → CommonTimeSelector/CommonTimeSelector.vue.d.ts} +21 -2
- package/dist/components/{BbBaseColorPalette/BbBaseColorPalette.vue.js → CommonTimeSelector/CommonTimeSelector.vue.js} +2 -2
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +232 -0
- package/dist/components/CommonTimeSelector/types.d.ts +6 -0
- package/dist/components/FlatListBox/FlatListBox.vue.d.ts +5 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +165 -95
- package/dist/components/FlatListBox/types.d.ts +24 -2
- package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +5 -1
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +217 -134
- package/dist/components/GroupedListBox/types.d.ts +24 -2
- package/dist/components/ListBox/ListBox.vue.d.ts +5 -1
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +95 -69
- package/dist/components/ListBox/types.d.ts +24 -2
- package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +1 -1
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +109 -37
- package/dist/components/OptionsContainer/types.d.ts +53 -9
- package/dist/components/Transitions/ScaleFade.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/Transitions/Slide.vue.js +1 -1
- package/dist/composables/useBaseOptions.d.ts +12 -1
- package/dist/composables/useBaseOptions.js +77 -37
- package/dist/composables/useBbConfig.d.ts +27 -6
- package/dist/composables/useBbConfig.js +8 -2
- package/dist/composables/useBbDropdownContext.d.ts +5 -0
- package/dist/composables/useBbFormContext.d.ts +131 -8
- package/dist/composables/useBbFormContext.js +49 -30
- package/dist/composables/useBbFormField.d.ts +40 -0
- package/dist/composables/useBbFormField.js +39 -0
- package/dist/composables/useBbTableContext.d.ts +45 -1
- package/dist/composables/useBbTableContext.js +93 -87
- package/dist/composables/useBbTabsContext.d.ts +15 -9
- package/dist/composables/useBbTabsContext.js +121 -90
- package/dist/composables/useClosingInert.d.ts +4 -4
- package/dist/composables/useCoarsePointer.js +7 -10
- package/dist/composables/useCoherence.js +1 -1
- package/dist/composables/useConfig.d.ts +59 -0
- package/dist/composables/useConfig.js +15 -0
- package/dist/composables/useConfirm.d.ts +39 -7
- package/dist/composables/useConfirm.js +50 -41
- package/dist/composables/useEscapeStackEntry.d.ts +13 -0
- package/dist/composables/useEscapeStackEntry.js +16 -0
- package/dist/composables/useFormBinding.d.ts +116 -0
- package/dist/composables/useFormBinding.js +34 -0
- package/dist/composables/useHydrated.d.ts +18 -0
- package/dist/composables/useHydrated.js +13 -7
- package/dist/composables/useId.d.ts +4 -3
- package/dist/composables/useId.js +1 -7
- package/dist/composables/useItemsGetter.d.ts +11 -0
- package/dist/composables/useItemsGetter.js +44 -18
- package/dist/composables/useKeyboardInset.d.ts +28 -0
- package/dist/composables/useKeyboardInset.js +32 -0
- package/dist/composables/useLocale.js +10 -7
- package/dist/composables/useMobile.js +7 -10
- package/dist/composables/usePassthrough.d.ts +228 -0
- package/dist/composables/usePassthrough.js +247 -0
- package/dist/composables/usePrefill.d.ts +22 -2
- package/dist/composables/usePrefill.js +35 -19
- package/dist/composables/useSafeAreaInternal.js +1 -1
- package/dist/composables/useSegmentedFields.d.ts +2 -2
- package/dist/composables/useSsrState.d.ts +20 -0
- package/dist/composables/useSsrState.js +13 -0
- package/dist/composables/useTableWidthContext.d.ts +24 -4
- package/dist/composables/useTableWidthContext.js +31 -28
- package/dist/composables/useToast.d.ts +18 -1
- package/dist/composables/useToast.js +31 -18
- package/dist/composables/useToggleInput.d.ts +44 -0
- package/dist/composables/useToggleInput.js +39 -0
- package/dist/composables/useViewportWidth.d.ts +5 -25
- package/dist/composables/useViewportWidth.js +14 -7
- package/dist/deprecation/ai-deprecations.json.d.ts +1977 -289
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/deprecation/removedProps.js +9 -4
- package/dist/directives/bbDropdown.d.ts +15 -4
- package/dist/directives/bbDropdown.js +31 -9
- package/dist/directives/bbTooltip.d.ts +6 -0
- package/dist/directives/createPopoverDirective.d.ts +62 -0
- package/dist/directives/createPopoverDirective.js +92 -37
- package/dist/i18n/index.d.ts +10 -16
- package/dist/i18n/locales/cs.json +9 -5
- package/dist/i18n/locales/da.json +9 -5
- package/dist/i18n/locales/de.json +9 -5
- package/dist/i18n/locales/el.json +9 -5
- package/dist/i18n/locales/en.json +9 -5
- package/dist/i18n/locales/es.json +9 -5
- package/dist/i18n/locales/fi.json +9 -5
- package/dist/i18n/locales/fr.json +9 -5
- package/dist/i18n/locales/hu.json +9 -5
- package/dist/i18n/locales/it.json +9 -5
- package/dist/i18n/locales/ja.json +9 -5
- package/dist/i18n/locales/ko.json +9 -5
- package/dist/i18n/locales/nb.json +9 -5
- package/dist/i18n/locales/nl.json +9 -5
- package/dist/i18n/locales/pl.json +9 -5
- package/dist/i18n/locales/pt.json +9 -5
- package/dist/i18n/locales/ro.json +9 -5
- package/dist/i18n/locales/ru.json +9 -5
- package/dist/i18n/locales/sv.json +9 -5
- package/dist/i18n/locales/tr.json +9 -5
- package/dist/i18n/locales/uk.json +9 -5
- package/dist/i18n/locales/zh-cn.json +9 -5
- 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/index.d.ts +40 -21
- package/dist/index.js +78 -71
- package/dist/llms-full.txt +61164 -27972
- package/dist/llms-medium.txt +1482 -366
- package/dist/llms.txt +32 -15
- package/dist/locale-blueprint.json +9 -5
- package/dist/nuxt-auto-imports.d.ts +76 -0
- package/dist/nuxt-auto-imports.js +32 -0
- package/dist/nuxt-module.d.ts +30 -15
- package/dist/nuxt.js +35 -9
- package/dist/passthrough-deduper.js +5 -0
- package/dist/plugin.d.ts +10 -1
- package/dist/plugin.js +29 -19
- package/dist/project-dts.d.ts +84 -0
- package/dist/project-dts.js +170 -0
- package/dist/reset.css +1 -1
- package/dist/runtime/nuxt-plugin.js +34 -21
- package/dist/styles.css +3 -2
- package/dist/types/AlertVariant.d.ts +10 -1
- package/dist/types/BadgeVariant.d.ts +16 -5
- package/dist/types/ButtonVariant.d.ts +12 -1
- package/dist/types/ColumnName.d.ts +30 -3
- package/dist/types/CommonProps.d.ts +2 -2
- package/dist/types/Config.d.ts +94 -1
- package/dist/types/ConfirmVariant.d.ts +8 -1
- package/dist/types/DropdownItemVariant.d.ts +8 -1
- package/dist/types/FieldLayout.d.ts +32 -0
- package/dist/types/IndicatorVariant.d.ts +11 -1
- package/dist/types/InputVariant.d.ts +30 -0
- package/dist/types/ItemProps.d.ts +50 -0
- package/dist/types/Option.d.ts +6 -0
- package/dist/types/PtScope.d.ts +15 -0
- package/dist/types/RegistryKey.d.ts +10 -0
- package/dist/types/TabsVariant.d.ts +25 -0
- package/dist/types/ToastVariant.d.ts +12 -2
- package/dist/types/TooltipVariant.d.ts +8 -1
- package/dist/types/passthrough.d.ts +362 -0
- package/dist/types/passthrough.js +78 -0
- package/dist/types/ptComponentMap.d.ts +62 -0
- package/dist/utilities/functions/hasVnodeListener.d.ts +16 -0
- package/dist/utilities/functions/hasVnodeListener.js +12 -0
- package/dist/utilities/functions/isImeComposing.d.ts +7 -0
- package/dist/utilities/functions/isImeComposing.js +4 -0
- package/dist/utilities/functions/itemProps.d.ts +46 -0
- package/dist/utilities/functions/itemProps.js +47 -0
- package/dist/utilities/functions/slotKey.d.ts +13 -8
- package/dist/utilities/functions/slotKey.js +78 -2
- package/dist/utilities/functions/snapToStep.js +2 -1
- package/dist/utilities/functions/toggleInput.d.ts +98 -0
- package/dist/utilities/functions/toggleInput.js +56 -0
- package/dist/utilities/functions/warnRemovedAttrs.d.ts +27 -1
- package/dist/utilities/functions/warnRemovedAttrs.js +75 -14
- package/dist/utilities/misc/listboxMetrics.d.ts +9 -3
- package/dist/utilities/misc/listboxMetrics.js +5 -2
- package/dist/utilities/misc/ssrStateInjectionKey.d.ts +42 -0
- package/dist/utilities/misc/ssrStateInjectionKey.js +4 -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/utils/overlayEscapeStack.d.ts +10 -0
- package/dist/utils/overlayEscapeStack.js +5 -3
- package/dist/utils/passthrough.d.ts +67 -0
- package/dist/utils/passthrough.js +100 -0
- package/dist/utils/passthroughDeduper.d.ts +2 -0
- package/dist/utils/ptScope.d.ts +8 -0
- package/dist/utils/ptScope.js +4 -0
- package/dist/utils/versionCheck.d.ts +19 -0
- package/dist/utils/versionCheck.js +18 -0
- package/dist/vite-plugin.d.ts +301 -53
- package/dist/vite.js +547 -375
- package/llms.txt +33 -16
- package/package.json +49 -27
- package/scripts/lib/check-fix.mjs +129 -0
- package/scripts/lib/component-attr-targets.ts +123 -0
- package/scripts/lib/component-tree.ts +648 -0
- package/scripts/lib/css-class-check.mjs +326 -0
- package/scripts/lib/css-class-surface.mjs +292 -0
- package/scripts/lib/css-color-resolve.mjs +172 -0
- package/scripts/lib/css-local-check.mjs +267 -0
- package/scripts/lib/design-token-manifest.mjs +499 -0
- package/scripts/lib/doc-sections.mjs +248 -0
- package/scripts/lib/ensure-manifest.mjs +28 -5
- package/scripts/lib/eslint-disable.mjs +141 -0
- package/scripts/lib/eslint-plugin.d.ts +64 -1
- package/scripts/lib/eslint-plugin.mjs +1285 -30
- package/scripts/lib/hand-imported-styles.mjs +326 -0
- package/scripts/lib/hand-roll-hints.mjs +50 -6
- package/scripts/lib/html-attributes.mjs +353 -0
- package/scripts/lib/local-components.mjs +177 -0
- package/scripts/lib/mcp-config.mjs +87 -58
- package/scripts/lib/migrate-fix.mjs +62 -3
- package/scripts/lib/project-variant-dts.mjs +122 -0
- package/scripts/lib/public-type-exports.mjs +273 -0
- package/scripts/lib/slot-key.mjs +147 -0
- package/scripts/lib/slot-renames.mjs +46 -0
- package/scripts/lib/squashed-slot-words.mjs +133 -0
- package/scripts/lib/validate-bb-markup.mjs +2213 -76
- package/scripts/lib/wrapper-props.mjs +188 -0
- package/dist/ai/BbBaseCheckbox.md +0 -49
- package/dist/ai/BbBaseCheckboxGroup.md +0 -64
- package/dist/ai/BbBaseColorInput.md +0 -65
- package/dist/ai/BbBaseColorPalette.md +0 -39
- package/dist/ai/BbBaseDatePicker.md +0 -43
- package/dist/ai/BbBaseDatePickerInput.md +0 -73
- package/dist/ai/BbBaseInputContainer.md +0 -48
- package/dist/ai/BbBaseNumberInput.md +0 -71
- package/dist/ai/BbBaseRadio.md +0 -46
- package/dist/ai/BbBaseRadioGroup.md +0 -64
- package/dist/ai/BbBaseRating.md +0 -52
- package/dist/ai/BbBaseSelect.md +0 -88
- package/dist/ai/BbBaseSlider.md +0 -56
- package/dist/ai/BbBaseSwitch.md +0 -49
- package/dist/ai/BbBaseSwitchGroup.md +0 -64
- package/dist/ai/BbBaseTag.md +0 -68
- package/dist/ai/BbBaseTextInput.md +0 -75
- package/dist/ai/BbBaseTextarea.md +0 -62
- package/dist/ai/BbBaseTimePickerInput.md +0 -62
- package/dist/ai/BbTabsPanes.md +0 -27
- package/dist/ai/CommonInputWrapper.md +0 -42
- package/dist/ai/source/BbBaseCheckbox.md +0 -461
- package/dist/ai/source/BbBaseCheckboxGroup.md +0 -554
- package/dist/ai/source/BbBaseColorInput.md +0 -431
- package/dist/ai/source/BbBaseColorPalette.md +0 -942
- package/dist/ai/source/BbBaseDatePicker.md +0 -1448
- package/dist/ai/source/BbBaseDatePickerInput.md +0 -1940
- package/dist/ai/source/BbBaseNumberInput.md +0 -617
- package/dist/ai/source/BbBaseRadio.md +0 -381
- package/dist/ai/source/BbBaseRadioGroup.md +0 -539
- package/dist/ai/source/BbBaseRating.md +0 -607
- package/dist/ai/source/BbBaseSelect.md +0 -945
- package/dist/ai/source/BbBaseSlider.md +0 -1144
- package/dist/ai/source/BbBaseSwitch.md +0 -246
- package/dist/ai/source/BbBaseSwitchGroup.md +0 -302
- package/dist/ai/source/BbBaseTag.md +0 -694
- package/dist/ai/source/BbBaseTextInput.md +0 -511
- package/dist/ai/source/BbBaseTextarea.md +0 -504
- package/dist/ai/source/BbBaseTimePickerInput.md +0 -1037
- package/dist/ai/source/BbTabsPanes.md +0 -377
- package/dist/ai/source/CommonInputWrapper.md +0 -584
- package/dist/alert-variants.d.ts +0 -19
- package/dist/assets/svgs/sort.svg_raw.js +0 -4
- package/dist/badge-variants.d.ts +0 -19
- package/dist/button-variants.d.ts +0 -21
- package/dist/components/BbBadge/BadgeAppendIcon.vue.d.ts +0 -3
- package/dist/components/BbBadge/BadgeAppendIcon.vue.js +0 -5
- package/dist/components/BbBadge/BadgeAppendIcon.vue_vue_type_script_setup_true_lang.js +0 -22
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.d.ts +0 -40
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.js +0 -6
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue_vue_type_script_setup_true_lang.js +0 -145
- package/dist/components/BbBaseCheckbox/types.d.ts +0 -224
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.js +0 -6
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseCheckboxGroup/types.d.ts +0 -257
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.d.ts +0 -43
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.js +0 -6
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue_vue_type_script_setup_true_lang.js +0 -184
- package/dist/components/BbBaseColorInput/types.d.ts +0 -219
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue.d.ts +0 -13
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue_vue_type_script_setup_true_lang.js +0 -395
- package/dist/components/BbBaseColorPalette/types.d.ts +0 -40
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.d.ts +0 -20
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.js +0 -6
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +0 -407
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +0 -47
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +0 -318
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +0 -115
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue_vue_type_script_setup_true_lang.js +0 -116
- package/dist/components/BbBaseDatePicker/types.d.ts +0 -108
- package/dist/components/BbBaseDatePicker/useDatePickerContext.js +0 -11
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +0 -31
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.js +0 -6
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +0 -737
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.js +0 -6
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue_vue_type_script_setup_true_lang.js +0 -204
- package/dist/components/BbBaseDatePickerInput/types.d.ts +0 -325
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.js +0 -6
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.d.ts +0 -52
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.js +0 -6
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue_vue_type_script_setup_true_lang.js +0 -215
- package/dist/components/BbBaseNumberInput/types.d.ts +0 -211
- package/dist/components/BbBaseRadio/BbBaseRadio.vue.d.ts +0 -33
- package/dist/components/BbBaseRadio/BbBaseRadio.vue_vue_type_script_setup_true_lang.js +0 -113
- package/dist/components/BbBaseRadio/types.d.ts +0 -179
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +0 -179
- package/dist/components/BbBaseRadioGroup/types.d.ts +0 -223
- package/dist/components/BbBaseRating/BbBaseRating.vue.d.ts +0 -38
- package/dist/components/BbBaseRating/BbBaseRating.vue.js +0 -6
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +0 -192
- package/dist/components/BbBaseRating/types.d.ts +0 -176
- package/dist/components/BbBaseSelect/BbBaseSelect.vue.d.ts +0 -19
- package/dist/components/BbBaseSelect/BbBaseSelect.vue.js +0 -6
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +0 -311
- package/dist/components/BbBaseSelect/types.d.ts +0 -297
- package/dist/components/BbBaseSlider/BbBaseSlider.vue.d.ts +0 -35
- package/dist/components/BbBaseSlider/BbBaseSlider.vue.js +0 -6
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +0 -340
- package/dist/components/BbBaseSlider/types.d.ts +0 -200
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue.d.ts +0 -35
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue_vue_type_script_setup_true_lang.js +0 -146
- package/dist/components/BbBaseSwitch/types.d.ts +0 -10
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.js +0 -6
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseSwitchGroup/types.d.ts +0 -8
- package/dist/components/BbBaseTag/BbBaseTag.vue.d.ts +0 -50
- package/dist/components/BbBaseTag/BbBaseTag.vue.js +0 -6
- package/dist/components/BbBaseTag/BbBaseTag.vue_vue_type_script_setup_true_lang.js +0 -266
- package/dist/components/BbBaseTag/types.d.ts +0 -160
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.d.ts +0 -45
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.js +0 -6
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue_vue_type_script_setup_true_lang.js +0 -200
- package/dist/components/BbBaseTextInput/types.d.ts +0 -209
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.d.ts +0 -39
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.js +0 -6
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue_vue_type_script_setup_true_lang.js +0 -187
- package/dist/components/BbBaseTextarea/types.d.ts +0 -170
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.d.ts +0 -27
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.js +0 -6
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +0 -519
- package/dist/components/BbBaseTimePickerInput/types.d.ts +0 -151
- package/dist/components/BbTabs/BbTabsPanes.vue.d.ts +0 -16
- package/dist/components/BbTabs/BbTabsPanes.vue.js +0 -6
- package/dist/components/BbTabs/BbTabsPanes.vue_vue_type_script_setup_true_lang.js +0 -35
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue.js +0 -6
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue_vue_type_script_setup_true_lang.js +0 -107
- package/dist/confirm-variants.d.ts +0 -17
- package/dist/dropdown-item-variants.d.ts +0 -17
- package/dist/indicator-variants.d.ts +0 -20
- package/dist/locale-registry.d.ts +0 -37
- package/dist/toast-variants.d.ts +0 -20
- package/dist/tooltip-variants.d.ts +0 -17
- package/dist/types/InputDirection.d.ts +0 -15
- package/dist/validated/BbCheckbox.vue.d.ts +0 -29
- package/dist/validated/BbCheckbox.vue.js +0 -5
- package/dist/validated/BbCheckbox.vue_vue_type_script_setup_true_lang.js +0 -75
- package/dist/validated/BbCheckboxGroup.vue.d.ts +0 -34
- package/dist/validated/BbCheckboxGroup.vue.js +0 -5
- package/dist/validated/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +0 -82
- package/dist/validated/BbColorInput.vue.d.ts +0 -37
- package/dist/validated/BbColorInput.vue.js +0 -5
- package/dist/validated/BbColorInput.vue_vue_type_script_setup_true_lang.js +0 -75
- package/dist/validated/BbDatePickerInput.vue.d.ts +0 -41
- package/dist/validated/BbDatePickerInput.vue.js +0 -5
- package/dist/validated/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +0 -90
- package/dist/validated/BbDropzone.vue.d.ts +0 -24
- package/dist/validated/BbDropzone.vue.js +0 -5
- package/dist/validated/BbDropzone.vue_vue_type_script_setup_true_lang.js +0 -45
- package/dist/validated/BbForm.vue.d.ts +0 -28
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +0 -42
- package/dist/validated/BbNumberInput.vue.d.ts +0 -36
- package/dist/validated/BbNumberInput.vue.js +0 -5
- package/dist/validated/BbNumberInput.vue_vue_type_script_setup_true_lang.js +0 -72
- package/dist/validated/BbRadioGroup.vue.d.ts +0 -34
- package/dist/validated/BbRadioGroup.vue.js +0 -5
- package/dist/validated/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +0 -78
- package/dist/validated/BbRating.vue.d.ts +0 -30
- package/dist/validated/BbRating.vue.js +0 -5
- package/dist/validated/BbRating.vue_vue_type_script_setup_true_lang.js +0 -63
- package/dist/validated/BbSelect.vue.d.ts +0 -46
- package/dist/validated/BbSelect.vue.js +0 -5
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +0 -109
- package/dist/validated/BbSlider.vue.d.ts +0 -36
- package/dist/validated/BbSlider.vue.js +0 -5
- package/dist/validated/BbSlider.vue_vue_type_script_setup_true_lang.js +0 -69
- package/dist/validated/BbSwitch.vue.d.ts +0 -29
- package/dist/validated/BbSwitch.vue.js +0 -5
- package/dist/validated/BbSwitch.vue_vue_type_script_setup_true_lang.js +0 -75
- package/dist/validated/BbSwitchGroup.vue.d.ts +0 -34
- package/dist/validated/BbSwitchGroup.vue.js +0 -5
- package/dist/validated/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +0 -82
- package/dist/validated/BbTag.vue.d.ts +0 -36
- package/dist/validated/BbTag.vue.js +0 -5
- package/dist/validated/BbTag.vue_vue_type_script_setup_true_lang.js +0 -72
- package/dist/validated/BbTextInput.vue.d.ts +0 -36
- package/dist/validated/BbTextInput.vue.js +0 -5
- package/dist/validated/BbTextInput.vue_vue_type_script_setup_true_lang.js +0 -72
- package/dist/validated/BbTextarea.vue.d.ts +0 -36
- package/dist/validated/BbTextarea.vue.js +0 -5
- package/dist/validated/BbTextarea.vue_vue_type_script_setup_true_lang.js +0 -70
- package/dist/validated/BbTimePickerInput.vue.d.ts +0 -37
- package/dist/validated/BbTimePickerInput.vue.js +0 -5
- package/dist/validated/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +0 -81
- package/dist/validated/index.d.ts +0 -43
- package/dist/validated/useValidatedField.d.ts +0 -93
- package/dist/validated/useValidatedField.js +0 -51
- package/dist/validated.js +0 -21
- /package/dist/components/{BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.d.ts → BbCalendar/CalendarMonthPanel.vue.d.ts} +0 -0
- /package/dist/components/{BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.d.ts → BbCalendar/CalendarYearPanel.vue.d.ts} +0 -0
- /package/dist/{components/BbBaseDatePicker/typeahead.d.ts → composables/useTypeahead.d.ts} +0 -0
- /package/dist/{components/BbBaseDatePicker/typeahead.js → composables/useTypeahead.js} +0 -0
package/dist/ai/BbTabs.md
CHANGED
|
@@ -4,10 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
- Safety level: **Consumer API**
|
|
6
6
|
- Group: **Navigation**
|
|
7
|
-
- Description: Switches between tabbed content views (shadcn-like strip;
|
|
7
|
+
- Description: Switches between tabbed content views (shadcn-like strip; the co-located BbTabsRoot / BbTabsList / BbTabsPanels exports enable split layouts).
|
|
8
8
|
- Usage rule: Prefer this component for consumer-facing implementations.
|
|
9
9
|
- Implementation source (only when the contract below is not enough): [source/BbTabs.md](./source/BbTabs.md)
|
|
10
10
|
|
|
11
|
+
## Reachable through `BbTabs`
|
|
12
|
+
|
|
13
|
+
`BbTabs` mounts other components (all of them: _Component tree_, near the end). These are the parts of its API that land inside them. Prefer these over `:deep()` on an inner class (allowed, unsupported: it can break on upgrade) — and never an import of an internal component.
|
|
14
|
+
|
|
15
|
+
| pt part | Lands on | In |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| `pt:list` | `ul.bb-tabs-list__list` | `BbTabsList` ([contract](./BbTabsList.md)) |
|
|
18
|
+
| `pt:indicator` | `li.bb-tabs-list__indicator` | `BbTabsList` ([contract](./BbTabsList.md)) |
|
|
19
|
+
| `pt:item` | the root of `BbBaseButton` | `BbBaseButton` ([contract](./BbBaseButton.md)) |
|
|
20
|
+
| `pt:panel` | `section.bb-tabs__panel` | `BbTabsPanels` ([contract](./BbTabsPanels.md)) |
|
|
21
|
+
|
|
11
22
|
## Usage & Guidelines
|
|
12
23
|
|
|
13
24
|
### When to use
|
|
@@ -28,29 +39,38 @@ The library ships the tabs family in two shapes with one shared API and one
|
|
|
28
39
|
shared context:
|
|
29
40
|
|
|
30
41
|
- **`BbTabs`** — batteries-included: the trigger strip immediately followed by
|
|
31
|
-
its
|
|
32
|
-
- **`BbTabsRoot` + `BbTabsList` + `
|
|
33
|
-
can place arbitrary markup between the strip and the
|
|
42
|
+
its panels. Reach for it by default.
|
|
43
|
+
- **`BbTabsRoot` + `BbTabsList` + `BbTabsPanels`** — the same state, split so you
|
|
44
|
+
can place arbitrary markup between the strip and the panels. Reach for it only
|
|
34
45
|
when the layout demands it.
|
|
35
46
|
|
|
36
|
-
### Tabs with a
|
|
47
|
+
### Tabs with a panel per key
|
|
37
48
|
|
|
38
49
|
Pass `items` (`{ key, label }`), bind the active key with `v-model`, and provide
|
|
39
|
-
one slot named for each item `key` — that is the
|
|
50
|
+
one slot named for each item `key` — that is the panel. Slot names go through
|
|
51
|
+
`slotKey`, which is kebab-case: words split at separators, camelCase humps and
|
|
52
|
+
digits, lowercased, joined by `-`. So key `'Billing info'` or `'billing_info'`
|
|
53
|
+
is the panel `#billing-info` (and its label `#label:billing-info`), `'inReview'`
|
|
54
|
+
is `#in-review`, and `'2026-10-06'` stays `#2026-10-06`. A computed name needs
|
|
55
|
+
the same treatment: a `<template v-for="stage in stages" #[stage]>` over
|
|
56
|
+
`'inReview'` fills `#inReview` while the tab reads `#in-review`, so the panel
|
|
57
|
+
stays empty. Write `#[slotKey(stage)]` (`slotKey` is exported from
|
|
58
|
+
`bitboss-ui`), which is also the safe spelling for any key with accents,
|
|
59
|
+
non-Latin letters or punctuation; `bitboss-ui check` flags the raw form when
|
|
60
|
+
`stages` is a literal array in the same file. With no
|
|
61
|
+
`v-model` the
|
|
40
62
|
first enabled tab is selected for you (a `modelValue` of `null` behaves the same
|
|
41
|
-
way). `BbTabs` is the batteries-included form: the trigger strip and its
|
|
63
|
+
way). `BbTabs` is the batteries-included form: the trigger strip and its panels
|
|
42
64
|
in one component.
|
|
43
65
|
|
|
44
|
-
**A tab strip and its
|
|
66
|
+
**A tab strip and its panels**
|
|
45
67
|
|
|
46
68
|
```vue
|
|
47
69
|
<template>
|
|
48
|
-
<div
|
|
49
|
-
class="max-w-md rounded-[var(--bb-radius)] border border-[color:var(--bb-border)] p-3"
|
|
50
|
-
>
|
|
70
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
51
71
|
<div class="mb-3 flex flex-col gap-0.5">
|
|
52
72
|
<p class="text-sm font-medium">Acme Checkout</p>
|
|
53
|
-
<p class="text-xs text-
|
|
73
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
54
74
|
Project · last deploy 14m ago
|
|
55
75
|
</p>
|
|
56
76
|
</div>
|
|
@@ -58,34 +78,34 @@ in one component.
|
|
|
58
78
|
<template #overview>
|
|
59
79
|
<div class="grid gap-1.5 pt-3 text-sm">
|
|
60
80
|
<p class="font-medium">Health: stable</p>
|
|
61
|
-
<p class="text-xs text-
|
|
81
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
62
82
|
Error rate 0.12% · p95 180ms · 3 open incidents
|
|
63
83
|
</p>
|
|
64
84
|
</div>
|
|
65
85
|
</template>
|
|
66
86
|
<template #activity>
|
|
67
|
-
<ul class="divide-y divide-
|
|
87
|
+
<ul class="divide-y divide-(--bb-border) pt-3">
|
|
68
88
|
<li
|
|
69
89
|
v-for="event in activity"
|
|
70
90
|
:key="event.id"
|
|
71
91
|
class="flex flex-col gap-0.5 py-2"
|
|
72
92
|
>
|
|
73
93
|
<p class="text-sm">{{ event.text }}</p>
|
|
74
|
-
<p class="text-xs text-
|
|
94
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
75
95
|
{{ event.when }}
|
|
76
96
|
</p>
|
|
77
97
|
</li>
|
|
78
98
|
</ul>
|
|
79
99
|
</template>
|
|
80
100
|
<template #members>
|
|
81
|
-
<ul class="divide-y divide-
|
|
101
|
+
<ul class="divide-y divide-(--bb-border) pt-3">
|
|
82
102
|
<li
|
|
83
103
|
v-for="member in members"
|
|
84
104
|
:key="member.email"
|
|
85
105
|
class="flex items-center justify-between gap-2 py-2 text-sm"
|
|
86
106
|
>
|
|
87
107
|
<span class="truncate">{{ member.name }}</span>
|
|
88
|
-
<span class="shrink-0 text-xs text-
|
|
108
|
+
<span class="shrink-0 text-xs text-(--bb-text-muted)">{{
|
|
89
109
|
member.role
|
|
90
110
|
}}</span>
|
|
91
111
|
</li>
|
|
@@ -130,29 +150,27 @@ with the new key whenever the selection changes — from a click, a keyboard mov
|
|
|
130
150
|
URL navigation, or the companion composable — and it emits once on mount when a
|
|
131
151
|
URL query or the first-enabled fallback resolves a key the parent didn't set, so
|
|
132
152
|
your binding starts aligned. You rarely listen to the event directly; bind
|
|
133
|
-
`v-model` and read it. When `items` is generated, drive the
|
|
153
|
+
`v-model` and read it. When `items` is generated, drive the panels with a
|
|
134
154
|
dynamic-name slot instead of writing one block per key:
|
|
135
155
|
|
|
136
|
-
**Dynamic
|
|
156
|
+
**Dynamic panel slots from generated items**
|
|
137
157
|
|
|
138
158
|
```vue
|
|
139
|
-
<div
|
|
140
|
-
class="max-w-md rounded-[var(--bb-radius)] border border-[color:var(--bb-border)] p-3"
|
|
141
|
-
>
|
|
159
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
142
160
|
<BbTabs
|
|
143
161
|
compact
|
|
144
162
|
:items="[
|
|
145
163
|
{ key: 'draft', label: 'Draft' },
|
|
146
|
-
{ key: '
|
|
164
|
+
{ key: 'review', label: 'In review' },
|
|
147
165
|
{ key: 'published', label: 'Published' },
|
|
148
166
|
]"
|
|
149
167
|
>
|
|
150
168
|
<template
|
|
151
|
-
v-for="stage in ['draft', '
|
|
169
|
+
v-for="stage in ['draft', 'review', 'published']"
|
|
152
170
|
:key="stage"
|
|
153
171
|
#[stage]
|
|
154
172
|
>
|
|
155
|
-
<p class="pt-3 text-sm capitalize text-
|
|
173
|
+
<p class="pt-3 text-sm capitalize text-(--bb-text-muted)">{{ stage }} documents.</p>
|
|
156
174
|
</template>
|
|
157
175
|
</BbTabs>
|
|
158
176
|
</div>
|
|
@@ -160,7 +178,7 @@ dynamic-name slot instead of writing one block per key:
|
|
|
160
178
|
|
|
161
179
|
### Rich labels and badges
|
|
162
180
|
|
|
163
|
-
Replace a tab's plain text with the `label
|
|
181
|
+
Replace a tab's plain text with the `label:<key>` slot (one specific tab) or the
|
|
164
182
|
`label` slot (the fallback for every tab). Both receive the tab's state — `text`
|
|
165
183
|
(the item's `label`), `value` (its `key`), `selected`, `disabled`, plus the
|
|
166
184
|
group's `current` / `currentIndex` / `isFirst` / `isLast` and a `goTo` callback —
|
|
@@ -172,9 +190,7 @@ button or link inside a label — the trigger is already the control).
|
|
|
172
190
|
|
|
173
191
|
```vue
|
|
174
192
|
<template>
|
|
175
|
-
<div
|
|
176
|
-
class="max-w-md rounded-[var(--bb-radius)] border border-[color:var(--bb-border)] p-3"
|
|
177
|
-
>
|
|
193
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
178
194
|
<BbTabs v-model="active" compact :items="tabs">
|
|
179
195
|
<template #label:inbox="{ text }">
|
|
180
196
|
<span class="inline-flex items-center gap-1.5">
|
|
@@ -183,26 +199,26 @@ button or link inside a label — the trigger is already the control).
|
|
|
183
199
|
</span>
|
|
184
200
|
</template>
|
|
185
201
|
<template #inbox>
|
|
186
|
-
<ul class="divide-y divide-
|
|
202
|
+
<ul class="divide-y divide-(--bb-border) pt-3">
|
|
187
203
|
<li
|
|
188
204
|
v-for="thread in inbox"
|
|
189
205
|
:key="thread.id"
|
|
190
206
|
class="flex flex-col gap-0.5 py-2"
|
|
191
207
|
>
|
|
192
208
|
<p class="text-sm font-medium">{{ thread.subject }}</p>
|
|
193
|
-
<p class="text-xs text-
|
|
209
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
194
210
|
{{ thread.from }} · {{ thread.when }}
|
|
195
211
|
</p>
|
|
196
212
|
</li>
|
|
197
213
|
</ul>
|
|
198
214
|
</template>
|
|
199
215
|
<template #sent>
|
|
200
|
-
<p class="pt-3 text-sm text-
|
|
216
|
+
<p class="pt-3 text-sm text-(--bb-text-muted)">
|
|
201
217
|
12 messages sent this week.
|
|
202
218
|
</p>
|
|
203
219
|
</template>
|
|
204
220
|
<template #spam>
|
|
205
|
-
<p class="pt-3 text-sm text-
|
|
221
|
+
<p class="pt-3 text-sm text-(--bb-text-muted)">
|
|
206
222
|
3 filtered messages · last scan 2h ago.
|
|
207
223
|
</p>
|
|
208
224
|
</template>
|
|
@@ -214,7 +230,7 @@ import { ref } from 'vue';
|
|
|
214
230
|
import { BbBadge, BbTabs } from 'bitboss-ui';
|
|
215
231
|
import type { BbTabsItem } from 'bitboss-ui';
|
|
216
232
|
|
|
217
|
-
// Count pills ride in `label
|
|
233
|
+
// Count pills ride in `label:<key>` — presentation only; the trigger stays the
|
|
218
234
|
// control. Soft badge palette from design-language.md § Using color.
|
|
219
235
|
type Folder = 'inbox' | 'sent' | 'spam';
|
|
220
236
|
|
|
@@ -253,49 +269,47 @@ const inbox = [
|
|
|
253
269
|
ai/guides/design-language.md § Using color. -->
|
|
254
270
|
<style>
|
|
255
271
|
.bb-badge.bb-badge--soft-blue {
|
|
256
|
-
--accent:
|
|
272
|
+
--accent: var(--bb-info);
|
|
257
273
|
--bg: color-mix(in oklab, var(--accent) 15%, var(--bb-panel));
|
|
258
|
-
--
|
|
259
|
-
--
|
|
274
|
+
--fg: color-mix(in oklab, var(--accent) 80%, var(--bb-text));
|
|
275
|
+
--bw: 1px;
|
|
260
276
|
--border-color: color-mix(in oklab, var(--accent) 25%, var(--bb-panel));
|
|
261
|
-
--ring: color-mix(in oklab, var(--accent) 45%, transparent);
|
|
277
|
+
--ring-color: color-mix(in oklab, var(--accent) 45%, transparent);
|
|
262
278
|
}
|
|
263
279
|
</style>
|
|
264
280
|
```
|
|
265
281
|
|
|
266
|
-
Use `label
|
|
282
|
+
Use `label:<key>` when only some tabs need decoration and `label` when every tab
|
|
267
283
|
follows one template (an icon + count for all). A badge that changes size after
|
|
268
284
|
mount — a count ticking up — is fine: the strip re-measures the sliding pill and
|
|
269
285
|
equal-width fit when label content resizes, so the layout keeps up on its own.
|
|
270
286
|
|
|
271
287
|
### Lazy by default, eager when state must persist
|
|
272
288
|
|
|
273
|
-
By default
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
it:
|
|
289
|
+
By default only the **active** panel is mounted: switching away unmounts it, and
|
|
290
|
+
switching back mounts it fresh — cheap panels, no wasted renders, and no state
|
|
291
|
+
kept in between. Set `eager` to keep a panel mounted (hidden) while its tab is
|
|
292
|
+
inactive. Two reasons to reach for it:
|
|
277
293
|
|
|
278
|
-
- **In-
|
|
279
|
-
position, a loaded chart.
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
- **SEO / SSR** — content in inactive
|
|
294
|
+
- **In-panel state that must survive switches** — a half-filled form, a scroll
|
|
295
|
+
position, a loaded chart. A lazy panel loses all of it on every switch away;
|
|
296
|
+
an eager panel exists from the start and is never unmounted, so nothing is
|
|
297
|
+
lost.
|
|
298
|
+
- **SEO / SSR** — content in inactive panels is in the server-rendered HTML.
|
|
283
299
|
|
|
284
|
-
`eager` works at two granularities: on the component (every
|
|
285
|
-
single `items` entry (`{ key, label, eager: true }`) when only one
|
|
300
|
+
`eager` works at two granularities: on the component (every panel eager) or on a
|
|
301
|
+
single `items` entry (`{ key, label, eager: true }`) when only one panel is
|
|
286
302
|
expensive to lose. The example keeps a draft message alive while the user checks
|
|
287
303
|
the Audience and Schedule tabs:
|
|
288
304
|
|
|
289
|
-
**Eager
|
|
305
|
+
**Eager panels keep an in-panel draft alive**
|
|
290
306
|
|
|
291
307
|
```vue
|
|
292
308
|
<template>
|
|
293
|
-
<div
|
|
294
|
-
class="max-w-md rounded-[var(--bb-radius)] border border-[color:var(--bb-border)] p-3"
|
|
295
|
-
>
|
|
309
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
296
310
|
<div class="mb-3 flex flex-col gap-0.5">
|
|
297
311
|
<p class="text-sm font-medium">Product announcement</p>
|
|
298
|
-
<p class="text-xs text-
|
|
312
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
299
313
|
Draft · scheduled for Tue 09:00 local
|
|
300
314
|
</p>
|
|
301
315
|
</div>
|
|
@@ -320,7 +334,7 @@ the Audience and Schedule tabs:
|
|
|
320
334
|
</div>
|
|
321
335
|
</template>
|
|
322
336
|
<template #audience>
|
|
323
|
-
<p class="pt-3 text-sm text-
|
|
337
|
+
<p class="pt-3 text-sm text-(--bb-text-muted)">
|
|
324
338
|
Sending to
|
|
325
339
|
<span class="font-medium tabular-nums">{{
|
|
326
340
|
recipients.toLocaleString()
|
|
@@ -329,7 +343,7 @@ the Audience and Schedule tabs:
|
|
|
329
343
|
</p>
|
|
330
344
|
</template>
|
|
331
345
|
<template #schedule>
|
|
332
|
-
<p class="pt-3 text-sm text-
|
|
346
|
+
<p class="pt-3 text-sm text-(--bb-text-muted)">
|
|
333
347
|
Queued for Tuesday 09:00 in each recipient's local timezone.
|
|
334
348
|
</p>
|
|
335
349
|
</template>
|
|
@@ -341,7 +355,7 @@ import { reactive, ref } from 'vue';
|
|
|
341
355
|
import { BbTabs, BbTextInput } from 'bitboss-ui';
|
|
342
356
|
import type { BbTabsItem } from 'bitboss-ui';
|
|
343
357
|
|
|
344
|
-
// `eager` renders every
|
|
358
|
+
// `eager` renders every panel into the DOM up front. The Message form below is
|
|
345
359
|
// never unmounted when you switch to Audience or Schedule, so a half-typed
|
|
346
360
|
// draft survives the round trip — no manual state hoisting needed.
|
|
347
361
|
type Section = 'message' | 'audience' | 'schedule';
|
|
@@ -361,35 +375,33 @@ const draft = reactive({
|
|
|
361
375
|
</script>
|
|
362
376
|
```
|
|
363
377
|
|
|
364
|
-
###
|
|
378
|
+
### Panel transitions
|
|
365
379
|
|
|
366
|
-
Switching tabs animates by default:
|
|
380
|
+
Switching tabs animates by default: panels slide horizontally in the direction of
|
|
367
381
|
travel (left when moving to an earlier tab, right for a later one — derived from
|
|
368
|
-
the index delta) and the container smooth-heights between differing
|
|
382
|
+
the index delta) and the container smooth-heights between differing panel sizes.
|
|
369
383
|
Opt out per axis with `disable-animate-x` (no horizontal slide) and
|
|
370
384
|
`disable-animate-y` (no height animation). Disable the height animation when a
|
|
371
|
-
|
|
385
|
+
panel hosts its own transitions or virtualized content that fights the
|
|
372
386
|
measurement, and disable both for instant, motion-free switching. The classic
|
|
373
387
|
case for "disable both" is a Code / Preview toggle on a docs or comment
|
|
374
388
|
composer — flipping modes should feel like a switch, not a slide. Note the draft lives in
|
|
375
|
-
the component's script, not inside the
|
|
389
|
+
the component's script, not inside the panel, so the default lazy panels lose
|
|
376
390
|
nothing when you flip back:
|
|
377
391
|
|
|
378
392
|
**Instant Code / Preview toggle**
|
|
379
393
|
|
|
380
394
|
```vue
|
|
381
395
|
<template>
|
|
382
|
-
<div
|
|
383
|
-
class="max-w-md rounded-[var(--bb-radius)] border border-[color:var(--bb-border)] p-3"
|
|
384
|
-
>
|
|
396
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
385
397
|
<div class="mb-3 flex flex-col gap-0.5">
|
|
386
398
|
<p class="text-sm font-medium">Release notes</p>
|
|
387
|
-
<p class="text-xs text-
|
|
399
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
388
400
|
Markdown draft · preview before publishing.
|
|
389
401
|
</p>
|
|
390
402
|
</div>
|
|
391
403
|
<!-- Mode switch, not a carousel: disable both animation axes. Draft lives
|
|
392
|
-
in script so lazy
|
|
404
|
+
in script so lazy panels lose nothing when flipping back. -->
|
|
393
405
|
<BbTabs compact disable-animate-x disable-animate-y :items="tabs">
|
|
394
406
|
<template #code>
|
|
395
407
|
<div class="pt-3">
|
|
@@ -405,14 +417,12 @@ nothing when you flip back:
|
|
|
405
417
|
</div>
|
|
406
418
|
</template>
|
|
407
419
|
<template #preview>
|
|
408
|
-
<div class="grid gap-1.5
|
|
420
|
+
<div class="grid gap-1.5 pt-3 text-sm whitespace-pre-line">
|
|
409
421
|
<template v-if="draft.trim()">
|
|
410
422
|
<p class="font-medium">{{ previewTitle }}</p>
|
|
411
|
-
<p class="text-
|
|
423
|
+
<p class="text-(--bb-text-muted)">{{ previewBody }}</p>
|
|
412
424
|
</template>
|
|
413
|
-
<p v-else class="text-
|
|
414
|
-
Nothing to preview.
|
|
415
|
-
</p>
|
|
425
|
+
<p v-else class="text-(--bb-text-muted)">Nothing to preview.</p>
|
|
416
426
|
</div>
|
|
417
427
|
</template>
|
|
418
428
|
</BbTabs>
|
|
@@ -424,7 +434,7 @@ import { BbTabs, BbTextarea } from 'bitboss-ui';
|
|
|
424
434
|
import type { BbTabsItem } from 'bitboss-ui';
|
|
425
435
|
|
|
426
436
|
// Code / Preview is a mode toggle: disable both animation axes so flipping
|
|
427
|
-
// feels instant. The draft lives in the script, not in the
|
|
437
|
+
// feels instant. The draft lives in the script, not in the panel.
|
|
428
438
|
type Mode = 'code' | 'preview';
|
|
429
439
|
|
|
430
440
|
const tabs: Array<BbTabsItem<Mode>> = [
|
|
@@ -454,7 +464,7 @@ trigger as wide as the widest, so the row reads as an even segmented control;
|
|
|
454
464
|
when the triggers exceed the width they keep those equal widths and the strip
|
|
455
465
|
scrolls. `compact` drops the whole scale a notch (a 28px strip instead of 32px,
|
|
456
466
|
smaller text and padding). `direction="vertical"` stacks the triggers in a
|
|
457
|
-
column beside the
|
|
467
|
+
column beside the panels, with the pill sliding on the Y axis.
|
|
458
468
|
|
|
459
469
|
Mark any unreachable tab `disabled` on its item — it stays visible, is skipped
|
|
460
470
|
by keyboard navigation and by `goTo`, and can never be the default selection.
|
|
@@ -463,19 +473,17 @@ goes disabled and keyboard navigation is inert (use it while a parent is
|
|
|
463
473
|
loading, not as a permanent state).
|
|
464
474
|
|
|
465
475
|
Settings peer sections are the classic `block` strip — full-width equal
|
|
466
|
-
triggers over compact form
|
|
476
|
+
triggers over compact form panels. Pair with `navigation` + `replace` so the
|
|
467
477
|
active section stays in the URL without flooding Back history:
|
|
468
478
|
|
|
469
479
|
**Workspace settings sections**
|
|
470
480
|
|
|
471
481
|
```vue
|
|
472
482
|
<template>
|
|
473
|
-
<div
|
|
474
|
-
class="max-w-md rounded-[var(--bb-radius)] border border-[color:var(--bb-border)] p-3"
|
|
475
|
-
>
|
|
483
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
476
484
|
<div class="mb-3 flex flex-col gap-0.5">
|
|
477
485
|
<p class="text-sm font-medium">Workspace settings</p>
|
|
478
|
-
<p class="text-xs text-
|
|
486
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
479
487
|
Northwind Billing · changes save per section.
|
|
480
488
|
</p>
|
|
481
489
|
</div>
|
|
@@ -511,7 +519,7 @@ active section stays in the URL without flooding Back history:
|
|
|
511
519
|
</div>
|
|
512
520
|
</template>
|
|
513
521
|
<template #members>
|
|
514
|
-
<ul class="divide-y divide-
|
|
522
|
+
<ul class="divide-y divide-(--bb-border) pt-3">
|
|
515
523
|
<li
|
|
516
524
|
v-for="member in members"
|
|
517
525
|
:key="member.email"
|
|
@@ -519,11 +527,11 @@ active section stays in the URL without flooding Back history:
|
|
|
519
527
|
>
|
|
520
528
|
<span class="min-w-0 truncate">
|
|
521
529
|
<span class="font-medium">{{ member.name }}</span>
|
|
522
|
-
<span class="text-xs text-
|
|
530
|
+
<span class="text-xs text-(--bb-text-muted)">
|
|
523
531
|
· {{ member.email }}</span
|
|
524
532
|
>
|
|
525
533
|
</span>
|
|
526
|
-
<span class="shrink-0 text-xs text-
|
|
534
|
+
<span class="shrink-0 text-xs text-(--bb-text-muted)">{{
|
|
527
535
|
member.role
|
|
528
536
|
}}</span>
|
|
529
537
|
</li>
|
|
@@ -532,7 +540,7 @@ active section stays in the URL without flooding Back history:
|
|
|
532
540
|
<template #billing>
|
|
533
541
|
<div class="grid gap-1.5 pt-3">
|
|
534
542
|
<p class="text-sm font-medium">Pro · €49 / month</p>
|
|
535
|
-
<p class="text-xs text-
|
|
543
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
536
544
|
Next invoice Jul 28, 2026 · Visa ···· 4242
|
|
537
545
|
</p>
|
|
538
546
|
<div class="pt-1">
|
|
@@ -577,9 +585,7 @@ const onSaveGeneral = async () => {
|
|
|
577
585
|
**Full-width strip with a disabled tab**
|
|
578
586
|
|
|
579
587
|
```vue
|
|
580
|
-
<div
|
|
581
|
-
class="max-w-md rounded-[var(--bb-radius)] border border-[color:var(--bb-border)] p-3"
|
|
582
|
-
>
|
|
588
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
583
589
|
<BbTabs
|
|
584
590
|
block
|
|
585
591
|
compact
|
|
@@ -589,9 +595,9 @@ const onSaveGeneral = async () => {
|
|
|
589
595
|
{ key: 'billing', label: 'Billing', disabled: true },
|
|
590
596
|
]"
|
|
591
597
|
>
|
|
592
|
-
<template #summary><p class="pt-3 text-sm text-
|
|
593
|
-
<template #integrations><p class="pt-3 text-sm text-
|
|
594
|
-
<template #billing><p class="pt-3 text-sm text-
|
|
598
|
+
<template #summary><p class="pt-3 text-sm text-(--bb-text-muted)">Environment status at a glance.</p></template>
|
|
599
|
+
<template #integrations><p class="pt-3 text-sm text-(--bb-text-muted)">Connected services.</p></template>
|
|
600
|
+
<template #billing><p class="pt-3 text-sm text-(--bb-text-muted)">Locked on this plan.</p></template>
|
|
595
601
|
</BbTabs>
|
|
596
602
|
</div>
|
|
597
603
|
```
|
|
@@ -599,9 +605,7 @@ const onSaveGeneral = async () => {
|
|
|
599
605
|
**Vertical, compact strip**
|
|
600
606
|
|
|
601
607
|
```vue
|
|
602
|
-
<div
|
|
603
|
-
class="max-w-md rounded-[var(--bb-radius)] border border-[color:var(--bb-border)] p-3"
|
|
604
|
-
>
|
|
608
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
605
609
|
<BbTabs
|
|
606
610
|
compact
|
|
607
611
|
direction="vertical"
|
|
@@ -611,9 +615,9 @@ const onSaveGeneral = async () => {
|
|
|
611
615
|
{ key: 'api', label: 'API keys' },
|
|
612
616
|
]"
|
|
613
617
|
>
|
|
614
|
-
<template #general><p class="px-3 text-sm text-
|
|
615
|
-
<template #security><p class="px-3 text-sm text-
|
|
616
|
-
<template #api><p class="px-3 text-sm text-
|
|
618
|
+
<template #general><p class="px-3 text-sm text-(--bb-text-muted)">Workspace basics.</p></template>
|
|
619
|
+
<template #security><p class="px-3 text-sm text-(--bb-text-muted)">Sessions and 2FA.</p></template>
|
|
620
|
+
<template #api><p class="px-3 text-sm text-(--bb-text-muted)">Personal access tokens.</p></template>
|
|
617
621
|
</BbTabs>
|
|
618
622
|
</div>
|
|
619
623
|
```
|
|
@@ -623,15 +627,421 @@ width — set `style="--max-w: 160px"` on the list and long labels ellipse inste
|
|
|
623
627
|
of widening the column. The strip never exceeds its container. Sizing otherwise
|
|
624
628
|
follows the design tokens (`--bb-control-h`, `--bb-radius`, `--bb-fs`); there is
|
|
625
629
|
no numeric size prop and no global tabs config to set — tokens and the `block` /
|
|
626
|
-
`compact` / `direction` props are the whole surface.
|
|
630
|
+
`compact` / `direction` / `variant` props are the whole surface.
|
|
631
|
+
|
|
632
|
+
### Variants
|
|
633
|
+
|
|
634
|
+
`variant` picks the strip's look and nothing else — items, `v-model`, keyboard
|
|
635
|
+
navigation, panels, `block` / `compact` / `direction` all behave the same under
|
|
636
|
+
every variant. Three ship:
|
|
637
|
+
|
|
638
|
+
- **`pill`** (default) — the segmented strip: a muted rounded bar with a raised
|
|
639
|
+
pill sliding under the active trigger. Reach for it to switch _views of the
|
|
640
|
+
same content_ (Board / Table, Code / Preview).
|
|
641
|
+
- **`line`** — triggers on a thin baseline, a sliding underline under the active
|
|
642
|
+
one (on the side edge when `direction="vertical"`), active label bold. Reach
|
|
643
|
+
for it to navigate _sections of a page_ (Overview / Activity / Settings).
|
|
644
|
+
- **`none`** — behaviour and structure only, no chrome: no strip, no indicator
|
|
645
|
+
paint, labels inherit the host's colour and weight. Reach for it when the
|
|
646
|
+
design is yours, styled through `pt` and classes, like `BbButton`'s `none`.
|
|
647
|
+
|
|
648
|
+
**pill — switching views of one list**
|
|
649
|
+
|
|
650
|
+
```vue
|
|
651
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
652
|
+
<BbTabs
|
|
653
|
+
:items="[
|
|
654
|
+
{ key: 'board', label: 'Board' },
|
|
655
|
+
{ key: 'table', label: 'Table' },
|
|
656
|
+
{ key: 'calendar', label: 'Calendar' },
|
|
657
|
+
]"
|
|
658
|
+
>
|
|
659
|
+
<template #board><p class="pt-3 text-sm text-(--bb-text-muted)">Cards by status.</p></template>
|
|
660
|
+
<template #table><p class="pt-3 text-sm text-(--bb-text-muted)">One row per task.</p></template>
|
|
661
|
+
<template #calendar><p class="pt-3 text-sm text-(--bb-text-muted)">Due dates on a month grid.</p></template>
|
|
662
|
+
</BbTabs>
|
|
663
|
+
</div>
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
**line — navigating the sections of a record**
|
|
667
|
+
|
|
668
|
+
```vue
|
|
669
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
670
|
+
<BbTabs
|
|
671
|
+
:items="[
|
|
672
|
+
{ key: 'overview', label: 'Overview' },
|
|
673
|
+
{ key: 'activity', label: 'Activity' },
|
|
674
|
+
{ key: 'settings', label: 'Settings' },
|
|
675
|
+
]"
|
|
676
|
+
variant="line"
|
|
677
|
+
>
|
|
678
|
+
<template #overview><p class="pt-3 text-sm text-(--bb-text-muted)">Status, owner, next step.</p></template>
|
|
679
|
+
<template #activity><p class="pt-3 text-sm text-(--bb-text-muted)">Everything that happened, newest first.</p></template>
|
|
680
|
+
<template #settings><p class="pt-3 text-sm text-(--bb-text-muted)">Notifications and access.</p></template>
|
|
681
|
+
</BbTabs>
|
|
682
|
+
</div>
|
|
683
|
+
```
|
|
684
|
+
|
|
685
|
+
`line` composes with everything else: `compact` drops the baseline strip to
|
|
686
|
+
28px, `direction="vertical"` moves the bar to the side edge of a column strip,
|
|
687
|
+
and the bar keeps sliding — it is the same measured element as the pill.
|
|
688
|
+
|
|
689
|
+
**line, vertical and compact**
|
|
690
|
+
|
|
691
|
+
```vue
|
|
692
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
693
|
+
<BbTabs
|
|
694
|
+
compact
|
|
695
|
+
direction="vertical"
|
|
696
|
+
:items="[
|
|
697
|
+
{ key: 'profile', label: 'Profile' },
|
|
698
|
+
{ key: 'sessions', label: 'Sessions' },
|
|
699
|
+
{ key: 'tokens', label: 'API tokens' },
|
|
700
|
+
]"
|
|
701
|
+
variant="line"
|
|
702
|
+
>
|
|
703
|
+
<template #profile><p class="px-3 text-sm text-(--bb-text-muted)">Name, avatar, locale.</p></template>
|
|
704
|
+
<template #sessions><p class="px-3 text-sm text-(--bb-text-muted)">Signed-in devices.</p></template>
|
|
705
|
+
<template #tokens><p class="px-3 text-sm text-(--bb-text-muted)">Personal access tokens.</p></template>
|
|
706
|
+
</BbTabs>
|
|
707
|
+
</div>
|
|
708
|
+
```
|
|
709
|
+
|
|
710
|
+
`none` renders the same tablist with no paint of its own, so the look is
|
|
711
|
+
whatever you put on the parts — here the trigger gets a bottom border while
|
|
712
|
+
active through `pt:item:active`:
|
|
713
|
+
|
|
714
|
+
**none — your own look through pt**
|
|
715
|
+
|
|
716
|
+
```vue
|
|
717
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
718
|
+
<BbTabs
|
|
719
|
+
:items="[
|
|
720
|
+
{ key: 'week', label: 'This week' },
|
|
721
|
+
{ key: 'month', label: 'This month' },
|
|
722
|
+
{ key: 'year', label: 'This year' },
|
|
723
|
+
]"
|
|
724
|
+
pt:item="border-b-2 border-transparent text-(--bb-text-muted) uppercase tracking-wide text-xs"
|
|
725
|
+
pt:item:active="border-(--bb-text) text-(--bb-text)"
|
|
726
|
+
variant="none"
|
|
727
|
+
>
|
|
728
|
+
<template #week><p class="pt-3 text-sm text-(--bb-text-muted)">7 days of activity.</p></template>
|
|
729
|
+
<template #month><p class="pt-3 text-sm text-(--bb-text-muted)">30 days of activity.</p></template>
|
|
730
|
+
<template #year><p class="pt-3 text-sm text-(--bb-text-muted)">12 months of activity.</p></template>
|
|
731
|
+
</BbTabs>
|
|
732
|
+
</div>
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
#### Your own look starts from `none`
|
|
736
|
+
|
|
737
|
+
The shipped variants are a floor, and the library does not grow one per
|
|
738
|
+
design need: there is no `sidebar`, `nav` or `segmented-large` variant, and
|
|
739
|
+
there will not be. A look of your own (a settings side nav, a filter row, a
|
|
740
|
+
step list) starts from **`variant="none"`** (behaviour and structure, no
|
|
741
|
+
paint) and sets the strip's tokens (the table below) on the tablist.
|
|
742
|
+
|
|
743
|
+
The robust way is the object form of `pt`: custom properties in
|
|
744
|
+
`pt.wrapper.style` land inline on the tablist, so they beat the `none` tokens
|
|
745
|
+
with no stylesheet at all. Scoped styles, cascade layers and selector weight
|
|
746
|
+
never come into it. The indicator still slides, so a tinted `--indicator-bg`
|
|
747
|
+
is all a "selected row" needs.
|
|
748
|
+
|
|
749
|
+
A settings side nav, built that way: `direction="vertical"` and `block` (rows the full width of
|
|
750
|
+
the strip) beside the content, icons through the `#label` slot, the whole
|
|
751
|
+
look in the example's `sideNav` object:
|
|
752
|
+
|
|
753
|
+
**A settings side nav: none + tokens through pt**
|
|
754
|
+
|
|
755
|
+
```vue
|
|
756
|
+
<template>
|
|
757
|
+
<div
|
|
758
|
+
class="flex max-w-xl gap-6 rounded-(--bb-radius) border border-(--bb-border) p-3"
|
|
759
|
+
>
|
|
760
|
+
<!-- A settings side nav: `variant="none"` strips the strip, and the look
|
|
761
|
+
is the strip's own tokens, set on the tablist through `:pt` (the
|
|
762
|
+
`sideNav` object below). No new variant, no stylesheet, no CSS on
|
|
763
|
+
internals. -->
|
|
764
|
+
<BbTabs
|
|
765
|
+
v-model="section"
|
|
766
|
+
block
|
|
767
|
+
class="flex-1"
|
|
768
|
+
direction="vertical"
|
|
769
|
+
:items="sections"
|
|
770
|
+
:pt="sideNav"
|
|
771
|
+
variant="none"
|
|
772
|
+
>
|
|
773
|
+
<template #label="{ value, text }">
|
|
774
|
+
<span class="flex items-center gap-2">
|
|
775
|
+
<BbIcon
|
|
776
|
+
aria-hidden="true"
|
|
777
|
+
:icon="icons[value as Section]"
|
|
778
|
+
size="16"
|
|
779
|
+
/>
|
|
780
|
+
{{ text }}
|
|
781
|
+
</span>
|
|
782
|
+
</template>
|
|
783
|
+
<template #profile>
|
|
784
|
+
<p class="text-sm text-(--bb-text-muted)">Name, photo and time zone.</p>
|
|
785
|
+
</template>
|
|
786
|
+
<template #notifications>
|
|
787
|
+
<p class="text-sm text-(--bb-text-muted)">
|
|
788
|
+
Email and in-app alerts, per channel.
|
|
789
|
+
</p>
|
|
790
|
+
</template>
|
|
791
|
+
<template #members>
|
|
792
|
+
<p class="text-sm text-(--bb-text-muted)">
|
|
793
|
+
Who can see this workspace, and their roles.
|
|
794
|
+
</p>
|
|
795
|
+
</template>
|
|
796
|
+
<template #billing>
|
|
797
|
+
<p class="text-sm text-(--bb-text-muted)">Plan, invoices and card.</p>
|
|
798
|
+
</template>
|
|
799
|
+
</BbTabs>
|
|
800
|
+
</div>
|
|
801
|
+
</template>
|
|
802
|
+
<script setup lang="ts">
|
|
803
|
+
import { ref } from 'vue';
|
|
804
|
+
import { BbIcon, BbTabs } from 'bitboss-ui';
|
|
805
|
+
import type { BbTabsItem, BbTabsProps } from 'bitboss-ui';
|
|
806
|
+
|
|
807
|
+
type Section = 'profile' | 'notifications' | 'members' | 'billing';
|
|
808
|
+
|
|
809
|
+
const sections: Array<BbTabsItem<Section>> = [
|
|
810
|
+
{ key: 'profile', label: 'Profile' },
|
|
811
|
+
{ key: 'notifications', label: 'Notifications' },
|
|
812
|
+
{ key: 'members', label: 'Members' },
|
|
813
|
+
{ key: 'billing', label: 'Billing' },
|
|
814
|
+
];
|
|
815
|
+
const icons: Record<Section, string> = {
|
|
816
|
+
profile: 'lucide:user',
|
|
817
|
+
notifications: 'lucide:bell',
|
|
818
|
+
members: 'lucide:users',
|
|
819
|
+
billing: 'lucide:credit-card',
|
|
820
|
+
};
|
|
821
|
+
const section = ref<Section>('notifications');
|
|
822
|
+
|
|
823
|
+
// The side-nav look on top of `none`: muted rows, a soft wash under the
|
|
824
|
+
// active one (the indicator still slides), the active label in full ink.
|
|
825
|
+
// Custom properties in `style` land inline on the tablist, so they win over
|
|
826
|
+
// the `none` tokens with no stylesheet: scoped styles, layers and selector
|
|
827
|
+
// weight never come into it.
|
|
828
|
+
const sideNav: BbTabsProps<Section>['pt'] = {
|
|
829
|
+
wrapper: {
|
|
830
|
+
style: {
|
|
831
|
+
'--trigger-r': 'var(--bb-radius)',
|
|
832
|
+
'--trigger-px': '0.625rem',
|
|
833
|
+
'--trigger-min-h': '2rem',
|
|
834
|
+
'--trigger-gap': '1px',
|
|
835
|
+
'--list-fg': 'var(--bb-text-muted)',
|
|
836
|
+
'--hover-fg': 'var(--bb-text)',
|
|
837
|
+
'--active-fg': 'var(--bb-text)',
|
|
838
|
+
'--indicator-bg': 'color-mix(in oklab, var(--bb-text) 8%, transparent)',
|
|
839
|
+
'--indicator-r': 'var(--bb-radius)',
|
|
840
|
+
minWidth: '12rem',
|
|
841
|
+
},
|
|
842
|
+
},
|
|
843
|
+
};
|
|
844
|
+
</script>
|
|
845
|
+
```
|
|
846
|
+
|
|
847
|
+
The same tokens also work as a class in a stylesheet, landed with
|
|
848
|
+
`pt:wrapper="side-nav"`. Then the rule must live in a plain `<style>` or a
|
|
849
|
+
CSS file, never `<style scoped>` (a scoped rule never matches the tablist
|
|
850
|
+
`BbTabs` renders), and doubling the class (`.bb-tabs-list.side-nav`) makes it
|
|
851
|
+
win over `none` whether or not the library CSS is layered.
|
|
852
|
+
|
|
853
|
+
On a phone the same tabs can switch to `direction="horizontal"` (a scrolling
|
|
854
|
+
strip) with the same class. When one look repeats across the app, register
|
|
855
|
+
its name instead (below) so it type-checks everywhere.
|
|
856
|
+
|
|
857
|
+
On the split layout `variant` set on `BbTabsRoot` is the default for every
|
|
858
|
+
`BbTabsList` under it, and a list can take its own `variant` to differ.
|
|
859
|
+
|
|
860
|
+
#### The token model
|
|
861
|
+
|
|
862
|
+
Every variant — shipped or registered — is a preset of one set of custom
|
|
863
|
+
properties declared on `.bb-tabs-list`. Set them on the strip (or on a class
|
|
864
|
+
you put on it) to retune one instance; set them on a `.bb-tabs-list--<name>`
|
|
865
|
+
class to define a variant. `pill` is the base values; `line` and `none` are the
|
|
866
|
+
presets shown in the last two columns.
|
|
867
|
+
|
|
868
|
+
| Custom property | What it paints | `line` | `none` |
|
|
869
|
+
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | ------------- |
|
|
870
|
+
| **Strip** — `--list-bg` | the bar behind the triggers | `transparent` | `transparent` |
|
|
871
|
+
| `--list-border` | the strip's edge line: a baseline under the triggers (beside them when vertical), `--bb-border-w` thick, painted inside the strip | `var(--bb-border)` | — |
|
|
872
|
+
| `--p` | inner padding — the gutter the indicator sits in and the scroll inset | `0px` | `0px` |
|
|
873
|
+
| `--list-r`, `--list-h` | corners, min height | `--list-r: 0px` | `0px` |
|
|
874
|
+
| **Triggers** — `--trigger-gap` | space between triggers | — | — |
|
|
875
|
+
| `--trigger-px`, `--trigger-min-h`, `--trigger-r`, `--fs` | side padding, min height (derived from `--list-h` and `--p`), corners (concentric inside `--list-r`), label size | `--trigger-r` small | — |
|
|
876
|
+
| **Labels** — `--list-fg`, `--hover-fg` | inactive and hovered label colour | — | `inherit` |
|
|
877
|
+
| `--active-fg`, `--active-fw` | active label colour and weight (inactive labels are `500`) | `--active-fw: 600` | `inherit` |
|
|
878
|
+
| **Indicator** — `--indicator-bg`, `--indicator-border`, `--indicator-r` | the sliding element's fill, edge and corners | primary fill, no edge | transparent |
|
|
879
|
+
| `--indicator-h` | its thickness: height (width when vertical). `initial` fills the whole trigger box — the pill; `2px` is a bar on the bottom/side edge | `2px` | — |
|
|
880
|
+
| `--indicator-inset` | inset from the trigger box — shrinks a pill; a bar keeps its thickness, shortens by it at both ends and floats it above the edge | — | — |
|
|
881
|
+
| `--indicator-shadow`, `--elev` | the indicator's own lift, and the theme's resting lift composed under it | `none` | `none` |
|
|
882
|
+
|
|
883
|
+
A text-only look with no underline is `line` with `--indicator-h: 0px`; a
|
|
884
|
+
thicker bar is `--indicator-h: 3px`; a bar the width of the label rather than
|
|
885
|
+
the trigger is `--indicator-inset: var(--trigger-px)`. The generated contract
|
|
886
|
+
lists every property with its default.
|
|
887
|
+
|
|
888
|
+
#### Registered variants
|
|
889
|
+
|
|
890
|
+
The two looks other libraries ship as `pills` and `outline` are a registered
|
|
891
|
+
name and a token block away. Register the name in the build plugin so it
|
|
892
|
+
type-checks —
|
|
893
|
+
|
|
894
|
+
```ts
|
|
895
|
+
// vite.config.ts (or the `bitboss` key of nuxt.config.ts)
|
|
896
|
+
bitbossUi({ tabsVariants: ['soft', 'outline'] });
|
|
897
|
+
```
|
|
898
|
+
|
|
899
|
+
— then give the class hook `.bb-tabs-list--<name>` its tokens in a stylesheet
|
|
900
|
+
loaded after the library's, and use `variant="<name>"`. **`soft`** — no strip,
|
|
901
|
+
the active trigger is a filled tonal pill, the rest is plain text; the whole
|
|
902
|
+
recipe is the `<style>` of the example:
|
|
903
|
+
|
|
904
|
+
**soft — a registered tonal-pill variant**
|
|
905
|
+
|
|
906
|
+
```vue
|
|
907
|
+
<template>
|
|
908
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
909
|
+
<p class="mb-2 text-xs text-(--bb-text-muted)">Inbox filters</p>
|
|
910
|
+
<!-- `soft` is a registered variant (`tabsVariants: ['soft']`); its look is
|
|
911
|
+
the token block in this file's <style>. -->
|
|
912
|
+
<BbTabs v-model="filter" compact :items="filters" variant="soft">
|
|
913
|
+
<template #all>
|
|
914
|
+
<p class="pt-3 text-sm text-(--bb-text-muted)">
|
|
915
|
+
Every conversation, newest first.
|
|
916
|
+
</p>
|
|
917
|
+
</template>
|
|
918
|
+
<template #unread>
|
|
919
|
+
<p class="pt-3 text-sm text-(--bb-text-muted)">
|
|
920
|
+
12 conversations waiting for a reply.
|
|
921
|
+
</p>
|
|
922
|
+
</template>
|
|
923
|
+
<template #starred>
|
|
924
|
+
<p class="pt-3 text-sm text-(--bb-text-muted)">
|
|
925
|
+
Pinned threads you come back to.
|
|
926
|
+
</p>
|
|
927
|
+
</template>
|
|
928
|
+
</BbTabs>
|
|
929
|
+
</div>
|
|
930
|
+
</template>
|
|
931
|
+
<script setup lang="ts">
|
|
932
|
+
import { ref } from 'vue';
|
|
933
|
+
import { BbTabs } from 'bitboss-ui';
|
|
934
|
+
import type { BbTabsItem } from 'bitboss-ui';
|
|
935
|
+
|
|
936
|
+
type Filter = 'all' | 'unread' | 'starred';
|
|
937
|
+
|
|
938
|
+
const filters: Array<BbTabsItem<Filter>> = [
|
|
939
|
+
{ key: 'all', label: 'All' },
|
|
940
|
+
{ key: 'unread', label: 'Unread' },
|
|
941
|
+
{ key: 'starred', label: 'Starred' },
|
|
942
|
+
];
|
|
943
|
+
const filter = ref<Filter>('unread');
|
|
944
|
+
</script>
|
|
945
|
+
<style>
|
|
946
|
+
/* `soft` — no strip, the active trigger is a filled tonal pill, the rest is
|
|
947
|
+
plain text. The whole recipe: the class hook plus the strip's own tokens. */
|
|
948
|
+
.bb-tabs-list--soft {
|
|
949
|
+
--list-bg: transparent;
|
|
950
|
+
--trigger-gap: 4px;
|
|
951
|
+
--trigger-r: 999px;
|
|
952
|
+
--indicator-bg: color-mix(in oklab, var(--bb-primary) 15%, transparent);
|
|
953
|
+
--indicator-border: transparent;
|
|
954
|
+
--indicator-shadow: none;
|
|
955
|
+
--elev: none;
|
|
956
|
+
--active-fg: var(--bb-primary);
|
|
957
|
+
--active-fw: 600;
|
|
958
|
+
}
|
|
959
|
+
</style>
|
|
960
|
+
```
|
|
961
|
+
|
|
962
|
+
**`outline`** — a 1px-framed strip with no fill and an outlined indicator
|
|
963
|
+
sliding inside it. The frame is the one thing the token model does not draw
|
|
964
|
+
(`--list-border` is a baseline, not a box), so this recipe adds one rule on the
|
|
965
|
+
tablist beside its tokens:
|
|
966
|
+
|
|
967
|
+
**outline — a registered framed variant**
|
|
968
|
+
|
|
969
|
+
```vue
|
|
970
|
+
<template>
|
|
971
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
972
|
+
<p class="mb-2 text-xs text-(--bb-text-muted)">Editor panel</p>
|
|
973
|
+
<!-- `outline` is a registered variant (`tabsVariants: ['outline']`); its
|
|
974
|
+
look is the token block in this file's <style>. -->
|
|
975
|
+
<BbTabs v-model="panel" compact :items="panels" variant="outline">
|
|
976
|
+
<template #code>
|
|
977
|
+
<pre
|
|
978
|
+
class="mt-3 rounded-(--bb-radius) bg-(--bb-muted) p-2 text-xs"
|
|
979
|
+
><code>const total = lines.reduce((sum, l) => sum + l.amount, 0);</code></pre>
|
|
980
|
+
</template>
|
|
981
|
+
<template #preview>
|
|
982
|
+
<p class="pt-3 text-sm text-(--bb-text-muted)">
|
|
983
|
+
Total: <span class="font-medium text-(--bb-text)">€ 1,240.00</span>
|
|
984
|
+
</p>
|
|
985
|
+
</template>
|
|
986
|
+
<template #diff>
|
|
987
|
+
<p class="pt-3 text-sm text-(--bb-text-muted)">
|
|
988
|
+
2 lines changed since the last save.
|
|
989
|
+
</p>
|
|
990
|
+
</template>
|
|
991
|
+
</BbTabs>
|
|
992
|
+
</div>
|
|
993
|
+
</template>
|
|
994
|
+
<script setup lang="ts">
|
|
995
|
+
import { ref } from 'vue';
|
|
996
|
+
import { BbTabs } from 'bitboss-ui';
|
|
997
|
+
import type { BbTabsItem } from 'bitboss-ui';
|
|
998
|
+
|
|
999
|
+
type Panel = 'code' | 'preview' | 'diff';
|
|
1000
|
+
|
|
1001
|
+
const panels: Array<BbTabsItem<Panel>> = [
|
|
1002
|
+
{ key: 'code', label: 'Code' },
|
|
1003
|
+
{ key: 'preview', label: 'Preview' },
|
|
1004
|
+
{ key: 'diff', label: 'Diff' },
|
|
1005
|
+
];
|
|
1006
|
+
const panel = ref<Panel>('code');
|
|
1007
|
+
</script>
|
|
1008
|
+
<style>
|
|
1009
|
+
/* `outline` — a 1px-framed strip with no fill, and an outlined indicator (a
|
|
1010
|
+
border, no lift) sliding inside it. Tokens for the paint; one rule for the
|
|
1011
|
+
frame, which the token model does not draw (`--list-border` is the
|
|
1012
|
+
baseline of a `line` strip, not a box). */
|
|
1013
|
+
.bb-tabs-list--outline {
|
|
1014
|
+
--list-bg: transparent;
|
|
1015
|
+
--indicator-bg: transparent;
|
|
1016
|
+
--indicator-border: var(--bb-text-muted);
|
|
1017
|
+
--indicator-shadow: none;
|
|
1018
|
+
--elev: none;
|
|
1019
|
+
--active-fg: var(--bb-text);
|
|
1020
|
+
--active-fw: 600;
|
|
1021
|
+
}
|
|
1022
|
+
.bb-tabs-list--outline .bb-tabs-list__list {
|
|
1023
|
+
box-shadow: inset 0 0 0 var(--bb-border-w) var(--bb-border);
|
|
1024
|
+
}
|
|
1025
|
+
</style>
|
|
1026
|
+
```
|
|
1027
|
+
|
|
1028
|
+
An unregistered name fails `vue-tsc`, like every other variant registry (see
|
|
1029
|
+
the [installation guide](./guides/installation-and-plugin-setup.md), _Variant
|
|
1030
|
+
registries_). The class is plain interpolation at runtime, so a one-off can be
|
|
1031
|
+
forced with a cast — register it instead.
|
|
627
1032
|
|
|
628
1033
|
### Overflowing strips and scroll affordances
|
|
629
1034
|
|
|
630
1035
|
Both horizontal modes scroll when the triggers exceed the available width, and
|
|
631
1036
|
the active trigger is always scrolled into view on selection — keyboard moves
|
|
632
|
-
never leave the focused tab off-screen.
|
|
633
|
-
|
|
634
|
-
|
|
1037
|
+
never leave the focused tab off-screen. It is also brought into view when the
|
|
1038
|
+
strip lays out: on mount (a deep link to a tab past the fold), on a switch to
|
|
1039
|
+
`horizontal` at a breakpoint, when a hidden ancestor is shown, and when a label
|
|
1040
|
+
reflows (a count loading in). That layout-driven reveal is instant and leaves
|
|
1041
|
+
alone a strip the user has scrolled by hand, until the next selection.
|
|
1042
|
+
|
|
1043
|
+
For a visible scroll control, wire the `wrapper:prepend` and `wrapper:append`
|
|
1044
|
+
slots (rendered before / after the scrollable list): each receives `canScrollLeft`, `canScrollRight`, `isScrolling`,
|
|
635
1045
|
and a `scroll('left' | 'right')` callback that pages the strip by ~80% of its
|
|
636
1046
|
width. Bind the arrows' `disabled` to the can-scroll flags so they dim at the
|
|
637
1047
|
ends.
|
|
@@ -640,17 +1050,15 @@ ends.
|
|
|
640
1050
|
|
|
641
1051
|
```vue
|
|
642
1052
|
<template>
|
|
643
|
-
<div
|
|
644
|
-
class="max-w-md rounded-[var(--bb-radius)] border border-[color:var(--bb-border)] p-3"
|
|
645
|
-
>
|
|
1053
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
646
1054
|
<div class="mb-3 flex flex-col gap-0.5">
|
|
647
1055
|
<p class="text-sm font-medium">Release timeline</p>
|
|
648
|
-
<p class="text-xs text-
|
|
1056
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
649
1057
|
Monthly notes · scroll arrows when the strip overflows.
|
|
650
1058
|
</p>
|
|
651
1059
|
</div>
|
|
652
1060
|
<BbTabs v-model="active" block compact :items="releases">
|
|
653
|
-
<template #
|
|
1061
|
+
<template #wrapper:prepend="{ canScrollLeft, scroll }">
|
|
654
1062
|
<BbButton
|
|
655
1063
|
aria-label="Scroll tabs left"
|
|
656
1064
|
class="mr-1 shrink-0"
|
|
@@ -661,7 +1069,7 @@ ends.
|
|
|
661
1069
|
@click="scroll('left')"
|
|
662
1070
|
/>
|
|
663
1071
|
</template>
|
|
664
|
-
<template #
|
|
1072
|
+
<template #wrapper:append="{ canScrollRight, scroll }">
|
|
665
1073
|
<BbButton
|
|
666
1074
|
aria-label="Scroll tabs right"
|
|
667
1075
|
class="ml-1 shrink-0"
|
|
@@ -672,8 +1080,19 @@ ends.
|
|
|
672
1080
|
@click="scroll('right')"
|
|
673
1081
|
/>
|
|
674
1082
|
</template>
|
|
675
|
-
|
|
676
|
-
|
|
1083
|
+
<!--
|
|
1084
|
+
`slotKey(...)`, never the raw key. A panel's slot name is the
|
|
1085
|
+
NORMALIZED key: `v3.0` becomes `v3_0`, so `#[release.key]` would
|
|
1086
|
+
name a slot that never matches and every panel would silently render
|
|
1087
|
+
empty. The keys here carry a dot on purpose — with slug-safe keys
|
|
1088
|
+
(`v1`…`v9`) the mistake is invisible.
|
|
1089
|
+
-->
|
|
1090
|
+
<template
|
|
1091
|
+
v-for="release in releases"
|
|
1092
|
+
:key="release.key"
|
|
1093
|
+
#[slotKey(release.key)]
|
|
1094
|
+
>
|
|
1095
|
+
<p class="pt-3 text-sm text-(--bb-text-muted)">
|
|
677
1096
|
{{ release.label }} shipped the design-token overhaul and the tabs
|
|
678
1097
|
keyboard-navigation pass.
|
|
679
1098
|
</p>
|
|
@@ -683,11 +1102,11 @@ ends.
|
|
|
683
1102
|
</template>
|
|
684
1103
|
<script setup lang="ts">
|
|
685
1104
|
import { ref } from 'vue';
|
|
686
|
-
import { BbButton, BbTabs } from 'bitboss-ui';
|
|
1105
|
+
import { BbButton, BbTabs, slotKey } from 'bitboss-ui';
|
|
687
1106
|
import type { BbTabsItem } from 'bitboss-ui';
|
|
688
1107
|
|
|
689
1108
|
// A block strip with more triggers than fit: the pill and scroll-into-view keep
|
|
690
|
-
// the active trigger visible, and the
|
|
1109
|
+
// the active trigger visible, and the wrapper:prepend / wrapper:append slots host
|
|
691
1110
|
// scroll arrows fed by canScrollLeft / canScrollRight / scroll from the list.
|
|
692
1111
|
const months = [
|
|
693
1112
|
'January',
|
|
@@ -700,27 +1119,29 @@ const months = [
|
|
|
700
1119
|
'August',
|
|
701
1120
|
'September',
|
|
702
1121
|
];
|
|
1122
|
+
// Realistic release tags: `v3.0` … `v3.8`. The dot is what makes the
|
|
1123
|
+
// `slotKey` call in the template load-bearing (see the note there).
|
|
703
1124
|
const releases: BbTabsItem[] = months.map((label, index) => ({
|
|
704
|
-
key: `
|
|
705
|
-
label: `${label}
|
|
1125
|
+
key: `v3.${index}`,
|
|
1126
|
+
label: `${label} · v3.${index}`,
|
|
706
1127
|
}));
|
|
707
1128
|
|
|
708
|
-
const active = ref('
|
|
1129
|
+
const active = ref('v3.0');
|
|
709
1130
|
</script>
|
|
710
1131
|
```
|
|
711
1132
|
|
|
712
1133
|
These slots live on `BbTabsList`, so they work identically in the batteries-
|
|
713
1134
|
included `BbTabs` and in the split `BbTabsRoot` layout below.
|
|
714
1135
|
|
|
715
|
-
### Split the strip from the
|
|
1136
|
+
### Split the strip from the panels with `BbTabsRoot`
|
|
716
1137
|
|
|
717
|
-
When you need arbitrary markup _between_ the triggers and the
|
|
1138
|
+
When you need arbitrary markup _between_ the triggers and the panels — a toolbar
|
|
718
1139
|
next to the strip, a divider, a sidebar layout — reach for the renderless
|
|
719
1140
|
`BbTabsRoot`. It owns all the state (selection, `v-model`, URL/Inertia
|
|
720
1141
|
navigation, keyboard navigation) and publishes it through provide/inject, so
|
|
721
|
-
`BbTabsList` and `
|
|
1142
|
+
`BbTabsList` and `BbTabsPanels` can sit anywhere in its subtree — no props, they
|
|
722
1143
|
discover the nearest root automatically — and still align. A `BbTabsList` or
|
|
723
|
-
`
|
|
1144
|
+
`BbTabsPanels` rendered outside any root throws with a descriptive error.
|
|
724
1145
|
|
|
725
1146
|
Its default slot hands you `select`, `goTo`, `current`, `currentIndex`,
|
|
726
1147
|
`isFirst`, and `isLast` — enough to build Prev/Next controls or a live section
|
|
@@ -728,16 +1149,14 @@ label without a template ref. A nested `BbTabs`/`BbTabsRoot` always shadows the
|
|
|
728
1149
|
outer one, so an inner tab group never leaks into (or reads from) the parent's
|
|
729
1150
|
context; use nesting freely.
|
|
730
1151
|
|
|
731
|
-
**List and
|
|
1152
|
+
**List and panels separated by a toolbar**
|
|
732
1153
|
|
|
733
1154
|
```vue
|
|
734
1155
|
<template>
|
|
735
|
-
<div
|
|
736
|
-
class="max-w-md rounded-[var(--bb-radius)] border border-[color:var(--bb-border)] p-3"
|
|
737
|
-
>
|
|
1156
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
738
1157
|
<div class="mb-3 flex flex-col gap-0.5">
|
|
739
1158
|
<p class="text-sm font-medium">Acme Checkout</p>
|
|
740
|
-
<p class="text-xs text-
|
|
1159
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
741
1160
|
Workspace · Prev/Next via root slot
|
|
742
1161
|
</p>
|
|
743
1162
|
</div>
|
|
@@ -764,35 +1183,35 @@ context; use nesting freely.
|
|
|
764
1183
|
</BbButton>
|
|
765
1184
|
</div>
|
|
766
1185
|
</div>
|
|
767
|
-
<hr class="my-3 border-
|
|
768
|
-
<
|
|
1186
|
+
<hr class="my-3 border-(--bb-border)" />
|
|
1187
|
+
<BbTabsPanels>
|
|
769
1188
|
<template #overview>
|
|
770
|
-
<p class="text-sm text-
|
|
1189
|
+
<p class="text-sm text-(--bb-text-muted)">
|
|
771
1190
|
Health stable · owners Alex + Sam · objective: cut checkout
|
|
772
1191
|
latency 20%.
|
|
773
1192
|
</p>
|
|
774
1193
|
</template>
|
|
775
1194
|
<template #activity>
|
|
776
|
-
<p class="text-sm text-
|
|
1195
|
+
<p class="text-sm text-(--bb-text-muted)">
|
|
777
1196
|
Shipped billing retries; fixed avatar upload timeout.
|
|
778
1197
|
</p>
|
|
779
1198
|
</template>
|
|
780
1199
|
<template #members>
|
|
781
|
-
<p class="text-sm text-
|
|
1200
|
+
<p class="text-sm text-(--bb-text-muted)">
|
|
782
1201
|
14 editors, 23 viewers, 3 billing admins.
|
|
783
1202
|
</p>
|
|
784
1203
|
</template>
|
|
785
|
-
</
|
|
1204
|
+
</BbTabsPanels>
|
|
786
1205
|
</template>
|
|
787
1206
|
</BbTabsRoot>
|
|
788
1207
|
</div>
|
|
789
1208
|
</template>
|
|
790
1209
|
<script setup lang="ts">
|
|
791
1210
|
import { ref } from 'vue';
|
|
792
|
-
import { BbButton, BbTabsRoot, BbTabsList,
|
|
1211
|
+
import { BbButton, BbTabsRoot, BbTabsList, BbTabsPanels } from 'bitboss-ui';
|
|
793
1212
|
import type { BbTabsItem } from 'bitboss-ui';
|
|
794
1213
|
|
|
795
|
-
// BbTabsRoot owns the state; the list and the
|
|
1214
|
+
// BbTabsRoot owns the state; the list and the panels are separated by a toolbar
|
|
796
1215
|
// row and a divider, and the Prev/Next buttons drive it through the root slot.
|
|
797
1216
|
type Section = 'overview' | 'activity' | 'members';
|
|
798
1217
|
|
|
@@ -806,10 +1225,11 @@ const active = ref<Section>('overview');
|
|
|
806
1225
|
</script>
|
|
807
1226
|
```
|
|
808
1227
|
|
|
809
|
-
`BbTabsRoot` takes the
|
|
810
|
-
|
|
1228
|
+
`BbTabsRoot` takes the same props as `BbTabs` except `pt` (it renders no
|
|
1229
|
+
element — the list and the panels take their own, see _Restyling with
|
|
1230
|
+
passthrough_), so everything else in this guide — `items`, `block`, `compact`,
|
|
811
1231
|
`direction`, `eager`, `navigation`, the Inertia options — applies unchanged; you
|
|
812
|
-
are only relocating the list and the
|
|
1232
|
+
are only relocating the list and the panels.
|
|
813
1233
|
|
|
814
1234
|
### Drive a tab group from anywhere with `useBbTabsContext`
|
|
815
1235
|
|
|
@@ -841,7 +1261,7 @@ the tabs jumps straight to the Security section:
|
|
|
841
1261
|
```vue
|
|
842
1262
|
<template>
|
|
843
1263
|
<div
|
|
844
|
-
class="max-w-md space-y-3 rounded-
|
|
1264
|
+
class="max-w-md space-y-3 rounded-(--bb-radius) border border-(--bb-border) p-3"
|
|
845
1265
|
>
|
|
846
1266
|
<div class="grid gap-2">
|
|
847
1267
|
<BbAlert
|
|
@@ -888,7 +1308,7 @@ the tabs jumps straight to the Security section:
|
|
|
888
1308
|
<template #security>
|
|
889
1309
|
<div class="grid gap-1.5 pt-3 text-sm">
|
|
890
1310
|
<p class="font-medium">Two-factor authentication</p>
|
|
891
|
-
<p class="text-xs text-
|
|
1311
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
892
1312
|
Off · last password change Mar 12, 2026 · 2 active sessions
|
|
893
1313
|
</p>
|
|
894
1314
|
<div class="pt-1">
|
|
@@ -899,15 +1319,12 @@ the tabs jumps straight to the Security section:
|
|
|
899
1319
|
</div>
|
|
900
1320
|
</template>
|
|
901
1321
|
<template #notifications>
|
|
902
|
-
<p class="pt-3 text-sm text-
|
|
1322
|
+
<p class="pt-3 text-sm text-(--bb-text-muted)">
|
|
903
1323
|
Email digests and mention alerts for alex@northwind.io.
|
|
904
1324
|
</p>
|
|
905
1325
|
</template>
|
|
906
1326
|
</BbTabs>
|
|
907
|
-
<p
|
|
908
|
-
class="text-xs text-[color:var(--bb-text-muted)]"
|
|
909
|
-
data-test="active-section"
|
|
910
|
-
>
|
|
1327
|
+
<p class="text-xs text-(--bb-text-muted)" data-test="active-section">
|
|
911
1328
|
Active section: {{ current }}
|
|
912
1329
|
</p>
|
|
913
1330
|
</div>
|
|
@@ -958,13 +1375,38 @@ Set `navigation` to keep the active tab in the URL query (`query-key`, default
|
|
|
958
1375
|
`modelValue`; thereafter switching writes the query.
|
|
959
1376
|
|
|
960
1377
|
**The URL carries a normalized slug, never the raw tab key.** The query value
|
|
961
|
-
goes through the same
|
|
962
|
-
|
|
963
|
-
`
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
1378
|
+
goes through `slotKey`, the same kebab-case rule as the slot names, so a tab
|
|
1379
|
+
keyed `'In Review'` (or `inReview`, or `in_review`) appears in the URL as
|
|
1380
|
+
`in-review`. The component round-trips this itself; the surprise lands on
|
|
1381
|
+
anything ELSE reading the query — a server matching `?tab=` against camelCase
|
|
1382
|
+
keys silently never matches. Compare against `slotKey(key)` server-side, or
|
|
1383
|
+
use lowercase kebab keys for server-matched tabs.
|
|
1384
|
+
|
|
1385
|
+
#### URL values changed in 3.0.0-beta.41
|
|
1386
|
+
|
|
1387
|
+
Before the slot-naming reset the slug rule was "non-word runs become `_`,
|
|
1388
|
+
lowercased": `?tab=in_review`, `?tab=reviewstatus`. It is now kebab-case:
|
|
1389
|
+
`?tab=in-review`, `?tab=review-status`. One rule for slot names and URLs, and
|
|
1390
|
+
camelCase keys stay readable instead of squashed.
|
|
1391
|
+
|
|
1392
|
+
| Tab key | Old URL value | New URL value |
|
|
1393
|
+
| ---------------- | -------------- | --------------- |
|
|
1394
|
+
| `'In Review'` | `in_review` | `in-review` |
|
|
1395
|
+
| `'reviewStatus'` | `reviewstatus` | `review-status` |
|
|
1396
|
+
| `'step2'` | `step2` | `step-2` |
|
|
1397
|
+
| `'overview'` | `overview` | `overview` |
|
|
1398
|
+
|
|
1399
|
+
**Old links still land.** A URL with the old value (a user's bookmark, a link
|
|
1400
|
+
in an old email) still selects its tab, and the address bar is then rewritten
|
|
1401
|
+
to the new value in place — `router.replace`, or `history.replaceState` without
|
|
1402
|
+
a router — so no history entry is added. Writes are always the new value.
|
|
1403
|
+
|
|
1404
|
+
**The bridge is for end users, not for your code.** Update every place your
|
|
1405
|
+
app writes a tab value: search for `BbTabs` with `navigation` or `query-key`,
|
|
1406
|
+
hard-coded `?tab=` / `?<queryKey>=` links, `router.push` / `visit` / `href`
|
|
1407
|
+
calls that build a tab value, server redirects, and emails or notifications
|
|
1408
|
+
that link to a tab, and rewrite each legacy (underscore or squashed) value to
|
|
1409
|
+
its kebab form — `slotKey(key)` gives it.
|
|
968
1410
|
|
|
969
1411
|
**Back/forward re-selects the tab, on every platform.** On Vue Router/Nuxt the
|
|
970
1412
|
re-selection watcher tracks the route's own query (`$route.query[queryKey]`),
|
|
@@ -1027,7 +1469,7 @@ that also drives the URL itself:
|
|
|
1027
1469
|
yourself.
|
|
1028
1470
|
- **The strip does not follow visits you make.** Under Inertia nothing watches
|
|
1029
1471
|
`$page.url`, so a visit from a filter chip or a saved-view link that changes
|
|
1030
|
-
the tab parameter leaves the strip and
|
|
1472
|
+
the tab parameter leaves the strip and panel on the old tab. Keep the tab in
|
|
1031
1473
|
`v-model` and set it alongside that visit.
|
|
1032
1474
|
- **`query-key` is written onto `href`, not read from it.** The URL that lands
|
|
1033
1475
|
is your `href` with `?{query-key}={slug}` set on it, so an `href` of
|
|
@@ -1036,7 +1478,7 @@ that also drives the URL itself:
|
|
|
1036
1478
|
hrefs already encode.
|
|
1037
1479
|
|
|
1038
1480
|
A `server` tab commits its selection only when the visit **succeeds**: the
|
|
1039
|
-
|
|
1481
|
+
panel, pill and `v-model` stay on the current tab until the server confirms. A
|
|
1040
1482
|
navigation guard that prevents the visit (a dirty-form route-leave confirm) or
|
|
1041
1483
|
a failed visit leaves the tabs exactly where they were — no optimistic switch
|
|
1042
1484
|
to roll back:
|
|
@@ -1067,14 +1509,210 @@ route, so it is SSR-safe and shareable:
|
|
|
1067
1509
|
<BbTabs :items="items" navigation replace query-key="section" />
|
|
1068
1510
|
```
|
|
1069
1511
|
|
|
1512
|
+
### Restyling with passthrough
|
|
1513
|
+
|
|
1514
|
+
`pt` reaches a named part with a class list — or, in the object form, a
|
|
1515
|
+
style and attributes — optionally only while a state is on. Parts: `root`,
|
|
1516
|
+
`wrapper` (the strip's outer element: the `wrapper:prepend` slot, the triggers,
|
|
1517
|
+
the `wrapper:append` slot), `list` (the `role="tablist"` row the triggers sit
|
|
1518
|
+
in — it scrolls when they overflow), `item` (one tab trigger, a broadcast),
|
|
1519
|
+
`indicator` (the marker sliding under the active trigger — the pill, or the
|
|
1520
|
+
`line` variant's bar), `panels` (the element around the panels) and `panel`
|
|
1521
|
+
(one panel, a broadcast). States: `active` per tab (the current trigger / the
|
|
1522
|
+
shown panel) and `disabled` — per tab on `item`, and on every part while the
|
|
1523
|
+
whole tabs is `disabled`. Tabs do not "open", so there is no `open`.
|
|
1524
|
+
|
|
1525
|
+
The workspace settings above, restyled through those parts: type on
|
|
1526
|
+
`pt:item`, weight on `pt:item:active`, panel padding on `pt:panel`. A look
|
|
1527
|
+
that depends on the TAB'S OWN DATA — a tab flagged by a count you put on its
|
|
1528
|
+
descriptor — is a per-item function on `pt:item`:
|
|
1529
|
+
`:pt:item="({ item, active }) => item.badge && 'text-red-600'"`, called with
|
|
1530
|
+
the element of `items` and every state as a boolean for that tab, merged after
|
|
1531
|
+
`pt:item:active`. No other part takes a function.
|
|
1532
|
+
|
|
1533
|
+
**pt:item and pt:panel — settings sections**
|
|
1534
|
+
|
|
1535
|
+
```vue
|
|
1536
|
+
<template>
|
|
1537
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
1538
|
+
<div class="mb-3 flex flex-col gap-0.5">
|
|
1539
|
+
<p class="text-sm font-medium">Workspace settings</p>
|
|
1540
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
1541
|
+
Northwind Billing · changes save per section.
|
|
1542
|
+
</p>
|
|
1543
|
+
</div>
|
|
1544
|
+
<BbTabs
|
|
1545
|
+
v-model="section"
|
|
1546
|
+
block
|
|
1547
|
+
:items="tabs"
|
|
1548
|
+
pt:item="text-sm"
|
|
1549
|
+
pt:item:active="font-semibold"
|
|
1550
|
+
pt:panel="pt-3 text-sm"
|
|
1551
|
+
>
|
|
1552
|
+
<template #general>
|
|
1553
|
+
<div class="grid gap-3">
|
|
1554
|
+
<BbTextInput
|
|
1555
|
+
v-model="org.name"
|
|
1556
|
+
compact
|
|
1557
|
+
label="Workspace name"
|
|
1558
|
+
name="workspace-name"
|
|
1559
|
+
/>
|
|
1560
|
+
<BbTextInput
|
|
1561
|
+
v-model="org.slug"
|
|
1562
|
+
compact
|
|
1563
|
+
label="URL slug"
|
|
1564
|
+
name="workspace-slug"
|
|
1565
|
+
prepend:icon="lucide:link"
|
|
1566
|
+
/>
|
|
1567
|
+
<div class="flex justify-end">
|
|
1568
|
+
<BbButton variant="primary" @click="onSaveGeneral">
|
|
1569
|
+
Save general
|
|
1570
|
+
</BbButton>
|
|
1571
|
+
</div>
|
|
1572
|
+
</div>
|
|
1573
|
+
</template>
|
|
1574
|
+
<template #members>
|
|
1575
|
+
<ul class="divide-y divide-(--bb-border)">
|
|
1576
|
+
<li
|
|
1577
|
+
v-for="member in members"
|
|
1578
|
+
:key="member.email"
|
|
1579
|
+
class="flex items-center justify-between gap-2 py-2 text-sm"
|
|
1580
|
+
>
|
|
1581
|
+
<span class="min-w-0 truncate">
|
|
1582
|
+
<span class="font-medium">{{ member.name }}</span>
|
|
1583
|
+
<span class="text-xs text-(--bb-text-muted)">
|
|
1584
|
+
· {{ member.email }}</span
|
|
1585
|
+
>
|
|
1586
|
+
</span>
|
|
1587
|
+
<span class="shrink-0 text-xs text-(--bb-text-muted)">{{
|
|
1588
|
+
member.role
|
|
1589
|
+
}}</span>
|
|
1590
|
+
</li>
|
|
1591
|
+
</ul>
|
|
1592
|
+
</template>
|
|
1593
|
+
<template #billing>
|
|
1594
|
+
<div class="grid gap-1.5">
|
|
1595
|
+
<p class="font-medium">Pro · €49 / month</p>
|
|
1596
|
+
<p class="text-xs text-(--bb-text-muted)">
|
|
1597
|
+
Next invoice Jul 28, 2026 · Visa ···· 4242
|
|
1598
|
+
</p>
|
|
1599
|
+
<div class="pt-1">
|
|
1600
|
+
<BbButton prepend:icon="lucide:credit-card" variant="outline">
|
|
1601
|
+
Manage billing
|
|
1602
|
+
</BbButton>
|
|
1603
|
+
</div>
|
|
1604
|
+
</div>
|
|
1605
|
+
</template>
|
|
1606
|
+
</BbTabs>
|
|
1607
|
+
</div>
|
|
1608
|
+
</template>
|
|
1609
|
+
|
|
1610
|
+
<script setup lang="ts">
|
|
1611
|
+
import { reactive, ref } from 'vue';
|
|
1612
|
+
import { BbButton, BbTabs, BbTextInput } from 'bitboss-ui';
|
|
1613
|
+
import type { BbTabsItem } from 'bitboss-ui';
|
|
1614
|
+
|
|
1615
|
+
type Section = 'general' | 'members' | 'billing';
|
|
1616
|
+
|
|
1617
|
+
const tabs: Array<BbTabsItem<Section>> = [
|
|
1618
|
+
{ key: 'general', label: 'General' },
|
|
1619
|
+
{ key: 'members', label: 'Members' },
|
|
1620
|
+
{ key: 'billing', label: 'Billing' },
|
|
1621
|
+
];
|
|
1622
|
+
|
|
1623
|
+
const section = ref<Section>('general');
|
|
1624
|
+
const org = reactive({ name: 'Northwind Billing', slug: 'northwind' });
|
|
1625
|
+
const members = [
|
|
1626
|
+
{ name: 'Alex Rivera', email: 'alex@northwind.io', role: 'Owner' },
|
|
1627
|
+
{ name: 'Sam Chen', email: 'sam@northwind.io', role: 'Admin' },
|
|
1628
|
+
{ name: 'Jordan Lee', email: 'jordan@northwind.io', role: 'Editor' },
|
|
1629
|
+
];
|
|
1630
|
+
|
|
1631
|
+
const onSaveGeneral = async () => {
|
|
1632
|
+
await new Promise((resolve) => setTimeout(resolve, 400));
|
|
1633
|
+
};
|
|
1634
|
+
</script>
|
|
1635
|
+
```
|
|
1636
|
+
|
|
1637
|
+
On the split layout each piece takes its own `pt`: `BbTabsList` has `root`
|
|
1638
|
+
(the node `BbTabs` calls `wrapper`), `list`, `item` and `indicator`;
|
|
1639
|
+
`BbTabsPanels` has `root` (`BbTabs`'s `panels`) and `panel`. `BbTabsRoot`
|
|
1640
|
+
renders no element and takes no `pt`. A `BbTabs` entry in the global map or a
|
|
1641
|
+
scope still reaches the pieces, and a `BbTabsList` / `BbTabsPanels` entry
|
|
1642
|
+
beside it wins.
|
|
1643
|
+
|
|
1644
|
+
**pt on the split layout — BbTabsList and BbTabsPanels**
|
|
1645
|
+
|
|
1646
|
+
```vue
|
|
1647
|
+
<template>
|
|
1648
|
+
<div class="max-w-md rounded-(--bb-radius) border border-(--bb-border) p-3">
|
|
1649
|
+
<p class="mb-3 text-sm font-medium">Account preferences</p>
|
|
1650
|
+
<BbTabsRoot
|
|
1651
|
+
v-model="section"
|
|
1652
|
+
direction="vertical"
|
|
1653
|
+
:items="sections"
|
|
1654
|
+
variant="line"
|
|
1655
|
+
>
|
|
1656
|
+
<div class="grid grid-cols-[auto_minmax(0,1fr)] gap-4">
|
|
1657
|
+
<BbTabsList
|
|
1658
|
+
pt:indicator="bg-(--bb-text)"
|
|
1659
|
+
pt:item:active="font-semibold"
|
|
1660
|
+
pt:list="gap-1"
|
|
1661
|
+
/>
|
|
1662
|
+
<BbTabsPanels pt:panel="text-sm" pt:root="min-h-20">
|
|
1663
|
+
<template #profile>
|
|
1664
|
+
<p>Display name, avatar and the time zone your reports use.</p>
|
|
1665
|
+
</template>
|
|
1666
|
+
<template #notifications>
|
|
1667
|
+
<p>
|
|
1668
|
+
Email digests go out Mondays at 09:00; mentions notify at once.
|
|
1669
|
+
</p>
|
|
1670
|
+
</template>
|
|
1671
|
+
<template #security>
|
|
1672
|
+
<p>
|
|
1673
|
+
Two-factor is on. Last sign-in: Firefox on macOS, 2 hours ago.
|
|
1674
|
+
</p>
|
|
1675
|
+
</template>
|
|
1676
|
+
</BbTabsPanels>
|
|
1677
|
+
</div>
|
|
1678
|
+
</BbTabsRoot>
|
|
1679
|
+
</div>
|
|
1680
|
+
</template>
|
|
1681
|
+
<script setup lang="ts">
|
|
1682
|
+
import { ref } from 'vue';
|
|
1683
|
+
import { BbTabsList, BbTabsPanels, BbTabsRoot } from 'bitboss-ui';
|
|
1684
|
+
import type { BbTabsItem } from 'bitboss-ui';
|
|
1685
|
+
|
|
1686
|
+
// A split layout: each piece takes its own pt. The list's `indicator` is the
|
|
1687
|
+
// sliding bar of the `line` variant; `BbTabsRoot` renders no element and takes
|
|
1688
|
+
// no pt.
|
|
1689
|
+
type Section = 'profile' | 'notifications' | 'security';
|
|
1690
|
+
|
|
1691
|
+
const sections: Array<BbTabsItem<Section>> = [
|
|
1692
|
+
{ key: 'profile', label: 'Profile' },
|
|
1693
|
+
{ key: 'notifications', label: 'Notifications' },
|
|
1694
|
+
{ key: 'security', label: 'Security' },
|
|
1695
|
+
];
|
|
1696
|
+
|
|
1697
|
+
const section = ref<Section>('profile');
|
|
1698
|
+
</script>
|
|
1699
|
+
```
|
|
1700
|
+
|
|
1701
|
+
The full grammar, the merge rules and the global map are in the
|
|
1702
|
+
[passthrough guide](./guides/passthrough.md).
|
|
1703
|
+
|
|
1704
|
+
A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
1705
|
+
`pt` prop) is typed as `BbTabsProps['pt']`, never an imported `PtValue`: see
|
|
1706
|
+
[passthrough § Typing `pt` in `<script>`](./guides/passthrough.md#typing-pt-in-script).
|
|
1707
|
+
|
|
1070
1708
|
### Works well with
|
|
1071
1709
|
|
|
1072
1710
|
- **`BbBadge` / count pills in `label` slots** — status dots and unread counts
|
|
1073
|
-
ride in the `label
|
|
1711
|
+
ride in the `label:<key>` or `label` slot; the strip re-measures when they
|
|
1074
1712
|
resize.
|
|
1075
1713
|
- **`BbButton` for Prev/Next** — feed `goTo` from the `BbTabsRoot` default slot
|
|
1076
1714
|
or from `useBbTabsContext`, binding `:disabled` to `isFirst`/`isLast`.
|
|
1077
|
-
- **`BbTable` per tab** — one tab per saved view or status filter, each
|
|
1715
|
+
- **`BbTable` per tab** — one tab per saved view or status filter, each panel a
|
|
1078
1716
|
`BbTable`; combine with `eager` if a table's fetched rows should survive tab
|
|
1079
1717
|
switches.
|
|
1080
1718
|
- **`useBbTabsContext`** — the by-id handle for driving tabs from a page header,
|
|
@@ -1082,11 +1720,15 @@ route, so it is SSR-safe and shareable:
|
|
|
1082
1720
|
|
|
1083
1721
|
### Gotchas and anti-patterns
|
|
1084
1722
|
|
|
1085
|
-
- **The sliding
|
|
1086
|
-
`offsetLeft`/`offsetTop`, so render tabs in a visible,
|
|
1087
|
-
container. It settles itself on mount, resize, and font
|
|
1088
|
-
static pill until the first measurement lands —
|
|
1089
|
-
nothing to fight in demos.
|
|
1723
|
+
- **The sliding indicator is measured from layout.** It reads the active
|
|
1724
|
+
trigger's `offsetLeft`/`offsetTop`, so render tabs in a visible,
|
|
1725
|
+
normally-positioned container. It settles itself on mount, resize, and font
|
|
1726
|
+
load, and paints a static pill (or bar) until the first measurement lands —
|
|
1727
|
+
nothing to configure, and nothing to fight in demos.
|
|
1728
|
+
- **Do not fake a variant with `pt`.** An underline built from
|
|
1729
|
+
`pt:item:active="border-b-2 …"` on a `pill` strip fights the pill; use
|
|
1730
|
+
`variant="line"` (or a registered token preset) and keep `pt` for what is
|
|
1731
|
+
genuinely per-call-site.
|
|
1090
1732
|
- **Vertical strips answer Up/Down _and_ Left/Right arrows.** Up/Down is the
|
|
1091
1733
|
primary pair (matching the vertical `aria-orientation`, per the ARIA APG);
|
|
1092
1734
|
Left/Right keeps working as a forgiving extra. Horizontal strips answer
|
|
@@ -1101,31 +1743,38 @@ route, so it is SSR-safe and shareable:
|
|
|
1101
1743
|
go Back to.
|
|
1102
1744
|
- **Do not put interactive controls inside a `label` slot.** The trigger is
|
|
1103
1745
|
already a button; a nested button/link is invalid and steals the click. Put
|
|
1104
|
-
actions in a
|
|
1746
|
+
actions in a panel or a toolbar (the `BbTabsRoot` layout), not in a label.
|
|
1105
1747
|
- **Don't reach for `BbTabsRoot` by default.** If you only need a strip over its
|
|
1106
|
-
|
|
1748
|
+
panels, `BbTabs` is less markup and identical behavior; split only for markup
|
|
1107
1749
|
between them.
|
|
1108
|
-
- **Every tab disabled
|
|
1109
|
-
|
|
1750
|
+
- **Every tab disabled renders an inert tablist** — it does not throw. With no
|
|
1751
|
+
`modelValue` and no enabled tab there is nothing to select, so the strip
|
|
1752
|
+
renders with no active tab and no panel (`useBbTabsContext.ts` handles
|
|
1753
|
+
this deliberately). Nothing warns, so an all-disabled group looks like a
|
|
1754
|
+
rendering bug; leave at least one tab enabled, or hide the strip.
|
|
1110
1755
|
|
|
1111
1756
|
### Accessibility
|
|
1112
1757
|
|
|
1113
1758
|
- **Roles and relationships are wired for you.** The strip is a `tablist`, each
|
|
1114
1759
|
trigger a `tab` with `aria-selected` and `aria-controls` pointing at its
|
|
1115
|
-
`tabpanel`, and each
|
|
1760
|
+
`tabpanel`, and each panel a `tabpanel` labelled by its trigger
|
|
1116
1761
|
(`aria-labelledby`). Do not add these yourself.
|
|
1762
|
+
- **Name the strip when the page has more than one.** An `aria-label` on
|
|
1763
|
+
`<BbTabs>` lands on the wrapper, not on the `role="tablist"` element; name the
|
|
1764
|
+
tablist through its part:
|
|
1765
|
+
`:pt:list="{ attrs: { 'aria-label': 'Invoice sections' } }"`.
|
|
1117
1766
|
- **Roving tabindex + keyboard.** Exactly one trigger is in the tab order
|
|
1118
1767
|
(`tabindex="0"`); the rest are `-1`. **Left/Right** arrows move (and select)
|
|
1119
1768
|
the previous/next enabled tab, wrapping around the ends; **Home** and **End**
|
|
1120
1769
|
jump to the first/last enabled tab. Disabled tabs are skipped. Focus follows
|
|
1121
|
-
selection — arrowing to a tab activates it (automatic activation) — so
|
|
1122
|
-
should be cheap to switch (reach for lazy
|
|
1770
|
+
selection — arrowing to a tab activates it (automatic activation) — so panels
|
|
1771
|
+
should be cheap to switch (reach for lazy panels, the default). Vertical
|
|
1123
1772
|
strips (`direction="vertical"`) follow the APG's vertical-tablist pattern:
|
|
1124
1773
|
**Up/Down** move to the previous/next tab with the same wrapping, and
|
|
1125
1774
|
Left/Right stay active as a forgiving alias. Up/Down do nothing on
|
|
1126
1775
|
horizontal strips (they keep their page-scroll meaning).
|
|
1127
1776
|
- **Provide your own accessible names for icon-only affordances.** Scroll-arrow
|
|
1128
|
-
buttons in the `
|
|
1777
|
+
buttons in the `wrapper:prepend`/`wrapper:append` slots need an `aria-label`
|
|
1129
1778
|
(they are your markup, not the component's).
|
|
1130
1779
|
- **Label slots carry presentation only.** Keep the accessible name in the
|
|
1131
1780
|
trigger text; a decorative badge or icon in a `label` slot should not be the
|
|
@@ -1139,18 +1788,19 @@ route, so it is SSR-safe and shareable:
|
|
|
1139
1788
|
|
|
1140
1789
|
| Prop | Type | Default | Required | Description |
|
|
1141
1790
|
| --- | --- | --- | --- | --- |
|
|
1142
|
-
| `
|
|
1143
|
-
| `
|
|
1791
|
+
| `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: `indicator`, `item`, `list`, `panel`, `panels`, `root`, `wrapper`. States: `active`, `disabled`. 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 `BbTabsProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
1792
|
+
| `block` | `boolean \| undefined` | `false` | | Displays the component as full width. |
|
|
1793
|
+
| `compact` | `boolean \| undefined` | `false` | | Adds a CSS class that applies a compact style to the component. |
|
|
1144
1794
|
| `direction` | `"horizontal" \| "vertical" \| undefined` | `"horizontal"` | | Direction of the tabs component. |
|
|
1145
|
-
| `disableAnimateX` | `boolean \| undefined` |
|
|
1146
|
-
| `disableAnimateY` | `boolean \| undefined` |
|
|
1147
|
-
| `disabled` | `boolean \| undefined` |
|
|
1148
|
-
| `eager` | `boolean \| undefined` |
|
|
1795
|
+
| `disableAnimateX` | `boolean \| undefined` | `false` | | Disables the horizontal slide transition between tab panels (enabled by default). |
|
|
1796
|
+
| `disableAnimateY` | `boolean \| undefined` | `false` | | Disables the smooth height animation when switching between tab panels (enabled by default). |
|
|
1797
|
+
| `disabled` | `boolean \| undefined` | `false` | | Disables the component |
|
|
1798
|
+
| `eager` | `boolean \| undefined` | `false` | | Prevents rendering content before it's made visible. |
|
|
1149
1799
|
| `headers` | `Record<string, string> \| undefined` | | | Additional HTTP headers forwarded to Inertia when navigation is triggered. Only meaningful in an Inertia context. |
|
|
1150
|
-
| `id` | `string \| undefined` | | | The
|
|
1800
|
+
| `id` | `string \| undefined` | | | The root's `id`, and the key `useBbTabsContext(id)` pairs by. Generated when omitted. |
|
|
1151
1801
|
| `items` | `BbTabsItem<K>[]` | | yes | Array of items that define the tabs in the component. |
|
|
1152
1802
|
| `modelValue` | `K \| null \| undefined` | | | The current tab key. Used by v-model. |
|
|
1153
|
-
| `navigation` | `boolean \| undefined` |
|
|
1803
|
+
| `navigation` | `boolean \| undefined` | `false` | | Synchronizes the current tab with the URL query parameter. Pair it with `replace` unless a tab is genuinely a separate destination — see the `replace` prop. |
|
|
1154
1804
|
| `onBefore` | `(() => boolean \| void) \| undefined` | | | Inertia lifecycle hook — fired just before the request is sent. Return `false` to cancel the visit. |
|
|
1155
1805
|
| `onCancel` | `(() => void) \| undefined` | | | Inertia lifecycle hook — fired when the request is cancelled. |
|
|
1156
1806
|
| `onError` | `((errors: Record<string, string>) => void) \| undefined` | | | Inertia lifecycle hook — fired when the server returns validation errors. |
|
|
@@ -1162,18 +1812,88 @@ route, so it is SSR-safe and shareable:
|
|
|
1162
1812
|
| `preserveScroll` | `boolean \| ((props: Record<string, unknown>) => boolean) \| undefined` | | | Controls whether Inertia preserves the scroll position after navigation. Only meaningful in an Inertia context. |
|
|
1163
1813
|
| `preserveState` | `boolean \| ((props: Record<string, unknown>) => boolean) \| null \| undefined` | | | Controls whether Inertia preserves the current component state after navigation. Only meaningful in an Inertia context. |
|
|
1164
1814
|
| `queryKey` | `string \| undefined` | `"tab"` | | Defines the query key used for URL-based navigation. |
|
|
1165
|
-
| `replace` | `boolean \| undefined` |
|
|
1166
|
-
| `server` | `boolean \| undefined` |
|
|
1815
|
+
| `replace` | `boolean \| undefined` | `false` | | Replaces history rather than pushing it when changing tab. Recommended default whenever `navigation` is on: the query keeps the active tab (deep-linkable, survives reload) while Back still returns to the page the user came from, instead of undoing one tab click at a time. Leave it off only when a tab is a destination of its own — typically a `server` visit whose content the user should be able to go Back to. |
|
|
1816
|
+
| `server` | `boolean \| undefined` | `false` | | When true and in an Inertia context, triggers a real server-side Inertia visit instead of a client-only `history.pushState`. |
|
|
1817
|
+
| `variant` | `'none'` \| `'pill'` \| `'line'` | `"pill"` | | Look of the tab strip. `pill` is the segmented strip — a muted rounded bar with a raised pill sliding under the active trigger; `line` puts the triggers on a thin baseline with a sliding underline (on the side edge when `direction="vertical"`); `none` keeps behaviour and structure with no chrome, for fully custom designs through `pt` and classes. Every look is a preset of the strip's tokens (`--list-bg`, `--indicator-bg`, `--indicator-h`, `--active-fg`, …). Register more via the vite plugin `tabsVariants` option and style `.bb-tabs-list--<variant>` with the same tokens. The class lands on the strip (`BbTabsList`), which can also take its own `variant` on the split layout. |
|
|
1818
|
+
|
|
1819
|
+
## Passthrough parts and states
|
|
1820
|
+
|
|
1821
|
+
`pt:<part>="…"` restyles a part; `pt:<part>:<state>="…"` applies only while the state is on. A component-wide state is on for every part at once; a _per node_ state resolves on each node of a broadcast part (one row, one option, one day). Grammar and merge rules: `guides/passthrough.md`. In `<script>`, type a `pt` value as `<Component>Props['pt']` (`<Component>Props<Row>['pt']` on a generic component); `PtValue` is not exported: `guides/passthrough.md` § Typing `pt` in `<script>`.
|
|
1822
|
+
|
|
1823
|
+
| Part | What it is |
|
|
1824
|
+
| --- | --- |
|
|
1825
|
+
| `root` | The tabs' outer element, around the strip and the panels. |
|
|
1826
|
+
| `wrapper` | The strip's outer element: the `wrapper:prepend` slot, the triggers, the `wrapper:append` slot. `BbTabsList`'s root in a split layout. |
|
|
1827
|
+
| `list` | The `role="tablist"` row the triggers sit in — it scrolls when they overflow, and the indicator slides inside it. |
|
|
1828
|
+
| `item` | One tab trigger — a broadcast resolved per tab with its own `active` / `disabled`. Also takes a per-item function, called with the tab's descriptor. |
|
|
1829
|
+
| `indicator` | The marker sliding under the active trigger: the pill, or the bar of the `line` variant. Its position and size are measured. |
|
|
1830
|
+
| `panels` | The element around the panels. `BbTabsPanels`'s root in a split layout. |
|
|
1831
|
+
| `panel` | One tab panel — a broadcast; `panel:active` is the panel on show. Takes no function. |
|
|
1832
|
+
|
|
1833
|
+
States are listed in precedence order: when two are on at once and their entries conflict, the later one wins.
|
|
1834
|
+
|
|
1835
|
+
| State | When it is on |
|
|
1836
|
+
| --- | --- |
|
|
1837
|
+
| `disabled` | On every part while the whole tabs is `disabled`; per node on `item`: a tab that is disabled. |
|
|
1838
|
+
| `active` | Per node, on `item` and `panel`: the selected tab's trigger and its shown panel. |
|
|
1167
1839
|
|
|
1168
1840
|
## Events
|
|
1169
1841
|
|
|
1170
|
-
- `update:modelValue` — `(
|
|
1842
|
+
- `update:modelValue` — `(value: K): void` — Emitted when the selected tab changes. Used by `v-model`.
|
|
1171
1843
|
|
|
1172
1844
|
## Slots
|
|
1173
1845
|
|
|
1174
|
-
- `
|
|
1175
|
-
- `
|
|
1176
|
-
- `
|
|
1846
|
+
- `label` — scope: `BbTabsSlotProps<K>` `{ current: K \| null; currentIndex: number; disabled: boolean; isFirst: boolean; isLast: boolean; selected: boolean; text: string; value: K; goTo: (target: "first" \| "previous" \| "next" \| "last") => void }` — Fallback slot used for all tab labels when no per-tab `label:<key>` slot is provided.
|
|
1847
|
+
- `wrapper:append` — scope: `BbTabsScrollSlotProps` `{ isScrolling: boolean; canScrollLeft: boolean; canScrollRight: boolean; scroll: (direction: "left" \| "right") => void }` — Content rendered after the scrollable tab label list (e.g. a right scroll arrow).
|
|
1848
|
+
- `wrapper:prepend` — scope: `BbTabsScrollSlotProps` `{ isScrolling: boolean; canScrollLeft: boolean; canScrollRight: boolean; scroll: (direction: "left" \| "right") => void }` — Content rendered before the scrollable tab label list (e.g. a left scroll arrow).
|
|
1849
|
+
- `#<key>` (named from data) — scope: `BbTabsSlotProps<K>` — One tab's content panel, by the tab `key` through `slotKey`; no fallback (an empty panel). Reserved keys (their slot is one of this component's own, so a key spelled like them is an error): `label`.
|
|
1850
|
+
- `#label:<key>` (named from data) — scope: `BbTabsSlotProps<K>` — One tab trigger's label, by the tab `key` through `slotKey`; beats `label`, which beats the item's `label` text.
|
|
1851
|
+
|
|
1852
|
+
## CSS custom properties
|
|
1853
|
+
|
|
1854
|
+
Set these on the element, or on a class you put on it, to retune this component alone — the sanctioned alternative to reaching past the API with `:deep()`. They are this component's own locals — a **Set on** of `pt:<part>` means the local lives on that part's element, so set it through that entry (`pt:box="[--border-color:var(--color-green-500)]"`); the global `--bb-*` theme tokens are a separate tier (see the [design-tokens guide](./guides/design-tokens.md), or the MCP `list_tokens` tool).
|
|
1855
|
+
|
|
1856
|
+
| Property | Set on | Default | What it is |
|
|
1857
|
+
| --- | --- | --- | --- |
|
|
1858
|
+
| `--gap` | `.bb-tabs` | `8px` | |
|
|
1859
|
+
| `--list-bg` | `.bb-tabs-list` | `color-mix(in oklab, var(--bb-text) 8%, transparent)` | The strip behind the triggers |
|
|
1860
|
+
| `--list-border` | `.bb-tabs-list` | `transparent` | The strip's edge line: a baseline under the triggers (beside them when vertical), --bb-border-w thick, painted inside the strip. `pill` draws none; `line` sets it to --bb-border |
|
|
1861
|
+
| `--p` | `.bb-tabs-list` | `3px` | strip inner padding — the gutter the indicator sits in, and the scroll inset |
|
|
1862
|
+
| `--list-r` | `.bb-tabs-list` | `var(--bb-radius)` | strip corners |
|
|
1863
|
+
| `--list-h` | `.bb-tabs-list` | `var(--bb-control-h)` | strip min height |
|
|
1864
|
+
| `--fs` | `.bb-tabs-list` | `var(--bb-fs)` | trigger label size |
|
|
1865
|
+
| `--trigger-gap` | `.bb-tabs-list` | `0px` | space between triggers |
|
|
1866
|
+
| `--trigger-px` | `.bb-tabs-list` | `10px` | trigger side padding |
|
|
1867
|
+
| `--trigger-r` | `.bb-tabs-list` | `calc(var(--list-r) - var(--p))` | Trigger corners, concentric inside --list-r |
|
|
1868
|
+
| `--trigger-min-h` | `.bb-tabs-list` | `calc(var(--list-h) - var(--p) * 2)` | Trigger height inside the padded strip |
|
|
1869
|
+
| `--list-fg` | `.bb-tabs-list` | `var(--bb-text-muted)` | inactive trigger label |
|
|
1870
|
+
| `--hover-fg` | `.bb-tabs-list` | `var(--bb-text)` | hovered trigger label |
|
|
1871
|
+
| `--active-fg` | `.bb-tabs-list` | `var(--bb-text)` | active trigger label |
|
|
1872
|
+
| `--active-fw` | `.bb-tabs-list` | `500` | active trigger label weight (inactive labels are 500) |
|
|
1873
|
+
| `--indicator-bg` | `.bb-tabs-list` | `var(--bb-panel)` | the indicator's fill |
|
|
1874
|
+
| `--indicator-border` | `.bb-tabs-list` | `color-mix(in oklab, var(--bb-text) 8%, transparent)` | The indicator's edge |
|
|
1875
|
+
| `--indicator-r` | `.bb-tabs-list` | `var(--trigger-r)` | The indicator's corners — the pill's, concentric inside --list-r |
|
|
1876
|
+
| `--indicator-h` | `.bb-tabs-list` | `initial` | The indicator's thickness: its height, its width on a vertical strip. `initial` fills the whole trigger box — the pill; a bar is `2px`, on the trigger's bottom edge (side edge when vertical) |
|
|
1877
|
+
| `--indicator-inset` | `.bb-tabs-list` | `0px` | Inset of the indicator from the trigger box — shrinks the pill; a bar keeps its thickness, shortens by it at both ends and floats it above the edge |
|
|
1878
|
+
| `--elev` | `.bb-tabs-list` | `var(--bb-elev)` | The theme's resting lift, composed UNDER the indicator's own shadow. Two names because they are two decisions: `--elev` is what the language lifts every plate by, `--indicator-shadow` is this component's own. |
|
|
1879
|
+
| `--indicator-shadow` | `.bb-tabs-list` | `var(--bb-shadow-sm)` | Indicator lift, painted on top of --elev — the theme's selected-segment lift, so it holds in dark (a literal black 6% vanished there). |
|
|
1880
|
+
| `--transition-duration` | `.bb-tabs-panels` | `var(--bb-transition-slow)` | |
|
|
1881
|
+
| `--gap` | `.bb-tabs-panels` | `30px` | |
|
|
1882
|
+
| `--max-w` | `.bb-tabs-panels` | `initial` | The strip-width knob must not percolate into panel content: nested tabs rendered inside a panel start with a clean slate |
|
|
1883
|
+
|
|
1884
|
+
## Component tree
|
|
1885
|
+
|
|
1886
|
+
`BbTabs` is not one component: rendering it mounts every component below, and each one is live inside it. **Read this before styling, theming or debugging `BbTabs`, and before concluding a part, a token or a behaviour does not exist** — it may live on a component further down. How to read it:
|
|
1887
|
+
|
|
1888
|
+
- **_internal_** nodes are building blocks with no API of their own: you reach them only through `BbTabs`. A pt part listed as landing there is set on `BbTabs` (`pt:<part>`).
|
|
1889
|
+
- **_public_** nodes are components with their own contract. `BbTabs` reaches one only through a pt part of its own that lands on it (shown on the parent node as `part → Component`, e.g. `spinner → BbSpinner`) or through a pt map it hands it (shown as "hands … the pt map", in `BbTabs`'s words → the child's). The child's other props and parts are not exposed; its contract explains what it renders.
|
|
1890
|
+
- **CSS custom properties** listed on a node are declared on THAT node's root and read by elements inside it. Set one on that node's root or on the element inside it that reads it — the pt part that lands there is how you reach it (`pt:box="[--border-color:…]"` on a text input) — never on `BbTabs`'s root, where the node's own declaration masks it (design-tokens guide, _Overriding one from a consumer app_, rule 0).
|
|
1891
|
+
- Listed nodes are the ones `BbTabs`'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 the `tree` field of this component in `components.json`.
|
|
1892
|
+
|
|
1893
|
+
- `BbTabs` _(this component)_ — hands `BbTabsList` the pt map `passthrough.forwardInstance(LIST_PARTS)` (ours → theirs); hands `BbTabsPanels` the pt map `passthrough.forwardInstance(PANELS_PARTS)` (ours → theirs)
|
|
1894
|
+
- `BbTabsList` _(public — [contract](./BbTabsList.md))_ — `BbTabs`'s pt parts land here: `list` → `ul.bb-tabs-list__list`, `indicator` → `li.bb-tabs-list__indicator`, `item` → `BbBaseButton`
|
|
1895
|
+
- `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
|
|
1896
|
+
- `BbTabsPanels` _(public — [contract](./BbTabsPanels.md))_ — `BbTabs`'s pt parts land here: `panel` → `section.bb-tabs__panel`
|
|
1177
1897
|
|
|
1178
1898
|
## See Also
|
|
1179
1899
|
|