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
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
| `pt:itemText` | `span.bb-listbox__item-text` | `FlatListBox` _(internal)_ |
|
|
28
28
|
| `pt:itemDescription` | `span.bb-listbox__item-description` | `FlatListBox` _(internal)_ |
|
|
29
29
|
| `pt:check` | the root of `BbIcon` | `BbIcon` ([contract](./BbIcon.md)) |
|
|
30
|
+
| `pt:groupHeader` | `span.bb-listbox__group-header` | `GroupedListBox` _(internal)_ |
|
|
30
31
|
|
|
31
32
|
**CSS variables you can set through those parts** — declared deeper in the tree, so set one on the part that reads it (`pt:<part>="[--name:value]"`), never on `BbSelectPopover`'s root:
|
|
32
33
|
|
|
@@ -436,8 +437,9 @@ Items playbook. The essentials:
|
|
|
436
437
|
chips stay accurate; `modelValue` is your v-model as-is (typed `any`);
|
|
437
438
|
`signal` is an `AbortSignal` to pass to every request.
|
|
438
439
|
- A provider **throws** to fail (never `return []`, an applied empty result):
|
|
439
|
-
the rows are cleared, nothing is pruned,
|
|
440
|
-
|
|
440
|
+
the rows are cleared, nothing is pruned, and the failure row shows
|
|
441
|
+
`failed-text` with a built-in "Try again" (`#empty` is for empty results
|
|
442
|
+
only). A pick no row has
|
|
441
443
|
named yet still shows (trigger text, phone-sheet chip): its value as given
|
|
442
444
|
when it is a string or a number, else no text.
|
|
443
445
|
|
|
@@ -579,7 +581,7 @@ but only on a host that can transfer the result — see
|
|
|
579
581
|
Opening the panel is not a search, so it loads nothing; until the first query the
|
|
580
582
|
list shows a _"search to begin"_ hint instead of "no data".
|
|
581
583
|
|
|
582
|
-
`:min-query-length="3"` makes a shorter query (
|
|
584
|
+
`:min-query-length="3"` makes a shorter query (characters after trimming; an emoji is one) count as empty: no
|
|
583
585
|
`'search'` call and no filtering, the hint says "Type at least 3 characters",
|
|
584
586
|
and Enter emits no `option:add`. Slots still get the typed `query`.
|
|
585
587
|
|
|
@@ -1074,6 +1076,12 @@ closed-but-growable vocabularies — the same as `BbSelect`. The behaviour is ga
|
|
|
1074
1076
|
by the search field existing; `disable-writing` (which removes the field) also
|
|
1075
1077
|
disables it.
|
|
1076
1078
|
|
|
1079
|
+
While you listen to `option:add`, a typed query that no option matches
|
|
1080
|
+
exactly (case aside) also gets a **"Create «query»" row**: last after the
|
|
1081
|
+
matches, or the only row when nothing matches (in place of the no-results
|
|
1082
|
+
text and `#empty`). It is a real option (click, arrow keys, announced) and
|
|
1083
|
+
does what Enter does; not while the list loads or after a failed load.
|
|
1084
|
+
|
|
1077
1085
|
```ts
|
|
1078
1086
|
const roles = ref<string[]>(['Reviewer', 'Approver']);
|
|
1079
1087
|
const role = ref<string | null>(null);
|
|
@@ -1639,12 +1647,119 @@ popover ↔ sheet. `off-canvas-props` forwards extra `BbOffCanvas` props to the
|
|
|
1639
1647
|
sheet (`size`, `draggable`, `fullscreen`, `stack`); `:adaptive="false"` keeps a
|
|
1640
1648
|
floating popover everywhere.
|
|
1641
1649
|
|
|
1650
|
+
### Opening from code: `v-model:open`
|
|
1651
|
+
|
|
1652
|
+
`v-model` is the value; `v-model:open` is whether the options panel is open. Bound,
|
|
1653
|
+
your ref opens and closes it, and every open and close the user makes is
|
|
1654
|
+
written back: a pick, Escape, a click outside, the phone sheet's own dismiss. A static `:open` with no
|
|
1655
|
+
listener is only the initial state. An open from code is the same open a
|
|
1656
|
+
click makes (focus moves into the panel), and `disabled` / `readonly` refuse it (the ref is set back
|
|
1657
|
+
to `false`).
|
|
1658
|
+
|
|
1659
|
+
### Reading and restoring the search: `v-model:query`
|
|
1660
|
+
|
|
1661
|
+
`v-model:query` is the search field's text. Bound, your ref reads it and sets
|
|
1662
|
+
it:
|
|
1663
|
+
|
|
1664
|
+
- **It mirrors the field, raw.** Every committed keystroke is written back as
|
|
1665
|
+
typed, spaces included (an IME composition once, when it ends), and `''`
|
|
1666
|
+
whenever the component empties the field itself: closing, a pick that
|
|
1667
|
+
closes, `option:add` (Enter or the create row), the ✕.
|
|
1668
|
+
- **A write is a search the user didn't type.** It runs at once, without
|
|
1669
|
+
the debounce, and supersedes a scheduled or in-flight search (its late
|
|
1670
|
+
answer never lands). Written while closed, it is held for the next open:
|
|
1671
|
+
`query = 'Rossi'; open = true` sends one request, for "Rossi". A write
|
|
1672
|
+
never opens the panel or moves focus, and is never echoed back.
|
|
1673
|
+
- **A write that can't land writes `''` back:** no search field
|
|
1674
|
+
(`disable-writing`), `disabled`, `readonly`, a refused open.
|
|
1675
|
+
- Unbound, a static `:query` seeds the next open.
|
|
1676
|
+
|
|
1677
|
+
The case it is for: bring a search back. The create row hands the query to
|
|
1678
|
+
`option:add` and empties the field; if the user cancels the dialog, put the
|
|
1679
|
+
query back and reopen, and "Create «Rossi»" is there again:
|
|
1680
|
+
|
|
1681
|
+
```vue
|
|
1682
|
+
<script setup lang="ts">
|
|
1683
|
+
import { ref } from 'vue';
|
|
1684
|
+
import { BbButton, BbSelectPopover, useBbDialog } from 'bitboss-ui';
|
|
1685
|
+
import CreatePersonDialog from './CreatePersonDialog.vue';
|
|
1686
|
+
|
|
1687
|
+
const person = ref<number | null>(null);
|
|
1688
|
+
const open = ref(false);
|
|
1689
|
+
const query = ref('');
|
|
1690
|
+
const createPerson = useBbDialog(CreatePersonDialog);
|
|
1691
|
+
|
|
1692
|
+
const onAdd = async (text: string) => {
|
|
1693
|
+
const result = await createPerson.show({ name: text });
|
|
1694
|
+
if (result.completed) return void (person.value = result.value.id);
|
|
1695
|
+
query.value = text;
|
|
1696
|
+
open.value = true;
|
|
1697
|
+
};
|
|
1698
|
+
</script>
|
|
1699
|
+
|
|
1700
|
+
<template>
|
|
1701
|
+
<BbSelectPopover
|
|
1702
|
+
v-model="person"
|
|
1703
|
+
v-model:open="open"
|
|
1704
|
+
v-model:query="query"
|
|
1705
|
+
item-text="name"
|
|
1706
|
+
item-value="id"
|
|
1707
|
+
:items="searchPeople"
|
|
1708
|
+
@option:add="onAdd"
|
|
1709
|
+
>
|
|
1710
|
+
<template #activator="{ props, text }">
|
|
1711
|
+
<BbButton v-bind="props">{{ text || 'Person' }}</BbButton>
|
|
1712
|
+
</template>
|
|
1713
|
+
</BbSelectPopover>
|
|
1714
|
+
</template>
|
|
1715
|
+
```
|
|
1716
|
+
|
|
1717
|
+
#### The state matrix
|
|
1718
|
+
|
|
1719
|
+
What a write does in each state, what the component emits, and where focus
|
|
1720
|
+
is. Each row is a test in `BbSelectPopover.queryModel.test.ts`.
|
|
1721
|
+
|
|
1722
|
+
| State | An app write | Emits | Focus | Test |
|
|
1723
|
+
| ---------------------------------- | ------------------------------------------ | -------------------------------- | --------- | ---------------------------------------- |
|
|
1724
|
+
| Closed | held for the next open; nothing fetched | nothing | unmoved | closed: a write is held |
|
|
1725
|
+
| Opening, query first | the open searches it: one request, at once | nothing | the field | query then open in one tick |
|
|
1726
|
+
| Opening, open first | the same single request | nothing | the field | open then query in one tick |
|
|
1727
|
+
| Opened from code with a held query | the field reads it | nothing | the field | an open from code with a held query |
|
|
1728
|
+
| Search-first (`prefill: false`) | the held query is searched at open | nothing | the field | search-first |
|
|
1729
|
+
| Static items | filters at once, create row included | nothing | the field | static items |
|
|
1730
|
+
| Open, idle | searches at once, no debounce | nothing | unmoved | open and idle |
|
|
1731
|
+
| Open, any write | never moves focus | nothing | unmoved | a write never moves focus |
|
|
1732
|
+
| Equal to the query | nothing | nothing | unmoved | a write equal to the query |
|
|
1733
|
+
| Typing | — | each keystroke, raw | the field | typing |
|
|
1734
|
+
| Typing, then a write | replaces the field | nothing (not echoed) | the field | a write while typing |
|
|
1735
|
+
| The app rewrites in its handler | applied once, no loop | the typed text | the field | an app that rewrites the query |
|
|
1736
|
+
| Debounce pending | drops the scheduled search, searches now | nothing | unmoved | a write while … debounced |
|
|
1737
|
+
| Fetch in flight | aborts it; its late answer never lands | nothing | unmoved | a write while a fetch is in flight |
|
|
1738
|
+
| Below `min-query-length` | kept raw; no fetch; the hint shows | nothing | unmoved | below min-query-length |
|
|
1739
|
+
| `''` while searched | the empty-query load | nothing | unmoved | a write of '' while searched |
|
|
1740
|
+
| `#empty` | reads the same raw query | — | — | #empty reads the raw query |
|
|
1741
|
+
| Single pick | — (closes) | `''` | activator | a single pick |
|
|
1742
|
+
| Multiple pick | — (the query stays) | nothing | the field | a multiple pick |
|
|
1743
|
+
| `option:add` (Enter) | — | `''`, after the event | the field | option:add on Enter |
|
|
1744
|
+
| The create row | — | `''` | the field | the create row |
|
|
1745
|
+
| The ✕ | — | `''` | the field | the ✕ |
|
|
1746
|
+
| Flyout close | held for the next open | `''` | activator | a flyout close |
|
|
1747
|
+
| Phone sheet dismiss | survives the slide-out | `''` when the close begins | activator | a sheet dismiss |
|
|
1748
|
+
| Phone sheet open | opens on the held query | nothing | the sheet | the sheet opens on the held query |
|
|
1749
|
+
| No search field, open | refused | `''` back | unmoved | no search field: the write is refused |
|
|
1750
|
+
| No search field, held | dropped at open | `''` back | the panel | no search field: a held query is dropped |
|
|
1751
|
+
| Disabled | refused | `''` back | unmoved | disabled |
|
|
1752
|
+
| Read-only (open refused) | the held query is dropped | `''` back | unmoved | readonly |
|
|
1753
|
+
| Unbound | a static `:query` seeds the next open | — | — | unbound |
|
|
1754
|
+
| IME composing | — | nothing until it ends, then once | the field | nothing is emitted mid-composition |
|
|
1755
|
+
| IME, a write meanwhile | yields to the committed text | the committed text | the field | a write during composition |
|
|
1756
|
+
|
|
1642
1757
|
### Events and v-model
|
|
1643
1758
|
|
|
1644
1759
|
- `update:modelValue` — the resolved value (single) or array (multiple), on pick,
|
|
1645
1760
|
`clear`, coherence enforcement, and — in `multiple` mode only — deselect.
|
|
1646
1761
|
A second click on the current option in single mode emits nothing.
|
|
1647
|
-
- `option:add` — Enter on a non-matching query with nothing highlighted (above).
|
|
1762
|
+
- `option:add` — Enter on a non-matching query with nothing highlighted, or the create row (above).
|
|
1648
1763
|
- `focus` / `blur` — the activator gaining/losing focus.
|
|
1649
1764
|
- `input` / `change` — native events from the panel search field.
|
|
1650
1765
|
- `click` — the activator was clicked.
|
|
@@ -1677,8 +1792,11 @@ floating popover everywhere.
|
|
|
1677
1792
|
object form, a style and attributes — optionally only while a state is on.
|
|
1678
1793
|
Parts: `root` (the floating element — an invisible positioning wrapper, no node on a phone), `panel` (the options surface you see: the popover's painted bubble on desktop, the sheet itself on a phone), `sheet` (the bottom sheet the surface becomes on a phone — only that sheet, never the desktop surface; applied after `panel`, so it wins a conflict there), `input` (the search
|
|
1679
1794
|
field), `option` (every listbox option, a broadcast resolved per option), `itemText` (that option's label), `itemIcon` (its `itemProps` icons) `itemDescription` (its muted second line, `itemProps.description`) and `check` (the tick on a chosen option) — all with the option's states; a custom `#option` slot replaces the label and description, never the tick (`pt:check="hidden"` drops it and leaves a mark your slot draws alone),
|
|
1680
|
-
`header`, `footer
|
|
1681
|
-
`
|
|
1795
|
+
`header`, `footer`, and `groupHeader` (every `group-by` heading's box, sticky;
|
|
1796
|
+
`#group` replaces its content, never the box). States: `open`, and `selected`
|
|
1797
|
+
/ `disabled` per option; `groupHeader:disabled` while every option of its
|
|
1798
|
+
group is. `BbSelect` forwards its own `panel` / `sheet` / `option` /
|
|
1799
|
+
`groupHeader` here.
|
|
1682
1800
|
|
|
1683
1801
|
The filter-pill assignee picker above, restyled through those parts: mono on
|
|
1684
1802
|
the search `pt:input`, a muted wash on the chosen option
|
|
@@ -1806,7 +1924,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
1806
1924
|
it does not keep them valid.
|
|
1807
1925
|
- A provider **throws** to fail; `return []` is an applied empty result that
|
|
1808
1926
|
prunes every pick. On a failure the rows are cleared, nothing is pruned,
|
|
1809
|
-
`failed-text`
|
|
1927
|
+
and the failure row shows `failed-text` with "Try again", never `#empty`.
|
|
1810
1928
|
- `enforce-coherence` opts **each instance** into its own load. One field, one
|
|
1811
1929
|
request; N provider-backed rows, N requests.
|
|
1812
1930
|
- `option:add` can fire with an empty string — trim and guard.
|
|
@@ -1890,12 +2008,14 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
1890
2008
|
## v-model
|
|
1891
2009
|
|
|
1892
2010
|
- `v-model` — type: `any`
|
|
2011
|
+
- `v-model:open` — type: `boolean \| undefined`
|
|
2012
|
+
- `v-model:query` — type: `string \| undefined`
|
|
1893
2013
|
|
|
1894
2014
|
## Props
|
|
1895
2015
|
|
|
1896
2016
|
| Prop | Type | Default | Required | Description |
|
|
1897
2017
|
| --- | --- | --- | --- | --- |
|
|
1898
|
-
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `check`, `clear`, `footer`, `header`, `input`, `itemDescription`, `itemIcon`, `itemText`, `list`, `option`, `panel`, `root`, `sheet`. States: `disabled`, `open`, `selected`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbSelectPopoverProps<Row>['pt']` (`BbSelectPopoverProps<object>['pt']` for a preset that fits any row type, never `<any>`) (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
2018
|
+
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `check`, `clear`, `footer`, `groupHeader`, `header`, `input`, `itemDescription`, `itemIcon`, `itemText`, `list`, `option`, `panel`, `root`, `sheet`. States: `disabled`, `open`, `selected`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbSelectPopoverProps<Row>['pt']` (`BbSelectPopoverProps<object>['pt']` for a preset that fits any row type, never `<any>`) (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
1899
2019
|
| `activator` | `ElementOrComponentRef \| undefined` | | | External activator element or component ref. When provided, the activator slot is not rendered and event listeners are attached programmatically to the referenced element. |
|
|
1900
2020
|
| `adaptive` | `boolean \| undefined` | ``all.adaptive` (`true`)` | | On mobile, the panel opens as a bottom sheet instead of a floating popover, with the same search and list. Unset, the global `all.adaptive` applies. |
|
|
1901
2021
|
| `anchor` | `ElementOrComponentRef \| undefined` | `null` | | Override the element used for popover positioning and width measurement. Useful when the focusable activator is narrower than its visual container (e.g. a button inside a wrapper). Falls back to `activatorEl` when omitted. |
|
|
@@ -1934,9 +2054,11 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
1934
2054
|
| `multiple` | `boolean \| undefined` | `false` | | Enable multiple item selection. When true, modelValue must be an array. |
|
|
1935
2055
|
| `offCanvasProps` | `Partial<BbOffCanvasProps> \| undefined` | | | Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on mobile), spread over its defaults. A `pt` inside it styles only the sheet (passthrough guide § Inside the sheet). |
|
|
1936
2056
|
| `offset` | `number \| undefined` | `4` | | Distance (px) between the activator and the popover. |
|
|
2057
|
+
| `open` | `boolean \| undefined` | `false` | | Whether the panel is open (`v-model:open`; `v-model` stays the value). Bound, the app opens and closes it; unbound, the initial state. |
|
|
1937
2058
|
| `padding` | `number \| undefined` | `10` | | Minimum page padding used by floating shift middleware. |
|
|
1938
2059
|
| `placement` | `'start'` \| `'end'` \| `'top'` \| `'bottom'` \| `'left'` \| `'right'` \| `'top-start'` \| `'top-end'` \| `'right-start'` \| `'right-end'` \| `'bottom-start'` \| `'bottom-end'` \| `'left-start'` \| `'left-end'` \| `'start-start'` \| `'start-end'` \| `'end-start'` \| `'end-end'` | `"bottom"` | | Floating placement of the popover. |
|
|
1939
2060
|
| `prefill` | `boolean \| "interaction" \| undefined` | `"interaction"` | | When the options first load: `'interaction'` on first open, `true` on mount (and in SSR), `false` once the user types (on open with `disable-writing` or a non-empty model). An array `items` always resolves on mount; else a seeded model's text waits for the first open. |
|
|
2061
|
+
| `query` | `string \| undefined` | | | The search field's text (`v-model:query`): raw per keystroke, `''` when the component empties it; a write searches at once (guide § Reading and restoring the search). |
|
|
1940
2062
|
| `queryDebounceTime` | `number \| undefined` | `500` | | Debounce delay (ms) before triggering search queries after user input stops. |
|
|
1941
2063
|
| `readonly` | `boolean \| undefined` | `false` | | Prevents opening the popover while keeping the activator accessible. |
|
|
1942
2064
|
| `searchInputAriaLabel` | `string \| undefined` | ``t('select.searchLabel')` (`'Search options'`)` | | Accessible label used by the search input rendered inside the popover. Falls back to the localized `select.searchLabel` key when omitted. |
|
|
@@ -1956,12 +2078,13 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
1956
2078
|
| `sheet` | The bottom sheet the surface becomes on a phone (the `BbOffCanvas` root) — never the desktop surface. Applied after `panel`, so it wins a conflict there. |
|
|
1957
2079
|
| `input` | The search field. |
|
|
1958
2080
|
| `clear` | The ✕ that empties the search field. |
|
|
1959
|
-
| `list` | The `role="listbox"` node
|
|
2081
|
+
| `list` | The `role="listbox"` node holding the options. Virtualised: the list writes its height and places its rows, which limits layout utilities there. A group's box and the chips are not parts. |
|
|
2082
|
+
| `groupHeader` | Every `groupBy` heading (sticky). `#group` replaces its content. |
|
|
1960
2083
|
| `option` | One listbox option — a broadcast resolved per option. Also takes a per-item function, called with the option's raw item. |
|
|
1961
2084
|
| `itemText` | An option's label — resolved with that option's states. A custom `#option` slot replaces it. Also takes a per-item function. |
|
|
1962
2085
|
| `itemIcon` | An option's prepend / append icons (`itemProps`) — resolved with that option's states. Also takes a per-item function. |
|
|
1963
2086
|
| `itemDescription` | An option's second line (its description) — resolved with that option's states. A custom `#option` slot replaces it. Also takes a per-item function. |
|
|
1964
|
-
| `check` | The tick
|
|
2087
|
+
| `check` | The tick at a chosen option's end (on every option, drawn on the chosen). A custom `#option` slot keeps it; `pt:check="hidden"` removes it, sparing your slot's glyph. Also takes a per-item function. |
|
|
1965
2088
|
| `header` | The flyout's header band. |
|
|
1966
2089
|
| `footer` | The flyout's footer band. |
|
|
1967
2090
|
|
|
@@ -1970,7 +2093,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
1970
2093
|
| State | When it is on |
|
|
1971
2094
|
| --- | --- |
|
|
1972
2095
|
| `selected` | Per node, on `option`, its `item-*` parts and `check`: a chosen option. |
|
|
1973
|
-
| `disabled` | Per node, on `option`, its `item-*` parts and `check`: an option that is disabled. |
|
|
2096
|
+
| `disabled` | Per node, on `option`, its `item-*` parts and `check`: an option that is disabled; on `groupHeader`: every option of its group is. |
|
|
1974
2097
|
| `open` | Component-wide: the options surface is showing. |
|
|
1975
2098
|
|
|
1976
2099
|
## Events
|
|
@@ -1988,11 +2111,13 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
1988
2111
|
- `show` — `(): void` — Emitted as soon as the options surface starts to open (the popover, or the sheet on a phone).
|
|
1989
2112
|
- `shown` — `(): void` — Emitted once the options surface is open and its open transition has finished.
|
|
1990
2113
|
- `update:modelValue` — `(value: any): void` — Emitted with the next selection value whenever selection changes.
|
|
2114
|
+
- `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
|
|
2115
|
+
- `update:query` — `(value: string): void` — `v-model:query`: the search field's text.
|
|
1991
2116
|
|
|
1992
2117
|
## Slots
|
|
1993
2118
|
|
|
1994
2119
|
- `activator` — scope: `BbSelectPopoverActivatorSlotProps` `{ clear: () => void; close: () => Promise<void>; focus: () => void; disabled: boolean; loading: boolean; open: () => Promise<void>; props: { ref: (reference: unknown) => void; }; query: string; readonly: boolean; selectedOptions: BbSelectResolvedOption<any>[]; shown: boolean; text: string; toggle: () => Promise<void> }` — Replaces the default trigger element that opens the select popover.
|
|
1995
|
-
- `empty` — scope: `{ query: string; focus: () => void; close: () => Promise<void>;
|
|
2120
|
+
- `empty` — scope: `{ query: string; focus: () => void; close: () => Promise<void>; }` — Content shown when no options match the query or the list is empty. Empty only: a failed load shows the library's failure row instead (its message is `failed-text`, and it ends with "Try again"). `close()` closes the panel, for an action that does not move focus out of it.
|
|
1996
2121
|
- `footer` — scope: `BbSelectPopoverPanelSlotProps` `{ close: () => Promise<void>; clear: () => void; empty: boolean; focus: () => void; query: string; selectedOptions: BbSelectResolvedOption<any>[]; titleId: string }` — Content pinned to the bottom of the panel, below the options list. Rendered in both the desktop popover and the adaptive sheet.
|
|
1997
2122
|
- `group` — scope: `BbSelectPopoverGroupSlotProps<Item>` `{ disabled: boolean; index: number; item: Item; length: number; text: string }` — Replaces the default group header rendered above grouped options. Not called for rows with no group (`group-by` gives `null`/`undefined`, known rows): they are listed without a header.
|
|
1998
2123
|
- `header` — scope: `BbSelectPopoverPanelSlotProps` `{ close: () => Promise<void>; clear: () => void; empty: boolean; focus: () => void; query: string; selectedOptions: BbSelectResolvedOption<any>[]; titleId: string }` — Content pinned to the top of the panel, above the search field. Rendered in both the desktop popover and the adaptive sheet.
|
|
@@ -2022,10 +2147,10 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
2022
2147
|
- `BbSelectPopover` _(this component)_ — its own template binds: `input` → `input.bb-select-popover__input`, `clear` → `ClearableButton`, `panel` → `CommonPopover`, `root` → `CommonPopover`, `header` → `div.bb-select-popover__header`, `footer` → `div.bb-select-popover__footer`; hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs)
|
|
2023
2148
|
- `BbBadge` _(public — [contract](./BbBadge.md))_ — its own pt parts (`BbBadge`): `spinner` → `BbSpinner`, `icon` → `span.bb-badge__append-icon`, `icon` → `BbIcon`, `clear` → `button.bb-badge__clear`; documented CSS variables: `--bg`, `--fg`, `--bw`, `--ring-color`, `--ring-size`, `--min-size-md`, `--min-size`, `--elev`, `--r`, `--fs`, `--icon-size`, `--gap`, `--px`, `--clear-size`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--pad-left`; also mounts `BbIcon`, `BbSpinner`, `BadgeBodyContent`
|
|
2024
2149
|
- `BbOffCanvas` _(public — [contract](./BbOffCanvas.md))_ — its own pt parts (`BbOffCanvas`): `header` → `div.bb-offcanvas__header`, `title` → `span.bb-offcanvas__title`, `description` → `p.bb-offcanvas__description`, `close` → `CloseButton`, `content` → `div.bb-offcanvas__content`, `footer` → `div.bb-offcanvas__footer`; documented CSS variables: `--stack-x`, `--snap-y`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`
|
|
2025
|
-
- `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`, `--icon-size`; also mounts `BbIcon`
|
|
2150
|
+
- `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`, `--icon-size`, `--icon-inset`; also mounts `BbIcon`
|
|
2026
2151
|
- `ListBox` _(internal — not importable, reach it through `BbSelectPopover`)_
|
|
2027
2152
|
- `FlatListBox` _(internal — not importable, reach it through `BbSelectPopover`)_ — `BbSelectPopover`'s pt parts land here: `list` → `span.bb-listbox__list`, `option` → `span.bb-listbox__option`, `itemIcon` → `BbIcon`, `itemText` → `span.bb-listbox__item-text`, `itemDescription` → `span.bb-listbox__item-description`, `check` → `BbIcon`; also mounts `BbIcon`, `ErrorIcon`
|
|
2028
|
-
- `GroupedListBox` _(internal — not importable, reach it through `BbSelectPopover`)_ — `BbSelectPopover`'s pt parts land here: `list` → `span.bb-listbox__list`, `option` → `span.bb-listbox__option`, `itemIcon` → `BbIcon`, `itemText` → `span.bb-listbox__item-text`, `itemDescription` → `span.bb-listbox__item-description`, `check` → `BbIcon`; also mounts `BbIcon`, `ErrorIcon`
|
|
2153
|
+
- `GroupedListBox` _(internal — not importable, reach it through `BbSelectPopover`)_ — `BbSelectPopover`'s pt parts land here: `list` → `span.bb-listbox__list`, `groupHeader` → `span.bb-listbox__group-header`, `option` → `span.bb-listbox__option`, `itemIcon` → `BbIcon`, `itemText` → `span.bb-listbox__item-text`, `itemDescription` → `span.bb-listbox__item-description`, `check` → `BbIcon`; also mounts `BbIcon`, `ErrorIcon`
|
|
2029
2154
|
- Also mounts `BbIcon`, `ClearableButton`, `CommonPopover`, `ErrorIcon`, `WarningIcon`, `BbSmoothHeight`
|
|
2030
2155
|
|
|
2031
2156
|
## See Also
|
package/dist/ai/BbSwitchGroup.md
CHANGED
|
@@ -504,8 +504,9 @@ called with one context object — `BbSwitchGroupItemsContext`: `reason`
|
|
|
504
504
|
`'model'` when the model changed from outside and the options cannot resolve
|
|
505
505
|
it), `modelValue` and `signal`; a group has no search field, so no `query`.
|
|
506
506
|
While it resolves, `loading-text` (or the `#loading` slot) shows; `empty-text`
|
|
507
|
-
(or `#empty`) covers the empty result, and `failed-text`
|
|
508
|
-
|
|
507
|
+
(or `#empty`) covers the empty result, and `failed-text` words the failure
|
|
508
|
+
row of a load that threw (it ends with a built-in "Try again"; `#empty` never
|
|
509
|
+
renders for a failure). Loading, cancellation and race protection are
|
|
509
510
|
built in — don't wrap the provider in your own `loading` ref or debounce.
|
|
510
511
|
|
|
511
512
|
Tie the option set to external state with `dependencies` (debounced by
|
|
@@ -798,7 +799,7 @@ for a preset that fits any row type (never `<any>`), not an imported
|
|
|
798
799
|
| `itemLayout` | `FieldLayout \| undefined` | `'auto'` | | How each row's input and label sit together, in the `layout` keywords: `'auto'`, `'vertical'`, `'horizontal'`, `'label-fill'`, `'input-fill'`, or a two-word ratio pattern like `'xx xxxxx'`. |
|
|
799
800
|
| `itemProps` | `BbOptionGroupItemProps<T> \| undefined` | | | ADDITIONAL row fields, never the text or value: `description`, a muted line under the label (it may wrap; announced as the option's description). An object of paths or getters, or a function of the item; nothing is read implicitly. |
|
|
800
801
|
| `itemReverse` | `boolean \| undefined` | `undefined` | | Swaps each row's input and label from their natural order (input first), in every `item-layout`. `reverse` swaps the legend and the options instead. |
|
|
801
|
-
| `items` | `T[] \| ((context: BbCheckboxGroupItemsContext) => T[] \| Promise<T[]>)` | | yes | The options: an array, or a provider called with
|
|
802
|
+
| `items` | `T[] \| ((context: BbCheckboxGroupItemsContext) => T[] \| Promise<T[]>)` | | yes | The options: an array, or a provider called with `{ reason, modelValue, signal }`, sync or async. A provider fails by THROWING, never by returning `[]`: the rows clear and the failure row shows `failed-text` with "Try again". |
|
|
802
803
|
| `itemText` | `ItemAccessor<T, string> \| undefined` | `own `label`, else `text`, else `JSON.stringify(item)`` | | Defines a path that returns a property of the object to use as text or a function that returns a string. Unset: own `label`, else `text` (`{ label, value }` needs no accessor). |
|
|
803
804
|
| `itemValue` | `ItemAccessor<T> \| undefined` | `own `value`, else the whole item` | | Defines a path that returns a property of the object to use as value or a function that returns any value. Unset: own `value`, even `null`. |
|
|
804
805
|
| `labelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted, `'top'`. |
|
|
@@ -871,7 +872,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
871
872
|
|
|
872
873
|
- `append` — scope: `object` — Content rendered after the last option, inside the options container.
|
|
873
874
|
- `description` — scope: `BbSwitchGroupDescriptionSlotProps` `{ text: string; hasErrors: boolean; hasWarnings: boolean }` — Replaces the description text. Provided alone (no `description` prop) it still renders the description region and wires it into `aria-describedby`.
|
|
874
|
-
- `empty` — scope: `
|
|
875
|
+
- `empty` — scope: `object` — Content shown when no options are available (replaces the default "no data" text). Empty only: a failed load shows the library's failure row instead (its message is `failed-text`, and it ends with "Try again").
|
|
875
876
|
- `icon` — scope: `BbSwitchGroupIconSlotProps<T>` `{ disabled: boolean; readonly: boolean; checked: boolean; indeterminate?: boolean; focused: boolean; focusVisible: boolean; id: string; name: string; falseValue: any; hasErrors: boolean; hasWarnings: boolean; parsedValue: string; trueValue: any; value: any; item: T; text: string }` — Replaces the default switch track visual for each option. Receives the switch state plus the source item and its display text.
|
|
876
877
|
- `label` — scope: `BbSwitchGroupLabelSlotProps<T>` `{ item: T; text: string; checked: boolean; description: string }` — Replaces the default label text for each option.
|
|
877
878
|
- `legend` — scope: `BbSwitchGroupLegendSlotProps` `{ showAsterisk?: boolean; text: string; hasErrors: boolean; hasWarnings: boolean }` — Replaces the default fieldset legend text for the group.
|
package/dist/ai/BbTable.md
CHANGED
|
@@ -398,7 +398,8 @@ warns on a loop over keys it cannot see (`#[column.key]` over a prop) until
|
|
|
398
398
|
the name goes through `slotKey`. Keep the column in `columns`
|
|
399
399
|
even when you fully slot it: label, alignment and width still come from there.
|
|
400
400
|
A `#<key>` slot owns its cell: when it renders nothing (a `v-if` that is
|
|
401
|
-
false), the cell is empty, never the raw value
|
|
401
|
+
false), the cell is empty, never the raw value (the one exception to the
|
|
402
|
+
empty-slot rule).
|
|
402
403
|
|
|
403
404
|
Body cell scope: `content` (this cell, formatted), `item` (raw row), `value`
|
|
404
405
|
(the row's `item-value`, e.g. its id — not this cell), `classes`, plus the row's interaction surface —
|
|
@@ -426,13 +427,14 @@ costs you the built-in sort button. The table-wide pair `#header:prepend` /
|
|
|
426
427
|
structural select/actions cells); both forms receive the header scope above
|
|
427
428
|
plus `columnKey` (the raw column key) so a table-wide template can branch per
|
|
428
429
|
column. When both a per-column and the table-wide slot are provided for the
|
|
429
|
-
same side, the per-column one wins for that column — they never stack
|
|
430
|
+
same side, the per-column one wins for that column — they never stack; one
|
|
431
|
+
that renders nothing for its column falls back to the table-wide one. Affixes
|
|
430
432
|
render even beside a full `#<key>:header` replacement (the same rule as
|
|
431
433
|
BbDropdown's `#<value>:prepend/append`). The key always comes first, so a
|
|
432
434
|
column keyed `prepend` still owns `#prepend:header`, and `#header:prepend`
|
|
433
435
|
stays the table-wide slot.
|
|
434
436
|
|
|
435
|
-
Below, the status badges carry brand glyphs shipped in the app's `
|
|
437
|
+
Below, the status badges carry brand glyphs shipped in the app's `icons.dir`,
|
|
436
438
|
referenced as `local:*` names on the badge's `prepend:icon`. Per the icons
|
|
437
439
|
policy the dynamic status maps to **full-name literals** (a lookup object) —
|
|
438
440
|
never a template-composed `` `local:${status}` ``. Colours use the registered
|
|
@@ -753,9 +755,10 @@ There is no `error-text` prop and no `empty-text` alias — don't guess either
|
|
|
753
755
|
by analogy with `loading-text`. A failed _server_ visit (Inertia, a full-page
|
|
754
756
|
load) is a full error page, not something the table renders inline. A failed
|
|
755
757
|
_client-side_ fetch is the table's own: an `items` provider function that
|
|
756
|
-
throws clears the rows and the
|
|
757
|
-
load items"),
|
|
758
|
-
Async items and filters)
|
|
758
|
+
throws clears the rows and the table shows its failure row: `failed-text`
|
|
759
|
+
("Couldn't load items"), announced, then a "Try again" button that runs the
|
|
760
|
+
failed call again (see § Async items and filters). `#empty` is for an empty
|
|
761
|
+
result only — don't catch the error yourself.
|
|
759
762
|
|
|
760
763
|
**Skeletons and a custom empty state**
|
|
761
764
|
|
|
@@ -847,11 +850,9 @@ type BbTableItemsContext = {
|
|
|
847
850
|
- A newer call aborts the one in flight and its late answer is dropped. A
|
|
848
851
|
provider **throws** to fail — never `return []`, an applied empty result:
|
|
849
852
|
the rows are cleared (stale rows never sit under a new filter), nothing is
|
|
850
|
-
pruned, and the
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
becomes an `Error`), and `null` when nothing failed. Retry by bumping a
|
|
854
|
-
counter you list in `dependencies`.
|
|
853
|
+
pruned, and the failure row shows `failed-text` ("Couldn't load items")
|
|
854
|
+
with a built-in "Try again" (on click only; focus then moves to the table).
|
|
855
|
+
`#empty` never renders for a failure.
|
|
855
856
|
- Return the page as it is: the table never merges the selection into it.
|
|
856
857
|
- A plain array bypasses the provider machinery entirely.
|
|
857
858
|
|
|
@@ -4438,7 +4439,7 @@ for a preset that fits any row type (never `<any>`), not an imported
|
|
|
4438
4439
|
| `id` | `string \| undefined` | | | Stable id for this table's width context. When omitted a unique id is generated. Nested tables use the nearest ancestor id to inherit widths. |
|
|
4439
4440
|
| `inheritColumnWidths` | `string \| boolean \| undefined` | | | Snaps a nested table's columns to an ancestor table's tracks: `true` = the nearest one, a table `id` = that one (when a table in between has a different column count). Off by default: a nested table sizes itself. |
|
|
4440
4441
|
| `interactiveWhileLoading` | `boolean \| undefined` | `false` | | Keeps the header and rows interactive while loading (by default they are `inert`: a refetch is about to replace them). For background refreshes that must not interrupt an open editor. |
|
|
4441
|
-
| `items` | `Item[] \| ((context: BbTableItemsContext) => Item[] \| Promise<Item[]>)` | `[]` | yes | Rows to render: an array, or a provider called with a `BbTableItemsContext` (`reason`, `modelValue`, `signal`), sync or async. A provider fails by THROWING, never by returning `[]`: the rows clear and
|
|
4442
|
+
| `items` | `Item[] \| ((context: BbTableItemsContext) => Item[] \| Promise<Item[]>)` | `[]` | yes | Rows to render: an array, or a provider called with a `BbTableItemsContext` (`reason`, `modelValue`, `signal`), sync or async. A provider fails by THROWING, never by returning `[]`: the rows clear and the failure row shows `failed-text` with "Try again". Return the page as it is. |
|
|
4442
4443
|
| `itemValue` | `ItemAccessor<Item> \| undefined` | | | The row's value, as a property path or a function returning any value; the selection, `expandedItems` and row keys compare by it. |
|
|
4443
4444
|
| `keyboardNavigation` | `boolean \| undefined` | `false` | | Opt-in keyboard navigation: the table becomes an ARIA `grid` (`treegrid` with an `#expand` slot) with ONE tab stop and roving focus over its cells. Controls in cells leave the tab order (Enter/F2 go in). Ignored with a `#tbody` slot. |
|
|
4444
4445
|
| `legend` | `string \| undefined` | | | The `<legend>` of a `selectable` table (it renders as a `<fieldset>`): the selection's accessible name. Falls back to `caption`, then to a localized default. |
|
|
@@ -4532,10 +4533,10 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
4532
4533
|
|
|
4533
4534
|
- `actions` — scope: `{ expanded?: boolean \| undefined; expandProps?: ExpandControllerProps \| undefined; toggleExpanded?: (() => void) \| undefined; highlighted?: boolean \| undefi…` — Content of each row's actions cell; this slot CREATES the actions column (there is no prop). The header cell (labelled by `actions-text`, replaceable through `#actions:header`) and one cell per row come and go with it. Pin it with `fixed-actions`.
|
|
4534
4535
|
- `actions:header` — scope: `{ text: string; }` — Replaces the default actions header cell content.
|
|
4535
|
-
- `empty` — scope: `
|
|
4536
|
+
- `empty` — scope: `object` — Content shown when there are no rows and nothing is loading, inside the table's own full-width cell: pass content, never a row. Empty only: a failed load shows the table's failure row instead (its message is `failed-text`, and it ends with "Try again").
|
|
4536
4537
|
- `expand` — scope: `{ expanded: boolean; expandProps?: ExpandControllerProps \| undefined; toggleExpanded: () => void; highlighted?: boolean \| undefined; toggleHighlighted?: (() =…` — Full-width expandable content row rendered below each main row when expanded.
|
|
4537
|
-
- `header:append` — scope: `BbTableHeaderAffixSlotProps<Item>` `{ classes?: Classes; columnKey: string; items?: Item[]; label?: string; sortable?: boolean; sortOrder?: "asc" \| "desc" \| null; toggleSort?: ((event?: MouseEvent \| KeyboardEvent \| undefined) => void); hideColumn?: (() => void) }` — Content after every data column's header content (the label + sort control, or its own `<key>:header` replacement). A column's `<key>:header:append` wins over this for that column; they never stack. Branch on `columnKey` for per-column output.
|
|
4538
|
-
- `header:prepend` — scope: `BbTableHeaderAffixSlotProps<Item>` `{ classes?: Classes; columnKey: string; items?: Item[]; label?: string; sortable?: boolean; sortOrder?: "asc" \| "desc" \| null; toggleSort?: ((event?: MouseEvent \| KeyboardEvent \| undefined) => void); hideColumn?: (() => void) }` — Content before every data column's header content (the label + sort control, or its own `<key>:header` replacement). A column's `<key>:header:prepend` wins over this for that column; they never stack. Branch on `columnKey` for per-column output.
|
|
4538
|
+
- `header:append` — scope: `BbTableHeaderAffixSlotProps<Item>` `{ classes?: Classes; columnKey: string; items?: Item[]; label?: string; sortable?: boolean; sortOrder?: "asc" \| "desc" \| null; toggleSort?: ((event?: MouseEvent \| KeyboardEvent \| undefined) => void); hideColumn?: (() => void) }` — Content after every data column's header content (the label + sort control, or its own `<key>:header` replacement). A column's `<key>:header:append` wins over this for that column; they never stack, unless it renders nothing there. Branch on `columnKey` for per-column output.
|
|
4539
|
+
- `header:prepend` — scope: `BbTableHeaderAffixSlotProps<Item>` `{ classes?: Classes; columnKey: string; items?: Item[]; label?: string; sortable?: boolean; sortOrder?: "asc" \| "desc" \| null; toggleSort?: ((event?: MouseEvent \| KeyboardEvent \| undefined) => void); hideColumn?: (() => void) }` — Content before every data column's header content (the label + sort control, or its own `<key>:header` replacement). A column's `<key>:header:prepend` wins over this for that column; they never stack, unless it renders nothing there. Branch on `columnKey` for per-column output.
|
|
4539
4540
|
- `loading` — scope: `{ items: Item[]; }` — Content shown while table rows are loading (replaces the skeleton rows).
|
|
4540
4541
|
- `select` — scope: `{ item: Item; value: TableValueOf<Item, A>; checked: boolean; disabled: boolean; inputName: string; readonly: boolean; toggleSelected?: (() => void) \| undefine…` — Replaces the default checkbox/radio in the selection cell for each row.
|
|
4541
4542
|
- `select:header` — scope: `{ multiple: boolean; selectAll: boolean; text: string; }` — Replaces the default selection header cell content (checkbox or radio label).
|
|
@@ -4544,8 +4545,8 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
4544
4545
|
- `thead` — scope: `{ empty: boolean; }` — Replaces the header row group's content (`.bb-table__head`). The table is a CSS grid: provide `<div role="row">` rows of `<div role="columnheader">` cells, never `<tr>` / `<th>`.
|
|
4545
4546
|
- `#<key>` (named from data) — scope: `object` — One column's body cell in every row, by the column `key` through `slotKey`. Scope: `{ item, value, content, selected, expanded, highlighted, classes, sortOrder, toggleSelected, toggleExpanded, toggleHighlighted, expandProps }`; `content` is this cell, `value` the row's `item-value`. Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `actions`, `empty`, `expand`, `loading`, `select`, `tbody`, `tfoot`, `thead`.
|
|
4546
4547
|
- `#<key>:header` (named from data) — scope: `object` — One column's header content, replacing its label and the built-in sort button. Scope: `{ label, items, sortable, sortOrder, toggleSort, hideColumn, classes }`.
|
|
4547
|
-
- `#<key>:header:prepend` (named from data) — scope: `BbTableHeaderAffixSlotProps<Item>` — Content before one column's header, keeping the sort button; beats `header:prepend` (they never stack).
|
|
4548
|
-
- `#<key>:header:append` (named from data) — scope: `BbTableHeaderAffixSlotProps<Item>` — Content after one column's header, keeping the sort button; beats `header:append` (they never stack).
|
|
4548
|
+
- `#<key>:header:prepend` (named from data) — scope: `BbTableHeaderAffixSlotProps<Item>` — Content before one column's header, keeping the sort button; beats `header:prepend` (they never stack) unless it renders nothing.
|
|
4549
|
+
- `#<key>:header:append` (named from data) — scope: `BbTableHeaderAffixSlotProps<Item>` — Content after one column's header, keeping the sort button; beats `header:append` (they never stack) unless it renders nothing.
|
|
4549
4550
|
- `#<key>:first` (named from data) — scope: `BbTableEdgeCellSlotProps<Item>` — One column's cell in a row before the data rows; any such slot creates the row, aligned with the columns. Only over rows.
|
|
4550
4551
|
- `#<key>:last` (named from data) — scope: `BbTableEdgeCellSlotProps<Item>` — One column's cell in a row after the data rows (a totals row); any such slot creates that row, aligned like `<key>:first`.
|
|
4551
4552
|
|
package/dist/ai/BbTimePicker.md
CHANGED
|
@@ -212,6 +212,15 @@ Reach for the **component** (slot or `activator` prop) when you want the
|
|
|
212
212
|
the directive is the shortcut for the bare-trigger cell case, not a replacement
|
|
213
213
|
for the component's `v-model` in a form.
|
|
214
214
|
|
|
215
|
+
### Opening from code: `v-model:open`
|
|
216
|
+
|
|
217
|
+
`v-model` is the value; `v-model:open` is whether the time panel is open. Bound,
|
|
218
|
+
your ref opens and closes it, and every open and close the user makes is
|
|
219
|
+
written back: a pick, Escape, a click outside, the phone sheet's own dismiss. A static `:open` with no
|
|
220
|
+
listener is only the initial state. An open from code is the same open a
|
|
221
|
+
click makes, and `disabled` / `readonly` refuse it (the ref is set back
|
|
222
|
+
to `false`).
|
|
223
|
+
|
|
215
224
|
### Relationship to BbTimePickerInput
|
|
216
225
|
|
|
217
226
|
`BbTimePickerInput` _is_ these columns with a segmented text field wrapped around
|
|
@@ -296,6 +305,7 @@ typeahead. Always pass a `label` when the trigger is an unlabelled cell or icon.
|
|
|
296
305
|
|
|
297
306
|
- `v-model:activeSegment` — type: `BbTimePickerSegment \| undefined`
|
|
298
307
|
- `v-model` — type: `string \| string[] \| null \| undefined`
|
|
308
|
+
- `v-model:open` — type: `boolean \| undefined`
|
|
299
309
|
|
|
300
310
|
## Props
|
|
301
311
|
|
|
@@ -317,6 +327,7 @@ typeahead. Always pass a `label` when the trigger is an unlabelled cell or icon.
|
|
|
317
327
|
| `modelValue` | `string \| string[] \| null \| undefined` | | | v-model value: `null` for empty, a 24-hour `HH:mm` (or `HH:mm:ss` with `seconds`) string, or a two-element `[start, end]` array when `range` is true. |
|
|
318
328
|
| `offCanvasProps` | `Partial<BbOffCanvasProps> \| undefined` | | | Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on mobile), spread over its defaults. A `pt` inside it styles only the sheet (passthrough guide § Inside the sheet). The sheet hides its ✕; `{ hideClose: false }` brings it back. |
|
|
319
329
|
| `offset` | `number \| undefined` | `4` | | Space the popover keeps from the activator. |
|
|
330
|
+
| `open` | `boolean \| undefined` | `false` | | Whether the panel is open (`v-model:open`; `v-model` stays the value). Bound, the app opens and closes it; unbound, the initial state. |
|
|
320
331
|
| `padding` | `number \| undefined` | | | Minimum empty space to keep from the edge of the page. |
|
|
321
332
|
| `placement` | `'start'` \| `'end'` \| `'top'` \| `'bottom'` \| `'left'` \| `'right'` \| `'top-start'` \| `'top-end'` \| `'right-start'` \| `'right-end'` \| `'bottom-start'` \| `'bottom-end'` \| `'left-start'` \| `'left-end'` \| `'start-start'` \| `'start-end'` \| `'end-start'` \| `'end-end'` | | | Position of the popover relative to the activator/anchor. |
|
|
322
333
|
| `range` | `boolean` | `false` | | Range selection: the value is a two-element `[start, end]` array. |
|
|
@@ -356,6 +367,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
356
367
|
- `time-pick` — `(payload: { unit: TimeUnit; value: string; }): void` — Relay of the raw column pick, before this component combines it into the value. A host binds this to run its own engine; clean consumers ignore it.
|
|
357
368
|
- `update:activeSegment` — `(value: BbTimePickerSegment): void` — The active range end changed (range only).
|
|
358
369
|
- `update:modelValue` — `(value: string \| string[] \| null): void` — Emitted when the selected time changes (single/range/null).
|
|
370
|
+
- `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
|
|
359
371
|
|
|
360
372
|
## Slots
|
|
361
373
|
|
|
@@ -383,7 +395,7 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
383
395
|
- `CommonTimeSelector` _(internal — not importable, reach it through `BbTimePicker`)_ — `BbTimePicker`'s pt parts land here: `header` → `div.bb-time-selector__header`, `cellColumnHeader` → `div.bb-time-selector__cell-column-header`, `item` → `BbBaseButton`; documented CSS variables: `--time-mark`
|
|
384
396
|
- `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
|
|
385
397
|
- `BbOffCanvas` _(public — [contract](./BbOffCanvas.md))_ — its own pt parts (`BbOffCanvas`): `header` → `div.bb-offcanvas__header`, `title` → `span.bb-offcanvas__title`, `description` → `p.bb-offcanvas__description`, `close` → `CloseButton`, `content` → `div.bb-offcanvas__content`, `footer` → `div.bb-offcanvas__footer`; documented CSS variables: `--stack-x`, `--snap-y`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`
|
|
386
|
-
- `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`, `--icon-size`; also mounts `BbIcon`
|
|
398
|
+
- `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`, `--icon-size`, `--icon-inset`; also mounts `BbIcon`
|
|
387
399
|
- Also mounts `CommonPopover`
|
|
388
400
|
|
|
389
401
|
## See Also
|
|
@@ -133,7 +133,9 @@ and parses its own digits. Any other attribute lands on the field root; a
|
|
|
133
133
|
|
|
134
134
|
`min` / `max` (`HH:mm`) clamp typed times when interaction ends — the value
|
|
135
135
|
snaps to the nearest bound and an `error` event with code `disabled_time`
|
|
136
|
-
fires (`{ original, normalized }`).
|
|
136
|
+
fires (`{ original, normalized }`). A value your app sets past a bound stays
|
|
137
|
+
as it is while nobody touches the field; once the user focuses it and leaves,
|
|
138
|
+
it is clamped like a typed one. In `range` mode the model is `[start,
|
|
137
139
|
end]`; typing an inverted pair swaps it on blur with the usual
|
|
138
140
|
`end_before_start` error.
|
|
139
141
|
|
|
@@ -162,6 +164,15 @@ title and ✕: none of the input's own parts reach inside the sheet). `disableWr
|
|
|
162
164
|
interaction, and a tap anywhere on the field opens them (Enter or Space too;
|
|
163
165
|
the ✕ still only clears).
|
|
164
166
|
|
|
167
|
+
### Opening from code: `v-model:open`
|
|
168
|
+
|
|
169
|
+
`v-model` is the value; `v-model:open` is whether the time panel is open. Bound,
|
|
170
|
+
your ref opens and closes it, and every open and close the user makes is
|
|
171
|
+
written back: a pick, Escape, a click outside, the phone sheet's own dismiss. A static `:open` with no
|
|
172
|
+
listener is only the initial state. An open from code is the same open a
|
|
173
|
+
click makes, and `disabled` / `readonly` refuse it (the ref is set back
|
|
174
|
+
to `false`).
|
|
175
|
+
|
|
165
176
|
### Events & v-model
|
|
166
177
|
|
|
167
178
|
| Event | Payload | When |
|
|
@@ -295,6 +306,7 @@ Messages _also_ render in an `aria-live="polite"` region.
|
|
|
295
306
|
## v-model
|
|
296
307
|
|
|
297
308
|
- `v-model` — type: `string \| string[] \| null \| undefined`
|
|
309
|
+
- `v-model:open` — type: `boolean \| undefined`
|
|
298
310
|
|
|
299
311
|
## Props
|
|
300
312
|
|
|
@@ -330,6 +342,7 @@ Messages _also_ render in an `aria-live="polite"` region.
|
|
|
330
342
|
| `modelValue` | `string \| string[] \| null \| undefined` | | | v-model value: `null` for empty, a 24-hour `HH:mm` (or `HH:mm:ss` with `seconds`) string, or a two-element array when `range` is true. |
|
|
331
343
|
| `name` | `string \| undefined` | | | Defines the name of the input. |
|
|
332
344
|
| `offCanvasProps` | `Partial<BbOffCanvasProps> \| undefined` | | | Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on mobile), spread over its defaults. A `pt` inside it styles only the sheet (passthrough guide § Inside the sheet). The sheet hides its ✕; `{ hideClose: false }` brings it back. |
|
|
345
|
+
| `open` | `boolean \| undefined` | `false` | | Whether the panel is open (`v-model:open`; `v-model` stays the value). Bound, the app opens and closes it; unbound, the initial state. |
|
|
333
346
|
| `persistentHint` | `boolean \| undefined` | `false` | | Keeps the hint displayed. |
|
|
334
347
|
| `placeholder` | `string \| undefined` | | | Text shown while the field is empty. |
|
|
335
348
|
| `prepend:icon` | `string \| undefined` | | | Name of the icon to be added at the start of the input. |
|
|
@@ -398,6 +411,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
398
411
|
- `show` — `(): void` — Emitted as soon as the time panel (the popover, or the sheet on a phone) starts to open.
|
|
399
412
|
- `shown` — `(): void` — Emitted once the time panel is open and its open transition has finished.
|
|
400
413
|
- `update:modelValue` — `(value: string \| string[] \| null): void` — Emitted whenever the selected time changes. `null` for cleared values, a `HH:mm(:ss)` string, or an array in range mode.
|
|
414
|
+
- `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
|
|
401
415
|
|
|
402
416
|
## Slots
|
|
403
417
|
|
|
@@ -430,7 +444,7 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
430
444
|
|
|
431
445
|
- `BbTimePickerInput` _(this component)_ — its own template binds: `controlAttrs` → `input.bb-segmented-field__input`, `input` → `input.bb-segmented-field__input`, `activator` → `button.bb-segmented-field__activator`, `suffix` → `span.bb-field-input__suffix`, `panel` → `div`, `panel` → `CommonPopover`; hands `BbOffCanvas` the pt map `{ panel: 'root', sheet: 'root' }` (ours → theirs)
|
|
432
446
|
- `BbOffCanvas` _(public — [contract](./BbOffCanvas.md))_ — its own pt parts (`BbOffCanvas`): `header` → `div.bb-offcanvas__header`, `title` → `span.bb-offcanvas__title`, `description` → `p.bb-offcanvas__description`, `close` → `CloseButton`, `content` → `div.bb-offcanvas__content`, `footer` → `div.bb-offcanvas__footer`; documented CSS variables: `--stack-x`, `--snap-y`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`
|
|
433
|
-
- `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`, `--icon-size`; also mounts `BbIcon`
|
|
447
|
+
- `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`, `--icon-size`, `--icon-inset`; also mounts `BbIcon`
|
|
434
448
|
- `CommonField` _(internal — not importable, reach it through `BbTimePickerInput`)_ — `BbTimePickerInput`'s pt parts land here: `root` → `div.bb-field`, `label` → `component`, `description` → `span.bb-field__description`, `hint` → `span.bb-field__hint`, `counter` → `span.bb-field__counter`, `message` → `div.bb-field__message`; also mounts `BbAsterisk`
|
|
435
449
|
- `CommonFieldInput` _(internal — not importable, reach it through `BbTimePickerInput`)_ — `BbTimePickerInput`'s pt parts land here: `box` → `span.bb-field-input__box`, `prefix` → `span.bb-field-input__prefix`, `icon` → `BbIcon`, `clear` → `ClearableButton`, `spinner` → `BbSpinner`, `suffix` → `span.bb-field-input__suffix`; documented CSS variables: `--bg`, `--bg-hover`, `--bg-focus`, `--bg-disabled`, `--fg-disabled`, `--border-color`, `--border-focus`, `--ring-size`, `--ring-color`, `--elev`, `--frost`, `--ph`, `--inside-label-clearance`; also mounts `BbIcon`, `BbSpinner`, `ErrorIcon`, `WarningIcon`, `ClearableButton`
|
|
436
450
|
- `CommonTimeSelector` _(internal — not importable, reach it through `BbTimePickerInput`)_ — `BbTimePickerInput`'s pt parts land here: `header` → `div.bb-time-selector__header`, `cellColumnHeader` → `div.bb-time-selector__cell-column-header`, `item` → `BbBaseButton`; documented CSS variables: `--time-mark`
|
package/dist/ai/BbToast.md
CHANGED
|
@@ -365,8 +365,9 @@ positions form independent stacks.
|
|
|
365
365
|
### Action buttons
|
|
366
366
|
|
|
367
367
|
Pass an `actions` array to render buttons in a row below the text. While a
|
|
368
|
-
button's `onClick` runs it shows a spinner, its siblings
|
|
369
|
-
|
|
368
|
+
button's `onClick` runs it shows a spinner, its siblings ignore clicks (they
|
|
369
|
+
keep their look and leave the tab order), and the auto-dismiss countdown is
|
|
370
|
+
held; the toast dismisses itself when the callback
|
|
370
371
|
resolves. A rejected callback keeps the toast open and the countdown resumes.
|
|
371
372
|
Defaults per button: `variant: 'primary'`, `size: 'sm'`. An action's `text`
|
|
372
373
|
is its button label; the toast's own `text` is the body copy above them.
|
package/dist/ai/BbTree.md
CHANGED
|
@@ -471,6 +471,10 @@ and `#<depth>:children` slots that **replace the children container** of the
|
|
|
471
471
|
matching node — the recursion stops there and your content renders instead,
|
|
472
472
|
useful for a custom layout or an inline empty state under one branch.
|
|
473
473
|
|
|
474
|
+
A slot that renders nothing for a node (its content behind a `v-if` that is
|
|
475
|
+
false there) is skipped: `#<value>` falls to `#<depth>`, then `default`; an
|
|
476
|
+
empty `:children` slot leaves that node its default children.
|
|
477
|
+
|
|
474
478
|
**Sections, pages and a special trash node**
|
|
475
479
|
|
|
476
480
|
```vue
|
|
@@ -1216,7 +1220,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
1216
1220
|
- `default` — scope: `BbTreeNodeSlotProps<Meta>` `{ meta: Meta; item: BbTreeItem<Meta>; parent?: BbTreeItem<Meta>; index: number; depth: number; value: any; expanded: boolean; expandable: boolean; toggleExpanded: () => void; expandProps: BbTreeExpandControllerProps }`
|
|
1217
1221
|
- `#<value>` (named from data) — scope: `BbTreeNodeSlotProps<Meta>` — One node, by its resolved `item-value` (string or number) through `slotKey`; beats `<depth>`, which beats `default`. Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `default`.
|
|
1218
1222
|
- `#<depth>` (named from data) — scope: `BbTreeNodeSlotProps<Meta>` — Every node at one depth (`0` = root); a numeric value can share this name. Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `default`.
|
|
1219
|
-
- `#<value>:children` (named from data) — scope: `BbTreeNodeSlotProps<Meta>` — One node's children container, stopping the recursion there; beats `<depth>:children`. Renders for leaves too.
|
|
1223
|
+
- `#<value>:children` (named from data) — scope: `BbTreeNodeSlotProps<Meta>` — One node's children container, stopping the recursion there; beats `<depth>:children`. Renders for leaves too; empty, the default children.
|
|
1220
1224
|
- `#<depth>:children` (named from data) — scope: `BbTreeNodeSlotProps<Meta>` — The children container of every node at one depth.
|
|
1221
1225
|
|
|
1222
1226
|
## CSS custom properties
|
package/dist/ai/CommonPopover.md
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
| `anchor` | `ElementOrComponentRef \| VirtualAnchor \| undefined` | | | The element the popover positions itself relative to. Accepts an HTMLElement, a Vue component ref, or a virtual element with a `getBoundingClientRect` method. |
|
|
20
20
|
| `arrowPadding` | `number \| undefined` | | | Space the arrow will maintain to the edge of the dropdown. Useful when the floating element has border radius so it won't appear broken |
|
|
21
21
|
| `boundary` | `ElementOrComponentRefOrSelector \| undefined` | | | Keeps the popover inside this element alongside its anchor (sideways above or below, vertically beside it); away from the anchor it may pass the edge, and only the viewport flips it. It never clamps the size (that is `overflowBoundary`). An HTMLElement, component ref or selector. |
|
|
22
|
+
| `boundaryX` | `Element \| undefined` | | | Internal: keeps the popover inside this element's left and right edges only; its top and bottom stay the viewport's. Ignored when `boundary` is set. A dropdown inside a table passes the table. |
|
|
22
23
|
| `bubbleAttrs` | `Record<string, unknown> \| ((space: CommonPopoverAvailableSpace) => Record<string, unknown>) \| undefined` | | | Attributes bound on the bubble (`class`, `style`, `inert`, …) after its own class, so the owner can make the bubble its layout container. The function form receives the default slot's free space (for a height cap). |
|
|
23
24
|
| `dialog` | `boolean \| undefined` | `false` | | Renders the popover as a `<dialog>` element (modal overlay) instead of a `<span>` with the Popover API. |
|
|
24
25
|
| `disableFlip` | `boolean \| undefined` | `false` | | Disables the automatic flip to the opposite side when the popover would overflow (flipping is on by default). |
|
package/dist/ai/FlatListBox.md
CHANGED
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
- `focused:change` — `(id: string \| undefined): void` — Emitted when the keyboard-focused option changes.
|
|
50
50
|
- `option:selected` — `(option: Option): void` — Emitted when an option is selected by the user.
|
|
51
51
|
- `option:unselected` — `(option: Option): void` — Emitted when a previously selected option is deselected.
|
|
52
|
+
- `retry` — `(event: MouseEvent): void` — The failure footer's "Try again" was pressed: the host runs the failed load again.
|
|
52
53
|
|
|
53
54
|
## Slots
|
|
54
55
|
|