@procivis/one-react-native-components 0.1.63
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/LICENSE +201 -0
- package/README.md +66 -0
- package/lib/commonjs/accessibility/accessibility.js +193 -0
- package/lib/commonjs/accessibility/accessibility.js.map +1 -0
- package/lib/commonjs/accessibility/accessibilityHistory.js +81 -0
- package/lib/commonjs/accessibility/accessibilityHistory.js.map +1 -0
- package/lib/commonjs/accessibility/accessibilityHistoryWrappers.js +49 -0
- package/lib/commonjs/accessibility/accessibilityHistoryWrappers.js.map +1 -0
- package/lib/commonjs/accessibility/accessibilityLanguage.js +63 -0
- package/lib/commonjs/accessibility/accessibilityLanguage.js.map +1 -0
- package/lib/commonjs/accessibility/index.js +129 -0
- package/lib/commonjs/accessibility/index.js.map +1 -0
- package/lib/commonjs/accessibility/locale/de.json +21 -0
- package/lib/commonjs/accessibility/locale/en.json +21 -0
- package/lib/commonjs/accessibility/locale/fr.json +21 -0
- package/lib/commonjs/accessibility/locale/index.js +21 -0
- package/lib/commonjs/accessibility/locale/index.js.map +1 -0
- package/lib/commonjs/accessibility/locale/it.json +21 -0
- package/lib/commonjs/accessibility/locale.test.js +15 -0
- package/lib/commonjs/accessibility/locale.test.js.map +1 -0
- package/lib/commonjs/action-modal/ActionModal.js +52 -0
- package/lib/commonjs/action-modal/ActionModal.js.map +1 -0
- package/lib/commonjs/action-modal/index.js +14 -0
- package/lib/commonjs/action-modal/index.js.map +1 -0
- package/lib/commonjs/activity-indicator/activity-indicator.js +34 -0
- package/lib/commonjs/activity-indicator/activity-indicator.js.map +1 -0
- package/lib/commonjs/activity-indicator/index.js +14 -0
- package/lib/commonjs/activity-indicator/index.js.map +1 -0
- package/lib/commonjs/blur/blur-view.js +76 -0
- package/lib/commonjs/blur/blur-view.js.map +1 -0
- package/lib/commonjs/blur/index.js +21 -0
- package/lib/commonjs/blur/index.js.map +1 -0
- package/lib/commonjs/buttons/back-button.js +37 -0
- package/lib/commonjs/buttons/back-button.js.map +1 -0
- package/lib/commonjs/buttons/button.js +153 -0
- package/lib/commonjs/buttons/button.js.map +1 -0
- package/lib/commonjs/buttons/connectivity-button.js +82 -0
- package/lib/commonjs/buttons/connectivity-button.js.map +1 -0
- package/lib/commonjs/buttons/filter-button.js +51 -0
- package/lib/commonjs/buttons/filter-button.js.map +1 -0
- package/lib/commonjs/buttons/ghost-button.js +62 -0
- package/lib/commonjs/buttons/ghost-button.js.map +1 -0
- package/lib/commonjs/buttons/index.js +104 -0
- package/lib/commonjs/buttons/index.js.map +1 -0
- package/lib/commonjs/buttons/scan-button.js +83 -0
- package/lib/commonjs/buttons/scan-button.js.map +1 -0
- package/lib/commonjs/camera/camera-overlay.js +61 -0
- package/lib/commonjs/camera/camera-overlay.js.map +1 -0
- package/lib/commonjs/camera/index.js +21 -0
- package/lib/commonjs/camera/index.js.map +1 -0
- package/lib/commonjs/camera/qr-code-scanner.js +50 -0
- package/lib/commonjs/camera/qr-code-scanner.js.map +1 -0
- package/lib/commonjs/control/checkbox.js +79 -0
- package/lib/commonjs/control/checkbox.js.map +1 -0
- package/lib/commonjs/control/index.js +32 -0
- package/lib/commonjs/control/index.js.map +1 -0
- package/lib/commonjs/control/switch.js +65 -0
- package/lib/commonjs/control/switch.js.map +1 -0
- package/lib/commonjs/credential/card/credential-card.js +189 -0
- package/lib/commonjs/credential/card/credential-card.js.map +1 -0
- package/lib/commonjs/credential/card/credential-details-card.js +201 -0
- package/lib/commonjs/credential/card/credential-details-card.js.map +1 -0
- package/lib/commonjs/credential/card/credential-details-list-item.js +84 -0
- package/lib/commonjs/credential/card/credential-details-list-item.js.map +1 -0
- package/lib/commonjs/credential/card/credential-header.js +172 -0
- package/lib/commonjs/credential/card/credential-header.js.map +1 -0
- package/lib/commonjs/credential/card/credential-image-carousel.js +124 -0
- package/lib/commonjs/credential/card/credential-image-carousel.js.map +1 -0
- package/lib/commonjs/credential/card/index.js +85 -0
- package/lib/commonjs/credential/card/index.js.map +1 -0
- package/lib/commonjs/credential/credential-attribute-item.js +289 -0
- package/lib/commonjs/credential/credential-attribute-item.js.map +1 -0
- package/lib/commonjs/credential/credential-carousel-images.js +98 -0
- package/lib/commonjs/credential/credential-carousel-images.js.map +1 -0
- package/lib/commonjs/credential/index.js +90 -0
- package/lib/commonjs/credential/index.js.map +1 -0
- package/lib/commonjs/credential/selector-status.js +17 -0
- package/lib/commonjs/credential/selector-status.js.map +1 -0
- package/lib/commonjs/credential/selector.js +79 -0
- package/lib/commonjs/credential/selector.js.map +1 -0
- package/lib/commonjs/detail/detail.js +84 -0
- package/lib/commonjs/detail/detail.js.map +1 -0
- package/lib/commonjs/detail/index.js +14 -0
- package/lib/commonjs/detail/index.js.map +1 -0
- package/lib/commonjs/entity/avatar.js +96 -0
- package/lib/commonjs/entity/avatar.js.map +1 -0
- package/lib/commonjs/entity/entity-cluster.js +66 -0
- package/lib/commonjs/entity/entity-cluster.js.map +1 -0
- package/lib/commonjs/entity/index.js +34 -0
- package/lib/commonjs/entity/index.js.map +1 -0
- package/lib/commonjs/header/focus-aware-status-bar.js +20 -0
- package/lib/commonjs/header/focus-aware-status-bar.js.map +1 -0
- package/lib/commonjs/header/foldable-header.js +89 -0
- package/lib/commonjs/header/foldable-header.js.map +1 -0
- package/lib/commonjs/header/header.js +105 -0
- package/lib/commonjs/header/header.js.map +1 -0
- package/lib/commonjs/header/index.js +55 -0
- package/lib/commonjs/header/index.js.map +1 -0
- package/lib/commonjs/header/navigation-header.js +148 -0
- package/lib/commonjs/header/navigation-header.js.map +1 -0
- package/lib/commonjs/history/data-item.js +70 -0
- package/lib/commonjs/history/data-item.js.map +1 -0
- package/lib/commonjs/history/history-list-item.js +90 -0
- package/lib/commonjs/history/history-list-item.js.map +1 -0
- package/lib/commonjs/history/history-section-header.js +49 -0
- package/lib/commonjs/history/history-section-header.js.map +1 -0
- package/lib/commonjs/history/history-section-list-item.js +47 -0
- package/lib/commonjs/history/history-section-list-item.js.map +1 -0
- package/lib/commonjs/history/index.js +55 -0
- package/lib/commonjs/history/index.js.map +1 -0
- package/lib/commonjs/icons/connectivity.js +139 -0
- package/lib/commonjs/icons/connectivity.js.map +1 -0
- package/lib/commonjs/icons/credential.js +162 -0
- package/lib/commonjs/icons/credential.js.map +1 -0
- package/lib/commonjs/icons/entity.js +34 -0
- package/lib/commonjs/icons/entity.js.map +1 -0
- package/lib/commonjs/icons/history.js +408 -0
- package/lib/commonjs/icons/history.js.map +1 -0
- package/lib/commonjs/icons/icons.js +250 -0
- package/lib/commonjs/icons/icons.js.map +1 -0
- package/lib/commonjs/icons/index.js +127 -0
- package/lib/commonjs/icons/index.js.map +1 -0
- package/lib/commonjs/icons/input.js +44 -0
- package/lib/commonjs/icons/input.js.map +1 -0
- package/lib/commonjs/icons/keypad.js +94 -0
- package/lib/commonjs/icons/keypad.js.map +1 -0
- package/lib/commonjs/icons/loader.js +180 -0
- package/lib/commonjs/icons/loader.js.map +1 -0
- package/lib/commonjs/icons/nerd-view.js +123 -0
- package/lib/commonjs/icons/nerd-view.js.map +1 -0
- package/lib/commonjs/icons/selector.js +56 -0
- package/lib/commonjs/icons/selector.js.map +1 -0
- package/lib/commonjs/icons/wallet.js +121 -0
- package/lib/commonjs/icons/wallet.js.map +1 -0
- package/lib/commonjs/image/image-or-component.js +80 -0
- package/lib/commonjs/image/image-or-component.js.map +1 -0
- package/lib/commonjs/image/index.js +21 -0
- package/lib/commonjs/image/index.js.map +1 -0
- package/lib/commonjs/index.js +292 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/input/index.js +65 -0
- package/lib/commonjs/input/index.js.map +1 -0
- package/lib/commonjs/input/radio-group.js +95 -0
- package/lib/commonjs/input/radio-group.js.map +1 -0
- package/lib/commonjs/input/selection-input.js +102 -0
- package/lib/commonjs/input/selection-input.js.map +1 -0
- package/lib/commonjs/input/text-input.js +195 -0
- package/lib/commonjs/input/text-input.js.map +1 -0
- package/lib/commonjs/list/index.js +34 -0
- package/lib/commonjs/list/index.js.map +1 -0
- package/lib/commonjs/list/list-section-header.js +36 -0
- package/lib/commonjs/list/list-section-header.js.map +1 -0
- package/lib/commonjs/list/list-title-header.js +35 -0
- package/lib/commonjs/list/list-title-header.js.map +1 -0
- package/lib/commonjs/loader/index.js +40 -0
- package/lib/commonjs/loader/index.js.map +1 -0
- package/lib/commonjs/loader/loader.js +140 -0
- package/lib/commonjs/loader/loader.js.map +1 -0
- package/lib/commonjs/loader/loading-result.js +92 -0
- package/lib/commonjs/loader/loading-result.js.map +1 -0
- package/lib/commonjs/nerd-view/index.js +27 -0
- package/lib/commonjs/nerd-view/index.js.map +1 -0
- package/lib/commonjs/nerd-view/nerd-mode-item.js +235 -0
- package/lib/commonjs/nerd-view/nerd-mode-item.js.map +1 -0
- package/lib/commonjs/normalize-color.d.js +2 -0
- package/lib/commonjs/normalize-color.d.js.map +1 -0
- package/lib/commonjs/pin/index.js +32 -0
- package/lib/commonjs/pin/index.js.map +1 -0
- package/lib/commonjs/pin/keypad.js +201 -0
- package/lib/commonjs/pin/keypad.js.map +1 -0
- package/lib/commonjs/pin/pin-code-screen.js +162 -0
- package/lib/commonjs/pin/pin-code-screen.js.map +1 -0
- package/lib/commonjs/pin/pins.js +54 -0
- package/lib/commonjs/pin/pins.js.map +1 -0
- package/lib/commonjs/screens/backup-screen.js +87 -0
- package/lib/commonjs/screens/backup-screen.js.map +1 -0
- package/lib/commonjs/screens/image-preview-screen.js +92 -0
- package/lib/commonjs/screens/image-preview-screen.js.map +1 -0
- package/lib/commonjs/screens/index.js +98 -0
- package/lib/commonjs/screens/index.js.map +1 -0
- package/lib/commonjs/screens/nerd-mode-screen.js +142 -0
- package/lib/commonjs/screens/nerd-mode-screen.js.map +1 -0
- package/lib/commonjs/screens/qr-code-scanner-screen.js +120 -0
- package/lib/commonjs/screens/qr-code-scanner-screen.js.map +1 -0
- package/lib/commonjs/screens/scroll-view-screen.js +94 -0
- package/lib/commonjs/screens/scroll-view-screen.js.map +1 -0
- package/lib/commonjs/screens/section-list-screen.js +67 -0
- package/lib/commonjs/screens/section-list-screen.js.map +1 -0
- package/lib/commonjs/searchbar/animated-search-bar.js +88 -0
- package/lib/commonjs/searchbar/animated-search-bar.js.map +1 -0
- package/lib/commonjs/searchbar/index.js +34 -0
- package/lib/commonjs/searchbar/index.js.map +1 -0
- package/lib/commonjs/searchbar/search-bar.js +99 -0
- package/lib/commonjs/searchbar/search-bar.js.map +1 -0
- package/lib/commonjs/settings/button-setting.js +67 -0
- package/lib/commonjs/settings/button-setting.js.map +1 -0
- package/lib/commonjs/settings/index.js +73 -0
- package/lib/commonjs/settings/index.js.map +1 -0
- package/lib/commonjs/settings/setting-item-separator.js +40 -0
- package/lib/commonjs/settings/setting-item-separator.js.map +1 -0
- package/lib/commonjs/settings/setting-item.js +79 -0
- package/lib/commonjs/settings/setting-item.js.map +1 -0
- package/lib/commonjs/settings/settings-button.js +35 -0
- package/lib/commonjs/settings/settings-button.js.map +1 -0
- package/lib/commonjs/settings/switch-setting.js +35 -0
- package/lib/commonjs/settings/switch-setting.js.map +1 -0
- package/lib/commonjs/state/error-screen.js +71 -0
- package/lib/commonjs/state/error-screen.js.map +1 -0
- package/lib/commonjs/state/index.js +27 -0
- package/lib/commonjs/state/index.js.map +1 -0
- package/lib/commonjs/text/base.js +40 -0
- package/lib/commonjs/text/base.js.map +1 -0
- package/lib/commonjs/text/font.js +64 -0
- package/lib/commonjs/text/font.js.map +1 -0
- package/lib/commonjs/text/index.js +21 -0
- package/lib/commonjs/text/index.js.map +1 -0
- package/lib/commonjs/text/typography.js +119 -0
- package/lib/commonjs/text/typography.js.map +1 -0
- package/lib/commonjs/theme/color-scheme-context.js +52 -0
- package/lib/commonjs/theme/color-scheme-context.js.map +1 -0
- package/lib/commonjs/theme/color-scheme.js +2 -0
- package/lib/commonjs/theme/color-scheme.js.map +1 -0
- package/lib/commonjs/theme/index.js +19 -0
- package/lib/commonjs/theme/index.js.map +1 -0
- package/lib/commonjs/utils/color.js +34 -0
- package/lib/commonjs/utils/color.js.map +1 -0
- package/lib/commonjs/utils/contrasting-status-bar.js +30 -0
- package/lib/commonjs/utils/contrasting-status-bar.js.map +1 -0
- package/lib/commonjs/utils/date.js +57 -0
- package/lib/commonjs/utils/date.js.map +1 -0
- package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js +21 -0
- package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js.map +1 -0
- package/lib/commonjs/utils/hooks/index.js +20 -0
- package/lib/commonjs/utils/hooks/index.js.map +1 -0
- package/lib/commonjs/utils/hooks/list/list-content-inset.js +31 -0
- package/lib/commonjs/utils/hooks/list/list-content-inset.js.map +1 -0
- package/lib/commonjs/utils/index.js +83 -0
- package/lib/commonjs/utils/index.js.map +1 -0
- package/lib/commonjs/utils/navigation.js +51 -0
- package/lib/commonjs/utils/navigation.js.map +1 -0
- package/lib/commonjs/utils/ref.js +42 -0
- package/lib/commonjs/utils/ref.js.map +1 -0
- package/lib/commonjs/utils/testID.js +18 -0
- package/lib/commonjs/utils/testID.js.map +1 -0
- package/lib/commonjs/utils/testID.test.js +21 -0
- package/lib/commonjs/utils/testID.test.js.map +1 -0
- package/lib/commonjs/utils/useMemoAsync.js +26 -0
- package/lib/commonjs/utils/useMemoAsync.js.map +1 -0
- package/lib/module/accessibility/accessibility.js +185 -0
- package/lib/module/accessibility/accessibility.js.map +1 -0
- package/lib/module/accessibility/accessibilityHistory.js +71 -0
- package/lib/module/accessibility/accessibilityHistory.js.map +1 -0
- package/lib/module/accessibility/accessibilityHistoryWrappers.js +38 -0
- package/lib/module/accessibility/accessibilityHistoryWrappers.js.map +1 -0
- package/lib/module/accessibility/accessibilityLanguage.js +53 -0
- package/lib/module/accessibility/accessibilityLanguage.js.map +1 -0
- package/lib/module/accessibility/index.js +8 -0
- package/lib/module/accessibility/index.js.map +1 -0
- package/lib/module/accessibility/locale/de.json +21 -0
- package/lib/module/accessibility/locale/en.json +21 -0
- package/lib/module/accessibility/locale/fr.json +21 -0
- package/lib/module/accessibility/locale/index.js +12 -0
- package/lib/module/accessibility/locale/index.js.map +1 -0
- package/lib/module/accessibility/locale/it.json +21 -0
- package/lib/module/accessibility/locale.test.js +13 -0
- package/lib/module/accessibility/locale.test.js.map +1 -0
- package/lib/module/action-modal/ActionModal.js +44 -0
- package/lib/module/action-modal/ActionModal.js.map +1 -0
- package/lib/module/action-modal/index.js +3 -0
- package/lib/module/action-modal/index.js.map +1 -0
- package/lib/module/activity-indicator/activity-indicator.js +24 -0
- package/lib/module/activity-indicator/activity-indicator.js.map +1 -0
- package/lib/module/activity-indicator/index.js +3 -0
- package/lib/module/activity-indicator/index.js.map +1 -0
- package/lib/module/blur/blur-view.js +67 -0
- package/lib/module/blur/blur-view.js.map +1 -0
- package/lib/module/blur/index.js +3 -0
- package/lib/module/blur/index.js.map +1 -0
- package/lib/module/buttons/back-button.js +28 -0
- package/lib/module/buttons/back-button.js.map +1 -0
- package/lib/module/buttons/button.js +143 -0
- package/lib/module/buttons/button.js.map +1 -0
- package/lib/module/buttons/connectivity-button.js +73 -0
- package/lib/module/buttons/connectivity-button.js.map +1 -0
- package/lib/module/buttons/filter-button.js +43 -0
- package/lib/module/buttons/filter-button.js.map +1 -0
- package/lib/module/buttons/ghost-button.js +53 -0
- package/lib/module/buttons/ghost-button.js.map +1 -0
- package/lib/module/buttons/index.js +8 -0
- package/lib/module/buttons/index.js.map +1 -0
- package/lib/module/buttons/scan-button.js +75 -0
- package/lib/module/buttons/scan-button.js.map +1 -0
- package/lib/module/camera/camera-overlay.js +51 -0
- package/lib/module/camera/camera-overlay.js.map +1 -0
- package/lib/module/camera/index.js +3 -0
- package/lib/module/camera/index.js.map +1 -0
- package/lib/module/camera/qr-code-scanner.js +40 -0
- package/lib/module/camera/qr-code-scanner.js.map +1 -0
- package/lib/module/control/checkbox.js +70 -0
- package/lib/module/control/checkbox.js.map +1 -0
- package/lib/module/control/index.js +4 -0
- package/lib/module/control/index.js.map +1 -0
- package/lib/module/control/switch.js +56 -0
- package/lib/module/control/switch.js.map +1 -0
- package/lib/module/credential/card/credential-card.js +177 -0
- package/lib/module/credential/card/credential-card.js.map +1 -0
- package/lib/module/credential/card/credential-details-card.js +191 -0
- package/lib/module/credential/card/credential-details-card.js.map +1 -0
- package/lib/module/credential/card/credential-details-list-item.js +74 -0
- package/lib/module/credential/card/credential-details-list-item.js.map +1 -0
- package/lib/module/credential/card/credential-header.js +162 -0
- package/lib/module/credential/card/credential-header.js.map +1 -0
- package/lib/module/credential/card/credential-image-carousel.js +113 -0
- package/lib/module/credential/card/credential-image-carousel.js.map +1 -0
- package/lib/module/credential/card/index.js +11 -0
- package/lib/module/credential/card/index.js.map +1 -0
- package/lib/module/credential/credential-attribute-item.js +279 -0
- package/lib/module/credential/credential-attribute-item.js.map +1 -0
- package/lib/module/credential/credential-carousel-images.js +86 -0
- package/lib/module/credential/credential-carousel-images.js.map +1 -0
- package/lib/module/credential/index.js +9 -0
- package/lib/module/credential/index.js.map +1 -0
- package/lib/module/credential/selector-status.js +10 -0
- package/lib/module/credential/selector-status.js.map +1 -0
- package/lib/module/credential/selector.js +70 -0
- package/lib/module/credential/selector.js.map +1 -0
- package/lib/module/detail/detail.js +75 -0
- package/lib/module/detail/detail.js.map +1 -0
- package/lib/module/detail/index.js +3 -0
- package/lib/module/detail/index.js.map +1 -0
- package/lib/module/entity/avatar.js +86 -0
- package/lib/module/entity/avatar.js.map +1 -0
- package/lib/module/entity/entity-cluster.js +56 -0
- package/lib/module/entity/entity-cluster.js.map +1 -0
- package/lib/module/entity/index.js +5 -0
- package/lib/module/entity/index.js.map +1 -0
- package/lib/module/header/focus-aware-status-bar.js +12 -0
- package/lib/module/header/focus-aware-status-bar.js.map +1 -0
- package/lib/module/header/foldable-header.js +79 -0
- package/lib/module/header/foldable-header.js.map +1 -0
- package/lib/module/header/header.js +97 -0
- package/lib/module/header/header.js.map +1 -0
- package/lib/module/header/index.js +9 -0
- package/lib/module/header/index.js.map +1 -0
- package/lib/module/header/navigation-header.js +138 -0
- package/lib/module/header/navigation-header.js.map +1 -0
- package/lib/module/history/data-item.js +60 -0
- package/lib/module/history/data-item.js.map +1 -0
- package/lib/module/history/history-list-item.js +80 -0
- package/lib/module/history/history-list-item.js.map +1 -0
- package/lib/module/history/history-section-header.js +42 -0
- package/lib/module/history/history-section-header.js.map +1 -0
- package/lib/module/history/history-section-list-item.js +43 -0
- package/lib/module/history/history-section-list-item.js.map +1 -0
- package/lib/module/history/index.js +9 -0
- package/lib/module/history/index.js.map +1 -0
- package/lib/module/icons/connectivity.js +125 -0
- package/lib/module/icons/connectivity.js.map +1 -0
- package/lib/module/icons/credential.js +147 -0
- package/lib/module/icons/credential.js.map +1 -0
- package/lib/module/icons/entity.js +25 -0
- package/lib/module/icons/entity.js.map +1 -0
- package/lib/module/icons/history.js +391 -0
- package/lib/module/icons/history.js.map +1 -0
- package/lib/module/icons/icons.js +231 -0
- package/lib/module/icons/icons.js.map +1 -0
- package/lib/module/icons/index.js +12 -0
- package/lib/module/icons/index.js.map +1 -0
- package/lib/module/icons/input.js +33 -0
- package/lib/module/icons/input.js.map +1 -0
- package/lib/module/icons/keypad.js +81 -0
- package/lib/module/icons/keypad.js.map +1 -0
- package/lib/module/icons/loader.js +168 -0
- package/lib/module/icons/loader.js.map +1 -0
- package/lib/module/icons/nerd-view.js +110 -0
- package/lib/module/icons/nerd-view.js.map +1 -0
- package/lib/module/icons/selector.js +45 -0
- package/lib/module/icons/selector.js.map +1 -0
- package/lib/module/icons/wallet.js +111 -0
- package/lib/module/icons/wallet.js.map +1 -0
- package/lib/module/image/image-or-component.js +71 -0
- package/lib/module/image/image-or-component.js.map +1 -0
- package/lib/module/image/index.js +3 -0
- package/lib/module/image/index.js.map +1 -0
- package/lib/module/index.js +27 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/input/index.js +7 -0
- package/lib/module/input/index.js.map +1 -0
- package/lib/module/input/radio-group.js +87 -0
- package/lib/module/input/radio-group.js.map +1 -0
- package/lib/module/input/selection-input.js +92 -0
- package/lib/module/input/selection-input.js.map +1 -0
- package/lib/module/input/text-input.js +185 -0
- package/lib/module/input/text-input.js.map +1 -0
- package/lib/module/list/index.js +5 -0
- package/lib/module/list/index.js.map +1 -0
- package/lib/module/list/list-section-header.js +28 -0
- package/lib/module/list/list-section-header.js.map +1 -0
- package/lib/module/list/list-title-header.js +27 -0
- package/lib/module/list/list-title-header.js.map +1 -0
- package/lib/module/loader/index.js +5 -0
- package/lib/module/loader/index.js.map +1 -0
- package/lib/module/loader/loader.js +130 -0
- package/lib/module/loader/loader.js.map +1 -0
- package/lib/module/loader/loading-result.js +84 -0
- package/lib/module/loader/loading-result.js.map +1 -0
- package/lib/module/nerd-view/index.js +3 -0
- package/lib/module/nerd-view/index.js.map +1 -0
- package/lib/module/nerd-view/nerd-mode-item.js +224 -0
- package/lib/module/nerd-view/nerd-mode-item.js.map +1 -0
- package/lib/module/normalize-color.d.js +2 -0
- package/lib/module/normalize-color.d.js.map +1 -0
- package/lib/module/pin/index.js +4 -0
- package/lib/module/pin/index.js.map +1 -0
- package/lib/module/pin/keypad.js +191 -0
- package/lib/module/pin/keypad.js.map +1 -0
- package/lib/module/pin/pin-code-screen.js +152 -0
- package/lib/module/pin/pin-code-screen.js.map +1 -0
- package/lib/module/pin/pins.js +46 -0
- package/lib/module/pin/pins.js.map +1 -0
- package/lib/module/screens/backup-screen.js +78 -0
- package/lib/module/screens/backup-screen.js.map +1 -0
- package/lib/module/screens/image-preview-screen.js +83 -0
- package/lib/module/screens/image-preview-screen.js.map +1 -0
- package/lib/module/screens/index.js +13 -0
- package/lib/module/screens/index.js.map +1 -0
- package/lib/module/screens/nerd-mode-screen.js +132 -0
- package/lib/module/screens/nerd-mode-screen.js.map +1 -0
- package/lib/module/screens/qr-code-scanner-screen.js +110 -0
- package/lib/module/screens/qr-code-scanner-screen.js.map +1 -0
- package/lib/module/screens/scroll-view-screen.js +86 -0
- package/lib/module/screens/scroll-view-screen.js.map +1 -0
- package/lib/module/screens/section-list-screen.js +59 -0
- package/lib/module/screens/section-list-screen.js.map +1 -0
- package/lib/module/searchbar/animated-search-bar.js +78 -0
- package/lib/module/searchbar/animated-search-bar.js.map +1 -0
- package/lib/module/searchbar/index.js +5 -0
- package/lib/module/searchbar/index.js.map +1 -0
- package/lib/module/searchbar/search-bar.js +89 -0
- package/lib/module/searchbar/search-bar.js.map +1 -0
- package/lib/module/settings/button-setting.js +57 -0
- package/lib/module/settings/button-setting.js.map +1 -0
- package/lib/module/settings/index.js +11 -0
- package/lib/module/settings/index.js.map +1 -0
- package/lib/module/settings/setting-item-separator.js +32 -0
- package/lib/module/settings/setting-item-separator.js.map +1 -0
- package/lib/module/settings/setting-item.js +69 -0
- package/lib/module/settings/setting-item.js.map +1 -0
- package/lib/module/settings/settings-button.js +27 -0
- package/lib/module/settings/settings-button.js.map +1 -0
- package/lib/module/settings/switch-setting.js +27 -0
- package/lib/module/settings/switch-setting.js.map +1 -0
- package/lib/module/state/error-screen.js +63 -0
- package/lib/module/state/error-screen.js.map +1 -0
- package/lib/module/state/index.js +3 -0
- package/lib/module/state/index.js.map +1 -0
- package/lib/module/text/base.js +31 -0
- package/lib/module/text/base.js.map +1 -0
- package/lib/module/text/font.js +56 -0
- package/lib/module/text/font.js.map +1 -0
- package/lib/module/text/index.js +3 -0
- package/lib/module/text/index.js.map +1 -0
- package/lib/module/text/typography.js +111 -0
- package/lib/module/text/typography.js.map +1 -0
- package/lib/module/theme/color-scheme-context.js +44 -0
- package/lib/module/theme/color-scheme-context.js.map +1 -0
- package/lib/module/theme/color-scheme.js +2 -0
- package/lib/module/theme/color-scheme.js.map +1 -0
- package/lib/module/theme/index.js +3 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/utils/color.js +23 -0
- package/lib/module/utils/color.js.map +1 -0
- package/lib/module/utils/contrasting-status-bar.js +21 -0
- package/lib/module/utils/contrasting-status-bar.js.map +1 -0
- package/lib/module/utils/date.js +51 -0
- package/lib/module/utils/date.js.map +1 -0
- package/lib/module/utils/hooks/header/on-scroll-header-state.js +14 -0
- package/lib/module/utils/hooks/header/on-scroll-header-state.js.map +1 -0
- package/lib/module/utils/hooks/index.js +5 -0
- package/lib/module/utils/hooks/index.js.map +1 -0
- package/lib/module/utils/hooks/list/list-content-inset.js +24 -0
- package/lib/module/utils/hooks/list/list-content-inset.js.map +1 -0
- package/lib/module/utils/index.js +9 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/module/utils/navigation.js +45 -0
- package/lib/module/utils/navigation.js.map +1 -0
- package/lib/module/utils/ref.js +35 -0
- package/lib/module/utils/ref.js.map +1 -0
- package/lib/module/utils/testID.js +12 -0
- package/lib/module/utils/testID.js.map +1 -0
- package/lib/module/utils/testID.test.js +19 -0
- package/lib/module/utils/testID.test.js.map +1 -0
- package/lib/module/utils/useMemoAsync.js +20 -0
- package/lib/module/utils/useMemoAsync.js.map +1 -0
- package/lib/typescript/accessibility/accessibility.d.ts +55 -0
- package/lib/typescript/accessibility/accessibilityHistory.d.ts +13 -0
- package/lib/typescript/accessibility/accessibilityHistoryWrappers.d.ts +18 -0
- package/lib/typescript/accessibility/accessibilityLanguage.d.ts +20 -0
- package/lib/typescript/accessibility/index.d.ts +6 -0
- package/lib/typescript/accessibility/locale/index.d.ts +90 -0
- package/lib/typescript/accessibility/locale.test.d.ts +1 -0
- package/lib/typescript/action-modal/ActionModal.d.ts +10 -0
- package/lib/typescript/action-modal/index.d.ts +2 -0
- package/lib/typescript/activity-indicator/activity-indicator.d.ts +7 -0
- package/lib/typescript/activity-indicator/index.d.ts +2 -0
- package/lib/typescript/blur/blur-view.d.ts +10 -0
- package/lib/typescript/blur/index.d.ts +2 -0
- package/lib/typescript/buttons/back-button.d.ts +9 -0
- package/lib/typescript/buttons/button.d.ts +22 -0
- package/lib/typescript/buttons/connectivity-button.d.ts +17 -0
- package/lib/typescript/buttons/filter-button.d.ts +7 -0
- package/lib/typescript/buttons/ghost-button.d.ts +11 -0
- package/lib/typescript/buttons/index.d.ts +7 -0
- package/lib/typescript/buttons/scan-button.d.ts +5 -0
- package/lib/typescript/camera/camera-overlay.d.ts +7 -0
- package/lib/typescript/camera/index.d.ts +2 -0
- package/lib/typescript/camera/qr-code-scanner.d.ts +11 -0
- package/lib/typescript/control/checkbox.d.ts +9 -0
- package/lib/typescript/control/index.d.ts +3 -0
- package/lib/typescript/control/switch.d.ts +7 -0
- package/lib/typescript/credential/card/credential-card.d.ts +22 -0
- package/lib/typescript/credential/card/credential-details-card.d.ts +16 -0
- package/lib/typescript/credential/card/credential-details-list-item.d.ts +9 -0
- package/lib/typescript/credential/card/credential-header.d.ts +20 -0
- package/lib/typescript/credential/card/credential-image-carousel.d.ts +23 -0
- package/lib/typescript/credential/card/index.d.ts +10 -0
- package/lib/typescript/credential/credential-attribute-item.d.ts +48 -0
- package/lib/typescript/credential/credential-carousel-images.d.ts +19 -0
- package/lib/typescript/credential/index.d.ts +8 -0
- package/lib/typescript/credential/selector-status.d.ts +8 -0
- package/lib/typescript/credential/selector.d.ts +15 -0
- package/lib/typescript/detail/detail.d.ts +18 -0
- package/lib/typescript/detail/index.d.ts +2 -0
- package/lib/typescript/entity/avatar.d.ts +10 -0
- package/lib/typescript/entity/entity-cluster.d.ts +12 -0
- package/lib/typescript/entity/index.d.ts +4 -0
- package/lib/typescript/header/focus-aware-status-bar.d.ts +4 -0
- package/lib/typescript/header/foldable-header.d.ts +11 -0
- package/lib/typescript/header/header.d.ts +17 -0
- package/lib/typescript/header/index.d.ts +8 -0
- package/lib/typescript/header/navigation-header.d.ts +15 -0
- package/lib/typescript/history/data-item.d.ts +12 -0
- package/lib/typescript/history/history-list-item.d.ts +14 -0
- package/lib/typescript/history/history-section-header.d.ts +7 -0
- package/lib/typescript/history/history-section-list-item.d.ts +7 -0
- package/lib/typescript/history/index.d.ts +8 -0
- package/lib/typescript/icons/connectivity.d.ts +12 -0
- package/lib/typescript/icons/credential.d.ts +9 -0
- package/lib/typescript/icons/entity.d.ts +3 -0
- package/lib/typescript/icons/history.d.ts +42 -0
- package/lib/typescript/icons/icons.d.ts +13 -0
- package/lib/typescript/icons/index.d.ts +11 -0
- package/lib/typescript/icons/input.d.ts +3 -0
- package/lib/typescript/icons/keypad.d.ts +6 -0
- package/lib/typescript/icons/loader.d.ts +6 -0
- package/lib/typescript/icons/nerd-view.d.ts +7 -0
- package/lib/typescript/icons/selector.d.ts +10 -0
- package/lib/typescript/icons/wallet.d.ts +4 -0
- package/lib/typescript/image/image-or-component.d.ts +16 -0
- package/lib/typescript/image/index.d.ts +2 -0
- package/lib/typescript/index.d.ts +26 -0
- package/lib/typescript/input/index.d.ts +6 -0
- package/lib/typescript/input/radio-group.d.ts +23 -0
- package/lib/typescript/input/selection-input.d.ts +32 -0
- package/lib/typescript/input/text-input.d.ts +31 -0
- package/lib/typescript/list/index.d.ts +4 -0
- package/lib/typescript/list/list-section-header.d.ts +7 -0
- package/lib/typescript/list/list-title-header.d.ts +7 -0
- package/lib/typescript/loader/index.d.ts +4 -0
- package/lib/typescript/loader/loader.d.ts +14 -0
- package/lib/typescript/loader/loading-result.d.ts +16 -0
- package/lib/typescript/nerd-view/index.d.ts +2 -0
- package/lib/typescript/nerd-view/nerd-mode-item.d.ts +31 -0
- package/lib/typescript/pin/index.d.ts +3 -0
- package/lib/typescript/pin/keypad.d.ts +16 -0
- package/lib/typescript/pin/pin-code-screen.d.ts +32 -0
- package/lib/typescript/pin/pins.d.ts +7 -0
- package/lib/typescript/screens/backup-screen.d.ts +16 -0
- package/lib/typescript/screens/image-preview-screen.d.ts +9 -0
- package/lib/typescript/screens/index.d.ts +12 -0
- package/lib/typescript/screens/nerd-mode-screen.d.ts +22 -0
- package/lib/typescript/screens/qr-code-scanner-screen.d.ts +14 -0
- package/lib/typescript/screens/scroll-view-screen.d.ts +13 -0
- package/lib/typescript/screens/section-list-screen.d.ts +12 -0
- package/lib/typescript/searchbar/animated-search-bar.d.ts +10 -0
- package/lib/typescript/searchbar/index.d.ts +4 -0
- package/lib/typescript/searchbar/search-bar.d.ts +10 -0
- package/lib/typescript/settings/button-setting.d.ts +13 -0
- package/lib/typescript/settings/index.d.ts +10 -0
- package/lib/typescript/settings/setting-item-separator.d.ts +8 -0
- package/lib/typescript/settings/setting-item.d.ts +9 -0
- package/lib/typescript/settings/settings-button.d.ts +5 -0
- package/lib/typescript/settings/switch-setting.d.ts +13 -0
- package/lib/typescript/state/error-screen.d.ts +15 -0
- package/lib/typescript/state/index.d.ts +2 -0
- package/lib/typescript/text/base.d.ts +20 -0
- package/lib/typescript/text/font.d.ts +26 -0
- package/lib/typescript/text/index.d.ts +2 -0
- package/lib/typescript/text/typography.d.ts +112 -0
- package/lib/typescript/theme/color-scheme-context.d.ts +10 -0
- package/lib/typescript/theme/color-scheme.d.ts +31 -0
- package/lib/typescript/theme/index.d.ts +3 -0
- package/lib/typescript/utils/color.d.ts +4 -0
- package/lib/typescript/utils/contrasting-status-bar.d.ts +10 -0
- package/lib/typescript/utils/date.d.ts +12 -0
- package/lib/typescript/utils/hooks/header/on-scroll-header-state.d.ts +5 -0
- package/lib/typescript/utils/hooks/index.d.ts +4 -0
- package/lib/typescript/utils/hooks/list/list-content-inset.d.ts +8 -0
- package/lib/typescript/utils/index.d.ts +8 -0
- package/lib/typescript/utils/navigation.d.ts +9 -0
- package/lib/typescript/utils/ref.d.ts +11 -0
- package/lib/typescript/utils/testID.d.ts +6 -0
- package/lib/typescript/utils/testID.test.d.ts +1 -0
- package/lib/typescript/utils/useMemoAsync.d.ts +21 -0
- package/package.json +240 -0
- package/src/accessibility/accessibility.ts +215 -0
- package/src/accessibility/accessibilityHistory.tsx +77 -0
- package/src/accessibility/accessibilityHistoryWrappers.tsx +80 -0
- package/src/accessibility/accessibilityLanguage.tsx +66 -0
- package/src/accessibility/index.ts +35 -0
- package/src/accessibility/locale/de.json +21 -0
- package/src/accessibility/locale/en.json +21 -0
- package/src/accessibility/locale/fr.json +21 -0
- package/src/accessibility/locale/index.ts +19 -0
- package/src/accessibility/locale/it.json +21 -0
- package/src/accessibility/locale.test.ts +16 -0
- package/src/action-modal/ActionModal.stories.tsx +35 -0
- package/src/action-modal/ActionModal.tsx +45 -0
- package/src/action-modal/index.ts +3 -0
- package/src/activity-indicator/activity-indicator.stories.tsx +21 -0
- package/src/activity-indicator/activity-indicator.tsx +25 -0
- package/src/activity-indicator/index.ts +3 -0
- package/src/blur/blur-view.tsx +82 -0
- package/src/blur/index.ts +3 -0
- package/src/buttons/back-button.stories.tsx +31 -0
- package/src/buttons/back-button.tsx +31 -0
- package/src/buttons/button.stories.tsx +29 -0
- package/src/buttons/button.tsx +169 -0
- package/src/buttons/connectivity-button.stories.tsx +34 -0
- package/src/buttons/connectivity-button.tsx +95 -0
- package/src/buttons/filter-button.tsx +38 -0
- package/src/buttons/ghost-button.stories.tsx +28 -0
- package/src/buttons/ghost-button.tsx +56 -0
- package/src/buttons/index.ts +24 -0
- package/src/buttons/scan-button.stories.tsx +26 -0
- package/src/buttons/scan-button.tsx +66 -0
- package/src/camera/camera-overlay.tsx +48 -0
- package/src/camera/index.tsx +3 -0
- package/src/camera/qr-code-scanner.tsx +52 -0
- package/src/control/checkbox.stories.tsx +27 -0
- package/src/control/checkbox.tsx +81 -0
- package/src/control/index.ts +4 -0
- package/src/control/switch.stories.tsx +29 -0
- package/src/control/switch.tsx +47 -0
- package/src/credential/card/credential-card.stories.tsx +52 -0
- package/src/credential/card/credential-card.tsx +195 -0
- package/src/credential/card/credential-details-card.stories.tsx +268 -0
- package/src/credential/card/credential-details-card.tsx +242 -0
- package/src/credential/card/credential-details-list-item.tsx +87 -0
- package/src/credential/card/credential-header.stories.tsx +50 -0
- package/src/credential/card/credential-header.tsx +195 -0
- package/src/credential/card/credential-image-carousel.tsx +113 -0
- package/src/credential/card/index.ts +11 -0
- package/src/credential/credential-attribute-item.tsx +372 -0
- package/src/credential/credential-carousel-images.tsx +90 -0
- package/src/credential/index.ts +13 -0
- package/src/credential/selector-status.ts +8 -0
- package/src/credential/selector.stories.tsx +37 -0
- package/src/credential/selector.tsx +64 -0
- package/src/detail/detail.stories.tsx +65 -0
- package/src/detail/detail.tsx +98 -0
- package/src/detail/index.tsx +3 -0
- package/src/entity/avatar.stories.tsx +39 -0
- package/src/entity/avatar.tsx +87 -0
- package/src/entity/entity-cluster.stories.tsx +42 -0
- package/src/entity/entity-cluster.tsx +72 -0
- package/src/entity/index.ts +5 -0
- package/src/header/focus-aware-status-bar.tsx +10 -0
- package/src/header/foldable-header.tsx +107 -0
- package/src/header/header.stories.tsx +59 -0
- package/src/header/header.tsx +105 -0
- package/src/header/index.ts +9 -0
- package/src/header/navigation-header.stories.tsx +56 -0
- package/src/header/navigation-header.tsx +147 -0
- package/src/history/data-item.tsx +79 -0
- package/src/history/history-list-item.tsx +102 -0
- package/src/history/history-section-header.tsx +44 -0
- package/src/history/history-section-list-item.tsx +41 -0
- package/src/history/index.ts +9 -0
- package/src/icons/connectivity.tsx +114 -0
- package/src/icons/credential.tsx +118 -0
- package/src/icons/entity.tsx +21 -0
- package/src/icons/history.tsx +378 -0
- package/src/icons/icons.tsx +134 -0
- package/src/icons/index.ts +11 -0
- package/src/icons/input.tsx +29 -0
- package/src/icons/keypad.tsx +40 -0
- package/src/icons/loader.tsx +117 -0
- package/src/icons/nerd-view.tsx +105 -0
- package/src/icons/selector.tsx +43 -0
- package/src/icons/wallet.tsx +73 -0
- package/src/image/image-or-component.tsx +92 -0
- package/src/image/index.tsx +3 -0
- package/src/index.ts +26 -0
- package/src/input/index.ts +7 -0
- package/src/input/radio-group.tsx +110 -0
- package/src/input/selection-input.stories.tsx +46 -0
- package/src/input/selection-input.tsx +112 -0
- package/src/input/text-input.tsx +253 -0
- package/src/list/index.ts +5 -0
- package/src/list/list-section-header.tsx +37 -0
- package/src/list/list-title-header.tsx +30 -0
- package/src/loader/index.ts +5 -0
- package/src/loader/loader.stories.tsx +31 -0
- package/src/loader/loader.tsx +169 -0
- package/src/loader/loading-result.stories.tsx +67 -0
- package/src/loader/loading-result.tsx +93 -0
- package/src/nerd-view/index.ts +3 -0
- package/src/nerd-view/nerd-mode-item.tsx +296 -0
- package/src/normalize-color.d.ts +1 -0
- package/src/pin/index.ts +4 -0
- package/src/pin/keypad.tsx +166 -0
- package/src/pin/pin-code-screen.stories.tsx +80 -0
- package/src/pin/pin-code-screen.tsx +195 -0
- package/src/pin/pins.tsx +48 -0
- package/src/screens/backup-screen.tsx +92 -0
- package/src/screens/image-preview-screen.stories.tsx +28 -0
- package/src/screens/image-preview-screen.tsx +82 -0
- package/src/screens/index.ts +13 -0
- package/src/screens/nerd-mode-screen.tsx +150 -0
- package/src/screens/qr-code-scanner-screen.stories.tsx +37 -0
- package/src/screens/qr-code-scanner-screen.tsx +124 -0
- package/src/screens/scroll-view-screen.tsx +91 -0
- package/src/screens/section-list-screen.tsx +61 -0
- package/src/searchbar/animated-search-bar.tsx +96 -0
- package/src/searchbar/index.ts +5 -0
- package/src/searchbar/search-bar.stories.tsx +31 -0
- package/src/searchbar/search-bar.tsx +94 -0
- package/src/settings/button-setting.tsx +72 -0
- package/src/settings/index.ts +11 -0
- package/src/settings/setting-item-separator.tsx +32 -0
- package/src/settings/setting-item.tsx +68 -0
- package/src/settings/settings-button.tsx +23 -0
- package/src/settings/switch-setting.tsx +33 -0
- package/src/state/error-screen.stories.tsx +22 -0
- package/src/state/error-screen.tsx +71 -0
- package/src/state/index.ts +3 -0
- package/src/text/base.tsx +53 -0
- package/src/text/font.ts +52 -0
- package/src/text/index.ts +3 -0
- package/src/text/typography.stories.tsx +70 -0
- package/src/text/typography.tsx +117 -0
- package/src/theme/color-scheme-context.tsx +48 -0
- package/src/theme/color-scheme.ts +31 -0
- package/src/theme/index.ts +4 -0
- package/src/utils/color.ts +34 -0
- package/src/utils/contrasting-status-bar.tsx +21 -0
- package/src/utils/date.ts +49 -0
- package/src/utils/hooks/header/on-scroll-header-state.tsx +16 -0
- package/src/utils/hooks/index.ts +5 -0
- package/src/utils/hooks/list/list-content-inset.ts +24 -0
- package/src/utils/index.ts +19 -0
- package/src/utils/navigation.ts +37 -0
- package/src/utils/ref.ts +39 -0
- package/src/utils/testID.test.ts +20 -0
- package/src/utils/testID.ts +9 -0
- package/src/utils/useMemoAsync.ts +50 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var _NativeModules$I18nMa, _NativeModules$I18nMa2;
|
|
2
|
+
// Date & Time formatted as specified in SW-610
|
|
3
|
+
|
|
4
|
+
import { NativeModules } from 'react-native';
|
|
5
|
+
|
|
6
|
+
// OS locale
|
|
7
|
+
const systemLocale = (_NativeModules$I18nMa = NativeModules.I18nManager) === null || _NativeModules$I18nMa === void 0 ? void 0 : (_NativeModules$I18nMa2 = _NativeModules$I18nMa.localeIdentifier) === null || _NativeModules$I18nMa2 === void 0 ? void 0 : _NativeModules$I18nMa2.replace(/_/g, '-').split('#')[0].replace(/-$/, '');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Date only format
|
|
11
|
+
*/
|
|
12
|
+
export const formatDate = (date, locale, options) => {
|
|
13
|
+
try {
|
|
14
|
+
return date.toLocaleDateString(locale || systemLocale, options);
|
|
15
|
+
} catch {
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Time only format
|
|
22
|
+
*/
|
|
23
|
+
export const formatTime = (date, locale) => {
|
|
24
|
+
try {
|
|
25
|
+
return date.toLocaleTimeString(locale || systemLocale, {
|
|
26
|
+
hour: '2-digit',
|
|
27
|
+
minute: '2-digit'
|
|
28
|
+
});
|
|
29
|
+
} catch {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Date and time format
|
|
36
|
+
*/
|
|
37
|
+
export const formatDateTime = (date, locale) => {
|
|
38
|
+
try {
|
|
39
|
+
return date.toLocaleString(locale || systemLocale, {
|
|
40
|
+
hour: '2-digit',
|
|
41
|
+
minute: '2-digit',
|
|
42
|
+
year: 'numeric',
|
|
43
|
+
month: 'numeric',
|
|
44
|
+
day: 'numeric',
|
|
45
|
+
hour12: locale === 'en-US'
|
|
46
|
+
});
|
|
47
|
+
} catch {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=date.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeModules","systemLocale","_NativeModules$I18nMa","I18nManager","_NativeModules$I18nMa2","localeIdentifier","replace","split","formatDate","date","locale","options","toLocaleDateString","undefined","formatTime","toLocaleTimeString","hour","minute","formatDateTime","toLocaleString","year","month","day","hour12"],"sources":["date.ts"],"sourcesContent":["// Date & Time formatted as specified in SW-610\n\nimport { NativeModules } from 'react-native';\n\n// OS locale\nconst systemLocale: string = NativeModules.I18nManager?.localeIdentifier\n ?.replace(/_/g, '-')\n .split('#')[0]\n .replace(/-$/, '');\n\n/**\n * Date only format\n */\nexport const formatDate = (date: Date, locale?: string, options?: Intl.DateTimeFormatOptions) => {\n try {\n return date.toLocaleDateString(locale || systemLocale, options);\n } catch {\n return undefined;\n }\n};\n\n/**\n * Time only format\n */\nexport const formatTime = (date: Date, locale?: string) => {\n try {\n return date.toLocaleTimeString(locale || systemLocale, { hour: '2-digit', minute: '2-digit' });\n } catch {\n return undefined;\n }\n};\n\n/**\n * Date and time format\n */\nexport const formatDateTime = (date: Date, locale?: string) => {\n try {\n return date.toLocaleString(locale || systemLocale, {\n hour: '2-digit',\n minute: '2-digit',\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour12: locale === 'en-US',\n });\n } catch {\n return undefined;\n }\n};\n"],"mappings":";AAAA;;AAEA,SAASA,aAAa,QAAQ,cAAc;;AAE5C;AACA,MAAMC,YAAoB,IAAAC,qBAAA,GAAGF,aAAa,CAACG,WAAW,cAAAD,qBAAA,wBAAAE,sBAAA,GAAzBF,qBAAA,CAA2BG,gBAAgB,cAAAD,sBAAA,uBAA3CA,sBAAA,CACzBE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CACnBC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACbD,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;;AAEpB;AACA;AACA;AACA,OAAO,MAAME,UAAU,GAAGA,CAACC,IAAU,EAAEC,MAAe,EAAEC,OAAoC,KAAK;EAC/F,IAAI;IACF,OAAOF,IAAI,CAACG,kBAAkB,CAACF,MAAM,IAAIT,YAAY,EAAEU,OAAO,CAAC;EACjE,CAAC,CAAC,MAAM;IACN,OAAOE,SAAS;EAClB;AACF,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMC,UAAU,GAAGA,CAACL,IAAU,EAAEC,MAAe,KAAK;EACzD,IAAI;IACF,OAAOD,IAAI,CAACM,kBAAkB,CAACL,MAAM,IAAIT,YAAY,EAAE;MAAEe,IAAI,EAAE,SAAS;MAAEC,MAAM,EAAE;IAAU,CAAC,CAAC;EAChG,CAAC,CAAC,MAAM;IACN,OAAOJ,SAAS;EAClB;AACF,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMK,cAAc,GAAGA,CAACT,IAAU,EAAEC,MAAe,KAAK;EAC7D,IAAI;IACF,OAAOD,IAAI,CAACU,cAAc,CAACT,MAAM,IAAIT,YAAY,EAAE;MACjDe,IAAI,EAAE,SAAS;MACfC,MAAM,EAAE,SAAS;MACjBG,IAAI,EAAE,SAAS;MACfC,KAAK,EAAE,SAAS;MAChBC,GAAG,EAAE,SAAS;MACdC,MAAM,EAAEb,MAAM,KAAK;IACrB,CAAC,CAAC;EACJ,CAAC,CAAC,MAAM;IACN,OAAOG,SAAS;EAClB;AACF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
|
+
export const useOnScrollHeaderState = function () {
|
|
3
|
+
let offset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 30;
|
|
4
|
+
const [titleVisible, setTitleVisible] = useState(false);
|
|
5
|
+
const onScroll = useCallback(event => {
|
|
6
|
+
const scrollOffset = event.nativeEvent.contentOffset.y;
|
|
7
|
+
setTitleVisible(scrollOffset > offset);
|
|
8
|
+
}, [offset]);
|
|
9
|
+
return {
|
|
10
|
+
onScroll,
|
|
11
|
+
titleVisible
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=on-scroll-header-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useState","useOnScrollHeaderState","offset","arguments","length","undefined","titleVisible","setTitleVisible","onScroll","event","scrollOffset","nativeEvent","contentOffset","y"],"sources":["on-scroll-header-state.tsx"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport { NativeScrollEvent, NativeSyntheticEvent } from 'react-native';\n\nexport const useOnScrollHeaderState = (offset = 30) => {\n const [titleVisible, setTitleVisible] = useState(false);\n\n const onScroll = useCallback(\n (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n const scrollOffset = event.nativeEvent.contentOffset.y;\n setTitleVisible(scrollOffset > offset);\n },\n [offset],\n );\n\n return { onScroll, titleVisible };\n};\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AAG7C,OAAO,MAAMC,sBAAsB,GAAG,SAAAA,CAAA,EAAiB;EAAA,IAAhBC,MAAM,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAChD,MAAM,CAACG,YAAY,EAAEC,eAAe,CAAC,GAAGP,QAAQ,CAAC,KAAK,CAAC;EAEvD,MAAMQ,QAAQ,GAAGT,WAAW,CACzBU,KAA8C,IAAK;IAClD,MAAMC,YAAY,GAAGD,KAAK,CAACE,WAAW,CAACC,aAAa,CAACC,CAAC;IACtDN,eAAe,CAACG,YAAY,GAAGR,MAAM,CAAC;EACxC,CAAC,EACD,CAACA,MAAM,CAAC,CACT;EAED,OAAO;IAAEM,QAAQ;IAAEF;EAAa,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useOnScrollHeaderState","useListContentInset"],"sources":["index.ts"],"sourcesContent":["import { useOnScrollHeaderState } from './header/on-scroll-header-state';\nimport { useListContentInset } from './list/list-content-inset';\n\nexport { useOnScrollHeaderState };\nexport { useListContentInset };\n"],"mappings":"AAAA,SAASA,sBAAsB,QAAQ,iCAAiC;AACxE,SAASC,mBAAmB,QAAQ,2BAA2B;AAE/D,SAASD,sBAAsB;AAC/B,SAASC,mBAAmB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
3
|
+
export const useListContentInset = function () {
|
|
4
|
+
let {
|
|
5
|
+
additionalBottomPadding = 54,
|
|
6
|
+
headerHeight = 48,
|
|
7
|
+
modalPresentation = false
|
|
8
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
9
|
+
additionalBottomPadding: 54,
|
|
10
|
+
headerHeight: 48,
|
|
11
|
+
modalPresentation: false
|
|
12
|
+
};
|
|
13
|
+
const {
|
|
14
|
+
top,
|
|
15
|
+
bottom
|
|
16
|
+
} = useSafeAreaInsets();
|
|
17
|
+
const topSafeAreaInset = !modalPresentation || Platform.OS === 'android' ? top : 0;
|
|
18
|
+
const contentInsetsStyle = {
|
|
19
|
+
paddingBottom: bottom + additionalBottomPadding,
|
|
20
|
+
paddingTop: topSafeAreaInset + headerHeight
|
|
21
|
+
};
|
|
22
|
+
return contentInsetsStyle;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=list-content-inset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","useSafeAreaInsets","useListContentInset","additionalBottomPadding","headerHeight","modalPresentation","arguments","length","undefined","top","bottom","topSafeAreaInset","OS","contentInsetsStyle","paddingBottom","paddingTop"],"sources":["list-content-inset.ts"],"sourcesContent":["import { Platform, ViewStyle } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\ntype ListContentInsetProps = {\n additionalBottomPadding?: number;\n headerHeight?: number;\n modalPresentation?: boolean;\n};\n\nexport const useListContentInset = (\n { additionalBottomPadding = 54, headerHeight = 48, modalPresentation = false }: ListContentInsetProps = {\n additionalBottomPadding: 54,\n headerHeight: 48,\n modalPresentation: false,\n },\n) => {\n const { top, bottom } = useSafeAreaInsets();\n const topSafeAreaInset = !modalPresentation || Platform.OS === 'android' ? top : 0;\n const contentInsetsStyle: ViewStyle = {\n paddingBottom: bottom + additionalBottomPadding,\n paddingTop: topSafeAreaInset + headerHeight,\n };\n return contentInsetsStyle;\n};\n"],"mappings":"AAAA,SAASA,QAAQ,QAAmB,cAAc;AAClD,SAASC,iBAAiB,QAAQ,gCAAgC;AAQlE,OAAO,MAAMC,mBAAmB,GAAG,SAAAA,CAAA,EAM9B;EAAA,IALH;IAAEC,uBAAuB,GAAG,EAAE;IAAEC,YAAY,GAAG,EAAE;IAAEC,iBAAiB,GAAG;EAA6B,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG;IACtGH,uBAAuB,EAAE,EAAE;IAC3BC,YAAY,EAAE,EAAE;IAChBC,iBAAiB,EAAE;EACrB,CAAC;EAED,MAAM;IAAEI,GAAG;IAAEC;EAAO,CAAC,GAAGT,iBAAiB,EAAE;EAC3C,MAAMU,gBAAgB,GAAG,CAACN,iBAAiB,IAAIL,QAAQ,CAACY,EAAE,KAAK,SAAS,GAAGH,GAAG,GAAG,CAAC;EAClF,MAAMI,kBAA6B,GAAG;IACpCC,aAAa,EAAEJ,MAAM,GAAGP,uBAAuB;IAC/CY,UAAU,EAAEJ,gBAAgB,GAAGP;EACjC,CAAC;EACD,OAAOS,kBAAkB;AAC3B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import ContrastingStatusBar from './contrasting-status-bar';
|
|
2
|
+
import { formatDate, formatDateTime, formatTime } from './date';
|
|
3
|
+
import { useBlockOSBackNavigation } from './navigation';
|
|
4
|
+
import { useForwardedRef } from './ref';
|
|
5
|
+
import { concatTestID } from './testID';
|
|
6
|
+
import { useMemoAsync } from './useMemoAsync';
|
|
7
|
+
export { concatTestID, ContrastingStatusBar, formatDate, formatDateTime, formatTime, useBlockOSBackNavigation, useForwardedRef, useMemoAsync };
|
|
8
|
+
export * from './hooks';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ContrastingStatusBar","formatDate","formatDateTime","formatTime","useBlockOSBackNavigation","useForwardedRef","concatTestID","useMemoAsync"],"sources":["index.ts"],"sourcesContent":["import ContrastingStatusBar from './contrasting-status-bar';\nimport { formatDate, formatDateTime, formatTime } from './date';\nimport { useBlockOSBackNavigation } from './navigation';\nimport { useForwardedRef } from './ref';\nimport { concatTestID } from './testID';\nimport { useMemoAsync } from './useMemoAsync';\n\nexport {\n concatTestID,\n ContrastingStatusBar,\n formatDate,\n formatDateTime,\n formatTime,\n useBlockOSBackNavigation,\n useForwardedRef,\n useMemoAsync,\n};\n\nexport * from './hooks';\n"],"mappings":"AAAA,OAAOA,oBAAoB,MAAM,0BAA0B;AAC3D,SAASC,UAAU,EAAEC,cAAc,EAAEC,UAAU,QAAQ,QAAQ;AAC/D,SAASC,wBAAwB,QAAQ,cAAc;AACvD,SAASC,eAAe,QAAQ,OAAO;AACvC,SAASC,YAAY,QAAQ,UAAU;AACvC,SAASC,YAAY,QAAQ,gBAAgB;AAE7C,SACED,YAAY,EACZN,oBAAoB,EACpBC,UAAU,EACVC,cAAc,EACdC,UAAU,EACVC,wBAAwB,EACxBC,eAAe,EACfE,YAAY;AAGd,cAAc,SAAS"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useIsFocused, useNavigation } from '@react-navigation/native';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { BackHandler } from 'react-native';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Prevent OS back navigation
|
|
7
|
+
* * iOS: block back swipe gesture
|
|
8
|
+
* * Android: block back button from system task bar
|
|
9
|
+
* @param block Whether to prevent the default behavior (default: true)
|
|
10
|
+
* @param onAndroidBack (Android only) Custom callback triggered when OS back button is pressed while blocked
|
|
11
|
+
* * return `false` to allow back navigation, return `true` to block back navigation
|
|
12
|
+
*/
|
|
13
|
+
export const useBlockOSBackNavigation = function () {
|
|
14
|
+
let block = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
15
|
+
let onAndroidBack = arguments.length > 1 ? arguments[1] : undefined;
|
|
16
|
+
const navigation = useNavigation();
|
|
17
|
+
const isFocused = useIsFocused();
|
|
18
|
+
|
|
19
|
+
// iOS: block back swipe (via screen options)
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (block) {
|
|
22
|
+
navigation.setOptions({
|
|
23
|
+
gestureEnabled: false
|
|
24
|
+
});
|
|
25
|
+
return () => navigation.setOptions({
|
|
26
|
+
gestureEnabled: true
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return undefined;
|
|
30
|
+
}, [block, navigation]);
|
|
31
|
+
|
|
32
|
+
// Anroid: block system back button
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (block && isFocused) {
|
|
35
|
+
const handler = () => {
|
|
36
|
+
var _onAndroidBack;
|
|
37
|
+
return (_onAndroidBack = onAndroidBack === null || onAndroidBack === void 0 ? void 0 : onAndroidBack()) !== null && _onAndroidBack !== void 0 ? _onAndroidBack : true;
|
|
38
|
+
};
|
|
39
|
+
BackHandler.addEventListener('hardwareBackPress', handler);
|
|
40
|
+
return () => BackHandler.removeEventListener('hardwareBackPress', handler);
|
|
41
|
+
}
|
|
42
|
+
return undefined;
|
|
43
|
+
}, [block, isFocused, onAndroidBack]);
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useIsFocused","useNavigation","useEffect","BackHandler","useBlockOSBackNavigation","block","arguments","length","undefined","onAndroidBack","navigation","isFocused","setOptions","gestureEnabled","handler","_onAndroidBack","addEventListener","removeEventListener"],"sources":["navigation.ts"],"sourcesContent":["import { NavigationProp, useIsFocused, useNavigation } from '@react-navigation/native';\nimport { useEffect } from 'react';\nimport { BackHandler } from 'react-native';\n\n/**\n * Prevent OS back navigation\n * * iOS: block back swipe gesture\n * * Android: block back button from system task bar\n * @param block Whether to prevent the default behavior (default: true)\n * @param onAndroidBack (Android only) Custom callback triggered when OS back button is pressed while blocked\n * * return `false` to allow back navigation, return `true` to block back navigation\n */\nexport const useBlockOSBackNavigation = (block: boolean = true, onAndroidBack?: () => boolean) => {\n const navigation = useNavigation<NavigationProp<{}>>();\n const isFocused = useIsFocused();\n\n // iOS: block back swipe (via screen options)\n useEffect(() => {\n if (block) {\n navigation.setOptions({ gestureEnabled: false });\n return () => navigation.setOptions({ gestureEnabled: true });\n }\n return undefined;\n }, [block, navigation]);\n\n // Anroid: block system back button\n useEffect(() => {\n if (block && isFocused) {\n const handler = () => {\n return onAndroidBack?.() ?? true;\n };\n BackHandler.addEventListener('hardwareBackPress', handler);\n return () => BackHandler.removeEventListener('hardwareBackPress', handler);\n }\n return undefined;\n }, [block, isFocused, onAndroidBack]);\n};\n"],"mappings":"AAAA,SAAyBA,YAAY,EAAEC,aAAa,QAAQ,0BAA0B;AACtF,SAASC,SAAS,QAAQ,OAAO;AACjC,SAASC,WAAW,QAAQ,cAAc;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,wBAAwB,GAAG,SAAAA,CAAA,EAA0D;EAAA,IAAzDC,KAAc,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAAA,IAAEG,aAA6B,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAC3F,MAAME,UAAU,GAAGT,aAAa,EAAsB;EACtD,MAAMU,SAAS,GAAGX,YAAY,EAAE;;EAEhC;EACAE,SAAS,CAAC,MAAM;IACd,IAAIG,KAAK,EAAE;MACTK,UAAU,CAACE,UAAU,CAAC;QAAEC,cAAc,EAAE;MAAM,CAAC,CAAC;MAChD,OAAO,MAAMH,UAAU,CAACE,UAAU,CAAC;QAAEC,cAAc,EAAE;MAAK,CAAC,CAAC;IAC9D;IACA,OAAOL,SAAS;EAClB,CAAC,EAAE,CAACH,KAAK,EAAEK,UAAU,CAAC,CAAC;;EAEvB;EACAR,SAAS,CAAC,MAAM;IACd,IAAIG,KAAK,IAAIM,SAAS,EAAE;MACtB,MAAMG,OAAO,GAAGA,CAAA,KAAM;QAAA,IAAAC,cAAA;QACpB,QAAAA,cAAA,GAAON,aAAa,aAAbA,aAAa,uBAAbA,aAAa,EAAI,cAAAM,cAAA,cAAAA,cAAA,GAAI,IAAI;MAClC,CAAC;MACDZ,WAAW,CAACa,gBAAgB,CAAC,mBAAmB,EAAEF,OAAO,CAAC;MAC1D,OAAO,MAAMX,WAAW,CAACc,mBAAmB,CAAC,mBAAmB,EAAEH,OAAO,CAAC;IAC5E;IACA,OAAON,SAAS;EAClB,CAAC,EAAE,CAACH,KAAK,EAAEM,SAAS,EAAEF,aAAa,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useMemo, useRef } from 'react';
|
|
2
|
+
const isWritable = (obj, key) => {
|
|
3
|
+
const desc = Object.getOwnPropertyDescriptor(obj, key) || Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key) || {};
|
|
4
|
+
return Boolean(desc.writable);
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Transforms a forwarded ref to a locally usable reference object
|
|
9
|
+
* @example
|
|
10
|
+
* const Component = forwardRef<RefComponent, Props>((props, ref) => {
|
|
11
|
+
* const [forwardedRef, refObject] = useForwardedRef(ref);
|
|
12
|
+
* const onAction = useCallback(() => doSomething(refObject.current), [refObject]);
|
|
13
|
+
* return <RefComponent ref={forwardedRef} {...props} />;
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
16
|
+
export const useForwardedRef = passedRef => {
|
|
17
|
+
const localRef = useRef(null);
|
|
18
|
+
return useMemo(() => {
|
|
19
|
+
const ref = localRef;
|
|
20
|
+
const forwardedRef = instance => {
|
|
21
|
+
ref.current = instance;
|
|
22
|
+
if (passedRef) {
|
|
23
|
+
if (passedRef instanceof Function) {
|
|
24
|
+
passedRef(instance);
|
|
25
|
+
} else if (isWritable(passedRef, 'current')) {
|
|
26
|
+
try {
|
|
27
|
+
passedRef.current = instance;
|
|
28
|
+
} catch (e) {}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
return [forwardedRef, ref];
|
|
33
|
+
}, [passedRef]);
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=ref.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useMemo","useRef","isWritable","obj","key","desc","Object","getOwnPropertyDescriptor","getPrototypeOf","Boolean","writable","useForwardedRef","passedRef","localRef","ref","forwardedRef","instance","current","Function","e"],"sources":["ref.ts"],"sourcesContent":["import React, { useMemo, useRef } from 'react';\n\nconst isWritable = <T extends Object>(obj: T, key: keyof T) => {\n const desc =\n Object.getOwnPropertyDescriptor(obj, key) || Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key) || {};\n return Boolean(desc.writable);\n};\n\n/**\n * Transforms a forwarded ref to a locally usable reference object\n * @example\n * const Component = forwardRef<RefComponent, Props>((props, ref) => {\n * const [forwardedRef, refObject] = useForwardedRef(ref);\n * const onAction = useCallback(() => doSomething(refObject.current), [refObject]);\n * return <RefComponent ref={forwardedRef} {...props} />;\n * }\n */\nexport const useForwardedRef = <Component extends React.Component<any> | React.ComponentClass<any>>(\n passedRef?: React.Ref<Component>,\n) => {\n const localRef = useRef<Component>(null);\n return useMemo<[React.Ref<Component>, React.RefObject<Component>]>(() => {\n const ref: React.MutableRefObject<Component | null> = localRef;\n const forwardedRef: React.Ref<Component> = (instance: Component | null) => {\n ref.current = instance;\n if (passedRef) {\n if (passedRef instanceof Function) {\n passedRef(instance);\n } else if (isWritable(passedRef, 'current')) {\n try {\n (passedRef as any).current = instance;\n } catch (e) {}\n }\n }\n };\n\n return [forwardedRef, ref as React.RefObject<Component>];\n }, [passedRef]);\n};\n"],"mappings":"AAAA,SAAgBA,OAAO,EAAEC,MAAM,QAAQ,OAAO;AAE9C,MAAMC,UAAU,GAAGA,CAAmBC,GAAM,EAAEC,GAAY,KAAK;EAC7D,MAAMC,IAAI,GACRC,MAAM,CAACC,wBAAwB,CAACJ,GAAG,EAAEC,GAAG,CAAC,IAAIE,MAAM,CAACC,wBAAwB,CAACD,MAAM,CAACE,cAAc,CAACL,GAAG,CAAC,EAAEC,GAAG,CAAC,IAAI,CAAC,CAAC;EACrH,OAAOK,OAAO,CAACJ,IAAI,CAACK,QAAQ,CAAC;AAC/B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAC1BC,SAAgC,IAC7B;EACH,MAAMC,QAAQ,GAAGZ,MAAM,CAAY,IAAI,CAAC;EACxC,OAAOD,OAAO,CAAqD,MAAM;IACvE,MAAMc,GAA6C,GAAGD,QAAQ;IAC9D,MAAME,YAAkC,GAAIC,QAA0B,IAAK;MACzEF,GAAG,CAACG,OAAO,GAAGD,QAAQ;MACtB,IAAIJ,SAAS,EAAE;QACb,IAAIA,SAAS,YAAYM,QAAQ,EAAE;UACjCN,SAAS,CAACI,QAAQ,CAAC;QACrB,CAAC,MAAM,IAAId,UAAU,CAACU,SAAS,EAAE,SAAS,CAAC,EAAE;UAC3C,IAAI;YACDA,SAAS,CAASK,OAAO,GAAGD,QAAQ;UACvC,CAAC,CAAC,OAAOG,CAAC,EAAE,CAAC;QACf;MACF;IACF,CAAC;IAED,OAAO,CAACJ,YAAY,EAAED,GAAG,CAA+B;EAC1D,CAAC,EAAE,CAACF,SAAS,CAAC,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create `testID` prop by concatenating parts
|
|
3
|
+
* @returns {string} concatenated identifier or undefined if one part is missing
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export function concatTestID(part1) {
|
|
7
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
8
|
+
args[_key - 1] = arguments[_key];
|
|
9
|
+
}
|
|
10
|
+
return args.reduce((aggr, part) => aggr && part ? `${aggr}.${part}` : undefined, part1 || undefined);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=testID.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["concatTestID","part1","_len","arguments","length","args","Array","_key","reduce","aggr","part","undefined"],"sources":["testID.ts"],"sourcesContent":["/**\n * Create `testID` prop by concatenating parts\n * @returns {string} concatenated identifier or undefined if one part is missing\n */\nexport function concatTestID(part1: string, ...args: Array<string>): string;\nexport function concatTestID(part1: string | undefined, ...args: Array<string | undefined>): string | undefined;\nexport function concatTestID(part1: string | undefined, ...args: Array<string | undefined>): string | undefined {\n return args.reduce((aggr, part) => (aggr && part ? `${aggr}.${part}` : undefined), part1 || undefined);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;;AAGA,OAAO,SAASA,YAAYA,CAACC,KAAyB,EAA0D;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAArDC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,OAAAA,IAAA,WAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAAJF,IAAI,CAAAE,IAAA,QAAAJ,SAAA,CAAAI,IAAA;EAAA;EAC7D,OAAOF,IAAI,CAACG,MAAM,CAAC,CAACC,IAAI,EAAEC,IAAI,KAAMD,IAAI,IAAIC,IAAI,GAAI,GAAED,IAAK,IAAGC,IAAK,EAAC,GAAGC,SAAU,EAAEV,KAAK,IAAIU,SAAS,CAAC;AACxG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { concatTestID } from './testID';
|
|
2
|
+
describe('concatTestID', () => {
|
|
3
|
+
it('concatenates testID parts', () => {
|
|
4
|
+
expect(concatTestID('A')).toBe('A');
|
|
5
|
+
expect(concatTestID('A', 'B')).toBe('A.B');
|
|
6
|
+
expect(concatTestID('A', 'B', 'C')).toBe('A.B.C');
|
|
7
|
+
});
|
|
8
|
+
it('recognizes missing parts', () => {
|
|
9
|
+
expect(concatTestID('')).toBe(undefined);
|
|
10
|
+
expect(concatTestID(undefined)).toBe(undefined);
|
|
11
|
+
expect(concatTestID('', 'something')).toBe(undefined);
|
|
12
|
+
expect(concatTestID(undefined, 'something')).toBe(undefined);
|
|
13
|
+
expect(concatTestID('something', '')).toBe(undefined);
|
|
14
|
+
expect(concatTestID('something', undefined)).toBe(undefined);
|
|
15
|
+
expect(concatTestID('something', '', 'somethingElse')).toBe(undefined);
|
|
16
|
+
expect(concatTestID('something', undefined, 'somethingElse')).toBe(undefined);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=testID.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["concatTestID","describe","it","expect","toBe","undefined"],"sources":["testID.test.ts"],"sourcesContent":["import { concatTestID } from './testID';\n\ndescribe('concatTestID', () => {\n it('concatenates testID parts', () => {\n expect(concatTestID('A')).toBe('A');\n expect(concatTestID('A', 'B')).toBe('A.B');\n expect(concatTestID('A', 'B', 'C')).toBe('A.B.C');\n });\n\n it('recognizes missing parts', () => {\n expect(concatTestID('')).toBe(undefined);\n expect(concatTestID(undefined)).toBe(undefined);\n expect(concatTestID('', 'something')).toBe(undefined);\n expect(concatTestID(undefined, 'something')).toBe(undefined);\n expect(concatTestID('something', '')).toBe(undefined);\n expect(concatTestID('something', undefined)).toBe(undefined);\n expect(concatTestID('something', '', 'somethingElse')).toBe(undefined);\n expect(concatTestID('something', undefined, 'somethingElse')).toBe(undefined);\n });\n});\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,UAAU;AAEvCC,QAAQ,CAAC,cAAc,EAAE,MAAM;EAC7BC,EAAE,CAAC,2BAA2B,EAAE,MAAM;IACpCC,MAAM,CAACH,YAAY,CAAC,GAAG,CAAC,CAAC,CAACI,IAAI,CAAC,GAAG,CAAC;IACnCD,MAAM,CAACH,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAACI,IAAI,CAAC,KAAK,CAAC;IAC1CD,MAAM,CAACH,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAACI,IAAI,CAAC,OAAO,CAAC;EACnD,CAAC,CAAC;EAEFF,EAAE,CAAC,0BAA0B,EAAE,MAAM;IACnCC,MAAM,CAACH,YAAY,CAAC,EAAE,CAAC,CAAC,CAACI,IAAI,CAACC,SAAS,CAAC;IACxCF,MAAM,CAACH,YAAY,CAACK,SAAS,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;IAC/CF,MAAM,CAACH,YAAY,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC,CAACI,IAAI,CAACC,SAAS,CAAC;IACrDF,MAAM,CAACH,YAAY,CAACK,SAAS,EAAE,WAAW,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;IAC5DF,MAAM,CAACH,YAAY,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAACI,IAAI,CAACC,SAAS,CAAC;IACrDF,MAAM,CAACH,YAAY,CAAC,WAAW,EAAEK,SAAS,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;IAC5DF,MAAM,CAACH,YAAY,CAAC,WAAW,EAAE,EAAE,EAAE,eAAe,CAAC,CAAC,CAACI,IAAI,CAACC,SAAS,CAAC;IACtEF,MAAM,CAACH,YAAY,CAAC,WAAW,EAAEK,SAAS,EAAE,eAAe,CAAC,CAAC,CAACD,IAAI,CAACC,SAAS,CAAC;EAC/E,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
export function useMemoAsync(factory, deps, initialValue, fallbackValue) {
|
|
3
|
+
const [value, setValue] = useState(initialValue);
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
const abortCtrl = new AbortController();
|
|
6
|
+
const update = async () => {
|
|
7
|
+
try {
|
|
8
|
+
const result = await factory(abortCtrl.signal);
|
|
9
|
+
if (!abortCtrl.signal.aborted) setValue(result);
|
|
10
|
+
} catch (e) {
|
|
11
|
+
if (!abortCtrl.signal.aborted) setValue(fallbackValue !== null && fallbackValue !== void 0 ? fallbackValue : initialValue);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
update();
|
|
15
|
+
return () => abortCtrl.abort();
|
|
16
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
17
|
+
}, deps);
|
|
18
|
+
return value;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=useMemoAsync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","useState","useMemoAsync","factory","deps","initialValue","fallbackValue","value","setValue","abortCtrl","AbortController","update","result","signal","aborted","e","abort"],"sources":["useMemoAsync.ts"],"sourcesContent":["import { DependencyList, useEffect, useState } from 'react';\n\ninterface FactoryFn<Value> {\n /**\n * Custom factory function\n * @param abortSignal Signaled when the deps change and the factory function need to be called again or when the parent component unmounts\n * @returns Result to be returned from the {@link useMemoAsync}\n */\n (abortSignal: AbortSignal): Value | Promise<Value>;\n}\n\n/**\n * Utility hook that can be used the same way as `useMemo` when the initializer needs to be async\n * @param factory Factory function to produce a value\n * @param deps Hook dependency list (to trigger an update)\n * @param initialValue Initial value before factory finishes producing a value (default = `undefined`)\n * @param fallbackValue Used when factory fails to produce a value (default = `initialValue`)\n * @returns Result from the {@link factory}, {@link initialValue} or {@link fallbackValue}\n */\nexport function useMemoAsync<Value, FallbackValue = Value | undefined>(\n factory: FactoryFn<Value>,\n deps: DependencyList,\n initialValue: FallbackValue,\n fallbackValue?: FallbackValue,\n): Value | FallbackValue;\nexport function useMemoAsync<Value>(factory: FactoryFn<Value>, deps: DependencyList): Value | undefined;\n\nexport function useMemoAsync<Value, FallbackValue = Value | undefined>(\n factory: FactoryFn<Value>,\n deps: DependencyList,\n initialValue?: FallbackValue,\n fallbackValue?: FallbackValue,\n): Value | FallbackValue | undefined {\n const [value, setValue] = useState<Value | FallbackValue | undefined>(initialValue);\n useEffect(() => {\n const abortCtrl = new AbortController();\n const update = async () => {\n try {\n const result = await factory(abortCtrl.signal);\n if (!abortCtrl.signal.aborted) setValue(result);\n } catch (e) {\n if (!abortCtrl.signal.aborted) setValue(fallbackValue ?? initialValue);\n }\n };\n update();\n return () => abortCtrl.abort();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n return value;\n}\n"],"mappings":"AAAA,SAAyBA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AA2B3D,OAAO,SAASC,YAAYA,CAC1BC,OAAyB,EACzBC,IAAoB,EACpBC,YAA4B,EAC5BC,aAA6B,EACM;EACnC,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGP,QAAQ,CAAoCI,YAAY,CAAC;EACnFL,SAAS,CAAC,MAAM;IACd,MAAMS,SAAS,GAAG,IAAIC,eAAe,EAAE;IACvC,MAAMC,MAAM,GAAG,MAAAA,CAAA,KAAY;MACzB,IAAI;QACF,MAAMC,MAAM,GAAG,MAAMT,OAAO,CAACM,SAAS,CAACI,MAAM,CAAC;QAC9C,IAAI,CAACJ,SAAS,CAACI,MAAM,CAACC,OAAO,EAAEN,QAAQ,CAACI,MAAM,CAAC;MACjD,CAAC,CAAC,OAAOG,CAAC,EAAE;QACV,IAAI,CAACN,SAAS,CAACI,MAAM,CAACC,OAAO,EAAEN,QAAQ,CAACF,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAID,YAAY,CAAC;MACxE;IACF,CAAC;IACDM,MAAM,EAAE;IACR,OAAO,MAAMF,SAAS,CAACO,KAAK,EAAE;IAC9B;EACF,CAAC,EAAEZ,IAAI,CAAC;EACR,OAAOG,KAAK;AACd"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { NavigationProp, NavigationState } from '@react-navigation/native';
|
|
3
|
+
/**
|
|
4
|
+
* Global transformer of text for Voice-Over
|
|
5
|
+
* @param {string} text (Visible) text to be announced
|
|
6
|
+
* @returns {string} Text to be read-out by Voice-Over
|
|
7
|
+
*/
|
|
8
|
+
export type AccessibilityTextTransformer = (text: string) => string;
|
|
9
|
+
export declare function setAccessibilityTextTransformer(transformer: AccessibilityTextTransformer | null): void;
|
|
10
|
+
export declare function transformAccessibilityText(text: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Make element accessible after navigation transition is done
|
|
13
|
+
* @returns {boolean} flag to be used as `accessible` prop on the target component(s)
|
|
14
|
+
*/
|
|
15
|
+
export declare function useAccessibleAfterTransition<TNavigationProp extends NavigationProp<Record<string, any>, string, NavigationState<Record<string, any>>, {}, {
|
|
16
|
+
transitionEnd: {};
|
|
17
|
+
}>>(): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Query whether the current screen is NOT transitioning
|
|
20
|
+
* @returns {boolean} flag signifying whether the current screen is NOT in a transition (either entering or leaving)
|
|
21
|
+
*/
|
|
22
|
+
export declare function useIsOutsideTransition<TNavigationProp extends NavigationProp<Record<string, any>, string, NavigationState<Record<string, any>>, {}, {
|
|
23
|
+
transitionStart: {};
|
|
24
|
+
transitionEnd: {};
|
|
25
|
+
}>>(): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Focuses an element for accessibility
|
|
28
|
+
* @param component component ref
|
|
29
|
+
* @note Disabled on android as it is not reliable
|
|
30
|
+
*/
|
|
31
|
+
export declare const focusAccessibility: (component?: React.Component | React.ComponentClass | null) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Focuses an element for accessibility
|
|
34
|
+
* @param {boolean} focused Focusing happens when this changes to `true`
|
|
35
|
+
* @returns reference to be used with the target element
|
|
36
|
+
*/
|
|
37
|
+
export declare const useAccessibilityFocus: <T extends import("react").Component<{}, {}, any> | import("react").ComponentClass<{}, any>>(focused?: boolean) => import("react").RefObject<T>;
|
|
38
|
+
/**
|
|
39
|
+
* Posts a screen-reader/voice-over announcement
|
|
40
|
+
* @param {string} message Announcement message
|
|
41
|
+
* * if `null` passed, it resets the cached announcement and the same message can be re-announced again
|
|
42
|
+
* @returns {boolean} When the announcement is successfully finished (only supported on iOS), false otherwise
|
|
43
|
+
* @note Use {@link setAccessibilityTextTransformer} to apply text transformation for the read-out text
|
|
44
|
+
*/
|
|
45
|
+
export declare const useAccessibilityAnnouncement: (message?: string | null) => boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Posts a screen-reader/voice-over announcement
|
|
48
|
+
* @param {string} message Announcement message
|
|
49
|
+
* @param {boolean} waitForPreviousAnnouncement When a new message appears before the previous announcement if finished:
|
|
50
|
+
* - `true`: postpone the new message to be announced after the previous message(s)
|
|
51
|
+
* - `false` (default): cancel the previous announcement and start the new message
|
|
52
|
+
* @returns {boolean} When all announcements are finished (only supported on iOS), false otherwise
|
|
53
|
+
* @see {@link useAccessibilityAnnouncement} for further info
|
|
54
|
+
*/
|
|
55
|
+
export declare const useAccessibilityAnnouncementCumulative: (message?: string, waitForPreviousAnnouncement?: boolean) => boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { FC, PropsWithChildren } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Adds app support for accessibility focus history
|
|
4
|
+
*/
|
|
5
|
+
export declare const AccessibilityFocusHistoryProvider: FC<PropsWithChildren<{}>>;
|
|
6
|
+
/**
|
|
7
|
+
* Wraps `onPress` handler and `ref` to support automatic accessibility focus on back navigation
|
|
8
|
+
* @note This needs to be used inside {@link AccessibilityFocusHistoryProvider} and navigation context
|
|
9
|
+
*/
|
|
10
|
+
export declare const useAccessibilityFocusHistory: <Component extends React.ComponentClass<any, any> | React.Component<any, {}, any>, OnPress extends (...args: never[]) => void = () => void>(pressHandler: OnPress | undefined, passedRef?: React.Ref<Component> | undefined) => {
|
|
11
|
+
onPress: OnPress;
|
|
12
|
+
ref: React.Ref<Component>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PressableProps, TouchableHighlight as RNTouchableHighlight, TouchableHighlightProps, TouchableOpacity as RNTouchableOpacity, TouchableOpacityProps, TouchableWithoutFeedback as RNTouchableWithoutFeedback, TouchableWithoutFeedbackProps, View } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Wrappers of RN touchable components with accessibilty focus history support
|
|
5
|
+
*/
|
|
6
|
+
export declare const TouchableOpacity: React.ForwardRefExoticComponent<TouchableOpacityProps & React.RefAttributes<RNTouchableOpacity>>;
|
|
7
|
+
export declare const TouchableWithoutFeedback: React.ForwardRefExoticComponent<TouchableWithoutFeedbackProps & React.RefAttributes<RNTouchableWithoutFeedback>>;
|
|
8
|
+
export declare const TouchableHighlight: React.ForwardRefExoticComponent<TouchableHighlightProps & React.RefAttributes<RNTouchableHighlight>>;
|
|
9
|
+
export declare const Pressable: React.ForwardRefExoticComponent<PressableProps & React.RefAttributes<View>>;
|
|
10
|
+
type WrapperRefType<C extends React.ForwardRefExoticComponent<React.RefAttributes<any>>> = C extends React.ForwardRefExoticComponent<React.RefAttributes<infer Ref>> ? Ref : never;
|
|
11
|
+
/**
|
|
12
|
+
* Ref types to be used in forwardRef for the wrappers
|
|
13
|
+
*/
|
|
14
|
+
export type TouchableOpacityRef = WrapperRefType<typeof TouchableOpacity>;
|
|
15
|
+
export type TouchableWithoutFeedbackRef = WrapperRefType<typeof TouchableWithoutFeedback>;
|
|
16
|
+
export type TouchableHighlightRef = WrapperRefType<typeof TouchableHighlight>;
|
|
17
|
+
export type PressableRef = WrapperRefType<typeof Pressable>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import { AccessibilityLanguageFile, SupportedAccessibilityLanguage } from './locale';
|
|
3
|
+
export type AccessibilityLanguageFileEntryKey = keyof AccessibilityLanguageFile;
|
|
4
|
+
type AccessibilityLanguageTranslate = (entryKey: AccessibilityLanguageFileEntryKey, params?: Record<string, string | number>) => string;
|
|
5
|
+
export interface AccessibilityLanguageProviderProps {
|
|
6
|
+
language: SupportedAccessibilityLanguage;
|
|
7
|
+
overrides?: Partial<AccessibilityLanguageFile> | AccessibilityLanguageTranslate;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Adds app support for accessibility language
|
|
11
|
+
* @param {SupportedAccessibilityLanguage} language Currenty selected language of the app
|
|
12
|
+
* @param {Object} overrides _(optional)_ Custom overrides for specific entries
|
|
13
|
+
*/
|
|
14
|
+
export declare const AccessibilityLanguageProvider: FC<PropsWithChildren<AccessibilityLanguageProviderProps>>;
|
|
15
|
+
/**
|
|
16
|
+
* Access accessibility language translations
|
|
17
|
+
* @note This needs to be used inside {@link AccessibilityLanguageProvider} context
|
|
18
|
+
*/
|
|
19
|
+
export declare const useAccessibilityTranslation: () => AccessibilityLanguageTranslate;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AccessibilityTextTransformer, focusAccessibility, setAccessibilityTextTransformer, transformAccessibilityText, useAccessibilityAnnouncement, useAccessibilityAnnouncementCumulative, useAccessibilityFocus, useAccessibleAfterTransition, useIsOutsideTransition } from './accessibility';
|
|
2
|
+
import { AccessibilityFocusHistoryProvider, useAccessibilityFocusHistory } from './accessibilityHistory';
|
|
3
|
+
import { AccessibilityLanguageProvider, AccessibilityLanguageProviderProps } from './accessibilityLanguage';
|
|
4
|
+
import { AccessibilityLanguageFile, SupportedAccessibilityLanguage } from './locale';
|
|
5
|
+
export * from './accessibilityHistoryWrappers';
|
|
6
|
+
export { AccessibilityFocusHistoryProvider, AccessibilityLanguageFile, AccessibilityLanguageProvider, AccessibilityLanguageProviderProps, AccessibilityTextTransformer, focusAccessibility, setAccessibilityTextTransformer, SupportedAccessibilityLanguage, transformAccessibilityText, useAccessibilityAnnouncement, useAccessibilityAnnouncementCumulative, useAccessibilityFocus, useAccessibilityFocusHistory, useAccessibleAfterTransition, useIsOutsideTransition, };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import en from './en.json';
|
|
2
|
+
export declare const defaultLanguageFiles: {
|
|
3
|
+
en: {
|
|
4
|
+
"accessibility.control.combobox.expanded": string;
|
|
5
|
+
"accessibility.control.combobox.tapToSelect": string;
|
|
6
|
+
"accessibility.control.order": string;
|
|
7
|
+
"accessibility.control.progress": string;
|
|
8
|
+
"accessibility.control.checked": string;
|
|
9
|
+
"accessibility.control.unchecked": string;
|
|
10
|
+
"accessibility.control.clear": string;
|
|
11
|
+
"accessibility.control.delete": string;
|
|
12
|
+
"accessibility.control.list.moveDown": string;
|
|
13
|
+
"accessibility.control.list.moveUp": string;
|
|
14
|
+
"accessibility.nav.back": string;
|
|
15
|
+
"accessibility.nav.close": string;
|
|
16
|
+
"accessibility.nav.next": string;
|
|
17
|
+
"accessibility.icon.edit": string;
|
|
18
|
+
"accessibility.icon.add": string;
|
|
19
|
+
"accessibility.icon.filter": string;
|
|
20
|
+
"accessibility.icon.scan": string;
|
|
21
|
+
"accessibility.key.faceId": string;
|
|
22
|
+
"accessibility.key.fingerprint": string;
|
|
23
|
+
};
|
|
24
|
+
de: {
|
|
25
|
+
"accessibility.control.combobox.expanded": string;
|
|
26
|
+
"accessibility.control.combobox.tapToSelect": string;
|
|
27
|
+
"accessibility.control.order": string;
|
|
28
|
+
"accessibility.control.progress": string;
|
|
29
|
+
"accessibility.control.checked": string;
|
|
30
|
+
"accessibility.control.unchecked": string;
|
|
31
|
+
"accessibility.control.clear": string;
|
|
32
|
+
"accessibility.control.delete": string;
|
|
33
|
+
"accessibility.control.list.moveDown": string;
|
|
34
|
+
"accessibility.control.list.moveUp": string;
|
|
35
|
+
"accessibility.nav.back": string;
|
|
36
|
+
"accessibility.nav.close": string;
|
|
37
|
+
"accessibility.nav.next": string;
|
|
38
|
+
"accessibility.icon.edit": string;
|
|
39
|
+
"accessibility.icon.add": string;
|
|
40
|
+
"accessibility.icon.filter": string;
|
|
41
|
+
"accessibility.icon.scan": string;
|
|
42
|
+
"accessibility.key.faceId": string;
|
|
43
|
+
"accessibility.key.fingerprint": string;
|
|
44
|
+
};
|
|
45
|
+
fr: {
|
|
46
|
+
"accessibility.control.combobox.expanded": string;
|
|
47
|
+
"accessibility.control.combobox.tapToSelect": string;
|
|
48
|
+
"accessibility.control.order": string;
|
|
49
|
+
"accessibility.control.progress": string;
|
|
50
|
+
"accessibility.control.checked": string;
|
|
51
|
+
"accessibility.control.unchecked": string;
|
|
52
|
+
"accessibility.control.clear": string;
|
|
53
|
+
"accessibility.control.delete": string;
|
|
54
|
+
"accessibility.control.list.moveDown": string;
|
|
55
|
+
"accessibility.control.list.moveUp": string;
|
|
56
|
+
"accessibility.nav.back": string;
|
|
57
|
+
"accessibility.nav.close": string;
|
|
58
|
+
"accessibility.nav.next": string;
|
|
59
|
+
"accessibility.icon.edit": string;
|
|
60
|
+
"accessibility.icon.add": string;
|
|
61
|
+
"accessibility.icon.filter": string;
|
|
62
|
+
"accessibility.icon.scan": string;
|
|
63
|
+
"accessibility.key.faceId": string;
|
|
64
|
+
"accessibility.key.fingerprint": string;
|
|
65
|
+
};
|
|
66
|
+
it: {
|
|
67
|
+
"accessibility.control.combobox.expanded": string;
|
|
68
|
+
"accessibility.control.combobox.tapToSelect": string;
|
|
69
|
+
"accessibility.control.order": string;
|
|
70
|
+
"accessibility.control.progress": string;
|
|
71
|
+
"accessibility.control.checked": string;
|
|
72
|
+
"accessibility.control.unchecked": string;
|
|
73
|
+
"accessibility.control.clear": string;
|
|
74
|
+
"accessibility.control.delete": string;
|
|
75
|
+
"accessibility.control.list.moveDown": string;
|
|
76
|
+
"accessibility.control.list.moveUp": string;
|
|
77
|
+
"accessibility.nav.back": string;
|
|
78
|
+
"accessibility.nav.close": string;
|
|
79
|
+
"accessibility.nav.next": string;
|
|
80
|
+
"accessibility.icon.edit": string;
|
|
81
|
+
"accessibility.icon.add": string;
|
|
82
|
+
"accessibility.icon.scan": string;
|
|
83
|
+
"accessibility.icon.filter": string;
|
|
84
|
+
"accessibility.key.faceId": string;
|
|
85
|
+
"accessibility.key.fingerprint": string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
export type SupportedAccessibilityLanguage = keyof typeof defaultLanguageFiles;
|
|
89
|
+
export type AccessibilityLanguageFile = typeof en;
|
|
90
|
+
export declare const getAccessibilityLanguageFile: (language: SupportedAccessibilityLanguage, overrides?: Partial<AccessibilityLanguageFile>) => AccessibilityLanguageFile;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FunctionComponent, PropsWithChildren } from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
interface Props {
|
|
4
|
+
contentStyle?: StyleProp<ViewStyle>;
|
|
5
|
+
style?: StyleProp<ViewStyle>;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
testID?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const ActionModal: FunctionComponent<PropsWithChildren<Props>>;
|
|
10
|
+
export default ActionModal;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ViewProps } from 'react-native-svg/lib/typescript/fabric/utils';
|
|
3
|
+
type ActivityIndicatorProps = ViewProps & {
|
|
4
|
+
animate?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const ActivityIndicator: FC<ActivityIndicatorProps>;
|
|
7
|
+
export default ActivityIndicator;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import { ColorValue, ViewProps } from 'react-native';
|
|
3
|
+
export interface BlurViewProps extends ViewProps {
|
|
4
|
+
blurAmount?: number;
|
|
5
|
+
color?: ColorValue;
|
|
6
|
+
darkMode?: boolean;
|
|
7
|
+
blurStyle: 'soft' | 'strong' | 'header';
|
|
8
|
+
}
|
|
9
|
+
declare const BlurView: FC<PropsWithChildren<BlurViewProps>>;
|
|
10
|
+
export default BlurView;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { GhostButtonProps } from '../buttons/ghost-button';
|
|
3
|
+
export declare enum BackButtonIcon {
|
|
4
|
+
Back = "back",
|
|
5
|
+
Close = "close"
|
|
6
|
+
}
|
|
7
|
+
export type BackButtonProps = Omit<GhostButtonProps, 'accessibilityLabel'>;
|
|
8
|
+
declare const BackButton: FC<BackButtonProps>;
|
|
9
|
+
export default BackButton;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TouchableOpacityProps } from 'react-native';
|
|
3
|
+
export declare enum ButtonType {
|
|
4
|
+
Border = "border",
|
|
5
|
+
Primary = "primary",
|
|
6
|
+
Secondary = "secondary",
|
|
7
|
+
SmallTech = "small-tech"
|
|
8
|
+
}
|
|
9
|
+
export interface ButtonProps extends TouchableOpacityProps {
|
|
10
|
+
type?: ButtonType;
|
|
11
|
+
title: string;
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Common button component
|
|
17
|
+
*
|
|
18
|
+
* follows design: https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=419-18389
|
|
19
|
+
*
|
|
20
|
+
* for bordered style just override `borderColor` in style
|
|
21
|
+
*/
|
|
22
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<import("react-native").TouchableOpacity>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export declare enum ConnectivityTransport {
|
|
3
|
+
Internet = "Internet",
|
|
4
|
+
Bluetooth = "Bluetooth",
|
|
5
|
+
All = "All"
|
|
6
|
+
}
|
|
7
|
+
export type ConnectivityButtonProps = {
|
|
8
|
+
available: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onPress?: () => void;
|
|
11
|
+
status?: boolean;
|
|
12
|
+
title?: string;
|
|
13
|
+
transport: ConnectivityTransport;
|
|
14
|
+
testID?: string;
|
|
15
|
+
};
|
|
16
|
+
declare const ConnectivityButton: FC<ConnectivityButtonProps>;
|
|
17
|
+
export default ConnectivityButton;
|