@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,29 @@
1
+ # BfSheetAutoFocus
2
+
3
+ Where focus lands when a sheet opens, the sheet itself or its first field
4
+
5
+ Type from `@bitforgehq/ui/mobile` · since 0.3.0
6
+
7
+ Where focus goes when a sheet opens: the sheet itself (`panel`), so no soft keyboard comes up
8
+ and a screen reader starts reading at the sheet, or its first field (`first-field`): the element
9
+ marked `[autofocus]`/`[cdkFocusInitial]`, else the first focusable element of the content, which
10
+ raises the keyboard on Android when it is a text field.
11
+
12
+ ```ts
13
+ import { type BfSheetAutoFocus } from '@bitforgehq/ui/mobile';
14
+ ```
15
+
16
+ ## Signature
17
+
18
+ ```ts
19
+ type BfSheetAutoFocus = 'panel' | 'first-field'
20
+ ```
21
+
22
+ ## Values
23
+
24
+ - `panel`
25
+ - `first-field`
26
+
27
+ ## Used by
28
+
29
+ - [BfSheetOptions](bf-sheet-options.md)
@@ -0,0 +1,32 @@
1
+ # BfSheetOptions
2
+
3
+ Options of a bottom sheet: where it rests, how it closes and its name
4
+
5
+ Interface from `@bitforgehq/ui/mobile` · since 0.2.0
6
+
7
+ Options of `BfSheetService.open()`.
8
+
9
+ ```ts
10
+ import { type BfSheetOptions } from '@bitforgehq/ui/mobile';
11
+ ```
12
+
13
+ ## Properties
14
+
15
+ | Name | Type | Default | Description |
16
+ | ------------------- | ----------------------------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
17
+ | `snapPoints` | `number[]` | `[0.5, 0.92]` | Heights the sheet rests at, as fractions of the viewport height (default `[0.5, 0.92]`). |
18
+ | `initial` | `number` | `0` | Index of the snap point the sheet opens at (default 0). |
19
+ | `dismissible` | `boolean` | `true` | The backdrop, `Escape`, the hardware back button and a downward drag close the sheet (default true). When false only `close()` does, or a navigation (see `closeOnNavigation`). |
20
+ | `data` | `unknown` | | Injected into the content as `BF_OVERLAY_DATA`. |
21
+ | `closeOnNavigation` | `boolean` | `true` | A navigation to another URL path (a pushed or popped page, a tab switch) closes the sheet with no result (default true), also a non-dismissible one. |
22
+ | `ariaLabel` | `string` | | Accessible name of the sheet. Without it the sheet is named by the first heading in its content (`aria-labelledby`), else by `provideBfLabels()`'s `sheet` ("Sheet"). |
23
+ | `autoFocus` | `BfSheetAutoFocus` (`'panel' \| 'first-field'`) | `'panel'` | Where focus goes on open: `panel` (default) focuses the sheet itself (a `role="dialog"` with a name and `tabindex="-1"`), so a screen reader lands inside it and no soft keyboard hides it; `first-field` focuses the element marked `[autofocus]`/`[cdkFocusInitial]`, else the first focusable element of the content (never the sheet's own Close and grabber), which raises the keyboard on Android when it is a text field. |
24
+ | `injector` | `Injector` | | Injector the sheet resolves its labels (`BF_LABELS`) from and the parent of its content's injector (default the root injector). Pass the opening component's `inject(Injector)` so a feature-level `provideBfLabels()` and other feature providers reach it. |
25
+
26
+ ## Uses
27
+
28
+ - [BfSheetAutoFocus](bf-sheet-auto-focus.md)
29
+
30
+ ## Used by
31
+
32
+ - [BfSheetService](bf-sheet-service.md)
@@ -0,0 +1,45 @@
1
+ # BfSheetRef
2
+
3
+ Handle on an open bottom sheet that moves it between snap points and closes it
4
+
5
+ Class from `@bitforgehq/ui/mobile` · since 0.2.0
6
+
7
+ Handle to an open bottom sheet, returned by `BfSheetService.open()` and injectable in the
8
+ sheet's content as `BfSheetRef` (and as `BfOverlayRef`). On top of `close(result)` and
9
+ `afterClosed` it moves the sheet between its snap points: `snapTo(index)` animates to a point
10
+ and `snapIndex()` tracks the current one (also after a drag).
11
+
12
+ ```ts
13
+ import { BfSheetRef } from '@bitforgehq/ui/mobile';
14
+ ```
15
+
16
+ ## Signature
17
+
18
+ ```ts
19
+ class BfSheetRef<T = unknown> extends BfOverlayRef<T>
20
+ ```
21
+
22
+ ## Properties
23
+
24
+ | Name | Type | Default | Description |
25
+ | ----------- | ---------------- | ------- | ---------------------------------------------------------------------- |
26
+ | `snapIndex` | `Signal<number>` | | Index of the snap point the sheet rests at (or is settling to). |
27
+ | `isClosing` | `boolean` | | True from the first close on, whichever way the sheet is being closed. |
28
+
29
+ ## Methods
30
+
31
+ ### `snapTo(index: number): void`
32
+
33
+ Animates the sheet to the snap point at `index` (clamped to the configured points).
34
+
35
+ | Parameter | Type | Description |
36
+ | --------- | -------- | ----------------------------------------------- |
37
+ | `index` | `number` | The position of the snap point in `snapPoints`. |
38
+
39
+ ## Uses
40
+
41
+ - [BfOverlayRef](bf-overlay-ref.md)
42
+
43
+ ## Used by
44
+
45
+ - [BfSheetService](bf-sheet-service.md)
@@ -0,0 +1,34 @@
1
+ # BfSheetService
2
+
3
+ Opens bottom sheets that rest at snap points and close with a result
4
+
5
+ Service from `@bitforgehq/ui/mobile` · since 0.2.0
6
+
7
+ Opens bottom sheets: a component or template in a `bf-sheet` container on the overlay core,
8
+ bottom-anchored over a backdrop, resting at snap points (fractions of the viewport height).
9
+ The content injects `BF_OVERLAY_DATA` and `BfSheetRef` (also as `BfOverlayRef`) to read its
10
+ data, move between snap points and close with a result. A dismissible sheet (the default)
11
+ closes on a backdrop tap, `Escape`, the hardware back button and a drag below its lowest
12
+ point; a non-dismissible one only through `close()`, and swallows the back button while open.
13
+ A navigation to another URL path closes either (`closeOnNavigation`). On open, focus goes to the
14
+ sheet itself, so no soft keyboard comes up (`autoFocus: 'first-field'` focuses the first field).
15
+
16
+ ```ts
17
+ import { BfSheetService } from '@bitforgehq/ui/mobile';
18
+ ```
19
+
20
+ ## Methods
21
+
22
+ ### `open<C, T = unknown>(content: Type<C> | TemplateRef<unknown>, options?: BfSheetOptions): BfSheetRef<T>`
23
+
24
+ Opens `content` (a component or a template) in a bottom sheet.
25
+
26
+ | Parameter | Type | Description |
27
+ | ---------- | --------------------------------- | -------------------------------------------------- |
28
+ | `content` | `Type<C> \| TemplateRef<unknown>` | The component or template to render in the sheet. |
29
+ | `options?` | `BfSheetOptions` | Where the sheet rests, how it closes and its name. |
30
+
31
+ ## Uses
32
+
33
+ - [BfSheetOptions](bf-sheet-options.md)
34
+ - [BfSheetRef](bf-sheet-ref.md)
@@ -0,0 +1,28 @@
1
+ # BfShellConfigMode
2
+
3
+ The shell style setting, iOS, Material or automatic from the platform
4
+
5
+ Type from `@bitforgehq/ui/mobile` · since 0.3.0
6
+
7
+ The shell's transition and gesture style: `ios`, `md` (Material), or `auto` (iOS on iOS, else
8
+ `md`).
9
+
10
+ ```ts
11
+ import { type BfShellConfigMode } from '@bitforgehq/ui/mobile';
12
+ ```
13
+
14
+ ## Signature
15
+
16
+ ```ts
17
+ type BfShellConfigMode = 'ios' | 'md' | 'auto'
18
+ ```
19
+
20
+ ## Values
21
+
22
+ - `ios`
23
+ - `md`
24
+ - `auto`
25
+
26
+ ## Used by
27
+
28
+ - [BfShellConfig](bf-shell-config.md)
@@ -0,0 +1,38 @@
1
+ # BfShellConfig
2
+
3
+ The mobile shell settings: mode, swipe-back, haptics, Dynamic Type and system bars
4
+
5
+ Interface from `@bitforgehq/ui/mobile` · since 0.2.0
6
+
7
+ Configuration of the mobile shell, set once through `provideBfShell()`.
8
+
9
+ ```ts
10
+ import { type BfShellConfig } from '@bitforgehq/ui/mobile';
11
+ ```
12
+
13
+ ## Properties
14
+
15
+ | Name | Type | Default | Description |
16
+ | ---------------------- | --------------------------------------------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
17
+ | `mode` | `BfShellConfigMode` (`'ios' \| 'md' \| 'auto'`) | `'auto'` | Transition and gesture style: `ios`, `md` (Material), or `auto` (iOS on iOS, else `md`). Overscroll is not part of it: `bf-content`'s iOS bounce and Android stretch and `bf-refresher`'s iOS bounce mode follow the engine (`BfPlatformService.mode()`), because the bounce is WebKit's own and Chrome never reports a negative `scrollTop`. |
18
+ | `swipeBack` | `boolean` | `true` | Enables the iOS edge swipe-back in every stack outlet (iOS mode only). |
19
+ | `deferTransitionStart` | `boolean` | `true` | Holds a transition at frame 0 for two animation frames while the entering page renders. |
20
+ | `hapticsOnTabChange` | `boolean` | `true` | Plays a light haptic tick on tab changes (native only). |
21
+ | `dynamicType` | `BfShellDynamicType` (`false \| BfShellDynamicTypeLimit`) | `{ maxScale: 2.35 }` | iOS Dynamic Type (native iOS only; see `BfTextScaleService`): the root font size follows the user's text size. `false` opts out; `maxScale` caps the root scale (default 2.35, the AX3 size, at least 200 %). `Infinity` removes the cap entirely; a non-finite value other than `Infinity` (e.g. `NaN`) falls back to the default cap. Left out, the default applies. Android needs no setting: its WebView applies the system font scale. |
22
+ | `syncSystemBars` | `boolean` | `true` | Native iOS and Android only: the status-bar and navigation-bar icons follow the in-app theme (`BfPlatformService.dark()`) through Capacitor's `SystemBars.setStyle()`, on start and on every theme change (see `bfSystemBarsStyle()`). `false` leaves the system bars to the app. |
23
+ | `backAtRoot` | `BfBackAtRoot` (`'minimize' \| 'exit'`) | `'minimize'` | Native Android only: what the back button does when no overlay and no stack can go back (every stack is at its first page). `minimize` (default) moves the app to the background, as Android does for a root activity, so a relaunch resumes it warm on the same tab; `exit` finishes the activity, as 0.2 did, so the next launch starts cold. |
24
+ | `maxLivePages` | `number` | `Infinity` | How many pages of one stack stay alive in each `bf-stack-outlet` (default `Infinity`: every page). Above it, the deepest pages are destroyed and kept as a record (route, URL, history position and the content's scroll position); a pop back to one creates the page again, fires its lifecycle and restores its scroll. Deep pages come back fresh: their component state and the stacks of outlets nested in them are gone. Values below 1 count as 1. |
25
+
26
+ ## Uses
27
+
28
+ - [BfBackAtRoot](bf-back-at-root.md)
29
+ - [BfShellConfigMode](bf-shell-config-mode.md)
30
+ - [BfShellDynamicType](bf-shell-dynamic-type.md)
31
+
32
+ ## Used by
33
+
34
+ - [BfShellTestingOptions](bf-shell-testing-options.md)
35
+ - [BF_SHELL_CONFIG](bf_shell_config.md)
36
+ - [BF_SHELL_DEFAULTS](bf_shell_defaults.md)
37
+ - [provideBfShell](provide-bf-shell.md)
38
+ - [resolveShellMode](resolve-shell-mode.md)
@@ -0,0 +1,21 @@
1
+ # BfShellDynamicTypeLimit
2
+
3
+ The largest root font scale iOS Dynamic Type may apply in the shell
4
+
5
+ Interface from `@bitforgehq/ui/mobile` · since 0.3.0
6
+
7
+ The cap of iOS Dynamic Type: the largest root font scale the shell applies.
8
+
9
+ ```ts
10
+ import { type BfShellDynamicTypeLimit } from '@bitforgehq/ui/mobile';
11
+ ```
12
+
13
+ ## Properties
14
+
15
+ | Name | Type | Default | Description |
16
+ | ---------- | -------- | -------- | ----------------------------------------------------------------------------------------- |
17
+ | `maxScale` | `number` | required | The largest root font scale (2.35, the AX3 size, by default); `Infinity` removes the cap. |
18
+
19
+ ## Used by
20
+
21
+ - [BfShellDynamicType](bf-shell-dynamic-type.md)
@@ -0,0 +1,25 @@
1
+ # BfShellDynamicType
2
+
3
+ Whether the shell follows iOS Dynamic Type, and up to which scale
4
+
5
+ Type from `@bitforgehq/ui/mobile` · since 0.3.0
6
+
7
+ The shell's iOS Dynamic Type setting: `false` opts out, a `BfShellDynamicTypeLimit` caps it.
8
+
9
+ ```ts
10
+ import { type BfShellDynamicType } from '@bitforgehq/ui/mobile';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ type BfShellDynamicType = false | BfShellDynamicTypeLimit
17
+ ```
18
+
19
+ ## Uses
20
+
21
+ - [BfShellDynamicTypeLimit](bf-shell-dynamic-type-limit.md)
22
+
23
+ ## Used by
24
+
25
+ - [BfShellConfig](bf-shell-config.md)
@@ -0,0 +1,28 @@
1
+ # BfShellMode
2
+
3
+ The shell's look and motion conventions, iOS or Material Design
4
+
5
+ Type from `@bitforgehq/ui/mobile` · since 0.2.0
6
+
7
+ The shell's look and motion: `ios`, or `md` (Material) everywhere else.
8
+
9
+ ```ts
10
+ import { type BfShellMode } from '@bitforgehq/ui/mobile';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ type BfShellMode = 'ios' | 'md'
17
+ ```
18
+
19
+ ## Values
20
+
21
+ - `ios`
22
+ - `md`
23
+
24
+ ## Used by
25
+
26
+ - [BfPlatformService](bf-platform-service.md)
27
+ - [injectShellMode](inject-shell-mode.md)
28
+ - [resolveShellMode](resolve-shell-mode.md)
@@ -0,0 +1,26 @@
1
+ # BfShellTestingOptions
2
+
3
+ Options of the shell test providers: the routes and the shell settings
4
+
5
+ Interface from `@bitforgehq/ui/mobile` · since 0.3.0
6
+
7
+ Options of `provideBfShellTesting()`.
8
+
9
+ ```ts
10
+ import { type BfShellTestingOptions } from '@bitforgehq/ui/mobile';
11
+ ```
12
+
13
+ ## Properties
14
+
15
+ | Name | Type | Default | Description |
16
+ | -------- | ------------------------ | ------- | ---------------------------------------------------------------------------------------- |
17
+ | `routes` | `Routes` | `[]` | The routes of the test router. |
18
+ | `config` | `Partial<BfShellConfig>` | | Shell settings over the test defaults (`swipeBack: false`, `hapticsOnTabChange: false`). |
19
+
20
+ ## Uses
21
+
22
+ - [BfShellConfig](bf-shell-config.md)
23
+
24
+ ## Used by
25
+
26
+ - [provideBfShellTesting](provide-bf-shell-testing.md)
@@ -0,0 +1,45 @@
1
+ # BfSize
2
+
3
+ The three height steps every sized field and control shares
4
+
5
+ Type from `@bitforgehq/ui` · since 0.3.0
6
+
7
+ The one control-height scale: sm 32 px, md 40 px, lg 48 px.
8
+
9
+ ```ts
10
+ import { type BfSize } from '@bitforgehq/ui';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ type BfSize = 'sm' | 'md' | 'lg'
17
+ ```
18
+
19
+ ## Values
20
+
21
+ - `sm`
22
+ - `md`
23
+ - `lg`
24
+
25
+ ## Used by
26
+
27
+ - [bf-button](../components/button.md)
28
+ - [BfButtonSize](bf-button-size.md)
29
+ - [bf-checkbox](../components/checkbox.md)
30
+ - [bf-chip](../components/chip.md)
31
+ - [BfDefaults](bf-defaults.md)
32
+ - [BfDefaultsOptions](bf-defaults-options.md)
33
+ - [BfFieldControlState](bf-field-control-state.md)
34
+ - [BfFieldSize](bf-field-size.md)
35
+ - [bf-icon-button](../components/icon-button.md)
36
+ - [bf-input](../components/input.md)
37
+ - [bf-menu-button](../components/menu-button.md)
38
+ - [bf-menu](../components/menu.md)
39
+ - [bf-number-input](../components/number-input.md)
40
+ - [bf-radio-group](../components/radio-group.md)
41
+ - [bf-segmented](../components/segmented.md)
42
+ - [BfSegmentedSize](bf-segmented-size.md)
43
+ - [bf-select](../components/select.md)
44
+ - [bf-textarea](../components/textarea.md)
45
+ - [bf-toggle](../components/toggle.md)
@@ -0,0 +1,27 @@
1
+ # BfSpinnerSize
2
+
3
+ The three spinner diameters, from inline text to a page loading state
4
+
5
+ Type from `@bitforgehq/ui` · since 0.1.0
6
+
7
+ The diameter of a `bf-spinner`: sm, md or lg.
8
+
9
+ ```ts
10
+ import { type BfSpinnerSize } from '@bitforgehq/ui';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ type BfSpinnerSize = 'sm' | 'md' | 'lg'
17
+ ```
18
+
19
+ ## Values
20
+
21
+ - `sm`
22
+ - `md`
23
+ - `lg`
24
+
25
+ ## Used by
26
+
27
+ - [bf-spinner](../components/spinner.md)
@@ -0,0 +1,22 @@
1
+ # BfStackChange
2
+
3
+ What a stack outlet reports after its stack changed: the depth and the tab
4
+
5
+ Interface from `@bitforgehq/ui/mobile` · since 0.2.0
6
+
7
+ Emitted by `bf-stack-outlet` after every change of its stack.
8
+
9
+ ```ts
10
+ import { type BfStackChange } from '@bitforgehq/ui/mobile';
11
+ ```
12
+
13
+ ## Properties
14
+
15
+ | Name | Type | Default | Description |
16
+ | -------- | ---------------- | -------- | ------------------------------------------------------------------------------------- |
17
+ | `depth` | `number` | required | Number of pages in the active stack. |
18
+ | `tabKey` | `string \| null` | required | Key of the active tab's stack inside `bf-tabs`; null for an outlet outside `bf-tabs`. |
19
+
20
+ ## Used by
21
+
22
+ - [bf-stack-outlet](../components/stack-outlet.md)
@@ -0,0 +1,32 @@
1
+ # BfStackReuseStrategy
2
+
3
+ Route reuse strategy that treats a changed path parameter as a new stack page
4
+
5
+ Service from `@bitforgehq/ui/mobile` · since 0.2.0
6
+
7
+ The route reuse strategy the stack needs: the default one, except that a route whose _path
8
+ params_ change (`/items/4` → `/items/5`) is a new page, not an in-place update. The default only
9
+ compares `routeConfig`, so the router would reuse the component and never call the outlet, and
10
+ the stack would no longer match the history. Query-param changes still reuse the page (filters,
11
+ tabs). Exported so an app can extend it for its own reuse rules.
12
+
13
+ ```ts
14
+ import { BfStackReuseStrategy } from '@bitforgehq/ui/mobile';
15
+ ```
16
+
17
+ ## Signature
18
+
19
+ ```ts
20
+ class BfStackReuseStrategy extends BaseRouteReuseStrategy
21
+ ```
22
+
23
+ ## Methods
24
+
25
+ ### `shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean`
26
+
27
+ Whether the router may reuse the current page for `future`: same route config and path params.
28
+
29
+ | Parameter | Type | Description |
30
+ | --------- | ------------------------ | ----------------------------- |
31
+ | `future` | `ActivatedRouteSnapshot` | The route being navigated to. |
32
+ | `curr` | `ActivatedRouteSnapshot` | The route shown now. |
@@ -0,0 +1,26 @@
1
+ # BfStackTransitionEvent
2
+
3
+ What a stack outlet reports around a page transition: its kind and animation
4
+
5
+ Interface from `@bitforgehq/ui/mobile` · since 0.2.0
6
+
7
+ Emitted by `bf-stack-outlet` around a transition between two pages.
8
+
9
+ ```ts
10
+ import { type BfStackTransitionEvent } from '@bitforgehq/ui/mobile';
11
+ ```
12
+
13
+ ## Properties
14
+
15
+ | Name | Type | Default | Description |
16
+ | ---------- | -------------------------------------- | -------- | ----------------------------------------------------------------------------- |
17
+ | `kind` | `BfTransitionKind` (`'push' \| 'pop'`) | required | `push` for a new page (also a `replaceUrl` navigation), `pop` for going back. |
18
+ | `animated` | `boolean` | required | False when the pages switched without an animation (`animated=false`). |
19
+
20
+ ## Uses
21
+
22
+ - [BfTransitionKind](bf-transition-kind.md)
23
+
24
+ ## Used by
25
+
26
+ - [bf-stack-outlet](../components/stack-outlet.md)
@@ -0,0 +1,26 @@
1
+ # BfStackTransition
2
+
3
+ A running set of page transition animations that finish together
4
+
5
+ Interface from `@bitforgehq/ui/mobile` · since 0.2.0
6
+
7
+ A running set of animations that finish together.
8
+
9
+ ```ts
10
+ import { type BfStackTransition } from '@bitforgehq/ui/mobile';
11
+ ```
12
+
13
+ ## Properties
14
+
15
+ | Name | Type | Default | Description |
16
+ | ------------ | --------------- | -------- | ----------------------------------------------------------------------- |
17
+ | `animations` | `Animation[]` | required | The Web Animations of the transition, one per moving layer. |
18
+ | `duration` | `number` | required | Their shared duration (ms). |
19
+ | `finished` | `Promise<void>` | required | Resolves when every animation finished or was cancelled; never rejects. |
20
+
21
+ ## Used by
22
+
23
+ - [createTransition](create-transition.md)
24
+ - [mdTransition](md-transition.md)
25
+ - [reducedTransition](reduced-transition.md)
26
+ - [settlePop](settle-pop.md)
@@ -0,0 +1,23 @@
1
+ # BfStackedOverlay
2
+
3
+ What the overlay stack needs of an overlay: a way to close it
4
+
5
+ Interface from `@bitforgehq/ui/overlay` · since 0.2.0
6
+
7
+ Also exported from `@bitforgehq/ui/mobile` (deprecated: 0.3.0 use BfStackedOverlay from '@bitforgehq/ui/overlay'; removed in 0.4.0).
8
+
9
+ What the stack needs of an overlay: a way to close it (a `BfOverlayRef` of any result type).
10
+
11
+ ```ts
12
+ import { type BfStackedOverlay } from '@bitforgehq/ui/overlay';
13
+ ```
14
+
15
+ ## Methods
16
+
17
+ ### `close(): void`
18
+
19
+ Closes the overlay (the stack calls it for the hardware back button).
20
+
21
+ ## Used by
22
+
23
+ - [BfOverlayStack](bf-overlay-stack.md)
@@ -0,0 +1,38 @@
1
+ # bfSystemBarsStyle
2
+
3
+ The system-bar icon style that keeps the bars readable in the in-app theme
4
+
5
+ Function from `@bitforgehq/ui/mobile` · since 0.3.0
6
+
7
+ The SystemBars style for a theme: Dark = light icons. Android WebView < 140 pads the WebView, so
8
+ the bar areas show the activity's window background (which follows the system theme): use
9
+ Default there.
10
+
11
+ The WebView ≥ 140 case assumes the shell's setup: `viewport-fit=cover` and Capacitor's default
12
+ `SystemBars.insetsHandling: 'css'`, so the page draws under the bars. With `insetsHandling`
13
+ `'disable'` or `'native'` the page never reaches under them and the bars show the window
14
+ background as on older WebViews; pass `syncSystemBars: false` and style them yourself there.
15
+ `webViewMajor` is read from `Chrome/<n>` in the user agent (Capacitor reads the WebView
16
+ package, which normally agrees).
17
+
18
+ ```ts
19
+ import { bfSystemBarsStyle } from '@bitforgehq/ui/mobile';
20
+ ```
21
+
22
+ ## Signature
23
+
24
+ ```ts
25
+ function bfSystemBarsStyle(dark: boolean, platform: BfPlatform, webViewMajor: number | null): SystemBarsStyle
26
+ ```
27
+
28
+ ## Parameters
29
+
30
+ | Parameter | Type | Description |
31
+ | -------------- | ---------------- | --------------------------------------------------------------------------------------------- |
32
+ | `dark` | `boolean` | Whether the app is dark now (`BfPlatformService.dark()`). |
33
+ | `platform` | `BfPlatform` | The platform the app runs on. |
34
+ | `webViewMajor` | `number \| null` | The Android WebView's major version (`Chrome/<n>` in the user agent), or `null` when unknown. |
35
+
36
+ ## Uses
37
+
38
+ - [BfPlatform](bf-platform.md)
@@ -0,0 +1,51 @@
1
+ # BfTabBarController
2
+
3
+ The state a parent that drives a projected tab bar gives it to derive from
4
+
5
+ Interface from `@bitforgehq/ui` · since 0.3.0
6
+
7
+ Provided by a parent that projects the bar and drives it (bf-tabs); the bar derives its state from it.
8
+
9
+ ```ts
10
+ import { type BfTabBarController } from '@bitforgehq/ui';
11
+ ```
12
+
13
+ ## Signature
14
+
15
+ ```ts
16
+ interface BfTabBarController extends BfTabLinks
17
+ ```
18
+
19
+ ## Properties
20
+
21
+ | Name | Type | Default | Description |
22
+ | ---------------- | ------------------------ | -------- | ------------------------------------------------------------------------------------------------------- |
23
+ | `current` | `Signal<string \| null>` | required | The tab the parent shows: the in-flight navigation's target, else the current URL's; null when unknown. |
24
+ | `hidden` | `Signal<boolean>` | required | Hide the bar (e.g. while the soft keyboard is open or about to open). |
25
+ | `hideTransition` | `Signal<boolean>` | required | Animate hiding (iOS) or switch instantly. |
26
+
27
+ ## Methods
28
+
29
+ ### `select(id: string): void`
30
+
31
+ Called by the bar on a user selection of another tab.
32
+
33
+ | Parameter | Type | Description |
34
+ | --------- | -------- | ----------------------------- |
35
+ | `id` | `string` | The `id` of the selected tab. |
36
+
37
+ ### `reselect(id: string): void`
38
+
39
+ Called by the bar on a user selection of the active tab.
40
+
41
+ | Parameter | Type | Description |
42
+ | --------- | -------- | --------------------------- |
43
+ | `id` | `string` | The `id` of the active tab. |
44
+
45
+ ## Uses
46
+
47
+ - [BfTabLinks](bf-tab-links.md)
48
+
49
+ ## Used by
50
+
51
+ - [BF_TAB_BAR_CONTROLLER](bf_tab_bar_controller.md)