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
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { wait as e } from "../../utilities/functions/wait.js";
|
|
2
|
+
// src/components/BbDialog/leaveGhost.ts
|
|
3
|
+
var t = "bb-overlay-ghost", n = 50, r = 0, i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set(), o = [], s = () => {
|
|
4
|
+
if (a.size) return;
|
|
5
|
+
let e = o;
|
|
6
|
+
o = [];
|
|
7
|
+
for (let t of e) t();
|
|
8
|
+
}, c = (e) => {
|
|
9
|
+
i.set(e, ++r);
|
|
10
|
+
}, l = (e) => {
|
|
11
|
+
i.delete(e);
|
|
12
|
+
}, u = (e) => {
|
|
13
|
+
let t = i.get(e);
|
|
14
|
+
if (t === void 0) return !1;
|
|
15
|
+
for (let e of i.values()) if (e > t) return !1;
|
|
16
|
+
return !0;
|
|
17
|
+
}, d = (e) => {
|
|
18
|
+
for (let t of [e, ...e.querySelectorAll("*")]) t.removeAttribute("id"), t.removeAttribute("autofocus"), t !== e && t instanceof HTMLDialogElement && t.removeAttribute("open");
|
|
19
|
+
}, f = (r, i) => {
|
|
20
|
+
let o = typeof document < "u" && !!r?.open && i.duration > 0 && u(i.id) && (i.closingSince === null || performance.now() - i.closingSince <= n);
|
|
21
|
+
if (l(i.id), !r?.open) return !1;
|
|
22
|
+
let c = o ? r.cloneNode(!0) : null;
|
|
23
|
+
r.close();
|
|
24
|
+
let f = document.activeElement, p = f instanceof HTMLElement && f !== document.body ? f : i.opener instanceof HTMLElement && i.opener.isConnected ? i.opener : null;
|
|
25
|
+
if (!c) return p && p !== f && p.focus({ preventScroll: !0 }), !1;
|
|
26
|
+
c.removeAttribute("open"), d(c), c.inert = !0, c.setAttribute("aria-hidden", "true"), c.setAttribute("data-bb-leaving", ""), c.classList.add(t, i.openClass), document.body.append(c);
|
|
27
|
+
try {
|
|
28
|
+
c.showModal();
|
|
29
|
+
} catch {
|
|
30
|
+
return c.remove(), !1;
|
|
31
|
+
}
|
|
32
|
+
return a.add(c), c.getBoundingClientRect(), c.classList.remove(t, i.openClass), e(i.duration).then(() => {
|
|
33
|
+
if (!a.has(c)) return;
|
|
34
|
+
let e = document.activeElement, t = !e || e === document.body || e === p || c.contains(e);
|
|
35
|
+
c.open && c.close(), c.remove(), a.delete(c), t && p?.isConnected && p.focus({ preventScroll: !0 }), s();
|
|
36
|
+
}), !0;
|
|
37
|
+
};
|
|
38
|
+
export { f as leaveAsGhost, l as surfaceGone, c as surfaceShown };
|
|
@@ -48,30 +48,43 @@ var m = Symbol.for("bitboss-ui:overlay-action-attrs"), h = (e) => e === !0 || e
|
|
|
48
48
|
return n.length === 1 ? n[0] : null;
|
|
49
49
|
}, D = (e) => {
|
|
50
50
|
i(e) || u(e, y, o.COMPONENT_EVENT_HANDLER);
|
|
51
|
-
}, O = null;
|
|
51
|
+
}, O = null, k = p(0);
|
|
52
52
|
_.surface.onSubmitted = (e, t) => {
|
|
53
53
|
if (!t || e !== E()) return;
|
|
54
54
|
let n = t.value === void 0 ? t.values : t.value;
|
|
55
|
-
O = _.complete(n).catch(D);
|
|
55
|
+
k.value++, O = _.complete(n).catch(D).finally(() => k.value--);
|
|
56
56
|
};
|
|
57
|
-
let
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
let A = p(null), j = () => _.surface.pending() || k.value > 0, M = (e) => A.value === null ? j() && (e.kind !== "cancel" || _.closeLocked()) : A.value !== e.key, N = {
|
|
58
|
+
class: "bb-button--soft-disabled",
|
|
59
|
+
"aria-disabled": !0,
|
|
60
|
+
tabindex: -1
|
|
61
|
+
}, P = async (e, t) => {
|
|
62
|
+
if (A.value === null) {
|
|
63
|
+
if (M(e)) e.kind === "cancel" && _.close();
|
|
64
|
+
else {
|
|
65
|
+
A.value = e.key;
|
|
66
|
+
try {
|
|
67
|
+
if (e.onClick && await e.onClick() === !1) return;
|
|
68
|
+
if (e.kind === "cancel") return _.close();
|
|
69
|
+
let n = e.kind === "ok" ? E() : null;
|
|
70
|
+
if (n) {
|
|
71
|
+
O = null, await n.submit(t) && await O;
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
await _.complete(_.data());
|
|
75
|
+
} catch (e) {
|
|
76
|
+
D(e);
|
|
77
|
+
} finally {
|
|
78
|
+
A.value = null;
|
|
67
79
|
}
|
|
68
|
-
await _.complete(_.data());
|
|
69
|
-
} catch (e) {
|
|
70
|
-
D(e);
|
|
71
|
-
} finally {
|
|
72
|
-
k.value = null;
|
|
73
80
|
}
|
|
74
81
|
}
|
|
82
|
+
}, F = (e) => {
|
|
83
|
+
let t = e.kind === "ok" ? E() : null;
|
|
84
|
+
return t ? {
|
|
85
|
+
type: "submit",
|
|
86
|
+
form: t.id()
|
|
87
|
+
} : {};
|
|
75
88
|
};
|
|
76
89
|
return {
|
|
77
90
|
resolved: w,
|
|
@@ -80,9 +93,10 @@ var m = Symbol.for("bitboss-ui:overlay-action-attrs"), h = (e) => e === !0 || e
|
|
|
80
93
|
key: t.key,
|
|
81
94
|
class: `${_.block}__action`,
|
|
82
95
|
...g(a(t)),
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
96
|
+
...F(t),
|
|
97
|
+
loading: A.value === t.key,
|
|
98
|
+
...M(t) ? N : {},
|
|
99
|
+
onClick: (e) => (e?.preventDefault(), P(t, e?.currentTarget ?? void 0))
|
|
86
100
|
}, S?.() ?? {})))
|
|
87
101
|
};
|
|
88
102
|
}, v = (e) => {
|
|
@@ -3,16 +3,17 @@ import t from "../BbOffCanvas/BbOffCanvas.vue.js";
|
|
|
3
3
|
import { BB_OFF_CANVAS_PT as n } from "../BbOffCanvas/types.js";
|
|
4
4
|
import ee from "../BbSmoothHeight/BbSmoothHeight.vue.js";
|
|
5
5
|
import r from "../BbButton/BbButton.vue.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
6
|
+
import i from "./BbDropdownList.vue.js";
|
|
7
|
+
import a from "./DropdownFailures.vue.js";
|
|
8
|
+
import o from "../../assets/svgs/chevron_right.svg_raw.js";
|
|
9
|
+
import { listboxOptionFontSize as s, listboxOptionHeight as c } from "../../utilities/misc/listboxMetrics.js";
|
|
10
|
+
import { useLocale as te } from "../../composables/useLocale.js";
|
|
11
|
+
import { elementLabel as ne } from "../../utilities/functions/elementLabel.js";
|
|
12
|
+
import { levelHasSearch as re, normalizeGroups as ie } from "./normalizeGroups.js";
|
|
13
|
+
import { useDropdownContext as ae } from "./useDropdownContext.js";
|
|
14
|
+
import { isImeComposing as oe } from "../../utilities/functions/isImeComposing.js";
|
|
15
|
+
import { isTopEscapeEntry as se, pushEscapeEntry as ce, removeEscapeEntry as le } from "../../utils/overlayEscapeStack.js";
|
|
16
|
+
import { Fragment as ue, Transition as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as de, createTextVNode as fe, createVNode as h, defineComponent as g, guardReactiveProps as pe, mergeModels as _, mergeProps as v, nextTick as y, normalizeClass as me, normalizeProps as b, onBeforeUnmount as he, openBlock as x, ref as S, resolveDynamicComponent as C, toDisplayString as w, unref as T, useModel as ge, useTemplateRef as E, watch as D, withCtx as O } from "vue";
|
|
16
17
|
// src/components/BbDropdown/AdaptiveDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
17
18
|
var k = { class: "bb-offcanvas__title bb-dropdown__nav-title" }, A = {
|
|
18
19
|
key: 1,
|
|
@@ -27,7 +28,7 @@ var k = { class: "bb-offcanvas__title bb-dropdown__nav-title" }, A = {
|
|
|
27
28
|
role: "status"
|
|
28
29
|
}, N = /*@__PURE__*/ g({
|
|
29
30
|
__name: "AdaptiveDropdown",
|
|
30
|
-
props: /*@__PURE__*/
|
|
31
|
+
props: /*@__PURE__*/ _({
|
|
31
32
|
rootGroups: {},
|
|
32
33
|
offCanvasProps: {},
|
|
33
34
|
compact: { type: Boolean }
|
|
@@ -40,36 +41,36 @@ var k = { class: "bb-offcanvas__title bb-dropdown__nav-title" }, A = {
|
|
|
40
41
|
}),
|
|
41
42
|
emits: ["update:modelValue"],
|
|
42
43
|
setup(g) {
|
|
43
|
-
let
|
|
44
|
-
"--sheet-row-h": `${
|
|
45
|
-
"--sheet-option-fs":
|
|
46
|
-
})), B = u(() => L.value[L.value.length - 1]?.label), V =
|
|
47
|
-
D(
|
|
44
|
+
let _ = ge(g, "modelValue"), N = g, P = ae(), { t: F } = te(), I = F("dropdown.back"), L = S([]), R = u(() => L.value.length), z = u(() => R.value > 0), _e = u(() => ({
|
|
45
|
+
"--sheet-row-h": `${c(!0, N.compact)}px`,
|
|
46
|
+
"--sheet-option-fs": s(!0)
|
|
47
|
+
})), B = u(() => L.value[L.value.length - 1]?.label), V = S(_.value || !!N.offCanvasProps?.eager);
|
|
48
|
+
D(_, (e) => {
|
|
48
49
|
e && (V.value = !0);
|
|
49
50
|
}, { flush: "sync" });
|
|
50
|
-
let H =
|
|
51
|
-
D(
|
|
51
|
+
let H = S();
|
|
52
|
+
D(_, (e) => {
|
|
52
53
|
if (!e) return;
|
|
53
54
|
let t = P.activatorId.value;
|
|
54
|
-
H.value =
|
|
55
|
+
H.value = ne(t ? document.getElementById(t) : null);
|
|
55
56
|
}, {
|
|
56
57
|
immediate: !0,
|
|
57
58
|
flush: "sync"
|
|
58
59
|
});
|
|
59
|
-
let
|
|
60
|
+
let ve = (e) => e.map((e) => e.selectable ? {
|
|
60
61
|
...e,
|
|
61
62
|
selected: P.selectedFor(e.id ?? "")
|
|
62
|
-
} : e),
|
|
63
|
+
} : e), ye = (e, t) => {
|
|
63
64
|
for (let n of e) for (let e of n.items) if (e.rowKey === t) return e;
|
|
64
65
|
}, U = u(() => {
|
|
65
66
|
let e = N.rootGroups;
|
|
66
67
|
for (let t of L.value) {
|
|
67
|
-
let n =
|
|
68
|
+
let n = ye(e, t.rowKey)?.items;
|
|
68
69
|
if (!n) break;
|
|
69
|
-
e =
|
|
70
|
+
e = ve(ie(n));
|
|
70
71
|
}
|
|
71
72
|
return e;
|
|
72
|
-
}), W = u(() =>
|
|
73
|
+
}), W = u(() => re(U.value)), G = S("bb-dropdown-nav-forward"), be = (e) => {
|
|
73
74
|
e.items && (G.value = "bb-dropdown-nav-forward", L.value = [...L.value, {
|
|
74
75
|
rowKey: e.rowKey,
|
|
75
76
|
label: e.label
|
|
@@ -80,102 +81,106 @@ var k = { class: "bb-offcanvas__title bb-dropdown__nav-title" }, A = {
|
|
|
80
81
|
visible: e
|
|
81
82
|
}, L.value = L.value.slice(0, -1));
|
|
82
83
|
}, J = Symbol("bb-dropdown-sheet-level"), Y = (e) => {
|
|
83
|
-
e.key !== "Escape" ||
|
|
84
|
+
e.key !== "Escape" || oe(e) || se(J) && (e.preventDefault(), e.stopImmediatePropagation(), q(!0));
|
|
84
85
|
}, X = () => {
|
|
85
|
-
|
|
86
|
+
le(J), document.removeEventListener("keydown", Y, { capture: !0 });
|
|
86
87
|
};
|
|
87
|
-
D(() =>
|
|
88
|
+
D(() => _.value && z.value, (e) => {
|
|
88
89
|
if (!e) return X();
|
|
89
|
-
|
|
90
|
-
}),
|
|
91
|
-
let Z =
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
ce(J, { element: () => document.getElementById(`menu_${P.rootId}`)?.closest("dialog") }), document.addEventListener("keydown", Y, { capture: !0 });
|
|
91
|
+
}), he(X);
|
|
92
|
+
let Z = E("list-el"), Q = (e, t) => {
|
|
93
|
+
y(() => {
|
|
94
|
+
_.value && (t ? Z.value?.focusRow(t, e) : Z.value?.focusFirst(e));
|
|
94
95
|
});
|
|
95
|
-
},
|
|
96
|
+
}, xe = () => {
|
|
96
97
|
let e = P.openModality();
|
|
97
|
-
|
|
98
|
+
y(() => Q(e === void 0 ? void 0 : e === "keyboard"));
|
|
98
99
|
};
|
|
99
100
|
D(R, () => {
|
|
100
101
|
let e = K;
|
|
101
|
-
K = void 0,
|
|
102
|
+
K = void 0, _.value && Q(e?.visible, e?.rowKey);
|
|
102
103
|
});
|
|
103
104
|
let $ = u(() => ({
|
|
104
105
|
disabled: P.disabled.value,
|
|
105
106
|
open: P.open.value,
|
|
106
107
|
placement: P.placement.value
|
|
107
|
-
})),
|
|
108
|
-
L.value = [], !
|
|
108
|
+
})), Se = () => {
|
|
109
|
+
L.value = [], !_.value && !N.offCanvasProps?.eager && (V.value = !1), P.focusActivator();
|
|
109
110
|
};
|
|
110
|
-
return (
|
|
111
|
-
modelValue:
|
|
112
|
-
"onUpdate:modelValue":
|
|
111
|
+
return (s, c) => (x(), d(t, v({
|
|
112
|
+
modelValue: _.value,
|
|
113
|
+
"onUpdate:modelValue": c[1] ||= (e) => _.value = e,
|
|
113
114
|
"aria-label": H.value,
|
|
114
115
|
class: ["bb-dropdown__sheet bb-dropdown bb-dropdown--adaptive bb-dropdown--mobile", { "bb-dropdown--compact": g.compact }],
|
|
115
|
-
pt:
|
|
116
|
+
pt: T(P).passthrough.forward({
|
|
116
117
|
header: "header",
|
|
117
118
|
footer: "footer",
|
|
118
119
|
panel: "root",
|
|
119
120
|
sheet: "root"
|
|
120
|
-
},
|
|
121
|
-
style:
|
|
122
|
-
},
|
|
123
|
-
onHidden:
|
|
124
|
-
onShow:
|
|
125
|
-
})),
|
|
126
|
-
default: O(() => [
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
default: O(() => [(
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
121
|
+
}, T(n).states, () => g.offCanvasProps?.pt),
|
|
122
|
+
style: _e.value
|
|
123
|
+
}, v(T(e)(g.offCanvasProps), {
|
|
124
|
+
onHidden: Se,
|
|
125
|
+
onShow: xe
|
|
126
|
+
})), de({
|
|
127
|
+
default: O(() => [
|
|
128
|
+
m("div", {
|
|
129
|
+
id: `menu_${T(P).rootId}`,
|
|
130
|
+
"aria-label": W.value ? void 0 : B.value ?? H.value,
|
|
131
|
+
class: "bb-dropdown__adaptive-menu",
|
|
132
|
+
role: W.value ? "none" : "menu"
|
|
133
|
+
}, [h(ee, {
|
|
134
|
+
class: "bb-dropdown__adaptive-body",
|
|
135
|
+
role: "none",
|
|
136
|
+
tag: "div"
|
|
137
|
+
}, {
|
|
138
|
+
default: O(() => [h(l, { name: G.value }, {
|
|
139
|
+
default: O(() => [(x(), p("span", v({
|
|
140
|
+
key: R.value,
|
|
141
|
+
class: "bb-dropdown__list scrollbar-border",
|
|
142
|
+
role: "none"
|
|
143
|
+
}, T(P).passthrough.list), [V.value ? (x(), d(i, {
|
|
144
|
+
key: 0,
|
|
145
|
+
ref: "list-el",
|
|
146
|
+
back: z.value ? q : void 0,
|
|
147
|
+
groups: U.value,
|
|
148
|
+
navigate: be,
|
|
149
|
+
"slot-depth": R.value
|
|
150
|
+
}, null, 8, [
|
|
151
|
+
"back",
|
|
152
|
+
"groups",
|
|
153
|
+
"slot-depth"
|
|
154
|
+
])) : f("", !0)], 16))]),
|
|
155
|
+
_: 1
|
|
156
|
+
}, 8, ["name"])]),
|
|
153
157
|
_: 1
|
|
154
|
-
}, 8,
|
|
155
|
-
|
|
156
|
-
|
|
158
|
+
})], 8, j),
|
|
159
|
+
m("span", M, w(T(P).status.value), 1),
|
|
160
|
+
R.value ? f("", !0) : (x(), d(a, { key: 0 }))
|
|
161
|
+
]),
|
|
157
162
|
_: 2
|
|
158
|
-
}, [z.value ||
|
|
163
|
+
}, [z.value || T(P).slots.header ? {
|
|
159
164
|
name: "header",
|
|
160
|
-
fn: O(() => [m("div", { class:
|
|
161
|
-
z.value ? (
|
|
165
|
+
fn: O(() => [m("div", { class: me(["bb-dropdown__nav", { "bb-dropdown__nav--drill": z.value }]) }, [
|
|
166
|
+
z.value ? (x(), d(r, {
|
|
162
167
|
key: 0,
|
|
163
168
|
class: "bb-dropdown__nav-back",
|
|
164
169
|
"icon-only": "",
|
|
165
|
-
"prepend:icon":
|
|
170
|
+
"prepend:icon": T(o),
|
|
166
171
|
size: "xl",
|
|
167
|
-
text:
|
|
172
|
+
text: T(I),
|
|
168
173
|
type: "button",
|
|
169
174
|
variant: "ghost",
|
|
170
|
-
onClick:
|
|
175
|
+
onClick: c[0] ||= (e) => q()
|
|
171
176
|
}, null, 8, ["prepend:icon", "text"])) : f("", !0),
|
|
172
|
-
m("span", k, [z.value ? (
|
|
173
|
-
z.value ? (
|
|
177
|
+
m("span", k, [z.value ? (x(), p(ue, { key: 0 }, [fe(w(B.value), 1)], 64)) : (x(), d(C(T(P).slots.header), b(v({ key: 1 }, $.value)), null, 16))]),
|
|
178
|
+
z.value ? (x(), p("span", A)) : f("", !0)
|
|
174
179
|
], 2)]),
|
|
175
180
|
key: "0"
|
|
176
|
-
} : void 0,
|
|
181
|
+
} : void 0, T(P).slots.footer ? {
|
|
177
182
|
name: "footer",
|
|
178
|
-
fn: O(() => [(
|
|
183
|
+
fn: O(() => [(x(), d(C(T(P).slots.footer), b(pe($.value)), null, 16))]),
|
|
179
184
|
key: "1"
|
|
180
185
|
} : void 0]), 1040, [
|
|
181
186
|
"modelValue",
|
|
@@ -4,6 +4,7 @@ type __VLS_Props = BbDropdownProps & FallthroughAttrs<'div' | 'dialog', BbDropdo
|
|
|
4
4
|
type __VLS_Slots = BbDropdownSlots;
|
|
5
5
|
export type { BbDropdownProps, BbDropdownSlots, InternalItem as Item, MappedItem, DropdownTrigger, };
|
|
6
6
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
7
|
+
"update:modelValue": (value: boolean) => any;
|
|
7
8
|
"item:selected": (value: any) => any;
|
|
8
9
|
hide: () => any;
|
|
9
10
|
show: () => any;
|
|
@@ -11,6 +12,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
11
12
|
hidden: () => any;
|
|
12
13
|
"item:unselected": (value: any) => any;
|
|
13
14
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
14
16
|
"onItem:selected"?: ((value: any) => any) | undefined;
|
|
15
17
|
onHide?: (() => any) | undefined;
|
|
16
18
|
onShow?: (() => any) | undefined;
|
|
@@ -21,6 +23,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
21
23
|
compact: boolean;
|
|
22
24
|
adaptive: boolean;
|
|
23
25
|
transitionDuration: number;
|
|
26
|
+
modelValue: boolean;
|
|
24
27
|
offset: number;
|
|
25
28
|
padding: number;
|
|
26
29
|
placement: import('../../index.js').Placement | "cursor";
|