bitboss-ui 3.0.0-beta.75 → 3.0.0-beta.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/README.md +5 -5
  2. package/bin/cli.mjs +16 -10
  3. package/dist/ai/BbAlert.md +1 -1
  4. package/dist/ai/BbBreadcrumbs.md +1 -1
  5. package/dist/ai/BbButton.md +2 -2
  6. package/dist/ai/BbColorInput.md +1 -1
  7. package/dist/ai/BbColorPalette.md +1 -1
  8. package/dist/ai/BbConfirm.md +1 -1
  9. package/dist/ai/BbDatePicker.md +1 -1
  10. package/dist/ai/BbDatePickerInput.md +1 -1
  11. package/dist/ai/BbDialog.md +3 -2
  12. package/dist/ai/BbDropdown.md +23 -21
  13. package/dist/ai/BbDropdownButton.md +13 -11
  14. package/dist/ai/BbGallery.md +3 -2
  15. package/dist/ai/BbIcon.md +10 -10
  16. package/dist/ai/BbOffCanvas.md +3 -2
  17. package/dist/ai/BbPopover.md +1 -1
  18. package/dist/ai/BbSelect.md +153 -43
  19. package/dist/ai/BbSelectPopover.md +115 -9
  20. package/dist/ai/BbTable.md +1 -1
  21. package/dist/ai/BbTimePicker.md +1 -1
  22. package/dist/ai/BbTimePickerInput.md +1 -1
  23. package/dist/ai/GroupedListBox.md +2 -2
  24. package/dist/ai/ListBox.md +3 -2
  25. package/dist/ai/changelog.json +153 -7
  26. package/dist/ai/components.json +12 -12
  27. package/dist/ai/guides/agent-contract.md +1 -1
  28. package/dist/ai/guides/calendars-and-digits.md +1 -1
  29. package/dist/ai/guides/eslint-rules.md +1 -1
  30. package/dist/ai/guides/icons-policy.md +32 -11
  31. package/dist/ai/guides/installation-and-plugin-setup.md +24 -23
  32. package/dist/ai/guides/migration/adoption-checklist.md +1 -1
  33. package/dist/ai/guides/migration/components/bb-icon.md +4 -4
  34. package/dist/ai/guides/migration/v2-to-v3.md +48 -19
  35. package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
  36. package/dist/ai/guides/passthrough.md +58 -58
  37. package/dist/ai/helpers/inertia/manifest.json +1 -1
  38. package/dist/ai/manifest/components/BbDialog.tree.json +1 -1
  39. package/dist/ai/manifest/components/BbDropdown.json +19 -17
  40. package/dist/ai/manifest/components/BbDropdown.tree.json +9 -9
  41. package/dist/ai/manifest/components/BbDropdownButton.json +12 -10
  42. package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
  43. package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
  44. package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
  45. package/dist/ai/manifest/components/BbSelect.json +44 -40
  46. package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
  47. package/dist/ai/manifest/components/BbSelectPopover.json +10 -6
  48. package/dist/ai/manifest/components/BbSelectPopover.tree.json +4 -1
  49. package/dist/ai/manifest/components/BbTable.tree.json +5 -1
  50. package/dist/ai/manifest/components/GroupedListBox.json +1 -1
  51. package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
  52. package/dist/ai/manifest/components/ListBox.json +1 -1
  53. package/dist/ai/manifest/components/ListBox.tree.json +1 -1
  54. package/dist/ai/manifest/index.json +2 -2
  55. package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
  56. package/dist/ai/recipes/inertia/onboarding.md +1 -1
  57. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
  58. package/dist/ai/recipes/nuxt/onboarding.md +1 -1
  59. package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
  60. package/dist/ai/recipes/vue/onboarding.md +2 -2
  61. package/dist/ai/source/BbAccordion.md +4 -5
  62. package/dist/ai/source/BbAvatar.md +9 -2
  63. package/dist/ai/source/BbBadge.md +6 -2
  64. package/dist/ai/source/BbBreadcrumbs.md +5 -2
  65. package/dist/ai/source/BbCalendar.md +8 -6
  66. package/dist/ai/source/BbCarousel.md +10 -6
  67. package/dist/ai/source/BbColorPalette.md +5 -2
  68. package/dist/ai/source/BbDatePickerInput.md +7 -2
  69. package/dist/ai/source/BbDropdown.md +91 -66
  70. package/dist/ai/source/BbDropdownButton.md +36 -19
  71. package/dist/ai/source/BbDropdownGroup.md +91 -66
  72. package/dist/ai/source/BbGallery.md +6 -5
  73. package/dist/ai/source/BbPagination.md +12 -28
  74. package/dist/ai/source/BbRating.md +4 -4
  75. package/dist/ai/source/BbSelect.md +130 -106
  76. package/dist/ai/source/BbSelectPopover.md +128 -21
  77. package/dist/ai/source/BbTable.md +42 -9
  78. package/dist/ai/source/BbTimePickerInput.md +6 -2
  79. package/dist/ai/source/ClearableButton.md +4 -2
  80. package/dist/ai/source/ErrorIcon.md +4 -3
  81. package/dist/ai/source/FlatListBox.md +7 -2
  82. package/dist/ai/source/GroupedListBox.md +22 -3
  83. package/dist/ai/source/ListBox.md +7 -1
  84. package/dist/ai/source/WarningIcon.md +4 -3
  85. package/dist/assets/svgs/close.svg_raw.js +1 -1
  86. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
  87. package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +35 -34
  88. package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +48 -47
  89. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +60 -59
  90. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +128 -127
  91. package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
  92. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +240 -239
  93. package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +500 -499
  94. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
  95. package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +175 -174
  96. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
  97. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +2 -2
  98. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +263 -262
  99. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +81 -80
  100. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +4 -0
  101. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +318 -312
  102. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +47 -46
  103. package/dist/components/BbDropdown/ptKeys.generated.d.ts +36 -20
  104. package/dist/components/BbDropdown/types.d.ts +51 -53
  105. package/dist/components/BbDropdown/types.js +2 -0
  106. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +1 -1
  107. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +74 -59
  108. package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +111 -63
  109. package/dist/components/BbDropdownButton/types.d.ts +12 -10
  110. package/dist/components/BbDropdownButton/types.js +2 -0
  111. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
  112. package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +204 -203
  113. package/dist/components/BbIcon/iconCache.js +1 -1
  114. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
  115. package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
  116. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +138 -136
  117. package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
  118. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -4
  119. package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
  120. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +100 -99
  121. package/dist/components/BbSelect/BbSelect.vue.d.ts +30 -20
  122. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +201 -184
  123. package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
  124. package/dist/components/BbSelect/types.d.ts +101 -105
  125. package/dist/components/BbSelect/types.js +1 -27
  126. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +6 -3
  127. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +617 -585
  128. package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
  129. package/dist/components/BbSelectPopover/types.d.ts +22 -13
  130. package/dist/components/BbSelectPopover/types.js +3 -1
  131. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
  132. package/dist/components/BbTable/BbTable.vue.d.ts +1 -1
  133. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1092 -1090
  134. package/dist/components/BbTable/BbTableDataRow.js +97 -90
  135. package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
  136. package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +2 -2
  137. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +2 -2
  138. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +225 -224
  139. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +76 -75
  140. package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +9 -8
  141. package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
  142. package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +9 -7
  143. package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +8 -6
  144. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +69 -68
  145. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +166 -165
  146. package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
  147. package/dist/composables/useInternalIcon.js +25 -0
  148. package/dist/icon-scan.d.ts +1 -1
  149. package/dist/llms-full.txt +477 -187
  150. package/dist/llms-medium.txt +25 -24
  151. package/dist/llms.txt +1 -1
  152. package/dist/nuxt.js +1 -1
  153. package/dist/styles.css +2 -2
  154. package/dist/types/Config.d.ts +8 -1
  155. package/dist/types/ConfigDefaults.d.ts +10 -2
  156. package/dist/types/internalIcons.d.ts +89 -0
  157. package/dist/types/internalIcons.js +158 -0
  158. package/dist/types/ptComponentMap.d.ts +4 -4
  159. package/dist/utils/configDefaults.js +75 -64
  160. package/dist/utils/iconsOption.js +48 -0
  161. package/dist/utils/versionCheck.js +1 -1
  162. package/dist/vite-plugin.d.ts +10 -16
  163. package/dist/vite.js +319 -306
  164. package/llms.txt +1 -1
  165. package/package.json +1 -1
  166. package/scripts/lib/adoption-checklist.json +1 -1
  167. package/scripts/lib/update-install.mjs +48 -0
  168. package/scripts/lib/validate-bb-markup.mjs +73 -12
  169. package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
