bitboss-ui 3.0.0-beta.63 → 3.0.0-beta.65
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 +494 -6
- package/dist/ai/components.json +50 -48
- package/dist/ai/composables/useBbConfig.md +8 -1
- 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 +1183 -301
- 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 +211 -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 +149 -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 +151 -62
- package/dist/ai/helpers/inertia/messages.ts +33 -0
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +120 -20
- package/dist/ai/helpers/inertia/useHasChanged.ts +34 -16
- package/dist/ai/helpers/inertia/useLazyProp.ts +102 -36
- package/dist/ai/helpers/inertia/useLazyPropGetter.ts +3 -1
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +154 -34
- package/dist/ai/helpers/inertia/usePromiseForm.ts +121 -14
- package/dist/ai/helpers/inertia/useQuery.ts +133 -11
- package/dist/ai/helpers/inertia/useQueryObject.ts +74 -67
- package/dist/ai/helpers/inertia/useResourceContext.ts +60 -14
- package/dist/ai/helpers/inertia/useRouteQuery.ts +38 -27
- package/dist/ai/helpers/inertia/useScreenSizes.ts +9 -7
- package/dist/ai/helpers/inertia/useTableContext.ts +5 -2
- package/dist/ai/helpers/inertia/utils.ts +14 -0
- 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/approvals-inbox.md +1 -1
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/layout-scaffold.md +19 -6
- package/dist/ai/recipes/inertia/ownership-atlas.md +1 -1
- package/dist/ai/recipes/inertia/records-workspace.md +50 -14
- package/dist/ai/recipes/inertia/upload-center.md +1 -1
- 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 +153 -34
- 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 +600 -577
- 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/useBbConfig.d.ts +1 -0
- package/dist/composables/useBbConfig.js +11 -7
- 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 +3467 -801
- 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 +5 -4
- 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/helpers-add.mjs +26 -2
- 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,63 +1,64 @@
|
|
|
1
1
|
import { useConfig as e } from "../../composables/useConfig.js";
|
|
2
2
|
import { useId as t } from "../../composables/useId.js";
|
|
3
3
|
import { slotKey as n } from "../../utilities/functions/slotKey.js";
|
|
4
|
-
import {
|
|
4
|
+
import { extractHtmlContainer as r } from "../../utilities/functions/extractDomContainer.js";
|
|
5
5
|
import i from "../CommonPopover/CommonPopover.vue.js";
|
|
6
6
|
import { useSheetSurface as a } from "../../composables/useSheetSurface.js";
|
|
7
|
-
import { focusQuietly as
|
|
8
|
-
import { BB_BASE_BUTTON_PROP_KEYS as
|
|
9
|
-
import { useLocale as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { isImeComposing as
|
|
15
|
-
import { matchAnyKey as
|
|
16
|
-
import
|
|
17
|
-
import { useImeDismissBlur as
|
|
18
|
-
import { isPrintableTypeaheadKey as
|
|
19
|
-
import { levelHasSearch as
|
|
7
|
+
import { focusQuietly as o, focusVisibly as ee } from "../../utils/focusVisibility.js";
|
|
8
|
+
import { BB_BASE_BUTTON_PROP_KEYS as te } from "../BbBaseButton/types.js";
|
|
9
|
+
import { useLocale as ne } from "../../composables/useLocale.js";
|
|
10
|
+
import s from "../BbIcon/BbIcon.vue.js";
|
|
11
|
+
import re from "../BbBadge/BbBadge.vue.js";
|
|
12
|
+
import ie from "../ErrorIcon/ErrorIcon.vue.js";
|
|
13
|
+
import ae from "./DropdownRow.vue.js";
|
|
14
|
+
import { isImeComposing as oe } from "../../utilities/functions/isImeComposing.js";
|
|
15
|
+
import { matchAnyKey as se } from "../../utilities/functions/matchAnyKey.js";
|
|
16
|
+
import ce from "../../assets/svgs/search.svg_raw.js";
|
|
17
|
+
import { useImeDismissBlur as le } from "../../composables/useImeDismissBlur.js";
|
|
18
|
+
import { isPrintableTypeaheadKey as ue, normalizeSearchToken as de, useTypeahead as fe } from "../../composables/useTypeahead.js";
|
|
19
|
+
import { levelHasSearch as pe, normalizeGroups as me, sectionTitle as he } from "./normalizeGroups.js";
|
|
20
20
|
import { useDropdownContext as ge } from "./useDropdownContext.js";
|
|
21
21
|
import _e from "./BbDropdownList.vue.js";
|
|
22
|
-
import { Fragment as
|
|
22
|
+
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as ve, createVNode as m, defineComponent as ye, h as be, mergeProps as h, nextTick as xe, normalizeClass as Se, normalizeStyle as Ce, onBeforeUnmount as we, onMounted as Te, onUpdated as Ee, openBlock as g, ref as _, renderList as v, resolveDynamicComponent as y, toDisplayString as b, unref as x, watch as S, watchEffect as De, withCtx as Oe, withKeys as ke, withModifiers as Ae } from "vue";
|
|
23
23
|
//#region src/components/BbDropdown/BbDropdownList.vue?vue&type=script&setup=true&lang.ts
|
|
24
|
-
var
|
|
24
|
+
var je = {
|
|
25
25
|
key: 0,
|
|
26
26
|
"aria-hidden": "true",
|
|
27
27
|
class: "bb-dropdown__divider"
|
|
28
|
-
},
|
|
28
|
+
}, Me = [
|
|
29
29
|
"id",
|
|
30
30
|
"role",
|
|
31
31
|
"tabindex",
|
|
32
32
|
"onClick",
|
|
33
33
|
"onKeydown"
|
|
34
|
-
],
|
|
34
|
+
], Ne = {
|
|
35
35
|
key: 4,
|
|
36
36
|
class: "group-title__content"
|
|
37
|
-
},
|
|
37
|
+
}, Pe = {
|
|
38
38
|
key: 2,
|
|
39
39
|
class: "bb-dropdown__sheet-selection"
|
|
40
|
-
},
|
|
40
|
+
}, Fe = { class: "bb-dropdown__sheet-chips" }, Ie = {
|
|
41
41
|
key: 3,
|
|
42
42
|
class: "bb-dropdown__group-search",
|
|
43
43
|
role: "none"
|
|
44
|
-
},
|
|
44
|
+
}, Le = [
|
|
45
45
|
"aria-label",
|
|
46
46
|
"placeholder",
|
|
47
47
|
"value",
|
|
48
48
|
"onInput"
|
|
49
|
-
],
|
|
49
|
+
], Re = {
|
|
50
50
|
key: 0,
|
|
51
51
|
"aria-hidden": "true",
|
|
52
52
|
class: "bb-dropdown__group-loading"
|
|
53
|
-
},
|
|
53
|
+
}, ze = ["aria-labelledby", "role"], Be = ["id"], Ve = { class: "group-title__content" }, He = { class: "item__content" }, Ue = [
|
|
54
54
|
"id",
|
|
55
55
|
"aria-label",
|
|
56
56
|
"data-bb-dropdown-surface",
|
|
57
57
|
"inert",
|
|
58
58
|
"role",
|
|
59
|
+
"onKeydown",
|
|
59
60
|
"onPointerleave"
|
|
60
|
-
],
|
|
61
|
+
], We = 289, Ge = 160, Ke = 100, qe = 120, Je = /*@__PURE__*/ ye({
|
|
61
62
|
__name: "BbDropdownList",
|
|
62
63
|
props: {
|
|
63
64
|
groups: {},
|
|
@@ -67,20 +68,20 @@ var Oe = {
|
|
|
67
68
|
slotDepth: {}
|
|
68
69
|
},
|
|
69
70
|
emits: ["close-level"],
|
|
70
|
-
setup(ye, { expose:
|
|
71
|
-
let C = ye,
|
|
71
|
+
setup(ye, { expose: Je, emit: Ye }) {
|
|
72
|
+
let C = ye, Xe = Ye, Ze = l(() => C.slotDepth ?? C.level), w = ge(), { inSheet: T } = a(), { t: Qe } = ne(), $e = Qe("select.searchLabel"), et = Qe("common.emptyText"), tt = (e, t, n) => {
|
|
72
73
|
if (e.placeholder || n === !1) return !0;
|
|
73
74
|
let r = n && n.length ? n : e.description == null ? ["label"] : ["label", "description"];
|
|
74
75
|
try {
|
|
75
|
-
return
|
|
76
|
+
return se(e, r, t);
|
|
76
77
|
} catch {
|
|
77
78
|
return !1;
|
|
78
79
|
}
|
|
79
|
-
}, E =
|
|
80
|
+
}, E = l(() => C.groups.map((e) => ot(nt(e)))), nt = (e) => {
|
|
80
81
|
if (!e.searchable || !e.id || w.isPipelineGroup(e.id)) return e;
|
|
81
82
|
let t = w.queryFor(e.id).trim();
|
|
82
83
|
if (!t) return e;
|
|
83
|
-
let n = e.items.filter((n) =>
|
|
84
|
+
let n = e.items.filter((n) => tt(n, t, e.filterBy));
|
|
84
85
|
return n.length ? {
|
|
85
86
|
...e,
|
|
86
87
|
items: n
|
|
@@ -90,143 +91,201 @@ var Oe = {
|
|
|
90
91
|
rowKey: "__bb-dropdown:no-results__",
|
|
91
92
|
domKey: "no-results",
|
|
92
93
|
placeholder: "empty",
|
|
93
|
-
label: w.emptyText.value ??
|
|
94
|
+
label: w.emptyText.value ?? et.value,
|
|
94
95
|
disabled: !0
|
|
95
96
|
}]
|
|
96
97
|
};
|
|
97
|
-
})
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
}, rt = (e, t) => {
|
|
99
|
+
if (!t.placeholder) return "section" in t ? t.section : he(e.groupBy, t);
|
|
100
|
+
}, it = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), ot = (e) => {
|
|
101
|
+
if (e.groupBy == null) return e;
|
|
102
|
+
let t = at.get(e.items);
|
|
103
|
+
if (!t) {
|
|
104
|
+
let n = /* @__PURE__ */ new Map();
|
|
105
|
+
for (let t of e.items) {
|
|
106
|
+
let r = rt(e, t), i = r === void 0 ? "" : `section:${r}`, a = n.get(i);
|
|
107
|
+
a || n.set(i, a = {
|
|
108
|
+
title: r,
|
|
109
|
+
items: []
|
|
110
|
+
}), a.items.push(t);
|
|
111
|
+
}
|
|
112
|
+
let r = n.get("");
|
|
113
|
+
n.delete("");
|
|
114
|
+
let i = r ? [["", r], ...n] : n, a = [];
|
|
115
|
+
t = [];
|
|
116
|
+
for (let [e, n] of i) a.push({
|
|
117
|
+
key: e,
|
|
118
|
+
title: n.title,
|
|
119
|
+
start: t.length,
|
|
120
|
+
items: n.items
|
|
121
|
+
}), t.push(...n.items);
|
|
122
|
+
at.set(e.items, t), it.set(t, a);
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
...e,
|
|
126
|
+
items: t
|
|
127
|
+
};
|
|
128
|
+
}, st = (e) => it.get(e.items) ?? [{
|
|
129
|
+
key: "",
|
|
130
|
+
start: 0,
|
|
131
|
+
items: e.items
|
|
132
|
+
}], D = (e, { slots: t, attrs: n }) => e.titled ? be("div", n, t.default?.()) : t.default?.();
|
|
133
|
+
D.props = ["titled"], D.inheritAttrs = !1;
|
|
134
|
+
let ct = l(() => {
|
|
135
|
+
if (C.level === 0) for (let [e, t] of E.value.entries()) {
|
|
136
|
+
let n = t.items.find((e) => e.placeholder);
|
|
137
|
+
if (n) return {
|
|
138
|
+
gi: e,
|
|
139
|
+
item: n
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}), O = {}, lt = (e, t) => {
|
|
143
|
+
t instanceof HTMLElement ? O[e] = t : delete O[e];
|
|
144
|
+
}, ut, k = C.level !== 0 || typeof MutationObserver > "u" ? void 0 : new MutationObserver(() => A()), A = () => {
|
|
145
|
+
let e = ct.value, t = e ? O[e.gi] : void 0;
|
|
146
|
+
if (t !== ut && (k?.disconnect(), ut = t, t && k?.observe(t, {
|
|
147
|
+
characterData: !0,
|
|
148
|
+
childList: !0,
|
|
149
|
+
subtree: !0
|
|
150
|
+
})), C.level !== 0) return;
|
|
151
|
+
let n = t && e && N(e.item) ? t.textContent?.replace(/\s+/g, " ").trim() : void 0;
|
|
152
|
+
w.setStatus(n || e?.item.label);
|
|
153
|
+
};
|
|
154
|
+
Te(A), Ee(A), S(ct, A, { flush: "post" }), we(() => k?.disconnect()), De(() => {
|
|
103
155
|
for (let e of C.groups) e.id && w.isPipelineGroup(e.id) && w.activateGroup(e.id);
|
|
104
156
|
});
|
|
105
|
-
let
|
|
157
|
+
let j = _({}), dt = (e, t) => {
|
|
106
158
|
let n = r(t);
|
|
107
|
-
n instanceof HTMLInputElement ?
|
|
108
|
-
},
|
|
159
|
+
n instanceof HTMLInputElement ? j.value[e] = n : delete j.value[e];
|
|
160
|
+
}, ft = l(() => E.value.find((e) => e.searchable && e.id)?.id), pt = (e) => {
|
|
109
161
|
if (T.value) return;
|
|
110
|
-
let t = e.maxHeight ?? (e.searchable ?
|
|
162
|
+
let t = e.maxHeight ?? (e.searchable ? We : void 0);
|
|
111
163
|
if (!(t == null || t === 0 || t === "none")) return typeof t == "number" ? `${t}px` : t;
|
|
112
|
-
},
|
|
164
|
+
}, mt = (e) => me(e).map((e) => e.selectable ? {
|
|
113
165
|
...e,
|
|
114
166
|
selected: w.selectedFor(e.id ?? "")
|
|
115
|
-
} : e),
|
|
116
|
-
let t =
|
|
117
|
-
return t === void 0 &&
|
|
118
|
-
},
|
|
167
|
+
} : e), ht = /* @__PURE__ */ new WeakMap(), gt = (e) => {
|
|
168
|
+
let t = ht.get(e);
|
|
169
|
+
return t === void 0 && ht.set(e, t = _t(e)), t;
|
|
170
|
+
}, _t = (e) => {
|
|
119
171
|
if (e.slotKey) return n(e.slotKey);
|
|
120
172
|
if (e.keyless) return null;
|
|
121
173
|
let t = e.value;
|
|
122
174
|
return typeof t == "number" ? n(String(t)) : typeof t == "string" && t !== "" ? n(t) : null;
|
|
123
|
-
},
|
|
124
|
-
let n =
|
|
175
|
+
}, vt = (e, t) => {
|
|
176
|
+
let n = gt(e);
|
|
125
177
|
if (n !== null) return w.slots[t ? `${n}:${t}` : n];
|
|
126
|
-
},
|
|
178
|
+
}, yt = (e, t, n) => vt(t, n) ?? bt(e, n), bt = (e, t) => {
|
|
127
179
|
if (!e.id) return;
|
|
128
180
|
let r = `${n(e.id)}:item`;
|
|
129
181
|
return w.slots[t ? `${r}:${t}` : r];
|
|
130
|
-
},
|
|
182
|
+
}, xt = (e) => e.variant && e.variant !== "default" ? `bb-dropdown__item--variant-${e.variant}` : void 0, St = (e) => e.variant && e.variant !== "default" ? `bb-dropdown__group-title--variant-${e.variant}` : void 0, Ct = (e) => e.selectable ? e.multiple ? "menuitemcheckbox" : "menuitemradio" : "menuitem", wt = (e, t) => e.selected.includes(t.rowKey), Tt = /* @__PURE__ */ new WeakMap(), Et = (e, t) => {
|
|
131
183
|
let n = Object.keys(e);
|
|
132
184
|
return n.length === Object.keys(t).length && n.every((n) => n === "selected" || e[n] === t[n]);
|
|
133
|
-
},
|
|
134
|
-
let t =
|
|
135
|
-
return t &&
|
|
136
|
-
},
|
|
185
|
+
}, Dt = (e) => {
|
|
186
|
+
let t = Tt.get(e.items);
|
|
187
|
+
return t && Et(t, e) ? t : (Tt.set(e.items, e), e);
|
|
188
|
+
}, M = (e) => {
|
|
137
189
|
let t = 0;
|
|
138
190
|
for (let n = 0; n < e; n++) t += E.value[n]?.items.length ?? 0;
|
|
139
191
|
return t;
|
|
140
|
-
},
|
|
192
|
+
}, Ot = /* @__PURE__ */ new Set([...te.filter((e) => e !== "text" && e !== "disabled")]), kt = (e) => {
|
|
141
193
|
let t = {};
|
|
142
|
-
for (let [n, r] of Object.entries(e))
|
|
194
|
+
for (let [n, r] of Object.entries(e)) Ot.has(n) && (t[n] = r);
|
|
143
195
|
return t;
|
|
144
|
-
},
|
|
145
|
-
"
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
"
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
196
|
+
}, At = (e, t, n, r, i) => {
|
|
197
|
+
let a = jt("item", t, r, i);
|
|
198
|
+
return h(kt(t), {
|
|
199
|
+
"aria-busy": w.isItemLoading(t.rowKey) || void 0,
|
|
200
|
+
"aria-checked": e.selectable ? r : void 0,
|
|
201
|
+
"aria-labelledby": Vt(e, t, n, a),
|
|
202
|
+
"aria-expanded": t.items ? q.value === t.rowKey : void 0,
|
|
203
|
+
"aria-haspopup": t.items ? Wt(t) ? "dialog" : "menu" : void 0,
|
|
204
|
+
"aria-controls": t.items && q.value === t.rowKey ? Gt(t) : void 0,
|
|
205
|
+
class: [xt(t), {
|
|
206
|
+
"bb-dropdown__item--selected": r,
|
|
207
|
+
"bb-dropdown__item--has-submenu": !!t.items,
|
|
208
|
+
"bb-dropdown__item--description": !!t.description
|
|
209
|
+
}],
|
|
210
|
+
"data-dropdown-item": "",
|
|
211
|
+
disabled: t.disabled || w.disabled.value,
|
|
212
|
+
role: Ct(e),
|
|
213
|
+
tabindex: -1,
|
|
214
|
+
onClick: (r) => Mn(e, t, n, r),
|
|
215
|
+
onKeydown: (e) => Nn(t, n, e),
|
|
216
|
+
onMousedown: (t) => jn(e, t),
|
|
217
|
+
onPointerenter: (e) => Dn(t, n, e),
|
|
218
|
+
onPointerleave: (e) => kn(t, e)
|
|
219
|
+
}, a, { "aria-describedby": Ht(e, t, n, a) });
|
|
220
|
+
};
|
|
221
|
+
function jt(e, t, n, r) {
|
|
167
222
|
return w.passthrough.part(e, {
|
|
168
223
|
selected: n,
|
|
169
|
-
disabled: t.disabled || w.disabled.value || void 0
|
|
170
|
-
|
|
224
|
+
disabled: t.disabled || w.disabled.value || void 0,
|
|
225
|
+
activeLink: !!r?.activeLink,
|
|
226
|
+
exactActiveLink: !!r?.exactActiveLink
|
|
227
|
+
}, Mt(t), t.variant ?? "default");
|
|
171
228
|
}
|
|
172
|
-
let
|
|
173
|
-
let { rowKey: t, domKey: n, keyless: r,
|
|
174
|
-
return
|
|
175
|
-
},
|
|
229
|
+
let N = (e) => e.placeholder ? w.slots[e.placeholder === "loading" ? "loading" : "empty"] : void 0, Mt = (e) => {
|
|
230
|
+
let { rowKey: t, domKey: n, keyless: r, section: i, ...a } = e;
|
|
231
|
+
return a;
|
|
232
|
+
}, Nt = (e) => ({
|
|
176
233
|
id: e.id,
|
|
177
234
|
label: e.label,
|
|
178
235
|
meta: e.meta,
|
|
179
236
|
multiple: e.multiple,
|
|
180
237
|
selectable: e.selectable
|
|
181
|
-
}),
|
|
238
|
+
}), Pt = (e, t, n, r, i) => ({
|
|
182
239
|
disabled: t.disabled || w.disabled.value,
|
|
183
|
-
group:
|
|
240
|
+
group: Nt(e),
|
|
184
241
|
groupTitle: !1,
|
|
185
242
|
index: n,
|
|
186
|
-
item:
|
|
187
|
-
level:
|
|
243
|
+
item: Mt(t),
|
|
244
|
+
level: Ze.value,
|
|
188
245
|
selected: r,
|
|
189
246
|
loading: w.isItemLoading(t.rowKey),
|
|
190
247
|
open: w.open.value,
|
|
191
248
|
placement: w.placement.value,
|
|
192
249
|
label: t.label,
|
|
193
|
-
description: t.description
|
|
194
|
-
|
|
250
|
+
description: t.description,
|
|
251
|
+
activeLink: !!i?.activeLink,
|
|
252
|
+
exactActiveLink: !!i?.exactActiveLink
|
|
253
|
+
}), P = (e, t) => {
|
|
195
254
|
if (!e.id) return;
|
|
196
255
|
let r = n(e.id);
|
|
197
256
|
return w.slots[t ? `${r}:${t}` : r];
|
|
198
|
-
},
|
|
199
|
-
let
|
|
200
|
-
return
|
|
201
|
-
},
|
|
202
|
-
let r = t["aria-describedby"];
|
|
203
|
-
return xt(e, t) ? [r, I(n)].filter(Boolean).join(" ") : r;
|
|
204
|
-
}, wt = c(() => me(E.value)), Tt = (e) => !!e.items && me(et(e.items)), Et = (e) => wt.value ? "menu" : P(e) ? "group" : "none", Dt = (e, t) => P(e) ? yt(t) : void 0, L = (e, t) => ({
|
|
257
|
+
}, F = (e) => !e.hideLabel && (!!e.label || !!e["prepend:icon"] || !!e["append:icon"] || !!P(e) || !!P(e, "prepend") || !!P(e, "append")), Ft = (e) => !e.id || !e.selectable || !e.multiple ? [] : w.selectedChipsFor(e.id), I = t().id, It = (e) => `${I.value}_group-title_${e}`, Lt = (e, t) => `${I.value}_section-title_${e}_${n(t) || "none"}`, Rt = (e) => `${I.value}_row-text_${e}`, zt = (e) => `${I.value}_row-description_${e}`, Bt = (e, t) => !!t.description && !yt(e, t), Vt = (e, t, n, r) => Bt(e, t) && !r["aria-label"] && !r["aria-labelledby"] ? Rt(n) : r["aria-labelledby"], Ht = (e, t, n, r) => {
|
|
258
|
+
let i = r["aria-describedby"];
|
|
259
|
+
return Bt(e, t) ? [i, zt(n)].filter(Boolean).join(" ") : i;
|
|
260
|
+
}, Ut = l(() => pe(E.value)), Wt = (e) => !!e.items && pe(mt(e.items)), Gt = (e) => `submenu_${w.rootId}_${e.domKey}`, Kt = (e) => Ut.value ? "menu" : F(e) ? "group" : "none", qt = (e, t) => F(e) ? It(t) : void 0, L = (e, t) => ({
|
|
205
261
|
disabled: w.disabled.value,
|
|
206
|
-
group:
|
|
262
|
+
group: Nt(e),
|
|
207
263
|
groupTitle: !0,
|
|
208
264
|
index: t,
|
|
209
265
|
item: e,
|
|
210
|
-
level:
|
|
266
|
+
level: Ze.value,
|
|
211
267
|
selected: !1,
|
|
212
268
|
loading: !1,
|
|
213
269
|
open: w.open.value,
|
|
214
270
|
placement: w.placement.value,
|
|
215
271
|
label: e.label
|
|
216
|
-
}),
|
|
272
|
+
}), Jt = (e) => e.key === "Escape" || e.key === "Esc", Yt = (e) => getComputedStyle(e).direction === "rtl", Xt = (e) => {
|
|
273
|
+
let { key: t, currentTarget: n } = e;
|
|
274
|
+
return t !== "ArrowLeft" && t !== "ArrowRight" || !(n instanceof Element) || !Yt(n) ? t : t === "ArrowLeft" ? "ArrowRight" : "ArrowLeft";
|
|
275
|
+
}, R = _({}), Zt = (e, t) => {
|
|
217
276
|
let n = r(t);
|
|
218
277
|
n ? R.value[e] = n : delete R.value[e];
|
|
219
|
-
}, z =
|
|
278
|
+
}, z = _({}), Qt = (e, t) => {
|
|
220
279
|
let n = r(t);
|
|
221
280
|
n instanceof HTMLElement ? z.value[e] = n : delete z.value[e];
|
|
222
281
|
}, B = () => {
|
|
223
282
|
let e = [], t = 0;
|
|
224
283
|
for (let n of E.value) {
|
|
225
|
-
n.onClick &&
|
|
284
|
+
n.onClick && F(n) && e.push(t - .5);
|
|
226
285
|
for (let r of n.items) r.disabled || w.disabled.value || e.push(t), t++;
|
|
227
286
|
}
|
|
228
287
|
return e;
|
|
229
|
-
},
|
|
288
|
+
}, $t = (e) => {
|
|
230
289
|
let t = 0;
|
|
231
290
|
for (let n = 0; n < E.value.length; n++) {
|
|
232
291
|
if (t - .5 === e) return n;
|
|
@@ -235,359 +294,392 @@ var Oe = {
|
|
|
235
294
|
return -1;
|
|
236
295
|
}, V = (e, t) => {
|
|
237
296
|
if (e == null) return;
|
|
238
|
-
let n = Number.isInteger(e) ? R.value[e] : z.value[
|
|
239
|
-
t === void 0 ? n?.focus() : t ?
|
|
240
|
-
},
|
|
241
|
-
|
|
297
|
+
let n = Number.isInteger(e) ? R.value[e] : z.value[$t(e)];
|
|
298
|
+
t === void 0 ? n?.focus() : t ? ee(n) : o(n);
|
|
299
|
+
}, en = () => Object.values(j.value).some((e) => e === document.activeElement);
|
|
300
|
+
le({
|
|
242
301
|
active: T,
|
|
243
|
-
input: () => Object.values(
|
|
302
|
+
input: () => Object.values(j.value).find((e) => e === document.activeElement) ?? null
|
|
244
303
|
});
|
|
245
|
-
let
|
|
246
|
-
let e =
|
|
247
|
-
return e ? (
|
|
248
|
-
}, H = (e) => V(B()[0], e),
|
|
304
|
+
let tn = () => {
|
|
305
|
+
let e = ft.value;
|
|
306
|
+
return e ? (j.value[e]?.focus(), !0) : !1;
|
|
307
|
+
}, H = (e) => V(B()[0], e), U = (e) => {
|
|
249
308
|
let t = 0;
|
|
250
309
|
for (let n of E.value) for (let r of n.items) {
|
|
251
310
|
if (r.rowKey === e) return t;
|
|
252
311
|
t++;
|
|
253
312
|
}
|
|
254
313
|
return -1;
|
|
255
|
-
},
|
|
314
|
+
}, W = (e, t) => {
|
|
256
315
|
let n = B();
|
|
257
316
|
if (!n.length) return;
|
|
258
317
|
let r = n.indexOf(e), i = r === -1 ? t > 0 ? 0 : n.length - 1 : (r + t + n.length) % n.length;
|
|
259
318
|
V(n[i], !0);
|
|
260
|
-
}, W = (e) => {
|
|
261
|
-
!T.value && Mt() || H(e);
|
|
262
319
|
}, G = (e) => {
|
|
320
|
+
!T.value && tn() || H(e);
|
|
321
|
+
}, K = (e) => {
|
|
263
322
|
let t = B();
|
|
264
323
|
V(t[t.length - 1], e);
|
|
265
|
-
},
|
|
324
|
+
}, nn = (e, t) => {
|
|
325
|
+
let n = U(e);
|
|
326
|
+
n === -1 ? G(t) : V(n, t);
|
|
327
|
+
}, rn = (e) => {
|
|
266
328
|
let t = 0;
|
|
267
329
|
for (let n of E.value) for (let r of n.items) {
|
|
268
330
|
if (t === e) return r;
|
|
269
331
|
t++;
|
|
270
332
|
}
|
|
271
|
-
},
|
|
333
|
+
}, an = e(), on = fe({
|
|
272
334
|
candidates: () => B().filter(Number.isInteger),
|
|
273
|
-
getTokens: (e) => [
|
|
335
|
+
getTokens: (e) => [de(rn(e)?.label ?? "", an.locale)],
|
|
274
336
|
getCurrent: () => {
|
|
275
337
|
let e = Object.entries(R.value).find(([, e]) => e === document.activeElement);
|
|
276
338
|
return e ? Number(e[0]) : void 0;
|
|
277
339
|
},
|
|
278
340
|
onMatch: (e) => V(e, !0),
|
|
279
|
-
locale: () =>
|
|
280
|
-
}),
|
|
281
|
-
|
|
282
|
-
},
|
|
341
|
+
locale: () => an.locale
|
|
342
|
+
}), sn = (e) => {
|
|
343
|
+
ue(e) && on.onKeydown(e);
|
|
344
|
+
}, cn = {
|
|
283
345
|
ArrowDown: () => H(!0),
|
|
284
|
-
ArrowUp: () =>
|
|
346
|
+
ArrowUp: () => K(!0),
|
|
285
347
|
Down: () => H(!0),
|
|
286
348
|
Esc: () => w.close(),
|
|
287
349
|
Escape: () => w.close(),
|
|
288
|
-
Up: () =>
|
|
289
|
-
},
|
|
290
|
-
if (
|
|
291
|
-
let t =
|
|
350
|
+
Up: () => K(!0)
|
|
351
|
+
}, ln = (e) => {
|
|
352
|
+
if (oe(e) || C.level > 0 && Jt(e)) return;
|
|
353
|
+
let t = cn[e.key];
|
|
292
354
|
t && (e.stopPropagation(), e.preventDefault(), t());
|
|
293
355
|
};
|
|
294
|
-
|
|
295
|
-
C.level === 0 &&
|
|
356
|
+
Te(() => {
|
|
357
|
+
C.level === 0 && ft.value && !T.value && xe(() => tn());
|
|
296
358
|
});
|
|
297
|
-
let
|
|
298
|
-
|
|
299
|
-
clearTimeout(Z),
|
|
300
|
-
|
|
301
|
-
},
|
|
359
|
+
let q = _(null), J = _({}), Y, X, un = 0, dn = _(null), Z;
|
|
360
|
+
S(q, (e, t) => {
|
|
361
|
+
t != null && w.open.value && vn(t) && V(U(t)), clearTimeout(Z), dn.value = t ?? null, t != null && (Z = setTimeout(() => {
|
|
362
|
+
dn.value = null;
|
|
363
|
+
}, qe));
|
|
302
364
|
});
|
|
303
|
-
let
|
|
365
|
+
let fn = (e) => q.value !== e && dn.value !== e, pn = _(0), mn = _("right-start"), hn = () => {
|
|
304
366
|
let e = Object.values(R.value)[0], t = e?.closest(".bb-dropdown");
|
|
305
|
-
!e || !t
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
367
|
+
if (!e || !t) return;
|
|
368
|
+
let n = Yt(e);
|
|
369
|
+
mn.value = n ? "left-start" : "right-start";
|
|
370
|
+
let r = t.getBoundingClientRect(), i = e.getBoundingClientRect();
|
|
371
|
+
pn.value = Math.max(0, n ? i.left - r.left : r.right - i.right);
|
|
372
|
+
}, gn = {}, _n = (e, t) => {
|
|
373
|
+
t instanceof HTMLElement ? gn[e] = t : delete gn[e];
|
|
374
|
+
}, vn = (e) => !!gn[e]?.contains(document.activeElement), yn = (e, t) => {
|
|
375
|
+
!Jt(t) || t.defaultPrevented || oe(t) || !w.ownsEscape() || (t.preventDefault(), t.stopPropagation(), En(e));
|
|
376
|
+
}, bn = (e, t) => {
|
|
377
|
+
t ? J.value[e] = t : delete J.value[e];
|
|
378
|
+
}, Q = () => clearTimeout(Y), $ = () => clearTimeout(X);
|
|
379
|
+
we(() => {
|
|
380
|
+
clearTimeout(X), clearTimeout(Y), clearTimeout(Z);
|
|
311
381
|
});
|
|
312
|
-
let
|
|
313
|
-
$(), clearTimeout(
|
|
314
|
-
|
|
315
|
-
},
|
|
316
|
-
},
|
|
382
|
+
let xn = (e) => {
|
|
383
|
+
$(), clearTimeout(Y), Y = setTimeout(() => {
|
|
384
|
+
q.value === e && (q.value = null);
|
|
385
|
+
}, Ge);
|
|
386
|
+
}, Sn = (e) => {
|
|
317
387
|
let t = e.trim();
|
|
318
388
|
return t ? t.endsWith("ms") ? Number.parseFloat(t) || 0 : t.endsWith("s") ? (Number.parseFloat(t) || 0) * 1e3 : Number.parseFloat(t) || 0 : 0;
|
|
319
|
-
},
|
|
389
|
+
}, Cn = (e) => {
|
|
320
390
|
let t = R.value[e];
|
|
321
391
|
if (!t) return 0;
|
|
322
392
|
let n = t.closest(".bb-common-popover");
|
|
323
393
|
if (!n) return 0;
|
|
324
|
-
let r = getComputedStyle(n).getPropertyValue("--transition-duration"), i =
|
|
394
|
+
let r = getComputedStyle(n).getPropertyValue("--transition-duration"), i = Sn(r);
|
|
325
395
|
if (!i) return 0;
|
|
326
|
-
let a = performance.now() -
|
|
396
|
+
let a = performance.now() - un;
|
|
327
397
|
return Math.max(0, i - a + 16);
|
|
328
|
-
},
|
|
329
|
-
Q(),
|
|
398
|
+
}, wn = async (e, t) => {
|
|
399
|
+
Q(), hn(), q.value = e, t !== void 0 && (await xe(), J.value[e]?.focusFirst(t));
|
|
330
400
|
};
|
|
331
|
-
|
|
401
|
+
S(w.open, (e) => {
|
|
332
402
|
if (!e) {
|
|
333
|
-
$(), Q(),
|
|
403
|
+
$(), Q(), q.value = null;
|
|
334
404
|
return;
|
|
335
405
|
}
|
|
336
|
-
|
|
406
|
+
un = performance.now();
|
|
337
407
|
});
|
|
338
|
-
let
|
|
339
|
-
t ?
|
|
340
|
-
},
|
|
341
|
-
|
|
342
|
-
},
|
|
408
|
+
let Tn = (e, t) => {
|
|
409
|
+
t ? q.value = e : q.value === e && (q.value = null);
|
|
410
|
+
}, En = (e) => {
|
|
411
|
+
q.value = null, xe(() => V(e, !0));
|
|
412
|
+
}, Dn = (e, t, n) => {
|
|
343
413
|
if (n.pointerType !== "mouse") return;
|
|
344
|
-
if (Q(), $(),
|
|
345
|
-
V(t);
|
|
414
|
+
if (Q(), $(), q.value !== null && q.value === e.rowKey) {
|
|
415
|
+
vn(e.rowKey) || V(t);
|
|
346
416
|
return;
|
|
347
417
|
}
|
|
348
418
|
let r = () => {
|
|
349
|
-
V(t), e.items ?
|
|
419
|
+
V(t), e.items ? wn(e.rowKey) : q.value = null;
|
|
350
420
|
};
|
|
351
|
-
if (
|
|
352
|
-
let e =
|
|
353
|
-
e >= 0 && Math.abs(t - e) <= 1 ?
|
|
421
|
+
if (q.value !== null) {
|
|
422
|
+
let e = U(q.value);
|
|
423
|
+
e >= 0 && Math.abs(t - e) <= 1 ? X = setTimeout(r, Ke) : r();
|
|
354
424
|
return;
|
|
355
425
|
}
|
|
356
|
-
let i = e.items ?
|
|
357
|
-
i ?
|
|
358
|
-
},
|
|
426
|
+
let i = e.items ? Cn(t) : 0;
|
|
427
|
+
i ? X = setTimeout(r, i) : r();
|
|
428
|
+
}, On = () => {
|
|
359
429
|
Q(), $();
|
|
360
|
-
},
|
|
361
|
-
t.pointerType === "mouse" && e.items &&
|
|
362
|
-
},
|
|
363
|
-
t.pointerType === "mouse" &&
|
|
364
|
-
},
|
|
430
|
+
}, kn = (e, t) => {
|
|
431
|
+
t.pointerType === "mouse" && e.items && xn(e.rowKey);
|
|
432
|
+
}, An = (e, t) => {
|
|
433
|
+
t.pointerType === "mouse" && xn(e);
|
|
434
|
+
}, jn = (e, t) => {
|
|
365
435
|
e.searchable && t.preventDefault();
|
|
366
|
-
},
|
|
436
|
+
}, Mn = (e, t, n, r) => {
|
|
367
437
|
if (!(t.disabled || w.disabled.value) && !w.isItemLoading(t.rowKey)) {
|
|
368
438
|
if (t.items) {
|
|
369
|
-
r.stopPropagation(), Q(), $(), C.navigate ? C.navigate(t) :
|
|
439
|
+
r.stopPropagation(), Q(), $(), C.navigate ? C.navigate(t) : wn(t.rowKey, r.detail === 0);
|
|
370
440
|
return;
|
|
371
441
|
}
|
|
372
442
|
if (e.selectable && e.id) {
|
|
373
|
-
r.stopPropagation(), w.toggleSelect(e, t), w.runItemAction(t, r),
|
|
443
|
+
r.stopPropagation(), w.toggleSelect(e, t), w.runItemAction(t, r), en() || V(n);
|
|
374
444
|
return;
|
|
375
445
|
}
|
|
376
446
|
r.stopPropagation(), w.runItemAction(t, r, { close: !0 });
|
|
377
447
|
}
|
|
378
|
-
},
|
|
379
|
-
switch (n
|
|
448
|
+
}, Nn = (e, t, n) => {
|
|
449
|
+
switch (Xt(n)) {
|
|
380
450
|
case "ArrowDown":
|
|
381
|
-
n.preventDefault(), $(), Q(),
|
|
451
|
+
n.preventDefault(), $(), Q(), q.value = null, W(t, 1);
|
|
382
452
|
break;
|
|
383
453
|
case "ArrowUp":
|
|
384
|
-
n.preventDefault(), $(), Q(),
|
|
454
|
+
n.preventDefault(), $(), Q(), q.value = null, W(t, -1);
|
|
385
455
|
break;
|
|
386
456
|
case "Home":
|
|
387
|
-
n.preventDefault(),
|
|
457
|
+
n.preventDefault(), G(!0);
|
|
388
458
|
break;
|
|
389
459
|
case "End":
|
|
390
|
-
n.preventDefault(),
|
|
460
|
+
n.preventDefault(), K(!0);
|
|
391
461
|
break;
|
|
392
462
|
case "ArrowRight":
|
|
393
|
-
e.items && (n.preventDefault(), n.stopPropagation(), C.navigate ? C.navigate(e) :
|
|
463
|
+
e.items && (n.preventDefault(), n.stopPropagation(), C.navigate ? C.navigate(e) : wn(e.rowKey, !0));
|
|
394
464
|
break;
|
|
395
465
|
case "ArrowLeft":
|
|
396
|
-
C.back ? (n.preventDefault(), n.stopPropagation(), C.back()) : C.level > 0 && (n.preventDefault(), n.stopPropagation(),
|
|
466
|
+
C.back ? (n.preventDefault(), n.stopPropagation(), C.back()) : C.level > 0 && (n.preventDefault(), n.stopPropagation(), Xe("close-level"));
|
|
397
467
|
break;
|
|
398
|
-
default:
|
|
468
|
+
default: sn(n);
|
|
399
469
|
}
|
|
400
|
-
},
|
|
401
|
-
let n =
|
|
402
|
-
switch (t
|
|
470
|
+
}, Pn = (e, t) => {
|
|
471
|
+
let n = M(e) - .5;
|
|
472
|
+
switch (Xt(t)) {
|
|
403
473
|
case "ArrowDown":
|
|
404
|
-
t.preventDefault(),
|
|
474
|
+
t.preventDefault(), W(n, 1);
|
|
405
475
|
break;
|
|
406
476
|
case "ArrowUp":
|
|
407
|
-
t.preventDefault(),
|
|
477
|
+
t.preventDefault(), W(n, -1);
|
|
408
478
|
break;
|
|
409
479
|
case "Home":
|
|
410
|
-
t.preventDefault(),
|
|
480
|
+
t.preventDefault(), G(!0);
|
|
411
481
|
break;
|
|
412
482
|
case "End":
|
|
413
|
-
t.preventDefault(),
|
|
483
|
+
t.preventDefault(), K(!0);
|
|
414
484
|
break;
|
|
415
485
|
case "ArrowLeft":
|
|
416
|
-
C.back ? (t.preventDefault(), t.stopPropagation(), C.back()) : C.level > 0 && (t.preventDefault(), t.stopPropagation(),
|
|
486
|
+
C.back ? (t.preventDefault(), t.stopPropagation(), C.back()) : C.level > 0 && (t.preventDefault(), t.stopPropagation(), Xe("close-level"));
|
|
417
487
|
break;
|
|
418
|
-
default:
|
|
488
|
+
default: sn(t);
|
|
419
489
|
}
|
|
420
|
-
},
|
|
490
|
+
}, Fn = {
|
|
421
491
|
slots: w.slots,
|
|
422
|
-
setItemEl:
|
|
423
|
-
itemAttrs:
|
|
424
|
-
rowPart:
|
|
425
|
-
slotProps:
|
|
426
|
-
rowSlot:
|
|
427
|
-
itemSlot:
|
|
428
|
-
groupRowSlot:
|
|
429
|
-
rowTextId:
|
|
430
|
-
rowDescriptionId:
|
|
492
|
+
setItemEl: Zt,
|
|
493
|
+
itemAttrs: At,
|
|
494
|
+
rowPart: jt,
|
|
495
|
+
slotProps: Pt,
|
|
496
|
+
rowSlot: yt,
|
|
497
|
+
itemSlot: vt,
|
|
498
|
+
groupRowSlot: bt,
|
|
499
|
+
rowTextId: Rt,
|
|
500
|
+
rowDescriptionId: zt
|
|
431
501
|
};
|
|
432
|
-
return
|
|
433
|
-
focusFirst:
|
|
434
|
-
focusLast:
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
502
|
+
return Je({
|
|
503
|
+
focusFirst: G,
|
|
504
|
+
focusLast: K,
|
|
505
|
+
focusRow: nn
|
|
506
|
+
}), (e, t) => (g(!0), f(c, null, v(E.value, (n, r) => (g(), f(c, { key: n.id ?? r }, [
|
|
507
|
+
n.divider ? (g(), f("hr", je)) : d("", !0),
|
|
508
|
+
F(n) ? (g(), f("div", {
|
|
438
509
|
key: 1,
|
|
439
|
-
id:
|
|
510
|
+
id: It(r),
|
|
440
511
|
ref_for: !0,
|
|
441
|
-
ref: (e) =>
|
|
442
|
-
class:
|
|
512
|
+
ref: (e) => Qt(r, e),
|
|
513
|
+
class: Se(["bb-dropdown__group-title", St(n)]),
|
|
443
514
|
role: n.onClick ? "menuitem" : "presentation",
|
|
444
515
|
tabindex: n.onClick ? -1 : void 0,
|
|
445
516
|
onClick: (e) => n.onClick?.(e),
|
|
446
517
|
onKeydown: [
|
|
447
|
-
(e) => n.onClick &&
|
|
448
|
-
|
|
449
|
-
|
|
518
|
+
(e) => n.onClick && Pn(r, e),
|
|
519
|
+
ke((e) => n.onClick?.(e), ["enter"]),
|
|
520
|
+
ke(Ae((e) => n.onClick?.(e), ["prevent"]), ["space"])
|
|
450
521
|
]
|
|
451
522
|
}, [
|
|
452
|
-
|
|
523
|
+
P(n, "prepend") ? (g(), u(y(P(n, "prepend")), h({
|
|
453
524
|
key: 0,
|
|
454
525
|
ref_for: !0
|
|
455
|
-
}, L(n,
|
|
526
|
+
}, L(n, M(r))), null, 16)) : x(w).slots["item:prepend"] ? (g(), u(y(x(w).slots["item:prepend"]), h({
|
|
456
527
|
key: 1,
|
|
457
528
|
ref_for: !0
|
|
458
|
-
}, L(n,
|
|
529
|
+
}, L(n, M(r))), null, 16)) : n["prepend:icon"] ? (g(), u(s, {
|
|
459
530
|
key: 2,
|
|
460
531
|
class: "group-title__prepend-icon",
|
|
461
532
|
icon: n["prepend:icon"]
|
|
462
|
-
}, null, 8, ["icon"])) :
|
|
463
|
-
|
|
533
|
+
}, null, 8, ["icon"])) : d("", !0),
|
|
534
|
+
P(n) ? (g(), u(y(P(n)), h({
|
|
464
535
|
key: 3,
|
|
465
536
|
ref_for: !0
|
|
466
|
-
}, L(n,
|
|
467
|
-
|
|
537
|
+
}, L(n, M(r))), null, 16)) : n.label ? (g(), f("span", Ne, b(n.label), 1)) : d("", !0),
|
|
538
|
+
P(n, "append") ? (g(), u(y(P(n, "append")), h({
|
|
468
539
|
key: 5,
|
|
469
540
|
ref_for: !0
|
|
470
|
-
}, L(n,
|
|
541
|
+
}, L(n, M(r))), null, 16)) : x(w).slots["item:append"] ? (g(), u(y(x(w).slots["item:append"]), h({
|
|
471
542
|
key: 6,
|
|
472
543
|
ref_for: !0
|
|
473
|
-
}, L(n,
|
|
544
|
+
}, L(n, M(r))), null, 16)) : n["append:icon"] ? (g(), u(s, {
|
|
474
545
|
key: 7,
|
|
475
546
|
class: "group-title__append-icon",
|
|
476
547
|
icon: n["append:icon"]
|
|
477
|
-
}, null, 8, ["icon"])) :
|
|
478
|
-
], 42,
|
|
479
|
-
|
|
548
|
+
}, null, 8, ["icon"])) : d("", !0)
|
|
549
|
+
], 42, Me)) : d("", !0),
|
|
550
|
+
x(T) && Ft(n).length ? (g(), f("div", Pe, [p("div", Fe, [(g(!0), f(c, null, v(Ft(n), (e) => (g(), u(re, {
|
|
480
551
|
key: e.key,
|
|
481
552
|
class: "bb-dropdown__sheet-chip",
|
|
482
|
-
clearable: !
|
|
553
|
+
clearable: !x(w).disabled.value,
|
|
483
554
|
size: "xl",
|
|
484
555
|
variant: "secondary",
|
|
485
|
-
"onClick:clear": (t) =>
|
|
486
|
-
onMousedown: t[0] ||=
|
|
556
|
+
"onClick:clear": (t) => x(w).deselect(n.id, e.key),
|
|
557
|
+
onMousedown: t[0] ||= Ae(() => {}, ["prevent"])
|
|
487
558
|
}, {
|
|
488
|
-
default:
|
|
559
|
+
default: Oe(() => [ve(b(e.text), 1)]),
|
|
489
560
|
_: 2
|
|
490
|
-
}, 1032, ["clearable", "onClick:clear"]))), 128))])])) :
|
|
491
|
-
n.searchable && n.id ? (
|
|
492
|
-
|
|
561
|
+
}, 1032, ["clearable", "onClick:clear"]))), 128))])])) : d("", !0),
|
|
562
|
+
n.searchable && n.id ? (g(), f("div", Ie, [
|
|
563
|
+
m(s, {
|
|
493
564
|
"aria-hidden": "true",
|
|
494
565
|
class: "bb-dropdown__search-icon",
|
|
495
566
|
focusable: "false",
|
|
496
|
-
icon:
|
|
567
|
+
icon: x(ce)
|
|
497
568
|
}, null, 8, ["icon"]),
|
|
498
|
-
|
|
569
|
+
p("input", h({
|
|
499
570
|
ref_for: !0,
|
|
500
|
-
ref: (e) =>
|
|
501
|
-
"aria-label": n.searchPlaceholder ||
|
|
571
|
+
ref: (e) => dt(n.id, e),
|
|
572
|
+
"aria-label": n.searchPlaceholder || x($e),
|
|
502
573
|
autocomplete: "off",
|
|
503
574
|
class: "bb-dropdown__search-input",
|
|
504
|
-
placeholder: n.searchPlaceholder ||
|
|
575
|
+
placeholder: n.searchPlaceholder || x($e),
|
|
505
576
|
role: "searchbox",
|
|
506
577
|
type: "text",
|
|
507
|
-
value:
|
|
508
|
-
},
|
|
509
|
-
onInput: (e) =>
|
|
510
|
-
onKeydown:
|
|
511
|
-
}), null, 16,
|
|
512
|
-
n.id &&
|
|
513
|
-
])) :
|
|
514
|
-
|
|
515
|
-
"aria-labelledby":
|
|
516
|
-
class:
|
|
517
|
-
"bb-dropdown__group-items--capped":
|
|
518
|
-
"bb-dropdown__group-items--loading": !!n.id &&
|
|
578
|
+
value: x(w).queryFor(n.id)
|
|
579
|
+
}, x(w).passthrough.input, {
|
|
580
|
+
onInput: (e) => x(w).setQuery(n.id, e.target.value),
|
|
581
|
+
onKeydown: ln
|
|
582
|
+
}), null, 16, Le),
|
|
583
|
+
n.id && x(w).isGroupLoading(n.id) ? (g(), f("div", Re)) : d("", !0)
|
|
584
|
+
])) : d("", !0),
|
|
585
|
+
p("div", {
|
|
586
|
+
"aria-labelledby": qt(n, r),
|
|
587
|
+
class: Se(["bb-dropdown__group-items", {
|
|
588
|
+
"bb-dropdown__group-items--capped": !!pt(n),
|
|
589
|
+
"bb-dropdown__group-items--loading": !!n.id && x(w).isGroupLoading(n.id)
|
|
519
590
|
}]),
|
|
520
|
-
role:
|
|
521
|
-
style:
|
|
522
|
-
}, [(
|
|
523
|
-
key:
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
},
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
"
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
})) : u("", !0), f("span", Le, x(t.label), 1)], 64))], 2)) : (_(), d(s, { key: 1 }, [p(oe, {
|
|
539
|
-
group: pt(n),
|
|
540
|
-
index: O(r) + a,
|
|
541
|
-
item: t,
|
|
542
|
-
row: on,
|
|
543
|
-
selected: !!n.selectable && ut(n, t)
|
|
544
|
-
}, null, 8, [
|
|
545
|
-
"group",
|
|
546
|
-
"index",
|
|
547
|
-
"item",
|
|
548
|
-
"selected"
|
|
549
|
-
]), t.items && !e.navigate ? (_(), l(i, {
|
|
550
|
-
key: 0,
|
|
551
|
-
anchor: R.value[O(r) + a],
|
|
552
|
-
class: "bb-dropdown bb-dropdown--submenu",
|
|
553
|
-
"hide-arrow": "",
|
|
554
|
-
"model-value": K.value === t.rowKey,
|
|
555
|
-
offset: Ht.value,
|
|
556
|
-
placement: "right-start",
|
|
557
|
-
role: "none",
|
|
558
|
-
"transition-duration": He,
|
|
559
|
-
"onUpdate:modelValue": (e) => Yt(t.rowKey, e)
|
|
560
|
-
}, {
|
|
561
|
-
default: Te(({ availableHeight: n }) => [f("span", {
|
|
562
|
-
id: `submenu_${S(w).rootId}_${t.domKey}`,
|
|
563
|
-
"aria-label": Tt(t) ? t.label : void 0,
|
|
564
|
-
class: "bb-dropdown__list",
|
|
565
|
-
"data-bb-dropdown-surface": S(w).rootId,
|
|
566
|
-
inert: Vt(t.rowKey),
|
|
567
|
-
role: Tt(t) ? "dialog" : "menu",
|
|
568
|
-
style: be({ "--max-h": n == null ? void 0 : `${n}px` }),
|
|
569
|
-
onPointerenter: Qt,
|
|
570
|
-
onPointerleave: (e) => en(t.rowKey, e)
|
|
571
|
-
}, [p(_e, {
|
|
591
|
+
role: Kt(n),
|
|
592
|
+
style: Ce({ maxHeight: pt(n) })
|
|
593
|
+
}, [(g(!0), f(c, null, v(st(n), (t) => (g(), u(D, h({
|
|
594
|
+
key: t.key,
|
|
595
|
+
titled: !!t.title,
|
|
596
|
+
ref_for: !0
|
|
597
|
+
}, t.title ? {
|
|
598
|
+
class: "bb-dropdown__section",
|
|
599
|
+
role: "group",
|
|
600
|
+
"aria-labelledby": Lt(r, t.key)
|
|
601
|
+
} : {}), {
|
|
602
|
+
default: Oe(() => [t.title ? (g(), f("div", {
|
|
603
|
+
key: 0,
|
|
604
|
+
id: Lt(r, t.key),
|
|
605
|
+
class: "bb-dropdown__group-title bb-dropdown__section-title",
|
|
606
|
+
role: "presentation"
|
|
607
|
+
}, [p("span", Ve, b(t.title), 1)], 8, Be)) : d("", !0), (g(!0), f(c, null, v(t.items, (a, o) => (g(), f(c, { key: a.rowKey }, [a.placeholder ? (g(), f("div", {
|
|
608
|
+
key: 0,
|
|
572
609
|
ref_for: !0,
|
|
573
|
-
ref: (e) =>
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
610
|
+
ref: (e) => lt(r, e),
|
|
611
|
+
class: Se(["bb-dropdown__placeholder", `bb-dropdown__placeholder--${a.placeholder}`]),
|
|
612
|
+
role: "presentation"
|
|
613
|
+
}, [N(a) ? (g(), u(y(N(a)), h({
|
|
614
|
+
key: 0,
|
|
615
|
+
error: a.placeholder === "loading" ? void 0 : a.error ?? null,
|
|
616
|
+
ref_for: !0
|
|
617
|
+
}, {
|
|
618
|
+
groupId: n.id,
|
|
619
|
+
query: n.id ? x(w).queryFor(n.id) : "",
|
|
620
|
+
text: a.label
|
|
621
|
+
}), null, 16, ["error"])) : (g(), f(c, { key: 1 }, [a.placeholder === "failed" ? (g(), u(ie, {
|
|
622
|
+
key: 0,
|
|
623
|
+
class: "bb-dropdown__placeholder-icon"
|
|
624
|
+
})) : d("", !0), p("span", He, b(a.label), 1)], 64))], 2)) : (g(), f(c, { key: 1 }, [m(ae, {
|
|
625
|
+
group: Dt(n),
|
|
626
|
+
index: M(r) + t.start + o,
|
|
627
|
+
item: a,
|
|
628
|
+
row: Fn,
|
|
629
|
+
selected: !!n.selectable && wt(n, a)
|
|
577
630
|
}, null, 8, [
|
|
578
|
-
"
|
|
579
|
-
"
|
|
580
|
-
"
|
|
581
|
-
|
|
631
|
+
"group",
|
|
632
|
+
"index",
|
|
633
|
+
"item",
|
|
634
|
+
"selected"
|
|
635
|
+
]), a.items && !e.navigate ? (g(), u(i, {
|
|
636
|
+
key: 0,
|
|
637
|
+
anchor: R.value[M(r) + t.start + o],
|
|
638
|
+
class: "bb-dropdown bb-dropdown--submenu",
|
|
639
|
+
"hide-arrow": "",
|
|
640
|
+
"model-value": q.value === a.rowKey,
|
|
641
|
+
offset: pn.value,
|
|
642
|
+
placement: mn.value,
|
|
643
|
+
role: "none",
|
|
644
|
+
"transition-duration": qe,
|
|
645
|
+
"onUpdate:modelValue": (e) => Tn(a.rowKey, e)
|
|
646
|
+
}, {
|
|
647
|
+
default: Oe(({ availableHeight: n }) => [p("span", {
|
|
648
|
+
id: Gt(a),
|
|
649
|
+
ref_for: !0,
|
|
650
|
+
ref: (e) => _n(a.rowKey, e),
|
|
651
|
+
"aria-label": a.label,
|
|
652
|
+
class: "bb-dropdown__list",
|
|
653
|
+
"data-bb-dropdown-surface": x(w).rootId,
|
|
654
|
+
inert: fn(a.rowKey),
|
|
655
|
+
role: Wt(a) ? "dialog" : "menu",
|
|
656
|
+
style: Ce({ "--max-h": n == null ? void 0 : `${n}px` }),
|
|
657
|
+
onKeydown: (e) => yn(M(r) + t.start + o, e),
|
|
658
|
+
onPointerenter: On,
|
|
659
|
+
onPointerleave: (e) => An(a.rowKey, e)
|
|
660
|
+
}, [m(_e, {
|
|
661
|
+
ref_for: !0,
|
|
662
|
+
ref: (e) => bn(a.rowKey, e),
|
|
663
|
+
groups: mt(a.items),
|
|
664
|
+
level: e.level + 1,
|
|
665
|
+
onCloseLevel: (e) => En(M(r) + t.start + o)
|
|
666
|
+
}, null, 8, [
|
|
667
|
+
"groups",
|
|
668
|
+
"level",
|
|
669
|
+
"onCloseLevel"
|
|
670
|
+
])], 44, Ue)]),
|
|
671
|
+
_: 2
|
|
672
|
+
}, 1032, [
|
|
673
|
+
"anchor",
|
|
674
|
+
"model-value",
|
|
675
|
+
"offset",
|
|
676
|
+
"placement",
|
|
677
|
+
"onUpdate:modelValue"
|
|
678
|
+
])) : d("", !0)], 64))], 64))), 128))]),
|
|
582
679
|
_: 2
|
|
583
|
-
},
|
|
584
|
-
"anchor",
|
|
585
|
-
"model-value",
|
|
586
|
-
"offset",
|
|
587
|
-
"onUpdate:modelValue"
|
|
588
|
-
])) : u("", !0)], 64))], 64))), 128))], 14, Ie)
|
|
680
|
+
}, 1040, ["titled"]))), 128))], 14, ze)
|
|
589
681
|
], 64))), 128));
|
|
590
682
|
}
|
|
591
683
|
});
|
|
592
684
|
//#endregion
|
|
593
|
-
export {
|
|
685
|
+
export { Je as default };
|