@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.
- package/CHANGELOG.md +3665 -0
- package/LICENSE +21 -0
- package/README.md +175 -0
- package/ai/MANIFEST.index.json +383 -0
- package/ai/MANIFEST.json +7528 -0
- package/ai/REFERENCE.index.json +1461 -0
- package/ai/REFERENCE.json +7213 -0
- package/ai/UI_GUIDE.md +1159 -0
- package/ai/components/action-bar.md +209 -0
- package/ai/components/action-sheet.md +526 -0
- package/ai/components/alert-dialog.md +509 -0
- package/ai/components/alert.md +376 -0
- package/ai/components/avatar.md +146 -0
- package/ai/components/back-button.md +286 -0
- package/ai/components/badge.md +171 -0
- package/ai/components/button.md +431 -0
- package/ai/components/card.md +303 -0
- package/ai/components/checkbox.md +418 -0
- package/ai/components/chip-group.md +205 -0
- package/ai/components/chip.md +300 -0
- package/ai/components/content.md +474 -0
- package/ai/components/desktop-toast.md +420 -0
- package/ai/components/dialog.md +962 -0
- package/ai/components/empty-state.md +146 -0
- package/ai/components/field.md +319 -0
- package/ai/components/header.md +809 -0
- package/ai/components/icon-button.md +221 -0
- package/ai/components/icon.md +176 -0
- package/ai/components/input.md +455 -0
- package/ai/components/list-item.md +326 -0
- package/ai/components/list.md +178 -0
- package/ai/components/menu-button.md +377 -0
- package/ai/components/menu.md +661 -0
- package/ai/components/modal.md +613 -0
- package/ai/components/number-input.md +423 -0
- package/ai/components/page.md +299 -0
- package/ai/components/progress.md +215 -0
- package/ai/components/radio-group.md +432 -0
- package/ai/components/refresher.md +377 -0
- package/ai/components/segmented.md +517 -0
- package/ai/components/select.md +510 -0
- package/ai/components/sheet.md +845 -0
- package/ai/components/spinner.md +171 -0
- package/ai/components/stack-outlet.md +661 -0
- package/ai/components/tab-bar.md +427 -0
- package/ai/components/tab.md +295 -0
- package/ai/components/tabs.md +408 -0
- package/ai/components/textarea.md +371 -0
- package/ai/components/toast.md +522 -0
- package/ai/components/toggle.md +387 -0
- package/ai/reference/bf-action-directive.md +21 -0
- package/ai/reference/bf-action-sheet-action-role.md +27 -0
- package/ai/reference/bf-action-sheet-action.md +28 -0
- package/ai/reference/bf-action-sheet-options.md +28 -0
- package/ai/reference/bf-action-sheet-service.md +33 -0
- package/ai/reference/bf-alert-dialog-button-role.md +27 -0
- package/ai/reference/bf-alert-dialog-button.md +27 -0
- package/ai/reference/bf-alert-dialog-options.md +29 -0
- package/ai/reference/bf-alert-dialog-service.md +34 -0
- package/ai/reference/bf-alert-variant.md +28 -0
- package/ai/reference/bf-autocapitalize.md +30 -0
- package/ai/reference/bf-avatar-size.md +27 -0
- package/ai/reference/bf-avatar-variant.md +28 -0
- package/ai/reference/bf-back-at-root.md +28 -0
- package/ai/reference/bf-back-button-service.md +40 -0
- package/ai/reference/bf-badge-variant.md +29 -0
- package/ai/reference/bf-button-size.md +29 -0
- package/ai/reference/bf-button-type.md +28 -0
- package/ai/reference/bf-button-variant.md +29 -0
- package/ai/reference/bf-card-padding.md +26 -0
- package/ai/reference/bf-card-variant.md +28 -0
- package/ai/reference/bf-chip-group-mode.md +27 -0
- package/ai/reference/bf-chip-variant.md +26 -0
- package/ai/reference/bf-compare-with.md +24 -0
- package/ai/reference/bf-component-overlay-ref.md +33 -0
- package/ai/reference/bf-confirm-button-role.md +26 -0
- package/ai/reference/bf-confirm-button.md +27 -0
- package/ai/reference/bf-confirm-options.md +31 -0
- package/ai/reference/bf-confirm-size.md +26 -0
- package/ai/reference/bf-content-scroll-event.md +21 -0
- package/ai/reference/bf-defaults-options.md +32 -0
- package/ai/reference/bf-defaults.md +28 -0
- package/ai/reference/bf-desktop-toast-config.md +28 -0
- package/ai/reference/bf-desktop-toast-harness.md +33 -0
- package/ai/reference/bf-desktop-toast-options.md +28 -0
- package/ai/reference/bf-desktop-toast-position.md +28 -0
- package/ai/reference/bf-desktop-toast-service.md +42 -0
- package/ai/reference/bf-dialog-config.md +44 -0
- package/ai/reference/bf-dialog-harness.md +52 -0
- package/ai/reference/bf-dialog-ref.md +44 -0
- package/ai/reference/bf-dialog-role.md +26 -0
- package/ai/reference/bf-dialog-service.md +55 -0
- package/ai/reference/bf-dialog-size.md +31 -0
- package/ai/reference/bf-dialog-template-context.md +32 -0
- package/ai/reference/bf-empty-state-heading-level.md +26 -0
- package/ai/reference/bf-enter-key-hint.md +31 -0
- package/ai/reference/bf-field-control-class.md +32 -0
- package/ai/reference/bf-field-control-state.md +28 -0
- package/ai/reference/bf-field-size.md +29 -0
- package/ai/reference/bf-haptics-impact-style.md +27 -0
- package/ai/reference/bf-haptics-notification-type.md +27 -0
- package/ai/reference/bf-haptics-service.md +41 -0
- package/ai/reference/bf-harness-filters.md +29 -0
- package/ai/reference/bf-horizontal-scroll-directive.md +129 -0
- package/ai/reference/bf-icon-button-variant.md +28 -0
- package/ai/reference/bf-icon-size.md +27 -0
- package/ai/reference/bf-input-autocapitalize.md +36 -0
- package/ai/reference/bf-input-enter-key-hint.md +38 -0
- package/ai/reference/bf-input-input-mode.md +38 -0
- package/ai/reference/bf-input-mode.md +32 -0
- package/ai/reference/bf-input-type.md +35 -0
- package/ai/reference/bf-jsdom-shim-options.md +22 -0
- package/ai/reference/bf-keyboard-assist-behavior.md +26 -0
- package/ai/reference/bf-keyboard-assist-directive.md +185 -0
- package/ai/reference/bf-keyboard-phase.md +30 -0
- package/ai/reference/bf-keyboard-service.md +50 -0
- package/ai/reference/bf-labels-overrides.md +26 -0
- package/ai/reference/bf-labels.md +44 -0
- package/ai/reference/bf-menu-button-harness.md +40 -0
- package/ai/reference/bf-menu-button-variant.md +27 -0
- package/ai/reference/bf-menu-divider-directive.md +13 -0
- package/ai/reference/bf-menu-group-directive.md +14 -0
- package/ai/reference/bf-menu-harness.md +55 -0
- package/ai/reference/bf-menu-item-checkbox-directive.md +31 -0
- package/ai/reference/bf-menu-item-directive.md +31 -0
- package/ai/reference/bf-menu-item-harness.md +52 -0
- package/ai/reference/bf-menu-item-radio-directive.md +29 -0
- package/ai/reference/bf-menu-placement.md +29 -0
- package/ai/reference/bf-menu-trigger-directive.md +46 -0
- package/ai/reference/bf-modal-options.md +30 -0
- package/ai/reference/bf-modal-presentation.md +26 -0
- package/ai/reference/bf-modal-service.md +38 -0
- package/ai/reference/bf-nav-controller.md +59 -0
- package/ai/reference/bf-nav-direction.md +23 -0
- package/ai/reference/bf-nav-target.md +21 -0
- package/ai/reference/bf-number-input-mode.md +28 -0
- package/ai/reference/bf-number-input-step.md +25 -0
- package/ai/reference/bf-overlay-auto-focus.md +29 -0
- package/ai/reference/bf-overlay-controller.md +22 -0
- package/ai/reference/bf-overlay-host.md +36 -0
- package/ai/reference/bf-overlay-options.md +53 -0
- package/ai/reference/bf-overlay-position.md +30 -0
- package/ai/reference/bf-overlay-ref.md +53 -0
- package/ai/reference/bf-overlay-role.md +27 -0
- package/ai/reference/bf-overlay-service.md +53 -0
- package/ai/reference/bf-overlay-stack-options.md +24 -0
- package/ai/reference/bf-overlay-stack.md +81 -0
- package/ai/reference/bf-overlay-template-context.md +24 -0
- package/ai/reference/bf-overscroll-stretch-directive.md +163 -0
- package/ai/reference/bf-page-context.md +24 -0
- package/ai/reference/bf-platform-service.md +53 -0
- package/ai/reference/bf-platform.md +28 -0
- package/ai/reference/bf-progress-size.md +26 -0
- package/ai/reference/bf-progress-tone.md +28 -0
- package/ai/reference/bf-radio-group-harness.md +49 -0
- package/ai/reference/bf-radio-group-orientation.md +26 -0
- package/ai/reference/bf-radio-option.md +30 -0
- package/ai/reference/bf-refresher-refresh-event.md +22 -0
- package/ai/reference/bf-segment-option.md +29 -0
- package/ai/reference/bf-segmented-harness.md +48 -0
- package/ai/reference/bf-segmented-size.md +29 -0
- package/ai/reference/bf-select-harness.md +70 -0
- package/ai/reference/bf-select-option.md +29 -0
- package/ai/reference/bf-sheet-auto-focus.md +29 -0
- package/ai/reference/bf-sheet-options.md +32 -0
- package/ai/reference/bf-sheet-ref.md +45 -0
- package/ai/reference/bf-sheet-service.md +34 -0
- package/ai/reference/bf-shell-config-mode.md +28 -0
- package/ai/reference/bf-shell-config.md +38 -0
- package/ai/reference/bf-shell-dynamic-type-limit.md +21 -0
- package/ai/reference/bf-shell-dynamic-type.md +25 -0
- package/ai/reference/bf-shell-mode.md +28 -0
- package/ai/reference/bf-shell-testing-options.md +26 -0
- package/ai/reference/bf-size.md +45 -0
- package/ai/reference/bf-spinner-size.md +27 -0
- package/ai/reference/bf-stack-change.md +22 -0
- package/ai/reference/bf-stack-reuse-strategy.md +32 -0
- package/ai/reference/bf-stack-transition-event.md +26 -0
- package/ai/reference/bf-stack-transition.md +26 -0
- package/ai/reference/bf-stacked-overlay.md +23 -0
- package/ai/reference/bf-system-bars-style.md +38 -0
- package/ai/reference/bf-tab-bar-controller.md +51 -0
- package/ai/reference/bf-tab-bar-host.md +52 -0
- package/ai/reference/bf-tab-context.md +32 -0
- package/ai/reference/bf-tab-links.md +37 -0
- package/ai/reference/bf-testing-options.md +27 -0
- package/ai/reference/bf-text-scale-service.md +35 -0
- package/ai/reference/bf-theme.md +27 -0
- package/ai/reference/bf-toast-action.md +25 -0
- package/ai/reference/bf-toast-controller.md +17 -0
- package/ai/reference/bf-toast-dismiss-reason.md +29 -0
- package/ai/reference/bf-toast-options.md +29 -0
- package/ai/reference/bf-toast-position.md +26 -0
- package/ai/reference/bf-toast-ref.md +41 -0
- package/ai/reference/bf-toast-service.md +39 -0
- package/ai/reference/bf-toggle-label-position.md +26 -0
- package/ai/reference/bf-transition-kind.md +28 -0
- package/ai/reference/bf-validation-message.md +31 -0
- package/ai/reference/bf-validation-messages.md +33 -0
- package/ai/reference/bf-view-event.md +28 -0
- package/ai/reference/bf-view-lifecycle.md +41 -0
- package/ai/reference/bf-view-state.md +28 -0
- package/ai/reference/bf_default_labels.md +21 -0
- package/ai/reference/bf_default_values.md +21 -0
- package/ai/reference/bf_defaults.md +21 -0
- package/ai/reference/bf_desktop_toast_defaults.md +21 -0
- package/ai/reference/bf_dialog_data.md +17 -0
- package/ai/reference/bf_labels.md +21 -0
- package/ai/reference/bf_overlay_data.md +19 -0
- package/ai/reference/bf_overlay_host.md +21 -0
- package/ai/reference/bf_sheet_default_snap_points.md +17 -0
- package/ai/reference/bf_shell_config.md +21 -0
- package/ai/reference/bf_shell_defaults.md +21 -0
- package/ai/reference/bf_tab_bar.md +21 -0
- package/ai/reference/bf_tab_bar_controller.md +21 -0
- package/ai/reference/bf_tab_context.md +21 -0
- package/ai/reference/bf_tab_links.md +21 -0
- package/ai/reference/bf_theme_storage.md +19 -0
- package/ai/reference/create-transition.md +36 -0
- package/ai/reference/duration_fast.md +17 -0
- package/ai/reference/duration_md.md +17 -0
- package/ai/reference/duration_overlay.md +17 -0
- package/ai/reference/duration_push.md +17 -0
- package/ai/reference/fade-down.md +26 -0
- package/ai/reference/fade-in.md +25 -0
- package/ai/reference/fade-out.md +25 -0
- package/ai/reference/fade-up.md +26 -0
- package/ai/reference/inject-shell-mode.md +23 -0
- package/ai/reference/install-bf-jsdom-shims.md +31 -0
- package/ai/reference/ios_duration.md +17 -0
- package/ai/reference/ios_easing.md +17 -0
- package/ai/reference/is-text-entry.md +25 -0
- package/ai/reference/max_complete_ms.md +17 -0
- package/ai/reference/md-transition.md +31 -0
- package/ai/reference/md_duration.md +17 -0
- package/ai/reference/md_easing.md +17 -0
- package/ai/reference/overlay_duration.md +21 -0
- package/ai/reference/overlay_easing.md +19 -0
- package/ai/reference/overlay_reduced_duration.md +17 -0
- package/ai/reference/pop-frames-at.md +25 -0
- package/ai/reference/prefers-reduced-motion.md +25 -0
- package/ai/reference/provide-bf-defaults.md +33 -0
- package/ai/reference/provide-bf-desktop-toast.md +28 -0
- package/ai/reference/provide-bf-labels.md +38 -0
- package/ai/reference/provide-bf-shell-testing.md +34 -0
- package/ai/reference/provide-bf-shell.md +41 -0
- package/ai/reference/provide-bf-testing.md +33 -0
- package/ai/reference/reduced-transition.md +28 -0
- package/ai/reference/reduced_duration.md +17 -0
- package/ai/reference/resolve-shell-mode.md +33 -0
- package/ai/reference/scale-in.md +25 -0
- package/ai/reference/settle-duration.md +25 -0
- package/ai/reference/settle-pop.md +33 -0
- package/ai/reference/settle_easing.md +17 -0
- package/ai/reference/should-complete-pop.md +26 -0
- package/ai/reference/slide-down.md +26 -0
- package/ai/reference/slide-up.md +26 -0
- package/ai/reference/with-bf-shell-routing.md +19 -0
- package/bin/bf-ui.js +81 -0
- package/fesm2022/bitforgehq-ui-icons.mjs +230 -0
- package/fesm2022/bitforgehq-ui-icons.mjs.map +1 -0
- package/fesm2022/bitforgehq-ui-mobile.mjs +5530 -0
- package/fesm2022/bitforgehq-ui-mobile.mjs.map +1 -0
- package/fesm2022/bitforgehq-ui-number-input.mjs +680 -0
- package/fesm2022/bitforgehq-ui-number-input.mjs.map +1 -0
- package/fesm2022/bitforgehq-ui-overlay.mjs +2675 -0
- package/fesm2022/bitforgehq-ui-overlay.mjs.map +1 -0
- package/fesm2022/bitforgehq-ui-testing.mjs +402 -0
- package/fesm2022/bitforgehq-ui-testing.mjs.map +1 -0
- package/fesm2022/bitforgehq-ui.mjs +7765 -0
- package/fesm2022/bitforgehq-ui.mjs.map +1 -0
- package/llms-full.txt +25394 -0
- package/llms.txt +329 -0
- package/package.json +94 -0
- package/theme.css +253 -0
- package/types/bitforgehq-ui-icons.d.ts +50 -0
- package/types/bitforgehq-ui-mobile.d.ts +2914 -0
- package/types/bitforgehq-ui-number-input.d.ts +282 -0
- package/types/bitforgehq-ui-overlay.d.ts +1514 -0
- package/types/bitforgehq-ui-testing.d.ts +495 -0
- package/types/bitforgehq-ui.d.ts +3499 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# BF_DEFAULT_LABELS
|
|
2
|
+
|
|
3
|
+
The library's built-in English strings, the labels every widget starts from
|
|
4
|
+
|
|
5
|
+
Constant from `@bitforgehq/ui` · since 0.3.0
|
|
6
|
+
|
|
7
|
+
The library's built-in English strings.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { BF_DEFAULT_LABELS } from '@bitforgehq/ui';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const BF_DEFAULT_LABELS: BfLabels
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Uses
|
|
20
|
+
|
|
21
|
+
- [BfLabels](bf-labels.md)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# BF_DEFAULT_VALUES
|
|
2
|
+
|
|
3
|
+
The library's built-in widget defaults, the compact md step everywhere
|
|
4
|
+
|
|
5
|
+
Constant from `@bitforgehq/ui` · since 0.3.0
|
|
6
|
+
|
|
7
|
+
Library defaults: compact `md` everywhere (desktop first).
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { BF_DEFAULT_VALUES } from '@bitforgehq/ui';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const BF_DEFAULT_VALUES: BfDefaults
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Uses
|
|
20
|
+
|
|
21
|
+
- [BfDefaults](bf-defaults.md)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# BF_DEFAULTS
|
|
2
|
+
|
|
3
|
+
Injection token holding the widget defaults in effect for an injector
|
|
4
|
+
|
|
5
|
+
Injection token from `@bitforgehq/ui` · since 0.3.0
|
|
6
|
+
|
|
7
|
+
The widget defaults in effect for the current injector; set them with `provideBfDefaults()`.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { BF_DEFAULTS } from '@bitforgehq/ui';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const BF_DEFAULTS: InjectionToken<BfDefaults>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Uses
|
|
20
|
+
|
|
21
|
+
- [BfDefaults](bf-defaults.md)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# BF_DESKTOP_TOAST_DEFAULTS
|
|
2
|
+
|
|
3
|
+
The library defaults of the desktop toast settings, bottom end with three visible
|
|
4
|
+
|
|
5
|
+
Constant from `@bitforgehq/ui/overlay` · since 0.3.0
|
|
6
|
+
|
|
7
|
+
The library defaults of `BfDesktopToastConfig`.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { BF_DESKTOP_TOAST_DEFAULTS } from '@bitforgehq/ui/overlay';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const BF_DESKTOP_TOAST_DEFAULTS: Readonly<BfDesktopToastConfig>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Uses
|
|
20
|
+
|
|
21
|
+
- [BfDesktopToastConfig](bf-desktop-toast-config.md)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# BF_DIALOG_DATA
|
|
2
|
+
|
|
3
|
+
Injection token carrying the data a dialog was opened with, for its content
|
|
4
|
+
|
|
5
|
+
Injection token from `@bitforgehq/ui/overlay` · since 0.3.0
|
|
6
|
+
|
|
7
|
+
The `data` passed to `BfDialogService.open()`, injectable in the dialog's content.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { BF_DIALOG_DATA } from '@bitforgehq/ui/overlay';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const BF_DIALOG_DATA: InjectionToken<unknown>
|
|
17
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# BF_LABELS
|
|
2
|
+
|
|
3
|
+
Injection token holding the user-facing strings in effect for an injector
|
|
4
|
+
|
|
5
|
+
Injection token from `@bitforgehq/ui` · since 0.3.0
|
|
6
|
+
|
|
7
|
+
The strings in effect for the current injector; set them with `provideBfLabels()`.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { BF_LABELS } from '@bitforgehq/ui';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const BF_LABELS: InjectionToken<BfLabels>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Uses
|
|
20
|
+
|
|
21
|
+
- [BfLabels](bf-labels.md)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# BF_OVERLAY_DATA
|
|
2
|
+
|
|
3
|
+
Injection token carrying the data an overlay was opened with, for its content
|
|
4
|
+
|
|
5
|
+
Injection token from `@bitforgehq/ui/overlay` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
Also exported from `@bitforgehq/ui/mobile` (deprecated: 0.3.0 use BF_OVERLAY_DATA from '@bitforgehq/ui/overlay'; removed in 0.4.0).
|
|
8
|
+
|
|
9
|
+
The `data` passed to `BfOverlayService.open()`, injectable in the overlay's content.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { BF_OVERLAY_DATA } from '@bitforgehq/ui/overlay';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Signature
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
const BF_OVERLAY_DATA: InjectionToken<unknown>
|
|
19
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# BF_OVERLAY_HOST
|
|
2
|
+
|
|
3
|
+
Optional injection token through which a host shell plugs into the overlay core
|
|
4
|
+
|
|
5
|
+
Injection token from `@bitforgehq/ui/overlay` · since 0.3.0
|
|
6
|
+
|
|
7
|
+
Optional; without it overlays register no back handler and lock document scroll.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { BF_OVERLAY_HOST } from '@bitforgehq/ui/overlay';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const BF_OVERLAY_HOST: InjectionToken<BfOverlayHost>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Uses
|
|
20
|
+
|
|
21
|
+
- [BfOverlayHost](bf-overlay-host.md)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# BF_SHEET_DEFAULT_SNAP_POINTS
|
|
2
|
+
|
|
3
|
+
The snap points a bottom sheet rests at when none are given, half and full
|
|
4
|
+
|
|
5
|
+
Constant from `@bitforgehq/ui/mobile` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
Snap points used when none (or no valid ones) are given.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { BF_SHEET_DEFAULT_SNAP_POINTS } from '@bitforgehq/ui/mobile';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const BF_SHEET_DEFAULT_SNAP_POINTS: readonly number[]
|
|
17
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# BF_SHELL_CONFIG
|
|
2
|
+
|
|
3
|
+
Injection token holding the resolved mobile shell configuration of the app
|
|
4
|
+
|
|
5
|
+
Injection token from `@bitforgehq/ui/mobile` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
The resolved shell configuration.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { BF_SHELL_CONFIG } from '@bitforgehq/ui/mobile';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const BF_SHELL_CONFIG: InjectionToken<BfShellConfig>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Uses
|
|
20
|
+
|
|
21
|
+
- [BfShellConfig](bf-shell-config.md)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# BF_SHELL_DEFAULTS
|
|
2
|
+
|
|
3
|
+
The mobile shell defaults that provideBfShell merges the app settings over
|
|
4
|
+
|
|
5
|
+
Constant from `@bitforgehq/ui/mobile` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
The shell defaults, merged under the overrides given to `provideBfShell()`.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { BF_SHELL_DEFAULTS } from '@bitforgehq/ui/mobile';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const BF_SHELL_DEFAULTS: Readonly<BfShellConfig>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Uses
|
|
20
|
+
|
|
21
|
+
- [BfShellConfig](bf-shell-config.md)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# BF_TAB_BAR
|
|
2
|
+
|
|
3
|
+
Injection token through which each tab reaches its enclosing tab bar
|
|
4
|
+
|
|
5
|
+
Injection token from `@bitforgehq/ui` · since 0.1.0
|
|
6
|
+
|
|
7
|
+
The enclosing `bf-tab-bar`, as its tabs inject it.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { BF_TAB_BAR } from '@bitforgehq/ui';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const BF_TAB_BAR: InjectionToken<BfTabBarHost>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Uses
|
|
20
|
+
|
|
21
|
+
- [BfTabBarHost](bf-tab-bar-host.md)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# BF_TAB_BAR_CONTROLLER
|
|
2
|
+
|
|
3
|
+
Injection token through which a parent drives the selection and hiding of its tab bar
|
|
4
|
+
|
|
5
|
+
Injection token from `@bitforgehq/ui` · since 0.3.0
|
|
6
|
+
|
|
7
|
+
The controller of a tab bar projected into a parent that drives it, provided by `bf-tabs`.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { BF_TAB_BAR_CONTROLLER } from '@bitforgehq/ui';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const BF_TAB_BAR_CONTROLLER: InjectionToken<BfTabBarController>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Uses
|
|
20
|
+
|
|
21
|
+
- [BfTabBarController](bf-tab-bar-controller.md)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# BF_TAB_CONTEXT
|
|
2
|
+
|
|
3
|
+
Injection token through which the tabs page tells its outlet about the tabs
|
|
4
|
+
|
|
5
|
+
Injection token from `@bitforgehq/ui/mobile` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
Provided by `bf-tabs`; injected optionally by `bf-stack-outlet`.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { BF_TAB_CONTEXT } from '@bitforgehq/ui/mobile';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const BF_TAB_CONTEXT: InjectionToken<BfTabContext>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Uses
|
|
20
|
+
|
|
21
|
+
- [BfTabContext](bf-tab-context.md)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# BF_TAB_LINKS
|
|
2
|
+
|
|
3
|
+
Injection token that turns a projected tab bar into a navigation of links
|
|
4
|
+
|
|
5
|
+
Injection token from `@bitforgehq/ui` · since 0.3.0
|
|
6
|
+
|
|
7
|
+
The link source of a tab bar in link mode, provided by `bf-tabs`.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { BF_TAB_LINKS } from '@bitforgehq/ui';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const BF_TAB_LINKS: InjectionToken<BfTabLinks>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Uses
|
|
20
|
+
|
|
21
|
+
- [BfTabLinks](bf-tab-links.md)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# BF_THEME_STORAGE
|
|
2
|
+
|
|
3
|
+
Injection token for the store that keeps the app theme choice between visits
|
|
4
|
+
|
|
5
|
+
Injection token from `@bitforgehq/ui/mobile` · since 0.3.0
|
|
6
|
+
|
|
7
|
+
Where `BfPlatformService` keeps the theme choice (the key `bf-theme`): `localStorage` when it is
|
|
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.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { BF_THEME_STORAGE } from '@bitforgehq/ui/mobile';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Signature
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
const BF_THEME_STORAGE: InjectionToken<Pick<Storage, "getItem" | "setItem">>
|
|
19
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# createTransition
|
|
2
|
+
|
|
3
|
+
Builds the iOS push or pop with its slide, parallax and dimming layers
|
|
4
|
+
|
|
5
|
+
Function from `@bitforgehq/ui/mobile` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
The iOS push or pop. `pop` is written as the literal reverse of a push but as forward
|
|
8
|
+
keyframes, so `currentTime` maps directly to swipe progress (0 = nothing moved, duration = pop
|
|
9
|
+
complete). Returns three animations: the top page (slide and edge shadow), the page under it
|
|
10
|
+
(parallax) and the dim layer.
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { createTransition } from '@bitforgehq/ui/mobile';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Signature
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
function createTransition(kind: BfTransitionKind, entering: HTMLElement, leaving: HTMLElement, dim: HTMLElement, width: number, easing?: string): BfStackTransition
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Parameters
|
|
23
|
+
|
|
24
|
+
| Parameter | Type | Description |
|
|
25
|
+
| ---------- | ------------------ | -------------------------------------------------- |
|
|
26
|
+
| `kind` | `BfTransitionKind` | `push` or `pop`. |
|
|
27
|
+
| `entering` | `HTMLElement` | The page that becomes visible. |
|
|
28
|
+
| `leaving` | `HTMLElement` | The page that goes away. |
|
|
29
|
+
| `dim` | `HTMLElement` | The dimming layer between the two pages. |
|
|
30
|
+
| `width` | `number` | The width the pages travel (the outlet width, px). |
|
|
31
|
+
| `easing?` | `string` | The curve of the transition. |
|
|
32
|
+
|
|
33
|
+
## Uses
|
|
34
|
+
|
|
35
|
+
- [BfStackTransition](bf-stack-transition.md)
|
|
36
|
+
- [BfTransitionKind](bf-transition-kind.md)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# DURATION_FAST
|
|
2
|
+
|
|
3
|
+
The duration of colour transitions and the reduced-motion fade, in milliseconds
|
|
4
|
+
|
|
5
|
+
Constant from `@bitforgehq/ui/mobile` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
Colour transitions and the reduced-motion cross-fade (ms); the overlay core's reduced fade.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { DURATION_FAST } from '@bitforgehq/ui/mobile';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const DURATION_FAST: 150
|
|
17
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# DURATION_MD
|
|
2
|
+
|
|
3
|
+
The duration of the Material fade-up and the refresher settle, in milliseconds
|
|
4
|
+
|
|
5
|
+
Constant from `@bitforgehq/ui/mobile` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
Material fade-up and the refresher settle (ms).
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { DURATION_MD } from '@bitforgehq/ui/mobile';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const DURATION_MD = 220
|
|
17
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# DURATION_OVERLAY
|
|
2
|
+
|
|
3
|
+
The duration of overlay enter and exit and the modal depth effect, in milliseconds
|
|
4
|
+
|
|
5
|
+
Constant from `@bitforgehq/ui/mobile` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
Overlay enter/exit and the modal depth effect (ms); the overlay core's duration.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { DURATION_OVERLAY } from '@bitforgehq/ui/mobile';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const DURATION_OVERLAY: 260
|
|
17
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# DURATION_PUSH
|
|
2
|
+
|
|
3
|
+
The duration of the iOS push and pop page transitions, in milliseconds
|
|
4
|
+
|
|
5
|
+
Constant from `@bitforgehq/ui/mobile` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
iOS push/pop (ms).
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { DURATION_PUSH } from '@bitforgehq/ui/mobile';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const DURATION_PUSH = 500
|
|
17
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# fadeDown
|
|
2
|
+
|
|
3
|
+
Fades an element out while it sinks, the reverse of the fadeUp animation
|
|
4
|
+
|
|
5
|
+
Function from `@bitforgehq/ui/overlay` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
Also exported from `@bitforgehq/ui/mobile` (deprecated: 0.3.0 use fadeDown from '@bitforgehq/ui/overlay'; removed in 0.4.0).
|
|
8
|
+
|
|
9
|
+
Fades `el` out while it sinks by `distance` (default 16 px; the reverse of `fadeUp`).
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { fadeDown } from '@bitforgehq/ui/overlay';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Signature
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
function fadeDown(el: HTMLElement, distance?: string): Animation
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Parameters
|
|
22
|
+
|
|
23
|
+
| Parameter | Type | Description |
|
|
24
|
+
| ----------- | ------------- | -------------------------------------------------- |
|
|
25
|
+
| `el` | `HTMLElement` | The element to animate, usually the overlay panel. |
|
|
26
|
+
| `distance?` | `string` | How far below its place it ends, as a CSS length. |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# fadeIn
|
|
2
|
+
|
|
3
|
+
Fades an element in, the default enter animation of an overlay
|
|
4
|
+
|
|
5
|
+
Function from `@bitforgehq/ui/overlay` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
Also exported from `@bitforgehq/ui/mobile` (deprecated: 0.3.0 use fadeIn from '@bitforgehq/ui/overlay'; removed in 0.4.0).
|
|
8
|
+
|
|
9
|
+
Fades `el` in.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { fadeIn } from '@bitforgehq/ui/overlay';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Signature
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
function fadeIn(el: HTMLElement): Animation
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Parameters
|
|
22
|
+
|
|
23
|
+
| Parameter | Type | Description |
|
|
24
|
+
| --------- | ------------- | -------------------------------------------------- |
|
|
25
|
+
| `el` | `HTMLElement` | The element to animate, usually the overlay panel. |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# fadeOut
|
|
2
|
+
|
|
3
|
+
Fades an element out, the default exit animation of an overlay
|
|
4
|
+
|
|
5
|
+
Function from `@bitforgehq/ui/overlay` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
Also exported from `@bitforgehq/ui/mobile` (deprecated: 0.3.0 use fadeOut from '@bitforgehq/ui/overlay'; removed in 0.4.0).
|
|
8
|
+
|
|
9
|
+
Fades `el` out.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { fadeOut } from '@bitforgehq/ui/overlay';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Signature
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
function fadeOut(el: HTMLElement): Animation
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Parameters
|
|
22
|
+
|
|
23
|
+
| Parameter | Type | Description |
|
|
24
|
+
| --------- | ------------- | -------------------------------------------------- |
|
|
25
|
+
| `el` | `HTMLElement` | The element to animate, usually the overlay panel. |
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# fadeUp
|
|
2
|
+
|
|
3
|
+
Fades an element in while it rises, the Material modal enter animation
|
|
4
|
+
|
|
5
|
+
Function from `@bitforgehq/ui/overlay` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
Also exported from `@bitforgehq/ui/mobile` (deprecated: 0.3.0 use fadeUp from '@bitforgehq/ui/overlay'; removed in 0.4.0).
|
|
8
|
+
|
|
9
|
+
Fades `el` in while it rises by `distance` (default 16 px; the Material modal enter).
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { fadeUp } from '@bitforgehq/ui/overlay';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Signature
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
function fadeUp(el: HTMLElement, distance?: string): Animation
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Parameters
|
|
22
|
+
|
|
23
|
+
| Parameter | Type | Description |
|
|
24
|
+
| ----------- | ------------- | --------------------------------------------------- |
|
|
25
|
+
| `el` | `HTMLElement` | The element to animate, usually the overlay panel. |
|
|
26
|
+
| `distance?` | `string` | How far below its place it starts, as a CSS length. |
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# injectShellMode
|
|
2
|
+
|
|
3
|
+
Reads the shell mode in effect from the injector, iOS or Material
|
|
4
|
+
|
|
5
|
+
Function from `@bitforgehq/ui/mobile` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
`resolveShellMode()` from the injector: `BF_SHELL_CONFIG` (the defaults, i.e. `'auto'`, without
|
|
8
|
+
`provideBfShell()`) and `BfPlatformService`. Call it in an injection context (a field
|
|
9
|
+
initializer or constructor); the mode is fixed for the app's lifetime.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { injectShellMode } from '@bitforgehq/ui/mobile';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Signature
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
function injectShellMode(): BfShellMode
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Uses
|
|
22
|
+
|
|
23
|
+
- [BfShellMode](bf-shell-mode.md)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# installBfJsdomShims
|
|
2
|
+
|
|
3
|
+
Installs the browser APIs jsdom lacks and the library needs, only where missing
|
|
4
|
+
|
|
5
|
+
Function from `@bitforgehq/ui/testing` · since 0.3.0
|
|
6
|
+
|
|
7
|
+
Installs, only where missing: `Element.prototype.animate` (an Animation whose `finished`
|
|
8
|
+
resolves at once), `PointerEvent` (a MouseEvent subclass with pointerId, isPrimary, pointerType,
|
|
9
|
+
width, height, pressure) and optionally `matchMedia`. Idempotent; returns a function that removes
|
|
10
|
+
exactly what it installed. Call it once in the test runner's setup file (Vitest `setupFiles`,
|
|
11
|
+
Jest `setupFilesAfterEnv`).
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { installBfJsdomShims } from '@bitforgehq/ui/testing';
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Signature
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
function installBfJsdomShims(options?: BfJsdomShimOptions): () => void
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Parameters
|
|
24
|
+
|
|
25
|
+
| Parameter | Type | Description |
|
|
26
|
+
| ---------- | -------------------- | -------------------------------------------------------------------------- |
|
|
27
|
+
| `options?` | `BfJsdomShimOptions` | Whether to stub `matchMedia`, and whether the stub reports reduced motion. |
|
|
28
|
+
|
|
29
|
+
## Uses
|
|
30
|
+
|
|
31
|
+
- [BfJsdomShimOptions](bf-jsdom-shim-options.md)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# IOS_DURATION
|
|
2
|
+
|
|
3
|
+
The duration of the iOS push and pop stack transitions, in milliseconds
|
|
4
|
+
|
|
5
|
+
Constant from `@bitforgehq/ui/mobile` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
The iOS push and pop (ms), `DURATION_PUSH`.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { IOS_DURATION } from '@bitforgehq/ui/mobile';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const IOS_DURATION: 500
|
|
17
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# IOS_EASING
|
|
2
|
+
|
|
3
|
+
The UIKit navigation and sheet easing curve of pushes, pops and overlays
|
|
4
|
+
|
|
5
|
+
Constant from `@bitforgehq/ui/mobile` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
UIKit's navigation and sheet curve (push/pop, overlays, modal depth); `OVERLAY_EASING` too.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { IOS_EASING } from '@bitforgehq/ui/mobile';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Signature
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const IOS_EASING = 'cubic-bezier(0.32, 0.72, 0, 1)'
|
|
17
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# isTextEntry
|
|
2
|
+
|
|
3
|
+
Tells whether focusing an element opens the soft keyboard on a phone
|
|
4
|
+
|
|
5
|
+
Function from `@bitforgehq/ui/mobile` · since 0.2.0
|
|
6
|
+
|
|
7
|
+
True for an element that opens the soft keyboard when focused: a text-like `input` (not a
|
|
8
|
+
button, checkbox, color, file, hidden, image, radio, range, reset or submit), a `textarea`, or
|
|
9
|
+
a `[contenteditable]` element other than `contenteditable="false"`.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { isTextEntry } from '@bitforgehq/ui/mobile';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Signature
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
function isTextEntry(element: Element | null): element is HTMLElement
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Parameters
|
|
22
|
+
|
|
23
|
+
| Parameter | Type | Description |
|
|
24
|
+
| --------- | ----------------- | ------------------------------------------------------ |
|
|
25
|
+
| `element` | `Element \| null` | The element to test, usually `document.activeElement`. |
|