bitboss-ui 3.0.0-beta.74 → 3.0.0-beta.76
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 +5 -5
- package/bin/cli.mjs +16 -10
- package/dist/ai/BbAlert.md +1 -1
- package/dist/ai/BbAvatar.md +86 -58
- package/dist/ai/BbBadge.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +3 -3
- package/dist/ai/BbButton.md +4 -4
- package/dist/ai/BbCalendar.md +5 -2
- package/dist/ai/BbCheckboxGroup.md +5 -4
- package/dist/ai/BbColorInput.md +13 -1
- package/dist/ai/BbColorPalette.md +12 -7
- package/dist/ai/BbConfirm.md +1 -1
- package/dist/ai/BbDatePicker.md +13 -1
- package/dist/ai/BbDatePickerInput.md +18 -2
- package/dist/ai/BbDialog.md +6 -3
- package/dist/ai/BbDropdown.md +174 -77
- package/dist/ai/BbDropdownButton.md +37 -16
- package/dist/ai/BbGallery.md +3 -2
- package/dist/ai/BbIcon.md +10 -10
- package/dist/ai/BbNumberInput.md +3 -1
- package/dist/ai/BbOffCanvas.md +3 -2
- package/dist/ai/BbPopover.md +1 -1
- package/dist/ai/BbRadioGroup.md +4 -4
- package/dist/ai/BbSelect.md +227 -105
- package/dist/ai/BbSelectPopover.md +139 -14
- package/dist/ai/BbSwitchGroup.md +5 -4
- package/dist/ai/BbTable.md +18 -17
- package/dist/ai/BbTimePicker.md +13 -1
- package/dist/ai/BbTimePickerInput.md +16 -2
- package/dist/ai/BbToast.md +3 -2
- 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 +3 -2
- package/dist/ai/ListBox.md +4 -2
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +310 -7
- package/dist/ai/components.json +33 -35
- package/dist/ai/composables/useToast.md +2 -2
- package/dist/ai/design-tokens.json +60 -0
- package/dist/ai/guides/agent-contract.md +9 -5
- package/dist/ai/guides/calendars-and-digits.md +1 -1
- package/dist/ai/guides/design-tokens.md +13 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/fetch-items-playbook.md +7 -11
- package/dist/ai/guides/icons-policy.md +32 -11
- package/dist/ai/guides/installation-and-plugin-setup.md +24 -23
- package/dist/ai/guides/migration/adoption-checklist.md +1 -1
- 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-icon.md +4 -4
- 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 +70 -24
- package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
- package/dist/ai/guides/migration/v3-beta-tooling.md +1 -0
- package/dist/ai/guides/passthrough.md +58 -58
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/index.md +1 -1
- package/dist/ai/manifest/common.json +1 -0
- package/dist/ai/manifest/components/BbAvatar.json +5 -2
- package/dist/ai/manifest/components/BbAvatar.tree.json +32 -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 +5 -2
- package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
- package/dist/ai/manifest/components/BbDatePicker.json +3 -0
- package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
- package/dist/ai/manifest/components/BbDialog.tree.json +3 -1
- package/dist/ai/manifest/components/BbDropdown.json +36 -28
- package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.tree.json +21 -11
- package/dist/ai/manifest/components/BbDropdownButton.json +24 -16
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +4 -0
- package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +3 -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 +47 -40
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +14 -7
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +9 -2
- 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 +9 -1
- package/dist/ai/manifest/components/BbTimePicker.json +5 -2
- package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
- package/dist/ai/manifest/components/BbTree.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -0
- package/dist/ai/manifest/components/FlatListBox.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +3 -2
- package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
- package/dist/ai/manifest/components/ListBox.json +3 -2
- package/dist/ai/manifest/components/ListBox.tree.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +6 -4
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +0 -3
- package/dist/ai/manifest/types.advanced.json +6 -6
- package/dist/ai/manifest/types.api.json +1 -3
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/onboarding.md +1 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/nuxt/onboarding.md +1 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/source/BbAccordion.md +4 -5
- package/dist/ai/source/BbAvatar.md +128 -11
- package/dist/ai/source/BbBadge.md +18 -7
- package/dist/ai/source/BbBreadcrumbs.md +57 -56
- package/dist/ai/source/BbButton.md +41 -25
- package/dist/ai/source/BbCalendar.md +8 -6
- package/dist/ai/source/BbCarousel.md +41 -34
- package/dist/ai/source/BbCheckboxGroup.md +15 -9
- package/dist/ai/source/BbColorInput.md +19 -0
- package/dist/ai/source/BbColorPalette.md +23 -2
- package/dist/ai/source/BbDatePicker.md +18 -0
- package/dist/ai/source/BbDatePickerInput.md +47 -3
- package/dist/ai/source/BbDialog.md +14 -1
- package/dist/ai/source/BbDropdown.md +296 -99
- package/dist/ai/source/BbDropdownButton.md +61 -19
- package/dist/ai/source/BbDropdownGroup.md +189 -98
- package/dist/ai/source/BbGallery.md +82 -60
- package/dist/ai/source/BbHost.md +12 -0
- package/dist/ai/source/BbNumberInput.md +17 -10
- package/dist/ai/source/BbOffCanvas.md +14 -1
- package/dist/ai/source/BbPagination.md +12 -28
- package/dist/ai/source/BbRadioGroup.md +12 -5
- package/dist/ai/source/BbRating.md +4 -4
- package/dist/ai/source/BbSelect.md +151 -112
- package/dist/ai/source/BbSelectPopover.md +244 -29
- package/dist/ai/source/BbSwitchGroup.md +11 -4
- package/dist/ai/source/BbTable.md +114 -35
- package/dist/ai/source/BbTimePicker.md +19 -0
- package/dist/ai/source/BbTimePickerInput.md +21 -2
- package/dist/ai/source/BbToast.md +2 -2
- package/dist/ai/source/BbToastPortal.md +2 -2
- package/dist/ai/source/BbTree.md +1 -1
- package/dist/ai/source/ClearableButton.md +4 -2
- package/dist/ai/source/CommonPopover.md +24 -1
- package/dist/ai/source/ErrorIcon.md +4 -3
- package/dist/ai/source/FlatListBox.md +33 -7
- package/dist/ai/source/GroupedListBox.md +85 -14
- package/dist/ai/source/ListBox.md +11 -1
- package/dist/ai/source/OptionsContainer.md +29 -11
- package/dist/ai/source/WarningIcon.md +4 -3
- package/dist/assets/svgs/close.svg_raw.js +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +35 -34
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +62 -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 +66 -64
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +141 -146
- 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 +240 -239
- package/dist/components/BbCalendar/useDayGrid.js +120 -123
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +503 -502
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
- 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 +208 -196
- package/dist/components/BbColorPalette/types.d.ts +7 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +3 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +84 -73
- package/dist/components/BbDatePicker/types.d.ts +7 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +4 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +496 -510
- package/dist/components/BbDatePickerInput/types.d.ts +7 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +219 -211
- package/dist/components/BbDialog/leaveGhost.js +22 -17
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +106 -100
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +416 -369
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +404 -354
- 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 +117 -102
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +67 -38
- package/dist/components/BbDropdown/normalizeGroups.js +6 -2
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +44 -20
- package/dist/components/BbDropdown/types.d.ts +109 -87
- package/dist/components/BbDropdown/types.js +3 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +3 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +101 -65
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +153 -57
- package/dist/components/BbDropdownButton/types.d.ts +23 -10
- package/dist/components/BbDropdownButton/types.js +4 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +335 -312
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/BbIcon/iconCache.js +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +9 -5
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +152 -144
- package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +138 -136
- package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -4
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -104
- package/dist/components/BbRadioGroup/types.d.ts +4 -7
- package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +100 -99
- package/dist/components/BbSelect/BbSelect.vue.d.ts +32 -20
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +217 -196
- package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
- package/dist/components/BbSelect/types.d.ts +110 -111
- package/dist/components/BbSelect/types.js +1 -27
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +8 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +728 -653
- package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
- package/dist/components/BbSelectPopover/types.d.ts +32 -17
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
- 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 +2 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1171 -1152
- package/dist/components/BbTable/BbTableDataRow.js +97 -90
- package/dist/components/BbTable/types.d.ts +11 -10
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +145 -134
- package/dist/components/BbTimePicker/types.d.ts +7 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +4 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +290 -280
- package/dist/components/BbTimePickerInput/types.d.ts +7 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -78
- package/dist/components/BbToast/types.d.ts +2 -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/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +9 -8
- package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +13 -1
- package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +122 -102
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +182 -153
- 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/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/composables/useInternalIcon.js +25 -0
- package/dist/composables/useItemsGetter.js +34 -32
- package/dist/composables/useOpenModel.js +20 -0
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- 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/icon-scan.d.ts +1 -1
- package/dist/icon-scan.js +68 -61
- package/dist/index.d.ts +2 -2
- package/dist/llms-full.txt +1038 -451
- package/dist/llms-medium.txt +33 -28
- package/dist/llms.txt +2 -2
- package/dist/locale-blueprint.json +2 -0
- package/dist/nuxt.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +2 -3
- package/dist/types/Config.d.ts +8 -1
- package/dist/types/ConfigDefaults.d.ts +10 -2
- package/dist/types/Option.d.ts +10 -0
- package/dist/types/internalIcons.d.ts +89 -0
- package/dist/types/internalIcons.js +158 -0
- package/dist/types/ptComponentMap.d.ts +5 -5
- package/dist/utilities/functions/slotContent.js +19 -0
- package/dist/utils/configDefaults.js +75 -64
- package/dist/utils/iconsOption.js +48 -0
- package/dist/utils/loadRetry.js +8 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +10 -16
- package/dist/vite.js +323 -307
- package/llms.txt +2 -2
- package/package.json +3 -1
- package/scripts/README.md +2 -0
- package/scripts/lib/adoption-checklist.json +1 -1
- package/scripts/lib/agent-setup.mjs +44 -26
- package/scripts/lib/update-install.mjs +48 -0
- package/scripts/lib/validate-bb-markup.mjs +93 -12
- package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
- package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
|
@@ -6,7 +6,11 @@ export interface BbAvatarPtKeys {
|
|
|
6
6
|
*/
|
|
7
7
|
'pt:root'?: PtValue;
|
|
8
8
|
/**
|
|
9
|
-
* The default user glyph — rendered only while there is no image to show
|
|
9
|
+
* The default user glyph — rendered only while there is no image to show, the default slot is not overridden and `name` gives no initials, so it lands nowhere otherwise.
|
|
10
10
|
*/
|
|
11
11
|
'pt:icon'?: PtValue;
|
|
12
|
+
/**
|
|
13
|
+
* The initials from `name` — rendered only while there is no image to show and the default slot is not overridden.
|
|
14
|
+
*/
|
|
15
|
+
'pt:initials'?: PtValue;
|
|
12
16
|
}
|
|
@@ -8,13 +8,15 @@ import { BbAvatarPtKeys } from './ptKeys.generated.js';
|
|
|
8
8
|
*
|
|
9
9
|
* @part root - The avatar frame, with the image or the fallback inside.
|
|
10
10
|
* @part icon - The default user glyph — rendered only while there is no image
|
|
11
|
-
* to show
|
|
12
|
-
* otherwise.
|
|
11
|
+
* to show, the default slot is not overridden and `name` gives no
|
|
12
|
+
* initials, so it lands nowhere otherwise.
|
|
13
|
+
* @part initials - The initials from `name` — rendered only while there is
|
|
14
|
+
* no image to show and the default slot is not overridden.
|
|
13
15
|
*/
|
|
14
|
-
export type BbAvatarPtPart = 'root' | 'icon';
|
|
16
|
+
export type BbAvatarPtPart = 'root' | 'icon' | 'initials';
|
|
15
17
|
/** The runtime lists the resolver is wired with — no states: nothing this component paints is a state. */
|
|
16
18
|
export declare const BB_AVATAR_PT: {
|
|
17
|
-
readonly parts: readonly ["root", "icon"];
|
|
19
|
+
readonly parts: readonly ["root", "icon", "initials"];
|
|
18
20
|
readonly states: readonly [];
|
|
19
21
|
};
|
|
20
22
|
export type BbAvatarProps = Pick<BbIconProps, 'size'> & BbAvatarPtKeys & {
|
|
@@ -24,11 +26,28 @@ export type BbAvatarProps = Pick<BbIconProps, 'size'> & BbAvatarPtKeys & {
|
|
|
24
26
|
*/
|
|
25
27
|
pt?: PtMap<BbAvatarPtPart, never>;
|
|
26
28
|
/**
|
|
27
|
-
* Alternative text for the image, used for accessibility.
|
|
29
|
+
* Alternative text for the image, used for accessibility. Without it
|
|
30
|
+
* the avatar is labelled with `name`.
|
|
28
31
|
*
|
|
29
32
|
* @defaultValue `''`
|
|
30
33
|
*/
|
|
31
34
|
alt?: ImgHTMLAttributes['alt'];
|
|
35
|
+
/**
|
|
36
|
+
* The person's name. With no image and no default slot, the avatar
|
|
37
|
+
* shows its initials (first letters of the first and last word; none:
|
|
38
|
+
* the person icon). Also the accessible name when `alt` is empty, and
|
|
39
|
+
* the input of `color`.
|
|
40
|
+
*/
|
|
41
|
+
name?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Paints the fallback (initials or icon). `true`: a palette colour
|
|
44
|
+
* picked from `name`, stable across renders and the server. A string:
|
|
45
|
+
* any CSS colour or `var()` as the background, with black or white
|
|
46
|
+
* ink, whichever reads. Unset: the primary colour.
|
|
47
|
+
*
|
|
48
|
+
* @defaultValue `false`
|
|
49
|
+
*/
|
|
50
|
+
color?: boolean | string;
|
|
32
51
|
/**
|
|
33
52
|
* Source URL of the avatar image.
|
|
34
53
|
*/
|
|
@@ -1,48 +1,49 @@
|
|
|
1
1
|
import e from "../BbIcon/BbIcon.vue.js";
|
|
2
2
|
import t from "../BbSpinner/BbSpinner.vue.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { SlotNodes as n } from "../../utilities/functions/slotContent.js";
|
|
4
|
+
import { useLogger as r } from "../../composables/useLogger.js";
|
|
5
|
+
import { useBadgeHost as i } from "./badgeButtonContext.js";
|
|
6
|
+
import { Fragment as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createVNode as u, defineComponent as d, mergeProps as f, openBlock as p, renderSlot as m, unref as h } from "vue";
|
|
6
7
|
// src/components/BbBadge/BadgeBodyContent.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
8
|
+
var g = /*@__PURE__*/ d({
|
|
8
9
|
__name: "BadgeBodyContent",
|
|
9
|
-
setup(
|
|
10
|
-
let
|
|
11
|
-
return (
|
|
10
|
+
setup(d) {
|
|
11
|
+
let g = i() ?? r().throw("[BbBadge] internal body renderer mounted outside a badge — this is a bug."), _ = () => g.iconNodes("prepend") ?? (g.prependIcon.value ? void 0 : g.iconNodes("append")), v = () => g.prependIcon.value ?? g.appendIcon.value;
|
|
12
|
+
return (r, i) => h(g).iconOnly.value ? (p(), c(a, { key: 0 }, [h(g).loading.value ? (p(), o(t, f({
|
|
12
13
|
key: 0,
|
|
13
14
|
class: "bb-badge__spinner bb-badge__icon"
|
|
14
|
-
}, g
|
|
15
|
+
}, h(g).passthrough.spinner), null, 16)) : _() ? (p(), c("span", f({
|
|
15
16
|
key: 1,
|
|
16
17
|
class: "bb-badge__icon bb-badge__icon-slot"
|
|
17
|
-
}, g
|
|
18
|
+
}, h(g).passthrough.icon), [u(h(n), { nodes: _() }, null, 8, ["nodes"])], 16)) : v() ? (p(), o(e, f({
|
|
18
19
|
key: 2,
|
|
19
20
|
class: "bb-badge__icon",
|
|
20
|
-
icon:
|
|
21
|
-
}, g
|
|
22
|
-
g
|
|
21
|
+
icon: v()
|
|
22
|
+
}, h(g).passthrough.icon), null, 16, ["icon"])) : s("", !0), l("span", f({ class: "bb-badge__text bb-sr-only" }, h(g).passthrough.text), [m(r.$slots, "default")], 16)], 64)) : (p(), c(a, { key: 1 }, [
|
|
23
|
+
h(g).spinnerLeads.value ? (p(), o(t, f({
|
|
23
24
|
key: 0,
|
|
24
25
|
class: "bb-badge__spinner bb-badge__prepend-icon"
|
|
25
|
-
}, g
|
|
26
|
+
}, h(g).passthrough.spinner), null, 16)) : h(g).iconNodes("prepend") ? (p(), c("span", f({
|
|
26
27
|
key: 1,
|
|
27
28
|
class: "bb-badge__prepend-icon bb-badge__icon-slot"
|
|
28
|
-
}, g
|
|
29
|
+
}, h(g).passthrough.icon), [u(h(n), { nodes: h(g).iconNodes("prepend") }, null, 8, ["nodes"])], 16)) : h(g).prependIcon.value ? (p(), o(e, f({
|
|
29
30
|
key: 2,
|
|
30
31
|
class: "bb-badge__prepend-icon",
|
|
31
|
-
icon: g
|
|
32
|
-
}, g
|
|
33
|
-
|
|
34
|
-
g
|
|
32
|
+
icon: h(g).prependIcon.value
|
|
33
|
+
}, h(g).passthrough.icon), null, 16, ["icon"])) : s("", !0),
|
|
34
|
+
l("span", f({ class: "bb-badge__text" }, h(g).passthrough.text), [m(r.$slots, "default")], 16),
|
|
35
|
+
h(g).clearable.value ? s("", !0) : (p(), c(a, { key: 3 }, [h(g).spinnerTrails.value ? (p(), o(t, f({
|
|
35
36
|
key: 0,
|
|
36
37
|
class: "bb-badge__append-icon"
|
|
37
|
-
}, g
|
|
38
|
+
}, h(g).passthrough.spinner), null, 16)) : h(g).iconNodes("append") ? (p(), c("span", f({
|
|
38
39
|
key: 1,
|
|
39
40
|
class: "bb-badge__append-icon bb-badge__icon-slot"
|
|
40
|
-
}, g
|
|
41
|
+
}, h(g).passthrough.icon), [u(h(n), { nodes: h(g).iconNodes("append") }, null, 8, ["nodes"])], 16)) : h(g).appendIcon.value ? (p(), o(e, f({
|
|
41
42
|
key: 2,
|
|
42
43
|
class: "bb-badge__append-icon",
|
|
43
|
-
icon: g
|
|
44
|
-
}, g
|
|
44
|
+
icon: h(g).appendIcon.value
|
|
45
|
+
}, h(g).passthrough.icon), null, 16, ["icon"])) : s("", !0)], 64))
|
|
45
46
|
], 64));
|
|
46
47
|
}
|
|
47
48
|
});
|
|
48
|
-
export {
|
|
49
|
+
export { g as default };
|
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
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
|
-
import { useLogger as
|
|
5
|
-
import { removedPropsFor as
|
|
4
|
+
import { useLogger as r } from "../../composables/useLogger.js";
|
|
5
|
+
import { removedPropsFor as ee } from "../../deprecation/removedProps.js";
|
|
6
6
|
import { warnRemovedAttrs as te } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
7
7
|
import i from "../BbIcon/BbIcon.vue.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
8
|
+
import a from "../BbSpinner/BbSpinner.vue.js";
|
|
9
|
+
import { SlotNodes as o, slotContent as s } from "../../utilities/functions/slotContent.js";
|
|
10
|
+
import c from "./BadgeBodyContent.vue.js";
|
|
11
|
+
import l from "./BbBadgeButton.vue.js";
|
|
12
|
+
import { provideBadgeHost as u } from "./badgeButtonContext.js";
|
|
13
|
+
import ne from "../../assets/svgs/clear.svg_raw.js";
|
|
14
|
+
import { BB_BADGE_PT as d } from "./types.js";
|
|
15
|
+
import { usePassthrough as re, variantPt as f } from "../../composables/usePassthrough.js";
|
|
16
|
+
import { useInternalIcon as p } from "../../composables/useInternalIcon.js";
|
|
17
|
+
import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as ie, createVNode as b, defineComponent as x, isVNode as ae, mergeProps as S, openBlock as C, renderSlot as w, shallowRef as oe, toDisplayString as T, unref as E, useAttrs as D, useSlots as O, withCtx as k, withModifiers as A } from "vue";
|
|
16
18
|
// src/components/BbBadge/BbBadge.vue?vue&type=script&setup=true&lang.ts
|
|
17
|
-
var
|
|
19
|
+
var j = ["id"], M = {
|
|
18
20
|
key: 2,
|
|
19
21
|
class: "bb-badge__trailing"
|
|
20
|
-
},
|
|
22
|
+
}, N = [
|
|
21
23
|
"id",
|
|
22
24
|
"aria-label",
|
|
23
25
|
"aria-labelledby"
|
|
24
|
-
],
|
|
26
|
+
], P = {
|
|
25
27
|
key: 3,
|
|
26
28
|
class: "bb-sr-only"
|
|
27
|
-
},
|
|
28
|
-
mixins: [d
|
|
29
|
+
}, F = /*@__PURE__*/ x({
|
|
30
|
+
mixins: [f(d)],
|
|
29
31
|
inheritAttrs: !1,
|
|
30
32
|
__name: "BbBadge",
|
|
31
33
|
props: {
|
|
@@ -80,27 +82,27 @@ var M = ["id"], N = {
|
|
|
80
82
|
variant: { default: void 0 }
|
|
81
83
|
},
|
|
82
84
|
emits: ["click:clear"],
|
|
83
|
-
setup(
|
|
84
|
-
let I =
|
|
85
|
+
setup(f, { emit: x }) {
|
|
86
|
+
let F = f, I = x, L = O(), R = p("clear", ne), z = e("BbBadge", F, {
|
|
85
87
|
size: "md",
|
|
86
88
|
variant: "primary"
|
|
87
|
-
}), B =
|
|
89
|
+
}), B = oe(null), V = re({
|
|
88
90
|
component: "BbBadge",
|
|
89
|
-
attrs:
|
|
90
|
-
props:
|
|
91
|
-
parts:
|
|
92
|
-
states:
|
|
91
|
+
attrs: D(),
|
|
92
|
+
props: F,
|
|
93
|
+
parts: d.parts,
|
|
94
|
+
states: d.states,
|
|
93
95
|
active: {
|
|
94
|
-
loading: () => !!
|
|
96
|
+
loading: () => !!F.loading,
|
|
95
97
|
activeLink: () => !!B.value?.value.activeLink,
|
|
96
98
|
exactActiveLink: () => !!B.value?.value.exactActiveLink
|
|
97
99
|
},
|
|
98
100
|
variant: {
|
|
99
|
-
...
|
|
101
|
+
...d.variant,
|
|
100
102
|
current: () => z.variant
|
|
101
103
|
}
|
|
102
104
|
});
|
|
103
|
-
process.env.NODE_ENV !== "production" && te("BbBadge",
|
|
105
|
+
process.env.NODE_ENV !== "production" && te("BbBadge", ee("BbBadge"));
|
|
104
106
|
let H = [
|
|
105
107
|
"xs",
|
|
106
108
|
"sm",
|
|
@@ -108,7 +110,7 @@ var M = ["id"], N = {
|
|
|
108
110
|
"lg",
|
|
109
111
|
"xl",
|
|
110
112
|
"2xl"
|
|
111
|
-
], { t: U } = n(), W =
|
|
113
|
+
], { t: U } = n(), W = r(), G = h(() => {
|
|
112
114
|
let e = z.size, t = typeof e == "object" && e ? {
|
|
113
115
|
default: "md",
|
|
114
116
|
...e
|
|
@@ -117,96 +119,96 @@ var M = ["id"], N = {
|
|
|
117
119
|
let n = t ?? "md";
|
|
118
120
|
return H.includes(n) || (W.warn(`Invalid size: "${n}" in BbBadge. Expected one of: ${H.join(", ")}. Falling back to "md".`), n = "md"), e === "default" ? `bb-badge--${n}` : `bb-badge--${e}-${n}`;
|
|
119
121
|
});
|
|
120
|
-
}), K = () =>
|
|
122
|
+
}), K = () => F.iconOnly === !0, q = [
|
|
121
123
|
"default",
|
|
122
124
|
"sm",
|
|
123
125
|
"md",
|
|
124
126
|
"lg",
|
|
125
127
|
"xl",
|
|
126
128
|
"2xl"
|
|
127
|
-
],
|
|
128
|
-
let e =
|
|
129
|
+
], se = () => {
|
|
130
|
+
let e = F.iconOnly;
|
|
129
131
|
if (!e || e === !0) return [];
|
|
130
132
|
let t = !!e.default;
|
|
131
133
|
return q.flatMap((n) => (n !== "default" && e[n] !== void 0 && (t = !!e[n]), t ? [`bb-badge--icon-${n}`] : []));
|
|
132
|
-
},
|
|
134
|
+
}, J = (e) => s(L[`${e}:icon`], Y()), ce = () => !!F["prepend:icon"] || !!J("prepend"), le = () => !!F["append:icon"] || !!J("append"), Y = () => ({
|
|
133
135
|
activeLink: !!B.value?.value.activeLink,
|
|
134
136
|
exactActiveLink: !!B.value?.value.exactActiveLink,
|
|
135
|
-
loading: !!
|
|
136
|
-
}), X = () =>
|
|
137
|
-
|
|
137
|
+
loading: !!F.loading
|
|
138
|
+
}), X = () => le() && !ce(), Z = (e) => Array.isArray(e) && e.some((e) => ae(e) && (e.type === l || e.type === m && Z(e.children))), Q = () => Z(L.default?.({}));
|
|
139
|
+
u({
|
|
138
140
|
passthrough: V,
|
|
139
141
|
iconOnly: { get value() {
|
|
140
142
|
return K();
|
|
141
143
|
} },
|
|
142
|
-
|
|
144
|
+
iconNodes: J,
|
|
143
145
|
iconScope: { get value() {
|
|
144
146
|
return Y();
|
|
145
147
|
} },
|
|
146
148
|
prependIcon: { get value() {
|
|
147
|
-
return
|
|
149
|
+
return F["prepend:icon"];
|
|
148
150
|
} },
|
|
149
151
|
appendIcon: { get value() {
|
|
150
|
-
return
|
|
152
|
+
return F["append:icon"];
|
|
151
153
|
} },
|
|
152
154
|
loading: { get value() {
|
|
153
|
-
return !!
|
|
155
|
+
return !!F.loading;
|
|
154
156
|
} },
|
|
155
157
|
spinnerLeads: { get value() {
|
|
156
|
-
return !!
|
|
158
|
+
return !!F.loading && !X();
|
|
157
159
|
} },
|
|
158
160
|
spinnerTrails: { get value() {
|
|
159
|
-
return !!
|
|
161
|
+
return !!F.loading && X();
|
|
160
162
|
} },
|
|
161
163
|
clearable: { get value() {
|
|
162
|
-
return !!
|
|
164
|
+
return !!F.clearable;
|
|
163
165
|
} },
|
|
164
166
|
reportLink: (e) => {
|
|
165
167
|
B.value = e;
|
|
166
168
|
}
|
|
167
169
|
});
|
|
168
|
-
let
|
|
170
|
+
let ue = h(() => [
|
|
169
171
|
"bb-badge",
|
|
170
172
|
...G.value,
|
|
171
|
-
...
|
|
173
|
+
...se(),
|
|
172
174
|
z.variant && z.variant !== "none" && `bb-badge--${z.variant}`,
|
|
173
175
|
{
|
|
174
176
|
"bb-badge--icon": K(),
|
|
175
|
-
"bb-badge--clearable":
|
|
176
|
-
"bb-badge--loading":
|
|
177
|
+
"bb-badge--clearable": F.clearable,
|
|
178
|
+
"bb-badge--loading": F.loading
|
|
177
179
|
}
|
|
178
|
-
]), $ = t().id,
|
|
179
|
-
|
|
180
|
+
]), $ = t().id, de = h(() => F.clearableLabel || Q() ? void 0 : `${$.value}__clear ${$.value}__body`), fe = (e) => {
|
|
181
|
+
I("click:clear", e);
|
|
180
182
|
};
|
|
181
|
-
return (e, t) => (
|
|
182
|
-
Q() ?
|
|
183
|
+
return (e, t) => (C(), v("span", S({ class: ue.value }, E(V).rootAttrs), [
|
|
184
|
+
Q() ? w(e.$slots, "default", {}, void 0, void 0, 0) : (C(), v("span", {
|
|
183
185
|
key: 1,
|
|
184
|
-
id: `${
|
|
186
|
+
id: `${E($)}__body`,
|
|
185
187
|
class: "bb-badge__body"
|
|
186
|
-
}, [
|
|
187
|
-
default:
|
|
188
|
+
}, [b(c, null, {
|
|
189
|
+
default: k(() => [w(e.$slots, "default", {}, () => [ie(T(F.text), 1)])]),
|
|
188
190
|
_: 3
|
|
189
|
-
})], 8,
|
|
190
|
-
|
|
191
|
+
})], 8, j)),
|
|
192
|
+
F.clearable ? (C(), v("span", M, [K() ? _("", !0) : (C(), v(m, { key: 0 }, [F.loading && X() ? (C(), g(a, S({
|
|
191
193
|
key: 0,
|
|
192
194
|
class: "bb-badge__spinner bb-badge__append-icon"
|
|
193
|
-
},
|
|
195
|
+
}, E(V).spinner), null, 16)) : J("append") ? (C(), v("span", S({
|
|
194
196
|
key: 1,
|
|
195
197
|
class: "bb-badge__append-icon bb-badge__icon-slot"
|
|
196
|
-
},
|
|
198
|
+
}, E(V).icon), [b(E(o), { nodes: J("append") }, null, 8, ["nodes"])], 16)) : F["append:icon"] ? (C(), g(i, S({
|
|
197
199
|
key: 2,
|
|
198
200
|
class: "bb-badge__append-icon",
|
|
199
|
-
icon:
|
|
200
|
-
},
|
|
201
|
-
id: `${
|
|
202
|
-
"aria-label":
|
|
203
|
-
"aria-labelledby":
|
|
201
|
+
icon: F["append:icon"]
|
|
202
|
+
}, E(V).icon), null, 16, ["icon"])) : _("", !0)], 64)), y("button", S({
|
|
203
|
+
id: `${E($)}__clear`,
|
|
204
|
+
"aria-label": F.clearableLabel || E(U)("badge.clearLabel").value,
|
|
205
|
+
"aria-labelledby": de.value,
|
|
204
206
|
class: "bb-badge__clear",
|
|
205
207
|
type: "button",
|
|
206
|
-
onClick:
|
|
207
|
-
},
|
|
208
|
-
|
|
208
|
+
onClick: A(fe, ["stop"])
|
|
209
|
+
}, E(V).clear), [b(i, { icon: E(R) }, null, 8, ["icon"])], 16, N)])) : _("", !0),
|
|
210
|
+
F.loading ? (C(), v("span", P, T(E(U)("common.loadingText")), 1)) : _("", !0)
|
|
209
211
|
], 16));
|
|
210
212
|
}
|
|
211
213
|
});
|
|
212
|
-
export {
|
|
214
|
+
export { F as default };
|