@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.
Files changed (144) hide show
  1. package/CHANGELOG.md +482 -0
  2. package/README.md +17 -11
  3. package/ai/MANIFEST.index.json +288 -0
  4. package/ai/MANIFEST.json +8716 -3926
  5. package/ai/REFERENCE.index.json +413 -0
  6. package/ai/REFERENCE.json +4710 -2047
  7. package/ai/UI_GUIDE.md +185 -57
  8. package/ai/components/back-button.md +42 -2
  9. package/ai/components/badge.md +17 -7
  10. package/ai/components/bar-chart.md +188 -0
  11. package/ai/components/breadcrumb-item.md +121 -0
  12. package/ai/components/breadcrumb.md +277 -0
  13. package/ai/components/button.md +82 -15
  14. package/ai/components/calendar.md +300 -0
  15. package/ai/components/card.md +63 -2
  16. package/ai/components/chart-card.md +283 -0
  17. package/ai/components/combobox.md +411 -0
  18. package/ai/components/date-input.md +396 -0
  19. package/ai/components/datetime-input.md +215 -0
  20. package/ai/components/description-item.md +111 -0
  21. package/ai/components/description-list.md +160 -0
  22. package/ai/components/donut-chart.md +169 -0
  23. package/ai/components/header.md +67 -2
  24. package/ai/components/icon-button.md +74 -16
  25. package/ai/components/icon.md +63 -7
  26. package/ai/components/line-chart.md +234 -0
  27. package/ai/components/list.md +70 -6
  28. package/ai/components/menu.md +5 -0
  29. package/ai/components/multi-combobox.md +257 -0
  30. package/ai/components/nav-group.md +178 -0
  31. package/ai/components/nav-item.md +210 -0
  32. package/ai/components/page-header.md +237 -0
  33. package/ai/components/pagination.md +173 -0
  34. package/ai/components/popover.md +250 -0
  35. package/ai/components/side-panel.md +391 -0
  36. package/ai/components/sidebar.md +363 -0
  37. package/ai/components/skeleton.md +215 -0
  38. package/ai/components/sparkline.md +188 -0
  39. package/ai/components/stat.md +233 -0
  40. package/ai/components/tab-group.md +226 -0
  41. package/ai/components/tab-panel.md +163 -0
  42. package/ai/components/table.md +568 -0
  43. package/ai/components/tabs.md +42 -2
  44. package/ai/components/theme-menu-button.md +182 -0
  45. package/ai/components/theme-switch.md +170 -0
  46. package/ai/components/time-input.md +240 -0
  47. package/ai/components/toolbar.md +289 -0
  48. package/ai/components/tooltip.md +230 -0
  49. package/ai/components/top-nav.md +159 -0
  50. package/ai/reference/bf-badge-appearance.md +36 -0
  51. package/ai/reference/bf-badge-variant.md +1 -1
  52. package/ai/reference/bf-bar-chart-orientation.md +27 -0
  53. package/ai/reference/bf-button-appearance.md +36 -0
  54. package/ai/reference/bf-button-variant.md +1 -1
  55. package/ai/reference/bf-calendar-disabled-date.md +23 -0
  56. package/ai/reference/bf-calendar-harness.md +51 -0
  57. package/ai/reference/bf-calendar-weekday.md +31 -0
  58. package/ai/reference/bf-chart-card-heading-level.md +26 -0
  59. package/ai/reference/bf-chart-curve.md +28 -0
  60. package/ai/reference/bf-chart-harness.md +51 -0
  61. package/ai/reference/bf-chart-legend-position.md +30 -0
  62. package/ai/reference/bf-chart-series.md +23 -0
  63. package/ai/reference/bf-chart-value-format.md +23 -0
  64. package/ai/reference/bf-color-scheme-service.md +30 -0
  65. package/ai/reference/bf-color-scheme.md +31 -0
  66. package/ai/reference/bf-combobox-filter.md +27 -0
  67. package/ai/reference/bf-combobox-harness.md +89 -0
  68. package/ai/reference/bf-combobox-option.md +33 -0
  69. package/ai/reference/bf-compare-with.md +2 -0
  70. package/ai/reference/bf-date-input-harness.md +67 -0
  71. package/ai/reference/bf-date-input-picker.md +27 -0
  72. package/ai/reference/bf-date-time-input-harness.md +76 -0
  73. package/ai/reference/bf-date-time-input-picker.md +27 -0
  74. package/ai/reference/bf-description-list-layout.md +26 -0
  75. package/ai/reference/bf-donut-slice.md +22 -0
  76. package/ai/reference/bf-labels.md +67 -20
  77. package/ai/reference/bf-menu-button-variant.md +1 -0
  78. package/ai/reference/bf-menu-placement.md +1 -0
  79. package/ai/reference/bf-overlay-options.md +28 -27
  80. package/ai/reference/bf-overlay-placement.md +34 -0
  81. package/ai/reference/bf-overlay-position.md +1 -1
  82. package/ai/reference/bf-overlay-service.md +5 -3
  83. package/ai/reference/bf-page-header-heading-level.md +26 -0
  84. package/ai/reference/bf-pagination-harness.md +61 -0
  85. package/ai/reference/bf-platform-service.md +17 -15
  86. package/ai/reference/bf-popover-harness.md +42 -0
  87. package/ai/reference/bf-popover-placement.md +28 -0
  88. package/ai/reference/bf-popover-trigger-directive.md +56 -0
  89. package/ai/reference/bf-side-panel-config.md +35 -0
  90. package/ai/reference/bf-side-panel-harness.md +34 -0
  91. package/ai/reference/bf-side-panel-ref.md +44 -0
  92. package/ai/reference/bf-side-panel-service.md +43 -0
  93. package/ai/reference/bf-side-panel-template-context.md +32 -0
  94. package/ai/reference/bf-side-panel-width.md +28 -0
  95. package/ai/reference/bf-size.md +12 -0
  96. package/ai/reference/bf-skeleton-shape.md +28 -0
  97. package/ai/reference/bf-stat-trend-intent.md +27 -0
  98. package/ai/reference/bf-stat-trend.md +27 -0
  99. package/ai/reference/bf-stat-variant.md +26 -0
  100. package/ai/reference/bf-tab-group-harness.md +44 -0
  101. package/ai/reference/bf-table-align.md +26 -0
  102. package/ai/reference/bf-table-cell-context.md +24 -0
  103. package/ai/reference/bf-table-cell-directive.md +22 -0
  104. package/ai/reference/bf-table-column.md +28 -0
  105. package/ai/reference/bf-table-harness.md +77 -0
  106. package/ai/reference/bf-table-row-key.md +21 -0
  107. package/ai/reference/bf-table-sort-direction.md +26 -0
  108. package/ai/reference/bf-table-sort.md +27 -0
  109. package/ai/reference/bf-theme.md +5 -4
  110. package/ai/reference/bf-time-input-harness.md +67 -0
  111. package/ai/reference/bf-time-input-hour-cycle.md +27 -0
  112. package/ai/reference/bf-time-input-picker.md +27 -0
  113. package/ai/reference/bf-tooltip-directive.md +43 -0
  114. package/ai/reference/bf-tooltip-harness.md +43 -0
  115. package/ai/reference/bf-tooltip-placement.md +28 -0
  116. package/ai/reference/bf_color_scheme_storage.md +20 -0
  117. package/ai/reference/bf_side_panel_data.md +17 -0
  118. package/ai/reference/bf_theme_storage.md +3 -1
  119. package/ai/reference/provide-bf-color-scheme.md +20 -0
  120. package/ai/reference/provide-bf-labels.md +12 -4
  121. package/ai/reference/slide-in-from-end.md +24 -0
  122. package/ai/reference/slide-out-to-end.md +24 -0
  123. package/fesm2022/bitforgehq-ui-charts.mjs +3045 -0
  124. package/fesm2022/bitforgehq-ui-charts.mjs.map +1 -0
  125. package/fesm2022/bitforgehq-ui-icons.mjs +107 -3
  126. package/fesm2022/bitforgehq-ui-icons.mjs.map +1 -1
  127. package/fesm2022/bitforgehq-ui-mobile.mjs +14 -59
  128. package/fesm2022/bitforgehq-ui-mobile.mjs.map +1 -1
  129. package/fesm2022/bitforgehq-ui-overlay.mjs +6436 -33
  130. package/fesm2022/bitforgehq-ui-overlay.mjs.map +1 -1
  131. package/fesm2022/bitforgehq-ui-testing.mjs +618 -1
  132. package/fesm2022/bitforgehq-ui-testing.mjs.map +1 -1
  133. package/fesm2022/bitforgehq-ui.mjs +5092 -153
  134. package/fesm2022/bitforgehq-ui.mjs.map +1 -1
  135. package/llms-full.txt +25177 -14398
  136. package/llms.txt +95 -1
  137. package/package.json +7 -3
  138. package/theme.css +101 -0
  139. package/types/bitforgehq-ui-charts.d.ts +967 -0
  140. package/types/bitforgehq-ui-icons.d.ts +13 -1
  141. package/types/bitforgehq-ui-mobile.d.ts +25 -18
  142. package/types/bitforgehq-ui-overlay.d.ts +1844 -7
  143. package/types/bitforgehq-ui-testing.d.ts +748 -1
  144. package/types/bitforgehq-ui.d.ts +2136 -44
