bitboss-ui 3.0.0-beta.73 → 3.0.0-beta.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/bin/bitboss-ui-mcp.mjs +101 -3
- package/bin/bitboss-ui.mjs +6 -1
- package/bin/cli.mjs +31 -5
- package/dist/ai/BbAvatar.md +86 -58
- package/dist/ai/BbBadge.md +5 -5
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +2 -2
- package/dist/ai/BbCalendar.md +9 -5
- package/dist/ai/BbCheckboxGroup.md +5 -4
- package/dist/ai/BbColorInput.md +12 -0
- package/dist/ai/BbColorPalette.md +19 -15
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +16 -3
- package/dist/ai/BbDatePickerInput.md +17 -1
- package/dist/ai/BbDialog.md +16 -4
- package/dist/ai/BbDropdown.md +175 -67
- package/dist/ai/BbDropdownButton.md +27 -8
- package/dist/ai/BbForm.md +4 -1
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbNumberInput.md +8 -4
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbRadioGroup.md +4 -4
- package/dist/ai/BbSelect.md +79 -67
- package/dist/ai/BbSelectPopover.md +24 -5
- package/dist/ai/BbSwitchGroup.md +5 -4
- package/dist/ai/BbTable.md +59 -34
- package/dist/ai/BbTimePicker.md +16 -3
- package/dist/ai/BbTimePickerInput.md +15 -1
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/BbTree.md +5 -1
- package/dist/ai/CommonPopover.md +1 -0
- package/dist/ai/FlatListBox.md +1 -0
- package/dist/ai/GroupedListBox.md +1 -0
- package/dist/ai/ListBox.md +1 -0
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +215 -6
- package/dist/ai/components.json +77 -43
- package/dist/ai/composables/useToast.md +2 -2
- package/dist/ai/design-tokens.json +60 -0
- package/dist/ai/guides/agent-contract.md +8 -4
- package/dist/ai/guides/design-tokens.md +33 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/fetch-items-playbook.md +7 -11
- package/dist/ai/guides/inertia-helpers.md +613 -53
- package/dist/ai/guides/migration/adoption-checklist.md +5 -5
- package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
- package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
- package/dist/ai/guides/migration/components/bb-table.md +2 -1
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/v2-to-v3.md +46 -5
- package/dist/ai/guides/migration/v3-beta-tooling.md +4 -0
- package/dist/ai/guides/passthrough.md +3 -3
- package/dist/ai/guides/preset-components.md +15 -2
- package/dist/ai/guides/reporting.md +49 -0
- package/dist/ai/helpers/inertia/manifest.json +33 -38
- package/dist/ai/helpers/inertia/useHasChanged.ts +25 -37
- package/dist/ai/helpers/inertia/useQuery.ts +24 -6
- package/dist/ai/helpers/inertia/utils.ts +552 -3
- package/dist/ai/index.md +2 -1
- package/dist/ai/manifest/common.json +1 -0
- package/dist/ai/manifest/components/BbAlert.tree.json +1 -1
- package/dist/ai/manifest/components/BbAvatar.json +5 -2
- package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
- package/dist/ai/manifest/components/BbCalendar.json +2 -2
- package/dist/ai/manifest/components/BbCarousel.json +0 -3
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbColorInput.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.json +7 -4
- package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
- package/dist/ai/manifest/components/BbConfirmPortal.json +1 -1
- package/dist/ai/manifest/components/BbDatePicker.json +6 -3
- package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
- package/dist/ai/manifest/components/BbDialog.tree.json +7 -1
- package/dist/ai/manifest/components/BbDropdown.json +23 -17
- package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.tree.json +16 -5
- package/dist/ai/manifest/components/BbDropdownButton.json +15 -9
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
- package/dist/ai/manifest/components/BbForm.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbHoverCardPortal.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +2 -0
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbPopoverPortal.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbSelect.json +10 -7
- package/dist/ai/manifest/components/BbSelectPopover.json +7 -4
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +5 -1
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbTable.json +6 -6
- package/dist/ai/manifest/components/BbTable.tree.json +16 -6
- package/dist/ai/manifest/components/BbTimePicker.json +7 -4
- package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
- package/dist/ai/manifest/components/BbToastPortal.json +1 -1
- package/dist/ai/manifest/components/BbTree.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +2 -1
- package/dist/ai/manifest/components/FlatListBox.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +2 -1
- package/dist/ai/manifest/components/ListBox.json +2 -1
- package/dist/ai/manifest/components/OptionsContainer.json +6 -4
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +36 -3
- package/dist/ai/manifest/types.advanced.json +81 -80
- package/dist/ai/manifest/types.api.json +64 -65
- package/dist/ai/manifest/types.wrapper.json +155 -118
- package/dist/ai/recipes/inertia/layout-scaffold.md +3 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +3 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +3 -1
- package/dist/ai/source/BbAlert.md +16 -4
- package/dist/ai/source/BbAvatar.md +121 -9
- package/dist/ai/source/BbBadge.md +12 -5
- package/dist/ai/source/BbBreadcrumbs.md +56 -55
- package/dist/ai/source/BbButton.md +41 -25
- package/dist/ai/source/BbCalendar.md +22 -12
- package/dist/ai/source/BbCarousel.md +31 -28
- package/dist/ai/source/BbCheckboxGroup.md +15 -9
- package/dist/ai/source/BbColorInput.md +19 -0
- package/dist/ai/source/BbColorPalette.md +59 -12
- package/dist/ai/source/BbConfirm.md +7 -0
- package/dist/ai/source/BbConfirmPortal.md +9 -4
- package/dist/ai/source/BbDatePicker.md +71 -22
- package/dist/ai/source/BbDatePickerInput.md +72 -9
- package/dist/ai/source/BbDialog.md +45 -2
- package/dist/ai/source/BbDropdown.md +263 -63
- package/dist/ai/source/BbDropdownButton.md +27 -2
- package/dist/ai/source/BbDropdownGroup.md +121 -59
- package/dist/ai/source/BbForm.md +73 -6
- package/dist/ai/source/BbGallery.md +76 -55
- package/dist/ai/source/BbHost.md +12 -0
- package/dist/ai/source/BbHoverCard.md +7 -0
- package/dist/ai/source/BbHoverCardPortal.md +9 -5
- package/dist/ai/source/BbNumberInput.md +22 -16
- package/dist/ai/source/BbOffCanvas.md +48 -2
- package/dist/ai/source/BbPopover.md +7 -0
- package/dist/ai/source/BbPopoverPortal.md +9 -5
- package/dist/ai/source/BbRadio.md +4 -3
- package/dist/ai/source/BbRadioGroup.md +19 -10
- package/dist/ai/source/BbSelect.md +35 -20
- package/dist/ai/source/BbSelectPopover.md +116 -8
- package/dist/ai/source/BbSwitchGroup.md +11 -4
- package/dist/ai/source/BbTable.md +126 -32
- package/dist/ai/source/BbTag.md +10 -3
- package/dist/ai/source/BbTimePicker.md +69 -15
- package/dist/ai/source/BbTimePickerInput.md +45 -7
- package/dist/ai/source/BbToast.md +16 -2
- package/dist/ai/source/BbToastPortal.md +18 -6
- package/dist/ai/source/BbTree.md +1 -1
- package/dist/ai/source/CommonFieldInput.md +11 -5
- package/dist/ai/source/CommonPopover.md +28 -2
- package/dist/ai/source/FlatListBox.md +26 -5
- package/dist/ai/source/GroupedListBox.md +63 -11
- package/dist/ai/source/ListBox.md +4 -0
- package/dist/ai/source/OptionsContainer.md +29 -11
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +31 -26
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +61 -43
- package/dist/components/BbAvatar/avatarIdentity.js +25 -0
- package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
- package/dist/components/BbAvatar/types.d.ts +24 -5
- package/dist/components/BbAvatar/types.js +5 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +80 -79
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +152 -158
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +235 -234
- package/dist/components/BbCalendar/types.d.ts +2 -2
- package/dist/components/BbCalendar/useDayGrid.js +120 -123
- package/dist/components/BbCalendar/useDayjsLocale.js +11 -8
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
- package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
- package/dist/components/BbColorInput/types.d.ts +7 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +239 -223
- package/dist/components/BbColorPalette/types.d.ts +8 -1
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -4
- package/dist/components/BbConfirm/types.d.ts +5 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +4 -2
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +160 -143
- package/dist/components/BbDatePicker/types.d.ts +9 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +483 -496
- package/dist/components/BbDatePickerInput/types.d.ts +7 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +252 -236
- package/dist/components/BbDialog/leaveGhost.js +38 -0
- package/dist/components/BbDialog/overlayActions.js +34 -20
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +92 -87
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +419 -368
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +384 -340
- package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
- package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +133 -119
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +73 -45
- package/dist/components/BbDropdown/normalizeGroups.js +6 -2
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +8 -0
- package/dist/components/BbDropdown/types.d.ts +73 -58
- package/dist/components/BbDropdown/types.js +1 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +93 -72
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +48 -0
- package/dist/components/BbDropdownButton/types.d.ts +13 -2
- package/dist/components/BbDropdownButton/types.js +2 -0
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -21
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +229 -227
- package/dist/components/BbForm/types.d.ts +31 -0
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +318 -296
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -5
- package/dist/components/BbHoverCard/types.d.ts +5 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +10 -6
- package/dist/components/BbNumberInput/numberDisplay.js +102 -106
- package/dist/components/BbNumberInput/types.d.ts +4 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +425 -409
- package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -5
- package/dist/components/BbPopover/types.d.ts +5 -0
- package/dist/components/BbRadio/types.d.ts +4 -3
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -106
- package/dist/components/BbRadioGroup/types.d.ts +4 -7
- package/dist/components/BbSelect/BbSelect.vue.d.ts +3 -1
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +167 -163
- package/dist/components/BbSelect/types.d.ts +23 -20
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +3 -1
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +680 -637
- package/dist/components/BbSelectPopover/types.d.ts +10 -4
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
- package/dist/components/BbSwitchGroup/types.d.ts +3 -6
- package/dist/components/BbTable/BbTable.vue.d.ts +1 -3
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1182 -1165
- package/dist/components/BbTable/BbTableDataRow.js +96 -96
- package/dist/components/BbTable/types.d.ts +11 -10
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +157 -140
- package/dist/components/BbTimePicker/types.d.ts +9 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +3 -1
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +278 -268
- package/dist/components/BbTimePickerInput/types.d.ts +7 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +12 -12
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +2 -4
- package/dist/components/BbToast/types.d.ts +7 -2
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
- package/dist/components/BbTree/types.d.ts +1 -1
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +36 -36
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +14 -2
- package/dist/components/CommonTimeSelector/useMeridiem.js +6 -6
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +115 -96
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +194 -166
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
- package/dist/composables/formSubmitLock.js +2 -1
- package/dist/composables/overlayRegistry.js +52 -42
- package/dist/composables/useActiveInactiveState.js +8 -4
- package/dist/composables/useBbDialog.js +5 -5
- package/dist/composables/useItemsGetter.js +34 -32
- package/dist/composables/useOpenModel.js +20 -0
- package/dist/composables/useOwnModel.js +16 -0
- package/dist/composables/useSegmentedFields.js +31 -20
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/i18n/currencyDigits.js +58 -0
- package/dist/i18n/locales/ar.json +2 -0
- package/dist/i18n/locales/cs.json +2 -0
- package/dist/i18n/locales/da.json +2 -0
- package/dist/i18n/locales/de-CH.json +2 -0
- package/dist/i18n/locales/de.json +2 -0
- package/dist/i18n/locales/el.json +2 -0
- package/dist/i18n/locales/en-GB.json +2 -0
- package/dist/i18n/locales/en.json +2 -0
- package/dist/i18n/locales/es-MX.json +2 -0
- package/dist/i18n/locales/es.json +2 -0
- package/dist/i18n/locales/fa.json +2 -0
- package/dist/i18n/locales/fi.json +2 -0
- package/dist/i18n/locales/fr.json +2 -0
- package/dist/i18n/locales/he.json +2 -0
- package/dist/i18n/locales/hu.json +2 -0
- package/dist/i18n/locales/it.json +2 -0
- package/dist/i18n/locales/ja.json +2 -0
- package/dist/i18n/locales/ko.json +2 -0
- package/dist/i18n/locales/nb.json +2 -0
- package/dist/i18n/locales/nl.json +2 -0
- package/dist/i18n/locales/pl.json +2 -0
- package/dist/i18n/locales/pt-BR.json +2 -0
- package/dist/i18n/locales/pt-PT.json +2 -0
- package/dist/i18n/locales/ro.json +2 -0
- package/dist/i18n/locales/ru.json +2 -0
- package/dist/i18n/locales/sv.json +2 -0
- package/dist/i18n/locales/tr.json +2 -0
- package/dist/i18n/locales/uk.json +2 -0
- package/dist/i18n/locales/zh-CN.json +2 -0
- package/dist/i18n/locales/zh-HK.json +2 -0
- package/dist/i18n/locales/zh-TW.json +2 -0
- package/dist/i18n/regionDates.js +250 -0
- package/dist/i18n/regionHints.js +30 -41
- package/dist/icon-scan.js +68 -61
- package/dist/index.d.ts +35 -31
- package/dist/llms-full.txt +1428 -400
- package/dist/llms-medium.txt +8 -4
- package/dist/llms.txt +4 -2
- package/dist/locale-blueprint.json +2 -0
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +2 -1
- package/dist/types/CommonProps.d.ts +8 -0
- package/dist/types/Option.d.ts +10 -0
- package/dist/types/ptComponentMap.d.ts +3 -3
- package/dist/utilities/functions/hash.js +97 -64
- package/dist/utilities/functions/isEqual.js +33 -25
- package/dist/utilities/functions/slotContent.js +19 -0
- package/dist/utils/loadRetry.js +8 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +2 -1
- package/dist/vite.js +11 -4
- package/llms.txt +4 -2
- package/package.json +3 -2
- package/scripts/README.md +3 -1
- package/scripts/lib/adoption-checklist.json +6 -5
- package/scripts/lib/agent-manifest.mjs +33 -6
- package/scripts/lib/agent-setup.mjs +90 -24
- package/scripts/lib/cldr-pins.ts +182 -0
- package/scripts/lib/engines-include.d.mts +5 -0
- package/scripts/lib/engines-include.mjs +40 -0
- package/scripts/lib/eslint-plugin.mjs +8 -2
- package/scripts/lib/hidden-label-placeholder.mjs +25 -5
- package/scripts/lib/idiom-scan.mjs +30 -3
- package/scripts/lib/legacy-agent-files.json +152 -0
- package/scripts/lib/mcp-config.mjs +74 -7
- package/scripts/lib/portal-names.mjs +78 -8
- package/scripts/lib/release-results.mjs +5 -2
- package/scripts/lib/report.mjs +340 -0
- package/scripts/lib/run-beat.mjs +14 -0
- package/scripts/lib/run-records.mjs +313 -0
- package/scripts/lib/selector-log.mjs +98 -0
- package/scripts/lib/ticket-beat.mjs +30 -0
- package/scripts/lib/validate-bb-markup.mjs +37 -2
- package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
import { useLocale as e } from "../../composables/useLocale.js";
|
|
2
2
|
import { useLogger as t } from "../../composables/useLogger.js";
|
|
3
3
|
import { slotKey as n } from "../../utilities/functions/slotKey.js";
|
|
4
|
-
import {
|
|
4
|
+
import { SlotChain as r } from "../../utilities/functions/slotContent.js";
|
|
5
|
+
import { removedPropsFor as ee } from "../../deprecation/removedProps.js";
|
|
5
6
|
import { warnRemovedAttrs as i } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
6
7
|
import a from "../BbBaseButton/BbBaseButton.vue.js";
|
|
7
8
|
import o from "../BbDropdown/BbDropdown.vue.js";
|
|
8
9
|
import { estimateBreadcrumbItemWidth as s, estimateEllipsisWidth as c } from "./estimateBreadcrumbItemWidth.js";
|
|
9
10
|
import l from "../../assets/svgs/chevron_right.svg_raw.js";
|
|
10
|
-
import { BB_BREADCRUMBS_PT as
|
|
11
|
+
import { BB_BREADCRUMBS_PT as u } from "./types.js";
|
|
11
12
|
import { usePassthrough as te } from "../../composables/usePassthrough.js";
|
|
12
|
-
import
|
|
13
|
-
import { Fragment as
|
|
14
|
-
import { useResizeObserver as
|
|
13
|
+
import d from "../BbIcon/BbIcon.vue.js";
|
|
14
|
+
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as ne, createTextVNode as re, createVNode as v, defineComponent as y, guardReactiveProps as b, mergeProps as x, normalizeProps as S, onBeforeUnmount as ie, openBlock as C, ref as w, renderList as T, renderSlot as E, toDisplayString as ae, unref as D, useAttrs as oe, useSlots as se, watch as ce, withCtx as O } from "vue";
|
|
15
|
+
import { useResizeObserver as le } from "@vueuse/core";
|
|
15
16
|
// src/components/BbBreadcrumbs/BbBreadcrumbs.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
-
var
|
|
17
|
+
var ue = ["aria-label"], de = { class: "bb-breadcrumbs__container" }, fe = {
|
|
17
18
|
key: 0,
|
|
18
19
|
class: "bb-breadcrumbs__edge bb-breadcrumbs__edge--prepend"
|
|
19
|
-
},
|
|
20
|
+
}, pe = { class: "bb-breadcrumbs__list" }, me = ["aria-label", "disabled"], he = {
|
|
20
21
|
key: 0,
|
|
21
22
|
"aria-hidden": "true",
|
|
22
23
|
class: "bb-breadcrumbs__divider"
|
|
23
|
-
},
|
|
24
|
+
}, ge = ["title"], _e = {
|
|
24
25
|
key: 0,
|
|
25
26
|
"aria-hidden": "true",
|
|
26
27
|
class: "bb-breadcrumbs__divider"
|
|
27
|
-
},
|
|
28
|
+
}, ve = {
|
|
28
29
|
key: 1,
|
|
29
30
|
class: "bb-breadcrumbs__edge bb-breadcrumbs__edge--append"
|
|
30
|
-
},
|
|
31
|
+
}, k = 20, ye = 1, A = 8.5, be = .5, xe = 8, Se = 200, j = /*@__PURE__*/ y({
|
|
31
32
|
inheritAttrs: !1,
|
|
32
33
|
__name: "BbBreadcrumbs",
|
|
33
34
|
props: {
|
|
@@ -51,220 +52,213 @@ var de = ["aria-label"], fe = { class: "bb-breadcrumbs__container" }, pe = {
|
|
|
51
52
|
estimationBias: { default: 1.12 },
|
|
52
53
|
ellipsisWidth: {}
|
|
53
54
|
},
|
|
54
|
-
setup(
|
|
55
|
-
let
|
|
56
|
-
process.env.NODE_ENV !== "production" && i("BbBreadcrumbs",
|
|
57
|
-
let
|
|
55
|
+
setup(y) {
|
|
56
|
+
let j = y, M = p(() => j.items.filter((e) => !e.hidden));
|
|
57
|
+
process.env.NODE_ENV !== "production" && i("BbBreadcrumbs", ee("BbBreadcrumbs"), { slotKeys: () => j.items.map((e) => e.value) });
|
|
58
|
+
let N = te({
|
|
58
59
|
component: "BbBreadcrumbs",
|
|
59
|
-
attrs:
|
|
60
|
-
props:
|
|
61
|
-
parts:
|
|
62
|
-
states:
|
|
63
|
-
active: { disabled: () => !!
|
|
64
|
-
}), { t:
|
|
60
|
+
attrs: oe(),
|
|
61
|
+
props: j,
|
|
62
|
+
parts: u.parts,
|
|
63
|
+
states: u.states,
|
|
64
|
+
active: { disabled: () => !!j.disabled }
|
|
65
|
+
}), { t: P } = e();
|
|
65
66
|
t();
|
|
66
|
-
let
|
|
67
|
+
let F = se(), Ce = /* @__PURE__ */ new Set([
|
|
67
68
|
"prepend",
|
|
68
69
|
"append",
|
|
69
70
|
"ellipsis",
|
|
70
71
|
"divider",
|
|
71
72
|
"activator"
|
|
72
|
-
]),
|
|
73
|
-
let { "prepend:icon": n, "append:icon": r, value:
|
|
74
|
-
return
|
|
75
|
-
...
|
|
73
|
+
]), I = (e) => e.value == null || e.value === "" ? ":keyless" : n(String(e.value)), L = (e, t) => t === M.value.length - 1 && !e.href && !e.to && !e.onClick, we = (e, t) => {
|
|
74
|
+
let { "prepend:icon": n, "append:icon": r, value: ee, label: i, hidden: a, ...o } = e;
|
|
75
|
+
return L(e, t) ? {
|
|
76
|
+
...o,
|
|
76
77
|
"aria-current": "page"
|
|
77
|
-
} :
|
|
78
|
-
}, I = (e, t) => {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
name: `item:${t}`,
|
|
85
|
-
exists: !0
|
|
86
|
-
} : {
|
|
87
|
-
name: n,
|
|
88
|
-
exists: !1
|
|
89
|
-
};
|
|
90
|
-
}, Ee = f(() => Object.keys(N).filter((e) => !we.has(e))), L = C(null), R = C(0), z = f(() => k.gapWidth), B = f(() => Math.max(0, k.offsetWidth)), De = f(() => k.estimationBias), V = f(() => k.ellipsisWidth ?? c(O)), Oe = f(() => M("breadcrumbs.label").value), ke = f(() => M("breadcrumbs.openHiddenLabelCount", R.value).value), H = (e) => {
|
|
78
|
+
} : o;
|
|
79
|
+
}, R = (e, t) => [F[`${I(e)}:${t}`], F[`item:${t}`]], z = (e, t) => ({
|
|
80
|
+
disabled: !!(e.disabled || j.disabled),
|
|
81
|
+
index: t,
|
|
82
|
+
item: e,
|
|
83
|
+
label: e.label
|
|
84
|
+
}), Te = p(() => Object.keys(F).filter((e) => !Ce.has(e))), B = w(null), V = w(0), H = p(() => j.gapWidth), U = p(() => Math.max(0, j.offsetWidth)), Ee = p(() => j.estimationBias), De = p(() => j.ellipsisWidth ?? c(A)), Oe = p(() => P("breadcrumbs.label").value), ke = p(() => P("breadcrumbs.openHiddenLabelCount", V.value).value), Ae = (e) => {
|
|
91
85
|
let t = e.label ?? "";
|
|
92
86
|
return s(t, {
|
|
93
|
-
estimationBias:
|
|
94
|
-
fontWidth:
|
|
87
|
+
estimationBias: Ee.value,
|
|
88
|
+
fontWidth: A
|
|
95
89
|
});
|
|
96
|
-
},
|
|
97
|
-
let e =
|
|
90
|
+
}, je = p(() => {
|
|
91
|
+
let e = M.value.length;
|
|
98
92
|
if (e === 0) return 0;
|
|
99
|
-
let t =
|
|
100
|
-
return
|
|
101
|
-
}),
|
|
102
|
-
let e =
|
|
93
|
+
let t = j.dividerWidth, n = H.value;
|
|
94
|
+
return M.value.map(Ae).reduce((e, t) => e + t, 0) + (e > 1 ? (e - 1) * (t + 2 * n) : 0) + U.value + k + 12;
|
|
95
|
+
}), Me = w(!1), W = () => {
|
|
96
|
+
let e = B.value?.parentElement;
|
|
103
97
|
if (!e) return;
|
|
104
98
|
let t = getComputedStyle(e);
|
|
105
|
-
|
|
106
|
-
},
|
|
107
|
-
"--flex-basis":
|
|
108
|
-
"--flex-grow":
|
|
109
|
-
"--gap": `${
|
|
110
|
-
})),
|
|
111
|
-
let t =
|
|
99
|
+
Me.value = t.display.includes("flex") && t.flexDirection.startsWith("column");
|
|
100
|
+
}, Ne = p(() => ({
|
|
101
|
+
"--flex-basis": Me.value ? "auto" : `${Math.ceil(je.value)}px`,
|
|
102
|
+
"--flex-grow": V.value > 0 ? "1" : "0",
|
|
103
|
+
"--gap": `${H.value}px`
|
|
104
|
+
})), Pe = (e) => {
|
|
105
|
+
let t = M.value.length;
|
|
112
106
|
if (t === 0) {
|
|
113
|
-
|
|
107
|
+
V.value = 0;
|
|
114
108
|
return;
|
|
115
109
|
}
|
|
116
|
-
let n = Math.max(0, e -
|
|
117
|
-
for (let e = t - 1; e >= 0; e--)
|
|
118
|
-
let
|
|
119
|
-
if (
|
|
120
|
-
if (t > 1 && c
|
|
121
|
-
|
|
110
|
+
let n = Math.max(0, e - ye - U.value - k), r = j.dividerWidth, ee = De.value, i = H.value, a = M.value.map(Ae), o = Array.from({ length: t + 1 }, () => 0);
|
|
111
|
+
for (let e = t - 1; e >= 0; e--) o[e] = o[e + 1] + a[e];
|
|
112
|
+
let s = (e) => n - e <= k / 2, c = o[0] + (t > 1 ? (t - 1) * (r + 2 * i) : 0);
|
|
113
|
+
if (c <= n) {
|
|
114
|
+
if (t > 1 && s(c)) {
|
|
115
|
+
V.value = 1;
|
|
122
116
|
return;
|
|
123
117
|
}
|
|
124
|
-
|
|
118
|
+
V.value = 0;
|
|
125
119
|
} else {
|
|
126
120
|
for (let e = t - 1; e >= 1; e--) {
|
|
127
|
-
let
|
|
128
|
-
if (
|
|
129
|
-
if (e >
|
|
130
|
-
|
|
121
|
+
let a = o[t - e], c = ee + e * (r + 2 * i) + a;
|
|
122
|
+
if (c <= n) {
|
|
123
|
+
if (e > 1 && s(c)) {
|
|
124
|
+
V.value = t - (e - 1);
|
|
131
125
|
return;
|
|
132
126
|
}
|
|
133
|
-
|
|
127
|
+
V.value = t - e;
|
|
134
128
|
return;
|
|
135
129
|
}
|
|
136
130
|
}
|
|
137
|
-
|
|
131
|
+
V.value = t - 1;
|
|
138
132
|
}
|
|
139
|
-
},
|
|
133
|
+
}, Fe = p(() => B.value), Ie = p(() => M.value.map((e) => `${String(e.value)}::${e.label ?? ""}`).join("|")), G = null, K = null, q = null, J = null, Y = 0, X = null, Z = (e, t) => Math.abs(e - t) <= be, Q = () => {
|
|
140
134
|
X != null && clearTimeout(X), X = setTimeout(() => {
|
|
141
135
|
X = null, Y = 0;
|
|
142
|
-
},
|
|
143
|
-
},
|
|
136
|
+
}, Se);
|
|
137
|
+
}, Le = () => {
|
|
144
138
|
if (K = null, G == null) return;
|
|
145
139
|
let e = G;
|
|
146
|
-
G = null, q != null && Z(e, q) ? Q() : (Y = J != null && q != null && Z(e, J) && !Z(e, q) ? Y + 1 : 0, Y >=
|
|
140
|
+
G = null, q != null && Z(e, q) ? Q() : (Y = J != null && q != null && Z(e, J) && !Z(e, q) ? Y + 1 : 0, Y >= xe ? (J = q, q = e, Q()) : (J = q, q = e, Pe(e), Q()));
|
|
147
141
|
}, $ = (e) => {
|
|
148
|
-
G = e, K ??= requestAnimationFrame(
|
|
142
|
+
G = e, K ??= requestAnimationFrame(Le);
|
|
149
143
|
};
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
() =>
|
|
156
|
-
() =>
|
|
157
|
-
() =>
|
|
158
|
-
() =>
|
|
159
|
-
() =>
|
|
144
|
+
le(Fe, ([e]) => {
|
|
145
|
+
W(), $(e.contentRect.width);
|
|
146
|
+
}), ce([
|
|
147
|
+
Fe,
|
|
148
|
+
Ie,
|
|
149
|
+
() => j.dividerWidth,
|
|
150
|
+
() => j.gapWidth,
|
|
151
|
+
() => j.offsetWidth,
|
|
152
|
+
() => j.estimationBias,
|
|
153
|
+
() => j.ellipsisWidth
|
|
160
154
|
], ([e]) => {
|
|
161
|
-
e && (
|
|
155
|
+
e && (W(), $(e.clientWidth));
|
|
162
156
|
}, { immediate: !0 }), ie(() => {
|
|
163
157
|
K != null && cancelAnimationFrame(K), X != null && clearTimeout(X);
|
|
164
158
|
});
|
|
165
|
-
let
|
|
159
|
+
let Re = p(() => M.value.slice(0, V.value).map((e) => ({
|
|
166
160
|
...e,
|
|
167
161
|
label: e.label ?? ""
|
|
168
162
|
})));
|
|
169
|
-
return (e, t) => (
|
|
163
|
+
return (e, t) => (C(), g("nav", x({
|
|
170
164
|
ref_key: "navRef",
|
|
171
|
-
ref:
|
|
165
|
+
ref: B,
|
|
172
166
|
"aria-label": Oe.value,
|
|
173
167
|
class: "bb-breadcrumbs",
|
|
174
|
-
style:
|
|
175
|
-
},
|
|
176
|
-
e.$slots.prepend ? (
|
|
177
|
-
|
|
168
|
+
style: Ne.value
|
|
169
|
+
}, D(N).rootAttrs), [_("div", de, [
|
|
170
|
+
e.$slots.prepend ? (C(), g("div", fe, [E(e.$slots, "prepend", { disabled: y.disabled })])) : h("", !0),
|
|
171
|
+
_("ol", pe, [V.value > 0 ? (C(), g("li", x({
|
|
178
172
|
key: 0,
|
|
179
173
|
class: "bb-breadcrumbs__item"
|
|
180
|
-
},
|
|
181
|
-
items:
|
|
174
|
+
}, D(N).part("item", { disabled: y.disabled || void 0 })), [v(o, {
|
|
175
|
+
items: Re.value,
|
|
182
176
|
padding: 0,
|
|
183
177
|
placement: "bottom-start"
|
|
184
178
|
}, ne({
|
|
185
|
-
activator:
|
|
179
|
+
activator: O(({ props: n }) => [_("button", x(n, {
|
|
186
180
|
"aria-label": ke.value,
|
|
187
181
|
class: "bb-breadcrumbs__ellipsis",
|
|
188
|
-
disabled:
|
|
182
|
+
disabled: y.disabled,
|
|
189
183
|
type: "button"
|
|
190
|
-
}), [
|
|
184
|
+
}), [E(e.$slots, "ellipsis", S(b({
|
|
191
185
|
props: n,
|
|
192
|
-
disabled:
|
|
193
|
-
overflowCount:
|
|
194
|
-
ellipsisWidth:
|
|
195
|
-
})), () => [t[0] ||= re(" … ", -1)])], 16,
|
|
186
|
+
disabled: y.disabled,
|
|
187
|
+
overflowCount: V.value,
|
|
188
|
+
ellipsisWidth: De.value
|
|
189
|
+
})), () => [t[0] ||= re(" … ", -1)])], 16, me)]),
|
|
196
190
|
_: 2
|
|
197
|
-
}, [
|
|
191
|
+
}, [T(Te.value, (t) => ({
|
|
198
192
|
name: t,
|
|
199
|
-
fn:
|
|
200
|
-
}))]), 1032, ["items"]),
|
|
201
|
-
icon:
|
|
193
|
+
fn: O((n) => [E(e.$slots, t, S(b(n)))])
|
|
194
|
+
}))]), 1032, ["items"]), V.value < M.value.length ? (C(), g("span", he, [E(e.$slots, "divider", {}, () => [v(d, {
|
|
195
|
+
icon: D(l),
|
|
202
196
|
size: "14"
|
|
203
|
-
}, null, 8, ["icon"])])])) :
|
|
197
|
+
}, null, 8, ["icon"])])])) : h("", !0)], 16)) : h("", !0), (C(!0), g(f, null, T(M.value, (t, n) => (C(), g(f, { key: t.value ?? `:keyless-${n}` }, [n >= V.value ? (C(), g("li", x({
|
|
204
198
|
key: 0,
|
|
205
199
|
class: ["bb-breadcrumbs__item", {
|
|
206
|
-
"bb-breadcrumbs__item--active":
|
|
207
|
-
"bb-breadcrumbs__item--compressed":
|
|
200
|
+
"bb-breadcrumbs__item--active": L(t, n),
|
|
201
|
+
"bb-breadcrumbs__item--compressed": M.value.length > 1 && V.value === M.value.length - 1
|
|
208
202
|
}]
|
|
209
|
-
}, { ref_for: !0 },
|
|
210
|
-
active:
|
|
211
|
-
disabled: t.disabled ||
|
|
212
|
-
})), [
|
|
203
|
+
}, { ref_for: !0 }, D(N).part("item", {
|
|
204
|
+
active: L(t, n),
|
|
205
|
+
disabled: t.disabled || y.disabled || void 0
|
|
206
|
+
})), [v(a, x({ ref_for: !0 }, we(t, n), {
|
|
213
207
|
class: "bb-breadcrumbs__breadcrumb",
|
|
214
|
-
disabled: t.disabled ||
|
|
215
|
-
tag:
|
|
208
|
+
disabled: t.disabled || y.disabled,
|
|
209
|
+
tag: L(t, n) ? "span" : void 0
|
|
216
210
|
}), {
|
|
217
|
-
default:
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}
|
|
233
|
-
|
|
211
|
+
default: O(() => [
|
|
212
|
+
v(D(r), {
|
|
213
|
+
props: z(t, n),
|
|
214
|
+
slots: R(t, "prepend")
|
|
215
|
+
}, {
|
|
216
|
+
default: O(() => [t["prepend:icon"] ? (C(), m(d, x({
|
|
217
|
+
key: 0,
|
|
218
|
+
class: "bb-breadcrumbs__item-icon bb-breadcrumbs__item-icon--prepend",
|
|
219
|
+
icon: t["prepend:icon"],
|
|
220
|
+
size: "14"
|
|
221
|
+
}, { ref_for: !0 }, D(N).part("icon", {
|
|
222
|
+
active: L(t, n),
|
|
223
|
+
disabled: t.disabled || y.disabled || void 0
|
|
224
|
+
})), null, 16, ["icon"])) : h("", !0)]),
|
|
225
|
+
_: 2
|
|
226
|
+
}, 1032, ["props", "slots"]),
|
|
227
|
+
_("span", x({
|
|
234
228
|
class: "bb-breadcrumbs__text",
|
|
235
|
-
title:
|
|
236
|
-
}, { ref_for: !0 },
|
|
237
|
-
active:
|
|
238
|
-
disabled: t.disabled ||
|
|
239
|
-
})), [
|
|
240
|
-
disabled: !!(t.disabled ||
|
|
241
|
-
index: n,
|
|
242
|
-
item: t,
|
|
243
|
-
label: t.label
|
|
244
|
-
}, () => [re(oe(t.label), 1)])], 16, _e),
|
|
245
|
-
w(e.$slots, I(t, "append").name, {
|
|
246
|
-
disabled: !!(t.disabled || v.disabled),
|
|
229
|
+
title: M.value.length > 1 && V.value === M.value.length - 1 ? t.label : void 0
|
|
230
|
+
}, { ref_for: !0 }, D(N).part("text", {
|
|
231
|
+
active: L(t, n),
|
|
232
|
+
disabled: t.disabled || y.disabled || void 0
|
|
233
|
+
})), [E(e.$slots, I(t), {
|
|
234
|
+
disabled: !!(t.disabled || y.disabled),
|
|
247
235
|
index: n,
|
|
248
236
|
item: t,
|
|
249
237
|
label: t.label
|
|
250
|
-
}),
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
238
|
+
}, () => [re(ae(t.label), 1)])], 16, ge),
|
|
239
|
+
v(D(r), {
|
|
240
|
+
props: z(t, n),
|
|
241
|
+
slots: R(t, "append")
|
|
242
|
+
}, {
|
|
243
|
+
default: O(() => [t["append:icon"] ? (C(), m(d, x({
|
|
244
|
+
key: 0,
|
|
245
|
+
class: "bb-breadcrumbs__item-icon bb-breadcrumbs__item-icon--append",
|
|
246
|
+
icon: t["append:icon"],
|
|
247
|
+
size: "14"
|
|
248
|
+
}, { ref_for: !0 }, D(N).part("icon", {
|
|
249
|
+
active: L(t, n),
|
|
250
|
+
disabled: t.disabled || y.disabled || void 0
|
|
251
|
+
})), null, 16, ["icon"])) : h("", !0)]),
|
|
252
|
+
_: 2
|
|
253
|
+
}, 1032, ["props", "slots"])
|
|
260
254
|
]),
|
|
261
255
|
_: 2
|
|
262
|
-
}, 1040, ["disabled", "tag"]), n <
|
|
263
|
-
icon:
|
|
256
|
+
}, 1040, ["disabled", "tag"]), n < M.value.length - 1 ? (C(), g("span", _e, [E(e.$slots, "divider", {}, () => [v(d, {
|
|
257
|
+
icon: D(l),
|
|
264
258
|
size: "14"
|
|
265
|
-
}, null, 8, ["icon"])])])) :
|
|
266
|
-
e.$slots.append ? (
|
|
267
|
-
])], 16,
|
|
259
|
+
}, null, 8, ["icon"])])])) : h("", !0)], 16)) : h("", !0)], 64))), 128))]),
|
|
260
|
+
e.$slots.append ? (C(), g("div", ve, [E(e.$slots, "append", { disabled: y.disabled })])) : h("", !0)
|
|
261
|
+
])], 16, ue));
|
|
268
262
|
}
|
|
269
263
|
});
|
|
270
|
-
export {
|
|
264
|
+
export { j as default };
|