bitboss-ui 3.0.0-beta.62 → 3.0.0-beta.64
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 +25 -20
- package/bin/bitboss-ui.mjs +73 -7
- package/dist/ai/BbAlert.md +10 -1
- package/dist/ai/BbBadge.md +35 -3
- package/dist/ai/BbBadgeButton.md +4 -2
- package/dist/ai/BbBaseButton.md +9 -3
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +113 -8
- package/dist/ai/BbCheckbox.md +1 -1
- package/dist/ai/BbCheckboxGroup.md +94 -6
- package/dist/ai/BbColorInput.md +4 -1
- package/dist/ai/BbColorPalette.md +2 -1
- package/dist/ai/BbConfirm.md +53 -25
- package/dist/ai/BbDatePicker.md +2 -1
- package/dist/ai/BbDatePickerInput.md +4 -1
- package/dist/ai/BbDialog.md +12 -11
- package/dist/ai/BbDropdown.md +189 -38
- package/dist/ai/BbDropdownButton.md +27 -7
- package/dist/ai/BbForm.md +121 -26
- package/dist/ai/BbHost.md +12 -14
- package/dist/ai/BbHoverCard.md +7 -3
- package/dist/ai/BbIcon.md +12 -6
- package/dist/ai/BbIndicator.md +11 -1
- package/dist/ai/BbNumberInput.md +4 -1
- package/dist/ai/BbOffCanvas.md +37 -3
- package/dist/ai/BbPopover.md +2 -1
- package/dist/ai/BbPtScope.md +6 -4
- package/dist/ai/BbRadio.md +1 -1
- package/dist/ai/BbRadioGroup.md +102 -10
- package/dist/ai/BbSelect.md +52 -17
- package/dist/ai/BbSelectPopover.md +93 -26
- package/dist/ai/BbSwitch.md +1 -1
- package/dist/ai/BbSwitchGroup.md +30 -3
- package/dist/ai/BbTable.md +81 -14
- package/dist/ai/BbTabs.md +8 -3
- package/dist/ai/BbTabsList.md +4 -1
- package/dist/ai/BbTag.md +5 -2
- package/dist/ai/BbTextInput.md +4 -1
- package/dist/ai/BbTextarea.md +4 -1
- package/dist/ai/BbTimePicker.md +2 -1
- package/dist/ai/BbTimePickerInput.md +4 -1
- package/dist/ai/BbToast.md +9 -3
- package/dist/ai/BbTooltip.md +71 -9
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/CommonField.md +1 -1
- package/dist/ai/OptionsContainer.md +42 -0
- package/dist/ai/changelog.json +440 -6
- package/dist/ai/components.json +51 -49
- package/dist/ai/composables/useConfirm.md +47 -6
- package/dist/ai/design-tokens.json +6 -6
- package/dist/ai/guides/agent-contract.md +5 -4
- package/dist/ai/guides/ai-router.md +24 -23
- package/dist/ai/guides/app-layout.md +5 -0
- package/dist/ai/guides/component-picker.md +9 -2
- package/dist/ai/guides/design-language.md +24 -24
- package/dist/ai/guides/design-tokens.md +15 -8
- package/dist/ai/guides/icons-policy.md +9 -2
- package/dist/ai/guides/inertia-helpers.md +79 -49
- package/dist/ai/guides/installation-and-plugin-setup.md +12 -2
- package/dist/ai/guides/migration/adoption-checklist.md +235 -0
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -15
- package/dist/ai/guides/migration/components/bb-dialog.md +9 -9
- package/dist/ai/guides/migration/components/bb-dropdown.md +7 -2
- package/dist/ai/guides/migration/components/bb-host.md +4 -2
- package/dist/ai/guides/migration/components/bb-popover.md +4 -2
- package/dist/ai/guides/migration/components/bb-select.md +19 -0
- package/dist/ai/guides/migration/components/bb-table.md +1 -0
- package/dist/ai/guides/migration/components/bb-toast.md +4 -0
- package/dist/ai/guides/migration/components/bb-tooltip.md +15 -12
- package/dist/ai/guides/migration/components/use-confirm.md +39 -16
- package/dist/ai/guides/migration/v2-to-v3.md +172 -9
- package/dist/ai/guides/migration/v3-beta-css-classes.md +7 -3
- package/dist/ai/guides/options-items-playbook.md +2 -1
- package/dist/ai/guides/passthrough.md +147 -85
- package/dist/ai/guides/preset-components.md +140 -15
- package/dist/ai/guides/validated-forms.md +5 -0
- package/dist/ai/helpers/definePreset.json +7 -0
- package/dist/ai/helpers/definePreset.ts +123 -11
- package/dist/ai/helpers/inertia/manifest.json +15 -9
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +4 -4
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +39 -24
- package/dist/ai/helpers/inertia/useRouteQuery.ts +10 -4
- package/dist/ai/index.md +1 -0
- package/dist/ai/manifest/common.json +0 -1
- package/dist/ai/manifest/components/BbAlert.json +7 -2
- package/dist/ai/manifest/components/BbBadge.json +13 -4
- package/dist/ai/manifest/components/BbBadge.tree.json +2 -0
- package/dist/ai/manifest/components/BbBadgeButton.json +4 -2
- package/dist/ai/manifest/components/BbBaseButton.json +4 -2
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +14 -3
- package/dist/ai/manifest/components/BbButton.tree.json +5 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +13 -8
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +11 -1
- package/dist/ai/manifest/components/BbColorInput.json +18 -15
- package/dist/ai/manifest/components/BbColorPalette.json +1 -1
- package/dist/ai/manifest/components/BbConfirm.json +4 -2
- package/dist/ai/manifest/components/BbConfirm.tree.json +1 -1
- package/dist/ai/manifest/components/BbDatePicker.json +1 -1
- package/dist/ai/manifest/components/BbDatePickerInput.json +17 -14
- package/dist/ai/manifest/components/BbDialog.tree.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.json +24 -19
- package/dist/ai/manifest/components/BbDropdown.tree.json +9 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +33 -20
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +2 -2
- package/dist/ai/manifest/components/BbHost.tree.json +1 -2
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbIndicator.json +8 -2
- package/dist/ai/manifest/components/BbNumberInput.json +5 -2
- package/dist/ai/manifest/components/BbOffCanvas.json +2 -2
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +17 -12
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +8 -1
- package/dist/ai/manifest/components/BbSelect.json +21 -18
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +10 -10
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +3 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +3 -1
- package/dist/ai/manifest/components/BbTable.json +2 -0
- package/dist/ai/manifest/components/BbTable.tree.json +14 -1
- package/dist/ai/manifest/components/BbTabs.json +9 -6
- package/dist/ai/manifest/components/BbTabs.tree.json +1 -1
- package/dist/ai/manifest/components/BbTabsList.json +6 -3
- package/dist/ai/manifest/components/BbTag.json +19 -16
- package/dist/ai/manifest/components/BbTag.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.json +6 -3
- package/dist/ai/manifest/components/BbTextarea.json +6 -3
- package/dist/ai/manifest/components/BbTimePicker.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +10 -7
- package/dist/ai/manifest/components/BbToast.json +7 -2
- package/dist/ai/manifest/components/BbToast.tree.json +4 -2
- package/dist/ai/manifest/components/BbTooltip.json +6 -5
- package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
- package/dist/ai/manifest/components/CommonField.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +3 -1
- package/dist/ai/manifest/components/OptionsContainer.tree.json +38 -0
- package/dist/ai/manifest/index.json +3 -3
- package/dist/ai/manifest/meta.json +5 -3
- package/dist/ai/manifest/types.advanced.json +6 -3
- package/dist/ai/manifest/types.api.json +9 -7
- package/dist/ai/recipes/inertia/layout-scaffold.md +19 -6
- package/dist/ai/recipes/inertia/records-workspace.md +49 -13
- package/dist/ai/recipes/nuxt/layout-scaffold.md +19 -6
- package/dist/ai/recipes/nuxt/records-workspace.md +42 -12
- package/dist/ai/recipes/vue/layout-scaffold.md +19 -6
- package/dist/ai/recipes/vue/records-workspace.md +42 -12
- package/dist/ai/source/BbAlert.md +94 -76
- package/dist/ai/source/BbBadge.md +174 -72
- package/dist/ai/source/BbBadgeButton.md +130 -65
- package/dist/ai/source/BbBaseButton.md +46 -124
- package/dist/ai/source/BbBaseCheckboxIcon.md +38 -0
- package/dist/ai/source/BbBaseRadioIcon.md +18 -0
- package/dist/ai/source/BbBaseSwitchIcon.md +51 -0
- package/dist/ai/source/BbButton.md +153 -36
- package/dist/ai/source/BbCheckboxGroup.md +142 -18
- package/dist/ai/source/BbColorInput.md +240 -204
- package/dist/ai/source/BbColorPalette.md +7 -4
- package/dist/ai/source/BbConfirm.md +67 -32
- package/dist/ai/source/BbConfirmPortal.md +31 -25
- package/dist/ai/source/BbDatePicker.md +11 -7
- package/dist/ai/source/BbDatePickerInput.md +306 -269
- package/dist/ai/source/BbDialog.md +49 -14
- package/dist/ai/source/BbDropdown.md +314 -197
- package/dist/ai/source/BbDropdownButton.md +197 -31
- package/dist/ai/source/BbDropdownGroup.md +274 -176
- package/dist/ai/source/BbForm.md +50 -6
- package/dist/ai/source/BbHost.md +3 -3
- package/dist/ai/source/BbHoverCard.md +12 -5
- package/dist/ai/source/BbIcon.md +4 -3
- package/dist/ai/source/BbIndicator.md +73 -52
- package/dist/ai/source/BbNumberInput.md +293 -257
- package/dist/ai/source/BbOffCanvas.md +55 -29
- package/dist/ai/source/BbPopover.md +14 -10
- package/dist/ai/source/BbRadioGroup.md +413 -297
- package/dist/ai/source/BbSelect.md +549 -435
- package/dist/ai/source/BbSelectPopover.md +128 -33
- package/dist/ai/source/BbSwitchGroup.md +70 -10
- package/dist/ai/source/BbTable.md +406 -46
- package/dist/ai/source/BbTabs.md +115 -39
- package/dist/ai/source/BbTabsList.md +106 -38
- package/dist/ai/source/BbTabsPanels.md +96 -36
- package/dist/ai/source/BbTabsRoot.md +96 -36
- package/dist/ai/source/BbTag.md +267 -233
- package/dist/ai/source/BbTextInput.md +261 -225
- package/dist/ai/source/BbTextarea.md +251 -215
- package/dist/ai/source/BbTimePicker.md +11 -7
- package/dist/ai/source/BbTimePickerInput.md +257 -220
- package/dist/ai/source/BbToast.md +73 -32
- package/dist/ai/source/BbToastPortal.md +65 -30
- package/dist/ai/source/BbTooltip.md +148 -113
- package/dist/ai/source/CommonPopover.md +6 -1
- package/dist/ai/source/FlatListBox.md +19 -9
- package/dist/ai/source/GroupedListBox.md +19 -9
- package/dist/ai/source/OptionsContainer.md +25 -9
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +61 -36
- package/dist/components/BbAlert/types.d.ts +9 -5
- package/dist/components/BbAlert/types.js +8 -3
- package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +3 -3
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +26 -17
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +103 -50
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +20 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +12 -1
- package/dist/components/BbBadge/types.d.ts +45 -15
- package/dist/components/BbBadge/types.js +12 -3
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +89 -126
- package/dist/components/BbBaseButton/types.d.ts +23 -4
- package/dist/components/BbBaseButton/types.js +7 -1
- package/dist/components/BbBaseButton/useLinkState.d.ts +41 -0
- package/dist/components/BbBaseButton/useLinkState.js +70 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +130 -74
- package/dist/components/BbButton/types.d.ts +50 -13
- package/dist/components/BbButton/types.js +10 -3
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +148 -95
- package/dist/components/BbCheckboxGroup/types.d.ts +34 -11
- package/dist/components/BbCheckboxGroup/types.js +9 -4
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +134 -93
- package/dist/components/BbColorInput/types.d.ts +11 -4
- package/dist/components/BbColorInput/types.js +9 -3
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +120 -88
- package/dist/components/BbConfirm/BbConfirmHost.d.ts +10 -0
- package/dist/components/BbConfirm/BbConfirmHost.js +32 -0
- package/dist/components/BbConfirm/BbConfirmPortal.vue_vue_type_script_setup_true_lang.js +8 -12
- package/dist/components/BbConfirm/confirmEntry.d.ts +4 -0
- package/dist/components/BbConfirm/confirmEntry.js +4 -0
- package/dist/components/BbConfirm/types.d.ts +11 -6
- package/dist/components/BbConfirm/types.js +8 -3
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +68 -67
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +259 -215
- package/dist/components/BbDatePickerInput/types.d.ts +12 -5
- package/dist/components/BbDatePickerInput/types.js +9 -3
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +223 -219
- package/dist/components/BbDialog/useDialogStack.d.ts +1 -1
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +104 -89
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +323 -285
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +1 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +411 -319
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +100 -98
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +4 -3
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +49 -28
- package/dist/components/BbDropdown/normalizeGroups.d.ts +6 -0
- package/dist/components/BbDropdown/normalizeGroups.js +21 -15
- package/dist/components/BbDropdown/types.d.ts +59 -12
- package/dist/components/BbDropdown/types.js +16 -3
- package/dist/components/BbDropdown/useDropdownContext.d.ts +6 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +179 -68
- package/dist/components/BbDropdownButton/types.d.ts +44 -16
- package/dist/components/BbDropdownButton/types.js +28 -3
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +111 -89
- package/dist/components/BbForm/formSchema.d.ts +13 -0
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +100 -100
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +40 -25
- package/dist/components/BbIndicator/types.d.ts +9 -5
- package/dist/components/BbIndicator/types.js +8 -3
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +243 -202
- package/dist/components/BbNumberInput/types.d.ts +12 -5
- package/dist/components/BbNumberInput/types.js +9 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +401 -399
- package/dist/components/BbOffCanvas/types.d.ts +6 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +158 -105
- package/dist/components/BbRadioGroup/types.d.ts +21 -7
- package/dist/components/BbRadioGroup/types.js +9 -4
- package/dist/components/BbSelect/BbSelect.vue.d.ts +4 -3
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +181 -137
- package/dist/components/BbSelect/types.d.ts +36 -22
- package/dist/components/BbSelect/types.js +22 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +4 -4
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +543 -532
- package/dist/components/BbSelectPopover/knownItems.d.ts +5 -0
- package/dist/components/BbSelectPopover/types.d.ts +46 -12
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbSwitchGroup/types.d.ts +14 -4
- package/dist/components/BbSwitchGroup/types.js +8 -3
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1152 -999
- package/dist/components/BbTable/BbTableDataRow.js +17 -12
- package/dist/components/BbTable/BbTableSelectToggle.d.ts +1 -1
- package/dist/components/BbTable/estimatedFloors.golden.d.ts +25 -0
- package/dist/components/BbTable/measuredFloors.d.ts +46 -0
- package/dist/components/BbTable/measuredFloors.js +322 -0
- package/dist/components/BbTable/measuredFloorsTestKit.d.ts +27 -0
- package/dist/components/BbTable/textRuler.d.ts +71 -0
- package/dist/components/BbTable/textRuler.js +121 -0
- package/dist/components/BbTable/types.d.ts +14 -3
- package/dist/components/BbTable/types.js +2 -0
- package/dist/components/BbTable/utils.d.ts +113 -6
- package/dist/components/BbTable/utils.js +118 -65
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +53 -35
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +62 -45
- package/dist/components/BbTabs/types.d.ts +26 -11
- package/dist/components/BbTabs/types.js +23 -8
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +205 -164
- package/dist/components/BbTag/types.d.ts +11 -4
- package/dist/components/BbTag/types.js +9 -3
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +98 -57
- package/dist/components/BbTextInput/types.d.ts +12 -5
- package/dist/components/BbTextInput/types.js +9 -3
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +137 -96
- package/dist/components/BbTextarea/types.d.ts +12 -5
- package/dist/components/BbTextarea/types.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +105 -104
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +241 -197
- package/dist/components/BbTimePickerInput/types.d.ts +12 -5
- package/dist/components/BbTimePickerInput/types.js +9 -3
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +74 -32
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +47 -47
- package/dist/components/BbToast/types.d.ts +10 -5
- package/dist/components/BbToast/types.js +18 -3
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +85 -71
- package/dist/components/BbTooltip/types.d.ts +13 -8
- package/dist/components/BbTooltip/types.js +8 -3
- package/dist/components/CommonField/CommonField.vue.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +69 -69
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +53 -50
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +146 -143
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +7 -2
- package/dist/components/OptionsContainer/types.d.ts +14 -3
- package/dist/composables/useBbFormContext.d.ts +11 -6
- package/dist/composables/useBbTabsContext.js +99 -85
- package/dist/composables/useChoiceIndicator.d.ts +58 -0
- package/dist/composables/useChoiceIndicator.js +197 -0
- package/dist/composables/useConfirm.d.ts +327 -33
- package/dist/composables/useConfirm.js +93 -71
- package/dist/composables/usePassthrough.d.ts +54 -1
- package/dist/composables/usePassthrough.js +100 -71
- package/dist/directives/bbTooltip.d.ts +12 -6
- package/dist/directives/createPopoverDirective.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/llms-full.txt +2535 -612
- package/dist/llms-medium.txt +74 -55
- package/dist/llms.txt +2 -1
- package/dist/passthrough-deduper.js +6 -3
- package/dist/project-dts.d.ts +24 -0
- package/dist/project-dts.js +43 -17
- package/dist/styles.css +2 -2
- package/dist/types/AlertVariant.d.ts +14 -0
- package/dist/types/AlertVariant.js +9 -0
- package/dist/types/BadgeVariant.d.ts +14 -0
- package/dist/types/BadgeVariant.js +9 -0
- package/dist/types/ButtonVariant.d.ts +16 -0
- package/dist/types/ButtonVariant.js +11 -0
- package/dist/types/CheckboxVariant.d.ts +38 -0
- package/dist/types/CheckboxVariant.js +4 -0
- package/dist/types/CommonProps.d.ts +4 -3
- package/dist/types/Config.d.ts +7 -0
- package/dist/types/ConfirmVariant.d.ts +12 -0
- package/dist/types/ConfirmVariant.js +4 -0
- package/dist/types/DropdownItemVariant.d.ts +12 -0
- package/dist/types/DropdownItemVariant.js +4 -0
- package/dist/types/IndicatorVariant.d.ts +15 -0
- package/dist/types/IndicatorVariant.js +10 -0
- package/dist/types/InputVariant.d.ts +13 -0
- package/dist/types/InputVariant.js +8 -0
- package/dist/types/RadioVariant.d.ts +38 -0
- package/dist/types/RadioVariant.js +4 -0
- package/dist/types/TabsVariant.d.ts +13 -0
- package/dist/types/TabsVariant.js +8 -0
- package/dist/types/ToastVariant.d.ts +15 -0
- package/dist/types/ToastVariant.js +10 -0
- package/dist/types/TooltipVariant.d.ts +12 -0
- package/dist/types/TooltipVariant.js +4 -0
- package/dist/types/passthrough.d.ts +83 -15
- package/dist/types/passthrough.js +2 -2
- package/dist/types/ptComponentMap.d.ts +36 -24
- package/dist/utilities/functions/extractDomContainer.d.ts +20 -1
- package/dist/utilities/functions/extractDomContainer.js +8 -3
- package/dist/utils/focusVisibility.d.ts +6 -0
- package/dist/utils/focusVisibility.js +4 -1
- package/dist/utils/passthroughDeduper.d.ts +14 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +64 -7
- package/dist/vite.js +385 -259
- package/llms.txt +2 -1
- package/package.json +3 -3
- package/scripts/lib/adoption-checklist.json +312 -0
- package/scripts/lib/eslint-plugin.d.ts +13 -0
- package/scripts/lib/eslint-plugin.mjs +75 -11
- package/scripts/lib/idiom-scan.mjs +65 -0
- package/scripts/lib/mcp-config.mjs +203 -9
- package/scripts/lib/migrate-fix.mjs +42 -1
- package/scripts/lib/project-variant-dts.mjs +18 -0
- package/scripts/lib/validate-bb-markup.mjs +99 -2
package/dist/ai/source/BbTabs.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
>
|
|
21
21
|
<BbTabsList
|
|
22
22
|
v-bind="pickName(attrs)"
|
|
23
|
-
:pt="passthrough.forwardInstance(LIST_PARTS)"
|
|
23
|
+
:pt="passthrough.forwardInstance(LIST_PARTS, LIST_STATES)"
|
|
24
24
|
>
|
|
25
25
|
<template
|
|
26
26
|
v-for="(_, name) in forwardedSlots"
|
|
@@ -47,7 +47,12 @@
|
|
|
47
47
|
<script setup lang="ts" generic="K extends string = string">
|
|
48
48
|
import { useAttrs, useSlots } from 'vue';
|
|
49
49
|
import { createTabsContext } from '@/composables/useBbTabsContext';
|
|
50
|
-
import {
|
|
50
|
+
import {
|
|
51
|
+
registeredVariantNames,
|
|
52
|
+
usePassthrough,
|
|
53
|
+
variantPt,
|
|
54
|
+
} from '@/composables/usePassthrough';
|
|
55
|
+
import { TABS_VARIANTS } from '@/types/TabsVariant';
|
|
51
56
|
import { removedPropsFor } from '@/deprecation/removedProps';
|
|
52
57
|
import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
|
|
53
58
|
import BbTabsList from './BbTabsList.vue';
|
|
@@ -56,6 +61,7 @@ import { slotKey } from '@/utilities/functions/slotKey';
|
|
|
56
61
|
import BbTabsPanels from './BbTabsPanels.vue';
|
|
57
62
|
import {
|
|
58
63
|
BB_TABS_LIST_HOST_PARTS,
|
|
64
|
+
BB_TABS_LIST_PT,
|
|
59
65
|
BB_TABS_PANELS_HOST_PARTS,
|
|
60
66
|
BB_TABS_PT,
|
|
61
67
|
type BbTabsProps,
|
|
@@ -72,7 +78,11 @@ export type {
|
|
|
72
78
|
BbTabsSlots,
|
|
73
79
|
} from './types';
|
|
74
80
|
|
|
75
|
-
defineOptions({
|
|
81
|
+
defineOptions({
|
|
82
|
+
// An app's own variants as declared `pt:<part>:<name>` props (Q76.7).
|
|
83
|
+
mixins: [variantPt(BB_TABS_PT)],
|
|
84
|
+
inheritAttrs: false,
|
|
85
|
+
});
|
|
76
86
|
/**
|
|
77
87
|
* All-in-one tabs: the shadcn-themed list of triggers followed by the panels.
|
|
78
88
|
* Owns its own tabs context (shadowing any ancestor `BbTabsRoot`), so nested
|
|
@@ -137,7 +147,13 @@ const passthrough = usePassthrough<BbTabsPtPart, BbTabsPtState>({
|
|
|
137
147
|
parts: BB_TABS_PT.parts,
|
|
138
148
|
states: BB_TABS_PT.states,
|
|
139
149
|
active: { disabled: () => !!props.disabled },
|
|
150
|
+
variant: { ...BB_TABS_PT.variant, current: () => props.variant },
|
|
140
151
|
});
|
|
152
|
+
/** The strip resolves the variant itself (its own may differ): every name passes on. */
|
|
153
|
+
const LIST_STATES = [
|
|
154
|
+
...BB_TABS_LIST_PT.states,
|
|
155
|
+
...registeredVariantNames(TABS_VARIANTS, 'tabsVariants'),
|
|
156
|
+
];
|
|
141
157
|
/**
|
|
142
158
|
* The tab strip's name belongs on the element with `role="tablist"` (Q67.4):
|
|
143
159
|
* an `aria-label` / `aria-labelledby` on `<BbTabs>` goes to `BbTabsList`,
|
|
@@ -169,8 +185,14 @@ import type {
|
|
|
169
185
|
PtMap,
|
|
170
186
|
PtNoInfer,
|
|
171
187
|
PtValue,
|
|
188
|
+
PtVariantAttrs,
|
|
172
189
|
} from '@/types/passthrough';
|
|
173
|
-
import
|
|
190
|
+
import {
|
|
191
|
+
TABS_VARIANTS,
|
|
192
|
+
type TabsVariantBuiltIn,
|
|
193
|
+
type TabsVariantRegistry,
|
|
194
|
+
type TabsVariantType,
|
|
195
|
+
} from '@/types/TabsVariant';
|
|
174
196
|
/**
|
|
175
197
|
* Inertia-specific options shared between `BbTabsProps` (component-level defaults)
|
|
176
198
|
* and `BbTabsItem` (per-item overrides). Item values always win over component values.
|
|
@@ -293,7 +315,7 @@ export type BbTabsItem<K extends string = string> = BbTabsInertiaOptions & {
|
|
|
293
315
|
* Passthrough parts of `BbTabs` (plans/passthrough/BbTabs.md). Tabs do not
|
|
294
316
|
* "open", so there is no `open` state.
|
|
295
317
|
*
|
|
296
|
-
* Per-item functions: on the instance, `item` also accepts `({ item, active, … }) => PtValue | false | null | undefined` — `item` is the tab's descriptor (the element of `items`: its `value`, `label`, anything else you put on it),
|
|
318
|
+
* Per-item functions: on the instance, `item` also accepts `({ item, active, … }) => PtValue | false | null | undefined` — `item` is the tab's descriptor (the element of `items`: its `value`, `label`, anything else you put on it), every state a boolean beside it, on for it (`active`, `disabled`, …), and the strip's `variant` as a string — in the `pt` object or the `:pt:item` attribute, never on a `item:<state>` key and never in the global map or a scope (they ship as JSON). Its result is merged last, after every state entry, through the same deduper; a falsy result leaves the trigger as it was. No other part takes a function. See the passthrough guide, _Per-item functions_.
|
|
297
319
|
*
|
|
298
320
|
* @part root - The tabs' outer element, around the strip and the panels.
|
|
299
321
|
* @part wrapper - The strip's outer element: the `wrapper:prepend` slot, the
|
|
@@ -333,10 +355,23 @@ export type BbTabsPtState = 'active' | 'disabled';
|
|
|
333
355
|
export const BB_TABS_PT = {
|
|
334
356
|
parts: ['root', 'wrapper', 'list', 'item', 'indicator', 'panels', 'panel'],
|
|
335
357
|
states: ['disabled', 'active'],
|
|
358
|
+
// The `variant` is a state on the strip's parts (Q76.7), below the real ones.
|
|
359
|
+
variant: {
|
|
360
|
+
names: TABS_VARIANTS,
|
|
361
|
+
option: 'tabsVariants',
|
|
362
|
+
parts: ['wrapper', 'list', 'item', 'indicator'],
|
|
363
|
+
},
|
|
336
364
|
} as const satisfies {
|
|
337
365
|
parts: readonly BbTabsPtPart[];
|
|
338
366
|
states: readonly BbTabsPtState[];
|
|
367
|
+
variant: {
|
|
368
|
+
names: readonly TabsVariantBuiltIn[];
|
|
369
|
+
option: string;
|
|
370
|
+
parts: readonly BbTabsStripPtPart[];
|
|
371
|
+
};
|
|
339
372
|
};
|
|
373
|
+
/** The strip's parts on `BbTabs`: the ones its `variant` styles. Spelled flat (T20). */
|
|
374
|
+
export type BbTabsStripPtPart = 'wrapper' | 'list' | 'item' | 'indicator';
|
|
340
375
|
|
|
341
376
|
/**
|
|
342
377
|
* Passthrough parts of `BbTabsList` — the strip of a split layout. The same
|
|
@@ -362,9 +397,12 @@ export type BbTabsListPtState = BbTabsPtState;
|
|
|
362
397
|
export const BB_TABS_LIST_PT = {
|
|
363
398
|
parts: ['root', 'list', 'item', 'indicator'],
|
|
364
399
|
states: ['disabled', 'active'],
|
|
400
|
+
// The strip's `variant` is a state on every part (Q76.7).
|
|
401
|
+
variant: { names: TABS_VARIANTS, option: 'tabsVariants' },
|
|
365
402
|
} as const satisfies {
|
|
366
403
|
parts: readonly BbTabsListPtPart[];
|
|
367
404
|
states: readonly BbTabsListPtState[];
|
|
405
|
+
variant: { names: readonly TabsVariantBuiltIn[]; option: string };
|
|
368
406
|
};
|
|
369
407
|
/** Where each `BbTabsList` part reads a `BbTabs` global / scope entry. */
|
|
370
408
|
export const BB_TABS_LIST_HOST_PARTS = {
|
|
@@ -406,21 +444,39 @@ export const BB_TABS_PANELS_HOST_PARTS = {
|
|
|
406
444
|
export type BbTabsProps<K extends string = string> = {
|
|
407
445
|
[K2 in
|
|
408
446
|
| `pt:${BbTabsSurfacePtPart}`
|
|
409
|
-
| `pt:${BbTabsPtPart}:${BbTabsPtState}`
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
447
|
+
| `pt:${BbTabsPtPart}:${BbTabsPtState}`
|
|
448
|
+
| `pt:${BbTabsStripPtPart}:${TabsVariantBuiltIn}`]?: PtValue;
|
|
449
|
+
} & /* @vue-ignore */ PtVariantAttrs<
|
|
450
|
+
BbTabsStripPtPart,
|
|
451
|
+
keyof TabsVariantRegistry
|
|
452
|
+
> & {
|
|
453
|
+
// `item` also takes a per-item function, called with the tab descriptor.
|
|
454
|
+
// A literal function type, not `PtItemFn` (PASSTHROUGH.md T23).
|
|
455
|
+
'pt:item'?:
|
|
456
|
+
| PtValue
|
|
457
|
+
| ((
|
|
458
|
+
ctx: PtItemCtx<
|
|
459
|
+
BbTabsItem<PtNoInfer<K>>,
|
|
460
|
+
BbTabsPtState,
|
|
461
|
+
TabsVariantBuiltIn | keyof TabsVariantRegistry
|
|
462
|
+
>
|
|
463
|
+
) => PtItemResult);
|
|
464
|
+
/**
|
|
465
|
+
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
466
|
+
* without the prefix. See the `pt:<part>` row.
|
|
467
|
+
*/
|
|
468
|
+
/* eslint-disable @typescript-eslint/consistent-indexed-object-style -- mapped, never Record (T23) */
|
|
469
|
+
pt?: PtItemMap<
|
|
470
|
+
BbTabsPtPart,
|
|
471
|
+
'item',
|
|
472
|
+
BbTabsPtState,
|
|
473
|
+
BbTabsItem<PtNoInfer<K>>,
|
|
474
|
+
TabsVariantBuiltIn | keyof TabsVariantRegistry
|
|
475
|
+
> & {
|
|
476
|
+
[K2 in `${BbTabsStripPtPart}:${TabsVariantBuiltIn | keyof TabsVariantRegistry}`]?: PtValue;
|
|
477
|
+
};
|
|
478
|
+
/* eslint-enable @typescript-eslint/consistent-indexed-object-style */
|
|
479
|
+
} & BbTabsRootProps<K>;
|
|
424
480
|
|
|
425
481
|
/**
|
|
426
482
|
* Props of `BbTabsRoot` — `BbTabsProps` without `pt`. The root owns the whole
|
|
@@ -536,25 +592,45 @@ export type BbTabsRootProps<K extends string = string> =
|
|
|
536
592
|
export type BbTabsListProps = {
|
|
537
593
|
[K2 in
|
|
538
594
|
| `pt:${BbTabsListSurfacePtPart}`
|
|
539
|
-
| `pt:${BbTabsListPtPart}:${BbTabsListPtState}`
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
595
|
+
| `pt:${BbTabsListPtPart}:${BbTabsListPtState}`
|
|
596
|
+
| `pt:${BbTabsListPtPart}:${TabsVariantBuiltIn}`]?: PtValue;
|
|
597
|
+
} & /* @vue-ignore */ PtVariantAttrs<
|
|
598
|
+
BbTabsListPtPart,
|
|
599
|
+
keyof TabsVariantRegistry
|
|
600
|
+
> & {
|
|
601
|
+
// `item` also takes a per-item function, called with the tab descriptor.
|
|
602
|
+
// A literal function type, not `PtItemFn` (PASSTHROUGH.md T23).
|
|
603
|
+
'pt:item'?:
|
|
604
|
+
| PtValue
|
|
605
|
+
| ((
|
|
606
|
+
ctx: PtItemCtx<
|
|
607
|
+
BbTabsItem,
|
|
608
|
+
BbTabsListPtState,
|
|
609
|
+
TabsVariantBuiltIn | keyof TabsVariantRegistry
|
|
610
|
+
>
|
|
611
|
+
) => PtItemResult);
|
|
612
|
+
/**
|
|
613
|
+
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
614
|
+
* without the prefix. See the `pt:<part>` row.
|
|
615
|
+
*/
|
|
616
|
+
/* eslint-disable @typescript-eslint/consistent-indexed-object-style -- mapped, never Record (T23) */
|
|
617
|
+
pt?: PtItemMap<
|
|
618
|
+
BbTabsListPtPart,
|
|
619
|
+
'item',
|
|
620
|
+
BbTabsListPtState,
|
|
621
|
+
BbTabsItem,
|
|
622
|
+
TabsVariantBuiltIn | keyof TabsVariantRegistry
|
|
623
|
+
> & {
|
|
624
|
+
[K2 in `${BbTabsListPtPart}:${TabsVariantBuiltIn | keyof TabsVariantRegistry}`]?: PtValue;
|
|
625
|
+
};
|
|
626
|
+
/* eslint-enable @typescript-eslint/consistent-indexed-object-style */
|
|
627
|
+
} & {
|
|
628
|
+
/**
|
|
629
|
+
* Look of this strip — the `variant` of the owning `BbTabs` / `BbTabsRoot`
|
|
630
|
+
* unless set here. See `BbTabsProps.variant` for the values.
|
|
631
|
+
*/
|
|
632
|
+
variant?: TabsVariantType;
|
|
633
|
+
};
|
|
558
634
|
|
|
559
635
|
/**
|
|
560
636
|
* Props of `BbTabsPanels`: its `pt` only. Everything else — items,
|
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
} from 'vue';
|
|
108
108
|
import { useScroll, useResizeObserver, useThrottleFn } from '@vueuse/core';
|
|
109
109
|
import { useLogger } from '@/composables/useLogger';
|
|
110
|
-
import { usePassthrough } from '@/composables/usePassthrough';
|
|
110
|
+
import { usePassthrough, variantPt } from '@/composables/usePassthrough';
|
|
111
111
|
import BbBaseButton from '../BbBaseButton/BbBaseButton.vue';
|
|
112
112
|
import { omitName, pickName } from './tablistName';
|
|
113
113
|
import { useInternalTabsContext } from '@/composables/useBbTabsContext';
|
|
@@ -125,7 +125,11 @@ export type {
|
|
|
125
125
|
BbTabsScrollSlotProps,
|
|
126
126
|
} from './types';
|
|
127
127
|
|
|
128
|
-
defineOptions({
|
|
128
|
+
defineOptions({
|
|
129
|
+
// An app's own variants as declared `pt:<part>:<name>` props (Q76.7).
|
|
130
|
+
mixins: [variantPt(BB_TABS_LIST_PT)],
|
|
131
|
+
inheritAttrs: false,
|
|
132
|
+
});
|
|
129
133
|
/**
|
|
130
134
|
* The strip of tab triggers. Renders from the nearest `BbTabsRoot`/`BbTabs`
|
|
131
135
|
* context — discovery is automatic; the props are its `pt` and an optional
|
|
@@ -188,6 +192,10 @@ const passthrough = usePassthrough<BbTabsListPtPart, BbTabsListPtState>({
|
|
|
188
192
|
states: BB_TABS_LIST_PT.states,
|
|
189
193
|
active: { disabled: () => disabled.value },
|
|
190
194
|
inherit: { component: 'BbTabs', parts: BB_TABS_LIST_HOST_PARTS },
|
|
195
|
+
variant: {
|
|
196
|
+
...BB_TABS_LIST_PT.variant,
|
|
197
|
+
current: () => props.variant ?? context.variant.value,
|
|
198
|
+
},
|
|
191
199
|
});
|
|
192
200
|
|
|
193
201
|
/** The strip's look: this list's own `variant`, else the root's. */
|
|
@@ -421,8 +429,14 @@ import type {
|
|
|
421
429
|
PtMap,
|
|
422
430
|
PtNoInfer,
|
|
423
431
|
PtValue,
|
|
432
|
+
PtVariantAttrs,
|
|
424
433
|
} from '@/types/passthrough';
|
|
425
|
-
import
|
|
434
|
+
import {
|
|
435
|
+
TABS_VARIANTS,
|
|
436
|
+
type TabsVariantBuiltIn,
|
|
437
|
+
type TabsVariantRegistry,
|
|
438
|
+
type TabsVariantType,
|
|
439
|
+
} from '@/types/TabsVariant';
|
|
426
440
|
/**
|
|
427
441
|
* Inertia-specific options shared between `BbTabsProps` (component-level defaults)
|
|
428
442
|
* and `BbTabsItem` (per-item overrides). Item values always win over component values.
|
|
@@ -545,7 +559,7 @@ export type BbTabsItem<K extends string = string> = BbTabsInertiaOptions & {
|
|
|
545
559
|
* Passthrough parts of `BbTabs` (plans/passthrough/BbTabs.md). Tabs do not
|
|
546
560
|
* "open", so there is no `open` state.
|
|
547
561
|
*
|
|
548
|
-
* Per-item functions: on the instance, `item` also accepts `({ item, active, … }) => PtValue | false | null | undefined` — `item` is the tab's descriptor (the element of `items`: its `value`, `label`, anything else you put on it),
|
|
562
|
+
* Per-item functions: on the instance, `item` also accepts `({ item, active, … }) => PtValue | false | null | undefined` — `item` is the tab's descriptor (the element of `items`: its `value`, `label`, anything else you put on it), every state a boolean beside it, on for it (`active`, `disabled`, …), and the strip's `variant` as a string — in the `pt` object or the `:pt:item` attribute, never on a `item:<state>` key and never in the global map or a scope (they ship as JSON). Its result is merged last, after every state entry, through the same deduper; a falsy result leaves the trigger as it was. No other part takes a function. See the passthrough guide, _Per-item functions_.
|
|
549
563
|
*
|
|
550
564
|
* @part root - The tabs' outer element, around the strip and the panels.
|
|
551
565
|
* @part wrapper - The strip's outer element: the `wrapper:prepend` slot, the
|
|
@@ -585,10 +599,23 @@ export type BbTabsPtState = 'active' | 'disabled';
|
|
|
585
599
|
export const BB_TABS_PT = {
|
|
586
600
|
parts: ['root', 'wrapper', 'list', 'item', 'indicator', 'panels', 'panel'],
|
|
587
601
|
states: ['disabled', 'active'],
|
|
602
|
+
// The `variant` is a state on the strip's parts (Q76.7), below the real ones.
|
|
603
|
+
variant: {
|
|
604
|
+
names: TABS_VARIANTS,
|
|
605
|
+
option: 'tabsVariants',
|
|
606
|
+
parts: ['wrapper', 'list', 'item', 'indicator'],
|
|
607
|
+
},
|
|
588
608
|
} as const satisfies {
|
|
589
609
|
parts: readonly BbTabsPtPart[];
|
|
590
610
|
states: readonly BbTabsPtState[];
|
|
611
|
+
variant: {
|
|
612
|
+
names: readonly TabsVariantBuiltIn[];
|
|
613
|
+
option: string;
|
|
614
|
+
parts: readonly BbTabsStripPtPart[];
|
|
615
|
+
};
|
|
591
616
|
};
|
|
617
|
+
/** The strip's parts on `BbTabs`: the ones its `variant` styles. Spelled flat (T20). */
|
|
618
|
+
export type BbTabsStripPtPart = 'wrapper' | 'list' | 'item' | 'indicator';
|
|
592
619
|
|
|
593
620
|
/**
|
|
594
621
|
* Passthrough parts of `BbTabsList` — the strip of a split layout. The same
|
|
@@ -614,9 +641,12 @@ export type BbTabsListPtState = BbTabsPtState;
|
|
|
614
641
|
export const BB_TABS_LIST_PT = {
|
|
615
642
|
parts: ['root', 'list', 'item', 'indicator'],
|
|
616
643
|
states: ['disabled', 'active'],
|
|
644
|
+
// The strip's `variant` is a state on every part (Q76.7).
|
|
645
|
+
variant: { names: TABS_VARIANTS, option: 'tabsVariants' },
|
|
617
646
|
} as const satisfies {
|
|
618
647
|
parts: readonly BbTabsListPtPart[];
|
|
619
648
|
states: readonly BbTabsListPtState[];
|
|
649
|
+
variant: { names: readonly TabsVariantBuiltIn[]; option: string };
|
|
620
650
|
};
|
|
621
651
|
/** Where each `BbTabsList` part reads a `BbTabs` global / scope entry. */
|
|
622
652
|
export const BB_TABS_LIST_HOST_PARTS = {
|
|
@@ -658,21 +688,39 @@ export const BB_TABS_PANELS_HOST_PARTS = {
|
|
|
658
688
|
export type BbTabsProps<K extends string = string> = {
|
|
659
689
|
[K2 in
|
|
660
690
|
| `pt:${BbTabsSurfacePtPart}`
|
|
661
|
-
| `pt:${BbTabsPtPart}:${BbTabsPtState}`
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
691
|
+
| `pt:${BbTabsPtPart}:${BbTabsPtState}`
|
|
692
|
+
| `pt:${BbTabsStripPtPart}:${TabsVariantBuiltIn}`]?: PtValue;
|
|
693
|
+
} & /* @vue-ignore */ PtVariantAttrs<
|
|
694
|
+
BbTabsStripPtPart,
|
|
695
|
+
keyof TabsVariantRegistry
|
|
696
|
+
> & {
|
|
697
|
+
// `item` also takes a per-item function, called with the tab descriptor.
|
|
698
|
+
// A literal function type, not `PtItemFn` (PASSTHROUGH.md T23).
|
|
699
|
+
'pt:item'?:
|
|
700
|
+
| PtValue
|
|
701
|
+
| ((
|
|
702
|
+
ctx: PtItemCtx<
|
|
703
|
+
BbTabsItem<PtNoInfer<K>>,
|
|
704
|
+
BbTabsPtState,
|
|
705
|
+
TabsVariantBuiltIn | keyof TabsVariantRegistry
|
|
706
|
+
>
|
|
707
|
+
) => PtItemResult);
|
|
708
|
+
/**
|
|
709
|
+
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
710
|
+
* without the prefix. See the `pt:<part>` row.
|
|
711
|
+
*/
|
|
712
|
+
/* eslint-disable @typescript-eslint/consistent-indexed-object-style -- mapped, never Record (T23) */
|
|
713
|
+
pt?: PtItemMap<
|
|
714
|
+
BbTabsPtPart,
|
|
715
|
+
'item',
|
|
716
|
+
BbTabsPtState,
|
|
717
|
+
BbTabsItem<PtNoInfer<K>>,
|
|
718
|
+
TabsVariantBuiltIn | keyof TabsVariantRegistry
|
|
719
|
+
> & {
|
|
720
|
+
[K2 in `${BbTabsStripPtPart}:${TabsVariantBuiltIn | keyof TabsVariantRegistry}`]?: PtValue;
|
|
721
|
+
};
|
|
722
|
+
/* eslint-enable @typescript-eslint/consistent-indexed-object-style */
|
|
723
|
+
} & BbTabsRootProps<K>;
|
|
676
724
|
|
|
677
725
|
/**
|
|
678
726
|
* Props of `BbTabsRoot` — `BbTabsProps` without `pt`. The root owns the whole
|
|
@@ -788,25 +836,45 @@ export type BbTabsRootProps<K extends string = string> =
|
|
|
788
836
|
export type BbTabsListProps = {
|
|
789
837
|
[K2 in
|
|
790
838
|
| `pt:${BbTabsListSurfacePtPart}`
|
|
791
|
-
| `pt:${BbTabsListPtPart}:${BbTabsListPtState}`
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
839
|
+
| `pt:${BbTabsListPtPart}:${BbTabsListPtState}`
|
|
840
|
+
| `pt:${BbTabsListPtPart}:${TabsVariantBuiltIn}`]?: PtValue;
|
|
841
|
+
} & /* @vue-ignore */ PtVariantAttrs<
|
|
842
|
+
BbTabsListPtPart,
|
|
843
|
+
keyof TabsVariantRegistry
|
|
844
|
+
> & {
|
|
845
|
+
// `item` also takes a per-item function, called with the tab descriptor.
|
|
846
|
+
// A literal function type, not `PtItemFn` (PASSTHROUGH.md T23).
|
|
847
|
+
'pt:item'?:
|
|
848
|
+
| PtValue
|
|
849
|
+
| ((
|
|
850
|
+
ctx: PtItemCtx<
|
|
851
|
+
BbTabsItem,
|
|
852
|
+
BbTabsListPtState,
|
|
853
|
+
TabsVariantBuiltIn | keyof TabsVariantRegistry
|
|
854
|
+
>
|
|
855
|
+
) => PtItemResult);
|
|
856
|
+
/**
|
|
857
|
+
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
858
|
+
* without the prefix. See the `pt:<part>` row.
|
|
859
|
+
*/
|
|
860
|
+
/* eslint-disable @typescript-eslint/consistent-indexed-object-style -- mapped, never Record (T23) */
|
|
861
|
+
pt?: PtItemMap<
|
|
862
|
+
BbTabsListPtPart,
|
|
863
|
+
'item',
|
|
864
|
+
BbTabsListPtState,
|
|
865
|
+
BbTabsItem,
|
|
866
|
+
TabsVariantBuiltIn | keyof TabsVariantRegistry
|
|
867
|
+
> & {
|
|
868
|
+
[K2 in `${BbTabsListPtPart}:${TabsVariantBuiltIn | keyof TabsVariantRegistry}`]?: PtValue;
|
|
869
|
+
};
|
|
870
|
+
/* eslint-enable @typescript-eslint/consistent-indexed-object-style */
|
|
871
|
+
} & {
|
|
872
|
+
/**
|
|
873
|
+
* Look of this strip — the `variant` of the owning `BbTabs` / `BbTabsRoot`
|
|
874
|
+
* unless set here. See `BbTabsProps.variant` for the values.
|
|
875
|
+
*/
|
|
876
|
+
variant?: TabsVariantType;
|
|
877
|
+
};
|
|
810
878
|
|
|
811
879
|
/**
|
|
812
880
|
* Props of `BbTabsPanels`: its `pt` only. Everything else — items,
|
|
@@ -95,8 +95,14 @@ import type {
|
|
|
95
95
|
PtMap,
|
|
96
96
|
PtNoInfer,
|
|
97
97
|
PtValue,
|
|
98
|
+
PtVariantAttrs,
|
|
98
99
|
} from '@/types/passthrough';
|
|
99
|
-
import
|
|
100
|
+
import {
|
|
101
|
+
TABS_VARIANTS,
|
|
102
|
+
type TabsVariantBuiltIn,
|
|
103
|
+
type TabsVariantRegistry,
|
|
104
|
+
type TabsVariantType,
|
|
105
|
+
} from '@/types/TabsVariant';
|
|
100
106
|
/**
|
|
101
107
|
* Inertia-specific options shared between `BbTabsProps` (component-level defaults)
|
|
102
108
|
* and `BbTabsItem` (per-item overrides). Item values always win over component values.
|
|
@@ -219,7 +225,7 @@ export type BbTabsItem<K extends string = string> = BbTabsInertiaOptions & {
|
|
|
219
225
|
* Passthrough parts of `BbTabs` (plans/passthrough/BbTabs.md). Tabs do not
|
|
220
226
|
* "open", so there is no `open` state.
|
|
221
227
|
*
|
|
222
|
-
* Per-item functions: on the instance, `item` also accepts `({ item, active, … }) => PtValue | false | null | undefined` — `item` is the tab's descriptor (the element of `items`: its `value`, `label`, anything else you put on it),
|
|
228
|
+
* Per-item functions: on the instance, `item` also accepts `({ item, active, … }) => PtValue | false | null | undefined` — `item` is the tab's descriptor (the element of `items`: its `value`, `label`, anything else you put on it), every state a boolean beside it, on for it (`active`, `disabled`, …), and the strip's `variant` as a string — in the `pt` object or the `:pt:item` attribute, never on a `item:<state>` key and never in the global map or a scope (they ship as JSON). Its result is merged last, after every state entry, through the same deduper; a falsy result leaves the trigger as it was. No other part takes a function. See the passthrough guide, _Per-item functions_.
|
|
223
229
|
*
|
|
224
230
|
* @part root - The tabs' outer element, around the strip and the panels.
|
|
225
231
|
* @part wrapper - The strip's outer element: the `wrapper:prepend` slot, the
|
|
@@ -259,10 +265,23 @@ export type BbTabsPtState = 'active' | 'disabled';
|
|
|
259
265
|
export const BB_TABS_PT = {
|
|
260
266
|
parts: ['root', 'wrapper', 'list', 'item', 'indicator', 'panels', 'panel'],
|
|
261
267
|
states: ['disabled', 'active'],
|
|
268
|
+
// The `variant` is a state on the strip's parts (Q76.7), below the real ones.
|
|
269
|
+
variant: {
|
|
270
|
+
names: TABS_VARIANTS,
|
|
271
|
+
option: 'tabsVariants',
|
|
272
|
+
parts: ['wrapper', 'list', 'item', 'indicator'],
|
|
273
|
+
},
|
|
262
274
|
} as const satisfies {
|
|
263
275
|
parts: readonly BbTabsPtPart[];
|
|
264
276
|
states: readonly BbTabsPtState[];
|
|
277
|
+
variant: {
|
|
278
|
+
names: readonly TabsVariantBuiltIn[];
|
|
279
|
+
option: string;
|
|
280
|
+
parts: readonly BbTabsStripPtPart[];
|
|
281
|
+
};
|
|
265
282
|
};
|
|
283
|
+
/** The strip's parts on `BbTabs`: the ones its `variant` styles. Spelled flat (T20). */
|
|
284
|
+
export type BbTabsStripPtPart = 'wrapper' | 'list' | 'item' | 'indicator';
|
|
266
285
|
|
|
267
286
|
/**
|
|
268
287
|
* Passthrough parts of `BbTabsList` — the strip of a split layout. The same
|
|
@@ -288,9 +307,12 @@ export type BbTabsListPtState = BbTabsPtState;
|
|
|
288
307
|
export const BB_TABS_LIST_PT = {
|
|
289
308
|
parts: ['root', 'list', 'item', 'indicator'],
|
|
290
309
|
states: ['disabled', 'active'],
|
|
310
|
+
// The strip's `variant` is a state on every part (Q76.7).
|
|
311
|
+
variant: { names: TABS_VARIANTS, option: 'tabsVariants' },
|
|
291
312
|
} as const satisfies {
|
|
292
313
|
parts: readonly BbTabsListPtPart[];
|
|
293
314
|
states: readonly BbTabsListPtState[];
|
|
315
|
+
variant: { names: readonly TabsVariantBuiltIn[]; option: string };
|
|
294
316
|
};
|
|
295
317
|
/** Where each `BbTabsList` part reads a `BbTabs` global / scope entry. */
|
|
296
318
|
export const BB_TABS_LIST_HOST_PARTS = {
|
|
@@ -332,21 +354,39 @@ export const BB_TABS_PANELS_HOST_PARTS = {
|
|
|
332
354
|
export type BbTabsProps<K extends string = string> = {
|
|
333
355
|
[K2 in
|
|
334
356
|
| `pt:${BbTabsSurfacePtPart}`
|
|
335
|
-
| `pt:${BbTabsPtPart}:${BbTabsPtState}`
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
357
|
+
| `pt:${BbTabsPtPart}:${BbTabsPtState}`
|
|
358
|
+
| `pt:${BbTabsStripPtPart}:${TabsVariantBuiltIn}`]?: PtValue;
|
|
359
|
+
} & /* @vue-ignore */ PtVariantAttrs<
|
|
360
|
+
BbTabsStripPtPart,
|
|
361
|
+
keyof TabsVariantRegistry
|
|
362
|
+
> & {
|
|
363
|
+
// `item` also takes a per-item function, called with the tab descriptor.
|
|
364
|
+
// A literal function type, not `PtItemFn` (PASSTHROUGH.md T23).
|
|
365
|
+
'pt:item'?:
|
|
366
|
+
| PtValue
|
|
367
|
+
| ((
|
|
368
|
+
ctx: PtItemCtx<
|
|
369
|
+
BbTabsItem<PtNoInfer<K>>,
|
|
370
|
+
BbTabsPtState,
|
|
371
|
+
TabsVariantBuiltIn | keyof TabsVariantRegistry
|
|
372
|
+
>
|
|
373
|
+
) => PtItemResult);
|
|
374
|
+
/**
|
|
375
|
+
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
376
|
+
* without the prefix. See the `pt:<part>` row.
|
|
377
|
+
*/
|
|
378
|
+
/* eslint-disable @typescript-eslint/consistent-indexed-object-style -- mapped, never Record (T23) */
|
|
379
|
+
pt?: PtItemMap<
|
|
380
|
+
BbTabsPtPart,
|
|
381
|
+
'item',
|
|
382
|
+
BbTabsPtState,
|
|
383
|
+
BbTabsItem<PtNoInfer<K>>,
|
|
384
|
+
TabsVariantBuiltIn | keyof TabsVariantRegistry
|
|
385
|
+
> & {
|
|
386
|
+
[K2 in `${BbTabsStripPtPart}:${TabsVariantBuiltIn | keyof TabsVariantRegistry}`]?: PtValue;
|
|
387
|
+
};
|
|
388
|
+
/* eslint-enable @typescript-eslint/consistent-indexed-object-style */
|
|
389
|
+
} & BbTabsRootProps<K>;
|
|
350
390
|
|
|
351
391
|
/**
|
|
352
392
|
* Props of `BbTabsRoot` — `BbTabsProps` without `pt`. The root owns the whole
|
|
@@ -462,25 +502,45 @@ export type BbTabsRootProps<K extends string = string> =
|
|
|
462
502
|
export type BbTabsListProps = {
|
|
463
503
|
[K2 in
|
|
464
504
|
| `pt:${BbTabsListSurfacePtPart}`
|
|
465
|
-
| `pt:${BbTabsListPtPart}:${BbTabsListPtState}`
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
505
|
+
| `pt:${BbTabsListPtPart}:${BbTabsListPtState}`
|
|
506
|
+
| `pt:${BbTabsListPtPart}:${TabsVariantBuiltIn}`]?: PtValue;
|
|
507
|
+
} & /* @vue-ignore */ PtVariantAttrs<
|
|
508
|
+
BbTabsListPtPart,
|
|
509
|
+
keyof TabsVariantRegistry
|
|
510
|
+
> & {
|
|
511
|
+
// `item` also takes a per-item function, called with the tab descriptor.
|
|
512
|
+
// A literal function type, not `PtItemFn` (PASSTHROUGH.md T23).
|
|
513
|
+
'pt:item'?:
|
|
514
|
+
| PtValue
|
|
515
|
+
| ((
|
|
516
|
+
ctx: PtItemCtx<
|
|
517
|
+
BbTabsItem,
|
|
518
|
+
BbTabsListPtState,
|
|
519
|
+
TabsVariantBuiltIn | keyof TabsVariantRegistry
|
|
520
|
+
>
|
|
521
|
+
) => PtItemResult);
|
|
522
|
+
/**
|
|
523
|
+
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
524
|
+
* without the prefix. See the `pt:<part>` row.
|
|
525
|
+
*/
|
|
526
|
+
/* eslint-disable @typescript-eslint/consistent-indexed-object-style -- mapped, never Record (T23) */
|
|
527
|
+
pt?: PtItemMap<
|
|
528
|
+
BbTabsListPtPart,
|
|
529
|
+
'item',
|
|
530
|
+
BbTabsListPtState,
|
|
531
|
+
BbTabsItem,
|
|
532
|
+
TabsVariantBuiltIn | keyof TabsVariantRegistry
|
|
533
|
+
> & {
|
|
534
|
+
[K2 in `${BbTabsListPtPart}:${TabsVariantBuiltIn | keyof TabsVariantRegistry}`]?: PtValue;
|
|
535
|
+
};
|
|
536
|
+
/* eslint-enable @typescript-eslint/consistent-indexed-object-style */
|
|
537
|
+
} & {
|
|
538
|
+
/**
|
|
539
|
+
* Look of this strip — the `variant` of the owning `BbTabs` / `BbTabsRoot`
|
|
540
|
+
* unless set here. See `BbTabsProps.variant` for the values.
|
|
541
|
+
*/
|
|
542
|
+
variant?: TabsVariantType;
|
|
543
|
+
};
|
|
484
544
|
|
|
485
545
|
/**
|
|
486
546
|
* Props of `BbTabsPanels`: its `pt` only. Everything else — items,
|