bitboss-ui 3.0.0-beta.74 → 3.0.0-beta.75
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/dist/ai/BbAvatar.md +86 -58
- package/dist/ai/BbBadge.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +2 -2
- package/dist/ai/BbCalendar.md +5 -2
- package/dist/ai/BbCheckboxGroup.md +5 -4
- package/dist/ai/BbColorInput.md +12 -0
- package/dist/ai/BbColorPalette.md +11 -6
- package/dist/ai/BbDatePicker.md +12 -0
- package/dist/ai/BbDatePickerInput.md +17 -1
- package/dist/ai/BbDialog.md +3 -1
- package/dist/ai/BbDropdown.md +155 -60
- package/dist/ai/BbDropdownButton.md +25 -6
- package/dist/ai/BbNumberInput.md +3 -1
- package/dist/ai/BbRadioGroup.md +4 -4
- package/dist/ai/BbSelect.md +79 -67
- package/dist/ai/BbSelectPopover.md +24 -5
- package/dist/ai/BbSwitchGroup.md +5 -4
- package/dist/ai/BbTable.md +17 -16
- package/dist/ai/BbTimePicker.md +12 -0
- package/dist/ai/BbTimePickerInput.md +15 -1
- 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 +1 -0
- package/dist/ai/ListBox.md +1 -0
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +163 -6
- package/dist/ai/components.json +32 -34
- package/dist/ai/composables/useToast.md +2 -2
- package/dist/ai/design-tokens.json +60 -0
- package/dist/ai/guides/agent-contract.md +8 -4
- package/dist/ai/guides/design-tokens.md +13 -0
- package/dist/ai/guides/fetch-items-playbook.md +7 -11
- 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-table.md +2 -1
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/v2-to-v3.md +22 -5
- package/dist/ai/guides/migration/v3-beta-tooling.md +1 -0
- package/dist/ai/guides/passthrough.md +3 -3
- 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 +2 -0
- package/dist/ai/manifest/components/BbDropdown.json +20 -14
- package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.tree.json +13 -3
- package/dist/ai/manifest/components/BbDropdownButton.json +13 -7
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +2 -0
- 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 +10 -7
- package/dist/ai/manifest/components/BbSelectPopover.json +6 -3
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +5 -1
- 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 +4 -0
- 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 +2 -1
- package/dist/ai/manifest/components/ListBox.json +2 -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/source/BbAvatar.md +119 -9
- package/dist/ai/source/BbBadge.md +12 -5
- package/dist/ai/source/BbBreadcrumbs.md +52 -54
- package/dist/ai/source/BbButton.md +41 -25
- package/dist/ai/source/BbCarousel.md +31 -28
- package/dist/ai/source/BbCheckboxGroup.md +15 -9
- package/dist/ai/source/BbColorInput.md +19 -0
- package/dist/ai/source/BbColorPalette.md +18 -0
- package/dist/ai/source/BbDatePicker.md +18 -0
- package/dist/ai/source/BbDatePickerInput.md +40 -1
- package/dist/ai/source/BbDialog.md +14 -1
- package/dist/ai/source/BbDropdown.md +211 -39
- package/dist/ai/source/BbDropdownButton.md +27 -2
- package/dist/ai/source/BbDropdownGroup.md +104 -38
- package/dist/ai/source/BbGallery.md +76 -55
- 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/BbRadioGroup.md +12 -5
- package/dist/ai/source/BbSelect.md +35 -20
- package/dist/ai/source/BbSelectPopover.md +116 -8
- package/dist/ai/source/BbSwitchGroup.md +11 -4
- package/dist/ai/source/BbTable.md +72 -26
- package/dist/ai/source/BbTimePicker.md +19 -0
- package/dist/ai/source/BbTimePickerInput.md +15 -0
- 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/CommonPopover.md +24 -1
- package/dist/ai/source/FlatListBox.md +26 -5
- package/dist/ai/source/GroupedListBox.md +63 -11
- package/dist/ai/source/ListBox.md +4 -0
- package/dist/ai/source/OptionsContainer.md +29 -11
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +61 -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 +80 -79
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +152 -158
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
- package/dist/components/BbCalendar/useDayGrid.js +120 -123
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +7 -7
- 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 +213 -202
- 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 +3 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +495 -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 +92 -87
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +412 -369
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +382 -338
- 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 +73 -45
- package/dist/components/BbDropdown/normalizeGroups.js +6 -2
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +8 -0
- package/dist/components/BbDropdown/types.d.ts +65 -41
- package/dist/components/BbDropdown/types.js +1 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +93 -72
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +48 -0
- package/dist/components/BbDropdownButton/types.d.ts +13 -2
- package/dist/components/BbDropdownButton/types.js +2 -0
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +318 -296
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -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/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -104
- package/dist/components/BbRadioGroup/types.d.ts +4 -7
- package/dist/components/BbSelect/BbSelect.vue.d.ts +3 -1
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +167 -163
- package/dist/components/BbSelect/types.d.ts +23 -20
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +3 -1
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +680 -637
- package/dist/components/BbSelectPopover/types.d.ts +10 -4
- 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 +1 -3
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1086 -1069
- package/dist/components/BbTable/types.d.ts +11 -10
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +3 -1
- 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 +3 -1
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +268 -259
- package/dist/components/BbTimePickerInput/types.d.ts +7 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +12 -12
- 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/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +13 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +115 -96
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +194 -166
- 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/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.js +68 -61
- package/dist/index.d.ts +2 -2
- package/dist/llms-full.txt +573 -276
- package/dist/llms-medium.txt +8 -4
- package/dist/llms.txt +1 -1
- package/dist/locale-blueprint.json +2 -0
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +2 -3
- package/dist/types/Option.d.ts +10 -0
- package/dist/types/ptComponentMap.d.ts +3 -3
- package/dist/utilities/functions/slotContent.js +19 -0
- package/dist/utils/loadRetry.js +8 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite.js +4 -1
- package/llms.txt +1 -1
- package/package.json +3 -1
- package/scripts/README.md +2 -0
- package/scripts/lib/agent-setup.mjs +44 -26
- package/scripts/lib/validate-bb-markup.mjs +20 -0
- package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
package/dist/llms-full.txt
CHANGED
|
@@ -1423,14 +1423,23 @@ around.
|
|
|
1423
1423
|
The avatar resolves what to show in a fixed order:
|
|
1424
1424
|
|
|
1425
1425
|
1. **Image** — when `src` (or `srcset`) is set and loads correctly.
|
|
1426
|
-
2. **Default slot** — when there is no source or the image fails:
|
|
1427
|
-
|
|
1428
|
-
3. **
|
|
1426
|
+
2. **Default slot** — when there is no source or the image fails: any markup
|
|
1427
|
+
of your own.
|
|
1428
|
+
3. **Initials from `name`** — no slot: the first letters of the first and the
|
|
1429
|
+
last word, uppercased with the locale's rules (`Ada King Lovelace` → `AL`,
|
|
1430
|
+
`Ada` → `A`). Words that don't start with a letter are skipped
|
|
1431
|
+
(`42 Ada` → `A`).
|
|
1432
|
+
4. **Built-in user icon** — no slot, and no `name` (or none of its words
|
|
1433
|
+
starts with a letter).
|
|
1429
1434
|
|
|
1430
1435
|
A failed load flips to the fallback automatically, and changing `src`/`srcset`
|
|
1431
|
-
resets the attempt — so swapping users in place retries the new photo.
|
|
1432
|
-
|
|
1433
|
-
|
|
1436
|
+
resets the attempt — so swapping users in place retries the new photo. Pass
|
|
1437
|
+
`name` for a person: it gives the initials and the accessible name. `alt`
|
|
1438
|
+
describes the photo and wins as the name when written.
|
|
1439
|
+
|
|
1440
|
+
```vue
|
|
1441
|
+
<BbAvatar :src="user.photoUrl" :name="user.fullName" color />
|
|
1442
|
+
```
|
|
1434
1443
|
|
|
1435
1444
|
**Photo, initials, and the built-in fallback**
|
|
1436
1445
|
|
|
@@ -1444,7 +1453,7 @@ accessible name.
|
|
|
1444
1453
|
src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' fill='%23fde2d4'/%3E%3Ccircle cx='32' cy='25' r='11' fill='%23b45a3c'/%3E%3Cpath d='M11 64c1-13 10-20 21-20s20 7 21 20z' fill='%23b45a3c'/%3E%3C/svg%3E"
|
|
1445
1454
|
alt="Ada Lovelace"
|
|
1446
1455
|
/>
|
|
1447
|
-
<BbAvatar size="56"
|
|
1456
|
+
<BbAvatar size="56" name="Grace Hopper" />
|
|
1448
1457
|
<BbAvatar size="56" alt="Unknown user" />
|
|
1449
1458
|
</div>
|
|
1450
1459
|
```
|
|
@@ -1477,36 +1486,53 @@ Composed demos below use the larger end of that range (and a few explicit px
|
|
|
1477
1486
|
sizes) so faces stay readable in Storybook — `xs`/`sm` are for dense chrome,
|
|
1478
1487
|
not hero examples.
|
|
1479
1488
|
|
|
1480
|
-
|
|
1481
|
-
`--bb-primary` behind, `--bb-primary-fg` for the initials/icon, the same
|
|
1482
|
-
pairing as a primary button — so
|
|
1483
|
-
|
|
1489
|
+
By default the fallback surface is **painted with the primary design token**
|
|
1490
|
+
— `--bb-primary` behind, `--bb-primary-fg` for the initials/icon, the same
|
|
1491
|
+
pairing as a primary button — so it matches your theme in light and dark.
|
|
1492
|
+
|
|
1493
|
+
### Colour per person: `color`
|
|
1484
1494
|
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1495
|
+
`color` tells people apart in a list (assignees, a comment thread). It is
|
|
1496
|
+
decoration, never state, so it is off by default:
|
|
1497
|
+
|
|
1498
|
+
- **`color` (`true`)** — one of ten palette hues, picked from a stable hash
|
|
1499
|
+
of `name`: the same person gets the same colour on every page, render and
|
|
1500
|
+
server render (no hydration repaint), whatever the case or spacing of the
|
|
1501
|
+
name. A soft fill with deep ink in light, a deep fill with light ink in
|
|
1502
|
+
dark; every pair clears 4.5:1. The palette is the `--bb-avatar-*` theme
|
|
1503
|
+
tokens (design-tokens guide § Avatar palette). Without `name` the avatar
|
|
1504
|
+
keeps the default look.
|
|
1505
|
+
- **A string** — any CSS colour or `var()`, used as the fill as is (a
|
|
1506
|
+
tenant's brand colour). The ink is black or white, whichever reads
|
|
1507
|
+
(`contrast-color()` where the browser has it, else picked from the
|
|
1508
|
+
colour's OKLCH lightness).
|
|
1509
|
+
|
|
1510
|
+
**Palette colours from names, and a brand colour**
|
|
1491
1511
|
|
|
1492
1512
|
```vue
|
|
1493
|
-
<
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1513
|
+
<div class="flex items-center gap-3">
|
|
1514
|
+
<BbAvatar size="40" name="Ada Lovelace" color />
|
|
1515
|
+
<BbAvatar size="40" name="Grace Hopper" color />
|
|
1516
|
+
<BbAvatar size="40" name="Alan Turing" color />
|
|
1517
|
+
<BbAvatar size="40" name="Katherine Johnson" color />
|
|
1518
|
+
<BbAvatar size="40" name="Acme Studio" color="#1e293b" />
|
|
1519
|
+
</div>
|
|
1499
1520
|
```
|
|
1500
1521
|
|
|
1522
|
+
The two component locals stay for anything else: `--bg` (fallback surface)
|
|
1523
|
+
and `--fg` (initials and slotted fallback). The built-in person glyph mixes
|
|
1524
|
+
`--fg` over `--bg`, so there is no third local. A pinned ink for a brand
|
|
1525
|
+
colour: `:style="{ '--fg': tenant.fg }"` beside `:color="tenant.color"`.
|
|
1526
|
+
|
|
1501
1527
|
**The size scale**
|
|
1502
1528
|
|
|
1503
1529
|
```vue
|
|
1504
1530
|
<div class="flex items-end gap-3">
|
|
1505
|
-
<BbAvatar size="md"
|
|
1506
|
-
<BbAvatar size="lg"
|
|
1507
|
-
<BbAvatar size="xl"
|
|
1508
|
-
<BbAvatar size="2xl"
|
|
1509
|
-
<BbAvatar size="56"
|
|
1531
|
+
<BbAvatar size="md" name="Joan Clarke" />
|
|
1532
|
+
<BbAvatar size="lg" name="Joan Clarke" />
|
|
1533
|
+
<BbAvatar size="xl" name="Joan Clarke" />
|
|
1534
|
+
<BbAvatar size="2xl" name="Joan Clarke" />
|
|
1535
|
+
<BbAvatar size="56" name="Joan Clarke" />
|
|
1510
1536
|
</div>
|
|
1511
1537
|
```
|
|
1512
1538
|
|
|
@@ -1667,9 +1693,7 @@ list — the row markup stays identical whether a member has a photo or not.
|
|
|
1667
1693
|
"
|
|
1668
1694
|
:variant="member.online ? 'success' : 'default'"
|
|
1669
1695
|
>
|
|
1670
|
-
<BbAvatar :
|
|
1671
|
-
{{ member.initials }}
|
|
1672
|
-
</BbAvatar>
|
|
1696
|
+
<BbAvatar color :name="member.name" size="40" :src="member.src" />
|
|
1673
1697
|
</BbIndicator>
|
|
1674
1698
|
<span class="flex min-w-0 flex-1 flex-col">
|
|
1675
1699
|
<span class="truncate font-medium">{{ member.name }}</span>
|
|
@@ -1703,11 +1727,10 @@ type Member = {
|
|
|
1703
1727
|
role: string;
|
|
1704
1728
|
online: boolean;
|
|
1705
1729
|
src?: string;
|
|
1706
|
-
initials?: string;
|
|
1707
1730
|
};
|
|
1708
1731
|
|
|
1709
|
-
// Some members have a photo; others fall back to initials
|
|
1710
|
-
//
|
|
1732
|
+
// Some members have a photo; the others fall back to the initials from
|
|
1733
|
+
// `name`, each in their own palette colour (`color`) — the same row markup.
|
|
1711
1734
|
const members: Member[] = [
|
|
1712
1735
|
{
|
|
1713
1736
|
name: 'Ada Lovelace',
|
|
@@ -1719,7 +1742,6 @@ const members: Member[] = [
|
|
|
1719
1742
|
name: 'Grace Hopper',
|
|
1720
1743
|
role: 'Design',
|
|
1721
1744
|
online: true,
|
|
1722
|
-
initials: 'GH',
|
|
1723
1745
|
},
|
|
1724
1746
|
{
|
|
1725
1747
|
name: 'Alan Turing',
|
|
@@ -1731,13 +1753,11 @@ const members: Member[] = [
|
|
|
1731
1753
|
name: 'Katherine Johnson',
|
|
1732
1754
|
role: 'Data',
|
|
1733
1755
|
online: true,
|
|
1734
|
-
initials: 'KJ',
|
|
1735
1756
|
},
|
|
1736
1757
|
{
|
|
1737
1758
|
name: 'Linus Torvalds',
|
|
1738
1759
|
role: 'Platform',
|
|
1739
1760
|
online: false,
|
|
1740
|
-
initials: 'LT',
|
|
1741
1761
|
},
|
|
1742
1762
|
];
|
|
1743
1763
|
|
|
@@ -1871,12 +1891,14 @@ keys.
|
|
|
1871
1891
|
### Restyling with passthrough
|
|
1872
1892
|
|
|
1873
1893
|
`pt` reaches each part with a class list — or, in the object form, a
|
|
1874
|
-
style and attributes. Parts: `root` (the avatar frame)
|
|
1875
|
-
user glyph). No states — nothing
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1894
|
+
style and attributes. Parts: `root` (the avatar frame), `initials` (the
|
|
1895
|
+
letters from `name`) and `icon` (the default user glyph). No states — nothing
|
|
1896
|
+
it paints is a state.
|
|
1897
|
+
|
|
1898
|
+
`initials` and `icon` exist only while the fallback shows (no image, or it
|
|
1899
|
+
failed) and the default slot is not overridden — `initials` with a `name`
|
|
1900
|
+
that gives letters, `icon` otherwise; when a photo or your own slot renders,
|
|
1901
|
+
they land nowhere. For the frame, `pt:root` is plain `class` with extra
|
|
1880
1902
|
letters: write `class` / `style` on the tag, as on any element. `pt:root`
|
|
1881
1903
|
stays for uniformity — the global map, the object form and a wrapper that
|
|
1882
1904
|
spreads props address every component the same way.
|
|
@@ -1941,10 +1963,11 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
1941
1963
|
|
|
1942
1964
|
### Gotchas & anti-patterns
|
|
1943
1965
|
|
|
1944
|
-
- **
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1966
|
+
- **Don't hash names into colours yourself** — `color` does it, stable and
|
|
1967
|
+
SSR-safe, from the themed palette. There is no `variant`: the default look
|
|
1968
|
+
follows `--bb-primary` / `--bb-primary-fg`.
|
|
1969
|
+
- **Don't type initials into the slot** when you have the name: `name` does
|
|
1970
|
+
it, locale-aware, and labels the avatar too.
|
|
1948
1971
|
- **Default `timeout` can false-fallback slow images** (see above) — tune it,
|
|
1949
1972
|
don't reimplement image loading around the component.
|
|
1950
1973
|
- Don't hand-position presence dots with absolute CSS — `BbIndicator dot`
|
|
@@ -1958,24 +1981,27 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
1958
1981
|
by the frame, so it follows.
|
|
1959
1982
|
- Don't pre-crop sources to circles — the component center-crops; ship square
|
|
1960
1983
|
or larger originals.
|
|
1961
|
-
- Don't leave `alt` empty for meaningful avatars: fallbacks
|
|
1962
|
-
accessible name entirely.
|
|
1984
|
+
- Don't leave both `name` and `alt` empty for meaningful avatars: fallbacks
|
|
1985
|
+
lose their accessible name entirely.
|
|
1963
1986
|
|
|
1964
1987
|
### Accessibility
|
|
1965
1988
|
|
|
1966
|
-
|
|
1967
|
-
component adds `role="img"` +
|
|
1968
|
-
|
|
1969
|
-
the
|
|
1970
|
-
|
|
1989
|
+
Set `name` (or `alt`). With an image, `alt` labels the photo (`name` when
|
|
1990
|
+
`alt` is empty); with a fallback the component adds `role="img"` +
|
|
1991
|
+
`aria-label` (`alt`, else `name`) to the fallback, so assistive tech
|
|
1992
|
+
announces the person, not the raw initials. With neither, the fallback
|
|
1993
|
+
renders with no role and no name — acceptable only for purely decorative
|
|
1994
|
+
avatars. A presence dot is decorative — make the same status
|
|
1971
1995
|
available in visible text or an adjacent label.
|
|
1972
1996
|
|
|
1973
1997
|
## Props
|
|
1974
1998
|
|
|
1975
1999
|
| Prop | Type | Default | Required | Description |
|
|
1976
2000
|
| --- | --- | --- | --- | --- |
|
|
1977
|
-
| `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: `icon`, `root`. States: —. 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 `BbAvatarProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
1978
|
-
| `alt` | `string \| undefined` | `""` | | Alternative text for the image, used for accessibility. |
|
|
2001
|
+
| `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: `icon`, `initials`, `root`. States: —. 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 `BbAvatarProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
2002
|
+
| `alt` | `string \| undefined` | `""` | | Alternative text for the image, used for accessibility. Without it the avatar is labelled with `name`. |
|
|
2003
|
+
| `color` | `string \| boolean \| undefined` | `false` | | Paints the fallback (initials or icon). `true`: a palette colour picked from `name`, stable across renders and the server. A string: any CSS colour or `var()` as the background, with black or white ink, whichever reads. Unset: the primary colour. |
|
|
2004
|
+
| `name` | `string \| undefined` | | | The person's name. With no image and no default slot, the avatar shows its initials (first letters of the first and last word; none: the person icon). Also the accessible name when `alt` is empty, and the input of `color`. |
|
|
1979
2005
|
| `size` | `number \| CssSize \| keyof Sizes \| undefined` | `"md"` | | Defines the component size. Accepted values: - A key from the provided size map (`keyof T`), e.g. `'sm' \| 'md' \| 'lg'` - A custom CSS size string (e.g. `'20px'`, `'1.5rem'`, `'2em'`) - A number, typically interpreted as pixels by size parsers |
|
|
1980
2006
|
| `sizes` | `string \| undefined` | | | Sizes attribute for the image, used with `srcset`. |
|
|
1981
2007
|
| `src` | `string \| undefined` | | | Source URL of the avatar image. |
|
|
@@ -1989,7 +2015,8 @@ available in visible text or an adjacent label.
|
|
|
1989
2015
|
| Part | What it is |
|
|
1990
2016
|
| --- | --- |
|
|
1991
2017
|
| `root` | The avatar frame, with the image or the fallback inside. |
|
|
1992
|
-
| `icon` | The default user glyph — rendered only while there is no image to show
|
|
2018
|
+
| `icon` | The default user glyph — rendered only while there is no image to show, the default slot is not overridden and `name` gives no initials, so it lands nowhere otherwise. |
|
|
2019
|
+
| `initials` | The initials from `name` — rendered only while there is no image to show and the default slot is not overridden. |
|
|
1993
2020
|
|
|
1994
2021
|
## Events
|
|
1995
2022
|
|
|
@@ -2009,6 +2036,7 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
2009
2036
|
| `--fg` | `.bb-avatar` | `var(--bb-primary-fg)` | Initials; the built-in icon is an 80/20 mix of this toward --bg |
|
|
2010
2037
|
| `--default-icon-size` | `.bb-avatar` | `clamp(14px, calc(var(--size) * 0.7), 48px)` | Built-in fallback icon: 70% of the avatar, floored at 14px and capped at 48px. `--size` is the avatar's own box, set inline from the `size` prop. |
|
|
2011
2038
|
| `--fs` | `.bb-avatar` | `max(8px, calc(var(--size) * 0.4))` | Initials: 40% of the avatar, floored at 8px |
|
|
2039
|
+
| `--hue` | `.bb-avatar` | `0` | The palette hue `color` picks (a modifier class sets it). |
|
|
2012
2040
|
| `--elev` | `.bb-avatar` | `var(--bb-elev-sm)` | The theme's resting lift on small chrome, declared here so an ancestor's `--elev` cannot reach in; `--elev: none` flattens one. |
|
|
2013
2041
|
| `--size` | `.bb-avatar__default-icon` | `var(--default-icon-size)` | |
|
|
2014
2042
|
|
|
@@ -2021,7 +2049,7 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
2021
2049
|
- **CSS custom properties** listed on a node are declared on THAT node's root and read by elements inside it. Set one on that node's root or on the element inside it that reads it — the pt part that lands there is how you reach it (`pt:box="[--border-color:…]"` on a text input) — never on `BbAvatar`'s root, where the node's own declaration masks it (design-tokens guide, _Overriding one from a consumer app_, rule 0).
|
|
2022
2050
|
- Listed nodes are the ones `BbAvatar`'s API reaches or that declare a documented CSS variable; the rest fold into "also mounts". The complete tree, undocumented locals included, is `manifest/components/BbAvatar.tree.json` (a public component in it is a name: its own tree file has the rest).
|
|
2023
2051
|
|
|
2024
|
-
- `BbAvatar` _(this component)_ — its own template binds: `icon` → `BbIcon`
|
|
2052
|
+
- `BbAvatar` _(this component)_ — its own template binds: `initials` → `span.bb-avatar__initials`, `icon` → `BbIcon`
|
|
2025
2053
|
- Also mounts `BbIcon`
|
|
2026
2054
|
|
|
2027
2055
|
## See Also
|
|
@@ -2301,7 +2329,7 @@ hidden accessible name — always write it.
|
|
|
2301
2329
|
```
|
|
2302
2330
|
|
|
2303
2331
|
The slots named after the props (`#prepend:icon`, `#append:icon`)
|
|
2304
|
-
replace them and render inside the `icon` part, so `pt:icon`, `--icon-size`
|
|
2332
|
+
replace them (one that renders nothing falls back to the prop) and render inside the `icon` part, so `pt:icon`, `--icon-size`
|
|
2305
2333
|
and the loading spinner still apply. Their scope is the badge's states,
|
|
2306
2334
|
`{ activeLink, exactActiveLink, loading }`: a filter chip linking to a page
|
|
2307
2335
|
can show a solid glyph while that page is open. What you put in a slot is
|
|
@@ -5532,10 +5560,10 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
5532
5560
|
|
|
5533
5561
|
- `BbBreadcrumbs` _(this component)_ — its own template binds: `item` → `li.bb-breadcrumbs__item`, `icon` → `BbIcon`, `text` → `span.bb-breadcrumbs__text`
|
|
5534
5562
|
- `BbBaseButton` _(public — [contract](https://llms-bitboss-ui.bitboss.it/dist/ai/BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
|
|
5535
|
-
- `BbDropdown` _(public — [contract](https://llms-bitboss-ui.bitboss.it/dist/ai/BbDropdown.md))_ — its own pt parts (`BbDropdown`): `panel` → `CommonPopover`, `root` → `CommonPopover`, `header` → `div.bb-dropdown__header`, `list` → `span.bb-dropdown__list`, `footer` → `div.bb-dropdown__footer`; documented CSS variables: `--menu-inset`; also mounts `CommonPopover`, `DropdownPipelineResolver`
|
|
5563
|
+
- `BbDropdown` _(public — [contract](https://llms-bitboss-ui.bitboss.it/dist/ai/BbDropdown.md))_ — its own pt parts (`BbDropdown`): `panel` → `CommonPopover`, `root` → `CommonPopover`, `header` → `div.bb-dropdown__header`, `list` → `span.bb-dropdown__list`, `footer` → `div.bb-dropdown__footer`; documented CSS variables: `--menu-inset`; also mounts `CommonPopover`, `DropdownFailures`, `DropdownPipelineResolver`
|
|
5536
5564
|
- `BbDropdownList` _(internal — not importable, reach it through `BbDropdown`)_ — also mounts `BbIcon`, `ErrorIcon`, `CommonPopover`, `BbDropdownList`
|
|
5537
5565
|
- `BbBadge` _(public — [contract](https://llms-bitboss-ui.bitboss.it/dist/ai/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`
|
|
5538
|
-
- `AdaptiveDropdown` _(internal — not importable, reach it through `BbDropdown`)_ — hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs); also mounts `BbSmoothHeight`, `BbDropdownList`
|
|
5566
|
+
- `AdaptiveDropdown` _(internal — not importable, reach it through `BbDropdown`)_ — hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs); also mounts `BbSmoothHeight`, `BbDropdownList`, `DropdownFailures`
|
|
5539
5567
|
- `BbOffCanvas` _(public — [contract](https://llms-bitboss-ui.bitboss.it/dist/ai/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`
|
|
5540
5568
|
- `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`, `--icon-size`; also mounts `BbIcon`
|
|
5541
5569
|
- `BbButton` _(public — [contract](https://llms-bitboss-ui.bitboss.it/dist/ai/BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `span.bb-button__prepend-icon`, `icon` → `BbIcon`, `text` → `span.bb-button__text`, `icon` → `span.bb-button__append-icon`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--ipx`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring-color`, `--ring-size`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbBaseButton`, `BbSpinner`, `BbIcon`
|
|
@@ -5979,8 +6007,8 @@ a `local:` file in your `iconDir`, not a hand-made icon component wrapped in a
|
|
|
5979
6007
|
|
|
5980
6008
|
To change the glyph with the button's state (a filled star while a toggle is
|
|
5981
6009
|
on, a solid icon on the current page's link), use the slot named after the
|
|
5982
|
-
prop: `#prepend:icon`, `#append:icon`. The slot replaces the prop
|
|
5983
|
-
renders inside the `icon` part, so `pt:icon`, `--icon-size` and the loading
|
|
6010
|
+
prop: `#prepend:icon`, `#append:icon`. The slot replaces the prop (one that
|
|
6011
|
+
renders nothing falls back to it) and renders inside the `icon` part, so `pt:icon`, `--icon-size` and the loading
|
|
5984
6012
|
spinner work as they do on the prop's glyph. Its scope is the button's states:
|
|
5985
6013
|
`{ activeLink, exactActiveLink, pressed, loading, disabled }`. What you put in
|
|
5986
6014
|
it is yours: a `BbIcon` takes the part's size, anything else you size.
|
|
@@ -7303,8 +7331,11 @@ const summary = computed(() => {
|
|
|
7303
7331
|
</script>
|
|
7304
7332
|
```
|
|
7305
7333
|
|
|
7306
|
-
With
|
|
7307
|
-
a
|
|
7334
|
+
With one month, the greyed days of the neighbouring months that fill its
|
|
7335
|
+
first and last weeks are ordinary days: a click (or Enter / Space on one)
|
|
7336
|
+
picks it, single, range or multiple alike, and the view moves to its month.
|
|
7337
|
+
`min`, `max` and `selectable` disable them like any other day. With more than
|
|
7338
|
+
one month, those days are left blank: a date belongs to one grid only.
|
|
7308
7339
|
|
|
7309
7340
|
### `type` — what you are picking
|
|
7310
7341
|
|
|
@@ -10675,8 +10706,9 @@ called with one context object — `BbCheckboxGroupItemsContext`: `reason`
|
|
|
10675
10706
|
`'model'` when the model changed from outside and the options cannot resolve
|
|
10676
10707
|
it), `modelValue` and `signal`; a group has no search field, so no `query`.
|
|
10677
10708
|
While it resolves, `loading-text` (or the `#loading` slot) shows; `empty-text`
|
|
10678
|
-
(or `#empty`) covers the empty result, and `failed-text`
|
|
10679
|
-
|
|
10709
|
+
(or `#empty`) covers the empty result, and `failed-text` words the failure
|
|
10710
|
+
row of a load that threw (it ends with a built-in "Try again"; `#empty` never
|
|
10711
|
+
renders for a failure). Loading, cancellation and race protection are
|
|
10680
10712
|
built in — don't wrap the provider in your own `loading` ref or debounce.
|
|
10681
10713
|
|
|
10682
10714
|
Tie the option set to external state with `dependencies` (debounced by
|
|
@@ -10986,7 +11018,7 @@ for a preset that fits any row type (never `<any>`), not an imported
|
|
|
10986
11018
|
| `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'`. |
|
|
10987
11019
|
| `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. |
|
|
10988
11020
|
| `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. |
|
|
10989
|
-
| `items` | `T[] \| ((context: BbCheckboxGroupItemsContext) => T[] \| Promise<T[]>)` | | yes | The options: an array, or a provider called with
|
|
11021
|
+
| `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". |
|
|
10990
11022
|
| `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). |
|
|
10991
11023
|
| `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`. |
|
|
10992
11024
|
| `labelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted, `'top'`. |
|
|
@@ -11064,7 +11096,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
11064
11096
|
|
|
11065
11097
|
- `append` — scope: `object` — Content rendered after the last option, inside the options container.
|
|
11066
11098
|
- `description` — scope: `BbCheckboxGroupDescriptionSlotProps` `{ 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`.
|
|
11067
|
-
- `empty` — scope: `
|
|
11099
|
+
- `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").
|
|
11068
11100
|
- `icon` — scope: `BbCheckboxGroupIconSlotProps<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 checkmark icon for each checkbox option.
|
|
11069
11101
|
- `label` — scope: `BbCheckboxGroupLabelSlotProps<T>` `{ item: T; text: string; checked: boolean; description: string }` — Replaces the default label text for each option.
|
|
11070
11102
|
- `legend` — scope: `BbCheckboxGroupLegendSlotProps` `{ showAsterisk?: boolean; text: string; hasErrors: boolean; hasWarnings: boolean }` — Replaces the default fieldset legend text for the group.
|
|
@@ -12186,6 +12218,15 @@ styles the sheet's root only. For what is inside it (header, title, ✕, body)
|
|
|
12186
12218
|
no part of the input reaches there, so put a `pt` in `offCanvasProps`
|
|
12187
12219
|
(passthrough guide § Inside the sheet).
|
|
12188
12220
|
|
|
12221
|
+
### Opening from code: `v-model:open`
|
|
12222
|
+
|
|
12223
|
+
`v-model` is the value; `v-model:open` is whether the palette is open. Bound,
|
|
12224
|
+
your ref opens and closes it, and every open and close the user makes is
|
|
12225
|
+
written back: a pick, Escape, a click outside, the phone sheet's own dismiss. A static `:open` with no
|
|
12226
|
+
listener is only the initial state. An open from code is the same open a
|
|
12227
|
+
click makes, and `disabled` / `readonly` refuse it (the ref is set back
|
|
12228
|
+
to `false`).
|
|
12229
|
+
|
|
12189
12230
|
### Events
|
|
12190
12231
|
|
|
12191
12232
|
Beyond `update:modelValue` (see value format above), the native input events are
|
|
@@ -12394,6 +12435,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
12394
12435
|
## v-model
|
|
12395
12436
|
|
|
12396
12437
|
- `v-model` — type: `string \| null \| undefined`
|
|
12438
|
+
- `v-model:open` — type: `boolean \| undefined`
|
|
12397
12439
|
|
|
12398
12440
|
## Props
|
|
12399
12441
|
|
|
@@ -12427,6 +12469,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
12427
12469
|
| `modelValue` | `string \| null \| undefined` | `null` | | Used by v-model. |
|
|
12428
12470
|
| `name` | `string \| undefined` | | | Defines the name of the input. |
|
|
12429
12471
|
| `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. |
|
|
12472
|
+
| `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. |
|
|
12430
12473
|
| `persistentHint` | `boolean \| undefined` | `false` | | Keeps the hint displayed. |
|
|
12431
12474
|
| `placeholder` | `string \| undefined` | | | Text shown while the field is empty. |
|
|
12432
12475
|
| `prepend:icon` | `string \| undefined` | | | Name of the icon to be added at the start of the input. |
|
|
@@ -12498,6 +12541,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
12498
12541
|
- `show` — `(): void` — Emitted as soon as the palette (the popover, or the sheet on a phone) starts to open.
|
|
12499
12542
|
- `shown` — `(): void` — Emitted once the palette is open and its open transition has finished.
|
|
12500
12543
|
- `update:modelValue` — `(value: string \| null): void` — Emitted when the value becomes a valid hex color via typing/masking, when the field is cleared, or when the palette selects a color. Emits: - `#RRGGBB` (or `#RRGGBBAA` when `alpha` is enabled) for valid values - `null` when cleared
|
|
12544
|
+
- `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
|
|
12501
12545
|
|
|
12502
12546
|
## Slots
|
|
12503
12547
|
|
|
@@ -13083,10 +13127,12 @@ popover ↔ sheet.
|
|
|
13083
13127
|
|
|
13084
13128
|
### Open state, disabled and readonly
|
|
13085
13129
|
|
|
13086
|
-
|
|
13087
|
-
|
|
13088
|
-
|
|
13089
|
-
|
|
13130
|
+
Clicking the activator toggles the palette; a pick, Escape or a click outside
|
|
13131
|
+
closes it, and the slot's `open` flag shows the state for styling (a caret, a
|
|
13132
|
+
highlight). To open it from code, bind `v-model:open` (`v-model` stays the
|
|
13133
|
+
color): your ref opens and closes it, and every close is written back. A
|
|
13134
|
+
static `:open` with no listener is only the initial state. Two props gate
|
|
13135
|
+
interaction:
|
|
13090
13136
|
|
|
13091
13137
|
- `disabled` — blocks the activator entirely (no open). The trigger gets
|
|
13092
13138
|
`disabled` and `aria-disabled="true"` — through the slot's `props`, or set on
|
|
@@ -13280,8 +13326,8 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
13280
13326
|
represented; enable `alpha` wherever 8-digit values occur.
|
|
13281
13327
|
- **Start a bound model at `null`**, not `undefined`: `null` is the empty
|
|
13282
13328
|
value the palette reports back.
|
|
13283
|
-
- **
|
|
13284
|
-
|
|
13329
|
+
- **Open it from code with `v-model:open`**, not by clicking the activator
|
|
13330
|
+
from a script; `disabled` / `readonly` refuse that open too.
|
|
13285
13331
|
|
|
13286
13332
|
### Accessibility
|
|
13287
13333
|
|
|
@@ -13300,6 +13346,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
13300
13346
|
## v-model
|
|
13301
13347
|
|
|
13302
13348
|
- `v-model` — type: `string \| null \| undefined`
|
|
13349
|
+
- `v-model:open` — type: `boolean \| undefined`
|
|
13303
13350
|
|
|
13304
13351
|
## Props
|
|
13305
13352
|
|
|
@@ -13319,6 +13366,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
13319
13366
|
| `modelValue` | `string \| null \| undefined` | | | v-model: the current color as a `#RRGGBB` hex string (or `#RRGGBBAA` when `alpha` is enabled), or `null` when empty. |
|
|
13320
13367
|
| `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. |
|
|
13321
13368
|
| `offset` | `number \| undefined` | `4` | | Space the floating container will maintain from the activator. |
|
|
13369
|
+
| `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. |
|
|
13322
13370
|
| `padding` | `number \| undefined` | `6` | | Minimum empty space to keep from the edge of the page |
|
|
13323
13371
|
| `placement` | `Placement \| undefined` | | | Position of the overlay in respect to the related activator. |
|
|
13324
13372
|
| `readonly` | `boolean \| undefined` | `false` | | Prevent opening the palette while keeping the activator visible. |
|
|
@@ -13350,6 +13398,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
13350
13398
|
- `show` — `(): void` — Emitted as soon as the palette (the popover, or the sheet on a phone) starts to open.
|
|
13351
13399
|
- `shown` — `(): void` — Emitted once the palette is open and its open transition has finished.
|
|
13352
13400
|
- `update:modelValue` — `(value: string): void` — Emitted when a color is picked. Payload is a concrete `#RRGGBB` (or `#RRGGBBAA` when alpha is enabled) — the palette always emits a color, never `null`.
|
|
13401
|
+
- `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
|
|
13353
13402
|
|
|
13354
13403
|
## Slots
|
|
13355
13404
|
|
|
@@ -14813,6 +14862,15 @@ Reach for the **component** (slot or `activator` prop) when you want the
|
|
|
14813
14862
|
the directive is the shortcut for the bare-trigger cell case, not a replacement
|
|
14814
14863
|
for the component's `v-model` in a form.
|
|
14815
14864
|
|
|
14865
|
+
### Opening from code: `v-model:open`
|
|
14866
|
+
|
|
14867
|
+
`v-model` is the value; `v-model:open` is whether the calendar is open. Bound,
|
|
14868
|
+
your ref opens and closes it, and every open and close the user makes is
|
|
14869
|
+
written back: a pick, Escape, a click outside, the phone sheet's own dismiss. A static `:open` with no
|
|
14870
|
+
listener is only the initial state. An open from code is the same open a
|
|
14871
|
+
click makes, and `disabled` / `readonly` refuse it (the ref is set back
|
|
14872
|
+
to `false`).
|
|
14873
|
+
|
|
14816
14874
|
### Relationship to BbDatePickerInput
|
|
14817
14875
|
|
|
14818
14876
|
`BbDatePickerInput` _is_ a `BbDatePicker` with a segmented text field wrapped
|
|
@@ -14925,6 +14983,7 @@ and digit typeahead; the time rail exposes labelled columns. Always pass a
|
|
|
14925
14983
|
|
|
14926
14984
|
- `v-model:activeSegment` — type: `BbCalendarSegment \| undefined`
|
|
14927
14985
|
- `v-model` — type: `string \| string[] \| null \| undefined`
|
|
14986
|
+
- `v-model:open` — type: `boolean \| undefined`
|
|
14928
14987
|
- `v-model:time` — type: `string \| string[] \| null \| undefined`
|
|
14929
14988
|
|
|
14930
14989
|
## Props
|
|
@@ -14952,6 +15011,7 @@ and digit typeahead; the time rail exposes labelled columns. Always pass a
|
|
|
14952
15011
|
| `numberOfMonths` | `number \| undefined` | `1` | | How many months the popover shows side by side (day grids only); the phone sheet always shows one. Too narrow for them all, the months wrap. |
|
|
14953
15012
|
| `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. |
|
|
14954
15013
|
| `offset` | `number \| undefined` | `4` | | Space the popover keeps from the activator. |
|
|
15014
|
+
| `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. |
|
|
14955
15015
|
| `padding` | `number \| undefined` | | | Minimum empty space to keep from the edge of the page. |
|
|
14956
15016
|
| `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. |
|
|
14957
15017
|
| `range` | `boolean` | `false` | | Enables range selection (`[start, end]`). |
|
|
@@ -15011,6 +15071,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
15011
15071
|
- `time-pick` — `(payload: { unit: TimeUnit; value: string; }): void` — Relay of the raw time-rail pick. An embedding host binds this to run its own value engine; clean consumers ignore it and use `update:time`.
|
|
15012
15072
|
- `update:activeSegment` — `(value: BbCalendarSegment): void` — The active range end changed (range + `type="datetime"` only).
|
|
15013
15073
|
- `update:modelValue` — `(value: string \| string[] \| null): void` — Emitted when the selected date value changes (single/range/null).
|
|
15074
|
+
- `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
|
|
15014
15075
|
- `update:time` — `(value: string \| string[] \| null): void` — Companion time model, alongside every change while `type="datetime"`.
|
|
15015
15076
|
|
|
15016
15077
|
## Slots
|
|
@@ -15248,6 +15309,8 @@ line: `if (!Array.isArray(value)) return;` before treating it as the range.
|
|
|
15248
15309
|
For a window that often crosses the month line, `:number-of-months="2"` shows
|
|
15249
15310
|
two months side by side in the popover (one in the phone sheet). If the
|
|
15250
15311
|
popover doesn't have room for both, the second month wraps under the first.
|
|
15312
|
+
With one month, the greyed days of the previous and next month are pickable
|
|
15313
|
+
too: clicking one picks it and moves the calendar to its month.
|
|
15251
15314
|
|
|
15252
15315
|
**Booking — two months in the popover**
|
|
15253
15316
|
|
|
@@ -15330,7 +15393,9 @@ and parses its own digits. Any other attribute lands on the field root; a
|
|
|
15330
15393
|
|
|
15331
15394
|
`min` and `max` (each a `YYYY-MM-DD` string) constrain the selectable window;
|
|
15332
15395
|
days outside it render disabled in the calendar, and a typed out-of-range date is
|
|
15333
|
-
snapped back on commit.
|
|
15396
|
+
snapped back on commit. A value your app sets past a bound (on mount or later)
|
|
15397
|
+
stays as it is while nobody touches the field; once the user focuses it and
|
|
15398
|
+
leaves, it snaps like a typed one. **Malformed `min`/`max` throw during setup** on purpose,
|
|
15334
15399
|
to catch config mistakes early — always pass the `YYYY-MM-DD` shape.
|
|
15335
15400
|
|
|
15336
15401
|
For non-contiguous rules (no weekends, no holidays, only in-stock slots), pass a
|
|
@@ -15838,6 +15903,15 @@ const from = ref<string | null>('2026-05-01');
|
|
|
15838
15903
|
</script>
|
|
15839
15904
|
```
|
|
15840
15905
|
|
|
15906
|
+
### Opening from code: `v-model:open`
|
|
15907
|
+
|
|
15908
|
+
`v-model` is the value; `v-model:open` is whether the calendar is open. Bound,
|
|
15909
|
+
your ref opens and closes it, and every open and close the user makes is
|
|
15910
|
+
written back: a pick, Escape, a click outside, the phone sheet's own dismiss. A static `:open` with no
|
|
15911
|
+
listener is only the initial state. An open from code is the same open a
|
|
15912
|
+
click makes, and `disabled` / `readonly` refuse it (the ref is set back
|
|
15913
|
+
to `false`).
|
|
15914
|
+
|
|
15841
15915
|
### Events & v-model
|
|
15842
15916
|
|
|
15843
15917
|
Because the control is a composite (segmented fields + calendar + optional
|
|
@@ -16042,6 +16116,7 @@ label>')` matches nothing; query each segment by its own label instead. See
|
|
|
16042
16116
|
## v-model
|
|
16043
16117
|
|
|
16044
16118
|
- `v-model` — type: `string \| string[] \| null \| undefined`
|
|
16119
|
+
- `v-model:open` — type: `boolean \| undefined`
|
|
16045
16120
|
- `v-model:time` — type: `string \| string[] \| null \| undefined`
|
|
16046
16121
|
|
|
16047
16122
|
## Props
|
|
@@ -16082,6 +16157,7 @@ label>')` matches nothing; query each segment by its own label instead. See
|
|
|
16082
16157
|
| `name` | `string \| undefined` | | | Defines the name of the input. |
|
|
16083
16158
|
| `numberOfMonths` | `number \| undefined` | `1` | | How many months the calendar popover shows side by side (day grids only); the phone sheet always shows one. Too narrow for them all, the months wrap. |
|
|
16084
16159
|
| `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. |
|
|
16160
|
+
| `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. |
|
|
16085
16161
|
| `persistentHint` | `boolean \| undefined` | `false` | | Keeps the hint displayed. |
|
|
16086
16162
|
| `placeholder` | `string \| undefined` | | | Text shown while the field is empty. |
|
|
16087
16163
|
| `prepend:icon` | `string \| undefined` | | | Name of the icon to be added at the start of the input. |
|
|
@@ -16170,6 +16246,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
16170
16246
|
- `show` — `(): void` — Emitted as soon as the calendar surface starts to open (the popover, or the sheet on a phone).
|
|
16171
16247
|
- `shown` — `(): void` — Emitted once the calendar surface is open and its open transition has finished.
|
|
16172
16248
|
- `update:modelValue` — `(value: string \| string[] \| null): void` — Emitted whenever the selected date value changes. Payload is `null` for cleared values, a single string for single-date mode, or a two-element array for range mode.
|
|
16249
|
+
- `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
|
|
16173
16250
|
- `update:time` — `(value: string \| string[] \| null): void` — Companion time model (`v-model:time`), emitted alongside every value change while `type="datetime"` is on. Always 24-hour `HH:mm` (or `HH:mm:ss` with `seconds`); `null` when cleared, an array in range mode.
|
|
16174
16251
|
|
|
16175
16252
|
## Slots
|
|
@@ -16588,7 +16665,9 @@ const replace = (saved: Member) => {
|
|
|
16588
16665
|
deleted, a route change) still plays its close and hands focus back. An
|
|
16589
16666
|
async `@complete` that removed it still decides the result: completed
|
|
16590
16667
|
when it succeeds, else `'unmounted'`. So `v-if="item"` on the dialog is
|
|
16591
|
-
fine.
|
|
16668
|
+
fine. In your own tests, the page stays inert for that close (its
|
|
16669
|
+
`transition-duration`), as for any close: wait for focus to come back
|
|
16670
|
+
before a `focus()`. Clicks driven by Playwright wait on their own.
|
|
16592
16671
|
- It settles when the close **starts**, together with `@hide`, so a list can
|
|
16593
16672
|
update while the dialog fades out. It never rejects and never hangs. A
|
|
16594
16673
|
refused close settles nothing, and a `complete` after a dismissal is
|
|
@@ -18245,13 +18324,13 @@ An `items` entry is one of three shapes, and you can mix them freely:
|
|
|
18245
18324
|
|
|
18246
18325
|
- a **menu item** — an object with a `value` and a `label`; a string or
|
|
18247
18326
|
number row is its own text and value (`items: ['Google', 'Bing']`);
|
|
18248
|
-
- a **
|
|
18249
|
-
|
|
18327
|
+
- a **divider run** — a nested `[ … ]` array: its rows, with a divider before
|
|
18328
|
+
and after, and nothing else (no title, no value of its own);
|
|
18250
18329
|
- a **group object** — `{ id, label?, items, selectable?, … }`, a titled and/or
|
|
18251
|
-
selectable
|
|
18330
|
+
selectable group (described below). A group with plain rows and no
|
|
18252
18331
|
`selectable` needs `group: true` to be a group rather than a submenu row;
|
|
18253
|
-
[
|
|
18254
|
-
`groupBy`, which
|
|
18332
|
+
[Headings](#headings-group-true-or-groupby) compares it with
|
|
18333
|
+
`groupBy`, which puts the rows of one group under headings. A group's heading is its `label` too;
|
|
18255
18334
|
add `hideLabel` to keep the `label` for the adaptive sheet title / chips /
|
|
18256
18335
|
`useBbDropdown` while rendering no heading in the menu.
|
|
18257
18336
|
|
|
@@ -18360,7 +18439,7 @@ const items: BbDropdownItem[] = [
|
|
|
18360
18439
|
href: '#preview',
|
|
18361
18440
|
target: '_blank',
|
|
18362
18441
|
},
|
|
18363
|
-
// A nested array becomes its own divider
|
|
18442
|
+
// A nested array becomes its own divider run. A destructive
|
|
18364
18443
|
// item never acts directly: its onClick awaits useConfirm and only
|
|
18365
18444
|
// proceeds on a yes.
|
|
18366
18445
|
[
|
|
@@ -18869,20 +18948,21 @@ rows distinct values when it matters:
|
|
|
18869
18948
|
- **Submenu parents.** A row that opens a submenu needs a value unique in the
|
|
18870
18949
|
whole menu; the flyout is addressed by it.
|
|
18871
18950
|
|
|
18872
|
-
###
|
|
18951
|
+
### Headings: `group: true` or `groupBy`
|
|
18873
18952
|
|
|
18874
18953
|
Two ways to put headings in a menu, for two different needs:
|
|
18875
18954
|
|
|
18876
|
-
- **Independent
|
|
18877
|
-
with `group: true` is
|
|
18878
|
-
|
|
18955
|
+
- **Independent groups, each its own chooser: `group: true`.** A group object
|
|
18956
|
+
with `group: true` is titled (its `label` is the heading) without being
|
|
18957
|
+
selectable; give it `selectable` and it becomes its own chooser. Each
|
|
18879
18958
|
group keeps **its own** value (its own companion and `v-model`) and, when
|
|
18880
|
-
`searchable`, its own search field. Use it for
|
|
18959
|
+
`searchable`, its own search field. Use it for groups that answer
|
|
18881
18960
|
different questions ("Sort by" / "Show").
|
|
18882
18961
|
- **One choice, sorted under headings: `groupBy` on one group.** The rows of a
|
|
18883
|
-
single group are listed under
|
|
18962
|
+
single group are listed under headings, and it stays one group:
|
|
18884
18963
|
**one** `v-model`, **one** search field. Use it when the headings only
|
|
18885
18964
|
organise the options of one question (categories under their sector).
|
|
18965
|
+
Its headings are sticky, as `BbSelect`'s group headers are.
|
|
18886
18966
|
|
|
18887
18967
|
```vue
|
|
18888
18968
|
<BbDropdown
|
|
@@ -18908,14 +18988,23 @@ Two ways to put headings in a menu, for two different needs:
|
|
|
18908
18988
|
- `groupBy` is a field path (`'sector'`, `'owner.team'`) read off each row,
|
|
18909
18989
|
or a function `(row) => string | null | undefined`. On a fetched group it
|
|
18910
18990
|
reads the **raw item**, so `items: ({ query }) => …` groups the same way.
|
|
18911
|
-
-
|
|
18912
|
-
`null`, `undefined` or `''` have no
|
|
18991
|
+
- Headings keep the order of their first row. Rows whose `groupBy` gives
|
|
18992
|
+
`null`, `undefined` or `''` have no heading: they are listed **first**,
|
|
18913
18993
|
before every heading — the same rule as `BbSelect`'s `group-by`.
|
|
18914
18994
|
- A heading is not a row: the arrows and typeahead skip it, and it is never
|
|
18915
|
-
selected. A search hides a
|
|
18916
|
-
|
|
18917
|
-
|
|
18918
|
-
|
|
18995
|
+
selected. A search hides a heading left without a matching row.
|
|
18996
|
+
- The rows under each heading are a `role="group"` labelled by it, with the
|
|
18997
|
+
look of a group title. The adaptive sheet shows the same headings.
|
|
18998
|
+
- `#group` replaces every heading's content, `#<groupId>:group` one group's,
|
|
18999
|
+
with `BbSelect`'s `#group` scope: `{ text, item, index, length, disabled }`
|
|
19000
|
+
(`item` is the raw `groupBy` value, `length` the rows under it, `disabled`
|
|
19001
|
+
whether all of them are). A count and a divider, for example:
|
|
19002
|
+
|
|
19003
|
+
```vue
|
|
19004
|
+
<template #category:group="{ text, length }">
|
|
19005
|
+
{{ text }} <span class="ms-auto text-xs">{{ length }}</span>
|
|
19006
|
+
</template>
|
|
19007
|
+
```
|
|
18919
19008
|
|
|
18920
19009
|
### Loading options on demand
|
|
18921
19010
|
|
|
@@ -18938,9 +19027,10 @@ The full grammar:
|
|
|
18938
19027
|
need the mapping. On a **`searchable`** group the context also carries
|
|
18939
19028
|
`query` (what the user typed, and `reason: 'search'` when they did) —
|
|
18940
19029
|
the same shape `BbSelect` passes, which is why one provider drops into both.
|
|
18941
|
-
A getter **throws** to fail: the
|
|
18942
|
-
icon
|
|
18943
|
-
|
|
19030
|
+
A getter **throws** to fail: the panel shows the group's failure row (an
|
|
19031
|
+
error icon, `failedText` and a "Try again" button that runs the failed call
|
|
19032
|
+
again with the same query) next to the menu, instead of "no data", even
|
|
19033
|
+
when `#empty` is slotted: `#empty` means empty.
|
|
18944
19034
|
- `itemText` / `itemValue` — a path string or getter producing each raw item's
|
|
18945
19035
|
label and value; without them a row reads its own `label` (else `text`) and
|
|
18946
19036
|
`value`. `v-model` on the companion surfaces the selected value(s);
|
|
@@ -19418,7 +19508,7 @@ What each knob does:
|
|
|
19418
19508
|
ranked search (case and accents ignored; exact, then starts-with, then word
|
|
19419
19509
|
starts, then contains, then a code typed without separators; one typo per
|
|
19420
19510
|
word of 5+ letters only when nothing else matched; ranked inside each
|
|
19421
|
-
`groupBy`
|
|
19511
|
+
`groupBy` heading), and on an async group passes the typed text to the getter as
|
|
19422
19512
|
`query` in its context object (`reason: 'search'`), the same shape
|
|
19423
19513
|
`BbSelect` uses, so one provider serves both.
|
|
19424
19514
|
- **`filterBy`** picks which raw fields the local search reads. Empty
|
|
@@ -19436,9 +19526,11 @@ What each knob does:
|
|
|
19436
19526
|
`searchable`, which is the one place the three-state `prefill` differs from a
|
|
19437
19527
|
plain menu group (`'interaction'`, the default, fetches when the group is
|
|
19438
19528
|
first reached; `true` fetches on mount).
|
|
19439
|
-
-
|
|
19440
|
-
|
|
19441
|
-
|
|
19529
|
+
- **`minQueryLength`** (as on `BbSelect`): below that many characters
|
|
19530
|
+
(trimmed) the query counts as empty, so no `'search'` call and no filtering
|
|
19531
|
+
run, and the field says how many characters to type (on a search-first
|
|
19532
|
+
group, its hint row too: "Type at least 2 characters"). Slots still get the
|
|
19533
|
+
typed `query`. No guard in the getter:
|
|
19442
19534
|
|
|
19443
19535
|
```vue
|
|
19444
19536
|
<BbDropdown
|
|
@@ -19449,15 +19541,12 @@ What each knob does:
|
|
|
19449
19541
|
searchable: true,
|
|
19450
19542
|
selectable: true,
|
|
19451
19543
|
prefill: false,
|
|
19544
|
+
minQueryLength: 2,
|
|
19452
19545
|
filterBy: false,
|
|
19453
|
-
items: ({ query }) =>
|
|
19546
|
+
items: ({ query }) => api.zones({ q: query }),
|
|
19454
19547
|
},
|
|
19455
19548
|
]"
|
|
19456
|
-
|
|
19457
|
-
<template #empty="{ query, text }">
|
|
19458
|
-
{{ query.length < 2 ? 'Type at least 2 characters' : text }}
|
|
19459
|
-
</template>
|
|
19460
|
-
</BbDropdown>
|
|
19549
|
+
/>
|
|
19461
19550
|
```
|
|
19462
19551
|
|
|
19463
19552
|
- **`stash`** accumulates the items behind _selected_ keys so they stay
|
|
@@ -19536,7 +19625,8 @@ when unsure, write `#[slotKey('Qualità')]` (`import { slotKey } from
|
|
|
19536
19625
|
| --- | --- |
|
|
19537
19626
|
| `#<value>`, `#<value>:prepend`, `#<value>:append` | one row — its content, leading or trailing region |
|
|
19538
19627
|
| `#<groupId>:item`, `#<groupId>:item:prepend`, `…:item:append` | **every row of that group**, and nothing else |
|
|
19539
|
-
| `#<groupId
|
|
19628
|
+
| `#<groupId>:label`, `#<groupId>:prepend`, `#<groupId>:append` | that group's title line — its content, leading or trailing |
|
|
19629
|
+
| `#group`, `#<groupId>:group` | the `groupBy` headings — every group's, or one group's |
|
|
19540
19630
|
| `item:prepend`, `item:append` | every row **and** every group title line, across the menu |
|
|
19541
19631
|
|
|
19542
19632
|
Each edge of a row has **one occupant** — nothing renders side by side. From
|
|
@@ -19551,7 +19641,9 @@ strongest to weakest:
|
|
|
19551
19641
|
| `item:prepend` | `item:append` |
|
|
19552
19642
|
| `prepend:icon` | `append:icon` |
|
|
19553
19643
|
|
|
19554
|
-
So a slot
|
|
19644
|
+
So a slot replaces the row's icon and the most specific slot wins. A slot
|
|
19645
|
+
that renders nothing for a row (its content behind a `v-if` that is false
|
|
19646
|
+
there) is skipped: the next one down draws, down to the row's own icon. A
|
|
19555
19647
|
row's own `#<value>:append` is written for that one row, so it may replace its
|
|
19556
19648
|
submenu chevron; the group-wide and shared append slots never do, so a submenu
|
|
19557
19649
|
row keeps its chevron unless you name it. The check beats everything — as in
|
|
@@ -19817,8 +19909,9 @@ Two things this replaces, both seen in real apps:
|
|
|
19817
19909
|
`v-else-if="clinicsById.get(item.value)"`) to tell a record row from an action
|
|
19818
19910
|
row, and a lookup map rebuilt from the fetch to get the record back. The
|
|
19819
19911
|
group row slot is the "which rows" answer; `item.meta` is the record.
|
|
19820
|
-
- **Re-drawing the other rows' icons
|
|
19821
|
-
|
|
19912
|
+
- **Re-drawing the other rows' icons** in a shared `item:prepend`. A shared
|
|
19913
|
+
slot that renders nothing for a row leaves that row its `prepend:icon`, but
|
|
19914
|
+
the group row slot never has to ask.
|
|
19822
19915
|
|
|
19823
19916
|
### Header and footer
|
|
19824
19917
|
|
|
@@ -19834,6 +19927,12 @@ in one `<div>`: a single wrapping element stretches across the sheet and lays
|
|
|
19834
19927
|
out its children itself. The example below does that, so the button spans the
|
|
19835
19928
|
footer on both surfaces.
|
|
19836
19929
|
|
|
19930
|
+
A note in the footer (a sentence, not a button) is text like any other: with
|
|
19931
|
+
the default `width="auto"` the menu grows to fit it, and it wraps only once
|
|
19932
|
+
the menu reaches the space it has, so a long note makes a wide menu over short
|
|
19933
|
+
rows. Set `width` on the dropdown (`:width="240"`) and the note wraps at that
|
|
19934
|
+
width instead. No zero-width wrapper or `nowrap` override is needed.
|
|
19935
|
+
|
|
19837
19936
|
**Pinned header and footer**
|
|
19838
19937
|
|
|
19839
19938
|
```vue
|
|
@@ -19947,6 +20046,66 @@ const items: BbDropdownItem[] = [
|
|
|
19947
20046
|
</script>
|
|
19948
20047
|
```
|
|
19949
20048
|
|
|
20049
|
+
### Opening from code: `v-model`
|
|
20050
|
+
|
|
20051
|
+
`v-model` is whether the menu is open, as on `BbDialog` and `BbOffCanvas`.
|
|
20052
|
+
Bound, your flag controls it: set it to `true` and the menu opens at its
|
|
20053
|
+
activator (or at `anchor`, when there is no activator to open it), with focus
|
|
20054
|
+
on its first row, as a keyboard open; set it to `false` and it closes, focus
|
|
20055
|
+
going back to the activator (or to where it was). The user's opens and closes
|
|
20056
|
+
update the flag. A static `:model-value` with no listener is only the initial
|
|
20057
|
+
state: `:model-value="false"` starts closed, and the activator still opens it.
|
|
20058
|
+
|
|
20059
|
+
The case it is for: one menu's row opens another menu at the same place — a
|
|
20060
|
+
row menu's "Delegate to…" that opens a searchable people menu under the same
|
|
20061
|
+
button, or a dialog header action that opens a menu anchored to it:
|
|
20062
|
+
|
|
20063
|
+
```vue
|
|
20064
|
+
<script setup lang="ts">
|
|
20065
|
+
import { ref, useTemplateRef } from 'vue';
|
|
20066
|
+
const delegating = ref(false);
|
|
20067
|
+
const rowMenu = useTemplateRef('rowMenu');
|
|
20068
|
+
</script>
|
|
20069
|
+
|
|
20070
|
+
<template>
|
|
20071
|
+
<BbDropdown
|
|
20072
|
+
:items="[
|
|
20073
|
+
{ value: 'edit', label: 'Edit' },
|
|
20074
|
+
{
|
|
20075
|
+
value: 'delegate',
|
|
20076
|
+
label: 'Delegate to…',
|
|
20077
|
+
onClick: () => (delegating = true),
|
|
20078
|
+
},
|
|
20079
|
+
]"
|
|
20080
|
+
>
|
|
20081
|
+
<template #activator="{ props }">
|
|
20082
|
+
<BbButton ref="rowMenu" v-bind="props" icon-only prepend:icon="dots"
|
|
20083
|
+
>More</BbButton
|
|
20084
|
+
>
|
|
20085
|
+
</template>
|
|
20086
|
+
</BbDropdown>
|
|
20087
|
+
<BbDropdown
|
|
20088
|
+
v-model="delegating"
|
|
20089
|
+
:anchor="rowMenu"
|
|
20090
|
+
:items="[
|
|
20091
|
+
{
|
|
20092
|
+
id: 'people',
|
|
20093
|
+
label: 'People',
|
|
20094
|
+
selectable: true,
|
|
20095
|
+
searchable: true,
|
|
20096
|
+
items: searchPeople,
|
|
20097
|
+
},
|
|
20098
|
+
]"
|
|
20099
|
+
>
|
|
20100
|
+
<BbDropdownGroup id="people" v-model="assignee" />
|
|
20101
|
+
</BbDropdown>
|
|
20102
|
+
</template>
|
|
20103
|
+
```
|
|
20104
|
+
|
|
20105
|
+
The first menu closes as its row runs, and the second opens under the same
|
|
20106
|
+
button with focus inside it; Escape, an outside press or a pick closes it and
|
|
20107
|
+
sets `delegating` back to `false`.
|
|
20108
|
+
|
|
19950
20109
|
### Placement, width and boundaries
|
|
19951
20110
|
|
|
19952
20111
|
- `placement` (default `'bottom'`) accepts every floating-UI placement
|
|
@@ -19968,7 +20127,11 @@ const items: BbDropdownItem[] = [
|
|
|
19968
20127
|
edge away from the trigger, and only the viewport flips it) tune positioning.
|
|
19969
20128
|
Pass `boundary` a `useTemplateRef` or a selector, not `$refs.x`: `$refs` is
|
|
19970
20129
|
not reactive, so a menu in a table cell rendered before the ref was set keeps
|
|
19971
|
-
no boundary until that row happens to re-render. `
|
|
20130
|
+
no boundary until that row happens to re-render. Inside a `BbTable` (a row
|
|
20131
|
+
menu, a cell's ⋯) the default keeps the menu within the table's left and
|
|
20132
|
+
right edges only: it still opens below its trigger, or flips above at the
|
|
20133
|
+
viewport, never at the table's bottom. A `boundary` replaces that default
|
|
20134
|
+
entirely. `eager` pre-renders the panel
|
|
19972
20135
|
before first open; `transitionDuration` controls the open/close animation.
|
|
19973
20136
|
- The menu closes itself on outside click/focus, on `Escape`, when another
|
|
19974
20137
|
dropdown opens, and when the activator scrolls out of view. `disabled`
|
|
@@ -20149,8 +20312,11 @@ object form, a style and attributes — optionally only while a state is on.
|
|
|
20149
20312
|
Parts: `root` (the flyout — an invisible positioning wrapper, no node on
|
|
20150
20313
|
mobile), `panel` (the menu surface you see — background, border, radius and
|
|
20151
20314
|
shadow live here; the sheet itself on mobile), `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),
|
|
20152
|
-
`header`, `footer`, `
|
|
20153
|
-
|
|
20315
|
+
`header`, `footer`, `box` (every `searchable` group's search box, around the
|
|
20316
|
+
field and its magnifier: what `box` is on a field — border, background and
|
|
20317
|
+
radius go here; on the flyout and the phone sheet alike), `input` (every
|
|
20318
|
+
`searchable` group's search field — a broadcast, on the flyout and the phone
|
|
20319
|
+
sheet alike; its magnifier is chrome),
|
|
20154
20320
|
`list` (the top-level entries container between the bands
|
|
20155
20321
|
— a flex column with a 1px gap; a submenu's list is not reached), `item` — every entry, submenus included, a broadcast
|
|
20156
20322
|
resolved per entry — and `itemText` / `itemIcon` / `itemDescription`, that
|
|
@@ -20487,11 +20653,10 @@ own sizes.
|
|
|
20487
20653
|
`<BbDropdownGroup>` companions; a button there opens nothing. Use
|
|
20488
20654
|
`<template #activator="{ props }">` + `v-bind="props"`, or `v-bb-dropdown`
|
|
20489
20655
|
(`bitboss-ui/dropdown-default-slot` and `check` report it).
|
|
20490
|
-
- **
|
|
20491
|
-
(
|
|
20492
|
-
|
|
20493
|
-
|
|
20494
|
-
fight in a loop.
|
|
20656
|
+
- **Open it from code with `v-model`, never with a hidden activator's
|
|
20657
|
+
`.click()`** (§ Opening from code). Don't reopen it from a `@focus` handler
|
|
20658
|
+
on the activator — closing returns focus there, and the two fight in a
|
|
20659
|
+
loop.
|
|
20495
20660
|
- **Don't navigate from `onClick`** (`router.push`, `window.location`) — give
|
|
20496
20661
|
the item `href`/`to` and let it render a real link.
|
|
20497
20662
|
- **Don't rebuild selection** with `onClick` + your own state — mark the group
|
|
@@ -20603,26 +20768,31 @@ uses `ArrowRight` / `ArrowLeft` and its back control; `Escape` on a drilled-in
|
|
|
20603
20768
|
level (row or search box) goes back one level, focus on the row that opened
|
|
20604
20769
|
it, and at the top level closes the sheet.
|
|
20605
20770
|
|
|
20771
|
+
## v-model
|
|
20772
|
+
|
|
20773
|
+
- `v-model` — type: `boolean \| undefined`
|
|
20774
|
+
|
|
20606
20775
|
## Props
|
|
20607
20776
|
|
|
20608
20777
|
| Prop | Type | Default | Required | Description |
|
|
20609
20778
|
| --- | --- | --- | --- | --- |
|
|
20610
|
-
| `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`, `footer`, `header`, `input`, `item`, `itemDescription`, `itemIcon`, `itemText`, `list`, `panel`, `root`, `sheet`, `submenu`. States: `activeLink`, `default`, `destructive`, `disabled`, `exactActiveLink`, `
|
|
20779
|
+
| `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: `box`, `check`, `footer`, `header`, `input`, `item`, `itemDescription`, `itemIcon`, `itemText`, `list`, `panel`, `root`, `sheet`, `submenu`. States: `open`, `activeLink`, `default`, `destructive`, `disabled`, `exactActiveLink`, `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 `BbDropdownProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
20611
20780
|
| `activator` | `ElementOrComponentRef \| undefined` | | | An external activator (element or component ref): the slot isn't rendered; the listeners and ARIA (`aria-haspopup` / `aria-expanded` / `aria-controls`) go on it, so don't add your own. |
|
|
20612
20781
|
| `adaptive` | `boolean \| undefined` | ``all.adaptive` (`true`)` | | On mobile (below `config.mobileMaxWidth`), renders the menu as a bottom sheet that drills into submenus one level at a time instead of hover flyouts; slots and selection are unchanged. Unset: the global `all.adaptive`. |
|
|
20613
20782
|
| `anchor` | `ElementOrComponentRef \| VirtualAnchor \| undefined` | `the activator element` | | What the panel positions against instead of the activator (e.g. a wrapper around it): an element, a component ref or a virtual box. It also sets a percentage `width`. Ignored with `placement="cursor"`. |
|
|
20614
|
-
| `boundary` | `string \| ElementOrComponentRef \| undefined` | | | Keeps the panel inside this element beside its trigger (sideways
|
|
20783
|
+
| `boundary` | `string \| ElementOrComponentRef \| undefined` | | | Keeps the panel inside this element beside its trigger (sideways under a menu); away from it only the viewport flips it. An element, component ref or CSS selector (a `useTemplateRef`, not `$refs.x`). Default in a `BbTable`: the table's left and right edges. |
|
|
20615
20784
|
| `closeOnSelect` | `boolean \| undefined` | `unset (close after a single-choice change)` | | Whether a selection closes the menu. Unset: a change in a single-choice group closes it (an untick too, at any depth); a `multiple` group stays open. `true`: every selection change closes it. `false`: none does. |
|
|
20616
20785
|
| `compact` | `boolean \| undefined` | `undefined` | | Compact density, the `BbSelect` ladder: flyout rows 28px → 24px, sheet rows 44px → 36px (a sheet row stays a touch target). The label size does not change. |
|
|
20617
20786
|
| `disabled` | `boolean \| undefined` | `false` | | Disables the component |
|
|
20618
20787
|
| `eager` | `boolean \| undefined` | `false` | | Renders the menu panel at mount instead of on the first open (the phone sheet's too), and keeps its rows after a close. Without it the rows mount on each open and go once the menu has closed. |
|
|
20619
|
-
| `emptyText` | `string \| undefined` | | |
|
|
20788
|
+
| `emptyText` | `string \| undefined` | | | A pipeline group's no-items row; its own `emptyText` wins. Default: `common.emptyText`. |
|
|
20620
20789
|
| `enforceCoherence` | `boolean \| undefined` | `false` | | Default for pipeline groups: drop selections that are no longer present in a group's current items (e.g. after a `dependencies` re-fetch) from the selection and `v-model`. A group's own `enforceCoherence` overrides this. |
|
|
20621
|
-
| `failedText` | `string \| undefined` | | |
|
|
20790
|
+
| `failedText` | `string \| undefined` | | | A pipeline group's failed-load row (its getter threw); its own `failedText` wins. Default: `common.failedText`. |
|
|
20622
20791
|
| `id` | `string \| undefined` | | | Names this dropdown: the activator's id (unless it already has one), the menu's `menu_<id>`, and the key `useBbDropdown(id)` and a companion `BbDropdownGroup` pair by. Generated when omitted. |
|
|
20623
|
-
| `items` | `(BbDropdownItem \| PrimitiveRow)[]` | `[]` | yes | The menu rows, each a `BbBaseButton` (`button`, `a` or `router-link`): a flat array for one group, nested arrays for divider-separated groups, or `InternalGroup` objects for titled / selectable
|
|
20792
|
+
| `items` | `(BbDropdownItem \| PrimitiveRow)[]` | `[]` | yes | The menu rows, each a `BbBaseButton` (`button`, `a` or `router-link`): a flat array for one group, nested arrays for divider-separated groups, or `InternalGroup` objects for titled / selectable groups. A row's own `items` opens a submenu. |
|
|
20624
20793
|
| `keepActivator` | `boolean \| undefined` | `false` | | Keeps the trigger when no row is visible (by default it is hidden): inert, no popup ARIA, `empty` in the activator slot. A `contextMenu` trigger always stays. |
|
|
20625
|
-
| `loadingText` | `string \| undefined` | | |
|
|
20794
|
+
| `loadingText` | `string \| undefined` | | | A pipeline group's loading row; its own `loadingText` wins. Default: `common.loadingText`. |
|
|
20795
|
+
| `modelValue` | `boolean \| undefined` | `undefined` | | Whether the menu is open (`v-model`): `true` opens it from code at its activator or `anchor`. Unbound: the initial state. |
|
|
20626
20796
|
| `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. |
|
|
20627
20797
|
| `offset` | `number \| undefined` | `4` | | Space the floating container will maintain from the activator. |
|
|
20628
20798
|
| `padding` | `number \| undefined` | `10` | | Minimum empty space to keep from the edge of the page |
|
|
@@ -20643,6 +20813,7 @@ it, and at the top level closes the sheet.
|
|
|
20643
20813
|
| `sheet` | The bottom sheet the menu becomes on a phone (the `BbOffCanvas` root) — never the desktop surface. Applied after `panel`, so it wins a conflict there. |
|
|
20644
20814
|
| `header` | The menu's header band. |
|
|
20645
20815
|
| `footer` | The menu's footer band. |
|
|
20816
|
+
| `box` | Every searchable group's search box (field and magnifier), as `box` on a field; desktop and phone. |
|
|
20646
20817
|
| `input` | A searchable group's search field — a broadcast: it lands on every searchable group's field, desktop and phone alike. Its magnifier glyph is chrome. |
|
|
20647
20818
|
| `list` | The top-level items container between the bands — the node that lays the entries out (a flex column with a 1px gap; on a phone, the sheet's items container). A submenu's list is not reached. Groups, headings and dividers are not parts. |
|
|
20648
20819
|
| `item` | One menu entry, submenus included — a broadcast resolved per entry. Also takes a per-item function, called with the entry. |
|
|
@@ -20672,6 +20843,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
20672
20843
|
- `item:unselected` — `(value: any): void` — The user unselected a row (a multiple toggle, a `clearable` re-click, a chip ×, or the old value a single pick replaces). Payload is the item's resolved value, matching `item:selected`.
|
|
20673
20844
|
- `show` — `(): void` — Emitted as soon as the menu (the popover, or the sheet on a phone) starts to open.
|
|
20674
20845
|
- `shown` — `(): void` — Emitted once the menu is open and its open transition has finished.
|
|
20846
|
+
- `update:modelValue` — `(value: boolean): void` — The menu opened or closed (`v-model`): `true` on open, `false` on close.
|
|
20675
20847
|
|
|
20676
20848
|
## Slots
|
|
20677
20849
|
|
|
@@ -20679,19 +20851,21 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
20679
20851
|
- `default` — scope: `any` — Hosts `<BbDropdownGroup>` companions. They register their group with the dropdown and render nothing themselves.
|
|
20680
20852
|
- `empty` — scope: `BbDropdownPlaceholderSlotProps` `{ groupId?: string; query: string; text: string }` — Replaces the default "no data" placeholder row shown in a pipeline group that resolved to no items. Rendered once per empty group. A failed load is not empty: it keeps its own row (the error icon and `failedText`).
|
|
20681
20853
|
- `footer` — scope: `BbDropdownEdgeSlotProps` `{ disabled?: boolean; open: boolean; placement: Placement \| "cursor" }` — Pinned below the rows, outside their scroll, with a divider — for action buttons.
|
|
20854
|
+
- `group` — scope: `BbDropdownGroupSlotProps` `{ text: string; item: unknown; index: number; length: number; disabled: boolean }` — Every group's `groupBy` headings (`BbSelect`'s `#group` scope); `#<groupId>:group` beats it.
|
|
20682
20855
|
- `header` — scope: `BbDropdownEdgeSlotProps` `{ disabled?: boolean; open: boolean; placement: Placement \| "cursor" }` — Pinned above the rows, outside their scroll, with a divider — for a title or a filter field.
|
|
20683
|
-
- `item:append` — scope: `BbDropdownItemSlotProps` `{ description?: string; disabled?: boolean; group: BbDropdownSlotGroup; groupTitle: boolean; level: number; index: number; item: InternalItem; loading: boolean; open: boolean; placement: Placement \| "cursor"; selected: boolean; label: string; activeLink?: boolean; exactActiveLink?: boolean }` — The trailing region of every row (and group title line), replacing its `append:icon
|
|
20684
|
-
- `item:prepend` — scope: `BbDropdownItemSlotProps` `{ description?: string; disabled?: boolean; group: BbDropdownSlotGroup; groupTitle: boolean; level: number; index: number; item: InternalItem; loading: boolean; open: boolean; placement: Placement \| "cursor"; selected: boolean; label: string; activeLink?: boolean; exactActiveLink?: boolean }` — The leading region of every row (and group title line), replacing its `prepend:icon
|
|
20856
|
+
- `item:append` — scope: `BbDropdownItemSlotProps` `{ description?: string; disabled?: boolean; group: BbDropdownSlotGroup; groupTitle: boolean; level: number; index: number; item: InternalItem; loading: boolean; open: boolean; placement: Placement \| "cursor"; selected: boolean; label: string; activeLink?: boolean; exactActiveLink?: boolean }` — The trailing region of every row (and group title line), replacing its `append:icon` wherever it renders. A named slot wins; the submenu chevron and the check on a selected row take its place.
|
|
20857
|
+
- `item:prepend` — scope: `BbDropdownItemSlotProps` `{ description?: string; disabled?: boolean; group: BbDropdownSlotGroup; groupTitle: boolean; level: number; index: number; item: InternalItem; loading: boolean; open: boolean; placement: Placement \| "cursor"; selected: boolean; label: string; activeLink?: boolean; exactActiveLink?: boolean }` — The leading region of every row (and group title line), replacing its `prepend:icon` wherever it renders. A named slot wins.
|
|
20685
20858
|
- `loading` — scope: `BbDropdownPlaceholderSlotProps` `{ groupId?: string; query: string; text: string }` — Replaces the default loading placeholder row shown in a pipeline group while its async items load. Rendered once per loading group.
|
|
20686
|
-
- `#<value>` (named from data) — scope: `BbDropdownItemSlotProps` — One row's content (label and description), by its value; in a fetched group, by its resolved `itemValue`. Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `activator`, `default`, `empty`, `footer`, `header`, `item`, `loading`.
|
|
20859
|
+
- `#<value>` (named from data) — scope: `BbDropdownItemSlotProps` — One row's content (label and description), by its value; in a fetched group, by its resolved `itemValue`. Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `activator`, `default`, `empty`, `footer`, `group`, `header`, `item`, `loading`.
|
|
20687
20860
|
- `#<value>:prepend` (named from data) — scope: `BbDropdownItemSlotProps` — One row's leading region; replaces its `prepend:icon`.
|
|
20688
20861
|
- `#<value>:append` (named from data) — scope: `BbDropdownItemSlotProps` — One row's trailing region; replaces its `append:icon` and its submenu chevron. The check takes its place on the selected row.
|
|
20689
20862
|
- `#<groupId>:item` (named from data) — scope: `BbDropdownItemSlotProps` — The content of every row of that group, and no other; a row's own `#<value>` still wins.
|
|
20690
20863
|
- `#<groupId>:item:prepend` (named from data) — scope: `BbDropdownItemSlotProps` — The leading region of every row of that group — e.g. an avatar per record, drawn from `item.meta`, while other rows keep their `prepend:icon`.
|
|
20691
20864
|
- `#<groupId>:item:append` (named from data) — scope: `BbDropdownItemSlotProps` — The trailing region of every row of that group; replaces their `append:icon`. The check takes its place on the selected row.
|
|
20692
|
-
- `#<groupId
|
|
20865
|
+
- `#<groupId>:label` (named from data) — scope: `BbDropdownItemSlotProps` — That group's title content (`item` is the group, `groupTitle` is `true`).
|
|
20693
20866
|
- `#<groupId>:prepend` (named from data) — scope: `BbDropdownItemSlotProps` — The leading region of that group's title line.
|
|
20694
20867
|
- `#<groupId>:append` (named from data) — scope: `BbDropdownItemSlotProps` — The trailing region of that group's title line.
|
|
20868
|
+
- `#<groupId>:group` (named from data) — scope: `BbDropdownGroupSlotProps` — That group's `groupBy` headings; beats `group`.
|
|
20695
20869
|
|
|
20696
20870
|
## CSS custom properties
|
|
20697
20871
|
|
|
@@ -20714,12 +20888,12 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
20714
20888
|
- `BbDropdown` _(this component)_ — its own template binds: `panel` → `CommonPopover`, `root` → `CommonPopover`, `header` → `div.bb-dropdown__header`, `list` → `span.bb-dropdown__list`, `footer` → `div.bb-dropdown__footer`
|
|
20715
20889
|
- `BbDropdownList` _(internal — not importable, reach it through `BbDropdown`)_ — also mounts `BbIcon`, `ErrorIcon`, `CommonPopover`, `BbDropdownList`
|
|
20716
20890
|
- `BbBadge` _(public — [contract](https://llms-bitboss-ui.bitboss.it/dist/ai/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`
|
|
20717
|
-
- `AdaptiveDropdown` _(internal — not importable, reach it through `BbDropdown`)_ — hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs); also mounts `BbSmoothHeight`, `BbDropdownList`
|
|
20891
|
+
- `AdaptiveDropdown` _(internal — not importable, reach it through `BbDropdown`)_ — hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs); also mounts `BbSmoothHeight`, `BbDropdownList`, `DropdownFailures`
|
|
20718
20892
|
- `BbOffCanvas` _(public — [contract](https://llms-bitboss-ui.bitboss.it/dist/ai/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`
|
|
20719
20893
|
- `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`, `--icon-size`; also mounts `BbIcon`
|
|
20720
20894
|
- `BbButton` _(public — [contract](https://llms-bitboss-ui.bitboss.it/dist/ai/BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `span.bb-button__prepend-icon`, `icon` → `BbIcon`, `text` → `span.bb-button__text`, `icon` → `span.bb-button__append-icon`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--ipx`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring-color`, `--ring-size`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbSpinner`, `BbIcon`
|
|
20721
20895
|
- `BbBaseButton` _(public — [contract](https://llms-bitboss-ui.bitboss.it/dist/ai/BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
|
|
20722
|
-
- Also mounts `CommonPopover`, `DropdownPipelineResolver`
|
|
20896
|
+
- Also mounts `CommonPopover`, `DropdownFailures`, `DropdownPipelineResolver`
|
|
20723
20897
|
|
|
20724
20898
|
## See Also
|
|
20725
20899
|
|
|
@@ -21233,8 +21407,9 @@ style and attributes — optionally only while a state is on. Parts: `root`
|
|
|
21233
21407
|
(the group), `main` and `toggle` (the two halves, each handed to its button as
|
|
21234
21408
|
its `pt:root`), `icon`, `spinner` and `text` (the main button's — handed to it
|
|
21235
21409
|
as its own `pt`; the toggle's chevron is chrome), `panel` (the menu), `sheet` (the bottom sheet
|
|
21236
|
-
the menu becomes on a phone, only), `input` (every `searchable`
|
|
21237
|
-
search field), `
|
|
21410
|
+
the menu becomes on a phone, only), `box` and `input` (every `searchable`
|
|
21411
|
+
group's search box, and the field in it), `list` (the top-level entries
|
|
21412
|
+
container), `item` (every entry), and `itemText` /
|
|
21238
21413
|
`itemIcon` / `itemDescription` / `check` (an entry's label, its icons, its muted
|
|
21239
21414
|
second line and a checked entry's tick), and `submenu` (every submenu's flyout
|
|
21240
21415
|
box) — all handed to the `BbDropdown` under the same words, so
|
|
@@ -21331,6 +21506,15 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
21331
21506
|
`pt` prop) is typed as `BbDropdownButtonProps['pt']`, never an imported `PtValue`: see
|
|
21332
21507
|
[passthrough § Typing `pt` in `<script>`](https://llms-bitboss-ui.bitboss.it/dist/ai/guides/passthrough.md#typing-pt-in-script).
|
|
21333
21508
|
|
|
21509
|
+
### Opening from code: `v-model:open`
|
|
21510
|
+
|
|
21511
|
+
`v-model` is the value; `v-model:open` is whether the menu is open. Bound,
|
|
21512
|
+
your ref opens and closes it, and every open and close the user makes is
|
|
21513
|
+
written back: a pick, Escape, a click outside. A static `:open` with no
|
|
21514
|
+
listener is only the initial state. An open from code is the same open a
|
|
21515
|
+
click makes (focus moves to the first row, and back on close), and `disabled` / `readonly` refuse it (the ref is set back
|
|
21516
|
+
to `false`).
|
|
21517
|
+
|
|
21334
21518
|
### Works well with
|
|
21335
21519
|
|
|
21336
21520
|
- [useConfirm](https://llms-bitboss-ui.bitboss.it/dist/ai/composables/useConfirm.md) — gate a destructive alternate
|
|
@@ -21370,11 +21554,15 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
21370
21554
|
- While an async action runs, the busy half blocks re-entry automatically;
|
|
21371
21555
|
don't disable the other half yourself.
|
|
21372
21556
|
|
|
21557
|
+
## v-model
|
|
21558
|
+
|
|
21559
|
+
- `v-model:open` — type: `boolean \| undefined`
|
|
21560
|
+
|
|
21373
21561
|
## Props
|
|
21374
21562
|
|
|
21375
21563
|
| Prop | Type | Default | Required | Description |
|
|
21376
21564
|
| --- | --- | --- | --- | --- |
|
|
21377
|
-
| `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`, `footer`, `header`, `icon`, `input`, `item`, `itemDescription`, `itemIcon`, `itemText`, `main`, `panel`, `root`, `sheet`, `spinner`, `submenu`, `text`, `toggle`. States: `activeLink`, `
|
|
21565
|
+
| `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: `box`, `check`, `footer`, `header`, `icon`, `input`, `item`, `itemDescription`, `itemIcon`, `itemText`, `list`, `main`, `panel`, `root`, `sheet`, `spinner`, `submenu`, `text`, `toggle`. States: `activeLink`, `disabled`, `exactActiveLink`, `loading`, `open`, `default`, `destructive`, `selected`, `ghost`, `link`, `outline`, `primary`, `secondary`. 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 `BbDropdownButtonProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
21378
21566
|
| `activeClass` | `string \| undefined` | | | Class to apply when the link is active. |
|
|
21379
21567
|
| `adaptive` | `boolean \| undefined` | ``all.adaptive` (`true`)` | | On mobile (below `config.mobileMaxWidth`), renders the menu as a bottom sheet that drills into submenus one level at a time instead of hover flyouts; slots and selection are unchanged. Unset: the global `all.adaptive`. |
|
|
21380
21568
|
| `append:icon` | `string \| undefined` | | | Icon to be added on the right of the text. |
|
|
@@ -21417,6 +21605,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
21417
21605
|
| `onProgress` | `((progress: { percentage: number \| undefined; }) => void) \| undefined` | | | Progress callback invoked by Inertia with the upload/download percentage when available. |
|
|
21418
21606
|
| `onStart` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia when a request starts. |
|
|
21419
21607
|
| `onSuccess` | `(() => void) \| undefined` | | | Lifecycle hook invoked by Inertia when a request succeeds. |
|
|
21608
|
+
| `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. |
|
|
21420
21609
|
| `padding` | `number \| undefined` | `10` | | Minimum empty space to keep from the edge of the page |
|
|
21421
21610
|
| `pageProps` | `Record<string, unknown> \| ((currentProps: Record<string, unknown>, sharedProps: Record<string, unknown>) => Record<string, unknown>) \| null \| undefined` | | | Inertia: props to merge into the next page optimistically, before the server responds. Either an object or a function of the current props. Typed platform-agnostically (matching BbButton) so the library's types never require `@inertiajs/vue3` to be installed. |
|
|
21422
21611
|
| `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'` \| `'cursor'` | `'bottom'` | | Position relative to the activator; `'cursor'` anchors at the mouse/touch point. No arrow (tooltips only). |
|
|
@@ -21455,7 +21644,9 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
21455
21644
|
| `sheet` | The bottom sheet the menu becomes on a phone only. |
|
|
21456
21645
|
| `header` | The band around your `#header` slot: at the top of the menu on desktop, the sheet's header on a phone — handed to the `BbDropdown`. |
|
|
21457
21646
|
| `footer` | The band around your `#footer` slot: at the bottom of the menu on desktop, the sheet's footer on a phone — handed to the `BbDropdown`. |
|
|
21647
|
+
| `box` | A searchable group's search box in the menu (field and magnifier) — handed to the `BbDropdown` as its own `pt:box`. |
|
|
21458
21648
|
| `input` | A searchable group's search field in the menu — a broadcast, every searchable group's field — handed to the `BbDropdown` as its own `pt:input`. |
|
|
21649
|
+
| `list` | The menu's top-level items container — handed to the `BbDropdown` as its own `pt:list`. |
|
|
21459
21650
|
| `item` | One menu entry, submenus included — a broadcast resolved per entry. Also takes a per-item function, called with the entry. |
|
|
21460
21651
|
| `itemText` | An entry's label (its `label`) — resolved with that entry's states. A per-entry `#<value>` slot replaces it. Also takes a per-item function. |
|
|
21461
21652
|
| `itemIcon` | An entry's prepend / append icons — resolved with that entry's states. Also takes a per-item function. |
|
|
@@ -21489,6 +21680,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
21489
21680
|
- `item:unselected` — `(value: any): void` — A row of a selectable group was unselected (same payload as above).
|
|
21490
21681
|
- `show` — `(): void` — Emitted as soon as the menu (the popover, or the sheet on a phone) starts to open.
|
|
21491
21682
|
- `shown` — `(): void` — Emitted once the menu is open and its open transition has finished.
|
|
21683
|
+
- `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
|
|
21492
21684
|
|
|
21493
21685
|
## Slots
|
|
21494
21686
|
|
|
@@ -21508,9 +21700,10 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
21508
21700
|
- `#<groupId>:item` (named from data) — scope: `BbDropdownItemSlotProps` — The content of every row of that group, and no other; a row's own `#<value>` still wins.
|
|
21509
21701
|
- `#<groupId>:item:prepend` (named from data) — scope: `BbDropdownItemSlotProps` — The leading region of every row of that group — e.g. an avatar per record, drawn from `item.meta`, while other rows keep their `prepend:icon`.
|
|
21510
21702
|
- `#<groupId>:item:append` (named from data) — scope: `BbDropdownItemSlotProps` — The trailing region of every row of that group; replaces their `append:icon`. The check takes its place on the selected row.
|
|
21511
|
-
- `#<groupId
|
|
21703
|
+
- `#<groupId>:label` (named from data) — scope: `BbDropdownItemSlotProps` — That group's title content (`item` is the group, `groupTitle` is `true`).
|
|
21512
21704
|
- `#<groupId>:prepend` (named from data) — scope: `BbDropdownItemSlotProps` — The leading region of that group's title line.
|
|
21513
21705
|
- `#<groupId>:append` (named from data) — scope: `BbDropdownItemSlotProps` — The trailing region of that group's title line.
|
|
21706
|
+
- `#<groupId>:group` (named from data) — scope: `BbDropdownGroupSlotProps` — That group's `groupBy` headings; beats `group`.
|
|
21514
21707
|
|
|
21515
21708
|
## Component tree
|
|
21516
21709
|
|
|
@@ -21524,10 +21717,10 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
21524
21717
|
- `BbDropdownButton` _(this component)_ — hands `BbButton` the pt map `{ main: 'root', icon: 'icon', spinner: 'spinner', text: 'text' }` (ours → theirs); hands `BbDropdown` the pt map `{ item: 'item', itemText: 'itemText', itemIcon: 'itemIcon', itemDescription: 'itemDescription', check: 'check' }` (ours → theirs); hands `BbButton` the pt map `{ toggle: 'root' }` (ours → theirs)
|
|
21525
21718
|
- `BbButton` _(public — [contract](https://llms-bitboss-ui.bitboss.it/dist/ai/BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `span.bb-button__prepend-icon`, `icon` → `BbIcon`, `text` → `span.bb-button__text`, `icon` → `span.bb-button__append-icon`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--ipx`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring-color`, `--ring-size`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbSpinner`, `BbIcon`
|
|
21526
21719
|
- `BbBaseButton` _(public — [contract](https://llms-bitboss-ui.bitboss.it/dist/ai/BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
|
|
21527
|
-
- `BbDropdown` _(public — [contract](https://llms-bitboss-ui.bitboss.it/dist/ai/BbDropdown.md))_ — its own pt parts (`BbDropdown`): `panel` → `CommonPopover`, `root` → `CommonPopover`, `header` → `div.bb-dropdown__header`, `list` → `span.bb-dropdown__list`, `footer` → `div.bb-dropdown__footer`; documented CSS variables: `--menu-inset`; also mounts `CommonPopover`, `DropdownPipelineResolver`
|
|
21720
|
+
- `BbDropdown` _(public — [contract](https://llms-bitboss-ui.bitboss.it/dist/ai/BbDropdown.md))_ — its own pt parts (`BbDropdown`): `panel` → `CommonPopover`, `root` → `CommonPopover`, `header` → `div.bb-dropdown__header`, `list` → `span.bb-dropdown__list`, `footer` → `div.bb-dropdown__footer`; documented CSS variables: `--menu-inset`; also mounts `CommonPopover`, `DropdownFailures`, `DropdownPipelineResolver`
|
|
21528
21721
|
- `BbDropdownList` _(internal — not importable, reach it through `BbDropdown`)_ — also mounts `BbIcon`, `ErrorIcon`, `CommonPopover`, `BbDropdownList`
|
|
21529
21722
|
- `BbBadge` _(public — [contract](https://llms-bitboss-ui.bitboss.it/dist/ai/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`
|
|
21530
|
-
- `AdaptiveDropdown` _(internal — not importable, reach it through `BbDropdown`)_ — hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs); also mounts `BbSmoothHeight`, `BbButton`, `BbDropdownList`
|
|
21723
|
+
- `AdaptiveDropdown` _(internal — not importable, reach it through `BbDropdown`)_ — hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs); also mounts `BbSmoothHeight`, `BbButton`, `BbDropdownList`, `DropdownFailures`
|
|
21531
21724
|
- `BbOffCanvas` _(public — [contract](https://llms-bitboss-ui.bitboss.it/dist/ai/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`
|
|
21532
21725
|
- `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`, `--icon-size`; also mounts `BbIcon`
|
|
21533
21726
|
|
|
@@ -29213,7 +29406,9 @@ settles back to `max` at once; `min` waits for blur or Enter, because the
|
|
|
29213
29406
|
digits of a valid number pass through smaller ones (typing `20` into a 16–28
|
|
29214
29407
|
field goes through `2`). Leave the field below `min`, or press Enter in it, and
|
|
29215
29408
|
it rises to `min` — Enter corrects it before a surrounding form submits, so
|
|
29216
|
-
`@submit` never receives a value below `min
|
|
29409
|
+
`@submit` never receives a value below `min`. A value your app sets past
|
|
29410
|
+
either bound stays as it is while nobody touches the field; a focus and a
|
|
29411
|
+
blur bring it inside the bounds, as Enter does (defaults are
|
|
29217
29412
|
the safe-integer bounds, i.e. effectively unbounded). `maxPrecision` caps the number of decimal places (default `8`),
|
|
29218
29413
|
which is how you pin a field to whole numbers (`0`); for money set `currency`,
|
|
29219
29414
|
which brings its own decimals. Extra decimals are refused as typed, never
|
|
@@ -35062,8 +35257,8 @@ Keep the set short enough that arrow-cycling stays quick; past ~6 options prefer
|
|
|
35062
35257
|
|
|
35063
35258
|
`items` accepts a provider function for options fetched from an API;
|
|
35064
35259
|
`loading-text` / `#loading` and `empty-text` / `#empty` cover the loading
|
|
35065
|
-
and empty states, `failed-text`
|
|
35066
|
-
|
|
35260
|
+
and empty states, `failed-text` words the failure row of a load that threw
|
|
35261
|
+
(with a built-in "Try again"; `#empty` is for empty results only), `dependencies` (+ `deps-debounce-time`) trigger re-fetches,
|
|
35067
35262
|
and `enforce-coherence` resets the model to `null` when the current value no
|
|
35068
35263
|
longer matches an available option. See the
|
|
35069
35264
|
[fetch-items](https://llms-bitboss-ui.bitboss.it/ai/guides/fetch-items-playbook.md) and
|
|
@@ -35545,7 +35740,7 @@ for a preset that fits any row type (never `<any>`), not an imported
|
|
|
35545
35740
|
| `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'`. |
|
|
35546
35741
|
| `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. |
|
|
35547
35742
|
| `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. |
|
|
35548
|
-
| `items` | `T[] \| ((context: BbRadioGroupItemsContext) => T[] \| Promise<T[]>)` | | yes | The options: an array, or a provider called with a `BbRadioGroupItemsContext` (`reason`, `modelValue`, `signal`), sync or async. A provider fails by THROWING, never by returning `[]`: the rows clear and
|
|
35743
|
+
| `items` | `T[] \| ((context: BbRadioGroupItemsContext) => T[] \| Promise<T[]>)` | | yes | The options: an array, or a provider called with a `BbRadioGroupItemsContext` (`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". |
|
|
35549
35744
|
| `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). |
|
|
35550
35745
|
| `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`. |
|
|
35551
35746
|
| `labelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted, `'top'`. |
|
|
@@ -35622,7 +35817,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
35622
35817
|
|
|
35623
35818
|
- `append` — scope: `object` — Content rendered after the last option, inside the options container.
|
|
35624
35819
|
- `description` — scope: `BbRadioGroupDescriptionSlotProps` `{ 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`.
|
|
35625
|
-
- `empty` — scope: `
|
|
35820
|
+
- `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").
|
|
35626
35821
|
- `icon` — scope: `BbRadioGroupIconSlotProps<T>` `{ disabled: boolean; readonly: boolean; checked: boolean; focused: boolean; focusVisible: boolean; id: string; name: string; hasErrors: boolean; hasWarnings: boolean; parsedValue: string; value: any; item: T; text: string }` — Replaces the default radio dot icon for each option. Receives the radio state plus the source item and its display text.
|
|
35627
35822
|
- `label` — scope: `BbRadioGroupLabelSlotProps<T>` `{ item: T; text: string; checked: boolean; description: string }` — Replaces the default label text for each option.
|
|
35628
35823
|
- `legend` — scope: `BbRadioGroupLegendSlotProps` `{ showAsterisk?: boolean; text: string; hasErrors: boolean; hasWarnings: boolean }` — Replaces the default fieldset legend text for the group.
|
|
@@ -37111,8 +37306,8 @@ picked someone:
|
|
|
37111
37306
|
v-model="reviewers"
|
|
37112
37307
|
clearable
|
|
37113
37308
|
compact
|
|
37114
|
-
:dependencies="[retry]"
|
|
37115
37309
|
empty-text="No members match your search"
|
|
37310
|
+
failed-text="Couldn't load members."
|
|
37116
37311
|
:filter-by="false"
|
|
37117
37312
|
hint="Type a name to search"
|
|
37118
37313
|
item-text="name"
|
|
@@ -37125,21 +37320,13 @@ picked someone:
|
|
|
37125
37320
|
:query-debounce-time="300"
|
|
37126
37321
|
stash
|
|
37127
37322
|
>
|
|
37128
|
-
<template #empty="{
|
|
37129
|
-
<template v-if="error">
|
|
37130
|
-
Couldn't load members.
|
|
37131
|
-
<BbButton size="sm" variant="ghost" @click="retry++">
|
|
37132
|
-
Try again
|
|
37133
|
-
</BbButton>
|
|
37134
|
-
</template>
|
|
37135
|
-
<template v-else>No members match “{{ query }}”</template>
|
|
37136
|
-
</template>
|
|
37323
|
+
<template #empty="{ query }">No members match “{{ query }}”</template>
|
|
37137
37324
|
</BbSelect>
|
|
37138
37325
|
</div>
|
|
37139
37326
|
</template>
|
|
37140
37327
|
<script setup lang="ts">
|
|
37141
37328
|
import { ref } from 'vue';
|
|
37142
|
-
import {
|
|
37329
|
+
import { BbSelect } from 'bitboss-ui';
|
|
37143
37330
|
import type { BbSelectItemsContext } from 'bitboss-ui';
|
|
37144
37331
|
|
|
37145
37332
|
type Member = {
|
|
@@ -37207,8 +37394,6 @@ const searchMembers = async ({
|
|
|
37207
37394
|
};
|
|
37208
37395
|
|
|
37209
37396
|
const reviewers = ref<string[]>([]);
|
|
37210
|
-
// The retry: bumping a dependency reloads with `reason: 'dependencies'`.
|
|
37211
|
-
const retry = ref(0);
|
|
37212
37397
|
</script>
|
|
37213
37398
|
```
|
|
37214
37399
|
|
|
@@ -37414,24 +37599,17 @@ nothing to catch.
|
|
|
37414
37599
|
|
|
37415
37600
|
A provider signals a failure by **throwing** — never by returning `[]`, which is
|
|
37416
37601
|
a real, applied result. On a failed call the select clears the rows (stale rows
|
|
37417
|
-
never sit under a new filter), prunes nothing, and shows
|
|
37418
|
-
default "Couldn't load items")
|
|
37419
|
-
|
|
37420
|
-
|
|
37421
|
-
|
|
37422
|
-
|
|
37423
|
-
|
|
37424
|
-
|
|
37425
|
-
|
|
37426
|
-
|
|
37427
|
-
<
|
|
37428
|
-
<template #empty="{ error, query }">
|
|
37429
|
-
<template v-if="error">
|
|
37430
|
-
Couldn't load members.
|
|
37431
|
-
<BbButton size="sm" variant="ghost" @click="retry++">Try again</BbButton>
|
|
37432
|
-
</template>
|
|
37433
|
-
<template v-else>No members match “{{ query }}”</template>
|
|
37434
|
-
</template>
|
|
37602
|
+
never sit under a new filter), prunes nothing, and shows its own failure row
|
|
37603
|
+
under the list: `failed-text` (locale default "Couldn't load items"),
|
|
37604
|
+
announced, then a "Try again" button. With `stash` the row sits below the picks
|
|
37605
|
+
the stash still names. "Try again" runs the failed call again with the same
|
|
37606
|
+
query, on click only, and hands focus back to the search field. `#empty` means
|
|
37607
|
+
empty: it never renders for a failure, so write empty copy there and word the
|
|
37608
|
+
failure with `failed-text`:
|
|
37609
|
+
|
|
37610
|
+
```vue
|
|
37611
|
+
<BbSelect :items="searchMembers" failed-text="Couldn't load members." …>
|
|
37612
|
+
<template #empty="{ query }">No members match “{{ query }}”</template>
|
|
37435
37613
|
</BbSelect>
|
|
37436
37614
|
```
|
|
37437
37615
|
|
|
@@ -37447,8 +37625,9 @@ own flow (debounced, aborting the call in flight):
|
|
|
37447
37625
|
- **Panel states**: `loading-text` / `empty-text` / `failed-text` (locale
|
|
37448
37626
|
defaults "Loading..." / "No data to display" / "Couldn't load items") or the
|
|
37449
37627
|
`#loading` / `#empty` slots — both receive `{ query }`, `#empty` also
|
|
37450
|
-
`focus()
|
|
37451
|
-
`
|
|
37628
|
+
`focus()` and `close()` (for an action that keeps focus in the panel). A
|
|
37629
|
+
failed load has its own row (`failed-text` and "Try again"), never
|
|
37630
|
+
`#empty`.
|
|
37452
37631
|
|
|
37453
37632
|
`stash` accumulates picked options across searches: a pick stays named (chips
|
|
37454
37633
|
keep their text) when a later search or a failed load no longer returns it. It
|
|
@@ -37921,6 +38100,13 @@ Pressing Enter in the search field with **no option highlighted** emits
|
|
|
37921
38100
|
does not create anything itself: append the new item to `items` and select it.
|
|
37922
38101
|
This is the idiomatic pattern for closed-but-growable vocabularies.
|
|
37923
38102
|
|
|
38103
|
+
While you listen to `option:add`, a typed query that no option matches
|
|
38104
|
+
exactly (case aside) also gets a **"Create «query»" row**: the last row after
|
|
38105
|
+
the matches, or the only one when nothing matches (in place of the
|
|
38106
|
+
no-results text and `#empty`). It is a real option, clickable and reached
|
|
38107
|
+
with the arrow keys, and activating it does what Enter does. It is not shown
|
|
38108
|
+
while the list loads or after a failed load.
|
|
38109
|
+
|
|
37924
38110
|
**Create a label by pressing Enter**
|
|
37925
38111
|
|
|
37926
38112
|
```vue
|
|
@@ -37978,14 +38164,12 @@ const createLabel = (text: string) => {
|
|
|
37978
38164
|
</script>
|
|
37979
38165
|
```
|
|
37980
38166
|
|
|
37981
|
-
#### A record that needs its own form: open its dialog from
|
|
38167
|
+
#### A record that needs its own form: open its dialog from `option:add`
|
|
37982
38168
|
|
|
37983
38169
|
When creating the missing row takes a real form (a person, a company), the
|
|
37984
|
-
select doesn't create it: its dialog does.
|
|
37985
|
-
|
|
37986
|
-
|
|
37987
|
-
`option:add`. Open the dialog from code, seed it with the query, and on
|
|
37988
|
-
`completed` add the row and select it:
|
|
38170
|
+
select doesn't create it: its dialog does. Handle `option:add` (the create
|
|
38171
|
+
row's click and Enter both land there): open the dialog from code, seed it
|
|
38172
|
+
with the query, and on `completed` add the row and select it:
|
|
37989
38173
|
|
|
37990
38174
|
**No results? Create the person in a dialog**
|
|
37991
38175
|
|
|
@@ -38006,17 +38190,7 @@ came up empty, as one line in `#empty` with an inline `BbBaseButton` (not a
|
|
|
38006
38190
|
:items="people"
|
|
38007
38191
|
label="Contact"
|
|
38008
38192
|
@option:add="(query) => query && create(query)"
|
|
38009
|
-
|
|
38010
|
-
<template #empty="{ query }">
|
|
38011
|
-
No results for “{{ query }}”.
|
|
38012
|
-
<BbBaseButton
|
|
38013
|
-
class="font-medium text-(--bb-primary) hover:underline"
|
|
38014
|
-
@click="create(query)"
|
|
38015
|
-
>
|
|
38016
|
-
Create {{ query }}
|
|
38017
|
-
</BbBaseButton>
|
|
38018
|
-
</template>
|
|
38019
|
-
</BbSelect>
|
|
38193
|
+
/>
|
|
38020
38194
|
|
|
38021
38195
|
<!-- In an app this is its own CreatePersonDialog.vue: pass the component
|
|
38022
38196
|
to useBbDialog instead of the id. -->
|
|
@@ -38035,7 +38209,6 @@ came up empty, as one line in `#empty` with an inline `BbBaseButton` (not a
|
|
|
38035
38209
|
<script setup lang="ts">
|
|
38036
38210
|
import { ref } from 'vue';
|
|
38037
38211
|
import {
|
|
38038
|
-
BbBaseButton,
|
|
38039
38212
|
BbButton,
|
|
38040
38213
|
BbDialog,
|
|
38041
38214
|
BbForm,
|
|
@@ -38058,8 +38231,8 @@ const save = async (values: Record<string, unknown>): Promise<Person> => ({
|
|
|
38058
38231
|
name: String(values.name),
|
|
38059
38232
|
});
|
|
38060
38233
|
|
|
38061
|
-
// The handle lives in setup
|
|
38062
|
-
//
|
|
38234
|
+
// The handle lives in setup: the panel closes as the dialog takes focus, and
|
|
38235
|
+
// the create row goes with it.
|
|
38063
38236
|
const personDialog = useBbDialog<{ name: string }, Person>('person-create');
|
|
38064
38237
|
const create = async (name: string) => {
|
|
38065
38238
|
const result = await personDialog.show({ name });
|
|
@@ -38071,13 +38244,11 @@ const create = async (name: string) => {
|
|
|
38071
38244
|
```
|
|
38072
38245
|
|
|
38073
38246
|
- **Open it with a handle from setup**, `useBbDialog(CreatePersonDialog)`
|
|
38074
|
-
(or an id), never `v-bb-dialog` on
|
|
38075
|
-
closes as the dialog takes focus and
|
|
38076
|
-
|
|
38077
|
-
|
|
38078
|
-
(
|
|
38079
|
-
works either way. The ESLint rule `bitboss-ui/no-dialog-in-panel` reports
|
|
38080
|
-
the on-demand form ([ESLint rules](https://llms-bitboss-ui.bitboss.it/dist/ai/guides/eslint-rules.md)).
|
|
38247
|
+
(or an id), never `v-bb-dialog` on a button inside the panel: the panel
|
|
38248
|
+
closes as the dialog takes focus, and an on-demand opening
|
|
38249
|
+
(`v-bb-dialog="{ component }"`) is dismissed with its trigger. The ESLint
|
|
38250
|
+
rule `bitboss-ui/no-dialog-in-panel` reports the on-demand form
|
|
38251
|
+
([ESLint rules](https://llms-bitboss-ui.bitboss.it/dist/ai/guides/eslint-rules.md)).
|
|
38081
38252
|
- **Inside another dialog it just stacks.** The create dialog opens above the
|
|
38082
38253
|
one holding the select, and on close focus comes back to the select, closed,
|
|
38083
38254
|
showing the new pick. Nothing to wire.
|
|
@@ -38085,7 +38256,7 @@ const create = async (name: string) => {
|
|
|
38085
38256
|
`known-items` (`{ value: person.id, label: person.name }`): the provider
|
|
38086
38257
|
returns it on the next load.
|
|
38087
38258
|
- **Keyboard**: Enter in the search field fires `option:add` (no option is
|
|
38088
|
-
highlighted when nothing matched), and
|
|
38259
|
+
highlighted when nothing matched), and the arrow keys reach the create row.
|
|
38089
38260
|
|
|
38090
38261
|
### Group related options
|
|
38091
38262
|
|
|
@@ -38098,6 +38269,11 @@ no group: those rows are listed **first**, before every header, and `#group` is
|
|
|
38098
38269
|
not called for them (a known row is listed the same way). `BbDropdown`'s
|
|
38099
38270
|
`groupBy` follows the same rule.
|
|
38100
38271
|
|
|
38272
|
+
Headers are sticky: the header of the group you are scrolling through stays
|
|
38273
|
+
pinned at the top of the list, and leaves with its group's last option. A list
|
|
38274
|
+
that opens on a selection shows its group's header right above it, and a row
|
|
38275
|
+
reached with the arrow keys always stops below the pinned header.
|
|
38276
|
+
|
|
38101
38277
|
A grouped list virtualizes **whole groups, not rows**: a group mounts only
|
|
38102
38278
|
when it scrolls into range, but all of its rows mount together. Many
|
|
38103
38279
|
small-to-medium groups window just as well as a flat list; one very large
|
|
@@ -38341,11 +38517,39 @@ is all you need.
|
|
|
38341
38517
|
- `clearable` — clear affix when a value exists; emits `null` / `[]`. Single: re-clicking the pick clears too.
|
|
38342
38518
|
- Empty panel — `empty-text` or `#empty`.
|
|
38343
38519
|
|
|
38520
|
+
### Opening from code: `v-model:open`
|
|
38521
|
+
|
|
38522
|
+
`v-model` is the value; `v-model:open` is whether the options panel is open. Bound,
|
|
38523
|
+
your ref opens and closes it, and every open and close the user makes is
|
|
38524
|
+
written back: a pick, Escape, a click outside, the phone sheet's own dismiss. A static `:open` with no
|
|
38525
|
+
listener is only the initial state. An open from code is the same open a
|
|
38526
|
+
click makes (focus moves into the panel), and `disabled` / `readonly` refuse it (the ref is set back
|
|
38527
|
+
to `false`).
|
|
38528
|
+
|
|
38529
|
+
```vue
|
|
38530
|
+
<script setup lang="ts">
|
|
38531
|
+
import { ref } from 'vue';
|
|
38532
|
+
|
|
38533
|
+
const city = ref<string | null>(null);
|
|
38534
|
+
const open = ref(false);
|
|
38535
|
+
</script>
|
|
38536
|
+
|
|
38537
|
+
<template>
|
|
38538
|
+
<BbButton text="Choose a city" @click="open = true" />
|
|
38539
|
+
<BbSelect
|
|
38540
|
+
v-model="city"
|
|
38541
|
+
v-model:open="open"
|
|
38542
|
+
label="City"
|
|
38543
|
+
:items="['Milan', 'Rome', 'Turin']"
|
|
38544
|
+
/>
|
|
38545
|
+
</template>
|
|
38546
|
+
```
|
|
38547
|
+
|
|
38344
38548
|
### Events and v-model
|
|
38345
38549
|
|
|
38346
38550
|
- `update:modelValue` — the resolved value (single) or array (multiple), on
|
|
38347
38551
|
pick, chip removal, clear and coherence enforcement.
|
|
38348
|
-
- `option:add` — Enter on a query with no highlighted option (see above).
|
|
38552
|
+
- `option:add` — Enter on a query with no highlighted option, or the create row (see above).
|
|
38349
38553
|
- `focus` / `blur` — the control gaining/losing focus; `input` / `change` —
|
|
38350
38554
|
native events from the panel search field.
|
|
38351
38555
|
- `inactive` — focus has fully left the component (control **and** panel).
|
|
@@ -38682,8 +38886,8 @@ it: [passthrough guide § Typing `pt` in `<script>`](https://llms-bitboss-ui.bit
|
|
|
38682
38886
|
- **A failed load is not an empty one.** A provider throws to fail; returning
|
|
38683
38887
|
`[]` is applied as a real empty result and, with `enforce-coherence`, prunes
|
|
38684
38888
|
every pick. On a failure the rows are cleared, nothing is pruned, and the
|
|
38685
|
-
panel shows `failed-text` (with `stash`,
|
|
38686
|
-
names); `#empty`
|
|
38889
|
+
panel shows its failure row, `failed-text` and "Try again" (with `stash`,
|
|
38890
|
+
below the picks the stash still names); `#empty` stays for empty results.
|
|
38687
38891
|
- `option:add` can fire with an empty string — trim and guard in the handler.
|
|
38688
38892
|
|
|
38689
38893
|
### Anti-patterns
|
|
@@ -38723,6 +38927,7 @@ it: [passthrough guide § Typing `pt` in `<script>`](https://llms-bitboss-ui.bit
|
|
|
38723
38927
|
## v-model
|
|
38724
38928
|
|
|
38725
38929
|
- `v-model` — type: `any`
|
|
38930
|
+
- `v-model:open` — type: `boolean \| undefined`
|
|
38726
38931
|
|
|
38727
38932
|
## Props
|
|
38728
38933
|
|
|
@@ -38742,7 +38947,7 @@ it: [passthrough guide § Typing `pt` in `<script>`](https://llms-bitboss-ui.bit
|
|
|
38742
38947
|
| `disabled` | `boolean \| undefined` | `false` | | Disables the component. |
|
|
38743
38948
|
| `disableWriting` | `boolean \| "auto" \| "mobile" \| "desktop" \| undefined` | `'auto'` | | Hides the panel's search field: `true` everywhere, `'mobile'` / `'desktop'` on that platform only. `'auto'` hides it, per open, for an array `items` shorter than the plugin's `autoDisableWritingThreshold` (6); never for a provider or with an `option:add` listener. |
|
|
38744
38949
|
| `emptyText` | `string \| undefined` | | | String displayed when there are no items to display. |
|
|
38745
|
-
| `enforceCoherence` | `boolean \| undefined` | `false` | | After
|
|
38950
|
+
| `enforceCoherence` | `boolean \| undefined` | `false` | | After each successful non-search load, removes the picks the fetched rows lack (a single model resets to `null`). A `stash` does not count; a `known-items` value stays until a parent change; a search or a failed load never prunes. |
|
|
38746
38951
|
| `errors` | `string \| string[] \| undefined` | | | Error messages under the field, a string or array, in an `aria-live="polite"` region and first in the control's `aria-describedby`, so they are re-read when it regains focus. |
|
|
38747
38952
|
| `failedText` | `string \| undefined` | `the localized `common.failedText` ("Couldn't load items")` | | String displayed in the empty state while the latest load FAILED (the provider threw): the twin of `emptyText` for that case. |
|
|
38748
38953
|
| `filterBy` | `false \| string[] \| undefined` | `[]` | | What typing filters on: empty = the display text and description; item paths = those fields (`['name', 'email']`); `false` = no filtering. Ranked, case and accents ignored (guide § Search). Use `false` when the provider matched the query on the server, or its email matches show as "No results". |
|
|
@@ -38776,6 +38981,7 @@ it: [passthrough guide § Typing `pt` in `<script>`](https://llms-bitboss-ui.bit
|
|
|
38776
38981
|
| `multiple` | `boolean \| undefined` | `false` | | Allows the selection of multiple items. |
|
|
38777
38982
|
| `name` | `string \| undefined` | | | Defines the name of the input. |
|
|
38778
38983
|
| `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). |
|
|
38984
|
+
| `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. |
|
|
38779
38985
|
| `persistentHint` | `boolean \| undefined` | `false` | | Keeps the hint displayed. |
|
|
38780
38986
|
| `placeholder` | `string \| undefined` | | | Text shown in the field while nothing is picked (an empty list has `emptyText`). |
|
|
38781
38987
|
| `prefill` | `boolean \| "interaction" \| undefined` | `'interaction'` | | When the options first load: `'interaction'` on first open, `true` on mount, `false` only once the user types (on open with `disable-writing`). An array `items` or a seeded model always loads at once. |
|
|
@@ -38787,7 +38993,7 @@ it: [passthrough guide § Typing `pt` in `<script>`](https://llms-bitboss-ui.bit
|
|
|
38787
38993
|
| `rules` | `RuleExpression<any>` | | | vee-validate rules for this field. Only inside a `BbForm`. |
|
|
38788
38994
|
| `selectable` | `boolean \| ((item: T) => boolean) \| undefined` | `true` | | Defines whether options are selectable. Can be a global boolean that affects all options or a function that accepts an item and returns a boolean that only affects that item. Non-selectable options are rendered disabled. |
|
|
38789
38995
|
| `selectedLabelsFn` | `((count: number) => string) \| undefined` | | | Function that returns a string to be displayed when the number of selected labels is greater than `maxSelectedLabels`. |
|
|
38790
|
-
| `stash` | `boolean \| undefined` | `false` | | Keeps
|
|
38996
|
+
| `stash` | `boolean \| undefined` | `false` | | Keeps picks named (their chips keep their text) when a later search or a failed load no longer returns them. It follows the model; it does not keep a pick valid (`enforce-coherence` still prunes it). |
|
|
38791
38997
|
| `transitionDuration` | `number \| undefined` | `250` | | How long the transition has to last in milliseconds. |
|
|
38792
38998
|
| `validationLabel` | `string \| undefined` | | | The field's name in validation messages (`{field}`): "Email is not valid". Defaults to the `label` (or `legend`), then "This field"; never the `name`. Set it when the label is hidden or reads badly in a sentence (icon-only, a question). `BbForm` only. |
|
|
38793
38999
|
| `validationMode` | `'aggressive'` \| `'balanced'` \| `'lazy'` \| `'submit-only'` \| `'submit-live'` | | | When the field validates: `aggressive` (each change), `balanced` (on leave, then live while in error), `lazy` (on leave), `submit-only`, `submit-live`. Unset: the `BbForm`'s `validation-mode`, then `all.validationMode` (`'balanced'`). `BbForm` only. |
|
|
@@ -38857,20 +39063,21 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
38857
39063
|
- `show` — `(): void` — Emitted as soon as the options surface starts to open (the popover, or the sheet on a phone).
|
|
38858
39064
|
- `shown` — `(): void` — Emitted once the options surface is open and its open transition has finished.
|
|
38859
39065
|
- `update:modelValue` — `(value: any): void` — Emitted with the new value whenever `v-model` changes.
|
|
39066
|
+
- `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
|
|
38860
39067
|
|
|
38861
39068
|
## Slots
|
|
38862
39069
|
|
|
38863
39070
|
- `append` — scope: `{ query: string; focus: () => void; close: () => Promise<void>; }` — Content appended inside the input field, after the value area.
|
|
38864
39071
|
- `append:outer` — scope: `{ query: string; close: () => Promise<void>; }` — Content appended outside the input field wrapper.
|
|
38865
|
-
- `chip` — scope: `BbSelectChipSlotProps<T, Known>` `{ known: boolean; item: BbSelectKnownItem \| T; text: string; value: any; disabled: boolean; deselect: () => void }` —
|
|
39072
|
+
- `chip` — scope: `BbSelectChipSlotProps<T, Known>` `{ known: boolean; item: BbSelectKnownItem \| T; text: string; value: any; disabled: boolean; deselect: () => void }` — Each selection's badge with `multiple` (not in `comma` mode, nor the "+N" summary). With `known-items` bound, `item` is the known `{ value, label }` row (`known: true`) until the list brings the real one.
|
|
38866
39073
|
- `description` — scope: `BbSelectDescriptionSlotProps` `{ 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`.
|
|
38867
|
-
- `empty` — scope: `{ query: string; focus: () => void; close: () => Promise<void>;
|
|
39074
|
+
- `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 failure row (`failed-text`, then "Try again"). `close()` closes the panel, for an action that does not move focus out of it.
|
|
38868
39075
|
- `footer` — scope: `BbSelectPanelSlotProps` `{ close: () => Promise<void>; clear: () => void; empty: boolean; focus: () => void; query: string; selectedOptions: BbSelectResolvedOption[] }` — Content pinned to the bottom of the options panel, below the options list. Rendered in both the desktop popover and the adaptive sheet.
|
|
38869
39076
|
- `group` — scope: `BbSelectGroupSlotProps<T>` `{ text: string; item: T; index: number; length: number; disabled: boolean }` — 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.
|
|
38870
39077
|
- `header` — scope: `BbSelectPanelSlotProps` `{ close: () => Promise<void>; clear: () => void; empty: boolean; focus: () => void; query: string; selectedOptions: BbSelectResolvedOption[] }` — Content pinned to the top of the options panel, above the search field. Rendered in both the desktop popover and the adaptive sheet.
|
|
38871
39078
|
- `label` — scope: `BbSelectLabelSlotProps` `{ showAsterisk?: boolean; text: string; hasErrors: boolean; hasWarnings: boolean }` — Replaces the default label text rendered above the input.
|
|
38872
39079
|
- `loading` — scope: `{ query: string; }` — Content shown inside the options dropdown while items are loading.
|
|
38873
|
-
- `option` — scope: `BbSelectOptionSlotProps<T, Known>` `{ known: boolean; item: BbSelectKnownItem \| T; disabled: boolean; focused: boolean; index: number; hasErrors?: boolean; loading: boolean; selected: boolean; text: string; value: any; description: string }` —
|
|
39080
|
+
- `option` — scope: `BbSelectOptionSlotProps<T, Known>` `{ known: boolean; item: BbSelectKnownItem \| T; disabled: boolean; focused: boolean; index: number; hasErrors?: boolean; loading: boolean; selected: boolean; text: string; value: any; description: string }` — Each option row's content. With `known-items` bound, a row the list has not brought yet is the known `{ value, label }` row (`known: true`): check `known` before reading an option field off `item`.
|
|
38874
39081
|
- `prefix` — scope: `object` — Content rendered as an inline prefix inside the input field.
|
|
38875
39082
|
- `prepend` — scope: `{ query: string; focus: () => void; close: () => Promise<void>; }` — Content prepended inside the input field, before the value area.
|
|
38876
39083
|
- `prepend:outer` — scope: `{ query: string; close: () => Promise<void>; }` — Content prepended outside the input field wrapper.
|
|
@@ -39355,8 +39562,9 @@ Items playbook. The essentials:
|
|
|
39355
39562
|
chips stay accurate; `modelValue` is your v-model as-is (typed `any`);
|
|
39356
39563
|
`signal` is an `AbortSignal` to pass to every request.
|
|
39357
39564
|
- A provider **throws** to fail (never `return []`, an applied empty result):
|
|
39358
|
-
the rows are cleared, nothing is pruned,
|
|
39359
|
-
|
|
39565
|
+
the rows are cleared, nothing is pruned, and the failure row shows
|
|
39566
|
+
`failed-text` with a built-in "Try again" (`#empty` is for empty results
|
|
39567
|
+
only). A pick no row has
|
|
39360
39568
|
named yet still shows (trigger text, phone-sheet chip): its value as given
|
|
39361
39569
|
when it is a string or a number, else no text.
|
|
39362
39570
|
|
|
@@ -39993,6 +40201,12 @@ closed-but-growable vocabularies — the same as `BbSelect`. The behaviour is ga
|
|
|
39993
40201
|
by the search field existing; `disable-writing` (which removes the field) also
|
|
39994
40202
|
disables it.
|
|
39995
40203
|
|
|
40204
|
+
While you listen to `option:add`, a typed query that no option matches
|
|
40205
|
+
exactly (case aside) also gets a **"Create «query»" row**: last after the
|
|
40206
|
+
matches, or the only row when nothing matches (in place of the no-results
|
|
40207
|
+
text and `#empty`). It is a real option (click, arrow keys, announced) and
|
|
40208
|
+
does what Enter does; not while the list loads or after a failed load.
|
|
40209
|
+
|
|
39996
40210
|
```ts
|
|
39997
40211
|
const roles = ref<string[]>(['Reviewer', 'Approver']);
|
|
39998
40212
|
const role = ref<string | null>(null);
|
|
@@ -40558,12 +40772,21 @@ popover ↔ sheet. `off-canvas-props` forwards extra `BbOffCanvas` props to the
|
|
|
40558
40772
|
sheet (`size`, `draggable`, `fullscreen`, `stack`); `:adaptive="false"` keeps a
|
|
40559
40773
|
floating popover everywhere.
|
|
40560
40774
|
|
|
40775
|
+
### Opening from code: `v-model:open`
|
|
40776
|
+
|
|
40777
|
+
`v-model` is the value; `v-model:open` is whether the options panel is open. Bound,
|
|
40778
|
+
your ref opens and closes it, and every open and close the user makes is
|
|
40779
|
+
written back: a pick, Escape, a click outside, the phone sheet's own dismiss. A static `:open` with no
|
|
40780
|
+
listener is only the initial state. An open from code is the same open a
|
|
40781
|
+
click makes (focus moves into the panel), and `disabled` / `readonly` refuse it (the ref is set back
|
|
40782
|
+
to `false`).
|
|
40783
|
+
|
|
40561
40784
|
### Events and v-model
|
|
40562
40785
|
|
|
40563
40786
|
- `update:modelValue` — the resolved value (single) or array (multiple), on pick,
|
|
40564
40787
|
`clear`, coherence enforcement, and — in `multiple` mode only — deselect.
|
|
40565
40788
|
A second click on the current option in single mode emits nothing.
|
|
40566
|
-
- `option:add` — Enter on a non-matching query with nothing highlighted (above).
|
|
40789
|
+
- `option:add` — Enter on a non-matching query with nothing highlighted, or the create row (above).
|
|
40567
40790
|
- `focus` / `blur` — the activator gaining/losing focus.
|
|
40568
40791
|
- `input` / `change` — native events from the panel search field.
|
|
40569
40792
|
- `click` — the activator was clicked.
|
|
@@ -40725,7 +40948,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
40725
40948
|
it does not keep them valid.
|
|
40726
40949
|
- A provider **throws** to fail; `return []` is an applied empty result that
|
|
40727
40950
|
prunes every pick. On a failure the rows are cleared, nothing is pruned,
|
|
40728
|
-
`failed-text`
|
|
40951
|
+
and the failure row shows `failed-text` with "Try again", never `#empty`.
|
|
40729
40952
|
- `enforce-coherence` opts **each instance** into its own load. One field, one
|
|
40730
40953
|
request; N provider-backed rows, N requests.
|
|
40731
40954
|
- `option:add` can fire with an empty string — trim and guard.
|
|
@@ -40809,6 +41032,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
40809
41032
|
## v-model
|
|
40810
41033
|
|
|
40811
41034
|
- `v-model` — type: `any`
|
|
41035
|
+
- `v-model:open` — type: `boolean \| undefined`
|
|
40812
41036
|
|
|
40813
41037
|
## Props
|
|
40814
41038
|
|
|
@@ -40853,6 +41077,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
40853
41077
|
| `multiple` | `boolean \| undefined` | `false` | | Enable multiple item selection. When true, modelValue must be an array. |
|
|
40854
41078
|
| `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). |
|
|
40855
41079
|
| `offset` | `number \| undefined` | `4` | | Distance (px) between the activator and the popover. |
|
|
41080
|
+
| `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. |
|
|
40856
41081
|
| `padding` | `number \| undefined` | `10` | | Minimum page padding used by floating shift middleware. |
|
|
40857
41082
|
| `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. |
|
|
40858
41083
|
| `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. |
|
|
@@ -40907,11 +41132,12 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
40907
41132
|
- `show` — `(): void` — Emitted as soon as the options surface starts to open (the popover, or the sheet on a phone).
|
|
40908
41133
|
- `shown` — `(): void` — Emitted once the options surface is open and its open transition has finished.
|
|
40909
41134
|
- `update:modelValue` — `(value: any): void` — Emitted with the next selection value whenever selection changes.
|
|
41135
|
+
- `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
|
|
40910
41136
|
|
|
40911
41137
|
## Slots
|
|
40912
41138
|
|
|
40913
41139
|
- `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.
|
|
40914
|
-
- `empty` — scope: `{ query: string; focus: () => void; close: () => Promise<void>;
|
|
41140
|
+
- `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.
|
|
40915
41141
|
- `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.
|
|
40916
41142
|
- `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.
|
|
40917
41143
|
- `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.
|
|
@@ -44742,8 +44968,9 @@ called with one context object — `BbSwitchGroupItemsContext`: `reason`
|
|
|
44742
44968
|
`'model'` when the model changed from outside and the options cannot resolve
|
|
44743
44969
|
it), `modelValue` and `signal`; a group has no search field, so no `query`.
|
|
44744
44970
|
While it resolves, `loading-text` (or the `#loading` slot) shows; `empty-text`
|
|
44745
|
-
(or `#empty`) covers the empty result, and `failed-text`
|
|
44746
|
-
|
|
44971
|
+
(or `#empty`) covers the empty result, and `failed-text` words the failure
|
|
44972
|
+
row of a load that threw (it ends with a built-in "Try again"; `#empty` never
|
|
44973
|
+
renders for a failure). Loading, cancellation and race protection are
|
|
44747
44974
|
built in — don't wrap the provider in your own `loading` ref or debounce.
|
|
44748
44975
|
|
|
44749
44976
|
Tie the option set to external state with `dependencies` (debounced by
|
|
@@ -45036,7 +45263,7 @@ for a preset that fits any row type (never `<any>`), not an imported
|
|
|
45036
45263
|
| `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'`. |
|
|
45037
45264
|
| `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. |
|
|
45038
45265
|
| `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. |
|
|
45039
|
-
| `items` | `T[] \| ((context: BbCheckboxGroupItemsContext) => T[] \| Promise<T[]>)` | | yes | The options: an array, or a provider called with
|
|
45266
|
+
| `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". |
|
|
45040
45267
|
| `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). |
|
|
45041
45268
|
| `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`. |
|
|
45042
45269
|
| `labelAlign` | `'center'` \| `'top'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted, `'top'`. |
|
|
@@ -45109,7 +45336,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
45109
45336
|
|
|
45110
45337
|
- `append` — scope: `object` — Content rendered after the last option, inside the options container.
|
|
45111
45338
|
- `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`.
|
|
45112
|
-
- `empty` — scope: `
|
|
45339
|
+
- `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").
|
|
45113
45340
|
- `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.
|
|
45114
45341
|
- `label` — scope: `BbSwitchGroupLabelSlotProps<T>` `{ item: T; text: string; checked: boolean; description: string }` — Replaces the default label text for each option.
|
|
45115
45342
|
- `legend` — scope: `BbSwitchGroupLegendSlotProps` `{ showAsterisk?: boolean; text: string; hasErrors: boolean; hasWarnings: boolean }` — Replaces the default fieldset legend text for the group.
|
|
@@ -45551,7 +45778,8 @@ warns on a loop over keys it cannot see (`#[column.key]` over a prop) until
|
|
|
45551
45778
|
the name goes through `slotKey`. Keep the column in `columns`
|
|
45552
45779
|
even when you fully slot it: label, alignment and width still come from there.
|
|
45553
45780
|
A `#<key>` slot owns its cell: when it renders nothing (a `v-if` that is
|
|
45554
|
-
false), the cell is empty, never the raw value
|
|
45781
|
+
false), the cell is empty, never the raw value (the one exception to the
|
|
45782
|
+
empty-slot rule).
|
|
45555
45783
|
|
|
45556
45784
|
Body cell scope: `content` (this cell, formatted), `item` (raw row), `value`
|
|
45557
45785
|
(the row's `item-value`, e.g. its id — not this cell), `classes`, plus the row's interaction surface —
|
|
@@ -45579,7 +45807,8 @@ costs you the built-in sort button. The table-wide pair `#header:prepend` /
|
|
|
45579
45807
|
structural select/actions cells); both forms receive the header scope above
|
|
45580
45808
|
plus `columnKey` (the raw column key) so a table-wide template can branch per
|
|
45581
45809
|
column. When both a per-column and the table-wide slot are provided for the
|
|
45582
|
-
same side, the per-column one wins for that column — they never stack
|
|
45810
|
+
same side, the per-column one wins for that column — they never stack; one
|
|
45811
|
+
that renders nothing for its column falls back to the table-wide one. Affixes
|
|
45583
45812
|
render even beside a full `#<key>:header` replacement (the same rule as
|
|
45584
45813
|
BbDropdown's `#<value>:prepend/append`). The key always comes first, so a
|
|
45585
45814
|
column keyed `prepend` still owns `#prepend:header`, and `#header:prepend`
|
|
@@ -45906,9 +46135,10 @@ There is no `error-text` prop and no `empty-text` alias — don't guess either
|
|
|
45906
46135
|
by analogy with `loading-text`. A failed _server_ visit (Inertia, a full-page
|
|
45907
46136
|
load) is a full error page, not something the table renders inline. A failed
|
|
45908
46137
|
_client-side_ fetch is the table's own: an `items` provider function that
|
|
45909
|
-
throws clears the rows and the
|
|
45910
|
-
load items"),
|
|
45911
|
-
Async items and filters)
|
|
46138
|
+
throws clears the rows and the table shows its failure row: `failed-text`
|
|
46139
|
+
("Couldn't load items"), announced, then a "Try again" button that runs the
|
|
46140
|
+
failed call again (see § Async items and filters). `#empty` is for an empty
|
|
46141
|
+
result only — don't catch the error yourself.
|
|
45912
46142
|
|
|
45913
46143
|
**Skeletons and a custom empty state**
|
|
45914
46144
|
|
|
@@ -46000,11 +46230,9 @@ type BbTableItemsContext = {
|
|
|
46000
46230
|
- A newer call aborts the one in flight and its late answer is dropped. A
|
|
46001
46231
|
provider **throws** to fail — never `return []`, an applied empty result:
|
|
46002
46232
|
the rows are cleared (stale rows never sit under a new filter), nothing is
|
|
46003
|
-
pruned, and the
|
|
46004
|
-
|
|
46005
|
-
|
|
46006
|
-
becomes an `Error`), and `null` when nothing failed. Retry by bumping a
|
|
46007
|
-
counter you list in `dependencies`.
|
|
46233
|
+
pruned, and the failure row shows `failed-text` ("Couldn't load items")
|
|
46234
|
+
with a built-in "Try again" (on click only; focus then moves to the table).
|
|
46235
|
+
`#empty` never renders for a failure.
|
|
46008
46236
|
- Return the page as it is: the table never merges the selection into it.
|
|
46009
46237
|
- A plain array bypasses the provider machinery entirely.
|
|
46010
46238
|
|
|
@@ -49591,7 +49819,7 @@ for a preset that fits any row type (never `<any>`), not an imported
|
|
|
49591
49819
|
| `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. |
|
|
49592
49820
|
| `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. |
|
|
49593
49821
|
| `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. |
|
|
49594
|
-
| `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
|
|
49822
|
+
| `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. |
|
|
49595
49823
|
| `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. |
|
|
49596
49824
|
| `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. |
|
|
49597
49825
|
| `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. |
|
|
@@ -49685,10 +49913,10 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
49685
49913
|
|
|
49686
49914
|
- `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`.
|
|
49687
49915
|
- `actions:header` — scope: `{ text: string; }` — Replaces the default actions header cell content.
|
|
49688
|
-
- `empty` — scope: `
|
|
49916
|
+
- `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").
|
|
49689
49917
|
- `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.
|
|
49690
|
-
- `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.
|
|
49691
|
-
- `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.
|
|
49918
|
+
- `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.
|
|
49919
|
+
- `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.
|
|
49692
49920
|
- `loading` — scope: `{ items: Item[]; }` — Content shown while table rows are loading (replaces the skeleton rows).
|
|
49693
49921
|
- `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.
|
|
49694
49922
|
- `select:header` — scope: `{ multiple: boolean; selectAll: boolean; text: string; }` — Replaces the default selection header cell content (checkbox or radio label).
|
|
@@ -49697,8 +49925,8 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
49697
49925
|
- `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>`.
|
|
49698
49926
|
- `#<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`.
|
|
49699
49927
|
- `#<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 }`.
|
|
49700
|
-
- `#<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).
|
|
49701
|
-
- `#<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).
|
|
49928
|
+
- `#<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.
|
|
49929
|
+
- `#<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.
|
|
49702
49930
|
- `#<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.
|
|
49703
49931
|
- `#<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`.
|
|
49704
49932
|
|
|
@@ -55533,6 +55761,15 @@ Reach for the **component** (slot or `activator` prop) when you want the
|
|
|
55533
55761
|
the directive is the shortcut for the bare-trigger cell case, not a replacement
|
|
55534
55762
|
for the component's `v-model` in a form.
|
|
55535
55763
|
|
|
55764
|
+
### Opening from code: `v-model:open`
|
|
55765
|
+
|
|
55766
|
+
`v-model` is the value; `v-model:open` is whether the time panel is open. Bound,
|
|
55767
|
+
your ref opens and closes it, and every open and close the user makes is
|
|
55768
|
+
written back: a pick, Escape, a click outside, the phone sheet's own dismiss. A static `:open` with no
|
|
55769
|
+
listener is only the initial state. An open from code is the same open a
|
|
55770
|
+
click makes, and `disabled` / `readonly` refuse it (the ref is set back
|
|
55771
|
+
to `false`).
|
|
55772
|
+
|
|
55536
55773
|
### Relationship to BbTimePickerInput
|
|
55537
55774
|
|
|
55538
55775
|
`BbTimePickerInput` _is_ these columns with a segmented text field wrapped around
|
|
@@ -55617,6 +55854,7 @@ typeahead. Always pass a `label` when the trigger is an unlabelled cell or icon.
|
|
|
55617
55854
|
|
|
55618
55855
|
- `v-model:activeSegment` — type: `BbTimePickerSegment \| undefined`
|
|
55619
55856
|
- `v-model` — type: `string \| string[] \| null \| undefined`
|
|
55857
|
+
- `v-model:open` — type: `boolean \| undefined`
|
|
55620
55858
|
|
|
55621
55859
|
## Props
|
|
55622
55860
|
|
|
@@ -55638,6 +55876,7 @@ typeahead. Always pass a `label` when the trigger is an unlabelled cell or icon.
|
|
|
55638
55876
|
| `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. |
|
|
55639
55877
|
| `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. |
|
|
55640
55878
|
| `offset` | `number \| undefined` | `4` | | Space the popover keeps from the activator. |
|
|
55879
|
+
| `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. |
|
|
55641
55880
|
| `padding` | `number \| undefined` | | | Minimum empty space to keep from the edge of the page. |
|
|
55642
55881
|
| `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. |
|
|
55643
55882
|
| `range` | `boolean` | `false` | | Range selection: the value is a two-element `[start, end]` array. |
|
|
@@ -55677,6 +55916,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
55677
55916
|
- `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.
|
|
55678
55917
|
- `update:activeSegment` — `(value: BbTimePickerSegment): void` — The active range end changed (range only).
|
|
55679
55918
|
- `update:modelValue` — `(value: string \| string[] \| null): void` — Emitted when the selected time changes (single/range/null).
|
|
55919
|
+
- `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
|
|
55680
55920
|
|
|
55681
55921
|
## Slots
|
|
55682
55922
|
|
|
@@ -55853,7 +56093,9 @@ and parses its own digits. Any other attribute lands on the field root; a
|
|
|
55853
56093
|
|
|
55854
56094
|
`min` / `max` (`HH:mm`) clamp typed times when interaction ends — the value
|
|
55855
56095
|
snaps to the nearest bound and an `error` event with code `disabled_time`
|
|
55856
|
-
fires (`{ original, normalized }`).
|
|
56096
|
+
fires (`{ original, normalized }`). A value your app sets past a bound stays
|
|
56097
|
+
as it is while nobody touches the field; once the user focuses it and leaves,
|
|
56098
|
+
it is clamped like a typed one. In `range` mode the model is `[start,
|
|
55857
56099
|
end]`; typing an inverted pair swaps it on blur with the usual
|
|
55858
56100
|
`end_before_start` error.
|
|
55859
56101
|
|
|
@@ -55882,6 +56124,15 @@ title and ✕: none of the input's own parts reach inside the sheet). `disableWr
|
|
|
55882
56124
|
interaction, and a tap anywhere on the field opens them (Enter or Space too;
|
|
55883
56125
|
the ✕ still only clears).
|
|
55884
56126
|
|
|
56127
|
+
### Opening from code: `v-model:open`
|
|
56128
|
+
|
|
56129
|
+
`v-model` is the value; `v-model:open` is whether the time panel is open. Bound,
|
|
56130
|
+
your ref opens and closes it, and every open and close the user makes is
|
|
56131
|
+
written back: a pick, Escape, a click outside, the phone sheet's own dismiss. A static `:open` with no
|
|
56132
|
+
listener is only the initial state. An open from code is the same open a
|
|
56133
|
+
click makes, and `disabled` / `readonly` refuse it (the ref is set back
|
|
56134
|
+
to `false`).
|
|
56135
|
+
|
|
55885
56136
|
### Events & v-model
|
|
55886
56137
|
|
|
55887
56138
|
| Event | Payload | When |
|
|
@@ -56015,6 +56266,7 @@ Messages _also_ render in an `aria-live="polite"` region.
|
|
|
56015
56266
|
## v-model
|
|
56016
56267
|
|
|
56017
56268
|
- `v-model` — type: `string \| string[] \| null \| undefined`
|
|
56269
|
+
- `v-model:open` — type: `boolean \| undefined`
|
|
56018
56270
|
|
|
56019
56271
|
## Props
|
|
56020
56272
|
|
|
@@ -56050,6 +56302,7 @@ Messages _also_ render in an `aria-live="polite"` region.
|
|
|
56050
56302
|
| `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. |
|
|
56051
56303
|
| `name` | `string \| undefined` | | | Defines the name of the input. |
|
|
56052
56304
|
| `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. |
|
|
56305
|
+
| `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. |
|
|
56053
56306
|
| `persistentHint` | `boolean \| undefined` | `false` | | Keeps the hint displayed. |
|
|
56054
56307
|
| `placeholder` | `string \| undefined` | | | Text shown while the field is empty. |
|
|
56055
56308
|
| `prepend:icon` | `string \| undefined` | | | Name of the icon to be added at the start of the input. |
|
|
@@ -56118,6 +56371,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
56118
56371
|
- `show` — `(): void` — Emitted as soon as the time panel (the popover, or the sheet on a phone) starts to open.
|
|
56119
56372
|
- `shown` — `(): void` — Emitted once the time panel is open and its open transition has finished.
|
|
56120
56373
|
- `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.
|
|
56374
|
+
- `update:open` — `(value: boolean): void` — The panel opened or closed (`v-model:open`).
|
|
56121
56375
|
|
|
56122
56376
|
## Slots
|
|
56123
56377
|
|
|
@@ -56535,8 +56789,9 @@ positions form independent stacks.
|
|
|
56535
56789
|
### Action buttons
|
|
56536
56790
|
|
|
56537
56791
|
Pass an `actions` array to render buttons in a row below the text. While a
|
|
56538
|
-
button's `onClick` runs it shows a spinner, its siblings
|
|
56539
|
-
|
|
56792
|
+
button's `onClick` runs it shows a spinner, its siblings ignore clicks (they
|
|
56793
|
+
keep their look and leave the tab order), and the auto-dismiss countdown is
|
|
56794
|
+
held; the toast dismisses itself when the callback
|
|
56540
56795
|
resolves. A rejected callback keeps the toast open and the countdown resumes.
|
|
56541
56796
|
Defaults per button: `variant: 'primary'`, `size: 'sm'`. An action's `text`
|
|
56542
56797
|
is its button label; the toast's own `text` is the body copy above them.
|
|
@@ -58275,6 +58530,10 @@ and `#<depth>:children` slots that **replace the children container** of the
|
|
|
58275
58530
|
matching node — the recursion stops there and your content renders instead,
|
|
58276
58531
|
useful for a custom layout or an inline empty state under one branch.
|
|
58277
58532
|
|
|
58533
|
+
A slot that renders nothing for a node (its content behind a `v-if` that is
|
|
58534
|
+
false there) is skipped: `#<value>` falls to `#<depth>`, then `default`; an
|
|
58535
|
+
empty `:children` slot leaves that node its default children.
|
|
58536
|
+
|
|
58278
58537
|
**Sections, pages and a special trash node**
|
|
58279
58538
|
|
|
58280
58539
|
```vue
|
|
@@ -59020,7 +59279,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
59020
59279
|
- `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 }`
|
|
59021
59280
|
- `#<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`.
|
|
59022
59281
|
- `#<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`.
|
|
59023
|
-
- `#<value>:children` (named from data) — scope: `BbTreeNodeSlotProps<Meta>` — One node's children container, stopping the recursion there; beats `<depth>:children`. Renders for leaves too.
|
|
59282
|
+
- `#<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.
|
|
59024
59283
|
- `#<depth>:children` (named from data) — scope: `BbTreeNodeSlotProps<Meta>` — The children container of every node at one depth.
|
|
59025
59284
|
|
|
59026
59285
|
## CSS custom properties
|
|
@@ -59419,6 +59678,7 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
59419
59678
|
| `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. |
|
|
59420
59679
|
| `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 |
|
|
59421
59680
|
| `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. |
|
|
59681
|
+
| `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. |
|
|
59422
59682
|
| `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). |
|
|
59423
59683
|
| `dialog` | `boolean \| undefined` | `false` | | Renders the popover as a `<dialog>` element (modal overlay) instead of a `<span>` with the Popover API. |
|
|
59424
59684
|
| `disableFlip` | `boolean \| undefined` | `false` | | Disables the automatic flip to the opposite side when the popover would overflow (flipping is on by default). |
|
|
@@ -61662,8 +61922,8 @@ buttons: `text`, `variant` — default `'primary'` —, `size` — default `'sm'
|
|
|
61662
61922
|
`prepend:icon`/`append:icon`, `iconOnly` (the icon alone, `text` its
|
|
61663
61923
|
accessible name), `block`, `onClick`; confirm buttons
|
|
61664
61924
|
default to `'outline'` / `'md'` instead). While a button's
|
|
61665
|
-
`onClick` runs it shows a spinner, siblings
|
|
61666
|
-
countdown is held; the toast dismisses itself (reason `'action'`) when the
|
|
61925
|
+
`onClick` runs it shows a spinner, siblings ignore clicks (keeping their look),
|
|
61926
|
+
and the auto-dismiss countdown is held; the toast dismisses itself (reason `'action'`) when the
|
|
61667
61927
|
callback resolves. A rejected callback keeps the toast open and the countdown
|
|
61668
61928
|
resumes.
|
|
61669
61929
|
|
|
@@ -61836,6 +62096,7 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
61836
62096
|
- `focused:change` — `(id: string \| undefined): void` — Emitted when the keyboard-focused option changes.
|
|
61837
62097
|
- `option:selected` — `(option: Option): void` — Emitted when an option is selected by the user.
|
|
61838
62098
|
- `option:unselected` — `(option: Option): void` — Emitted when a previously selected option is deselected.
|
|
62099
|
+
- `retry` — `(event: MouseEvent): void` — The failure footer's "Try again" was pressed: the host runs the failed load again.
|
|
61839
62100
|
|
|
61840
62101
|
## Slots
|
|
61841
62102
|
|
|
@@ -61914,6 +62175,7 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
61914
62175
|
- `focused:change` — `(id: string \| undefined): void` — Emitted when the keyboard-focused option changes.
|
|
61915
62176
|
- `option:selected` — `(option: Option): void` — Emitted when an option is selected by the user.
|
|
61916
62177
|
- `option:unselected` — `(option: Option): void` — Emitted when a previously selected option is deselected.
|
|
62178
|
+
- `retry` — `(event: MouseEvent): void` — The failure footer's "Try again" was pressed: the host runs the failed load again.
|
|
61917
62179
|
|
|
61918
62180
|
## Slots
|
|
61919
62181
|
|
|
@@ -62202,7 +62464,7 @@ Where the option goes: [Installation and Plugin Setup](https://llms-bitboss-ui.b
|
|
|
62202
62464
|
|
|
62203
62465
|
## Overlay Open-State Rule
|
|
62204
62466
|
|
|
62205
|
-
Open a dialog or sheet **without** owning its state: give `BbDialog` / `BbOffCanvas` an `id` and put `v-bb-dialog="'edit'"` / `v-bb-off-canvas="'filters'"` on the button (`useBbDialog('edit')` in code); a dialog in its own file, or one per row's data, opens on demand with `useBbDialog(Component).show(data)`; a yes/no is `useConfirm`. Which one: [BbDialog](https://llms-bitboss-ui.bitboss.it/dist/ai/BbDialog.md) § Which one?. A boolean `v-model` is the fallback for state your page already holds — never a separate `v-model:open`. `BbPopover` and `
|
|
62467
|
+
Open a dialog or sheet **without** owning its state: give `BbDialog` / `BbOffCanvas` an `id` and put `v-bb-dialog="'edit'"` / `v-bb-off-canvas="'filters'"` on the button (`useBbDialog('edit')` in code); a dialog in its own file, or one per row's data, opens on demand with `useBbDialog(Component).show(data)`; a yes/no is `useConfirm`. Which one: [BbDialog](https://llms-bitboss-ui.bitboss.it/dist/ai/BbDialog.md) § Which one?. A boolean `v-model` is the fallback for state your page already holds — never a separate `v-model:open`. `BbPopover`, `BbTooltip` and `BbDropdown` also take a boolean `v-model`. A component whose `v-model` is its value (`BbSelect`, `BbSelectPopover`, `BbDropdownButton`, the date / time / colour pickers and inputs) takes `v-model:open` for its panel; a value-less overlay never does.
|
|
62206
62468
|
|
|
62207
62469
|
These overlays also return focus to their trigger element on close, by documented default — a consumer `@focus`-reopen handler on that trigger will fight the restore and can loop.
|
|
62208
62470
|
|
|
@@ -62268,13 +62530,17 @@ the field keeps it a string (`''`).
|
|
|
62268
62530
|
Boolean props default to `false` so the bare `<Comp foo>` shorthand turns the feature **on**. A few props deliberately default to `true` for cross-library keyword clarity — pass `:prop="false"` to opt out:
|
|
62269
62531
|
|
|
62270
62532
|
- `multiple` on `BbTable`, `BbCheckboxGroup`, `BbSwitchGroup` — multi-select is the expected default; `:multiple="false"` forces single-select.
|
|
62271
|
-
- `selectable` on the option components (`BbSelect`, `BbSelectPopover`, `BbCheckboxGroup`, `BbRadioGroup`, `BbSwitchGroup`) — options are selectable by default; pass a predicate or `false` to restrict. **Not `BbTable`**: there `selectable` is unset by default and
|
|
62272
|
-
- `modelValue` on `BbAlert` — an uncontrolled alert
|
|
62533
|
+
- `selectable` on the option components (`BbSelect`, `BbSelectPopover`, `BbCheckboxGroup`, `BbRadioGroup`, `BbSwitchGroup`) — options are selectable by default; pass a predicate or `false` to restrict. **Not `BbTable`**: there `selectable` is unset by default and renders the selection column, so off means no checkboxes.
|
|
62534
|
+
- `modelValue` on `BbAlert` — an uncontrolled alert shows on mount; its `v-model` exists to dismiss it.
|
|
62273
62535
|
- `trueValue` on `BbButton` — the value a `v-model` toggle commits when on (`true` is the natural on-value), not a feature flag.
|
|
62274
62536
|
|
|
62275
62537
|
These are the only intentional default-`true` booleans — exactly the exemptions `check-api` whitelists; anywhere else, `true` default is a bug (`check-api` flags it).
|
|
62276
62538
|
|
|
62277
|
-
**Arrows are tooltip-only in v3.** `hideArrow` / `showArrow` / `arrowPadding` were removed from `BbPopover`, `BbSelectPopover`, `BbColorPalette
|
|
62539
|
+
**Arrows are tooltip-only in v3.** `hideArrow` / `showArrow` / `arrowPadding` were removed from `BbPopover`, `BbSelectPopover`, `BbColorPalette` and `BbDropdown` (leftovers land in `$attrs`). `BbTooltip` keeps `hideArrow` (default `false`) and `arrowPadding` (default `10`). See [bb-popover.md](https://llms-bitboss-ui.bitboss.it/dist/ai/guides/migration/components/bb-popover.md).
|
|
62540
|
+
|
|
62541
|
+
## Empty Slot Rule
|
|
62542
|
+
|
|
62543
|
+
A slot that renders nothing (a `v-if` false there) counts as absent: the next more general slot draws, then the default (`prepend:icon`, label, children). Exception: a `BbTable` `#<key>` cell slot owns its cell.
|
|
62278
62544
|
|
|
62279
62545
|
## Testing Against bitboss-ui
|
|
62280
62546
|
|
|
@@ -64826,6 +65092,19 @@ zero specificity, so a class you put on the panel (`pt:panel`, `pt:root`,
|
|
|
64826
65092
|
`class` on a dialog) or on its content wins. To style a surface like its
|
|
64827
65093
|
activator again, set the styles on that part.
|
|
64828
65094
|
|
|
65095
|
+
### Avatar palette
|
|
65096
|
+
|
|
65097
|
+
`BbAvatar`'s `color` paints the fallback from a palette: ten hues, one picked
|
|
65098
|
+
per person from a stable hash of the `name`, and one fill / ink pair per
|
|
65099
|
+
scheme built as `oklch(L C <hue>)`. Every pair measures over 6:1. A theme
|
|
65100
|
+
moves a hue or the pair; keep the 4.5:1 budget.
|
|
65101
|
+
|
|
65102
|
+
| Token | Default (light) | Dark | Meaning |
|
|
65103
|
+
| --- | --- | --- | --- |
|
|
65104
|
+
| `--bb-avatar-hue-coral` … `--bb-avatar-hue-rose` | 25 … 355 | same | The ten hues in degrees: coral 25, tangerine 55, sunflower 85, mint 165, teal 195, sky 230, blue 260, violet 295, orchid 325, rose 355 |
|
|
65105
|
+
| `--bb-avatar-bg-l` / `--bb-avatar-bg-c` | `0.93` / `0.065` | `0.4` / `0.095` | The fill's OKLCH lightness and chroma |
|
|
65106
|
+
| `--bb-avatar-ink-l` / `--bb-avatar-ink-c` | `0.42` / `0.13` | `0.93` / `0.06` | The initials' and icon's OKLCH lightness and chroma |
|
|
65107
|
+
|
|
64829
65108
|
### Input family
|
|
64830
65109
|
|
|
64831
65110
|
Form controls are ~half the library and must agree with each other, so their
|
|
@@ -65774,7 +66053,7 @@ Four cases ignore `prefill` and load anyway, because deferring would buy nothing
|
|
|
65774
66053
|
|
|
65775
66054
|
- **Race protection**: a newer call aborts the one in flight (`signal`), and a superseded answer — resolution or rejection — is dropped. Nothing runs after a superseded call: no prune, no stash.
|
|
65776
66055
|
- **Loading**: the component tracks in-flight requests itself, and the loading state ends the moment a call is aborted; don't add your own `loading` ref for option fetching.
|
|
65777
|
-
- **Failure is never "empty"**: a provider **throws** to fail — it never returns `[]` for one, because an empty array is a real, applied result. On a failed (not aborted) call the component clears the rows (stale rows never sit under a new filter), prunes nothing, publishes nothing to the SSR payload (the client loads again), logs the error, and shows `failed-text` (locale default "Couldn't load items")
|
|
66056
|
+
- **Failure is never "empty"**: a provider **throws** to fail — it never returns `[]` for one, because an empty array is a real, applied result. On a failed (not aborted) call the component clears the rows (stale rows never sit under a new filter), prunes nothing, publishes nothing to the SSR payload (the client loads again), logs the error, and shows its own failure row: `failed-text` (locale default "Couldn't load items"), announced, then a "Try again" button that runs the failed call again with the same query (on click only, never on its own). `#empty` means empty: it never renders for a failure and its scope has no `error`.
|
|
65778
66057
|
- **Coherence** (`enforce-coherence`): prunes only after an applied, successful load whose reason is not `'search'` — an empty one included — against the fetched rows alone, except values a `known-items` row names (a select's `stash` does not count). Failures never prune. Details in the [Coherence playbook](https://llms-bitboss-ui.bitboss.it/dist/ai/guides/coherence-playbook.md).
|
|
65779
66058
|
- **Dependency comparison is value-based** (hashed), not reference-based — `:dependencies="[filters]"` re-fetches only when the content actually changes, no matter how often the array identity does.
|
|
65780
66059
|
|
|
@@ -65812,19 +66091,15 @@ Pass it to every request; combine it with a timeout (`AbortSignal.any([signal, A
|
|
|
65812
66091
|
|
|
65813
66092
|
### Failure and retry
|
|
65814
66093
|
|
|
66094
|
+
The failure row is the library's: set its message with `failed-text`, and keep `#empty` for the empty result. "Try again" is built in.
|
|
66095
|
+
|
|
65815
66096
|
```vue
|
|
65816
66097
|
<BbTable
|
|
65817
66098
|
:items="fetchInvoices"
|
|
65818
|
-
:dependencies="[status
|
|
65819
|
-
failed-text="The invoices could not be loaded"
|
|
66099
|
+
:dependencies="[status]"
|
|
66100
|
+
failed-text="The invoices could not be loaded."
|
|
65820
66101
|
>
|
|
65821
|
-
<template #empty
|
|
65822
|
-
<template v-if="error">
|
|
65823
|
-
Couldn't load the invoices.
|
|
65824
|
-
<BbButton size="sm" variant="ghost" @click="retry++">Try again</BbButton>
|
|
65825
|
-
</template>
|
|
65826
|
-
<template v-else>No invoices match these filters.</template>
|
|
65827
|
-
</template>
|
|
66102
|
+
<template #empty>No invoices match these filters.</template>
|
|
65828
66103
|
</BbTable>
|
|
65829
66104
|
```
|
|
65830
66105
|
|
|
@@ -65896,7 +66171,7 @@ The same object, with `query` only on a `searchable` group. A getter for a searc
|
|
|
65896
66171
|
- [ ] The provider takes ONE object typed with its component's context type, and `signal` reaches every request.
|
|
65897
66172
|
- [ ] Selects: the current picks are named on every `reason !== 'search'` call (required with `enforce-coherence`), `stash` is on, the ids request fails soft.
|
|
65898
66173
|
- [ ] A provider that matches `query` on the server has `:filter-by="false"` (dropdown group: `filterBy: false`).
|
|
65899
|
-
- [ ] Failures are thrown, not returned; `failed-text`
|
|
66174
|
+
- [ ] Failures are thrown, not returned; `failed-text` words the failure row (it has "Try again" built in), and `#empty` holds empty copy only.
|
|
65900
66175
|
- [ ] All branches return the same item shape.
|
|
65901
66176
|
- [ ] Field-tied fetching uses `dependencies` (+ `deps-debounce-time`), no manual watchers; dependent selects filter both requests by the parent.
|
|
65902
66177
|
|
|
@@ -73625,14 +73900,14 @@ stays in your markup.
|
|
|
73625
73900
|
| `showArrow?: boolean` (default `false`) | removed | arrows are tooltip-only in v3; **⚠ silent** — a leftover `show-arrow` lands in `$attrs` |
|
|
73626
73901
|
| `arrowPadding` | removed | dead with the arrow |
|
|
73627
73902
|
| `picker?: boolean` | `eyeDropper?: boolean` | rename (same eyedropper feature) |
|
|
73628
|
-
| `update:open` event |
|
|
73903
|
+
| `update:open` event | `v-model:open` (since 3.0.0-beta.75) | the same event, now with an `open` prop: bind `v-model:open` to open the palette from code; `show` / `hide` still fire |
|
|
73629
73904
|
| `update:modelValue` payload `string \| null` | `string` — the palette always emits a concrete color, never `null` | **behavior** — clearing is the consumer's job now; handlers narrowing on `null` have dead branches |
|
|
73630
73905
|
| activator slot prop `color` | `value` | rename |
|
|
73631
73906
|
|
|
73632
73907
|
## Edits
|
|
73633
73908
|
|
|
73634
73909
|
```diff
|
|
73635
|
-
- <BbColorPalette v-model="color" :flip="false" show-arrow picker
|
|
73910
|
+
- <BbColorPalette v-model="color" :flip="false" show-arrow picker>
|
|
73636
73911
|
- <template #activator="{ props, color }">
|
|
73637
73912
|
- <button v-bind="props" :style="{ background: color }" />
|
|
73638
73913
|
+ <BbColorPalette v-model="color" disable-flip eye-dropper>
|
|
@@ -74032,6 +74307,7 @@ reaches it. Its own button hooks changed — see
|
|
|
74032
74307
|
| items `{ key, text }` (v2, and v3 up to beta.48) | items `{ value, label }` — the same rows as `BbDropdown` | hard rename — `npx bitboss-ui check --fix` rewrites literal items; see [bb-dropdown.md](https://llms-bitboss-ui.bitboss.it/dist/ai/guides/migration/components/bb-dropdown.md) |
|
|
74033
74308
|
| `items[0]` was the main button (v2, and v3 up to beta.57) | the component is the main button: label in the default slot, `@click` / `href` / `to` / `type` / `form` on it; every item is a menu row | **break** — move the first item onto the component (below); `bitboss-ui check` flags a split button with no label |
|
|
74034
74309
|
| default slot: `<BbDropdownGroup>` companions (v3 up to beta.57) | `#dropdown` slot; the default slot is the main button's label | **break** — wrap the companion in `<template #dropdown>` |
|
|
74310
|
+
| `#<groupId>` (a group's title; up to beta.74) | `#<groupId>:label`; `#group` / `#<groupId>:group` draw `groupBy` headings | `check --fix` renames it for the group ids it sees |
|
|
74035
74311
|
|
|
74036
74312
|
## Edits
|
|
74037
74313
|
|
|
@@ -74111,6 +74387,7 @@ label. `toggle:icon` is unchanged.
|
|
|
74111
74387
|
| _(v3 prereleases up to beta.63; v2 had no submenus)_ `Escape` anywhere closed the whole menu; only `ArrowRight` drilled into a submenu with focus | `Escape` in a submenu closes that level and refocuses its row; `Enter`, `Space` and click open a submenu with focus inside (search box first); focus returns to the row when a submenu closes under it; `dir="rtl"` swaps the inline arrows | **⚠ silent**: drop hand-rolled per-level `Escape` handlers and `focus()` calls into submenus, which now fight the menu (`v2-to-v3.md` § 6 item 101) |
|
|
74112
74388
|
| _(v3 prereleases up to beta.63)_ on the mobile sheet `Escape` closed the whole sheet from any level; going back focused the parent level's first row | `Escape` on a drilled-in level (row or search box) goes back one level, like the back control; going back focuses the row that opened the level; at the top level `Escape` closes the sheet | **⚠ silent**: update tests that expect `Escape` on a sheet level to close the menu (`v2-to-v3.md` § 6 item 107) |
|
|
74113
74389
|
| _(v3 prereleases up to beta.63)_ an item's `data-*` / `aria-*` keys were copied onto its row | items take only the fields the menu reads; row attributes go through `pt:item` (function form per row) | **⚠ silent**: move them to `:pt:item="({ item }) => ({ attrs: { … } })"` (`v2-to-v3.md` § 6 item 108) |
|
|
74390
|
+
| _(v3 prereleases up to beta.74)_ `#<groupId>`: a group's title content | `#<groupId>:label`; `#group` / `#<groupId>:group` draw the `groupBy` headings | rename the slot; `npx bitboss-ui check --fix` does it for the group ids it can see |
|
|
74114
74391
|
|
|
74115
74392
|
## Edits
|
|
74116
74393
|
|
|
@@ -75551,7 +75828,8 @@ from a cell slot on an unbound table does nothing and warns once.
|
|
|
75551
75828
|
table has no search field). `reason` replaces the `prefill` flag: `'initial'`,
|
|
75552
75829
|
`'dependencies'`, or `'pagination'` for a page or page-size move.
|
|
75553
75830
|
Pass `signal` to the request; throw on a failure (never `return []`), and the
|
|
75554
|
-
|
|
75831
|
+
table shows its failure row: `failed-text` with a built-in "Try again"
|
|
75832
|
+
(`#empty` is for empty results only). **⚠ silent**
|
|
75555
75833
|
for untyped code: a `prefill ? a : b` always takes `a`. Details and the
|
|
75556
75834
|
before/after in [§6 item 37](https://llms-bitboss-ui.bitboss.it/dist/ai/guides/migration/v2-to-v3.md).
|
|
75557
75835
|
|
|
@@ -76356,8 +76634,8 @@ Nothing catches this for you — `dismissAll` is not a template attribute, so
|
|
|
76356
76634
|
`rg -n 'dismissAll' --type ts --type js --type vue`. Hits on a `useConfirm()`
|
|
76357
76635
|
destructure are fine: `dismissAll` is **new** there, and unrelated.
|
|
76358
76636
|
|
|
76359
|
-
Notes on `actions` (additive but with rules): handlers run with a spinner
|
|
76360
|
-
|
|
76637
|
+
Notes on `actions` (additive but with rules): handlers run with a spinner,
|
|
76638
|
+
siblings ignore clicks meanwhile, and they hold the dismiss timer; portal toasts ignore `actions`.
|
|
76361
76639
|
Styling hooks moved from `theme` classes to `bb-toast__panel--<variant>` —
|
|
76362
76640
|
custom looks register through the plugin's `components.BbToast.variants` option
|
|
76363
76641
|
([main guide §4](https://llms-bitboss-ui.bitboss.it/dist/ai/guides/migration/v2-to-v3.md)).
|
|
@@ -79049,6 +79327,14 @@ to the new name (`hide-close`).
|
|
|
79049
79327
|
work. The v3 prereleases up to beta.32 exported this union as
|
|
79050
79328
|
`InputDirection`; that type export is gone — import `FieldLayout` (for
|
|
79051
79329
|
`layout` / `itemLayout`) or `ListLayout` (for `listLayout`) instead.
|
|
79330
|
+
- **Slot scope types**: each component exports its whole slots type
|
|
79331
|
+
(`BbCarouselSlots<T>`, `BbDropdownSlots`); index it for one slot. The v3
|
|
79332
|
+
prereleases up to beta.74 also exported `BbCarouselSlotProps` and
|
|
79333
|
+
`BbDropdownItemSlotProps`; those exports are gone — write
|
|
79334
|
+
`Parameters<BbCarouselSlots<Photo>['slide']>[0]` or
|
|
79335
|
+
`Parameters<BbDropdownSlots['item:prepend']>[0]`. The portal scopes
|
|
79336
|
+
(`BbConfirmPortalSlotProps`, `BbHoverCardPortalSlotProps`,
|
|
79337
|
+
`BbPopoverPortalSlotProps`, `DirectivePortalSlotProps`) stay.
|
|
79052
79338
|
|
|
79053
79339
|
- **Fall-through attributes are typed** (after 3.0.0-beta.65): each
|
|
79054
79340
|
component's props type carries Vue's attribute type of the element its
|
|
@@ -79705,11 +79991,13 @@ Nothing here fails to compile — these change what existing code does.
|
|
|
79705
79991
|
Two behaviours moved with it. **A provider signals a failure by throwing**,
|
|
79706
79992
|
never by returning `[]` (an empty array is a real, applied result): the
|
|
79707
79993
|
rows are cleared so stale rows never sit under a new filter, nothing is
|
|
79708
|
-
pruned, nothing reaches the SSR payload, and the
|
|
79709
|
-
|
|
79710
|
-
|
|
79711
|
-
|
|
79712
|
-
`
|
|
79994
|
+
pruned, nothing reaches the SSR payload, and the component shows its own
|
|
79995
|
+
failure row: the new `failed-text` prop — default "Couldn't load items"
|
|
79996
|
+
— then a "Try again" button that runs the failed call again. `#empty`
|
|
79997
|
+
means empty: it never renders for a failure, and its scope has no
|
|
79998
|
+
`error` (the v3 prereleases up to beta.74 handed it one; move that
|
|
79999
|
+
branch's copy to `failed-text` and drop any retry counter you listed in
|
|
80000
|
+
`dependencies`). And **one coherence rule for every family**:
|
|
79713
80001
|
`enforce-coherence` prunes only after an applied, successful, non-search
|
|
79714
80002
|
load — an EMPTY one included, so a legitimately empty dependent list drops
|
|
79715
80003
|
its stale picks. `BbDropdown` used to skip empty results; if a group relied
|
|
@@ -80995,6 +81283,13 @@ nullValue }, BbTextarea: { nullValue } }`, same values (`'null'` /
|
|
|
80995
81283
|
A nested table still paints nothing. A `background: var(--bg)` on a
|
|
80996
81284
|
`.bb-table.card` class is now redundant.
|
|
80997
81285
|
|
|
81286
|
+
168. **A creatable select shows a "Create «query»" row** (after
|
|
81287
|
+
3.0.0-beta.74). With an `option:add` listener, a typed query that no
|
|
81288
|
+
option matches exactly gets a create row: last after the matches, or
|
|
81289
|
+
alone in place of the no-results text and `#empty`. Its click (and the
|
|
81290
|
+
arrow keys + Enter) emits `option:add`, as Enter already did. A
|
|
81291
|
+
`#empty` that offered a create link or button is redundant: drop it.
|
|
81292
|
+
|
|
80998
81293
|
## 7. Class overrides → variants
|
|
80999
81294
|
|
|
81000
81295
|
### The v2 pattern to hunt down
|
|
@@ -82341,6 +82636,7 @@ What changed in the install and build-plugin setup during the 3.0 betas, for an
|
|
|
82341
82636
|
| `allowComponents` for `check` | `package.json` `"bitboss-ui": { "allowComponents": [...] }` or `bitboss-ui.check.json` | Read only from the build plugin, as a literal (3.0.0-beta.69); the old places are ignored, so those tags are reported again | Move the list into `bitbossUi({ allowComponents: [...] })` (Nuxt: `bitboss`). `registeredRules` and `dialogIdsWhitelist` stay in `bitboss-ui.check.json` |
|
|
82342
82637
|
| Reporting opt-out | None: an app could not turn reporting off | `"bitboss-ui": { "report": false }` in `package.json` (3.0.0-beta.74): no `report` command, no MCP `report_issue`, no reporting section in the agent files | Add it to opt out; on by default |
|
|
82343
82638
|
| Cursor, Windsurf and Copilot rule files | `ai-init` wrote `.cursor/rules/bitboss-ui.mdc`, `.windsurf/rules/bitboss-ui.md` and a block in `.github/copilot-instructions.md` | Removed by `setup` and `update` (3.0.0-beta.69): those harnesses read `AGENTS.md`, and Zed read the Copilot file instead of it | Commit the deletions |
|
|
82639
|
+
| Agent files on a dev server start | Up to 3.0.0-beta.74 a dev, build or test start also deleted the old rule files and edited `CLAUDE.md` | Only installs (the postinstall) and `update` / `setup` delete files or edit `CLAUDE.md`; a dev start writes our own blocks and files | After changing `ai`, run `npx bitboss-ui update --no-install` |
|
|
82344
82640
|
|
|
82345
82641
|
---
|
|
82346
82642
|
|
|
@@ -84043,7 +84339,7 @@ _Passthrough parts and states_ table in that component's contract
|
|
|
84043
84339
|
| `BbAccordion` | `root`, `header`, `title`, `icon`, `panel` | `disabled`, `open` |
|
|
84044
84340
|
| `BbAlert` | `root`, `icon`, `title`, `text`, `close` | —; _(variants, every part: `outline`, `primary`, `destructive`, `warning`)_ |
|
|
84045
84341
|
| `BbAsterisk` | `root` | — |
|
|
84046
|
-
| `BbAvatar` | `root`, `icon` | — |
|
|
84342
|
+
| `BbAvatar` | `root`, `icon`, `initials` | — |
|
|
84047
84343
|
| `BbBadge` | `root`, `icon`, `spinner`, `text`, `clear` | `activeLink`, `exactActiveLink` _(from its link body)_, `loading`; _(variants, every part: `primary`, `secondary`, `destructive`, `outline`)_ |
|
|
84048
84344
|
| `BbBaseButton` | `root` | `activeLink`, `exactActiveLink`, `disabled` |
|
|
84049
84345
|
| `BbBaseCheckboxIcon` | `root` | `errors`, `warnings`, `disabled`, `readonly`, `checked`, `indeterminate`, `focused`, `focusVisible` |
|
|
@@ -84062,8 +84358,8 @@ _Passthrough parts and states_ table in that component's contract
|
|
|
84062
84358
|
| `BbDatePicker` | `root`, `panel`, `sheet`, `header`, `arrow`, `month`, `year`, `cellColumnHeader`, `week`, `weekNumber` _(`type="week"` rows)_, `day`, `dayButton`, `monthItem`, `yearItem`, `item` _(forwarded to the calendar)_ | `outside`, `today`, `inRange`, `selected`, `rangeStart`, `rangeEnd`, `disabled`, `highlighted` _(per cell)_, `active` _(month / year)_, `open` |
|
|
84063
84359
|
| `BbDatePickerInput` | family + `activator`, `panel`, `sheet`, `header`, `arrow`, `month`, `year`, `cellColumnHeader`, `week`, `weekNumber` _(`type="week"` rows)_, `day`, `dayButton`, `monthItem`, `yearItem`, `item` _(forwarded to the calendar)_ | family + `open`, `outside`, `today`, `inRange`, `selected`, `rangeStart`, `rangeEnd`, `disabled`, `highlighted` _(per cell)_, `active` _(month / year)_ |
|
|
84064
84360
|
| `BbDialog` | `root`, `sheet`, `header`, `title`, `description`, `content`, `footer`, `close` | `open`, `fullscreen` |
|
|
84065
|
-
| `BbDropdown` | `root`, `panel`, `sheet`, `header`, `footer`, `input` _(every searchable group's field)_, `list`, `item`, `itemText`, `itemIcon`, `itemDescription`, `check` _(the tick)_, `submenu` _(each flyout box)_ | `open`, `activeLink`, `exactActiveLink`, `selected`, `disabled` _(per entry)_; _(variants, per entry, on the entry parts: `default`, `destructive`)_ |
|
|
84066
|
-
| `BbDropdownButton` | `root`, `main`, `toggle` _(the two halves)_, `icon`, `spinner`, `text` _(the main button's)_, `panel`, `sheet`, `header`, `footer`, `input`, `item`, `itemText`, `itemIcon`, `itemDescription`, `check`, `submenu` _(the menu's)_ | `activeLink`, `exactActiveLink` _(the main button's link; per entry on the entry parts)_, `loading`, `disabled`, `open`; `selected` _(entry parts only)_; _(variants: the button's on the control's parts — root, main, toggle, icon, spinner, text: `primary`, `outline`, `secondary`, `ghost`, `destructive`, `link`; each entry's on the entry parts: `default`, `destructive`)_ |
|
|
84361
|
+
| `BbDropdown` | `root`, `panel`, `sheet`, `header`, `footer`, `box` _(each search box)_, `input` _(every searchable group's field)_, `list`, `item`, `itemText`, `itemIcon`, `itemDescription`, `check` _(the tick)_, `submenu` _(each flyout box)_ | `open`, `activeLink`, `exactActiveLink`, `selected`, `disabled` _(per entry)_; _(variants, per entry, on the entry parts: `default`, `destructive`)_ |
|
|
84362
|
+
| `BbDropdownButton` | `root`, `main`, `toggle` _(the two halves)_, `icon`, `spinner`, `text` _(the main button's)_, `panel`, `sheet`, `header`, `footer`, `box`, `input`, `list`, `item`, `itemText`, `itemIcon`, `itemDescription`, `check`, `submenu` _(the menu's)_ | `activeLink`, `exactActiveLink` _(the main button's link; per entry on the entry parts)_, `loading`, `disabled`, `open`; `selected` _(entry parts only)_; _(variants: the button's on the control's parts — root, main, toggle, icon, spinner, text: `primary`, `outline`, `secondary`, `ghost`, `destructive`, `link`; each entry's on the entry parts: `default`, `destructive`)_ |
|
|
84067
84363
|
| `BbDropzone` | `root`, `content`, `message` | `active`, `errors`, `warnings`, `disabled`, `readonly` |
|
|
84068
84364
|
| `BbGallery` | `root`, `header`, `title`, `close`, `slide` _(per photo)_, `image` _(per photo)_, `prev`, `next`, `footer`, `caption`, `more`, `counter` | `disabled` _(per node)_, `active` _(per node)_, `zoomed` |
|
|
84069
84365
|
| `BbHoverCard` | `root`, `panel`, `header`, `content`, `footer` | `open` |
|
|
@@ -86369,7 +86665,7 @@ Do not use these components directly in consumer code unless the user explicitly
|
|
|
86369
86665
|
- [Migration v2→v3: BbChip (removed)](https://llms-bitboss-ui.bitboss.it/dist/ai/guides/migration/components/bb-chip.md) - BbChip is gone — BbBadge with clearable is the replacement; non-clearable chips were badges all along.
|
|
86370
86666
|
- [Migration v2→v3: BbCollapsible](https://llms-bitboss-ui.bitboss.it/dist/ai/guides/migration/components/bb-collapsible.md) - `tag` narrows to `'span' | 'div'` and still defaults to `div`; the inner element mirrors it.
|
|
86371
86667
|
- [Migration v2→v3: BbColorInput](https://llms-bitboss-ui.bitboss.it/dist/ai/guides/migration/components/bb-color-input.md) - picker renamed to eyeDropper.
|
|
86372
|
-
- [Migration v2→v3: BbColorPalette](https://llms-bitboss-ui.bitboss.it/dist/ai/guides/migration/components/bb-color-palette.md) - flip inverted to disableFlip, showArrow removed, picker renamed eyeDropper, update:open
|
|
86668
|
+
- [Migration v2→v3: BbColorPalette](https://llms-bitboss-ui.bitboss.it/dist/ai/guides/migration/components/bb-color-palette.md) - flip inverted to disableFlip, showArrow removed, picker renamed eyeDropper, update:open is v-model:open, model updates never emit null.
|
|
86373
86669
|
- [Migration v2→v3: BbConfirm + BbToast → BbHost](https://llms-bitboss-ui.bitboss.it/dist/ai/guides/migration/components/bb-host.md) - Delete the <BbConfirm /> and <BbToast /> tags — the plugin renders the <BbHost /> that replaces them; their size, position and pt props move to the plugin config; a second host renders nothing; confirm() with no host resolves false after 1s.
|
|
86374
86670
|
- [Migration v2→v3: BbDatePickerInput](https://llms-bitboss-ui.bitboss.it/dist/ai/guides/migration/components/bb-date-picker-input.md) - allowWriting inverted to disableWriting and hidePopover renamed to disableCalendar, both with a changed token set; the width prop is removed; adaptive mobile sheet by default; non-floating output carries the local offset instead of UTC `Z` (new `utc` prop restores v2 output).
|
|
86375
86671
|
- [Migration v2→v3: BbDialog](https://llms-bitboss-ui.bitboss.it/dist/ai/guides/migration/components/bb-dialog.md) - showClose inverted to hideClose, #close removed (description restored in beta.19), default widths changed, adaptive bottom sheet on mobile by default, --bb-dialog-* tokens replaced by --bb-panel-p plus locals.
|
|
@@ -86471,6 +86767,7 @@ Do not use these components directly in consumer code unless the user explicitly
|
|
|
86471
86767
|
- `focused:change` — `(id: string \| undefined): void` — Emitted when the keyboard-focused option changes.
|
|
86472
86768
|
- `option:selected` — `(option: Option): void` — Emitted when an option is selected by the user.
|
|
86473
86769
|
- `option:unselected` — `(option: Option): void` — Emitted when a previously selected option is deselected.
|
|
86770
|
+
- `retry` — `(event: MouseEvent): void` — The failure footer's "Try again" was pressed: the host runs the failed load again.
|
|
86474
86771
|
|
|
86475
86772
|
## Slots
|
|
86476
86773
|
|
|
@@ -86515,8 +86812,8 @@ Do not use these components directly in consumer code unless the user explicitly
|
|
|
86515
86812
|
| --- | --- | --- | --- | --- |
|
|
86516
86813
|
| `block` | `string` | | yes | The owning group's public BEM block (`bb-checkbox-group`): the nodes are its elements (`__list`, `__loading`, `__item`, `__label`, …), named after the `pt` parts. |
|
|
86517
86814
|
| `emptyText` | `string \| undefined` | | | String displayed when there are no items to display. |
|
|
86518
|
-
| `error` | `unknown` | | | What the owning group's latest failed `items` load rejected with; `null` (or unset) when nothing failed. While set, the
|
|
86519
|
-
| `failedText` | `string \| undefined` | | |
|
|
86815
|
+
| `error` | `unknown` | | | What the owning group's latest failed `items` load rejected with; `null` (or unset) when nothing failed. While set, the list shows the failure row (`failedText` and "Try again"), never the `empty` slot. Internal. |
|
|
86816
|
+
| `failedText` | `string \| undefined` | | | The failure row's message while `error` is set. |
|
|
86520
86817
|
| `hasErrors` | `boolean \| undefined` | `false` | | Define if the component should be in an error state. It usually attaches a CSS class for styling purposes. |
|
|
86521
86818
|
| `hasWarnings` | `boolean \| undefined` | `false` | | Define if the component should be in a warning state. Attaches a `--warnings` CSS class; suppressed when `hasErrors` is true. |
|
|
86522
86819
|
| `hideLabel` | `boolean \| undefined` | `false` | | Visually hides the label of the input while maintaining accessibility. |
|
|
@@ -86535,12 +86832,12 @@ Do not use these components directly in consumer code unless the user explicitly
|
|
|
86535
86832
|
|
|
86536
86833
|
## Events
|
|
86537
86834
|
|
|
86538
|
-
-
|
|
86835
|
+
- `retry` — `(event: MouseEvent): void` — The failure row's "Try again" was pressed: the group runs the failed load again.
|
|
86539
86836
|
|
|
86540
86837
|
## Slots
|
|
86541
86838
|
|
|
86542
86839
|
- `append` — scope: `object` — Content rendered after the last option, inside the options container.
|
|
86543
|
-
- `empty` — scope: `
|
|
86840
|
+
- `empty` — scope: `object` — Content shown when no options are available (replaces the default "no data" text). Empty only: a failed load shows the failure row.
|
|
86544
86841
|
- `input` — scope: `OptionsContainerInputSlotProps<T>` `{ index: number; option: Option<T>; labelId: string; descriptionId: string; rowStates: Partial<Record<RowPtState, boolean>> }` — The actual input element for each option (e.g. radio or checkbox).
|
|
86545
86842
|
- `label` — scope: `OptionsContainerLabelSlotProps<T>` `{ checked: boolean; item: T; text: string; description: string }` — Replaces the default label text for each option.
|
|
86546
86843
|
- `loading` — scope: `object` — Content shown while options are loading (replaces the default loading text).
|