bitboss-ui 3.0.0-beta.63 → 3.0.0-beta.65
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 +494 -6
- package/dist/ai/components.json +50 -48
- package/dist/ai/composables/useBbConfig.md +8 -1
- 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 +1183 -301
- 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 +211 -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 +149 -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 +151 -62
- package/dist/ai/helpers/inertia/messages.ts +33 -0
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +120 -20
- package/dist/ai/helpers/inertia/useHasChanged.ts +34 -16
- package/dist/ai/helpers/inertia/useLazyProp.ts +102 -36
- package/dist/ai/helpers/inertia/useLazyPropGetter.ts +3 -1
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +154 -34
- package/dist/ai/helpers/inertia/usePromiseForm.ts +121 -14
- package/dist/ai/helpers/inertia/useQuery.ts +133 -11
- package/dist/ai/helpers/inertia/useQueryObject.ts +74 -67
- package/dist/ai/helpers/inertia/useResourceContext.ts +60 -14
- package/dist/ai/helpers/inertia/useRouteQuery.ts +38 -27
- package/dist/ai/helpers/inertia/useScreenSizes.ts +9 -7
- package/dist/ai/helpers/inertia/useTableContext.ts +5 -2
- package/dist/ai/helpers/inertia/utils.ts +14 -0
- 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/approvals-inbox.md +1 -1
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/layout-scaffold.md +19 -6
- package/dist/ai/recipes/inertia/ownership-atlas.md +1 -1
- package/dist/ai/recipes/inertia/records-workspace.md +50 -14
- package/dist/ai/recipes/inertia/upload-center.md +1 -1
- 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 +153 -34
- 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 +600 -577
- 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/useBbConfig.d.ts +1 -0
- package/dist/composables/useBbConfig.js +11 -7
- 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 +3467 -801
- 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 +5 -4
- 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/helpers-add.mjs +26 -2
- 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
|
@@ -1,45 +1,79 @@
|
|
|
1
1
|
import { useLogger as e } from "../../composables/useLogger.js";
|
|
2
|
-
import { usePassthrough as t } from "../../composables/usePassthrough.js";
|
|
3
|
-
import { useUntil as
|
|
4
|
-
import { removedPropsFor as
|
|
5
|
-
import { warnRemovedAttrs as
|
|
6
|
-
import {
|
|
7
|
-
import { BB_FORM_SUBMIT_LOCK as
|
|
8
|
-
import { useLocale as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
2
|
+
import { usePassthrough as t, variantPt as n } from "../../composables/usePassthrough.js";
|
|
3
|
+
import { useUntil as r } from "../../composables/useUntil.js";
|
|
4
|
+
import { removedPropsFor as i } from "../../deprecation/removedProps.js";
|
|
5
|
+
import { warnRemovedAttrs as ee } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
6
|
+
import { extractHtmlContainer as a } from "../../utilities/functions/extractDomContainer.js";
|
|
7
|
+
import { BB_FORM_SUBMIT_LOCK as o } from "../../composables/formSubmitLock.js";
|
|
8
|
+
import { useLocale as s } from "../../composables/useLocale.js";
|
|
9
|
+
import c from "../BbIcon/BbIcon.vue.js";
|
|
10
|
+
import te from "../BbSpinner/BbSpinner.vue.js";
|
|
11
|
+
import { provideLinkState as ne, useLinkState as re } from "../BbBaseButton/useLinkState.js";
|
|
11
12
|
import l from "../BbBaseButton/BbBaseButton.vue.js";
|
|
12
|
-
import { useBbFormSavingById as
|
|
13
|
-
import { pickBy as
|
|
14
|
-
import { noop as
|
|
15
|
-
import { isEqual as
|
|
16
|
-
import { BB_BUTTON_PT as
|
|
17
|
-
import { useToggleRoving as
|
|
18
|
-
import { Transition as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as
|
|
13
|
+
import { useBbFormSavingById as ie } from "../../composables/useBbFormContext.js";
|
|
14
|
+
import { pickBy as u } from "../../utilities/functions/pickBy.js";
|
|
15
|
+
import { noop as d } from "../../utilities/functions/noop.js";
|
|
16
|
+
import { isEqual as f } from "../../utilities/functions/isEqual.js";
|
|
17
|
+
import { BB_BUTTON_PT as p } from "./types.js";
|
|
18
|
+
import { useToggleRoving as m } from "./toggleRoving.js";
|
|
19
|
+
import { Fragment as h, Transition as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as ae, createTextVNode as oe, defineComponent as x, guardReactiveProps as S, inject as se, mergeModels as C, mergeProps as w, normalizeProps as T, openBlock as E, ref as D, renderSlot as O, toDisplayString as k, unref as A, useAttrs as j, useModel as ce, useSlots as le, watchEffect as M, withCtx as N } from "vue";
|
|
19
20
|
//#region src/components/BbButton/BbButton.vue?vue&type=script&setup=true&lang.ts
|
|
20
|
-
var
|
|
21
|
-
key:
|
|
21
|
+
var P = {
|
|
22
|
+
key: 5,
|
|
22
23
|
class: "bb-button__loading-label bb-sr-only"
|
|
23
|
-
},
|
|
24
|
+
}, F = /*@__PURE__*/ x({
|
|
25
|
+
mixins: [n(p)],
|
|
24
26
|
inheritAttrs: !1,
|
|
25
27
|
__name: "BbButton",
|
|
26
|
-
props: /*@__PURE__*/
|
|
28
|
+
props: /*@__PURE__*/ C({
|
|
27
29
|
"pt:root": {},
|
|
28
30
|
"pt:icon": {},
|
|
29
31
|
"pt:spinner": {},
|
|
30
32
|
"pt:text": {},
|
|
33
|
+
"pt:root:activeLink": {},
|
|
34
|
+
"pt:root:exactActiveLink": {},
|
|
31
35
|
"pt:root:loading": {},
|
|
32
36
|
"pt:root:disabled": {},
|
|
33
37
|
"pt:root:pressed": {},
|
|
38
|
+
"pt:icon:activeLink": {},
|
|
39
|
+
"pt:icon:exactActiveLink": {},
|
|
34
40
|
"pt:icon:loading": {},
|
|
35
41
|
"pt:icon:disabled": {},
|
|
36
42
|
"pt:icon:pressed": {},
|
|
43
|
+
"pt:spinner:activeLink": {},
|
|
44
|
+
"pt:spinner:exactActiveLink": {},
|
|
37
45
|
"pt:spinner:loading": {},
|
|
38
46
|
"pt:spinner:disabled": {},
|
|
39
47
|
"pt:spinner:pressed": {},
|
|
48
|
+
"pt:text:activeLink": {},
|
|
49
|
+
"pt:text:exactActiveLink": {},
|
|
40
50
|
"pt:text:loading": {},
|
|
41
51
|
"pt:text:disabled": {},
|
|
42
52
|
"pt:text:pressed": {},
|
|
53
|
+
"pt:root:primary": {},
|
|
54
|
+
"pt:root:outline": {},
|
|
55
|
+
"pt:root:secondary": {},
|
|
56
|
+
"pt:root:ghost": {},
|
|
57
|
+
"pt:root:destructive": {},
|
|
58
|
+
"pt:root:link": {},
|
|
59
|
+
"pt:icon:primary": {},
|
|
60
|
+
"pt:icon:outline": {},
|
|
61
|
+
"pt:icon:secondary": {},
|
|
62
|
+
"pt:icon:ghost": {},
|
|
63
|
+
"pt:icon:destructive": {},
|
|
64
|
+
"pt:icon:link": {},
|
|
65
|
+
"pt:spinner:primary": {},
|
|
66
|
+
"pt:spinner:outline": {},
|
|
67
|
+
"pt:spinner:secondary": {},
|
|
68
|
+
"pt:spinner:ghost": {},
|
|
69
|
+
"pt:spinner:destructive": {},
|
|
70
|
+
"pt:spinner:link": {},
|
|
71
|
+
"pt:text:primary": {},
|
|
72
|
+
"pt:text:outline": {},
|
|
73
|
+
"pt:text:secondary": {},
|
|
74
|
+
"pt:text:ghost": {},
|
|
75
|
+
"pt:text:destructive": {},
|
|
76
|
+
"pt:text:link": {},
|
|
43
77
|
pt: {},
|
|
44
78
|
disableAutoLoading: { type: Boolean },
|
|
45
79
|
activeClass: {},
|
|
@@ -106,43 +140,56 @@ var N = {
|
|
|
106
140
|
modelModifiers: {}
|
|
107
141
|
}),
|
|
108
142
|
emits: ["update:modelValue"],
|
|
109
|
-
setup(
|
|
110
|
-
let
|
|
111
|
-
process.env.NODE_ENV !== "production" &&
|
|
112
|
-
let
|
|
143
|
+
setup(n, { expose: x }) {
|
|
144
|
+
let C = ce(n, "modelValue"), F = n, I = le();
|
|
145
|
+
process.env.NODE_ENV !== "production" && ee("BbButton", i("BbButton"));
|
|
146
|
+
let L = [
|
|
113
147
|
"xs",
|
|
114
148
|
"sm",
|
|
115
149
|
"md",
|
|
116
150
|
"lg",
|
|
117
151
|
"xl",
|
|
118
152
|
"2xl"
|
|
119
|
-
],
|
|
120
|
-
process.env.NODE_ENV !== "production" &&
|
|
121
|
-
|
|
153
|
+
], R = e(), z = _(() => C.value !== void 0), B = _(() => f(C.value, F.trueValue)), { t: V } = s(), H = j(), U = D();
|
|
154
|
+
process.env.NODE_ENV !== "production" && M(() => {
|
|
155
|
+
z.value || "aria-pressed" in H && R.warn("BbButton: `aria-pressed` is managed by the component and your binding is ignored. Bind `v-model` (with `true-value`/`false-value` when the state is not boolean) — that sets `aria-pressed`, applies `bb-button--pressed`, and flips the value on click.");
|
|
122
156
|
});
|
|
123
|
-
let
|
|
124
|
-
|
|
125
|
-
},
|
|
126
|
-
let { onClick: e, class: t, ...n } =
|
|
157
|
+
let W = (e) => {
|
|
158
|
+
U.value = a(e) ?? void 0;
|
|
159
|
+
}, ue = _(() => {
|
|
160
|
+
let { onClick: e, class: t, ...n } = H;
|
|
127
161
|
return n;
|
|
128
|
-
}), G =
|
|
162
|
+
}), G = D(0), de = se(o, null), K = () => F.type === "submit" && H.form != null ? String(H.form) : void 0, fe = ie(K), pe = () => F.type === "submit" && (K() ? fe(U.value) : !!de?.savingFor(U.value)), q = _(() => F.loading || !F.disableAutoLoading && (!!G.value || pe())), me = r(q), J = re(F);
|
|
163
|
+
ne(J);
|
|
164
|
+
let Y = _(() => !!F.icon || !!I.icon), X = _(() => ({
|
|
165
|
+
...J.value,
|
|
166
|
+
pressed: z.value && B.value,
|
|
167
|
+
loading: q.value,
|
|
168
|
+
disabled: !!F.disabled
|
|
169
|
+
})), Z = t({
|
|
129
170
|
component: "BbButton",
|
|
130
|
-
attrs:
|
|
171
|
+
attrs: H,
|
|
131
172
|
props: F,
|
|
132
|
-
parts:
|
|
133
|
-
states:
|
|
173
|
+
parts: p.parts,
|
|
174
|
+
states: p.states,
|
|
134
175
|
active: {
|
|
135
|
-
loading: () =>
|
|
176
|
+
loading: () => q.value,
|
|
136
177
|
disabled: () => !!F.disabled,
|
|
137
|
-
pressed: () =>
|
|
178
|
+
pressed: () => z.value && B.value,
|
|
179
|
+
activeLink: () => J.value.activeLink,
|
|
180
|
+
exactActiveLink: () => J.value.exactActiveLink
|
|
181
|
+
},
|
|
182
|
+
variant: {
|
|
183
|
+
...p.variant,
|
|
184
|
+
current: () => F.variant
|
|
138
185
|
}
|
|
139
|
-
}),
|
|
140
|
-
if (
|
|
141
|
-
if (
|
|
186
|
+
}), he = async (e) => {
|
|
187
|
+
if (q.value && !F.interactiveWhileLoading) return (F.type === "submit" || F.href || F.to) && e.preventDefault(), null;
|
|
188
|
+
if (z.value) {
|
|
142
189
|
let e = F.trueValue, t = F.falseValue;
|
|
143
|
-
|
|
190
|
+
C.value = f(C.value, e) ? t : e;
|
|
144
191
|
}
|
|
145
|
-
let t = [
|
|
192
|
+
let t = [H.onClick ?? d].flat(), n = t.map((t) => t(e)), r = n.filter((e) => e && typeof e.then == "function");
|
|
146
193
|
if (!r.length) return n[0];
|
|
147
194
|
let i = t.length === 1 ? n[0] : Promise.all(r).then(() => {});
|
|
148
195
|
G.value++;
|
|
@@ -151,16 +198,16 @@ var N = {
|
|
|
151
198
|
} finally {
|
|
152
199
|
G.value--;
|
|
153
200
|
}
|
|
154
|
-
},
|
|
201
|
+
}, ge = _(() => {
|
|
155
202
|
let e = typeof F.size == "string" ? { default: F.size } : {
|
|
156
203
|
default: "md",
|
|
157
204
|
...F.size
|
|
158
205
|
};
|
|
159
206
|
return Object.fromEntries(Object.entries(e).map(([e, t]) => {
|
|
160
207
|
let n = t;
|
|
161
|
-
return
|
|
208
|
+
return L.includes(t) || (R.warn(`Invalid size: "${t}" in BbButton. Expected one of: ${L.join(", ")}. Falling back to "md".`), n = "md"), [e === "default" ? `bb-button--${n}` : `bb-button--${e}-${n}`, !0];
|
|
162
209
|
}));
|
|
163
|
-
}),
|
|
210
|
+
}), _e = /* @__PURE__ */ new Set([
|
|
164
211
|
"append:icon",
|
|
165
212
|
"disableAutoLoading",
|
|
166
213
|
"disabled",
|
|
@@ -174,72 +221,81 @@ var N = {
|
|
|
174
221
|
"size",
|
|
175
222
|
"trueValue",
|
|
176
223
|
"variant"
|
|
177
|
-
]),
|
|
178
|
-
...
|
|
179
|
-
...
|
|
180
|
-
})), Q = _(() =>
|
|
181
|
-
|
|
224
|
+
]), ve = _(() => ({
|
|
225
|
+
...ue.value,
|
|
226
|
+
...u(F, (e, t) => !_e.has(t) && t !== "pt" && !t.startsWith("pt:"))
|
|
227
|
+
})), Q = _(() => q.value && !F.interactiveWhileLoading), $ = m(U, _(() => !!F.group && z.value && !("tabindex" in H)), () => [
|
|
228
|
+
B.value,
|
|
182
229
|
F.disabled,
|
|
183
230
|
Q.value
|
|
184
|
-
]),
|
|
231
|
+
]), ye = _(() => {
|
|
185
232
|
let e = Q.value ? -1 : $.tabindex.value;
|
|
186
233
|
return {
|
|
187
234
|
...Q.value ? { "aria-disabled": !0 } : {},
|
|
188
235
|
...e === void 0 ? {} : { tabindex: e }
|
|
189
236
|
};
|
|
190
|
-
}),
|
|
191
|
-
...
|
|
192
|
-
"aria-pressed":
|
|
237
|
+
}), be = _(() => w(ve.value, {
|
|
238
|
+
...ye.value,
|
|
239
|
+
"aria-pressed": z.value ? B.value : void 0,
|
|
193
240
|
class: [
|
|
194
241
|
"bb-button",
|
|
195
|
-
|
|
242
|
+
ge.value,
|
|
196
243
|
{
|
|
197
|
-
"bb-button--loading":
|
|
244
|
+
"bb-button--loading": q.value,
|
|
198
245
|
"bb-button--soft-disabled": Q.value,
|
|
199
246
|
"bb-button--group": F.group,
|
|
200
|
-
"bb-button--icon":
|
|
201
|
-
"bb-button--pressed":
|
|
247
|
+
"bb-button--icon": Y.value,
|
|
248
|
+
"bb-button--pressed": z.value && B.value,
|
|
202
249
|
[`bb-button--${F.variant}`]: F.variant !== "none"
|
|
203
250
|
}
|
|
204
251
|
],
|
|
205
252
|
disabled: F.disabled,
|
|
206
|
-
onClick:
|
|
253
|
+
onClick: he,
|
|
207
254
|
onFocusin: $.onFocusin,
|
|
208
255
|
onKeydown: $.onKeydown
|
|
209
256
|
}, Z.root));
|
|
210
|
-
return
|
|
211
|
-
default:
|
|
212
|
-
|
|
257
|
+
return x({ $el: U }), (e, t) => (E(), v(A(l), w({ ref: W }, be.value), {
|
|
258
|
+
default: N(() => [
|
|
259
|
+
A(me) ? (E(), v(g, {
|
|
213
260
|
key: 0,
|
|
214
261
|
appear: "",
|
|
215
262
|
name: "bb-button-spinner"
|
|
216
263
|
}, {
|
|
217
|
-
default:
|
|
264
|
+
default: N(() => [q.value ? (E(), v(A(te), w({
|
|
218
265
|
key: 0,
|
|
219
266
|
class: "bb-button__spinner"
|
|
220
|
-
},
|
|
267
|
+
}, A(Z).spinner), null, 16)) : y("", !0)]),
|
|
221
268
|
_: 1
|
|
222
269
|
})) : y("", !0),
|
|
223
|
-
|
|
270
|
+
I.icon ? (E(), b("span", w({
|
|
224
271
|
key: 1,
|
|
272
|
+
class: "bb-button__icon bb-button__icon-slot"
|
|
273
|
+
}, A(Z).icon), [O(e.$slots, "icon", T(S(X.value)))], 16)) : F.icon ? (E(), v(c, w({
|
|
274
|
+
key: 2,
|
|
225
275
|
class: "bb-button__icon",
|
|
226
276
|
icon: F.icon
|
|
227
|
-
},
|
|
228
|
-
key:
|
|
277
|
+
}, A(Z).icon), null, 16, ["icon"])) : I["prepend:icon"] ? (E(), b("span", w({
|
|
278
|
+
key: 3,
|
|
279
|
+
class: "bb-button__prepend-icon bb-button__icon-slot"
|
|
280
|
+
}, A(Z).icon), [O(e.$slots, "prepend:icon", T(S(X.value)))], 16)) : F["prepend:icon"] ? (E(), v(c, w({
|
|
281
|
+
key: 4,
|
|
229
282
|
class: "bb-button__prepend-icon",
|
|
230
283
|
icon: F["prepend:icon"]
|
|
231
|
-
},
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
key:
|
|
284
|
+
}, A(Z).icon), null, 16, ["icon"])) : y("", !0),
|
|
285
|
+
ae("span", w({ class: ["bb-button__text", { "bb-sr-only": Y.value }] }, A(Z).text), [O(e.$slots, "default", T(S(A(J))), () => [oe(k(e.text), 1)])], 16),
|
|
286
|
+
q.value ? (E(), b("span", P, k(A(V)("common.loadingText")), 1)) : y("", !0),
|
|
287
|
+
Y.value ? y("", !0) : (E(), b(h, { key: 6 }, [I["append:icon"] ? (E(), b("span", w({
|
|
288
|
+
key: 0,
|
|
289
|
+
class: "bb-button__append-icon bb-button__icon-slot"
|
|
290
|
+
}, A(Z).icon), [O(e.$slots, "append:icon", T(S(X.value)))], 16)) : F["append:icon"] ? (E(), v(c, w({
|
|
291
|
+
key: 1,
|
|
236
292
|
class: "bb-button__append-icon",
|
|
237
293
|
icon: F["append:icon"]
|
|
238
|
-
},
|
|
294
|
+
}, A(Z).icon), null, 16, ["icon"])) : y("", !0)], 64))
|
|
239
295
|
]),
|
|
240
296
|
_: 3
|
|
241
297
|
}, 16));
|
|
242
298
|
}
|
|
243
299
|
});
|
|
244
300
|
//#endregion
|
|
245
|
-
export {
|
|
301
|
+
export { F as default };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { RouteLocationRaw } from 'vue-router';
|
|
2
2
|
import { ButtonTag } from '../../types/CommonProps';
|
|
3
3
|
import { IconType } from '../../types/Icon';
|
|
4
|
-
import { ButtonVariantType } from '../../types/ButtonVariant';
|
|
4
|
+
import { ButtonVariantBuiltIn, ButtonVariantRegistry, ButtonVariantType } from '../../types/ButtonVariant';
|
|
5
5
|
import { Responsive } from '../../types/ResponsiveSize';
|
|
6
|
-
import { PtMap, PtValue } from '../../types/passthrough';
|
|
6
|
+
import { PtMap, PtValue, PtVariantAttrs } from '../../types/passthrough';
|
|
7
|
+
import { BbLinkSlotProps } from '../BbBaseButton/types';
|
|
7
8
|
type Sizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
8
9
|
/**
|
|
9
10
|
* Passthrough parts of `BbButton` (plans/passthrough/BbButton.md).
|
|
@@ -26,31 +27,44 @@ type Sizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
|
26
27
|
export type BbButtonPtPart = 'root' | 'icon' | 'spinner' | 'text';
|
|
27
28
|
/**
|
|
28
29
|
* Passthrough states of `BbButton`: true while `--loading` / `--disabled` /
|
|
29
|
-
* `--pressed
|
|
30
|
-
*
|
|
31
|
-
* `
|
|
30
|
+
* `--pressed`, and for a link while `activeClass` / `exactActiveClass` are on.
|
|
31
|
+
* There is no `active` state (the pointer press is Tailwind's `active:`
|
|
32
|
+
* variant). A link to the current page is `activeLink` / `exactActiveLink`,
|
|
33
|
+
* on every part: the sidebar entry of the page you are on styles its root,
|
|
34
|
+
* icon and text from them, and the default slot gets the same two booleans.
|
|
32
35
|
*
|
|
36
|
+
* @state activeLink - Component-wide: a link to the current page or one of
|
|
37
|
+
* its ancestors (`/users` on `/users/5`) — exactly when `activeClass` is on.
|
|
38
|
+
* The weakest state: `pressed`, `disabled` and `loading` win a conflict.
|
|
39
|
+
* @state exactActiveLink - Component-wide: a link to the current page itself
|
|
40
|
+
* — exactly when `exactActiveClass` is on (`activeLink` is on too, so its
|
|
41
|
+
* entries apply first and these win).
|
|
33
42
|
* @state disabled - Component-wide: the button is `disabled`.
|
|
34
43
|
* @state loading - Component-wide: `loading` is on — the spinner shows and
|
|
35
44
|
* the button ignores the pointer.
|
|
36
45
|
* @state pressed - Component-wide: a toggle button (`v-model`) is on —
|
|
37
46
|
* `aria-pressed="true"`, `--pressed` on the root.
|
|
38
47
|
*/
|
|
39
|
-
export type BbButtonPtState = 'loading' | 'disabled' | 'pressed';
|
|
48
|
+
export type BbButtonPtState = 'activeLink' | 'exactActiveLink' | 'loading' | 'disabled' | 'pressed';
|
|
40
49
|
/** The runtime lists the resolver is wired with — kept next to the types so the two cannot drift. */
|
|
41
50
|
export declare const BB_BUTTON_PT: {
|
|
42
51
|
readonly parts: readonly ["root", "icon", "spinner", "text"];
|
|
43
|
-
readonly states: readonly ["pressed", "disabled", "loading"];
|
|
52
|
+
readonly states: readonly ["activeLink", "exactActiveLink", "pressed", "disabled", "loading"];
|
|
53
|
+
readonly variant: {
|
|
54
|
+
readonly names: readonly ["primary", "outline", "secondary", "ghost", "destructive", "link"];
|
|
55
|
+
readonly option: "buttonVariants";
|
|
56
|
+
};
|
|
44
57
|
};
|
|
45
58
|
export type BbButtonProps = {
|
|
46
|
-
[K in `pt:${BbButtonPtPart}` | `pt:${BbButtonPtPart}:${BbButtonPtState}`]?: PtValue;
|
|
47
|
-
} & {
|
|
59
|
+
[K in `pt:${BbButtonPtPart}` | `pt:${BbButtonPtPart}:${BbButtonPtState}` | `pt:${BbButtonPtPart}:${ButtonVariantBuiltIn}`]?: PtValue;
|
|
60
|
+
} & /* @vue-ignore */ PtVariantAttrs<BbButtonPtPart, keyof ButtonVariantRegistry> & {
|
|
48
61
|
/**
|
|
49
62
|
* Passthrough, object form: `{ icon: '…', 'icon:loading': '…' }` — the same
|
|
50
63
|
* keys as the `pt:*` attributes without the prefix. Parts: `root`, `icon`,
|
|
51
|
-
* `spinner`, `text`. States: `loading`, `disabled
|
|
64
|
+
* `spinner`, `text`. States: `loading`, `disabled`, `pressed`, and the
|
|
65
|
+
* registered variants (an app's own included).
|
|
52
66
|
*/
|
|
53
|
-
pt?: PtMap<BbButtonPtPart, BbButtonPtState>;
|
|
67
|
+
pt?: PtMap<BbButtonPtPart, BbButtonPtState | ButtonVariantBuiltIn | keyof ButtonVariantRegistry>;
|
|
54
68
|
} & BbButtonOwnProps;
|
|
55
69
|
/**
|
|
56
70
|
* BbButton's props without its passthrough. `BbDropdownButton` takes them for
|
|
@@ -346,10 +360,33 @@ export type BbButtonOwnProps = {
|
|
|
346
360
|
*/
|
|
347
361
|
viewTransition?: boolean;
|
|
348
362
|
};
|
|
363
|
+
/**
|
|
364
|
+
* What `#icon` / `#prepend:icon` / `#append:icon` see: the button's `pt`
|
|
365
|
+
* states, so a glyph can follow them (a filled icon on the current page's link).
|
|
366
|
+
*/
|
|
367
|
+
export type BbButtonIconSlotProps = BbLinkSlotProps & {
|
|
368
|
+
/** A toggle (`v-model`) that is on. */
|
|
369
|
+
pressed: boolean;
|
|
370
|
+
/** Loading, the automatic loading included: the spinner shows. */
|
|
371
|
+
loading: boolean;
|
|
372
|
+
/** The `disabled` prop. */
|
|
373
|
+
disabled: boolean;
|
|
374
|
+
};
|
|
349
375
|
export type BbButtonSlots = {
|
|
350
376
|
/**
|
|
351
|
-
* Primary content rendered inside the button. Falls back to the `text` prop
|
|
377
|
+
* Primary content rendered inside the button. Falls back to the `text` prop
|
|
378
|
+
* when empty. A link's slot gets `{ activeLink, exactActiveLink }`: whether it
|
|
379
|
+
* points at the current page (both `false` on a button).
|
|
380
|
+
*/
|
|
381
|
+
default?: (props: BbLinkSlotProps) => any;
|
|
382
|
+
/**
|
|
383
|
+
* The icon of an icon-only button, replacing the `icon` prop. Renders inside
|
|
384
|
+
* the `icon` part: `pt:icon`, `--icon-size` and the loading spinner apply.
|
|
352
385
|
*/
|
|
353
|
-
|
|
386
|
+
icon?: (props: BbButtonIconSlotProps) => any;
|
|
387
|
+
/** The leading icon, replacing `prepend:icon`; inside the `icon` part. */
|
|
388
|
+
'prepend:icon'?: (props: BbButtonIconSlotProps) => any;
|
|
389
|
+
/** The trailing icon, replacing `append:icon`; inside the `icon` part. */
|
|
390
|
+
'append:icon'?: (props: BbButtonIconSlotProps) => any;
|
|
354
391
|
};
|
|
355
392
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { BUTTON_VARIANTS as e } from "../../types/ButtonVariant.js";
|
|
1
2
|
//#region src/components/BbButton/types.ts
|
|
2
|
-
var
|
|
3
|
+
var t = {
|
|
3
4
|
parts: [
|
|
4
5
|
"root",
|
|
5
6
|
"icon",
|
|
@@ -7,10 +8,16 @@ var e = {
|
|
|
7
8
|
"text"
|
|
8
9
|
],
|
|
9
10
|
states: [
|
|
11
|
+
"activeLink",
|
|
12
|
+
"exactActiveLink",
|
|
10
13
|
"pressed",
|
|
11
14
|
"disabled",
|
|
12
15
|
"loading"
|
|
13
|
-
]
|
|
16
|
+
],
|
|
17
|
+
variant: {
|
|
18
|
+
names: e,
|
|
19
|
+
option: "buttonVariants"
|
|
20
|
+
}
|
|
14
21
|
};
|
|
15
22
|
//#endregion
|
|
16
|
-
export {
|
|
23
|
+
export { t as BB_BUTTON_PT };
|