@@ -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)
@@ -0,0 +1,77 @@
1
+ # BfTableHarness
2
+
3
+ Test harness for the data table: reads rows and cells, sorts and selects rows
4
+
5
+ Class from `@bitforgehq/ui/testing` · since 0.3.1
6
+
7
+ Harness for `bf-table`. It works by column header text and row position, so a test never needs
8
+ the column keys or the row keys (except `getSort()`, which returns the column's `key`, as the
9
+ `sort` model holds it).
10
+
11
+ ```ts
12
+ import { BfTableHarness } from '@bitforgehq/ui/testing';
13
+ ```
14
+
15
+ ## Signature
16
+
17
+ ```ts
18
+ class BfTableHarness extends ComponentHarness
19
+ ```
20
+
21
+ ## Methods
22
+
23
+ ### `getLabel(): Promise<string>`
24
+
25
+ The table's name, its visually hidden caption.
26
+
27
+ ### `getRowCount(): Promise<number>`
28
+
29
+ The number of body rows; `0` while the empty slot shows.
30
+
31
+ ### `getHeaderLabels(): Promise<string[]>`
32
+
33
+ The column headers' text, in order, without the selection column.
34
+
35
+ ### `getCellText(row: number, column: string): Promise<string>`
36
+
37
+ The text of one cell.
38
+
39
+ | Parameter | Type | Description |
40
+ | --------- | -------- | --------------------------- |
41
+ | `row` | `number` | The row's position, from 0. |
42
+ | `column` | `string` | The column's header text. |
43
+
44
+ ### `sortBy(column: string): Promise<void>`
45
+
46
+ Clicks a sortable column's header, as a user would: ascending first, then descending.
47
+ Throws for an unknown or unsortable column.
48
+
49
+ | Parameter | Type | Description |
50
+ | --------- | -------- | ------------------------- |
51
+ | `column` | `string` | The column's header text. |
52
+
53
+ ### `getSort(): Promise<BfTableSort | null>`
54
+
55
+ The sorted column (its `key`) and direction, from `aria-sort`.
56
+
57
+ ### `selectRow(index: number): Promise<void>`
58
+
59
+ Checks one row's checkbox, as a user would; a selected row stays selected. Throws when the
60
+ table is not selectable or the row does not exist.
61
+
62
+ | Parameter | Type | Description |
63
+ | --------- | -------- | --------------------------- |
64
+ | `index` | `number` | The row's position, from 0. |
65
+
66
+ ### `selectAll(): Promise<void>`
67
+
68
+ Checks the header checkbox, as a user would, so every row is selected. Throws when the table
69
+ is not selectable.
70
+
71
+ ### `getSelectedCount(): Promise<number>`
72
+
73
+ The number of selected rows (checked row checkboxes).
74
+
75
+ ## Uses
76
+
77
+ - [BfTableSort](bf-table-sort.md)
@@ -0,0 +1,21 @@
1
+ # BfTableRowKey
2
+
3
+ Function that returns the unique string key of one table row
4
+
5
+ Type from `@bitforgehq/ui` · since 0.3.1
6
+
7
+ Returns the string that identifies a `bf-table` row in `selection` and in the `@for` track.
8
+
9
+ ```ts
10
+ import { type BfTableRowKey } from '@bitforgehq/ui';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ type BfTableRowKey<T> = (row: T) => string
17
+ ```
18
+
19
+ ## Used by
20
+
21
+ - [bf-table](../components/table.md)
@@ -0,0 +1,26 @@
1
+ # BfTableSortDirection
2
+
3
+ The direction a sorted table column is in, ascending or descending
4
+
5
+ Type from `@bitforgehq/ui` · since 0.3.1
6
+
7
+ The direction of a sorted `bf-table` column, as `aria-sort` names it.
8
+
9
+ ```ts
10
+ import { type BfTableSortDirection } from '@bitforgehq/ui';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ type BfTableSortDirection = 'ascending' | 'descending'
17
+ ```
18
+
19
+ ## Values
20
+
21
+ - `ascending`
22
+ - `descending`
23
+
24
+ ## Used by
25
+
26
+ - [BfTableSort](bf-table-sort.md)
@@ -0,0 +1,27 @@
1
+ # BfTableSort
2
+
3
+ The column key and direction a table is sorted by, set by its headers
4
+
5
+ Interface from `@bitforgehq/ui` · since 0.3.1
6
+
7
+ The column a `bf-table` is sorted by and the direction; the consumer sorts the rows.
8
+
9
+ ```ts
10
+ import { type BfTableSort } from '@bitforgehq/ui';
11
+ ```
12
+
13
+ ## Properties
14
+
15
+ | Name | Type | Default | Description |
16
+ | ----------- | ------------------------------------------------------ | -------- | ------------------------------- |
17
+ | `column` | `string` | required | The `key` of the sorted column. |
18
+ | `direction` | `BfTableSortDirection` (`'ascending' \| 'descending'`) | required | The sort direction. |
19
+
20
+ ## Uses
21
+
22
+ - [BfTableSortDirection](bf-table-sort-direction.md)
23
+
24
+ ## Used by
25
+
26
+ - [bf-table](../components/table.md)
27
+ - [BfTableHarness](bf-table-harness.md)
@@ -4,7 +4,8 @@ The app theme choice, following the system or forcing light or dark
4
4
 
