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
|
@@ -6,45 +6,54 @@
|
|
|
6
6
|
|
|
7
7
|
```vue
|
|
8
8
|
<template>
|
|
9
|
-
<BbBaseButton
|
|
10
|
-
:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class="bb-button"
|
|
15
|
-
:class="{
|
|
16
|
-
...sizeClasses,
|
|
17
|
-
'bb-button--loading': loading,
|
|
18
|
-
'bb-button--group': props.group,
|
|
19
|
-
'bb-button--icon': !!icon,
|
|
20
|
-
'bb-button--active': isToggle && isPressed,
|
|
21
|
-
[`bb-button--${props.variant}`]: props.variant !== 'none',
|
|
22
|
-
}"
|
|
23
|
-
:disabled="props.disabled"
|
|
24
|
-
:tabindex="loading ? -1 : undefined"
|
|
25
|
-
@click="onClick"
|
|
26
|
-
>
|
|
9
|
+
<BbBaseButton :ref="setButtonRef" v-bind="rootBindings">
|
|
10
|
+
<!-- The root's whole `v-bind` is `rootBindings` (script): forwarded
|
|
11
|
+
attrs, then ours, then `pt:root` last. Nothing may sit beside this
|
|
12
|
+
root element in the template — a comment there makes the component
|
|
13
|
+
a fragment root and `$el` a text node. -->
|
|
27
14
|
<!-- v-if'd so idle buttons carry no spinner node (and no running
|
|
28
15
|
keyframe animation). The <Transition> keeps the fade smooth: the
|
|
29
16
|
node persists through the leave phase, so the sibling cross-fade
|
|
30
|
-
and label-slide CSS keep matching while everything animates back.
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
and label-slide CSS keep matching while everything animates back.
|
|
18
|
+
|
|
19
|
+
The <Transition> itself waits for the first load. It is two component
|
|
20
|
+
instances (the wrapper and BaseTransition) that render nothing at all
|
|
21
|
+
until `loading` first turns true, and a button that never loads —
|
|
22
|
+
every button in a table cell, and most buttons anywhere — paid for
|
|
23
|
+
both on every mount. `appear` is what makes the deferral invisible:
|
|
24
|
+
mounting the transition WITH its child already inside runs the enter
|
|
25
|
+
animation, exactly as a plain toggle would have. From then on
|
|
26
|
+
`hasLoadedOnce` stays true, so the leave animation has its transition
|
|
27
|
+
to run in. -->
|
|
28
|
+
<Transition v-if="hasLoadedOnce" appear name="bb-button-spinner">
|
|
29
|
+
<BbSpinner
|
|
30
|
+
v-if="loading"
|
|
31
|
+
class="bb-button__spinner"
|
|
32
|
+
v-bind="passthrough.spinner"
|
|
33
|
+
/>
|
|
33
34
|
</Transition>
|
|
35
|
+
<!-- `passthrough.icon` is a BROADCAST: the same binding lands on whichever content
|
|
36
|
+
icons render (at most two of the three). Bound LAST on each so a
|
|
37
|
+
consumer attribute beats ours and a consumer class appends. -->
|
|
34
38
|
<BbIcon
|
|
35
39
|
v-if="props['icon']"
|
|
36
40
|
class="bb-button__icon"
|
|
37
41
|
:icon="props['icon']"
|
|
42
|
+
v-bind="passthrough.icon"
|
|
38
43
|
/>
|
|
39
44
|
<BbIcon
|
|
40
45
|
v-else-if="props['prepend:icon']"
|
|
41
46
|
class="bb-button__prepend-icon"
|
|
42
47
|
:icon="props['prepend:icon']"
|
|
48
|
+
v-bind="passthrough.icon"
|
|
43
49
|
/>
|
|
44
|
-
<span
|
|
50
|
+
<span
|
|
51
|
+
class="bb-button__text"
|
|
52
|
+
:class="{ 'bb-sr-only': !!icon }"
|
|
53
|
+
v-bind="passthrough.text"
|
|
45
54
|
><slot>{{ text }}</slot></span
|
|
46
55
|
>
|
|
47
|
-
<span v-if="loading" class="bb-button__loading-label sr-only">{{
|
|
56
|
+
<span v-if="loading" class="bb-button__loading-label bb-sr-only">{{
|
|
48
57
|
t('common.loadingText')
|
|
49
58
|
}}</span>
|
|
50
59
|
|
|
@@ -52,6 +61,7 @@
|
|
|
52
61
|
v-if="!icon && props['append:icon']"
|
|
53
62
|
class="bb-button__append-icon"
|
|
54
63
|
:icon="props['append:icon']"
|
|
64
|
+
v-bind="passthrough.icon"
|
|
55
65
|
/>
|
|
56
66
|
</BbBaseButton>
|
|
57
67
|
</template>
|
|
@@ -59,22 +69,29 @@
|
|
|
59
69
|
<script setup lang="ts">
|
|
60
70
|
import { BbBaseButton, BbSpinner } from '@/index';
|
|
61
71
|
import BbIcon from '../BbIcon/BbIcon.vue';
|
|
62
|
-
import { computed,
|
|
72
|
+
import { computed, mergeProps, ref, useAttrs, watchEffect } from 'vue';
|
|
63
73
|
import { pickBy } from '@/utilities/functions/pickBy';
|
|
64
74
|
import { noop } from '@/utilities/functions/noop';
|
|
65
75
|
import { useLocale } from '@/composables/useLocale';
|
|
66
76
|
import { useLogger } from '@/composables/useLogger';
|
|
77
|
+
import { useUntil } from '@/composables/useUntil';
|
|
67
78
|
import { removedPropsFor } from '@/deprecation/removedProps';
|
|
68
79
|
import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
|
|
69
80
|
import { extractDomContainer } from '@/utilities/functions/extractDomContainer';
|
|
70
81
|
import { isEqual } from '@/utilities/functions/isEqual';
|
|
71
|
-
import
|
|
82
|
+
import { usePassthrough } from '@/composables/usePassthrough';
|
|
83
|
+
import { BB_BUTTON_PT, type BbButtonProps, type BbButtonSlots } from './types';
|
|
72
84
|
import type { Sizes as SizeMap } from '@/types/SizeScale';
|
|
73
85
|
type Sizes = keyof SizeMap;
|
|
74
86
|
|
|
75
87
|
defineOptions({
|
|
76
88
|
inheritAttrs: false,
|
|
77
89
|
});
|
|
90
|
+
/**
|
|
91
|
+
* Makes the button a toggle: clicking flips the model between `trueValue` and
|
|
92
|
+
* `falseValue`, and the button reports `aria-pressed`. Leave it unbound for a
|
|
93
|
+
* plain button.
|
|
94
|
+
*/
|
|
78
95
|
const modelValue = defineModel<any>();
|
|
79
96
|
const props = withDefaults(defineProps<BbButtonProps>(), {
|
|
80
97
|
falseValue: false,
|
|
@@ -117,8 +134,10 @@ const setButtonRef = (el: unknown) => {
|
|
|
117
134
|
buttonDom.value = extractDomContainer(el) ?? undefined;
|
|
118
135
|
};
|
|
119
136
|
|
|
137
|
+
// `class` is not forwarded: it is the instance's base `root` passthrough entry
|
|
138
|
+
// (the `attrs` option below), so it is deduped against `pt:root` there.
|
|
120
139
|
const forwardedAttrs = computed(() => {
|
|
121
|
-
const { onClick: _, ...rest } = attrs;
|
|
140
|
+
const { onClick: _, class: _class, ...rest } = attrs;
|
|
122
141
|
return rest;
|
|
123
142
|
});
|
|
124
143
|
|
|
@@ -128,6 +147,28 @@ const loading = computed(
|
|
|
128
147
|
() => props.loading || (!!internalLoading.value && !props.disableAutoLoading)
|
|
129
148
|
);
|
|
130
149
|
|
|
150
|
+
/** Latches on the first load; gates the spinner's <Transition> — see the template. */
|
|
151
|
+
const hasLoadedOnce = useUntil(loading);
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Passthrough (plans/passthrough/BbButton.md — the exemplar). Named
|
|
155
|
+
* `passthrough`, not `pt`: in the template a bare `pt` is the `pt` PROP (the
|
|
156
|
+
* object form), which the resolver reads. `loading` is the RESOLVED loading
|
|
157
|
+
* (auto-loading included), so `pt:icon:loading` follows the spinner, not
|
|
158
|
+
* just the prop; `disabled` is the prop, as the modifier is.
|
|
159
|
+
*/
|
|
160
|
+
const passthrough = usePassthrough({
|
|
161
|
+
component: 'BbButton',
|
|
162
|
+
attrs,
|
|
163
|
+
props,
|
|
164
|
+
parts: BB_BUTTON_PT.parts,
|
|
165
|
+
states: BB_BUTTON_PT.states,
|
|
166
|
+
active: {
|
|
167
|
+
loading: () => loading.value,
|
|
168
|
+
disabled: () => !!props.disabled,
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
|
|
131
172
|
const onClick = async (event: Event) => {
|
|
132
173
|
if (loading.value && !props.interactiveWhileLoading) {
|
|
133
174
|
// router-link doesn't allow for prevent default but the logic stays
|
|
@@ -149,8 +190,18 @@ const onClick = async (event: Event) => {
|
|
|
149
190
|
// sync handler that opened a dialog flickered the spinner on every click,
|
|
150
191
|
// and `disable-auto-loading` was the only cure. A sync handler now never
|
|
151
192
|
// touches the counter at all, so there is no window to catch.
|
|
152
|
-
|
|
153
|
-
|
|
193
|
+
// Vue merges `@click` with a `v-bind`'s `onClick` (a `pt` listener) into an
|
|
194
|
+
// ARRAY of handlers: call each in order, and track the async ones together.
|
|
195
|
+
const handlers = [attrs.onClick ?? noop].flat() as Array<
|
|
196
|
+
(...args: any[]) => any
|
|
197
|
+
>;
|
|
198
|
+
const results = handlers.map((handler) => handler(event));
|
|
199
|
+
const pending = results.filter(
|
|
200
|
+
(r) => r && typeof (r as PromiseLike<unknown>).then === 'function'
|
|
201
|
+
);
|
|
202
|
+
if (!pending.length) return results[0];
|
|
203
|
+
const result =
|
|
204
|
+
handlers.length === 1 ? results[0] : Promise.all(pending).then(() => {});
|
|
154
205
|
|
|
155
206
|
internalLoading.value++;
|
|
156
207
|
try {
|
|
@@ -187,29 +238,82 @@ const sizeClasses = computed(() => {
|
|
|
187
238
|
);
|
|
188
239
|
});
|
|
189
240
|
|
|
190
|
-
|
|
241
|
+
/** Props consumed here, never forwarded to the base button. */
|
|
242
|
+
const OWN_PROPS = new Set([
|
|
243
|
+
'append:icon',
|
|
244
|
+
'disableAutoLoading',
|
|
245
|
+
'disabled',
|
|
246
|
+
'interactiveWhileLoading',
|
|
247
|
+
'falseValue',
|
|
248
|
+
'group',
|
|
249
|
+
'icon',
|
|
250
|
+
'loading',
|
|
251
|
+
'modelValue',
|
|
252
|
+
'prepend:icon',
|
|
253
|
+
'size',
|
|
254
|
+
'trueValue',
|
|
255
|
+
'variant',
|
|
256
|
+
]);
|
|
257
|
+
|
|
258
|
+
// A `computed`, not a getter `toRef`: the getter re-ran the whole pick on
|
|
259
|
+
// every read — once per render of every button — which a virtualized table
|
|
260
|
+
// mounting a couple of buttons per row turned into measurable scroll cost.
|
|
261
|
+
// `pt` and every `pt:*` are consumed by the resolver above; forwarded, they
|
|
262
|
+
// would land on the base button as DOM attributes (`pt:icon="…"`).
|
|
263
|
+
const propsToPass = computed(() => ({
|
|
191
264
|
...forwardedAttrs.value,
|
|
192
265
|
...pickBy(
|
|
193
266
|
props,
|
|
194
|
-
(_, key) =>
|
|
195
|
-
![
|
|
196
|
-
'append:icon',
|
|
197
|
-
'disableAutoLoading',
|
|
198
|
-
'disabled',
|
|
199
|
-
'interactiveWhileLoading',
|
|
200
|
-
'falseValue',
|
|
201
|
-
'group',
|
|
202
|
-
'icon',
|
|
203
|
-
'loading',
|
|
204
|
-
'modelValue',
|
|
205
|
-
'prepend:icon',
|
|
206
|
-
'size',
|
|
207
|
-
'trueValue',
|
|
208
|
-
'variant',
|
|
209
|
-
].includes(key)
|
|
267
|
+
(_, key) => !OWN_PROPS.has(key) && key !== 'pt' && !key.startsWith('pt:')
|
|
210
268
|
),
|
|
211
269
|
}));
|
|
212
270
|
|
|
271
|
+
/**
|
|
272
|
+
* The root's whole `v-bind`, in precedence order: the consumer's forwarded
|
|
273
|
+
* attrs, then what the component manages (classes, `disabled`, the loading
|
|
274
|
+
* `tabindex` / `aria-disabled`, the toggle's `aria-pressed`, the click
|
|
275
|
+
* handler), then `pt:root` LAST. `mergeProps` makes that order mean: a
|
|
276
|
+
* `pt:root` class appends, a style merges, an attribute wins — even a managed
|
|
277
|
+
* one; that is the escape hatch, and the owner accepts what a consumer does
|
|
278
|
+
* with it — and a listener runs AFTER `onClick`, never instead of it (T17).
|
|
279
|
+
* Two `v-bind`s on one element are a duplicate attribute, hence one object.
|
|
280
|
+
*/
|
|
281
|
+
/**
|
|
282
|
+
* Loading soft-disables the button (aria-disabled, out of the tab order, no
|
|
283
|
+
* pointer) — unless `interactiveWhileLoading` keeps it usable, which has to
|
|
284
|
+
* cover all three, not just the click handler: CSS `pointer-events: none`
|
|
285
|
+
* alone left the escape hatch unreachable for a real pointer.
|
|
286
|
+
*/
|
|
287
|
+
const softDisabled = computed(
|
|
288
|
+
() => loading.value && !props.interactiveWhileLoading
|
|
289
|
+
);
|
|
290
|
+
|
|
291
|
+
const rootBindings = computed(() =>
|
|
292
|
+
mergeProps(
|
|
293
|
+
propsToPass.value,
|
|
294
|
+
{
|
|
295
|
+
'aria-disabled': softDisabled.value ? true : undefined,
|
|
296
|
+
'aria-pressed': isToggle.value ? isPressed.value : undefined,
|
|
297
|
+
class: [
|
|
298
|
+
'bb-button',
|
|
299
|
+
sizeClasses.value,
|
|
300
|
+
{
|
|
301
|
+
'bb-button--loading': loading.value,
|
|
302
|
+
'bb-button--soft-disabled': softDisabled.value,
|
|
303
|
+
'bb-button--group': props.group,
|
|
304
|
+
'bb-button--icon': !!props.icon,
|
|
305
|
+
'bb-button--active': isToggle.value && isPressed.value,
|
|
306
|
+
[`bb-button--${props.variant}`]: props.variant !== 'none',
|
|
307
|
+
},
|
|
308
|
+
],
|
|
309
|
+
disabled: props.disabled,
|
|
310
|
+
tabindex: softDisabled.value ? -1 : undefined,
|
|
311
|
+
onClick,
|
|
312
|
+
},
|
|
313
|
+
passthrough.root
|
|
314
|
+
)
|
|
315
|
+
);
|
|
316
|
+
|
|
213
317
|
/**
|
|
214
318
|
* Redefined so current implementation of other components
|
|
215
319
|
* which leverage this component can still access the button
|
|
@@ -230,10 +334,66 @@ import type { ButtonTag } from '@/types/CommonProps';
|
|
|
230
334
|
import type { IconType } from '@/types/Icon';
|
|
231
335
|
import type { ButtonVariantType } from '@/types/ButtonVariant';
|
|
232
336
|
import type { Responsive } from '@/types/ResponsiveSize';
|
|
337
|
+
import type { PtMap, PtValue } from '@/types/passthrough';
|
|
233
338
|
|
|
234
339
|
type Sizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
235
340
|
|
|
341
|
+
/**
|
|
342
|
+
* Passthrough parts of `BbButton` (plans/passthrough/BbButton.md).
|
|
343
|
+
*
|
|
344
|
+
* @part root - The button element. The glyph size lives here: `--icon-size`
|
|
345
|
+
* on `pt:root` resizes the icon, the spinner and the gap between them
|
|
346
|
+
* together.
|
|
347
|
+
* @part icon - Every content icon the button renders (`icon`, `prepend:icon`,
|
|
348
|
+
* `append:icon`) — a broadcast; at most two render together. For colour,
|
|
349
|
+
* opacity and attributes — size it through `--icon-size` on `root`, never a
|
|
350
|
+
* size utility here (it breaks the icon / spinner pair).
|
|
351
|
+
* @part spinner - The loading spinner, parked exactly over the icon. Like
|
|
352
|
+
* `icon`: colour and opacity here, size through `--icon-size` on `root`.
|
|
353
|
+
* @part text - The label span. Typography inherits from `root`, so reach for
|
|
354
|
+
* `text` only when a class must apply to the label alone — `truncate` on a
|
|
355
|
+
* long label that must not clip the icons. It carries the margin the label
|
|
356
|
+
* slides by while the spinner is in, so a margin of your own fights the
|
|
357
|
+
* slide.
|
|
358
|
+
*/
|
|
359
|
+
export type BbButtonPtPart = 'root' | 'icon' | 'spinner' | 'text';
|
|
360
|
+
/**
|
|
361
|
+
* Passthrough states of `BbButton`: true while `--loading` / `--disabled`.
|
|
362
|
+
*
|
|
363
|
+
* @state disabled - Component-wide: the button is `disabled`.
|
|
364
|
+
* @state loading - Component-wide: `loading` is on — the spinner shows and
|
|
365
|
+
* the button ignores the pointer.
|
|
366
|
+
*/
|
|
367
|
+
export type BbButtonPtState = 'loading' | 'disabled';
|
|
368
|
+
/** The runtime lists the resolver is wired with — kept next to the types so the two cannot drift. */
|
|
369
|
+
export const BB_BUTTON_PT = {
|
|
370
|
+
parts: ['root', 'icon', 'spinner', 'text'],
|
|
371
|
+
states: ['disabled', 'loading'],
|
|
372
|
+
} as const satisfies {
|
|
373
|
+
parts: readonly BbButtonPtPart[];
|
|
374
|
+
states: readonly BbButtonPtState[];
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
// The passthrough props are a mapped type written INLINE with this
|
|
378
|
+
// component's own unions, not `PtProps<BbButtonPtPart, BbButtonPtState>`:
|
|
379
|
+
// Vue's SFC type resolver expands template-literal keys only when every
|
|
380
|
+
// piece resolves to string literals in scope, and it never substitutes a
|
|
381
|
+
// generic alias's type parameters (`resolveStringType` has no type-parameter
|
|
382
|
+
// map — see plans/PASSTHROUGH.md T20). A prop that silently failed to declare
|
|
383
|
+
// would be the one failure this feature must never have, so every component
|
|
384
|
+
// spells its two lines out and its test asserts the resolved prop names.
|
|
385
|
+
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
|
|
236
386
|
export type BbButtonProps = {
|
|
387
|
+
[K in
|
|
388
|
+
| `pt:${BbButtonPtPart}`
|
|
389
|
+
| `pt:${BbButtonPtPart}:${BbButtonPtState}`]?: PtValue;
|
|
390
|
+
} & {
|
|
391
|
+
/**
|
|
392
|
+
* Passthrough, object form: `{ icon: '…', 'icon:loading': '…' }` — the same
|
|
393
|
+
* keys as the `pt:*` attributes without the prefix. Parts: `root`, `icon`,
|
|
394
|
+
* `spinner`, `text`. States: `loading`, `disabled`.
|
|
395
|
+
*/
|
|
396
|
+
pt?: PtMap<BbButtonPtPart, BbButtonPtState>;
|
|
237
397
|
/**
|
|
238
398
|
* Disables the automatic loading state that tracks async click handlers
|
|
239
399
|
* (enabled by default).
|
|
@@ -268,10 +428,17 @@ export type BbButtonProps = {
|
|
|
268
428
|
*/
|
|
269
429
|
block?: boolean;
|
|
270
430
|
|
|
431
|
+
/**
|
|
432
|
+
* Request payload forwarded to Inertia when navigating via `href` in an
|
|
433
|
+
* Inertia-enabled app. Ignored when not using Inertia.
|
|
434
|
+
*/
|
|
271
435
|
data?: object;
|
|
272
436
|
|
|
273
437
|
/**
|
|
274
|
-
* Disables the component
|
|
438
|
+
* Disables the component: native `disabled` (or `aria-disabled` on a
|
|
439
|
+
* link), muted paint. Beside `loading`, loading wins the look (spinner and
|
|
440
|
+
* variant colours) and this only adds the native blocking — redundant but
|
|
441
|
+
* harmless.
|
|
275
442
|
*/
|
|
276
443
|
disabled?: boolean;
|
|
277
444
|
|
|
@@ -292,6 +459,10 @@ export type BbButtonProps = {
|
|
|
292
459
|
*/
|
|
293
460
|
group?: boolean;
|
|
294
461
|
|
|
462
|
+
/**
|
|
463
|
+
* Additional HTTP headers forwarded to Inertia when navigating via `href`
|
|
464
|
+
* in an Inertia-enabled app.
|
|
465
|
+
*/
|
|
295
466
|
headers?: object;
|
|
296
467
|
|
|
297
468
|
/**
|
|
@@ -319,26 +490,63 @@ export type BbButtonProps = {
|
|
|
319
490
|
icon?: IconType;
|
|
320
491
|
|
|
321
492
|
/**
|
|
322
|
-
* Triggers a loading indicator.
|
|
493
|
+
* Triggers a loading indicator. A loading button is soft-disabled on its
|
|
494
|
+
* own (`aria-disabled`, out of the tab order, clicks and navigation
|
|
495
|
+
* blocked) and keeps its variant colours; with `disabled` set too, loading
|
|
496
|
+
* still wins the look.
|
|
323
497
|
*/
|
|
324
498
|
loading?: boolean;
|
|
325
499
|
|
|
500
|
+
/**
|
|
501
|
+
* HTTP method used for Inertia navigation when `href` is provided in an
|
|
502
|
+
* Inertia-enabled app. Ignored otherwise.
|
|
503
|
+
*/
|
|
326
504
|
method?: 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
327
505
|
|
|
506
|
+
/**
|
|
507
|
+
* Lifecycle hook invoked by Inertia right before the request is sent.
|
|
508
|
+
*/
|
|
328
509
|
onBefore?: () => void;
|
|
329
510
|
|
|
511
|
+
/**
|
|
512
|
+
* Lifecycle hook invoked by Inertia when a request is cancelled.
|
|
513
|
+
*/
|
|
330
514
|
onCancel?: () => void;
|
|
331
515
|
|
|
516
|
+
/**
|
|
517
|
+
* Receives the Inertia cancel token source when a request is initiated.
|
|
518
|
+
* Can be used to cancel the request.
|
|
519
|
+
*
|
|
520
|
+
* Typed platform-agnostically (matching BbButton) so the library's types
|
|
521
|
+
* never require `@inertiajs/vue3` to be installed.
|
|
522
|
+
*/
|
|
332
523
|
onCancelToken?: (cancelToken: unknown) => void;
|
|
333
524
|
|
|
525
|
+
/**
|
|
526
|
+
* Lifecycle hook invoked by Inertia after the request has finished
|
|
527
|
+
* (regardless of success or error).
|
|
528
|
+
*/
|
|
334
529
|
onFinish?: () => void;
|
|
335
530
|
|
|
531
|
+
/**
|
|
532
|
+
* Limits the properties that are preserved in Inertia partial reloads.
|
|
533
|
+
*/
|
|
336
534
|
only?: string[];
|
|
337
535
|
|
|
536
|
+
/**
|
|
537
|
+
* Progress callback invoked by Inertia with the upload/download percentage
|
|
538
|
+
* when available.
|
|
539
|
+
*/
|
|
338
540
|
onProgress?: (progress: { percentage: number | undefined }) => void;
|
|
339
541
|
|
|
542
|
+
/**
|
|
543
|
+
* Lifecycle hook invoked by Inertia when a request starts.
|
|
544
|
+
*/
|
|
340
545
|
onStart?: () => void;
|
|
341
546
|
|
|
547
|
+
/**
|
|
548
|
+
* Lifecycle hook invoked by Inertia when a request succeeds.
|
|
549
|
+
*/
|
|
342
550
|
onSuccess?: () => void;
|
|
343
551
|
|
|
344
552
|
/**
|
|
@@ -347,13 +555,28 @@ export type BbButtonProps = {
|
|
|
347
555
|
|
|
348
556
|
'prepend:icon'?: IconType;
|
|
349
557
|
|
|
558
|
+
/**
|
|
559
|
+
* Controls whether Inertia should preserve the current scroll position after
|
|
560
|
+
* navigation. Can be a boolean or a predicate receiving the visit props.
|
|
561
|
+
* @defaultValue `false`
|
|
562
|
+
*/
|
|
350
563
|
preserveScroll?: boolean | ((props: Record<string, unknown>) => boolean);
|
|
351
564
|
|
|
565
|
+
/**
|
|
566
|
+
* Controls whether Inertia should preserve the current state after navigation.
|
|
567
|
+
* Can be a boolean or a predicate receiving the visit props.
|
|
568
|
+
* @defaultValue `false`
|
|
569
|
+
*/
|
|
352
570
|
preserveState?:
|
|
353
571
|
| boolean
|
|
354
572
|
| ((props: Record<string, unknown>) => boolean)
|
|
355
573
|
| null;
|
|
356
574
|
|
|
575
|
+
/**
|
|
576
|
+
* Format to use when serializing array values into the query string for
|
|
577
|
+
* Inertia requests.
|
|
578
|
+
* @defaultValue `'brackets'`
|
|
579
|
+
*/
|
|
357
580
|
queryStringArrayFormat?: 'brackets' | 'indices';
|
|
358
581
|
|
|
359
582
|
/**
|
|
@@ -418,6 +641,13 @@ export type BbButtonProps = {
|
|
|
418
641
|
* Visual variant of the button. Controls colors and surface style while
|
|
419
642
|
* keeping spacing and sizing unchanged.
|
|
420
643
|
*
|
|
644
|
+
* `'none'` is a blank starting point: the button keeps its structure and
|
|
645
|
+
* behaviour but takes no look, so your own classes don't fight a built-in
|
|
646
|
+
* one. You then own hover, focus and disabled. Fine for a one-off; keep
|
|
647
|
+
* inline styling short, and register a real variant when the look recurs:
|
|
648
|
+
* the plugin's `buttonVariants` option types the name, and you style
|
|
649
|
+
* `.bb-button--<name>` (the library ships no CSS for it).
|
|
650
|
+
*
|
|
421
651
|
* @defaultValue `'primary'`
|
|
422
652
|
*/
|
|
423
653
|
variant?: ButtonVariantType;
|
|
@@ -521,7 +751,27 @@ export type BbButtonSlots = {
|
|
|
521
751
|
/* ── Scale tokens (height / icon / px / font-size) ───────
|
|
522
752
|
Heights and font sizes derive from the global scale knobs so retuning
|
|
523
753
|
`--bb-control-h` / `--bb-fs` resizes the whole button scale coherently
|
|
524
|
-
(md sits one step under the input height, lg matches it).
|
|
754
|
+
(md sits one step under the input height, lg matches it).
|
|
755
|
+
|
|
756
|
+
The ladder is one block per size, six locals each, always the same six:
|
|
757
|
+
`--h-*` min-height, `--icon-size-*` the icon/spinner box, `--px-*` the
|
|
758
|
+
left and right padding, `--fs-*` font-size (which is also the
|
|
759
|
+
line-height), `--r-*` border-radius, `--gap-*` the space between icon
|
|
760
|
+
and label. Nothing paints from a `-<size>` local: the `.bb-button--<size>`
|
|
761
|
+
class copies its block into the active `--h / --icon-size / --px / --fs /
|
|
762
|
+
--r / --gap` below, and those are what the rules read. So retune a whole
|
|
763
|
+
size here, or one button through the active six.
|
|
764
|
+
|
|
765
|
+
Three places the ladder does not simply step:
|
|
766
|
+
- radius is flat from md up (`--bb-radius`); only xs (`--bb-radius-sm`)
|
|
767
|
+
and sm (0.8×) come off that value;
|
|
768
|
+
- lg repeats md's icon size, font size, radius and gap — between those
|
|
769
|
+
two sizes only height and padding grow;
|
|
770
|
+
- 2xl repeats xl's gap.
|
|
771
|
+
|
|
772
|
+
`--bw` and `--elev-tier` are size-dependent too but have no `-<size>`
|
|
773
|
+
entries; the size classes assign them directly (xs and sm take the small
|
|
774
|
+
border and shadow tiers, md and up the full ones). */
|
|
525
775
|
--h-xs: calc(var(--bb-control-h) - 12px);
|
|
526
776
|
--icon-size-xs: 12px;
|
|
527
777
|
--px-xs: 8px;
|
|
@@ -565,19 +815,81 @@ export type BbButtonSlots = {
|
|
|
565
815
|
--gap-2xl: 6px;
|
|
566
816
|
|
|
567
817
|
/* ── Active size (defaults to md) ───────────────────────── */
|
|
568
|
-
--h: var(--h-md);
|
|
569
|
-
--icon-size: var(--icon-size-md);
|
|
818
|
+
--h: var(--h-md); /* min-height, and the min-width of an icon-only button */
|
|
819
|
+
--icon-size: var(--icon-size-md); /* every icon, and the spinner over it */
|
|
820
|
+
/* Left/right padding — 65% of it on a side that carries an icon. */
|
|
570
821
|
--px: var(--px-md);
|
|
571
|
-
--fs: var(--fs-md);
|
|
572
|
-
--r: var(--r-md);
|
|
573
|
-
--gap: var(--gap-md);
|
|
822
|
+
--fs: var(--fs-md); /* font-size, and line-height */
|
|
823
|
+
--r: var(--r-md); /* border-radius */
|
|
824
|
+
--gap: var(--gap-md); /* between icon and label */
|
|
825
|
+
|
|
826
|
+
/* Seal against an ancestor --bg / --fg; variant modifiers re-point these
|
|
827
|
+
and the root paints them once.
|
|
828
|
+
|
|
829
|
+
`--fg` seals to `initial`, which for a custom property is the
|
|
830
|
+
guaranteed-invalid value. Two things follow, and both are load-bearing:
|
|
831
|
+
|
|
832
|
+
1. It really seals. An ancestor that declares `--fg` — BbIndicator and
|
|
833
|
+
BbAlert both do, and both wrap a slot — cannot reach the button.
|
|
834
|
+
Writing `inherit` here would do the OPPOSITE of a seal: it is the
|
|
835
|
+
CSS-wide keyword, so `--fg` would become the ancestor's, and a
|
|
836
|
+
`variant="none"` button slotted into a primary BbIndicator would
|
|
837
|
+
paint its label white on the page background.
|
|
838
|
+
2. `variant="none"` still inherits its host's colour. That variant emits
|
|
839
|
+
no modifier class, so nothing re-points `--fg`; `color: var(--fg)` is
|
|
840
|
+
then invalid at computed-value time, and `color` is an inherited
|
|
841
|
+
property, so it computes to the inherited value — which is what
|
|
842
|
+
`reset.css`'s `:where(button) { color: inherit }` gave it before the
|
|
843
|
+
root started declaring `color`. */
|
|
844
|
+
--bg: transparent; /* the plate */
|
|
845
|
+
--bg-hover: var(--bg); /* also the focus-visible fill; no change by default */
|
|
846
|
+
--bg-pressed: var(--bg); /* fill while [aria-pressed='true'] */
|
|
847
|
+
--fg: initial; /* label and icons (icons paint currentColor) */
|
|
848
|
+
--border-color: transparent; /* the frame; its width is --bw */
|
|
849
|
+
--ring-color: transparent; /* focus ring colour, per variant */
|
|
850
|
+
--ring-size: var(--bb-ring-size); /* focus ring width, outside the border */
|
|
851
|
+
--bw: var(--bb-border-w); /* border width */
|
|
852
|
+
|
|
853
|
+
/* The rest of the state × paint matrix. Every state paints bg / fg / border
|
|
854
|
+
from its own trio; the hover and pressed trios default to the resting
|
|
855
|
+
values (only the fill moves by default) and the disabled trio to the
|
|
856
|
+
muted grey every variant used to hardcode, so the defaults render as
|
|
857
|
+
before. `--fg-hover` / `--fg-pressed` inherit `--fg`'s seal: on
|
|
858
|
+
`variant="none"` they resolve to the guaranteed-invalid value too, so
|
|
859
|
+
`color` keeps falling through to the host's. */
|
|
860
|
+
--fg-hover: var(--fg); /* label and icons on hover (and focus-visible) */
|
|
861
|
+
/* the frame on hover (and focus-visible) */
|
|
862
|
+
--border-hover: var(--border-color);
|
|
863
|
+
--fg-pressed: var(--fg); /* label and icons while [aria-pressed='true'] */
|
|
864
|
+
/* the frame while [aria-pressed='true'] */
|
|
865
|
+
--border-pressed: var(--border-color);
|
|
866
|
+
--bg-disabled: var(--bb-muted); /* the plate while disabled (not loading) */
|
|
867
|
+
/* label and icons while disabled */
|
|
868
|
+
--fg-disabled: color-mix(in oklab, var(--bb-text) 45%, var(--bb-panel));
|
|
869
|
+
--border-disabled: var(--bb-muted); /* the frame while disabled */
|
|
870
|
+
/* whole-button opacity while disabled — `.5` with the three above set to
|
|
871
|
+
the resting tokens gives "fade instead of grey" */
|
|
872
|
+
--opacity-disabled: 1;
|
|
574
873
|
|
|
575
874
|
align-items: center;
|
|
576
|
-
|
|
875
|
+
background-color: var(--bg);
|
|
876
|
+
border-color: var(--border-color);
|
|
577
877
|
border-radius: var(--r);
|
|
578
878
|
border-style: solid;
|
|
579
|
-
border-width:
|
|
580
|
-
|
|
879
|
+
border-width: var(--bw);
|
|
880
|
+
/* Resting lift, but only on a PLATE — primary, secondary, outline and
|
|
881
|
+
destructive opt in below. Ghost, link and `none` stay flat whatever the
|
|
882
|
+
theme asks for, because a lift on a transparent box reads as a bug.
|
|
883
|
+
|
|
884
|
+
The plates read `--elev-tier`, not `--bb-elev` directly, so the size
|
|
885
|
+
blocks can drop xs and sm to the small tier without handing a shadow to
|
|
886
|
+
the flat variants. */
|
|
887
|
+
--elev-tier: var(--bb-elev); /* the shadow a plate variant may take */
|
|
888
|
+
--elev: 0 0 0 0 transparent; /* the shadow painted; flat variants keep this */
|
|
889
|
+
box-shadow:
|
|
890
|
+
var(--elev),
|
|
891
|
+
0px 0px 0px 0px var(--ring-color);
|
|
892
|
+
color: var(--fg);
|
|
581
893
|
display: inline-flex;
|
|
582
894
|
font-size: var(--fs);
|
|
583
895
|
font-weight: 500;
|
|
@@ -589,35 +901,49 @@ export type BbButtonSlots = {
|
|
|
589
901
|
padding-right: var(--px);
|
|
590
902
|
transition-duration: var(--bb-transition-fast);
|
|
591
903
|
transition-property:
|
|
592
|
-
box-shadow, color, background-color, min-height, font-size,
|
|
904
|
+
box-shadow, color, background-color, border-color, min-height, font-size,
|
|
905
|
+
padding-left;
|
|
593
906
|
transition-timing-function: var(--bb-ease);
|
|
594
907
|
vertical-align: top;
|
|
595
908
|
|
|
596
|
-
&:
|
|
597
|
-
|
|
909
|
+
&:hover:not(.bb-base-button--disabled) {
|
|
910
|
+
background-color: var(--bg-hover);
|
|
911
|
+
border-color: var(--border-hover);
|
|
912
|
+
color: var(--fg-hover);
|
|
598
913
|
}
|
|
599
914
|
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
color: var(--bb-primary-fg);
|
|
606
|
-
|
|
607
|
-
&:hover:not(.bb-base-button--disabled) {
|
|
608
|
-
background-color: var(--bb-primary-hover);
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
&[aria-pressed='true']:not(.bb-base-button--disabled) {
|
|
612
|
-
background-color: var(--bb-primary-pressed);
|
|
613
|
-
}
|
|
915
|
+
&[aria-pressed='true']:not(.bb-base-button--disabled) {
|
|
916
|
+
background-color: var(--bg-pressed);
|
|
917
|
+
border-color: var(--border-pressed);
|
|
918
|
+
color: var(--fg-pressed);
|
|
919
|
+
}
|
|
614
920
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
921
|
+
&:focus-visible {
|
|
922
|
+
background-color: var(--bg-hover);
|
|
923
|
+
border-color: var(--border-hover);
|
|
924
|
+
box-shadow:
|
|
925
|
+
var(--elev),
|
|
926
|
+
0px 0px 0px var(--ring-size) var(--ring-color);
|
|
927
|
+
color: var(--fg-hover);
|
|
928
|
+
outline: none;
|
|
929
|
+
}
|
|
619
930
|
|
|
620
|
-
|
|
931
|
+
/* ── Variants — assign locals only; hover / press / focus paint above.
|
|
932
|
+
`&--primary` (one class) so a later `.bb-button { --bg: … }` can retint. */
|
|
933
|
+
&--primary {
|
|
934
|
+
--bg: var(--bb-primary);
|
|
935
|
+
--bg-hover: var(--bb-primary-hover);
|
|
936
|
+
--bg-pressed: var(--bb-primary-pressed);
|
|
937
|
+
--fg: var(--bb-primary-fg);
|
|
938
|
+
--border-color: var(--bb-primary-border);
|
|
939
|
+
--ring-color: var(--bb-primary-ring);
|
|
940
|
+
--elev: var(--elev-tier);
|
|
941
|
+
|
|
942
|
+
/* The divider between grouped buttons. `.bb-button.bb-button--group`
|
|
943
|
+
(three classes with the variant) so it outranks the hover / pressed
|
|
944
|
+
rules above, which paint `border-color` on the button and would
|
|
945
|
+
otherwise take the left edge with them. */
|
|
946
|
+
& + .bb-button.bb-button--group {
|
|
621
947
|
border-left-color: color-mix(
|
|
622
948
|
in oklab,
|
|
623
949
|
var(--bb-primary) 60%,
|
|
@@ -626,116 +952,81 @@ export type BbButtonSlots = {
|
|
|
626
952
|
}
|
|
627
953
|
}
|
|
628
954
|
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
&[aria-pressed='true']:not(.bb-base-button--disabled) {
|
|
639
|
-
background-color: var(--bb-secondary-pressed);
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
&:focus-visible {
|
|
643
|
-
background-color: var(--bb-secondary-hover);
|
|
644
|
-
box-shadow: 0px 0px 0px var(--bb-ring-size) var(--bb-secondary-ring);
|
|
645
|
-
}
|
|
955
|
+
&--secondary {
|
|
956
|
+
--bg: var(--bb-secondary);
|
|
957
|
+
--bg-hover: var(--bb-secondary-hover);
|
|
958
|
+
--bg-pressed: var(--bb-secondary-pressed);
|
|
959
|
+
--fg: var(--bb-secondary-fg);
|
|
960
|
+
--border-color: var(--bb-secondary-border);
|
|
961
|
+
--ring-color: var(--bb-secondary-ring);
|
|
962
|
+
--elev: var(--elev-tier);
|
|
646
963
|
|
|
647
|
-
& + .bb-button--group {
|
|
964
|
+
& + .bb-button.bb-button--group {
|
|
648
965
|
border-left-color: var(--bb-secondary-pressed);
|
|
649
966
|
}
|
|
650
967
|
}
|
|
651
968
|
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
&[aria-pressed='true']:not(.bb-base-button--disabled) {
|
|
662
|
-
background-color: var(--bb-outline-pressed);
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
&:focus-visible {
|
|
666
|
-
background-color: var(--bb-outline-hover);
|
|
667
|
-
box-shadow: 0px 0px 0px var(--bb-ring-size) var(--bb-outline-ring);
|
|
668
|
-
}
|
|
969
|
+
&--outline {
|
|
970
|
+
--bg: var(--bb-outline);
|
|
971
|
+
--bg-hover: var(--bb-outline-hover);
|
|
972
|
+
--bg-pressed: var(--bb-outline-pressed);
|
|
973
|
+
--fg: var(--bb-outline-fg);
|
|
974
|
+
--border-color: var(--bb-outline-border);
|
|
975
|
+
--ring-color: var(--bb-outline-ring);
|
|
976
|
+
--elev: var(--elev-tier);
|
|
669
977
|
}
|
|
670
978
|
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
&[aria-pressed='true']:not(.bb-base-button--disabled) {
|
|
681
|
-
background-color: var(--bb-ghost-pressed);
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
&:focus-visible {
|
|
685
|
-
background-color: var(--bb-ghost-hover);
|
|
686
|
-
box-shadow: 0px 0px 0px var(--bb-ring-size) var(--bb-ghost-ring);
|
|
687
|
-
}
|
|
979
|
+
&--ghost {
|
|
980
|
+
--bg: var(--bb-ghost);
|
|
981
|
+
--bg-hover: var(--bb-ghost-hover);
|
|
982
|
+
--bg-pressed: var(--bb-ghost-pressed);
|
|
983
|
+
--fg: var(--bb-ghost-fg);
|
|
984
|
+
--border-color: var(--bb-ghost-border);
|
|
985
|
+
--ring-color: var(--bb-ghost-ring);
|
|
688
986
|
}
|
|
689
987
|
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
&[aria-pressed='true']:not(.bb-base-button--disabled) {
|
|
700
|
-
background-color: var(--bb-destructive-pressed);
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
&:focus-visible {
|
|
704
|
-
background-color: var(--bb-destructive-hover);
|
|
705
|
-
box-shadow: 0px 0px 0px var(--bb-ring-size) var(--bb-destructive-ring);
|
|
706
|
-
}
|
|
988
|
+
&--destructive {
|
|
989
|
+
--bg: var(--bb-destructive);
|
|
990
|
+
--bg-hover: var(--bb-destructive-hover);
|
|
991
|
+
--bg-pressed: var(--bb-destructive-pressed);
|
|
992
|
+
--fg: var(--bb-destructive-fg);
|
|
993
|
+
--border-color: var(--bb-destructive-border);
|
|
994
|
+
--ring-color: var(--bb-destructive-ring);
|
|
995
|
+
--elev: var(--elev-tier);
|
|
707
996
|
}
|
|
708
997
|
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
998
|
+
&--link {
|
|
999
|
+
--bg: var(--bb-link);
|
|
1000
|
+
--bg-hover: var(--bb-link-hover);
|
|
1001
|
+
--bg-pressed: var(--bb-link-pressed);
|
|
1002
|
+
--fg: var(--bb-link-fg);
|
|
1003
|
+
--border-color: var(--bb-link-border);
|
|
1004
|
+
--ring-color: var(--bb-link-ring);
|
|
1005
|
+
/* A faint underline at rest, full strength on hover (owner 2026-09-23,
|
|
1006
|
+
Q49.12): without it a link sat identical to ghost until hovered. */
|
|
1007
|
+
--underline: color-mix(in oklab, currentColor 30%, transparent);
|
|
1008
|
+
text-decoration: underline;
|
|
1009
|
+
text-decoration-color: var(--underline);
|
|
713
1010
|
text-underline-offset: 4px;
|
|
714
1011
|
|
|
715
|
-
&:hover:not(.bb-base-button--disabled)
|
|
716
|
-
background-color: var(--bb-link-hover);
|
|
717
|
-
text-decoration: underline;
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
&[aria-pressed='true']:not(.bb-base-button--disabled) {
|
|
721
|
-
background-color: var(--bb-link-pressed);
|
|
722
|
-
}
|
|
723
|
-
|
|
1012
|
+
&:hover:not(.bb-base-button--disabled),
|
|
724
1013
|
&:focus-visible {
|
|
725
|
-
|
|
726
|
-
box-shadow: 0px 0px 0px var(--bb-ring-size) var(--bb-link-ring);
|
|
727
|
-
text-decoration: underline;
|
|
1014
|
+
--underline: currentColor;
|
|
728
1015
|
}
|
|
729
1016
|
}
|
|
730
1017
|
|
|
731
|
-
/* Disabled — after variants so it wins the cascade
|
|
1018
|
+
/* Disabled — after variants so it wins the cascade. Not while loading:
|
|
1019
|
+
with both set, loading wins the look (spinner, variant colours) and
|
|
1020
|
+
`disabled` only adds the native blocking — owner ruling 2026-09-17,
|
|
1021
|
+
plans/DECISIONS.md. */
|
|
732
1022
|
&.bb-base-button--disabled {
|
|
733
1023
|
cursor: not-allowed;
|
|
734
1024
|
|
|
735
1025
|
&:not(.bb-button--loading) {
|
|
736
|
-
background-color: var(--
|
|
737
|
-
border-color: var(--
|
|
738
|
-
color:
|
|
1026
|
+
background-color: var(--bg-disabled);
|
|
1027
|
+
border-color: var(--border-disabled);
|
|
1028
|
+
color: var(--fg-disabled);
|
|
1029
|
+
opacity: var(--opacity-disabled);
|
|
739
1030
|
}
|
|
740
1031
|
}
|
|
741
1032
|
|
|
@@ -756,12 +1047,15 @@ export type BbButtonSlots = {
|
|
|
756
1047
|
padding-right: calc(var(--px) * 0.65);
|
|
757
1048
|
}
|
|
758
1049
|
|
|
759
|
-
&.bb-button--
|
|
1050
|
+
&.bb-button--soft-disabled {
|
|
760
1051
|
/* Soft-disable: keep the variant colors (no hard swap) but ignore every
|
|
761
1052
|
pointer action while loading — clicks, and router-link/anchor navigation
|
|
762
|
-
that a JS preventDefault can't stop. Keyboard is handled in onClick.
|
|
1053
|
+
that a JS preventDefault can't stop. Keyboard is handled in onClick.
|
|
1054
|
+
Not under `interactiveWhileLoading`, whose whole point is the click. */
|
|
763
1055
|
pointer-events: none;
|
|
1056
|
+
}
|
|
764
1057
|
|
|
1058
|
+
&.bb-button--loading {
|
|
765
1059
|
.bb-spinner {
|
|
766
1060
|
/* Whatever icon the spinner is parked on top of — the icon-only glyph
|
|
767
1061
|
or the prepend icon — fades out from under it. */
|
|
@@ -770,7 +1064,7 @@ export type BbButtonSlots = {
|
|
|
770
1064
|
}
|
|
771
1065
|
|
|
772
1066
|
/* No icon to hide behind: carve the spinner's slot out of the label. */
|
|
773
|
-
+ .bb-
|
|
1067
|
+
+ .bb-button__text {
|
|
774
1068
|
margin-left: calc(var(--gap) + var(--icon-size));
|
|
775
1069
|
}
|
|
776
1070
|
}
|
|
@@ -782,7 +1076,7 @@ export type BbButtonSlots = {
|
|
|
782
1076
|
opacity: 0;
|
|
783
1077
|
}
|
|
784
1078
|
|
|
785
|
-
.bb-spinner + .bb-
|
|
1079
|
+
.bb-spinner + .bb-button__text {
|
|
786
1080
|
margin-left: 0;
|
|
787
1081
|
}
|
|
788
1082
|
}
|
|
@@ -796,8 +1090,8 @@ export type BbButtonSlots = {
|
|
|
796
1090
|
}
|
|
797
1091
|
|
|
798
1092
|
& + .bb-button--group {
|
|
799
|
-
border-bottom-left-radius: 0
|
|
800
|
-
border-top-left-radius: 0
|
|
1093
|
+
border-bottom-left-radius: 0;
|
|
1094
|
+
border-top-left-radius: 0;
|
|
801
1095
|
}
|
|
802
1096
|
}
|
|
803
1097
|
|
|
@@ -808,6 +1102,8 @@ export type BbButtonSlots = {
|
|
|
808
1102
|
--fs: var(--fs-xs);
|
|
809
1103
|
--r: var(--r-xs);
|
|
810
1104
|
--gap: var(--gap-xs);
|
|
1105
|
+
--bw: var(--bb-border-w-sm);
|
|
1106
|
+
--elev-tier: var(--bb-elev-sm);
|
|
811
1107
|
}
|
|
812
1108
|
|
|
813
1109
|
&.bb-button--sm {
|
|
@@ -817,6 +1113,8 @@ export type BbButtonSlots = {
|
|
|
817
1113
|
--fs: var(--fs-sm);
|
|
818
1114
|
--r: var(--r-sm);
|
|
819
1115
|
--gap: var(--gap-sm);
|
|
1116
|
+
--bw: var(--bb-border-w-sm);
|
|
1117
|
+
--elev-tier: var(--bb-elev-sm);
|
|
820
1118
|
}
|
|
821
1119
|
|
|
822
1120
|
&.bb-button--md {
|
|
@@ -826,6 +1124,8 @@ export type BbButtonSlots = {
|
|
|
826
1124
|
--fs: var(--fs-md);
|
|
827
1125
|
--r: var(--r-md);
|
|
828
1126
|
--gap: var(--gap-md);
|
|
1127
|
+
--bw: var(--bb-border-w);
|
|
1128
|
+
--elev-tier: var(--bb-elev);
|
|
829
1129
|
}
|
|
830
1130
|
|
|
831
1131
|
&.bb-button--lg {
|
|
@@ -835,6 +1135,8 @@ export type BbButtonSlots = {
|
|
|
835
1135
|
--fs: var(--fs-lg);
|
|
836
1136
|
--r: var(--r-lg);
|
|
837
1137
|
--gap: var(--gap-lg);
|
|
1138
|
+
--bw: var(--bb-border-w);
|
|
1139
|
+
--elev-tier: var(--bb-elev);
|
|
838
1140
|
}
|
|
839
1141
|
|
|
840
1142
|
&.bb-button--xl {
|
|
@@ -844,6 +1146,8 @@ export type BbButtonSlots = {
|
|
|
844
1146
|
--fs: var(--fs-xl);
|
|
845
1147
|
--r: var(--r-xl);
|
|
846
1148
|
--gap: var(--gap-xl);
|
|
1149
|
+
--bw: var(--bb-border-w);
|
|
1150
|
+
--elev-tier: var(--bb-elev);
|
|
847
1151
|
}
|
|
848
1152
|
|
|
849
1153
|
&.bb-button--2xl {
|
|
@@ -853,10 +1157,23 @@ export type BbButtonSlots = {
|
|
|
853
1157
|
--fs: var(--fs-2xl);
|
|
854
1158
|
--r: var(--r-2xl);
|
|
855
1159
|
--gap: var(--gap-2xl);
|
|
1160
|
+
--bw: var(--bb-border-w);
|
|
1161
|
+
--elev-tier: var(--bb-elev);
|
|
856
1162
|
}
|
|
857
|
-
.bb-
|
|
1163
|
+
.bb-button__text {
|
|
858
1164
|
margin-left: 0;
|
|
859
1165
|
transition: margin-left var(--bb-transition-medium) var(--bb-ease);
|
|
1166
|
+
|
|
1167
|
+
/* Optical centering, as on BbBadge's label. Flex centers the LINE BOX,
|
|
1168
|
+
but font metrics are bottom-heavy, so the visible text band drifts off
|
|
1169
|
+
the button's centre by up to half a pixel — a whole row on a 1x
|
|
1170
|
+
screen (md / lg painted 8/10 and 10/12 blank rows above / below).
|
|
1171
|
+
Trimming the box to the cap→baseline band makes the centering
|
|
1172
|
+
optical; descenders paint below the trimmed box. Browsers without
|
|
1173
|
+
text-box (Firefox) keep the metric centering. */
|
|
1174
|
+
@supports (text-box: trim-both cap alphabetic) {
|
|
1175
|
+
text-box: trim-both cap alphabetic;
|
|
1176
|
+
}
|
|
860
1177
|
}
|
|
861
1178
|
|
|
862
1179
|
.bb-spinner,
|
|
@@ -898,42 +1215,58 @@ export type BbButtonSlots = {
|
|
|
898
1215
|
}
|
|
899
1216
|
}
|
|
900
1217
|
|
|
1218
|
+
/* Breakpoint size classes (`--sm-lg`, `--md-xs`, … — breakpoint first, size
|
|
1219
|
+
second), one block per breakpoint from 640px up. They re-point a SUBSET of
|
|
1220
|
+
the active size: `--h`, `--fs`, `--gap`, `--bw` and `--elev-tier`. Padding,
|
|
1221
|
+
radius and icon size stay wherever the base size class left them. */
|
|
901
1222
|
@media (min-width: 640px) {
|
|
902
1223
|
.bb-button {
|
|
903
1224
|
&.bb-button--sm-xs {
|
|
904
1225
|
--h: var(--h-xs);
|
|
905
1226
|
--fs: var(--fs-xs);
|
|
906
1227
|
--gap: var(--gap-xs);
|
|
1228
|
+
--bw: var(--bb-border-w-sm);
|
|
1229
|
+
--elev-tier: var(--bb-elev-sm);
|
|
907
1230
|
}
|
|
908
1231
|
|
|
909
1232
|
&.bb-button--sm-sm {
|
|
910
1233
|
--h: var(--h-sm);
|
|
911
1234
|
--fs: var(--fs-sm);
|
|
912
1235
|
--gap: var(--gap-sm);
|
|
1236
|
+
--bw: var(--bb-border-w-sm);
|
|
1237
|
+
--elev-tier: var(--bb-elev-sm);
|
|
913
1238
|
}
|
|
914
1239
|
|
|
915
1240
|
&.bb-button--sm-md {
|
|
916
1241
|
--h: var(--h-md);
|
|
917
1242
|
--fs: var(--fs-md);
|
|
918
1243
|
--gap: var(--gap-md);
|
|
1244
|
+
--bw: var(--bb-border-w);
|
|
1245
|
+
--elev-tier: var(--bb-elev);
|
|
919
1246
|
}
|
|
920
1247
|
|
|
921
1248
|
&.bb-button--sm-lg {
|
|
922
1249
|
--h: var(--h-lg);
|
|
923
1250
|
--fs: var(--fs-lg);
|
|
924
1251
|
--gap: var(--gap-lg);
|
|
1252
|
+
--bw: var(--bb-border-w);
|
|
1253
|
+
--elev-tier: var(--bb-elev);
|
|
925
1254
|
}
|
|
926
1255
|
|
|
927
1256
|
&.bb-button--sm-xl {
|
|
928
1257
|
--h: var(--h-xl);
|
|
929
1258
|
--fs: var(--fs-xl);
|
|
930
1259
|
--gap: var(--gap-xl);
|
|
1260
|
+
--bw: var(--bb-border-w);
|
|
1261
|
+
--elev-tier: var(--bb-elev);
|
|
931
1262
|
}
|
|
932
1263
|
|
|
933
1264
|
&.bb-button--sm-2xl {
|
|
934
1265
|
--h: var(--h-2xl);
|
|
935
1266
|
--fs: var(--fs-2xl);
|
|
936
1267
|
--gap: var(--gap-2xl);
|
|
1268
|
+
--bw: var(--bb-border-w);
|
|
1269
|
+
--elev-tier: var(--bb-elev);
|
|
937
1270
|
}
|
|
938
1271
|
}
|
|
939
1272
|
}
|
|
@@ -944,36 +1277,48 @@ export type BbButtonSlots = {
|
|
|
944
1277
|
--h: var(--h-xs);
|
|
945
1278
|
--fs: var(--fs-xs);
|
|
946
1279
|
--gap: var(--gap-xs);
|
|
1280
|
+
--bw: var(--bb-border-w-sm);
|
|
1281
|
+
--elev-tier: var(--bb-elev-sm);
|
|
947
1282
|
}
|
|
948
1283
|
|
|
949
1284
|
&.bb-button--md-sm {
|
|
950
1285
|
--h: var(--h-sm);
|
|
951
1286
|
--fs: var(--fs-sm);
|
|
952
1287
|
--gap: var(--gap-sm);
|
|
1288
|
+
--bw: var(--bb-border-w-sm);
|
|
1289
|
+
--elev-tier: var(--bb-elev-sm);
|
|
953
1290
|
}
|
|
954
1291
|
|
|
955
1292
|
&.bb-button--md-md {
|
|
956
1293
|
--h: var(--h-md);
|
|
957
1294
|
--fs: var(--fs-md);
|
|
958
1295
|
--gap: var(--gap-md);
|
|
1296
|
+
--bw: var(--bb-border-w);
|
|
1297
|
+
--elev-tier: var(--bb-elev);
|
|
959
1298
|
}
|
|
960
1299
|
|
|
961
1300
|
&.bb-button--md-lg {
|
|
962
1301
|
--h: var(--h-lg);
|
|
963
1302
|
--fs: var(--fs-lg);
|
|
964
1303
|
--gap: var(--gap-lg);
|
|
1304
|
+
--bw: var(--bb-border-w);
|
|
1305
|
+
--elev-tier: var(--bb-elev);
|
|
965
1306
|
}
|
|
966
1307
|
|
|
967
1308
|
&.bb-button--md-xl {
|
|
968
1309
|
--h: var(--h-xl);
|
|
969
1310
|
--fs: var(--fs-xl);
|
|
970
1311
|
--gap: var(--gap-xl);
|
|
1312
|
+
--bw: var(--bb-border-w);
|
|
1313
|
+
--elev-tier: var(--bb-elev);
|
|
971
1314
|
}
|
|
972
1315
|
|
|
973
1316
|
&.bb-button--md-2xl {
|
|
974
1317
|
--h: var(--h-2xl);
|
|
975
1318
|
--fs: var(--fs-2xl);
|
|
976
1319
|
--gap: var(--gap-2xl);
|
|
1320
|
+
--bw: var(--bb-border-w);
|
|
1321
|
+
--elev-tier: var(--bb-elev);
|
|
977
1322
|
}
|
|
978
1323
|
}
|
|
979
1324
|
}
|
|
@@ -984,36 +1329,48 @@ export type BbButtonSlots = {
|
|
|
984
1329
|
--h: var(--h-xs);
|
|
985
1330
|
--fs: var(--fs-xs);
|
|
986
1331
|
--gap: var(--gap-xs);
|
|
1332
|
+
--bw: var(--bb-border-w-sm);
|
|
1333
|
+
--elev-tier: var(--bb-elev-sm);
|
|
987
1334
|
}
|
|
988
1335
|
|
|
989
1336
|
&.bb-button--lg-sm {
|
|
990
1337
|
--h: var(--h-sm);
|
|
991
1338
|
--fs: var(--fs-sm);
|
|
992
1339
|
--gap: var(--gap-sm);
|
|
1340
|
+
--bw: var(--bb-border-w-sm);
|
|
1341
|
+
--elev-tier: var(--bb-elev-sm);
|
|
993
1342
|
}
|
|
994
1343
|
|
|
995
1344
|
&.bb-button--lg-md {
|
|
996
1345
|
--h: var(--h-md);
|
|
997
1346
|
--fs: var(--fs-md);
|
|
998
1347
|
--gap: var(--gap-md);
|
|
1348
|
+
--bw: var(--bb-border-w);
|
|
1349
|
+
--elev-tier: var(--bb-elev);
|
|
999
1350
|
}
|
|
1000
1351
|
|
|
1001
1352
|
&.bb-button--lg-lg {
|
|
1002
1353
|
--h: var(--h-lg);
|
|
1003
1354
|
--fs: var(--fs-lg);
|
|
1004
1355
|
--gap: var(--gap-lg);
|
|
1356
|
+
--bw: var(--bb-border-w);
|
|
1357
|
+
--elev-tier: var(--bb-elev);
|
|
1005
1358
|
}
|
|
1006
1359
|
|
|
1007
1360
|
&.bb-button--lg-xl {
|
|
1008
1361
|
--h: var(--h-xl);
|
|
1009
1362
|
--fs: var(--fs-xl);
|
|
1010
1363
|
--gap: var(--gap-xl);
|
|
1364
|
+
--bw: var(--bb-border-w);
|
|
1365
|
+
--elev-tier: var(--bb-elev);
|
|
1011
1366
|
}
|
|
1012
1367
|
|
|
1013
1368
|
&.bb-button--lg-2xl {
|
|
1014
1369
|
--h: var(--h-2xl);
|
|
1015
1370
|
--fs: var(--fs-2xl);
|
|
1016
1371
|
--gap: var(--gap-2xl);
|
|
1372
|
+
--bw: var(--bb-border-w);
|
|
1373
|
+
--elev-tier: var(--bb-elev);
|
|
1017
1374
|
}
|
|
1018
1375
|
}
|
|
1019
1376
|
}
|
|
@@ -1024,36 +1381,48 @@ export type BbButtonSlots = {
|
|
|
1024
1381
|
--h: var(--h-xs);
|
|
1025
1382
|
--fs: var(--fs-xs);
|
|
1026
1383
|
--gap: var(--gap-xs);
|
|
1384
|
+
--bw: var(--bb-border-w-sm);
|
|
1385
|
+
--elev-tier: var(--bb-elev-sm);
|
|
1027
1386
|
}
|
|
1028
1387
|
|
|
1029
1388
|
&.bb-button--xl-sm {
|
|
1030
1389
|
--h: var(--h-sm);
|
|
1031
1390
|
--fs: var(--fs-sm);
|
|
1032
1391
|
--gap: var(--gap-sm);
|
|
1392
|
+
--bw: var(--bb-border-w-sm);
|
|
1393
|
+
--elev-tier: var(--bb-elev-sm);
|
|
1033
1394
|
}
|
|
1034
1395
|
|
|
1035
1396
|
&.bb-button--xl-md {
|
|
1036
1397
|
--h: var(--h-md);
|
|
1037
1398
|
--fs: var(--fs-md);
|
|
1038
1399
|
--gap: var(--gap-md);
|
|
1400
|
+
--bw: var(--bb-border-w);
|
|
1401
|
+
--elev-tier: var(--bb-elev);
|
|
1039
1402
|
}
|
|
1040
1403
|
|
|
1041
1404
|
&.bb-button--xl-lg {
|
|
1042
1405
|
--h: var(--h-lg);
|
|
1043
1406
|
--fs: var(--fs-lg);
|
|
1044
1407
|
--gap: var(--gap-lg);
|
|
1408
|
+
--bw: var(--bb-border-w);
|
|
1409
|
+
--elev-tier: var(--bb-elev);
|
|
1045
1410
|
}
|
|
1046
1411
|
|
|
1047
1412
|
&.bb-button--xl-xl {
|
|
1048
1413
|
--h: var(--h-xl);
|
|
1049
1414
|
--fs: var(--fs-xl);
|
|
1050
1415
|
--gap: var(--gap-xl);
|
|
1416
|
+
--bw: var(--bb-border-w);
|
|
1417
|
+
--elev-tier: var(--bb-elev);
|
|
1051
1418
|
}
|
|
1052
1419
|
|
|
1053
1420
|
&.bb-button--xl-2xl {
|
|
1054
1421
|
--h: var(--h-2xl);
|
|
1055
1422
|
--fs: var(--fs-2xl);
|
|
1056
1423
|
--gap: var(--gap-2xl);
|
|
1424
|
+
--bw: var(--bb-border-w);
|
|
1425
|
+
--elev-tier: var(--bb-elev);
|
|
1057
1426
|
}
|
|
1058
1427
|
}
|
|
1059
1428
|
}
|
|
@@ -1064,37 +1433,57 @@ export type BbButtonSlots = {
|
|
|
1064
1433
|
--h: var(--h-xs);
|
|
1065
1434
|
--fs: var(--fs-xs);
|
|
1066
1435
|
--gap: var(--gap-xs);
|
|
1436
|
+
--bw: var(--bb-border-w-sm);
|
|
1437
|
+
--elev-tier: var(--bb-elev-sm);
|
|
1067
1438
|
}
|
|
1068
1439
|
|
|
1069
1440
|
&.bb-button--2xl-sm {
|
|
1070
1441
|
--h: var(--h-sm);
|
|
1071
1442
|
--fs: var(--fs-sm);
|
|
1072
1443
|
--gap: var(--gap-sm);
|
|
1444
|
+
--bw: var(--bb-border-w-sm);
|
|
1445
|
+
--elev-tier: var(--bb-elev-sm);
|
|
1073
1446
|
}
|
|
1074
1447
|
|
|
1075
1448
|
&.bb-button--2xl-md {
|
|
1076
1449
|
--h: var(--h-md);
|
|
1077
1450
|
--fs: var(--fs-md);
|
|
1078
1451
|
--gap: var(--gap-md);
|
|
1452
|
+
--bw: var(--bb-border-w);
|
|
1453
|
+
--elev-tier: var(--bb-elev);
|
|
1079
1454
|
}
|
|
1080
1455
|
|
|
1081
1456
|
&.bb-button--2xl-lg {
|
|
1082
1457
|
--h: var(--h-lg);
|
|
1083
1458
|
--fs: var(--fs-lg);
|
|
1084
1459
|
--gap: var(--gap-lg);
|
|
1460
|
+
--bw: var(--bb-border-w);
|
|
1461
|
+
--elev-tier: var(--bb-elev);
|
|
1085
1462
|
}
|
|
1086
1463
|
|
|
1087
1464
|
&.bb-button--2xl-xl {
|
|
1088
1465
|
--h: var(--h-xl);
|
|
1089
1466
|
--fs: var(--fs-xl);
|
|
1090
1467
|
--gap: var(--gap-xl);
|
|
1468
|
+
--bw: var(--bb-border-w);
|
|
1469
|
+
--elev-tier: var(--bb-elev);
|
|
1091
1470
|
}
|
|
1092
1471
|
|
|
1093
1472
|
&.bb-button--2xl-2xl {
|
|
1094
1473
|
--h: var(--h-2xl);
|
|
1095
1474
|
--fs: var(--fs-2xl);
|
|
1096
1475
|
--gap: var(--gap-2xl);
|
|
1476
|
+
--bw: var(--bb-border-w);
|
|
1477
|
+
--elev-tier: var(--bb-elev);
|
|
1097
1478
|
}
|
|
1098
1479
|
}
|
|
1099
1480
|
}
|
|
1481
|
+
|
|
1482
|
+
/* Reduced motion (Q44.16; owner ruling Q51.10): the label no longer slides
|
|
1483
|
+
aside for the loading spinner — it steps, and the spinner still appears. */
|
|
1484
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1485
|
+
.bb-button .bb-button__text {
|
|
1486
|
+
transition: none;
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1100
1489
|
```
|