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,42 +1,43 @@
|
|
|
1
1
|
import { isNotEmpty as e } from "../../utilities/functions/isNotEmpty.js";
|
|
2
|
-
import { SELECT_CONTROL_NATIVE_ATTRS as t, formControlPtActive as n, usePassthrough as r } from "../../composables/usePassthrough.js";
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { hash as
|
|
5
|
-
import { removedPropsFor as
|
|
6
|
-
import { warnRemovedAttrs as
|
|
7
|
-
import { useMobile as
|
|
8
|
-
import { useLocale as
|
|
2
|
+
import { SELECT_CONTROL_NATIVE_ATTRS as t, formControlPtActive as n, usePassthrough as r, variantPt as i } from "../../composables/usePassthrough.js";
|
|
3
|
+
import { useConfig as a } from "../../composables/useConfig.js";
|
|
4
|
+
import { hash as ee } from "../../utilities/functions/hash.js";
|
|
5
|
+
import { removedPropsFor as o } from "../../deprecation/removedProps.js";
|
|
6
|
+
import { warnRemovedAttrs as s } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
7
|
+
import { useMobile as c } from "../../composables/useMobile.js";
|
|
8
|
+
import { useLocale as l } from "../../composables/useLocale.js";
|
|
9
9
|
import te from "../BbBadge/BbBadge.vue.js";
|
|
10
|
-
import
|
|
11
|
-
import { vAutofocus as
|
|
12
|
-
import
|
|
13
|
-
import { hasVnodeListener as
|
|
14
|
-
import { useFormBinding as
|
|
10
|
+
import ne from "../../assets/svgs/chevron_down.svg_raw.js";
|
|
11
|
+
import { vAutofocus as re } from "../../utilities/misc/autofocus.js";
|
|
12
|
+
import u from "../CommonField/CommonField.vue.js";
|
|
13
|
+
import { hasVnodeListener as d } from "../../utilities/functions/hasVnodeListener.js";
|
|
14
|
+
import { useFormBinding as f } from "../../composables/useFormBinding.js";
|
|
15
15
|
import ie from "../CommonFieldInput/CommonFieldInput.vue.js";
|
|
16
|
-
import { provideSheetChipAttrs as
|
|
17
|
-
import { KnownItemsScope as
|
|
18
|
-
import { BB_SELECT_POPOVER_PT as
|
|
19
|
-
import
|
|
20
|
-
import { throttle as
|
|
21
|
-
import { when as
|
|
22
|
-
import { reject as
|
|
16
|
+
import { provideSheetChipAttrs as ae } from "../BbSelectPopover/sheetChipAttrs.js";
|
|
17
|
+
import { KnownItemsScope as oe, indexKnownRows as se, knownRowsCover as ce } from "../BbSelectPopover/knownItems.js";
|
|
18
|
+
import { BB_SELECT_POPOVER_PT as le } from "../BbSelectPopover/types.js";
|
|
19
|
+
import ue from "../BbSelectPopover/BbSelectPopover.vue.js";
|
|
20
|
+
import { throttle as de } from "../../utilities/functions/throttle.js";
|
|
21
|
+
import { when as fe } from "../../utilities/functions/when.js";
|
|
22
|
+
import { reject as pe } from "../../utilities/functions/reject.js";
|
|
23
23
|
import { BB_SELECT_PT as p } from "./types.js";
|
|
24
|
-
import { Fragment as m, computed as h, createBlock as
|
|
24
|
+
import { Fragment as m, computed as h, createBlock as me, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createSlots as y, createTextVNode as he, createVNode as b, defineComponent as ge, getCurrentInstance as _e, guardReactiveProps as x, mergeProps as S, nextTick as C, normalizeClass as w, normalizeProps as T, onMounted as ve, onUnmounted as ye, openBlock as E, ref as D, renderList as O, renderSlot as k, toDisplayString as A, unref as j, useAttrs as be, watch as M, withCtx as N, withDirectives as xe, withModifiers as Se } from "vue";
|
|
25
25
|
//#region src/components/BbSelect/BbSelect.vue?vue&type=script&setup=true&lang.ts
|
|
26
|
-
var
|
|
26
|
+
var Ce = ["id"], we = [
|
|
27
27
|
"id",
|
|
28
28
|
"aria-labelledby",
|
|
29
29
|
"aria-readonly",
|
|
30
30
|
"aria-required",
|
|
31
31
|
"autofocus",
|
|
32
32
|
"disabled"
|
|
33
|
-
],
|
|
33
|
+
], Te = {
|
|
34
34
|
key: 1,
|
|
35
35
|
class: "bb-select__max-reached"
|
|
36
|
-
},
|
|
36
|
+
}, Ee = {
|
|
37
37
|
key: 2,
|
|
38
38
|
class: "bb-select__display-value bb-select__placeholder"
|
|
39
|
-
},
|
|
39
|
+
}, De = ["id"], P = /*@__PURE__*/ ge({
|
|
40
|
+
mixins: [i(p)],
|
|
40
41
|
inheritAttrs: !1,
|
|
41
42
|
__name: "BbSelect",
|
|
42
43
|
props: {
|
|
@@ -250,6 +251,42 @@ var Se = ["id"], Ce = [
|
|
|
250
251
|
"pt:comma:hasValue": {},
|
|
251
252
|
"pt:comma:open": {},
|
|
252
253
|
"pt:comma:selected": {},
|
|
254
|
+
"pt:root:outline": {},
|
|
255
|
+
"pt:root:secondary": {},
|
|
256
|
+
"pt:root:ghost": {},
|
|
257
|
+
"pt:label:outline": {},
|
|
258
|
+
"pt:label:secondary": {},
|
|
259
|
+
"pt:label:ghost": {},
|
|
260
|
+
"pt:description:outline": {},
|
|
261
|
+
"pt:description:secondary": {},
|
|
262
|
+
"pt:description:ghost": {},
|
|
263
|
+
"pt:message:outline": {},
|
|
264
|
+
"pt:message:secondary": {},
|
|
265
|
+
"pt:message:ghost": {},
|
|
266
|
+
"pt:hint:outline": {},
|
|
267
|
+
"pt:hint:secondary": {},
|
|
268
|
+
"pt:hint:ghost": {},
|
|
269
|
+
"pt:box:outline": {},
|
|
270
|
+
"pt:box:secondary": {},
|
|
271
|
+
"pt:box:ghost": {},
|
|
272
|
+
"pt:activator:outline": {},
|
|
273
|
+
"pt:activator:secondary": {},
|
|
274
|
+
"pt:activator:ghost": {},
|
|
275
|
+
"pt:icon:outline": {},
|
|
276
|
+
"pt:icon:secondary": {},
|
|
277
|
+
"pt:icon:ghost": {},
|
|
278
|
+
"pt:spinner:outline": {},
|
|
279
|
+
"pt:spinner:secondary": {},
|
|
280
|
+
"pt:spinner:ghost": {},
|
|
281
|
+
"pt:prefix:outline": {},
|
|
282
|
+
"pt:prefix:secondary": {},
|
|
283
|
+
"pt:prefix:ghost": {},
|
|
284
|
+
"pt:suffix:outline": {},
|
|
285
|
+
"pt:suffix:secondary": {},
|
|
286
|
+
"pt:suffix:ghost": {},
|
|
287
|
+
"pt:clear:outline": {},
|
|
288
|
+
"pt:clear:secondary": {},
|
|
289
|
+
"pt:clear:ghost": {},
|
|
253
290
|
"pt:option": {},
|
|
254
291
|
"pt:itemText": {},
|
|
255
292
|
"pt:itemIcon": {},
|
|
@@ -351,63 +388,70 @@ var Se = ["id"], Ce = [
|
|
|
351
388
|
"update:modelValue",
|
|
352
389
|
"option:add"
|
|
353
390
|
],
|
|
354
|
-
setup(
|
|
355
|
-
let
|
|
391
|
+
setup(i, { emit: ge }) {
|
|
392
|
+
let P = i, { props: F, emit: I, showAsterisk: Oe, errors: ke, ariaRequired: Ae, required: je, model: Me, readonly: L } = f(P, ge, {
|
|
356
393
|
componentName: "BbSelect",
|
|
357
|
-
identifierFallback: () =>
|
|
394
|
+
identifierFallback: () => P.label,
|
|
358
395
|
leaveOn: "inactive"
|
|
359
|
-
}),
|
|
360
|
-
process.env.NODE_ENV !== "production" &&
|
|
361
|
-
let
|
|
396
|
+
}), Ne = h(() => Ae.value ?? (je.value ? !0 : void 0)), Pe = a(), { t: Fe } = l();
|
|
397
|
+
process.env.NODE_ENV !== "production" && s("BbSelect", o("BbSelect"));
|
|
398
|
+
let R = D(!1), { isMobile: Ie } = c(), Le = h(() => F.persistentHint || R.value), z = h(() => e(F.modelValue)), Re = h(() => !!F.clearable && z.value), ze = h(() => F.labelMode ?? Pe.defaultInputLabelMode), B = D(!1), V = r({
|
|
362
399
|
component: "BbSelect",
|
|
363
|
-
attrs:
|
|
400
|
+
attrs: be(),
|
|
364
401
|
controlAttrs: t,
|
|
365
|
-
props:
|
|
402
|
+
props: F,
|
|
366
403
|
parts: p.parts,
|
|
367
404
|
states: p.states,
|
|
368
405
|
active: {
|
|
369
|
-
...n(
|
|
370
|
-
open: () =>
|
|
406
|
+
...n(F, () => z.value),
|
|
407
|
+
open: () => B.value
|
|
408
|
+
},
|
|
409
|
+
variant: {
|
|
410
|
+
...p.variant,
|
|
411
|
+
current: () => F.variant ?? "outline"
|
|
371
412
|
}
|
|
372
413
|
});
|
|
373
|
-
|
|
374
|
-
let
|
|
375
|
-
...
|
|
414
|
+
ae((e) => V.part("badge", {}, e));
|
|
415
|
+
let Be = () => ({
|
|
416
|
+
...V.forward([
|
|
376
417
|
"panel",
|
|
377
418
|
"sheet",
|
|
378
419
|
"header",
|
|
379
420
|
"footer",
|
|
380
421
|
"input",
|
|
381
422
|
"list"
|
|
382
|
-
],
|
|
383
|
-
...
|
|
423
|
+
], le.states.filter((e) => e !== "disabled")),
|
|
424
|
+
...V.forward([
|
|
384
425
|
"option",
|
|
385
426
|
"itemText",
|
|
386
427
|
"itemIcon",
|
|
387
428
|
"itemDescription"
|
|
388
|
-
],
|
|
389
|
-
}),
|
|
429
|
+
], le.states)
|
|
430
|
+
}), Ve = [
|
|
390
431
|
"box",
|
|
391
432
|
"icon",
|
|
392
433
|
"spinner",
|
|
393
434
|
"clear",
|
|
394
435
|
"prefix",
|
|
395
436
|
"suffix"
|
|
396
|
-
],
|
|
397
|
-
title:
|
|
398
|
-
...
|
|
399
|
-
})),
|
|
400
|
-
rows: () =>
|
|
401
|
-
prefill: () =>
|
|
402
|
-
}, Ge =
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
437
|
+
], He = (e) => Object.fromEntries(Ve.map((t) => [t, V.part(t, { loading: e })])), Ue = h(() => ({
|
|
438
|
+
title: F.label,
|
|
439
|
+
...F.offCanvasProps
|
|
440
|
+
})), We = h(() => F["append:icon"] === void 0 ? ne : F["append:icon"]), H = h(() => F.maxSelectedLabels === void 0 ? Infinity : F.maxSelectedLabels), U = {
|
|
441
|
+
rows: () => F.knownItems,
|
|
442
|
+
prefill: () => F.prefill
|
|
443
|
+
}, Ge = (e) => ({
|
|
444
|
+
known: !!U.isKnown?.(e),
|
|
445
|
+
item: e
|
|
446
|
+
}), Ke = h(() => ce(se(F.knownItems), F.modelValue, F.multiple)), qe = h(() => z.value && !Ke.value ? !0 : F.prefill ?? "interaction"), W = D(), G = D(), Je = D(), K = h(() => F.multiple ? Array.isArray(F.modelValue) ? F.modelValue.length : F.modelValue == null ? 0 : 1 : 0), Ye = h(() => H.value !== Infinity), q = h(() => !Ye.value), J = D(!1), Y = h(() => K.value <= 1 ? !1 : Ye.value ? K.value > H.value : J.value), X = h(() => !F.disabled && !F.readonly), Xe = (e) => {
|
|
447
|
+
if (X.value) if (U.userUnpick?.([e.value]), F.multiple) {
|
|
448
|
+
let t = pe(F.modelValue, e.value);
|
|
449
|
+
I("update:modelValue", t);
|
|
450
|
+
} else I("update:modelValue", null);
|
|
451
|
+
}, Ze = () => {
|
|
408
452
|
(W.value?.$el)?.querySelector(".bb-select__activator")?.focus();
|
|
409
|
-
},
|
|
410
|
-
let e =
|
|
453
|
+
}, Qe = h(() => F.selectedLabelsFn ? F.selectedLabelsFn(K.value) : Fe("select.multipleMaxReached", K.value).value), $e = (e) => F.multiple && Y.value ? Qe.value : e || F.placeholder || "", Z = de(() => {
|
|
454
|
+
let e = Je.value;
|
|
411
455
|
if (!q.value || !e || K.value <= 1) {
|
|
412
456
|
J.value = !1;
|
|
413
457
|
return;
|
|
@@ -416,93 +460,93 @@ var Se = ["id"], Ce = [
|
|
|
416
460
|
}, 100, {
|
|
417
461
|
leading: !0,
|
|
418
462
|
trailing: !0
|
|
419
|
-
}),
|
|
420
|
-
|
|
421
|
-
|
|
463
|
+
}), Q = null, et = () => {
|
|
464
|
+
Q?.disconnect(), Q = null, q.value && (Q = new ResizeObserver(Z), G.value && Q.observe(G.value), C(() => {
|
|
465
|
+
Z();
|
|
422
466
|
}));
|
|
423
467
|
};
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
}), M(() => [
|
|
468
|
+
ve(et), M(q, et, { flush: "post" }), ye(() => {
|
|
469
|
+
Q?.disconnect(), Z.cancel();
|
|
470
|
+
}), M(() => [F.modelValue, H.value], () => {
|
|
427
471
|
q.value && C(() => {
|
|
428
|
-
|
|
472
|
+
Z();
|
|
429
473
|
});
|
|
430
474
|
}), M(() => [
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
475
|
+
F.compact,
|
|
476
|
+
F.comma,
|
|
477
|
+
F["prepend:icon"]
|
|
434
478
|
], () => {
|
|
435
479
|
q.value && C(() => {
|
|
436
|
-
|
|
480
|
+
Z();
|
|
437
481
|
});
|
|
438
482
|
});
|
|
439
|
-
let
|
|
440
|
-
disabled:
|
|
441
|
-
name:
|
|
442
|
-
required:
|
|
483
|
+
let tt = fe((e) => typeof e != "string", JSON.stringify), nt = h(() => (F.multiple ? [].concat(F.modelValue ?? []) : [F.modelValue]).filter((e) => e != null).map((e) => ({
|
|
484
|
+
disabled: F.disabled,
|
|
485
|
+
name: F.name,
|
|
486
|
+
required: F.required,
|
|
443
487
|
type: "hidden",
|
|
444
|
-
value:
|
|
445
|
-
}))),
|
|
488
|
+
value: tt(e)
|
|
489
|
+
}))), $ = {
|
|
446
490
|
onBlur: (e) => {
|
|
447
|
-
|
|
491
|
+
R.value = !1, I("blur", e);
|
|
448
492
|
},
|
|
449
|
-
onChange: (e) =>
|
|
450
|
-
onClick: (e) =>
|
|
493
|
+
onChange: (e) => I("change", e),
|
|
494
|
+
onClick: (e) => I("click", e),
|
|
451
495
|
onFocus: (e) => {
|
|
452
|
-
|
|
496
|
+
R.value = !0, I("focus", e);
|
|
453
497
|
},
|
|
454
498
|
onActive: () => {
|
|
455
|
-
|
|
499
|
+
R.value = !0, I("active");
|
|
456
500
|
},
|
|
457
501
|
onShow: () => {
|
|
458
|
-
|
|
502
|
+
B.value = !0, I("show");
|
|
459
503
|
},
|
|
460
|
-
onShown: () =>
|
|
504
|
+
onShown: () => I("shown"),
|
|
461
505
|
onHide: () => {
|
|
462
|
-
|
|
506
|
+
B.value = !1, I("hide");
|
|
463
507
|
},
|
|
464
|
-
onHidden: () =>
|
|
508
|
+
onHidden: () => I("hidden"),
|
|
465
509
|
onInactive: () => {
|
|
466
|
-
|
|
510
|
+
R.value = !1, I("inactive");
|
|
467
511
|
},
|
|
468
|
-
onInput: (e) =>
|
|
469
|
-
"onUpdate:modelValue": (e) =>
|
|
470
|
-
},
|
|
471
|
-
|
|
472
|
-
"onOption:add": (e) =>
|
|
473
|
-
},
|
|
474
|
-
return (e, t) => (E(),
|
|
512
|
+
onInput: (e) => I("input", e),
|
|
513
|
+
"onUpdate:modelValue": (e) => I("update:modelValue", e)
|
|
514
|
+
}, rt = {
|
|
515
|
+
...$,
|
|
516
|
+
"onOption:add": (e) => I("option:add", e)
|
|
517
|
+
}, it = _e(), at = () => d(it, "option:add") ? rt : $;
|
|
518
|
+
return (e, t) => (E(), me(u, S({
|
|
475
519
|
id: e.id,
|
|
476
520
|
class: "bb-select",
|
|
477
|
-
clearable:
|
|
521
|
+
clearable: Re.value,
|
|
478
522
|
compact: e.compact,
|
|
479
523
|
description: e.description,
|
|
480
524
|
disabled: e.disabled,
|
|
481
|
-
errors: j(
|
|
525
|
+
errors: j(ke),
|
|
482
526
|
"has-errors": e.hasErrors,
|
|
483
|
-
"has-value":
|
|
527
|
+
"has-value": z.value,
|
|
484
528
|
"has-warnings": e.hasWarnings,
|
|
485
529
|
"hide-label": e.hideLabel,
|
|
486
530
|
hint: e.hint,
|
|
487
531
|
"input-align": e.inputAlign,
|
|
488
532
|
label: e.label,
|
|
489
533
|
"label-align": e.labelAlign,
|
|
490
|
-
"label-mode":
|
|
534
|
+
"label-mode": ze.value,
|
|
491
535
|
"label-position": e.labelPosition,
|
|
492
536
|
layout: e.layout,
|
|
493
537
|
loading: e.loading,
|
|
494
|
-
mobile: j(
|
|
538
|
+
mobile: j(Ie),
|
|
495
539
|
name: e.name,
|
|
496
|
-
passthrough: j(
|
|
497
|
-
readonly: j(
|
|
540
|
+
passthrough: j(V),
|
|
541
|
+
readonly: j(L),
|
|
498
542
|
reverse: e.reverse,
|
|
499
|
-
"show-asterisk": j(
|
|
500
|
-
"show-hint":
|
|
543
|
+
"show-asterisk": j(Oe),
|
|
544
|
+
"show-hint": Le.value,
|
|
501
545
|
warnings: e.warnings
|
|
502
|
-
}, j(
|
|
546
|
+
}, j(V).forwardAttrs), y({
|
|
503
547
|
label: N((t) => [k(e.$slots, "label", T(x(t)))]),
|
|
504
|
-
input: N(({ id: n, hasErrors: r, hasWarnings:
|
|
505
|
-
default: N(() => [b(
|
|
548
|
+
input: N(({ id: n, hasErrors: r, hasWarnings: i, ariaDescribedby: a }) => [b(j(oe), { source: U }, {
|
|
549
|
+
default: N(() => [b(ue, S({
|
|
506
550
|
id: n,
|
|
507
551
|
adaptive: e.adaptive,
|
|
508
552
|
anchor: W.value,
|
|
@@ -528,42 +572,42 @@ var Se = ["id"], Ce = [
|
|
|
528
572
|
loading: e.loading,
|
|
529
573
|
"loading-text": e.loadingText,
|
|
530
574
|
max: e.max,
|
|
531
|
-
"model-value": j(
|
|
575
|
+
"model-value": j(Me),
|
|
532
576
|
"model-value-debounce-time": e.modelValueDebounceTime,
|
|
533
577
|
multiple: e.multiple,
|
|
534
|
-
"off-canvas-props":
|
|
535
|
-
prefill:
|
|
536
|
-
pt:
|
|
578
|
+
"off-canvas-props": Ue.value,
|
|
579
|
+
prefill: qe.value,
|
|
580
|
+
pt: Be(),
|
|
537
581
|
"query-debounce-time": e.queryDebounceTime,
|
|
538
|
-
readonly: j(
|
|
582
|
+
readonly: j(L),
|
|
539
583
|
selectable: e.selectable,
|
|
540
584
|
stash: e.stash,
|
|
541
585
|
"transition-duration": e.transitionDuration,
|
|
542
586
|
width: "100%"
|
|
543
|
-
},
|
|
544
|
-
activator: N(({ props: a, shown: o, loading: s, text: c, selectedOptions: l, clear:
|
|
587
|
+
}, at()), y({
|
|
588
|
+
activator: N(({ props: a, shown: o, loading: s, text: c, selectedOptions: l, clear: ne, query: u, focus: d, close: f, toggle: ae }) => [b(ie, {
|
|
545
589
|
ref_key: "wrapperRef",
|
|
546
590
|
ref: W,
|
|
547
591
|
active: o,
|
|
548
|
-
"append:icon":
|
|
592
|
+
"append:icon": We.value,
|
|
549
593
|
class: w(["bb-select__field", {
|
|
550
594
|
"bb-select__field--shown": o,
|
|
551
595
|
"bb-select__field--disabled": e.disabled,
|
|
552
|
-
"bb-select__field--readonly": j(
|
|
596
|
+
"bb-select__field--readonly": j(L)
|
|
553
597
|
}]),
|
|
554
598
|
clearable: e.clearable,
|
|
555
599
|
compact: e.compact,
|
|
556
600
|
disabled: e.disabled,
|
|
557
601
|
"has-errors": r,
|
|
558
|
-
"has-value":
|
|
559
|
-
"has-warnings":
|
|
602
|
+
"has-value": z.value,
|
|
603
|
+
"has-warnings": i,
|
|
560
604
|
loading: s,
|
|
561
|
-
passthrough:
|
|
562
|
-
"prepend:icon":
|
|
563
|
-
readonly: j(
|
|
605
|
+
passthrough: He(s),
|
|
606
|
+
"prepend:icon": P["prepend:icon"],
|
|
607
|
+
readonly: j(L),
|
|
564
608
|
variant: e.variant,
|
|
565
609
|
"onClick:clear": () => {
|
|
566
|
-
|
|
610
|
+
ne(), C(Ze);
|
|
567
611
|
},
|
|
568
612
|
"onContainer:click": ae
|
|
569
613
|
}, y({
|
|
@@ -590,55 +634,55 @@ var Se = ["id"], Ce = [
|
|
|
590
634
|
ref_key: "valueRef",
|
|
591
635
|
ref: G,
|
|
592
636
|
class: "bb-select__value"
|
|
593
|
-
}, [
|
|
637
|
+
}, [xe(v("input", S({
|
|
594
638
|
id: n,
|
|
595
639
|
"aria-labelledby": `${n}__label ${n}__selection`,
|
|
596
|
-
"aria-readonly": j(
|
|
597
|
-
"aria-required":
|
|
640
|
+
"aria-readonly": j(L) || void 0,
|
|
641
|
+
"aria-required": Ne.value,
|
|
598
642
|
autofocus: e.autofocus,
|
|
599
643
|
class: "bb-select__activator",
|
|
600
644
|
disabled: e.disabled,
|
|
601
645
|
type: "button"
|
|
602
|
-
}, S(a, j(
|
|
646
|
+
}, S(a, j(V).part("activator", { loading: s }))), null, 16, we), [[j(re)]]), e.multiple ? (E(), _(m, { key: 0 }, [
|
|
603
647
|
q.value || !Y.value ? (E(), _("span", {
|
|
604
648
|
key: 0,
|
|
605
649
|
ref_key: "chipsContainerRef",
|
|
606
|
-
ref:
|
|
650
|
+
ref: Je,
|
|
607
651
|
class: w(["bb-select__chips-row", {
|
|
608
652
|
"bb-select__chips-row--hidden": Y.value,
|
|
609
653
|
"bb-select__chips-row--chips": !e.comma && !!l.length
|
|
610
654
|
}]),
|
|
611
|
-
onVnodeUpdated: t[0] ||= (e) => q.value && j(
|
|
655
|
+
onVnodeUpdated: t[0] ||= (e) => q.value && j(Z)()
|
|
612
656
|
}, [e.comma ? (E(!0), _(m, { key: 0 }, O(l, (e) => (E(), _("span", S({
|
|
613
|
-
key: j(
|
|
657
|
+
key: j(ee)(e.value),
|
|
614
658
|
class: "bb-select__comma",
|
|
615
659
|
ref_for: !0
|
|
616
|
-
}, j(
|
|
617
|
-
key: j(
|
|
618
|
-
deselect: () =>
|
|
660
|
+
}, j(V).part("comma", {}, e.item)), A(e.text), 17))), 128)) : (E(!0), _(m, { key: 1 }, O(l, (t) => k(e.$slots, "chip", S({
|
|
661
|
+
key: j(ee)(t.value),
|
|
662
|
+
deselect: () => Xe(t),
|
|
619
663
|
disabled: !X.value,
|
|
620
|
-
item: t.item,
|
|
621
664
|
text: t.text,
|
|
622
|
-
value: t.value
|
|
623
|
-
|
|
665
|
+
value: t.value,
|
|
666
|
+
ref_for: !0
|
|
667
|
+
}, Ge(t.item)), () => [b(te, S({
|
|
624
668
|
class: "bb-select__badge",
|
|
625
669
|
clearable: X.value,
|
|
626
670
|
size: "lg",
|
|
627
671
|
variant: "secondary",
|
|
628
672
|
ref_for: !0
|
|
629
|
-
}, j(
|
|
630
|
-
default: N(() => [
|
|
673
|
+
}, j(V).part("badge", {}, t.item), { "onClick:clear": Se((e) => Xe(t), ["stop"]) }), {
|
|
674
|
+
default: N(() => [he(A(t.text), 1)]),
|
|
631
675
|
_: 2
|
|
632
676
|
}, 1040, ["clearable", "onClick:clear"])])), 128))], 2)) : g("", !0),
|
|
633
|
-
Y.value ? (E(), _("span",
|
|
634
|
-
!l.length && e.placeholder ? (E(), _("span",
|
|
677
|
+
Y.value ? (E(), _("span", Te, A(Qe.value), 1)) : g("", !0),
|
|
678
|
+
!l.length && e.placeholder ? (E(), _("span", Ee, A(e.placeholder), 1)) : g("", !0)
|
|
635
679
|
], 64)) : (E(), _("span", {
|
|
636
680
|
key: 1,
|
|
637
681
|
class: w(["bb-select__display-value", [{ "bb-select__placeholder": !c }]])
|
|
638
|
-
}, A(c || e.placeholder), 3))], 8,
|
|
682
|
+
}, A(c || e.placeholder), 3))], 8, Ce), v("span", {
|
|
639
683
|
id: `${n}__selection`,
|
|
640
684
|
hidden: ""
|
|
641
|
-
}, A(
|
|
685
|
+
}, A($e(c)), 9, De)]),
|
|
642
686
|
_: 2
|
|
643
687
|
}, [e.$slots.prefix ? {
|
|
644
688
|
name: "prefix",
|
|
@@ -665,10 +709,10 @@ var Se = ["id"], Ce = [
|
|
|
665
709
|
"variant",
|
|
666
710
|
"onClick:clear",
|
|
667
711
|
"onContainer:click"
|
|
668
|
-
]), (E(!0), _(m, null, O(
|
|
712
|
+
]), (E(!0), _(m, null, O(nt.value, (e) => (E(), _("input", S({
|
|
669
713
|
key: e.value,
|
|
670
714
|
ref_for: !0
|
|
671
|
-
}, S(e, j(
|
|
715
|
+
}, S(e, j(V).controlAttrs)), null, 16))), 128))]),
|
|
672
716
|
loading: N((t) => [k(e.$slots, "loading", T(x(t)))]),
|
|
673
717
|
empty: N((t) => [k(e.$slots, "empty", T(x(t)))]),
|
|
674
718
|
group: N((t) => [k(e.$slots, "group", T(x(t)))]),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Responsive } from '../../types/ResponsiveSize';
|
|
2
2
|
import { BbSelectItemProps } from '../../types/ItemProps';
|
|
3
|
-
import { InputVariantType } from '../../types/InputVariant';
|
|
4
|
-
import { PtNoInfer, FormControlPtState, PtItemCtx, PtItemMap, PtItemResult, PtValue } from '../../types/passthrough';
|
|
3
|
+
import { InputVariantBuiltIn, InputVariantRegistry, InputVariantType } from '../../types/InputVariant';
|
|
4
|
+
import { PtNoInfer, FormControlPtState, PtItemCtx, PtItemMap, PtItemResult, PtValue, PtVariantAttrs } from '../../types/passthrough';
|
|
5
5
|
import { HTMLAttributes, InputHTMLAttributes } from 'vue';
|
|
6
6
|
import { FieldCrossAlign, FieldLayout } from '../../types/FieldLayout';
|
|
7
7
|
import { ItemAccessor } from '../../types/ItemAccessor';
|
|
8
8
|
import { BbSelectItemsContext } from '../../types/ItemsProvider';
|
|
9
9
|
import { IconType } from '../../types/Icon';
|
|
10
|
-
import {
|
|
10
|
+
import { BbSelectKnownItems, BbSelectResolvedOption, BbSelectSlotRow } from '../BbSelectPopover/types';
|
|
11
11
|
import { BbOffCanvasProps } from '../BbOffCanvas/types';
|
|
12
12
|
import { FormFieldProps } from '../../composables/useFormBinding';
|
|
13
13
|
import { CommonFieldAsteriskSlotProps } from '../CommonField/types';
|
|
@@ -67,21 +67,33 @@ export type BbSelectOptionPtPart = 'option' | 'itemText' | 'itemIcon' | 'itemDes
|
|
|
67
67
|
*/
|
|
68
68
|
export type BbSelectPtState = FormControlPtState | 'open' | 'selected';
|
|
69
69
|
/** The runtime lists the resolver is wired with — kept next to the types so the two cannot drift. */
|
|
70
|
+
/**
|
|
71
|
+
* The parts the input `variant` styles (Q76.7): the field, not the options
|
|
72
|
+
* surface — `input` is the search field there. Spelled flat (T20).
|
|
73
|
+
*/
|
|
74
|
+
export type BbSelectVariantPtPart = 'root' | 'label' | 'description' | 'message' | 'hint' | 'box' | 'activator' | 'icon' | 'spinner' | 'prefix' | 'suffix' | 'clear';
|
|
70
75
|
export declare const BB_SELECT_PT: {
|
|
71
76
|
readonly parts: readonly ["root", "label", "description", "message", "hint", "box", "activator", "input", "icon", "spinner", "prefix", "suffix", "clear", "panel", "sheet", "header", "footer", "list", "option", "itemText", "itemIcon", "itemDescription", "badge", "comma"];
|
|
72
77
|
readonly states: readonly ["hasValue", "selected", "readonly", "disabled", "warnings", "errors", "open", "loading"];
|
|
78
|
+
readonly variant: {
|
|
79
|
+
readonly names: readonly ["outline", "secondary", "ghost"];
|
|
80
|
+
readonly option: "inputVariants";
|
|
81
|
+
readonly parts: readonly ["root", "label", "description", "message", "hint", "box", "activator", "icon", "spinner", "prefix", "suffix", "clear"];
|
|
82
|
+
};
|
|
73
83
|
};
|
|
74
|
-
export type { BbSelectKnownItem } from '../BbSelectPopover/types';
|
|
75
|
-
export type BbSelectProps<T> = {
|
|
76
|
-
[K in `pt:${BbSelectFieldPtPart}` | `pt:${BbSelectPtPart}:${BbSelectPtState}`]?: PtValue;
|
|
77
|
-
} & {
|
|
78
|
-
[K in `pt:${BbSelectOptionPtPart}`]?: PtValue | ((ctx: PtItemCtx<PtNoInfer<T>, BbSelectPtState
|
|
84
|
+
export type { BbSelectKnownItem, BbSelectKnownItems, BbSelectSlotRow, } from '../BbSelectPopover/types';
|
|
85
|
+
export type BbSelectProps<T, Known extends BbSelectKnownItems | undefined = BbSelectKnownItems> = {
|
|
86
|
+
[K in `pt:${BbSelectFieldPtPart}` | `pt:${BbSelectPtPart}:${BbSelectPtState}` | `pt:${BbSelectVariantPtPart}:${InputVariantBuiltIn}`]?: PtValue;
|
|
87
|
+
} & /* @vue-ignore */ PtVariantAttrs<BbSelectVariantPtPart, keyof InputVariantRegistry> & {
|
|
88
|
+
[K in `pt:${BbSelectOptionPtPart}`]?: PtValue | ((ctx: PtItemCtx<PtNoInfer<T>, BbSelectPtState, never, BbSelectSlotRow<PtNoInfer<T>, PtNoInfer<Known>>>) => PtItemResult);
|
|
79
89
|
} & {
|
|
80
90
|
/**
|
|
81
91
|
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
82
92
|
* without the prefix. See the `pt:<part>` row.
|
|
83
93
|
*/
|
|
84
|
-
pt?: PtItemMap<BbSelectPtPart, BbSelectOptionPtPart, BbSelectPtState, PtNoInfer<T
|
|
94
|
+
pt?: PtItemMap<BbSelectPtPart, BbSelectOptionPtPart, BbSelectPtState, PtNoInfer<T>, never, BbSelectSlotRow<PtNoInfer<T>, PtNoInfer<Known>>> & {
|
|
95
|
+
[K in `${BbSelectVariantPtPart}:${InputVariantBuiltIn | keyof InputVariantRegistry}`]?: PtValue;
|
|
96
|
+
};
|
|
85
97
|
/**
|
|
86
98
|
* When `true`, the options panel opens as a bottom off-canvas sheet on mobile
|
|
87
99
|
* viewports instead of a floating popover; on desktop it stays a popover.
|
|
@@ -288,9 +300,10 @@ export type BbSelectProps<T> = {
|
|
|
288
300
|
* `{ value, label }` rows naming the value the app already holds, whatever
|
|
289
301
|
* the options' shape: no request until the first open (`prefill: true`
|
|
290
302
|
* still loads). Not options; the options' accessors never run on them;
|
|
291
|
-
* slots get the row as `item` until the list brings
|
|
303
|
+
* slots get the row as `item`, with `known: true`, until the list brings
|
|
304
|
+
* its own.
|
|
292
305
|
*/
|
|
293
|
-
knownItems?:
|
|
306
|
+
knownItems?: [Known] extends [undefined] ? BbSelectKnownItems : Known;
|
|
294
307
|
/**
|
|
295
308
|
* Text content of the label of the element.
|
|
296
309
|
*/
|
|
@@ -470,7 +483,7 @@ export type BbSelectLabelSlotProps = CommonFieldAsteriskSlotProps & {
|
|
|
470
483
|
hasWarnings: boolean;
|
|
471
484
|
};
|
|
472
485
|
/** Props exposed by the `option` slot. */
|
|
473
|
-
export type BbSelectOptionSlotProps<T> = {
|
|
486
|
+
export type BbSelectOptionSlotProps<T, Known extends BbSelectKnownItems | undefined = undefined> = BbSelectSlotRow<T, Known> & {
|
|
474
487
|
/** Whether this option is disabled. */
|
|
475
488
|
disabled: boolean;
|
|
476
489
|
/** Whether this option currently has keyboard focus. */
|
|
@@ -479,8 +492,6 @@ export type BbSelectOptionSlotProps<T> = {
|
|
|
479
492
|
index: number;
|
|
480
493
|
/** Whether the select is in an error state. */
|
|
481
494
|
hasErrors?: boolean;
|
|
482
|
-
/** The raw item from the `items` prop. */
|
|
483
|
-
item: T;
|
|
484
495
|
/** Whether items are still being fetched. */
|
|
485
496
|
loading: boolean;
|
|
486
497
|
/** Whether this option is currently selected. */
|
|
@@ -509,9 +520,7 @@ export type BbSelectGroupSlotProps<T> = {
|
|
|
509
520
|
* Props exposed by the `chip` slot — called once per selected value in
|
|
510
521
|
* `multiple` mode, in place of the default badge.
|
|
511
522
|
*/
|
|
512
|
-
export type BbSelectChipSlotProps<T> = {
|
|
513
|
-
/** The selected item, exactly as it was supplied in `items`. */
|
|
514
|
-
item: T;
|
|
523
|
+
export type BbSelectChipSlotProps<T, Known extends BbSelectKnownItems | undefined = undefined> = BbSelectSlotRow<T, Known> & {
|
|
515
524
|
/** The item's resolved display text (what the default badge prints). */
|
|
516
525
|
text: string;
|
|
517
526
|
/** The item's resolved value — what sits in the v-model. */
|
|
@@ -540,7 +549,7 @@ export type BbSelectPanelSlotProps = {
|
|
|
540
549
|
/** The resolved options that are currently selected. */
|
|
541
550
|
selectedOptions: BbSelectResolvedOption[];
|
|
542
551
|
};
|
|
543
|
-
export type BbSelectSlots<T> = {
|
|
552
|
+
export type BbSelectSlots<T, Known extends BbSelectKnownItems | undefined = undefined> = {
|
|
544
553
|
/**
|
|
545
554
|
* Content pinned to the top of the options panel, above the search field.
|
|
546
555
|
* Rendered in both the desktop popover and the adaptive sheet.
|
|
@@ -592,9 +601,12 @@ export type BbSelectSlots<T> = {
|
|
|
592
601
|
error: unknown;
|
|
593
602
|
}) => any;
|
|
594
603
|
/**
|
|
595
|
-
* Replaces the default rendering of each option row in the dropdown.
|
|
604
|
+
* Replaces the default rendering of each option row in the dropdown. With
|
|
605
|
+
* `known-items` bound, a row the list has not brought yet is the known
|
|
606
|
+
* `{ value, label }` row, `known: true`: check `known` before reading an
|
|
607
|
+
* option field off `item`.
|
|
596
608
|
*/
|
|
597
|
-
option?: (props: BbSelectOptionSlotProps<T>) => any;
|
|
609
|
+
option?: (props: BbSelectOptionSlotProps<T, Known>) => any;
|
|
598
610
|
/**
|
|
599
611
|
* Replaces the default group header rendered above grouped options.
|
|
600
612
|
* Not called for rows with no group (`group-by` gives `null`/`undefined`,
|
|
@@ -603,9 +615,11 @@ export type BbSelectSlots<T> = {
|
|
|
603
615
|
group?: (props: BbSelectGroupSlotProps<T>) => any;
|
|
604
616
|
/**
|
|
605
617
|
* Replaces the default badge rendered for each selection in `multiple` mode.
|
|
606
|
-
* Not called in `comma` mode, nor for the collapsed "+N" summary.
|
|
618
|
+
* Not called in `comma` mode, nor for the collapsed "+N" summary. With
|
|
619
|
+
* `known-items` bound, `item` is the known `{ value, label }` row
|
|
620
|
+
* (`known: true`) until the list brings the real one.
|
|
607
621
|
*/
|
|
608
|
-
chip?: (props: BbSelectChipSlotProps<T>) => any;
|
|
622
|
+
chip?: (props: BbSelectChipSlotProps<T, Known>) => any;
|
|
609
623
|
/**
|
|
610
624
|
* Content rendered as an inline prefix inside the input field.
|
|
611
625
|
*/
|