@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,37 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import React, { useEffect } from 'react';
|
|
3
|
+
import { useCameraPermission } from 'react-native-vision-camera';
|
|
4
|
+
|
|
5
|
+
import QRCodeScannerScreen from './qr-code-scanner-screen';
|
|
6
|
+
|
|
7
|
+
const Basic: ComponentStory<typeof QRCodeScannerScreen> = (args) => {
|
|
8
|
+
const { hasPermission, requestPermission } = useCameraPermission();
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (!hasPermission) {
|
|
11
|
+
requestPermission();
|
|
12
|
+
}
|
|
13
|
+
}, [hasPermission, requestPermission]);
|
|
14
|
+
|
|
15
|
+
return <QRCodeScannerScreen {...args} />;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
Basic.args = {
|
|
19
|
+
title: 'Scan QR Code to connect.',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { Basic as QRCodeScannerScreen };
|
|
23
|
+
|
|
24
|
+
export default {
|
|
25
|
+
title: 'screen/QR Code Scanner Screen',
|
|
26
|
+
component: QRCodeScannerScreen,
|
|
27
|
+
parameters: {
|
|
28
|
+
noSafeArea: true,
|
|
29
|
+
design: {
|
|
30
|
+
type: 'figma',
|
|
31
|
+
url: 'https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=651%3A22601&mode=design&t=NuPAMUrC62C0azQ4-1',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
argTypes: {
|
|
35
|
+
onQRCodeRead: { action: 'onQRCodeRead' },
|
|
36
|
+
},
|
|
37
|
+
} as ComponentMeta<typeof QRCodeScannerScreen>;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import React, { FunctionComponent, memo, ReactElement, useMemo } from 'react';
|
|
2
|
+
import { Dimensions, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
|
|
3
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
+
import { useCameraDevice } from 'react-native-vision-camera';
|
|
5
|
+
|
|
6
|
+
import { useAccessibilityTranslation } from '../accessibility/accessibilityLanguage';
|
|
7
|
+
import BlurView from '../blur/blur-view';
|
|
8
|
+
import { GhostButton } from '../buttons';
|
|
9
|
+
import CameraOverlay from '../camera/camera-overlay';
|
|
10
|
+
import QRCodeScanner, { QRCodeScannerProps } from '../camera/qr-code-scanner';
|
|
11
|
+
import { CloseIcon } from '../icons';
|
|
12
|
+
import { Typography } from '../text';
|
|
13
|
+
import { useAppColorScheme } from '../theme';
|
|
14
|
+
import { ContrastingStatusBar } from '../utils';
|
|
15
|
+
import { colorWithAlphaComponent } from '../utils/color';
|
|
16
|
+
|
|
17
|
+
export interface QRCodeScannerScreenProps {
|
|
18
|
+
codeTypes?: QRCodeScannerProps['codeTypes'];
|
|
19
|
+
footer?: React.ComponentType<any> | React.ReactElement;
|
|
20
|
+
onQRCodeRead: QRCodeScannerProps['onQRCodeRead'];
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
overlayStyle?: StyleProp<ViewStyle>;
|
|
23
|
+
noCameraView?: JSX.Element;
|
|
24
|
+
title: ReactElement | string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const QRCodeScannerScreen: FunctionComponent<QRCodeScannerScreenProps> = ({
|
|
28
|
+
codeTypes,
|
|
29
|
+
footer,
|
|
30
|
+
onQRCodeRead,
|
|
31
|
+
onClose,
|
|
32
|
+
overlayStyle,
|
|
33
|
+
noCameraView = null,
|
|
34
|
+
title,
|
|
35
|
+
}) => {
|
|
36
|
+
const t = useAccessibilityTranslation();
|
|
37
|
+
const insets = useSafeAreaInsets();
|
|
38
|
+
const colorScheme = useAppColorScheme();
|
|
39
|
+
|
|
40
|
+
const footerView: React.ReactElement | undefined = useMemo(() => {
|
|
41
|
+
if (!footer) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
if (React.isValidElement(footer)) {
|
|
45
|
+
return footer;
|
|
46
|
+
} else {
|
|
47
|
+
const FooterComponent = footer as React.ComponentType<any>;
|
|
48
|
+
return <FooterComponent />;
|
|
49
|
+
}
|
|
50
|
+
}, [footer]);
|
|
51
|
+
|
|
52
|
+
const minBottomBlurViewHeight = Dimensions.get('window').height * 0.15;
|
|
53
|
+
|
|
54
|
+
const device = useCameraDevice('back');
|
|
55
|
+
if (!device) {
|
|
56
|
+
return noCameraView;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<View style={styles.container}>
|
|
61
|
+
<QRCodeScanner
|
|
62
|
+
cameraOverlay={<CameraOverlay style={overlayStyle} />}
|
|
63
|
+
codeTypes={codeTypes}
|
|
64
|
+
onQRCodeRead={onQRCodeRead}
|
|
65
|
+
style={StyleSheet.absoluteFill}
|
|
66
|
+
/>
|
|
67
|
+
<ContrastingStatusBar backgroundColor={colorScheme.black} />
|
|
68
|
+
<BlurView
|
|
69
|
+
darkMode={true}
|
|
70
|
+
blurStyle="soft"
|
|
71
|
+
style={[styles.topBlurView, { backgroundColor: colorWithAlphaComponent(colorScheme.black, 0.5) }]}>
|
|
72
|
+
<View style={[styles.headerSection, { top: insets.top }]}>
|
|
73
|
+
<GhostButton
|
|
74
|
+
icon={<CloseIcon color={colorScheme.white} />}
|
|
75
|
+
onPress={onClose}
|
|
76
|
+
accessibilityLabel={t('accessibility.nav.close')}
|
|
77
|
+
/>
|
|
78
|
+
</View>
|
|
79
|
+
</BlurView>
|
|
80
|
+
<BlurView
|
|
81
|
+
darkMode={true}
|
|
82
|
+
blurStyle="soft"
|
|
83
|
+
style={[
|
|
84
|
+
styles.bottomBlurView,
|
|
85
|
+
{
|
|
86
|
+
backgroundColor: colorWithAlphaComponent(colorScheme.black, 0.5),
|
|
87
|
+
minHeight: minBottomBlurViewHeight,
|
|
88
|
+
paddingBottom: Math.max(insets.bottom, 32),
|
|
89
|
+
},
|
|
90
|
+
]}>
|
|
91
|
+
<Typography align="center" style={styles.title} color={colorScheme.white}>
|
|
92
|
+
{title}
|
|
93
|
+
</Typography>
|
|
94
|
+
{footerView}
|
|
95
|
+
</BlurView>
|
|
96
|
+
</View>
|
|
97
|
+
);
|
|
98
|
+
};
|
|
99
|
+
const styles = StyleSheet.create({
|
|
100
|
+
bottomBlurView: {
|
|
101
|
+
bottom: 0,
|
|
102
|
+
position: 'absolute',
|
|
103
|
+
width: '100%',
|
|
104
|
+
},
|
|
105
|
+
container: {
|
|
106
|
+
flex: 1,
|
|
107
|
+
},
|
|
108
|
+
headerSection: {
|
|
109
|
+
paddingHorizontal: 22,
|
|
110
|
+
paddingTop: 16,
|
|
111
|
+
position: 'absolute',
|
|
112
|
+
},
|
|
113
|
+
title: {
|
|
114
|
+
marginTop: 32,
|
|
115
|
+
},
|
|
116
|
+
topBlurView: {
|
|
117
|
+
height: '15%',
|
|
118
|
+
position: 'absolute',
|
|
119
|
+
top: 0,
|
|
120
|
+
width: '100%',
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
export default memo(QRCodeScannerScreen);
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React, { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import { Platform, ScrollView, ScrollViewProps, StyleSheet, View, ViewProps, ViewStyle } from 'react-native';
|
|
3
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
+
|
|
5
|
+
import NavigationHeader, { NavigationHeaderProps } from '../header/navigation-header';
|
|
6
|
+
import ListTitleHeader from '../list/list-title-header';
|
|
7
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
8
|
+
import { useOnScrollHeaderState } from '../utils/hooks/header/on-scroll-header-state';
|
|
9
|
+
import { useListContentInset } from '../utils/hooks/list/list-content-inset';
|
|
10
|
+
import { concatTestID } from '../utils/testID';
|
|
11
|
+
|
|
12
|
+
export type ScrollViewScreenProps = ViewProps & {
|
|
13
|
+
header: Omit<NavigationHeaderProps, 'animate' | 'blurred' | 'style' | 'title' | 'titleVisible'> & {
|
|
14
|
+
static?: boolean;
|
|
15
|
+
title: string;
|
|
16
|
+
};
|
|
17
|
+
modalPresentation?: boolean;
|
|
18
|
+
scrollView?: Omit<ScrollViewProps, 'onScroll'>;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const ScrollViewScreen: FC<PropsWithChildren<ScrollViewScreenProps>> = ({
|
|
22
|
+
children,
|
|
23
|
+
header,
|
|
24
|
+
modalPresentation,
|
|
25
|
+
scrollView,
|
|
26
|
+
style,
|
|
27
|
+
testID,
|
|
28
|
+
...viewProps
|
|
29
|
+
}) => {
|
|
30
|
+
const colorScheme = useAppColorScheme();
|
|
31
|
+
const { top } = useSafeAreaInsets();
|
|
32
|
+
const contentInsetsStyle = useListContentInset({
|
|
33
|
+
additionalBottomPadding: 24,
|
|
34
|
+
headerHeight: modalPresentation && Platform.OS === 'ios' ? 63 : 48,
|
|
35
|
+
modalPresentation,
|
|
36
|
+
});
|
|
37
|
+
const { titleVisible, onScroll } = useOnScrollHeaderState();
|
|
38
|
+
const { contentContainerStyle, ...scrollViewProps } = scrollView ?? {};
|
|
39
|
+
|
|
40
|
+
let headerPaddingStyle: ViewStyle | undefined;
|
|
41
|
+
if (!modalPresentation || Platform.OS === 'android') {
|
|
42
|
+
headerPaddingStyle = {
|
|
43
|
+
paddingTop: top,
|
|
44
|
+
};
|
|
45
|
+
} else if (modalPresentation && !header.modalHandleVisible && Platform.OS === 'ios') {
|
|
46
|
+
headerPaddingStyle = styles.modalHeaderWithoutHandle;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<View style={[styles.container, { backgroundColor: colorScheme.background }, style]} testID={testID} {...viewProps}>
|
|
51
|
+
<ScrollView
|
|
52
|
+
contentContainerStyle={[styles.contentContainer, contentInsetsStyle, contentContainerStyle]}
|
|
53
|
+
onScroll={onScroll}
|
|
54
|
+
scrollEventThrottle={100}
|
|
55
|
+
{...scrollViewProps}>
|
|
56
|
+
<View style={styles.content} testID={concatTestID(testID, 'content')}>
|
|
57
|
+
{!header.static && <ListTitleHeader title={header.title} />}
|
|
58
|
+
{children}
|
|
59
|
+
</View>
|
|
60
|
+
</ScrollView>
|
|
61
|
+
<NavigationHeader
|
|
62
|
+
animate
|
|
63
|
+
blurred
|
|
64
|
+
style={[styles.header, headerPaddingStyle]}
|
|
65
|
+
titleVisible={header.static || titleVisible}
|
|
66
|
+
{...header}
|
|
67
|
+
/>
|
|
68
|
+
</View>
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const styles = StyleSheet.create({
|
|
73
|
+
container: {
|
|
74
|
+
flex: 1,
|
|
75
|
+
},
|
|
76
|
+
content: {
|
|
77
|
+
flex: 1,
|
|
78
|
+
},
|
|
79
|
+
contentContainer: {
|
|
80
|
+
flexGrow: 1,
|
|
81
|
+
},
|
|
82
|
+
header: {
|
|
83
|
+
position: 'absolute',
|
|
84
|
+
width: '100%',
|
|
85
|
+
},
|
|
86
|
+
modalHeaderWithoutHandle: {
|
|
87
|
+
paddingTop: 15,
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
export default ScrollViewScreen;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SectionList, SectionListProps, StyleSheet, View, ViewProps } from 'react-native';
|
|
3
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
+
|
|
5
|
+
import NavigationHeader, { NavigationHeaderProps } from '../header/navigation-header';
|
|
6
|
+
import ListTitleHeader from '../list/list-title-header';
|
|
7
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
8
|
+
import { useOnScrollHeaderState } from '../utils/hooks/header/on-scroll-header-state';
|
|
9
|
+
import { useListContentInset } from '../utils/hooks/list/list-content-inset';
|
|
10
|
+
|
|
11
|
+
export type SectionListScreenProps<ItemT, SectionT> = ViewProps & {
|
|
12
|
+
header: Omit<NavigationHeaderProps, 'animate' | 'blurred' | 'style' | 'title' | 'titleVisible'> & {
|
|
13
|
+
static?: boolean;
|
|
14
|
+
title: string;
|
|
15
|
+
};
|
|
16
|
+
list: Omit<SectionListProps<ItemT, SectionT>, 'ListHeaderComponent' | 'onScroll'>;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const SectionListScreen = <ItemT, SectionT>({
|
|
20
|
+
header,
|
|
21
|
+
list: { contentContainerStyle, stickySectionHeadersEnabled, ...listProps },
|
|
22
|
+
style,
|
|
23
|
+
...viewProps
|
|
24
|
+
}: SectionListScreenProps<ItemT, SectionT>) => {
|
|
25
|
+
const colorScheme = useAppColorScheme();
|
|
26
|
+
const safeAreaInsets = useSafeAreaInsets();
|
|
27
|
+
const contentInsetsStyle = useListContentInset();
|
|
28
|
+
const { titleVisible, onScroll } = useOnScrollHeaderState();
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<View style={[styles.container, { backgroundColor: colorScheme.background }, style]} {...viewProps}>
|
|
32
|
+
<SectionList<ItemT, SectionT>
|
|
33
|
+
ListHeaderComponent={!header.static ? <ListTitleHeader title={header.title} /> : undefined}
|
|
34
|
+
contentContainerStyle={[contentInsetsStyle, contentContainerStyle]}
|
|
35
|
+
onScroll={onScroll}
|
|
36
|
+
scrollEventThrottle={100}
|
|
37
|
+
stickySectionHeadersEnabled={stickySectionHeadersEnabled ?? false}
|
|
38
|
+
{...listProps}
|
|
39
|
+
/>
|
|
40
|
+
<NavigationHeader
|
|
41
|
+
animate
|
|
42
|
+
blurred
|
|
43
|
+
style={[styles.header, { paddingTop: safeAreaInsets.top }]}
|
|
44
|
+
titleVisible={header.static || titleVisible}
|
|
45
|
+
{...header}
|
|
46
|
+
/>
|
|
47
|
+
</View>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const styles = StyleSheet.create({
|
|
52
|
+
container: {
|
|
53
|
+
flex: 1,
|
|
54
|
+
},
|
|
55
|
+
header: {
|
|
56
|
+
position: 'absolute',
|
|
57
|
+
width: '100%',
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
export default SectionListScreen;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React, { ReactNode, useEffect, useState } from 'react';
|
|
2
|
+
import { Animated, StyleSheet, ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import SearchBar, { SearchBarProps } from './search-bar';
|
|
5
|
+
|
|
6
|
+
export type AnimatedSearchBarProps = {
|
|
7
|
+
collapsed: boolean;
|
|
8
|
+
rightButton?: ReactNode;
|
|
9
|
+
rightButtonAlwaysVisible?: boolean;
|
|
10
|
+
searchBarProps: SearchBarProps;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
// Animated search bar, according to
|
|
14
|
+
// https://www.figma.com/design/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=1143-40433&m=dev
|
|
15
|
+
|
|
16
|
+
const AnimatedSearchBar = ({
|
|
17
|
+
collapsed,
|
|
18
|
+
rightButtonAlwaysVisible = false,
|
|
19
|
+
searchBarProps,
|
|
20
|
+
rightButton,
|
|
21
|
+
}: AnimatedSearchBarProps) => {
|
|
22
|
+
const [rightIconFadeAnimation] = useState(
|
|
23
|
+
() => new Animated.Value(rightButton && rightButtonAlwaysVisible ? 1.5 : 0),
|
|
24
|
+
);
|
|
25
|
+
const [searchPaddingAnimation] = useState(() => new Animated.Value(0));
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
Animated.timing(searchPaddingAnimation, {
|
|
29
|
+
duration: 250,
|
|
30
|
+
toValue: collapsed ? 1 : 0,
|
|
31
|
+
useNativeDriver: false,
|
|
32
|
+
}).start();
|
|
33
|
+
}, [collapsed, searchPaddingAnimation]);
|
|
34
|
+
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (rightButtonAlwaysVisible) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
Animated.timing(rightIconFadeAnimation, {
|
|
41
|
+
duration: 250,
|
|
42
|
+
toValue: collapsed && rightButton ? 1.5 : 0,
|
|
43
|
+
useNativeDriver: false,
|
|
44
|
+
}).start();
|
|
45
|
+
}, [rightButtonAlwaysVisible, rightIconFadeAnimation, rightButton, collapsed]);
|
|
46
|
+
|
|
47
|
+
const searchBarContainerAnimatedStyle = {
|
|
48
|
+
paddingHorizontal: searchPaddingAnimation.interpolate({
|
|
49
|
+
extrapolate: 'clamp',
|
|
50
|
+
inputRange: [0, 1],
|
|
51
|
+
outputRange: [16, 20],
|
|
52
|
+
}),
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const optionsIconAnimatedStyle: Animated.WithAnimatedObject<ViewStyle> = {
|
|
56
|
+
opacity: rightIconFadeAnimation.interpolate({
|
|
57
|
+
extrapolate: 'clamp',
|
|
58
|
+
inputRange: [1, 1.5],
|
|
59
|
+
outputRange: [0, 1],
|
|
60
|
+
}),
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const searchBarAnimatedStyle = {
|
|
64
|
+
width: rightIconFadeAnimation.interpolate({
|
|
65
|
+
extrapolate: 'clamp',
|
|
66
|
+
inputRange: [0, 1],
|
|
67
|
+
outputRange: ['100%', '88%'],
|
|
68
|
+
}),
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const { style: searchBarStyle, ...searchProps } = searchBarProps;
|
|
72
|
+
return (
|
|
73
|
+
<Animated.View style={[styles.searchBarContainer, searchBarContainerAnimatedStyle, searchBarStyle]}>
|
|
74
|
+
<Animated.View style={searchBarAnimatedStyle}>
|
|
75
|
+
<SearchBar {...searchProps} />
|
|
76
|
+
</Animated.View>
|
|
77
|
+
{rightButton && (
|
|
78
|
+
<Animated.View style={[styles.rightButtonWrapper, optionsIconAnimatedStyle]}>{rightButton}</Animated.View>
|
|
79
|
+
)}
|
|
80
|
+
</Animated.View>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const styles = StyleSheet.create({
|
|
85
|
+
rightButtonWrapper: {
|
|
86
|
+
alignItems: 'flex-end',
|
|
87
|
+
justifyContent: 'center',
|
|
88
|
+
},
|
|
89
|
+
searchBarContainer: {
|
|
90
|
+
flexDirection: 'row',
|
|
91
|
+
justifyContent: 'space-between',
|
|
92
|
+
paddingBottom: 12,
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
export default AnimatedSearchBar;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ComponentMeta, Story } from '@storybook/react';
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
|
|
4
|
+
import SearchBar, { SearchBarProps } from './search-bar';
|
|
5
|
+
|
|
6
|
+
const Basic: Story<Omit<SearchBarProps, 'searchPhrase' | 'onSearchPhraseChange'>> = (args) => {
|
|
7
|
+
const [searchPhrase, setSearchPhrase] = useState('');
|
|
8
|
+
return <SearchBar {...args} searchPhrase={searchPhrase} onSearchPhraseChange={setSearchPhrase} />;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
Basic.args = {
|
|
12
|
+
placeholder: 'Search',
|
|
13
|
+
style: { margin: 24 },
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { Basic as SearchBar };
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
title: 'base/input/Search Bar',
|
|
20
|
+
component: SearchBar,
|
|
21
|
+
parameters: {
|
|
22
|
+
design: {
|
|
23
|
+
type: 'figma',
|
|
24
|
+
url: 'https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=1143-40433&t=KAAJ0oKY3xb6VNtA-4',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
argTypes: {
|
|
28
|
+
searchPhrase: { control: { type: null } },
|
|
29
|
+
onSearchPhraseChange: { control: { type: null } },
|
|
30
|
+
},
|
|
31
|
+
} as ComponentMeta<typeof SearchBar>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import React, { forwardRef, useCallback } from 'react';
|
|
2
|
+
import { Insets, Platform, StyleProp, StyleSheet, TextInput, TextInputProps, View, ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { TouchableOpacity } from '../accessibility';
|
|
5
|
+
import { CloseIcon, SearchIcon } from '../icons';
|
|
6
|
+
import font from '../text/font';
|
|
7
|
+
import { useAppColorScheme } from '../theme';
|
|
8
|
+
import { concatTestID } from '../utils';
|
|
9
|
+
|
|
10
|
+
export interface SearchBarProps extends TextInputProps {
|
|
11
|
+
style?: StyleProp<ViewStyle>;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
searchPhrase: string;
|
|
14
|
+
onSearchPhraseChange: (searchPhrase: string) => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const hitSlop: Insets = { top: 10, left: 10, bottom: 10, right: 10 };
|
|
18
|
+
|
|
19
|
+
// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=1143-40433&t=HY1KvobxOReLeC8Z-4
|
|
20
|
+
const SearchBar = forwardRef<TextInput, SearchBarProps>(
|
|
21
|
+
({ style, placeholder, searchPhrase, onSearchPhraseChange, testID, ...textInputProps }, ref) => {
|
|
22
|
+
const colorScheme = useAppColorScheme();
|
|
23
|
+
|
|
24
|
+
const onClear = useCallback(() => {
|
|
25
|
+
onSearchPhraseChange('');
|
|
26
|
+
}, [onSearchPhraseChange]);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<View
|
|
30
|
+
style={[
|
|
31
|
+
styles.container,
|
|
32
|
+
{
|
|
33
|
+
backgroundColor: colorScheme.white,
|
|
34
|
+
},
|
|
35
|
+
style,
|
|
36
|
+
]}>
|
|
37
|
+
<SearchIcon color={colorScheme.text} style={styles.searchIcon} />
|
|
38
|
+
<TextInput
|
|
39
|
+
accessibilityRole="search"
|
|
40
|
+
onChangeText={onSearchPhraseChange}
|
|
41
|
+
placeholder={placeholder}
|
|
42
|
+
placeholderTextColor={colorScheme.text}
|
|
43
|
+
ref={ref}
|
|
44
|
+
returnKeyType="search"
|
|
45
|
+
style={[styles.textInput, { color: colorScheme.text }]}
|
|
46
|
+
value={searchPhrase}
|
|
47
|
+
testID={testID}
|
|
48
|
+
{...textInputProps}
|
|
49
|
+
/>
|
|
50
|
+
{searchPhrase && (
|
|
51
|
+
<TouchableOpacity
|
|
52
|
+
testID={concatTestID(testID, 'clear')}
|
|
53
|
+
accessibilityRole="button"
|
|
54
|
+
hitSlop={hitSlop}
|
|
55
|
+
onPress={onClear}
|
|
56
|
+
style={styles.clearButton}>
|
|
57
|
+
<CloseIcon color={colorScheme.text} height={12} width={12} />
|
|
58
|
+
</TouchableOpacity>
|
|
59
|
+
)}
|
|
60
|
+
</View>
|
|
61
|
+
);
|
|
62
|
+
},
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
SearchBar.displayName = 'SearchBar';
|
|
66
|
+
|
|
67
|
+
const styles = StyleSheet.create({
|
|
68
|
+
clearButton: {
|
|
69
|
+
marginLeft: 6,
|
|
70
|
+
marginRight: 16,
|
|
71
|
+
},
|
|
72
|
+
container: {
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
borderRadius: 20,
|
|
75
|
+
borderWidth: 0,
|
|
76
|
+
flexDirection: 'row',
|
|
77
|
+
height: 40,
|
|
78
|
+
},
|
|
79
|
+
searchIcon: {
|
|
80
|
+
marginLeft: 8,
|
|
81
|
+
marginRight: 6,
|
|
82
|
+
},
|
|
83
|
+
textInput: {
|
|
84
|
+
...font.regular,
|
|
85
|
+
flex: 1,
|
|
86
|
+
fontSize: 14,
|
|
87
|
+
height: 40,
|
|
88
|
+
letterSpacing: 0.2,
|
|
89
|
+
lineHeight: 18,
|
|
90
|
+
paddingBottom: Platform.OS === 'ios' ? 2 : undefined,
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
export default SearchBar;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React, { ComponentType, FunctionComponent, ReactElement, useMemo } from 'react';
|
|
2
|
+
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';
|
|
5
|
+
import { NextIcon } from '../icons/wallet';
|
|
6
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
7
|
+
import SettingItem from './setting-item';
|
|
8
|
+
|
|
9
|
+
export type ButtonSettingProps = {
|
|
10
|
+
accessory?: ComponentType<any> | ReactElement;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
icon?: ComponentType<any> | ReactElement;
|
|
13
|
+
onPress: () => void;
|
|
14
|
+
style?: StyleProp<ViewStyle>;
|
|
15
|
+
testID?: string;
|
|
16
|
+
title: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const ButtonSetting: FunctionComponent<ButtonSettingProps> = ({
|
|
20
|
+
accessory,
|
|
21
|
+
disabled,
|
|
22
|
+
title,
|
|
23
|
+
onPress,
|
|
24
|
+
icon,
|
|
25
|
+
style,
|
|
26
|
+
testID,
|
|
27
|
+
}) => {
|
|
28
|
+
const colorScheme = useAppColorScheme();
|
|
29
|
+
|
|
30
|
+
const accessoryView: React.ReactElement | undefined = useMemo(() => {
|
|
31
|
+
if (!accessory) {
|
|
32
|
+
return (
|
|
33
|
+
<View style={styles.arrow}>
|
|
34
|
+
<NextIcon color={colorScheme.text} />
|
|
35
|
+
</View>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
if (React.isValidElement(accessory)) {
|
|
39
|
+
return accessory;
|
|
40
|
+
} else {
|
|
41
|
+
const AccessoryComponent = accessory as React.ComponentType<any>;
|
|
42
|
+
return <AccessoryComponent />;
|
|
43
|
+
}
|
|
44
|
+
}, [accessory, colorScheme.text]);
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<TouchableOpacity
|
|
48
|
+
disabled={disabled}
|
|
49
|
+
accessibilityRole="button"
|
|
50
|
+
onPress={onPress}
|
|
51
|
+
style={styles.container}
|
|
52
|
+
testID={testID}>
|
|
53
|
+
<SettingItem icon={icon} style={style} title={title}>
|
|
54
|
+
{accessoryView}
|
|
55
|
+
</SettingItem>
|
|
56
|
+
</TouchableOpacity>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const styles = StyleSheet.create({
|
|
61
|
+
arrow: {
|
|
62
|
+
alignItems: 'center',
|
|
63
|
+
height: 24,
|
|
64
|
+
justifyContent: 'center',
|
|
65
|
+
width: 24,
|
|
66
|
+
},
|
|
67
|
+
container: {
|
|
68
|
+
width: '100%',
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export default ButtonSetting;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import ButtonSetting, { ButtonSettingProps } from './button-setting';
|
|
2
|
+
import SettingItem, { SettingItemProps } from './setting-item';
|
|
3
|
+
import SettingItemSeparator, { SettingItemSeparatorProps } from './setting-item-separator';
|
|
4
|
+
import SettingsButton, { SettingsButtonProps } from './settings-button';
|
|
5
|
+
import SwitchSetting, { SwitchSettingProps } from './switch-setting';
|
|
6
|
+
|
|
7
|
+
export { ButtonSetting, ButtonSettingProps };
|
|
8
|
+
export { SettingItem, SettingItemProps };
|
|
9
|
+
export { SettingItemSeparator, SettingItemSeparatorProps };
|
|
10
|
+
export { SettingsButton, SettingsButtonProps };
|
|
11
|
+
export { SwitchSetting, SwitchSettingProps };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { ColorValue, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
5
|
+
|
|
6
|
+
export type SettingItemSeparatorProps = {
|
|
7
|
+
color?: ColorValue;
|
|
8
|
+
style?: StyleProp<ViewStyle>;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const SettingItemSeparator: FC<SettingItemSeparatorProps> = ({ color, style }) => {
|
|
12
|
+
const colorScheme = useAppColorScheme();
|
|
13
|
+
return (
|
|
14
|
+
<View style={[styles.wrapper, { backgroundColor: colorScheme.white }, style]}>
|
|
15
|
+
<View style={[styles.separator, { backgroundColor: color ?? colorScheme.background }]} />
|
|
16
|
+
</View>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const styles = StyleSheet.create({
|
|
21
|
+
separator: {
|
|
22
|
+
height: '100%',
|
|
23
|
+
width: '100%',
|
|
24
|
+
},
|
|
25
|
+
wrapper: {
|
|
26
|
+
height: 1,
|
|
27
|
+
marginHorizontal: 16,
|
|
28
|
+
paddingHorizontal: 12,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export default SettingItemSeparator;
|