bitboss-ui 3.0.0-beta.73 → 3.0.0-beta.75
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 +4 -2
- package/bin/bitboss-ui-mcp.mjs +101 -3
- package/bin/bitboss-ui.mjs +6 -1
- package/bin/cli.mjs +31 -5
- package/dist/ai/BbAvatar.md +86 -58
- package/dist/ai/BbBadge.md +5 -5
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +2 -2
- package/dist/ai/BbCalendar.md +9 -5
- package/dist/ai/BbCheckboxGroup.md +5 -4
- package/dist/ai/BbColorInput.md +12 -0
- package/dist/ai/BbColorPalette.md +19 -15
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +16 -3
- package/dist/ai/BbDatePickerInput.md +17 -1
- package/dist/ai/BbDialog.md +16 -4
- package/dist/ai/BbDropdown.md +175 -67
- package/dist/ai/BbDropdownButton.md +27 -8
- package/dist/ai/BbForm.md +4 -1
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbNumberInput.md +8 -4
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbRadioGroup.md +4 -4
- package/dist/ai/BbSelect.md +79 -67
- package/dist/ai/BbSelectPopover.md +24 -5
- package/dist/ai/BbSwitchGroup.md +5 -4
- package/dist/ai/BbTable.md +59 -34
- package/dist/ai/BbTimePicker.md +16 -3
- package/dist/ai/BbTimePickerInput.md +15 -1
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/BbTree.md +5 -1
- package/dist/ai/CommonPopover.md +1 -0
- package/dist/ai/FlatListBox.md +1 -0
- package/dist/ai/GroupedListBox.md +1 -0
- package/dist/ai/ListBox.md +1 -0
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +215 -6
- package/dist/ai/components.json +77 -43
- package/dist/ai/composables/useToast.md +2 -2
- package/dist/ai/design-tokens.json +60 -0
- package/dist/ai/guides/agent-contract.md +8 -4
- package/dist/ai/guides/design-tokens.md +33 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/fetch-items-playbook.md +7 -11
- package/dist/ai/guides/inertia-helpers.md +613 -53
- package/dist/ai/guides/migration/adoption-checklist.md +5 -5
- package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
- package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
- package/dist/ai/guides/migration/components/bb-table.md +2 -1
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/v2-to-v3.md +46 -5
- package/dist/ai/guides/migration/v3-beta-tooling.md +4 -0
- package/dist/ai/guides/passthrough.md +3 -3
- package/dist/ai/guides/preset-components.md +15 -2
- package/dist/ai/guides/reporting.md +49 -0
- package/dist/ai/helpers/inertia/manifest.json +33 -38
- package/dist/ai/helpers/inertia/useHasChanged.ts +25 -37
- package/dist/ai/helpers/inertia/useQuery.ts +24 -6
- package/dist/ai/helpers/inertia/utils.ts +552 -3
- package/dist/ai/index.md +2 -1
- package/dist/ai/manifest/common.json +1 -0
- package/dist/ai/manifest/components/BbAlert.tree.json +1 -1
- package/dist/ai/manifest/components/BbAvatar.json +5 -2
- package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
- package/dist/ai/manifest/components/BbCalendar.json +2 -2
- package/dist/ai/manifest/components/BbCarousel.json +0 -3
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbColorInput.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.json +7 -4
- package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
- package/dist/ai/manifest/components/BbConfirmPortal.json +1 -1
- package/dist/ai/manifest/components/BbDatePicker.json +6 -3
- package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
- package/dist/ai/manifest/components/BbDialog.tree.json +7 -1
- package/dist/ai/manifest/components/BbDropdown.json +23 -17
- package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.tree.json +16 -5
- package/dist/ai/manifest/components/BbDropdownButton.json +15 -9
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
- package/dist/ai/manifest/components/BbForm.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbHoverCardPortal.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +2 -0
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbPopoverPortal.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbSelect.json +10 -7
- package/dist/ai/manifest/components/BbSelectPopover.json +7 -4
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +5 -1
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbTable.json +6 -6
- package/dist/ai/manifest/components/BbTable.tree.json +16 -6
- package/dist/ai/manifest/components/BbTimePicker.json +7 -4
- package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
- package/dist/ai/manifest/components/BbToastPortal.json +1 -1
- package/dist/ai/manifest/components/BbTree.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +2 -1
- package/dist/ai/manifest/components/FlatListBox.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +2 -1
- package/dist/ai/manifest/components/ListBox.json +2 -1
- package/dist/ai/manifest/components/OptionsContainer.json +6 -4
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +36 -3
- package/dist/ai/manifest/types.advanced.json +81 -80
- package/dist/ai/manifest/types.api.json +64 -65
- package/dist/ai/manifest/types.wrapper.json +155 -118
- package/dist/ai/recipes/inertia/layout-scaffold.md +3 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +3 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +3 -1
- package/dist/ai/source/BbAlert.md +16 -4
- package/dist/ai/source/BbAvatar.md +121 -9
- package/dist/ai/source/BbBadge.md +12 -5
- package/dist/ai/source/BbBreadcrumbs.md +56 -55
- package/dist/ai/source/BbButton.md +41 -25
- package/dist/ai/source/BbCalendar.md +22 -12
- package/dist/ai/source/BbCarousel.md +31 -28
- package/dist/ai/source/BbCheckboxGroup.md +15 -9
- package/dist/ai/source/BbColorInput.md +19 -0
- package/dist/ai/source/BbColorPalette.md +59 -12
- package/dist/ai/source/BbConfirm.md +7 -0
- package/dist/ai/source/BbConfirmPortal.md +9 -4
- package/dist/ai/source/BbDatePicker.md +71 -22
- package/dist/ai/source/BbDatePickerInput.md +72 -9
- package/dist/ai/source/BbDialog.md +45 -2
- package/dist/ai/source/BbDropdown.md +263 -63
- package/dist/ai/source/BbDropdownButton.md +27 -2
- package/dist/ai/source/BbDropdownGroup.md +121 -59
- package/dist/ai/source/BbForm.md +73 -6
- package/dist/ai/source/BbGallery.md +76 -55
- package/dist/ai/source/BbHost.md +12 -0
- package/dist/ai/source/BbHoverCard.md +7 -0
- package/dist/ai/source/BbHoverCardPortal.md +9 -5
- package/dist/ai/source/BbNumberInput.md +22 -16
- package/dist/ai/source/BbOffCanvas.md +48 -2
- package/dist/ai/source/BbPopover.md +7 -0
- package/dist/ai/source/BbPopoverPortal.md +9 -5
- package/dist/ai/source/BbRadio.md +4 -3
- package/dist/ai/source/BbRadioGroup.md +19 -10
- package/dist/ai/source/BbSelect.md +35 -20
- package/dist/ai/source/BbSelectPopover.md +116 -8
- package/dist/ai/source/BbSwitchGroup.md +11 -4
- package/dist/ai/source/BbTable.md +126 -32
- package/dist/ai/source/BbTag.md +10 -3
- package/dist/ai/source/BbTimePicker.md +69 -15
- package/dist/ai/source/BbTimePickerInput.md +45 -7
- package/dist/ai/source/BbToast.md +16 -2
- package/dist/ai/source/BbToastPortal.md +18 -6
- package/dist/ai/source/BbTree.md +1 -1
- package/dist/ai/source/CommonFieldInput.md +11 -5
- package/dist/ai/source/CommonPopover.md +28 -2
- package/dist/ai/source/FlatListBox.md +26 -5
- package/dist/ai/source/GroupedListBox.md +63 -11
- package/dist/ai/source/ListBox.md +4 -0
- package/dist/ai/source/OptionsContainer.md +29 -11
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +31 -26
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +61 -43
- package/dist/components/BbAvatar/avatarIdentity.js +25 -0
- package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
- package/dist/components/BbAvatar/types.d.ts +24 -5
- package/dist/components/BbAvatar/types.js +5 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +80 -79
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +152 -158
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +235 -234
- package/dist/components/BbCalendar/types.d.ts +2 -2
- package/dist/components/BbCalendar/useDayGrid.js +120 -123
- package/dist/components/BbCalendar/useDayjsLocale.js +11 -8
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
- package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
- package/dist/components/BbColorInput/types.d.ts +7 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +239 -223
- package/dist/components/BbColorPalette/types.d.ts +8 -1
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -4
- package/dist/components/BbConfirm/types.d.ts +5 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +4 -2
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +160 -143
- package/dist/components/BbDatePicker/types.d.ts +9 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +483 -496
- package/dist/components/BbDatePickerInput/types.d.ts +7 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +252 -236
- package/dist/components/BbDialog/leaveGhost.js +38 -0
- package/dist/components/BbDialog/overlayActions.js +34 -20
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +92 -87
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +419 -368
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +384 -340
- package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
- package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +133 -119
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +73 -45
- package/dist/components/BbDropdown/normalizeGroups.js +6 -2
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +8 -0
- package/dist/components/BbDropdown/types.d.ts +73 -58
- package/dist/components/BbDropdown/types.js +1 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +93 -72
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +48 -0
- package/dist/components/BbDropdownButton/types.d.ts +13 -2
- package/dist/components/BbDropdownButton/types.js +2 -0
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -21
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +229 -227
- package/dist/components/BbForm/types.d.ts +31 -0
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +318 -296
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -5
- package/dist/components/BbHoverCard/types.d.ts +5 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +10 -6
- package/dist/components/BbNumberInput/numberDisplay.js +102 -106
- package/dist/components/BbNumberInput/types.d.ts +4 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +425 -409
- package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -5
- package/dist/components/BbPopover/types.d.ts +5 -0
- package/dist/components/BbRadio/types.d.ts +4 -3
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -106
- package/dist/components/BbRadioGroup/types.d.ts +4 -7
- package/dist/components/BbSelect/BbSelect.vue.d.ts +3 -1
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +167 -163
- package/dist/components/BbSelect/types.d.ts +23 -20
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +3 -1
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +680 -637
- package/dist/components/BbSelectPopover/types.d.ts +10 -4
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
- package/dist/components/BbSwitchGroup/types.d.ts +3 -6
- package/dist/components/BbTable/BbTable.vue.d.ts +1 -3
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1182 -1165
- package/dist/components/BbTable/BbTableDataRow.js +96 -96
- package/dist/components/BbTable/types.d.ts +11 -10
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +157 -140
- package/dist/components/BbTimePicker/types.d.ts +9 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +3 -1
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +278 -268
- package/dist/components/BbTimePickerInput/types.d.ts +7 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +12 -12
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +2 -4
- package/dist/components/BbToast/types.d.ts +7 -2
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
- package/dist/components/BbTree/types.d.ts +1 -1
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +36 -36
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +14 -2
- package/dist/components/CommonTimeSelector/useMeridiem.js +6 -6
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +115 -96
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +194 -166
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
- package/dist/composables/formSubmitLock.js +2 -1
- package/dist/composables/overlayRegistry.js +52 -42
- package/dist/composables/useActiveInactiveState.js +8 -4
- package/dist/composables/useBbDialog.js +5 -5
- package/dist/composables/useItemsGetter.js +34 -32
- package/dist/composables/useOpenModel.js +20 -0
- package/dist/composables/useOwnModel.js +16 -0
- package/dist/composables/useSegmentedFields.js +31 -20
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/i18n/currencyDigits.js +58 -0
- package/dist/i18n/locales/ar.json +2 -0
- package/dist/i18n/locales/cs.json +2 -0
- package/dist/i18n/locales/da.json +2 -0
- package/dist/i18n/locales/de-CH.json +2 -0
- package/dist/i18n/locales/de.json +2 -0
- package/dist/i18n/locales/el.json +2 -0
- package/dist/i18n/locales/en-GB.json +2 -0
- package/dist/i18n/locales/en.json +2 -0
- package/dist/i18n/locales/es-MX.json +2 -0
- package/dist/i18n/locales/es.json +2 -0
- package/dist/i18n/locales/fa.json +2 -0
- package/dist/i18n/locales/fi.json +2 -0
- package/dist/i18n/locales/fr.json +2 -0
- package/dist/i18n/locales/he.json +2 -0
- package/dist/i18n/locales/hu.json +2 -0
- package/dist/i18n/locales/it.json +2 -0
- package/dist/i18n/locales/ja.json +2 -0
- package/dist/i18n/locales/ko.json +2 -0
- package/dist/i18n/locales/nb.json +2 -0
- package/dist/i18n/locales/nl.json +2 -0
- package/dist/i18n/locales/pl.json +2 -0
- package/dist/i18n/locales/pt-BR.json +2 -0
- package/dist/i18n/locales/pt-PT.json +2 -0
- package/dist/i18n/locales/ro.json +2 -0
- package/dist/i18n/locales/ru.json +2 -0
- package/dist/i18n/locales/sv.json +2 -0
- package/dist/i18n/locales/tr.json +2 -0
- package/dist/i18n/locales/uk.json +2 -0
- package/dist/i18n/locales/zh-CN.json +2 -0
- package/dist/i18n/locales/zh-HK.json +2 -0
- package/dist/i18n/locales/zh-TW.json +2 -0
- package/dist/i18n/regionDates.js +250 -0
- package/dist/i18n/regionHints.js +30 -41
- package/dist/icon-scan.js +68 -61
- package/dist/index.d.ts +35 -31
- package/dist/llms-full.txt +1428 -400
- package/dist/llms-medium.txt +8 -4
- package/dist/llms.txt +4 -2
- package/dist/locale-blueprint.json +2 -0
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +2 -1
- package/dist/types/CommonProps.d.ts +8 -0
- package/dist/types/Option.d.ts +10 -0
- package/dist/types/ptComponentMap.d.ts +3 -3
- package/dist/utilities/functions/hash.js +97 -64
- package/dist/utilities/functions/isEqual.js +33 -25
- package/dist/utilities/functions/slotContent.js +19 -0
- package/dist/utils/loadRetry.js +8 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +2 -1
- package/dist/vite.js +11 -4
- package/llms.txt +4 -2
- package/package.json +3 -2
- package/scripts/README.md +3 -1
- package/scripts/lib/adoption-checklist.json +6 -5
- package/scripts/lib/agent-manifest.mjs +33 -6
- package/scripts/lib/agent-setup.mjs +90 -24
- package/scripts/lib/cldr-pins.ts +182 -0
- package/scripts/lib/engines-include.d.mts +5 -0
- package/scripts/lib/engines-include.mjs +40 -0
- package/scripts/lib/eslint-plugin.mjs +8 -2
- package/scripts/lib/hidden-label-placeholder.mjs +25 -5
- package/scripts/lib/idiom-scan.mjs +30 -3
- package/scripts/lib/legacy-agent-files.json +152 -0
- package/scripts/lib/mcp-config.mjs +74 -7
- package/scripts/lib/portal-names.mjs +78 -8
- package/scripts/lib/release-results.mjs +5 -2
- package/scripts/lib/report.mjs +340 -0
- package/scripts/lib/run-beat.mjs +14 -0
- package/scripts/lib/run-records.mjs +313 -0
- package/scripts/lib/selector-log.mjs +98 -0
- package/scripts/lib/ticket-beat.mjs +30 -0
- package/scripts/lib/validate-bb-markup.mjs +37 -2
- package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
|
@@ -2,30 +2,31 @@ import { useConfigDefaults as e } from "../../composables/useConfigDefaults.js";
|
|
|
2
2
|
import { useId as t } from "../../composables/useId.js";
|
|
3
3
|
import { useLocale as n } from "../../composables/useLocale.js";
|
|
4
4
|
import { useLogger as ee } from "../../composables/useLogger.js";
|
|
5
|
-
import { removedPropsFor as
|
|
6
|
-
import { warnRemovedAttrs as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import a from "
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
5
|
+
import { removedPropsFor as te } from "../../deprecation/removedProps.js";
|
|
6
|
+
import { warnRemovedAttrs as ne } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
7
|
+
import r from "../BbIcon/BbIcon.vue.js";
|
|
8
|
+
import i from "../BbSpinner/BbSpinner.vue.js";
|
|
9
|
+
import { SlotNodes as a, slotContent as o } from "../../utilities/functions/slotContent.js";
|
|
10
|
+
import s from "./BadgeBodyContent.vue.js";
|
|
11
|
+
import c from "./BbBadgeButton.vue.js";
|
|
12
|
+
import { provideBadgeHost as l } from "./badgeButtonContext.js";
|
|
13
|
+
import re from "../../assets/svgs/clear.svg_raw.js";
|
|
14
|
+
import { BB_BADGE_PT as u } from "./types.js";
|
|
15
|
+
import { usePassthrough as ie, variantPt as d } from "../../composables/usePassthrough.js";
|
|
16
|
+
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, defineComponent as b, isVNode as x, mergeProps as S, openBlock as C, renderSlot as w, shallowRef as ae, toDisplayString as T, unref as E, useAttrs as D, useSlots as O, withCtx as k, withModifiers as A } from "vue";
|
|
16
17
|
// src/components/BbBadge/BbBadge.vue?vue&type=script&setup=true&lang.ts
|
|
17
|
-
var
|
|
18
|
+
var j = ["id"], M = {
|
|
18
19
|
key: 2,
|
|
19
20
|
class: "bb-badge__trailing"
|
|
20
|
-
},
|
|
21
|
+
}, N = [
|
|
21
22
|
"id",
|
|
22
23
|
"aria-label",
|
|
23
24
|
"aria-labelledby"
|
|
24
|
-
],
|
|
25
|
+
], P = {
|
|
25
26
|
key: 3,
|
|
26
27
|
class: "bb-sr-only"
|
|
27
|
-
},
|
|
28
|
-
mixins: [d(
|
|
28
|
+
}, F = /*@__PURE__*/ b({
|
|
29
|
+
mixins: [d(u)],
|
|
29
30
|
inheritAttrs: !1,
|
|
30
31
|
__name: "BbBadge",
|
|
31
32
|
props: {
|
|
@@ -81,132 +82,132 @@ var M = ["id"], N = {
|
|
|
81
82
|
},
|
|
82
83
|
emits: ["click:clear"],
|
|
83
84
|
setup(d, { emit: b }) {
|
|
84
|
-
let
|
|
85
|
+
let F = d, I = b, L = O(), R = e("BbBadge", F, {
|
|
85
86
|
size: "md",
|
|
86
87
|
variant: "primary"
|
|
87
|
-
}),
|
|
88
|
+
}), z = ae(null), B = ie({
|
|
88
89
|
component: "BbBadge",
|
|
89
|
-
attrs:
|
|
90
|
-
props:
|
|
91
|
-
parts:
|
|
92
|
-
states:
|
|
90
|
+
attrs: D(),
|
|
91
|
+
props: F,
|
|
92
|
+
parts: u.parts,
|
|
93
|
+
states: u.states,
|
|
93
94
|
active: {
|
|
94
|
-
loading: () => !!
|
|
95
|
-
activeLink: () => !!
|
|
96
|
-
exactActiveLink: () => !!
|
|
95
|
+
loading: () => !!F.loading,
|
|
96
|
+
activeLink: () => !!z.value?.value.activeLink,
|
|
97
|
+
exactActiveLink: () => !!z.value?.value.exactActiveLink
|
|
97
98
|
},
|
|
98
99
|
variant: {
|
|
99
|
-
...
|
|
100
|
-
current: () =>
|
|
100
|
+
...u.variant,
|
|
101
|
+
current: () => R.variant
|
|
101
102
|
}
|
|
102
103
|
});
|
|
103
|
-
process.env.NODE_ENV !== "production" &&
|
|
104
|
-
let
|
|
104
|
+
process.env.NODE_ENV !== "production" && ne("BbBadge", te("BbBadge"));
|
|
105
|
+
let V = [
|
|
105
106
|
"xs",
|
|
106
107
|
"sm",
|
|
107
108
|
"md",
|
|
108
109
|
"lg",
|
|
109
110
|
"xl",
|
|
110
111
|
"2xl"
|
|
111
|
-
], { t:
|
|
112
|
-
let e =
|
|
112
|
+
], { t: H } = n(), U = ee(), W = p(() => {
|
|
113
|
+
let e = R.size, t = typeof e == "object" && e ? {
|
|
113
114
|
default: "md",
|
|
114
115
|
...e
|
|
115
116
|
} : { default: e };
|
|
116
117
|
return Object.entries(t).map(([e, t]) => {
|
|
117
118
|
let n = t ?? "md";
|
|
118
|
-
return
|
|
119
|
+
return V.includes(n) || (U.warn(`Invalid size: "${n}" in BbBadge. Expected one of: ${V.join(", ")}. Falling back to "md".`), n = "md"), e === "default" ? `bb-badge--${n}` : `bb-badge--${e}-${n}`;
|
|
119
120
|
});
|
|
120
|
-
}),
|
|
121
|
+
}), G = () => F.iconOnly === !0, K = [
|
|
121
122
|
"default",
|
|
122
123
|
"sm",
|
|
123
124
|
"md",
|
|
124
125
|
"lg",
|
|
125
126
|
"xl",
|
|
126
127
|
"2xl"
|
|
127
|
-
],
|
|
128
|
-
let e =
|
|
128
|
+
], q = () => {
|
|
129
|
+
let e = F.iconOnly;
|
|
129
130
|
if (!e || e === !0) return [];
|
|
130
131
|
let t = !!e.default;
|
|
131
|
-
return
|
|
132
|
-
},
|
|
133
|
-
activeLink: !!
|
|
134
|
-
exactActiveLink: !!
|
|
135
|
-
loading: !!
|
|
136
|
-
}), X = () =>
|
|
137
|
-
|
|
138
|
-
passthrough:
|
|
132
|
+
return K.flatMap((n) => (n !== "default" && e[n] !== void 0 && (t = !!e[n]), t ? [`bb-badge--icon-${n}`] : []));
|
|
133
|
+
}, J = (e) => o(L[`${e}:icon`], Y()), oe = () => !!F["prepend:icon"] || !!J("prepend"), se = () => !!F["append:icon"] || !!J("append"), Y = () => ({
|
|
134
|
+
activeLink: !!z.value?.value.activeLink,
|
|
135
|
+
exactActiveLink: !!z.value?.value.exactActiveLink,
|
|
136
|
+
loading: !!F.loading
|
|
137
|
+
}), X = () => se() && !oe(), Z = (e) => Array.isArray(e) && e.some((e) => x(e) && (e.type === c || e.type === f && Z(e.children))), Q = () => Z(L.default?.({}));
|
|
138
|
+
l({
|
|
139
|
+
passthrough: B,
|
|
139
140
|
iconOnly: { get value() {
|
|
140
|
-
return
|
|
141
|
+
return G();
|
|
141
142
|
} },
|
|
142
|
-
|
|
143
|
+
iconNodes: J,
|
|
143
144
|
iconScope: { get value() {
|
|
144
145
|
return Y();
|
|
145
146
|
} },
|
|
146
147
|
prependIcon: { get value() {
|
|
147
|
-
return
|
|
148
|
+
return F["prepend:icon"];
|
|
148
149
|
} },
|
|
149
150
|
appendIcon: { get value() {
|
|
150
|
-
return
|
|
151
|
+
return F["append:icon"];
|
|
151
152
|
} },
|
|
152
153
|
loading: { get value() {
|
|
153
|
-
return !!
|
|
154
|
+
return !!F.loading;
|
|
154
155
|
} },
|
|
155
156
|
spinnerLeads: { get value() {
|
|
156
|
-
return !!
|
|
157
|
+
return !!F.loading && !X();
|
|
157
158
|
} },
|
|
158
159
|
spinnerTrails: { get value() {
|
|
159
|
-
return !!
|
|
160
|
+
return !!F.loading && X();
|
|
160
161
|
} },
|
|
161
162
|
clearable: { get value() {
|
|
162
|
-
return !!
|
|
163
|
+
return !!F.clearable;
|
|
163
164
|
} },
|
|
164
165
|
reportLink: (e) => {
|
|
165
|
-
|
|
166
|
+
z.value = e;
|
|
166
167
|
}
|
|
167
168
|
});
|
|
168
|
-
let
|
|
169
|
+
let ce = p(() => [
|
|
169
170
|
"bb-badge",
|
|
170
|
-
...
|
|
171
|
-
...
|
|
172
|
-
|
|
171
|
+
...W.value,
|
|
172
|
+
...q(),
|
|
173
|
+
R.variant && R.variant !== "none" && `bb-badge--${R.variant}`,
|
|
173
174
|
{
|
|
174
|
-
"bb-badge--icon":
|
|
175
|
-
"bb-badge--clearable":
|
|
176
|
-
"bb-badge--loading":
|
|
175
|
+
"bb-badge--icon": G(),
|
|
176
|
+
"bb-badge--clearable": F.clearable,
|
|
177
|
+
"bb-badge--loading": F.loading
|
|
177
178
|
}
|
|
178
|
-
]), $ = t().id,
|
|
179
|
-
|
|
179
|
+
]), $ = t().id, le = p(() => F.clearableLabel || Q() ? void 0 : `${$.value}__clear ${$.value}__body`), ue = (e) => {
|
|
180
|
+
I("click:clear", e);
|
|
180
181
|
};
|
|
181
|
-
return (e, t) => (
|
|
182
|
-
Q() ?
|
|
182
|
+
return (e, t) => (C(), g("span", S({ class: ce.value }, E(B).rootAttrs), [
|
|
183
|
+
Q() ? w(e.$slots, "default", {}, void 0, void 0, 0) : (C(), g("span", {
|
|
183
184
|
key: 1,
|
|
184
|
-
id: `${
|
|
185
|
+
id: `${E($)}__body`,
|
|
185
186
|
class: "bb-badge__body"
|
|
186
|
-
}, [y(
|
|
187
|
-
default:
|
|
187
|
+
}, [y(s, null, {
|
|
188
|
+
default: k(() => [w(e.$slots, "default", {}, () => [v(T(F.text), 1)])]),
|
|
188
189
|
_: 3
|
|
189
|
-
})], 8,
|
|
190
|
-
|
|
190
|
+
})], 8, j)),
|
|
191
|
+
F.clearable ? (C(), g("span", M, [G() ? h("", !0) : (C(), g(f, { key: 0 }, [F.loading && X() ? (C(), m(i, S({
|
|
191
192
|
key: 0,
|
|
192
193
|
class: "bb-badge__spinner bb-badge__append-icon"
|
|
193
|
-
},
|
|
194
|
+
}, E(B).spinner), null, 16)) : J("append") ? (C(), g("span", S({
|
|
194
195
|
key: 1,
|
|
195
196
|
class: "bb-badge__append-icon bb-badge__icon-slot"
|
|
196
|
-
},
|
|
197
|
+
}, E(B).icon), [y(E(a), { nodes: J("append") }, null, 8, ["nodes"])], 16)) : F["append:icon"] ? (C(), m(r, S({
|
|
197
198
|
key: 2,
|
|
198
199
|
class: "bb-badge__append-icon",
|
|
199
|
-
icon:
|
|
200
|
-
},
|
|
201
|
-
id: `${
|
|
202
|
-
"aria-label":
|
|
203
|
-
"aria-labelledby":
|
|
200
|
+
icon: F["append:icon"]
|
|
201
|
+
}, E(B).icon), null, 16, ["icon"])) : h("", !0)], 64)), _("button", S({
|
|
202
|
+
id: `${E($)}__clear`,
|
|
203
|
+
"aria-label": F.clearableLabel || E(H)("badge.clearLabel").value,
|
|
204
|
+
"aria-labelledby": le.value,
|
|
204
205
|
class: "bb-badge__clear",
|
|
205
206
|
type: "button",
|
|
206
|
-
onClick:
|
|
207
|
-
},
|
|
208
|
-
|
|
207
|
+
onClick: A(ue, ["stop"])
|
|
208
|
+
}, E(B).clear), [y(r, { icon: E(re) }, null, 8, ["icon"])], 16, N)])) : h("", !0),
|
|
209
|
+
F.loading ? (C(), g("span", P, T(E(H)("common.loadingText")), 1)) : h("", !0)
|
|
209
210
|
], 16));
|
|
210
211
|
}
|
|
211
212
|
});
|
|
212
|
-
export {
|
|
213
|
+
export { F as default };
|