@bitforgehq/ui 0.3.0 → 0.3.2
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 +598 -0
- package/README.md +18 -11
- package/ai/MANIFEST.index.json +306 -0
- package/ai/MANIFEST.json +8915 -3788
- package/ai/REFERENCE.index.json +476 -0
- package/ai/REFERENCE.json +5810 -2905
- package/ai/UI_GUIDE.md +212 -58
- package/ai/components/app-frame.md +328 -0
- package/ai/components/back-button.md +42 -2
- package/ai/components/badge.md +17 -7
- package/ai/components/bar-chart.md +188 -0
- package/ai/components/breadcrumb-item.md +121 -0
- package/ai/components/breadcrumb.md +277 -0
- package/ai/components/button.md +82 -15
- package/ai/components/calendar.md +300 -0
- package/ai/components/card.md +119 -4
- package/ai/components/chart-card.md +283 -0
- package/ai/components/combobox.md +411 -0
- package/ai/components/date-input.md +396 -0
- package/ai/components/datetime-input.md +215 -0
- package/ai/components/description-item.md +111 -0
- package/ai/components/description-list.md +160 -0
- package/ai/components/donut-chart.md +169 -0
- package/ai/components/empty-state.md +99 -6
- package/ai/components/header.md +71 -2
- package/ai/components/icon-button.md +74 -16
- package/ai/components/icon.md +63 -7
- package/ai/components/line-chart.md +234 -0
- package/ai/components/list.md +70 -6
- package/ai/components/menu.md +5 -0
- package/ai/components/multi-combobox.md +257 -0
- package/ai/components/nav-group.md +178 -0
- package/ai/components/nav-item.md +210 -0
- package/ai/components/page-header.md +237 -0
- package/ai/components/pagination.md +173 -0
- package/ai/components/popover.md +250 -0
- package/ai/components/side-panel.md +391 -0
- package/ai/components/sidebar-toggle.md +287 -0
- package/ai/components/sidebar.md +541 -0
- package/ai/components/skeleton.md +215 -0
- package/ai/components/sparkline.md +188 -0
- package/ai/components/stat.md +297 -0
- package/ai/components/tab-group.md +226 -0
- package/ai/components/tab-panel.md +163 -0
- package/ai/components/table.md +697 -0
- package/ai/components/tabs.md +46 -2
- package/ai/components/theme-menu-button.md +182 -0
- package/ai/components/theme-switch.md +170 -0
- package/ai/components/time-input.md +240 -0
- package/ai/components/toolbar.md +354 -0
- package/ai/components/tooltip.md +230 -0
- package/ai/components/top-nav.md +159 -0
- package/ai/reference/bf-app-frame-breakpoint.md +27 -0
- package/ai/reference/bf-app-frame-content-width.md +29 -0
- package/ai/reference/bf-badge-appearance.md +36 -0
- package/ai/reference/bf-badge-variant.md +1 -1
- package/ai/reference/bf-bar-chart-orientation.md +27 -0
- package/ai/reference/bf-button-appearance.md +36 -0
- package/ai/reference/bf-button-variant.md +1 -1
- package/ai/reference/bf-calendar-disabled-date.md +23 -0
- package/ai/reference/bf-calendar-harness.md +51 -0
- package/ai/reference/bf-calendar-weekday.md +31 -0
- package/ai/reference/bf-chart-card-heading-level.md +26 -0
- package/ai/reference/bf-chart-curve.md +28 -0
- package/ai/reference/bf-chart-harness.md +51 -0
- package/ai/reference/bf-chart-legend-position.md +30 -0
- package/ai/reference/bf-chart-series.md +23 -0
- package/ai/reference/bf-chart-value-format.md +23 -0
- package/ai/reference/bf-color-scheme-service.md +30 -0
- package/ai/reference/bf-color-scheme.md +31 -0
- package/ai/reference/bf-combobox-filter.md +27 -0
- package/ai/reference/bf-combobox-harness.md +89 -0
- package/ai/reference/bf-combobox-option.md +33 -0
- package/ai/reference/bf-compare-with.md +2 -0
- package/ai/reference/bf-date-input-harness.md +67 -0
- package/ai/reference/bf-date-input-picker.md +27 -0
- package/ai/reference/bf-date-time-input-harness.md +76 -0
- package/ai/reference/bf-date-time-input-picker.md +27 -0
- package/ai/reference/bf-description-list-layout.md +26 -0
- package/ai/reference/bf-donut-slice.md +22 -0
- package/ai/reference/bf-empty-state-heading-level.md +1 -1
- package/ai/reference/bf-empty-state-heading.md +33 -0
- package/ai/reference/bf-labels.md +73 -20
- package/ai/reference/bf-menu-button-variant.md +1 -0
- package/ai/reference/bf-menu-placement.md +1 -0
- package/ai/reference/bf-overlay-options.md +28 -27
- package/ai/reference/bf-overlay-placement.md +34 -0
- package/ai/reference/bf-overlay-position.md +1 -1
- package/ai/reference/bf-overlay-service.md +5 -3
- package/ai/reference/bf-page-header-heading-level.md +26 -0
- package/ai/reference/bf-pagination-harness.md +61 -0
- package/ai/reference/bf-platform-service.md +17 -15
- package/ai/reference/bf-popover-harness.md +42 -0
- package/ai/reference/bf-popover-placement.md +28 -0
- package/ai/reference/bf-popover-trigger-directive.md +56 -0
- package/ai/reference/bf-side-panel-config.md +35 -0
- package/ai/reference/bf-side-panel-harness.md +34 -0
- package/ai/reference/bf-side-panel-ref.md +44 -0
- package/ai/reference/bf-side-panel-service.md +43 -0
- package/ai/reference/bf-side-panel-template-context.md +32 -0
- package/ai/reference/bf-side-panel-width.md +28 -0
- package/ai/reference/bf-sidebar-state-service.md +21 -0
- package/ai/reference/bf-sidebar-toggle-harness.md +32 -0
- package/ai/reference/bf-size.md +13 -0
- package/ai/reference/bf-skeleton-shape.md +28 -0
- package/ai/reference/bf-stat-appearance.md +33 -0
- package/ai/reference/bf-stat-trend-intent.md +27 -0
- package/ai/reference/bf-stat-trend.md +27 -0
- package/ai/reference/bf-stat-variant.md +26 -0
- package/ai/reference/bf-tab-group-harness.md +44 -0
- package/ai/reference/bf-table-align.md +26 -0
- package/ai/reference/bf-table-cell-context.md +24 -0
- package/ai/reference/bf-table-cell-directive.md +22 -0
- package/ai/reference/bf-table-column.md +28 -0
- package/ai/reference/bf-table-harness.md +77 -0
- package/ai/reference/bf-table-row-key.md +21 -0
- package/ai/reference/bf-table-sort-direction.md +26 -0
- package/ai/reference/bf-table-sort.md +27 -0
- package/ai/reference/bf-table-stack.md +29 -0
- package/ai/reference/bf-theme.md +5 -4
- package/ai/reference/bf-time-input-harness.md +67 -0
- package/ai/reference/bf-time-input-hour-cycle.md +27 -0
- package/ai/reference/bf-time-input-picker.md +27 -0
- package/ai/reference/bf-tooltip-directive.md +43 -0
- package/ai/reference/bf-tooltip-harness.md +43 -0
- package/ai/reference/bf-tooltip-placement.md +28 -0
- package/ai/reference/bf_color_scheme_storage.md +20 -0
- package/ai/reference/bf_side_panel_data.md +17 -0
- package/ai/reference/bf_sidebar_state_storage.md +20 -0
- package/ai/reference/bf_theme_storage.md +3 -1
- package/ai/reference/provide-bf-color-scheme.md +20 -0
- package/ai/reference/provide-bf-labels.md +13 -4
- package/ai/reference/provide-bf-sidebar-state.md +20 -0
- package/ai/reference/slide-in-from-end.md +24 -0
- package/ai/reference/slide-out-to-end.md +24 -0
- package/bin/bf-ui.js +433 -3
- package/fesm2022/bitforgehq-ui-charts.mjs +3045 -0
- package/fesm2022/bitforgehq-ui-charts.mjs.map +1 -0
- package/fesm2022/bitforgehq-ui-icons.mjs +107 -3
- package/fesm2022/bitforgehq-ui-icons.mjs.map +1 -1
- package/fesm2022/bitforgehq-ui-mobile.mjs +14 -59
- package/fesm2022/bitforgehq-ui-mobile.mjs.map +1 -1
- package/fesm2022/bitforgehq-ui-overlay.mjs +6566 -38
- package/fesm2022/bitforgehq-ui-overlay.mjs.map +1 -1
- package/fesm2022/bitforgehq-ui-testing.mjs +634 -1
- package/fesm2022/bitforgehq-ui-testing.mjs.map +1 -1
- package/fesm2022/bitforgehq-ui.mjs +5708 -137
- package/fesm2022/bitforgehq-ui.mjs.map +1 -1
- package/llms-full.txt +26766 -14470
- package/llms.txt +106 -1
- package/package.json +7 -3
- package/theme.css +101 -0
- package/types/bitforgehq-ui-charts.d.ts +967 -0
- package/types/bitforgehq-ui-icons.d.ts +13 -1
- package/types/bitforgehq-ui-mobile.d.ts +25 -18
- package/types/bitforgehq-ui-overlay.d.ts +1895 -7
- package/types/bitforgehq-ui-testing.d.ts +782 -1
- package/types/bitforgehq-ui.d.ts +2393 -45
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# BfPopoverTriggerDirective
|
|
2
|
+
|
|
3
|
+
Opens an anchored, non-modal popover panel from any element or button
|
|
4
|
+
|
|
5
|
+
Directive from `@bitforgehq/ui/overlay` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
Opens an `ng-template` (usually a `bf-popover`) as a non-modal panel anchored to the element:
|
|
8
|
+
a click (`Enter` or `Space` on a button) toggles it, focus moves to its first control, `Tab`
|
|
9
|
+
moves through it and on out (closing it, past the trigger), and `Escape`, a click outside or a
|
|
10
|
+
navigation to another URL path close it, returning focus to the trigger. The control it
|
|
11
|
+
decorates (the host, or the first control inside it, such as a `bf-button`'s button) carries
|
|
12
|
+
`aria-haspopup="dialog"`, `aria-expanded` and, while open, `aria-controls`. Export it as
|
|
13
|
+
`bfPopoverTrigger` to open and close it from code or from inside the panel.
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { BfPopoverTriggerDirective } from '@bitforgehq/ui/overlay';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Selector: `[bfPopoverTriggerFor]`
|
|
20
|
+
|
|
21
|
+
## Inputs
|
|
22
|
+
|
|
23
|
+
| Name | Type | Default | Description |
|
|
24
|
+
| --------------------- | ------------------------------------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------- |
|
|
25
|
+
| `bfPopoverTriggerFor` | `TemplateRef<unknown>` | required | The `ng-template` holding the panel (a `bf-popover`) this element opens. |
|
|
26
|
+
| `bfPopoverPlacement` | `BfPopoverPlacement` (`'below-start' \| 'below-end' \| 'above-start' \| 'above-end'`) | `'below-start'` | Where the panel opens (flipping when it would overflow), read each time it opens. |
|
|
27
|
+
| `bfPopoverLabel` | `string` | `''` | Accessible name of the panel. Empty: its first heading names it, else the trigger. |
|
|
28
|
+
|
|
29
|
+
## Outputs
|
|
30
|
+
|
|
31
|
+
| Name | Payload | Description |
|
|
32
|
+
| ----------------- | ------- | ----------------------------------------------------------------------------------------- |
|
|
33
|
+
| `bfPopoverOpened` | `void` | Emits when the panel opens. |
|
|
34
|
+
| `bfPopoverClosed` | `void` | Emits when the panel closes (`Escape`, a click outside, `Tab` out, a navigation or code). |
|
|
35
|
+
|
|
36
|
+
## Methods
|
|
37
|
+
|
|
38
|
+
### `open(): void`
|
|
39
|
+
|
|
40
|
+
Opens the panel and moves focus into it; does nothing while it is open.
|
|
41
|
+
|
|
42
|
+
### `close(restoreFocus?: boolean): void`
|
|
43
|
+
|
|
44
|
+
Closes the panel; does nothing while it is closed.
|
|
45
|
+
|
|
46
|
+
| Parameter | Type | Description |
|
|
47
|
+
| --------------- | --------- | ----------------------------------------------- |
|
|
48
|
+
| `restoreFocus?` | `boolean` | Moves focus back to the trigger (default true). |
|
|
49
|
+
|
|
50
|
+
### `toggle(): void`
|
|
51
|
+
|
|
52
|
+
Opens the panel when it is closed, closes it when it is open.
|
|
53
|
+
|
|
54
|
+
## Uses
|
|
55
|
+
|
|
56
|
+
- [BfPopoverPlacement](bf-popover-placement.md)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# BfSidePanelConfig
|
|
2
|
+
|
|
3
|
+
Options of a side panel: its data, width, modality, name and injector
|
|
4
|
+
|
|
5
|
+
Interface from `@bitforgehq/ui/overlay` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
Options of `BfSidePanelService.open()`.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { type BfSidePanelConfig } from '@bitforgehq/ui/overlay';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
interface BfSidePanelConfig<D = unknown>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Properties
|
|
20
|
+
|
|
21
|
+
| Name | Type | Default | Description |
|
|
22
|
+
| ----------- | ------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
23
|
+
| `data` | `D` | | Injected into the content as `BF_SIDE_PANEL_DATA` (and a template's `data`). |
|
|
24
|
+
| `width` | `BfSidePanelWidth` (`'sm' \| 'md' \| 'lg'`) | `'md'` | Width of the `bf-side-panel` in the content (default `md`, 480 px), capped at the viewport. |
|
|
25
|
+
| `modal` | `boolean` | `true` | A modal panel (default true) has a scrim, traps focus and makes the page behind it inert; `false` keeps the page usable beside it. |
|
|
26
|
+
| `ariaLabel` | `string` | | Accessible name, when the content renders no `bf-side-panel` title and no heading. |
|
|
27
|
+
| `injector` | `Injector` | | Parent of the content's injector and source of its labels (default the root injector). Pass the opener's `inject(Injector)` so a feature-level `provideBfLabels()` reaches the panel. |
|
|
28
|
+
|
|
29
|
+
## Uses
|
|
30
|
+
|
|
31
|
+
- [BfSidePanelWidth](bf-side-panel-width.md)
|
|
32
|
+
|
|
33
|
+
## Used by
|
|
34
|
+
|
|
35
|
+
- [BfSidePanelService](bf-side-panel-service.md)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# BfSidePanelHarness
|
|
2
|
+
|
|
3
|
+
Test harness for a side panel: its title, its close button and its state
|
|
4
|
+
|
|
5
|
+
Class from `@bitforgehq/ui/testing` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
Harness for `bf-side-panel`, the panel `BfSidePanelService` opens. Side panels render in the
|
|
8
|
+
CDK overlay container outside the tested component, so get it through
|
|
9
|
+
`TestbedHarnessEnvironment.documentRootLoader(fixture)`.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { BfSidePanelHarness } from '@bitforgehq/ui/testing';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Signature
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
class BfSidePanelHarness extends ComponentHarness
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Methods
|
|
22
|
+
|
|
23
|
+
### `getTitle(): Promise<string>`
|
|
24
|
+
|
|
25
|
+
The title heading.
|
|
26
|
+
|
|
27
|
+
### `close(): Promise<void>`
|
|
28
|
+
|
|
29
|
+
Clicks the close button (×), which closes the side panel with no result.
|
|
30
|
+
|
|
31
|
+
### `isOpen(): Promise<boolean>`
|
|
32
|
+
|
|
33
|
+
Whether the side panel is open: its overlay pane is in the page and not sliding out. The pane
|
|
34
|
+
is found by the panel's own `data-bf-side-panel-id`.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# BfSidePanelRef
|
|
2
|
+
|
|
3
|
+
Handle on an open side panel that closes it and resolves with its result
|
|
4
|
+
|
|
5
|
+
Class from `@bitforgehq/ui/overlay` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
Handle to an open side panel, returned by `BfSidePanelService.open()` and injectable in the
|
|
8
|
+
panel's content (`inject(BfSidePanelRef)`). `close(result)` slides the panel out, detaches it
|
|
9
|
+
and resolves `afterClosed` with `result`; later calls are ignored. Closing with `Escape`, the
|
|
10
|
+
backdrop, the `bf-side-panel` close button or a navigation resolves `undefined`.
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { BfSidePanelRef } from '@bitforgehq/ui/overlay';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Signature
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
class BfSidePanelRef<R = unknown, C = unknown>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Properties
|
|
23
|
+
|
|
24
|
+
| Name | Type | Default | Description |
|
|
25
|
+
| ------------------- | ------------------------- | ------- | ---------------------------------------------------------------------------------------- |
|
|
26
|
+
| `id` | `string` | | Unique id of the side panel (its overlay's `bf-overlay-N`). |
|
|
27
|
+
| `afterClosed` | `Promise<R \| undefined>` | | Resolves with the result given to `close()`, or `undefined`, once the panel is detached. |
|
|
28
|
+
| `closed` | `Signal<boolean>` | | True once the panel has been detached. |
|
|
29
|
+
| `componentInstance` | `C \| null` | | The content component; `null` for a panel opened from a template. |
|
|
30
|
+
|
|
31
|
+
## Methods
|
|
32
|
+
|
|
33
|
+
### `close(result?: R): void`
|
|
34
|
+
|
|
35
|
+
Closes the panel with an optional result; ignored once closing.
|
|
36
|
+
|
|
37
|
+
| Parameter | Type | Description |
|
|
38
|
+
| --------- | ---- | -------------------------------------- |
|
|
39
|
+
| `result?` | `R` | The value `afterClosed` resolves with. |
|
|
40
|
+
|
|
41
|
+
## Used by
|
|
42
|
+
|
|
43
|
+
- [BfSidePanelService](bf-side-panel-service.md)
|
|
44
|
+
- [BfSidePanelTemplateContext](bf-side-panel-template-context.md)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# BfSidePanelService
|
|
2
|
+
|
|
3
|
+
Opens a full-height panel from the end edge, modal or beside the page
|
|
4
|
+
|
|
5
|
+
Service from `@bitforgehq/ui/overlay` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
Opens side panels on the overlay core: a component or template in a full-height pane that
|
|
8
|
+
slides in from the inline end edge (the right, the left under `dir="rtl"`; a cross-fade under
|
|
9
|
+
reduced motion), labelled by its `bf-side-panel` title, with focus moved in, `Escape` closing
|
|
10
|
+
it and focus returned to the opener. A modal panel (the default) adds a scrim that closes it on
|
|
11
|
+
a click, traps focus, locks document scroll and makes the page behind it `inert`, as a dialog
|
|
12
|
+
does; `modal: false` keeps the page usable and scrollable beside it, and `Escape` closes it
|
|
13
|
+
only while focus is inside it. A navigation to another URL path closes it. Desktop only.
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { BfSidePanelService } from '@bitforgehq/ui/overlay';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Methods
|
|
20
|
+
|
|
21
|
+
### `open<C, D = unknown, R = unknown>(component: Type<C>, config?: BfSidePanelConfig<D>): BfSidePanelRef<R, C>`
|
|
22
|
+
|
|
23
|
+
Opens `component` as a side panel; it injects `BfSidePanelRef` and `BF_SIDE_PANEL_DATA`.
|
|
24
|
+
|
|
25
|
+
| Parameter | Type | Description |
|
|
26
|
+
| ----------- | ---------------------- | ------------------------------------------------------------------------------ |
|
|
27
|
+
| `component` | `Type<C>` | The component to render; it injects `BfSidePanelRef` and `BF_SIDE_PANEL_DATA`. |
|
|
28
|
+
| `config?` | `BfSidePanelConfig<D>` | The panel's data, width, modality, name and injector. |
|
|
29
|
+
|
|
30
|
+
### `open<D = unknown, R = unknown>(template: TemplateRef<BfSidePanelTemplateContext<D, R>>, config?: BfSidePanelConfig<D>): BfSidePanelRef<R>`
|
|
31
|
+
|
|
32
|
+
Opens `template` as a side panel; its context is `{ $implicit: ref, data }`.
|
|
33
|
+
|
|
34
|
+
| Parameter | Type | Description |
|
|
35
|
+
| ---------- | ----------------------------------------------- | -------------------------------------------------------------------- |
|
|
36
|
+
| `template` | `TemplateRef<BfSidePanelTemplateContext<D, R>>` | The template to render, with the context `{ $implicit: ref, data }`. |
|
|
37
|
+
| `config?` | `BfSidePanelConfig<D>` | The panel's data, width, modality, name and injector. |
|
|
38
|
+
|
|
39
|
+
## Uses
|
|
40
|
+
|
|
41
|
+
- [BfSidePanelConfig](bf-side-panel-config.md)
|
|
42
|
+
- [BfSidePanelRef](bf-side-panel-ref.md)
|
|
43
|
+
- [BfSidePanelTemplateContext](bf-side-panel-template-context.md)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# BfSidePanelTemplateContext
|
|
2
|
+
|
|
3
|
+
The context a template opened as a side panel receives: its ref and its data
|
|
4
|
+
|
|
5
|
+
Interface from `@bitforgehq/ui/overlay` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
Context of a template opened with `BfSidePanelService.open()`: `let-ref` and `let-data="data"`.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { type BfSidePanelTemplateContext } from '@bitforgehq/ui/overlay';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
interface BfSidePanelTemplateContext<D = unknown, R = unknown>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Properties
|
|
20
|
+
|
|
21
|
+
| Name | Type | Default | Description |
|
|
22
|
+
| ----------- | ------------------- | -------- | --------------------------------------------------------- |
|
|
23
|
+
| `$implicit` | `BfSidePanelRef<R>` | required | The panel's ref (`let-ref`), to close it with a result. |
|
|
24
|
+
| `data` | `D` | required | The `data` the panel was opened with (`let-data="data"`). |
|
|
25
|
+
|
|
26
|
+
## Uses
|
|
27
|
+
|
|
28
|
+
- [BfSidePanelRef](bf-side-panel-ref.md)
|
|
29
|
+
|
|
30
|
+
## Used by
|
|
31
|
+
|
|
32
|
+
- [BfSidePanelService](bf-side-panel-service.md)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# BfSidePanelWidth
|
|
2
|
+
|
|
3
|
+
The side panel widths, from a 360 px detail list to a 640 px form
|
|
4
|
+
|
|
5
|
+
Type from `@bitforgehq/ui/overlay` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
The side panel's width scale: `sm` 360 px, `md` 480 px, `lg` 640 px (22.5, 30 and 40 rem), each
|
|
8
|
+
never wider than the viewport.
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import { type BfSidePanelWidth } from '@bitforgehq/ui/overlay';
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Signature
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
type BfSidePanelWidth = 'sm' | 'md' | 'lg'
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Values
|
|
21
|
+
|
|
22
|
+
- `sm`
|
|
23
|
+
- `md`
|
|
24
|
+
- `lg`
|
|
25
|
+
|
|
26
|
+
## Used by
|
|
27
|
+
|
|
28
|
+
- [BfSidePanelConfig](bf-side-panel-config.md)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# BfSidebarStateService
|
|
2
|
+
|
|
3
|
+
The sidebar's collapsed state, kept in storage between visits of the app
|
|
4
|
+
|
|
5
|
+
Service from `@bitforgehq/ui` · since 0.3.2
|
|
6
|
+
|
|
7
|
+
Whether the app's `bf-sidebar` is collapsed to an icon rail, remembered between visits: the app
|
|
8
|
+
binds the sidebar's `[(collapsed)]` to `sidebarState.collapsed`. With `provideBfSidebarState()`
|
|
9
|
+
every change is stored in `BF_SIDEBAR_STATE_STORAGE` under `bf-sidebar-collapsed`; without it
|
|
10
|
+
the signal still holds the state but nothing is written. Storage is read in the browser only, so a
|
|
11
|
+
server render starts expanded and writes nothing. The widgets never inject it.
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { BfSidebarStateService } from '@bitforgehq/ui';
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Properties
|
|
18
|
+
|
|
19
|
+
| Name | Type | Default | Description |
|
|
20
|
+
| ----------- | ------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| `collapsed` | `WritableSignal<boolean>` | | Whether the sidebar is collapsed: the stored state in the browser, else false. Bind it two-way to `bf-sidebar`'s `collapsed`. |
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# BfSidebarToggleHarness
|
|
2
|
+
|
|
3
|
+
Test harness for a sidebar toggle: reads and flips the collapsed sidebar
|
|
4
|
+
|
|
5
|
+
Class from `@bitforgehq/ui/testing` · since 0.3.2
|
|
6
|
+
|
|
7
|
+
Harness for `bf-sidebar-toggle`, the button that collapses a `bf-sidebar` to an icon rail. Its
|
|
8
|
+
`label` filter matches the button's name ("Collapse sidebar" or "Expand sidebar").
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import { BfSidebarToggleHarness } from '@bitforgehq/ui/testing';
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Signature
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
class BfSidebarToggleHarness extends ComponentHarness
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Methods
|
|
21
|
+
|
|
22
|
+
### `getLabel(): Promise<string>`
|
|
23
|
+
|
|
24
|
+
The button's name, which says what the next press does.
|
|
25
|
+
|
|
26
|
+
### `isExpanded(): Promise<boolean>`
|
|
27
|
+
|
|
28
|
+
Whether the sidebar is at full width (`aria-expanded`).
|
|
29
|
+
|
|
30
|
+
### `toggle(): Promise<void>`
|
|
31
|
+
|
|
32
|
+
Flips the sidebar with a click.
|
package/ai/reference/bf-size.md
CHANGED
|
@@ -26,8 +26,12 @@ type BfSize = 'sm' | 'md' | 'lg'
|
|
|
26
26
|
|
|
27
27
|
- [bf-button](../components/button.md)
|
|
28
28
|
- [BfButtonSize](bf-button-size.md)
|
|
29
|
+
- [bf-calendar](../components/calendar.md)
|
|
29
30
|
- [bf-checkbox](../components/checkbox.md)
|
|
30
31
|
- [bf-chip](../components/chip.md)
|
|
32
|
+
- [bf-combobox](../components/combobox.md)
|
|
33
|
+
- [bf-date-input](../components/date-input.md)
|
|
34
|
+
- [bf-datetime-input](../components/datetime-input.md)
|
|
31
35
|
- [BfDefaults](bf-defaults.md)
|
|
32
36
|
- [BfDefaultsOptions](bf-defaults-options.md)
|
|
33
37
|
- [BfFieldControlState](bf-field-control-state.md)
|
|
@@ -36,10 +40,19 @@ type BfSize = 'sm' | 'md' | 'lg'
|
|
|
36
40
|
- [bf-input](../components/input.md)
|
|
37
41
|
- [bf-menu-button](../components/menu-button.md)
|
|
38
42
|
- [bf-menu](../components/menu.md)
|
|
43
|
+
- [bf-multi-combobox](../components/multi-combobox.md)
|
|
44
|
+
- [a[bfNavItem]](../components/nav-item.md)
|
|
39
45
|
- [bf-number-input](../components/number-input.md)
|
|
46
|
+
- [bf-pagination](../components/pagination.md)
|
|
40
47
|
- [bf-radio-group](../components/radio-group.md)
|
|
41
48
|
- [bf-segmented](../components/segmented.md)
|
|
42
49
|
- [BfSegmentedSize](bf-segmented-size.md)
|
|
43
50
|
- [bf-select](../components/select.md)
|
|
51
|
+
- [bf-sidebar-toggle](../components/sidebar-toggle.md)
|
|
52
|
+
- [bf-tab-group](../components/tab-group.md)
|
|
53
|
+
- [bf-table](../components/table.md)
|
|
44
54
|
- [bf-textarea](../components/textarea.md)
|
|
55
|
+
- [bf-theme-menu-button](../components/theme-menu-button.md)
|
|
56
|
+
- [bf-theme-switch](../components/theme-switch.md)
|
|
57
|
+
- [bf-time-input](../components/time-input.md)
|
|
45
58
|
- [bf-toggle](../components/toggle.md)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# BfSkeletonShape
|
|
2
|
+
|
|
3
|
+
The three skeleton shapes, text lines, a rectangle or a circle
|
|
4
|
+
|
|
5
|
+
Type from `@bitforgehq/ui` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
The shape of a `bf-skeleton`: text lines, a rectangle (an image, a chart, a field) or a circle
|
|
8
|
+
(an avatar).
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import { type BfSkeletonShape } from '@bitforgehq/ui';
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Signature
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
type BfSkeletonShape = 'text' | 'rect' | 'circle'
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Values
|
|
21
|
+
|
|
22
|
+
- `text`
|
|
23
|
+
- `rect`
|
|
24
|
+
- `circle`
|
|
25
|
+
|
|
26
|
+
## Used by
|
|
27
|
+
|
|
28
|
+
- [bf-skeleton](../components/skeleton.md)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# BfStatAppearance
|
|
2
|
+
|
|
3
|
+
The three stat surfaces, plain, an outlined card or a sunken tile
|
|
4
|
+
|
|
5
|
+
Type from `@bitforgehq/ui` · since 0.3.2
|
|
6
|
+
|
|
7
|
+
The surface of a `bf-stat`, as its `variant` input takes it: a `BfStatVariant` or tile (a
|
|
8
|
+
sunken, borderless tile for a stats row inside a raised card). A new type, so `Record`s over
|
|
9
|
+
the released `BfStatVariant` keep compiling.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { type BfStatAppearance } from '@bitforgehq/ui';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Signature
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
type BfStatAppearance = BfStatVariant | 'tile'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Values
|
|
22
|
+
|
|
23
|
+
- `plain`
|
|
24
|
+
- `card`
|
|
25
|
+
- `tile`
|
|
26
|
+
|
|
27
|
+
## Uses
|
|
28
|
+
|
|
29
|
+
- [BfStatVariant](bf-stat-variant.md)
|
|
30
|
+
|
|
31
|
+
## Used by
|
|
32
|
+
|
|
33
|
+
- [bf-stat](../components/stat.md)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# BfStatTrendIntent
|
|
2
|
+
|
|
3
|
+
Whether a rising or a falling figure is the good news for a stat
|
|
4
|
+
|
|
5
|
+
Type from `@bitforgehq/ui` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
Which direction of a `bf-stat` delta is good: positive (up is good, such as revenue) or
|
|
8
|
+
negative (down is good, such as costs or churn).
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import { type BfStatTrendIntent } from '@bitforgehq/ui';
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Signature
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
type BfStatTrendIntent = 'positive' | 'negative'
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Values
|
|
21
|
+
|
|
22
|
+
- `positive`
|
|
23
|
+
- `negative`
|
|
24
|
+
|
|
25
|
+
## Used by
|
|
26
|
+
|
|
27
|
+
- [bf-stat](../components/stat.md)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# BfStatTrend
|
|
2
|
+
|
|
3
|
+
The three directions of a stat's delta pill, up, down or no change
|
|
4
|
+
|
|
5
|
+
Type from `@bitforgehq/ui` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
The direction of a `bf-stat` delta: up, down or flat (no change).
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { type BfStatTrend } from '@bitforgehq/ui';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type BfStatTrend = 'up' | 'down' | 'flat'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Values
|
|
20
|
+
|
|
21
|
+
- `up`
|
|
22
|
+
- `down`
|
|
23
|
+
- `flat`
|
|
24
|
+
|
|
25
|
+
## Used by
|
|
26
|
+
|
|
27
|
+
- [bf-stat](../components/stat.md)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# BfStatVariant
|
|
2
|
+
|
|
3
|
+
The two stat surfaces, plain on its container or an outlined card tile
|
|
4
|
+
|
|
5
|
+
Type from `@bitforgehq/ui` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
The surface of a `bf-stat`: plain (on whatever holds it) or card (its own outlined tile).
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { type BfStatVariant } from '@bitforgehq/ui';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type BfStatVariant = 'plain' | 'card'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Values
|
|
20
|
+
|
|
21
|
+
- `plain`
|
|
22
|
+
- `card`
|
|
23
|
+
|
|
24
|
+
## Used by
|
|
25
|
+
|
|
26
|
+
- [BfStatAppearance](bf-stat-appearance.md)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# BfTabGroupHarness
|
|
2
|
+
|
|
3
|
+
Test harness for the tab group: reads its tabs and panel and selects a tab
|
|
4
|
+
|
|
5
|
+
Class from `@bitforgehq/ui/testing` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
Harness for `bf-tab-group`. It works by tab label, so a test never needs the panel values.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { BfTabGroupHarness } from '@bitforgehq/ui/testing';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
class BfTabGroupHarness extends ComponentHarness
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Methods
|
|
20
|
+
|
|
21
|
+
### `getLabel(): Promise<string>`
|
|
22
|
+
|
|
23
|
+
The tablist's accessible name (`label`, else the `tabGroup` label).
|
|
24
|
+
|
|
25
|
+
### `getTabLabels(): Promise<string[]>`
|
|
26
|
+
|
|
27
|
+
The tabs' labels, in order (without their badges).
|
|
28
|
+
|
|
29
|
+
### `getSelectedLabel(): Promise<string | null>`
|
|
30
|
+
|
|
31
|
+
The selected tab's label, `null` when the group has no tabs.
|
|
32
|
+
|
|
33
|
+
### `selectTab(label: string): Promise<void>`
|
|
34
|
+
|
|
35
|
+
Clicks the tab with this label, as a user would. Throws for an unknown label, and for a
|
|
36
|
+
disabled tab (a user's click would do nothing).
|
|
37
|
+
|
|
38
|
+
| Parameter | Type | Description |
|
|
39
|
+
| --------- | -------- | ---------------- |
|
|
40
|
+
| `label` | `string` | The tab's label. |
|
|
41
|
+
|
|
42
|
+
### `getPanelText(): Promise<string>`
|
|
43
|
+
|
|
44
|
+
The text of the panel shown.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# BfTableAlign
|
|
2
|
+
|
|
3
|
+
The inline alignment of a table column, start for text or end for numbers
|
|
4
|
+
|
|
5
|
+
Type from `@bitforgehq/ui` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
Where a `bf-table` column lines up its header and cells: `start` for text, `end` for numbers.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { type BfTableAlign } from '@bitforgehq/ui';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type BfTableAlign = 'start' | 'end'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Values
|
|
20
|
+
|
|
21
|
+
- `start`
|
|
22
|
+
- `end`
|
|
23
|
+
|
|
24
|
+
## Used by
|
|
25
|
+
|
|
26
|
+
- [BfTableColumn](bf-table-column.md)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# BfTableCellContext
|
|
2
|
+
|
|
3
|
+
The row and its index that a custom table cell template receives
|
|
4
|
+
|
|
5
|
+
Interface from `@bitforgehq/ui` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
What a `bf-table` cell template receives: the row (`let-row`) and its position in `rows`.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { type BfTableCellContext } from '@bitforgehq/ui';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
interface BfTableCellContext<T>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Properties
|
|
20
|
+
|
|
21
|
+
| Name | Type | Default | Description |
|
|
22
|
+
| ----------- | -------- | -------- | --------------------------------------------------------------- |
|
|
23
|
+
| `$implicit` | `T` | required | The row the cell belongs to (`let-row`). |
|
|
24
|
+
| `index` | `number` | required | The row's position in the table's `rows` (`let-index="index"`). |
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# BfTableCellDirective
|
|
2
|
+
|
|
3
|
+
Custom template for the cells of one table column, with the row typed
|
|
4
|
+
|
|
5
|
+
Directive from `@bitforgehq/ui` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
Replaces the default text of one `bf-table` column with a template, such as a badge, an avatar
|
|
8
|
+
or a link. `bfTableCell` names the column's `key`; bind `bfTableCellOf` to the table's rows so
|
|
9
|
+
`let-row` is typed as one of them (it is `unknown` otherwise).
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { BfTableCellDirective } from '@bitforgehq/ui';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Selector: `ng-template[bfTableCell]`
|
|
16
|
+
|
|
17
|
+
## Inputs
|
|
18
|
+
|
|
19
|
+
| Name | Type | Default | Description |
|
|
20
|
+
| --------------- | -------------- | -------- | ----------------------------------------------------------------- |
|
|
21
|
+
| `bfTableCell` | `string` | required | The `key` of the column whose cells this template renders. |
|
|
22
|
+
| `bfTableCellOf` | `readonly T[]` | `[]` | The table's rows; only types `let-row`, the table never reads it. |
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# BfTableColumn
|
|
2
|
+
|
|
3
|
+
One table column with its row key, header label, sorting and alignment
|
|
4
|
+
|
|
5
|
+
Interface from `@bitforgehq/ui` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
One column of a `bf-table`: the row property it shows, its header and how it behaves.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { type BfTableColumn } from '@bitforgehq/ui';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
| Name | Type | Default | Description |
|
|
16
|
+
| ---------- | ----------------------------------- | --------- | ------------------------------------------------------------------------------------- |
|
|
17
|
+
| `key` | `string` | required | The row property the default cell shows; also the key a `bfTableCell` template names. |
|
|
18
|
+
| `label` | `string` | required | The header text. |
|
|
19
|
+
| `sortable` | `boolean` | `false` | Whether the header is a button that sets the table's `sort`. |
|
|
20
|
+
| `align` | `BfTableAlign` (`'start' \| 'end'`) | `'start'` | The inline alignment of the header and cells; `end` also sets tabular figures. |
|
|
21
|
+
|
|
22
|
+
## Uses
|
|
23
|
+
|
|
24
|
+
- [BfTableAlign](bf-table-align.md)
|
|
25
|
+
|
|
26
|
+
## Used by
|
|
27
|
+
|
|
28
|
+
- [bf-table](../components/table.md)
|