@bitforgehq/ui 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/CHANGELOG.md +3665 -0
  2. package/LICENSE +21 -0
  3. package/README.md +175 -0
  4. package/ai/MANIFEST.index.json +383 -0
  5. package/ai/MANIFEST.json +7528 -0
  6. package/ai/REFERENCE.index.json +1461 -0
  7. package/ai/REFERENCE.json +7213 -0
  8. package/ai/UI_GUIDE.md +1159 -0
  9. package/ai/components/action-bar.md +209 -0
  10. package/ai/components/action-sheet.md +526 -0
  11. package/ai/components/alert-dialog.md +509 -0
  12. package/ai/components/alert.md +376 -0
  13. package/ai/components/avatar.md +146 -0
  14. package/ai/components/back-button.md +286 -0
  15. package/ai/components/badge.md +171 -0
  16. package/ai/components/button.md +431 -0
  17. package/ai/components/card.md +303 -0
  18. package/ai/components/checkbox.md +418 -0
  19. package/ai/components/chip-group.md +205 -0
  20. package/ai/components/chip.md +300 -0
  21. package/ai/components/content.md +474 -0
  22. package/ai/components/desktop-toast.md +420 -0
  23. package/ai/components/dialog.md +962 -0
  24. package/ai/components/empty-state.md +146 -0
  25. package/ai/components/field.md +319 -0
  26. package/ai/components/header.md +809 -0
  27. package/ai/components/icon-button.md +221 -0
  28. package/ai/components/icon.md +176 -0
  29. package/ai/components/input.md +455 -0
  30. package/ai/components/list-item.md +326 -0
  31. package/ai/components/list.md +178 -0
  32. package/ai/components/menu-button.md +377 -0
  33. package/ai/components/menu.md +661 -0
  34. package/ai/components/modal.md +613 -0
  35. package/ai/components/number-input.md +423 -0
  36. package/ai/components/page.md +299 -0
  37. package/ai/components/progress.md +215 -0
  38. package/ai/components/radio-group.md +432 -0
  39. package/ai/components/refresher.md +377 -0
  40. package/ai/components/segmented.md +517 -0
  41. package/ai/components/select.md +510 -0
  42. package/ai/components/sheet.md +845 -0
  43. package/ai/components/spinner.md +171 -0
  44. package/ai/components/stack-outlet.md +661 -0
  45. package/ai/components/tab-bar.md +427 -0
  46. package/ai/components/tab.md +295 -0
  47. package/ai/components/tabs.md +408 -0
  48. package/ai/components/textarea.md +371 -0
  49. package/ai/components/toast.md +522 -0
  50. package/ai/components/toggle.md +387 -0
  51. package/ai/reference/bf-action-directive.md +21 -0
  52. package/ai/reference/bf-action-sheet-action-role.md +27 -0
  53. package/ai/reference/bf-action-sheet-action.md +28 -0
  54. package/ai/reference/bf-action-sheet-options.md +28 -0
  55. package/ai/reference/bf-action-sheet-service.md +33 -0
  56. package/ai/reference/bf-alert-dialog-button-role.md +27 -0
  57. package/ai/reference/bf-alert-dialog-button.md +27 -0
  58. package/ai/reference/bf-alert-dialog-options.md +29 -0
  59. package/ai/reference/bf-alert-dialog-service.md +34 -0
  60. package/ai/reference/bf-alert-variant.md +28 -0
  61. package/ai/reference/bf-autocapitalize.md +30 -0
  62. package/ai/reference/bf-avatar-size.md +27 -0
  63. package/ai/reference/bf-avatar-variant.md +28 -0
  64. package/ai/reference/bf-back-at-root.md +28 -0
  65. package/ai/reference/bf-back-button-service.md +40 -0
  66. package/ai/reference/bf-badge-variant.md +29 -0
  67. package/ai/reference/bf-button-size.md +29 -0
  68. package/ai/reference/bf-button-type.md +28 -0
  69. package/ai/reference/bf-button-variant.md +29 -0
  70. package/ai/reference/bf-card-padding.md +26 -0
  71. package/ai/reference/bf-card-variant.md +28 -0
  72. package/ai/reference/bf-chip-group-mode.md +27 -0
  73. package/ai/reference/bf-chip-variant.md +26 -0
  74. package/ai/reference/bf-compare-with.md +24 -0
  75. package/ai/reference/bf-component-overlay-ref.md +33 -0
  76. package/ai/reference/bf-confirm-button-role.md +26 -0
  77. package/ai/reference/bf-confirm-button.md +27 -0
  78. package/ai/reference/bf-confirm-options.md +31 -0
  79. package/ai/reference/bf-confirm-size.md +26 -0
  80. package/ai/reference/bf-content-scroll-event.md +21 -0
  81. package/ai/reference/bf-defaults-options.md +32 -0
  82. package/ai/reference/bf-defaults.md +28 -0
  83. package/ai/reference/bf-desktop-toast-config.md +28 -0
  84. package/ai/reference/bf-desktop-toast-harness.md +33 -0
  85. package/ai/reference/bf-desktop-toast-options.md +28 -0
  86. package/ai/reference/bf-desktop-toast-position.md +28 -0
  87. package/ai/reference/bf-desktop-toast-service.md +42 -0
  88. package/ai/reference/bf-dialog-config.md +44 -0
  89. package/ai/reference/bf-dialog-harness.md +52 -0
  90. package/ai/reference/bf-dialog-ref.md +44 -0
  91. package/ai/reference/bf-dialog-role.md +26 -0
  92. package/ai/reference/bf-dialog-service.md +55 -0
  93. package/ai/reference/bf-dialog-size.md +31 -0
  94. package/ai/reference/bf-dialog-template-context.md +32 -0
  95. package/ai/reference/bf-empty-state-heading-level.md +26 -0
  96. package/ai/reference/bf-enter-key-hint.md +31 -0
  97. package/ai/reference/bf-field-control-class.md +32 -0
  98. package/ai/reference/bf-field-control-state.md +28 -0
  99. package/ai/reference/bf-field-size.md +29 -0
  100. package/ai/reference/bf-haptics-impact-style.md +27 -0
  101. package/ai/reference/bf-haptics-notification-type.md +27 -0
  102. package/ai/reference/bf-haptics-service.md +41 -0
  103. package/ai/reference/bf-harness-filters.md +29 -0
  104. package/ai/reference/bf-horizontal-scroll-directive.md +129 -0
  105. package/ai/reference/bf-icon-button-variant.md +28 -0
  106. package/ai/reference/bf-icon-size.md +27 -0
  107. package/ai/reference/bf-input-autocapitalize.md +36 -0
  108. package/ai/reference/bf-input-enter-key-hint.md +38 -0
  109. package/ai/reference/bf-input-input-mode.md +38 -0
  110. package/ai/reference/bf-input-mode.md +32 -0
  111. package/ai/reference/bf-input-type.md +35 -0
  112. package/ai/reference/bf-jsdom-shim-options.md +22 -0
  113. package/ai/reference/bf-keyboard-assist-behavior.md +26 -0
  114. package/ai/reference/bf-keyboard-assist-directive.md +185 -0
  115. package/ai/reference/bf-keyboard-phase.md +30 -0
  116. package/ai/reference/bf-keyboard-service.md +50 -0
  117. package/ai/reference/bf-labels-overrides.md +26 -0
  118. package/ai/reference/bf-labels.md +44 -0
  119. package/ai/reference/bf-menu-button-harness.md +40 -0
  120. package/ai/reference/bf-menu-button-variant.md +27 -0
  121. package/ai/reference/bf-menu-divider-directive.md +13 -0
  122. package/ai/reference/bf-menu-group-directive.md +14 -0
  123. package/ai/reference/bf-menu-harness.md +55 -0
  124. package/ai/reference/bf-menu-item-checkbox-directive.md +31 -0
  125. package/ai/reference/bf-menu-item-directive.md +31 -0
  126. package/ai/reference/bf-menu-item-harness.md +52 -0
  127. package/ai/reference/bf-menu-item-radio-directive.md +29 -0
  128. package/ai/reference/bf-menu-placement.md +29 -0
  129. package/ai/reference/bf-menu-trigger-directive.md +46 -0
  130. package/ai/reference/bf-modal-options.md +30 -0
  131. package/ai/reference/bf-modal-presentation.md +26 -0
  132. package/ai/reference/bf-modal-service.md +38 -0
  133. package/ai/reference/bf-nav-controller.md +59 -0
  134. package/ai/reference/bf-nav-direction.md +23 -0
  135. package/ai/reference/bf-nav-target.md +21 -0
  136. package/ai/reference/bf-number-input-mode.md +28 -0
  137. package/ai/reference/bf-number-input-step.md +25 -0
  138. package/ai/reference/bf-overlay-auto-focus.md +29 -0
  139. package/ai/reference/bf-overlay-controller.md +22 -0
  140. package/ai/reference/bf-overlay-host.md +36 -0
  141. package/ai/reference/bf-overlay-options.md +53 -0
  142. package/ai/reference/bf-overlay-position.md +30 -0
  143. package/ai/reference/bf-overlay-ref.md +53 -0
  144. package/ai/reference/bf-overlay-role.md +27 -0
  145. package/ai/reference/bf-overlay-service.md +53 -0
  146. package/ai/reference/bf-overlay-stack-options.md +24 -0
  147. package/ai/reference/bf-overlay-stack.md +81 -0
  148. package/ai/reference/bf-overlay-template-context.md +24 -0
  149. package/ai/reference/bf-overscroll-stretch-directive.md +163 -0
  150. package/ai/reference/bf-page-context.md +24 -0
  151. package/ai/reference/bf-platform-service.md +53 -0
  152. package/ai/reference/bf-platform.md +28 -0
  153. package/ai/reference/bf-progress-size.md +26 -0
  154. package/ai/reference/bf-progress-tone.md +28 -0
  155. package/ai/reference/bf-radio-group-harness.md +49 -0
  156. package/ai/reference/bf-radio-group-orientation.md +26 -0
  157. package/ai/reference/bf-radio-option.md +30 -0
  158. package/ai/reference/bf-refresher-refresh-event.md +22 -0
  159. package/ai/reference/bf-segment-option.md +29 -0
  160. package/ai/reference/bf-segmented-harness.md +48 -0
  161. package/ai/reference/bf-segmented-size.md +29 -0
  162. package/ai/reference/bf-select-harness.md +70 -0
  163. package/ai/reference/bf-select-option.md +29 -0
  164. package/ai/reference/bf-sheet-auto-focus.md +29 -0
  165. package/ai/reference/bf-sheet-options.md +32 -0
  166. package/ai/reference/bf-sheet-ref.md +45 -0
  167. package/ai/reference/bf-sheet-service.md +34 -0
  168. package/ai/reference/bf-shell-config-mode.md +28 -0
  169. package/ai/reference/bf-shell-config.md +38 -0
  170. package/ai/reference/bf-shell-dynamic-type-limit.md +21 -0
  171. package/ai/reference/bf-shell-dynamic-type.md +25 -0
  172. package/ai/reference/bf-shell-mode.md +28 -0
  173. package/ai/reference/bf-shell-testing-options.md +26 -0
  174. package/ai/reference/bf-size.md +45 -0
  175. package/ai/reference/bf-spinner-size.md +27 -0
  176. package/ai/reference/bf-stack-change.md +22 -0
  177. package/ai/reference/bf-stack-reuse-strategy.md +32 -0
  178. package/ai/reference/bf-stack-transition-event.md +26 -0
  179. package/ai/reference/bf-stack-transition.md +26 -0
  180. package/ai/reference/bf-stacked-overlay.md +23 -0
  181. package/ai/reference/bf-system-bars-style.md +38 -0
  182. package/ai/reference/bf-tab-bar-controller.md +51 -0
  183. package/ai/reference/bf-tab-bar-host.md +52 -0
  184. package/ai/reference/bf-tab-context.md +32 -0
  185. package/ai/reference/bf-tab-links.md +37 -0
  186. package/ai/reference/bf-testing-options.md +27 -0
  187. package/ai/reference/bf-text-scale-service.md +35 -0
  188. package/ai/reference/bf-theme.md +27 -0
  189. package/ai/reference/bf-toast-action.md +25 -0
  190. package/ai/reference/bf-toast-controller.md +17 -0
  191. package/ai/reference/bf-toast-dismiss-reason.md +29 -0
  192. package/ai/reference/bf-toast-options.md +29 -0
  193. package/ai/reference/bf-toast-position.md +26 -0
  194. package/ai/reference/bf-toast-ref.md +41 -0
  195. package/ai/reference/bf-toast-service.md +39 -0
  196. package/ai/reference/bf-toggle-label-position.md +26 -0
  197. package/ai/reference/bf-transition-kind.md +28 -0
  198. package/ai/reference/bf-validation-message.md +31 -0
  199. package/ai/reference/bf-validation-messages.md +33 -0
  200. package/ai/reference/bf-view-event.md +28 -0
  201. package/ai/reference/bf-view-lifecycle.md +41 -0
  202. package/ai/reference/bf-view-state.md +28 -0
  203. package/ai/reference/bf_default_labels.md +21 -0
  204. package/ai/reference/bf_default_values.md +21 -0
  205. package/ai/reference/bf_defaults.md +21 -0
  206. package/ai/reference/bf_desktop_toast_defaults.md +21 -0
  207. package/ai/reference/bf_dialog_data.md +17 -0
  208. package/ai/reference/bf_labels.md +21 -0
  209. package/ai/reference/bf_overlay_data.md +19 -0
  210. package/ai/reference/bf_overlay_host.md +21 -0
  211. package/ai/reference/bf_sheet_default_snap_points.md +17 -0
  212. package/ai/reference/bf_shell_config.md +21 -0
  213. package/ai/reference/bf_shell_defaults.md +21 -0
  214. package/ai/reference/bf_tab_bar.md +21 -0
  215. package/ai/reference/bf_tab_bar_controller.md +21 -0
  216. package/ai/reference/bf_tab_context.md +21 -0
  217. package/ai/reference/bf_tab_links.md +21 -0
  218. package/ai/reference/bf_theme_storage.md +19 -0
  219. package/ai/reference/create-transition.md +36 -0
  220. package/ai/reference/duration_fast.md +17 -0
  221. package/ai/reference/duration_md.md +17 -0
  222. package/ai/reference/duration_overlay.md +17 -0
  223. package/ai/reference/duration_push.md +17 -0
  224. package/ai/reference/fade-down.md +26 -0
  225. package/ai/reference/fade-in.md +25 -0
  226. package/ai/reference/fade-out.md +25 -0
  227. package/ai/reference/fade-up.md +26 -0
  228. package/ai/reference/inject-shell-mode.md +23 -0
  229. package/ai/reference/install-bf-jsdom-shims.md +31 -0
  230. package/ai/reference/ios_duration.md +17 -0
  231. package/ai/reference/ios_easing.md +17 -0
  232. package/ai/reference/is-text-entry.md +25 -0
  233. package/ai/reference/max_complete_ms.md +17 -0
  234. package/ai/reference/md-transition.md +31 -0
  235. package/ai/reference/md_duration.md +17 -0
  236. package/ai/reference/md_easing.md +17 -0
  237. package/ai/reference/overlay_duration.md +21 -0
  238. package/ai/reference/overlay_easing.md +19 -0
  239. package/ai/reference/overlay_reduced_duration.md +17 -0
  240. package/ai/reference/pop-frames-at.md +25 -0
  241. package/ai/reference/prefers-reduced-motion.md +25 -0
  242. package/ai/reference/provide-bf-defaults.md +33 -0
  243. package/ai/reference/provide-bf-desktop-toast.md +28 -0
  244. package/ai/reference/provide-bf-labels.md +38 -0
  245. package/ai/reference/provide-bf-shell-testing.md +34 -0
  246. package/ai/reference/provide-bf-shell.md +41 -0
  247. package/ai/reference/provide-bf-testing.md +33 -0
  248. package/ai/reference/reduced-transition.md +28 -0
  249. package/ai/reference/reduced_duration.md +17 -0
  250. package/ai/reference/resolve-shell-mode.md +33 -0
  251. package/ai/reference/scale-in.md +25 -0
  252. package/ai/reference/settle-duration.md +25 -0
  253. package/ai/reference/settle-pop.md +33 -0
  254. package/ai/reference/settle_easing.md +17 -0
  255. package/ai/reference/should-complete-pop.md +26 -0
  256. package/ai/reference/slide-down.md +26 -0
  257. package/ai/reference/slide-up.md +26 -0
  258. package/ai/reference/with-bf-shell-routing.md +19 -0
  259. package/bin/bf-ui.js +81 -0
  260. package/fesm2022/bitforgehq-ui-icons.mjs +230 -0
  261. package/fesm2022/bitforgehq-ui-icons.mjs.map +1 -0
  262. package/fesm2022/bitforgehq-ui-mobile.mjs +5530 -0
  263. package/fesm2022/bitforgehq-ui-mobile.mjs.map +1 -0
  264. package/fesm2022/bitforgehq-ui-number-input.mjs +680 -0
  265. package/fesm2022/bitforgehq-ui-number-input.mjs.map +1 -0
  266. package/fesm2022/bitforgehq-ui-overlay.mjs +2675 -0
  267. package/fesm2022/bitforgehq-ui-overlay.mjs.map +1 -0
  268. package/fesm2022/bitforgehq-ui-testing.mjs +402 -0
  269. package/fesm2022/bitforgehq-ui-testing.mjs.map +1 -0
  270. package/fesm2022/bitforgehq-ui.mjs +7765 -0
  271. package/fesm2022/bitforgehq-ui.mjs.map +1 -0
  272. package/llms-full.txt +25394 -0
  273. package/llms.txt +329 -0
  274. package/package.json +94 -0
  275. package/theme.css +253 -0
  276. package/types/bitforgehq-ui-icons.d.ts +50 -0
  277. package/types/bitforgehq-ui-mobile.d.ts +2914 -0
  278. package/types/bitforgehq-ui-number-input.d.ts +282 -0
  279. package/types/bitforgehq-ui-overlay.d.ts +1514 -0
  280. package/types/bitforgehq-ui-testing.d.ts +495 -0
  281. package/types/bitforgehq-ui.d.ts +3499 -0
