bitboss-ui 3.0.0-beta.44 → 3.0.0-beta.45

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.
@@ -65,6 +65,10 @@ descendants: a group, a nested array or an item with its own `items` (a
65
65
  submenu) has no single action for the button, so the component throws (a
66
66
  `TypeError`) instead of guessing.
67
67
 
68
+ A computed `items` list that comes down to one entry can stay on this
69
+ component: with nothing after the main action and no default slot, there is no
70
+ menu, so the chevron goes and the control renders exactly like a `BbButton`.
71
+
68
72
  **Save / Save as draft**
69
73
 
70
74
  ```vue
@@ -888,7 +888,7 @@ for a preset that fits any row type (never `<any>`), not an imported
888
888
  | `itemLayout` | `FieldLayout \| undefined` | `'auto'` | | How each row's input and label sit together — the keywords of `layout`: `'auto'`, `'vertical'` (the input above the label), `'horizontal'` (50/50), `'label-fill'` (the label takes the row's free space — pair it with `list-layout="vertical-stretch"` and `item-reverse` for a settings list), `'input-fill'`, or a two-word ratio pattern like `'xx xxxxx'`, read in on-screen order. |
889
889
  | `itemProps` | `BbOptionGroupItemProps<T> \| undefined` | | | ADDITIONAL row fields resolved from each item — never its text or value (those stay on `itemText` / `itemValue`). Option groups accept one field: - `description` — a muted line under the option label, beside the control; it may wrap. Either an object with a path or getter per field (`{ description: 'email' }`) or a function returning the fields (`(item) => ({ description: item.email })`). Without it no field renders — an item's own `description` is never read implicitly — and an empty value renders nothing for that item. The description is announced as the option's description, never part of its name. To disable individual options use `selectable`. |
890
890
  | `itemReverse` | `boolean \| undefined` | `false` | | 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. |
891
- | `items` | `T[] \| ((context: BbCheckboxGroupItemsContext) => T[] \| Promise<T[]>)` | | yes | The options: an array, or a provider function called with ONE context object and returning the rows, sync or async. The context carries: - `reason` — why this call happened: `'initial'` (the first load, on mount), `'dependencies'` (a `dependencies` entry or the `items` function changed; a retry arrives this way) or `'model'` (the model changed from outside and the options cannot resolve it). The group has no search field, so it never passes `query`; - `modelValue` — the `v-model` as-is; - `signal` — an `AbortSignal`, aborted when a newer call starts or the group is disposed; pass it to every request. A provider signals a failure by THROWING, never by returning `[]`: the rows are cleared, nothing is pruned, and `#empty` receives the `error` (`failed-text` is shown). Zero-argument providers keep working. Annotate the parameter `BbRadioGroupItemsContext`. |
891
+ | `items` | `T[] \| ((context: BbRadioGroupItemsContext) => T[] \| Promise<T[]>)` | | yes | The options: an array, or a provider function called with ONE context object and returning the rows, sync or async. The context carries: - `reason` — why this call happened: `'initial'` (the first load, on mount), `'dependencies'` (a `dependencies` entry or the `items` function changed; a retry arrives this way) or `'model'` (the model changed from outside and the options cannot resolve it). The group has no search field, so it never passes `query`; - `modelValue` — the `v-model` as-is; - `signal` — an `AbortSignal`, aborted when a newer call starts or the group is disposed; pass it to every request. A provider signals a failure by THROWING, never by returning `[]`: the rows are cleared, nothing is pruned, and `#empty` receives the `error` (`failed-text` is shown). Zero-argument providers keep working. Annotate the parameter `BbRadioGroupItemsContext`. |
892
892
  | `itemText` | `ItemAccessor<T, string> \| undefined` | `JSON.stringify(item)` | | Defines a path that returns a property of the object to use as text or a function that returns a string. |
893
893
  | `itemValue` | `ItemAccessor<T> \| undefined` | `the whole item` | | Defines a path that returns a property of the object to use as value or a function that returns any value. |