5
5
  Type from `@bitforgehq/ui/mobile` · since 0.2.0
6
6
 
7
- The app theme choice: follow the system, or force light or dark.
7
+ The app theme choice: follow the system, or force light or dark. The same type as
8
+ `BfColorScheme` from `@bitforgehq/ui`.
8
9
 
9
10
  ```ts
10
11
  import { type BfTheme } from '@bitforgehq/ui/mobile';
@@ -13,7 +14,7 @@ import { type BfTheme } from '@bitforgehq/ui/mobile';
13
14
  ## Signature
14
15
 
15
16
  ```ts
16
- type BfTheme = 'system' | 'light' | 'dark'
17
+ type BfTheme = BfColorScheme
17
18
  ```
18
19
 
19
20
  ## Values
@@ -22,6 +23,6 @@ type BfTheme = 'system' | 'light' | 'dark'
22
23
  - `light`
23
24
  - `dark`
24
25
 
25
- ## Used by
26
+ ## Uses
26
27
 
27
- - [BfPlatformService](bf-platform-service.md)
28
+ - [BfColorScheme](bf-color-scheme.md)
@@ -0,0 +1,67 @@
1
+ # BfTimeInputHarness
2
+
3
+ Test harness for the time input: types a time or picks one from its list
4
+
5
+ Class from `@bitforgehq/ui/testing` · since 0.3.1
6
+
7
+ Harness for `bf-time-input`. It reads and types the field as a user sees it and picks a time
8
+ from the popover list.
9
+
10
+ ```ts
11
+ import { BfTimeInputHarness } from '@bitforgehq/ui/testing';
12
+ ```
13
+
14
+ ## Signature
15
+
16
+ ```ts
17
+ class BfTimeInputHarness 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:30" or "02:30 PM"); the ISO value in native mode.
29
+
30
+ ### `setValue(text: string): Promise<void>`
31
+
32
+ Types a 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 "2:30 PM" in a 12-hour field. In native mode it sets the
34
+ platform input to the ISO value.
35
+
36
+ | Parameter | Type | Description |
37
+ | --------- | -------- | ------------------------------- |
38
+ | `text` | `string` | The 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 list of times 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 list of times is open (`aria-expanded` on its button).
59
+
60
+ ### `pickTime(time: string): Promise<void>`
61
+
62
+ Picks a time in the list as a user would: opens the list (when closed), then clicks the
63
+ time, which closes it. Throws for a time the list does not hold (off the `step`) or disables.
64
+
65
+ | Parameter | Type | Description |
66
+ | --------- | -------- | -------------------------------------- |
67
+ | `time` | `string` | The ISO time to pick, such as '14:30'. |
@@ -0,0 +1,27 @@
1
+ # BfTimeInputHourCycle
2
+
3
+ A twelve-hour clock with AM and PM, or a twenty-four-hour clock
4
+
5
+ Type from `@bitforgehq/ui/overlay` · since 0.3.1
6
+
7
+ The clock of a time field: `h12` counts 1–12 with an AM/PM part, `h23` counts 0–23.
8
+
9
+ ```ts
10
+ import { type BfTimeInputHourCycle } from '@bitforgehq/ui/overlay';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ type BfTimeInputHourCycle = 'h12' | 'h23'
17
+ ```
18
+
19
+ ## Values
20
+
21
+ - `h12`
22
+ - `h23`
23
+
24
+ ## Used by
25
+
26
+ - [bf-datetime-input](../components/datetime-input.md)
27
+ - [bf-time-input](../components/time-input.md)
@@ -0,0 +1,27 @@
1
+ # BfTimeInputPicker
2
+
3
+ Whether a time input offers a popover list of times besides typing
4
+
5
+ Type from `@bitforgehq/ui/overlay` · since 0.3.1
6
+
7
+ How `bf-time-input` picks a time besides typing: `list` adds a button that opens a list of
8
+ times every `step` minutes, `none` keeps the field typed only.
9
+
10
+ ```ts
11
+ import { type BfTimeInputPicker } from '@bitforgehq/ui/overlay';
12
+ ```
13
+
14
+ ## Signature
15
+
16
+ ```ts
17
+ type BfTimeInputPicker = 'list' | 'none'
18
+ ```
19
+
20
+ ## Values
21
+
22
+ - `list`
23
+ - `none`
24
+
25
+ ## Used by
26
+
27
+ - [bf-time-input](../components/time-input.md)
@@ -0,0 +1,43 @@
1
+ # BfTooltipDirective
2
+
3
+ Adds a hover and keyboard-focus tooltip to any control on desktop
4
+
5
+ Directive from `@bitforgehq/ui/overlay` · since 0.3.1
6
+
7
+ Shows a short `bf-tooltip` beside an element: after a 500 ms rest of a fine pointer, at once on
8
+ keyboard focus. It hides when the pointer leaves (it stays while the pointer moves onto the
9
+ tooltip itself), on blur and on `Escape`, and while it shows, the focusable element (the host,
10
+ or the first control inside it, so it works on a `bf-icon-button`) is described by it
11
+ (`aria-describedby`). Nothing shows under a coarse pointer (touch), so never put information
12
+ only in a tooltip. The tooltip flips to the opposite side when it would overflow the viewport.
13
+
14
+ ```ts
15
+ import { BfTooltipDirective } from '@bitforgehq/ui/overlay';
16
+ ```
17
+
18
+ Selector: `[bfTooltip]`
19
+
20
+ ## Inputs
21
+
22
+ | Name | Type | Default | Description |
23
+ | -------------------- | -------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------- |
24
+ | `bfTooltip` | `string` | required | The tooltip's text; empty shows no tooltip. |
25
+ | `bfTooltipPlacement` | `BfTooltipPlacement` (`'top' \| 'bottom' \| 'start' \| 'end'`) | `'top'` | The side it shows on (flipping when it would overflow), read each time it shows. |
26
+
27
+ ## Methods
28
+
29
+ ### `isShown(): boolean`
30
+
31
+ Whether the tooltip is showing.
32
+
33
+ ### `show(): void`
34
+
35
+ Shows the tooltip now (no delay). Does nothing under a coarse pointer or without text.
36
+
37
+ ### `hide(): void`
38
+
39
+ Hides the tooltip now and cancels a pending show.
40
+
41
+ ## Uses
42
+
43
+ - [BfTooltipPlacement](bf-tooltip-placement.md)
@@ -0,0 +1,43 @@
1
+ # BfTooltipHarness
2
+
3
+ Test harness for a tooltip: shows it, reads its text and whether it shows
4
+
5
+ Class from `@bitforgehq/ui/testing` · since 0.3.1
6
+
7
+ Harness for an element with a `[bfTooltip]`. The tooltip renders in the CDK overlay container
8
+ only while it shows, so `show()` focuses the element (the tooltip shows at once on keyboard
9
+ focus; a 500 ms hover would need real time) and `getText()` reads the `bf-tooltip` its control
10
+ is described by. Its `label` filter matches the element's accessible name (`aria-label`, else
11
+ its text). Under a coarse pointer no tooltip shows.
12
+
13
+ ```ts
14
+ import { BfTooltipHarness } from '@bitforgehq/ui/testing';
15
+ ```
16
+
17
+ ## Signature
18
+
19
+ ```ts
20
+ class BfTooltipHarness extends ComponentHarness
21
+ ```
22
+
23
+ ## Methods
24
+
25
+ ### `getLabel(): Promise<string>`
26
+
27
+ The element's accessible name: its control's `aria-label`, else its text.
28
+
29
+ ### `show(): Promise<void>`
30
+
31
+ Shows the tooltip by focusing the element (or the first control inside it).
32
+
33
+ ### `hide(): Promise<void>`
34
+
35
+ Hides the tooltip by moving focus off the element.
36
+
37
+ ### `isOpen(): Promise<boolean>`
38
+
39
+ Whether the tooltip shows.
40
+
41
+ ### `getText(): Promise<string>`
42
+
43
+ The tooltip's text, showing it first when it is hidden.
@@ -0,0 +1,28 @@
1
+ # BfTooltipPlacement
2
+
3
+ Which side of its element a tooltip sits on: top, bottom, start or end
4
+
5
+ Type from `@bitforgehq/ui/overlay` · since 0.3.1
6
+
7
+ Which side of its element a tooltip sits on; `start` and `end` follow the text direction.
8
+
9
+ ```ts
10
+ import { type BfTooltipPlacement } from '@bitforgehq/ui/overlay';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ type BfTooltipPlacement = 'top' | 'bottom' | 'start' | 'end'
17
+ ```
18
+
19
+ ## Values
20
+
21
+ - `top`
22
+ - `bottom`
23
+ - `start`
24
+ - `end`
25
+
26
+ ## Used by
27
+
28
+ - [BfTooltipDirective](bf-tooltip-directive.md)
@@ -0,0 +1,20 @@
1
+ # BF_COLOR_SCHEME_STORAGE
2
+
3
+ Injection token for the store that keeps the colour scheme choice between visits
4
+
5
+ Injection token from `@bitforgehq/ui` · since 0.3.1
6
+
7
+ Where `BfColorSchemeService` keeps the colour scheme choice (the key `bf-theme`): `localStorage`
8
+ when it is available, otherwise an in-memory map. Provide another store (a native preferences
9
+ plugin, or an in-memory one in tests) to keep the choice elsewhere. `BF_THEME_STORAGE` from
10
+ `@bitforgehq/ui/mobile` is this same token.
11
+
12
+ ```ts
13
+ import { BF_COLOR_SCHEME_STORAGE } from '@bitforgehq/ui';
14
+ ```
15
+
16
+ ## Signature
17
+
18
+ ```ts
19
+ const BF_COLOR_SCHEME_STORAGE: InjectionToken<Pick<Storage, "getItem" | "setItem">>
20
+ ```
@@ -0,0 +1,17 @@
1
+ # BF_SIDE_PANEL_DATA
2
+
3
+ Injection token carrying the data a side panel was opened with, for its content
4
+
5
+ Injection token from `@bitforgehq/ui/overlay` · since 0.3.1
6
+
7
+ The `data` passed to `BfSidePanelService.open()`, injectable in the panel's content.
8
+
9
+ ```ts
10
+ import { BF_SIDE_PANEL_DATA } from '@bitforgehq/ui/overlay';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ const BF_SIDE_PANEL_DATA: InjectionToken<unknown>
17
+ ```
@@ -6,7 +6,9 @@ Injection token from `@bitforgehq/ui/mobile` · since 0.3.0
6
6
 
