bitboss-ui 3.0.0-beta.63 → 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 +7 -3
- 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 +55 -22
- package/dist/ai/BbHost.md +2 -2
- 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/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 +17 -10
- 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 +416 -6
- package/dist/ai/components.json +50 -48
- package/dist/ai/composables/useConfirm.md +39 -1
- package/dist/ai/design-tokens.json +6 -6
- package/dist/ai/guides/agent-contract.md +2 -2
- 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-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 +25 -2
- package/dist/ai/guides/migration/v2-to-v3.md +163 -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/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 -1
- 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.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 +5 -2
- 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 +34 -11
- package/dist/ai/source/BbConfirmPortal.md +24 -9
- 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/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 +369 -37
- 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 +82 -59
- package/dist/components/BbConfirm/types.d.ts +9 -4
- 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/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 +1102 -995
- 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/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 +4 -3
- 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 +4 -4
- 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 +2300 -543
- package/dist/llms-medium.txt +71 -53
- 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 +35 -23
- 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
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
v-bind="
|
|
13
13
|
mergeProps(routingAttributes, passthrough.forwardAttrs, passthrough.root)
|
|
14
14
|
"
|
|
15
|
-
><slot>{{ text }}</slot></RouterComponent
|
|
15
|
+
><slot v-bind="linkState">{{ text }}</slot></RouterComponent
|
|
16
16
|
>
|
|
17
17
|
<a
|
|
18
18
|
v-else-if="asLink"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
v-bind="
|
|
21
21
|
mergeProps(anchorAttributes, passthrough.forwardAttrs, passthrough.root)
|
|
22
22
|
"
|
|
23
|
-
><slot>{{ text }}</slot></a
|
|
23
|
+
><slot v-bind="linkState">{{ text }}</slot></a
|
|
24
24
|
>
|
|
25
25
|
<component
|
|
26
26
|
:is="resolvedTag"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
mergeProps(tagAttributes, passthrough.forwardAttrs, passthrough.root)
|
|
31
31
|
"
|
|
32
32
|
>
|
|
33
|
-
<slot>{{ text }}</slot>
|
|
33
|
+
<slot v-bind="linkState">{{ text }}</slot>
|
|
34
34
|
</component>
|
|
35
35
|
</template>
|
|
36
36
|
|
|
@@ -61,9 +61,8 @@
|
|
|
61
61
|
*/
|
|
62
62
|
import { computed, mergeProps, useAttrs } from 'vue';
|
|
63
63
|
import RouterComponent from './RouterComponent.vue';
|
|
64
|
+
import { currentOrigin, isNonRoutable, useBaseLinkState } from './useLinkState';
|
|
64
65
|
import { useFrameworkDetection } from '@/composables/useFrameworkDetection';
|
|
65
|
-
import { useHydrated } from '@/composables/useHydrated';
|
|
66
|
-
import { useInertiaPage } from '@/composables/useInertiaPage';
|
|
67
66
|
import { useConfig } from '@/composables/useConfig';
|
|
68
67
|
import {
|
|
69
68
|
BB_BASE_BUTTON_PT,
|
|
@@ -87,6 +86,11 @@ const props = withDefaults(defineProps<BbBaseButtonProps>(), {
|
|
|
87
86
|
|
|
88
87
|
defineSlots<BbBaseButtonSlots>();
|
|
89
88
|
|
|
89
|
+
// The one answer to "is this link the current page": the active classes, the
|
|
90
|
+
// `activeLink` / `exactActiveLink` states and the default-slot props all read
|
|
91
|
+
// it (computed by the wrapper this button is the root of, when there is one).
|
|
92
|
+
const linkState = useBaseLinkState(props);
|
|
93
|
+
|
|
90
94
|
/**
|
|
91
95
|
* Passthrough (plans/passthrough/BbBaseButton.md). `root` merges LAST onto whichever element renders.
|
|
92
96
|
*/
|
|
@@ -96,131 +100,27 @@ const passthrough = usePassthrough({
|
|
|
96
100
|
props,
|
|
97
101
|
parts: BB_BASE_BUTTON_PT.parts,
|
|
98
102
|
states: BB_BASE_BUTTON_PT.states,
|
|
99
|
-
active: {
|
|
103
|
+
active: {
|
|
104
|
+
disabled: () => !!props.disabled,
|
|
105
|
+
activeLink: () => linkState.value.activeLink,
|
|
106
|
+
exactActiveLink: () => linkState.value.exactActiveLink,
|
|
107
|
+
},
|
|
100
108
|
});
|
|
101
109
|
|
|
102
110
|
const config = useConfig();
|
|
103
111
|
|
|
104
112
|
const { isInertia, isNuxt } = useFrameworkDetection();
|
|
105
|
-
const { isHydrated } = useHydrated();
|
|
106
|
-
const { getPageUrl } = useInertiaPage();
|
|
107
|
-
|
|
108
|
-
const URL_FALLBACK_BASE = 'http://localhost';
|
|
109
|
-
|
|
110
|
-
// The real current origin, shared by the Inertia and plain-app branches below.
|
|
111
|
-
// Inertia's own `$page.url` is always a path (never absolute — it's the
|
|
112
|
-
// server request URI), so it can't be parsed for an origin; the browser's
|
|
113
|
-
// actual location is the only reliable source in either mode. SSR has no
|
|
114
|
-
// `window`, so `currentOrigin` is `null` there — `isNonRoutable` already
|
|
115
|
-
// treats a missing origin as "can't verify same-origin, don't route".
|
|
116
|
-
const isBrowser = typeof window !== 'undefined';
|
|
117
|
-
const currentOrigin = isBrowser ? window.location.origin : null;
|
|
118
|
-
|
|
119
|
-
// Returns true for href values that should not be handled by the Inertia router:
|
|
120
|
-
// protocol-relative URLs, same-page hash fragments, and cross-origin absolute URLs.
|
|
121
|
-
// Same-origin absolute URLs (e.g. from Ziggy's route()) are considered routable.
|
|
122
|
-
const isNonRoutable = (href: string, originToMatch?: string | null) => {
|
|
123
|
-
const value = href.trim();
|
|
124
|
-
if (!value) return false;
|
|
125
|
-
if (value.startsWith('#')) return true;
|
|
126
|
-
if (value.startsWith('//')) return true;
|
|
127
|
-
if (!/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(value)) return false;
|
|
128
|
-
// Absolute URL: routable only when it shares the current page's origin
|
|
129
|
-
if (!originToMatch) return true;
|
|
130
|
-
try {
|
|
131
|
-
return new URL(value).origin !== originToMatch;
|
|
132
|
-
} catch {
|
|
133
|
-
return true;
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
113
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
114
|
+
// Classes for `href` links only: RouterLink sets its own on a `to` link, and
|
|
115
|
+
// they must not be doubled.
|
|
116
|
+
const isActive = computed(() => !props.to && linkState.value.activeLink);
|
|
117
|
+
const isExactActive = computed(
|
|
118
|
+
() => !props.to && linkState.value.exactActiveLink
|
|
119
|
+
);
|
|
141
120
|
|
|
142
|
-
// getPageUrl() is called inside computed so Vue tracks $page reactively.
|
|
143
|
-
const inertiaPathname = computed(() => {
|
|
144
|
-
const url = getPageUrl();
|
|
145
|
-
if (!url) return undefined;
|
|
146
|
-
try {
|
|
147
|
-
return normalizePathname(new URL(url, URL_FALLBACK_BASE).pathname);
|
|
148
|
-
} catch {
|
|
149
|
-
return undefined;
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
121
|
const isInternalInertiaHref = computed(
|
|
153
122
|
() => !!(props.href && !isNonRoutable(props.href, currentOrigin))
|
|
154
123
|
);
|
|
155
|
-
const inertiaHrefPathname = computed(() => {
|
|
156
|
-
if (!isInternalInertiaHref.value || !props.href) return undefined;
|
|
157
|
-
const basePathname = inertiaPathname.value ?? '/';
|
|
158
|
-
try {
|
|
159
|
-
return normalizePathname(
|
|
160
|
-
new URL(props.href, `${URL_FALLBACK_BASE}${basePathname}`).pathname
|
|
161
|
-
);
|
|
162
|
-
} catch {
|
|
163
|
-
return undefined;
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
// Plain-app (no Inertia, no Vue Router) active matching: resolve the current
|
|
168
|
-
// location and the link's target from `window.location`, mirroring the Inertia
|
|
169
|
-
// path logic above. Full-page anchor navigation re-renders the component against
|
|
170
|
-
// the new URL, so reading location at evaluation time is sufficient.
|
|
171
|
-
//
|
|
172
|
-
// Gated on `isHydrated` (the a90e1ec4 hydration-gate pattern): the server
|
|
173
|
-
// renders `undefined` (no window), so a bare `window.location` read here
|
|
174
|
-
// settles on the real pathname DURING hydration with no reactive dependency —
|
|
175
|
-
// dev logs a class mismatch and prod keeps the server HTML, so an href link
|
|
176
|
-
// to the current page never gets its active class. Reporting `undefined`
|
|
177
|
-
// until the gate opens makes hydration agree with the server HTML, and the
|
|
178
|
-
// gate's flip (post-hydration, pre-paint) is the reactive dep that patches
|
|
179
|
-
// the class in.
|
|
180
|
-
const browserPathname = computed(() =>
|
|
181
|
-
isBrowser && isHydrated.value
|
|
182
|
-
? normalizePathname(window.location.pathname)
|
|
183
|
-
: undefined
|
|
184
|
-
);
|
|
185
|
-
const browserHrefPathname = computed(() => {
|
|
186
|
-
if (!props.href || isNonRoutable(props.href, currentOrigin)) return undefined;
|
|
187
|
-
const basePathname = browserPathname.value ?? '/';
|
|
188
|
-
try {
|
|
189
|
-
return normalizePathname(
|
|
190
|
-
new URL(props.href, `${URL_FALLBACK_BASE}${basePathname}`).pathname
|
|
191
|
-
);
|
|
192
|
-
} catch {
|
|
193
|
-
return undefined;
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
// Active state is driven by Inertia's `$page` when present, otherwise by the
|
|
198
|
-
// browser URL — so a plain `href` link gets the same "current page" highlight
|
|
199
|
-
// that Vue Router gives a `to` link. `to` links are excluded here: RouterLink
|
|
200
|
-
// computes its own active class natively, and we must not compute a second one.
|
|
201
|
-
const activeCurrentPathname = computed(() =>
|
|
202
|
-
isInertia ? inertiaPathname.value : browserPathname.value
|
|
203
|
-
);
|
|
204
|
-
const activeHrefPathname = computed(() =>
|
|
205
|
-
isInertia ? inertiaHrefPathname.value : browserHrefPathname.value
|
|
206
|
-
);
|
|
207
|
-
|
|
208
|
-
const isExactActive = computed(() => {
|
|
209
|
-
if (props.to) return false;
|
|
210
|
-
const current = activeCurrentPathname.value;
|
|
211
|
-
const target = activeHrefPathname.value;
|
|
212
|
-
if (!current || !target) return false;
|
|
213
|
-
return target === current;
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
const isActive = computed(() => {
|
|
217
|
-
if (props.to) return false;
|
|
218
|
-
const current = activeCurrentPathname.value;
|
|
219
|
-
const target = activeHrefPathname.value;
|
|
220
|
-
if (!current || !target) return false;
|
|
221
|
-
if (target === '/') return current.startsWith('/');
|
|
222
|
-
return current === target || current.startsWith(`${target}/`);
|
|
223
|
-
});
|
|
224
124
|
|
|
225
125
|
/**
|
|
226
126
|
* Determines if the component should render as a routing component (Inertia/Vue Router).
|
|
@@ -504,15 +404,23 @@ import type { RouteLocationRaw } from 'vue-router';
|
|
|
504
404
|
*/
|
|
505
405
|
export type BbBaseButtonPtPart = 'root';
|
|
506
406
|
/**
|
|
507
|
-
* Passthrough states of `BbBaseButton
|
|
407
|
+
* Passthrough states of `BbBaseButton`: `disabled` while `--disabled` is on,
|
|
408
|
+
* the link states while `activeClass` / `exactActiveClass` are. Order =
|
|
409
|
+
* precedence, last wins: `disabled` outranks the link states.
|
|
508
410
|
*
|
|
411
|
+
* @state activeLink - Component-wide: a link to the current page or one of its
|
|
412
|
+
* ancestors (`/users` on `/users/5`) — exactly when `activeClass` is on.
|
|
413
|
+
* The default slot gets it too, as `activeLink`.
|
|
414
|
+
* @state exactActiveLink - Component-wide: a link to the current page itself —
|
|
415
|
+
* exactly when `exactActiveClass` is on (`activeLink` is on too). The default
|
|
416
|
+
* slot gets it as `exactActiveLink`.
|
|
509
417
|
* @state disabled - Component-wide: the button is `disabled`.
|
|
510
418
|
*/
|
|
511
|
-
export type BbBaseButtonPtState = 'disabled';
|
|
419
|
+
export type BbBaseButtonPtState = 'activeLink' | 'exactActiveLink' | 'disabled';
|
|
512
420
|
/** The runtime lists the resolver is wired with — kept next to the types so the two cannot drift. */
|
|
513
421
|
export const BB_BASE_BUTTON_PT = {
|
|
514
422
|
parts: ['root'],
|
|
515
|
-
states: ['disabled'],
|
|
423
|
+
states: ['activeLink', 'exactActiveLink', 'disabled'],
|
|
516
424
|
} as const satisfies {
|
|
517
425
|
parts: readonly BbBaseButtonPtPart[];
|
|
518
426
|
states: readonly BbBaseButtonPtState[];
|
|
@@ -790,11 +698,23 @@ export type BbBaseButtonProps = {
|
|
|
790
698
|
viewTransition?: boolean;
|
|
791
699
|
};
|
|
792
700
|
|
|
701
|
+
/**
|
|
702
|
+
* The default slot's props: whether the link points at the current page, the
|
|
703
|
+
* same facts as its `activeClass` / `exactActiveClass` and its
|
|
704
|
+
* `activeLink` / `exactActiveLink` `pt` states. Always `false` on a button.
|
|
705
|
+
*/
|
|
706
|
+
export type BbLinkSlotProps = {
|
|
707
|
+
/** A link to the current page or one of its ancestors: `activeClass` is on. */
|
|
708
|
+
activeLink: boolean;
|
|
709
|
+
/** A link to the current page itself: `exactActiveClass` is on. */
|
|
710
|
+
exactActiveLink: boolean;
|
|
711
|
+
};
|
|
712
|
+
|
|
793
713
|
export type BbBaseButtonSlots = {
|
|
794
714
|
/**
|
|
795
715
|
* Primary content rendered inside the button element. Falls back to the `text` prop when empty.
|
|
796
716
|
*/
|
|
797
|
-
default?: (props:
|
|
717
|
+
default?: (props: BbLinkSlotProps) => any;
|
|
798
718
|
};
|
|
799
719
|
|
|
800
720
|
/**
|
|
@@ -809,6 +729,8 @@ const baseButtonPropMap: Record<keyof BbBaseButtonProps, true> = {
|
|
|
809
729
|
// (and therefore in `BB_BASE_BUTTON_PROP_KEYS`) like every other prop.
|
|
810
730
|
pt: true,
|
|
811
731
|
'pt:root': true,
|
|
732
|
+
'pt:root:activeLink': true,
|
|
733
|
+
'pt:root:exactActiveLink': true,
|
|
812
734
|
'pt:root:disabled': true,
|
|
813
735
|
activeClass: true,
|
|
814
736
|
async: true,
|
|
@@ -319,4 +319,42 @@ export type BbBaseCheckboxIconProps = {
|
|
|
319
319
|
cursor: not-allowed;
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
+
|
|
323
|
+
/* Forced colors (ATT-11 c): the theme's plate and accent mean nothing in a
|
|
324
|
+
high-contrast theme, and an SVG glyph is not repainted by the browser, so
|
|
325
|
+
the box is drawn in system colours, which forced colors keep: the checked
|
|
326
|
+
fill is `Highlight`, a disabled box `GrayText`. The focus ring is not
|
|
327
|
+
restyled here. */
|
|
328
|
+
@media (forced-colors: active) {
|
|
329
|
+
.bb-base-checkbox-icon {
|
|
330
|
+
--accent: Highlight;
|
|
331
|
+
--bg: Canvas;
|
|
332
|
+
--border-color: CanvasText;
|
|
333
|
+
--check-color: HighlightText;
|
|
334
|
+
|
|
335
|
+
color: Highlight;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.bb-base-checkbox-icon--checked,
|
|
339
|
+
.bb-base-checkbox-icon--indeterminate {
|
|
340
|
+
--bg: currentColor;
|
|
341
|
+
--border-color: currentColor;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.bb-base-checkbox-icon.bb-base-checkbox-icon--disabled {
|
|
345
|
+
--accent: GrayText;
|
|
346
|
+
--bg: Canvas;
|
|
347
|
+
--border-color: GrayText;
|
|
348
|
+
--check-color: Canvas;
|
|
349
|
+
|
|
350
|
+
color: GrayText;
|
|
351
|
+
|
|
352
|
+
&:is(
|
|
353
|
+
.bb-base-checkbox-icon--checked,
|
|
354
|
+
.bb-base-checkbox-icon--indeterminate
|
|
355
|
+
) {
|
|
356
|
+
--bg: GrayText;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
322
360
|
```
|
|
@@ -265,4 +265,22 @@ export type BbBaseRadioIconProps = {
|
|
|
265
265
|
cursor: not-allowed;
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
|
+
|
|
269
|
+
/* Forced colors (ATT-11 c): the browser repaints the dot `Canvas`, so a
|
|
270
|
+
checked radio looked unchecked. The dot is drawn in a system colour, which
|
|
271
|
+
forced colors keep: `Highlight`, or `GrayText` with a `GrayText` ring when
|
|
272
|
+
disabled. The focus ring is not restyled here. */
|
|
273
|
+
@media (forced-colors: active) {
|
|
274
|
+
.bb-base-radio-icon::after {
|
|
275
|
+
background-color: Highlight;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.bb-base-radio-icon.bb-base-radio-icon--disabled {
|
|
279
|
+
border-color: GrayText;
|
|
280
|
+
|
|
281
|
+
&::after {
|
|
282
|
+
background-color: GrayText;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
268
286
|
```
|
|
@@ -320,4 +320,55 @@ export type BbBaseSwitchIconProps = {
|
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
|
+
|
|
324
|
+
/* Forced colors (ATT-11 c): the browser repaints the track and the thumb
|
|
325
|
+
`Canvas`, so the thumb vanished and on / off read alike. Both are drawn in
|
|
326
|
+
system colours, which forced colors keep: an on track is `Highlight` with a
|
|
327
|
+
`HighlightText` thumb, an off track keeps the browser's frame around a
|
|
328
|
+
`CanvasText` thumb, a disabled switch is `GrayText`. The focus ring is not
|
|
329
|
+
restyled here. */
|
|
330
|
+
@media (forced-colors: active) {
|
|
331
|
+
.bb-base-switch-icon {
|
|
332
|
+
--accent: Highlight;
|
|
333
|
+
|
|
334
|
+
/* The frame follows `color`: keep it the text colour. */
|
|
335
|
+
color: CanvasText;
|
|
336
|
+
|
|
337
|
+
&:is(.bb-base-switch-icon--checked, .bb-base-switch-icon--indeterminate) {
|
|
338
|
+
background-color: var(--accent);
|
|
339
|
+
border-color: var(--accent);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.bb-base-switch-icon .bb-base-switch-icon__thumb {
|
|
344
|
+
background-color: CanvasText;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.bb-base-switch-icon:is(
|
|
348
|
+
.bb-base-switch-icon--checked,
|
|
349
|
+
.bb-base-switch-icon--indeterminate
|
|
350
|
+
)
|
|
351
|
+
.bb-base-switch-icon__thumb {
|
|
352
|
+
background-color: HighlightText;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.bb-base-switch-icon.bb-base-switch-icon--disabled {
|
|
356
|
+
--accent: GrayText;
|
|
357
|
+
|
|
358
|
+
border-color: GrayText;
|
|
359
|
+
|
|
360
|
+
&:not(.bb-base-switch-icon--checked, .bb-base-switch-icon--indeterminate) {
|
|
361
|
+
background-color: Canvas;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.bb-base-switch-icon__thumb {
|
|
365
|
+
background-color: GrayText;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
&:is(.bb-base-switch-icon--checked, .bb-base-switch-icon--indeterminate)
|
|
369
|
+
.bb-base-switch-icon__thumb {
|
|
370
|
+
background-color: Canvas;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
323
374
|
```
|