@bitforgehq/ui 0.3.0 → 0.3.1
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 +482 -0
- package/README.md +17 -11
- package/ai/MANIFEST.index.json +288 -0
- package/ai/MANIFEST.json +8716 -3926
- package/ai/REFERENCE.index.json +413 -0
- package/ai/REFERENCE.json +4710 -2047
- package/ai/UI_GUIDE.md +185 -57
- 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 +63 -2
- 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/header.md +67 -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.md +363 -0
- package/ai/components/skeleton.md +215 -0
- package/ai/components/sparkline.md +188 -0
- package/ai/components/stat.md +233 -0
- package/ai/components/tab-group.md +226 -0
- package/ai/components/tab-panel.md +163 -0
- package/ai/components/table.md +568 -0
- package/ai/components/tabs.md +42 -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 +289 -0
- package/ai/components/tooltip.md +230 -0
- package/ai/components/top-nav.md +159 -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-labels.md +67 -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-size.md +12 -0
- package/ai/reference/bf-skeleton-shape.md +28 -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-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_theme_storage.md +3 -1
- package/ai/reference/provide-bf-color-scheme.md +20 -0
- package/ai/reference/provide-bf-labels.md +12 -4
- package/ai/reference/slide-in-from-end.md +24 -0
- package/ai/reference/slide-out-to-end.md +24 -0
- 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 +6436 -33
- package/fesm2022/bitforgehq-ui-overlay.mjs.map +1 -1
- package/fesm2022/bitforgehq-ui-testing.mjs +618 -1
- package/fesm2022/bitforgehq-ui-testing.mjs.map +1 -1
- package/fesm2022/bitforgehq-ui.mjs +5092 -153
- package/fesm2022/bitforgehq-ui.mjs.map +1 -1
- package/llms-full.txt +25177 -14398
- package/llms.txt +95 -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 +1844 -7
- package/types/bitforgehq-ui-testing.d.ts +748 -1
- package/types/bitforgehq-ui.d.ts +2136 -44
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# BfDateInputHarness
|
|
2
|
+
|
|
3
|
+
Test harness for the date input: types a date or picks one in its calendar
|
|
4
|
+
|
|
5
|
+
Class from `@bitforgehq/ui/testing` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
Harness for `bf-date-input`. It reads and types the field as a user sees it (in its locale's
|
|
8
|
+
order) and picks a date through the calendar popover with `BfCalendarHarness`.
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import { BfDateInputHarness } from '@bitforgehq/ui/testing';
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Signature
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
class BfDateInputHarness extends ComponentHarness
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Methods
|
|
21
|
+
|
|
22
|
+
### `getLabel(): Promise<string>`
|
|
23
|
+
|
|
24
|
+
The visible label without the required mark, else the field's `aria-label`.
|
|
25
|
+
|
|
26
|
+
### `getValue(): Promise<string>`
|
|
27
|
+
|
|
28
|
+
The field's text as the locale shows it ("14/10/2026"); the ISO value in native mode.
|
|
29
|
+
|
|
30
|
+
### `setValue(text: string): Promise<void>`
|
|
31
|
+
|
|
32
|
+
Types a date as a user would: clears the field, then types each run of digits (or letters)
|
|
33
|
+
into the next part in the field's order, such as "14/10/2026" in an en-GB field. In native mode it sets the
|
|
34
|
+
platform input to the ISO value.
|
|
35
|
+
|
|
36
|
+
| Parameter | Type | Description |
|
|
37
|
+
| --------- | -------- | ------------------------------- |
|
|
38
|
+
| `text` | `string` | The date as the field shows it. |
|
|
39
|
+
|
|
40
|
+
### `clear(): Promise<void>`
|
|
41
|
+
|
|
42
|
+
Clears every part with `Backspace`, as a user would.
|
|
43
|
+
|
|
44
|
+
### `isInvalid(): Promise<boolean>`
|
|
45
|
+
|
|
46
|
+
Whether the field shows its error state (`aria-invalid` on its parts or native input).
|
|
47
|
+
|
|
48
|
+
### `isDisabled(): Promise<boolean>`
|
|
49
|
+
|
|
50
|
+
Whether the field is disabled.
|
|
51
|
+
|
|
52
|
+
### `openPicker(): Promise<void>`
|
|
53
|
+
|
|
54
|
+
Opens the calendar popover with a click on its button; throws when the field has none or it is disabled.
|
|
55
|
+
|
|
56
|
+
### `isPickerOpen(): Promise<boolean>`
|
|
57
|
+
|
|
58
|
+
Whether the calendar popover is open (`aria-expanded` on its button).
|
|
59
|
+
|
|
60
|
+
### `pickDate(iso: string): Promise<void>`
|
|
61
|
+
|
|
62
|
+
Picks a date in the calendar as a user would: opens the popover (when closed), then picks the
|
|
63
|
+
day through the calendar's harness, which closes it.
|
|
64
|
+
|
|
65
|
+
| Parameter | Type | Description |
|
|
66
|
+
| --------- | -------- | ------------------------------------------- |
|
|
67
|
+
| `iso` | `string` | The ISO date to pick, such as '2026-11-03'. |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# BfDateInputPicker
|
|
2
|
+
|
|
3
|
+
Whether a date input offers a calendar popover besides typing
|
|
4
|
+
|
|
5
|
+
Type from `@bitforgehq/ui/overlay` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
How `bf-date-input` picks a date besides typing: `calendar` adds a button that opens a
|
|
8
|
+
`bf-calendar` in a popover, `none` keeps the field typed only.
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import { type BfDateInputPicker } from '@bitforgehq/ui/overlay';
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Signature
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
type BfDateInputPicker = 'calendar' | 'none'
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Values
|
|
21
|
+
|
|
22
|
+
- `calendar`
|
|
23
|
+
- `none`
|
|
24
|
+
|
|
25
|
+
## Used by
|
|
26
|
+
|
|
27
|
+
- [bf-date-input](../components/date-input.md)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# BfDateTimeInputHarness
|
|
2
|
+
|
|
3
|
+
Test harness for the date and time input: types or picks a date and time
|
|
4
|
+
|
|
5
|
+
Class from `@bitforgehq/ui/testing` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
Harness for `bf-datetime-input`. It reads and types the field as a user sees it and picks the
|
|
8
|
+
date in the popover's calendar and the time in its list.
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import { BfDateTimeInputHarness } from '@bitforgehq/ui/testing';
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Signature
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
class BfDateTimeInputHarness extends ComponentHarness
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Methods
|
|
21
|
+
|
|
22
|
+
### `getLabel(): Promise<string>`
|
|
23
|
+
|
|
24
|
+
The visible label without the required mark, else the field's `aria-label`.
|
|
25
|
+
|
|
26
|
+
### `getValue(): Promise<string>`
|
|
27
|
+
|
|
28
|
+
The field's text as the locale shows it ("14/10/2026, 09:30"); the ISO value in native mode.
|
|
29
|
+
|
|
30
|
+
### `setValue(text: string): Promise<void>`
|
|
31
|
+
|
|
32
|
+
Types a date and time as a user would: clears the field, then types each run of digits (or letters)
|
|
33
|
+
into the next part in the field's order, such as "14/10/2026, 09:30" in an en-GB field. In native mode it sets the
|
|
34
|
+
platform input to the ISO value.
|
|
35
|
+
|
|
36
|
+
| Parameter | Type | Description |
|
|
37
|
+
| --------- | -------- | ---------------------------------------- |
|
|
38
|
+
| `text` | `string` | The date and time as the field shows it. |
|
|
39
|
+
|
|
40
|
+
### `clear(): Promise<void>`
|
|
41
|
+
|
|
42
|
+
Clears every part with `Backspace`, as a user would.
|
|
43
|
+
|
|
44
|
+
### `isInvalid(): Promise<boolean>`
|
|
45
|
+
|
|
46
|
+
Whether the field shows its error state (`aria-invalid` on its parts or native input).
|
|
47
|
+
|
|
48
|
+
### `isDisabled(): Promise<boolean>`
|
|
49
|
+
|
|
50
|
+
Whether the field is disabled.
|
|
51
|
+
|
|
52
|
+
### `openPicker(): Promise<void>`
|
|
53
|
+
|
|
54
|
+
Opens the popover with a click on its button; throws when the field has none or it is disabled.
|
|
55
|
+
|
|
56
|
+
### `isPickerOpen(): Promise<boolean>`
|
|
57
|
+
|
|
58
|
+
Whether the popover is open (`aria-expanded` on its button).
|
|
59
|
+
|
|
60
|
+
### `pickDate(iso: string): Promise<void>`
|
|
61
|
+
|
|
62
|
+
Picks a date in the calendar as a user would: opens the popover (when closed), then picks the
|
|
63
|
+
day through the calendar's harness. The popover stays open, with focus on its time list.
|
|
64
|
+
|
|
65
|
+
| Parameter | Type | Description |
|
|
66
|
+
| --------- | -------- | ------------------------------------------- |
|
|
67
|
+
| `iso` | `string` | The ISO date to pick, such as '2026-11-03'. |
|
|
68
|
+
|
|
69
|
+
### `pickTime(time: string): Promise<void>`
|
|
70
|
+
|
|
71
|
+
Picks a time in the list as a user would: opens the popover (when closed), then clicks the
|
|
72
|
+
time, which closes it. Throws for a time the list does not hold (off the `step`) or disables.
|
|
73
|
+
|
|
74
|
+
| Parameter | Type | Description |
|
|
75
|
+
| --------- | -------- | -------------------------------------- |
|
|
76
|
+
| `time` | `string` | The ISO time to pick, such as '14:30'. |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# BfDateTimeInputPicker
|
|
2
|
+
|
|
3
|
+
Whether a date and time input offers a calendar and time list popover
|
|
4
|
+
|
|
5
|
+
Type from `@bitforgehq/ui/overlay` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
How `bf-datetime-input` picks a date and time besides typing: `popover` adds a button that
|
|
8
|
+
opens a calendar and a list of times side by side, `none` keeps the field typed only.
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import { type BfDateTimeInputPicker } from '@bitforgehq/ui/overlay';
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Signature
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
type BfDateTimeInputPicker = 'popover' | 'none'
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Values
|
|
21
|
+
|
|
22
|
+
- `popover`
|
|
23
|
+
- `none`
|
|
24
|
+
|
|
25
|
+
## Used by
|
|
26
|
+
|
|
27
|
+
- [bf-datetime-input](../components/datetime-input.md)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# BfDescriptionListLayout
|
|
2
|
+
|
|
3
|
+
The two description list layouts, divided label-value rows or a grid of tiles
|
|
4
|
+
|
|
5
|
+
Type from `@bitforgehq/ui` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
The layout of a `bf-description-list`: `rows` (label beside value, divided) or `grid` (tiles).
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { type BfDescriptionListLayout } from '@bitforgehq/ui';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type BfDescriptionListLayout = 'rows' | 'grid'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Values
|
|
20
|
+
|
|
21
|
+
- `rows`
|
|
22
|
+
- `grid`
|
|
23
|
+
|
|
24
|
+
## Used by
|
|
25
|
+
|
|
26
|
+
- [bf-description-list](../components/description-list.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# BfDonutSlice
|
|
2
|
+
|
|
3
|
+
One labelled slice of a donut chart with its value
|
|
4
|
+
|
|
5
|
+
Interface from `@bitforgehq/ui/charts` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
One slice of a `bf-donut-chart`.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { type BfDonutSlice } from '@bitforgehq/ui/charts';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
| Name | Type | Default | Description |
|
|
16
|
+
| ------- | -------- | -------- | ------------------------------------------------------------------------------------------------- |
|
|
17
|
+
| `label` | `string` | required | The slice name, shown in the legend, the tooltip and the data table. |
|
|
18
|
+
| `value` | `number` | required | The slice's value; its share of the total sets its angle. Zero and negative values draw no slice. |
|
|
19
|
+
|
|
20
|
+
## Used by
|
|
21
|
+
|
|
22
|
+
- [bf-donut-chart](../components/donut-chart.md)
|
|
@@ -12,26 +12,73 @@ import { type BfLabels } from '@bitforgehq/ui';
|
|
|
12
12
|
|
|
13
13
|
## Properties
|
|
14
14
|
|
|
15
|
-
| Name
|
|
16
|
-
|
|
|
17
|
-
| `loading`
|
|
18
|
-
| `dismiss`
|
|
19
|
-
| `tabBar`
|
|
20
|
-
| `tabBadge`
|
|
21
|
-
| `back`
|
|
22
|
-
| `ok`
|
|
23
|
-
| `cancel`
|
|
24
|
-
| `actions`
|
|
25
|
-
| `sheet`
|
|
26
|
-
| `modal`
|
|
27
|
-
| `refreshing`
|
|
28
|
-
| `close`
|
|
29
|
-
| `expand`
|
|
30
|
-
| `collapse`
|
|
31
|
-
| `sheetPosition`
|
|
32
|
-
| `dialog`
|
|
33
|
-
| `notifications`
|
|
34
|
-
| `
|
|
15
|
+
| Name | Type | Default | Description |
|
|
16
|
+
| ----------------------- | --------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
|
17
|
+
| `loading` | `string` | `'Loading'` | bf-spinner's accessible name (a loading bf-button's spinner is decorative and has none). |
|
|
18
|
+
| `dismiss` | `string` | `'Dismiss'` | bf-alert's dismiss button. |
|
|
19
|
+
| `tabBar` | `string` | `'Main'` | bf-tab-bar's navigation name. |
|
|
20
|
+
| `tabBadge` | `(count: number) => string` | `` (count) => `${count} new` `` | bf-tab's announcement of a numeric badge. |
|
|
21
|
+
| `back` | `string` | `'Back'` | bf-back-button's label. |
|
|
22
|
+
| `ok` | `string` | `'OK'` | BfAlertDialogService's default button. |
|
|
23
|
+
| `cancel` | `string` | `'Cancel'` | BfActionSheetService's cancel row. |
|
|
24
|
+
| `actions` | `string` | `'Actions'` | An action sheet's name when it has no title. |
|
|
25
|
+
| `sheet` | `string` | `'Sheet'` | bf-sheet's name without an ariaLabel or heading. |
|
|
26
|
+
| `modal` | `string` | `'Modal'` | bf-modal's name without an ariaLabel or heading. |
|
|
27
|
+
| `refreshing` | `string` | `'Refreshing'` | bf-refresher's status while refreshing. |
|
|
28
|
+
| `close` | `string` | `'Close'` | bf-dialog's and bf-side-panel's close button, and bf-sheet's screen-reader Close. |
|
|
29
|
+
| `expand` | `string` | `'Expand'` | bf-sheet's grabber button below the top snap point: the next press expands the sheet. |
|
|
30
|
+
| `collapse` | `string` | `'Collapse'` | bf-sheet's grabber button at the top snap point: the next press collapses the sheet. |
|
|
31
|
+
| `sheetPosition` | `(position: number, count: number) => string` | `` (position, count) => `Sheet at ${position} of ${count}` `` | bf-sheet's snap position (1-based), announced politely when it changes and part of the grabber button's name. |
|
|
32
|
+
| `dialog` | `string` | `'Dialog'` | A dialog's or side panel's name without an ariaLabel, a title or a heading. |
|
|
33
|
+
| `notifications` | `string` | `'Notifications'` | The desktop toast stack's region name. |
|
|
34
|
+
| `tableSelectAll` | `string` | `'Select all rows'` | bf-table's header checkbox, which selects or clears every row. |
|
|
35
|
+
| `theme` | `string` | `'Theme'` | bf-theme-switch's and bf-theme-menu-button's name without a label. |
|
|
36
|
+
| `themeSystem` | `string` | `'System'` | The theme choice that follows the system's colour scheme. |
|
|
37
|
+
| `themeLight` | `string` | `'Light'` | The theme choice that forces the light colour scheme. |
|
|
38
|
+
| `themeDark` | `string` | `'Dark'` | The theme choice that forces the dark colour scheme. |
|
|
39
|
+
| `breadcrumb` | `string` | `'Breadcrumb'` | bf-breadcrumb's navigation name. |
|
|
40
|
+
| `breadcrumbExpand` | `(count: number) => string` | ``(count) => (count === 1 ? 'Show 1 more level' : `Show ${count} more levels`)`` | bf-breadcrumb's ellipsis button, which shows the levels a `maxItems` trail hides. |
|
|
41
|
+
| `navigation` | `string` | `'Main'` | bf-sidebar's and bf-top-nav's navigation name. |
|
|
42
|
+
| `navBadge` | `(count: number) => string` | `` (count) => `${count} new` `` | a[bfNavItem]'s announcement of its count badge. |
|
|
43
|
+
| `pagination` | `string` | `'Pagination'` | bf-pagination's navigation name. |
|
|
44
|
+
| `previousPage` | `string` | `'Previous page'` | bf-pagination's button to the previous page. |
|
|
45
|
+
| `nextPage` | `string` | `'Next page'` | bf-pagination's button to the next page. |
|
|
46
|
+
| `pageOf` | `(page: number, count: number) => string` | `` (page, count) => `Page ${page} of ${count}` `` | bf-pagination's compact position text, such as "Page 3 of 12". |
|
|
47
|
+
| `goToPage` | `(page: number) => string` | `` (page) => `Page ${page}` `` | bf-pagination's name of one page button, such as "Page 3". |
|
|
48
|
+
| `tabGroup` | `string` | `'Tabs'` | bf-tab-group's tablist name. |
|
|
49
|
+
| `calendarPreviousMonth` | `string` | `'Previous month'` | bf-calendar's button that shows the previous month. |
|
|
50
|
+
| `calendarNextMonth` | `string` | `'Next month'` | bf-calendar's button that shows the next month. |
|
|
51
|
+
| `calendarChooseMonth` | `string` | `'Choose month'` | bf-calendar's title button in the day view, which opens the month view; read after the visible month and year. |
|
|
52
|
+
| `calendarChooseYear` | `string` | `'Choose year'` | bf-calendar's title button in the month view, which opens the year view; read after the visible year. |
|
|
53
|
+
| `statTrendUp` | `string` | `'Up'` | bf-stat's hidden direction word before an upward delta, so colour is never the only signal. |
|
|
54
|
+
| `statTrendDown` | `string` | `'Down'` | bf-stat's hidden direction word before a downward delta. |
|
|
55
|
+
| `statTrendFlat` | `string` | `'No change'` | bf-stat's hidden direction word before an unchanged (flat) delta. |
|
|
56
|
+
| `comboboxEmpty` | `string` | `'No results'` | bf-combobox's and bf-multi-combobox's list row when no option matches the typed text. |
|
|
57
|
+
| `comboboxRemove` | `(label: string) => string` | `` (label) => `Remove ${label}` `` | bf-multi-combobox's remove button on a picked value's tag. |
|
|
58
|
+
| `dateInputDay` | `string` | `'Day'` | The day part of bf-date-input and bf-datetime-input; its first letter is the part's placeholder ("dd"). |
|
|
59
|
+
| `dateInputMonth` | `string` | `'Month'` | The month part of bf-date-input and bf-datetime-input; its first letter is the part's placeholder ("mm"). |
|
|
60
|
+
| `dateInputYear` | `string` | `'Year'` | The year part of bf-date-input and bf-datetime-input; its first letter is the part's placeholder ("yyyy"). |
|
|
61
|
+
| `dateInputOpenCalendar` | `string` | `'Choose date'` | The button of bf-date-input and bf-datetime-input that opens the calendar, and the panel's name. |
|
|
62
|
+
| `dateInputInvalid` | `string` | `'Enter a valid date'` | The error of bf-date-input and bf-datetime-input while the date is incomplete or does not exist (31 February). |
|
|
63
|
+
| `dateInputUnavailable` | `string` | `'This date is not available'` | The error of bf-date-input and bf-datetime-input for a typed date that `disabledDate` rules out. |
|
|
64
|
+
| `timeInputHour` | `string` | `'Hour'` | The hour part of bf-time-input and bf-datetime-input; its first letter is the part's placeholder ("hh"). |
|
|
65
|
+
| `timeInputMinute` | `string` | `'Minute'` | The minute part of bf-time-input and bf-datetime-input; its first letter is the part's placeholder ("mm"). |
|
|
66
|
+
| `timeInputSecond` | `string` | `'Second'` | The second part of bf-time-input with `seconds`; its first letter is the part's placeholder ("ss"). |
|
|
67
|
+
| `timeInputDayPeriod` | `string` | `'AM/PM'` | The AM/PM part of bf-time-input and bf-datetime-input under a 12-hour clock. |
|
|
68
|
+
| `timeInputOpenList` | `string` | `'Choose time'` | The button of bf-time-input that opens the list of times, and the list's name. |
|
|
69
|
+
| `timeInputInvalid` | `string` | `'Enter a valid time'` | The error of bf-time-input and bf-datetime-input while the time is incomplete. |
|
|
70
|
+
| `timeInputMin` | `(time: string) => string` | `` (time) => `Pick ${time} or later` `` | The error of bf-time-input and bf-datetime-input below `min`, given the limit as the locale writes it. |
|
|
71
|
+
| `timeInputMax` | `(time: string) => string` | `` (time) => `Pick ${time} or earlier` `` | The error of bf-time-input and bf-datetime-input above `max`, given the limit as the locale writes it. |
|
|
72
|
+
| `chart` | `string` | `'Chart'` | The name of a chart from `@bitforgehq/ui/charts` that has no `label` (and no `bf-chart-card` title). |
|
|
73
|
+
| `chartLegend` | `string` | `'Legend'` | The name of a chart's legend, the group of buttons that show and hide its series. |
|
|
74
|
+
| `chartValues` | `string` | `'Data points, arrow keys move between them'` | The name of a chart's plot, the focusable area whose arrow keys move between the values. |
|
|
75
|
+
| `chartShowData` | `string` | `'Show data'` | A chart's button that shows its data as a table. |
|
|
76
|
+
| `chartHideData` | `string` | `'Hide data'` | A chart's button that hides its data table again. |
|
|
77
|
+
| `chartCategory` | `string` | `'Category'` | The first column header of a chart's data table. |
|
|
78
|
+
| `chartValue` | `string` | `'Value'` | The value column header of a bf-donut-chart's data table. |
|
|
79
|
+
| `chartEmpty` | `string` | `'No data to show'` | bf-chart-card's text when it has no data and no `empty` slot. |
|
|
80
|
+
| `chartError` | `string` | `'The data could not be loaded'` | bf-chart-card's text when its data failed to load and it has no `error` slot. |
|
|
81
|
+
| `validation` | `BfValidationMessages` | required | Default error text per validator kind (see `BfValidationMessages`). |
|
|
35
82
|
|
|
36
83
|
## Uses
|
|
37
84
|
|
|
@@ -14,37 +14,38 @@ import { type BfOverlayOptions } from '@bitforgehq/ui/overlay';
|
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
| Name | Type
|
|
18
|
-
| ------------------- |
|
|
19
|
-
| `data` | `unknown`
|
|
20
|
-
| `panelClass` | `string[]`
|
|
21
|
-
| `backdrop` | `boolean`
|
|
22
|
-
| `backdropClass` | `string`
|
|
23
|
-
| `dismissOnBackdrop` | `boolean`
|
|
24
|
-
| `dismissOnEscape` | `boolean`
|
|
25
|
-
| `onEscape` | `() => void`
|
|
26
|
-
| `role` | `BfOverlayRole` (`'dialog' \| 'alertdialog' \| 'status'`)
|
|
27
|
-
| `ariaLabel` | `string`
|
|
28
|
-
| `ariaLabelledBy` | `string`
|
|
29
|
-
| `ariaDescribedBy` | `string`
|
|
30
|
-
| `trapFocus` | `boolean`
|
|
31
|
-
| `autoFocus` | `BfOverlayAutoFocus` (`'first-tabbable' \| 'panel'`)
|
|
32
|
-
| `restoreFocus` | `boolean`
|
|
33
|
-
| `position` | `
|
|
34
|
-
| `closeOnNavigation` | `boolean`
|
|
35
|
-
| `onNavigation` | `() => void`
|
|
36
|
-
| `backPriority` | `number`
|
|
37
|
-
| `countsAsModal` | `boolean`
|
|
38
|
-
| `passive` | `boolean`
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
17
|
+
| Name | Type | Default | Description |
|
|
18
|
+
| ------------------- | ------------------------------------------------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
+
| `data` | `unknown` | | Injected into the content as `BF_OVERLAY_DATA`. |
|
|
20
|
+
| `panelClass` | `string[]` | | Extra classes on the panel (it always carries `bf-overlay-panel`). |
|
|
21
|
+
| `backdrop` | `boolean` | `true` | Renders a backdrop behind the panel (default true; never for passive overlays). |
|
|
22
|
+
| `backdropClass` | `string` | `'bf-overlay-backdrop'` | Class of the backdrop (default `bf-overlay-backdrop`: a black scrim, 40 % light / 60 % dark). |
|
|
23
|
+
| `dismissOnBackdrop` | `boolean` | `true` | A backdrop click closes the overlay (default true). |
|
|
24
|
+
| `dismissOnEscape` | `boolean` | `true` | `Escape` closes the overlay (default true). |
|
|
25
|
+
| `onEscape` | `() => void` | | Runs instead of closing when the overlay is on top and `Escape` is pressed (e.g. an alert resolving with its cancel button). The key is always claimed by the topmost non-passive overlay, so it never reaches an overlay underneath. |
|
|
26
|
+
| `role` | `BfOverlayRole` (`'dialog' \| 'alertdialog' \| 'status'`) | `'dialog'` | Role of the panel (default `dialog`; passive overlays get none unless one is given — a toast is announced through `LiveAnnouncer`). |
|
|
27
|
+
| `ariaLabel` | `string` | | Accessible name of the panel. |
|
|
28
|
+
| `ariaLabelledBy` | `string` | | Id of the element naming the panel. Dropped after the content renders when no element inside the panel carries it and `ariaLabel` is unset, so the panel never points at nothing. |
|
|
29
|
+
| `ariaDescribedBy` | `string` | | Id of the element describing the panel (an alert's message). |
|
|
30
|
+
| `trapFocus` | `boolean` | `true` | Traps Tab focus inside the panel (default true). |
|
|
31
|
+
| `autoFocus` | `BfOverlayAutoFocus` (`'first-tabbable' \| 'panel'`) | `'first-tabbable'` | Where focus goes on open (non-passive overlays): `first-tabbable` (default) — the element marked `[autofocus]`/`[cdkFocusInitial]` when it is focusable (a control, or any element with a `tabindex`, also `-1`), else the first tabbable element inside it, else (all its controls disabled) the first tabbable element of the panel, else the panel; `panel` — the panel itself, so a long text is read from its start (APG dialog pattern). `first-tabbable` skips the library's own container controls (`bf-sheet`'s hidden Close and grabber button, marked with the internal `data-bf-overlay-chrome`): they stay in the Tab order but never take the initial focus, so it lands on your content. |
|
|
32
|
+
| `restoreFocus` | `boolean` | `true` | Returns focus to the previously focused element on close (default true); when that element is gone, to the topmost overlay still open, else focus stays on the body (move it yourself, e.g. to the next row after a delete). |
|
|
33
|
+
| `position` | `BfOverlayPlacement` (`'bottom' \| 'center' \| 'top' \| 'fullscreen' \| 'end'`) | `'center'` | Placement of the panel (default `center`); `end` is full height at the inline end edge. |
|
|
34
|
+
| `closeOnNavigation` | `boolean` | `true` | Closes the overlay when the URL path changes (default true; false for passive overlays): a router navigation, a link, the browser's back and forward buttons. Query- or fragment-only changes never close; a matrix-parameter change (`/a;x=1`) is a path change and closes. Read from `Location.onUrlChange()`, so no router is needed, and a `history.pushState()` made outside Angular's `Location` is not seen. An overlay opened before the first navigation ends (root component, `APP_INITIALIZER`) closes when the start URL redirects: open it after the first `NavigationEnd`, or pass false. |
|
|
35
|
+
| `onNavigation` | `() => void` | | Runs instead of `close()` when a navigation closes the overlay (e.g. an alert answering with its cancel id); it should close the overlay. |
|
|
36
|
+
| `backPriority` | `number` | `100` | Priority of the hardware back handler that closes the overlay (default 100). |
|
|
37
|
+
| `countsAsModal` | `boolean` | `false` | Counts towards `BfOverlayStack.depth()` / `--bf-modal-depth` (default false). |
|
|
38
|
+
| `passive` | `boolean` | `false` | A passive overlay (a toast) has no backdrop, no focus trap, does not move focus, does not count in `BfOverlayStack.count()`, registers no back handler and leaves the page interactive. |
|
|
39
|
+
| `modal` | `boolean` | `true` | A modal overlay (default true) has a backdrop, traps focus, is `aria-modal`, blocks document scroll and makes the page behind it `inert`. A non-modal one (a side panel beside the page) has none of these and is not in `BfOverlayStack`: focus moves in, the page stays usable, `Escape` closes it only while focus is inside it, and on close focus returns to the opener only from inside it. Ignored for passive overlays. |
|
|
40
|
+
| `enter` | `(el: HTMLElement) => Animation \| null` | `fadeIn` | Enter animation of the panel (default `fadeIn`); return null for none. |
|
|
41
|
+
| `exit` | `(el: HTMLElement) => Animation \| null` | `fadeOut` | Exit animation of the panel (default `fadeOut`), awaited before detaching. |
|
|
42
|
+
| `injector` | `Injector` | | Parent of the content's injector (default the root injector), so the content resolves the opener's providers, e.g. a feature-level `provideBfLabels()`. |
|
|
43
|
+
| `providers` | `(ref: BfOverlayRef<unknown>) => StaticProvider[]` | | Extra providers of the content's injector, next to `BF_OVERLAY_DATA` and `BfOverlayRef`, built with the new overlay's ref (e.g. a typed ref of a service built on the core). |
|
|
43
44
|
|
|
44
45
|
## Uses
|
|
45
46
|
|
|
46
47
|
- [BfOverlayAutoFocus](bf-overlay-auto-focus.md)
|
|
47
|
-
- [
|
|
48
|
+
- [BfOverlayPlacement](bf-overlay-placement.md)
|
|
48
49
|
- [BfOverlayRef](bf-overlay-ref.md)
|
|
49
50
|
- [BfOverlayRole](bf-overlay-role.md)
|
|
50
51
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# BfOverlayPlacement
|
|
2
|
+
|
|
3
|
+
Where an overlay panel sits: a viewport position or full height at the end
|
|
4
|
+
|
|
5
|
+
Type from `@bitforgehq/ui/overlay` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
Where an overlay panel sits: a `BfOverlayPosition`, or `end`, full height against the inline
|
|
8
|
+
end edge of the viewport (the right in a left-to-right page, the left under `dir="rtl"`).
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import { type BfOverlayPlacement } from '@bitforgehq/ui/overlay';
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Signature
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
type BfOverlayPlacement = BfOverlayPosition | 'end'
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Values
|
|
21
|
+
|
|
22
|
+
- `bottom`
|
|
23
|
+
- `center`
|
|
24
|
+
- `top`
|
|
25
|
+
- `fullscreen`
|
|
26
|
+
- `end`
|
|
27
|
+
|
|
28
|
+
## Uses
|
|
29
|
+
|
|
30
|
+
- [BfOverlayPosition](bf-overlay-position.md)
|
|
31
|
+
|
|
32
|
+
## Used by
|
|
33
|
+
|
|
34
|
+
- [BfOverlayOptions](bf-overlay-options.md)
|
|
@@ -18,9 +18,11 @@ unless the host handles the system back itself (`handlesSystemBack`). An overlay
|
|
|
18
18
|
close on it (`dismissOnEscape: false` without `onEscape`, or an `onEscape` that keeps it open)
|
|
19
19
|
swallows Android web back for as long as it is open, as a non-dismissible sheet swallows the
|
|
20
20
|
hardware back button. A navigation to another URL path closes every non-passive
|
|
21
|
-
overlay (`closeOnNavigation`, read from `Location`, so no router is needed).
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
overlay (`closeOnNavigation`, read from `Location`, so no router is needed). `modal: false`
|
|
22
|
+
(a side panel beside the page) drops the backdrop, the trap, `aria-modal`, the scroll lock and
|
|
23
|
+
the `inert` page. The content injects `BF_OVERLAY_DATA` and `BfOverlayRef` (plus any
|
|
24
|
+
`providers`). `BfDialogService`, `BfSidePanelService` and the `/mobile` sheet, modal, toast,
|
|
25
|
+
action sheet and alert services build on it.
|
|
24
26
|
|
|
25
27
|
```ts
|
|
26
28
|
import { BfOverlayService } from '@bitforgehq/ui/overlay';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# BfPageHeaderHeadingLevel
|
|
2
|
+
|
|
3
|
+
The heading level of a page header title, one for a page or two
|
|
4
|
+
|
|
5
|
+
Type from `@bitforgehq/ui` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
The heading level of a `bf-page-header` title: `1` for the page, `2` for a section header.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { type BfPageHeaderHeadingLevel } from '@bitforgehq/ui';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type BfPageHeaderHeadingLevel = 1 | 2
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Values
|
|
20
|
+
|
|
21
|
+
- `1`
|
|
22
|
+
- `2`
|
|
23
|
+
|
|
24
|
+
## Used by
|
|
25
|
+
|
|
26
|
+
- [bf-page-header](../components/page-header.md)
|