@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,67 @@
|
|
|
1
|
+
import type { ComponentMeta, Story } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { ButtonType } from '../buttons';
|
|
5
|
+
import BackButton from '../buttons/back-button';
|
|
6
|
+
import { LoaderViewState } from './loader';
|
|
7
|
+
import LoadingResultScreen from './loading-result';
|
|
8
|
+
|
|
9
|
+
type Args = {
|
|
10
|
+
label: string;
|
|
11
|
+
state: LoaderViewState;
|
|
12
|
+
withButton1: boolean;
|
|
13
|
+
withButton2: boolean;
|
|
14
|
+
withButton3: boolean;
|
|
15
|
+
withHeader: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const Basic: Story<Args> = ({ label, state, withButton1, withButton2, withButton3, withHeader }) => {
|
|
19
|
+
return (
|
|
20
|
+
<LoadingResultScreen
|
|
21
|
+
button={withButton1 ? { title: 'Button 1' } : undefined}
|
|
22
|
+
secondaryButton={withButton2 ? { type: ButtonType.Secondary, title: 'Button 2' } : undefined}
|
|
23
|
+
tertiaryButton={withButton3 ? { type: ButtonType.Secondary, title: 'Button 3' } : undefined}
|
|
24
|
+
header={
|
|
25
|
+
withHeader
|
|
26
|
+
? {
|
|
27
|
+
leftItem: BackButton,
|
|
28
|
+
title: 'Title',
|
|
29
|
+
}
|
|
30
|
+
: undefined
|
|
31
|
+
}
|
|
32
|
+
loader={{
|
|
33
|
+
animate: true,
|
|
34
|
+
state,
|
|
35
|
+
label,
|
|
36
|
+
}}
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
Basic.args = {
|
|
42
|
+
label: 'Loading...',
|
|
43
|
+
state: LoaderViewState.InProgress,
|
|
44
|
+
withButton1: true,
|
|
45
|
+
withButton2: false,
|
|
46
|
+
withButton3: false,
|
|
47
|
+
withHeader: true,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export { Basic as LoadingResultScreen };
|
|
51
|
+
|
|
52
|
+
export default {
|
|
53
|
+
title: 'component/loader/LoadingResultScreen',
|
|
54
|
+
component: LoadingResultScreen,
|
|
55
|
+
argTypes: {
|
|
56
|
+
state: {
|
|
57
|
+
options: [LoaderViewState.InProgress, LoaderViewState.Success, LoaderViewState.Warning],
|
|
58
|
+
control: { type: 'radio' },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
parameters: {
|
|
62
|
+
design: {
|
|
63
|
+
type: 'figma',
|
|
64
|
+
url: 'https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=444-44894&mode=design&t=YI1oD2BfBie5HcvJ-0',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
} as ComponentMeta<typeof LoadingResultScreen>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { Platform, StyleSheet, View, ViewProps, ViewStyle } from 'react-native';
|
|
3
|
+
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
+
|
|
5
|
+
import { Button, ButtonProps } from '../buttons/button';
|
|
6
|
+
import NavigationHeader, { NavigationHeaderProps } from '../header/navigation-header';
|
|
7
|
+
import Typography from '../text/typography';
|
|
8
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
9
|
+
import LoaderView, { LoaderViewProps } from './loader';
|
|
10
|
+
|
|
11
|
+
export type LoadingResultScreenProps = ViewProps & {
|
|
12
|
+
button?: ButtonProps;
|
|
13
|
+
header?: NavigationHeaderProps;
|
|
14
|
+
loader: LoaderViewProps & {
|
|
15
|
+
label?: string;
|
|
16
|
+
};
|
|
17
|
+
secondaryButton?: ButtonProps;
|
|
18
|
+
tertiaryButton?: ButtonProps;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const LoadingResultScreen: FC<LoadingResultScreenProps> = ({
|
|
22
|
+
button,
|
|
23
|
+
header,
|
|
24
|
+
loader: { label, ...loaderProps },
|
|
25
|
+
secondaryButton: button2,
|
|
26
|
+
style,
|
|
27
|
+
tertiaryButton: button3,
|
|
28
|
+
...viewProps
|
|
29
|
+
}) => {
|
|
30
|
+
const colorScheme = useAppColorScheme();
|
|
31
|
+
const { top } = useSafeAreaInsets();
|
|
32
|
+
|
|
33
|
+
let headerPaddingStyle: ViewStyle | undefined;
|
|
34
|
+
if (Platform.OS === 'android') {
|
|
35
|
+
headerPaddingStyle = {
|
|
36
|
+
paddingTop: top,
|
|
37
|
+
};
|
|
38
|
+
} else if (!header?.modalHandleVisible && Platform.OS === 'ios') {
|
|
39
|
+
headerPaddingStyle = styles.modalHeaderWithoutHandle;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<View style={[styles.container, { backgroundColor: colorScheme.background }, style]} {...viewProps}>
|
|
44
|
+
<View style={[styles.headerWrapper, headerPaddingStyle]}>
|
|
45
|
+
<NavigationHeader {...header} />
|
|
46
|
+
</View>
|
|
47
|
+
<View style={styles.loaderWrapper}>
|
|
48
|
+
<LoaderView {...loaderProps} />
|
|
49
|
+
<Typography align="center" color={colorScheme.text} preset="regular" style={styles.label}>
|
|
50
|
+
{label}
|
|
51
|
+
</Typography>
|
|
52
|
+
</View>
|
|
53
|
+
<SafeAreaView edges={['bottom']} style={styles.buttonWrapper}>
|
|
54
|
+
{button && <Button {...button}>{button.title}</Button>}
|
|
55
|
+
{button2 && <Button {...button2}>{button2.title}</Button>}
|
|
56
|
+
{button3 && <Button {...button3}>{button3.title}</Button>}
|
|
57
|
+
</SafeAreaView>
|
|
58
|
+
</View>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const styles = StyleSheet.create({
|
|
63
|
+
buttonWrapper: {
|
|
64
|
+
gap: 12,
|
|
65
|
+
height: 274,
|
|
66
|
+
justifyContent: 'flex-end',
|
|
67
|
+
padding: 12,
|
|
68
|
+
},
|
|
69
|
+
container: {
|
|
70
|
+
alignItems: 'stretch',
|
|
71
|
+
flex: 1,
|
|
72
|
+
flexDirection: 'column',
|
|
73
|
+
justifyContent: 'space-between',
|
|
74
|
+
},
|
|
75
|
+
headerWrapper: {
|
|
76
|
+
height: 215,
|
|
77
|
+
},
|
|
78
|
+
label: {
|
|
79
|
+
marginHorizontal: 20,
|
|
80
|
+
marginTop: 20,
|
|
81
|
+
},
|
|
82
|
+
loaderWrapper: {
|
|
83
|
+
alignItems: 'center',
|
|
84
|
+
flexDirection: 'column',
|
|
85
|
+
height: 108,
|
|
86
|
+
justifyContent: 'space-between',
|
|
87
|
+
},
|
|
88
|
+
modalHeaderWithoutHandle: {
|
|
89
|
+
paddingTop: 15,
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export default LoadingResultScreen;
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import React, { FunctionComponent, useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
|
+
import { Dimensions, LayoutChangeEvent, Linking, StyleSheet, View, ViewStyle } from 'react-native';
|
|
3
|
+
import { TouchableOpacity } from 'react-native-gesture-handler';
|
|
4
|
+
import Animated, {
|
|
5
|
+
clamp,
|
|
6
|
+
SharedValue,
|
|
7
|
+
useAnimatedStyle,
|
|
8
|
+
useDerivedValue,
|
|
9
|
+
useSharedValue,
|
|
10
|
+
} from 'react-native-reanimated';
|
|
11
|
+
|
|
12
|
+
import { Button, ButtonType } from '../buttons/button';
|
|
13
|
+
import { CopyContentIcon, OpenLinkIcon } from '../icons/nerd-view';
|
|
14
|
+
import Typography from '../text/typography';
|
|
15
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
16
|
+
import { concatTestID } from '../utils/testID';
|
|
17
|
+
|
|
18
|
+
const VALUE_PREVIEW_LENGTH = 80;
|
|
19
|
+
const ICON_HEIGHT = 48;
|
|
20
|
+
const CONTAINER_PADDING = 8;
|
|
21
|
+
|
|
22
|
+
// The onExpand and expandedAttributes props are used to notify other expanded fields
|
|
23
|
+
// that the layout (and thus the scrollOffset / icon position) has changed. This
|
|
24
|
+
// will trigger a view measurement and repositioning of the icon on all expanded fields.
|
|
25
|
+
|
|
26
|
+
export type NerdModeItemProps = {
|
|
27
|
+
attributeKey: string;
|
|
28
|
+
attributeText?: string;
|
|
29
|
+
canBeCopied?: boolean;
|
|
30
|
+
element?: React.ReactElement;
|
|
31
|
+
expandedAttributes?: number;
|
|
32
|
+
highlightedText?: string;
|
|
33
|
+
labels: {
|
|
34
|
+
expand: string;
|
|
35
|
+
collapse: string;
|
|
36
|
+
};
|
|
37
|
+
last?: boolean;
|
|
38
|
+
link?: string;
|
|
39
|
+
onCopyToClipboard: (value: string) => void;
|
|
40
|
+
onExpand?: (expanded: boolean) => void;
|
|
41
|
+
scrollOffset?: SharedValue<number>;
|
|
42
|
+
testID?: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const styles = StyleSheet.create({
|
|
46
|
+
actionIcon: {
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
flex: 0.15,
|
|
49
|
+
height: ICON_HEIGHT,
|
|
50
|
+
justifyContent: 'center',
|
|
51
|
+
},
|
|
52
|
+
actionIconSingleLine: {
|
|
53
|
+
height: 24,
|
|
54
|
+
},
|
|
55
|
+
attributeLabel: {
|
|
56
|
+
marginBottom: 4,
|
|
57
|
+
paddingHorizontal: 6,
|
|
58
|
+
},
|
|
59
|
+
attributeValue: {
|
|
60
|
+
flex: 0.85,
|
|
61
|
+
flexGrow: 1,
|
|
62
|
+
},
|
|
63
|
+
attributeValueContainer: {
|
|
64
|
+
borderRadius: 2,
|
|
65
|
+
borderWidth: 0.2,
|
|
66
|
+
flexDirection: 'row',
|
|
67
|
+
padding: CONTAINER_PADDING,
|
|
68
|
+
},
|
|
69
|
+
container: {
|
|
70
|
+
paddingHorizontal: 20,
|
|
71
|
+
paddingTop: 16,
|
|
72
|
+
},
|
|
73
|
+
expandValueButton: {
|
|
74
|
+
borderRadius: 4,
|
|
75
|
+
borderWidth: 0,
|
|
76
|
+
marginTop: 4,
|
|
77
|
+
},
|
|
78
|
+
lastAttribute: {
|
|
79
|
+
paddingBottom: 30,
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export const ActionIcon: FunctionComponent<{
|
|
84
|
+
copy?: boolean;
|
|
85
|
+
link?: string;
|
|
86
|
+
onCopyToClipboard: (value: string) => void;
|
|
87
|
+
style?: ViewStyle;
|
|
88
|
+
testID?: string;
|
|
89
|
+
value: string;
|
|
90
|
+
}> = ({ value, link, onCopyToClipboard, testID, copy }) => {
|
|
91
|
+
const handleCopy = useCallback(() => {
|
|
92
|
+
onCopyToClipboard(value);
|
|
93
|
+
}, [onCopyToClipboard, value]);
|
|
94
|
+
|
|
95
|
+
const openLink = useCallback(() => {
|
|
96
|
+
if (link) {
|
|
97
|
+
Linking.openURL(link);
|
|
98
|
+
}
|
|
99
|
+
}, [link]);
|
|
100
|
+
|
|
101
|
+
if (copy) {
|
|
102
|
+
return (
|
|
103
|
+
<TouchableOpacity onPress={handleCopy} testID={testID}>
|
|
104
|
+
<CopyContentIcon />
|
|
105
|
+
</TouchableOpacity>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (link) {
|
|
110
|
+
return (
|
|
111
|
+
<TouchableOpacity onPress={openLink} testID={testID}>
|
|
112
|
+
<OpenLinkIcon />
|
|
113
|
+
</TouchableOpacity>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return null;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const TextWithHighlight: FunctionComponent<{
|
|
121
|
+
highlightedText: string;
|
|
122
|
+
onLayout?: (event: LayoutChangeEvent) => void;
|
|
123
|
+
testID: string;
|
|
124
|
+
text: string;
|
|
125
|
+
}> = ({ highlightedText, onLayout, testID, text }) => {
|
|
126
|
+
const colorScheme = useAppColorScheme();
|
|
127
|
+
return (
|
|
128
|
+
<Typography
|
|
129
|
+
color={colorScheme.white}
|
|
130
|
+
onLayout={onLayout}
|
|
131
|
+
preset="s/code"
|
|
132
|
+
style={styles.attributeValue}
|
|
133
|
+
testID={testID}>
|
|
134
|
+
<Typography color={colorScheme.nerdView.codeHighlightText} preset="s/code">
|
|
135
|
+
{highlightedText}
|
|
136
|
+
</Typography>
|
|
137
|
+
{text}
|
|
138
|
+
</Typography>
|
|
139
|
+
);
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
const NerdModeItem: FunctionComponent<NerdModeItemProps> = ({
|
|
143
|
+
highlightedText = '',
|
|
144
|
+
attributeText = '',
|
|
145
|
+
attributeKey,
|
|
146
|
+
labels,
|
|
147
|
+
link,
|
|
148
|
+
canBeCopied,
|
|
149
|
+
onCopyToClipboard,
|
|
150
|
+
onExpand,
|
|
151
|
+
expandedAttributes,
|
|
152
|
+
last = false,
|
|
153
|
+
scrollOffset,
|
|
154
|
+
element,
|
|
155
|
+
testID,
|
|
156
|
+
}) => {
|
|
157
|
+
const colorScheme = useAppColorScheme();
|
|
158
|
+
const valueViewRef = React.useRef<View>(null);
|
|
159
|
+
const [isSingleLine, setIsSingleLine] = useState<boolean>();
|
|
160
|
+
|
|
161
|
+
const expandedView = useSharedValue({
|
|
162
|
+
expandedAtOffset: 0,
|
|
163
|
+
viewHeight: 0,
|
|
164
|
+
viewStart: 0,
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
const expandable = attributeText.length > VALUE_PREVIEW_LENGTH;
|
|
168
|
+
const [expanded, setExpanded] = useState(!expandable);
|
|
169
|
+
|
|
170
|
+
const screenMiddle = useMemo(() => Dimensions.get('screen').height / 2, []);
|
|
171
|
+
|
|
172
|
+
const iconTopPosition = useDerivedValue(() => {
|
|
173
|
+
if (isSingleLine === undefined) {
|
|
174
|
+
return 0;
|
|
175
|
+
}
|
|
176
|
+
if (!expanded || !expandable || !scrollOffset || isSingleLine) {
|
|
177
|
+
const iconHeight = isSingleLine ? 0 : ICON_HEIGHT;
|
|
178
|
+
return expandedView.value.viewHeight / 2 - iconHeight / 2;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const viewEnd = expandedView.value.viewStart + expandedView.value.viewHeight;
|
|
182
|
+
let zeroedOffset = scrollOffset.value - expandedView.value.expandedAtOffset;
|
|
183
|
+
|
|
184
|
+
if (expandedView.value.viewStart > screenMiddle) {
|
|
185
|
+
zeroedOffset = zeroedOffset - (expandedView.value.viewStart - screenMiddle + ICON_HEIGHT / 2);
|
|
186
|
+
} else {
|
|
187
|
+
if (viewEnd < screenMiddle + ICON_HEIGHT) {
|
|
188
|
+
zeroedOffset = zeroedOffset + (screenMiddle - expandedView.value.viewStart - ICON_HEIGHT / 2);
|
|
189
|
+
} else if (expandedView.value.viewStart < screenMiddle && viewEnd > screenMiddle) {
|
|
190
|
+
zeroedOffset = zeroedOffset + (screenMiddle - expandedView.value.viewStart - ICON_HEIGHT / 2);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return clamp(zeroedOffset, 0, expandedView.value.viewHeight - ICON_HEIGHT - 8);
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
const iconStyle = useAnimatedStyle(() => {
|
|
198
|
+
return {
|
|
199
|
+
transform: [
|
|
200
|
+
{
|
|
201
|
+
translateY: iconTopPosition.value,
|
|
202
|
+
},
|
|
203
|
+
],
|
|
204
|
+
};
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
const previewText = expanded ? attributeText : attributeText.slice(0, VALUE_PREVIEW_LENGTH) + '...';
|
|
208
|
+
|
|
209
|
+
useEffect(() => {
|
|
210
|
+
if (!scrollOffset || isSingleLine === undefined) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
setTimeout(() => {
|
|
215
|
+
valueViewRef.current?.measure((x, y, w, h, px, py) => {
|
|
216
|
+
expandedView.value = {
|
|
217
|
+
expandedAtOffset: isSingleLine ? 0 : scrollOffset.value,
|
|
218
|
+
viewHeight: isSingleLine ? 0 : h - 2 * CONTAINER_PADDING,
|
|
219
|
+
viewStart: py,
|
|
220
|
+
};
|
|
221
|
+
});
|
|
222
|
+
}, 0);
|
|
223
|
+
// We only recompute when any attribute is expanded
|
|
224
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
225
|
+
}, [expandedAttributes, isSingleLine]);
|
|
226
|
+
|
|
227
|
+
const onTextLayout = useCallback((event: LayoutChangeEvent) => {
|
|
228
|
+
const { height } = event.nativeEvent.layout;
|
|
229
|
+
setIsSingleLine(height <= 24);
|
|
230
|
+
}, []);
|
|
231
|
+
|
|
232
|
+
return (
|
|
233
|
+
<View
|
|
234
|
+
style={[
|
|
235
|
+
styles.container,
|
|
236
|
+
{ backgroundColor: colorScheme.nerdView.attributeSectionBackground },
|
|
237
|
+
last ? styles.lastAttribute : {},
|
|
238
|
+
]}
|
|
239
|
+
testID={testID}>
|
|
240
|
+
<Typography
|
|
241
|
+
color={colorScheme.nerdView.attributeLabel}
|
|
242
|
+
preset="s/code"
|
|
243
|
+
style={styles.attributeLabel}
|
|
244
|
+
testID={concatTestID(testID, 'attributeLabel')}>
|
|
245
|
+
{attributeKey}
|
|
246
|
+
</Typography>
|
|
247
|
+
<View
|
|
248
|
+
ref={valueViewRef}
|
|
249
|
+
style={[
|
|
250
|
+
styles.attributeValueContainer,
|
|
251
|
+
{
|
|
252
|
+
backgroundColor: colorScheme.nerdView.attributeValueBackground,
|
|
253
|
+
borderColor: colorScheme.nerdView.attributeValueBorder,
|
|
254
|
+
},
|
|
255
|
+
]}>
|
|
256
|
+
{element ? (
|
|
257
|
+
element
|
|
258
|
+
) : (
|
|
259
|
+
<TextWithHighlight
|
|
260
|
+
highlightedText={highlightedText}
|
|
261
|
+
onLayout={onTextLayout}
|
|
262
|
+
testID={concatTestID(testID, 'attributeValue')!}
|
|
263
|
+
text={previewText}
|
|
264
|
+
/>
|
|
265
|
+
)}
|
|
266
|
+
{(canBeCopied || link) && isSingleLine !== undefined ? (
|
|
267
|
+
<Animated.View style={[styles.actionIcon, isSingleLine ? styles.actionIconSingleLine : undefined, iconStyle]}>
|
|
268
|
+
{
|
|
269
|
+
<ActionIcon
|
|
270
|
+
copy={canBeCopied}
|
|
271
|
+
link={link}
|
|
272
|
+
onCopyToClipboard={onCopyToClipboard}
|
|
273
|
+
testID={concatTestID(testID, 'actionIcon')}
|
|
274
|
+
value={`${highlightedText}${attributeText}`}
|
|
275
|
+
/>
|
|
276
|
+
}
|
|
277
|
+
</Animated.View>
|
|
278
|
+
) : null}
|
|
279
|
+
</View>
|
|
280
|
+
{expandable ? (
|
|
281
|
+
<Button
|
|
282
|
+
onPress={() => {
|
|
283
|
+
onExpand && onExpand(!expanded);
|
|
284
|
+
setExpanded(!expanded);
|
|
285
|
+
}}
|
|
286
|
+
style={styles.expandValueButton}
|
|
287
|
+
testID={concatTestID(testID, 'expandValueButton')}
|
|
288
|
+
title={expanded ? labels.collapse : labels.expand}
|
|
289
|
+
type={ButtonType.SmallTech}
|
|
290
|
+
/>
|
|
291
|
+
) : null}
|
|
292
|
+
</View>
|
|
293
|
+
);
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
export default NerdModeItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module '@react-native/normalize-color';
|
package/src/pin/index.ts
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
2
|
+
import { LayoutChangeEvent, LayoutRectangle, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { TouchableOpacity, TouchableOpacityRef } from '../accessibility';
|
|
5
|
+
import { useAccessibilityTranslation } from '../accessibility/accessibilityLanguage';
|
|
6
|
+
import { FaceIDIcon, FingerprintIcon, KeypadBackspaceIcon, KeypadClearIcon } from '../icons/keypad';
|
|
7
|
+
import { Typography } from '../text';
|
|
8
|
+
import { useAppColorScheme } from '../theme';
|
|
9
|
+
import { concatTestID } from '../utils/testID';
|
|
10
|
+
|
|
11
|
+
interface DigitKeyProps {
|
|
12
|
+
testID: string | undefined;
|
|
13
|
+
digit: number;
|
|
14
|
+
onPress?: (digit: number) => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const DigitKey = React.forwardRef<TouchableOpacityRef, DigitKeyProps>(({ onPress, testID, digit }, ref) => {
|
|
18
|
+
const colorScheme = useAppColorScheme();
|
|
19
|
+
return (
|
|
20
|
+
<TouchableOpacity
|
|
21
|
+
testID={concatTestID(testID, String(digit))}
|
|
22
|
+
ref={ref}
|
|
23
|
+
accessibilityRole="button"
|
|
24
|
+
style={[styles.key, { backgroundColor: colorScheme.background }]}
|
|
25
|
+
disabled={!onPress}
|
|
26
|
+
onPress={() => onPress?.(digit)}>
|
|
27
|
+
<Typography maxFontSizeMultiplier={1.5} color={colorScheme.text} preset="xl">
|
|
28
|
+
{digit}
|
|
29
|
+
</Typography>
|
|
30
|
+
</TouchableOpacity>
|
|
31
|
+
);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
DigitKey.displayName = 'DigitKey';
|
|
35
|
+
|
|
36
|
+
export enum Biometry {
|
|
37
|
+
FaceID = 'faceID',
|
|
38
|
+
Other = 'other',
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface KeypadProps {
|
|
42
|
+
testID?: string;
|
|
43
|
+
biometry?: Biometry | null;
|
|
44
|
+
onBiometricPress?: () => void;
|
|
45
|
+
onPressDigit?: (digit: number) => void;
|
|
46
|
+
onPressDelete?: () => void;
|
|
47
|
+
style?: StyleProp<ViewStyle>;
|
|
48
|
+
onDeleteAll?: () => void;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const MIN_HEIGHT = 360;
|
|
52
|
+
const MIN_WIDTH = 264;
|
|
53
|
+
const KEY_SIZE = 72;
|
|
54
|
+
|
|
55
|
+
export const Keypad = React.forwardRef<TouchableOpacityRef, KeypadProps>(
|
|
56
|
+
({ testID, onPressDigit, onPressDelete, biometry, onBiometricPress, style, onDeleteAll }, ref) => {
|
|
57
|
+
const t = useAccessibilityTranslation();
|
|
58
|
+
const colorScheme = useAppColorScheme();
|
|
59
|
+
|
|
60
|
+
const [layout, setLayout] = useState<LayoutRectangle>();
|
|
61
|
+
const onLayout = useCallback((event: LayoutChangeEvent) => setLayout(event.nativeEvent.layout), []);
|
|
62
|
+
|
|
63
|
+
const { width, height } = useMemo(() => {
|
|
64
|
+
if (!layout) {
|
|
65
|
+
return {};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const RATIO = MIN_WIDTH / MIN_HEIGHT;
|
|
69
|
+
if (layout.width > layout.height * RATIO) {
|
|
70
|
+
return { height: layout.height, width: layout.height * RATIO };
|
|
71
|
+
} else {
|
|
72
|
+
return { width: layout.width, height: layout.width / RATIO };
|
|
73
|
+
}
|
|
74
|
+
}, [layout]);
|
|
75
|
+
|
|
76
|
+
const gap = width ? (width - 3 * KEY_SIZE) / 4 : undefined;
|
|
77
|
+
const lineStyles = [styles.line, { width, marginBottom: gap }];
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<View testID={testID} style={[styles.cover, style]} onLayout={onLayout}>
|
|
81
|
+
<View style={{ height }}>
|
|
82
|
+
<View style={lineStyles}>
|
|
83
|
+
<DigitKey testID={testID} ref={ref} digit={1} onPress={onPressDigit} />
|
|
84
|
+
<DigitKey testID={testID} digit={2} onPress={onPressDigit} />
|
|
85
|
+
<DigitKey testID={testID} digit={3} onPress={onPressDigit} />
|
|
86
|
+
</View>
|
|
87
|
+
<View style={lineStyles}>
|
|
88
|
+
<DigitKey testID={testID} digit={4} onPress={onPressDigit} />
|
|
89
|
+
<DigitKey testID={testID} digit={5} onPress={onPressDigit} />
|
|
90
|
+
<DigitKey testID={testID} digit={6} onPress={onPressDigit} />
|
|
91
|
+
</View>
|
|
92
|
+
<View style={lineStyles}>
|
|
93
|
+
<DigitKey testID={testID} digit={7} onPress={onPressDigit} />
|
|
94
|
+
<DigitKey testID={testID} digit={8} onPress={onPressDigit} />
|
|
95
|
+
<DigitKey testID={testID} digit={9} onPress={onPressDigit} />
|
|
96
|
+
</View>
|
|
97
|
+
<View style={lineStyles}>
|
|
98
|
+
<TouchableOpacity
|
|
99
|
+
testID={concatTestID(testID, 'delete-all')}
|
|
100
|
+
accessibilityRole="button"
|
|
101
|
+
accessibilityLabel={t('accessibility.control.clear')}
|
|
102
|
+
style={styles.key}
|
|
103
|
+
disabled={!onDeleteAll}
|
|
104
|
+
onPress={onDeleteAll}>
|
|
105
|
+
{onDeleteAll ? <KeypadClearIcon color={colorScheme.text} /> : null}
|
|
106
|
+
</TouchableOpacity>
|
|
107
|
+
<DigitKey testID={testID} digit={0} onPress={onPressDigit} />
|
|
108
|
+
{biometry ? (
|
|
109
|
+
<TouchableOpacity
|
|
110
|
+
testID={concatTestID(testID, 'biometry')}
|
|
111
|
+
accessibilityRole="button"
|
|
112
|
+
accessibilityLabel={t(
|
|
113
|
+
biometry === Biometry.FaceID ? 'accessibility.key.faceId' : 'accessibility.key.fingerprint',
|
|
114
|
+
)}
|
|
115
|
+
style={styles.key}
|
|
116
|
+
disabled={!onBiometricPress}
|
|
117
|
+
onPress={onBiometricPress}>
|
|
118
|
+
{biometry === Biometry.FaceID ? (
|
|
119
|
+
<FaceIDIcon color={colorScheme.text} />
|
|
120
|
+
) : (
|
|
121
|
+
<FingerprintIcon color={colorScheme.text} />
|
|
122
|
+
)}
|
|
123
|
+
</TouchableOpacity>
|
|
124
|
+
) : (
|
|
125
|
+
<TouchableOpacity
|
|
126
|
+
testID={concatTestID(testID, 'delete')}
|
|
127
|
+
accessibilityRole="button"
|
|
128
|
+
accessibilityLabel={t('accessibility.control.delete')}
|
|
129
|
+
style={styles.key}
|
|
130
|
+
disabled={!onPressDelete}
|
|
131
|
+
onPress={onPressDelete}>
|
|
132
|
+
{onPressDelete ? <KeypadBackspaceIcon color={colorScheme.text} /> : null}
|
|
133
|
+
</TouchableOpacity>
|
|
134
|
+
)}
|
|
135
|
+
</View>
|
|
136
|
+
</View>
|
|
137
|
+
</View>
|
|
138
|
+
);
|
|
139
|
+
},
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
Keypad.displayName = 'Keypad';
|
|
143
|
+
|
|
144
|
+
const styles = StyleSheet.create({
|
|
145
|
+
cover: {
|
|
146
|
+
alignItems: 'center',
|
|
147
|
+
flex: 1,
|
|
148
|
+
justifyContent: 'center',
|
|
149
|
+
maxHeight: 2 * MIN_HEIGHT,
|
|
150
|
+
maxWidth: 2 * MIN_WIDTH,
|
|
151
|
+
minHeight: MIN_HEIGHT,
|
|
152
|
+
minWidth: MIN_WIDTH,
|
|
153
|
+
width: '100%',
|
|
154
|
+
},
|
|
155
|
+
key: {
|
|
156
|
+
alignItems: 'center',
|
|
157
|
+
borderRadius: KEY_SIZE / 2,
|
|
158
|
+
height: KEY_SIZE,
|
|
159
|
+
justifyContent: 'center',
|
|
160
|
+
width: KEY_SIZE,
|
|
161
|
+
},
|
|
162
|
+
line: {
|
|
163
|
+
flexDirection: 'row',
|
|
164
|
+
justifyContent: 'space-evenly',
|
|
165
|
+
},
|
|
166
|
+
});
|