7
7
  Where `BfPlatformService` keeps the theme choice (the key `bf-theme`): `localStorage` when it is
8
8
  available, otherwise an in-memory map. Provide another store (a native preferences plugin, or an
9
- in-memory one in tests, as `provideBfShellTesting()` does) to keep the choice elsewhere.
9
+ in-memory one in tests, as `provideBfShellTesting()` does) to keep the choice elsewhere. It is
10
+ the same token as `BF_COLOR_SCHEME_STORAGE` from `@bitforgehq/ui`, which `BfColorSchemeService`
11
+ reads, so providing either one moves the choice for both.
10
12
 
11
13
  ```ts
12
14
  import { BF_THEME_STORAGE } from '@bitforgehq/ui/mobile';
@@ -0,0 +1,20 @@
1
+ # provideBfColorScheme
2
+
3
+ Applies the stored colour scheme choice to html, for desktop web apps
4
+
5
+ Function from `@bitforgehq/ui` · since 0.3.1
6
+
7
+ Lets `BfColorSchemeService` own the app's colour scheme: it toggles `dark` on `<html>`, follows
8
+ `prefers-color-scheme` under `system` and stores the choice (key `bf-theme`). For a desktop web
9
+ app; a Capacitor app gets it from `provideBfShell()`. Add it to `ApplicationConfig.providers`
10
+ and switch with `inject(BfColorSchemeService).scheme.set('dark')`.
11
+
12
+ ```ts
13
+ import { provideBfColorScheme } from '@bitforgehq/ui';
14
+ ```
15
+
16
+ ## Signature
17
+
18
+ ```ts
19
+ function provideBfColorScheme(): EnvironmentProviders
20
+ ```
@@ -7,10 +7,18 @@ Function from `@bitforgehq/ui` · since 0.3.0
7
7
  Replaces built-in strings, merged over the parent's (validation merged key by key); a key left
8
8
  out or set to `undefined` keeps the parent's string. In `ApplicationConfig.providers` it covers
9
9
  every string. In a component's `providers` it covers that sub-tree's widgets and form controls
10
- (`loading`, `dismiss`, `tabBar`, `tabBadge`, `back`, `refreshing`, `validation`); the overlay
11
- services (`ok`, `cancel`, `actions`, `sheet`, `modal`, `close`, `expand`, `collapse`,
12
- `sheetPosition`, `dialog`, `notifications`) are
13
- root singletons and pick it up only when the caller passes its injector:
10
+ (`loading`, `dismiss`, `tabBar`, `tabBadge`, `back`, `refreshing`, `tableSelectAll`, `theme`,
11
+ `themeSystem`, `themeLight`, `themeDark`, `breadcrumb`, `breadcrumbExpand`, `navigation`,
12
+ `navBadge`, `pagination`, `previousPage`, `nextPage`, `pageOf`, `goToPage`, `tabGroup`,
13
+ `calendarPreviousMonth`, `calendarNextMonth`, `calendarChooseMonth`, `calendarChooseYear`,
14
+ `statTrendUp`, `statTrendDown`, `statTrendFlat`, `comboboxEmpty`, `comboboxRemove`,
15
+ `dateInputDay`, `dateInputMonth`, `dateInputYear`, `dateInputOpenCalendar`, `dateInputInvalid`,
16
+ `dateInputUnavailable`, `timeInputHour`, `timeInputMinute`, `timeInputSecond`,
17
+ `timeInputDayPeriod`, `timeInputOpenList`, `timeInputInvalid`, `timeInputMin`, `timeInputMax`,
18
+ `chart`, `chartLegend`, `chartValues`, `chartShowData`, `chartHideData`, `chartCategory`,
19
+ `chartValue`, `chartEmpty`, `chartError`, `validation`); the overlay services (`ok`, `cancel`,
20
+ `actions`, `sheet`, `modal`, `close`, `expand`, `collapse`, `sheetPosition`, `dialog`,
21
+ `notifications`) are root singletons and pick it up only when the caller passes its injector:
14
22
  `open(…, { injector: inject(Injector) })`.
15
23
 
16
24
  ```ts
