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
|
@@ -0,0 +1,958 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Passthrough (pt)
|
|
3
|
+
summary: Reach a named part of a component — its icon, its field box, a table row, a menu entry — with a class list, a style or an attribute, optionally only while a named state is on. One grammar for every component, typed and linted. A pt value typed in <script> (a const, a preset, a wrapper's prop, a split global map) uses <Component>Props['pt'] and definePt; the Pt* types are not exported.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Passthrough (`pt`)
|
|
7
|
+
|
|
8
|
+
`pt` is the typed way to reach INSIDE a component — the first choice once a
|
|
9
|
+
variant or a token does not cover the look, ahead of a CSS override on one of
|
|
10
|
+
the library's classes (allowed for fine-tuning, unsupported:
|
|
11
|
+
[design-language](./design-language.md) § Hard Rules has the ladder). Every
|
|
12
|
+
component names a short list of **parts** (`root`, `icon`, `box`, `row`, …)
|
|
13
|
+
and a short list of **states** (`loading`, `errors`, `selected`, `checked`, …),
|
|
14
|
+
and you bind to a part with a prop:
|
|
15
|
+
|
|
16
|
+
> **On Tailwind v4, set `cssLayers: TAILWIND_V4_LAYERS` in the build plugin
|
|
17
|
+
> first** ([installation](./installation-and-plugin-setup.md) § Cascade
|
|
18
|
+
> layers). The class-string form of `pt` is built for the layered setup:
|
|
19
|
+
> without it the library's CSS is unlayered and outranks your utilities, so
|
|
20
|
+
> most of the examples below would paint nothing. That is how the cascade
|
|
21
|
+
> works, not a `pt` bug.
|
|
22
|
+
|
|
23
|
+
```vue
|
|
24
|
+
<!-- a class list on the icon -->
|
|
25
|
+
<BbButton prepend:icon="lucide:save" pt:icon="text-emerald-600">Save</BbButton>
|
|
26
|
+
|
|
27
|
+
<!-- …and, on top of it, another one only while the button is loading
|
|
28
|
+
(the state entry replaces a conflicting utility: red while loading) -->
|
|
29
|
+
<BbButton
|
|
30
|
+
prepend:icon="lucide:save"
|
|
31
|
+
pt:icon="text-slate-400"
|
|
32
|
+
pt:icon:loading="text-red-500 animate-pulse"
|
|
33
|
+
>Save</BbButton>
|
|
34
|
+
|
|
35
|
+
<!-- the field box of a text input, only while it holds a value -->
|
|
36
|
+
<BbTextInput
|
|
37
|
+
v-model="q"
|
|
38
|
+
label="Search"
|
|
39
|
+
pt:box="rounded-none"
|
|
40
|
+
pt:box:has-value="border-emerald-500"
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
<!-- every data row of a table, and the highlighted one -->
|
|
44
|
+
<BbTable :items="rows" pt:row="text-sm" pt:row:highlighted="bg-amber-50" />
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Which parts and states a component has is in its contract, on the single
|
|
48
|
+
`pt:<part>` row of the props table, in the component's guide under
|
|
49
|
+
_Restyling with passthrough_, and in the table at the end of this guide. In
|
|
50
|
+
the attribute form a name outside the list is a **type error and an ESLint
|
|
51
|
+
error** (`bitboss-ui/no-unknown-attributes`); in the object forms (`:pt`,
|
|
52
|
+
the global map) it is a one-time dev warning (see _Typos_) — the object
|
|
53
|
+
forms are the one place the type checker and the rule cannot see.
|
|
54
|
+
|
|
55
|
+
## Read this first: when `pt` is the wrong tool
|
|
56
|
+
|
|
57
|
+
- **A part can land on a component deep in the tree.** `pt:box` on
|
|
58
|
+
`BbTextInput` lands inside `CommonFieldInput`; `pt:spinner` on `BbSpinner`;
|
|
59
|
+
`pt:option` on `BbSelect` inside `BbSelectPopover` → `FlatListBox`. Each
|
|
60
|
+
contract's **Component tree** lists which part lands on which node and which
|
|
61
|
+
pt maps are handed to nested public components — check it before deciding a
|
|
62
|
+
node cannot be reached.
|
|
63
|
+
|
|
64
|
+
- **A look that several places need is a variant, not a passthrough.** The
|
|
65
|
+
eight text-like controls have `variant="ghost"` precisely because forty-five
|
|
66
|
+
places used to strip the field chrome by hand. Pick the closest variant
|
|
67
|
+
first (`ghost` for "no chrome", `none` for "nothing at all"), then `pt` for
|
|
68
|
+
what is left. Never rebuild a variant with `pt`, and never re-spell an old
|
|
69
|
+
`:deep()` reset as `pt:box="bg-transparent border-transparent"` — it loses
|
|
70
|
+
the same specificity fight the variant exists to win.
|
|
71
|
+
- **A field box's resting border is a token, its state borders are classes.**
|
|
72
|
+
`pt:box="[--border-color:var(--color-green-500)]"` recolours the rest and
|
|
73
|
+
errors / warnings still paint their frame over it; `pt:box:errors="border-red-800"`
|
|
74
|
+
is the state itself. A plain `border-green-500` on the base `pt:box` would
|
|
75
|
+
hide the error frame — `bitboss-ui/no-box-border-color` flags it (see
|
|
76
|
+
[design-tokens](./design-tokens.md), _The field box_).
|
|
77
|
+
- **A size, a colour scale, a radius is a token.** Set `--bb-*` or the
|
|
78
|
+
component's own `--*` tokens (see [design-tokens](./design-tokens.md)); `pt`
|
|
79
|
+
with `style: { '--icon-size': '22px' }` is one way to deliver a component
|
|
80
|
+
token to one instance, not a replacement for the token. This matters most
|
|
81
|
+
where parts are a PAIR sized from one token — a button's icon and spinner
|
|
82
|
+
share `--icon-size`, and the spinner is parked over the icon by a margin
|
|
83
|
+
computed from it. `pt:icon="size-6"` resizes one node and breaks the pair;
|
|
84
|
+
set the token on `pt:root` instead.
|
|
85
|
+
- **A component whose only part is `root` wants plain `class`.** BbAsterisk,
|
|
86
|
+
BbIcon, BbSmoothHeight and BbSpinner
|
|
87
|
+
expose `pt:root` and nothing else — on them `pt:root="…"` is `class="…"`
|
|
88
|
+
with extra letters, and `class` / `style` on the tag is the spelling to
|
|
89
|
+
use. The part exists for uniformity: the global map, the object form and a
|
|
90
|
+
wrapper that spreads props address every component the same way.
|
|
91
|
+
- **Behaviour goes through the component's API.** `pt` accepts listeners, and
|
|
92
|
+
they concatenate after the component's own handler, but if the component has
|
|
93
|
+
an event or a prop for what you want, use that. And a part that is
|
|
94
|
+
decoration stays decoration: icons and spinners are `pointer-events: none`,
|
|
95
|
+
so a pointer listener bound to `pt:icon` never fires — the click lands on the
|
|
96
|
+
control. Listen there and read `event.target`.
|
|
97
|
+
- **Accessibility is the library's job.** Every component is accessible with
|
|
98
|
+
no `pt` at all — names, roles, live regions, focus order are wired inside.
|
|
99
|
+
You are neither expected nor required to do anything about it through `pt`,
|
|
100
|
+
and no example in these docs shows an accessibility attribute going through
|
|
101
|
+
it.
|
|
102
|
+
|
|
103
|
+
## The grammar
|
|
104
|
+
|
|
105
|
+
Two axes, never mixed. The **name** says where; the **value** says what.
|
|
106
|
+
|
|
107
|
+
| form | example |
|
|
108
|
+
| --------------------- | ----------------------------------------------------------------------------------------------- |
|
|
109
|
+
| part | `pt:icon="text-red-500"` |
|
|
110
|
+
| part while a state | `pt:icon:loading="opacity-50"` |
|
|
111
|
+
| object value | `:pt:icon="{ class: 'shrink-0', style: { '--size': '28px' }, attrs: { 'data-test': 'icon' } }"` |
|
|
112
|
+
| object prop | `:pt="{ icon: 'text-red-500', 'icon:loading': 'opacity-50' }"` |
|
|
113
|
+
| per-item function | `:pt:row="({ item, highlighted }) => item.overdue && 'bg-red-50'"` — row parts, instance only |
|
|
114
|
+
| global (build plugin) | `bitbossUi({ pt: { BbButton: { icon: 'text-slate-500' } } })` |
|
|
115
|
+
| named scope | `bitbossUi({ ptScopes: { webapp: { … } } })` + `<BbPtScope name="webapp">` |
|
|
116
|
+
|
|
117
|
+
- **Segment one is always a part, segment two is always a state, one state at
|
|
118
|
+
most.** `pt:icon:loading:disabled` does not exist; when two states must
|
|
119
|
+
combine, write the CSS against the modifier classes
|
|
120
|
+
(`.bb-button--loading.bb-base-button--disabled .my-icon`).
|
|
121
|
+
- **A bare string is a class list** — the form almost every use takes.
|
|
122
|
+
- **The object form** adds `style` (merged; a CSS variable set here behaves
|
|
123
|
+
the same on Tailwind v3, v4, layered or unlayered) and `attrs`, which is
|
|
124
|
+
`v-bind` on the part: `data-*`, `autocomplete` / `inputmode` / `spellcheck`
|
|
125
|
+
on a text field's `pt:input` (a select's control is `activator`, a button —
|
|
126
|
+
`data-test`, not `autocomplete`; its `input` is the search field in the
|
|
127
|
+
options), a `viewBox` on an icon, a listener.
|
|
128
|
+
- **A broadcast part lands on every node it names.** `pt:icon` on a button
|
|
129
|
+
reaches whichever content icons render; `pt:row` on a table reaches every
|
|
130
|
+
data row; `pt:option` on a select every listbox option. A unique attribute
|
|
131
|
+
such as `id` on a broadcast part duplicates; that is documented, not
|
|
132
|
+
prevented.
|
|
133
|
+
- **A slot replaces the node, and `pt` for that part with it.** Your own
|
|
134
|
+
`#icon` markup is yours: put the class on it directly. `pt:icon` (from the
|
|
135
|
+
instance, a scope or the global map) no longer has a node to land on.
|
|
136
|
+
- **The words are camelCase; a template may write them kebab.** A two-word
|
|
137
|
+
part or state is one camelCase word — `itemIcon`, `dayButton`, `hasValue`,
|
|
138
|
+
`focusVisible` — and that is how the object forms, the global map and the
|
|
139
|
+
scopes spell it: `{ itemIcon: '…', 'box:hasValue': '…' }`. In a template,
|
|
140
|
+
`pt:item-icon` and `pt:box:has-value` work too, and are type-checked like
|
|
141
|
+
any kebab prop: Vue (and `vue-tsc`) camelize the attribute to the declared
|
|
142
|
+
`pt:itemIcon` / `pt:box:hasValue`. A kebab key in an object
|
|
143
|
+
(`{ 'item-icon': … }`) matches nothing.
|
|
144
|
+
- **A variant is configuration, not a state.** There is no `pt:box:ghost`;
|
|
145
|
+
style a variant through its class hook (`.bb-field-input--ghost`).
|
|
146
|
+
The same rule keeps sizes, placements and label modes out of every state
|
|
147
|
+
list.
|
|
148
|
+
|
|
149
|
+
> **Changed after 3.0.0-beta.31.** The two-word words used to be kebab
|
|
150
|
+
> everywhere (`item-icon`, `has-value`, `focus-visible`, `day-button`, …).
|
|
151
|
+
> Templates need no change; in a `pt` object, `definePt`, the plugin's `pt`
|
|
152
|
+
> map and `ptScopes`, rename the keys to camelCase (`'item-icon'` →
|
|
153
|
+
> `itemIcon`, `'root:focus-visible'` → `'root:focusVisible'`).
|
|
154
|
+
|
|
155
|
+
## Tailwind IntelliSense
|
|
156
|
+
|
|
157
|
+
A `pt:*` value is a class list, but the Tailwind CSS IntelliSense extension
|
|
158
|
+
only watches `class` / `className` / `ngClass` / `class:list` by default, so
|
|
159
|
+
`pt:icon="…"` and `:pt="{ icon: '…' }"` are silent until the editor is told
|
|
160
|
+
those attributes are class lists.
|
|
161
|
+
|
|
162
|
+
The Vite plugin writes that on `vite dev` (the same `vscodeSettings` switch
|
|
163
|
+
as Iconify previews): `tailwindCSS.classAttributes` for the static attribute
|
|
164
|
+
form (`pt:icon="text-emerald-600"`), `tailwindCSS.experimental.classRegex`
|
|
165
|
+
for bound JS — ternaries (`:pt:icon="open ? '…' : '…'"`), `&&` / `||`,
|
|
166
|
+
arrays, `clsx(…)`, multiline `:pt="{ 'header:open': valid ? '…' : '…' }"`,
|
|
167
|
+
and the global map in `bitbossUi({ pt })` — and
|
|
168
|
+
`editor.quickSuggestions.strings` so completions trigger while typing. It
|
|
169
|
+
is a regex over string literals, not a JS parser: escaped quotes and a
|
|
170
|
+
quote nested inside the same delimiter will miss. Reload the window once
|
|
171
|
+
after the first boot. Need the
|
|
172
|
+
[Tailwind CSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
|
|
173
|
+
extension. If you set `vscodeSettings: false`, paste the snippet under that
|
|
174
|
+
option in [installation and plugin setup](./installation-and-plugin-setup.md).
|
|
175
|
+
|
|
176
|
+
## What merging means — the one rule
|
|
177
|
+
|
|
178
|
+
Everything is merged with Vue's `mergeProps`. For each key — the base
|
|
179
|
+
entry first, then each active state's entry in the library's state order
|
|
180
|
+
(below) — the sources merge in this order:
|
|
181
|
+
|
|
182
|
+
1. the global map (`bitbossUi({ pt })`),
|
|
183
|
+
2. the active named scopes (`ptScopes`), outermost `<BbPtScope>` first,
|
|
184
|
+
3. the `pt` object prop,
|
|
185
|
+
4. the `pt:<part>` attribute.
|
|
186
|
+
|
|
187
|
+
So the state axis outranks the source axis: a global `icon:loading` entry
|
|
188
|
+
beats a per-instance `icon` entry for a conflicting attribute while loading;
|
|
189
|
+
within one key the instance beats the global. The consequences you can rely
|
|
190
|
+
on:
|
|
191
|
+
|
|
192
|
+
| what you pass | what happens |
|
|
193
|
+
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
194
|
+
| `class` (string or in `attrs`) | **appends** to ours — a BEM class is never replaced — and **replaces a conflicting utility** from an earlier source: `pt:icon="text-slate-400"` + `pt:icon:loading="text-red-500"` leaves only `text-red-500` while loading (see _Conflicting utilities_) |
|
|
195
|
+
| `style` | merges property by property |
|
|
196
|
+
| a plain attribute | **wins** — applied last, even over one we manage (`disabled`, `viewBox`, `placeholder`); that is the escape hatch, and what you do with it is on you |
|
|
197
|
+
| a listener (`onClick`) | **concatenates after** the component's own handler; it cannot remove it — and the component cannot remove yours: a click that reaches a loading button (a programmatic one — the button is `pointer-events: none` while loading) is swallowed before your `@click`, but a `pt:root` `onClick` still runs |
|
|
198
|
+
|
|
199
|
+
So a state entry beats the base entry — for an attribute and for a
|
|
200
|
+
conflicting utility alike — and within one key the attribute form beats the
|
|
201
|
+
object prop beats a scope beats the global map. When a component forwards a part to a nested
|
|
202
|
+
surface (a select's `option` to its popover), the outer component's three
|
|
203
|
+
sources are merged first and handed over as one entry, so the nested
|
|
204
|
+
component's OWN global-map entry merges before them: your `BbSelect`
|
|
205
|
+
instance beats a `BbSelectPopover` global entry for the same attribute.
|
|
206
|
+
|
|
207
|
+
**Ours first, always.** Where the component has its own listener on a part
|
|
208
|
+
(a dialog's ✕, a menu entry, a tab trigger, a table row) the passthrough
|
|
209
|
+
binding is merged LAST, so your listener runs after ours and a
|
|
210
|
+
`stopImmediatePropagation()` in yours cannot cancel ours. Where our handler
|
|
211
|
+
is delegated to a container (the listbox behind every `option`) it listens
|
|
212
|
+
in the capture phase for the same reason. A `pt:close` listener never stops
|
|
213
|
+
the dialog closing; it observes it.
|
|
214
|
+
|
|
215
|
+
**One state order, everywhere.** When two states are on at once, the later
|
|
216
|
+
one in this list wins, on every component:
|
|
217
|
+
|
|
218
|
+
```
|
|
219
|
+
hasValue → empty → outside → today → inRange → sorted → sortedDesc → selected → rangeStart → rangeEnd → checked → indeterminate → readonly → disabled → warnings → errors → active → expanded → open → fullscreen → focused → focusVisible → highlighted → loading
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
It is ordered by meaning — the more temporary state wins: a spinner replaces
|
|
223
|
+
a warning icon, an error shows red on a disabled field, a hover shows over a
|
|
224
|
+
selection. One exception: `fullscreen` (dialog and off-canvas) is a layout
|
|
225
|
+
mode, yet it ranks above `open`, because it must override open-state
|
|
226
|
+
decoration a full-viewport surface cannot show — `pt:root:fullscreen="ring-0"`
|
|
227
|
+
beats an open-state ring. A component lists only the states it has, in this
|
|
228
|
+
order.
|
|
229
|
+
|
|
230
|
+
### Conflicting utilities
|
|
231
|
+
|
|
232
|
+
Every resolved class list runs through a deduper — by default the bundled
|
|
233
|
+
[`tailwind-merge`](https://github.com/dcastil/tailwind-merge) v3, for
|
|
234
|
+
Tailwind v4 — so a later source removes an earlier utility that sets the same
|
|
235
|
+
thing, instead of both landing on the element and Tailwind's stylesheet order
|
|
236
|
+
picking one. A single value is deduped too (`pt:icon="p-2 p-4"` → `p-4`).
|
|
237
|
+
Classes it does not recognise, the component's own BEM classes included, are
|
|
238
|
+
kept as they are.
|
|
239
|
+
|
|
240
|
+
- **It removes anything shaped like a utility.** A class of your own named
|
|
241
|
+
like one (`from-sidebar` reads as a gradient stop) is treated as one. A
|
|
242
|
+
custom `@theme` token Tailwind knows but `tailwind-merge` does not
|
|
243
|
+
(`text-body` for a font size) can conflict with the wrong group: configure
|
|
244
|
+
it with `extendTailwindMerge` and point the `passthroughDeduper` plugin
|
|
245
|
+
option at your module.
|
|
246
|
+
- **It does not pair a plain utility with its `!important` twin.** `p-2 p-4!`
|
|
247
|
+
(or `!p-2 p-4`) keeps both: to `tailwind-merge` the important and the plain
|
|
248
|
+
form are different groups by design. The paint still lands where you expect,
|
|
249
|
+
but only because `!important` wins in CSS — the earlier class is not
|
|
250
|
+
removed. Prefer replacing the base entry over shouting past it.
|
|
251
|
+
- **Tailwind v3:** set `passthroughDeduper` to a module of your own that uses
|
|
252
|
+
`tailwind-merge@2`, or `false` to turn deduping off.
|
|
253
|
+
- **It does not beat the component's own rule.** Deduping settles your
|
|
254
|
+
classes against each other, not against the library sheet. Where a part
|
|
255
|
+
declares the property itself, a utility wins only in the layered build
|
|
256
|
+
(see _Does a utility class actually apply?_). `BbButton` is the common trap:
|
|
257
|
+
its root declares left/right padding, `border-radius`, `font-size` and `gap`
|
|
258
|
+
from the locals `--px` / `--r` / `--fs` / `--gap`, so without `cssLayers`
|
|
259
|
+
`pt:root="px-6 rounded-lg text-lg gap-2"` is a silent no-op — measured in
|
|
260
|
+
[installation](./installation-and-plugin-setup.md) § _What "the utility
|
|
261
|
+
loses" actually means_. Use the `size` prop, or set the locals inline
|
|
262
|
+
(`:pt:root="{ style: { '--r': '9999px', '--px': '20px' } }"`); a
|
|
263
|
+
`[--r:12px]` class needs the layered build or the `!` suffix, because the
|
|
264
|
+
size class sets `--r` too.
|
|
265
|
+
- **One case it does not settle:** a global-map _state_ entry on an internal
|
|
266
|
+
component (`BbBaseButton`, `BbOffCanvas`, `BbDialog`) outranks an instance
|
|
267
|
+
state entry on the component that renders it, for the same utility. Add
|
|
268
|
+
`!` to yours (`bg-red-500!`).
|
|
269
|
+
|
|
270
|
+
## Parts that resolve per node
|
|
271
|
+
|
|
272
|
+
A broadcast part whose state only the node knows — a listbox `option` and
|
|
273
|
+
its `selected`, a table `row` and its `highlighted`, a tab `item` and its
|
|
274
|
+
`active`, a day cell and its `disabled` — is resolved **per node**:
|
|
275
|
+
`pt:option:selected` lands on the chosen options only, `pt:row:selected` on
|
|
276
|
+
the checked rows only, and follows the selection live. Component-level
|
|
277
|
+
states (`loading`, `errors`, `open`, `disabled` on the whole control) apply
|
|
278
|
+
to every node of the part at once. The guide of each component says which is
|
|
279
|
+
which; the resolver caches one merged binding per state combination, so a
|
|
280
|
+
virtualised table with a thousand rows pays a handful of cached merges, not
|
|
281
|
+
a thousand — each row does one lookup per part, and the instance holds one
|
|
282
|
+
lazy computed per part it actually reads.
|
|
283
|
+
|
|
284
|
+
## Per-item functions
|
|
285
|
+
|
|
286
|
+
A state says _which rows_ are on; it cannot say _what the row holds_. A
|
|
287
|
+
destructive menu entry, a plan tile tinted by its tier, an invoice row washed
|
|
288
|
+
by its status — those depend on the item's own data, and for them a **row
|
|
289
|
+
part accepts a function** on the instance, beside a plain value:
|
|
290
|
+
|
|
291
|
+
```ts
|
|
292
|
+
({ item, ...states }) => PtValue | false | null | undefined;
|
|
293
|
+
// e.g. ({ item, selected, disabled }) => …
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
- **`item`** is the row's raw item — the element of `items` that row renders,
|
|
297
|
+
typed as your item where the component is generic (`BbSelect`, the option
|
|
298
|
+
groups, `BbTable`), the menu entry on `BbDropdown` / `BbDropdownButton`,
|
|
299
|
+
the tab descriptor on `BbTabs`, the selected value's item on `BbSelect`'s
|
|
300
|
+
`badge` / `comma`, the tag (a string) on `BbTag`'s `badge` / `comma`.
|
|
301
|
+
- **Every state of the component is a boolean beside it**, named as in
|
|
302
|
+
`pt:<part>:<state>` and on for that row — the per-node ones (`selected`,
|
|
303
|
+
`checked`, `highlighted`, `active`, `disabled`) and the component-level ones
|
|
304
|
+
(`loading`, `errors`, `hasValue`, …) alike — so the function destructures
|
|
305
|
+
what it reads. Props are not in it: you wrote the function where you pass
|
|
306
|
+
them.
|
|
307
|
+
- The result is a normal `PtValue` (a class list or `{ class, style, attrs }`);
|
|
308
|
+
`false` / `null` / `undefined` mean _leave the row as it is_.
|
|
309
|
+
|
|
310
|
+
> **Changed after 3.0.0-beta.31.** The function used to receive
|
|
311
|
+
> `{ item, states }`, with `states` a `ReadonlySet` of the words that were on
|
|
312
|
+
> (`states.has('selected')`). Every state is now a boolean beside `item`:
|
|
313
|
+
> write `({ item, selected }) => …`. A function still reading `states` gets
|
|
314
|
+
> `undefined` there and stops matching.
|
|
315
|
+
|
|
316
|
+
```vue
|
|
317
|
+
<!-- a dropdown: the entry's own data says it is destructive —
|
|
318
|
+
actions = [{ key: 'delete', text: 'Delete', variant: 'destructive' }, …] -->
|
|
319
|
+
<BbDropdown
|
|
320
|
+
:items="actions"
|
|
321
|
+
:pt:item="
|
|
322
|
+
({ item }) => item.variant === 'destructive' && 'text-red-600 font-medium'
|
|
323
|
+
"
|
|
324
|
+
/>
|
|
325
|
+
|
|
326
|
+
<!-- radio tiles coloured by the item; the static list rides in the object
|
|
327
|
+
form, since `pt:item` and `:pt:item` are ONE prop -->
|
|
328
|
+
<BbRadioGroup
|
|
329
|
+
v-model="plan"
|
|
330
|
+
:items="plans"
|
|
331
|
+
item-text="name"
|
|
332
|
+
item-value="id"
|
|
333
|
+
legend="Plan"
|
|
334
|
+
:pt="{ item: 'rounded-(--bb-radius) border px-3 py-2' }"
|
|
335
|
+
:pt:item="
|
|
336
|
+
({ item }) => item.tier === 'paid' && 'border-amber-400 bg-amber-50'
|
|
337
|
+
"
|
|
338
|
+
pt:item:checked="ring-2 ring-(--bb-primary)"
|
|
339
|
+
/>
|
|
340
|
+
|
|
341
|
+
<!-- a table: the row's status decides the wash; the object form -->
|
|
342
|
+
<BbTable
|
|
343
|
+
:items="invoices"
|
|
344
|
+
:columns="columns"
|
|
345
|
+
pt:row:highlighted="bg-(--bb-muted)"
|
|
346
|
+
:pt="{
|
|
347
|
+
row: ({ item, highlighted }) =>
|
|
348
|
+
item.status === 'overdue' && !highlighted && 'bg-red-50 text-red-900',
|
|
349
|
+
}"
|
|
350
|
+
/>
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
**Which parts.** Only the row parts — the ones the guide marks _per node_:
|
|
354
|
+
`item`, `icon`, `label`, `itemDescription` on the option groups; `item`,
|
|
355
|
+
`itemText`, `itemIcon`, `itemDescription` on `BbDropdown` and
|
|
356
|
+
`BbDropdownButton`; `option`, `itemText`, `itemIcon`, `itemDescription` on
|
|
357
|
+
`BbSelect` and `BbSelectPopover`; `badge`, `comma` on `BbSelect` (the
|
|
358
|
+
selected value's item) and `BbTag` (the tag string); `item` on `BbTabs`;
|
|
359
|
+
`row` on `BbTable` (`cell` does not — `tdClass` is the per-cell hook). A function on any other
|
|
360
|
+
part (`pt:legend`, `pt:panel`, `pt:cell`) is a **type error**.
|
|
361
|
+
|
|
362
|
+
**Which forms.** The `pt` object (`:pt="{ item: fn }"`) and the `:pt:<part>`
|
|
363
|
+
attribute (`:pt:item="fn"`), on the instance — and only on the BASE key: a
|
|
364
|
+
state key (`pt:item:selected`) never takes a function, because the state is
|
|
365
|
+
already in the function's arguments. One key holds one value: `pt:item="text-sm"` and
|
|
366
|
+
`:pt:item="fn"` are the same prop and cannot both be written, so a static
|
|
367
|
+
list beside a function goes in the object form (`:pt="{ item: 'text-sm' }"`
|
|
368
|
+
plus `:pt:item="fn"`), or the function returns both. **The global map and the named scopes cannot carry
|
|
369
|
+
one**: they ship through the build as JSON, so a function there would vanish
|
|
370
|
+
without a sound — `definePt` rejects it as a type error and the plugin fails
|
|
371
|
+
the build (the same rule as a listener, see _The global map_).
|
|
372
|
+
|
|
373
|
+
**Precedence.** The function's result is merged **last**: after the base
|
|
374
|
+
entry, after every active state's entry, through the same `mergeProps` and
|
|
375
|
+
the same class deduper. So a conflicting utility from the function replaces
|
|
376
|
+
one from `pt:item:selected` — in the table example above the overdue wash is
|
|
377
|
+
skipped by hand while highlighted, because it would otherwise win. When both
|
|
378
|
+
the object form and the attribute carry a function, the object's runs first
|
|
379
|
+
and the attribute's last, the same order their values merge in. Where a part
|
|
380
|
+
is forwarded to a nested surface (`option` from `BbSelect` to its popover,
|
|
381
|
+
`item` from `BbDropdownButton` to its menu) the function travels with it and
|
|
382
|
+
is called there, with that surface's states.
|
|
383
|
+
|
|
384
|
+
**Typing.** `item` is typed from the component: the generic item on
|
|
385
|
+
`BbSelect`, `BbSelectPopover`, `BbTable` and the option groups (inferred from
|
|
386
|
+
`:items`), `BbDropdownItem` on the dropdowns, `BbTabsItem` on the tabs — a
|
|
387
|
+
field of your own on a menu entry or a tab (`danger`, `badge`) needs a cast
|
|
388
|
+
or a typed function, since those two are not generic. An inline arrow is
|
|
389
|
+
typed on every row part, `:pt:item-text="({ item }) => …"` included. A
|
|
390
|
+
function written in `<script>` is typed with `satisfies
|
|
391
|
+
<Component>Props<Row>['pt']`: see _Typing `pt` in `<script>`_.
|
|
392
|
+
|
|
393
|
+
**Cost.** Opt-in and uncached by design: a row with no function pays one
|
|
394
|
+
cached lookup, exactly as before; a row with one pays a call and one merge
|
|
395
|
+
per render. It runs for every rendered row on every render of the list, so
|
|
396
|
+
keep it a cheap read of the item — no allocation-heavy work, no fetching —
|
|
397
|
+
and on a large `BbTable` prefer a `rowClass` computed once per row if the
|
|
398
|
+
function grows. Reactivity is the render's: change the item's data or swap
|
|
399
|
+
the function and the row follows.
|
|
400
|
+
|
|
401
|
+
## Parts that live in a nested surface
|
|
402
|
+
|
|
403
|
+
A select's options live in the popover it opens; a date input's days live in
|
|
404
|
+
the calendar; a dropdown button's menu is a `BbDropdown`. The outer component
|
|
405
|
+
still owns the words — `pt:panel`, `pt:option` on `BbSelect` — and hands the
|
|
406
|
+
raw entries to the surface as its own `pt`, where the states are known. So
|
|
407
|
+
`pt:option:selected` on a `BbSelect` reaches the chosen listbox option,
|
|
408
|
+
`pt:panel:open` on a `BbDatePickerInput` reaches the calendar while it shows,
|
|
409
|
+
and on mobile the same words reach the sheet the surface becomes.
|
|
410
|
+
|
|
411
|
+
Floating surfaces have no single root element of their own, so every one
|
|
412
|
+
splits the same way (`BbPopover`, `BbDropdown`, `BbSelectPopover`,
|
|
413
|
+
`BbDatePicker`, `BbTimePicker`, `BbColorPalette`):
|
|
414
|
+
|
|
415
|
+
- `pt:root` is the **floating element**: an invisible positioning wrapper
|
|
416
|
+
(a `class` on the component lands here too). It has **no node on a phone**:
|
|
417
|
+
the sheet is a visible surface, and an invisible wrapper's styling has no
|
|
418
|
+
business there.
|
|
419
|
+
- `pt:panel` is the **surface you see**: CommonPopover's painted bubble on
|
|
420
|
+
desktop (one box, never a second one nested inside it), the sheet itself on
|
|
421
|
+
a phone. Padding, background, border and radius live here, so
|
|
422
|
+
`pt:panel="bg-…"` paints the whole surface on both. On `BbDatePicker` the
|
|
423
|
+
panel also carries the sizing tokens: `pt:panel="[--px:2px]"` tightens
|
|
424
|
+
it and the grid width follows, on the sheet too.
|
|
425
|
+
|
|
426
|
+
Anything visual belongs on `panel`. Padding, a border or a background on
|
|
427
|
+
`root` does not style the box: it draws a frame around it, and a click on that
|
|
428
|
+
frame counts as a click outside and closes the surface.
|
|
429
|
+
|
|
430
|
+
Because `panel` lands on the sheet, desktop geometry travels with it: a
|
|
431
|
+
`rounded-md`, `w-64`, `max-h-80` or `px-1` meant for the bubble reshapes the
|
|
432
|
+
sheet too. Override it for the phone with `pt:sheet`, which comes after
|
|
433
|
+
`panel` and wins (`pt:sheet="rounded-t-(--bb-radius-surface) w-full"`). And
|
|
434
|
+
don't put `overflow-hidden` on a panel that can become a sheet: the sheet
|
|
435
|
+
stays `overflow: visible` so the pad under it can fill the screen edge while
|
|
436
|
+
it is dragged or springs back, and clipping it shows a gap under the sheet.
|
|
437
|
+
Pin `:adaptive="false"` where a clip is what you need.
|
|
438
|
+
|
|
439
|
+
The inputs that open one (`BbSelect`, `BbDatePickerInput`, `BbTimePickerInput`,
|
|
440
|
+
`BbColorInput`) keep `root` on the field and forward their `panel` to the
|
|
441
|
+
surface's `panel`.
|
|
442
|
+
|
|
443
|
+
> **Changed after 3.0.0-beta.26.** `BbColorPalette`, `BbTimePicker` and
|
|
444
|
+
> `BbDatePicker` used to put `pt:root` on the inner content box; that box is now
|
|
445
|
+
> `pt:panel` (the bubble) and `pt:root` is the floating element. On `BbSelect`,
|
|
446
|
+
> `BbDatePickerInput` and `BbTimePickerInput`, `pt:panel` now lands on the
|
|
447
|
+
> painted bubble. The CSS classes `.bb-color-palette__picker` and
|
|
448
|
+
> `.bb-date-picker__calendar` are `.bb-color-palette__panel` and
|
|
449
|
+
> `.bb-date-picker__panel`. Move padding, background and radius utilities to
|
|
450
|
+
> `pt:panel`.
|
|
451
|
+
|
|
452
|
+
> **Changed after 3.0.0-beta.30.** On a phone `pt:panel` used to land on the
|
|
453
|
+
> box inside the sheet and `pt:root` (with a consumer `class`) on the sheet.
|
|
454
|
+
> Now `pt:panel` is the sheet and `pt:root` has no node there; plain
|
|
455
|
+
> attributes (`data-*`, `id`, listeners) still land on the sheet. Padding
|
|
456
|
+
> meant for the inner box moves to the sheet's edge; use `pt:sheet` to adjust.
|
|
457
|
+
|
|
458
|
+
A `<dialog>`-based surface (`BbDialog`, `BbOffCanvas`) IS its own panel, so
|
|
459
|
+
there is no separate `panel` part, and its backdrop is the `::backdrop`
|
|
460
|
+
pseudo-element: style it in CSS (`.bb-dialog::backdrop`), it has no node for
|
|
461
|
+
`pt`.
|
|
462
|
+
|
|
463
|
+
Every component that becomes a bottom sheet on a phone — `BbDialog`,
|
|
464
|
+
`BbConfirm`, `BbPopover`, `BbDropdown`, `BbDropdownButton`, `BbSelect`,
|
|
465
|
+
`BbSelectPopover`, the date, time and color pickers and their inputs — also
|
|
466
|
+
has a `sheet` part. It reaches **only** that sheet and has no node on
|
|
467
|
+
desktop, so `pt:sheet="rounded-t-2xl"` restyles the phone surface without
|
|
468
|
+
touching the desktop popover, calendar or dialog. On the sheet it comes last:
|
|
469
|
+
after `pt:panel` on the floating surfaces, after `pt:root` on the dialogs
|
|
470
|
+
(whose `root` IS the visible `<dialog>`, so it lands on both), and wins a
|
|
471
|
+
conflict there.
|
|
472
|
+
|
|
473
|
+
### Inside the sheet: `offCanvasProps`
|
|
474
|
+
|
|
475
|
+
`sheet` reaches the sheet's root. To reach what is **inside** the sheet only
|
|
476
|
+
on a phone — its header band, title, body, footer, ✕ — put `pt` in the
|
|
477
|
+
component's `offCanvasProps`. Those are the props of the `BbOffCanvas` the
|
|
478
|
+
component becomes on a phone, so a `pt` there is sheet-only styling, keyed by
|
|
479
|
+
**the off-canvas's own part words** (`root`, `header`, `title`, `description`,
|
|
480
|
+
`content`, `footer`, `close`, state `open`), and it never touches the desktop
|
|
481
|
+
surface. No `pt:sheet-header` vocabulary exists, or is needed.
|
|
482
|
+
|
|
483
|
+
Both spellings work and land the same way — after everything the component
|
|
484
|
+
forwards to its sheet, the object before the colon keys, the order any
|
|
485
|
+
component gives its own `pt` forms. So a sheet-only value wins a conflict,
|
|
486
|
+
and nothing the component forwards is lost:
|
|
487
|
+
|
|
488
|
+
```vue
|
|
489
|
+
<!-- Desktop: header padding pt-1. Phone sheet: the same muted header, pt-10. -->
|
|
490
|
+
<BbDialog
|
|
491
|
+
v-model="open"
|
|
492
|
+
title="Record payment"
|
|
493
|
+
pt:header="bg-(--bb-muted) pt-1"
|
|
494
|
+
:off-canvas-props="{ 'pt:header': 'pt-10' }"
|
|
495
|
+
/>
|
|
496
|
+
|
|
497
|
+
<!-- The same override in the object form — identical result. -->
|
|
498
|
+
<BbDialog
|
|
499
|
+
v-model="open"
|
|
500
|
+
title="Record payment"
|
|
501
|
+
pt:header="bg-(--bb-muted) pt-1"
|
|
502
|
+
:off-canvas-props="{ pt: { header: 'pt-10' } }"
|
|
503
|
+
/>
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
For the date, time and color pickers `offCanvasProps` is the **only** way in:
|
|
507
|
+
their own `header` part is the calendar's navigation bar, not the sheet's
|
|
508
|
+
header, and they forward nothing but `panel` and `sheet` (both the sheet's root). Their sheet also hides its ✕ by
|
|
509
|
+
default, so bring it back before styling it:
|
|
510
|
+
|
|
511
|
+
```vue
|
|
512
|
+
<script setup lang="ts">
|
|
513
|
+
import { ref } from 'vue';
|
|
514
|
+
import { BbButton, BbDatePicker } from 'bitboss-ui';
|
|
515
|
+
|
|
516
|
+
const due = ref<string | null>(null); // the ISO date string the picker emits
|
|
517
|
+
</script>
|
|
518
|
+
|
|
519
|
+
<template>
|
|
520
|
+
<BbDatePicker
|
|
521
|
+
v-model="due"
|
|
522
|
+
label="Due date"
|
|
523
|
+
:off-canvas-props="{
|
|
524
|
+
hideClose: false,
|
|
525
|
+
'pt:header': 'border-b border-(--bb-border)',
|
|
526
|
+
'pt:close': 'text-(--bb-text-muted)',
|
|
527
|
+
}"
|
|
528
|
+
>
|
|
529
|
+
<template #activator="{ props }">
|
|
530
|
+
<BbButton v-bind="props" variant="outline">Pick a day</BbButton>
|
|
531
|
+
</template>
|
|
532
|
+
</BbDatePicker>
|
|
533
|
+
</template>
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
The sheet's root is reachable both ways — `pt:sheet` on the component and
|
|
537
|
+
`pt:root` in `offCanvasProps` — and they merge in that order. Prefer
|
|
538
|
+
`pt:sheet` for the root (the drag-handle tokens `--handle-w` / `--handle-h` /
|
|
539
|
+
`--handle-bg` live there) and `offCanvasProps` for the parts inside.
|
|
540
|
+
|
|
541
|
+
## Split layouts: one stack for the whole and its pieces
|
|
542
|
+
|
|
543
|
+
`BbTabs` renders a strip and its panels; `BbTabsRoot` + `BbTabsList` +
|
|
544
|
+
`BbTabsPanels` lay the same nodes out apart. The pieces have their own `pt`
|
|
545
|
+
(`BbTabsList`: `root`, `list`, `item`, `indicator`; `BbTabsPanels`: `root`,
|
|
546
|
+
`panel`), each piece's `root` being the node `BbTabs` calls `wrapper` /
|
|
547
|
+
`panels`. `BbTabsRoot` renders no element and takes no `pt` — the linter flags
|
|
548
|
+
a `pt:*` on it.
|
|
549
|
+
|
|
550
|
+
The global map and a scope may style tabs under either name, and both land,
|
|
551
|
+
in one stack: at each level the `BbTabs` entry first, the piece's own after it,
|
|
552
|
+
then the next level — so a piece's entry beats the `BbTabs` one beside it,
|
|
553
|
+
while a scope still beats the global map and the instance beats both.
|
|
554
|
+
|
|
555
|
+
```text
|
|
556
|
+
global BbTabs → global BbTabsList (BbTabs's `wrapper` lands as the list's `root`)
|
|
557
|
+
scope BbTabs → scope BbTabsList
|
|
558
|
+
instance: BbTabs's own pt (all-in-one) or the piece's own pt (split)
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
So a theme written once for `BbTabs` covers split layouts, and a
|
|
562
|
+
`BbTabsList` entry refines it wherever a strip renders — inside `BbTabs` too.
|
|
563
|
+
`BbTabs`'s `root` is `.bb-tabs` only; a split layout has no such node.
|
|
564
|
+
|
|
565
|
+
## Does a utility class actually apply?
|
|
566
|
+
|
|
567
|
+
Per PROPERTY, and it depends on your build. With `cssLayers:
|
|
568
|
+
TAILWIND_V4_LAYERS` the library sheet sits in a layer below Tailwind's
|
|
569
|
+
`utilities`, so a utility wins every property it declares, even one the
|
|
570
|
+
part's own rule sets (the two exceptions: a property the library marks
|
|
571
|
+
`!important`, and an inline `style` the component writes itself — a slider
|
|
572
|
+
thumb's position, a table's column template). WITHOUT layers a utility or a
|
|
573
|
+
one-class rule of yours wins only where the library does NOT declare the
|
|
574
|
+
property on that part — and where the part's rule is nested under its
|
|
575
|
+
ancestors (a select's `option` sits under six classes) it wins nothing, on
|
|
576
|
+
v3 and v4 alike; source order only decides ties. A CSS variable set through
|
|
577
|
+
`style`, and a class whose rule out-specifies ours, always win. See
|
|
578
|
+
[installation](./installation-and-plugin-setup.md) § Cascade layers before
|
|
579
|
+
blaming `pt`, and set `cssLayers` on Tailwind v4 — the class-string form of
|
|
580
|
+
`pt` is designed for the layered build.
|
|
581
|
+
|
|
582
|
+
**A utility can win too well: state paint.** Some components paint a part
|
|
583
|
+
per state from their own rules — a rating previews the hovered stars and tints
|
|
584
|
+
them red on errors, by setting each star's `color`. In the layered build your
|
|
585
|
+
utility beats those rules in EVERY state, so a colour class on that part looks
|
|
586
|
+
right at rest and freezes it: `<BbRating pt:item="text-amber-500">` stops the
|
|
587
|
+
hover preview and hides the error tint, silently. Where a component paints
|
|
588
|
+
state like this it exposes the colour as variables — set those instead
|
|
589
|
+
(`pt:root="[--accent:var(--color-amber-500)]"` on BbRating; its guide lists
|
|
590
|
+
them), and the component keeps choosing which one to show. Rule of thumb: if
|
|
591
|
+
the colour you are overriding changes on hover, selection or validation, set
|
|
592
|
+
the component's variable, not the property.
|
|
593
|
+
|
|
594
|
+
**Scoped styles do not reach a forwarded part.** `pt:icon="grey-icon"` with
|
|
595
|
+
`.grey-icon` in `<style scoped>` matches nothing: the scope attribute is on
|
|
596
|
+
your element, not on the component's icon. Use `:deep(.grey-icon)` or an
|
|
597
|
+
unscoped block. That `:deep()` is still a win over `:deep(.bb-button__icon)`:
|
|
598
|
+
the class is yours, so a rename of the library's internal BEM names cannot
|
|
599
|
+
break your stylesheet — the part word is the only promise.
|
|
600
|
+
|
|
601
|
+
## The global map
|
|
602
|
+
|
|
603
|
+
`bitbossUi({ pt: { BbButton: { icon: 'text-slate-500' } } })` in
|
|
604
|
+
`vite.config.*` / `nuxt.config.*` seeds every instance, app-wide: every
|
|
605
|
+
`BbTextInput` label in `text-xs` is `{ BbTextInput: { label: 'text-xs' } }`,
|
|
606
|
+
keyed by the component, never a bare `{ label: … }`. Keys are the names
|
|
607
|
+
components resolve under: `BbSwitch` has its own entry even though its props
|
|
608
|
+
alias `BbCheckbox`'s. It ships as JSON, so it is **data only** — no listener,
|
|
609
|
+
and no per-item function (see _Per-item functions_). The build fails on a function anywhere in it (with the path
|
|
610
|
+
and the per-instance form to use instead), on a key that is not `part` or
|
|
611
|
+
`part:state`, and on an entry that is neither a class string nor an object. A
|
|
612
|
+
part or state word the component does not have is reported at runtime, in
|
|
613
|
+
dev, by the first instance of that component that mounts; the plugin checks every component name and every key of the global map
|
|
614
|
+
against the shipped manifest at build time, so `BbButon` or `icno` there
|
|
615
|
+
fails the build with the vocabulary in the message. **It is build-time only.** The plugin option is the single source:
|
|
616
|
+
not a per-app `app.use(bitbossUiPlugin, { pt })` option, not `setConfig`, not
|
|
617
|
+
a write to `useConfig().pt` (inside an app the object is frozen, so the write
|
|
618
|
+
throws; outside one `useConfig()` returns the build-time module, which the
|
|
619
|
+
resolver never re-reads). A map that is global by construction gets no
|
|
620
|
+
second, weaker source of truth.
|
|
621
|
+
|
|
622
|
+
**Keep the maps out of `vite.config.ts`.** A real map runs to a hundred
|
|
623
|
+
entries; put it in a file of its own and wrap each map in `definePt`, which
|
|
624
|
+
returns it unchanged and types it where you write it — component names,
|
|
625
|
+
`part` / `part:state` keys, and data-only values (a listener is a type error
|
|
626
|
+
there, not only a build error):
|
|
627
|
+
|
|
628
|
+
```ts
|
|
629
|
+
// bitboss-ui.pt.ts
|
|
630
|
+
import { definePt } from 'bitboss-ui/vite'; // 'bitboss-ui/nuxt' in a Nuxt app
|
|
631
|
+
|
|
632
|
+
export const pt = definePt({
|
|
633
|
+
BbTextInput: { label: 'text-xs font-medium text-muted-foreground' },
|
|
634
|
+
});
|
|
635
|
+
|
|
636
|
+
export const ptScopes = {
|
|
637
|
+
webapp: definePt({
|
|
638
|
+
BbTextInput: { label: 'text-white/60' },
|
|
639
|
+
BbButton: { root: 'rounded-full' },
|
|
640
|
+
}),
|
|
641
|
+
};
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
```ts
|
|
645
|
+
// vite.config.ts
|
|
646
|
+
import { bitbossUi } from 'bitboss-ui/vite';
|
|
647
|
+
import { pt, ptScopes } from './bitboss-ui.pt';
|
|
648
|
+
|
|
649
|
+
export default defineConfig({ plugins: [bitbossUi({ pt, ptScopes })] });
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
Import only from `bitboss-ui/vite` (or `/nuxt`) in that file — the main
|
|
653
|
+
`bitboss-ui` entry is the component library, and the config is loaded in
|
|
654
|
+
Node. If you prefer `satisfies` to a call, the map type is
|
|
655
|
+
`Parameters<typeof definePt>[0]`.
|
|
656
|
+
|
|
657
|
+
## Named scopes
|
|
658
|
+
|
|
659
|
+
One app, two looks — a backoffice and a member area, per-tenant areas, a
|
|
660
|
+
marketing section beside the product — share every component but not the
|
|
661
|
+
global map. **`ptScopes`** holds one map per area, same shape and same rules
|
|
662
|
+
as `pt`; **`<BbPtScope name>`** switches one on for everything inside it:
|
|
663
|
+
|
|
664
|
+
```vue
|
|
665
|
+
<!-- WebappLayout.vue -->
|
|
666
|
+
<template>
|
|
667
|
+
<BbPtScope name="webapp">
|
|
668
|
+
<slot />
|
|
669
|
+
</BbPtScope>
|
|
670
|
+
</template>
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
- **Order.** Per key: the global map, then every active scope from the
|
|
674
|
+
outermost `<BbPtScope>` in, then the instance's `class` / `pt` / `pt:*`.
|
|
675
|
+
Nested scopes **add up** — an inner scope never hides an outer one, it
|
|
676
|
+
merges after it — and everything goes through the same merge and deduper, so
|
|
677
|
+
`text-sm` on an instance still replaces a scope's `text-xs`.
|
|
678
|
+
- **Typed.** The plugin generates the names as `BbPtScopeName`
|
|
679
|
+
(`'webapp' | 'backoffice'`), so `<BbPtScope name="webap">` fails `vue-tsc`
|
|
680
|
+
once the dev server or a build has run. Keys inside a scope are checked
|
|
681
|
+
against the manifest at build time, like the global map's.
|
|
682
|
+
- **Renderless and reactive.** No wrapper element; changing `name` restyles
|
|
683
|
+
the subtree.
|
|
684
|
+
- **Follows the component tree, not the DOM.** A dialog, sheet, popover or
|
|
685
|
+
picker opened inside the scope resolves it wherever it paints, and so does a
|
|
686
|
+
`v-bb-tooltip` / `v-bb-dropdown` / `v-bb-date` / `v-bb-time` / `v-bb-color`
|
|
687
|
+
written in a component rendered inside it. One edge: a directive reads the
|
|
688
|
+
scope around the component whose **template** it is written in, so a
|
|
689
|
+
directive placed directly in `<BbPtScope>`'s slot, in the same template as
|
|
690
|
+
the scope, sees the scope above instead — put the scope in a layout or a
|
|
691
|
+
parent component, which is where it lives anyway.
|
|
692
|
+
- **Toasts and confirms render in their host.** `<BbToast>` and `<BbConfirm>`
|
|
693
|
+
paint every message where the host is mounted, so they take the scope (and
|
|
694
|
+
the tokens) of the host, not of the code that fired the message. Mount one
|
|
695
|
+
of each **inside each area's layout**, within its `<BbPtScope>`, instead of
|
|
696
|
+
one at the app root: only one layout is mounted at a time, so there is still
|
|
697
|
+
exactly one host at a time, and a message fired while switching areas waits
|
|
698
|
+
for the next host.
|
|
699
|
+
- **Parts and classes, not tokens.** A scope restyles parts; a subtree's
|
|
700
|
+
colours, radii and sizes are tokens — a `.bb-theme` island (see
|
|
701
|
+
[design-tokens](./design-tokens.md)). An area usually wants both.
|
|
702
|
+
|
|
703
|
+
## Typing `pt` in `<script>`
|
|
704
|
+
|
|
705
|
+
`PtValue`, `PtMap`, `PtItemCtx`, `PtItemResult` and `PtBindings` appear in
|
|
706
|
+
the contracts and in `components.json`, but **they are not exported, on
|
|
707
|
+
purpose**: there is no `import type { PtValue } from 'bitboss-ui'` and no
|
|
708
|
+
`bitboss-ui/pt` entry. Every component's props already carry its whole `pt`
|
|
709
|
+
type, with its own parts, states and row type, so name that one:
|
|
710
|
+
`<Component>Props['pt']`. On a generic component the type argument is
|
|
711
|
+
optional there: `pt` never decides it (the component infers it from `items` /
|
|
712
|
+
`columns`), so `BbTabsProps['pt']` bound as `:pt` leaves the slot props
|
|
713
|
+
typed. Four patterns cover what apps write. (A `variant`
|
|
714
|
+
name computed in script is the sibling question: the exported
|
|
715
|
+
`*VariantType`, [installation](./installation-and-plugin-setup.md) § Variant
|
|
716
|
+
registries.)
|
|
717
|
+
|
|
718
|
+
**1. A per-item function written in `<script>`.** `satisfies` types `item`
|
|
719
|
+
as your row and every state as a boolean, and still catches a misspelt field
|
|
720
|
+
or a state the component does not have. States differ per component: a
|
|
721
|
+
dropdown row has `selected` / `disabled` / `open`, a table row has
|
|
722
|
+
`highlighted`, `selected`, `expanded`, …
|
|
723
|
+
|
|
724
|
+
```ts
|
|
725
|
+
import type { BbDropdownProps, BbTableProps } from 'bitboss-ui';
|
|
726
|
+
|
|
727
|
+
type Invoice = { id: number; status: 'paid' | 'overdue' };
|
|
728
|
+
|
|
729
|
+
export const invoicePt = {
|
|
730
|
+
row: ({ item, highlighted }) =>
|
|
731
|
+
item.status === 'overdue' && !highlighted && 'bg-red-50 text-red-900',
|
|
732
|
+
'row:selected': 'bg-(--bb-muted)',
|
|
733
|
+
} satisfies BbTableProps<Invoice>['pt'];
|
|
734
|
+
|
|
735
|
+
export const menuPt = {
|
|
736
|
+
item: ({ selected, disabled }) => !disabled && selected && 'font-medium',
|
|
737
|
+
} satisfies BbDropdownProps['pt'];
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
**2. A wrapper that forwards `pt`.** Type the prop with the wrapped
|
|
741
|
+
component's `pt`; the caller gets its parts, states and row type. The rest of
|
|
742
|
+
a wrapper (which props to declare, `$attrs`, `T` is the row) is
|
|
743
|
+
[options-items-playbook](./options-items-playbook.md) § Wrapping BbSelect in
|
|
744
|
+
your own component. A component that only presets props, `pt` included, needs
|
|
745
|
+
no wrapper: [preset-components](./preset-components.md).
|
|
746
|
+
|
|
747
|
+
```vue
|
|
748
|
+
<template>
|
|
749
|
+
<BbSelect
|
|
750
|
+
v-model="model"
|
|
751
|
+
:items="items"
|
|
752
|
+
item-text="name"
|
|
753
|
+
item-value="id"
|
|
754
|
+
:label="label"
|
|
755
|
+
:pt="pt"
|
|
756
|
+
/>
|
|
757
|
+
</template>
|
|
758
|
+
|
|
759
|
+
<script setup lang="ts">
|
|
760
|
+
import { BbSelect, type BbSelectProps } from 'bitboss-ui';
|
|
761
|
+
|
|
762
|
+
type Member = { id: number; name: string };
|
|
763
|
+
|
|
764
|
+
defineProps<{
|
|
765
|
+
items: Member[];
|
|
766
|
+
label: string;
|
|
767
|
+
pt?: BbSelectProps<Member>['pt'];
|
|
768
|
+
}>();
|
|
769
|
+
const model = defineModel<number | null>({ default: null });
|
|
770
|
+
</script>
|
|
771
|
+
```
|
|
772
|
+
|
|
773
|
+
**3. A reusable preset.** A constant typed once and spread where it is used;
|
|
774
|
+
an instance adds its own entries, a per-item function included. A preset for
|
|
775
|
+
ANY table leaves the row type out (`BbTableProps['pt']`), never
|
|
776
|
+
`BbTableProps<any>['pt']`: `any` switches the row checks off.
|
|
777
|
+
|
|
778
|
+
```ts
|
|
779
|
+
import type { BbTableProps } from 'bitboss-ui';
|
|
780
|
+
|
|
781
|
+
type Invoice = { id: number; status: 'paid' | 'overdue' };
|
|
782
|
+
|
|
783
|
+
export const compactTable = {
|
|
784
|
+
root: 'text-sm',
|
|
785
|
+
row: 'h-8',
|
|
786
|
+
} satisfies BbTableProps['pt'];
|
|
787
|
+
|
|
788
|
+
export const invoiceTablePt = {
|
|
789
|
+
...compactTable,
|
|
790
|
+
row: ({ item }) => item.status === 'overdue' && 'bg-red-50',
|
|
791
|
+
} satisfies BbTableProps<Invoice>['pt'];
|
|
792
|
+
```
|
|
793
|
+
|
|
794
|
+
**4. A global map split across files.** Wrap each fragment in `definePt` (from
|
|
795
|
+
`bitboss-ui/vite`, or `bitboss-ui/nuxt`) where it is written, so it is
|
|
796
|
+
checked there, then spread the fragments into the plugin's `pt`. Fragments
|
|
797
|
+
merge per COMPONENT: a component in two fragments keeps only the later one's
|
|
798
|
+
entry, so give each component one home.
|
|
799
|
+
|
|
800
|
+
```ts
|
|
801
|
+
import { definePt } from 'bitboss-ui/vite';
|
|
802
|
+
|
|
803
|
+
// forms.pt.ts
|
|
804
|
+
export const formsPt = definePt({
|
|
805
|
+
BbTextInput: { label: 'text-xs font-medium' },
|
|
806
|
+
});
|
|
807
|
+
|
|
808
|
+
// tables.pt.ts
|
|
809
|
+
export const tablesPt = definePt({ BbTable: { row: 'h-8' } });
|
|
810
|
+
|
|
811
|
+
// vite.config.ts: bitbossUi({ pt: { ...formsPt, ...tablesPt } })
|
|
812
|
+
export const pt = { ...formsPt, ...tablesPt };
|
|
813
|
+
```
|
|
814
|
+
|
|
815
|
+
A global map is data only, so a per-item function there is a type error in
|
|
816
|
+
`definePt` (see _Per-item functions_). Each pattern is pinned by
|
|
817
|
+
`src/types/pt-in-script.test-d.ts`, mistakes included.
|
|
818
|
+
|
|
819
|
+
## Typos
|
|
820
|
+
|
|
821
|
+
The attribute form is checked by the ESLint rule always, and by TypeScript
|
|
822
|
+
when `vueCompilerOptions.strictTemplates` is on (recommended — without it
|
|
823
|
+
`vue-tsc` lets an unknown attribute through on any component, `pt:*`
|
|
824
|
+
included). The object forms are checked by TypeScript (an inline
|
|
825
|
+
`:pt="{ icno: … }"` is an excess-property error, even on a generic
|
|
826
|
+
component); the rule checks the static keys of an inline `:pt="{ … }"` too.
|
|
827
|
+
A `pt` object built in a `const` loses both the excess-property check and
|
|
828
|
+
the rule — so in dev a key that names no part or state logs one warning with
|
|
829
|
+
the component's vocabulary:
|
|
830
|
+
|
|
831
|
+
```
|
|
832
|
+
bitboss-ui | BbButton: passthrough key "icno" in the `pt` object matches nothing and is ignored. "icno" is not a part of BbButton. Parts: root, icon, spinner, text.
|
|
833
|
+
```
|
|
834
|
+
|
|
835
|
+
A value that carries nothing — an array, or an object with none of
|
|
836
|
+
`class` / `style` / `attrs` (a Vue-style `:class` object, a `clas` typo) —
|
|
837
|
+
is reported the same way.
|
|
838
|
+
|
|
839
|
+
## Migrating a `:deep()`
|
|
840
|
+
|
|
841
|
+
The recommended upgrade path for a reach-in, not a prohibition: a `:deep()`
|
|
842
|
+
on a library class keeps working and is allowed for fine-tuning — it is just
|
|
843
|
+
unsupported, so a part that carries the same promise is the better place for
|
|
844
|
+
it.
|
|
845
|
+
|
|
846
|
+
1. Find the part: the selector's target maps to a part word in the table
|
|
847
|
+
below (`.bb-field-input__box` → `box`, `.bb-table__row` →
|
|
848
|
+
`row`, `.bb-listbox__option--selected` → `option:selected`). No part → the
|
|
849
|
+
reach-in stays; it is chrome or structure the library does not promise.
|
|
850
|
+
2. Ask whether it is a look several places share. If so it is a variant or a
|
|
851
|
+
token, not a `pt`. Column position on a table (`:first-child` cell
|
|
852
|
+
insets) is not a part either: keep `tdClass` or your own selector.
|
|
853
|
+
3. Hand the part YOUR class (`pt:row="invoice-row"`) and keep the rule on
|
|
854
|
+
that class — with `:deep()` if the style is scoped — or pass the utilities
|
|
855
|
+
directly when the build is layered.
|
|
856
|
+
4. A state suffix replaces a modifier selector: `:deep(.bb-table__row--highlighted)`
|
|
857
|
+
becomes `pt:row:highlighted="…"`; `:deep(.bb-radio-group__item--selected)`
|
|
858
|
+
becomes `pt:item:checked="…"`.
|
|
859
|
+
|
|
860
|
+
## Components
|
|
861
|
+
|
|
862
|
+
Every part word comes from one shared vocabulary (`root`, `label`,
|
|
863
|
+
`description`, `message`, `box`, `input`, `icon`, `prefix`, `suffix`,
|
|
864
|
+
`spinner`, `content`, `title`, `text`, `header`, `footer`, `panel`, `panels`, `wrapper`, `list`, `indicator`, `close`,
|
|
865
|
+
`clear`, `item`, `option`, `day`, `dayButton`, `arrow`, `month`, `year`,
|
|
866
|
+
`monthItem`, `yearItem`, `cellColumnHeader`, `itemText`, `itemIcon`, `itemDescription`, `track`,
|
|
867
|
+
`thumb`, `badge`, `comma`, `table`, `caption`, `head`, `headerRow`, `body`, `row`, `cell`,
|
|
868
|
+
`foot`, `sortIcon`, `selectIcon`, `dragIcon`) and every state word
|
|
869
|
+
from another (`loading`, `disabled`, `readonly`, `errors`, `warnings`,
|
|
870
|
+
`hasValue`, `open`, `selected`, `checked`, `active`, `highlighted`, `focused`,
|
|
871
|
+
`today`, `outside`, `inRange`, `rangeStart`, `rangeEnd`, `expanded`, `sorted`,
|
|
872
|
+
`sortedDesc`, `empty`), so
|
|
873
|
+
fifty components read as one API. **A row's part follows the component's row slot**: `option` where the slot is `#option` (`BbSelect`, `BbSelectPopover`), `day` where it is `#day` (the date pickers), `item` everywhere else (`#item:*` on the dropdowns, breadcrumbs and pagination, and every component with no row slot — the option groups, `BbRating`, the time pickers; `BbColorPalette` / `BbColorInput` say `swatch`, after their `swatches` prop). On the panels and menus — `BbSelect`, `BbSelectPopover`, `BbDropdown` and `BbDropdownButton`'s menu — a row's label is `itemText`, its prepend / append icons `itemIcon` and its muted second line `itemDescription`, so a row reads the same on every list; the FIELD keeps `label`, `icon` and `description`. `BbBreadcrumbs` keeps `text` / `icon` on its crumbs (it has no component-level text or icon to confuse them with), and the option groups keep `label` for a row's text (their `#label` slot). `icon` always means content icons —
|
|
874
|
+
chrome (chevrons, triggers, state glyphs) is never in it. Two pieces of
|
|
875
|
+
chrome have names, and they are not interchangeable: `close` dismisses a
|
|
876
|
+
surface, `clear` empties a control. A component's `clear` is its own single
|
|
877
|
+
control, never a nested chip's ✕. A state marked _per node_ resolves on each node
|
|
878
|
+
of a broadcast part. A component listed with `root` alone is restyled with
|
|
879
|
+
plain `class` / `style`; its `pt:root` is there so the global map and the
|
|
880
|
+
object form reach it like everything else.
|
|
881
|
+
|
|
882
|
+
The table below is the overview. **What each part is and when each state is
|
|
883
|
+
on** — per component, one line per word, states in precedence order — is the
|
|
884
|
+
_Passthrough parts and states_ table in that component's contract
|
|
885
|
+
(`<Component>.md`, or the `pt` field of its `components.json` entry / MCP
|
|
886
|
+
`get_component`).
|
|
887
|
+
|
|
888
|
+
| component | parts | states |
|
|
889
|
+
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
890
|
+
| `BbAccordion` | `root`, `header`, `panel` | `open` |
|
|
891
|
+
| `BbAlert` | `root`, `icon`, `title`, `text`, `close` | — |
|
|
892
|
+
| `BbAsterisk` | `root` | — |
|
|
893
|
+
| `BbAvatar` | `root`, `icon` | — |
|
|
894
|
+
| `BbBadge` | `root`, `icon`, `spinner`, `text`, `clear` | `loading` |
|
|
895
|
+
| `BbBaseButton` | `root` | `disabled` |
|
|
896
|
+
| `BbBaseCheckboxIcon` | `root` | `errors`, `warnings`, `disabled`, `readonly`, `checked`, `indeterminate`, `focused`, `focusVisible` |
|
|
897
|
+
| `BbBaseRadioIcon` | `root` | `errors`, `warnings`, `disabled`, `readonly`, `checked`, `focused`, `focusVisible` |
|
|
898
|
+
| `BbBaseSwitchIcon` | `root` | `errors`, `warnings`, `disabled`, `readonly`, `checked`, `indeterminate`, `focused`, `focusVisible` |
|
|
899
|
+
| `BbBreadcrumbs` | `root`, `item`, `icon`, `text` | `active`, `disabled` _(per crumb)_ |
|
|
900
|
+
| `BbButton` | `root`, `icon`, `spinner`, `text` | `loading`, `disabled` |
|
|
901
|
+
| `BbCalendar` | `root`, `header`, `arrow`, `month`, `year`, `cellColumnHeader`, `day`, `dayButton`, `monthItem`, `yearItem`, `item` _(the time rail's entries)_ | `outside`, `today`, `inRange`, `selected`, `rangeStart`, `rangeEnd`, `disabled`, `highlighted` _(per cell)_, `active` _(month / year)_ |
|
|
902
|
+
| `BbCheckbox` | `root`, `label`, `description`, `message`, `hint`, `icon` | `errors`, `warnings`, `disabled`, `readonly`, `checked`, `indeterminate`, `focused`, `focusVisible` |
|
|
903
|
+
| `BbCheckboxGroup` | `root`, `legend`, `description`, `message`, `hint`, `list`, `item`, `icon`, `label`, `itemDescription` | `errors`, `warnings`, `disabled`, `readonly`, `loading`, `hasValue`; `checked`, `focused`, `focusVisible` _(row parts only)_ |
|
|
904
|
+
| `BbCollapsible` | `root`, `content` | `open` |
|
|
905
|
+
| `BbColorInput` | family: `root`, `label`, `description`, `message`, `hint`, `box`, `input`, `icon`, `spinner`, `prefix`, `suffix`, `clear`, `indicator`, `panel`, `sheet`, `swatch` | family: `errors`, `warnings`, `loading`, `disabled`, `readonly`, `hasValue`; `selected` _(on the swatch only)_ |
|
|
906
|
+
| `BbColorPalette` | `root`, `panel`, `sheet`, `swatch` | `open`, `selected` _(per swatch)_ |
|
|
907
|
+
| `BbConfirm` | `root`, `sheet`, `header`, `title`, `content`, `footer`, `close` _(forwarded to its dialog)_, `text`, `action` | `open` |
|
|
908
|
+
| `BbDatePicker` | `root`, `panel`, `sheet`, `header`, `arrow`, `month`, `year`, `cellColumnHeader`, `day`, `dayButton`, `monthItem`, `yearItem`, `item` _(forwarded to the calendar)_ | `outside`, `today`, `inRange`, `selected`, `rangeStart`, `rangeEnd`, `disabled`, `highlighted` _(per cell)_, `active` _(month / year)_, `open` |
|
|
909
|
+
| `BbDatePickerInput` | family + `activator`, `panel`, `sheet`, `header`, `arrow`, `month`, `year`, `cellColumnHeader`, `day`, `dayButton`, `monthItem`, `yearItem`, `item` _(forwarded to the calendar)_ | family + `open`, `outside`, `today`, `inRange`, `selected`, `rangeStart`, `rangeEnd`, `disabled`, `highlighted` _(per cell)_, `active` _(month / year)_ |
|
|
910
|
+
| `BbDialog` | `root`, `sheet`, `header`, `title`, `description`, `content`, `footer`, `close` | `open`, `fullscreen` |
|
|
911
|
+
| `BbDropdown` | `root`, `panel`, `sheet`, `header`, `footer`, `input` _(every searchable group's field)_, `list`, `item`, `itemText`, `itemIcon`, `itemDescription` | `open`, `selected`, `disabled` _(per entry)_ |
|
|
912
|
+
| `BbDropdownButton` | `root`, `main`, `toggle` _(the two halves)_, `icon`, `spinner`, `text` _(the main button's)_, `panel`, `sheet`, `header`, `footer`, `input`, `item`, `itemText`, `itemIcon`, `itemDescription` _(the menu's)_ | `loading`, `disabled`, `open`; `selected` _(entry parts only)_ |
|
|
913
|
+
| `BbDropzone` | `root`, `content`, `message` | `active`, `errors`, `warnings`, `disabled` |
|
|
914
|
+
| `BbIcon` | `root` | — |
|
|
915
|
+
| `BbIndicator` | `root`, `bubble` | — |
|
|
916
|
+
| `BbNumberInput` | family | family |
|
|
917
|
+
| `BbOffCanvas` | `root`, `header`, `title`, `description`, `content`, `footer`, `close` | `open`, `fullscreen` |
|
|
918
|
+
| `BbPagination` | `root`, `item`, `arrow`, `ellipsis`, `icon` | `active` _(the current page)_, `disabled` _(per control)_ |
|
|
919
|
+
| `BbPopover` | `root`, `panel`, `sheet`, `header`, `content`, `footer` | `open` |
|
|
920
|
+
| `BbProgress` | `root`, `bar` | — |
|
|
921
|
+
| `BbRadio` | `root`, `label`, `description`, `message`, `hint`, `icon` | `errors`, `warnings`, `disabled`, `readonly`, `checked`, `focused`, `focusVisible` |
|
|
922
|
+
| `BbRadioGroup` | `root`, `legend`, `description`, `message`, `hint`, `list`, `item`, `icon`, `label`, `itemDescription` | `errors`, `warnings`, `disabled`, `readonly`, `loading`, `hasValue`; `checked`, `focused`, `focusVisible` _(row parts only)_ |
|
|
923
|
+
| `BbRating` | `root`, `label`, `description`, `message`, `hint`, `item` | `errors`, `warnings`, `disabled`, `readonly`, `hasValue`, `selected` _(per star)_ |
|
|
924
|
+
| `BbSelect` | `root`, `label`, `description`, `message`, `hint`, `box`, `activator`, `icon`, `spinner`, `prefix`, `suffix`, `clear`, `panel`, `sheet`, `header`, `footer`, `input` _(the search field)_, `list`, `option`, `itemText`, `itemIcon`, `itemDescription` _(forwarded to the popover)_, `badge`, `comma` _(each selected value)_ | family + `open`, `selected` _(per option)_ |
|
|
925
|
+
| `BbSelectPopover` | `root`, `panel`, `sheet`, `input`, `clear`, `list`, `option`, `itemText`, `itemIcon`, `itemDescription`, `header`, `footer` | `open`, `selected`, `disabled` _(per option)_ |
|
|
926
|
+
| `BbSlider` | `root`, `label`, `description`, `message`, `hint`, `box`, `track`, `bar`, `ticks`, `tick`, `thumb` | `errors`, `warnings`, `disabled`, `readonly`, `active`, `inRange` _(per tick)_ |
|
|
927
|
+
| `BbSmoothHeight` | `root` | — |
|
|
928
|
+
| `BbSpinner` | `root` | — |
|
|
929
|
+
| `BbSwitch` | `root`, `label`, `description`, `message`, `hint`, `icon` | `errors`, `warnings`, `disabled`, `readonly`, `checked`, `indeterminate`, `focused`, `focusVisible` |
|
|
930
|
+
| `BbSwitchGroup` | `root`, `legend`, `description`, `message`, `hint`, `list`, `item`, `icon`, `label`, `itemDescription` | `errors`, `warnings`, `disabled`, `readonly`, `loading`, `hasValue`; `checked`, `focused`, `focusVisible` _(row parts only)_ |
|
|
931
|
+
| `BbTable` | `root`, `caption`, `table`, `head`, `headerRow`, `cellColumnHeader`, `sortIcon`, `body`, `row`, `cell`, `selectIcon`, `dragIcon`, `foot` | `loading`, `empty`; `sorted`, `sortedDesc` _(per header)_; `selected`, `highlighted`, `expanded`, `disabled` _(per row)_; `indeterminate` _(select-all)_ |
|
|
932
|
+
| `BbTabs` | `root`, `wrapper`, `list`, `item`, `indicator`, `panels`, `panel` | `disabled`; `active`, `disabled` _(per tab)_ |
|
|
933
|
+
| `BbTabsList` | `root` _(BbTabs’s wrapper)_, `list`, `item`, `indicator` | `disabled`; `active`, `disabled` _(per tab)_ |
|
|
934
|
+
| `BbTabsPanels` | `root` _(BbTabs’s panels)_, `panel` | `disabled`; `active` _(per panel)_ |
|
|
935
|
+
| `BbTag` | family + `badge`, `comma` _(one tag)_ | family; `highlighted` _(per tag)_ |
|
|
936
|
+
| `BbTextarea` | family | family |
|
|
937
|
+
| `BbTextInput` | family | family |
|
|
938
|
+
| `BbTimePicker` | `root`, `panel`, `sheet`, `header`, `cellColumnHeader`, `item` | `open`, `disabled`; `selected`, `disabled` _(per entry)_ |
|
|
939
|
+
| `BbTimePickerInput` | family + `activator`, `panel`, `sheet`, `header`, `cellColumnHeader`, `item` | family + `open`, `selected`, `disabled` _(per entry)_ |
|
|
940
|
+
| `BbToast` | `root` _(a region)_, `panel` _(a card)_, `icon`, `content`, `title`, `text`, `footer`, `action`, `close` | `loading` _(per toast)_ |
|
|
941
|
+
| `BbTooltip` | `root`, `panel` | `open` |
|
|
942
|
+
| `BbTree` | `root`, `item` | `expanded` _(per node)_ |
|
|
943
|
+
|
|
944
|
+
_family_ = the text-like form-control vocabulary: parts `root`, `label`,
|
|
945
|
+
`description`, `message`, `hint`, `box`, `input`, `icon`, `spinner` (the box's
|
|
946
|
+
loading spinner), `prefix`, `suffix`, `clear`; states
|
|
947
|
+
`errors`, `warnings`, `loading`, `disabled`, `readonly`, `hasValue`.
|
|
948
|
+
`hasValue` follows the control's own notion of a value (`0` counts on
|
|
949
|
+
`BbNumberInput`, `''` on `BbColorInput`); `warnings` is off while `errors`
|
|
950
|
+
is on. A forwarded family state resolves per node on the surface —
|
|
951
|
+
`pt:option:disabled` on a `BbSelect` or `pt:day:disabled` on a `BbDatePickerInput`
|
|
952
|
+
lands on the disabled options / days, not on all of them. On
|
|
953
|
+
`BbSelect` the control is `activator` and `input` is the search field in the
|
|
954
|
+
options surface; on the date and time inputs `input` is every segment field. `BbButton`'s label is the `text` part, but its
|
|
955
|
+
typography inherits from `root` — reach for `text` only for a class that must
|
|
956
|
+
apply to the label alone (`truncate`); a toggle's `icon` is the drawn glyph, and its `focused` is any
|
|
957
|
+
focus of the native input — parity with the `focused` slot prop, not
|
|
958
|
+
focus-visible.
|