894
894
  | `labelAlign` | `'top'` \| `'center'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted, the label's first line meets the control's. |
@@ -765,7 +765,8 @@ a `Promise<T[]>`. Annotate the parameter `BbSelectItemsContext`:
765
765
  Branch on `reason !== 'search'`, never on one non-search value, so any call
766
766
  the select fires lands on the right side.
767
767
  - `modelValue` — your v-model as-is (an array in multiple mode, the raw value —
768
- possibly `null` — otherwise), typed `any`; narrow it to your own model type.
768
+ possibly `null` — otherwise), typed `any` by default. Pass your model type to
769
+ the context type to check it: `BbSelectItemsContext<string[]>`.
769
770
  - `signal` — an `AbortSignal`, aborted when a newer call starts or the select
770
771
  is disposed. Pass it to every request.
771
772
 
@@ -1792,7 +1792,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
1792
1792
  | `id` | `string \| undefined` | | | Seeds the ids the popover sets: its listbox is `<id>_listbox` (the activator's `aria-controls`) and each option's id derives from it. Generated when omitted. |
1793
1793
  | `itemHeight` | `number \| undefined` | `28` | | Height of the options in the listbox (px). Defaults to 28px (24px compact; 44px / 36px on mobile viewports). An explicit value wins on every viewport. |
1794
1794
  | `itemProps` | `BbSelectItemProps<Item> \| undefined` | | | ADDITIONAL row fields resolved from each item — never its text or value (those stay on `itemText` / `itemValue`). Accepted fields: - `description` — a muted line under the option label. Setting it gives every row a fixed two-line height (the list is virtualized); the description stays on one line and ellipsizes. Announced as the option's description, never part of its name; matched by the search with the text when `filterBy` is empty. - `prepend:icon` — an icon before the label. - `append:icon` — an icon after the label; on the selected row the check takes its place. Either an object with a path or getter per field (`{ description: 'email', 'prepend:icon': 'icon' }`) or a function returning the fields (`(item) => ({ description: item.email })`). Without it no field renders — nothing is read off the item implicitly — and an empty value renders nothing for that item. Never shown in the trigger or the chips. To disable individual options use `selectable`. |
1795
- | `items` | `Item[] \| ((context: BbSelectItemsContext) => Item[] \| Promise<Item[]>)` | `[]` | yes | The options: an array, or a provider function called with ONE context object and returning the rows, sync or async. The context carries: - `query` — what the user typed, `''` until they type; - `reason` — why this call happened: `'search'` (the user typed, and nothing else), `'initial'` (the first load, on mount or on the first open), `'dependencies'` (a `dependencies` entry or the `items` function changed; a retry arrives this way), `'model'` (the model changed from outside and the options cannot resolve it), `'reopen'` (the panel reopened over a searched list). To resolve the selection by id, branch on `reason !== 'search'`; - `modelValue` — the raw v-model: an array in `multiple` mode, the raw model value (possibly `null`) in single mode; - `signal` — an `AbortSignal`, aborted when a newer call starts or the component is disposed; pass it to every request. A provider signals a failure by THROWING, never by returning `[]`: the rows are cleared, nothing is pruned, and `#empty` receives the `error` (`failed-text` is shown). A newer call aborts the one in flight, and the aborted call's rejection or resolution is dropped silently. Zero-argument providers keep working. Annotate the parameter `BbSelectPopoverItemsContext`. |
1795
+ | `items` | `Item[] \| ((context: BbSelectPopoverItemsContext) => Item[] \| Promise<Item[]>)` | `[]` | yes | The options: an array, or a provider function called with ONE context object and returning the rows, sync or async. The context carries: - `query` — what the user typed, `''` until they type; - `reason` — why this call happened: `'search'` (the user typed, and nothing else), `'initial'` (the first load, on mount or on the first open), `'dependencies'` (a `dependencies` entry or the `items` function changed; a retry arrives this way), `'model'` (the model changed from outside and the options cannot resolve it), `'reopen'` (the panel reopened over a searched list). To resolve the selection by id, branch on `reason !== 'search'`; - `modelValue` — the raw v-model: an array in `multiple` mode, the raw model value (possibly `null`) in single mode; - `signal` — an `AbortSignal`, aborted when a newer call starts or the component is disposed; pass it to every request. A provider signals a failure by THROWING, never by returning `[]`: the rows are cleared, nothing is pruned, and `#empty` receives the `error` (`failed-text` is shown). A newer call aborts the one in flight, and the aborted call's rejection or resolution is dropped silently. Zero-argument providers keep working. Annotate the parameter `BbSelectPopoverItemsContext`. |
1796
1796
  | `itemText` | `ItemAccessor<Item, string> \| undefined` | `JSON.stringify(item)` | | Path to item property for display text or function to extract it. |
