bitboss-ui 3.0.0-beta.63 → 3.0.0-beta.64
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 +25 -20
- package/bin/bitboss-ui.mjs +73 -7
- package/dist/ai/BbAlert.md +10 -1
- package/dist/ai/BbBadge.md +35 -3
- package/dist/ai/BbBadgeButton.md +4 -2
- package/dist/ai/BbBaseButton.md +9 -3
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +113 -8
- package/dist/ai/BbCheckbox.md +1 -1
- package/dist/ai/BbCheckboxGroup.md +94 -6
- package/dist/ai/BbColorInput.md +4 -1
- package/dist/ai/BbColorPalette.md +2 -1
- package/dist/ai/BbConfirm.md +7 -3
- package/dist/ai/BbDatePicker.md +2 -1
- package/dist/ai/BbDatePickerInput.md +4 -1
- package/dist/ai/BbDialog.md +12 -11
- package/dist/ai/BbDropdown.md +189 -38
- package/dist/ai/BbDropdownButton.md +27 -7
- package/dist/ai/BbForm.md +55 -22
- package/dist/ai/BbHost.md +2 -2
- package/dist/ai/BbHoverCard.md +7 -3
- package/dist/ai/BbIcon.md +12 -6
- package/dist/ai/BbIndicator.md +11 -1
- package/dist/ai/BbNumberInput.md +4 -1
- package/dist/ai/BbOffCanvas.md +37 -3
- package/dist/ai/BbPopover.md +2 -1
- package/dist/ai/BbRadio.md +1 -1
- package/dist/ai/BbRadioGroup.md +102 -10
- package/dist/ai/BbSelect.md +52 -17
- package/dist/ai/BbSelectPopover.md +93 -26
- package/dist/ai/BbSwitch.md +1 -1
- package/dist/ai/BbSwitchGroup.md +30 -3
- package/dist/ai/BbTable.md +17 -10
- package/dist/ai/BbTabs.md +8 -3
- package/dist/ai/BbTabsList.md +4 -1
- package/dist/ai/BbTag.md +5 -2
- package/dist/ai/BbTextInput.md +4 -1
- package/dist/ai/BbTextarea.md +4 -1
- package/dist/ai/BbTimePicker.md +2 -1
- package/dist/ai/BbTimePickerInput.md +4 -1
- package/dist/ai/BbToast.md +9 -3
- package/dist/ai/BbTooltip.md +71 -9
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/CommonField.md +1 -1
- package/dist/ai/OptionsContainer.md +42 -0
- package/dist/ai/changelog.json +416 -6
- package/dist/ai/components.json +50 -48
- package/dist/ai/composables/useConfirm.md +39 -1
- package/dist/ai/design-tokens.json +6 -6
- package/dist/ai/guides/agent-contract.md +2 -2
- package/dist/ai/guides/ai-router.md +24 -23
- package/dist/ai/guides/app-layout.md +5 -0
- package/dist/ai/guides/component-picker.md +9 -2
- package/dist/ai/guides/design-language.md +24 -24
- package/dist/ai/guides/design-tokens.md +15 -8
- package/dist/ai/guides/icons-policy.md +9 -2
- package/dist/ai/guides/inertia-helpers.md +79 -49
- package/dist/ai/guides/installation-and-plugin-setup.md +12 -2
- package/dist/ai/guides/migration/adoption-checklist.md +235 -0
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -15
- package/dist/ai/guides/migration/components/bb-dialog.md +9 -9
- package/dist/ai/guides/migration/components/bb-dropdown.md +7 -2
- package/dist/ai/guides/migration/components/bb-popover.md +4 -2
- package/dist/ai/guides/migration/components/bb-select.md +19 -0
- package/dist/ai/guides/migration/components/bb-table.md +1 -0
- package/dist/ai/guides/migration/components/bb-toast.md +4 -0
- package/dist/ai/guides/migration/components/bb-tooltip.md +15 -12
- package/dist/ai/guides/migration/components/use-confirm.md +25 -2
- package/dist/ai/guides/migration/v2-to-v3.md +163 -9
- package/dist/ai/guides/migration/v3-beta-css-classes.md +7 -3
- package/dist/ai/guides/options-items-playbook.md +2 -1
- package/dist/ai/guides/passthrough.md +147 -85
- package/dist/ai/guides/preset-components.md +140 -15
- package/dist/ai/helpers/definePreset.json +7 -0
- package/dist/ai/helpers/definePreset.ts +123 -11
- package/dist/ai/helpers/inertia/manifest.json +15 -9
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +4 -4
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +39 -24
- package/dist/ai/helpers/inertia/useRouteQuery.ts +10 -4
- package/dist/ai/index.md +1 -0
- package/dist/ai/manifest/common.json +0 -1
- package/dist/ai/manifest/components/BbAlert.json +7 -2
- package/dist/ai/manifest/components/BbBadge.json +13 -4
- package/dist/ai/manifest/components/BbBadge.tree.json +2 -0
- package/dist/ai/manifest/components/BbBadgeButton.json +4 -2
- package/dist/ai/manifest/components/BbBaseButton.json +4 -2
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +14 -3
- package/dist/ai/manifest/components/BbButton.tree.json +5 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +13 -8
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +11 -1
- package/dist/ai/manifest/components/BbColorInput.json +18 -15
- package/dist/ai/manifest/components/BbColorPalette.json +1 -1
- package/dist/ai/manifest/components/BbConfirm.json +4 -2
- package/dist/ai/manifest/components/BbConfirm.tree.json +1 -1
- package/dist/ai/manifest/components/BbDatePicker.json +1 -1
- package/dist/ai/manifest/components/BbDatePickerInput.json +17 -14
- package/dist/ai/manifest/components/BbDialog.tree.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.json +24 -19
- package/dist/ai/manifest/components/BbDropdown.tree.json +9 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +33 -20
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +2 -2
- package/dist/ai/manifest/components/BbHost.tree.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbIndicator.json +8 -2
- package/dist/ai/manifest/components/BbNumberInput.json +5 -2
- package/dist/ai/manifest/components/BbOffCanvas.json +2 -2
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +17 -12
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +8 -1
- package/dist/ai/manifest/components/BbSelect.json +21 -18
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +10 -10
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +3 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +3 -1
- package/dist/ai/manifest/components/BbTable.tree.json +14 -1
- package/dist/ai/manifest/components/BbTabs.json +9 -6
- package/dist/ai/manifest/components/BbTabs.tree.json +1 -1
- package/dist/ai/manifest/components/BbTabsList.json +6 -3
- package/dist/ai/manifest/components/BbTag.json +19 -16
- package/dist/ai/manifest/components/BbTag.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.json +6 -3
- package/dist/ai/manifest/components/BbTextarea.json +6 -3
- package/dist/ai/manifest/components/BbTimePicker.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +10 -7
- package/dist/ai/manifest/components/BbToast.json +7 -2
- package/dist/ai/manifest/components/BbToast.tree.json +4 -2
- package/dist/ai/manifest/components/BbTooltip.json +6 -5
- package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
- package/dist/ai/manifest/components/CommonField.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +3 -1
- package/dist/ai/manifest/components/OptionsContainer.tree.json +38 -0
- package/dist/ai/manifest/index.json +3 -3
- package/dist/ai/manifest/meta.json +5 -3
- package/dist/ai/manifest/types.advanced.json +5 -2
- package/dist/ai/manifest/types.api.json +9 -7
- package/dist/ai/recipes/inertia/layout-scaffold.md +19 -6
- package/dist/ai/recipes/inertia/records-workspace.md +49 -13
- package/dist/ai/recipes/nuxt/layout-scaffold.md +19 -6
- package/dist/ai/recipes/nuxt/records-workspace.md +42 -12
- package/dist/ai/recipes/vue/layout-scaffold.md +19 -6
- package/dist/ai/recipes/vue/records-workspace.md +42 -12
- package/dist/ai/source/BbAlert.md +94 -76
- package/dist/ai/source/BbBadge.md +174 -72
- package/dist/ai/source/BbBadgeButton.md +130 -65
- package/dist/ai/source/BbBaseButton.md +46 -124
- package/dist/ai/source/BbBaseCheckboxIcon.md +38 -0
- package/dist/ai/source/BbBaseRadioIcon.md +18 -0
- package/dist/ai/source/BbBaseSwitchIcon.md +51 -0
- package/dist/ai/source/BbButton.md +153 -36
- package/dist/ai/source/BbCheckboxGroup.md +142 -18
- package/dist/ai/source/BbColorInput.md +240 -204
- package/dist/ai/source/BbColorPalette.md +7 -4
- package/dist/ai/source/BbConfirm.md +34 -11
- package/dist/ai/source/BbConfirmPortal.md +24 -9
- package/dist/ai/source/BbDatePicker.md +11 -7
- package/dist/ai/source/BbDatePickerInput.md +306 -269
- package/dist/ai/source/BbDialog.md +49 -14
- package/dist/ai/source/BbDropdown.md +314 -197
- package/dist/ai/source/BbDropdownButton.md +197 -31
- package/dist/ai/source/BbDropdownGroup.md +274 -176
- package/dist/ai/source/BbForm.md +50 -6
- package/dist/ai/source/BbHoverCard.md +12 -5
- package/dist/ai/source/BbIcon.md +4 -3
- package/dist/ai/source/BbIndicator.md +73 -52
- package/dist/ai/source/BbNumberInput.md +293 -257
- package/dist/ai/source/BbOffCanvas.md +55 -29
- package/dist/ai/source/BbPopover.md +14 -10
- package/dist/ai/source/BbRadioGroup.md +413 -297
- package/dist/ai/source/BbSelect.md +549 -435
- package/dist/ai/source/BbSelectPopover.md +128 -33
- package/dist/ai/source/BbSwitchGroup.md +70 -10
- package/dist/ai/source/BbTable.md +369 -37
- package/dist/ai/source/BbTabs.md +115 -39
- package/dist/ai/source/BbTabsList.md +106 -38
- package/dist/ai/source/BbTabsPanels.md +96 -36
- package/dist/ai/source/BbTabsRoot.md +96 -36
- package/dist/ai/source/BbTag.md +267 -233
- package/dist/ai/source/BbTextInput.md +261 -225
- package/dist/ai/source/BbTextarea.md +251 -215
- package/dist/ai/source/BbTimePicker.md +11 -7
- package/dist/ai/source/BbTimePickerInput.md +257 -220
- package/dist/ai/source/BbToast.md +73 -32
- package/dist/ai/source/BbToastPortal.md +65 -30
- package/dist/ai/source/BbTooltip.md +148 -113
- package/dist/ai/source/CommonPopover.md +6 -1
- package/dist/ai/source/FlatListBox.md +19 -9
- package/dist/ai/source/GroupedListBox.md +19 -9
- package/dist/ai/source/OptionsContainer.md +25 -9
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +61 -36
- package/dist/components/BbAlert/types.d.ts +9 -5
- package/dist/components/BbAlert/types.js +8 -3
- package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +3 -3
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +26 -17
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +103 -50
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +20 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +12 -1
- package/dist/components/BbBadge/types.d.ts +45 -15
- package/dist/components/BbBadge/types.js +12 -3
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +89 -126
- package/dist/components/BbBaseButton/types.d.ts +23 -4
- package/dist/components/BbBaseButton/types.js +7 -1
- package/dist/components/BbBaseButton/useLinkState.d.ts +41 -0
- package/dist/components/BbBaseButton/useLinkState.js +70 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +130 -74
- package/dist/components/BbButton/types.d.ts +50 -13
- package/dist/components/BbButton/types.js +10 -3
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +148 -95
- package/dist/components/BbCheckboxGroup/types.d.ts +34 -11
- package/dist/components/BbCheckboxGroup/types.js +9 -4
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +134 -93
- package/dist/components/BbColorInput/types.d.ts +11 -4
- package/dist/components/BbColorInput/types.js +9 -3
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +82 -59
- package/dist/components/BbConfirm/types.d.ts +9 -4
- package/dist/components/BbConfirm/types.js +8 -3
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +68 -67
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +259 -215
- package/dist/components/BbDatePickerInput/types.d.ts +12 -5
- package/dist/components/BbDatePickerInput/types.js +9 -3
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +223 -219
- package/dist/components/BbDialog/useDialogStack.d.ts +1 -1
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +104 -89
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +323 -285
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +1 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +411 -319
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +100 -98
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +4 -3
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +49 -28
- package/dist/components/BbDropdown/normalizeGroups.d.ts +6 -0
- package/dist/components/BbDropdown/normalizeGroups.js +21 -15
- package/dist/components/BbDropdown/types.d.ts +59 -12
- package/dist/components/BbDropdown/types.js +16 -3
- package/dist/components/BbDropdown/useDropdownContext.d.ts +6 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +179 -68
- package/dist/components/BbDropdownButton/types.d.ts +44 -16
- package/dist/components/BbDropdownButton/types.js +28 -3
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +111 -89
- package/dist/components/BbForm/formSchema.d.ts +13 -0
- package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +100 -100
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +40 -25
- package/dist/components/BbIndicator/types.d.ts +9 -5
- package/dist/components/BbIndicator/types.js +8 -3
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +243 -202
- package/dist/components/BbNumberInput/types.d.ts +12 -5
- package/dist/components/BbNumberInput/types.js +9 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +401 -399
- package/dist/components/BbOffCanvas/types.d.ts +6 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +158 -105
- package/dist/components/BbRadioGroup/types.d.ts +21 -7
- package/dist/components/BbRadioGroup/types.js +9 -4
- package/dist/components/BbSelect/BbSelect.vue.d.ts +4 -3
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +181 -137
- package/dist/components/BbSelect/types.d.ts +36 -22
- package/dist/components/BbSelect/types.js +22 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +4 -4
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +543 -532
- package/dist/components/BbSelectPopover/knownItems.d.ts +5 -0
- package/dist/components/BbSelectPopover/types.d.ts +46 -12
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbSwitchGroup/types.d.ts +14 -4
- package/dist/components/BbSwitchGroup/types.js +8 -3
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1102 -995
- package/dist/components/BbTable/estimatedFloors.golden.d.ts +25 -0
- package/dist/components/BbTable/measuredFloors.d.ts +46 -0
- package/dist/components/BbTable/measuredFloors.js +322 -0
- package/dist/components/BbTable/measuredFloorsTestKit.d.ts +27 -0
- package/dist/components/BbTable/textRuler.d.ts +71 -0
- package/dist/components/BbTable/textRuler.js +121 -0
- package/dist/components/BbTable/utils.d.ts +113 -6
- package/dist/components/BbTable/utils.js +118 -65
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +53 -35
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +62 -45
- package/dist/components/BbTabs/types.d.ts +26 -11
- package/dist/components/BbTabs/types.js +23 -8
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +205 -164
- package/dist/components/BbTag/types.d.ts +11 -4
- package/dist/components/BbTag/types.js +9 -3
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +98 -57
- package/dist/components/BbTextInput/types.d.ts +12 -5
- package/dist/components/BbTextInput/types.js +9 -3
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +137 -96
- package/dist/components/BbTextarea/types.d.ts +12 -5
- package/dist/components/BbTextarea/types.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +105 -104
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +241 -197
- package/dist/components/BbTimePickerInput/types.d.ts +12 -5
- package/dist/components/BbTimePickerInput/types.js +9 -3
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +74 -32
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +47 -47
- package/dist/components/BbToast/types.d.ts +10 -5
- package/dist/components/BbToast/types.js +18 -3
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +85 -71
- package/dist/components/BbTooltip/types.d.ts +13 -8
- package/dist/components/BbTooltip/types.js +8 -3
- package/dist/components/CommonField/CommonField.vue.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +69 -69
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +53 -50
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +146 -143
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +7 -2
- package/dist/components/OptionsContainer/types.d.ts +14 -3
- package/dist/composables/useBbFormContext.d.ts +4 -3
- package/dist/composables/useBbTabsContext.js +99 -85
- package/dist/composables/useChoiceIndicator.d.ts +58 -0
- package/dist/composables/useChoiceIndicator.js +197 -0
- package/dist/composables/useConfirm.d.ts +4 -4
- package/dist/composables/usePassthrough.d.ts +54 -1
- package/dist/composables/usePassthrough.js +100 -71
- package/dist/directives/bbTooltip.d.ts +12 -6
- package/dist/directives/createPopoverDirective.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/llms-full.txt +2300 -543
- package/dist/llms-medium.txt +71 -53
- package/dist/llms.txt +2 -1
- package/dist/passthrough-deduper.js +6 -3
- package/dist/project-dts.d.ts +24 -0
- package/dist/project-dts.js +43 -17
- package/dist/styles.css +2 -2
- package/dist/types/AlertVariant.d.ts +14 -0
- package/dist/types/AlertVariant.js +9 -0
- package/dist/types/BadgeVariant.d.ts +14 -0
- package/dist/types/BadgeVariant.js +9 -0
- package/dist/types/ButtonVariant.d.ts +16 -0
- package/dist/types/ButtonVariant.js +11 -0
- package/dist/types/CheckboxVariant.d.ts +38 -0
- package/dist/types/CheckboxVariant.js +4 -0
- package/dist/types/CommonProps.d.ts +4 -3
- package/dist/types/Config.d.ts +7 -0
- package/dist/types/ConfirmVariant.d.ts +12 -0
- package/dist/types/ConfirmVariant.js +4 -0
- package/dist/types/DropdownItemVariant.d.ts +12 -0
- package/dist/types/DropdownItemVariant.js +4 -0
- package/dist/types/IndicatorVariant.d.ts +15 -0
- package/dist/types/IndicatorVariant.js +10 -0
- package/dist/types/InputVariant.d.ts +13 -0
- package/dist/types/InputVariant.js +8 -0
- package/dist/types/RadioVariant.d.ts +38 -0
- package/dist/types/RadioVariant.js +4 -0
- package/dist/types/TabsVariant.d.ts +13 -0
- package/dist/types/TabsVariant.js +8 -0
- package/dist/types/ToastVariant.d.ts +15 -0
- package/dist/types/ToastVariant.js +10 -0
- package/dist/types/TooltipVariant.d.ts +12 -0
- package/dist/types/TooltipVariant.js +4 -0
- package/dist/types/passthrough.d.ts +83 -15
- package/dist/types/passthrough.js +2 -2
- package/dist/types/ptComponentMap.d.ts +35 -23
- package/dist/utilities/functions/extractDomContainer.d.ts +20 -1
- package/dist/utilities/functions/extractDomContainer.js +8 -3
- package/dist/utils/focusVisibility.d.ts +6 -0
- package/dist/utils/focusVisibility.js +4 -1
- package/dist/utils/passthroughDeduper.d.ts +14 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +64 -7
- package/dist/vite.js +385 -259
- package/llms.txt +2 -1
- package/package.json +3 -3
- package/scripts/lib/adoption-checklist.json +312 -0
- package/scripts/lib/eslint-plugin.d.ts +13 -0
- package/scripts/lib/eslint-plugin.mjs +75 -11
- package/scripts/lib/idiom-scan.mjs +65 -0
- package/scripts/lib/mcp-config.mjs +203 -9
- package/scripts/lib/migrate-fix.mjs +42 -1
- package/scripts/lib/project-variant-dts.mjs +18 -0
- package/scripts/lib/validate-bb-markup.mjs +99 -2
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { usePassthrough as e } from "../../composables/usePassthrough.js";
|
|
2
|
-
import { useId as
|
|
3
|
-
import { isTopEscapeEntry as
|
|
1
|
+
import { usePassthrough as e, variantPt as t } from "../../composables/usePassthrough.js";
|
|
2
|
+
import { useId as n } from "../../composables/useId.js";
|
|
3
|
+
import { isTopEscapeEntry as ee, pushEscapeEntry as te, removeEscapeEntry as r } from "../../utils/overlayEscapeStack.js";
|
|
4
4
|
import { useUntil as i } from "../../composables/useUntil.js";
|
|
5
|
-
import { useOverlayYield as
|
|
6
|
-
import { isWarm as
|
|
7
|
-
import { removedPropsFor as
|
|
8
|
-
import { warnRemovedAttrs as
|
|
9
|
-
import { extractDomContainer as o } from "../../utilities/functions/extractDomContainer.js";
|
|
5
|
+
import { useOverlayYield as ne } from "../../composables/useOverlayYield.js";
|
|
6
|
+
import { isWarm as re, markHidden as a, markShown as ie } from "./tooltipWarmup.js";
|
|
7
|
+
import { removedPropsFor as ae } from "../../deprecation/removedProps.js";
|
|
8
|
+
import { warnRemovedAttrs as oe } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
9
|
+
import { domElement as se, extractDomContainer as o } from "../../utilities/functions/extractDomContainer.js";
|
|
10
10
|
import { transitions as s } from "../../utilities/misc/transitions.js";
|
|
11
|
-
import
|
|
11
|
+
import ce from "../CommonPopover/CommonPopover.vue.js";
|
|
12
12
|
import { BB_TOOLTIP_PT as c } from "./types.js";
|
|
13
|
-
import { Comment as
|
|
14
|
-
import { useElementSize as
|
|
13
|
+
import { Comment as le, Fragment as ue, computed as l, createBlock as de, createCommentVNode as u, createElementBlock as d, createElementVNode as fe, createTextVNode as pe, defineComponent as f, mergeModels as p, mergeProps as m, normalizeProps as me, onBeforeUnmount as he, onDeactivated as ge, onMounted as h, openBlock as g, ref as _, renderSlot as v, toDisplayString as y, unref as b, useModel as _e, useSlots as ve, useTemplateRef as ye, watch as x, withCtx as be } from "vue";
|
|
14
|
+
import { useElementSize as xe } from "@vueuse/core";
|
|
15
15
|
//#region src/components/BbTooltip/BbTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
-
var
|
|
16
|
+
var S = /*@__PURE__*/ f({
|
|
17
|
+
mixins: [t(c)],
|
|
17
18
|
inheritAttrs: !1,
|
|
18
19
|
__name: "BbTooltip",
|
|
19
20
|
props: /*@__PURE__*/ p({
|
|
@@ -21,6 +22,10 @@ var x = /*@__PURE__*/ f({
|
|
|
21
22
|
"pt:panel": {},
|
|
22
23
|
"pt:root:open": {},
|
|
23
24
|
"pt:panel:open": {},
|
|
25
|
+
"pt:root:default": {},
|
|
26
|
+
"pt:root:destructive": {},
|
|
27
|
+
"pt:panel:default": {},
|
|
28
|
+
"pt:panel:destructive": {},
|
|
24
29
|
pt: {},
|
|
25
30
|
arrowPadding: { default: 10 },
|
|
26
31
|
disabled: { type: Boolean },
|
|
@@ -44,30 +49,34 @@ var x = /*@__PURE__*/ f({
|
|
|
44
49
|
modelModifiers: {}
|
|
45
50
|
}),
|
|
46
51
|
emits: ["update:modelValue"],
|
|
47
|
-
setup(
|
|
48
|
-
let
|
|
52
|
+
setup(t) {
|
|
53
|
+
let s = _e(t, "modelValue"), f = t, p = ve(), S = e({
|
|
49
54
|
component: "BbTooltip",
|
|
50
|
-
props:
|
|
55
|
+
props: f,
|
|
51
56
|
parts: c.parts,
|
|
52
57
|
states: c.states,
|
|
53
|
-
active: { open: () =>
|
|
58
|
+
active: { open: () => s.value },
|
|
59
|
+
variant: {
|
|
60
|
+
...c.variant,
|
|
61
|
+
current: () => f.variant
|
|
62
|
+
}
|
|
54
63
|
});
|
|
55
|
-
process.env.NODE_ENV !== "production" &&
|
|
56
|
-
let
|
|
64
|
+
process.env.NODE_ENV !== "production" && oe("BbTooltip", ae("BbTooltip"));
|
|
65
|
+
let Se = n().id.value, C = `bb_${f.id ?? Se}`, w = `${C}_desc`, T = (e) => {
|
|
57
66
|
if (!e) return "";
|
|
58
67
|
let t = "";
|
|
59
68
|
for (let n of e) {
|
|
60
|
-
if (n.type ===
|
|
69
|
+
if (n.type === le) continue;
|
|
61
70
|
let e = n.children;
|
|
62
71
|
typeof e == "string" ? t += e : Array.isArray(e) && (t += T(e));
|
|
63
72
|
}
|
|
64
73
|
return t;
|
|
65
|
-
}, E =
|
|
74
|
+
}, E = _(!1), D = l(() => (f.text ?? (E.value ? T(p.default?.({})) : "")).replace(/\s+/g, " ").trim()), O = _(), Ce = l(() => f.activator != null), we = ye("popover"), k = l(() => o(we.value)), A = i(s), Te = i(() => !!f.eager || s.value), j = _(!1), Ee = () => {
|
|
66
75
|
k.value?.getBoundingClientRect(), j.value = !0;
|
|
67
76
|
}, M = l({
|
|
68
|
-
get: () =>
|
|
77
|
+
get: () => s.value && j.value,
|
|
69
78
|
set: (e) => {
|
|
70
|
-
|
|
79
|
+
s.value = e;
|
|
71
80
|
}
|
|
72
81
|
}), N = (e) => {
|
|
73
82
|
let t = o(e);
|
|
@@ -75,92 +84,97 @@ var x = /*@__PURE__*/ f({
|
|
|
75
84
|
}, P, F, I = () => {
|
|
76
85
|
clearTimeout(F);
|
|
77
86
|
}, L = () => {
|
|
78
|
-
clearTimeout(P), clearTimeout(F),
|
|
87
|
+
clearTimeout(P), clearTimeout(F), s.value = !1;
|
|
79
88
|
}, R = () => {
|
|
80
89
|
clearTimeout(P), clearTimeout(F), F = setTimeout(L, 50);
|
|
81
90
|
}, z = () => {
|
|
82
|
-
I(), !(
|
|
83
|
-
V() || (
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
I(), clearTimeout(P), !(
|
|
87
|
-
}, B = !1, { blocked: V } =
|
|
91
|
+
I(), !(s.value || f.disabled || V()) && (P = setTimeout(() => {
|
|
92
|
+
V() || (s.value = !0);
|
|
93
|
+
}, re() ? 0 : f.delay));
|
|
94
|
+
}, De = () => {
|
|
95
|
+
I(), clearTimeout(P), !(s.value || f.disabled || V()) && (s.value = !0);
|
|
96
|
+
}, B = !1, { blocked: V } = ne(() => O.value, () => k.value, () => {
|
|
88
97
|
B = !0, L();
|
|
89
98
|
}), H = () => L(), U = Symbol("bb-tooltip-escape"), W = (e) => {
|
|
90
|
-
e.key !== "Escape" || !
|
|
99
|
+
e.key !== "Escape" || !ee(U) || (e.preventDefault(), e.stopImmediatePropagation(), L());
|
|
91
100
|
}, G = (e) => {
|
|
92
|
-
e.currentTarget?.matches(":focus-visible") &&
|
|
101
|
+
e.currentTarget?.matches(":focus-visible") && De();
|
|
93
102
|
}, K = !1;
|
|
94
|
-
|
|
95
|
-
e && !K ? (K = !0,
|
|
103
|
+
x(s, (e) => {
|
|
104
|
+
e && !K ? (K = !0, ie()) : !e && K && (K = !1, a(!B)), B = !1, e ? (te(U, {
|
|
96
105
|
element: () => k.value,
|
|
97
106
|
transient: !0
|
|
98
107
|
}), document.addEventListener("keydown", W, { capture: !0 })) : (r(U), document.removeEventListener("keydown", W, { capture: !0 }));
|
|
99
|
-
}),
|
|
108
|
+
}), x(() => f.disabled, (e) => {
|
|
100
109
|
e && L();
|
|
101
|
-
})
|
|
102
|
-
|
|
110
|
+
});
|
|
111
|
+
let q = _(!1);
|
|
112
|
+
h(() => {
|
|
113
|
+
q.value = !0;
|
|
114
|
+
}), x([() => f.activator, q], ([e, t]) => {
|
|
115
|
+
typeof e == "string" ? t && N(document.querySelector(e)) : e && N(e);
|
|
103
116
|
}, { immediate: !0 });
|
|
104
|
-
let
|
|
105
|
-
|
|
106
|
-
|
|
117
|
+
let J = null;
|
|
118
|
+
x(O, (e) => {
|
|
119
|
+
J &&= (J(), null), e && (e.addEventListener("mouseenter", z, { passive: !0 }), e.addEventListener("mouseleave", R, { passive: !0 }), e.addEventListener("focus", G, { passive: !0 }), e.addEventListener("blur", L, { passive: !0 }), e.addEventListener("pointerdown", H, { passive: !0 }), e.addEventListener("contextmenu", H, { passive: !0 }), J = () => {
|
|
107
120
|
e.removeEventListener("mouseenter", z), e.removeEventListener("mouseleave", R), e.removeEventListener("focus", G), e.removeEventListener("blur", L), e.removeEventListener("pointerdown", H), e.removeEventListener("contextmenu", H);
|
|
108
121
|
});
|
|
109
122
|
}, { immediate: !0 });
|
|
110
|
-
let
|
|
111
|
-
|
|
112
|
-
|
|
123
|
+
let Y = null;
|
|
124
|
+
x(k, (e) => {
|
|
125
|
+
Y &&= (Y(), null), e && (e.addEventListener("mouseenter", I, { passive: !0 }), e.addEventListener("mouseleave", R, { passive: !0 }), Y = () => {
|
|
113
126
|
e.removeEventListener("mouseenter", I), e.removeEventListener("mouseleave", R);
|
|
114
127
|
});
|
|
115
128
|
}, { immediate: !0 });
|
|
116
|
-
let
|
|
117
|
-
let n = (e.getAttribute("aria-describedby") ?? "").split(/\s+/).filter((e) => e && !
|
|
129
|
+
let Oe = /* @__PURE__ */ new Set([C, w]), X = null, Z = (e, t) => {
|
|
130
|
+
let n = (e.getAttribute("aria-describedby") ?? "").split(/\s+/).filter((e) => e && !Oe.has(e));
|
|
118
131
|
t && n.push(t), n.length ? e.setAttribute("aria-describedby", n.join(" ")) : e.removeAttribute("aria-describedby");
|
|
119
|
-
},
|
|
132
|
+
}, ke = () => {
|
|
120
133
|
let e = O.value ?? null;
|
|
121
|
-
|
|
134
|
+
X && X !== e && Z(X, null), X = e, e && (D.value ? Z(e, w) : Z(e, A.value ? C : null));
|
|
122
135
|
};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}),
|
|
136
|
+
h(() => {
|
|
137
|
+
ke(), E.value = !0;
|
|
138
|
+
}), x([
|
|
126
139
|
O,
|
|
127
140
|
A,
|
|
128
141
|
D
|
|
129
|
-
],
|
|
130
|
-
|
|
142
|
+
], ke, { flush: "post" }), he(() => {
|
|
143
|
+
J?.(), Y?.(), X &&= (Z(X, null), null), L(), K && (K = !1, a(!1)), r(U), document.removeEventListener("keydown", W, { capture: !0 });
|
|
131
144
|
});
|
|
132
|
-
let
|
|
133
|
-
if (typeof
|
|
134
|
-
let e =
|
|
145
|
+
let Ae = /^-?\d*\.?\d+$/, je = /^(-?\d*\.?\d+)%$/, Q = l(() => {
|
|
146
|
+
if (typeof f.width != "string") return;
|
|
147
|
+
let e = f.width.trim().match(je);
|
|
135
148
|
return e ? parseFloat(e[1]) : void 0;
|
|
136
|
-
}), { width: $ } =
|
|
149
|
+
}), { width: $ } = xe(l(() => se(Q.value == null ? void 0 : O.value)), {
|
|
137
150
|
width: 0,
|
|
138
151
|
height: 0
|
|
139
|
-
}, { box: "border-box" }),
|
|
140
|
-
if (
|
|
152
|
+
}, { box: "border-box" }), Me = l(() => {
|
|
153
|
+
if (f.width == null || f.width === "") return;
|
|
141
154
|
if (Q.value != null) return $.value ? `${$.value * (Q.value / 100)}px` : void 0;
|
|
142
|
-
if (typeof
|
|
143
|
-
let e =
|
|
144
|
-
return
|
|
155
|
+
if (typeof f.width == "number") return Number.isFinite(f.width) ? `${f.width}px` : void 0;
|
|
156
|
+
let e = f.width.trim();
|
|
157
|
+
return Ae.test(e) ? `${e}px` : e;
|
|
145
158
|
});
|
|
146
|
-
return
|
|
147
|
-
D.value ? (
|
|
159
|
+
return ge(L), (e, t) => (g(), d(ue, null, [
|
|
160
|
+
D.value ? (g(), d("span", {
|
|
148
161
|
key: 0,
|
|
149
162
|
id: w,
|
|
150
163
|
hidden: ""
|
|
151
|
-
},
|
|
152
|
-
|
|
164
|
+
}, y(D.value), 1)) : u("", !0),
|
|
165
|
+
Ce.value ? u("", !0) : v(e.$slots, "activator", me(m({ key: 1 }, {
|
|
153
166
|
props: { ref: N },
|
|
154
167
|
disabled: e.disabled,
|
|
155
|
-
open:
|
|
168
|
+
open: s.value,
|
|
156
169
|
placement: e.placement
|
|
157
170
|
}))),
|
|
158
|
-
|
|
171
|
+
b(Te) ? (g(), de(ce, m({
|
|
159
172
|
key: 2,
|
|
160
173
|
ref: "popover",
|
|
161
174
|
modelValue: M.value,
|
|
162
175
|
"onUpdate:modelValue": t[0] ||= (e) => M.value = e,
|
|
163
176
|
anchor: O.value,
|
|
177
|
+
"aria-hidden": "true",
|
|
164
178
|
"arrow-padding": e.arrowPadding,
|
|
165
179
|
boundary: e.boundary,
|
|
166
180
|
class: ["bb-tooltip", { [`bb-tooltip--${e.variant}`]: !0 }],
|
|
@@ -171,13 +185,13 @@ var x = /*@__PURE__*/ f({
|
|
|
171
185
|
role: "none",
|
|
172
186
|
tag: "span",
|
|
173
187
|
"transition-duration": e.transitionDuration
|
|
174
|
-
}, m(e.$attrs,
|
|
175
|
-
default:
|
|
188
|
+
}, m(e.$attrs, b(S).root), { onVnodeMounted: Ee }), {
|
|
189
|
+
default: be(() => [fe("span", m({
|
|
176
190
|
id: C,
|
|
177
191
|
class: "bb-tooltip__panel",
|
|
178
192
|
role: "tooltip",
|
|
179
|
-
style: { "--max-w":
|
|
180
|
-
},
|
|
193
|
+
style: { "--max-w": Me.value }
|
|
194
|
+
}, b(S).panel), [v(e.$slots, "default", {}, () => [pe(y(e.text), 1)])], 16)]),
|
|
181
195
|
_: 3
|
|
182
196
|
}, 16, [
|
|
183
197
|
"modelValue",
|
|
@@ -195,4 +209,4 @@ var x = /*@__PURE__*/ f({
|
|
|
195
209
|
}
|
|
196
210
|
});
|
|
197
211
|
//#endregion
|
|
198
|
-
export {
|
|
212
|
+
export { S as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TooltipVariantType } from '../../types/TooltipVariant';
|
|
2
|
-
import { PtMap, PtValue } from '../../types/passthrough';
|
|
3
|
-
import {
|
|
1
|
+
import { TooltipVariantBuiltIn, TooltipVariantRegistry, TooltipVariantType } from '../../types/TooltipVariant';
|
|
2
|
+
import { PtMap, PtValue, PtVariantAttrs } from '../../types/passthrough';
|
|
3
|
+
import { ElementOrComponentRefOrSelector } from '../../types/CommonProps';
|
|
4
4
|
import { Placement } from '../../types/Placement';
|
|
5
5
|
/**
|
|
6
6
|
* Tooltip variant. Registered variants (vite plugin `tooltipVariants` option)
|
|
@@ -26,15 +26,19 @@ export type BbTooltipPtState = 'open';
|
|
|
26
26
|
export declare const BB_TOOLTIP_PT: {
|
|
27
27
|
readonly parts: readonly ["root", "panel"];
|
|
28
28
|
readonly states: readonly ["open"];
|
|
29
|
+
readonly variant: {
|
|
30
|
+
readonly names: readonly ["default", "destructive"];
|
|
31
|
+
readonly option: "tooltipVariants";
|
|
32
|
+
};
|
|
29
33
|
};
|
|
30
34
|
export type BbTooltipProps = {
|
|
31
|
-
[K in `pt:${BbTooltipPtPart}` | `pt:${BbTooltipPtPart}:${BbTooltipPtState}`]?: PtValue;
|
|
32
|
-
} & {
|
|
35
|
+
[K in `pt:${BbTooltipPtPart}` | `pt:${BbTooltipPtPart}:${BbTooltipPtState}` | `pt:${BbTooltipPtPart}:${TooltipVariantBuiltIn}`]?: PtValue;
|
|
36
|
+
} & /* @vue-ignore */ PtVariantAttrs<BbTooltipPtPart, keyof TooltipVariantRegistry> & {
|
|
33
37
|
/**
|
|
34
38
|
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
35
39
|
* without the prefix. See the `pt:<part>` row.
|
|
36
40
|
*/
|
|
37
|
-
pt?: PtMap<BbTooltipPtPart, BbTooltipPtState>;
|
|
41
|
+
pt?: PtMap<BbTooltipPtPart, BbTooltipPtState | TooltipVariantBuiltIn | keyof TooltipVariantRegistry>;
|
|
38
42
|
/**
|
|
39
43
|
* Space the arrow will maintain to the edge of the tooltip bubble.
|
|
40
44
|
* Useful when the floating element has border radius so it won't appear broken
|
|
@@ -91,11 +95,12 @@ export type BbTooltipProps = {
|
|
|
91
95
|
*/
|
|
92
96
|
transitionDuration?: number;
|
|
93
97
|
/**
|
|
94
|
-
* External activator
|
|
98
|
+
* External activator: an HTMLElement, a Vue component ref, or a CSS
|
|
99
|
+
* selector string (looked up in the document once the tooltip mounts).
|
|
95
100
|
* When provided, the activator slot is not rendered and event listeners
|
|
96
101
|
* are attached programmatically to the referenced element.
|
|
97
102
|
*/
|
|
98
|
-
activator?:
|
|
103
|
+
activator?: ElementOrComponentRefOrSelector;
|
|
99
104
|
/**
|
|
100
105
|
* Constrains the tooltip within a bounding element: it stays inside it
|
|
101
106
|
* alongside its trigger (sideways for a tooltip above or below); away from
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { TOOLTIP_VARIANTS as e } from "../../types/TooltipVariant.js";
|
|
1
2
|
//#region src/components/BbTooltip/types.ts
|
|
2
|
-
var
|
|
3
|
+
var t = {
|
|
3
4
|
parts: ["root", "panel"],
|
|
4
|
-
states: ["open"]
|
|
5
|
+
states: ["open"],
|
|
6
|
+
variant: {
|
|
7
|
+
names: e,
|
|
8
|
+
option: "tooltipVariants"
|
|
9
|
+
}
|
|
5
10
|
};
|
|
6
11
|
//#endregion
|
|
7
|
-
export {
|
|
12
|
+
export { t as BB_TOOLTIP_PT };
|
|
@@ -3,9 +3,9 @@ import { CommonFieldProps, CommonFieldSlots } from './types';
|
|
|
3
3
|
type __VLS_Slots = CommonFieldSlots;
|
|
4
4
|
declare const __VLS_base: import('vue').DefineComponent<CommonFieldProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CommonFieldProps> & Readonly<{}>, {
|
|
5
5
|
reverse: boolean;
|
|
6
|
+
tag: import('../../types/CommonProps').ContainerTag;
|
|
6
7
|
layout: import('../../types/ResponsiveSize').Responsive<FieldLayout>;
|
|
7
8
|
labelPosition: "left" | "center" | "right";
|
|
8
|
-
tag: import('../../types/CommonProps').ContainerTag;
|
|
9
9
|
labelTag: import('../../types/CommonProps').LabelTag;
|
|
10
10
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -27,9 +27,9 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
|
|
|
27
27
|
onHide?: (() => any) | undefined;
|
|
28
28
|
onHidden?: (() => any) | undefined;
|
|
29
29
|
}>, {
|
|
30
|
+
tag: import('../../types/CommonProps').PopoverTag;
|
|
30
31
|
padding: number;
|
|
31
32
|
transitionDuration: number;
|
|
32
|
-
tag: import('../../types/CommonProps').PopoverTag;
|
|
33
33
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
|
@@ -5,10 +5,10 @@ import { waitFor as r } from "../../utilities/functions/waitFor.js";
|
|
|
5
5
|
import { transitions as i } from "../../utilities/misc/transitions.js";
|
|
6
6
|
import { overlaySurfaceIsolation as a } from "../../utils/overlaySurfaceIsolation.js";
|
|
7
7
|
import { providePopoverSubmitBoundary as ee } from "../../composables/formSubmitLock.js";
|
|
8
|
-
import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as te, defineComponent as l, mergeModels as u, mergeProps as d, nextTick as f, onBeforeUnmount as p, onMounted as m, openBlock as h, ref as g, renderSlot as _, resolveDynamicComponent as v, toHandlers as y, unref as b, useModel as
|
|
9
|
-
import { arrow as
|
|
8
|
+
import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as te, defineComponent as l, mergeModels as u, mergeProps as d, nextTick as f, onBeforeUnmount as p, onMounted as m, openBlock as h, ref as g, renderSlot as _, resolveDynamicComponent as v, toHandlers as y, unref as b, useModel as ne, watch as x, withCtx as S, withModifiers as C } from "vue";
|
|
9
|
+
import { arrow as w, autoUpdate as T, flip as E, hide as D, offset as O, shift as k, size as re, useFloating as ie } from "@floating-ui/vue";
|
|
10
10
|
//#region src/components/CommonPopover/CommonPopover.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var
|
|
11
|
+
var A = /*@__PURE__*/ l({
|
|
12
12
|
__name: "CommonPopover",
|
|
13
13
|
props: /*@__PURE__*/ u({
|
|
14
14
|
arrowPadding: {},
|
|
@@ -40,95 +40,95 @@ var j = /*@__PURE__*/ l({
|
|
|
40
40
|
"hidden"
|
|
41
41
|
], ["update:modelValue"]),
|
|
42
42
|
setup(i, { emit: l }) {
|
|
43
|
-
let u =
|
|
43
|
+
let u = ne(i, "modelValue"), A = i, j = l;
|
|
44
44
|
ee();
|
|
45
|
-
let
|
|
46
|
-
let e =
|
|
45
|
+
let M = g(u.value), N = o(() => A.dialog ? "dialog" : A.tag), P = g(), F = g(), I = o(() => {
|
|
46
|
+
let e = A.anchor;
|
|
47
47
|
return e && typeof e == "object" && "getBoundingClientRect" in e && !(e instanceof Element) ? e : n(e);
|
|
48
|
-
}),
|
|
48
|
+
}), L = e(u, { initialValue: A.eager }), R = (e) => {
|
|
49
49
|
if (e) return typeof e == "string" ? document.querySelector(e) ?? void 0 : n(e) ?? void 0;
|
|
50
|
-
},
|
|
51
|
-
availableWidth:
|
|
52
|
-
availableHeight:
|
|
53
|
-
}) :
|
|
54
|
-
let e =
|
|
50
|
+
}, z = o(() => R(A.boundary)), B = o(() => R(A.overflowBoundary)), V = g(), H = g(), U = o(() => typeof A.bubbleAttrs == "function" ? A.bubbleAttrs({
|
|
51
|
+
availableWidth: V.value,
|
|
52
|
+
availableHeight: H.value
|
|
53
|
+
}) : A.bubbleAttrs), W = o(() => {
|
|
54
|
+
let e = z.value, t = B.value;
|
|
55
55
|
return [
|
|
56
|
-
...
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
padding:
|
|
56
|
+
...A.disableFlip ? [] : [E()],
|
|
57
|
+
O(A.offset),
|
|
58
|
+
k({
|
|
59
|
+
padding: A.padding,
|
|
60
60
|
...e ? { boundary: e } : {}
|
|
61
61
|
}),
|
|
62
|
-
|
|
63
|
-
padding:
|
|
62
|
+
re({
|
|
63
|
+
padding: A.padding,
|
|
64
64
|
...t ? { boundary: t } : {},
|
|
65
65
|
apply({ availableWidth: e, availableHeight: t }) {
|
|
66
|
-
|
|
66
|
+
V.value = Math.max(0, Math.floor(e)), H.value = Math.max(0, Math.floor(t));
|
|
67
67
|
}
|
|
68
68
|
}),
|
|
69
|
-
|
|
70
|
-
...
|
|
71
|
-
element:
|
|
72
|
-
padding:
|
|
69
|
+
D(),
|
|
70
|
+
...A.hideArrow ? [] : [w({
|
|
71
|
+
element: F,
|
|
72
|
+
padding: A.arrowPadding
|
|
73
73
|
})]
|
|
74
74
|
];
|
|
75
|
-
}), { floatingStyles: K, placement: q, middlewareData: J, update: Y } =
|
|
76
|
-
placement:
|
|
77
|
-
middleware:
|
|
75
|
+
}), G = g(A.placement), { floatingStyles: K, placement: q, middlewareData: J, update: Y } = ie(I, P, {
|
|
76
|
+
placement: G,
|
|
77
|
+
middleware: W,
|
|
78
78
|
strategy: "fixed",
|
|
79
79
|
whileElementsMounted: () => () => {}
|
|
80
80
|
}), X = null;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
() =>
|
|
81
|
+
x([
|
|
82
|
+
M,
|
|
83
|
+
I,
|
|
84
|
+
P,
|
|
85
|
+
() => A.forceAutoUpdate
|
|
86
86
|
], ([e, t, n, r]) => {
|
|
87
|
-
X?.(), X = null, (e || r) && t && n && (X =
|
|
87
|
+
X?.(), X = null, (e || r) && t && n && (X = T(t, n, Y));
|
|
88
88
|
}, { immediate: !0 }), p(() => {
|
|
89
|
-
X?.(), X = null,
|
|
89
|
+
X?.(), X = null, oe();
|
|
90
90
|
});
|
|
91
|
-
let { execute:
|
|
91
|
+
let { execute: ae, cancel: oe } = t(({ signal: e }, t) => new Promise((n) => {
|
|
92
92
|
let i, a = () => {
|
|
93
93
|
i && clearTimeout(i);
|
|
94
94
|
};
|
|
95
|
-
e.addEventListener("abort", a), t ? (
|
|
96
|
-
e.aborted || (
|
|
97
|
-
e.removeEventListener("abort", a),
|
|
98
|
-
},
|
|
99
|
-
})) : (
|
|
95
|
+
e.addEventListener("abort", a), t ? (j("show"), G.value = A.placement, se(), Y(), r(() => !!P.value, { signal: e }).then(() => {
|
|
96
|
+
e.aborted || (M.value = !0, i = setTimeout(() => {
|
|
97
|
+
e.removeEventListener("abort", a), j("shown"), n(void 0);
|
|
98
|
+
}, A.transitionDuration));
|
|
99
|
+
})) : (j("hide"), M.value = !1, i = setTimeout(() => {
|
|
100
100
|
f(() => {
|
|
101
|
-
|
|
101
|
+
ce(), e.removeEventListener("abort", a), Y(), j("hidden"), n(void 0);
|
|
102
102
|
});
|
|
103
|
-
},
|
|
103
|
+
}, A.transitionDuration));
|
|
104
104
|
})), Z = () => {
|
|
105
|
-
let e =
|
|
106
|
-
return e ?
|
|
107
|
-
}, oe = () => {
|
|
108
|
-
let e = F.value;
|
|
109
|
-
!e || Z() || (j.dialog ? e.showModal() : e.showPopover());
|
|
105
|
+
let e = P.value;
|
|
106
|
+
return e ? A.dialog ? e.open : e.matches(":popover-open") : !1;
|
|
110
107
|
}, se = () => {
|
|
111
|
-
let e =
|
|
112
|
-
!e ||
|
|
113
|
-
},
|
|
108
|
+
let e = P.value;
|
|
109
|
+
!e || Z() || (A.dialog ? e.showModal() : e.showPopover());
|
|
110
|
+
}, ce = () => {
|
|
111
|
+
let e = P.value;
|
|
112
|
+
!e || !Z() || (A.dialog ? e.close() : e.hidePopover());
|
|
113
|
+
}, Q = (e) => ae(e).catch((e) => {
|
|
114
114
|
if (!(e instanceof Error && (e.message === "Operation was cancelled" || e.name === "AbortError"))) throw e;
|
|
115
115
|
});
|
|
116
|
-
|
|
116
|
+
x(u, Q), m(() => {
|
|
117
117
|
u.value && Q(u.value);
|
|
118
118
|
});
|
|
119
|
-
let
|
|
120
|
-
let e = u.value ? void 0 : -1, t = J.value.arrow?.x, n =
|
|
119
|
+
let le = o(() => {
|
|
120
|
+
let e = u.value ? void 0 : -1, t = J.value.arrow?.x, n = A.hideArrow || t == null ? "50%" : `${Math.round(t)}px`, r = A.dialog ? void 0 : "manual";
|
|
121
121
|
return {
|
|
122
122
|
style: {
|
|
123
123
|
...K.value,
|
|
124
|
-
"--transition-duration": `${
|
|
125
|
-
"--page-padding": `${
|
|
124
|
+
"--transition-duration": `${A.transitionDuration}ms`,
|
|
125
|
+
"--page-padding": `${A.padding}px`,
|
|
126
126
|
"--arrow-offset-x": n
|
|
127
127
|
},
|
|
128
128
|
popover: r,
|
|
129
129
|
tabindex: e
|
|
130
130
|
};
|
|
131
|
-
}),
|
|
131
|
+
}), ue = o(() => {
|
|
132
132
|
if (J.value.arrow) {
|
|
133
133
|
let { x: e, y: t } = J.value.arrow;
|
|
134
134
|
return { style: {
|
|
@@ -139,31 +139,31 @@ var j = /*@__PURE__*/ l({
|
|
|
139
139
|
}), $ = () => {
|
|
140
140
|
u.value = !1;
|
|
141
141
|
};
|
|
142
|
-
return (e, t) => (h(), s(v(
|
|
142
|
+
return (e, t) => (h(), s(v(N.value), d({
|
|
143
143
|
ref_key: "wrapper",
|
|
144
|
-
ref:
|
|
144
|
+
ref: P,
|
|
145
145
|
class: ["bb-common-popover", {
|
|
146
|
-
"bb-common-popover--open":
|
|
146
|
+
"bb-common-popover--open": M.value,
|
|
147
147
|
"bb-common-popover--no-arrow": e.hideArrow,
|
|
148
148
|
[`bb-common-popover--${b(q)}`]: !0
|
|
149
149
|
}]
|
|
150
|
-
},
|
|
151
|
-
onClick:
|
|
150
|
+
}, le.value, y(b(a)), {
|
|
151
|
+
onClick: C($, ["self"]),
|
|
152
152
|
onClose: $,
|
|
153
|
-
onContextmenu:
|
|
153
|
+
onContextmenu: C($, ["self", "prevent"])
|
|
154
154
|
}), {
|
|
155
|
-
default:
|
|
155
|
+
default: S(() => [e.hideArrow ? c("", !0) : (h(), te("span", d({
|
|
156
156
|
key: 0,
|
|
157
157
|
ref_key: "bubblearrow",
|
|
158
|
-
ref:
|
|
158
|
+
ref: F,
|
|
159
159
|
class: "bb-common-popover__arrow"
|
|
160
|
-
},
|
|
160
|
+
}, ue.value), null, 16)), b(L) ? (h(), s(v(A.tag), d({
|
|
161
161
|
key: 1,
|
|
162
162
|
class: "bb-common-popover__bubble"
|
|
163
|
-
},
|
|
164
|
-
default:
|
|
165
|
-
availableHeight:
|
|
166
|
-
availableWidth:
|
|
163
|
+
}, U.value), {
|
|
164
|
+
default: S(() => [_(e.$slots, "default", {
|
|
165
|
+
availableHeight: H.value,
|
|
166
|
+
availableWidth: V.value
|
|
167
167
|
})]),
|
|
168
168
|
_: 3
|
|
169
169
|
}, 16)) : c("", !0)]),
|
|
@@ -172,4 +172,4 @@ var j = /*@__PURE__*/ l({
|
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
174
|
//#endregion
|
|
175
|
-
export {
|
|
175
|
+
export { A as default };
|