@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,33 @@
|
|
|
1
|
+
# BfEmptyStateHeading
|
|
2
|
+
|
|
3
|
+
The heading level of an empty state title, one for a whole page
|
|
4
|
+
|
|
5
|
+
Type from `@bitforgehq/ui` · since 0.3.2
|
|
6
|
+
|
|
7
|
+
The heading level a `bf-empty-state` title takes: a `BfEmptyStateHeadingLevel`, or `1` when the
|
|
8
|
+
empty state is the page itself (a not-found or no-access page). A new type, so `Record`s over
|
|
9
|
+
the released `BfEmptyStateHeadingLevel` keep compiling.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { type BfEmptyStateHeading } from '@bitforgehq/ui';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Signature
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
type BfEmptyStateHeading = BfEmptyStateHeadingLevel | 1
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Values
|
|
22
|
+
|
|
23
|
+
- `2`
|
|
24
|
+
- `3`
|
|
25
|
+
- `1`
|
|
26
|
+
|
|
27
|
+
## Uses
|
|
28
|
+
|
|
29
|
+
- [BfEmptyStateHeadingLevel](bf-empty-state-heading-level.md)
|
|
30
|
+
|
|
31
|
+
## Used by
|
|
32
|
+
|
|
33
|
+
- [bf-empty-state](../components/empty-state.md)
|
|
@@ -12,26 +12,79 @@ 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
|
+
| `tableSortBy` | `string` | `'Sort by'` | The label of a stacked bf-table's sort select. |
|
|
36
|
+
| `tableSortAscending` | `(column: string) => string` | `` (column) => `${column}, ascending` `` | A stacked bf-table's sort option for a column in ascending order. |
|
|
37
|
+
| `tableSortDescending` | `(column: string) => string` | `` (column) => `${column}, descending` `` | A stacked bf-table's sort option for a column in descending order. |
|
|
38
|
+
| `theme` | `string` | `'Theme'` | bf-theme-switch's and bf-theme-menu-button's name without a label. |
|
|
39
|
+
| `themeSystem` | `string` | `'System'` | The theme choice that follows the system's colour scheme. |
|
|
40
|
+
| `themeLight` | `string` | `'Light'` | The theme choice that forces the light colour scheme. |
|
|
41
|
+
| `themeDark` | `string` | `'Dark'` | The theme choice that forces the dark colour scheme. |
|
|
42
|
+
| `breadcrumb` | `string` | `'Breadcrumb'` | bf-breadcrumb's navigation name. |
|
|
43
|
+
| `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. |
|
|
44
|
+
| `navigation` | `string` | `'Main'` | bf-sidebar's and bf-top-nav's navigation name. |
|
|
45
|
+
| `navBadge` | `(count: number) => string` | `` (count) => `${count} new` `` | a[bfNavItem]'s announcement of its count badge. |
|
|
46
|
+
| `sidebarCollapse` | `string` | `'Collapse sidebar'` | bf-sidebar-toggle's name and tooltip while the sidebar is expanded. |
|
|
47
|
+
| `sidebarExpand` | `string` | `'Expand sidebar'` | bf-sidebar-toggle's name and tooltip while the sidebar is an icon rail. |
|
|
48
|
+
| `skipToContent` | `string` | `'Skip to main content'` | bf-app-frame's skip link, the first stop of the tab order, which moves focus to the content. |
|
|
49
|
+
| `pagination` | `string` | `'Pagination'` | bf-pagination's navigation name. |
|
|
50
|
+
| `previousPage` | `string` | `'Previous page'` | bf-pagination's button to the previous page. |
|
|
51
|
+
| `nextPage` | `string` | `'Next page'` | bf-pagination's button to the next page. |
|
|
52
|
+
| `pageOf` | `(page: number, count: number) => string` | `` (page, count) => `Page ${page} of ${count}` `` | bf-pagination's compact position text, such as "Page 3 of 12". |
|
|
53
|
+
| `goToPage` | `(page: number) => string` | `` (page) => `Page ${page}` `` | bf-pagination's name of one page button, such as "Page 3". |
|
|
54
|
+
| `tabGroup` | `string` | `'Tabs'` | bf-tab-group's tablist name. |
|
|
55
|
+
| `calendarPreviousMonth` | `string` | `'Previous month'` | bf-calendar's button that shows the previous month. |
|
|
56
|
+
| `calendarNextMonth` | `string` | `'Next month'` | bf-calendar's button that shows the next month. |
|
|
57
|
+
| `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. |
|
|
58
|
+
| `calendarChooseYear` | `string` | `'Choose year'` | bf-calendar's title button in the month view, which opens the year view; read after the visible year. |
|
|
59
|
+
| `statTrendUp` | `string` | `'Up'` | bf-stat's hidden direction word before an upward delta, so colour is never the only signal. |
|
|
60
|
+
| `statTrendDown` | `string` | `'Down'` | bf-stat's hidden direction word before a downward delta. |
|
|
61
|
+
| `statTrendFlat` | `string` | `'No change'` | bf-stat's hidden direction word before an unchanged (flat) delta. |
|
|
62
|
+
| `comboboxEmpty` | `string` | `'No results'` | bf-combobox's and bf-multi-combobox's list row when no option matches the typed text. |
|
|
63
|
+
| `comboboxRemove` | `(label: string) => string` | `` (label) => `Remove ${label}` `` | bf-multi-combobox's remove button on a picked value's tag. |
|
|
64
|
+
| `dateInputDay` | `string` | `'Day'` | The day part of bf-date-input and bf-datetime-input; its first letter is the part's placeholder ("dd"). |
|
|
65
|
+
| `dateInputMonth` | `string` | `'Month'` | The month part of bf-date-input and bf-datetime-input; its first letter is the part's placeholder ("mm"). |
|
|
66
|
+
| `dateInputYear` | `string` | `'Year'` | The year part of bf-date-input and bf-datetime-input; its first letter is the part's placeholder ("yyyy"). |
|
|
67
|
+
| `dateInputOpenCalendar` | `string` | `'Choose date'` | The button of bf-date-input and bf-datetime-input that opens the calendar, and the panel's name. |
|
|
68
|
+
| `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). |
|
|
69
|
+
| `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. |
|
|
70
|
+
| `timeInputHour` | `string` | `'Hour'` | The hour part of bf-time-input and bf-datetime-input; its first letter is the part's placeholder ("hh"). |
|
|
71
|
+
| `timeInputMinute` | `string` | `'Minute'` | The minute part of bf-time-input and bf-datetime-input; its first letter is the part's placeholder ("mm"). |
|
|
72
|
+
| `timeInputSecond` | `string` | `'Second'` | The second part of bf-time-input with `seconds`; its first letter is the part's placeholder ("ss"). |
|
|
73
|
+
| `timeInputDayPeriod` | `string` | `'AM/PM'` | The AM/PM part of bf-time-input and bf-datetime-input under a 12-hour clock. |
|
|
74
|
+
| `timeInputOpenList` | `string` | `'Choose time'` | The button of bf-time-input that opens the list of times, and the list's name. |
|
|
75
|
+
| `timeInputInvalid` | `string` | `'Enter a valid time'` | The error of bf-time-input and bf-datetime-input while the time is incomplete. |
|
|
76
|
+
| `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. |
|
|
77
|
+
| `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. |
|
|
78
|
+
| `chart` | `string` | `'Chart'` | The name of a chart from `@bitforgehq/ui/charts` that has no `label` (and no `bf-chart-card` title). |
|
|
79
|
+
| `chartLegend` | `string` | `'Legend'` | The name of a chart's legend, the group of buttons that show and hide its series. |
|
|
80
|
+
| `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. |
|
|
81
|
+
| `chartShowData` | `string` | `'Show data'` | A chart's button that shows its data as a table. |
|
|
82
|
+
| `chartHideData` | `string` | `'Hide data'` | A chart's button that hides its data table again. |
|
|
83
|
+
| `chartCategory` | `string` | `'Category'` | The first column header of a chart's data table. |
|
|
84
|
+
| `chartValue` | `string` | `'Value'` | The value column header of a bf-donut-chart's data table. |
|
|
85
|
+
| `chartEmpty` | `string` | `'No data to show'` | bf-chart-card's text when it has no data and no `empty` slot. |
|
|
86
|
+
| `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. |
|
|
87
|
+
| `validation` | `BfValidationMessages` | required | Default error text per validator kind (see `BfValidationMessages`). |
|
|
35
88
|
|
|
36
89
|
## Uses
|
|
37
90
|
|
|
@@ -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)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# BfPaginationHarness
|
|
2
|
+
|
|
3
|
+
Test harness for pagination: reads the current page and moves between pages
|
|
4
|
+
|
|
5
|
+
Class from `@bitforgehq/ui/testing` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
Harness for `bf-pagination`. It reads the current page and the page count as numbers, so a test
|
|
8
|
+
never parses the "Page 3 of 12" text, and clicks the buttons as a user would.
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import { BfPaginationHarness } from '@bitforgehq/ui/testing';
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Signature
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
class BfPaginationHarness extends ComponentHarness
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Methods
|
|
21
|
+
|
|
22
|
+
### `getLabel(): Promise<string>`
|
|
23
|
+
|
|
24
|
+
The navigation's accessible name (`label`, else "Pagination").
|
|
25
|
+
|
|
26
|
+
### `getCurrentPage(): Promise<number>`
|
|
27
|
+
|
|
28
|
+
The page shown as current, 1-based.
|
|
29
|
+
|
|
30
|
+
### `getPageCount(): Promise<number>`
|
|
31
|
+
|
|
32
|
+
The number of pages in effect (`pageCount`, else `total` over `pageSize`, at least 1).
|
|
33
|
+
|
|
34
|
+
### `getVisiblePages(): Promise<number[]>`
|
|
35
|
+
|
|
36
|
+
The page numbers the row shows right now, in order, without the gaps; empty when compact.
|
|
37
|
+
|
|
38
|
+
### `goTo(page: number): Promise<void>`
|
|
39
|
+
|
|
40
|
+
Clicks the button of this page, as a user would. Throws when the row does not show it (behind
|
|
41
|
+
a gap, or in a compact pagination).
|
|
42
|
+
|
|
43
|
+
| Parameter | Type | Description |
|
|
44
|
+
| --------- | -------- | -------------------------- |
|
|
45
|
+
| `page` | `number` | The 1-based page to go to. |
|
|
46
|
+
|
|
47
|
+
### `next(): Promise<void>`
|
|
48
|
+
|
|
49
|
+
Clicks Next. Throws on the last page, where the button is disabled.
|
|
50
|
+
|
|
51
|
+
### `previous(): Promise<void>`
|
|
52
|
+
|
|
53
|
+
Clicks Previous. Throws on the first page, where the button is disabled.
|
|
54
|
+
|
|
55
|
+
### `isPreviousDisabled(): Promise<boolean>`
|
|
56
|
+
|
|
57
|
+
Whether Previous is disabled (on the first page).
|
|
58
|
+
|
|
59
|
+
### `isNextDisabled(): Promise<boolean>`
|
|
60
|
+
|
|
61
|
+
Whether Next is disabled (on the last page).
|
|
@@ -6,15 +6,17 @@ Service from `@bitforgehq/ui/mobile` · since 0.2.0
|
|
|
6
6
|
|
|
7
7
|
Platform facts and the app theme: native or web, iOS or Android, the shell mode that follows
|
|
8
8
|
from it, and the user's theme choice (system, light, dark) reflected as the `dark` class on
|
|
9
|
-
`<html>`.
|
|
10
|
-
theme
|
|
9
|
+
`<html>`. The theme is `BfColorSchemeService` from `@bitforgehq/ui` (the Capacitor-free colour
|
|
10
|
+
scheme a desktop app uses through `provideBfColorScheme()`): `theme` and `dark` are its
|
|
11
|
+
`scheme` and `dark` signals, and `matchMedia('(prefers-color-scheme: dark)')` is the single
|
|
12
|
+
source for the system theme on every platform.
|
|
11
13
|
|
|
12
14
|
The `theme`/`dark` signals always compute, but the `<html>` class and storage writes
|
|
13
|
-
only run when `provideBfShell()` provided `BF_SHELL_CONFIG`
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
only run when `provideBfShell()` provided `BF_SHELL_CONFIG` (or the app provided
|
|
16
|
+
`provideBfColorScheme()`) — i.e. this service is the app's own shell, not merely injected by
|
|
17
|
+
something that wants `platform`/`mode`. Without it (e.g. a docs demo that instantiates
|
|
18
|
+
`BfPlatformService` directly to preview `bf-tabs`), this service would otherwise fight the host
|
|
19
|
+
page's own theme, overwriting `<html class="dark">` with whatever `prefers-color-scheme` says.
|
|
18
20
|
|
|
19
21
|
With `provideBfShell()` on a native platform it also makes the viewport meta forbid zoom
|
|
20
22
|
(`maximum-scale=1, user-scalable=no`, other directives kept; the meta is created if missing):
|
|
@@ -34,19 +36,19 @@ import { BfPlatformService } from '@bitforgehq/ui/mobile';
|
|
|
34
36
|
|
|
35
37
|
## Properties
|
|
36
38
|
|
|
37
|
-
| Name | Type | Default | Description
|
|
38
|
-
| ---------- | -------------------------------------------- | ------- |
|
|
39
|
-
| `isNative` | `boolean` | | True inside the native iOS or Android app, false in a browser.
|
|
40
|
-
| `platform` | `BfPlatform` (`'ios' \| 'android' \| 'web'`) | | The platform the app runs on.
|
|
41
|
-
| `mode` | `Signal<BfShellMode>` | | The platform's shell mode: `ios` on iOS, else `md`; `resolveShellMode()` applies the config.
|
|
42
|
-
| `theme` | `WritableSignal<
|
|
43
|
-
| `dark` | `Signal<boolean>` | | Whether the app is dark now: the theme choice, or the system's under `system`.
|
|
39
|
+
| Name | Type | Default | Description |
|
|
40
|
+
| ---------- | -------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
41
|
+
| `isNative` | `boolean` | | True inside the native iOS or Android app, false in a browser. |
|
|
42
|
+
| `platform` | `BfPlatform` (`'ios' \| 'android' \| 'web'`) | | The platform the app runs on. |
|
|
43
|
+
| `mode` | `Signal<BfShellMode>` | | The platform's shell mode: `ios` on iOS, else `md`; `resolveShellMode()` applies the config. |
|
|
44
|
+
| `theme` | `WritableSignal<BfColorScheme>` | | The user's theme choice, stored in `BF_THEME_STORAGE` (`localStorage`); set it with `theme.set(…)`. The same signal as `BfColorSchemeService.scheme`. |
|
|
45
|
+
| `dark` | `Signal<boolean>` | | Whether the app is dark now: the theme choice, or the system's under `system`. The same signal as `BfColorSchemeService.dark`. |
|
|
44
46
|
|
|
45
47
|
## Uses
|
|
46
48
|
|
|
49
|
+
- [BfColorScheme](bf-color-scheme.md)
|
|
47
50
|
- [BfPlatform](bf-platform.md)
|
|
48
51
|
- [BfShellMode](bf-shell-mode.md)
|
|
49
|
-
- [BfTheme](bf-theme.md)
|
|
50
52
|
|
|
51
53
|
## Used by
|
|
52
54
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# BfPopoverHarness
|
|
2
|
+
|
|
3
|
+
Test harness for a popover: opens and closes it and reads its panel
|
|
4
|
+
|
|
5
|
+
Class from `@bitforgehq/ui/testing` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
Harness for an element with a `[bfPopoverTriggerFor]` and the `bf-popover` it opens, which
|
|
8
|
+
renders in the CDK overlay container while open (found through the trigger's
|
|
9
|
+
`aria-controls`). Its `label` filter matches the trigger's accessible name (`aria-label`, else
|
|
10
|
+
its text).
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { BfPopoverHarness } from '@bitforgehq/ui/testing';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Signature
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
class BfPopoverHarness extends ComponentHarness
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Methods
|
|
23
|
+
|
|
24
|
+
### `getLabel(): Promise<string>`
|
|
25
|
+
|
|
26
|
+
The trigger's accessible name: its control's `aria-label`, else its text.
|
|
27
|
+
|
|
28
|
+
### `open(): Promise<void>`
|
|
29
|
+
|
|
30
|
+
Opens the popover with a click; does nothing while it is open.
|
|
31
|
+
|
|
32
|
+
### `close(): Promise<void>`
|
|
33
|
+
|
|
34
|
+
Closes the popover with `Escape`, as a user would; does nothing while it is closed.
|
|
35
|
+
|
|
36
|
+
### `isOpen(): Promise<boolean>`
|
|
37
|
+
|
|
38
|
+
Whether the popover is open (`aria-expanded`).
|
|
39
|
+
|
|
40
|
+
### `getPanelText(): Promise<string>`
|
|
41
|
+
|
|
42
|
+
The open panel's text, opening it first when it is closed.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# BfPopoverPlacement
|
|
2
|
+
|
|
3
|
+
Where a popover opens against its trigger, above or below, at either end
|
|
4
|
+
|
|
5
|
+
Type from `@bitforgehq/ui/overlay` · since 0.3.1
|
|
6
|
+
|
|
7
|
+
Where a popover opens against its trigger; `start`/`end` follow the text direction.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { type BfPopoverPlacement } from '@bitforgehq/ui/overlay';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type BfPopoverPlacement = 'below-start' | 'below-end' | 'above-start' | 'above-end'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Values
|
|
20
|
+
|
|
21
|
+
- `below-start`
|
|
22
|
+
- `below-end`
|
|
23
|
+
- `above-start`
|
|
24
|
+
- `above-end`
|
|
25
|
+
|
|
26
|
+
## Used by
|
|
27
|
+
|
|
28
|
+
- [BfPopoverTriggerDirective](bf-popover-trigger-directive.md)
|