1797
1797
  | `itemValue` | `ItemAccessor<Item> \| undefined` | `the whole item` | | Path to item property for value or function to extract it. |
1798
1798
  | `loading` | `boolean \| undefined` | `false` | | Display the loading state styles. |
@@ -323,8 +323,8 @@ reach for it when a single phone cut is all the table needs.
323
323
  **When a table does scroll, it says so.** The edge with content hidden past
324
324
  it fades what sits against it (the root carries `bb-table--overflow-left` /
325
325
  `bb-table--overflow-right` while it does), so a reader sees at rest that the
326
- table goes on. With pinned columns on that side the fade starts at their
327
- inner edge, and reads as the pinned column's shadow. Nothing to set up. Keep
326
+ table goes on. With pinned columns on that side the pinned column casts a
327
+ thin shadow over the content scrolled under it instead. Nothing to set up. Keep
328
328
  the sticky/pinned identity column for the case where the full grid really
329
329
  must stay reachable (a spreadsheet-shaped tool), not as the default for a
330
330
  records list.
@@ -3111,13 +3111,25 @@ the one knob and everything pinned follows:
3111
3111
  }
3112
3112
  ```
3113
3113
 
3114
- **The scroll cue is a mask on the root.** While content is hidden past an
3115
- edge the root carries `bb-table--overflow-left` / `bb-table--overflow-right`
3116
- and a `mask-image` fades that edge (to 30% over 20px, never to nothing; it paints no
3117
- element and takes no click). Hook your own treatment on the two classes, or
3118
- turn the fade off with `.my-table.bb-table { mask-image: none; }`. A mask
3119
- clips whatever the root paints outside its own box — give a scrolling table
3120
- a `border`, never an outer `box-shadow`.
3114
+ **The scroll cue.** While content is hidden past an edge the root carries
3115
+ `bb-table--overflow-left` / `bb-table--overflow-right`. On a side with no
3116
+ pinned column a `mask-image` on the root fades that edge (to 30% over 20px,
3117
+ never to nothing; it paints no element and takes no click). Turn it off with
3118
+ `.my-table.bb-table { mask-image: none; }`. A mask clips whatever the root
3119
+ paints outside its own box, so give a scrolling table a `border`, never an
3120
+ outer `box-shadow`. A mask also fades row tints in its band, which is why a
3121
+ side WITH a pinned column (the root carries `bb-table--pinned-left` /
3122
+ `bb-table--pinned-right`) is not masked: its innermost pinned cell casts a
3123
+ strip over the scrolled content instead, so a hovered or highlighted row keeps
3124
+ its tint up to the pinned cell. Size or tint the strip with two knobs on the
3125
+ root (`--cue-w: 0px` turns it off):
3126
+
3127
+ ```css
3128
+ .my-table.bb-table {
3129
+ --cue-w: 12px; /* default 8px */
3130
+ --cue: rgb(0 0 0 / 0.15); /* the strip's dark end; it fades to transparent */
3131
+ }
3132
+ ```
3121
3133
 
3122
3134
  #### The table as a card
3123
3135
 
@@ -3902,6 +3914,10 @@ Set these on the element, or on a class you put on it, to retune this component
3902
3914
  | `--fade-r` | `0px` | |
3903
3915
  | `--fade-a-l` | `1` | |
3904
3916
  | `--fade-a-r` | `1` | |
3917
+ | `--cue-l` | `0px` | |
3918
+ | `--cue-r` | `0px` | |
3919
+ | `--cue-w` | `8px` | |
3920
+ | `--cue` | `rgb(0 0 0 / 0.1)` | |
3905
3921
 
3906
3922
  ## Component tree
3907
3923
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 3,
3
3
  "library": "bitboss-ui",
4
- "version": "3.0.0-beta.44",
4
+ "version": "3.0.0-beta.45",
5
5
  "upgrade": "v2-to-v3",
6
6
  "guide": "ai/guides/migration/v2-to-v3.md",
7
7
  "legend": {
@@ -55,7 +55,8 @@
55
55
  "3.0.0-beta.41",
56
56
  "3.0.0-beta.42",
57
57
  "3.0.0-beta.43",
58
- "3.0.0-beta.44"
58
+ "3.0.0-beta.44",
59
+ "3.0.0-beta.45"
59
60
  ],
60
61
  "unpublished": [
61
62
  "3.0.0-alpha.2",