bitboss-ui 3.0.0-beta.2 → 3.0.0-beta.21
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 +72 -33
- package/dist/ai/BbAccordion.md +3 -3
- package/dist/ai/BbAlert.md +9 -5
- package/dist/ai/BbAsterisk.md +17 -0
- package/dist/ai/BbAvatar.md +12 -3
- package/dist/ai/BbBadge.md +15 -10
- package/dist/ai/BbBadgeButton.md +16 -16
- package/dist/ai/BbBaseButton.md +16 -16
- package/dist/ai/BbBaseCheckbox.md +8 -8
- package/dist/ai/BbBaseCheckboxGroup.md +13 -13
- package/dist/ai/BbBaseCheckboxIcon.md +26 -9
- package/dist/ai/BbBaseColorInput.md +11 -11
- package/dist/ai/BbBaseDatePicker.md +6 -6
- package/dist/ai/BbBaseDatePickerInput.md +15 -15
- package/dist/ai/BbBaseInputContainer.md +12 -12
- package/dist/ai/BbBaseNumberInput.md +8 -8
- package/dist/ai/BbBaseRadio.md +5 -5
- package/dist/ai/BbBaseRadioGroup.md +7 -7
- package/dist/ai/BbBaseRadioIcon.md +25 -9
- package/dist/ai/BbBaseRating.md +5 -5
- package/dist/ai/BbBaseSelect.md +22 -21
- package/dist/ai/BbBaseSlider.md +9 -9
- package/dist/ai/BbBaseSwitch.md +8 -8
- package/dist/ai/BbBaseSwitchGroup.md +13 -13
- package/dist/ai/BbBaseSwitchIcon.md +28 -10
- package/dist/ai/BbBaseTag.md +10 -10
- package/dist/ai/BbBaseTextInput.md +9 -9
- package/dist/ai/BbBaseTextarea.md +9 -9
- package/dist/ai/BbBaseTimePickerInput.md +13 -13
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +15 -15
- package/dist/ai/BbCheckbox.md +18 -17
- package/dist/ai/BbCheckboxGroup.md +15 -14
- package/dist/ai/BbCollapsible.md +11 -9
- package/dist/ai/BbColorInput.md +15 -15
- package/dist/ai/BbColorPalette.md +12 -6
- package/dist/ai/BbConfirm.md +12 -5
- package/dist/ai/BbDatePicker.md +13 -13
- package/dist/ai/BbDatePickerInput.md +20 -20
- package/dist/ai/BbDialog.md +78 -12
- package/dist/ai/BbDropdown.md +132 -22
- package/dist/ai/BbDropdownButton.md +12 -12
- package/dist/ai/BbDropdownGroup.md +1 -1
- package/dist/ai/BbDropzone.md +4 -4
- package/dist/ai/BbForm.md +49 -14
- package/dist/ai/BbIcon.md +6 -0
- package/dist/ai/BbIndicator.md +5 -5
- package/dist/ai/BbNumberInput.md +11 -11
- package/dist/ai/BbOffCanvas.md +90 -20
- package/dist/ai/BbPagination.md +3 -3
- package/dist/ai/BbPopover.md +32 -17
- package/dist/ai/BbProgress.md +7 -4
- package/dist/ai/BbRadio.md +16 -15
- package/dist/ai/BbRadioGroup.md +20 -17
- package/dist/ai/BbRating.md +11 -11
- package/dist/ai/BbSelect.md +138 -37
- package/dist/ai/BbSelectPopover.md +40 -41
- package/dist/ai/BbSlider.md +37 -22
- package/dist/ai/BbSmoothHeight.md +1 -1
- package/dist/ai/BbSwitch.md +25 -10
- package/dist/ai/BbSwitchGroup.md +17 -14
- package/dist/ai/BbTable.md +920 -109
- package/dist/ai/BbTabs.md +28 -14
- package/dist/ai/BbTabsList.md +1 -1
- package/dist/ai/BbTabsPanes.md +1 -1
- package/dist/ai/BbTabsRoot.md +10 -10
- package/dist/ai/BbTag.md +14 -14
- package/dist/ai/BbTextInput.md +16 -15
- package/dist/ai/BbTextarea.md +13 -13
- package/dist/ai/BbTimePicker.md +10 -10
- package/dist/ai/BbTimePickerInput.md +17 -17
- package/dist/ai/BbToast.md +1 -1
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/BbTooltip.md +12 -10
- package/dist/ai/BbTree.md +1 -1
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/CommonInputWrapper.md +10 -10
- package/dist/ai/CommonPopover.md +6 -6
- package/dist/ai/FlatListBox.md +5 -5
- package/dist/ai/GroupedListBox.md +5 -5
- package/dist/ai/ListBox.md +4 -4
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +128 -2
- package/dist/ai/components.json +917 -100
- package/dist/ai/composables/useBbConfig.md +72 -11
- package/dist/ai/composables/useConfirm.md +5 -3
- package/dist/ai/guides/ai-router.md +9 -4
- package/dist/ai/guides/component-picker.md +18 -18
- package/dist/ai/guides/design-language.md +14 -14
- package/dist/ai/guides/design-tokens.md +25 -18
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +11 -5
- package/dist/ai/guides/installation-and-plugin-setup.md +85 -23
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +30 -0
- package/dist/ai/guides/migration/components/bb-checkbox.md +37 -3
- package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
- package/dist/ai/guides/migration/components/bb-dialog.md +62 -34
- package/dist/ai/guides/migration/components/bb-offcanvas.md +29 -13
- package/dist/ai/guides/migration/components/bb-rating.md +8 -2
- package/dist/ai/guides/migration/components/bb-select.md +5 -2
- package/dist/ai/guides/migration/components/bb-table.md +560 -28
- package/dist/ai/guides/migration/components/bb-text-input.md +6 -6
- package/dist/ai/guides/migration/v2-to-v3.md +260 -89
- package/dist/ai/guides/ssr-prefill.md +120 -0
- package/dist/ai/index.md +10 -9
- package/dist/ai/recipes/inertia/approvals-inbox.md +0 -1
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/inertia/layout-scaffold.md +5 -1
- package/dist/ai/recipes/inertia/ownership-atlas.md +49 -29
- package/dist/ai/recipes/inertia/record-form.md +0 -1
- package/dist/ai/recipes/inertia/records-workspace.md +26 -8
- package/dist/ai/recipes/inertia/upload-center.md +0 -1
- package/dist/ai/recipes/nuxt/approvals-inbox.md +0 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -1
- package/dist/ai/recipes/nuxt/record-form.md +0 -1
- package/dist/ai/recipes/nuxt/records-workspace.md +26 -8
- package/dist/ai/recipes/nuxt/upload-center.md +0 -1
- package/dist/ai/recipes/vue/approvals-inbox.md +0 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -1
- package/dist/ai/recipes/vue/records-workspace.md +26 -8
- package/dist/ai/recipes/vue/upload-center.md +0 -1
- package/dist/ai/source/BbAlert.md +60 -2
- package/dist/ai/source/BbAvatar.md +3 -3
- package/dist/ai/source/BbBadge.md +60 -15
- package/dist/ai/source/BbBadgeButton.md +8 -2
- package/dist/ai/source/BbBaseButton.md +3 -1
- package/dist/ai/source/BbBaseCheckboxGroup.md +6 -2
- package/dist/ai/source/BbBaseDatePicker.md +3 -1
- package/dist/ai/source/BbBaseDatePickerInput.md +5 -1
- package/dist/ai/source/BbBaseInputContainer.md +52 -1
- package/dist/ai/source/BbBaseRadioGroup.md +4 -0
- package/dist/ai/source/BbBaseRating.md +3 -1
- package/dist/ai/source/BbBaseSelect.md +71 -16
- package/dist/ai/source/BbBaseSwitchGroup.md +4 -0
- package/dist/ai/source/BbBaseTimePickerInput.md +5 -1
- package/dist/ai/source/BbBreadcrumbs.md +31 -0
- package/dist/ai/source/BbButton.md +51 -24
- package/dist/ai/source/BbCheckbox.md +15 -1
- package/dist/ai/source/BbCheckboxGroup.md +2 -1
- package/dist/ai/source/BbCollapsible.md +7 -1
- package/dist/ai/source/BbColorInput.md +3 -4
- package/dist/ai/source/BbColorPalette.md +3 -4
- package/dist/ai/source/BbDatePicker.md +5 -1
- package/dist/ai/source/BbDatePickerInput.md +5 -1
- package/dist/ai/source/BbDialog.md +175 -19
- package/dist/ai/source/BbDropdown.md +376 -69
- package/dist/ai/source/BbDropdownGroup.md +330 -59
- package/dist/ai/source/BbForm.md +93 -5
- package/dist/ai/source/BbIcon.md +46 -36
- package/dist/ai/source/BbNumberInput.md +3 -4
- package/dist/ai/source/BbOffCanvas.md +474 -194
- package/dist/ai/source/BbPopover.md +24 -17
- package/dist/ai/source/BbProgress.md +2 -2
- package/dist/ai/source/BbRadio.md +15 -1
- package/dist/ai/source/BbRadioGroup.md +3 -1
- package/dist/ai/source/BbSelect.md +50 -2
- package/dist/ai/source/BbSelectPopover.md +171 -23
- package/dist/ai/source/BbSlider.md +3 -4
- package/dist/ai/source/BbSwitch.md +15 -1
- package/dist/ai/source/BbSwitchGroup.md +8 -5
- package/dist/ai/source/BbTable.md +5092 -1446
- package/dist/ai/source/BbTabs.md +6 -7
- package/dist/ai/source/BbTabsList.md +6 -7
- package/dist/ai/source/BbTabsPanes.md +6 -7
- package/dist/ai/source/BbTabsRoot.md +6 -7
- package/dist/ai/source/BbTag.md +3 -4
- package/dist/ai/source/BbTextInput.md +3 -4
- package/dist/ai/source/BbTextarea.md +3 -4
- package/dist/ai/source/BbTimePicker.md +4 -1
- package/dist/ai/source/BbTimePickerInput.md +5 -1
- package/dist/ai/source/BbToast.md +3 -1
- package/dist/ai/source/BbTooltip.md +5 -1
- package/dist/ai/source/CommonInputWrapper.md +4 -0
- package/dist/ai/source/CommonPopover.md +6 -0
- package/dist/ai/source/FlatListBox.md +11 -5
- package/dist/ai/source/GroupedListBox.md +7 -5
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbAlert/types.d.ts +10 -1
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +33 -33
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +22 -16
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +36 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +21 -8
- package/dist/components/BbBadge/types.d.ts +8 -2
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +47 -47
- package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue_vue_type_script_setup_true_lang.js +30 -28
- package/dist/components/BbBaseCheckboxGroup/types.d.ts +2 -2
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +167 -167
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +9 -9
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +78 -78
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +64 -64
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +138 -138
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +24 -22
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +40 -40
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +74 -65
- package/dist/components/BbBaseSelect/types.d.ts +22 -0
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue_vue_type_script_setup_true_lang.js +30 -28
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.d.ts +1 -1
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +104 -104
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +35 -35
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +85 -81
- package/dist/components/BbCheckboxGroup/types.d.ts +2 -1
- package/dist/components/BbCollapsible/types.d.ts +7 -1
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -2
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +50 -50
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +100 -100
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +21 -21
- package/dist/components/BbDialog/BbDialog.vue.d.ts +1 -1
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +133 -107
- package/dist/components/BbDialog/types.d.ts +29 -2
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +2 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +99 -100
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +2 -2
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +208 -201
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +225 -208
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +21 -21
- package/dist/components/BbDropdown/types.d.ts +20 -5
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +46 -46
- package/dist/components/BbIcon/iconCache.d.ts +33 -0
- package/dist/components/BbIcon/iconCache.js +17 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +254 -208
- package/dist/components/BbOffCanvas/types.d.ts +30 -5
- package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
- package/dist/components/BbPopover/BbPopover.vue.d.ts +2 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +149 -146
- package/dist/components/BbPopover/types.d.ts +3 -2
- package/dist/components/BbRadioGroup/types.d.ts +3 -1
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +27 -23
- package/dist/components/BbSelect/types.d.ts +32 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +221 -213
- package/dist/components/BbSlider/BbSlider.vue.d.ts +1 -1
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +20 -20
- package/dist/components/BbTable/BbTable.vue.d.ts +10 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1433 -600
- package/dist/components/BbTable/BbTableDataRow.d.ts +162 -0
- package/dist/components/BbTable/BbTableDataRow.js +136 -0
- package/dist/components/BbTable/BbTableExpandRow.d.ts +73 -0
- package/dist/components/BbTable/BbTableExpandRow.js +52 -0
- package/dist/components/BbTable/types.d.ts +324 -111
- package/dist/components/BbTable/utils.d.ts +92 -4
- package/dist/components/BbTable/utils.js +71 -36
- package/dist/components/BbTabs/types.d.ts +0 -8
- package/dist/components/BbTag/BbTag.vue.d.ts +1 -1
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +54 -54
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +80 -80
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +61 -61
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/components/BbTooltip/types.d.ts +5 -1
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +83 -83
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +56 -56
- package/dist/composables/useBaseOptions.js +30 -20
- package/dist/composables/useBbConfig.d.ts +27 -6
- package/dist/composables/useBbConfig.js +8 -2
- package/dist/composables/useConfig.d.ts +59 -0
- package/dist/composables/useConfig.js +9 -0
- package/dist/composables/useItemsGetter.d.ts +11 -0
- package/dist/composables/useItemsGetter.js +44 -18
- package/dist/composables/useLocale.js +10 -7
- package/dist/composables/useMobile.js +5 -5
- package/dist/composables/usePrefill.d.ts +21 -2
- package/dist/composables/usePrefill.js +25 -19
- package/dist/composables/useSsrState.d.ts +20 -0
- package/dist/composables/useSsrState.js +13 -0
- package/dist/composables/useTableWidthContext.d.ts +24 -4
- package/dist/composables/useTableWidthContext.js +31 -28
- package/dist/composables/useToast.js +5 -5
- package/dist/deprecation/ai-deprecations.json.d.ts +121 -11
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.d.ts +15 -4
- package/dist/directives/bbDropdown.js +31 -9
- package/dist/directives/createPopoverDirective.d.ts +62 -0
- package/dist/directives/createPopoverDirective.js +63 -23
- package/dist/i18n/locales/cs.json +4 -1
- package/dist/i18n/locales/da.json +4 -1
- package/dist/i18n/locales/de.json +4 -1
- package/dist/i18n/locales/el.json +4 -1
- package/dist/i18n/locales/en.json +4 -1
- package/dist/i18n/locales/es.json +4 -1
- package/dist/i18n/locales/fi.json +4 -1
- package/dist/i18n/locales/fr.json +4 -1
- package/dist/i18n/locales/hu.json +4 -1
- package/dist/i18n/locales/it.json +4 -1
- package/dist/i18n/locales/ja.json +4 -1
- package/dist/i18n/locales/ko.json +4 -1
- package/dist/i18n/locales/nb.json +4 -1
- package/dist/i18n/locales/nl.json +4 -1
- package/dist/i18n/locales/pl.json +4 -1
- package/dist/i18n/locales/pt.json +4 -1
- package/dist/i18n/locales/ro.json +4 -1
- package/dist/i18n/locales/ru.json +4 -1
- package/dist/i18n/locales/sv.json +4 -1
- package/dist/i18n/locales/tr.json +4 -1
- package/dist/i18n/locales/uk.json +4 -1
- package/dist/i18n/locales/zh-cn.json +4 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +69 -67
- package/dist/llms-full.txt +3997 -1458
- package/dist/llms-medium.txt +140 -73
- package/dist/llms.txt +7 -6
- package/dist/locale-blueprint.json +4 -1
- package/dist/nuxt-auto-imports.d.ts +100 -0
- package/dist/nuxt-auto-imports.js +55 -0
- package/dist/nuxt-module.d.ts +22 -1
- package/dist/nuxt.js +22 -8
- package/dist/plugin.d.ts +10 -1
- package/dist/plugin.js +20 -19
- package/dist/runtime/nuxt-plugin.js +28 -21
- package/dist/styles.css +1 -1
- package/dist/utilities/misc/listboxMetrics.d.ts +3 -3
- package/dist/utilities/misc/listboxMetrics.js +2 -2
- package/dist/utilities/misc/ssrStateInjectionKey.d.ts +42 -0
- package/dist/utilities/misc/ssrStateInjectionKey.js +4 -0
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +45 -27
- package/dist/validated/BbSelect.vue.d.ts +2 -0
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/validated/useValidatedField.js +25 -23
- package/dist/vite.js +7 -3
- package/llms.txt +8 -7
- package/package.json +2 -2
- package/scripts/lib/eslint-plugin.d.ts +19 -1
- package/scripts/lib/eslint-plugin.mjs +155 -14
- package/scripts/lib/html-attributes.mjs +91 -0
- package/scripts/lib/validate-bb-markup.mjs +59 -11
- package/dist/assets/svgs/sort.svg_raw.js +0 -4
- package/dist/components/BbBadge/BadgeAppendIcon.vue.d.ts +0 -3
- package/dist/components/BbBadge/BadgeAppendIcon.vue.js +0 -5
- package/dist/components/BbBadge/BadgeAppendIcon.vue_vue_type_script_setup_true_lang.js +0 -22
package/dist/ai/source/BbTabs.md
CHANGED
|
@@ -150,13 +150,12 @@ export type BbTabsInertiaOptions = {
|
|
|
150
150
|
| boolean
|
|
151
151
|
| ((props: Record<string, unknown>) => boolean)
|
|
152
152
|
| null;
|
|
153
|
-
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* walking the user backwards through every tab they visited.
|
|
153
|
+
/*
|
|
154
|
+
* Documented on `BbTabsProps.replace` — NOT a JSDoc block here on purpose.
|
|
155
|
+
* `BbTabsProps` and `BbTabsItem` both intersect this type and re-declare
|
|
156
|
+
* `replace`, and vue-component-meta CONCATENATES the JSDoc of every
|
|
157
|
+
* declaration it sees, so a doc comment in both places publishes the same
|
|
158
|
+
* paragraph twice in the API table. Keep prose on the concrete surface.
|
|
160
159
|
*/
|
|
161
160
|
replace?: boolean;
|
|
162
161
|
};
|
|
@@ -325,13 +325,12 @@ export type BbTabsInertiaOptions = {
|
|
|
325
325
|
| boolean
|
|
326
326
|
| ((props: Record<string, unknown>) => boolean)
|
|
327
327
|
| null;
|
|
328
|
-
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
*
|
|
334
|
-
* walking the user backwards through every tab they visited.
|
|
328
|
+
/*
|
|
329
|
+
* Documented on `BbTabsProps.replace` — NOT a JSDoc block here on purpose.
|
|
330
|
+
* `BbTabsProps` and `BbTabsItem` both intersect this type and re-declare
|
|
331
|
+
* `replace`, and vue-component-meta CONCATENATES the JSDoc of every
|
|
332
|
+
* declaration it sees, so a doc comment in both places publishes the same
|
|
333
|
+
* paragraph twice in the API table. Keep prose on the concrete surface.
|
|
335
334
|
*/
|
|
336
335
|
replace?: boolean;
|
|
337
336
|
};
|
|
@@ -115,13 +115,12 @@ export type BbTabsInertiaOptions = {
|
|
|
115
115
|
| boolean
|
|
116
116
|
| ((props: Record<string, unknown>) => boolean)
|
|
117
117
|
| null;
|
|
118
|
-
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* walking the user backwards through every tab they visited.
|
|
118
|
+
/*
|
|
119
|
+
* Documented on `BbTabsProps.replace` — NOT a JSDoc block here on purpose.
|
|
120
|
+
* `BbTabsProps` and `BbTabsItem` both intersect this type and re-declare
|
|
121
|
+
* `replace`, and vue-component-meta CONCATENATES the JSDoc of every
|
|
122
|
+
* declaration it sees, so a doc comment in both places publishes the same
|
|
123
|
+
* paragraph twice in the API table. Keep prose on the concrete surface.
|
|
125
124
|
*/
|
|
126
125
|
replace?: boolean;
|
|
127
126
|
};
|
|
@@ -119,13 +119,12 @@ export type BbTabsInertiaOptions = {
|
|
|
119
119
|
| boolean
|
|
120
120
|
| ((props: Record<string, unknown>) => boolean)
|
|
121
121
|
| null;
|
|
122
|
-
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* walking the user backwards through every tab they visited.
|
|
122
|
+
/*
|
|
123
|
+
* Documented on `BbTabsProps.replace` — NOT a JSDoc block here on purpose.
|
|
124
|
+
* `BbTabsProps` and `BbTabsItem` both intersect this type and re-declare
|
|
125
|
+
* `replace`, and vue-component-meta CONCATENATES the JSDoc of every
|
|
126
|
+
* declaration it sees, so a doc comment in both places publishes the same
|
|
127
|
+
* paragraph twice in the API table. Keep prose on the concrete surface.
|
|
129
128
|
*/
|
|
130
129
|
replace?: boolean;
|
|
131
130
|
};
|
package/dist/ai/source/BbTag.md
CHANGED
|
@@ -74,17 +74,16 @@
|
|
|
74
74
|
import BaseInputContainer from '../BbBaseInputContainer/BbBaseInputContainer.vue';
|
|
75
75
|
import BaseTag from '../BbBaseTag/BbBaseTag.vue';
|
|
76
76
|
import { ref, computed } from 'vue';
|
|
77
|
-
import {
|
|
77
|
+
import { useConfig } from '@/composables/useConfig';
|
|
78
78
|
import { removedPropsFor } from '@/deprecation/removedProps';
|
|
79
79
|
import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
|
|
80
80
|
import type { BbTagProps, BbTagEvents, BbTagSlots } from './types';
|
|
81
|
-
export type { BbTagProps, BbTagEvents, BbTagSlots };
|
|
82
81
|
|
|
83
82
|
const props = defineProps<BbTagProps>();
|
|
84
|
-
|
|
85
83
|
const emit = defineEmits<BbTagEvents>();
|
|
86
|
-
|
|
87
84
|
defineSlots<BbTagSlots>();
|
|
85
|
+
const config = useConfig();
|
|
86
|
+
export type { BbTagProps, BbTagEvents, BbTagSlots };
|
|
88
87
|
|
|
89
88
|
if (process.env.NODE_ENV !== 'production')
|
|
90
89
|
warnRemovedAttrs('BbTag', removedPropsFor('BbTag'));
|
|
@@ -75,20 +75,19 @@ import { ref, computed } from 'vue';
|
|
|
75
75
|
import BaseInputContainer from '../BbBaseInputContainer/BbBaseInputContainer.vue';
|
|
76
76
|
import BaseTextInput from '../BbBaseTextInput/BbBaseTextInput.vue';
|
|
77
77
|
import { useMobile } from '@/composables/useMobile';
|
|
78
|
-
import {
|
|
78
|
+
import { useConfig } from '@/composables/useConfig';
|
|
79
79
|
import { isNotEmpty } from '@/utilities/functions/isNotEmpty';
|
|
80
80
|
import type {
|
|
81
81
|
BbTextInputProps,
|
|
82
82
|
BbTextInputEvents,
|
|
83
83
|
BbTextInputSlots,
|
|
84
84
|
} from './types';
|
|
85
|
-
export type { BbTextInputProps, BbTextInputEvents, BbTextInputSlots };
|
|
86
85
|
|
|
87
86
|
const props = defineProps<BbTextInputProps>();
|
|
88
|
-
|
|
89
87
|
const emit = defineEmits<BbTextInputEvents>();
|
|
90
|
-
|
|
91
88
|
defineSlots<BbTextInputSlots>();
|
|
89
|
+
const config = useConfig();
|
|
90
|
+
export type { BbTextInputProps, BbTextInputEvents, BbTextInputSlots };
|
|
92
91
|
|
|
93
92
|
const active = ref(false);
|
|
94
93
|
const showHint = computed(() => props.persistentHint || active.value);
|
|
@@ -70,20 +70,19 @@
|
|
|
70
70
|
import { ref, computed } from 'vue';
|
|
71
71
|
import BaseInputContainer from '../BbBaseInputContainer/BbBaseInputContainer.vue';
|
|
72
72
|
import BaseTextarea from '../BbBaseTextarea/BbBaseTextarea.vue';
|
|
73
|
-
import {
|
|
73
|
+
import { useConfig } from '@/composables/useConfig';
|
|
74
74
|
import { isNotEmpty } from '@/utilities/functions/isNotEmpty';
|
|
75
75
|
import type {
|
|
76
76
|
BbTextareaProps,
|
|
77
77
|
BbTextareaEvents,
|
|
78
78
|
BbTextareaSlots,
|
|
79
79
|
} from './types';
|
|
80
|
-
export type { BbTextareaProps, BbTextareaEvents, BbTextareaSlots };
|
|
81
80
|
|
|
82
81
|
const props = defineProps<BbTextareaProps>();
|
|
83
|
-
|
|
84
82
|
const emit = defineEmits<BbTextareaEvents>();
|
|
85
|
-
|
|
86
83
|
defineSlots<BbTextareaSlots>();
|
|
84
|
+
const config = useConfig();
|
|
85
|
+
export type { BbTextareaProps, BbTextareaEvents, BbTextareaSlots };
|
|
87
86
|
|
|
88
87
|
const active = ref(false);
|
|
89
88
|
const showHint = computed(() => props.persistentHint || active.value);
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
</template>
|
|
95
95
|
|
|
96
96
|
<script setup lang="ts">
|
|
97
|
-
import {
|
|
97
|
+
import { useConfig } from '@/composables/useConfig';
|
|
98
98
|
import { computed, nextTick, onBeforeUnmount, ref, watch } from 'vue';
|
|
99
99
|
import { createReusableTemplate } from '@vueuse/core';
|
|
100
100
|
import { extractDomContainer } from '@/utilities/functions/extractDomContainer';
|
|
@@ -126,8 +126,11 @@ const props = withDefaults(defineProps<BbTimePickerProps>(), {
|
|
|
126
126
|
});
|
|
127
127
|
|
|
128
128
|
const emit = defineEmits<BbTimePickerEvents>();
|
|
129
|
+
|
|
129
130
|
defineSlots<BbTimePickerSlots>();
|
|
130
131
|
|
|
132
|
+
const config = useConfig();
|
|
133
|
+
|
|
131
134
|
const { t } = useLocale();
|
|
132
135
|
const { isMobile } = useMobile();
|
|
133
136
|
const logger = useLogger();
|
|
@@ -75,7 +75,7 @@ import BaseTimePickerInput from '../BbBaseTimePickerInput/BbBaseTimePickerInput.
|
|
|
75
75
|
import BaseInputContainer from '../BbBaseInputContainer/BbBaseInputContainer.vue';
|
|
76
76
|
import type { BaseTimePickerInputEvents } from '../BbBaseTimePickerInput/types';
|
|
77
77
|
import { ref, computed, onBeforeUnmount, onDeactivated } from 'vue';
|
|
78
|
-
import {
|
|
78
|
+
import { useConfig } from '@/composables/useConfig';
|
|
79
79
|
import { isNotEmpty } from '@/utilities/functions/isNotEmpty';
|
|
80
80
|
import type {
|
|
81
81
|
BbTimePickerInputProps,
|
|
@@ -89,9 +89,13 @@ const props = withDefaults(defineProps<BbTimePickerInputProps>(), {
|
|
|
89
89
|
// default, while the valueless `adaptive` shorthand still means `true`.
|
|
90
90
|
adaptive: undefined,
|
|
91
91
|
});
|
|
92
|
+
|
|
92
93
|
const emit = defineEmits<BaseTimePickerInputEvents>();
|
|
94
|
+
|
|
93
95
|
defineSlots<BbTimePickerInputSlots>();
|
|
94
96
|
|
|
97
|
+
const config = useConfig();
|
|
98
|
+
|
|
95
99
|
const active = ref(false);
|
|
96
100
|
const showHint = computed(() => props.persistentHint || active.value);
|
|
97
101
|
const hasValue = computed(() => isNotEmpty(props.modelValue));
|
|
@@ -22,7 +22,7 @@ export type { BbToastProps } from './types';
|
|
|
22
22
|
|
|
23
23
|
<script setup lang="ts">
|
|
24
24
|
import { computed, onMounted, onUnmounted } from 'vue';
|
|
25
|
-
import {
|
|
25
|
+
import { useConfig } from '@/composables/useConfig';
|
|
26
26
|
import {
|
|
27
27
|
toastState,
|
|
28
28
|
resolveToastPosition,
|
|
@@ -38,6 +38,8 @@ import type { BbToastProps } from './types';
|
|
|
38
38
|
|
|
39
39
|
const props = defineProps<BbToastProps>();
|
|
40
40
|
|
|
41
|
+
const config = useConfig();
|
|
42
|
+
|
|
41
43
|
if (process.env.NODE_ENV !== 'production')
|
|
42
44
|
warnRemovedAttrs('BbToast', removedPropsFor('BbToast'));
|
|
43
45
|
|
|
@@ -410,7 +410,11 @@ export type BbTooltipProps = {
|
|
|
410
410
|
*/
|
|
411
411
|
hideArrow?: boolean;
|
|
412
412
|
/**
|
|
413
|
-
*
|
|
413
|
+
* Seed for the tooltip's internal id. It is **prefixed** (`bb_<id>`) and set
|
|
414
|
+
* on the inner content element, not on the root — so
|
|
415
|
+
* `document.getElementById(theIdYouPassed)` finds nothing. Pass it to make
|
|
416
|
+
* the generated id stable (SSR snapshots, tests), not to look the element
|
|
417
|
+
* up.
|
|
414
418
|
*/
|
|
415
419
|
id?: string;
|
|
416
420
|
/**
|
|
@@ -298,6 +298,10 @@ export type CommonInputWrapperSlots = {
|
|
|
298
298
|
.common-input-wrapper {
|
|
299
299
|
align-items: center;
|
|
300
300
|
display: inline-flex;
|
|
301
|
+
/* Grid/flex item: without this its automatic minimum is the trigger's
|
|
302
|
+
min-content, which for a select is the whole nowrap placeholder string.
|
|
303
|
+
See the note on `.bb-base-input-container`. */
|
|
304
|
+
min-width: 0;
|
|
301
305
|
|
|
302
306
|
&--active > .common-input-wrapper__inner {
|
|
303
307
|
border-color: var(--bb-primary);
|
|
@@ -179,6 +179,12 @@ const { floatingStyles, placement, middlewareData, update } = useFloating(
|
|
|
179
179
|
placement: props.placement,
|
|
180
180
|
middleware,
|
|
181
181
|
strategy: 'fixed',
|
|
182
|
+
// Without this, floating-ui computes a position the moment both elements
|
|
183
|
+
// exist — for every CLOSED popover at mount (a menu button per table
|
|
184
|
+
// row is one computePosition per row). Positioning is owned by the
|
|
185
|
+
// `autoUpdate` below, which runs only while shown, and `toggle()` calls
|
|
186
|
+
// `update()` on open; so mount does nothing here.
|
|
187
|
+
whileElementsMounted: () => () => {},
|
|
182
188
|
}
|
|
183
189
|
);
|
|
184
190
|
|
|
@@ -93,12 +93,18 @@
|
|
|
93
93
|
<span class="bb-listbox__option-label">{{
|
|
94
94
|
optionsMeta[row.index].text
|
|
95
95
|
}}</span>
|
|
96
|
-
<BbIcon
|
|
97
|
-
aria-hidden="true"
|
|
98
|
-
class="bb-listbox__option-check"
|
|
99
|
-
:icon="checkIcon"
|
|
100
|
-
/>
|
|
101
96
|
</slot>
|
|
97
|
+
<!-- OUTSIDE the slot, mirroring BbDropdown's trailing region: the
|
|
98
|
+
`option` slot replaces the row's TEXT, never its selection state.
|
|
99
|
+
Nested inside, any custom row silently lost the check and had to
|
|
100
|
+
redraw it from the `selected` prop. Free to sit here: the glyph is
|
|
101
|
+
absolutely positioned (BbSelectPopover/index.css), so it costs the
|
|
102
|
+
slot no width and only a selected row pads short of it. -->
|
|
103
|
+
<BbIcon
|
|
104
|
+
aria-hidden="true"
|
|
105
|
+
class="bb-listbox__option-check"
|
|
106
|
+
:icon="checkIcon"
|
|
107
|
+
/>
|
|
102
108
|
</span>
|
|
103
109
|
</span>
|
|
104
110
|
<slot name="options:append"></slot>
|
|
@@ -133,12 +133,14 @@
|
|
|
133
133
|
<span class="bb-listbox__option-label">{{
|
|
134
134
|
optionsMetaIndexedById[option.valueHash].text
|
|
135
135
|
}}</span>
|
|
136
|
-
<BbIcon
|
|
137
|
-
aria-hidden="true"
|
|
138
|
-
class="bb-listbox__option-check"
|
|
139
|
-
:icon="checkIcon"
|
|
140
|
-
/>
|
|
141
136
|
</slot>
|
|
137
|
+
<!-- Outside the slot — see the note in FlatListBox: `option`
|
|
138
|
+
replaces the row's text, not its selection state. -->
|
|
139
|
+
<BbIcon
|
|
140
|
+
aria-hidden="true"
|
|
141
|
+
class="bb-listbox__option-check"
|
|
142
|
+
:icon="checkIcon"
|
|
143
|
+
/>
|
|
142
144
|
</span>
|
|
143
145
|
</span>
|
|
144
146
|
</span>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { removedPropsFor as e } from "../../deprecation/removedProps.js";
|
|
2
2
|
import { warnRemovedAttrs as t } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
3
3
|
import { transitions as n } from "../../utilities/misc/transitions.js";
|
|
4
|
-
import r from "
|
|
5
|
-
import
|
|
4
|
+
import { useLocale as r } from "../../composables/useLocale.js";
|
|
5
|
+
import i from "../BbIcon/BbIcon.vue.js";
|
|
6
6
|
import a from "../ClearableButton/ClearableButton.vue.js";
|
|
7
7
|
import { Transition as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, defineComponent as p, guardReactiveProps as m, mergeModels as h, normalizeClass as g, normalizeProps as _, normalizeStyle as v, openBlock as y, renderSlot as b, toDisplayString as x, unref as S, useModel as C, withCtx as w } from "vue";
|
|
8
8
|
//#region src/components/BbAlert/BbAlert.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -31,7 +31,7 @@ var T = ["aria-live", "role"], E = { class: "bb-alert__inner-container" }, D = {
|
|
|
31
31
|
setup(n) {
|
|
32
32
|
let p = C(n, "modelValue"), h = n;
|
|
33
33
|
process.env.NODE_ENV !== "production" && t("BbAlert", e("BbAlert"));
|
|
34
|
-
let { t: j } =
|
|
34
|
+
let { t: j } = r(), M = s(() => h.variant === "destructive" || h.variant === "warning"), N = s(() => h.role ?? (M.value ? "alert" : "status")), P = s(() => h.ariaLive ?? (M.value ? "assertive" : "polite")), F = () => {
|
|
35
35
|
p.value = !1;
|
|
36
36
|
};
|
|
37
37
|
return (e, t) => (y(), c(o, { name: "bb-alert-transition" }, {
|
|
@@ -42,7 +42,7 @@ var T = ["aria-live", "role"], E = { class: "bb-alert__inner-container" }, D = {
|
|
|
42
42
|
class: g(["bb-alert", `bb-alert--${h.variant}`]),
|
|
43
43
|
role: N.value,
|
|
44
44
|
style: v({ "--transition-duration": `${h.transitionDuration}ms` })
|
|
45
|
-
}, [d("div", E, [d("div", D, [e.icon ? (y(), c(
|
|
45
|
+
}, [d("div", E, [d("div", D, [e.icon ? (y(), c(i, {
|
|
46
46
|
key: 0,
|
|
47
47
|
class: "bb-alert__icon",
|
|
48
48
|
icon: e.icon,
|
|
@@ -66,7 +66,16 @@ export type BbAlertEvents =
|
|
|
66
66
|
(e: 'update:modelValue', value: boolean) => void;
|
|
67
67
|
/** Props exposed by the `title` slot. */
|
|
68
68
|
export type BbAlertTitleSlotProps = {
|
|
69
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* The `title` prop's value — despite the scope being named `text`.
|
|
71
|
+
*
|
|
72
|
+
* Both slots name their payload `text` (each meaning "the text of THIS
|
|
73
|
+
* slot"), so `#title="{ text }"` gives you the title and
|
|
74
|
+
* `#text="{ text }"` gives you the body. Worth stating because the v2 bug
|
|
75
|
+
* this replaced was the opposite mix-up: v2's `#text` slot passed the
|
|
76
|
+
* *title*. Renaming the scope now would be another break, so the rule is
|
|
77
|
+
* simply: the payload belongs to the slot you are in.
|
|
78
|
+
*/
|
|
70
79
|
text: BbAlertProps['title'];
|
|
71
80
|
};
|
|
72
81
|
/** Props exposed by the `text` slot. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BbAvatarProps, BbAvatarSlots } from './types';
|
|
2
|
-
export type { BbAvatarProps, BbAvatarSlots };
|
|
3
2
|
type __VLS_Slots = BbAvatarSlots;
|
|
3
|
+
export type { BbAvatarProps, BbAvatarSlots };
|
|
4
4
|
declare const __VLS_base: import('vue').DefineComponent<BbAvatarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BbAvatarProps> & Readonly<{}>, {
|
|
5
5
|
size: number | ({
|
|
6
6
|
size?: any;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import a from "
|
|
7
|
-
import o from "
|
|
8
|
-
import
|
|
1
|
+
import { useConfig as e } from "../../composables/useConfig.js";
|
|
2
|
+
import { removedPropsFor as t } from "../../deprecation/removedProps.js";
|
|
3
|
+
import { useLogger as n } from "../../composables/useLogger.js";
|
|
4
|
+
import { warnRemovedAttrs as r } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
5
|
+
import { wait as i } from "../../utilities/functions/wait.js";
|
|
6
|
+
import { parseSize as a } from "../../utilities/functions/parseSize.js";
|
|
7
|
+
import o from "../BbIcon/BbIcon.vue.js";
|
|
8
|
+
import s from "../../assets/svgs/user.svg_raw.js";
|
|
9
9
|
import { computed as c, createCommentVNode as l, createElementBlock as u, createVNode as d, defineComponent as f, mergeProps as p, normalizeClass as m, normalizeStyle as h, onMounted as g, openBlock as _, ref as v, renderSlot as y, unref as b, watch as x } from "vue";
|
|
10
10
|
//#region src/components/BbAvatar/BbAvatar.vue?vue&type=script&setup=true&lang.ts
|
|
11
11
|
var S = [
|
|
@@ -25,52 +25,52 @@ var S = [
|
|
|
25
25
|
timeout: { default: 400 }
|
|
26
26
|
},
|
|
27
27
|
setup(f) {
|
|
28
|
-
let C = f;
|
|
29
|
-
process.env.NODE_ENV !== "production" &&
|
|
30
|
-
let
|
|
28
|
+
let C = f, w = e();
|
|
29
|
+
process.env.NODE_ENV !== "production" && r("BbAvatar", t("BbAvatar"));
|
|
30
|
+
let T = n(), E = c(() => {
|
|
31
31
|
if (C.size != null) try {
|
|
32
|
-
return
|
|
32
|
+
return a(C.size, w.iconDefaultSizes);
|
|
33
33
|
} catch {
|
|
34
|
-
return
|
|
34
|
+
return T.warn(`Invalid size: "${C.size}" in BbAvatar. Falling back to "md".`), `${w.iconDefaultSizes.md}px`;
|
|
35
35
|
}
|
|
36
|
-
}),
|
|
36
|
+
}), D = c(() => {
|
|
37
37
|
let e = {};
|
|
38
|
-
return
|
|
39
|
-
}),
|
|
38
|
+
return E.value && (e["--size"] = E.value), e;
|
|
39
|
+
}), O = c(() => !!(C.src || C.srcset) && !F.value), k = c(() => O.value && I.value && !P.value), A = c(() => !O.value || k.value), j = c(() => !A.value || !C.alt?.trim() ? {} : {
|
|
40
40
|
role: "img",
|
|
41
41
|
"aria-label": C.alt.trim()
|
|
42
|
-
}),
|
|
42
|
+
}), M = (e) => !(!e || !e.complete || e.naturalWidth === 0), N = v(null), P = v(!1), F = v(!1), I = v(!1);
|
|
43
43
|
g(async () => {
|
|
44
|
-
|
|
44
|
+
O.value && !F.value && !P.value && N.value && (await i(C.timeout), I.value = !M(N.value));
|
|
45
45
|
});
|
|
46
|
-
let
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
|
|
46
|
+
let L = () => {
|
|
47
|
+
P.value = !0, F.value = !1, I.value = !1;
|
|
48
|
+
}, R = () => {
|
|
49
|
+
F.value = !0;
|
|
50
50
|
};
|
|
51
51
|
return x(() => [C.src, C.srcset], () => {
|
|
52
|
-
|
|
52
|
+
P.value = !1, F.value = !1, I.value = !1;
|
|
53
53
|
}), (e, t) => (_(), u("span", {
|
|
54
54
|
class: "bb-avatar",
|
|
55
|
-
style: h(
|
|
56
|
-
}, [
|
|
55
|
+
style: h(D.value)
|
|
56
|
+
}, [O.value ? (_(), u("img", {
|
|
57
57
|
key: 0,
|
|
58
58
|
ref_key: "image",
|
|
59
|
-
ref:
|
|
59
|
+
ref: N,
|
|
60
60
|
alt: e.alt,
|
|
61
|
-
"aria-hidden":
|
|
62
|
-
class: m(["bb-avatar__img", { "bb-avatar__img--hidden":
|
|
61
|
+
"aria-hidden": k.value || void 0,
|
|
62
|
+
class: m(["bb-avatar__img", { "bb-avatar__img--hidden": k.value }]),
|
|
63
63
|
sizes: e.sizes,
|
|
64
64
|
src: e.src,
|
|
65
65
|
srcset: e.srcset,
|
|
66
|
-
onError:
|
|
67
|
-
onLoad:
|
|
68
|
-
}, null, 42, S)) : l("", !0),
|
|
66
|
+
onError: R,
|
|
67
|
+
onLoad: L
|
|
68
|
+
}, null, 42, S)) : l("", !0), A.value ? (_(), u("span", p({
|
|
69
69
|
key: 1,
|
|
70
70
|
class: "bb-avatar__fallback"
|
|
71
|
-
},
|
|
71
|
+
}, j.value), [y(e.$slots, "default", {}, () => [d(o, {
|
|
72
72
|
class: "bb-avatar__default-icon",
|
|
73
|
-
icon: b(
|
|
73
|
+
icon: b(s)
|
|
74
74
|
}, null, 8, ["icon"])])], 16)) : l("", !0)], 4));
|
|
75
75
|
}
|
|
76
76
|
});
|
|
@@ -2,33 +2,39 @@ 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 i from "
|
|
6
|
-
import { Fragment as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, defineComponent as u, openBlock as d, renderSlot as f, unref as p } from "vue";
|
|
5
|
+
import { Fragment as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, defineComponent as l, openBlock as u, renderSlot as d, unref as f } from "vue";
|
|
7
6
|
//#region src/components/BbBadge/BadgeBodyContent.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
7
|
+
var p = { class: "bb-badge__content sr-only" }, m = { class: "bb-badge__content" }, h = /*@__PURE__*/ l({
|
|
9
8
|
__name: "BadgeBodyContent",
|
|
10
|
-
setup(
|
|
11
|
-
let
|
|
12
|
-
return (e, r) =>
|
|
9
|
+
setup(l) {
|
|
10
|
+
let h = r() ?? e().throw("[BbBadge] internal body renderer mounted outside a badge — this is a bug.");
|
|
11
|
+
return (e, r) => f(h).icon.value ? (u(), s(i, { key: 0 }, [f(h).loading.value ? (u(), a(n, {
|
|
13
12
|
key: 0,
|
|
14
13
|
class: "bb-badge__icon"
|
|
15
|
-
})) : (
|
|
14
|
+
})) : (u(), a(t, {
|
|
16
15
|
key: 1,
|
|
17
16
|
class: "bb-badge__icon",
|
|
18
|
-
icon:
|
|
19
|
-
}, null, 8, ["icon"])),
|
|
20
|
-
|
|
17
|
+
icon: f(h).icon.value
|
|
18
|
+
}, null, 8, ["icon"])), c("span", p, [d(e.$slots, "default")])], 64)) : (u(), s(i, { key: 1 }, [
|
|
19
|
+
f(h).spinnerLeads.value ? (u(), a(n, {
|
|
21
20
|
key: 0,
|
|
22
21
|
class: "bb-badge__prepend-icon"
|
|
23
|
-
})) :
|
|
22
|
+
})) : f(h).prependIcon.value ? (u(), a(t, {
|
|
24
23
|
key: 1,
|
|
25
24
|
class: "bb-badge__prepend-icon",
|
|
26
|
-
icon:
|
|
27
|
-
}, null, 8, ["icon"])) :
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
icon: f(h).prependIcon.value
|
|
26
|
+
}, null, 8, ["icon"])) : o("", !0),
|
|
27
|
+
c("span", m, [d(e.$slots, "default")]),
|
|
28
|
+
f(h).clearable.value ? o("", !0) : (u(), s(i, { key: 2 }, [f(h).spinnerTrails.value ? (u(), a(n, {
|
|
29
|
+
key: 0,
|
|
30
|
+
class: "bb-badge__append-icon"
|
|
31
|
+
})) : f(h).appendIcon.value ? (u(), a(t, {
|
|
32
|
+
key: 1,
|
|
33
|
+
class: "bb-badge__append-icon",
|
|
34
|
+
icon: f(h).appendIcon.value
|
|
35
|
+
}, null, 8, ["icon"])) : o("", !0)], 64))
|
|
30
36
|
], 64));
|
|
31
37
|
}
|
|
32
38
|
});
|
|
33
39
|
//#endregion
|
|
34
|
-
export {
|
|
40
|
+
export { h as default };
|
|
@@ -2,10 +2,10 @@ import { useId as e } from "../../composables/useId.js";
|
|
|
2
2
|
import { removedPropsFor as t } from "../../deprecation/removedProps.js";
|
|
3
3
|
import { useLogger as n } from "../../composables/useLogger.js";
|
|
4
4
|
import { warnRemovedAttrs as r } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
5
|
-
import i from "
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import s from "./
|
|
5
|
+
import { useLocale as i } from "../../composables/useLocale.js";
|
|
6
|
+
import a from "../BbIcon/BbIcon.vue.js";
|
|
7
|
+
import o from "../BbSpinner/BbSpinner.vue.js";
|
|
8
|
+
import { provideBadgeHost as s } from "./badgeButtonContext.js";
|
|
9
9
|
import c from "./BadgeBodyContent.vue.js";
|
|
10
10
|
import l from "./BbBadgeButton.vue.js";
|
|
11
11
|
import u from "../../assets/svgs/clear.svg_raw.js";
|
|
@@ -44,15 +44,29 @@ var O = ["id"], k = {
|
|
|
44
44
|
"lg",
|
|
45
45
|
"xl",
|
|
46
46
|
"2xl"
|
|
47
|
-
], { t: L } =
|
|
48
|
-
|
|
49
|
-
icon:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
], { t: L } = i(), R = n(), z = f(() => I.includes(N.size) ? N.size : (R.warn(`Invalid size: "${N.size}" in BbBadge. Expected one of: ${I.join(", ")}. Falling back to "md".`), "md")), B = () => !!N["append:icon"] && !N["prepend:icon"], V = (e) => Array.isArray(e) && e.some((e) => y(e) && (e.type === l || e.type === d && V(e.children))), H = () => V(F.default?.({}));
|
|
48
|
+
s({
|
|
49
|
+
icon: { get value() {
|
|
50
|
+
return N.icon;
|
|
51
|
+
} },
|
|
52
|
+
prependIcon: { get value() {
|
|
53
|
+
return N["prepend:icon"];
|
|
54
|
+
} },
|
|
55
|
+
appendIcon: { get value() {
|
|
56
|
+
return N["append:icon"];
|
|
57
|
+
} },
|
|
58
|
+
loading: { get value() {
|
|
59
|
+
return !!N.loading;
|
|
60
|
+
} },
|
|
61
|
+
spinnerLeads: { get value() {
|
|
62
|
+
return !!N.loading && !B();
|
|
63
|
+
} },
|
|
64
|
+
spinnerTrails: { get value() {
|
|
65
|
+
return !!N.loading && B();
|
|
66
|
+
} },
|
|
67
|
+
clearable: { get value() {
|
|
68
|
+
return !!N.clearable;
|
|
69
|
+
} }
|
|
56
70
|
});
|
|
57
71
|
let U = f(() => [
|
|
58
72
|
"bb-badge",
|
|
@@ -75,14 +89,21 @@ var O = ["id"], k = {
|
|
|
75
89
|
default: E(() => [S(e.$slots, "default")]),
|
|
76
90
|
_: 3
|
|
77
91
|
})], 8, O)),
|
|
78
|
-
N.clearable ? (x(), h("span", k, [N.icon ? m("", !0) : (x(),
|
|
92
|
+
N.clearable ? (x(), h("span", k, [N.icon ? m("", !0) : (x(), h(d, { key: 0 }, [N.loading && B() ? (x(), p(o, {
|
|
93
|
+
key: 0,
|
|
94
|
+
class: "bb-badge__append-icon"
|
|
95
|
+
})) : N["append:icon"] ? (x(), p(a, {
|
|
96
|
+
key: 1,
|
|
97
|
+
class: "bb-badge__append-icon",
|
|
98
|
+
icon: N["append:icon"]
|
|
99
|
+
}, null, 8, ["icon"])) : m("", !0)], 64)), g("button", {
|
|
79
100
|
id: `${w(W)}__clear`,
|
|
80
101
|
"aria-label": N.clearableLabel || w(L)("badge.clearLabel").value,
|
|
81
102
|
"aria-labelledby": G.value,
|
|
82
103
|
class: "bb-badge__clear-button",
|
|
83
104
|
type: "button",
|
|
84
105
|
onClick: D(K, ["stop"])
|
|
85
|
-
}, [_(
|
|
106
|
+
}, [_(a, { icon: w(u) }, null, 8, ["icon"])], 8, A)])) : m("", !0),
|
|
86
107
|
N.loading ? (x(), h("span", j, C(w(L)("common.loadingText")), 1)) : m("", !0)
|
|
87
108
|
], 2));
|
|
88
109
|
}
|