@@ -85,6 +85,7 @@
85
85
  :open="openModel"
86
86
  :prefill="computedPrefill"
87
87
  :pt="popoverPt()"
88
+ :query="queryModel"
88
89
  :query-debounce-time="queryDebounceTime"
89
90
  :readonly="fieldReadonly"
90
91
  :selectable="selectable"
@@ -93,6 +94,7 @@
93
94
  width="100%"
94
95
  v-bind="popoverListeners()"
95
96
  @update:open="setOpenModel"
97
+ @update:query="setQueryModel"
96
98
  >
97
99
  <template
98
100
  #activator="{
@@ -370,6 +372,7 @@ import { useMobile } from '@/composables/useMobile';
370
372
  import { useConfigDefaults } from '@/composables/useConfigDefaults';
371
373
  import { useFormBinding } from '@/composables/useFormBinding';
372
374
  import { useOpenProp } from '@/composables/useOpenModel';
375
+ import { useOwnModel } from '@/composables/useOwnModel';
373
376
  import { useLocale } from '@/composables/useLocale';
374
377
  import {
375
378
  formControlPtActive,
@@ -385,7 +388,7 @@ import { throttle } from '@/utilities/functions/throttle';
385
388
  import { when } from '@/utilities/functions/when';
386
389
  import { hash } from '@/utilities/functions/hash';
387
390
  import { reject } from '@/utilities/functions/reject';
388
- import chevronDownSvg from '@/assets/svgs/chevron_down.svg?raw';
391
+ import chevronDownSvgBuiltin from '@/assets/svgs/chevron_down.svg?raw';
389
392
  import { provideSheetChipAttrs } from '../BbSelectPopover/sheetChipAttrs';
390
393
  import { provideReclickClears } from '../BbSelectPopover/reclickClears';
391
394
  import {
@@ -400,12 +403,13 @@ import {
400
403
  type BbSelectEvents,
401
404
  type BbSelectSlots,
402
405
  } from './types';
403
-
406
+ import { useInternalIcon } from '@/composables/useInternalIcon';
404
407
  defineOptions({
405
408
  // An app's own variants as declared `pt:<part>:<name>` props.
406
409
  mixins: [variantPt(BB_SELECT_PT)],
407
410
  inheritAttrs: false,
408
411
  });
412
+
409
413
  const declaredProps = withDefaults(
410
414
  defineProps<
411
415
  BbSelectProps<T, Known> & /* @vue-ignore */ {
@@ -457,6 +461,9 @@ const declaredEmit =
457
461
  defineEmits<BbSelectEvents<SelectModelOf<OptionValueOf<T, A>, M>>>();
458
462
 
459
463
  defineSlots<BbSelectSlots<T, Known>>();
464
+
465
+ const chevronDownSvg = useInternalIcon('expandChevron', chevronDownSvgBuiltin);
466
+
460
467
  // Inside a BbForm the field joins it: `props` / `emit` are bound.
461
468
  const {
462
469
  props,
@@ -511,6 +518,14 @@ const { model: openModel, set: setOpenModel } = useOpenProp(
511
518
  declaredEmit
512
519
  );
513
520
 
521
+ /** `v-model:query`, handed to the popover bound, as `open` is. */
522
+ const { model: queryModel, set: setQueryModel } = useOwnModel<'query', string>(
523
+ declaredProps,
524
+ 'query',
525
+ declaredEmit,
526
+ () => ''
527
+ );
528
+
514
529
  /**
515
530
  * Passthrough. `panel` and `option` are the popover's: their raw entries are forwarded to it under the same words (`panel` → its `panel`, the painted bubble), so `option:selected` is resolved per option where the selection is known.
516
531
  */
@@ -553,7 +568,14 @@ const popoverPt = () => ({
553
568
  BB_SELECT_POPOVER_PT.states.filter((state) => state !== 'disabled')
554
569
  ),
555
570
  ...passthrough.forward(
556
- ['option', 'itemText', 'itemIcon', 'itemDescription', 'check'],
571
+ [
572
+ 'groupHeader',
573
+ 'option',
574
+ 'itemText',
575
+ 'itemIcon',
576
+ 'itemDescription',
577
+ 'check',
578
+ ],
557
579
  BB_SELECT_POPOVER_PT.states
558
580
  ),
559
581
  });
@@ -594,7 +616,9 @@ const resolvedOffCanvasProps = computed(() => ({
594
616
 
595
617
  /** The chevron unless the consumer sets their own append icon. */
596
618
  const appendIcon = computed(() =>
597
- props['append:icon'] === undefined ? chevronDownSvg : props['append:icon']
619
+ props['append:icon'] === undefined
620
+ ? chevronDownSvg.value
621
+ : props['append:icon']
598
622
  );
599
623
 
600
624
  /** No cap on the chip labels unless `maxSelectedLabels` is set. */
@@ -909,31 +933,28 @@ import type { BbSelectPtKeys } from './ptKeys.generated';
909
933
  *
910
934
  * @describedBy BbSelectPopoverPtPart
911
935
  * @describedBy TextControlPtPart
912
- * @part root - The field's outer container: the label, the box and the lines
913
- * under it; a `class` on the component lands here. (The options surface is
914
- * `panel`.)
915
- * @part clear - The ✕ in the field that empties the selection (`clearable`) —
916
- * one node, never a chip's own ✕.
917
- * @part activator - The button you act on to open the options — the field's
918
- * control (not a text field: `data-test` fits here, `autocomplete` does
919
- * not). The chevron is chrome. It is `activator`, not the family's `input`:
920
- * the field itself is a button (the date / time inputs' trigger is the same
921
- * word).
922
- * @part input - The search field inside the options surface, when it shows
923
- * one (see `disable-writing`) — handed to the `BbSelectPopover` as its own
924
- * `pt:input`. Its ✕ is chrome.
936
+ * @part root - The field's outer container (label, box, the lines under
937
+ * it); a `class` on the component lands here. The options surface is
938
+ * `panel`.
939
+ * @part clear - The field's ✕ that empties the selection (`clearable`): one
940
+ * node, never a chip's ✕.
941
+ * @part activator - The button that opens the options: the field's control,
942
+ * not a text field (`data-test` fits, `autocomplete` does not). The chevron
943
+ * is chrome. `activator`, not the family's `input`: the field is a button,
944
+ * as the date / time inputs' trigger.
945
+ * @part input - The options surface's search field, when shown (see
946
+ * `disable-writing`): the `BbSelectPopover`'s `pt:input`. Its ✕ is chrome.
925
947
  * @part panel - The options surface — the popover's painted bubble on
926
948
  * desktop, the sheet itself on a phone.
927
949
  * @part sheet - The bottom sheet the options open in on a phone only.
928
- * @part header - The band around your `#header` slot: at the top of the
929
- * flyout on desktop, the sheet's header on a phone.
930
- * @part footer - The band around your `#footer` slot: at the bottom of the
931
- * flyout on desktop, the sheet's footer on a phone.
932
- * @part badge - Each selected value's `BbBadge` root with `multiple` — a
933
- * broadcast resolved per value, on the field's chips and on the phone
934
- * sheet's. The badge's own ✕ is chrome, never `clear`. In the field, not
935
- * rendered when the `#chip` slot replaces it, nor in `comma` mode; the
936
- * sheet's chips are always badges.
950
+ * @part header - The band around your `#header` slot: atop the flyout, the
951
+ * sheet's header on a phone.
952
+ * @part footer - The band around your `#footer` slot: under the flyout's
953
+ * list, the sheet's footer on a phone.
954
+ * @part badge - Each selected value's `BbBadge` root with `multiple`, per
955
+ * value, in the field and on the phone sheet. Its ✕ is chrome, never
956
+ * `clear`. The field has none under `#chip` or `comma`; the sheet's chips
957
+ * are always badges.
937
958
  * @part comma - Each selected value with `multiple` and `comma` — a broadcast
938
959
  * resolved per value.
939
960
  */
@@ -956,6 +977,7 @@ export type BbSelectPtPart =
956
977
  | 'header'
957
978
  | 'footer'
958
979
  | 'list'
980
+ | 'groupHeader'
959
981
  | 'option'
960
982
  | 'itemText'
961
983
  | 'itemIcon'
@@ -982,7 +1004,8 @@ export type BbSelectFieldPtPart =
982
1004
  | 'sheet'
983
1005
  | 'header'
984
1006
  | 'footer'
985
- | 'list';
1007
+ | 'list'
1008
+ | 'groupHeader';
986
1009
  /**
987
1010
  * The option parts and the selection parts — broadcasts resolved per option
988
1011
  * or per selected value; their base key also takes a per-item function.
@@ -1002,7 +1025,7 @@ export type BbSelectOptionPtPart =
1002
1025
  * chosen option.
1003
1026
  * @state disabled - Component-wide while the select is `disabled`; also per
1004
1027
  * node, on `option`, its `item-*` parts and `check`: an option that is
1005
- * disabled.
1028
+ * disabled; on `groupHeader`: all its group's options are.
1006
1029
  * @state open - Component-wide: the options surface is showing.
1007
1030
  */
1008
1031
  export type BbSelectPtState = FormControlPtState | 'open' | 'selected';
@@ -1027,6 +1050,7 @@ export type BbSelectKeptPtPart =
1027
1050
  | 'header'
1028
1051
  | 'footer'
1029
1052
  | 'list'
1053
+ | 'groupHeader'
1030
1054
  | 'option'
1031
1055
  | 'itemText'
1032
1056
  | 'itemIcon'
@@ -1091,6 +1115,7 @@ export const BB_SELECT_PT = {
1091
1115
  'header',
1092
1116
  'footer',
1093
1117
  'list',
1118
+ 'groupHeader',
1094
1119
  'option',
1095
1120
  'itemText',
1096
1121
  'itemIcon',
@@ -1211,6 +1236,12 @@ export type BbSelectProps<
1211
1236
  * Bound, the app opens and closes it; unbound, the initial state.
1212
1237
  */
1213
1238
  open?: boolean;
1239
+ /**
1240
+ * The search field's text (`v-model:query`): raw per keystroke, `''`
1241
+ * when the component empties it; a write searches at once (guide §
1242
+ * Reading and restoring the search).
1243
+ */
1244
+ query?: string;
1214
1245
  /**
1215
1246
  * Passthrough, object form: the same keys as the `pt:*` attributes
1216
1247
  * without the prefix. See the `pt:<part>` row.
@@ -1228,10 +1259,8 @@ export type BbSelectProps<
1228
1259
  };
1229
1260
  /* eslint-enable @typescript-eslint/consistent-indexed-object-style */
1230
1261
  /**
1231
- * When `true`, the options panel opens as a bottom off-canvas sheet on mobile
1232
- * viewports instead of a floating popover; on desktop it stays a popover.
1233
- *
1234
- * When unset, falls back to the global `all.adaptive`.
1262
+ * `true`: on mobile viewports the options open in a bottom sheet, not a
1263
+ * popover (desktop keeps the popover). Unset: the global `all.adaptive`.
1235
1264
  * @defaultValue `all.adaptive` (`true`)
1236
1265
  */
1237
1266
  adaptive?: boolean;
@@ -1244,17 +1273,17 @@ export type BbSelectProps<
1244
1273
  description?: string;
1245
1274
 
1246
1275
  /**
1247
- * Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on
1248
- * mobile), spread over its defaults. A `pt` inside it styles only the sheet
1249
- * (passthrough guide § Inside the sheet).
1276
+ * Props for the phone sheet (the `BbOffCanvas` `adaptive` renders), over
1277
+ * its defaults. A `pt` inside styles only the sheet (passthrough guide §
1278
+ * Inside the sheet).
1250
1279
  */
1251
1280
  offCanvasProps?: Partial<BbOffCanvasProps>;
1252
1281
 
1253
1282
  /**
1254
1283
  * Hides the panel's search field: `true` everywhere, `'mobile'` /
1255
- * `'desktop'` on that platform only. `'auto'` hides it, per open, for an
1256
- * array `items` shorter than the plugin's `autoDisableWritingThreshold`
1257
- * (6); never for a provider or with an `option:add` listener.
1284
+ * `'desktop'` on that platform. `'auto'`, per open: for an array `items`
1285
+ * shorter than the plugin's `autoDisableWritingThreshold` (6), never for a
1286
+ * provider or with an `option:add` listener.
1258
1287
  *
1259
1288
  * @defaultValue `'auto'`
1260
1289
  */
@@ -1280,14 +1309,14 @@ export type BbSelectProps<
1280
1309
  autofocus?: InputHTMLAttributes['autofocus'];
1281
1310
 
1282
1311
  /**
1283
- * Displays a clear button when the input has a value and is being interacted with.
1284
- * A single select also clears when the picked option is clicked again.
1312
+ * A clear button while the field has a value and is interacted with; a
1313
+ * single select also clears when its pick is clicked again.
1285
1314
  */
1286
1315
  clearable?: boolean;
1287
1316
 
1288
1317
  /**
1289
- * Sets the display model for selected values to a list of comma separated string.
1290
- * In this mode the user cannot deselect an option by pressing the close button.
1318
+ * Shows the picks as one comma-separated string; no close button to
1319
+ * deselect one there.
1291
1320
  */
1292
1321
  comma?: boolean;
1293
1322
 
@@ -1300,10 +1329,10 @@ export type BbSelectProps<
1300
1329
  compact?: boolean;
1301
1330
 
1302
1331
  /**
1303
- * The field box's look, with `BbButton`'s names and tokens. Colours only,
1304
- * so a form never reflows; `'ghost'` has no border in any state, `'none'`
1305
- * no look at all (you own hover, focus and the states). Register more with
1306
- * the plugin's `components.BbSelect.variants`.
1332
+ * The field box's look: `BbButton`'s names and tokens, colours only (a
1333
+ * form never reflows). `'ghost'` has no border in any state; `'none'` no
1334
+ * look at all (you own hover, focus, states). More via the plugin's
1335
+ * `components.BbSelect.variants`.
1307
1336
  *
1308
1337
  * @defaultValue `'outline'`
1309
1338
  */
@@ -1346,9 +1375,9 @@ export type BbSelectProps<
1346
1375
  disabled?: boolean;
1347
1376
 
1348
1377
  /**
1349
- * After each successful non-search load, removes the picks the fetched rows
1350
- * lack (a single model resets to `null`). A `stash` does not count; a
1351
- * `known-items` value stays until a parent change; a search or a failed load
1378
+ * After each successful non-search load, drops the picks the fetched rows
1379
+ * lack (a single model goes `null`). A `stash` does not count; a
1380
+ * `known-items` value stays until a parent change; a search or failed load
1352
1381
  * never prunes.
1353
1382
  */
1354
1383
  enforceCoherence?: boolean;
@@ -1361,11 +1390,10 @@ export type BbSelectProps<
1361
1390
  errors?: string | string[];
1362
1391
 
1363
1392
  /**
1364
- * What typing filters on: empty = the display text and description; item
1365
- * paths = those fields (`['name', 'email']`); `false` = no filtering.
1366
- * Ranked, case and accents ignored (guide § Search). Use `false` when the
1367
- * provider matched the query on the server, or its email matches show as
1368
- * "No results".
1393
+ * What typing filters on: empty = display text and description; item paths
1394
+ * = those fields (`['name', 'email']`); `false` = none. Ranked, case- and
1395
+ * accent-blind (guide § Search). `false` when the provider matched on the
1396
+ * server, or its email matches show "No results".
1369
1397
  *
1370
1398
  * @defaultValue `[]`
1371
1399
  */
@@ -1415,24 +1443,22 @@ export type BbSelectProps<
1415
1443
  id?: HTMLAttributes['id'];
1416
1444
 
1417
1445
  /**
1418
- * The options: an array, or a provider called with a
1419
- * `BbSelectItemsContext` (`query`, `reason`, `modelValue`, `signal`),
1420
- * sync or async. Branch on `reason !== 'search'` to resolve the selection
1421
- * by id. A provider fails by THROWING, never by returning `[]`.
1446
+ * The options: an array, or a provider (sync or async) called with a
1447
+ * `BbSelectItemsContext` (`query`, `reason`, `modelValue`, `signal`).
1448
+ * Branch on `reason !== 'search'` to resolve the selection by id. It fails
1449
+ * by THROWING, never by returning `[]`.
1422
1450
  */
1423
1451
  items: T[] | ((context: BbSelectItemsContext) => T[] | Promise<T[]>);
1424
1452
 
1425
1453
  /**
1426
- * Height of group headers in the listbox (px). Defaults to 32px (24px
1427
- * compact; 36px / 32px on mobile viewports). Only applies when `groupBy`
1428
- * is set. An explicit value wins on every viewport.
1454
+ * Group header height (px), with `groupBy`: 32 (24 compact; 36 / 32 on
1455
+ * mobile viewports). An explicit value wins on every viewport.
1429
1456
  */
1430
1457
  headerHeight?: number;
1431
1458
 
1432
1459
  /**
1433
- * Height of the options in the listbox (px). Defaults to 28px (24px
1434
- * compact; 44px / 36px on mobile viewports). An explicit value wins on
1435
- * every viewport.
1460
+ * Option height (px): 28 (24 compact; 44 / 36 on mobile viewports). An
1461
+ * explicit value wins on every viewport.
1436
1462
  *
1437
1463
  * @defaultValue `28`
1438
1464
  */
@@ -1449,10 +1475,10 @@ export type BbSelectProps<
1449
1475
  itemText?: ItemAccessor<T, string>;
1450
1476
 
1451
1477
  /**
1452
- * ADDITIONAL row fields, never the text or value: `description` (a muted
1453
- * line under the label), `prepend:icon`, `append:icon`. An object of paths
1454
- * or getters per field, or a function of the item. Nothing is read
1455
- * implicitly; none shows in the trigger or the chips.
1478
+ * EXTRA row fields, never text or value: `description` (a muted line under
1479
+ * the label), `prepend:icon`, `append:icon`. Paths or getters per field, or
1480
+ * a function of the item. Nothing is read implicitly; none shows in the
1481
+ * trigger or chips.
1456
1482
  */
1457
1483
  itemProps?: BbSelectItemProps<T>;
1458
1484
 
@@ -1469,9 +1495,8 @@ export type BbSelectProps<
1469
1495
  /**
1470
1496
  * `{ value, label }` rows naming the value the app already holds, whatever
1471
1497
  * the options' shape: no request until the first open (`prefill: true`
1472
- * still loads). Not options; the options' accessors never run on them;
1473
- * slots get the row as `item`, with `known: true`, until the list brings
1474
- * its own.
1498
+ * still loads). Not options, so no accessor runs on them; slots get the row
1499
+ * as `item`, `known: true`, until the list brings its own.
1475
1500
  */
1476
1501
  knownItems?: [Known] extends [undefined] ? BbSelectKnownItems : Known;
1477
1502
 
@@ -1509,8 +1534,8 @@ export type BbSelectProps<
1509
1534
  max?: number;
1510
1535
 
1511
1536
  /**
1512
- * Maximum number of labels shown before collapsing to a count summary.
1513
- * Unset, the labels collapse only when they overflow the field.
1537
+ * Labels shown before collapsing to a count summary. Unset, they collapse
1538
+ * only when they overflow the field.
1514
1539
  *
1515
1540
  * @defaultValue `Infinity`
1516
1541
  */
@@ -1518,8 +1543,8 @@ export type BbSelectProps<
1518
1543
 
1519
1544
  /**
1520
1545
  * Characters to type (trimmed) before the query searches. Below it the
1521
- * query counts as empty: no `'search'` call, no filtering, and the panel
1522
- * says how many characters to type. Slots still get the typed `query`.
1546
+ * query counts as empty: no `'search'` call, no filtering; the panel says
1547
+ * how many to type. Slots still get the typed `query`.
1523
1548
  *
1524
1549
  * @defaultValue `0`
1525
1550
  */
@@ -1554,8 +1579,8 @@ export type BbSelectProps<
1554
1579
  emptyText?: string;
1555
1580
 
1556
1581
  /**
1557
- * String displayed in the empty state while the latest load FAILED (the
1558
- * provider threw): the twin of `emptyText` for that case.
1582
+ * The empty state's text while the latest load FAILED (the provider
1583
+ * threw): `emptyText`'s twin for that case.
1559
1584
  *
1560
1585
  * @defaultValue the localized `common.failedText` ("Couldn't load items")
1561
1586
  */
@@ -1574,9 +1599,8 @@ export type BbSelectProps<
1574
1599
 
1575
1600
  /**
1576
1601
  * When the options first load: `'interaction'` on first open, `true` on
1577
- * mount, `false` only once the user types (on open with
1578
- * `disable-writing`). An array `items` or a seeded model always loads at
1579
- * once.
1602
+ * mount, `false` once the user types (on open with `disable-writing`). An
1603
+ * array `items` or a seeded model loads at once.
1580
1604
  *
1581
1605
  * @defaultValue `'interaction'`
1582
1606
  */
@@ -1621,15 +1645,14 @@ export type BbSelectProps<
1621
1645
  selectable?: boolean | ((item: T) => boolean);
1622
1646
 
1623
1647
  /**
1624
- * Function that returns a string to be displayed when the number of selected labels
1625
- * is greater than `maxSelectedLabels`.
1648
+ * The text shown when the selected labels outnumber `maxSelectedLabels`.
1626
1649
  */
1627
1650
  selectedLabelsFn?: (count: number) => string;
1628
1651
 
1629
1652
  /**
1630
- * Keeps picks named (their chips keep their text) when a later search or a
1631
- * failed load no longer returns them. It follows the model; it does not
1632
- * keep a pick valid (`enforce-coherence` still prunes it).
1653
+ * Keeps picks named (chips keep their text) when a later search or failed
1654
+ * load stops returning them. It follows the model; it does not keep a pick
1655
+ * valid (`enforce-coherence` still prunes it).
1633
1656
  */
1634
1657
  stash?: boolean;
1635
1658
 
@@ -1653,6 +1676,8 @@ export type BbSelectEvents<V = any> = {
1653
1676
  (e: 'hide'): void;
1654
1677
  /** The panel opened or closed (`v-model:open`). */
1655
1678
  (e: 'update:open', value: boolean): void;
1679
+ /** `v-model:query`: the search field's text. */
1680
+ (e: 'update:query', value: string): void;
1656
1681
  /** Emitted once the options surface has finished closing. */
1657
1682
  (e: 'hidden'): void;
1658
1683
  /** Emitted when the activator loses focus. Forwards the original DOM `FocusEvent`. */
@@ -1672,9 +1697,9 @@ export type BbSelectEvents<V = any> = {
1672
1697
 
1673
1698
  (e: 'update:modelValue', value: V): void;
1674
1699
  /**
1675
- * Emitted with the typed text when the user confirms a value that is not in
1676
- * the list (Enter in the search field). Binding it keeps the search field
1677
- * writable, which makes the select creatable.
1700
+ * The typed text, when the user confirms a value not in the list (Enter in
1701
+ * the search field). Binding it keeps the field writable: the select is
1702
+ * creatable.
1678
1703
  */
1679
1704
  (e: 'option:add', text: string): void;
1680
1705
  };
@@ -1789,13 +1814,13 @@ export type BbSelectSlots<
1789
1814
  Known extends BbSelectKnownItems | undefined = undefined,
1790
1815
  > = {
1791
1816
  /**
1792
- * Content pinned to the top of the options panel, above the search field.
1793
- * Rendered in both the desktop popover and the adaptive sheet.
1817
+ * Pinned atop the options panel, above the search field, on the popover
1818
+ * and the phone sheet alike.
1794
1819
  */
1795
1820
  header?: (props: BbSelectPanelSlotProps) => any;
1796
1821
  /**
1797
- * Content pinned to the bottom of the options panel, below the options list.
1798
- * Rendered in both the desktop popover and the adaptive sheet.
1822
+ * Pinned under the options list, on the popover and the phone sheet
1823
+ * alike.
1799
1824
  */
1800
1825
  footer?: (props: BbSelectPanelSlotProps) => any;
1801
1826
  /**
@@ -1818,8 +1843,8 @@ export type BbSelectSlots<
1818
1843
  */
1819
1844
  label?: (props: BbSelectLabelSlotProps) => any;
1820
1845
  /**
1821
- * Replaces the description text. Provided alone (no `description` prop) it still
1822
- * renders the description region and wires it into `aria-describedby`.
1846
+ * Replaces the description text; alone (no `description` prop) it still
1847
+ * renders the region, wired into `aria-describedby`.
1823
1848
  */
1824
1849
  description?: (props: BbSelectDescriptionSlotProps) => any;
1825
1850
  /**
@@ -1827,10 +1852,9 @@ export type BbSelectSlots<
1827
1852
  */
1828
1853
  loading?: (props: { query: string }) => any;
1829
1854
  /**
1830
- * Content shown when no options match the query or the list is empty.
1831
- * Empty only: a failed load shows the failure row (`failed-text`, then
1832
- * "Try again"). `close()` closes the panel, for an action that does not
1833
- * move focus out of it.
1855
+ * Shown when no option matches the query or the list is empty; a failed
1856
+ * load shows the failure row instead (`failed-text`, "Try again").
1857
+ * `close()` closes the panel, for an action that keeps focus in it.
1834
1858
  */
1835
1859
  empty?: (props: {
1836
1860
  query: string;
@@ -1838,21 +1862,21 @@ export type BbSelectSlots<
1838
1862
  close: () => Promise<void>;
1839
1863
  }) => any;
1840
1864
  /**
1841
- * Each option row's content. With `known-items` bound, a row the list has
1842
- * not brought yet is the known `{ value, label }` row (`known: true`):
1843
- * check `known` before reading an option field off `item`.
1865
+ * Each option row's content. With `known-items`, a row the list has not
1866
+ * brought yet is the known `{ value, label }` row (`known: true`): check
1867
+ * `known` before reading an option field off `item`.
1844
1868
  */
1845
1869
  option?: (props: BbSelectOptionSlotProps<T, Known>) => any;
1846
1870
  /**
1847
- * Replaces the default group header rendered above grouped options.
1848
- * Not called for rows with no group (`group-by` gives `null`/`undefined`,
1849
- * known rows): they are listed without a header.
1871
+ * Each group heading's content (`pt:group-header` styles its box). Not
1872
+ * called for rows with no group (`group-by` gives `null`/`undefined`, known
1873
+ * rows): they are listed without one.
1850
1874
  */
1851
1875
  group?: (props: BbSelectGroupSlotProps<T>) => any;
1852
1876
  /**
1853
1877
  * Each selection's badge with `multiple` (not in `comma` mode, nor the
1854
- * "+N" summary). With `known-items` bound, `item` is the known
1855
- * `{ value, label }` row (`known: true`) until the list brings the real one.
1878
+ * "+N" summary). With `known-items`, `item` is the known `{ value, label }`
1879
+ * row (`known: true`) until the list brings the real one.
1856
1880
  */
1857
1881
  chip?: (props: BbSelectChipSlotProps<T, Known>) => any;
1858
1882
  /**