bitboss-ui 3.0.0-beta.74 → 3.0.0-beta.76
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 +5 -5
- package/bin/cli.mjs +16 -10
- package/dist/ai/BbAlert.md +1 -1
- package/dist/ai/BbAvatar.md +86 -58
- package/dist/ai/BbBadge.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +3 -3
- package/dist/ai/BbButton.md +4 -4
- package/dist/ai/BbCalendar.md +5 -2
- package/dist/ai/BbCheckboxGroup.md +5 -4
- package/dist/ai/BbColorInput.md +13 -1
- package/dist/ai/BbColorPalette.md +12 -7
- package/dist/ai/BbConfirm.md +1 -1
- package/dist/ai/BbDatePicker.md +13 -1
- package/dist/ai/BbDatePickerInput.md +18 -2
- package/dist/ai/BbDialog.md +6 -3
- package/dist/ai/BbDropdown.md +174 -77
- package/dist/ai/BbDropdownButton.md +37 -16
- package/dist/ai/BbGallery.md +3 -2
- package/dist/ai/BbIcon.md +10 -10
- package/dist/ai/BbNumberInput.md +3 -1
- package/dist/ai/BbOffCanvas.md +3 -2
- package/dist/ai/BbPopover.md +1 -1
- package/dist/ai/BbRadioGroup.md +4 -4
- package/dist/ai/BbSelect.md +227 -105
- package/dist/ai/BbSelectPopover.md +139 -14
- package/dist/ai/BbSwitchGroup.md +5 -4
- package/dist/ai/BbTable.md +18 -17
- package/dist/ai/BbTimePicker.md +13 -1
- package/dist/ai/BbTimePickerInput.md +16 -2
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbTree.md +5 -1
- package/dist/ai/CommonPopover.md +1 -0
- package/dist/ai/FlatListBox.md +1 -0
- package/dist/ai/GroupedListBox.md +3 -2
- package/dist/ai/ListBox.md +4 -2
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +310 -7
- package/dist/ai/components.json +33 -35
- package/dist/ai/composables/useToast.md +2 -2
- package/dist/ai/design-tokens.json +60 -0
- package/dist/ai/guides/agent-contract.md +9 -5
- package/dist/ai/guides/calendars-and-digits.md +1 -1
- package/dist/ai/guides/design-tokens.md +13 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/fetch-items-playbook.md +7 -11
- package/dist/ai/guides/icons-policy.md +32 -11
- package/dist/ai/guides/installation-and-plugin-setup.md +24 -23
- package/dist/ai/guides/migration/adoption-checklist.md +1 -1
- package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
- package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
- package/dist/ai/guides/migration/components/bb-icon.md +4 -4
- package/dist/ai/guides/migration/components/bb-table.md +2 -1
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/v2-to-v3.md +70 -24
- package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
- package/dist/ai/guides/migration/v3-beta-tooling.md +1 -0
- package/dist/ai/guides/passthrough.md +58 -58
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/index.md +1 -1
- package/dist/ai/manifest/common.json +1 -0
- package/dist/ai/manifest/components/BbAvatar.json +5 -2
- package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
- package/dist/ai/manifest/components/BbCarousel.json +0 -3
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbColorInput.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
- package/dist/ai/manifest/components/BbDatePicker.json +3 -0
- package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
- package/dist/ai/manifest/components/BbDialog.tree.json +3 -1
- package/dist/ai/manifest/components/BbDropdown.json +36 -28
- package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.tree.json +21 -11
- package/dist/ai/manifest/components/BbDropdownButton.json +24 -16
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +4 -0
- package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +3 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbSelect.json +47 -40
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +14 -7
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +9 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbTable.json +6 -6
- package/dist/ai/manifest/components/BbTable.tree.json +9 -1
- package/dist/ai/manifest/components/BbTimePicker.json +5 -2
- package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
- package/dist/ai/manifest/components/BbTree.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -0
- package/dist/ai/manifest/components/FlatListBox.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +3 -2
- package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
- package/dist/ai/manifest/components/ListBox.json +3 -2
- package/dist/ai/manifest/components/ListBox.tree.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +6 -4
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +0 -3
- package/dist/ai/manifest/types.advanced.json +6 -6
- package/dist/ai/manifest/types.api.json +1 -3
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/onboarding.md +1 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/nuxt/onboarding.md +1 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/source/BbAccordion.md +4 -5
- package/dist/ai/source/BbAvatar.md +128 -11
- package/dist/ai/source/BbBadge.md +18 -7
- package/dist/ai/source/BbBreadcrumbs.md +57 -56
- package/dist/ai/source/BbButton.md +41 -25
- package/dist/ai/source/BbCalendar.md +8 -6
- package/dist/ai/source/BbCarousel.md +41 -34
- package/dist/ai/source/BbCheckboxGroup.md +15 -9
- package/dist/ai/source/BbColorInput.md +19 -0
- package/dist/ai/source/BbColorPalette.md +23 -2
- package/dist/ai/source/BbDatePicker.md +18 -0
- package/dist/ai/source/BbDatePickerInput.md +47 -3
- package/dist/ai/source/BbDialog.md +14 -1
- package/dist/ai/source/BbDropdown.md +296 -99
- package/dist/ai/source/BbDropdownButton.md +61 -19
- package/dist/ai/source/BbDropdownGroup.md +189 -98
- package/dist/ai/source/BbGallery.md +82 -60
- package/dist/ai/source/BbHost.md +12 -0
- package/dist/ai/source/BbNumberInput.md +17 -10
- package/dist/ai/source/BbOffCanvas.md +14 -1
- package/dist/ai/source/BbPagination.md +12 -28
- package/dist/ai/source/BbRadioGroup.md +12 -5
- package/dist/ai/source/BbRating.md +4 -4
- package/dist/ai/source/BbSelect.md +151 -112
- package/dist/ai/source/BbSelectPopover.md +244 -29
- package/dist/ai/source/BbSwitchGroup.md +11 -4
- package/dist/ai/source/BbTable.md +114 -35
- package/dist/ai/source/BbTimePicker.md +19 -0
- package/dist/ai/source/BbTimePickerInput.md +21 -2
- package/dist/ai/source/BbToast.md +2 -2
- package/dist/ai/source/BbToastPortal.md +2 -2
- package/dist/ai/source/BbTree.md +1 -1
- package/dist/ai/source/ClearableButton.md +4 -2
- package/dist/ai/source/CommonPopover.md +24 -1
- package/dist/ai/source/ErrorIcon.md +4 -3
- package/dist/ai/source/FlatListBox.md +33 -7
- package/dist/ai/source/GroupedListBox.md +85 -14
- package/dist/ai/source/ListBox.md +11 -1
- package/dist/ai/source/OptionsContainer.md +29 -11
- package/dist/ai/source/WarningIcon.md +4 -3
- package/dist/assets/svgs/close.svg_raw.js +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +35 -34
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +62 -43
- package/dist/components/BbAvatar/avatarIdentity.js +25 -0
- package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
- package/dist/components/BbAvatar/types.d.ts +24 -5
- package/dist/components/BbAvatar/types.js +5 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +66 -64
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +141 -146
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +240 -239
- package/dist/components/BbCalendar/useDayGrid.js +120 -123
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +503 -502
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
- package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
- package/dist/components/BbColorInput/types.d.ts +7 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +208 -196
- package/dist/components/BbColorPalette/types.d.ts +7 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +3 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +84 -73
- package/dist/components/BbDatePicker/types.d.ts +7 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +4 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +496 -510
- package/dist/components/BbDatePickerInput/types.d.ts +7 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +219 -211
- package/dist/components/BbDialog/leaveGhost.js +22 -17
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +106 -100
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +416 -369
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +404 -354
- package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
- package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +117 -102
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +67 -38
- package/dist/components/BbDropdown/normalizeGroups.js +6 -2
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +44 -20
- package/dist/components/BbDropdown/types.d.ts +109 -87
- package/dist/components/BbDropdown/types.js +3 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +3 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +101 -65
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +153 -57
- package/dist/components/BbDropdownButton/types.d.ts +23 -10
- package/dist/components/BbDropdownButton/types.js +4 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +335 -312
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/BbIcon/iconCache.js +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +9 -5
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +152 -144
- package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +138 -136
- package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -4
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -104
- package/dist/components/BbRadioGroup/types.d.ts +4 -7
- package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +100 -99
- package/dist/components/BbSelect/BbSelect.vue.d.ts +32 -20
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +217 -196
- package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
- package/dist/components/BbSelect/types.d.ts +110 -111
- package/dist/components/BbSelect/types.js +1 -27
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +8 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +728 -653
- package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
- package/dist/components/BbSelectPopover/types.d.ts +32 -17
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
- package/dist/components/BbSwitchGroup/types.d.ts +3 -6
- package/dist/components/BbTable/BbTable.vue.d.ts +2 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1171 -1152
- package/dist/components/BbTable/BbTableDataRow.js +97 -90
- package/dist/components/BbTable/types.d.ts +11 -10
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +145 -134
- package/dist/components/BbTimePicker/types.d.ts +7 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +4 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +290 -280
- package/dist/components/BbTimePickerInput/types.d.ts +7 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -78
- package/dist/components/BbToast/types.d.ts +2 -2
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
- package/dist/components/BbTree/types.d.ts +1 -1
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +9 -8
- package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +13 -1
- package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +122 -102
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +182 -153
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
- package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/composables/useInternalIcon.js +25 -0
- package/dist/composables/useItemsGetter.js +34 -32
- package/dist/composables/useOpenModel.js +20 -0
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/i18n/locales/ar.json +2 -0
- package/dist/i18n/locales/cs.json +2 -0
- package/dist/i18n/locales/da.json +2 -0
- package/dist/i18n/locales/de-CH.json +2 -0
- package/dist/i18n/locales/de.json +2 -0
- package/dist/i18n/locales/el.json +2 -0
- package/dist/i18n/locales/en-GB.json +2 -0
- package/dist/i18n/locales/en.json +2 -0
- package/dist/i18n/locales/es-MX.json +2 -0
- package/dist/i18n/locales/es.json +2 -0
- package/dist/i18n/locales/fa.json +2 -0
- package/dist/i18n/locales/fi.json +2 -0
- package/dist/i18n/locales/fr.json +2 -0
- package/dist/i18n/locales/he.json +2 -0
- package/dist/i18n/locales/hu.json +2 -0
- package/dist/i18n/locales/it.json +2 -0
- package/dist/i18n/locales/ja.json +2 -0
- package/dist/i18n/locales/ko.json +2 -0
- package/dist/i18n/locales/nb.json +2 -0
- package/dist/i18n/locales/nl.json +2 -0
- package/dist/i18n/locales/pl.json +2 -0
- package/dist/i18n/locales/pt-BR.json +2 -0
- package/dist/i18n/locales/pt-PT.json +2 -0
- package/dist/i18n/locales/ro.json +2 -0
- package/dist/i18n/locales/ru.json +2 -0
- package/dist/i18n/locales/sv.json +2 -0
- package/dist/i18n/locales/tr.json +2 -0
- package/dist/i18n/locales/uk.json +2 -0
- package/dist/i18n/locales/zh-CN.json +2 -0
- package/dist/i18n/locales/zh-HK.json +2 -0
- package/dist/i18n/locales/zh-TW.json +2 -0
- package/dist/icon-scan.d.ts +1 -1
- package/dist/icon-scan.js +68 -61
- package/dist/index.d.ts +2 -2
- package/dist/llms-full.txt +1038 -451
- package/dist/llms-medium.txt +33 -28
- package/dist/llms.txt +2 -2
- package/dist/locale-blueprint.json +2 -0
- package/dist/nuxt.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +2 -3
- package/dist/types/Config.d.ts +8 -1
- package/dist/types/ConfigDefaults.d.ts +10 -2
- package/dist/types/Option.d.ts +10 -0
- package/dist/types/internalIcons.d.ts +89 -0
- package/dist/types/internalIcons.js +158 -0
- package/dist/types/ptComponentMap.d.ts +5 -5
- package/dist/utilities/functions/slotContent.js +19 -0
- package/dist/utils/configDefaults.js +75 -64
- package/dist/utils/iconsOption.js +48 -0
- package/dist/utils/loadRetry.js +8 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +10 -16
- package/dist/vite.js +323 -307
- package/llms.txt +2 -2
- package/package.json +3 -1
- package/scripts/README.md +2 -0
- package/scripts/lib/adoption-checklist.json +1 -1
- package/scripts/lib/agent-setup.mjs +44 -26
- package/scripts/lib/update-install.mjs +48 -0
- package/scripts/lib/validate-bb-markup.mjs +93 -12
- package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
- package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
|
@@ -82,8 +82,10 @@
|
|
|
82
82
|
:model-value-debounce-time="modelValueDebounceTime"
|
|
83
83
|
:multiple="multiple"
|
|
84
84
|
:off-canvas-props="resolvedOffCanvasProps"
|
|
85
|
+
:open="openModel"
|
|
85
86
|
:prefill="computedPrefill"
|
|
86
87
|
:pt="popoverPt()"
|
|
88
|
+
:query="queryModel"
|
|
87
89
|
:query-debounce-time="queryDebounceTime"
|
|
88
90
|
:readonly="fieldReadonly"
|
|
89
91
|
:selectable="selectable"
|
|
@@ -91,6 +93,8 @@
|
|
|
91
93
|
:transition-duration="transitionDuration"
|
|
92
94
|
width="100%"
|
|
93
95
|
v-bind="popoverListeners()"
|
|
96
|
+
@update:open="setOpenModel"
|
|
97
|
+
@update:query="setQueryModel"
|
|
94
98
|
>
|
|
95
99
|
<template
|
|
96
100
|
#activator="{
|
|
@@ -367,6 +371,8 @@ import {
|
|
|
367
371
|
import { useMobile } from '@/composables/useMobile';
|
|
368
372
|
import { useConfigDefaults } from '@/composables/useConfigDefaults';
|
|
369
373
|
import { useFormBinding } from '@/composables/useFormBinding';
|
|
374
|
+
import { useOpenProp } from '@/composables/useOpenModel';
|
|
375
|
+
import { useOwnModel } from '@/composables/useOwnModel';
|
|
370
376
|
import { useLocale } from '@/composables/useLocale';
|
|
371
377
|
import {
|
|
372
378
|
formControlPtActive,
|
|
@@ -382,7 +388,7 @@ import { throttle } from '@/utilities/functions/throttle';
|
|
|
382
388
|
import { when } from '@/utilities/functions/when';
|
|
383
389
|
import { hash } from '@/utilities/functions/hash';
|
|
384
390
|
import { reject } from '@/utilities/functions/reject';
|
|
385
|
-
import
|
|
391
|
+
import chevronDownSvgBuiltin from '@/assets/svgs/chevron_down.svg?raw';
|
|
386
392
|
import { provideSheetChipAttrs } from '../BbSelectPopover/sheetChipAttrs';
|
|
387
393
|
import { provideReclickClears } from '../BbSelectPopover/reclickClears';
|
|
388
394
|
import {
|
|
@@ -397,12 +403,13 @@ import {
|
|
|
397
403
|
type BbSelectEvents,
|
|
398
404
|
type BbSelectSlots,
|
|
399
405
|
} from './types';
|
|
400
|
-
|
|
406
|
+
import { useInternalIcon } from '@/composables/useInternalIcon';
|
|
401
407
|
defineOptions({
|
|
402
408
|
// An app's own variants as declared `pt:<part>:<name>` props.
|
|
403
409
|
mixins: [variantPt(BB_SELECT_PT)],
|
|
404
410
|
inheritAttrs: false,
|
|
405
411
|
});
|
|
412
|
+
|
|
406
413
|
const declaredProps = withDefaults(
|
|
407
414
|
defineProps<
|
|
408
415
|
BbSelectProps<T, Known> & /* @vue-ignore */ {
|
|
@@ -454,6 +461,9 @@ const declaredEmit =
|
|
|
454
461
|
defineEmits<BbSelectEvents<SelectModelOf<OptionValueOf<T, A>, M>>>();
|
|
455
462
|
|
|
456
463
|
defineSlots<BbSelectSlots<T, Known>>();
|
|
464
|
+
|
|
465
|
+
const chevronDownSvg = useInternalIcon('expandChevron', chevronDownSvgBuiltin);
|
|
466
|
+
|
|
457
467
|
// Inside a BbForm the field joins it: `props` / `emit` are bound.
|
|
458
468
|
const {
|
|
459
469
|
props,
|
|
@@ -499,6 +509,23 @@ const resolvedLabelMode = computed(() => configDefaults.labelMode);
|
|
|
499
509
|
*/
|
|
500
510
|
const open = ref(false);
|
|
501
511
|
|
|
512
|
+
/**
|
|
513
|
+
* `v-model:open`, handed to the popover bound, so its own
|
|
514
|
+
* open and close paths run and every close writes back here.
|
|
515
|
+
*/
|
|
516
|
+
const { model: openModel, set: setOpenModel } = useOpenProp(
|
|
517
|
+
declaredProps,
|
|
518
|
+
declaredEmit
|
|
519
|
+
);
|
|
520
|
+
|
|
521
|
+
/** `v-model:query`, handed to the popover bound, as `open` is. */
|
|
522
|
+
const { model: queryModel, set: setQueryModel } = useOwnModel<'query', string>(
|
|
523
|
+
declaredProps,
|
|
524
|
+
'query',
|
|
525
|
+
declaredEmit,
|
|
526
|
+
() => ''
|
|
527
|
+
);
|
|
528
|
+
|
|
502
529
|
/**
|
|
503
530
|
* Passthrough. `panel` and `option` are the popover's: their raw entries are forwarded to it under the same words (`panel` → its `panel`, the painted bubble), so `option:selected` is resolved per option where the selection is known.
|
|
504
531
|
*/
|
|
@@ -541,7 +568,14 @@ const popoverPt = () => ({
|
|
|
541
568
|
BB_SELECT_POPOVER_PT.states.filter((state) => state !== 'disabled')
|
|
542
569
|
),
|
|
543
570
|
...passthrough.forward(
|
|
544
|
-
[
|
|
571
|
+
[
|
|
572
|
+
'groupHeader',
|
|
573
|
+
'option',
|
|
574
|
+
'itemText',
|
|
575
|
+
'itemIcon',
|
|
576
|
+
'itemDescription',
|
|
577
|
+
'check',
|
|
578
|
+
],
|
|
545
579
|
BB_SELECT_POPOVER_PT.states
|
|
546
580
|
),
|
|
547
581
|
});
|
|
@@ -582,7 +616,9 @@ const resolvedOffCanvasProps = computed(() => ({
|
|
|
582
616
|
|
|
583
617
|
/** The chevron unless the consumer sets their own append icon. */
|
|
584
618
|
const appendIcon = computed(() =>
|
|
585
|
-
props['append:icon'] === undefined
|
|
619
|
+
props['append:icon'] === undefined
|
|
620
|
+
? chevronDownSvg.value
|
|
621
|
+
: props['append:icon']
|
|
586
622
|
);
|
|
587
623
|
|
|
588
624
|
/** No cap on the chip labels unless `maxSelectedLabels` is set. */
|
|
@@ -897,31 +933,28 @@ import type { BbSelectPtKeys } from './ptKeys.generated';
|
|
|
897
933
|
*
|
|
898
934
|
* @describedBy BbSelectPopoverPtPart
|
|
899
935
|
* @describedBy TextControlPtPart
|
|
900
|
-
* @part root - The field's outer container
|
|
901
|
-
*
|
|
902
|
-
* `panel`.
|
|
903
|
-
* @part clear - The ✕
|
|
904
|
-
*
|
|
905
|
-
* @part activator - The button
|
|
906
|
-
*
|
|
907
|
-
*
|
|
908
|
-
*
|
|
909
|
-
*
|
|
910
|
-
*
|
|
911
|
-
* one (see `disable-writing`) — handed to the `BbSelectPopover` as its own
|
|
912
|
-
* `pt:input`. Its ✕ is chrome.
|
|
936
|
+
* @part root - The field's outer container (label, box, the lines under
|
|
937
|
+
* it); a `class` on the component lands here. The options surface is
|
|
938
|
+
* `panel`.
|
|
939
|
+
* @part clear - The field's ✕ that empties the selection (`clearable`): one
|
|
940
|
+
* node, never a chip's ✕.
|
|
941
|
+
* @part activator - The button that opens the options: the field's control,
|
|
942
|
+
* not a text field (`data-test` fits, `autocomplete` does not). The chevron
|
|
943
|
+
* is chrome. `activator`, not the family's `input`: the field is a button,
|
|
944
|
+
* as the date / time inputs' trigger.
|
|
945
|
+
* @part input - The options surface's search field, when shown (see
|
|
946
|
+
* `disable-writing`): the `BbSelectPopover`'s `pt:input`. Its ✕ is chrome.
|
|
913
947
|
* @part panel - The options surface — the popover's painted bubble on
|
|
914
948
|
* desktop, the sheet itself on a phone.
|
|
915
949
|
* @part sheet - The bottom sheet the options open in on a phone only.
|
|
916
|
-
* @part header - The band around your `#header` slot:
|
|
917
|
-
*
|
|
918
|
-
* @part footer - The band around your `#footer` slot:
|
|
919
|
-
*
|
|
920
|
-
* @part badge - Each selected value's `BbBadge` root with `multiple
|
|
921
|
-
*
|
|
922
|
-
*
|
|
923
|
-
*
|
|
924
|
-
* sheet's chips are always badges.
|
|
950
|
+
* @part header - The band around your `#header` slot: atop the flyout, the
|
|
951
|
+
* sheet's header on a phone.
|
|
952
|
+
* @part footer - The band around your `#footer` slot: under the flyout's
|
|
953
|
+
* list, the sheet's footer on a phone.
|
|
954
|
+
* @part badge - Each selected value's `BbBadge` root with `multiple`, per
|
|
955
|
+
* value, in the field and on the phone sheet. Its ✕ is chrome, never
|
|
956
|
+
* `clear`. The field has none under `#chip` or `comma`; the sheet's chips
|
|
957
|
+
* are always badges.
|
|
925
958
|
* @part comma - Each selected value with `multiple` and `comma` — a broadcast
|
|
926
959
|
* resolved per value.
|
|
927
960
|
*/
|
|
@@ -944,6 +977,7 @@ export type BbSelectPtPart =
|
|
|
944
977
|
| 'header'
|
|
945
978
|
| 'footer'
|
|
946
979
|
| 'list'
|
|
980
|
+
| 'groupHeader'
|
|
947
981
|
| 'option'
|
|
948
982
|
| 'itemText'
|
|
949
983
|
| 'itemIcon'
|
|
@@ -970,7 +1004,8 @@ export type BbSelectFieldPtPart =
|
|
|
970
1004
|
| 'sheet'
|
|
971
1005
|
| 'header'
|
|
972
1006
|
| 'footer'
|
|
973
|
-
| 'list'
|
|
1007
|
+
| 'list'
|
|
1008
|
+
| 'groupHeader';
|
|
974
1009
|
/**
|
|
975
1010
|
* The option parts and the selection parts — broadcasts resolved per option
|
|
976
1011
|
* or per selected value; their base key also takes a per-item function.
|
|
@@ -990,7 +1025,7 @@ export type BbSelectOptionPtPart =
|
|
|
990
1025
|
* chosen option.
|
|
991
1026
|
* @state disabled - Component-wide while the select is `disabled`; also per
|
|
992
1027
|
* node, on `option`, its `item-*` parts and `check`: an option that is
|
|
993
|
-
* disabled.
|
|
1028
|
+
* disabled; on `groupHeader`: all its group's options are.
|
|
994
1029
|
* @state open - Component-wide: the options surface is showing.
|
|
995
1030
|
*/
|
|
996
1031
|
export type BbSelectPtState = FormControlPtState | 'open' | 'selected';
|
|
@@ -1015,6 +1050,7 @@ export type BbSelectKeptPtPart =
|
|
|
1015
1050
|
| 'header'
|
|
1016
1051
|
| 'footer'
|
|
1017
1052
|
| 'list'
|
|
1053
|
+
| 'groupHeader'
|
|
1018
1054
|
| 'option'
|
|
1019
1055
|
| 'itemText'
|
|
1020
1056
|
| 'itemIcon'
|
|
@@ -1079,6 +1115,7 @@ export const BB_SELECT_PT = {
|
|
|
1079
1115
|
'header',
|
|
1080
1116
|
'footer',
|
|
1081
1117
|
'list',
|
|
1118
|
+
'groupHeader',
|
|
1082
1119
|
'option',
|
|
1083
1120
|
'itemText',
|
|
1084
1121
|
'itemIcon',
|
|
@@ -1194,6 +1231,17 @@ export type BbSelectProps<
|
|
|
1194
1231
|
) => PtItemResult);
|
|
1195
1232
|
} & {
|
|
1196
1233
|
/* eslint-enable @typescript-eslint/consistent-indexed-object-style */
|
|
1234
|
+
/**
|
|
1235
|
+
* Whether the panel is open (`v-model:open`; `v-model` stays the value).
|
|
1236
|
+
* Bound, the app opens and closes it; unbound, the initial state.
|
|
1237
|
+
*/
|
|
1238
|
+
open?: boolean;
|
|
1239
|
+
/**
|
|
1240
|
+
* The search field's text (`v-model:query`): raw per keystroke, `''`
|
|
1241
|
+
* when the component empties it; a write searches at once (guide §
|
|
1242
|
+
* Reading and restoring the search).
|
|
1243
|
+
*/
|
|
1244
|
+
query?: string;
|
|
1197
1245
|
/**
|
|
1198
1246
|
* Passthrough, object form: the same keys as the `pt:*` attributes
|
|
1199
1247
|
* without the prefix. See the `pt:<part>` row.
|
|
@@ -1211,10 +1259,8 @@ export type BbSelectProps<
|
|
|
1211
1259
|
};
|
|
1212
1260
|
/* eslint-enable @typescript-eslint/consistent-indexed-object-style */
|
|
1213
1261
|
/**
|
|
1214
|
-
*
|
|
1215
|
-
*
|
|
1216
|
-
*
|
|
1217
|
-
* When unset, falls back to the global `all.adaptive`.
|
|
1262
|
+
* `true`: on mobile viewports the options open in a bottom sheet, not a
|
|
1263
|
+
* popover (desktop keeps the popover). Unset: the global `all.adaptive`.
|
|
1218
1264
|
* @defaultValue `all.adaptive` (`true`)
|
|
1219
1265
|
*/
|
|
1220
1266
|
adaptive?: boolean;
|
|
@@ -1227,17 +1273,17 @@ export type BbSelectProps<
|
|
|
1227
1273
|
description?: string;
|
|
1228
1274
|
|
|
1229
1275
|
/**
|
|
1230
|
-
* Props for the phone sheet (the `BbOffCanvas`
|
|
1231
|
-
*
|
|
1232
|
-
*
|
|
1276
|
+
* Props for the phone sheet (the `BbOffCanvas` `adaptive` renders), over
|
|
1277
|
+
* its defaults. A `pt` inside styles only the sheet (passthrough guide §
|
|
1278
|
+
* Inside the sheet).
|
|
1233
1279
|
*/
|
|
1234
1280
|
offCanvasProps?: Partial<BbOffCanvasProps>;
|
|
1235
1281
|
|
|
1236
1282
|
/**
|
|
1237
1283
|
* Hides the panel's search field: `true` everywhere, `'mobile'` /
|
|
1238
|
-
* `'desktop'` on that platform
|
|
1239
|
-
*
|
|
1240
|
-
*
|
|
1284
|
+
* `'desktop'` on that platform. `'auto'`, per open: for an array `items`
|
|
1285
|
+
* shorter than the plugin's `autoDisableWritingThreshold` (6), never for a
|
|
1286
|
+
* provider or with an `option:add` listener.
|
|
1241
1287
|
*
|
|
1242
1288
|
* @defaultValue `'auto'`
|
|
1243
1289
|
*/
|
|
@@ -1263,14 +1309,14 @@ export type BbSelectProps<
|
|
|
1263
1309
|
autofocus?: InputHTMLAttributes['autofocus'];
|
|
1264
1310
|
|
|
1265
1311
|
/**
|
|
1266
|
-
*
|
|
1267
|
-
*
|
|
1312
|
+
* A clear button while the field has a value and is interacted with; a
|
|
1313
|
+
* single select also clears when its pick is clicked again.
|
|
1268
1314
|
*/
|
|
1269
1315
|
clearable?: boolean;
|
|
1270
1316
|
|
|
1271
1317
|
/**
|
|
1272
|
-
*
|
|
1273
|
-
*
|
|
1318
|
+
* Shows the picks as one comma-separated string; no close button to
|
|
1319
|
+
* deselect one there.
|
|
1274
1320
|
*/
|
|
1275
1321
|
comma?: boolean;
|
|
1276
1322
|
|
|
@@ -1283,10 +1329,10 @@ export type BbSelectProps<
|
|
|
1283
1329
|
compact?: boolean;
|
|
1284
1330
|
|
|
1285
1331
|
/**
|
|
1286
|
-
* The field box's look
|
|
1287
|
-
*
|
|
1288
|
-
*
|
|
1289
|
-
*
|
|
1332
|
+
* The field box's look: `BbButton`'s names and tokens, colours only (a
|
|
1333
|
+
* form never reflows). `'ghost'` has no border in any state; `'none'` no
|
|
1334
|
+
* look at all (you own hover, focus, states). More via the plugin's
|
|
1335
|
+
* `components.BbSelect.variants`.
|
|
1290
1336
|
*
|
|
1291
1337
|
* @defaultValue `'outline'`
|
|
1292
1338
|
*/
|
|
@@ -1329,10 +1375,10 @@ export type BbSelectProps<
|
|
|
1329
1375
|
disabled?: boolean;
|
|
1330
1376
|
|
|
1331
1377
|
/**
|
|
1332
|
-
* After
|
|
1333
|
-
*
|
|
1334
|
-
*
|
|
1335
|
-
*
|
|
1378
|
+
* After each successful non-search load, drops the picks the fetched rows
|
|
1379
|
+
* lack (a single model goes `null`). A `stash` does not count; a
|
|
1380
|
+
* `known-items` value stays until a parent change; a search or failed load
|
|
1381
|
+
* never prunes.
|
|
1336
1382
|
*/
|
|
1337
1383
|
enforceCoherence?: boolean;
|
|
1338
1384
|
|
|
@@ -1344,11 +1390,10 @@ export type BbSelectProps<
|
|
|
1344
1390
|
errors?: string | string[];
|
|
1345
1391
|
|
|
1346
1392
|
/**
|
|
1347
|
-
* What typing filters on: empty =
|
|
1348
|
-
*
|
|
1349
|
-
*
|
|
1350
|
-
*
|
|
1351
|
-
* "No results".
|
|
1393
|
+
* What typing filters on: empty = display text and description; item paths
|
|
1394
|
+
* = those fields (`['name', 'email']`); `false` = none. Ranked, case- and
|
|
1395
|
+
* accent-blind (guide § Search). `false` when the provider matched on the
|
|
1396
|
+
* server, or its email matches show "No results".
|
|
1352
1397
|
*
|
|
1353
1398
|
* @defaultValue `[]`
|
|
1354
1399
|
*/
|
|
@@ -1398,24 +1443,22 @@ export type BbSelectProps<
|
|
|
1398
1443
|
id?: HTMLAttributes['id'];
|
|
1399
1444
|
|
|
1400
1445
|
/**
|
|
1401
|
-
* The options: an array, or a provider called with a
|
|
1402
|
-
* `BbSelectItemsContext` (`query`, `reason`, `modelValue`, `signal`)
|
|
1403
|
-
*
|
|
1404
|
-
* by
|
|
1446
|
+
* The options: an array, or a provider (sync or async) called with a
|
|
1447
|
+
* `BbSelectItemsContext` (`query`, `reason`, `modelValue`, `signal`).
|
|
1448
|
+
* Branch on `reason !== 'search'` to resolve the selection by id. It fails
|
|
1449
|
+
* by THROWING, never by returning `[]`.
|
|
1405
1450
|
*/
|
|
1406
1451
|
items: T[] | ((context: BbSelectItemsContext) => T[] | Promise<T[]>);
|
|
1407
1452
|
|
|
1408
1453
|
/**
|
|
1409
|
-
*
|
|
1410
|
-
*
|
|
1411
|
-
* is set. An explicit value wins on every viewport.
|
|
1454
|
+
* Group header height (px), with `groupBy`: 32 (24 compact; 36 / 32 on
|
|
1455
|
+
* mobile viewports). An explicit value wins on every viewport.
|
|
1412
1456
|
*/
|
|
1413
1457
|
headerHeight?: number;
|
|
1414
1458
|
|
|
1415
1459
|
/**
|
|
1416
|
-
*
|
|
1417
|
-
*
|
|
1418
|
-
* every viewport.
|
|
1460
|
+
* Option height (px): 28 (24 compact; 44 / 36 on mobile viewports). An
|
|
1461
|
+
* explicit value wins on every viewport.
|
|
1419
1462
|
*
|
|
1420
1463
|
* @defaultValue `28`
|
|
1421
1464
|
*/
|
|
@@ -1432,10 +1475,10 @@ export type BbSelectProps<
|
|
|
1432
1475
|
itemText?: ItemAccessor<T, string>;
|
|
1433
1476
|
|
|
1434
1477
|
/**
|
|
1435
|
-
*
|
|
1436
|
-
*
|
|
1437
|
-
*
|
|
1438
|
-
*
|
|
1478
|
+
* EXTRA row fields, never text or value: `description` (a muted line under
|
|
1479
|
+
* the label), `prepend:icon`, `append:icon`. Paths or getters per field, or
|
|
1480
|
+
* a function of the item. Nothing is read implicitly; none shows in the
|
|
1481
|
+
* trigger or chips.
|
|
1439
1482
|
*/
|
|
1440
1483
|
itemProps?: BbSelectItemProps<T>;
|
|
1441
1484
|
|
|
@@ -1452,9 +1495,8 @@ export type BbSelectProps<
|
|
|
1452
1495
|
/**
|
|
1453
1496
|
* `{ value, label }` rows naming the value the app already holds, whatever
|
|
1454
1497
|
* the options' shape: no request until the first open (`prefill: true`
|
|
1455
|
-
* still loads). Not options
|
|
1456
|
-
*
|
|
1457
|
-
* its own.
|
|
1498
|
+
* still loads). Not options, so no accessor runs on them; slots get the row
|
|
1499
|
+
* as `item`, `known: true`, until the list brings its own.
|
|
1458
1500
|
*/
|
|
1459
1501
|
knownItems?: [Known] extends [undefined] ? BbSelectKnownItems : Known;
|
|
1460
1502
|
|
|
@@ -1492,8 +1534,8 @@ export type BbSelectProps<
|
|
|
1492
1534
|
max?: number;
|
|
1493
1535
|
|
|
1494
1536
|
/**
|
|
1495
|
-
*
|
|
1496
|
-
*
|
|
1537
|
+
* Labels shown before collapsing to a count summary. Unset, they collapse
|
|
1538
|
+
* only when they overflow the field.
|
|
1497
1539
|
*
|
|
1498
1540
|
* @defaultValue `Infinity`
|
|
1499
1541
|
*/
|
|
@@ -1501,8 +1543,8 @@ export type BbSelectProps<
|
|
|
1501
1543
|
|
|
1502
1544
|
/**
|
|
1503
1545
|
* Characters to type (trimmed) before the query searches. Below it the
|
|
1504
|
-
* query counts as empty: no `'search'` call, no filtering
|
|
1505
|
-
*
|
|
1546
|
+
* query counts as empty: no `'search'` call, no filtering; the panel says
|
|
1547
|
+
* how many to type. Slots still get the typed `query`.
|
|
1506
1548
|
*
|
|
1507
1549
|
* @defaultValue `0`
|
|
1508
1550
|
*/
|
|
@@ -1537,8 +1579,8 @@ export type BbSelectProps<
|
|
|
1537
1579
|
emptyText?: string;
|
|
1538
1580
|
|
|
1539
1581
|
/**
|
|
1540
|
-
*
|
|
1541
|
-
*
|
|
1582
|
+
* The empty state's text while the latest load FAILED (the provider
|
|
1583
|
+
* threw): `emptyText`'s twin for that case.
|
|
1542
1584
|
*
|
|
1543
1585
|
* @defaultValue the localized `common.failedText` ("Couldn't load items")
|
|
1544
1586
|
*/
|
|
@@ -1557,9 +1599,8 @@ export type BbSelectProps<
|
|
|
1557
1599
|
|
|
1558
1600
|
/**
|
|
1559
1601
|
* When the options first load: `'interaction'` on first open, `true` on
|
|
1560
|
-
* mount, `false`
|
|
1561
|
-
*
|
|
1562
|
-
* once.
|
|
1602
|
+
* mount, `false` once the user types (on open with `disable-writing`). An
|
|
1603
|
+
* array `items` or a seeded model loads at once.
|
|
1563
1604
|
*
|
|
1564
1605
|
* @defaultValue `'interaction'`
|
|
1565
1606
|
*/
|
|
@@ -1604,16 +1645,14 @@ export type BbSelectProps<
|
|
|
1604
1645
|
selectable?: boolean | ((item: T) => boolean);
|
|
1605
1646
|
|
|
1606
1647
|
/**
|
|
1607
|
-
*
|
|
1608
|
-
* is greater than `maxSelectedLabels`.
|
|
1648
|
+
* The text shown when the selected labels outnumber `maxSelectedLabels`.
|
|
1609
1649
|
*/
|
|
1610
1650
|
selectedLabelsFn?: (count: number) => string;
|
|
1611
1651
|
|
|
1612
1652
|
/**
|
|
1613
|
-
* Keeps
|
|
1614
|
-
*
|
|
1615
|
-
*
|
|
1616
|
-
* `enforce-coherence` still prunes it.
|
|
1653
|
+
* Keeps picks named (chips keep their text) when a later search or failed
|
|
1654
|
+
* load stops returning them. It follows the model; it does not keep a pick
|
|
1655
|
+
* valid (`enforce-coherence` still prunes it).
|
|
1617
1656
|
*/
|
|
1618
1657
|
stash?: boolean;
|
|
1619
1658
|
|
|
@@ -1635,6 +1674,10 @@ export type BbSelectEvents<V = any> = {
|
|
|
1635
1674
|
(e: 'shown'): void;
|
|
1636
1675
|
/** Emitted as soon as the options surface starts to close. */
|
|
1637
1676
|
(e: 'hide'): void;
|
|
1677
|
+
/** The panel opened or closed (`v-model:open`). */
|
|
1678
|
+
(e: 'update:open', value: boolean): void;
|
|
1679
|
+
/** `v-model:query`: the search field's text. */
|
|
1680
|
+
(e: 'update:query', value: string): void;
|
|
1638
1681
|
/** Emitted once the options surface has finished closing. */
|
|
1639
1682
|
(e: 'hidden'): void;
|
|
1640
1683
|
/** Emitted when the activator loses focus. Forwards the original DOM `FocusEvent`. */
|
|
@@ -1654,9 +1697,9 @@ export type BbSelectEvents<V = any> = {
|
|
|
1654
1697
|
|
|
1655
1698
|
(e: 'update:modelValue', value: V): void;
|
|
1656
1699
|
/**
|
|
1657
|
-
*
|
|
1658
|
-
* the
|
|
1659
|
-
*
|
|
1700
|
+
* The typed text, when the user confirms a value not in the list (Enter in
|
|
1701
|
+
* the search field). Binding it keeps the field writable: the select is
|
|
1702
|
+
* creatable.
|
|
1660
1703
|
*/
|
|
1661
1704
|
(e: 'option:add', text: string): void;
|
|
1662
1705
|
};
|
|
@@ -1771,13 +1814,13 @@ export type BbSelectSlots<
|
|
|
1771
1814
|
Known extends BbSelectKnownItems | undefined = undefined,
|
|
1772
1815
|
> = {
|
|
1773
1816
|
/**
|
|
1774
|
-
*
|
|
1775
|
-
*
|
|
1817
|
+
* Pinned atop the options panel, above the search field, on the popover
|
|
1818
|
+
* and the phone sheet alike.
|
|
1776
1819
|
*/
|
|
1777
1820
|
header?: (props: BbSelectPanelSlotProps) => any;
|
|
1778
1821
|
/**
|
|
1779
|
-
*
|
|
1780
|
-
*
|
|
1822
|
+
* Pinned under the options list, on the popover and the phone sheet
|
|
1823
|
+
* alike.
|
|
1781
1824
|
*/
|
|
1782
1825
|
footer?: (props: BbSelectPanelSlotProps) => any;
|
|
1783
1826
|
/**
|
|
@@ -1800,8 +1843,8 @@ export type BbSelectSlots<
|
|
|
1800
1843
|
*/
|
|
1801
1844
|
label?: (props: BbSelectLabelSlotProps) => any;
|
|
1802
1845
|
/**
|
|
1803
|
-
* Replaces the description text
|
|
1804
|
-
* renders the
|
|
1846
|
+
* Replaces the description text; alone (no `description` prop) it still
|
|
1847
|
+
* renders the region, wired into `aria-describedby`.
|
|
1805
1848
|
*/
|
|
1806
1849
|
description?: (props: BbSelectDescriptionSlotProps) => any;
|
|
1807
1850
|
/**
|
|
@@ -1809,35 +1852,31 @@ export type BbSelectSlots<
|
|
|
1809
1852
|
*/
|
|
1810
1853
|
loading?: (props: { query: string }) => any;
|
|
1811
1854
|
/**
|
|
1812
|
-
*
|
|
1813
|
-
*
|
|
1814
|
-
*
|
|
1815
|
-
* focus out of it.
|
|
1855
|
+
* Shown when no option matches the query or the list is empty; a failed
|
|
1856
|
+
* load shows the failure row instead (`failed-text`, "Try again").
|
|
1857
|
+
* `close()` closes the panel, for an action that keeps focus in it.
|
|
1816
1858
|
*/
|
|
1817
1859
|
empty?: (props: {
|
|
1818
1860
|
query: string;
|
|
1819
1861
|
focus: () => void;
|
|
1820
1862
|
close: () => Promise<void>;
|
|
1821
|
-
error: unknown;
|
|
1822
1863
|
}) => any;
|
|
1823
1864
|
/**
|
|
1824
|
-
*
|
|
1825
|
-
*
|
|
1826
|
-
* `
|
|
1827
|
-
* option field off `item`.
|
|
1865
|
+
* Each option row's content. With `known-items`, a row the list has not
|
|
1866
|
+
* brought yet is the known `{ value, label }` row (`known: true`): check
|
|
1867
|
+
* `known` before reading an option field off `item`.
|
|
1828
1868
|
*/
|
|
1829
1869
|
option?: (props: BbSelectOptionSlotProps<T, Known>) => any;
|
|
1830
1870
|
/**
|
|
1831
|
-
*
|
|
1832
|
-
*
|
|
1833
|
-
*
|
|
1871
|
+
* Each group heading's content (`pt:group-header` styles its box). Not
|
|
1872
|
+
* called for rows with no group (`group-by` gives `null`/`undefined`, known
|
|
1873
|
+
* rows): they are listed without one.
|
|
1834
1874
|
*/
|
|
1835
1875
|
group?: (props: BbSelectGroupSlotProps<T>) => any;
|
|
1836
1876
|
/**
|
|
1837
|
-
*
|
|
1838
|
-
*
|
|
1839
|
-
* `known
|
|
1840
|
-
* (`known: true`) until the list brings the real one.
|
|
1877
|
+
* Each selection's badge with `multiple` (not in `comma` mode, nor the
|
|
1878
|
+
* "+N" summary). With `known-items`, `item` is the known `{ value, label }`
|
|
1879
|
+
* row (`known: true`) until the list brings the real one.
|
|
1841
1880
|
*/
|
|
1842
1881
|
chip?: (props: BbSelectChipSlotProps<T, Known>) => any;
|
|
1843
1882
|
/**
|