@bitforgehq/ui 0.3.0
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/CHANGELOG.md +3665 -0
- package/LICENSE +21 -0
- package/README.md +175 -0
- package/ai/MANIFEST.index.json +383 -0
- package/ai/MANIFEST.json +7528 -0
- package/ai/REFERENCE.index.json +1461 -0
- package/ai/REFERENCE.json +7213 -0
- package/ai/UI_GUIDE.md +1159 -0
- package/ai/components/action-bar.md +209 -0
- package/ai/components/action-sheet.md +526 -0
- package/ai/components/alert-dialog.md +509 -0
- package/ai/components/alert.md +376 -0
- package/ai/components/avatar.md +146 -0
- package/ai/components/back-button.md +286 -0
- package/ai/components/badge.md +171 -0
- package/ai/components/button.md +431 -0
- package/ai/components/card.md +303 -0
- package/ai/components/checkbox.md +418 -0
- package/ai/components/chip-group.md +205 -0
- package/ai/components/chip.md +300 -0
- package/ai/components/content.md +474 -0
- package/ai/components/desktop-toast.md +420 -0
- package/ai/components/dialog.md +962 -0
- package/ai/components/empty-state.md +146 -0
- package/ai/components/field.md +319 -0
- package/ai/components/header.md +809 -0
- package/ai/components/icon-button.md +221 -0
- package/ai/components/icon.md +176 -0
- package/ai/components/input.md +455 -0
- package/ai/components/list-item.md +326 -0
- package/ai/components/list.md +178 -0
- package/ai/components/menu-button.md +377 -0
- package/ai/components/menu.md +661 -0
- package/ai/components/modal.md +613 -0
- package/ai/components/number-input.md +423 -0
- package/ai/components/page.md +299 -0
- package/ai/components/progress.md +215 -0
- package/ai/components/radio-group.md +432 -0
- package/ai/components/refresher.md +377 -0
- package/ai/components/segmented.md +517 -0
- package/ai/components/select.md +510 -0
- package/ai/components/sheet.md +845 -0
- package/ai/components/spinner.md +171 -0
- package/ai/components/stack-outlet.md +661 -0
- package/ai/components/tab-bar.md +427 -0
- package/ai/components/tab.md +295 -0
- package/ai/components/tabs.md +408 -0
- package/ai/components/textarea.md +371 -0
- package/ai/components/toast.md +522 -0
- package/ai/components/toggle.md +387 -0
- package/ai/reference/bf-action-directive.md +21 -0
- package/ai/reference/bf-action-sheet-action-role.md +27 -0
- package/ai/reference/bf-action-sheet-action.md +28 -0
- package/ai/reference/bf-action-sheet-options.md +28 -0
- package/ai/reference/bf-action-sheet-service.md +33 -0
- package/ai/reference/bf-alert-dialog-button-role.md +27 -0
- package/ai/reference/bf-alert-dialog-button.md +27 -0
- package/ai/reference/bf-alert-dialog-options.md +29 -0
- package/ai/reference/bf-alert-dialog-service.md +34 -0
- package/ai/reference/bf-alert-variant.md +28 -0
- package/ai/reference/bf-autocapitalize.md +30 -0
- package/ai/reference/bf-avatar-size.md +27 -0
- package/ai/reference/bf-avatar-variant.md +28 -0
- package/ai/reference/bf-back-at-root.md +28 -0
- package/ai/reference/bf-back-button-service.md +40 -0
- package/ai/reference/bf-badge-variant.md +29 -0
- package/ai/reference/bf-button-size.md +29 -0
- package/ai/reference/bf-button-type.md +28 -0
- package/ai/reference/bf-button-variant.md +29 -0
- package/ai/reference/bf-card-padding.md +26 -0
- package/ai/reference/bf-card-variant.md +28 -0
- package/ai/reference/bf-chip-group-mode.md +27 -0
- package/ai/reference/bf-chip-variant.md +26 -0
- package/ai/reference/bf-compare-with.md +24 -0
- package/ai/reference/bf-component-overlay-ref.md +33 -0
- package/ai/reference/bf-confirm-button-role.md +26 -0
- package/ai/reference/bf-confirm-button.md +27 -0
- package/ai/reference/bf-confirm-options.md +31 -0
- package/ai/reference/bf-confirm-size.md +26 -0
- package/ai/reference/bf-content-scroll-event.md +21 -0
- package/ai/reference/bf-defaults-options.md +32 -0
- package/ai/reference/bf-defaults.md +28 -0
- package/ai/reference/bf-desktop-toast-config.md +28 -0
- package/ai/reference/bf-desktop-toast-harness.md +33 -0
- package/ai/reference/bf-desktop-toast-options.md +28 -0
- package/ai/reference/bf-desktop-toast-position.md +28 -0
- package/ai/reference/bf-desktop-toast-service.md +42 -0
- package/ai/reference/bf-dialog-config.md +44 -0
- package/ai/reference/bf-dialog-harness.md +52 -0
- package/ai/reference/bf-dialog-ref.md +44 -0
- package/ai/reference/bf-dialog-role.md +26 -0
- package/ai/reference/bf-dialog-service.md +55 -0
- package/ai/reference/bf-dialog-size.md +31 -0
- package/ai/reference/bf-dialog-template-context.md +32 -0
- package/ai/reference/bf-empty-state-heading-level.md +26 -0
- package/ai/reference/bf-enter-key-hint.md +31 -0
- package/ai/reference/bf-field-control-class.md +32 -0
- package/ai/reference/bf-field-control-state.md +28 -0
- package/ai/reference/bf-field-size.md +29 -0
- package/ai/reference/bf-haptics-impact-style.md +27 -0
- package/ai/reference/bf-haptics-notification-type.md +27 -0
- package/ai/reference/bf-haptics-service.md +41 -0
- package/ai/reference/bf-harness-filters.md +29 -0
- package/ai/reference/bf-horizontal-scroll-directive.md +129 -0
- package/ai/reference/bf-icon-button-variant.md +28 -0
- package/ai/reference/bf-icon-size.md +27 -0
- package/ai/reference/bf-input-autocapitalize.md +36 -0
- package/ai/reference/bf-input-enter-key-hint.md +38 -0
- package/ai/reference/bf-input-input-mode.md +38 -0
- package/ai/reference/bf-input-mode.md +32 -0
- package/ai/reference/bf-input-type.md +35 -0
- package/ai/reference/bf-jsdom-shim-options.md +22 -0
- package/ai/reference/bf-keyboard-assist-behavior.md +26 -0
- package/ai/reference/bf-keyboard-assist-directive.md +185 -0
- package/ai/reference/bf-keyboard-phase.md +30 -0
- package/ai/reference/bf-keyboard-service.md +50 -0
- package/ai/reference/bf-labels-overrides.md +26 -0
- package/ai/reference/bf-labels.md +44 -0
- package/ai/reference/bf-menu-button-harness.md +40 -0
- package/ai/reference/bf-menu-button-variant.md +27 -0
- package/ai/reference/bf-menu-divider-directive.md +13 -0
- package/ai/reference/bf-menu-group-directive.md +14 -0
- package/ai/reference/bf-menu-harness.md +55 -0
- package/ai/reference/bf-menu-item-checkbox-directive.md +31 -0
- package/ai/reference/bf-menu-item-directive.md +31 -0
- package/ai/reference/bf-menu-item-harness.md +52 -0
- package/ai/reference/bf-menu-item-radio-directive.md +29 -0
- package/ai/reference/bf-menu-placement.md +29 -0
- package/ai/reference/bf-menu-trigger-directive.md +46 -0
- package/ai/reference/bf-modal-options.md +30 -0
- package/ai/reference/bf-modal-presentation.md +26 -0
- package/ai/reference/bf-modal-service.md +38 -0
- package/ai/reference/bf-nav-controller.md +59 -0
- package/ai/reference/bf-nav-direction.md +23 -0
- package/ai/reference/bf-nav-target.md +21 -0
- package/ai/reference/bf-number-input-mode.md +28 -0
- package/ai/reference/bf-number-input-step.md +25 -0
- package/ai/reference/bf-overlay-auto-focus.md +29 -0
- package/ai/reference/bf-overlay-controller.md +22 -0
- package/ai/reference/bf-overlay-host.md +36 -0
- package/ai/reference/bf-overlay-options.md +53 -0
- package/ai/reference/bf-overlay-position.md +30 -0
- package/ai/reference/bf-overlay-ref.md +53 -0
- package/ai/reference/bf-overlay-role.md +27 -0
- package/ai/reference/bf-overlay-service.md +53 -0
- package/ai/reference/bf-overlay-stack-options.md +24 -0
- package/ai/reference/bf-overlay-stack.md +81 -0
- package/ai/reference/bf-overlay-template-context.md +24 -0
- package/ai/reference/bf-overscroll-stretch-directive.md +163 -0
- package/ai/reference/bf-page-context.md +24 -0
- package/ai/reference/bf-platform-service.md +53 -0
- package/ai/reference/bf-platform.md +28 -0
- package/ai/reference/bf-progress-size.md +26 -0
- package/ai/reference/bf-progress-tone.md +28 -0
- package/ai/reference/bf-radio-group-harness.md +49 -0
- package/ai/reference/bf-radio-group-orientation.md +26 -0
- package/ai/reference/bf-radio-option.md +30 -0
- package/ai/reference/bf-refresher-refresh-event.md +22 -0
- package/ai/reference/bf-segment-option.md +29 -0
- package/ai/reference/bf-segmented-harness.md +48 -0
- package/ai/reference/bf-segmented-size.md +29 -0
- package/ai/reference/bf-select-harness.md +70 -0
- package/ai/reference/bf-select-option.md +29 -0
- package/ai/reference/bf-sheet-auto-focus.md +29 -0
- package/ai/reference/bf-sheet-options.md +32 -0
- package/ai/reference/bf-sheet-ref.md +45 -0
- package/ai/reference/bf-sheet-service.md +34 -0
- package/ai/reference/bf-shell-config-mode.md +28 -0
- package/ai/reference/bf-shell-config.md +38 -0
- package/ai/reference/bf-shell-dynamic-type-limit.md +21 -0
- package/ai/reference/bf-shell-dynamic-type.md +25 -0
- package/ai/reference/bf-shell-mode.md +28 -0
- package/ai/reference/bf-shell-testing-options.md +26 -0
- package/ai/reference/bf-size.md +45 -0
- package/ai/reference/bf-spinner-size.md +27 -0
- package/ai/reference/bf-stack-change.md +22 -0
- package/ai/reference/bf-stack-reuse-strategy.md +32 -0
- package/ai/reference/bf-stack-transition-event.md +26 -0
- package/ai/reference/bf-stack-transition.md +26 -0
- package/ai/reference/bf-stacked-overlay.md +23 -0
- package/ai/reference/bf-system-bars-style.md +38 -0
- package/ai/reference/bf-tab-bar-controller.md +51 -0
- package/ai/reference/bf-tab-bar-host.md +52 -0
- package/ai/reference/bf-tab-context.md +32 -0
- package/ai/reference/bf-tab-links.md +37 -0
- package/ai/reference/bf-testing-options.md +27 -0
- package/ai/reference/bf-text-scale-service.md +35 -0
- package/ai/reference/bf-theme.md +27 -0
- package/ai/reference/bf-toast-action.md +25 -0
- package/ai/reference/bf-toast-controller.md +17 -0
- package/ai/reference/bf-toast-dismiss-reason.md +29 -0
- package/ai/reference/bf-toast-options.md +29 -0
- package/ai/reference/bf-toast-position.md +26 -0
- package/ai/reference/bf-toast-ref.md +41 -0
- package/ai/reference/bf-toast-service.md +39 -0
- package/ai/reference/bf-toggle-label-position.md +26 -0
- package/ai/reference/bf-transition-kind.md +28 -0
- package/ai/reference/bf-validation-message.md +31 -0
- package/ai/reference/bf-validation-messages.md +33 -0
- package/ai/reference/bf-view-event.md +28 -0
- package/ai/reference/bf-view-lifecycle.md +41 -0
- package/ai/reference/bf-view-state.md +28 -0
- package/ai/reference/bf_default_labels.md +21 -0
- package/ai/reference/bf_default_values.md +21 -0
- package/ai/reference/bf_defaults.md +21 -0
- package/ai/reference/bf_desktop_toast_defaults.md +21 -0
- package/ai/reference/bf_dialog_data.md +17 -0
- package/ai/reference/bf_labels.md +21 -0
- package/ai/reference/bf_overlay_data.md +19 -0
- package/ai/reference/bf_overlay_host.md +21 -0
- package/ai/reference/bf_sheet_default_snap_points.md +17 -0
- package/ai/reference/bf_shell_config.md +21 -0
- package/ai/reference/bf_shell_defaults.md +21 -0
- package/ai/reference/bf_tab_bar.md +21 -0
- package/ai/reference/bf_tab_bar_controller.md +21 -0
- package/ai/reference/bf_tab_context.md +21 -0
- package/ai/reference/bf_tab_links.md +21 -0
- package/ai/reference/bf_theme_storage.md +19 -0
- package/ai/reference/create-transition.md +36 -0
- package/ai/reference/duration_fast.md +17 -0
- package/ai/reference/duration_md.md +17 -0
- package/ai/reference/duration_overlay.md +17 -0
- package/ai/reference/duration_push.md +17 -0
- package/ai/reference/fade-down.md +26 -0
- package/ai/reference/fade-in.md +25 -0
- package/ai/reference/fade-out.md +25 -0
- package/ai/reference/fade-up.md +26 -0
- package/ai/reference/inject-shell-mode.md +23 -0
- package/ai/reference/install-bf-jsdom-shims.md +31 -0
- package/ai/reference/ios_duration.md +17 -0
- package/ai/reference/ios_easing.md +17 -0
- package/ai/reference/is-text-entry.md +25 -0
- package/ai/reference/max_complete_ms.md +17 -0
- package/ai/reference/md-transition.md +31 -0
- package/ai/reference/md_duration.md +17 -0
- package/ai/reference/md_easing.md +17 -0
- package/ai/reference/overlay_duration.md +21 -0
- package/ai/reference/overlay_easing.md +19 -0
- package/ai/reference/overlay_reduced_duration.md +17 -0
- package/ai/reference/pop-frames-at.md +25 -0
- package/ai/reference/prefers-reduced-motion.md +25 -0
- package/ai/reference/provide-bf-defaults.md +33 -0
- package/ai/reference/provide-bf-desktop-toast.md +28 -0
- package/ai/reference/provide-bf-labels.md +38 -0
- package/ai/reference/provide-bf-shell-testing.md +34 -0
- package/ai/reference/provide-bf-shell.md +41 -0
- package/ai/reference/provide-bf-testing.md +33 -0
- package/ai/reference/reduced-transition.md +28 -0
- package/ai/reference/reduced_duration.md +17 -0
- package/ai/reference/resolve-shell-mode.md +33 -0
- package/ai/reference/scale-in.md +25 -0
- package/ai/reference/settle-duration.md +25 -0
- package/ai/reference/settle-pop.md +33 -0
- package/ai/reference/settle_easing.md +17 -0
- package/ai/reference/should-complete-pop.md +26 -0
- package/ai/reference/slide-down.md +26 -0
- package/ai/reference/slide-up.md +26 -0
- package/ai/reference/with-bf-shell-routing.md +19 -0
- package/bin/bf-ui.js +81 -0
- package/fesm2022/bitforgehq-ui-icons.mjs +230 -0
- package/fesm2022/bitforgehq-ui-icons.mjs.map +1 -0
- package/fesm2022/bitforgehq-ui-mobile.mjs +5530 -0
- package/fesm2022/bitforgehq-ui-mobile.mjs.map +1 -0
- package/fesm2022/bitforgehq-ui-number-input.mjs +680 -0
- package/fesm2022/bitforgehq-ui-number-input.mjs.map +1 -0
- package/fesm2022/bitforgehq-ui-overlay.mjs +2675 -0
- package/fesm2022/bitforgehq-ui-overlay.mjs.map +1 -0
- package/fesm2022/bitforgehq-ui-testing.mjs +402 -0
- package/fesm2022/bitforgehq-ui-testing.mjs.map +1 -0
- package/fesm2022/bitforgehq-ui.mjs +7765 -0
- package/fesm2022/bitforgehq-ui.mjs.map +1 -0
- package/llms-full.txt +25394 -0
- package/llms.txt +329 -0
- package/package.json +94 -0
- package/theme.css +253 -0
- package/types/bitforgehq-ui-icons.d.ts +50 -0
- package/types/bitforgehq-ui-mobile.d.ts +2914 -0
- package/types/bitforgehq-ui-number-input.d.ts +282 -0
- package/types/bitforgehq-ui-overlay.d.ts +1514 -0
- package/types/bitforgehq-ui-testing.d.ts +495 -0
- package/types/bitforgehq-ui.d.ts +3499 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
# bf-list-item
|
|
2
|
+
|
|
3
|
+
List row with leading slot, title, subtitle, trailing slot and an optional chevron
|
|
4
|
+
|
|
5
|
+
`BfListItemComponent` from `@bitforgehq/ui` · Data display · since 0.1.0
|
|
6
|
+
|
|
7
|
+
## Example
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { Component, computed, signal } from '@angular/core';
|
|
11
|
+
import { RouterLink } from '@angular/router';
|
|
12
|
+
import {
|
|
13
|
+
BfActionDirective,
|
|
14
|
+
BfAvatarComponent,
|
|
15
|
+
BfButtonComponent,
|
|
16
|
+
BfListComponent,
|
|
17
|
+
BfListItemComponent,
|
|
18
|
+
BfToggleComponent,
|
|
19
|
+
} from '@bitforgehq/ui';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The bf-list-item overview.
|
|
23
|
+
*
|
|
24
|
+
* Live demo of `bf-list-item`: the same three rows as the list demo, without the inset container,
|
|
25
|
+
* a navigation row whose title is a stretched `bfAction` link (to this page's "Navigation rows"
|
|
26
|
+
* section) with a raised trailing button, plus a standalone row outside any list.
|
|
27
|
+
*/
|
|
28
|
+
@Component({
|
|
29
|
+
selector: 'app-example-list-item-overview',
|
|
30
|
+
imports: [
|
|
31
|
+
RouterLink,
|
|
32
|
+
BfActionDirective,
|
|
33
|
+
BfListComponent,
|
|
34
|
+
BfListItemComponent,
|
|
35
|
+
BfAvatarComponent,
|
|
36
|
+
BfButtonComponent,
|
|
37
|
+
BfToggleComponent,
|
|
38
|
+
],
|
|
39
|
+
template: `
|
|
40
|
+
<bf-list [inset]="false">
|
|
41
|
+
<bf-list-item title="Jonas Keller" subtitle="Shared the Bloom moodboard">
|
|
42
|
+
<bf-avatar bfSlot="leading" initials="JK" />
|
|
43
|
+
<span bfSlot="trailing" class="text-caption text-text-muted">9:12</span>
|
|
44
|
+
</bf-list-item>
|
|
45
|
+
<bf-list-item title="Weekly summary" subtitle="Every Monday at 8:00">
|
|
46
|
+
<bf-toggle bfSlot="trailing" ariaLabel="Weekly summary" [(checked)]="weeklySummary" />
|
|
47
|
+
</bf-list-item>
|
|
48
|
+
<bf-list-item
|
|
49
|
+
title="Account"
|
|
50
|
+
subtitle="lena@studio.ch"
|
|
51
|
+
[interactive]="true"
|
|
52
|
+
[chevron]="true"
|
|
53
|
+
(clicked)="openAccount()"
|
|
54
|
+
/>
|
|
55
|
+
<!-- A navigation row: the title is a link whose ::after covers the row. -->
|
|
56
|
+
<bf-list-item subtitle="Plan, invoices and payment" chevron>
|
|
57
|
+
<a bfSlot="title" bfAction routerLink="/components/list-item" fragment="navigation-rows">
|
|
58
|
+
Billing
|
|
59
|
+
</a>
|
|
60
|
+
<bf-button bfSlot="trailing" variant="text" size="sm" (clicked)="downloadInvoice()">
|
|
61
|
+
Invoice
|
|
62
|
+
</bf-button>
|
|
63
|
+
</bf-list-item>
|
|
64
|
+
</bf-list>
|
|
65
|
+
<!-- A row on its own, outside bf-list: it claims no listitem role. -->
|
|
66
|
+
<bf-list-item class="mt-3" title="Storage" subtitle="2.1 GB of 5 GB used" />
|
|
67
|
+
<p data-status aria-live="polite" class="text-caption text-text-muted mt-3">{{ status() }}</p>
|
|
68
|
+
`,
|
|
69
|
+
})
|
|
70
|
+
export class ListItemOverviewExampleComponent {
|
|
71
|
+
readonly weeklySummary = signal(true);
|
|
72
|
+
|
|
73
|
+
readonly opened = signal(0);
|
|
74
|
+
readonly downloads = signal(0);
|
|
75
|
+
readonly status = computed(() => {
|
|
76
|
+
const parts = [`Weekly summary ${this.weeklySummary() ? 'on' : 'off'}`];
|
|
77
|
+
if (this.opened() > 0) {
|
|
78
|
+
parts.push(`Account opened ${this.opened()}×`);
|
|
79
|
+
}
|
|
80
|
+
if (this.downloads() > 0) {
|
|
81
|
+
parts.push(`Invoice downloaded ${this.downloads()}×`);
|
|
82
|
+
}
|
|
83
|
+
return `${parts.join(' · ')}.`;
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
/** Counts the opens; a real app would navigate to the account screen. */
|
|
87
|
+
openAccount(): void {
|
|
88
|
+
this.opened.update((count) => count + 1);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Counts the downloads of the trailing button, which sits above the row's stretched link. */
|
|
92
|
+
downloadInvoice(): void {
|
|
93
|
+
this.downloads.update((count) => count + 1);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Overview
|
|
99
|
+
|
|
100
|
+
One row of a list: leading slot (avatar, icon tile), title and subtitle, trailing slot
|
|
101
|
+
(time, toggle, badge) and an optional chevron for rows that navigate. A navigation row puts a
|
|
102
|
+
`bfAction` link in the `title` slot, so the row stays a list item and the link covers it.
|
|
103
|
+
|
|
104
|
+
A row of a list: a leading slot (an avatar, an icon), the title and subtitle, a trailing slot (a time, a toggle, a chip) and an optional chevron. Place rows in a [`bf-list`](https://bitforge-ui.web.app/components/list), which gives them the list semantics and the inset container; a row can also stand alone. A row is static text, a navigation link or an action button, never more than one of them.
|
|
105
|
+
|
|
106
|
+
## When to use
|
|
107
|
+
|
|
108
|
+
Use `bf-list-item` for one row of a list: static text, a navigation link (`bfAction` in the title) or an action (`interactive`). Use [bf-card](https://bitforge-ui.web.app/components/card) instead for a block with its own heading and several parts, and [bf-menu](https://bitforge-ui.web.app/components/menu) for a short list of actions that opens from a button.
|
|
109
|
+
|
|
110
|
+
## Basic usage
|
|
111
|
+
|
|
112
|
+
`title` and `subtitle` are inputs; `bfSlot="leading"` and `bfSlot="trailing"` project the content beside them.
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
import { Component } from '@angular/core';
|
|
116
|
+
import { BfAvatarComponent, BfListComponent, BfListItemComponent } from '@bitforgehq/ui';
|
|
117
|
+
|
|
118
|
+
/** A row with a leading avatar, a title, a subtitle and a trailing time. */
|
|
119
|
+
@Component({
|
|
120
|
+
selector: 'app-example-list-item-basic',
|
|
121
|
+
imports: [BfAvatarComponent, BfListComponent, BfListItemComponent],
|
|
122
|
+
template: `
|
|
123
|
+
<bf-list>
|
|
124
|
+
<bf-list-item title="Jonas Keller" subtitle="Shared the Bloom moodboard">
|
|
125
|
+
<bf-avatar bfSlot="leading" initials="JK" />
|
|
126
|
+
<span bfSlot="trailing" class="text-caption text-text-muted">9:12</span>
|
|
127
|
+
</bf-list-item>
|
|
128
|
+
</bf-list>
|
|
129
|
+
`,
|
|
130
|
+
})
|
|
131
|
+
export class ListItemBasicExampleComponent {}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Long text
|
|
135
|
+
|
|
136
|
+
A long title, title-slot content or subtitle wraps onto more lines (a long word or URL breaks anywhere), so nothing is lost at large text sizes (iOS Dynamic Type, Android font scale 2.0). Add `truncate` for a row that must stay on one line per text, such as a mail list's sender and preview: each is then cut with an ellipsis.
|
|
137
|
+
|
|
138
|
+
```ts
|
|
139
|
+
import { Component } from '@angular/core';
|
|
140
|
+
import { BfAvatarComponent, BfListComponent, BfListItemComponent } from '@bitforgehq/ui';
|
|
141
|
+
|
|
142
|
+
/** A long title wraps by default; truncate keeps a mail-style row on one line. */
|
|
143
|
+
@Component({
|
|
144
|
+
selector: 'app-example-list-item-long-text',
|
|
145
|
+
imports: [BfAvatarComponent, BfListComponent, BfListItemComponent],
|
|
146
|
+
template: `
|
|
147
|
+
<bf-list>
|
|
148
|
+
<bf-list-item
|
|
149
|
+
title="Prepare the quarterly review with the whole studio team"
|
|
150
|
+
subtitle="Atlas · due Friday"
|
|
151
|
+
/>
|
|
152
|
+
<bf-list-item
|
|
153
|
+
title="Jonas Keller"
|
|
154
|
+
subtitle="I added the new moodboard and the notes from the call on Tuesday"
|
|
155
|
+
truncate
|
|
156
|
+
>
|
|
157
|
+
<bf-avatar bfSlot="leading" initials="JK" />
|
|
158
|
+
</bf-list-item>
|
|
159
|
+
</bf-list>
|
|
160
|
+
`,
|
|
161
|
+
})
|
|
162
|
+
export class ListItemLongTextExampleComponent {}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Navigation rows
|
|
166
|
+
|
|
167
|
+
A row that opens another page is a link. Put an `<a bfAction>` with `href` or `routerLink` in the `title` slot (`bfSlot="title"`, rendered in the title position and type); `bfAction` stretches the link's hit area over the whole row, and the row shows the `surface-muted` hover and the focus ring while the link has keyboard focus. The row itself stays a list item, the link's name is the title alone, and the subtitle, the leading slot and the trailing slot click through to it. Add `chevron` to mark the row as navigation. Import `BfActionDirective` from `@bitforgehq/ui`.
|
|
168
|
+
|
|
169
|
+
```ts
|
|
170
|
+
import { Component } from '@angular/core';
|
|
171
|
+
import { RouterLink } from '@angular/router';
|
|
172
|
+
import {
|
|
173
|
+
BfActionDirective,
|
|
174
|
+
BfAvatarComponent,
|
|
175
|
+
BfListComponent,
|
|
176
|
+
BfListItemComponent,
|
|
177
|
+
} from '@bitforgehq/ui';
|
|
178
|
+
|
|
179
|
+
/** A navigation row: a stretched `<a bfAction>` in the title slot, marked with a chevron. */
|
|
180
|
+
@Component({
|
|
181
|
+
selector: 'app-example-list-item-navigation',
|
|
182
|
+
imports: [RouterLink, BfActionDirective, BfAvatarComponent, BfListComponent, BfListItemComponent],
|
|
183
|
+
template: `
|
|
184
|
+
<bf-list>
|
|
185
|
+
<bf-list-item subtitle="lena@studio.ch" chevron>
|
|
186
|
+
<bf-avatar bfSlot="leading" initials="LM" />
|
|
187
|
+
<a bfSlot="title" bfAction routerLink="/components/list-item">Account</a>
|
|
188
|
+
</bf-list-item>
|
|
189
|
+
</bf-list>
|
|
190
|
+
`,
|
|
191
|
+
})
|
|
192
|
+
export class ListItemNavigationExampleComponent {}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
The trailing slot sits above the stretched link (`relative z-1`), so a toggle, chip or button there stays independently clickable. The subtitle and other text under the stretched link cannot be selected or copied; give text that must stay copyable `class="relative z-1"` (it then no longer clicks through). A row lights up only for its own action, and a card around the list is not lit by the rows.
|
|
196
|
+
|
|
197
|
+
## Action and settings rows
|
|
198
|
+
|
|
199
|
+
A row that performs an action on the page (opens a sheet, starts a sync) is a button: `[interactive]="true"` renders the whole row as a native `<button>` that emits `clicked`, and `disabled` disables it. A trailing `bf-toggle` makes a settings row. Text starts at the inline start and the chevron sits at, and points to, the inline end, so both mirror under `dir="rtl"`.
|
|
200
|
+
|
|
201
|
+
```ts
|
|
202
|
+
import { Component, signal } from '@angular/core';
|
|
203
|
+
import { BfListComponent, BfListItemComponent, BfToggleComponent } from '@bitforgehq/ui';
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* An action row and a settings row.
|
|
207
|
+
*
|
|
208
|
+
* "Sync now" is an `interactive` row (a native button); "Weekly summary" holds a trailing toggle.
|
|
209
|
+
*/
|
|
210
|
+
@Component({
|
|
211
|
+
selector: 'app-example-list-item-actions',
|
|
212
|
+
imports: [BfListComponent, BfListItemComponent, BfToggleComponent],
|
|
213
|
+
template: `
|
|
214
|
+
<bf-list>
|
|
215
|
+
<bf-list-item
|
|
216
|
+
title="Sync now"
|
|
217
|
+
[subtitle]="synced() ? 'Synced just now' : 'Last synced 5 min ago'"
|
|
218
|
+
[interactive]="true"
|
|
219
|
+
(clicked)="synced.set(true)"
|
|
220
|
+
/>
|
|
221
|
+
<bf-list-item title="Weekly summary" subtitle="Every Monday at 8:00">
|
|
222
|
+
<bf-toggle bfSlot="trailing" ariaLabel="Weekly summary" [(checked)]="weekly" />
|
|
223
|
+
</bf-list-item>
|
|
224
|
+
</bf-list>
|
|
225
|
+
`,
|
|
226
|
+
})
|
|
227
|
+
export class ListItemActionsExampleComponent {
|
|
228
|
+
protected readonly synced = signal(false);
|
|
229
|
+
protected readonly weekly = signal(true);
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## Desktop
|
|
234
|
+
|
|
235
|
+
An `interactive` row and a row holding a `bfAction` link take a `surface-muted` fill and the pointer cursor while hovered; a static row has none. Hover styles apply only on devices that can hover, so a tap never leaves one stuck. The ring is drawn around the row on keyboard focus only. A navigation row keeps the browser's link behaviour: Ctrl/Cmd-click and a middle click open it in a new tab. The trailing slot sits above the stretched link, so a toggle or button there takes its own click. Rows have one height; they do not follow `provideBfDefaults()`.
|
|
236
|
+
|
|
237
|
+
## Theming
|
|
238
|
+
|
|
239
|
+
- Row: `surface` / `text`; the subtitle `text-muted`.
|
|
240
|
+
- Text: the title, the title slot and the subtitle wrap (`wrap-anywhere`); with `truncate` each keeps one line (`truncate`).
|
|
241
|
+
- `interactive` rows and rows holding a `bfAction` link add a pointer, a `surface-muted` hover, a `surface-pressed` fill while pressed (the row's action, for a `bfAction` row) and a `ring` focus ring; `interactive` rows dim to `text-disabled` when `disabled` and have no pressed state then.
|
|
242
|
+
- The `chevron` mark uses `text-subtle`.
|
|
243
|
+
|
|
244
|
+
## Accessibility
|
|
245
|
+
|
|
246
|
+
`bf-list-item` sets `role="listitem"` on its host only inside a `bf-list`; a standalone row has no role, so it never claims a list parent that is not there. A non-interactive row is a plain `<div>`, while `[interactive]="true"` renders it as a native `<button>` so it gets keyboard activation and the button role for free. A navigation row's `bfAction` link in the `title` slot is a real `<a>` inside the list item ([WAI-ARIA APG link pattern](https://www.w3.org/WAI/ARIA/apg/patterns/link/)): exposed as `link` with the title as its name, reached with Tab (in Safari and iOS WKWebView, Tab reaches links only when the user turns on "Press Tab to highlight each item" (Option+Tab otherwise); VoiceOver and Full Keyboard Access are unaffected), followed with Enter (not Space), opened in a new tab with Ctrl/Cmd-click; under forced colours a system-coloured outline around the whole row marks the focused link. Making the host itself a link would take the row out of the list's `listitem` structure, so the link lives inside it. `chevron` is a purely visual CSS mark (an `::after` pseudo-element), so it adds nothing to the accessibility tree.
|
|
247
|
+
|
|
248
|
+
### Keyboard
|
|
249
|
+
|
|
250
|
+
| Key | Action |
|
|
251
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------ |
|
|
252
|
+
| <kbd>Tab</kbd> | Moves to an `interactive` row, or to a navigation row's `bfAction` link, then to its trailing controls |
|
|
253
|
+
| <kbd>Enter</kbd> | Follows a navigation row's link, or activates an `interactive` row (emits `clicked`) |
|
|
254
|
+
| <kbd>Space</kbd> | Activates an `interactive` row; a link ignores it |
|
|
255
|
+
|
|
256
|
+
## Inputs
|
|
257
|
+
|
|
258
|
+
| Name | Type | Default | Description |
|
|
259
|
+
| ------------- | --------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
260
|
+
| `title` | `string` | `''` | Primary text. For a navigation row, project an `<a bfSlot="title" bfAction>` instead. |
|
|
261
|
+
| `subtitle` | `string` | `''` | Secondary text under the title. |
|
|
262
|
+
| `interactive` | `boolean` | `false` | Render the row as a button that emits `clicked` (an action row; a row that navigates puts a `bfAction` link in the `title` slot instead). |
|
|
263
|
+
| `chevron` | `boolean` | `false` | Show a trailing chevron (navigation rows). |
|
|
264
|
+
| `disabled` | `boolean` | `false` | Disable an interactive row. |
|
|
265
|
+
| `truncate` | `boolean` | `false` | Keep the title, the title slot and the subtitle on one line each, cut with an ellipsis. By default they wrap, so nothing is lost at large text sizes. |
|
|
266
|
+
|
|
267
|
+
## Outputs
|
|
268
|
+
|
|
269
|
+
| Name | Payload | Description |
|
|
270
|
+
| --------- | ------- | --------------------------------------------- |
|
|
271
|
+
| `clicked` | `Event` | Emitted when an interactive row is activated. |
|
|
272
|
+
|
|
273
|
+
## Slots
|
|
274
|
+
|
|
275
|
+
- `leading`: Content before the text, such as an avatar or an icon.
|
|
276
|
+
- `title`: Rich title content, instead of or next to the `title` text.
|
|
277
|
+
- `default`: More content under the title and subtitle.
|
|
278
|
+
- `trailing`: Content at the end, such as a toggle, a badge or a button.
|
|
279
|
+
|
|
280
|
+
## Notes
|
|
281
|
+
|
|
282
|
+
### Do
|
|
283
|
+
|
|
284
|
+
- Keep titles short; a long one wraps. Add `truncate` only where one line per row is the pattern (a mail list).
|
|
285
|
+
- Make a row that navigates a `bfAction` link in the `title` slot, and a row that acts on the page `interactive`; put secondary actions in the trailing slot.
|
|
286
|
+
|
|
287
|
+
### Don't
|
|
288
|
+
|
|
289
|
+
- Don't nest interactive controls inside an `interactive` row (it is one button); use a navigation row with a trailing control instead.
|
|
290
|
+
- Don't wrap a `bf-list-item` in an `<a>`, and don't navigate from an `interactive` row's `(clicked)`.
|
|
291
|
+
|
|
292
|
+
## Migration notes
|
|
293
|
+
|
|
294
|
+
### 0.3.0
|
|
295
|
+
|
|
296
|
+
**Behaviour:** logical properties: text aligns to the inline start and the chevron sits at the
|
|
297
|
+
inline end, pointing there (mirrored under `dir="rtl"`).
|
|
298
|
+
|
|
299
|
+
New navigation rows: a `title` content slot (`bfSlot="title"`), rendered in the title position
|
|
300
|
+
and type, takes an `<a bfAction routerLink="…">` (the new `BfActionDirective`), whose `::after`
|
|
301
|
+
stretches over the row. The row stays a `listitem`, the link's name is the title, and the row
|
|
302
|
+
shows the pointer, the `surface-muted` hover and the focus ring (on keyboard focus) while it holds
|
|
303
|
+
its own `bfAction`; the row box is `relative`. Text under the stretched link is not selectable.
|
|
304
|
+
|
|
305
|
+
**Behaviour:** the trailing slot is wrapped in a `relative z-1` flex box (`gap-3`, as between the
|
|
306
|
+
row's items, hidden when empty), so a toggle or button there stays clickable above a stretched
|
|
307
|
+
link. `interactive` stays for rows that act on the page.
|
|
308
|
+
|
|
309
|
+
**Docs:** `bf-list-item` has a page of its own (`list/list-item.docs.md`): the row's slots, the
|
|
310
|
+
navigation rows and the action and settings rows (moved from the `bf-list` page), with the row's own
|
|
311
|
+
theming and accessibility. The `bf-list` page keeps the container: a list of rows and the plain
|
|
312
|
+
list, and links to the row page.
|
|
313
|
+
|
|
314
|
+
JSDoc of `list-item.component.ts` for the API reference: `@slot` docs for `leading`, `title`,
|
|
315
|
+
`default`, `trailing`. No behaviour change.
|
|
316
|
+
|
|
317
|
+
**Behaviour:** a pressed state (F-045): an `interactive` row takes `surface-pressed` while held down, and a row holding a `bfAction` while its action is (`has-[[data-bf-action]:active]`). None while disabled; under forced colours the system colours win.
|
|
318
|
+
|
|
319
|
+
While a row is pressed its chevron turns `text-muted` (`text-subtle` misses 3:1 on
|
|
320
|
+
`surface-pressed`).
|
|
321
|
+
|
|
322
|
+
**Behaviour:** the title, the title slot and the subtitle wrap by default (`wrap-anywhere`, no
|
|
323
|
+
clamp) instead of truncating, so no text is lost at large text sizes (F-051). New
|
|
324
|
+
`truncate = input(false, { transform: booleanAttribute })` restores one line with an ellipsis for
|
|
325
|
+
each. See Migration 32. The mobile demo's Inbox rows use `truncate` (a mail list); its Today,
|
|
326
|
+
project and Me rows wrap.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# bf-list
|
|
2
|
+
|
|
3
|
+
Container for list rows, inset by default with rounded corners on a warm background
|
|
4
|
+
|
|
5
|
+
`BfListComponent` from `@bitforgehq/ui` · Data display · since 0.1.0
|
|
6
|
+
|
|
7
|
+
## Example
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { Component, computed, signal } from '@angular/core';
|
|
11
|
+
import {
|
|
12
|
+
BfAvatarComponent,
|
|
13
|
+
BfListComponent,
|
|
14
|
+
BfListItemComponent,
|
|
15
|
+
BfToggleComponent,
|
|
16
|
+
} from '@bitforgehq/ui';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The bf-list overview.
|
|
20
|
+
*
|
|
21
|
+
* Live demo of `bf-list`: an inset list with an avatar row, a toggle row and an interactive row.
|
|
22
|
+
*/
|
|
23
|
+
@Component({
|
|
24
|
+
selector: 'app-example-list-overview',
|
|
25
|
+
imports: [BfListComponent, BfListItemComponent, BfAvatarComponent, BfToggleComponent],
|
|
26
|
+
template: `
|
|
27
|
+
<bf-list>
|
|
28
|
+
<bf-list-item title="Jonas Keller" subtitle="Shared the Bloom moodboard">
|
|
29
|
+
<bf-avatar bfSlot="leading" initials="JK" />
|
|
30
|
+
<span bfSlot="trailing" class="text-caption text-text-muted">9:12</span>
|
|
31
|
+
</bf-list-item>
|
|
32
|
+
<bf-list-item title="Weekly summary" subtitle="Every Monday at 8:00">
|
|
33
|
+
<bf-toggle bfSlot="trailing" ariaLabel="Weekly summary" [(checked)]="weeklySummary" />
|
|
34
|
+
</bf-list-item>
|
|
35
|
+
<bf-list-item
|
|
36
|
+
title="Account"
|
|
37
|
+
subtitle="lena@studio.ch"
|
|
38
|
+
[interactive]="true"
|
|
39
|
+
[chevron]="true"
|
|
40
|
+
(clicked)="openAccount()"
|
|
41
|
+
/>
|
|
42
|
+
</bf-list>
|
|
43
|
+
<p data-status aria-live="polite" class="text-caption text-text-muted mt-3">{{ status() }}</p>
|
|
44
|
+
`,
|
|
45
|
+
})
|
|
46
|
+
export class ListOverviewExampleComponent {
|
|
47
|
+
readonly weeklySummary = signal(true);
|
|
48
|
+
|
|
49
|
+
readonly opened = signal(0);
|
|
50
|
+
readonly status = computed(() => {
|
|
51
|
+
const summary = `Weekly summary ${this.weeklySummary() ? 'on' : 'off'}`;
|
|
52
|
+
const opened = this.opened();
|
|
53
|
+
return opened === 0 ? `${summary}.` : `${summary} · Account opened ${opened}×.`;
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
/** Counts the opens; a real app would navigate to the account screen. */
|
|
57
|
+
openAccount(): void {
|
|
58
|
+
this.opened.update((count) => count + 1);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Overview
|
|
64
|
+
|
|
65
|
+
Container for `bf-list-item` rows. The inset style (default) wraps the rows in the warm
|
|
66
|
+
background with rounded corners, as in the design's grouped lists.
|
|
67
|
+
|
|
68
|
+
Lists show rows of related items: settings, conversations, people. `bf-list` is the container; its rows are [`bf-list-item`](https://bitforge-ui.web.app/components/list-item)s, each with a leading slot, title and subtitle, a trailing slot and an optional chevron. Navigation, action and settings rows are on the `bf-list-item` page.
|
|
69
|
+
|
|
70
|
+
## When to use
|
|
71
|
+
|
|
72
|
+
Use `bf-list` for a group of rows of the same kind: settings, conversations, people. Use [bf-card](https://bitforge-ui.web.app/components/card) instead for one piece of content with its own layout, and a native `table` for data the user compares across columns.
|
|
73
|
+
|
|
74
|
+
## Basic usage
|
|
75
|
+
|
|
76
|
+
Put the rows in the default slot. Inside a `bf-list` every row is a list item, on the inset container.
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
import { Component } from '@angular/core';
|
|
80
|
+
import { BfAvatarComponent, BfListComponent, BfListItemComponent } from '@bitforgehq/ui';
|
|
81
|
+
|
|
82
|
+
/** A list of recent activity, one row per person. */
|
|
83
|
+
@Component({
|
|
84
|
+
selector: 'app-example-list-basic',
|
|
85
|
+
imports: [BfAvatarComponent, BfListComponent, BfListItemComponent],
|
|
86
|
+
template: `
|
|
87
|
+
<bf-list>
|
|
88
|
+
@for (row of rows; track row.name) {
|
|
89
|
+
<bf-list-item [title]="row.name" [subtitle]="row.action">
|
|
90
|
+
<bf-avatar bfSlot="leading" [initials]="row.initials" />
|
|
91
|
+
<span bfSlot="trailing" class="text-caption text-text-muted">{{ row.time }}</span>
|
|
92
|
+
</bf-list-item>
|
|
93
|
+
}
|
|
94
|
+
</bf-list>
|
|
95
|
+
`,
|
|
96
|
+
})
|
|
97
|
+
export class ListBasicExampleComponent {
|
|
98
|
+
protected readonly rows = [
|
|
99
|
+
{ name: 'Jonas Keller', initials: 'JK', action: 'Shared the Bloom moodboard', time: '9:12' },
|
|
100
|
+
{ name: 'Lena Moser', initials: 'LM', action: 'Commented on the Atlas deck', time: '8:47' },
|
|
101
|
+
{ name: 'Ana Ruiz', initials: 'AR', action: 'Closed three tasks', time: 'Yesterday' },
|
|
102
|
+
];
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Plain list
|
|
107
|
+
|
|
108
|
+
`inset` false drops the warm container for rows placed directly on a card.
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
import { Component } from '@angular/core';
|
|
112
|
+
import { BfCardComponent, BfListComponent, BfListItemComponent } from '@bitforgehq/ui';
|
|
113
|
+
|
|
114
|
+
/** A plain list placed directly on a card, without the inset container. */
|
|
115
|
+
@Component({
|
|
116
|
+
selector: 'app-example-list-plain',
|
|
117
|
+
imports: [BfCardComponent, BfListComponent, BfListItemComponent],
|
|
118
|
+
template: `
|
|
119
|
+
<bf-card>
|
|
120
|
+
<h3 class="text-heading">Today</h3>
|
|
121
|
+
<bf-list [inset]="false">
|
|
122
|
+
<bf-list-item title="Review the Atlas deck" subtitle="10:00" />
|
|
123
|
+
<bf-list-item title="Call Bloom" subtitle="14:30" />
|
|
124
|
+
</bf-list>
|
|
125
|
+
</bf-card>
|
|
126
|
+
`,
|
|
127
|
+
})
|
|
128
|
+
export class ListPlainExampleComponent {}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Theming
|
|
132
|
+
|
|
133
|
+
`inset` (default) uses the `bg` background on a `card` radius; `[inset]="false"` is transparent with no radius. The rows' own tokens are on the [`bf-list-item` page](https://bitforge-ui.web.app/components/list-item#theming).
|
|
134
|
+
|
|
135
|
+
## Accessibility
|
|
136
|
+
|
|
137
|
+
`bf-list` renders `role="list"` on its container, and every `bf-list-item` inside it takes `role="listitem"`, so a screen reader announces the list and its row count. The rows' roles, links and buttons are described on the [`bf-list-item` page](https://bitforge-ui.web.app/components/list-item#accessibility).
|
|
138
|
+
|
|
139
|
+
## Inputs
|
|
140
|
+
|
|
141
|
+
| Name | Type | Default | Description |
|
|
142
|
+
| ------- | --------- | ------- | -------------------------------------------------------------------------------- |
|
|
143
|
+
| `inset` | `boolean` | `true` | Grouped look with the warm container; false renders rows on the page background. |
|
|
144
|
+
|
|
145
|
+
## Slots
|
|
146
|
+
|
|
147
|
+
- `default`: The rows, each a `bf-list-item`.
|
|
148
|
+
|
|
149
|
+
## Notes
|
|
150
|
+
|
|
151
|
+
### Do
|
|
152
|
+
|
|
153
|
+
- Group rows that belong together in one `bf-list`; start a new list under a heading for a new group.
|
|
154
|
+
- Use `[inset]="false"` on a card, so the card is the only container.
|
|
155
|
+
|
|
156
|
+
### Don't
|
|
157
|
+
|
|
158
|
+
- Don't put anything but `bf-list-item` rows in a `bf-list`; its `role="list"` expects list items.
|
|
159
|
+
- Don't nest a `bf-list` inside a row.
|
|
160
|
+
|
|
161
|
+
## Migration notes
|
|
162
|
+
|
|
163
|
+
### 0.3.0
|
|
164
|
+
|
|
165
|
+
JSDoc of `list.component.ts` for the API reference: `@slot` docs for `default`. No behaviour change.
|
|
166
|
+
|
|
167
|
+
### 0.2.0
|
|
168
|
+
|
|
169
|
+
`bf-list-item`'s title is `text-label` (15/20): its line is 20 px instead of an inherited 22.5, so
|
|
170
|
+
a row without a 40 px leading slot is 2.5 px shorter (a title-only row is 48 px, above the 44 px
|
|
171
|
+
hit area); rows with an avatar keep their 68 px.
|
|
172
|
+
|
|
173
|
+
Fixed: `bf-list-item` sets `role="listitem"` only inside a `bf-list` (which provides the new internal
|
|
174
|
+
`BF_LIST` token); a standalone row has no role, so axe no longer reports `aria-required-parent` for it.
|
|
175
|
+
|
|
176
|
+
### 0.1.0
|
|
177
|
+
|
|
178
|
+
New `bf-list` and `bf-list-item`: a `role="list"` container (inset by default, with a warm background and rounded corners; `inset=false` drops it for rows on a page) and a row with `leading`/`trailing` content slots, `title`/`subtitle` text, an optional trailing chevron, and an `interactive` mode that renders the row as a `<button>` emitting `clicked`. The interactive row's hover background is now `enabled:hover:bg-surface-muted` so a disabled row doesn't show a hover state; removed the unused `relative` from the row's base classes.
|