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
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
v-bind="passthrough.spinner"
|
|
29
29
|
/>
|
|
30
30
|
<span
|
|
31
|
-
v-else-if="
|
|
31
|
+
v-else-if="iconNodes('append')"
|
|
32
32
|
class="bb-badge__append-icon bb-badge__icon-slot"
|
|
33
33
|
v-bind="passthrough.icon"
|
|
34
|
-
><
|
|
34
|
+
><SlotNodes :nodes="iconNodes('append')!"
|
|
35
35
|
/></span>
|
|
36
36
|
<BbIcon
|
|
37
37
|
v-else-if="props['append:icon']"
|
|
@@ -71,6 +71,7 @@ import { removedPropsFor } from '@/deprecation/removedProps';
|
|
|
71
71
|
import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
|
|
72
72
|
import BbIcon from '../BbIcon/BbIcon.vue';
|
|
73
73
|
import BbSpinner from '../BbSpinner/BbSpinner.vue';
|
|
74
|
+
import { SlotNodes, slotContent } from '@/utilities/functions/slotContent';
|
|
74
75
|
import BadgeBodyContent from './BadgeBodyContent.vue';
|
|
75
76
|
import BbBadgeButton from './BbBadgeButton.vue';
|
|
76
77
|
import { provideBadgeHost, type HostValue } from './badgeButtonContext';
|
|
@@ -177,8 +178,14 @@ const iconOnlyBands = () => {
|
|
|
177
178
|
return on ? [`bb-badge--icon-${band}`] : [];
|
|
178
179
|
});
|
|
179
180
|
};
|
|
180
|
-
|
|
181
|
-
|
|
181
|
+
/**
|
|
182
|
+
* What an icon slot renders, `undefined` for none or an empty one (the
|
|
183
|
+
* empty-slot rule: it falls back to the prop). Read in render only.
|
|
184
|
+
*/
|
|
185
|
+
const iconNodes = (side: 'prepend' | 'append') =>
|
|
186
|
+
slotContent(slots[`${side}:icon`], iconScope());
|
|
187
|
+
const hasPrepend = () => !!props['prepend:icon'] || !!iconNodes('prepend');
|
|
188
|
+
const hasAppend = () => !!props['append:icon'] || !!iconNodes('append');
|
|
182
189
|
|
|
183
190
|
/** What an icon slot sees: the badge's `pt` states. */
|
|
184
191
|
const iconScope = (): BbBadgeIconSlotProps => ({
|
|
@@ -223,7 +230,7 @@ provideBadgeHost({
|
|
|
223
230
|
return iconOnly();
|
|
224
231
|
},
|
|
225
232
|
},
|
|
226
|
-
|
|
233
|
+
iconNodes,
|
|
227
234
|
iconScope: {
|
|
228
235
|
get value() {
|
|
229
236
|
return iconScope();
|
|
@@ -110,28 +110,25 @@
|
|
|
110
110
|
:disabled="item.disabled || disabled"
|
|
111
111
|
:tag="isCurrent(item, index) ? 'span' : undefined"
|
|
112
112
|
>
|
|
113
|
-
<!-- prepend: <value>:prepend | item:prepend | inline prepend:icon
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
:
|
|
117
|
-
:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
})
|
|
133
|
-
"
|
|
134
|
-
/>
|
|
113
|
+
<!-- prepend: <value>:prepend | item:prepend | inline prepend:icon; a slot
|
|
114
|
+
rendering nothing for this crumb falls through -->
|
|
115
|
+
<SlotChain
|
|
116
|
+
:props="edgeProps(item, index)"
|
|
117
|
+
:slots="edgeSlots(item, 'prepend')"
|
|
118
|
+
>
|
|
119
|
+
<BbIcon
|
|
120
|
+
v-if="item['prepend:icon']"
|
|
121
|
+
class="bb-breadcrumbs__item-icon bb-breadcrumbs__item-icon--prepend"
|
|
122
|
+
:icon="item['prepend:icon']"
|
|
123
|
+
size="14"
|
|
124
|
+
v-bind="
|
|
125
|
+
passthrough.part('icon', {
|
|
126
|
+
active: isCurrent(item, index),
|
|
127
|
+
disabled: item.disabled || disabled || undefined,
|
|
128
|
+
})
|
|
129
|
+
"
|
|
130
|
+
/>
|
|
131
|
+
</SlotChain>
|
|
135
132
|
<span
|
|
136
133
|
class="bb-breadcrumbs__text"
|
|
137
134
|
:title="
|
|
@@ -156,26 +153,25 @@
|
|
|
156
153
|
>{{ item.label }}</slot
|
|
157
154
|
>
|
|
158
155
|
</span>
|
|
159
|
-
<!-- append: <value>:append | item:append | inline append:icon
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
:
|
|
163
|
-
:
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
/>
|
|
156
|
+
<!-- append: <value>:append | item:append | inline append:icon; a slot
|
|
157
|
+
rendering nothing for this crumb falls through -->
|
|
158
|
+
<SlotChain
|
|
159
|
+
:props="edgeProps(item, index)"
|
|
160
|
+
:slots="edgeSlots(item, 'append')"
|
|
161
|
+
>
|
|
162
|
+
<BbIcon
|
|
163
|
+
v-if="item['append:icon']"
|
|
164
|
+
class="bb-breadcrumbs__item-icon bb-breadcrumbs__item-icon--append"
|
|
165
|
+
:icon="item['append:icon']"
|
|
166
|
+
size="14"
|
|
167
|
+
v-bind="
|
|
168
|
+
passthrough.part('icon', {
|
|
169
|
+
active: isCurrent(item, index),
|
|
170
|
+
disabled: item.disabled || disabled || undefined,
|
|
171
|
+
})
|
|
172
|
+
"
|
|
173
|
+
/>
|
|
174
|
+
</SlotChain>
|
|
179
175
|
</BbBaseButton>
|
|
180
176
|
<span
|
|
181
177
|
v-if="index < visibleItems.length - 1"
|
|
@@ -207,6 +203,7 @@ import { useResizeObserver } from '@vueuse/core';
|
|
|
207
203
|
import { useLocale } from '@/composables/useLocale';
|
|
208
204
|
import { useLogger } from '@/composables/useLogger';
|
|
209
205
|
import { slotKey } from '@/utilities/functions/slotKey';
|
|
206
|
+
import { SlotChain } from '@/utilities/functions/slotContent';
|
|
210
207
|
import { removedPropsFor } from '@/deprecation/removedProps';
|
|
211
208
|
import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
|
|
212
209
|
import BbBaseButton from '../BbBaseButton/BbBaseButton.vue';
|
|
@@ -358,19 +355,20 @@ const buttonProps = (item: Item, index: number) => {
|
|
|
358
355
|
};
|
|
359
356
|
|
|
360
357
|
/**
|
|
361
|
-
*
|
|
362
|
-
* `item:suffix
|
|
363
|
-
*
|
|
364
|
-
* `name` is the (absent) per-key name so the outlet renders nothing and the
|
|
365
|
-
* inline icon takes over. The slot is rendered unconditionally (no `v-if`) so
|
|
366
|
-
* Vue doesn't inject a branch `key` into the consumer's slot scope.
|
|
358
|
+
* An edge region's slots, strongest first: `<value>:suffix` (per item), then
|
|
359
|
+
* `item:suffix`; the inline `prepend:icon`/`append:icon` is the fallback when
|
|
360
|
+
* neither renders anything for the crumb.
|
|
367
361
|
*/
|
|
368
|
-
const
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
362
|
+
const edgeSlots = (item: Item, suffix: 'prepend' | 'append') => [
|
|
363
|
+
slots[`${itemSlotBase(item)}:${suffix}`],
|
|
364
|
+
slots[`item:${suffix}`],
|
|
365
|
+
];
|
|
366
|
+
const edgeProps = (item: Item, index: number) => ({
|
|
367
|
+
disabled: !!(item.disabled || props.disabled),
|
|
368
|
+
index,
|
|
369
|
+
item,
|
|
370
|
+
label: item.label,
|
|
371
|
+
});
|
|
374
372
|
|
|
375
373
|
/** Slot names forwarded into the overflow `<BbDropdown>` (per-item slots only). */
|
|
376
374
|
const forwardedItemSlots = computed(() =>
|
|
@@ -501,7 +499,10 @@ const recompute = (availableWidth: number) => {
|
|
|
501
499
|
const lastMSum = suffixSums[n - M];
|
|
502
500
|
const totalWithEllipsis = ellipsisW + M * (dividerW + 2 * gapW) + lastMSum;
|
|
503
501
|
if (totalWithEllipsis <= effectiveAvailableWidth) {
|
|
504
|
-
|
|
502
|
+
// The reserve folds one more crumb, never the current page
|
|
503
|
+
// (at M = 1 it folded all of them, a bare `…` in a
|
|
504
|
+
// band of about 10px).
|
|
505
|
+
if (M > 1 && isNearThreshold(totalWithEllipsis)) {
|
|
505
506
|
overflowCount.value = n - (M - 1);
|
|
506
507
|
return;
|
|
507
508
|
}
|
|
@@ -36,22 +36,30 @@
|
|
|
36
36
|
icons render (one or both). Bound LAST on each so a consumer
|
|
37
37
|
attribute beats ours and a consumer class appends. An icon slot
|
|
38
38
|
beats its prop and renders INSIDE the part, a box of the
|
|
39
|
-
same class, so `pt:icon`, `--icon-size` and the spinner swap hold.
|
|
39
|
+
same class, so `pt:icon`, `--icon-size` and the spinner swap hold. A
|
|
40
|
+
slot that renders nothing falls back to the prop (the empty-slot rule).
|
|
40
41
|
`icon-only` is CSS alone: the label is hidden
|
|
41
42
|
but stays the name, and the append icon goes when a prepend one is
|
|
42
43
|
there, so a breakpoint can switch it with no render. -->
|
|
43
|
-
<
|
|
44
|
-
v-if="slots['prepend:icon']"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
<SlotContent
|
|
45
|
+
v-if="slots['prepend:icon'] || props['prepend:icon']"
|
|
46
|
+
v-slot="{ nodes: prependNodes }"
|
|
47
|
+
:of="slots['prepend:icon']"
|
|
48
|
+
:props="iconScope"
|
|
49
|
+
>
|
|
50
|
+
<span
|
|
51
|
+
v-if="prependNodes"
|
|
52
|
+
class="bb-button__prepend-icon bb-button__icon-slot"
|
|
53
|
+
v-bind="passthrough.icon"
|
|
54
|
+
><SlotNodes :nodes="prependNodes"
|
|
55
|
+
/></span>
|
|
56
|
+
<BbIcon
|
|
57
|
+
v-else-if="props['prepend:icon']"
|
|
58
|
+
class="bb-button__prepend-icon"
|
|
59
|
+
:icon="props['prepend:icon']"
|
|
60
|
+
v-bind="passthrough.icon"
|
|
61
|
+
/>
|
|
62
|
+
</SlotContent>
|
|
55
63
|
<span
|
|
56
64
|
class="bb-button__text"
|
|
57
65
|
:class="{ 'bb-sr-only': props.iconOnly === true }"
|
|
@@ -62,18 +70,25 @@
|
|
|
62
70
|
t('common.loadingText')
|
|
63
71
|
}}</span>
|
|
64
72
|
|
|
65
|
-
<
|
|
66
|
-
v-if="slots['append:icon']"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
<SlotContent
|
|
74
|
+
v-if="slots['append:icon'] || props['append:icon']"
|
|
75
|
+
v-slot="{ nodes: appendNodes }"
|
|
76
|
+
:of="slots['append:icon']"
|
|
77
|
+
:props="iconScope"
|
|
78
|
+
>
|
|
79
|
+
<span
|
|
80
|
+
v-if="appendNodes"
|
|
81
|
+
class="bb-button__append-icon bb-button__icon-slot"
|
|
82
|
+
v-bind="passthrough.icon"
|
|
83
|
+
><SlotNodes :nodes="appendNodes"
|
|
84
|
+
/></span>
|
|
85
|
+
<BbIcon
|
|
86
|
+
v-else-if="props['append:icon']"
|
|
87
|
+
class="bb-button__append-icon"
|
|
88
|
+
:icon="props['append:icon']"
|
|
89
|
+
v-bind="passthrough.icon"
|
|
90
|
+
/>
|
|
91
|
+
</SlotContent>
|
|
77
92
|
</BbBaseButton>
|
|
78
93
|
</template>
|
|
79
94
|
|
|
@@ -83,6 +98,7 @@ import { useBbFormSavingById } from '@/composables/useBbForm';
|
|
|
83
98
|
import BbBaseButton from '@/components/BbBaseButton/BbBaseButton.vue';
|
|
84
99
|
import BbSpinner from '@/components/BbSpinner/BbSpinner.vue';
|
|
85
100
|
import BbIcon from '../BbIcon/BbIcon.vue';
|
|
101
|
+
import { SlotContent, SlotNodes } from '@/utilities/functions/slotContent';
|
|
86
102
|
import { computed, inject, mergeProps, ref, useAttrs, watchEffect } from 'vue';
|
|
87
103
|
import { BB_FORM_SUBMIT_LOCK } from '@/composables/formSubmitLock';
|
|
88
104
|
import { pickBy } from '@/utilities/functions/pickBy';
|
|
@@ -457,6 +457,7 @@ import {
|
|
|
457
457
|
} from '@/utilities/functions/convertDateValue';
|
|
458
458
|
import { isCoarseType, isLabelType } from '@/types/DatePickerType';
|
|
459
459
|
import { useId } from '@/composables/useId';
|
|
460
|
+
import { useOwnModel } from '@/composables/useOwnModel';
|
|
460
461
|
import { useLocale } from '@/composables/useLocale';
|
|
461
462
|
import { usePassthrough } from '@/composables/usePassthrough';
|
|
462
463
|
import BbBaseButton from '../BbBaseButton/BbBaseButton.vue';
|
|
@@ -524,6 +525,15 @@ const props = declaredProps as unknown as ShapeErasedProps<
|
|
|
524
525
|
>;
|
|
525
526
|
const emit = declaredEmit as unknown as BbCalendarEvents;
|
|
526
527
|
|
|
528
|
+
type DateModel = Exclude<BbCalendarProps['modelValue'], undefined>;
|
|
529
|
+
// No `v-model`: the calendar keeps its own value, like an input.
|
|
530
|
+
const { model: ownModel, set: setModel } = useOwnModel<'modelValue', DateModel>(
|
|
531
|
+
props,
|
|
532
|
+
'modelValue',
|
|
533
|
+
(event, value) => emit(event, value),
|
|
534
|
+
() => (props.range || props.multiple ? [] : null)
|
|
535
|
+
);
|
|
536
|
+
|
|
527
537
|
if (process.env.NODE_ENV !== 'production')
|
|
528
538
|
warnRemovedAttrs('BbCalendar', removedPropsFor('BbCalendar'));
|
|
529
539
|
|
|
@@ -708,9 +718,9 @@ const calendarMax = computed(() =>
|
|
|
708
718
|
// The grid works on an array in range/multiple mode — normalize an
|
|
709
719
|
// empty/`null` value to `[]` so a cleared field is an empty selection.
|
|
710
720
|
const gridModelValue = computed(() =>
|
|
711
|
-
(props.range || props.multiple) && !Array.isArray(
|
|
721
|
+
(props.range || props.multiple) && !Array.isArray(ownModel.value)
|
|
712
722
|
? []
|
|
713
|
-
:
|
|
723
|
+
: ownModel.value
|
|
714
724
|
);
|
|
715
725
|
|
|
716
726
|
// ---- Value helpers -------------------------------------------------------------
|
|
@@ -719,7 +729,7 @@ const segIndex = (segment: BbCalendarSegment) => (segment === 'end' ? 1 : 0);
|
|
|
719
729
|
|
|
720
730
|
/** The raw date string carried in `modelValue` for a segment (or `null`). */
|
|
721
731
|
const dateStringFor = (segment: BbCalendarSegment): string | null => {
|
|
722
|
-
const mv =
|
|
732
|
+
const mv = ownModel.value;
|
|
723
733
|
if (mv == null) return null;
|
|
724
734
|
if (Array.isArray(mv)) return mv[segIndex(segment)] ?? null;
|
|
725
735
|
return segment === 'start' ? mv : null;
|
|
@@ -785,35 +795,35 @@ const commit = (states: Record<BbCalendarSegment, SegmentState>) => {
|
|
|
785
795
|
times.push(combined.time);
|
|
786
796
|
}
|
|
787
797
|
// an empty range is `[]`, like every range in the library.
|
|
788
|
-
|
|
798
|
+
setModel(values);
|
|
789
799
|
emit('update:time', times);
|
|
790
800
|
return;
|
|
791
801
|
}
|
|
792
802
|
const st = states.start;
|
|
793
803
|
if (!st.date) {
|
|
794
|
-
|
|
804
|
+
setModel(null);
|
|
795
805
|
emit('update:time', null);
|
|
796
806
|
return;
|
|
797
807
|
}
|
|
798
808
|
const combined = combineOne(st.date, st.time);
|
|
799
|
-
|
|
809
|
+
setModel(combined ? combined.value : null);
|
|
800
810
|
emit('update:time', combined ? combined.time : null);
|
|
801
811
|
};
|
|
802
812
|
|
|
803
813
|
// ---- Grid pick -----------------------------------------------------------------
|
|
804
814
|
|
|
805
|
-
const onGridPick = (value:
|
|
815
|
+
const onGridPick = (value: DateModel) => {
|
|
806
816
|
// A range never reports "nothing" as `null`, the relay included.
|
|
807
817
|
if (props.range && value === null) value = [];
|
|
808
818
|
emit('grid-pick', value);
|
|
809
819
|
|
|
810
820
|
if (!isDateTime.value) {
|
|
811
|
-
|
|
821
|
+
setModel(value);
|
|
812
822
|
return;
|
|
813
823
|
}
|
|
814
824
|
|
|
815
825
|
if (value === null) {
|
|
816
|
-
|
|
826
|
+
setModel(null);
|
|
817
827
|
emit('update:time', null);
|
|
818
828
|
return;
|
|
819
829
|
}
|
|
@@ -926,7 +936,7 @@ const railStyle = computed(() => {
|
|
|
926
936
|
// Keep the internal active segment in a sane place for range + datetime: default
|
|
927
937
|
// to the end the grid last filled (host-driven `activeSegment` overrides this).
|
|
928
938
|
watch(
|
|
929
|
-
() =>
|
|
939
|
+
() => ownModel.value,
|
|
930
940
|
(value) => {
|
|
931
941
|
if (!props.range || !isDateTime.value || props.activeSegment != null)
|
|
932
942
|
return;
|
|
@@ -1284,7 +1294,7 @@ export type BbCalendarBaseProps = BbCalendarPtProps & {
|
|
|
1284
1294
|
* `year`), otherwise a zoned
|
|
1285
1295
|
* ISO instant (carrying the time under `datetime`).
|
|
1286
1296
|
*/
|
|
1287
|
-
modelValue
|
|
1297
|
+
modelValue?: string | string[] | null;
|
|
1288
1298
|
/**
|
|
1289
1299
|
* Companion time model (`v-model:time`), 24-hour `HH:mm` / `HH:mm:ss`.
|
|
1290
1300
|
* With `floating` it is the only carrier of the time; otherwise it mirrors
|
|
@@ -1391,7 +1401,7 @@ export type BbCalendarModelProps<
|
|
|
1391
1401
|
> = {
|
|
1392
1402
|
range?: R;
|
|
1393
1403
|
multiple?: M;
|
|
1394
|
-
modelValue
|
|
1404
|
+
modelValue?: PtNoInfer<BbDateModel<R, M>>;
|
|
1395
1405
|
time?: PtNoInfer<BbTimeModel<R>>;
|
|
1396
1406
|
};
|
|
1397
1407
|
|
|
@@ -166,29 +166,44 @@
|
|
|
166
166
|
name="slide:header"
|
|
167
167
|
/>
|
|
168
168
|
<component :is="entry.node" v-if="entry.node" />
|
|
169
|
+
<!-- The built-in image is the slot's fallback, so a `slide` slot
|
|
170
|
+
that renders nothing for an item (a `v-if` false) keeps it. -->
|
|
169
171
|
<slot
|
|
170
|
-
v-else
|
|
172
|
+
v-else
|
|
171
173
|
:active="isActive(entry.real)"
|
|
172
174
|
:current="isCurrent(entry.real)"
|
|
173
175
|
:index="entry.real"
|
|
174
176
|
:item="entry.item as T"
|
|
175
177
|
name="slide"
|
|
176
|
-
/>
|
|
177
|
-
<!-- A picker's built-in image is a button (the thumbs are the
|
|
178
|
-
control): named by the image, `aria-current` on the current
|
|
179
|
-
one. Its click picks through the track's, like any slide
|
|
180
|
-
click; inert and clone slides take it out of reach with them.
|
|
181
|
-
`slide` slot content is never wrapped. -->
|
|
182
|
-
<button
|
|
183
|
-
v-else-if="props.picker && imageOf(entry.item)"
|
|
184
|
-
:aria-current="isCurrent(entry.real) || undefined"
|
|
185
|
-
:aria-label="thumbLabel(entry.item, entry.real)"
|
|
186
|
-
class="bb-carousel__thumb"
|
|
187
|
-
type="button"
|
|
188
|
-
v-bind="passthrough.thumb"
|
|
189
178
|
>
|
|
179
|
+
<!-- A picker's built-in image is a button (the thumbs are the
|
|
180
|
+
control): named by the image, `aria-current` on the current
|
|
181
|
+
one. Its click picks through the track's, like any slide
|
|
182
|
+
click; inert and clone slides take it out of reach with them.
|
|
183
|
+
`slide` slot content is never wrapped. -->
|
|
184
|
+
<button
|
|
185
|
+
v-if="props.picker && imageOf(entry.item)"
|
|
186
|
+
:aria-current="isCurrent(entry.real) || undefined"
|
|
187
|
+
:aria-label="thumbLabel(entry.item, entry.real)"
|
|
188
|
+
class="bb-carousel__thumb"
|
|
189
|
+
type="button"
|
|
190
|
+
v-bind="passthrough.thumb"
|
|
191
|
+
>
|
|
192
|
+
<img
|
|
193
|
+
alt=""
|
|
194
|
+
class="bb-carousel__image"
|
|
195
|
+
decoding="async"
|
|
196
|
+
draggable="false"
|
|
197
|
+
:loading="near(entry.real) ? undefined : 'lazy'"
|
|
198
|
+
:sizes="imageOf(entry.item)!.sizes"
|
|
199
|
+
:src="imageOf(entry.item)!.src"
|
|
200
|
+
:srcset="imageOf(entry.item)!.srcset"
|
|
201
|
+
v-bind="passthrough.image"
|
|
202
|
+
/>
|
|
203
|
+
</button>
|
|
190
204
|
<img
|
|
191
|
-
|
|
205
|
+
v-else-if="imageOf(entry.item)"
|
|
206
|
+
:alt="imageOf(entry.item)!.alt"
|
|
192
207
|
class="bb-carousel__image"
|
|
193
208
|
decoding="async"
|
|
194
209
|
draggable="false"
|
|
@@ -198,19 +213,7 @@
|
|
|
198
213
|
:srcset="imageOf(entry.item)!.srcset"
|
|
199
214
|
v-bind="passthrough.image"
|
|
200
215
|
/>
|
|
201
|
-
</
|
|
202
|
-
<img
|
|
203
|
-
v-else-if="imageOf(entry.item)"
|
|
204
|
-
:alt="imageOf(entry.item)!.alt"
|
|
205
|
-
class="bb-carousel__image"
|
|
206
|
-
decoding="async"
|
|
207
|
-
draggable="false"
|
|
208
|
-
:loading="near(entry.real) ? undefined : 'lazy'"
|
|
209
|
-
:sizes="imageOf(entry.item)!.sizes"
|
|
210
|
-
:src="imageOf(entry.item)!.src"
|
|
211
|
-
:srcset="imageOf(entry.item)!.srcset"
|
|
212
|
-
v-bind="passthrough.image"
|
|
213
|
-
/>
|
|
216
|
+
</slot>
|
|
214
217
|
<slot
|
|
215
218
|
v-if="slots['slide:footer']"
|
|
216
219
|
:active="isActive(entry.real)"
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
:options="options"
|
|
72
72
|
:passthrough="passthrough"
|
|
73
73
|
:variant="variant"
|
|
74
|
+
@retry="runRetry($event, retryLoad, () => optionsElement)"
|
|
74
75
|
>
|
|
75
76
|
<template #prepend>
|
|
76
77
|
<!-- The `variant` indicators: first in the list, so the
|
|
@@ -163,6 +164,7 @@ import type { FallthroughAttrs } from '@/types/fallthrough';
|
|
|
163
164
|
import { vAutofocus } from '@/utilities/misc/autofocus';
|
|
164
165
|
import CommonField from '../CommonField/CommonField.vue';
|
|
165
166
|
import OptionsContainer from '../OptionsContainer/OptionsContainer.vue';
|
|
167
|
+
import { runRetry } from '@/utils/loadRetry';
|
|
166
168
|
import BbBaseCheckboxIcon from '../BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue';
|
|
167
169
|
import {
|
|
168
170
|
aliasParts,
|
|
@@ -333,6 +335,7 @@ const {
|
|
|
333
335
|
items: internalItems,
|
|
334
336
|
loading,
|
|
335
337
|
error: itemsError,
|
|
338
|
+
retry,
|
|
336
339
|
ssrMarker,
|
|
337
340
|
} = useItemsGetter({ items, marker: true });
|
|
338
341
|
|
|
@@ -342,6 +345,11 @@ const alignToCoherenceSettings = () => {
|
|
|
342
345
|
}
|
|
343
346
|
};
|
|
344
347
|
|
|
348
|
+
/** The failure row's "Try again": the failed load again, then coherence on rows it applied. */
|
|
349
|
+
const retryLoad = async () => {
|
|
350
|
+
if ((await retry()) === 'applied') alignToCoherenceSettings();
|
|
351
|
+
};
|
|
352
|
+
|
|
345
353
|
const { hasPrefilled, whenPrefilled } = usePrefill({
|
|
346
354
|
alreadyLoaded: hydratedFromSsr,
|
|
347
355
|
clientReproducible,
|
|
@@ -835,11 +843,10 @@ export type BbCheckboxGroupBaseProps<T> = {
|
|
|
835
843
|
inputPosition?: 'left' | 'center' | 'right' | 'start' | 'end';
|
|
836
844
|
|
|
837
845
|
/**
|
|
838
|
-
* The options: an array, or a provider called with
|
|
839
|
-
*
|
|
840
|
-
*
|
|
841
|
-
*
|
|
842
|
-
* gets the `error`.
|
|
846
|
+
* The options: an array, or a provider called with `{ reason, modelValue,
|
|
847
|
+
* signal }`, sync or async. A provider fails by THROWING, never by
|
|
848
|
+
* returning `[]`: the rows clear and the failure row shows `failed-text`
|
|
849
|
+
* with "Try again".
|
|
843
850
|
*/
|
|
844
851
|
items: T[] | ((context: BbCheckboxGroupItemsContext) => T[] | Promise<T[]>);
|
|
845
852
|
|
|
@@ -1165,11 +1172,10 @@ export type BbCheckboxGroupSlots<T> = {
|
|
|
1165
1172
|
loading?: (props: object) => any;
|
|
1166
1173
|
/**
|
|
1167
1174
|
* Content shown when no options are available (replaces the default "no
|
|
1168
|
-
* data" text).
|
|
1169
|
-
*
|
|
1170
|
-
* rows, so this slot is where it shows.
|
|
1175
|
+
* data" text). Empty only: a failed load shows the library's failure row
|
|
1176
|
+
* instead (its message is `failed-text`, and it ends with "Try again").
|
|
1171
1177
|
*/
|
|
1172
|
-
empty?: (props:
|
|
1178
|
+
empty?: (props: object) => any;
|
|
1173
1179
|
/**
|
|
1174
1180
|
* Replaces the default checkmark icon for each checkbox option.
|
|
1175
1181
|
*/
|
|
@@ -105,6 +105,7 @@
|
|
|
105
105
|
:label="indicatorLabel"
|
|
106
106
|
:model-value="fieldModel ?? null"
|
|
107
107
|
:off-canvas-props="resolvedOffCanvasProps"
|
|
108
|
+
:open="openModel"
|
|
108
109
|
:pt="
|
|
109
110
|
passthrough.forward(
|
|
110
111
|
{ panel: 'panel', sheet: 'sheet', swatch: 'swatch' },
|
|
@@ -122,6 +123,7 @@
|
|
|
122
123
|
typeof $event === 'string' ? $event.toLowerCase() : $event
|
|
123
124
|
)
|
|
124
125
|
"
|
|
126
|
+
@update:open="setOpenModel"
|
|
125
127
|
>
|
|
126
128
|
<template #activator="{ props: dotProps }">
|
|
127
129
|
<button
|
|
@@ -159,6 +161,7 @@ import type { MaskaDetail, MaskInputOptions } from 'maska';
|
|
|
159
161
|
import { useConfigDefaults } from '@/composables/useConfigDefaults';
|
|
160
162
|
import { useFormBinding } from '@/composables/useFormBinding';
|
|
161
163
|
import { useLocale } from '@/composables/useLocale';
|
|
164
|
+
import { useOpenProp } from '@/composables/useOpenModel';
|
|
162
165
|
import {
|
|
163
166
|
formControlPtActive,
|
|
164
167
|
TEXT_CONTROL_NATIVE_ATTRS,
|
|
@@ -277,6 +280,15 @@ const onPaletteHide = () => {
|
|
|
277
280
|
paletteOpen.value = false;
|
|
278
281
|
emit('hide');
|
|
279
282
|
};
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* `v-model:open`, handed to the hosted picker bound: its
|
|
286
|
+
* own open and close paths run, and every close writes back here.
|
|
287
|
+
*/
|
|
288
|
+
const { model: openModel, set: setOpenModel } = useOpenProp(
|
|
289
|
+
declaredProps,
|
|
290
|
+
declaredEmit
|
|
291
|
+
);
|
|
280
292
|
const passthrough = usePassthrough({
|
|
281
293
|
component: 'BbColorInput',
|
|
282
294
|
attrs: useAttrs(),
|
|
@@ -566,6 +578,11 @@ type BbColorInputPtProps = /* @vue-ignore */ PtCompoundProps<
|
|
|
566
578
|
// asserts the resolved prop names.
|
|
567
579
|
|
|
568
580
|
export type BbColorInputProps = BbColorInputPtProps & {
|
|
581
|
+
/**
|
|
582
|
+
* Whether the panel is open (`v-model:open`; `v-model` stays the value).
|
|
583
|
+
* Bound, the app opens and closes it; unbound, the initial state.
|
|
584
|
+
*/
|
|
585
|
+
open?: boolean;
|
|
569
586
|
/**
|
|
570
587
|
* Passthrough, object form: `{ box: '…', 'box:errors': '…' }` — the same
|
|
571
588
|
* keys as the `pt:*` attributes without the prefix. See the `pt:<part>` row.
|
|
@@ -788,6 +805,8 @@ export type BbColorInputEvents = {
|
|
|
788
805
|
(e: 'shown'): void;
|
|
789
806
|
/** Emitted as soon as the palette starts to close. */
|
|
790
807
|
(e: 'hide'): void;
|
|
808
|
+
/** The panel opened or closed (`v-model:open`). */
|
|
809
|
+
(e: 'update:open', value: boolean): void;
|
|
791
810
|
/** Emitted once the palette has finished closing. */
|
|
792
811
|
(e: 'hidden'): void;
|
|
793
812
|
/**
|