@@ -0,0 +1,28 @@
1
+ # BfDesktopToastConfig
2
+
3
+ App-wide settings of desktop toasts: where they sit and how many show at once
4
+
5
+ Interface from `@bitforgehq/ui/overlay` · since 0.3.0
6
+
7
+ App-wide settings of `BfDesktopToastService`; set them with `provideBfDesktopToast()`.
8
+
9
+ ```ts
10
+ import { type BfDesktopToastConfig } from '@bitforgehq/ui/overlay';
11
+ ```
12
+
13
+ ## Properties
14
+
15
+ | Name | Type | Default | Description |
16
+ | ------------ | ----------------------------------------------------------------------------------------- | -------------- | -------------------------------------------------------------------------------------------- |
17
+ | `position` | `BfDesktopToastPosition` (`'bottom-end' \| 'bottom-center' \| 'top-end' \| 'top-center'`) | `'bottom-end'` | Where the stack sits (default `'bottom-end'`: bottom right, bottom left in RTL). |
18
+ | `maxVisible` | `number` | `3` | How many toasts are visible at once (default 3); later ones wait. |
19
+ | `ariaLabel` | `string` | `''` | Name of the stack's region landmark; empty uses the `notifications` label ("Notifications"). |
20
+
21
+ ## Uses
22
+
23
+ - [BfDesktopToastPosition](bf-desktop-toast-position.md)
24
+
25
+ ## Used by
26
+
27
+ - [BF_DESKTOP_TOAST_DEFAULTS](bf_desktop_toast_defaults.md)
28
+ - [provideBfDesktopToast](provide-bf-desktop-toast.md)
@@ -0,0 +1,33 @@
1
+ # BfDesktopToastHarness
2
+
3
+ Test harness for a desktop toast: its message, its action and Escape
4
+
5
+ Class from `@bitforgehq/ui/testing` · since 0.3.0
6
+
7
+ Harness for `bf-desktop-toast`, the card `BfDesktopToastService.show()` renders. Toasts render
8
+ in the CDK overlay container, so get it through
9
+ `TestbedHarnessEnvironment.documentRootLoader(fixture)`.
10
+
11
+ ```ts
12
+ import { BfDesktopToastHarness } from '@bitforgehq/ui/testing';
13
+ ```
14
+
15
+ ## Signature
16
+
17
+ ```ts
18
+ class BfDesktopToastHarness extends ComponentHarness
19
+ ```
20
+
21
+ ## Methods
22
+
23
+ ### `getMessage(): Promise<string>`
24
+
25
+ The toast's message.
26
+
27
+ ### `clickAction(): Promise<void>`
28
+
29
+ Clicks the action button, which dismisses the toast with `'action'`. Throws without one.
30
+
31
+ ### `pressEscape(): Promise<void>`
32
+
33
+ Presses `Escape` inside the toast, which dismisses it with `'dismiss'`.
@@ -0,0 +1,28 @@
1
+ # BfDesktopToastOptions
2
+
3
+ Options of one desktop toast: its message, an action and its duration
4
+
5
+ Interface from `@bitforgehq/ui/overlay` · since 0.3.0
6
+
7
+ Options of `BfDesktopToastService.show()`.
8
+
9
+ ```ts
10
+ import { type BfDesktopToastOptions } from '@bitforgehq/ui/overlay';
11
+ ```
12
+
13
+ ## Properties
14
+
15
+ | Name | Type | Default | Description |
16
+ | ---------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
17
+ | `message` | `string` | required | Text of the toast. |
18
+ | `action` | `BfToastAction` | | An optional action button (the toast then persists by default). |
19
+ | `duration` | `number` | `3000` | Milliseconds before the toast auto-dismisses, not counting time the pointer is over the stack or focus is inside it; `0` keeps it until dismissed or its action fires (default 3000 without an action, `0` with one). |
20
+ | `injector` | `Injector` | | Source of the region's labels when this toast opens the stack (default the root injector): pass the feature's `inject(Injector)` so its `provideBfLabels()` names the region. |
21
+
22
+ ## Uses
23
+
24
+ - [BfToastAction](bf-toast-action.md)
25
+
26
+ ## Used by
27
+
28
+ - [BfDesktopToastService](bf-desktop-toast-service.md)
@@ -0,0 +1,28 @@
1
+ # BfDesktopToastPosition
2
+
3
+ The viewport corners and edges a desktop toast stack can anchor to
4
+
5
+ Type from `@bitforgehq/ui/overlay` · since 0.3.0
6
+
7
+ The viewport corner or edge the desktop toast stack anchors to.
8
+
9
+ ```ts
10
+ import { type BfDesktopToastPosition } from '@bitforgehq/ui/overlay';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ type BfDesktopToastPosition = 'bottom-end' | 'bottom-center' | 'top-end' | 'top-center'
17
+ ```
18
+
19
+ ## Values
20
+
21
+ - `bottom-end`
22
+ - `bottom-center`
23
+ - `top-end`
24
+ - `top-center`
25
+
26
+ ## Used by
27
+
28
+ - [BfDesktopToastConfig](bf-desktop-toast-config.md)
@@ -0,0 +1,42 @@
1
+ # BfDesktopToastService
2
+
3
+ Shows brief desktop notifications in a stack at a corner of the viewport
4
+
5
+ Service from `@bitforgehq/ui/overlay` · since 0.3.0
6
+
7
+ Shows desktop notifications: `show(options)` adds a `bf-desktop-toast` card to one passive
8
+ overlay stack (bottom right by default, 24 px in, a `region` landmark named "Notifications")
9
+ and returns a `BfToastRef`. Up to three are visible at once, the newest nearest the anchored
10
+ edge; later calls wait and show as earlier ones end. A toast auto-dismisses after `duration` ms
11
+ (default 3000, `'timeout'`); one with an action persists by default until its action
12
+ (`'action'`), `Escape` inside it or `dismiss()` (`'dismiss'`), and the next `show()` replaces it
13
+ (`'dismiss'`), visible or waiting. The pointer over the stack or focus inside it pauses every
14
+ visible toast, which resume with their remaining time. Each toast is announced once, politely,
15
+ through CDK `LiveAnnouncer`; focus never moves on show, and returns to the element focused
16
+ last outside a toast that closes while holding it. `F6` from the page moves focus to the
17
+ action of the newest toast that has one, and `F6` inside the stack moves it back (otherwise
18
+ the key is left to the browser); it does nothing while a modal overlay is open
19
+ (`BfOverlayStack.count() > 0`), since that overlay's focus trap must not be escaped. No
20
+ backdrop, no scroll lock, nothing inert, and a navigation never closes it (a "Saved" survives
21
+ the navigation after the save). Needs `@angular/cdk`, no Capacitor.
22
+
23
+ ```ts
24
+ import { BfDesktopToastService } from '@bitforgehq/ui/overlay';
25
+ ```
26
+
27
+ ## Methods
28
+
29
+ ### `show(options: BfDesktopToastOptions): BfToastRef`
30
+
31
+ Queues `options` as a toast; shows it now while fewer than `maxVisible` are visible, else once
32
+ one ends. Every persistent toast (`duration` 0, the default with an action), visible or
33
+ waiting, is dismissed first (`'dismiss'`).
34
+
35
+ | Parameter | Type | Description |
36
+ | --------- | ----------------------- | --------------------------------------------------- |
37
+ | `options` | `BfDesktopToastOptions` | The toast's message, action, duration and injector. |
38
+
39
+ ## Uses
40
+
41
+ - [BfDesktopToastOptions](bf-desktop-toast-options.md)
42
+ - [BfToastRef](bf-toast-ref.md)
@@ -0,0 +1,44 @@
1
+ # BfDialogConfig
2
+
3
+ Options of a dialog: its data, width, role, dismissal, focus and injector
4
+
5
+ Interface from `@bitforgehq/ui/overlay` · since 0.3.0
6
+
7
+ Options of `BfDialogService.open()`.
8
+
9
+ ```ts
10
+ import { type BfDialogConfig } from '@bitforgehq/ui/overlay';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ interface BfDialogConfig<D = unknown>
17
+ ```
18
+
19
+ ## Properties
20
+
21
+ | Name | Type | Default | Description |
22
+ | ------------------- | --------------------------------------------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
23
+ | `data` | `D` | | Injected into the content as `BF_DIALOG_DATA` (and a template's `data`). |
24
+ | `size` | `BfDialogSize` (`'sm' \| 'md' \| 'lg' \| 'xl' \| 'fullscreen'`) | `'md'` | Width of the `bf-dialog` in the content (default `md`, 32 rem). |
25
+ | `role` | `BfDialogRole` (`'dialog' \| 'alertdialog'`) | `'dialog'` | `alertdialog` for a dialog that demands an answer (default `dialog`). |
26
+ | `ariaLabel` | `string` | | Accessible name, when the content renders no `bf-dialog` title and no heading. |
27
+ | `ariaDescribedBy` | `string` | | Id of the element describing the dialog (e.g. its message). |
28
+ | `dismissOnBackdrop` | `boolean` | | A backdrop click closes the dialog (default true for `dialog`, false for `alertdialog`). |
29
+ | `dismissOnEscape` | `boolean` | `true` | `Escape` closes the dialog (default true); when false the key is claimed and ignored. |
30
+ | `autoFocus` | `BfOverlayAutoFocus` (`'first-tabbable' \| 'panel'`) | `'first-tabbable'` | Initial focus (default `first-tabbable`: an `[autofocus]`/`[cdkFocusInitial]` element, else the first tabbable element); `panel` focuses the dialog itself, for long text. |
31
+ | `restoreFocus` | `boolean` | `true` | Returns focus to the element that had it before opening (default true). |
32
+ | `closeOnNavigation` | `boolean` | `true` | A navigation to another URL path closes the dialog with no result (default true). |
33
+ | `panelClass` | `string[]` | | Extra classes on the overlay panel (it always carries `bf-overlay-panel bf-dialog-panel`). |
34
+ | `injector` | `Injector` | | Parent of the content's injector and source of its labels (default the root injector). Pass the opener's `inject(Injector)` so a feature-level `provideBfLabels()` reaches the dialog. |
35
+
36
+ ## Uses
37
+
38
+ - [BfDialogRole](bf-dialog-role.md)
39
+ - [BfDialogSize](bf-dialog-size.md)
40
+ - [BfOverlayAutoFocus](bf-overlay-auto-focus.md)
41
+
42
+ ## Used by
43
+
44
+ - [BfDialogService](bf-dialog-service.md)
@@ -0,0 +1,52 @@
1
+ # BfDialogHarness
2
+
3
+ Test harness for a dialog: its title, text and role, its buttons and Escape
4
+
5
+ Class from `@bitforgehq/ui/testing` · since 0.3.0
6
+
7
+ Harness for `bf-dialog`, the card `BfDialogService` opens (a `confirm()` alert dialog is built
8
+ from it too). Dialogs render in the CDK overlay container outside the tested component, so get
9
+ it through `TestbedHarnessEnvironment.documentRootLoader(fixture)`.
10
+
11
+ ```ts
12
+ import { BfDialogHarness } from '@bitforgehq/ui/testing';
13
+ ```
14
+
15
+ ## Signature
16
+
17
+ ```ts
18
+ class BfDialogHarness extends ComponentHarness
19
+ ```
20
+
21
+ ## Methods
22
+
23
+ ### `getTitle(): Promise<string>`
24
+
25
+ The title heading.
26
+
27
+ ### `getText(): Promise<string>`
28
+
29
+ The text of the dialog's body (its content, without the title and footer).
30
+
31
+ ### `getRole(): Promise<string | null>`
32
+
33
+ The role of the overlay panel this dialog sits in: `dialog`, or `alertdialog` for
34
+ `confirm()` and `role: 'alertdialog'`. The panel is found by the dialog's own
35
+ `data-bf-dialog-id`, so a dialog under another one (a confirm opened from a dialog) reads its
36
+ own panel.
37
+
38
+ ### `clickButton(label: string): Promise<void>`
39
+
40
+ Clicks the button with this text (a footer or content button). Throws for an unknown label.
41
+
42
+ | Parameter | Type | Description |
43
+ | --------- | -------- | ------------------ |
44
+ | `label` | `string` | The button's text. |
45
+
46
+ ### `close(): Promise<void>`
47
+
48
+ Clicks the close button (×), which closes the dialog with no result. Throws without one.
49
+
50
+ ### `pressEscape(): Promise<void>`
51
+
52
+ Presses `Escape` inside the dialog: it closes, or a `confirm()` resolves its cancel answer.
@@ -0,0 +1,44 @@
1
+ # BfDialogRef
2
+
3
+ Handle on an open dialog that closes it and resolves with its result
4
+
5
+ Class from `@bitforgehq/ui/overlay` · since 0.3.0
6
+
7
+ Handle to an open dialog, returned by `BfDialogService.open()` and injectable in the dialog's
8
+ content (`inject(BfDialogRef)`). `close(result)` plays the exit animation, detaches the dialog
9
+ and resolves `afterClosed` with `result`; later calls are ignored. Closing with `Escape`, the
10
+ backdrop or the `bf-dialog` close button resolves `undefined`.
11
+
12
+ ```ts
13
+ import { BfDialogRef } from '@bitforgehq/ui/overlay';
14
+ ```
15
+
16
+ ## Signature
17
+
18
+ ```ts
19
+ class BfDialogRef<R = unknown, C = unknown>
20
+ ```
21
+
22
+ ## Properties
23
+
24
+ | Name | Type | Default | Description |
25
+ | ------------------- | ------------------------- | ------- | ----------------------------------------------------------------------------------------- |
26
+ | `id` | `string` | | Unique id of the dialog (its overlay's `bf-overlay-N`). |
27
+ | `afterClosed` | `Promise<R \| undefined>` | | Resolves with the result given to `close()`, or `undefined`, once the dialog is detached. |
28
+ | `closed` | `Signal<boolean>` | | True once the dialog has been detached. |
29
+ | `componentInstance` | `C \| null` | | The content component; `null` for a dialog opened from a template. |
30
+
31
+ ## Methods
32
+
33
+ ### `close(result?: R): void`
34
+
35
+ Closes the dialog with an optional result; ignored once closing.
36
+
37
+ | Parameter | Type | Description |
38
+ | --------- | ---- | -------------------------------------- |
39
+ | `result?` | `R` | The value `afterClosed` resolves with. |
40
+
41
+ ## Used by
42
+
43
+ - [BfDialogService](bf-dialog-service.md)
44
+ - [BfDialogTemplateContext](bf-dialog-template-context.md)
@@ -0,0 +1,26 @@
1
+ # BfDialogRole
2
+
3
+ The role a dialog carries, plain or an alert dialog that demands an answer
4
+
5
+ Type from `@bitforgehq/ui/overlay` · since 0.3.0
6
+
7
+ The ARIA role of a dialog: `dialog`, or `alertdialog` for one that demands an answer.
8
+
9
+ ```ts
10
+ import { type BfDialogRole } from '@bitforgehq/ui/overlay';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ type BfDialogRole = 'dialog' | 'alertdialog'
17
+ ```
18
+
19
+ ## Values
20
+
21
+ - `dialog`
22
+ - `alertdialog`
23
+
24
+ ## Used by
25
+
26
+ - [BfDialogConfig](bf-dialog-config.md)
@@ -0,0 +1,55 @@
1
+ # BfDialogService
2
+
3
+ Opens modal dialogs and confirm prompts, centred over the page with focus trapped
4
+
5
+ Service from `@bitforgehq/ui/overlay` · since 0.3.0
6
+
7
+ Opens modal dialogs on the overlay core, centred over a backdrop: a component or a template in
8
+ a pane labelled by its `bf-dialog` title, with focus moved in and trapped, `Escape` and a
9
+ backdrop click closing it (never the backdrop for an `alertdialog`), focus returned to the
10
+ opener, document scroll locked and the page behind it `inert`. `confirm()` opens an alert
11
+ dialog with a title, a message and a row of buttons and resolves with the pressed button's
12
+ `id ?? label`.
13
+
14
+ ```ts
15
+ import { BfDialogService } from '@bitforgehq/ui/overlay';
16
+ ```
17
+
18
+ ## Methods
19
+
20
+ ### `open<C, D = unknown, R = unknown>(component: Type<C>, config?: BfDialogConfig<D>): BfDialogRef<R, C>`
21
+
22
+ Opens `component` as a dialog; it injects `BfDialogRef` and `BF_DIALOG_DATA`.
23
+
24
+ | Parameter | Type | Description |
25
+ | ----------- | ------------------- | ----------------------------------------------------------------------- |
26
+ | `component` | `Type<C>` | The component to render; it injects `BfDialogRef` and `BF_DIALOG_DATA`. |
27
+ | `config?` | `BfDialogConfig<D>` | The dialog's data, width, role, dismissal, focus and injector. |
28
+
29
+ ### `open<D = unknown, R = unknown>(template: TemplateRef<BfDialogTemplateContext<D, R>>, config?: BfDialogConfig<D>): BfDialogRef<R>`
30
+
31
+ Opens `template` as a dialog; its context is `{ $implicit: ref, data }`.
32
+
33
+ | Parameter | Type | Description |
34
+ | ---------- | -------------------------------------------- | -------------------------------------------------------------------- |
35
+ | `template` | `TemplateRef<BfDialogTemplateContext<D, R>>` | The template to render, with the context `{ $implicit: ref, data }`. |
36
+ | `config?` | `BfDialogConfig<D>` | The dialog's data, width, role, dismissal, focus and injector. |
37
+
38
+ ### `confirm(options: BfConfirmOptions): Promise<string | undefined>`
39
+
40
+ Opens an alert dialog (`role="alertdialog"`, described by `message`, no backdrop dismiss)
41
+ and resolves with the pressed button's `id ?? label`. Focus starts on the `cancel`-role
42
+ button, else the first button; `Escape` resolves the cancel button's answer, or is ignored
43
+ when there is none. A navigation to another path resolves the cancel button's answer, else
44
+ `undefined`.
45
+
46
+ | Parameter | Type | Description |
47
+ | --------- | ------------------ | ---------------------------------------------------------- |
48
+ | `options` | `BfConfirmOptions` | The title, message, buttons and width of the alert dialog. |
49
+
50
+ ## Uses
51
+
52
+ - [BfConfirmOptions](bf-confirm-options.md)
53
+ - [BfDialogConfig](bf-dialog-config.md)
54
+ - [BfDialogRef](bf-dialog-ref.md)
55
+ - [BfDialogTemplateContext](bf-dialog-template-context.md)
@@ -0,0 +1,31 @@
1
+ # BfDialogSize
2
+
3
+ The dialog width scale from a 24 rem confirm to an edge-to-edge fullscreen dialog
4
+
5
+ Type from `@bitforgehq/ui/overlay` · since 0.3.0
6
+
7
+ The dialog's own width scale (not `BfSize`, which is a control-height scale): `sm` 24 rem,
8
+ `md` 32 rem, `lg` 48 rem, `xl` 64 rem — each never wider than the viewport minus a gutter on
9
+ both sides — and `fullscreen`, edge to edge.
10
+
11
+ ```ts
12
+ import { type BfDialogSize } from '@bitforgehq/ui/overlay';
13
+ ```
14
+
15
+ ## Signature
16
+
17
+ ```ts
18
+ type BfDialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen'
19
+ ```
20
+
21
+ ## Values
22
+
23
+ - `sm`
24
+ - `md`
25
+ - `lg`
26
+ - `xl`
27
+ - `fullscreen`
28
+
29
+ ## Used by
30
+
31
+ - [BfDialogConfig](bf-dialog-config.md)
@@ -0,0 +1,32 @@
1
+ # BfDialogTemplateContext
2
+
3
+ The context a template opened as a dialog receives: its ref and its data
4
+
5
+ Interface from `@bitforgehq/ui/overlay` · since 0.3.0
6
+
7
+ Context of a template opened with `BfDialogService.open()`: `let-ref` and `let-data="data"`.
8
+
9
+ ```ts
10
+ import { type BfDialogTemplateContext } from '@bitforgehq/ui/overlay';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ interface BfDialogTemplateContext<D = unknown, R = unknown>
17
+ ```
18
+
19
+ ## Properties
20
+
21
+ | Name | Type | Default | Description |
22
+ | ----------- | ---------------- | -------- | ---------------------------------------------------------- |
23
+ | `$implicit` | `BfDialogRef<R>` | required | The dialog's ref (`let-ref`), to close it with a result. |
24
+ | `data` | `D` | required | The `data` the dialog was opened with (`let-data="data"`). |
25
+
26
+ ## Uses
27
+
28
+ - [BfDialogRef](bf-dialog-ref.md)
29
+
30
+ ## Used by
31
+
32
+ - [BfDialogService](bf-dialog-service.md)
@@ -0,0 +1,26 @@
1
+ # BfEmptyStateHeadingLevel
2
+
3
+ The heading level of an empty state title, two for a screen or three
4
+
5
+ Type from `@bitforgehq/ui` · since 0.3.0
6
+
7
+ The heading level of a `bf-empty-state` title: `2` for a screen, `3` inside a section.
8
+
9
+ ```ts
10
+ import { type BfEmptyStateHeadingLevel } from '@bitforgehq/ui';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ type BfEmptyStateHeadingLevel = 2 | 3
17
+ ```
18
+
19
+ ## Values
20
+
21
+ - `2`
22
+ - `3`
23
+
24
+ ## Used by
25
+
26
+ - [bf-empty-state](../components/empty-state.md)
@@ -0,0 +1,31 @@
1
+ # BfEnterKeyHint
2
+
3
+ The labels a phone keyboard can put on its Enter key
4
+
5
+ Type from `@bitforgehq/ui` · since 0.2.0
6
+
7
+ Native `enterkeyhint`: the label of the virtual keyboard's Enter key.
8
+
9
+ ```ts
10
+ import { type BfEnterKeyHint } from '@bitforgehq/ui';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ type BfEnterKeyHint = 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'
17
+ ```
18
+
19
+ ## Values
20
+
21
+ - `enter`
22
+ - `done`
23
+ - `go`
24
+ - `next`
25
+ - `previous`
26
+ - `search`
27
+ - `send`
28
+
29
+ ## Used by
30
+
31
+ - [BfInputEnterKeyHint](bf-input-enter-key-hint.md)
@@ -0,0 +1,32 @@
1
+ # bfFieldControlClass
2
+
3
+ The class list that makes a custom control look like a library text field
4
+
5
+ Function from `@bitforgehq/ui` · since 0.3.0
6
+
7
+ The class list `bf-input` puts on its native `<input>`, for a custom control inside `bf-field`
8
+ (a native input with a mask, a combobox, a date picker's text box) that must look like the
9
+ library's own fields: the same box, height and type per `size`, padding, focus ring and border,
10
+ with the danger border while `invalid`. The disabled and read-only styles come from the
11
+ control's native `disabled` / `readonly` attributes (`:disabled`, `:read-only`), so set those on
12
+ the control as well; the class list is the one `bf-input` renders in the same state.
13
+
14
+ ```ts
15
+ import { bfFieldControlClass } from '@bitforgehq/ui';
16
+ ```
17
+
18
+ ## Signature
19
+
20
+ ```ts
21
+ function bfFieldControlClass(state: BfFieldControlState): string
22
+ ```
23
+
24
+ ## Parameters
25
+
26
+ | Parameter | Type | Description |
27
+ | --------- | --------------------- | -------------------------------------------- |
28
+ | `state` | `BfFieldControlState` | The size and state to style the control for. |
29
+
30
+ ## Uses
31
+
32
+ - [BfFieldControlState](bf-field-control-state.md)
@@ -0,0 +1,28 @@
1
+ # BfFieldControlState
2
+
3
+ The size and state a custom field control is styled for by bfFieldControlClass
4
+
5
+ Interface from `@bitforgehq/ui` · since 0.3.0
6
+
7
+ The field state `bfFieldControlClass` styles a control for.
8
+
9
+ ```ts
10
+ import { type BfFieldControlState } from '@bitforgehq/ui';
11
+ ```
12
+
13
+ ## Properties
14
+
15
+ | Name | Type | Default | Description |
16
+ | ---------- | --------------------------------- | -------- | -------------------------------------------------------------------------- |
17
+ | `size` | `BfSize` (`'sm' \| 'md' \| 'lg'`) | required | Height step: sm 32, md 40, lg 48 px, as `bf-input`'s `size`. |
18
+ | `invalid` | `boolean` | required | Whether the control shows its error state (the danger border). |
19
+ | `disabled` | `boolean` | required | Whether the control is disabled; set the control's native `disabled` too. |
20
+ | `readonly` | `boolean` | required | Whether the control is read-only; set the control's native `readonly` too. |
21
+
22
+ ## Uses
23
+
24
+ - [BfSize](bf-size.md)
25
+
26
+ ## Used by
27
+
28
+ - [bfFieldControlClass](bf-field-control-class.md)
@@ -0,0 +1,29 @@
1
+ # BfFieldSize
2
+
3
+ Former name of the shared size scale for text fields, kept until 1.0.0
4
+
5
+ Type from `@bitforgehq/ui` · since 0.1.0
6
+
7
+ **Deprecated** 0.3.0 use BfSize; removed in 1.0.0
8
+
9
+ The height step of a text field; the same scale as every sized widget.
10
+
11
+ ```ts
12
+ import { type BfFieldSize } from '@bitforgehq/ui';
13
+ ```
14
+
15
+ ## Signature
16
+
17
+ ```ts
18
+ type BfFieldSize = BfSize
19
+ ```
20
+
21
+ ## Values
22
+
23
+ - `sm`
24
+ - `md`
25
+ - `lg`
26
+
27
+ ## Uses
28
+
29
+ - [BfSize](bf-size.md)
@@ -0,0 +1,27 @@
1
+ # BfHapticsImpactStyle
2
+
3
+ The weight of an impact haptic, light, medium or heavy
4
+
5
+ Type from `@bitforgehq/ui/mobile` · since 0.2.0
6
+
7
+ Impact weight, mapped to `ImpactStyle.Light` / `Medium` / `Heavy` on native.
8
+
9
+ ```ts
10
+ import { type BfHapticsImpactStyle } from '@bitforgehq/ui/mobile';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ type BfHapticsImpactStyle = 'light' | 'medium' | 'heavy'
17
+ ```
18
+
19
+ ## Values
20
+
21
+ - `light`
22
+ - `medium`
23
+ - `heavy`
24
+
25
+ ## Used by
26
+
27
+ - [BfHapticsService](bf-haptics-service.md)
@@ -0,0 +1,27 @@
1
+ # BfHapticsNotificationType
2
+
3
+ The outcome a notification haptic reports: success, warning or error
4
+
5
+ Type from `@bitforgehq/ui/mobile` · since 0.2.0
6
+
7
+ Outcome of a task, mapped to `NotificationType.Success` / `Warning` / `Error` on native.
8
+
9
+ ```ts
10
+ import { type BfHapticsNotificationType } from '@bitforgehq/ui/mobile';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ type BfHapticsNotificationType = 'success' | 'warning' | 'error'
17
+ ```
18
+
19
+ ## Values
20
+
21
+ - `success`
22
+ - `warning`
23
+ - `error`
24
+
25
+ ## Used by
26
+
27
+ - [BfHapticsService](bf-haptics-service.md)