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
|
@@ -1,23 +1,44 @@
|
|
|
1
|
-
import { usePassthrough as e } from "../../composables/usePassthrough.js";
|
|
2
|
-
import { useConfig as
|
|
3
|
-
import { removedPropsFor as
|
|
4
|
-
import { warnRemovedAttrs as
|
|
5
|
-
import { transitions as
|
|
6
|
-
import { useLocale as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { BB_ALERT_PT as
|
|
10
|
-
import { Transition as
|
|
1
|
+
import { usePassthrough as e, variantPt as t } from "../../composables/usePassthrough.js";
|
|
2
|
+
import { useConfig as n } from "../../composables/useConfig.js";
|
|
3
|
+
import { removedPropsFor as r } from "../../deprecation/removedProps.js";
|
|
4
|
+
import { warnRemovedAttrs as i } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
5
|
+
import { transitions as a } from "../../utilities/misc/transitions.js";
|
|
6
|
+
import { useLocale as o } from "../../composables/useLocale.js";
|
|
7
|
+
import s from "../BbIcon/BbIcon.vue.js";
|
|
8
|
+
import c from "../ClearableButton/ClearableButton.vue.js";
|
|
9
|
+
import { BB_ALERT_PT as l } from "./types.js";
|
|
10
|
+
import { Transition as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, defineComponent as _, guardReactiveProps as v, mergeModels as y, mergeProps as b, normalizeProps as x, openBlock as S, renderSlot as C, toDisplayString as w, unref as T, useAttrs as E, useModel as D, withCtx as O } from "vue";
|
|
11
11
|
//#region src/components/BbAlert/BbAlert.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var
|
|
12
|
+
var k = ["aria-live", "role"], A = { class: "bb-alert__inner-container" }, j = { class: "bb-alert__icon-container" }, M = { class: "bb-alert__content" }, N = /*@__PURE__*/ _({
|
|
13
|
+
mixins: [t(l)],
|
|
13
14
|
inheritAttrs: !1,
|
|
14
15
|
__name: "BbAlert",
|
|
15
|
-
props: /*@__PURE__*/
|
|
16
|
+
props: /*@__PURE__*/ y({
|
|
16
17
|
"pt:root": {},
|
|
17
18
|
"pt:icon": {},
|
|
18
19
|
"pt:title": {},
|
|
19
20
|
"pt:text": {},
|
|
20
21
|
"pt:close": {},
|
|
22
|
+
"pt:root:outline": {},
|
|
23
|
+
"pt:root:primary": {},
|
|
24
|
+
"pt:root:destructive": {},
|
|
25
|
+
"pt:root:warning": {},
|
|
26
|
+
"pt:icon:outline": {},
|
|
27
|
+
"pt:icon:primary": {},
|
|
28
|
+
"pt:icon:destructive": {},
|
|
29
|
+
"pt:icon:warning": {},
|
|
30
|
+
"pt:title:outline": {},
|
|
31
|
+
"pt:title:primary": {},
|
|
32
|
+
"pt:title:destructive": {},
|
|
33
|
+
"pt:title:warning": {},
|
|
34
|
+
"pt:text:outline": {},
|
|
35
|
+
"pt:text:primary": {},
|
|
36
|
+
"pt:text:destructive": {},
|
|
37
|
+
"pt:text:warning": {},
|
|
38
|
+
"pt:close:outline": {},
|
|
39
|
+
"pt:close:primary": {},
|
|
40
|
+
"pt:close:destructive": {},
|
|
41
|
+
"pt:close:warning": {},
|
|
21
42
|
pt: {},
|
|
22
43
|
closeLabel: {},
|
|
23
44
|
hideClose: { type: Boolean },
|
|
@@ -26,7 +47,7 @@ var O = ["aria-live", "role"], k = { class: "bb-alert__inner-container" }, A = {
|
|
|
26
47
|
variant: { default: "outline" },
|
|
27
48
|
role: {},
|
|
28
49
|
ariaLive: {},
|
|
29
|
-
transitionDuration: { default:
|
|
50
|
+
transitionDuration: { default: a.medium },
|
|
30
51
|
icon: {},
|
|
31
52
|
hideIcon: { type: Boolean },
|
|
32
53
|
iconSize: { default: "16" },
|
|
@@ -39,45 +60,49 @@ var O = ["aria-live", "role"], k = { class: "bb-alert__inner-container" }, A = {
|
|
|
39
60
|
modelModifiers: {}
|
|
40
61
|
}),
|
|
41
62
|
emits: ["update:modelValue"],
|
|
42
|
-
setup(
|
|
43
|
-
let
|
|
63
|
+
setup(t) {
|
|
64
|
+
let a = D(t, "modelValue"), _ = t, y = e({
|
|
44
65
|
component: "BbAlert",
|
|
45
|
-
attrs:
|
|
46
|
-
props:
|
|
47
|
-
parts:
|
|
48
|
-
states:
|
|
49
|
-
active: {}
|
|
66
|
+
attrs: E(),
|
|
67
|
+
props: _,
|
|
68
|
+
parts: l.parts,
|
|
69
|
+
states: l.states,
|
|
70
|
+
active: {},
|
|
71
|
+
variant: {
|
|
72
|
+
...l.variant,
|
|
73
|
+
current: () => _.variant
|
|
74
|
+
}
|
|
50
75
|
});
|
|
51
|
-
process.env.NODE_ENV !== "production" &&
|
|
52
|
-
let { t: N } =
|
|
53
|
-
|
|
76
|
+
process.env.NODE_ENV !== "production" && i("BbAlert", r("BbAlert"));
|
|
77
|
+
let { t: N } = o(), P = n(), F = d(() => _.hideIcon ? void 0 : _.icon ?? P.variantIcons?.alert?.[_.variant]), I = d(() => _.variant === "destructive" || _.variant === "warning"), L = d(() => _.role ?? (I.value ? "alert" : "status")), R = d(() => _.ariaLive ? _.ariaLive : _.role ? _.role === "alert" ? "assertive" : "polite" : I.value ? "assertive" : "polite"), z = () => {
|
|
78
|
+
a.value = !1;
|
|
54
79
|
};
|
|
55
|
-
return (e, t) => (
|
|
56
|
-
default:
|
|
80
|
+
return (e, t) => (S(), f(u, { name: "bb-alert-transition" }, {
|
|
81
|
+
default: O(() => [a.value ? (S(), m("div", b({
|
|
57
82
|
key: 0,
|
|
58
83
|
"aria-atomic": "true",
|
|
59
84
|
"aria-live": R.value,
|
|
60
|
-
class: ["bb-alert", `bb-alert--${
|
|
85
|
+
class: ["bb-alert", `bb-alert--${_.variant}`],
|
|
61
86
|
role: L.value,
|
|
62
|
-
style: { "--transition-duration": `${
|
|
63
|
-
},
|
|
87
|
+
style: { "--transition-duration": `${_.transitionDuration}ms` }
|
|
88
|
+
}, T(y).rootAttrs), [h("div", A, [h("div", j, [F.value ? (S(), f(s, b({
|
|
64
89
|
key: 0,
|
|
65
90
|
class: "bb-alert__icon",
|
|
66
91
|
icon: F.value,
|
|
67
92
|
size: e.iconSize
|
|
68
|
-
},
|
|
69
|
-
e.hideClose ?
|
|
93
|
+
}, T(y).icon), null, 16, ["icon", "size"])) : p("", !0)]), h("div", M, [
|
|
94
|
+
e.hideClose ? p("", !0) : (S(), f(c, b({
|
|
70
95
|
key: 0,
|
|
71
96
|
class: "bb-alert__close",
|
|
72
|
-
label: e.closeLabel ||
|
|
97
|
+
label: e.closeLabel || T(N)("common.closeLabel").value,
|
|
73
98
|
onClick: z
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
])])], 16,
|
|
99
|
+
}, T(y).close), null, 16, ["label"])),
|
|
100
|
+
h("div", b({ class: "bb-alert__title" }, T(y).title), [C(e.$slots, "title", x(v({ text: e.title })), () => [g(w(e.title), 1)])], 16),
|
|
101
|
+
h("div", b({ class: "bb-alert__text" }, T(y).text), [C(e.$slots, "text", x(v({ text: e.text })), () => [C(e.$slots, "default", {}, () => [g(w(e.text), 1)])])], 16)
|
|
102
|
+
])])], 16, k)) : p("", !0)]),
|
|
78
103
|
_: 3
|
|
79
104
|
}));
|
|
80
105
|
}
|
|
81
106
|
});
|
|
82
107
|
//#endregion
|
|
83
|
-
export {
|
|
108
|
+
export { N as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AlertVariantType } from '../../types/AlertVariant';
|
|
2
|
-
import { PtMap, PtValue } from '../../types/passthrough';
|
|
1
|
+
import { AlertVariantBuiltIn, AlertVariantRegistry, AlertVariantType } from '../../types/AlertVariant';
|
|
2
|
+
import { PtMap, PtValue, PtVariantAttrs } from '../../types/passthrough';
|
|
3
3
|
import { IconType } from '../../types/Icon';
|
|
4
4
|
import { BbIconProps } from '../BbIcon/types';
|
|
5
5
|
/**
|
|
@@ -18,15 +18,19 @@ export type BbAlertPtPart = 'root' | 'icon' | 'title' | 'text' | 'close';
|
|
|
18
18
|
export declare const BB_ALERT_PT: {
|
|
19
19
|
readonly parts: readonly ["root", "icon", "title", "text", "close"];
|
|
20
20
|
readonly states: readonly [];
|
|
21
|
+
readonly variant: {
|
|
22
|
+
readonly names: readonly ["outline", "primary", "destructive", "warning"];
|
|
23
|
+
readonly option: "alertVariants";
|
|
24
|
+
};
|
|
21
25
|
};
|
|
22
26
|
export type BbAlertProps = {
|
|
23
|
-
[K in `pt:${BbAlertPtPart}`]?: PtValue;
|
|
24
|
-
} & {
|
|
27
|
+
[K in `pt:${BbAlertPtPart}` | `pt:${BbAlertPtPart}:${AlertVariantBuiltIn}`]?: PtValue;
|
|
28
|
+
} & /* @vue-ignore */ PtVariantAttrs<BbAlertPtPart, keyof AlertVariantRegistry> & {
|
|
25
29
|
/**
|
|
26
30
|
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
27
31
|
* without the prefix. See the `pt:<part>` row.
|
|
28
32
|
*/
|
|
29
|
-
pt?: PtMap<BbAlertPtPart,
|
|
33
|
+
pt?: PtMap<BbAlertPtPart, AlertVariantBuiltIn | keyof AlertVariantRegistry>;
|
|
30
34
|
/**
|
|
31
35
|
* Visually hidden string used to label the close button.
|
|
32
36
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { ALERT_VARIANTS as e } from "../../types/AlertVariant.js";
|
|
1
2
|
//#region src/components/BbAlert/types.ts
|
|
2
|
-
var
|
|
3
|
+
var t = {
|
|
3
4
|
parts: [
|
|
4
5
|
"root",
|
|
5
6
|
"icon",
|
|
@@ -7,7 +8,11 @@ var e = {
|
|
|
7
8
|
"text",
|
|
8
9
|
"close"
|
|
9
10
|
],
|
|
10
|
-
states: []
|
|
11
|
+
states: [],
|
|
12
|
+
variant: {
|
|
13
|
+
names: e,
|
|
14
|
+
option: "alertVariants"
|
|
15
|
+
}
|
|
11
16
|
};
|
|
12
17
|
//#endregion
|
|
13
|
-
export {
|
|
18
|
+
export { t as BB_ALERT_PT };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
declare var
|
|
1
|
+
declare var __VLS_16: {}, __VLS_33: {};
|
|
2
2
|
type __VLS_Slots = {} & {
|
|
3
|
-
default?: (props: typeof
|
|
3
|
+
default?: (props: typeof __VLS_16) => any;
|
|
4
4
|
} & {
|
|
5
|
-
default?: (props: typeof
|
|
5
|
+
default?: (props: typeof __VLS_33) => any;
|
|
6
6
|
};
|
|
7
7
|
declare const __VLS_base: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
8
8
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -2,39 +2,48 @@ import { useLogger as e } from "../../composables/useLogger.js";
|
|
|
2
2
|
import t from "../BbIcon/BbIcon.vue.js";
|
|
3
3
|
import n from "../BbSpinner/BbSpinner.vue.js";
|
|
4
4
|
import { useBadgeHost as r } from "./badgeButtonContext.js";
|
|
5
|
-
import { Fragment as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, defineComponent as l,
|
|
5
|
+
import { Fragment as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeProps as f, openBlock as p, renderSlot as m, resolveDynamicComponent as h, unref as g } from "vue";
|
|
6
6
|
//#region src/components/BbBadge/BadgeBodyContent.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var _ = /*@__PURE__*/ l({
|
|
8
8
|
__name: "BadgeBodyContent",
|
|
9
9
|
setup(l) {
|
|
10
|
-
let
|
|
11
|
-
return (e, r) =>
|
|
10
|
+
let _ = r() ?? e().throw("[BbBadge] internal body renderer mounted outside a badge — this is a bug.");
|
|
11
|
+
return (e, r) => g(_).icon.value || g(_).slots.icon ? (p(), s(i, { key: 0 }, [g(_).loading.value ? (p(), a(n, d({
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "bb-badge__spinner bb-badge__icon"
|
|
14
|
-
},
|
|
14
|
+
}, g(_).passthrough.spinner), null, 16)) : g(_).slots.icon ? (p(), s("span", d({
|
|
15
15
|
key: 1,
|
|
16
|
+
class: "bb-badge__icon bb-badge__icon-slot"
|
|
17
|
+
}, g(_).passthrough.icon), [(p(), a(h(g(_).slots.icon), f(u(g(_).iconScope.value)), null, 16))], 16)) : g(_).icon.value ? (p(), a(t, d({
|
|
18
|
+
key: 2,
|
|
16
19
|
class: "bb-badge__icon",
|
|
17
|
-
icon:
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
+
icon: g(_).icon.value
|
|
21
|
+
}, g(_).passthrough.icon), null, 16, ["icon"])) : o("", !0), c("span", d({ class: "bb-badge__text bb-sr-only" }, g(_).passthrough.text), [m(e.$slots, "default")], 16)], 64)) : (p(), s(i, { key: 1 }, [
|
|
22
|
+
g(_).spinnerLeads.value ? (p(), a(n, d({
|
|
20
23
|
key: 0,
|
|
21
24
|
class: "bb-badge__spinner bb-badge__prepend-icon"
|
|
22
|
-
},
|
|
25
|
+
}, g(_).passthrough.spinner), null, 16)) : g(_).slots["prepend:icon"] ? (p(), s("span", d({
|
|
23
26
|
key: 1,
|
|
27
|
+
class: "bb-badge__prepend-icon bb-badge__icon-slot"
|
|
28
|
+
}, g(_).passthrough.icon), [(p(), a(h(g(_).slots["prepend:icon"]), f(u(g(_).iconScope.value)), null, 16))], 16)) : g(_).prependIcon.value ? (p(), a(t, d({
|
|
29
|
+
key: 2,
|
|
24
30
|
class: "bb-badge__prepend-icon",
|
|
25
|
-
icon:
|
|
26
|
-
},
|
|
27
|
-
c("span",
|
|
28
|
-
|
|
31
|
+
icon: g(_).prependIcon.value
|
|
32
|
+
}, g(_).passthrough.icon), null, 16, ["icon"])) : o("", !0),
|
|
33
|
+
c("span", d({ class: "bb-badge__text" }, g(_).passthrough.text), [m(e.$slots, "default")], 16),
|
|
34
|
+
g(_).clearable.value ? o("", !0) : (p(), s(i, { key: 3 }, [g(_).spinnerTrails.value ? (p(), a(n, d({
|
|
29
35
|
key: 0,
|
|
30
36
|
class: "bb-badge__append-icon"
|
|
31
|
-
},
|
|
37
|
+
}, g(_).passthrough.spinner), null, 16)) : g(_).slots["append:icon"] ? (p(), s("span", d({
|
|
32
38
|
key: 1,
|
|
39
|
+
class: "bb-badge__append-icon bb-badge__icon-slot"
|
|
40
|
+
}, g(_).passthrough.icon), [(p(), a(h(g(_).slots["append:icon"]), f(u(g(_).iconScope.value)), null, 16))], 16)) : g(_).appendIcon.value ? (p(), a(t, d({
|
|
41
|
+
key: 2,
|
|
33
42
|
class: "bb-badge__append-icon",
|
|
34
|
-
icon:
|
|
35
|
-
},
|
|
43
|
+
icon: g(_).appendIcon.value
|
|
44
|
+
}, g(_).passthrough.icon), null, 16, ["icon"])) : o("", !0)], 64))
|
|
36
45
|
], 64));
|
|
37
46
|
}
|
|
38
47
|
});
|
|
39
48
|
//#endregion
|
|
40
|
-
export {
|
|
49
|
+
export { _ as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useLogger as e } from "../../composables/useLogger.js";
|
|
2
|
-
import { usePassthrough as t } from "../../composables/usePassthrough.js";
|
|
3
|
-
import { useId as
|
|
4
|
-
import { removedPropsFor as
|
|
5
|
-
import { warnRemovedAttrs as
|
|
2
|
+
import { usePassthrough as t, variantPt as n } from "../../composables/usePassthrough.js";
|
|
3
|
+
import { useId as r } from "../../composables/useId.js";
|
|
4
|
+
import { removedPropsFor as i } from "../../deprecation/removedProps.js";
|
|
5
|
+
import { warnRemovedAttrs as ee } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
6
6
|
import { useLocale as a } from "../../composables/useLocale.js";
|
|
7
7
|
import o from "../BbIcon/BbIcon.vue.js";
|
|
8
8
|
import s from "../BbSpinner/BbSpinner.vue.js";
|
|
@@ -11,19 +11,20 @@ import l from "./BadgeBodyContent.vue.js";
|
|
|
11
11
|
import u from "./BbBadgeButton.vue.js";
|
|
12
12
|
import d from "../../assets/svgs/clear.svg_raw.js";
|
|
13
13
|
import { BB_BADGE_PT as f } from "./types.js";
|
|
14
|
-
import { Fragment as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createVNode as y, defineComponent as b,
|
|
14
|
+
import { Fragment as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createVNode as y, defineComponent as b, guardReactiveProps as x, isVNode as S, mergeProps as C, normalizeProps as w, openBlock as T, renderSlot as E, shallowRef as te, toDisplayString as D, unref as O, useAttrs as k, useSlots as A, withCtx as j, withModifiers as M } from "vue";
|
|
15
15
|
//#region src/components/BbBadge/BbBadge.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
-
var
|
|
16
|
+
var N = ["id"], P = {
|
|
17
17
|
key: 2,
|
|
18
18
|
class: "bb-badge__trailing"
|
|
19
|
-
},
|
|
19
|
+
}, F = [
|
|
20
20
|
"id",
|
|
21
21
|
"aria-label",
|
|
22
22
|
"aria-labelledby"
|
|
23
|
-
],
|
|
23
|
+
], I = {
|
|
24
24
|
key: 3,
|
|
25
25
|
class: "bb-sr-only"
|
|
26
|
-
},
|
|
26
|
+
}, L = /*@__PURE__*/ b({
|
|
27
|
+
mixins: [n(f)],
|
|
27
28
|
inheritAttrs: !1,
|
|
28
29
|
__name: "BbBadge",
|
|
29
30
|
props: {
|
|
@@ -32,11 +33,41 @@ var j = ["id"], M = {
|
|
|
32
33
|
"pt:spinner": {},
|
|
33
34
|
"pt:text": {},
|
|
34
35
|
"pt:clear": {},
|
|
36
|
+
"pt:root:activeLink": {},
|
|
37
|
+
"pt:root:exactActiveLink": {},
|
|
35
38
|
"pt:root:loading": {},
|
|
39
|
+
"pt:icon:activeLink": {},
|
|
40
|
+
"pt:icon:exactActiveLink": {},
|
|
36
41
|
"pt:icon:loading": {},
|
|
42
|
+
"pt:spinner:activeLink": {},
|
|
43
|
+
"pt:spinner:exactActiveLink": {},
|
|
37
44
|
"pt:spinner:loading": {},
|
|
45
|
+
"pt:text:activeLink": {},
|
|
46
|
+
"pt:text:exactActiveLink": {},
|
|
38
47
|
"pt:text:loading": {},
|
|
48
|
+
"pt:clear:activeLink": {},
|
|
49
|
+
"pt:clear:exactActiveLink": {},
|
|
39
50
|
"pt:clear:loading": {},
|
|
51
|
+
"pt:root:primary": {},
|
|
52
|
+
"pt:root:secondary": {},
|
|
53
|
+
"pt:root:destructive": {},
|
|
54
|
+
"pt:root:outline": {},
|
|
55
|
+
"pt:icon:primary": {},
|
|
56
|
+
"pt:icon:secondary": {},
|
|
57
|
+
"pt:icon:destructive": {},
|
|
58
|
+
"pt:icon:outline": {},
|
|
59
|
+
"pt:spinner:primary": {},
|
|
60
|
+
"pt:spinner:secondary": {},
|
|
61
|
+
"pt:spinner:destructive": {},
|
|
62
|
+
"pt:spinner:outline": {},
|
|
63
|
+
"pt:text:primary": {},
|
|
64
|
+
"pt:text:secondary": {},
|
|
65
|
+
"pt:text:destructive": {},
|
|
66
|
+
"pt:text:outline": {},
|
|
67
|
+
"pt:clear:primary": {},
|
|
68
|
+
"pt:clear:secondary": {},
|
|
69
|
+
"pt:clear:destructive": {},
|
|
70
|
+
"pt:clear:outline": {},
|
|
40
71
|
pt: {},
|
|
41
72
|
icon: {},
|
|
42
73
|
"prepend:icon": {},
|
|
@@ -48,87 +79,109 @@ var j = ["id"], M = {
|
|
|
48
79
|
variant: { default: "primary" }
|
|
49
80
|
},
|
|
50
81
|
emits: ["click:clear"],
|
|
51
|
-
setup(
|
|
52
|
-
let
|
|
82
|
+
setup(n, { emit: b }) {
|
|
83
|
+
let L = n, R = b, z = A(), B = te(null), V = t({
|
|
53
84
|
component: "BbBadge",
|
|
54
|
-
attrs:
|
|
55
|
-
props:
|
|
85
|
+
attrs: k(),
|
|
86
|
+
props: L,
|
|
56
87
|
parts: f.parts,
|
|
57
88
|
states: f.states,
|
|
58
|
-
active: {
|
|
89
|
+
active: {
|
|
90
|
+
loading: () => !!L.loading,
|
|
91
|
+
activeLink: () => !!B.value?.value.activeLink,
|
|
92
|
+
exactActiveLink: () => !!B.value?.value.exactActiveLink
|
|
93
|
+
},
|
|
94
|
+
variant: {
|
|
95
|
+
...f.variant,
|
|
96
|
+
current: () => L.variant
|
|
97
|
+
}
|
|
59
98
|
});
|
|
60
|
-
process.env.NODE_ENV !== "production" &&
|
|
61
|
-
let
|
|
99
|
+
process.env.NODE_ENV !== "production" && ee("BbBadge", i("BbBadge"));
|
|
100
|
+
let H = [
|
|
62
101
|
"xs",
|
|
63
102
|
"sm",
|
|
64
103
|
"md",
|
|
65
104
|
"lg",
|
|
66
105
|
"xl",
|
|
67
106
|
"2xl"
|
|
68
|
-
], { t:
|
|
107
|
+
], { t: U } = a(), W = e(), G = m(() => H.includes(L.size) ? L.size : (W.warn(`Invalid size: "${L.size}" in BbBadge. Expected one of: ${H.join(", ")}. Falling back to "md".`), "md")), K = () => !!L.icon || !!z.icon, q = () => !!L["prepend:icon"] || !!z["prepend:icon"], J = () => !!L["append:icon"] || !!z["append:icon"], Y = () => ({
|
|
108
|
+
activeLink: !!B.value?.value.activeLink,
|
|
109
|
+
exactActiveLink: !!B.value?.value.exactActiveLink,
|
|
110
|
+
loading: !!L.loading
|
|
111
|
+
}), X = () => J() && !q(), Z = (e) => Array.isArray(e) && e.some((e) => S(e) && (e.type === u || e.type === p && Z(e.children))), Q = () => Z(z.default?.({}));
|
|
69
112
|
c({
|
|
70
|
-
passthrough:
|
|
113
|
+
passthrough: V,
|
|
71
114
|
icon: { get value() {
|
|
72
|
-
return
|
|
115
|
+
return L.icon;
|
|
116
|
+
} },
|
|
117
|
+
slots: z,
|
|
118
|
+
iconScope: { get value() {
|
|
119
|
+
return Y();
|
|
73
120
|
} },
|
|
74
121
|
prependIcon: { get value() {
|
|
75
|
-
return
|
|
122
|
+
return L["prepend:icon"];
|
|
76
123
|
} },
|
|
77
124
|
appendIcon: { get value() {
|
|
78
|
-
return
|
|
125
|
+
return L["append:icon"];
|
|
79
126
|
} },
|
|
80
127
|
loading: { get value() {
|
|
81
|
-
return !!
|
|
128
|
+
return !!L.loading;
|
|
82
129
|
} },
|
|
83
130
|
spinnerLeads: { get value() {
|
|
84
|
-
return !!
|
|
131
|
+
return !!L.loading && !X();
|
|
85
132
|
} },
|
|
86
133
|
spinnerTrails: { get value() {
|
|
87
|
-
return !!
|
|
134
|
+
return !!L.loading && X();
|
|
88
135
|
} },
|
|
89
136
|
clearable: { get value() {
|
|
90
|
-
return !!
|
|
91
|
-
} }
|
|
137
|
+
return !!L.clearable;
|
|
138
|
+
} },
|
|
139
|
+
reportLink: (e) => {
|
|
140
|
+
B.value = e;
|
|
141
|
+
}
|
|
92
142
|
});
|
|
93
|
-
let
|
|
143
|
+
let ne = m(() => [
|
|
94
144
|
"bb-badge",
|
|
95
|
-
`bb-badge--${
|
|
96
|
-
|
|
145
|
+
`bb-badge--${G.value}`,
|
|
146
|
+
L.variant && L.variant !== "none" && `bb-badge--${L.variant}`,
|
|
97
147
|
{
|
|
98
|
-
"bb-badge--icon":
|
|
99
|
-
"bb-badge--clearable":
|
|
100
|
-
"bb-badge--loading":
|
|
148
|
+
"bb-badge--icon": K(),
|
|
149
|
+
"bb-badge--clearable": L.clearable,
|
|
150
|
+
"bb-badge--loading": L.loading
|
|
101
151
|
}
|
|
102
|
-
]),
|
|
103
|
-
|
|
152
|
+
]), $ = r().id, re = m(() => L.clearableLabel || Q() ? void 0 : `${$.value}__clear ${$.value}__body`), ie = (e) => {
|
|
153
|
+
R("click:clear", e);
|
|
104
154
|
};
|
|
105
|
-
return (e, t) => (
|
|
106
|
-
|
|
155
|
+
return (e, t) => (T(), _("span", C({ class: ne.value }, O(V).rootAttrs), [
|
|
156
|
+
Q() ? E(e.$slots, "default", { key: 0 }) : (T(), _("span", {
|
|
107
157
|
key: 1,
|
|
108
|
-
id: `${
|
|
158
|
+
id: `${O($)}__body`,
|
|
109
159
|
class: "bb-badge__body"
|
|
110
160
|
}, [y(l, null, {
|
|
111
|
-
default:
|
|
161
|
+
default: j(() => [E(e.$slots, "default")]),
|
|
112
162
|
_: 3
|
|
113
|
-
})], 8,
|
|
114
|
-
|
|
163
|
+
})], 8, N)),
|
|
164
|
+
L.clearable ? (T(), _("span", P, [K() ? g("", !0) : (T(), _(p, { key: 0 }, [L.loading && X() ? (T(), h(s, C({
|
|
115
165
|
key: 0,
|
|
116
166
|
class: "bb-badge__spinner bb-badge__append-icon"
|
|
117
|
-
},
|
|
167
|
+
}, O(V).spinner), null, 16)) : z["append:icon"] ? (T(), _("span", C({
|
|
118
168
|
key: 1,
|
|
169
|
+
class: "bb-badge__append-icon bb-badge__icon-slot"
|
|
170
|
+
}, O(V).icon), [E(e.$slots, "append:icon", w(x(Y())))], 16)) : L["append:icon"] ? (T(), h(o, C({
|
|
171
|
+
key: 2,
|
|
119
172
|
class: "bb-badge__append-icon",
|
|
120
|
-
icon:
|
|
121
|
-
},
|
|
122
|
-
id: `${
|
|
123
|
-
"aria-label":
|
|
124
|
-
"aria-labelledby":
|
|
173
|
+
icon: L["append:icon"]
|
|
174
|
+
}, O(V).icon), null, 16, ["icon"])) : g("", !0)], 64)), v("button", C({
|
|
175
|
+
id: `${O($)}__clear`,
|
|
176
|
+
"aria-label": L.clearableLabel || O(U)("badge.clearLabel").value,
|
|
177
|
+
"aria-labelledby": re.value,
|
|
125
178
|
class: "bb-badge__clear",
|
|
126
179
|
type: "button",
|
|
127
|
-
onClick:
|
|
128
|
-
},
|
|
129
|
-
|
|
180
|
+
onClick: M(ie, ["stop"])
|
|
181
|
+
}, O(V).clear), [y(o, { icon: O(d) }, null, 8, ["icon"])], 16, F)])) : g("", !0),
|
|
182
|
+
L.loading ? (T(), _("span", I, D(O(U)("common.loadingText")), 1)) : g("", !0)
|
|
130
183
|
], 16));
|
|
131
184
|
}
|
|
132
185
|
});
|
|
133
186
|
//#endregion
|
|
134
|
-
export {
|
|
187
|
+
export { L as default };
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { useLogger as e } from "../../composables/useLogger.js";
|
|
2
2
|
import { useBadgeHost as t } from "./badgeButtonContext.js";
|
|
3
3
|
import n from "./BadgeBodyContent.vue.js";
|
|
4
|
-
import r from "../BbBaseButton/
|
|
5
|
-
import
|
|
4
|
+
import { provideLinkState as r, useLinkState as i } from "../BbBaseButton/useLinkState.js";
|
|
5
|
+
import a from "../BbBaseButton/BbBaseButton.vue.js";
|
|
6
|
+
import { computed as o, createBlock as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeProps as f, onBeforeUnmount as p, openBlock as m, renderSlot as h, unref as g, useAttrs as _, withCtx as v } from "vue";
|
|
6
7
|
//#region src/components/BbBadge/BbBadgeButton.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
8
|
+
var y = /*@__PURE__*/ l({
|
|
8
9
|
inheritAttrs: !1,
|
|
9
10
|
__name: "BbBadgeButton",
|
|
10
11
|
props: {
|
|
11
12
|
"pt:root": {},
|
|
13
|
+
"pt:root:activeLink": {},
|
|
14
|
+
"pt:root:exactActiveLink": {},
|
|
12
15
|
"pt:root:disabled": {},
|
|
13
16
|
pt: {},
|
|
14
17
|
activeClass: {},
|
|
@@ -64,18 +67,20 @@ var p = /*@__PURE__*/ s({
|
|
|
64
67
|
preserveUrl: { type: Boolean },
|
|
65
68
|
viewTransition: { type: Boolean }
|
|
66
69
|
},
|
|
67
|
-
setup(
|
|
68
|
-
let
|
|
69
|
-
|
|
70
|
-
let
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
setup(l) {
|
|
71
|
+
let y = l, b = t();
|
|
72
|
+
b || e().throw("[BbBadgeButton] must be rendered inside a <BbBadge> default slot.");
|
|
73
|
+
let x = i(y);
|
|
74
|
+
r(x), b?.reportLink(x), p(() => b?.reportLink(null));
|
|
75
|
+
let S = _(), C = o(() => !!b?.loading.value), w = o(() => {
|
|
76
|
+
let { onClick: e, ...t } = S, n = [].concat(e ?? []).filter((e) => typeof e == "function");
|
|
77
|
+
return d(t, y, {
|
|
78
|
+
...C.value ? {
|
|
74
79
|
"aria-disabled": !0,
|
|
75
80
|
tabindex: -1
|
|
76
81
|
} : {},
|
|
77
82
|
onClick: (e) => {
|
|
78
|
-
if (
|
|
83
|
+
if (C.value) {
|
|
79
84
|
e.preventDefault();
|
|
80
85
|
return;
|
|
81
86
|
}
|
|
@@ -83,9 +88,9 @@ var p = /*@__PURE__*/ s({
|
|
|
83
88
|
}
|
|
84
89
|
});
|
|
85
90
|
});
|
|
86
|
-
return (e, t) => (
|
|
87
|
-
default:
|
|
88
|
-
default:
|
|
91
|
+
return (e, t) => (m(), s(a, d({ class: "bb-badge__body" }, w.value), {
|
|
92
|
+
default: v(() => [c(n, null, {
|
|
93
|
+
default: v(() => [h(e.$slots, "default", f(u(g(x))))]),
|
|
89
94
|
_: 3
|
|
90
95
|
})]),
|
|
91
96
|
_: 3
|
|
@@ -93,4 +98,4 @@ var p = /*@__PURE__*/ s({
|
|
|
93
98
|
}
|
|
94
99
|
});
|
|
95
100
|
//#endregion
|
|
96
|
-
export {
|
|
101
|
+
export { y as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IconType } from '../../types/Icon';
|
|
2
|
+
import { LinkState } from '../BbBaseButton/useLinkState';
|
|
2
3
|
import { PassthroughBindings } from '../../composables/usePassthrough';
|
|
3
|
-
import { BbBadgePtPart, BbBadgePtState } from './types';
|
|
4
|
+
import { BbBadgeIconSlotProps, BbBadgePtPart, BbBadgePtState, BbBadgeSlots } from './types';
|
|
4
5
|
/**
|
|
5
6
|
* A read-only view of one piece of the host's state.
|
|
6
7
|
*
|
|
@@ -28,6 +29,10 @@ export type BadgeHostContext = {
|
|
|
28
29
|
icon: HostValue<IconType | undefined>;
|
|
29
30
|
prependIcon: HostValue<IconType | undefined>;
|
|
30
31
|
appendIcon: HostValue<IconType | undefined>;
|
|
32
|
+
/** The badge's own slots: an icon slot beats its prop (Q81.4). */
|
|
33
|
+
slots: BbBadgeSlots;
|
|
34
|
+
/** What an icon slot sees. */
|
|
35
|
+
iconScope: HostValue<BbBadgeIconSlotProps>;
|
|
31
36
|
loading: HostValue<boolean>;
|
|
32
37
|
/** Whether the loading spinner takes the leading slot (BbButton convention). */
|
|
33
38
|
spinnerLeads: HostValue<boolean>;
|
|
@@ -39,6 +44,12 @@ export type BadgeHostContext = {
|
|
|
39
44
|
* the append icon only when the badge is *not* clearable.
|
|
40
45
|
*/
|
|
41
46
|
clearable: HostValue<boolean>;
|
|
47
|
+
/**
|
|
48
|
+
* A slotted `BbBadgeButton` hands the badge its link state (`null` when it
|
|
49
|
+
* unmounts), so the badge's own parts get `activeLink` / `exactActiveLink`:
|
|
50
|
+
* the whole chip changes, not just the inner button.
|
|
51
|
+
*/
|
|
52
|
+
reportLink: (state: HostValue<LinkState> | null) => void;
|
|
42
53
|
};
|
|
43
54
|
export declare const provideBadgeHost: (context: BadgeHostContext) => void;
|
|
44
55
|
export declare const useBadgeHost: () => BadgeHostContext | null;
|