@@ -0,0 +1,24 @@
1
+ # slideInFromEnd
2
+
3
+ Slides an element in from the inline end, the enter animation of a side panel
4
+
5
+ Function from `@bitforgehq/ui/overlay` · since 0.3.1
6
+
7
+ Slides `el` in from beyond the inline end edge of the viewport (the right, the left under
8
+ `dir="rtl"`) by its own width: the enter animation of a side panel.
9
+
10
+ ```ts
11
+ import { slideInFromEnd } from '@bitforgehq/ui/overlay';
12
+ ```
13
+
14
+ ## Signature
15
+
16
+ ```ts
17
+ function slideInFromEnd(el: HTMLElement): Animation
18
+ ```
19
+
20
+ ## Parameters
21
+
22
+ | Parameter | Type | Description |
23
+ | --------- | ------------- | -------------------------------------------------- |
24
+ | `el` | `HTMLElement` | The element to animate, usually the overlay panel. |
@@ -0,0 +1,24 @@
1
+ # slideOutToEnd
2
+
3
+ Slides an element out past the inline end, the exit animation of a side panel
4
+
5
+ Function from `@bitforgehq/ui/overlay` · since 0.3.1
6
+
7
+ Slides `el` out past the inline end edge of the viewport by its own width (the reverse of
8
+ `slideInFromEnd`): the exit animation of a side panel.
9
+
10
+ ```ts
11
+ import { slideOutToEnd } from '@bitforgehq/ui/overlay';
12
+ ```
13
+
14
+ ## Signature
15
+
16
+ ```ts
17
+ function slideOutToEnd(el: HTMLElement): Animation
18
+ ```
19
+
20
+ ## Parameters
21
+
22
+ | Parameter | Type | Description |
23
+ | --------- | ------------- | -------------------------------------------------- |
24
+ | `el` | `HTMLElement` | The element to animate, usually the overlay panel. |