bitboss-ui 3.0.0-beta.71 → 3.0.0-beta.73
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 +2 -2
- package/bin/cli.mjs +9 -3
- package/dist/ai/BbAccordion.md +38 -19
- package/dist/ai/BbBadge.md +25 -22
- package/dist/ai/BbBreadcrumbs.md +1 -1
- package/dist/ai/BbButton.md +32 -27
- package/dist/ai/BbCalendar.md +1 -0
- package/dist/ai/BbCarousel.md +6 -4
- package/dist/ai/BbCheckboxGroup.md +2 -1
- package/dist/ai/BbColorInput.md +1 -1
- package/dist/ai/BbConfirm.md +65 -81
- package/dist/ai/BbConfirmPortal.md +2 -2
- package/dist/ai/BbDatePicker.md +1 -6
- package/dist/ai/BbDatePickerInput.md +2 -2
- package/dist/ai/BbDialog.md +233 -164
- package/dist/ai/BbDropdown.md +52 -16
- package/dist/ai/BbDropdownButton.md +11 -12
- package/dist/ai/BbDropzone.md +12 -8
- package/dist/ai/BbForm.md +100 -13
- package/dist/ai/BbHost.md +2 -2
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbIcon.md +1 -1
- package/dist/ai/BbIndicator.md +17 -15
- package/dist/ai/BbNumberInput.md +7 -5
- package/dist/ai/BbOffCanvas.md +29 -7
- package/dist/ai/BbPagination.md +2 -2
- package/dist/ai/BbPopover.md +15 -9
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbRadioGroup.md +29 -7
- package/dist/ai/BbRating.md +8 -7
- package/dist/ai/BbSelect.md +29 -8
- package/dist/ai/BbSelectPopover.md +9 -3
- package/dist/ai/BbSlider.md +12 -8
- package/dist/ai/BbSpinner.md +3 -2
- package/dist/ai/BbSwitch.md +3 -3
- package/dist/ai/BbSwitchGroup.md +7 -6
- package/dist/ai/BbTable.md +205 -82
- package/dist/ai/BbTabs.md +29 -4
- package/dist/ai/BbTag.md +1 -1
- package/dist/ai/BbTextInput.md +7 -5
- package/dist/ai/BbTextarea.md +4 -3
- package/dist/ai/BbTimePickerInput.md +1 -1
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbTooltip.md +22 -17
- package/dist/ai/BbTree.md +49 -24
- package/dist/ai/CommonFieldInput.md +1 -1
- package/dist/ai/changelog.json +242 -9
- package/dist/ai/components.json +52 -51
- package/dist/ai/composables/useBbDialog.md +5 -8
- package/dist/ai/composables/useBbForm.md +3 -0
- package/dist/ai/composables/useConfirm.md +65 -56
- package/dist/ai/composables/useToast.md +2 -1
- package/dist/ai/guides/agent-contract.md +3 -3
- package/dist/ai/guides/app-layout.md +3 -2
- package/dist/ai/guides/eslint-rules.md +3 -1
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/floating-bottom-panel.md +3 -2
- package/dist/ai/guides/icons-policy.md +7 -5
- package/dist/ai/guides/inertia-helpers.md +35 -30
- package/dist/ai/guides/installation-and-plugin-setup.md +17 -14
- package/dist/ai/guides/migration/adoption-checklist.md +2 -2
- package/dist/ai/guides/migration/components/bb-badge.md +12 -1
- package/dist/ai/guides/migration/components/bb-button.md +24 -0
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +11 -0
- package/dist/ai/guides/migration/components/bb-tabs.md +2 -2
- package/dist/ai/guides/migration/components/bb-toast.md +11 -0
- package/dist/ai/guides/migration/components/use-confirm.md +72 -26
- package/dist/ai/guides/migration/v2-to-v3.md +52 -10
- package/dist/ai/guides/migration/v3-beta-css-classes.md +1 -1
- package/dist/ai/guides/options-items-playbook.md +4 -3
- package/dist/ai/guides/passthrough.md +2 -2
- package/dist/ai/helpers/inertia/manifest.json +28 -15
- package/dist/ai/helpers/inertia/messages.ts +3 -3
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +10 -10
- package/dist/ai/helpers/inertia/usePromiseForm.ts +1 -1
- package/dist/ai/helpers/inertia/usePromiseRouter.ts +7 -2
- package/dist/ai/index.md +3 -3
- package/dist/ai/manifest/common.json +3 -3
- package/dist/ai/manifest/components/BbAccordion.json +8 -5
- package/dist/ai/manifest/components/BbAccordion.tree.json +1 -0
- package/dist/ai/manifest/components/BbBadge.json +8 -7
- package/dist/ai/manifest/components/BbBadge.removed.json +3 -1
- package/dist/ai/manifest/components/BbBadge.tree.json +73 -0
- package/dist/ai/manifest/components/BbBreadcrumbs.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +5 -6
- package/dist/ai/manifest/components/BbButton.removed.json +3 -1
- package/dist/ai/manifest/components/BbButton.tree.json +24 -7
- package/dist/ai/manifest/components/BbCalendar.json +2 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbColorInput.json +1 -1
- package/dist/ai/manifest/components/BbColorInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbConfirm.json +2 -2
- package/dist/ai/manifest/components/BbConfirm.removed.json +9 -0
- package/dist/ai/manifest/components/BbConfirm.tree.json +4 -5
- package/dist/ai/manifest/components/BbConfirmPortal.json +3 -3
- package/dist/ai/manifest/components/BbConfirmPortal.removed.json +7 -0
- package/dist/ai/manifest/components/BbDatePicker.json +2 -1
- package/dist/ai/manifest/components/BbDatePicker.tree.json +0 -6
- package/dist/ai/manifest/components/BbDatePickerInput.json +2 -2
- package/dist/ai/manifest/components/BbDatePickerInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbDialog.json +6 -1
- package/dist/ai/manifest/components/BbDialog.tree.json +41 -1
- package/dist/ai/manifest/components/BbDropdown.json +9 -8
- package/dist/ai/manifest/components/BbDropdown.tree.json +4 -0
- package/dist/ai/manifest/components/BbDropdownButton.json +8 -9
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +3 -1
- package/dist/ai/manifest/components/BbForm.json +3 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.json +6 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +40 -0
- package/dist/ai/manifest/components/BbPagination.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +4 -3
- package/dist/ai/manifest/components/BbRating.json +2 -2
- package/dist/ai/manifest/components/BbSelect.json +16 -15
- package/dist/ai/manifest/components/BbSelect.tree.json +1 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +1 -0
- package/dist/ai/manifest/components/BbSwitch.json +4 -4
- package/dist/ai/manifest/components/BbSwitchGroup.json +7 -7
- package/dist/ai/manifest/components/BbTable.json +15 -14
- package/dist/ai/manifest/components/BbTable.tree.json +2 -0
- package/dist/ai/manifest/components/BbTabs.json +3 -3
- package/dist/ai/manifest/components/BbTabsList.json +1 -1
- package/dist/ai/manifest/components/BbTabsRoot.json +1 -1
- package/dist/ai/manifest/components/BbTag.json +1 -1
- package/dist/ai/manifest/components/BbTag.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextarea.json +1 -1
- package/dist/ai/manifest/components/BbTextarea.tree.json +1 -1
- package/dist/ai/manifest/components/BbTimePicker.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbToast.removed.json +2 -1
- package/dist/ai/manifest/components/BbTree.json +2 -2
- package/dist/ai/manifest/components/CommonFieldInput.tree.json +3 -3
- package/dist/ai/manifest/index.json +4 -4
- package/dist/ai/manifest/meta.json +5 -1
- package/dist/ai/manifest/types.advanced.json +9 -9
- package/dist/ai/manifest/types.api.json +6 -5
- package/dist/ai/recipes/inertia/approvals-inbox.md +23 -16
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/inertia/layout-scaffold.md +5 -3
- package/dist/ai/recipes/inertia/onboarding.md +23 -12
- package/dist/ai/recipes/inertia/ownership-atlas.md +34 -18
- package/dist/ai/recipes/inertia/record-form.md +12 -8
- package/dist/ai/recipes/inertia/records-workspace.md +14 -7
- package/dist/ai/recipes/inertia/settings-workspace.md +75 -60
- package/dist/ai/recipes/inertia/upload-center.md +17 -9
- package/dist/ai/recipes/inertia/wizard-form.md +2 -2
- package/dist/ai/recipes/nuxt/approvals-inbox.md +23 -16
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -3
- package/dist/ai/recipes/nuxt/onboarding.md +5 -4
- package/dist/ai/recipes/nuxt/ownership-atlas.md +34 -18
- package/dist/ai/recipes/nuxt/record-form.md +14 -10
- package/dist/ai/recipes/nuxt/records-workspace.md +14 -7
- package/dist/ai/recipes/nuxt/settings-workspace.md +70 -60
- package/dist/ai/recipes/nuxt/upload-center.md +17 -9
- package/dist/ai/recipes/nuxt/wizard-form.md +4 -4
- package/dist/ai/recipes/vue/approvals-inbox.md +23 -16
- package/dist/ai/recipes/vue/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -3
- package/dist/ai/recipes/vue/onboarding.md +5 -4
- package/dist/ai/recipes/vue/ownership-atlas.md +34 -18
- package/dist/ai/recipes/vue/record-form.md +14 -10
- package/dist/ai/recipes/vue/records-workspace.md +14 -7
- package/dist/ai/recipes/vue/settings-workspace.md +70 -60
- package/dist/ai/recipes/vue/upload-center.md +17 -9
- package/dist/ai/recipes/vue/wizard-form.md +4 -4
- package/dist/ai/source/BbAccordion.md +50 -16
- package/dist/ai/source/BbBadge.md +420 -26
- package/dist/ai/source/BbBadgeButton.md +378 -12
- package/dist/ai/source/BbButton.md +205 -55
- package/dist/ai/source/BbCalendar.md +5 -0
- package/dist/ai/source/BbCheckboxGroup.md +38 -13
- package/dist/ai/source/BbConfigScope.md +19 -2
- package/dist/ai/source/BbConfirm.md +74 -80
- package/dist/ai/source/BbConfirmPortal.md +6 -6
- package/dist/ai/source/BbDatePicker.md +9 -2
- package/dist/ai/source/BbDatePickerInput.md +3 -1
- package/dist/ai/source/BbDialog.md +53 -2
- package/dist/ai/source/BbDropdown.md +350 -98
- package/dist/ai/source/BbDropdownButton.md +20 -12
- package/dist/ai/source/BbDropdownGroup.md +136 -58
- package/dist/ai/source/BbForm.md +152 -11
- package/dist/ai/source/BbOffCanvas.md +53 -2
- package/dist/ai/source/BbPagination.md +1 -1
- package/dist/ai/source/BbRadioGroup.md +72 -10
- package/dist/ai/source/BbRating.md +30 -22
- package/dist/ai/source/BbSelect.md +11 -1
- package/dist/ai/source/BbSelectPopover.md +105 -34
- package/dist/ai/source/BbSwitch.md +23 -8
- package/dist/ai/source/BbSwitchGroup.md +67 -21
- package/dist/ai/source/BbTable.md +359 -48
- package/dist/ai/source/BbTabs.md +6 -0
- package/dist/ai/source/BbTabsList.md +10 -0
- package/dist/ai/source/BbTabsPanels.md +6 -0
- package/dist/ai/source/BbTabsRoot.md +6 -0
- package/dist/ai/source/BbTree.md +14 -4
- package/dist/ai/source/CommonFieldInput.md +2 -1
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +7 -3
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +52 -38
- package/dist/components/BbAccordion/ptKeys.generated.d.ts +20 -0
- package/dist/components/BbAccordion/types.d.ts +21 -7
- package/dist/components/BbAccordion/types.js +1 -1
- package/dist/components/BbAlert/BbAlert.vue.d.ts +1 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbBadge/BbBadge.vue.d.ts +1 -1
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +65 -42
- package/dist/components/BbBadge/types.d.ts +15 -12
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +79 -73
- package/dist/components/BbButton/types.d.ts +7 -6
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +2 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbCalendar/types.d.ts +5 -0
- package/dist/components/BbCalendar/useCalendarGrid.js +1 -1
- package/dist/components/BbCalendar/useDayGrid.js +1 -1
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +10 -4
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbCheckboxGroup/types.d.ts +2 -2
- package/dist/components/BbConfigScope/BbConfigScope.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +71 -132
- package/dist/components/BbConfirm/ptKeys.generated.d.ts +5 -5
- package/dist/components/BbConfirm/types.d.ts +5 -5
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +2 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/components/BbDatePicker/types.d.ts +5 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/components/BbDatePickerInput/types.d.ts +2 -1
- package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +263 -235
- package/dist/components/BbDialog/overlayActions.js +94 -0
- package/dist/components/BbDialog/types.d.ts +24 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +382 -332
- package/dist/components/BbDropdown/dropdownHandle.js +6 -0
- package/dist/components/BbDropdown/normalizeGroups.js +58 -48
- package/dist/components/BbDropdown/types.d.ts +107 -48
- package/dist/components/BbDropdown/types.js +2 -2
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +71 -71
- package/dist/components/BbDropdownButton/types.d.ts +2 -4
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -1
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +241 -199
- package/dist/components/BbForm/recognizeValidation.d.ts +9 -0
- package/dist/components/BbForm/recognizeValidation.js +55 -0
- package/dist/components/BbForm/validationError.d.ts +10 -0
- package/dist/components/BbForm/validationError.js +11 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +414 -389
- package/dist/components/BbOffCanvas/sheetAttrs.js +5 -5
- package/dist/components/BbOffCanvas/types.d.ts +24 -0
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +10 -4
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +173 -157
- package/dist/components/BbRadioGroup/types.d.ts +9 -3
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +112 -103
- package/dist/components/BbRating/types.d.ts +3 -2
- package/dist/components/BbSelect/BbSelect.vue.d.ts +9 -8
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +3 -1
- package/dist/components/BbSelect/types.d.ts +8 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +11 -4
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +513 -502
- package/dist/components/BbSelectPopover/types.d.ts +10 -2
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -0
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +85 -73
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +10 -4
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +171 -152
- package/dist/components/BbSwitchGroup/types.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue.d.ts +36 -25
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1338 -1215
- package/dist/components/BbTable/BbTableDataRow.js +2 -1
- package/dist/components/BbTable/BbTableRowMenu.js +36 -0
- package/dist/components/BbTable/types.d.ts +32 -17
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbTabs/types.d.ts +6 -0
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +1 -1
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +88 -94
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/components/BbTree/types.d.ts +8 -2
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +39 -39
- package/dist/composables/formSubmitLock.js +15 -8
- package/dist/composables/overlayRegistry.d.ts +5 -0
- package/dist/composables/overlayRegistry.js +154 -148
- package/dist/composables/useBbDropdown.d.ts +8 -0
- package/dist/composables/useBbDropdown.js +3 -1
- package/dist/composables/useBbTabs.js +138 -138
- package/dist/composables/useConfirm.d.ts +63 -52
- package/dist/composables/useConfirm.js +22 -18
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.d.ts +7 -7
- package/dist/directives/bbDropdown.js +21 -14
- package/dist/directives/bbTooltip.d.ts +3 -3
- package/dist/directives/createPopoverDirective.js +57 -35
- package/dist/i18n/locales/ar.json +5 -1
- package/dist/i18n/locales/cs.json +5 -1
- package/dist/i18n/locales/da.json +5 -1
- package/dist/i18n/locales/de-CH.json +5 -1
- package/dist/i18n/locales/de.json +5 -1
- package/dist/i18n/locales/el.json +5 -1
- package/dist/i18n/locales/en-GB.json +5 -1
- package/dist/i18n/locales/en.json +5 -1
- package/dist/i18n/locales/es-MX.json +5 -1
- package/dist/i18n/locales/es.json +5 -1
- package/dist/i18n/locales/fa.json +5 -1
- package/dist/i18n/locales/fi.json +5 -1
- package/dist/i18n/locales/fr.json +5 -1
- package/dist/i18n/locales/he.json +5 -1
- package/dist/i18n/locales/hu.json +5 -1
- package/dist/i18n/locales/it.json +5 -1
- package/dist/i18n/locales/ja.json +5 -1
- package/dist/i18n/locales/ko.json +5 -1
- package/dist/i18n/locales/nb.json +5 -1
- package/dist/i18n/locales/nl.json +5 -1
- package/dist/i18n/locales/pl.json +5 -1
- package/dist/i18n/locales/pt-BR.json +5 -1
- package/dist/i18n/locales/pt-PT.json +5 -1
- package/dist/i18n/locales/ro.json +5 -1
- package/dist/i18n/locales/ru.json +5 -1
- package/dist/i18n/locales/sv.json +5 -1
- package/dist/i18n/locales/tr.json +5 -1
- package/dist/i18n/locales/uk.json +5 -1
- package/dist/i18n/locales/zh-CN.json +5 -1
- package/dist/i18n/locales/zh-HK.json +5 -1
- package/dist/i18n/locales/zh-TW.json +5 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -3
- package/dist/llms-full.txt +1997 -1151
- package/dist/llms-medium.txt +21 -18
- package/dist/llms.txt +2 -2
- package/dist/locale-blueprint.json +5 -1
- package/dist/plugin.js +17 -40
- package/dist/pluginCore.js +30 -0
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +26 -5
- package/dist/types/ActionButton.js +11 -0
- package/dist/types/ConfigDefaults.d.ts +34 -3
- package/dist/types/ConfigDefaults.js +14 -8
- package/dist/types/ItemPath.d.ts +33 -4
- package/dist/types/ptComponentMap.d.ts +1 -1
- package/dist/utilities/functions/clickCount.js +14 -0
- package/dist/utilities/functions/hash.js +90 -3
- package/dist/utilities/functions/isEqual.js +61 -3
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite.js +0 -1
- package/llms.txt +2 -2
- package/package.json +12 -2
- package/scripts/README.md +43 -39
- package/scripts/lib/adoption-checklist.json +2 -2
- package/scripts/lib/eslint-disable.mjs +5 -3
- package/scripts/lib/eslint-plugin.d.ts +2 -0
- package/scripts/lib/eslint-plugin.mjs +213 -1
- package/scripts/lib/helpers-add.mjs +21 -2
- package/scripts/lib/redundant-item-accessor.mjs +4 -1
- package/scripts/lib/release-results.mjs +180 -5
- package/scripts/lib/renamed-item-field.mjs +4 -1
- package/scripts/lib/tab-links.mjs +4 -1
- package/scripts/lib/tree-default-expandable.mjs +53 -0
- package/scripts/lib/validate-bb-markup.mjs +536 -52
|
@@ -391,6 +391,10 @@ const getHighlightData = () => {
|
|
|
391
391
|
'.bb-tabs-list__item--active'
|
|
392
392
|
);
|
|
393
393
|
if (!activeBtn) {
|
|
394
|
+
// No trigger is active (the current tab is hidden, or a link strip has
|
|
395
|
+
// no current page): the indicator has nothing to sit under.
|
|
396
|
+
highlightWidth.value = 0;
|
|
397
|
+
highlightHeight.value = 0;
|
|
394
398
|
return;
|
|
395
399
|
}
|
|
396
400
|
highlightLeft.value = activeBtn.offsetLeft;
|
|
@@ -586,6 +590,12 @@ export type BbTabsItem<K extends string = string> = BbTabsInertiaOptions & {
|
|
|
586
590
|
* tab is inactive.
|
|
587
591
|
*/
|
|
588
592
|
eager?: boolean;
|
|
593
|
+
/**
|
|
594
|
+
* Leaves the tab out: no trigger, no panel, not reachable by keyboard or
|
|
595
|
+
* by the URL. A `v-model` naming it keeps it, and the strip then shows no
|
|
596
|
+
* active tab and no panel.
|
|
597
|
+
*/
|
|
598
|
+
hidden?: boolean;
|
|
589
599
|
/**
|
|
590
600
|
* The page this tab links to. Any item with `href` or `to` makes the strip
|
|
591
601
|
* a set of links (link mode): a `<nav>` of real `<a>`s with
|
|
@@ -214,6 +214,12 @@ export type BbTabsItem<K extends string = string> = BbTabsInertiaOptions & {
|
|
|
214
214
|
* tab is inactive.
|
|
215
215
|
*/
|
|
216
216
|
eager?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Leaves the tab out: no trigger, no panel, not reachable by keyboard or
|
|
219
|
+
* by the URL. A `v-model` naming it keeps it, and the strip then shows no
|
|
220
|
+
* active tab and no panel.
|
|
221
|
+
*/
|
|
222
|
+
hidden?: boolean;
|
|
217
223
|
/**
|
|
218
224
|
* The page this tab links to. Any item with `href` or `to` makes the strip
|
|
219
225
|
* a set of links (link mode): a `<nav>` of real `<a>`s with
|
|
@@ -172,6 +172,12 @@ export type BbTabsItem<K extends string = string> = BbTabsInertiaOptions & {
|
|
|
172
172
|
* tab is inactive.
|
|
173
173
|
*/
|
|
174
174
|
eager?: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Leaves the tab out: no trigger, no panel, not reachable by keyboard or
|
|
177
|
+
* by the URL. A `v-model` naming it keeps it, and the strip then shows no
|
|
178
|
+
* active tab and no panel.
|
|
179
|
+
*/
|
|
180
|
+
hidden?: boolean;
|
|
175
181
|
/**
|
|
176
182
|
* The page this tab links to. Any item with `href` or `to` makes the strip
|
|
177
183
|
* a set of links (link mode): a `<nav>` of real `<a>`s with
|
package/dist/ai/source/BbTree.md
CHANGED
|
@@ -144,9 +144,13 @@ watch(
|
|
|
144
144
|
{ immediate: true, flush: 'sync' }
|
|
145
145
|
);
|
|
146
146
|
|
|
147
|
-
/*
|
|
147
|
+
/*
|
|
148
|
+
* Leaves have nothing to hide, so they always count as expanded; so does a
|
|
149
|
+
* branch whose children are all hidden.
|
|
150
|
+
*/
|
|
148
151
|
const isExpanded = (item: BbTreeItem<Meta>) =>
|
|
149
|
-
!item.children?.
|
|
152
|
+
!item.children?.some((child) => !child.hidden) ||
|
|
153
|
+
expandedHashes.has(hashFor(item));
|
|
150
154
|
|
|
151
155
|
const toggleExpanded = (item: BbTreeItem<Meta>) => {
|
|
152
156
|
const value = valueFor(item);
|
|
@@ -236,6 +240,11 @@ export type BbTreeItem<Meta = any> = {
|
|
|
236
240
|
* Per-node override of the tree-level `expandable`.
|
|
237
241
|
*/
|
|
238
242
|
expandable?: BbTreeExpandable<Meta>;
|
|
243
|
+
/**
|
|
244
|
+
* Leaves the node out with its whole subtree. `expandedItems` keeps what
|
|
245
|
+
* it holds for it; a branch whose children are all hidden shows as a leaf.
|
|
246
|
+
*/
|
|
247
|
+
hidden?: boolean;
|
|
239
248
|
};
|
|
240
249
|
|
|
241
250
|
/**
|
|
@@ -310,8 +319,9 @@ export type BbTreeProps<Meta = any> = BbTreePtKeys & {
|
|
|
310
319
|
*/
|
|
311
320
|
itemValue: ItemAccessor<Meta>;
|
|
312
321
|
/**
|
|
313
|
-
*
|
|
314
|
-
*
|
|
322
|
+
* Which nodes get a toggle: a boolean for all, or a function of the node,
|
|
323
|
+
* its depth and its parent. Unset: every node with a child that is not
|
|
324
|
+
* `hidden`.
|
|
315
325
|
*/
|
|
316
326
|
expandable?: BbTreeExpandable<Meta>;
|
|
317
327
|
};
|
|
@@ -94,7 +94,8 @@
|
|
|
94
94
|
|
|
95
95
|
<script setup lang="ts">
|
|
96
96
|
import type { FallthroughAttrs } from '@/types/fallthrough';
|
|
97
|
-
import
|
|
97
|
+
import BbIcon from '@/components/BbIcon/BbIcon.vue';
|
|
98
|
+
import BbSpinner from '@/components/BbSpinner/BbSpinner.vue';
|
|
98
99
|
import { computed, mergeProps, onBeforeUnmount, ref } from 'vue';
|
|
99
100
|
import ErrorIcon from '../ErrorIcon/ErrorIcon.vue';
|
|
100
101
|
import WarningIcon from '../WarningIcon/WarningIcon.vue';
|
|
@@ -4,13 +4,17 @@ export type { BbAccordionProps, BbAccordionEvents, BbAccordionSlots };
|
|
|
4
4
|
type __VLS_Props = BbAccordionProps & FallthroughAttrs<'div', BbAccordionProps>;
|
|
5
5
|
type __VLS_Slots = BbAccordionSlots;
|
|
6
6
|
type __VLS_ModelProps = {
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Open / closed, or with `value` the key a group of accordions shares: open
|
|
9
|
+
* while it equals `value`.
|
|
10
|
+
*/
|
|
11
|
+
modelValue?: any;
|
|
8
12
|
};
|
|
9
13
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
14
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
-
"update:modelValue": (value:
|
|
15
|
+
"update:modelValue": (value: any) => any;
|
|
12
16
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
-
"onUpdate:modelValue"?: ((value:
|
|
17
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
14
18
|
}>, {
|
|
15
19
|
transitionDuration: number;
|
|
16
20
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -6,86 +6,100 @@ import i from "../BbCollapsible/BbCollapsible.vue.js";
|
|
|
6
6
|
import { BB_ACCORDION_PT as a } from "./types.js";
|
|
7
7
|
import { usePassthrough as o } from "../../composables/usePassthrough.js";
|
|
8
8
|
import { transitions as s } from "../../utilities/misc/transitions.js";
|
|
9
|
-
import {
|
|
9
|
+
import { computed as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, h as m, mergeModels as h, mergeProps as g, openBlock as _, renderSlot as v, toDisplayString as y, unref as b, useAttrs as x, useModel as S, withCtx as C } from "vue";
|
|
10
10
|
// src/components/BbAccordion/BbAccordion.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var
|
|
11
|
+
var w = /*@__PURE__*/ p({
|
|
12
12
|
inheritAttrs: !1,
|
|
13
13
|
__name: "BbAccordion",
|
|
14
|
-
props: /*@__PURE__*/
|
|
14
|
+
props: /*@__PURE__*/ h({
|
|
15
15
|
"pt:root": {},
|
|
16
|
+
"pt:root:disabled": {},
|
|
16
17
|
"pt:root:open": {},
|
|
17
18
|
"pt:header": {},
|
|
19
|
+
"pt:header:disabled": {},
|
|
18
20
|
"pt:header:open": {},
|
|
19
21
|
"pt:title": {},
|
|
22
|
+
"pt:title:disabled": {},
|
|
20
23
|
"pt:title:open": {},
|
|
21
24
|
"pt:icon": {},
|
|
25
|
+
"pt:icon:disabled": {},
|
|
22
26
|
"pt:icon:open": {},
|
|
23
27
|
"pt:panel": {},
|
|
28
|
+
"pt:panel:disabled": {},
|
|
24
29
|
"pt:panel:open": {},
|
|
25
30
|
pt: {},
|
|
26
31
|
eager: { type: Boolean },
|
|
27
32
|
transitionDuration: { default: s.medium },
|
|
28
|
-
modelValue: { type:
|
|
33
|
+
modelValue: { type: [
|
|
34
|
+
Boolean,
|
|
35
|
+
String,
|
|
36
|
+
Number,
|
|
37
|
+
null
|
|
38
|
+
] },
|
|
39
|
+
value: {},
|
|
40
|
+
disabled: { type: Boolean },
|
|
29
41
|
title: {},
|
|
30
42
|
id: {},
|
|
31
43
|
headingLevel: {}
|
|
32
44
|
}, {
|
|
33
|
-
modelValue: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: !1
|
|
36
|
-
},
|
|
45
|
+
modelValue: { default: !1 },
|
|
37
46
|
modelModifiers: {}
|
|
38
47
|
}),
|
|
39
48
|
emits: ["update:modelValue"],
|
|
40
49
|
setup(s) {
|
|
41
|
-
let
|
|
50
|
+
let p = S(s, "modelValue"), h = s, w = o({
|
|
42
51
|
component: "BbAccordion",
|
|
43
|
-
attrs:
|
|
44
|
-
props:
|
|
52
|
+
attrs: x(),
|
|
53
|
+
props: h,
|
|
45
54
|
parts: a.parts,
|
|
46
55
|
states: a.states,
|
|
47
|
-
active: {
|
|
48
|
-
|
|
49
|
-
|
|
56
|
+
active: {
|
|
57
|
+
open: () => O.value,
|
|
58
|
+
disabled: () => !!h.disabled
|
|
59
|
+
}
|
|
60
|
+
}), T = e().id.value, E = h.id || `bba_${T}`, D = (e, { slots: t }) => h.headingLevel ? m(`h${h.headingLevel}`, { class: "bb-accordion__heading" }, t.default?.()) : t.default?.(), O = c(() => h.value === void 0 ? !!p.value : p.value === h.value), k = () => {
|
|
61
|
+
h.disabled || (h.value === void 0 ? p.value = !p.value : p.value = O.value ? null : h.value);
|
|
50
62
|
};
|
|
51
|
-
return (e, a) => (
|
|
52
|
-
default:
|
|
53
|
-
id: `${
|
|
54
|
-
"aria-controls":
|
|
55
|
-
"aria-
|
|
63
|
+
return (e, a) => (_(), l("div", g({ class: ["bb-accordion", { "bb-accordion--titled": !e.$slots.header }] }, b(w).rootAttrs), [f(D, null, {
|
|
64
|
+
default: C(() => [f(n, g({
|
|
65
|
+
id: `${b(E)}_header`,
|
|
66
|
+
"aria-controls": b(E),
|
|
67
|
+
"aria-disabled": s.disabled || void 0,
|
|
68
|
+
"aria-expanded": O.value,
|
|
56
69
|
class: "bb-accordion__header",
|
|
57
|
-
onClick:
|
|
58
|
-
},
|
|
59
|
-
default:
|
|
60
|
-
toggle:
|
|
61
|
-
open:
|
|
62
|
-
}, () => [
|
|
63
|
-
open:
|
|
64
|
-
toggle:
|
|
65
|
-
}, () => [
|
|
70
|
+
onClick: k
|
|
71
|
+
}, b(w).header), {
|
|
72
|
+
default: C(() => [v(e.$slots, "header", {
|
|
73
|
+
toggle: k,
|
|
74
|
+
open: O.value
|
|
75
|
+
}, () => [u("span", g({ class: "bb-accordion__title" }, b(w).title), [v(e.$slots, "title", {
|
|
76
|
+
open: O.value,
|
|
77
|
+
toggle: k
|
|
78
|
+
}, () => [d(y(s.title), 1)])], 16), f(r, g({
|
|
66
79
|
class: "bb-accordion__icon",
|
|
67
|
-
icon:
|
|
80
|
+
icon: b(t),
|
|
68
81
|
size: "16"
|
|
69
|
-
},
|
|
82
|
+
}, b(w).icon), null, 16, ["icon"])])]),
|
|
70
83
|
_: 3
|
|
71
84
|
}, 16, [
|
|
72
85
|
"id",
|
|
73
86
|
"aria-controls",
|
|
87
|
+
"aria-disabled",
|
|
74
88
|
"aria-expanded"
|
|
75
89
|
])]),
|
|
76
90
|
_: 3
|
|
77
|
-
}),
|
|
78
|
-
id:
|
|
79
|
-
"aria-labelledby": `${
|
|
91
|
+
}), f(i, {
|
|
92
|
+
id: b(E),
|
|
93
|
+
"aria-labelledby": `${b(E)}_header`,
|
|
80
94
|
eager: s.eager,
|
|
81
|
-
"model-value":
|
|
95
|
+
"model-value": O.value,
|
|
82
96
|
role: "region",
|
|
83
97
|
tag: "div",
|
|
84
98
|
"transition-duration": s.transitionDuration
|
|
85
99
|
}, {
|
|
86
|
-
default:
|
|
87
|
-
open:
|
|
88
|
-
toggle:
|
|
100
|
+
default: C(() => [u("div", g({ class: "bb-accordion__panel" }, b(w).panel), [v(e.$slots, "default", {
|
|
101
|
+
open: O.value,
|
|
102
|
+
toggle: k
|
|
89
103
|
})], 16)]),
|
|
90
104
|
_: 3
|
|
91
105
|
}, 8, [
|
|
@@ -97,4 +111,4 @@ var C = /*@__PURE__*/ f({
|
|
|
97
111
|
])], 16));
|
|
98
112
|
}
|
|
99
113
|
});
|
|
100
|
-
export {
|
|
114
|
+
export { w as default };
|
|
@@ -5,6 +5,10 @@ export interface BbAccordionPtKeys {
|
|
|
5
5
|
* The accordion's outer element: the header and its panel.
|
|
6
6
|
*/
|
|
7
7
|
'pt:root'?: PtValue;
|
|
8
|
+
/**
|
|
9
|
+
* The accordion's outer element: the header and its panel. While `disabled`: `disabled` is set.
|
|
10
|
+
*/
|
|
11
|
+
'pt:root:disabled'?: PtValue;
|
|
8
12
|
/**
|
|
9
13
|
* The accordion's outer element: the header and its panel. While `open`: the panel is open (follows `v-model`).
|
|
10
14
|
*/
|
|
@@ -13,6 +17,10 @@ export interface BbAccordionPtKeys {
|
|
|
13
17
|
* The trigger button that opens and closes the panel.
|
|
14
18
|
*/
|
|
15
19
|
'pt:header'?: PtValue;
|
|
20
|
+
/**
|
|
21
|
+
* The trigger button that opens and closes the panel. While `disabled`: `disabled` is set.
|
|
22
|
+
*/
|
|
23
|
+
'pt:header:disabled'?: PtValue;
|
|
16
24
|
/**
|
|
17
25
|
* The trigger button that opens and closes the panel. While `open`: the panel is open (follows `v-model`).
|
|
18
26
|
*/
|
|
@@ -21,6 +29,10 @@ export interface BbAccordionPtKeys {
|
|
|
21
29
|
* The trigger's text (`title` / `#title`). Absent under a `#header` slot, which replaces the whole trigger content.
|
|
22
30
|
*/
|
|
23
31
|
'pt:title'?: PtValue;
|
|
32
|
+
/**
|
|
33
|
+
* The trigger's text (`title` / `#title`). While `disabled`: `disabled` is set. See `pt:title`.
|
|
34
|
+
*/
|
|
35
|
+
'pt:title:disabled'?: PtValue;
|
|
24
36
|
/**
|
|
25
37
|
* The trigger's text (`title` / `#title`). While `open`: the panel is open (follows `v-model`). See `pt:title`.
|
|
26
38
|
*/
|
|
@@ -29,6 +41,10 @@ export interface BbAccordionPtKeys {
|
|
|
29
41
|
* The chevron at the trigger's end, turned when open. Absent under a `#header` slot.
|
|
30
42
|
*/
|
|
31
43
|
'pt:icon'?: PtValue;
|
|
44
|
+
/**
|
|
45
|
+
* The chevron at the trigger's end, turned when open. While `disabled`: `disabled` is set. See `pt:icon`.
|
|
46
|
+
*/
|
|
47
|
+
'pt:icon:disabled'?: PtValue;
|
|
32
48
|
/**
|
|
33
49
|
* The chevron at the trigger's end, turned when open. While `open`: the panel is open (follows `v-model`). See `pt:icon`.
|
|
34
50
|
*/
|
|
@@ -37,6 +53,10 @@ export interface BbAccordionPtKeys {
|
|
|
37
53
|
* The region the header controls (the ARIA accordion panel).
|
|
38
54
|
*/
|
|
39
55
|
'pt:panel'?: PtValue;
|
|
56
|
+
/**
|
|
57
|
+
* The region the header controls (the ARIA accordion panel). While `disabled`: `disabled` is set.
|
|
58
|
+
*/
|
|
59
|
+
'pt:panel:disabled'?: PtValue;
|
|
40
60
|
/**
|
|
41
61
|
* The region the header controls (the ARIA accordion panel). While `open`: the panel is open (follows `v-model`).
|
|
42
62
|
*/
|
|
@@ -18,12 +18,13 @@ export type BbAccordionPtPart = 'root' | 'header' | 'title' | 'icon' | 'panel';
|
|
|
18
18
|
* Passthrough states of `BbAccordion`.
|
|
19
19
|
*
|
|
20
20
|
* @state open - Component-wide: the panel is open (follows `v-model`).
|
|
21
|
+
* @state disabled - Component-wide: `disabled` is set.
|
|
21
22
|
*/
|
|
22
|
-
export type BbAccordionPtState = 'open';
|
|
23
|
+
export type BbAccordionPtState = 'open' | 'disabled';
|
|
23
24
|
/** The runtime lists the resolver is wired with — kept next to the types so the two cannot drift. */
|
|
24
25
|
export declare const BB_ACCORDION_PT: {
|
|
25
26
|
readonly parts: readonly ["root", "header", "title", "icon", "panel"];
|
|
26
|
-
readonly states: readonly ["open"];
|
|
27
|
+
readonly states: readonly ["disabled", "open"];
|
|
27
28
|
};
|
|
28
29
|
export type BbAccordionProps = BbAccordionPtKeys & {
|
|
29
30
|
/**
|
|
@@ -33,11 +34,23 @@ export type BbAccordionProps = BbAccordionPtKeys & {
|
|
|
33
34
|
pt?: PtMap<BbAccordionPtPart, BbAccordionPtState>;
|
|
34
35
|
} & Pick<BbCollapsibleProps, 'eager' | 'transitionDuration'> & {
|
|
35
36
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
37
|
+
* Open (`true`) or closed. With `value`, the key a group of accordions
|
|
38
|
+
* shares: open while it equals `value`, `null` when none is. An
|
|
39
|
+
* accordion with no `v-model` starts closed.
|
|
38
40
|
* @defaultValue `false`
|
|
39
41
|
*/
|
|
40
|
-
modelValue?: boolean;
|
|
42
|
+
modelValue?: boolean | string | number | null;
|
|
43
|
+
/**
|
|
44
|
+
* This accordion's key in a group sharing one `v-model`: open while the
|
|
45
|
+
* model equals it; a click sets the model to it, or to `null` to close.
|
|
46
|
+
* One open at a time.
|
|
47
|
+
*/
|
|
48
|
+
value?: string | number;
|
|
49
|
+
/**
|
|
50
|
+
* The header does not toggle and says `aria-disabled` (it stays
|
|
51
|
+
* focusable); an open panel stays open.
|
|
52
|
+
*/
|
|
53
|
+
disabled?: boolean;
|
|
41
54
|
} & {
|
|
42
55
|
/**
|
|
43
56
|
* The trigger's text, with a chevron at its end that turns when open,
|
|
@@ -61,9 +74,10 @@ export type BbAccordionProps = BbAccordionPtKeys & {
|
|
|
61
74
|
};
|
|
62
75
|
export type BbAccordionEvents =
|
|
63
76
|
/**
|
|
64
|
-
* Emitted when the accordion
|
|
77
|
+
* Emitted when the accordion opens or closes: `true` / `false`, or with
|
|
78
|
+
* `value` that key, or `null` on close.
|
|
65
79
|
*/
|
|
66
|
-
(e: 'update:modelValue', value:
|
|
80
|
+
(e: 'update:modelValue', value: any) => void;
|
|
67
81
|
/** Props exposed by the `header` and `default` slots. */
|
|
68
82
|
export type BbAccordionToggleSlotProps = {
|
|
69
83
|
/** Whether the accordion panel is currently open. */
|
|
@@ -11,8 +11,8 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
|
|
|
11
11
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
12
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
|
-
hideClose: boolean;
|
|
15
14
|
variant: import('../../index.js').AlertVariantType;
|
|
15
|
+
hideClose: boolean;
|
|
16
16
|
transitionDuration: number;
|
|
17
17
|
iconSize: number | import('../../types/CommonProps.js').CssSize | keyof import('../../index.js').BbDialogSizes;
|
|
18
18
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -7,17 +7,17 @@ import { Fragment as i, createBlock as a, createCommentVNode as o, createElement
|
|
|
7
7
|
var _ = /*@__PURE__*/ l({
|
|
8
8
|
__name: "BadgeBodyContent",
|
|
9
9
|
setup(l) {
|
|
10
|
-
let _ = r() ?? n().throw("[BbBadge] internal body renderer mounted outside a badge — this is a bug.");
|
|
11
|
-
return (n, r) => g(_).
|
|
10
|
+
let _ = r() ?? n().throw("[BbBadge] internal body renderer mounted outside a badge — this is a bug."), v = () => _.slots["prepend:icon"] ?? (_.prependIcon.value ? void 0 : _.slots["append:icon"]), y = () => _.prependIcon.value ?? _.appendIcon.value;
|
|
11
|
+
return (n, r) => g(_).iconOnly.value ? (p(), s(i, { key: 0 }, [g(_).loading.value ? (p(), a(t, d({
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "bb-badge__spinner bb-badge__icon"
|
|
14
|
-
}, g(_).passthrough.spinner), null, 16)) :
|
|
14
|
+
}, g(_).passthrough.spinner), null, 16)) : v() ? (p(), s("span", d({
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "bb-badge__icon bb-badge__icon-slot"
|
|
17
|
-
}, g(_).passthrough.icon), [(p(), a(h(
|
|
17
|
+
}, g(_).passthrough.icon), [(p(), a(h(v()), f(u(g(_).iconScope.value)), null, 16))], 16)) : y() ? (p(), a(e, d({
|
|
18
18
|
key: 2,
|
|
19
19
|
class: "bb-badge__icon",
|
|
20
|
-
icon:
|
|
20
|
+
icon: y()
|
|
21
21
|
}, g(_).passthrough.icon), null, 16, ["icon"])) : o("", !0), c("span", d({ class: "bb-badge__text bb-sr-only" }, g(_).passthrough.text), [m(n.$slots, "default")], 16)], 64)) : (p(), s(i, { key: 1 }, [
|
|
22
22
|
g(_).spinnerLeads.value ? (p(), a(t, d({
|
|
23
23
|
key: 0,
|
|
@@ -7,7 +7,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
7
7
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
8
|
"onClick:clear"?: ((event: MouseEvent) => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
|
-
size: keyof import('../../index.js').BbDialogSizes
|
|
10
|
+
size: import('../../index.js').Responsive<keyof import('../../index.js').BbDialogSizes>;
|
|
11
11
|
variant: import('../../index.js').BadgeVariantType;
|
|
12
12
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,18 +1,18 @@
|
|
|
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
|
|
6
|
-
import { warnRemovedAttrs as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { provideBadgeHost as
|
|
12
|
-
import
|
|
13
|
-
import { BB_BADGE_PT as
|
|
14
|
-
import { usePassthrough as
|
|
15
|
-
import { Fragment as
|
|
4
|
+
import { useLogger as ee } from "../../composables/useLogger.js";
|
|
5
|
+
import { removedPropsFor as r } from "../../deprecation/removedProps.js";
|
|
6
|
+
import { warnRemovedAttrs as te } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
7
|
+
import i from "../BbIcon/BbIcon.vue.js";
|
|
8
|
+
import ne from "../BbSpinner/BbSpinner.vue.js";
|
|
9
|
+
import a from "./BadgeBodyContent.vue.js";
|
|
10
|
+
import o from "./BbBadgeButton.vue.js";
|
|
11
|
+
import { provideBadgeHost as s } from "./badgeButtonContext.js";
|
|
12
|
+
import c from "../../assets/svgs/clear.svg_raw.js";
|
|
13
|
+
import { BB_BADGE_PT as l } from "./types.js";
|
|
14
|
+
import { usePassthrough as u, variantPt as d } from "../../composables/usePassthrough.js";
|
|
15
|
+
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, guardReactiveProps as x, isVNode as S, mergeProps as C, normalizeProps as re, openBlock as w, renderSlot as T, shallowRef as ie, toDisplayString as E, unref as D, useAttrs as O, useSlots as k, withCtx as A, withModifiers as j } from "vue";
|
|
16
16
|
// src/components/BbBadge/BbBadge.vue?vue&type=script&setup=true&lang.ts
|
|
17
17
|
var M = ["id"], N = {
|
|
18
18
|
key: 2,
|
|
@@ -24,8 +24,8 @@ var M = ["id"], N = {
|
|
|
24
24
|
], F = {
|
|
25
25
|
key: 3,
|
|
26
26
|
class: "bb-sr-only"
|
|
27
|
-
}, I = /*@__PURE__*/
|
|
28
|
-
mixins: [
|
|
27
|
+
}, I = /*@__PURE__*/ b({
|
|
28
|
+
mixins: [d(l)],
|
|
29
29
|
inheritAttrs: !1,
|
|
30
30
|
__name: "BbBadge",
|
|
31
31
|
props: {
|
|
@@ -69,37 +69,38 @@ var M = ["id"], N = {
|
|
|
69
69
|
"pt:clear:destructive": {},
|
|
70
70
|
"pt:clear:outline": {},
|
|
71
71
|
pt: {},
|
|
72
|
-
|
|
72
|
+
iconOnly: { type: [Boolean, Object] },
|
|
73
73
|
"prepend:icon": {},
|
|
74
74
|
"append:icon": {},
|
|
75
75
|
loading: { type: Boolean },
|
|
76
76
|
clearable: { type: Boolean },
|
|
77
77
|
clearableLabel: {},
|
|
78
78
|
size: { default: void 0 },
|
|
79
|
+
text: {},
|
|
79
80
|
variant: { default: void 0 }
|
|
80
81
|
},
|
|
81
82
|
emits: ["click:clear"],
|
|
82
|
-
setup(
|
|
83
|
-
let I =
|
|
83
|
+
setup(d, { emit: b }) {
|
|
84
|
+
let I = d, L = b, R = k(), z = e("BbBadge", I, {
|
|
84
85
|
size: "md",
|
|
85
86
|
variant: "primary"
|
|
86
|
-
}), B =
|
|
87
|
+
}), B = ie(null), V = u({
|
|
87
88
|
component: "BbBadge",
|
|
88
89
|
attrs: O(),
|
|
89
90
|
props: I,
|
|
90
|
-
parts:
|
|
91
|
-
states:
|
|
91
|
+
parts: l.parts,
|
|
92
|
+
states: l.states,
|
|
92
93
|
active: {
|
|
93
94
|
loading: () => !!I.loading,
|
|
94
95
|
activeLink: () => !!B.value?.value.activeLink,
|
|
95
96
|
exactActiveLink: () => !!B.value?.value.exactActiveLink
|
|
96
97
|
},
|
|
97
98
|
variant: {
|
|
98
|
-
...
|
|
99
|
+
...l.variant,
|
|
99
100
|
current: () => z.variant
|
|
100
101
|
}
|
|
101
102
|
});
|
|
102
|
-
process.env.NODE_ENV !== "production" &&
|
|
103
|
+
process.env.NODE_ENV !== "production" && te("BbBadge", r("BbBadge"));
|
|
103
104
|
let H = [
|
|
104
105
|
"xs",
|
|
105
106
|
"sm",
|
|
@@ -107,15 +108,36 @@ var M = ["id"], N = {
|
|
|
107
108
|
"lg",
|
|
108
109
|
"xl",
|
|
109
110
|
"2xl"
|
|
110
|
-
], { t: U } = n(), W =
|
|
111
|
+
], { t: U } = n(), W = ee(), G = p(() => {
|
|
112
|
+
let e = z.size, t = typeof e == "object" && e ? {
|
|
113
|
+
default: "md",
|
|
114
|
+
...e
|
|
115
|
+
} : { default: e };
|
|
116
|
+
return Object.entries(t).map(([e, t]) => {
|
|
117
|
+
let n = t ?? "md";
|
|
118
|
+
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
|
+
});
|
|
120
|
+
}), K = () => I.iconOnly === !0, q = [
|
|
121
|
+
"default",
|
|
122
|
+
"sm",
|
|
123
|
+
"md",
|
|
124
|
+
"lg",
|
|
125
|
+
"xl",
|
|
126
|
+
"2xl"
|
|
127
|
+
], J = () => {
|
|
128
|
+
let e = I.iconOnly;
|
|
129
|
+
if (!e || e === !0) return [];
|
|
130
|
+
let t = !!e.default;
|
|
131
|
+
return q.flatMap((n) => (n !== "default" && e[n] !== void 0 && (t = !!e[n]), t ? [`bb-badge--icon-${n}`] : []));
|
|
132
|
+
}, ae = () => !!I["prepend:icon"] || !!R["prepend:icon"], oe = () => !!I["append:icon"] || !!R["append:icon"], Y = () => ({
|
|
111
133
|
activeLink: !!B.value?.value.activeLink,
|
|
112
134
|
exactActiveLink: !!B.value?.value.exactActiveLink,
|
|
113
135
|
loading: !!I.loading
|
|
114
|
-
}), X = () =>
|
|
115
|
-
|
|
136
|
+
}), X = () => oe() && !ae(), Z = (e) => Array.isArray(e) && e.some((e) => S(e) && (e.type === o || e.type === f && Z(e.children))), Q = () => Z(R.default?.({}));
|
|
137
|
+
s({
|
|
116
138
|
passthrough: V,
|
|
117
|
-
|
|
118
|
-
return
|
|
139
|
+
iconOnly: { get value() {
|
|
140
|
+
return K();
|
|
119
141
|
} },
|
|
120
142
|
slots: R,
|
|
121
143
|
iconScope: { get value() {
|
|
@@ -143,46 +165,47 @@ var M = ["id"], N = {
|
|
|
143
165
|
B.value = e;
|
|
144
166
|
}
|
|
145
167
|
});
|
|
146
|
-
let
|
|
168
|
+
let se = p(() => [
|
|
147
169
|
"bb-badge",
|
|
148
|
-
|
|
170
|
+
...G.value,
|
|
171
|
+
...J(),
|
|
149
172
|
z.variant && z.variant !== "none" && `bb-badge--${z.variant}`,
|
|
150
173
|
{
|
|
151
174
|
"bb-badge--icon": K(),
|
|
152
175
|
"bb-badge--clearable": I.clearable,
|
|
153
176
|
"bb-badge--loading": I.loading
|
|
154
177
|
}
|
|
155
|
-
]), $ = t().id,
|
|
178
|
+
]), $ = t().id, ce = p(() => I.clearableLabel || Q() ? void 0 : `${$.value}__clear ${$.value}__body`), le = (e) => {
|
|
156
179
|
L("click:clear", e);
|
|
157
180
|
};
|
|
158
|
-
return (e, t) => (
|
|
159
|
-
Q() ?
|
|
181
|
+
return (e, t) => (w(), g("span", C({ class: se.value }, D(V).rootAttrs), [
|
|
182
|
+
Q() ? T(e.$slots, "default", {}, void 0, void 0, 0) : (w(), g("span", {
|
|
160
183
|
key: 1,
|
|
161
184
|
id: `${D($)}__body`,
|
|
162
185
|
class: "bb-badge__body"
|
|
163
|
-
}, [
|
|
164
|
-
default: A(() => [
|
|
186
|
+
}, [y(a, null, {
|
|
187
|
+
default: A(() => [T(e.$slots, "default", {}, () => [v(E(I.text), 1)])]),
|
|
165
188
|
_: 3
|
|
166
189
|
})], 8, M)),
|
|
167
|
-
I.clearable ? (
|
|
190
|
+
I.clearable ? (w(), g("span", N, [K() ? h("", !0) : (w(), g(f, { key: 0 }, [I.loading && X() ? (w(), m(ne, C({
|
|
168
191
|
key: 0,
|
|
169
192
|
class: "bb-badge__spinner bb-badge__append-icon"
|
|
170
|
-
}, D(V).spinner), null, 16)) : R["append:icon"] ? (
|
|
193
|
+
}, D(V).spinner), null, 16)) : R["append:icon"] ? (w(), g("span", C({
|
|
171
194
|
key: 1,
|
|
172
195
|
class: "bb-badge__append-icon bb-badge__icon-slot"
|
|
173
|
-
}, D(V).icon), [
|
|
196
|
+
}, D(V).icon), [T(e.$slots, "append:icon", re(x(Y())))], 16)) : I["append:icon"] ? (w(), m(i, C({
|
|
174
197
|
key: 2,
|
|
175
198
|
class: "bb-badge__append-icon",
|
|
176
199
|
icon: I["append:icon"]
|
|
177
|
-
}, D(V).icon), null, 16, ["icon"])) :
|
|
200
|
+
}, D(V).icon), null, 16, ["icon"])) : h("", !0)], 64)), _("button", C({
|
|
178
201
|
id: `${D($)}__clear`,
|
|
179
202
|
"aria-label": I.clearableLabel || D(U)("badge.clearLabel").value,
|
|
180
|
-
"aria-labelledby":
|
|
203
|
+
"aria-labelledby": ce.value,
|
|
181
204
|
class: "bb-badge__clear",
|
|
182
205
|
type: "button",
|
|
183
|
-
onClick: j(
|
|
184
|
-
}, D(V).clear), [
|
|
185
|
-
I.loading ? (
|
|
206
|
+
onClick: j(le, ["stop"])
|
|
207
|
+
}, D(V).clear), [y(i, { icon: D(c) }, null, 8, ["icon"])], 16, P)])) : h("", !0),
|
|
208
|
+
I.loading ? (w(), g("span", F, E(D(U)("common.loadingText")), 1)) : h("", !0)
|
|
186
209
|
], 16));
|
|
187
210
|
}
|
|
188
211
|
});
|