@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,86 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
import ImageOrComponent from '../image/image-or-component';
|
|
5
|
+
import Typography from '../text/typography';
|
|
6
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
7
|
+
// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=426-25581&mode=design&t=YI1oD2BfBie5HcvJ-0
|
|
8
|
+
const Avatar = _ref => {
|
|
9
|
+
let {
|
|
10
|
+
avatar,
|
|
11
|
+
placeholderText,
|
|
12
|
+
statusIcon,
|
|
13
|
+
style,
|
|
14
|
+
...viewProps
|
|
15
|
+
} = _ref;
|
|
16
|
+
const colorScheme = useAppColorScheme();
|
|
17
|
+
const statusIconView = useMemo(() => {
|
|
18
|
+
if (!statusIcon) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
if ( /*#__PURE__*/React.isValidElement(statusIcon)) {
|
|
22
|
+
return statusIcon;
|
|
23
|
+
} else {
|
|
24
|
+
const StatusIconComponent = statusIcon;
|
|
25
|
+
return /*#__PURE__*/React.createElement(StatusIconComponent, null);
|
|
26
|
+
}
|
|
27
|
+
}, [statusIcon]);
|
|
28
|
+
const imageSource = useMemo(() => {
|
|
29
|
+
if (avatar) {
|
|
30
|
+
return avatar;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
component: /*#__PURE__*/React.createElement(View, {
|
|
34
|
+
style: [styles.avatarPlaceholder, {
|
|
35
|
+
backgroundColor: colorScheme.accent
|
|
36
|
+
}]
|
|
37
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
38
|
+
color: colorScheme.accentText,
|
|
39
|
+
style: styles.avatarPlaceholderText
|
|
40
|
+
}, placeholderText))
|
|
41
|
+
};
|
|
42
|
+
}, [colorScheme, avatar, placeholderText]);
|
|
43
|
+
return /*#__PURE__*/React.createElement(View, _extends({
|
|
44
|
+
accessibilityElementsHidden: true,
|
|
45
|
+
style: [styles.avatar, style]
|
|
46
|
+
}, viewProps), /*#__PURE__*/React.createElement(View, {
|
|
47
|
+
style: styles.imageWrapper
|
|
48
|
+
}, /*#__PURE__*/React.createElement(ImageOrComponent, {
|
|
49
|
+
source: imageSource,
|
|
50
|
+
style: styles.image
|
|
51
|
+
})), statusIconView && /*#__PURE__*/React.createElement(View, {
|
|
52
|
+
style: styles.statusIcon
|
|
53
|
+
}, statusIconView));
|
|
54
|
+
};
|
|
55
|
+
const styles = StyleSheet.create({
|
|
56
|
+
avatar: {
|
|
57
|
+
height: 72,
|
|
58
|
+
width: 72
|
|
59
|
+
},
|
|
60
|
+
avatarPlaceholder: {
|
|
61
|
+
alignItems: 'center',
|
|
62
|
+
flex: 1,
|
|
63
|
+
justifyContent: 'center'
|
|
64
|
+
},
|
|
65
|
+
avatarPlaceholderText: {
|
|
66
|
+
textTransform: 'uppercase'
|
|
67
|
+
},
|
|
68
|
+
image: {
|
|
69
|
+
backgroundColor: 'orange',
|
|
70
|
+
height: '100%',
|
|
71
|
+
width: '100%'
|
|
72
|
+
},
|
|
73
|
+
imageWrapper: {
|
|
74
|
+
borderRadius: 36,
|
|
75
|
+
height: '100%',
|
|
76
|
+
overflow: 'hidden',
|
|
77
|
+
width: '100%'
|
|
78
|
+
},
|
|
79
|
+
statusIcon: {
|
|
80
|
+
bottom: 4,
|
|
81
|
+
position: 'absolute',
|
|
82
|
+
right: 4
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
export default Avatar;
|
|
86
|
+
//# sourceMappingURL=avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useMemo","StyleSheet","View","ImageOrComponent","Typography","useAppColorScheme","Avatar","_ref","avatar","placeholderText","statusIcon","style","viewProps","colorScheme","statusIconView","undefined","isValidElement","StatusIconComponent","createElement","imageSource","component","styles","avatarPlaceholder","backgroundColor","accent","color","accentText","avatarPlaceholderText","_extends","accessibilityElementsHidden","imageWrapper","source","image","create","height","width","alignItems","flex","justifyContent","textTransform","borderRadius","overflow","bottom","position","right"],"sources":["avatar.tsx"],"sourcesContent":["import React, { ComponentType, FunctionComponent, ReactElement, useMemo } from 'react';\nimport { StyleSheet, View, ViewProps } from 'react-native';\n\nimport ImageOrComponent, { ImageOrComponentSource } from '../image/image-or-component';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nexport type AvatarProps = ViewProps & {\n avatar?: ImageOrComponentSource;\n placeholderText?: string;\n statusIcon?: ComponentType<any> | ReactElement;\n};\n\n// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=426-25581&mode=design&t=YI1oD2BfBie5HcvJ-0\nconst Avatar: FunctionComponent<AvatarProps> = ({ avatar, placeholderText, statusIcon, style, ...viewProps }) => {\n const colorScheme = useAppColorScheme();\n\n const statusIconView: React.ReactElement | undefined = useMemo(() => {\n if (!statusIcon) {\n return undefined;\n }\n if (React.isValidElement(statusIcon)) {\n return statusIcon;\n } else {\n const StatusIconComponent = statusIcon as React.ComponentType<any>;\n return <StatusIconComponent />;\n }\n }, [statusIcon]);\n\n const imageSource = useMemo<ImageOrComponentSource>(() => {\n if (avatar) {\n return avatar;\n }\n\n return {\n component: (\n <View style={[styles.avatarPlaceholder, { backgroundColor: colorScheme.accent }]}>\n <Typography color={colorScheme.accentText} style={styles.avatarPlaceholderText}>\n {placeholderText}\n </Typography>\n </View>\n ),\n };\n }, [colorScheme, avatar, placeholderText]);\n\n return (\n <View accessibilityElementsHidden={true} style={[styles.avatar, style]} {...viewProps}>\n <View style={styles.imageWrapper}>\n <ImageOrComponent source={imageSource} style={styles.image} />\n </View>\n {statusIconView && <View style={styles.statusIcon}>{statusIconView}</View>}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n avatar: {\n height: 72,\n width: 72,\n },\n avatarPlaceholder: {\n alignItems: 'center',\n flex: 1,\n justifyContent: 'center',\n },\n avatarPlaceholderText: {\n textTransform: 'uppercase',\n },\n image: {\n backgroundColor: 'orange',\n height: '100%',\n width: '100%',\n },\n imageWrapper: {\n borderRadius: 36,\n height: '100%',\n overflow: 'hidden',\n width: '100%',\n },\n statusIcon: {\n bottom: 4,\n position: 'absolute',\n right: 4,\n },\n});\n\nexport default Avatar;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAoDC,OAAO,QAAQ,OAAO;AACtF,SAASC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAE1D,OAAOC,gBAAgB,MAAkC,6BAA6B;AACtF,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,+BAA+B;AAQjE;AACA,MAAMC,MAAsC,GAAGC,IAAA,IAAkE;EAAA,IAAjE;IAAEC,MAAM;IAAEC,eAAe;IAAEC,UAAU;IAAEC,KAAK;IAAE,GAAGC;EAAU,CAAC,GAAAL,IAAA;EAC1G,MAAMM,WAAW,GAAGR,iBAAiB,EAAE;EAEvC,MAAMS,cAA8C,GAAGd,OAAO,CAAC,MAAM;IACnE,IAAI,CAACU,UAAU,EAAE;MACf,OAAOK,SAAS;IAClB;IACA,kBAAIhB,KAAK,CAACiB,cAAc,CAACN,UAAU,CAAC,EAAE;MACpC,OAAOA,UAAU;IACnB,CAAC,MAAM;MACL,MAAMO,mBAAmB,GAAGP,UAAsC;MAClE,oBAAOX,KAAA,CAAAmB,aAAA,CAACD,mBAAmB,OAAG;IAChC;EACF,CAAC,EAAE,CAACP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C;EACDX,qBAAqB,EAAE;IACrBY,aAAa,EAAE;EACjB,CAAC;EACDP,KAAK,EAAE;IACLT,eAAe,EAAE,QAAQ;IACzBW,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE;EACT,CAAC;EACDL,YAAY,EAAE;IACZU,YAAY,EAAE,EAAE;IAChBN,MAAM,EAAE,MAAM;IACdO,QAAQ,EAAE,QAAQ;IAClBN,KAAK,EAAE;EACT,CAAC;EACDzB,UAAU,EAAE;IACVgC,MAAM,EAAE,CAAC;IACTC,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAetC,MAAM"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
import Typography from '../text/typography';
|
|
5
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
6
|
+
import { concatTestID } from '../utils';
|
|
7
|
+
import Avatar from './avatar';
|
|
8
|
+
// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=426-25595&mode=design&t=YI1oD2BfBie5HcvJ-0
|
|
9
|
+
const EntityCluster = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
avatar,
|
|
12
|
+
entityName,
|
|
13
|
+
subline,
|
|
14
|
+
textColor,
|
|
15
|
+
style,
|
|
16
|
+
testID,
|
|
17
|
+
...viewProps
|
|
18
|
+
} = _ref;
|
|
19
|
+
const colorScheme = useAppColorScheme();
|
|
20
|
+
const avatarProps = useMemo(() => {
|
|
21
|
+
var _avatar$placeholderTe;
|
|
22
|
+
const initials = entityName.split(' ', 3).map(word => word[0]);
|
|
23
|
+
const placeholderText = initials.length > 0 ? initials.join('') : '';
|
|
24
|
+
return {
|
|
25
|
+
...avatar,
|
|
26
|
+
placeholderText: (_avatar$placeholderTe = avatar === null || avatar === void 0 ? void 0 : avatar.placeholderText) !== null && _avatar$placeholderTe !== void 0 ? _avatar$placeholderTe : placeholderText
|
|
27
|
+
};
|
|
28
|
+
}, [avatar, entityName]);
|
|
29
|
+
return /*#__PURE__*/React.createElement(View, _extends({
|
|
30
|
+
style: [styles.entity, style],
|
|
31
|
+
testID: testID
|
|
32
|
+
}, viewProps), /*#__PURE__*/React.createElement(Avatar, avatarProps), /*#__PURE__*/React.createElement(View, {
|
|
33
|
+
style: styles.labels
|
|
34
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
35
|
+
testID: concatTestID(testID, 'entityName'),
|
|
36
|
+
color: textColor !== null && textColor !== void 0 ? textColor : colorScheme.text,
|
|
37
|
+
numberOfLines: 2,
|
|
38
|
+
preset: "m"
|
|
39
|
+
}, entityName), subline && /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Typography, {
|
|
40
|
+
testID: concatTestID(testID, 'subline'),
|
|
41
|
+
color: textColor !== null && textColor !== void 0 ? textColor : colorScheme.text,
|
|
42
|
+
preset: "xs"
|
|
43
|
+
}, subline))));
|
|
44
|
+
};
|
|
45
|
+
const styles = StyleSheet.create({
|
|
46
|
+
entity: {
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
flexDirection: 'row'
|
|
49
|
+
},
|
|
50
|
+
labels: {
|
|
51
|
+
flex: 1,
|
|
52
|
+
marginLeft: 12
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
export default EntityCluster;
|
|
56
|
+
//# sourceMappingURL=entity-cluster.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useMemo","StyleSheet","View","Typography","useAppColorScheme","concatTestID","Avatar","EntityCluster","_ref","avatar","entityName","subline","textColor","style","testID","viewProps","colorScheme","avatarProps","_avatar$placeholderTe","initials","split","map","word","placeholderText","length","join","createElement","_extends","styles","entity","labels","color","text","numberOfLines","preset","create","alignItems","flexDirection","flex","marginLeft"],"sources":["entity-cluster.tsx"],"sourcesContent":["import React, { FunctionComponent, useMemo } from 'react';\nimport { StyleSheet, View, ViewProps } from 'react-native';\n\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\nimport { concatTestID } from '../utils';\nimport Avatar, { AvatarProps } from './avatar';\n\nexport type EntityClusterProps = ViewProps & {\n avatar?: AvatarProps;\n entityName: string;\n subline?: string;\n textColor?: string;\n testID?: string;\n};\n\n// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=426-25595&mode=design&t=YI1oD2BfBie5HcvJ-0\nconst EntityCluster: FunctionComponent<EntityClusterProps> = ({\n avatar,\n entityName,\n subline,\n textColor,\n style,\n testID,\n ...viewProps\n}) => {\n const colorScheme = useAppColorScheme();\n\n const avatarProps = useMemo<AvatarProps>(() => {\n const initials = entityName.split(' ', 3).map((word: string) => word[0]);\n const placeholderText = initials.length > 0 ? initials.join('') : '';\n return {\n ...avatar,\n placeholderText: avatar?.placeholderText ?? placeholderText,\n };\n }, [avatar, entityName]);\n\n return (\n <View style={[styles.entity, style]} testID={testID} {...viewProps}>\n <Avatar {...avatarProps} />\n <View style={styles.labels}>\n <Typography\n testID={concatTestID(testID, 'entityName')}\n color={textColor ?? colorScheme.text}\n numberOfLines={2}\n preset=\"m\">\n {entityName}\n </Typography>\n {subline && (\n <View>\n <Typography testID={concatTestID(testID, 'subline')} color={textColor ?? colorScheme.text} preset=\"xs\">\n {subline}\n </Typography>\n </View>\n )}\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n entity: {\n alignItems: 'center',\n flexDirection: 'row',\n },\n labels: {\n flex: 1,\n marginLeft: 12,\n },\n});\n\nexport default EntityCluster;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAuBC,OAAO,QA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CAACE;EAAO,gBACzB/B,KAAA,CAAA2B,aAAA,CAACvB,UAAU;IACTW,MAAM,EAAET,YAAY,CAACS,MAAM,EAAE,YAAY,CAAE;IAC3CiB,KAAK,EAAEnB,SAAS,aAATA,SAAS,cAATA,SAAS,GAAII,WAAW,CAACgB,IAAK;IACrCC,aAAa,EAAE,CAAE;IACjBC,MAAM,EAAC;EAAG,GACTxB,UAAU,CACA,EACZC,OAAO,iBACNZ,KAAA,CAAA2B,aAAA,CAACxB,IAAI,qBACHH,KAAA,CAAA2B,aAAA,CAACvB,UAAU;IAACW,MAAM,EAAET,YAAY,CAACS,MAAM,EAAE,SAAS,CAAE;IAACiB,KAAK,EAAEnB,SAAS,aAATA,SAAS,cAATA,SAAS,GAAII,WAAW,CAACgB,IAAK;IAACE,MAAM,EAAC;EAAI,GACnGvB,OAAO,CACG,CAEhB,CACI,CACF;AAEX,CAAC;AAED,MAAMiB,MAAM,GAAG3B,UAAU,CAACkC,MAAM,CAAC;EAC/BN,MAAM,EAAE;IACNO,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE;EACjB,CAAC;EACDP,MAAM,EAAE;IACNQ,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAehC,aAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Avatar","AvatarProps","EntityCluster","EntityClusterProps"],"sources":["index.ts"],"sourcesContent":["import Avatar, { AvatarProps } from './avatar';\nimport EntityCluster, { EntityClusterProps } from './entity-cluster';\n\nexport { Avatar, AvatarProps };\nexport { EntityCluster, EntityClusterProps };\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,WAAW,QAAQ,UAAU;AAC9C,OAAOC,aAAa,IAAIC,kBAAkB,QAAQ,kBAAkB;AAEpE,SAASH,MAAM,EAAEC,WAAW;AAC5B,SAASC,aAAa,EAAEC,kBAAkB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import { useIsFocused } from '@react-navigation/native';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { StatusBar } from 'react-native';
|
|
5
|
+
const FocusAwareStatusBar = props => {
|
|
6
|
+
const isFocused = useIsFocused();
|
|
7
|
+
return isFocused ? /*#__PURE__*/React.createElement(StatusBar, _extends({
|
|
8
|
+
animated: true
|
|
9
|
+
}, props)) : null;
|
|
10
|
+
};
|
|
11
|
+
export default FocusAwareStatusBar;
|
|
12
|
+
//# sourceMappingURL=focus-aware-status-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useIsFocused","React","StatusBar","FocusAwareStatusBar","props","isFocused","createElement","_extends","animated"],"sources":["focus-aware-status-bar.tsx"],"sourcesContent":["import { useIsFocused } from '@react-navigation/native';\nimport React, { FunctionComponent } from 'react';\nimport { StatusBar, StatusBarProps } from 'react-native';\n\nconst FocusAwareStatusBar: FunctionComponent<StatusBarProps> = (props) => {\n const isFocused = useIsFocused();\n return isFocused ? <StatusBar animated={true} {...props} /> : null;\n};\n\nexport default FocusAwareStatusBar;\n"],"mappings":";AAAA,SAASA,YAAY,QAAQ,0BAA0B;AACvD,OAAOC,KAAK,MAA6B,OAAO;AAChD,SAASC,SAAS,QAAwB,cAAc;AAExD,MAAMC,mBAAsD,GAAIC,KAAK,IAAK;EACxE,MAAMC,SAAS,GAAGL,YAAY,EAAE;EAChC,OAAOK,SAAS,gBAAGJ,KAAA,CAAAK,aAAA,CAACJ,SAAS,EAAAK,QAAA;IAACC,QAAQ,EAAE;EAAK,GAAKJ,KAAK,EAAI,GAAG,IAAI;AACpE,CAAC;AAED,eAAeD,mBAAmB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
3
|
+
import { Animated, StyleSheet, View } from 'react-native';
|
|
4
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
|
+
import BlurView from '../blur/blur-view';
|
|
6
|
+
import AnimatedSearchBar from '../searchbar/animated-search-bar';
|
|
7
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
8
|
+
const FoldableSearchHeader = _ref => {
|
|
9
|
+
let {
|
|
10
|
+
staticHeader = false,
|
|
11
|
+
scrollOffset,
|
|
12
|
+
searchBar,
|
|
13
|
+
header
|
|
14
|
+
} = _ref;
|
|
15
|
+
const safeAreaInsets = useSafeAreaInsets();
|
|
16
|
+
const colorScheme = useAppColorScheme();
|
|
17
|
+
const [collapsed, setCollapsed] = useState(header ? false : true);
|
|
18
|
+
const [headerHeight, setHeaderHeight] = useState();
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
const id = scrollOffset.addListener(_ref2 => {
|
|
21
|
+
let {
|
|
22
|
+
value
|
|
23
|
+
} = _ref2;
|
|
24
|
+
if (!headerHeight) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (value > headerHeight) {
|
|
28
|
+
setCollapsed(true);
|
|
29
|
+
} else {
|
|
30
|
+
setCollapsed(false);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return () => {
|
|
34
|
+
scrollOffset.removeListener(id);
|
|
35
|
+
};
|
|
36
|
+
}, [scrollOffset, searchBar, headerHeight]);
|
|
37
|
+
const playHeaderFoldAnimation = !staticHeader && headerHeight;
|
|
38
|
+
const scrollHeaderAnimatedStyle = playHeaderFoldAnimation ? {
|
|
39
|
+
transform: [{
|
|
40
|
+
translateY: scrollOffset.interpolate({
|
|
41
|
+
extrapolate: 'clamp',
|
|
42
|
+
inputRange: [0, headerHeight],
|
|
43
|
+
outputRange: [0, -headerHeight]
|
|
44
|
+
})
|
|
45
|
+
}]
|
|
46
|
+
} : undefined;
|
|
47
|
+
const fadeHeaderOutAnimatedStyle = playHeaderFoldAnimation ? {
|
|
48
|
+
opacity: scrollOffset.interpolate({
|
|
49
|
+
extrapolate: 'clamp',
|
|
50
|
+
inputRange: [0, headerHeight / 2],
|
|
51
|
+
outputRange: [1, 0]
|
|
52
|
+
})
|
|
53
|
+
} : undefined;
|
|
54
|
+
const onHeaderLayout = useCallback(event => {
|
|
55
|
+
setHeaderHeight(event.nativeEvent.layout.height);
|
|
56
|
+
}, [setHeaderHeight]);
|
|
57
|
+
return /*#__PURE__*/React.createElement(Animated.View, {
|
|
58
|
+
style: [styles.headerContainer, {
|
|
59
|
+
paddingTop: safeAreaInsets.top
|
|
60
|
+
}, scrollHeaderAnimatedStyle]
|
|
61
|
+
}, /*#__PURE__*/React.createElement(BlurView, {
|
|
62
|
+
blurStyle: 'header',
|
|
63
|
+
color: colorScheme.background,
|
|
64
|
+
style: StyleSheet.absoluteFill
|
|
65
|
+
}), /*#__PURE__*/React.createElement(View, null, header && /*#__PURE__*/React.createElement(Animated.View, {
|
|
66
|
+
onLayout: onHeaderLayout,
|
|
67
|
+
style: fadeHeaderOutAnimatedStyle
|
|
68
|
+
}, header), searchBar && /*#__PURE__*/React.createElement(AnimatedSearchBar, _extends({}, searchBar, {
|
|
69
|
+
collapsed: collapsed
|
|
70
|
+
}))));
|
|
71
|
+
};
|
|
72
|
+
const styles = StyleSheet.create({
|
|
73
|
+
headerContainer: {
|
|
74
|
+
position: 'absolute',
|
|
75
|
+
width: '100%'
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
export default FoldableSearchHeader;
|
|
79
|
+
//# sourceMappingURL=foldable-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useState","Animated","StyleSheet","View","useSafeAreaInsets","BlurView","AnimatedSearchBar","useAppColorScheme","FoldableSearchHeader","_ref","staticHeader","scrollOffset","searchBar","header","safeAreaInsets","colorScheme","collapsed","setCollapsed","headerHeight","setHeaderHeight","id","addListener","_ref2","value","removeListener","playHeaderFoldAnimation","scrollHeaderAnimatedStyle","transform","translateY","interpolate","extrapolate","inputRange","outputRange","undefined","fadeHeaderOutAnimatedStyle","opacity","onHeaderLayout","event","nativeEvent","layout","height","createElement","style","styles","headerContainer","paddingTop","top","blurStyle","color","background","absoluteFill","onLayout","_extends","create","position","width"],"sources":["foldable-header.tsx"],"sourcesContent":["import React, { FunctionComponent, ReactElement, useCallback, useEffect, useState } from 'react';\nimport { Animated, LayoutChangeEvent, StyleSheet, View, ViewStyle } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport BlurView from '../blur/blur-view';\nimport AnimatedSearchBar, { AnimatedSearchBarProps } from '../searchbar/animated-search-bar';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nexport type FoldableHeaderProps = {\n header: ReactElement;\n scrollOffset: Animated.Value;\n searchBar?: Omit<AnimatedSearchBarProps, 'collapsed'>;\n // if true, the header won't fold / fade out on scroll\n staticHeader?: boolean;\n};\n\nconst FoldableSearchHeader: FunctionComponent<FoldableHeaderProps> = ({\n staticHeader = false,\n scrollOffset,\n searchBar,\n header,\n}) => {\n const safeAreaInsets = useSafeAreaInsets();\n const colorScheme = useAppColorScheme();\n const [collapsed, setCollapsed] = useState(header ? false : true);\n const [headerHeight, setHeaderHeight] = useState<number>();\n\n useEffect(() => {\n const id = scrollOffset.addListener(({ value }) => {\n if (!headerHeight) {\n return;\n }\n\n if (value > headerHeight) {\n setCollapsed(true);\n } else {\n setCollapsed(false);\n }\n });\n return () => {\n scrollOffset.removeListener(id);\n };\n }, [scrollOffset, searchBar, headerHeight]);\n\n const playHeaderFoldAnimation = !staticHeader && headerHeight;\n\n const scrollHeaderAnimatedStyle: Animated.WithAnimatedObject<ViewStyle> | undefined = playHeaderFoldAnimation\n ? {\n transform: [\n {\n translateY: scrollOffset.interpolate({\n extrapolate: 'clamp',\n inputRange: [0, headerHeight],\n outputRange: [0, -headerHeight],\n }),\n },\n ],\n }\n : undefined;\n\n const fadeHeaderOutAnimatedStyle: Animated.WithAnimatedObject<ViewStyle> | undefined = playHeaderFoldAnimation\n ? {\n opacity: scrollOffset.interpolate({\n extrapolate: 'clamp',\n inputRange: [0, headerHeight / 2],\n outputRange: [1, 0],\n }),\n }\n : undefined;\n\n const onHeaderLayout = useCallback(\n (event: LayoutChangeEvent) => {\n setHeaderHeight(event.nativeEvent.layout.height);\n },\n [setHeaderHeight],\n );\n\n return (\n <Animated.View\n style={[\n styles.headerContainer,\n {\n paddingTop: safeAreaInsets.top,\n },\n scrollHeaderAnimatedStyle,\n ]}>\n <BlurView blurStyle={'header'} color={colorScheme.background} style={StyleSheet.absoluteFill} />\n <View>\n {header && (\n <Animated.View onLayout={onHeaderLayout} style={fadeHeaderOutAnimatedStyle}>\n {header}\n </Animated.View>\n )}\n {searchBar && <AnimatedSearchBar {...searchBar} collapsed={collapsed} />}\n </View>\n </Animated.View>\n );\n};\n\nconst styles = StyleSheet.create({\n headerContainer: {\n position: 'absolute',\n width: '100%',\n },\n});\n\nexport default FoldableSearchHeader;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAqCC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAChG,SAASC,QAAQ,EAAqBC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACvF,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,OAAOC,iBAAiB,MAAkC,kCAAkC;AAC5F,SAASC,iBAAiB,QAAQ,+BAA+B;AAUjE,MAAMC,oBAA4D,GAAGC,IAAA,IAK/D;EAAA,IALgE;IACpEC,YAAY,GAAG,KAAK;IACpBC,YAAY;IACZC,SAAS;IACTC;EACF,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G,CAAC,CAAC;MACjCc,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC;IACpB,CAAC;EACH,CAAC,GACDC,SAAS;EAEb,MAAMG,cAAc,GAAGtC,WAAW,CAC/BuC,KAAwB,IAAK;IAC5BlB,eAAe,CAACkB,KAAK,CAACC,WAAW,CAACC,MAAM,CAACC,MAAM,CAAC;EAClD,CAAC,EACD,CAACrB,eAAe,CAAC,CAClB;EAED,oBACEtB,KAAA,CAAA4C,aAAA,CAACxC,QAAQ,CAACE,IAAI;IACZuC,KAAK,EAAE,CACLC,MAAM,CAACC,eAAe,EACtB;MACEC,UAAU,EAAE/B,cAAc,CAACgC;IAC7B,CAAC,EACDpB,yBAAyB;EACzB,gBACF7B,KAAA,CAAA4C,aAAA,CAACpC,QAAQ;IAAC0C,SAAS,EAAE,QAAS;IAACC,KAAK,EAAEjC,WAAW,CAACkC,UAAW;IAACP,KAAK,EAAExC,UAAU,CAACgD;EAAa,EAAG,eAChGrD,KAAA,CAAA4C,aAAA,CAACtC,IAAI,QACFU,MAAM,iBACLhB,KAAA,CAAA4C,aAAA,CAACxC,QAAQ,CAACE,IAAI;IAACgD,QAAQ,EAAEf,cAAe;IAACM,KAAK,EAAER;EAA2B,GACxErB,MAAM,CAEV,EACAD,SAAS,iBAAIf,KAAA,CAAA4C,aAAA,CAACnC,iBAAiB,EAAA8C,QAAA,KAAKxC,SAAS;IAAEI,SAAS,EAAEA;EAAU,GAAG,CACnE,CACO;AAEpB,CAAC;AAED,MAAM2B,MAAM,GAAGzC,UAAU,CAACmD,MAAM,CAAC;EAC/BT,eAAe,EAAE;IACfU,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAe/C,oBAAoB"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
import { BackButton } from '../buttons';
|
|
5
|
+
import { Typography } from '../text';
|
|
6
|
+
import { useAppColorScheme } from '../theme';
|
|
7
|
+
import { concatTestID } from '../utils';
|
|
8
|
+
const backButtonHitSlop = {
|
|
9
|
+
top: 12,
|
|
10
|
+
bottom: 12,
|
|
11
|
+
left: 20,
|
|
12
|
+
right: 20
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Unified screen header
|
|
17
|
+
*
|
|
18
|
+
* Following the design: https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=425-18624
|
|
19
|
+
* states (Default + Dashboard)
|
|
20
|
+
*/
|
|
21
|
+
const Header = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
onBack,
|
|
24
|
+
rightButton,
|
|
25
|
+
style,
|
|
26
|
+
titleRowStyle,
|
|
27
|
+
testID,
|
|
28
|
+
title,
|
|
29
|
+
...viewProps
|
|
30
|
+
} = _ref;
|
|
31
|
+
const colorScheme = useAppColorScheme();
|
|
32
|
+
return /*#__PURE__*/React.createElement(View, _extends({
|
|
33
|
+
style: [styles.container, style],
|
|
34
|
+
testID: testID
|
|
35
|
+
}, viewProps), onBack && /*#__PURE__*/React.createElement(View, {
|
|
36
|
+
style: styles.backButtonRow
|
|
37
|
+
}, /*#__PURE__*/React.createElement(BackButton, {
|
|
38
|
+
hitSlop: backButtonHitSlop,
|
|
39
|
+
onPress: onBack,
|
|
40
|
+
testID: concatTestID(testID, 'back')
|
|
41
|
+
}), /*#__PURE__*/React.createElement(View, null), rightButton), /*#__PURE__*/React.createElement(View, {
|
|
42
|
+
style: [styles.titleRow, onBack ? styles.titleRow2nd : styles.titleRowNoBackButton, (onBack || !rightButton) && styles.titleRowNoRightButton, titleRowStyle]
|
|
43
|
+
}, typeof title === 'string' ? /*#__PURE__*/React.createElement(Typography, {
|
|
44
|
+
accessibilityRole: "header",
|
|
45
|
+
color: colorScheme.text,
|
|
46
|
+
preset: "l",
|
|
47
|
+
style: styles.title,
|
|
48
|
+
testID: concatTestID(testID, 'title')
|
|
49
|
+
}, title) : /*#__PURE__*/React.createElement(View, {
|
|
50
|
+
style: styles.title
|
|
51
|
+
}, title), !onBack && rightButton && /*#__PURE__*/React.createElement(View, {
|
|
52
|
+
style: styles.rightButtonWrapper
|
|
53
|
+
}, rightButton)));
|
|
54
|
+
};
|
|
55
|
+
const styles = StyleSheet.create({
|
|
56
|
+
backButtonRow: {
|
|
57
|
+
alignItems: 'center',
|
|
58
|
+
flexDirection: 'row',
|
|
59
|
+
justifyContent: 'space-between',
|
|
60
|
+
minHeight: 48,
|
|
61
|
+
paddingHorizontal: 20,
|
|
62
|
+
width: '100%'
|
|
63
|
+
},
|
|
64
|
+
container: {
|
|
65
|
+
width: '100%'
|
|
66
|
+
},
|
|
67
|
+
rightButtonWrapper: {
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
height: 48,
|
|
70
|
+
justifyContent: 'center',
|
|
71
|
+
paddingHorizontal: 12,
|
|
72
|
+
paddingTop: 2
|
|
73
|
+
},
|
|
74
|
+
title: {
|
|
75
|
+
flex: 1,
|
|
76
|
+
paddingBottom: 8,
|
|
77
|
+
// to compensate "l" font line-height difference
|
|
78
|
+
paddingTop: 9
|
|
79
|
+
},
|
|
80
|
+
titleRow: {
|
|
81
|
+
flexDirection: 'row',
|
|
82
|
+
paddingLeft: 20,
|
|
83
|
+
paddingRight: 8,
|
|
84
|
+
width: '100%'
|
|
85
|
+
},
|
|
86
|
+
titleRow2nd: {
|
|
87
|
+
marginBottom: 12
|
|
88
|
+
},
|
|
89
|
+
titleRowNoBackButton: {
|
|
90
|
+
marginTop: 12
|
|
91
|
+
},
|
|
92
|
+
titleRowNoRightButton: {
|
|
93
|
+
paddingRight: 20
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
export default Header;
|
|
97
|
+
//# sourceMappingURL=header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","BackButton","Typography","useAppColorScheme","concatTestID","backButtonHitSlop","top","bottom","left","right","Header","_ref","onBack","rightButton","style","titleRowStyle","testID","title","viewProps","colorScheme","createElement","_extends","styles","container","backButtonRow","hitSlop","onPress","titleRow","titleRow2nd","titleRowNoBackButton","titleRowNoRightButton","accessibilityRole","color","text","preset","rightButtonWrapper","create","alignItems","flexDirection","justifyContent","minHeight","paddingHorizontal","width","height","paddingTop","flex","paddingBottom","paddingLeft","paddingRight","marginBottom","marginTop"],"sources":["header.tsx"],"sourcesContent":["import React, { FC, ReactNode } from 'react';\nimport { Insets, StyleProp, StyleSheet, View, ViewProps, ViewStyle } from 'react-native';\n\nimport { BackButton } from '../buttons';\nimport { Typography } from '../text';\nimport { useAppColorScheme } from '../theme';\nimport { concatTestID } from '../utils';\n\nexport interface HeaderProps extends ViewProps {\n onBack?: () => void;\n rightButton?: ReactNode;\n style?: StyleProp<ViewStyle>;\n titleRowStyle?: StyleProp<ViewStyle>;\n title: ReactNode;\n}\n\nconst backButtonHitSlop: Insets = { top: 12, bottom: 12, left: 20, right: 20 };\n\n/**\n * Unified screen header\n *\n * Following the design: https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=425-18624\n * states (Default + Dashboard)\n */\nconst Header: FC<HeaderProps> = ({ onBack, rightButton, style, titleRowStyle, testID, title, ...viewProps }) => {\n const colorScheme = useAppColorScheme();\n\n return (\n <View style={[styles.container, style]} testID={testID} {...viewProps}>\n {onBack && (\n <View style={styles.backButtonRow}>\n <BackButton hitSlop={backButtonHitSlop} onPress={onBack} testID={concatTestID(testID, 'back')} />\n <View />\n {rightButton}\n </View>\n )}\n\n <View\n style={[\n styles.titleRow,\n onBack ? styles.titleRow2nd : styles.titleRowNoBackButton,\n (onBack || !rightButton) && styles.titleRowNoRightButton,\n titleRowStyle,\n ]}>\n {typeof title === 'string' ? (\n <Typography\n accessibilityRole=\"header\"\n color={colorScheme.text}\n preset=\"l\"\n style={styles.title}\n testID={concatTestID(testID, 'title')}>\n {title}\n </Typography>\n ) : (\n <View style={styles.title}>{title}</View>\n )}\n\n {!onBack && rightButton && <View style={styles.rightButtonWrapper}>{rightButton}</View>}\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n backButtonRow: {\n alignItems: 'center',\n flexDirection: 'row',\n justifyContent: 'space-between',\n minHeight: 48,\n paddingHorizontal: 20,\n width: '100%',\n },\n container: {\n width: '100%',\n },\n rightButtonWrapper: {\n alignItems: 'center',\n height: 48,\n justifyContent: 'center',\n paddingHorizontal: 12,\n paddingTop: 2,\n },\n title: {\n flex: 1,\n paddingBottom: 8, // to compensate \"l\" font line-height difference\n paddingTop: 9,\n },\n titleRow: {\n flexDirection: 'row',\n paddingLeft: 20,\n paddingRight: 8,\n width: '100%',\n },\n titleRow2nd: {\n marginBottom: 12,\n },\n titleRowNoBackButton: {\n marginTop: 12,\n },\n titleRowNoRightButton: {\n paddingRight: 20,\n },\n});\n\nexport default Header;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAyB,OAAO;AAC5C,SAA4BC,UAAU,EAAEC,IAAI,QAA8B,cAAc;AAExF,SAASC,UAAU,QAAQ,YAAY;AACvC,SAASC,UAAU,QAAQ,SAAS;AACpC,SAASC,iBAAiB,QAAQ,UAAU;AAC5C,SAASC,YAAY,QAAQ,UAAU;AAUvC,MAAMC,iBAAyB,GAAG;EAAEC,GAAG,EAAE,EAAE;EAAEC,MAAM,EAAE,EAAE;EAAEC,IAAI,EAAE,EAAE;EAAEC,KAAK,EAAE;AAAG,CAAC;;AAE9E;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,MAAuB,GAAGC,IAAA,IAAgF;EAAA,IAA/E;IAAEC,MAAM;IAAEC,WAAW;IAAEC,KAAK;IAAEC,aAAa;IAAEC,MAAM;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AIf,KAAA,CAAAsB,aAAA,CAACpB,IAAI;IAACc,KAAK,EAAEQ,MAAM,CAACa;EAAmB,GAAEtB,WAAW,CAAQ,CAClF,CACF;AAEX,CAAC;AAED,MAAMS,MAAM,GAAGvB,UAAU,CAACqC,MAAM,CAAC;EAC/BZ,aAAa,EAAE;IACba,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,SAAS,EAAE,EAAE;IACbC,iBAAiB,EAAE,EAAE;IACrBC,KAAK,EAAE;EACT,CAAC;EACDnB,SAAS,EAAE;IACTmB,KAAK,EAAE;EACT,CAAC;EACDP,kBAAkB,EAAE;IAClBE,UAAU,EAAE,QAAQ;IACpBM,MAAM,EAAE,EAAE;IACVJ,cAAc,EAAE,QAAQ;IACxBE,iBAAiB,EAAE,EAAE;IACrBG,UAAU,EAAE;EACd,CAAC;EACD3B,KAAK,EAAE;IACL4B,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE,CAAC;IAAE;IAClBF,UAAU,EAAE;EACd,CAAC;EACDjB,QAAQ,EAAE;IACRW,aAAa,EAAE,KAAK;IACpBS,WAAW,EAAE,EAAE;IACfC,YAAY,EAAE,CAAC;IACfN,KAAK,EAAE;EACT,CAAC;EACDd,WAAW,EAAE;IACXqB,YAAY,EAAE;EAChB,CAAC;EACDpB,oBAAoB,EAAE;IACpBqB,SAAS,EAAE;EACb,CAAC;EACDpB,qBAAqB,EAAE;IACrBkB,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAEF,eAAetC,MAAM"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import FocusAwareStatusBar from './focus-aware-status-bar';
|
|
2
|
+
import FoldableHeader, { FoldableHeaderProps } from './foldable-header';
|
|
3
|
+
import Header, { HeaderProps } from './header';
|
|
4
|
+
import NavigationHeader, { NavigationHeaderProps } from './navigation-header';
|
|
5
|
+
export { FocusAwareStatusBar };
|
|
6
|
+
export { FoldableHeader, FoldableHeaderProps };
|
|
7
|
+
export { Header, HeaderProps };
|
|
8
|
+
export { NavigationHeader, NavigationHeaderProps };
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FocusAwareStatusBar","FoldableHeader","FoldableHeaderProps","Header","HeaderProps","NavigationHeader","NavigationHeaderProps"],"sources":["index.ts"],"sourcesContent":["import FocusAwareStatusBar from './focus-aware-status-bar';\nimport FoldableHeader, { FoldableHeaderProps } from './foldable-header';\nimport Header, { HeaderProps } from './header';\nimport NavigationHeader, { NavigationHeaderProps } from './navigation-header';\n\nexport { FocusAwareStatusBar };\nexport { FoldableHeader, FoldableHeaderProps };\nexport { Header, HeaderProps };\nexport { NavigationHeader, NavigationHeaderProps };\n"],"mappings":"AAAA,OAAOA,mBAAmB,MAAM,0BAA0B;AAC1D,OAAOC,cAAc,IAAIC,mBAAmB,QAAQ,mBAAmB;AACvE,OAAOC,MAAM,IAAIC,WAAW,QAAQ,UAAU;AAC9C,OAAOC,gBAAgB,IAAIC,qBAAqB,QAAQ,qBAAqB;AAE7E,SAASN,mBAAmB;AAC5B,SAASC,cAAc,EAAEC,mBAAmB;AAC5C,SAASC,MAAM,EAAEC,WAAW;AAC5B,SAASC,gBAAgB,EAAEC,qBAAqB"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { Animated, Easing, StyleSheet, View } from 'react-native';
|
|
4
|
+
import BlurView from '../blur/blur-view';
|
|
5
|
+
import Typography from '../text/typography';
|
|
6
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
7
|
+
import { concatTestID } from '../utils';
|
|
8
|
+
const NavigationHeader = _ref => {
|
|
9
|
+
var _backgroundColor;
|
|
10
|
+
let {
|
|
11
|
+
animate = false,
|
|
12
|
+
backgroundColor,
|
|
13
|
+
blurred = false,
|
|
14
|
+
leftItem,
|
|
15
|
+
modalHandleVisible,
|
|
16
|
+
rightItem,
|
|
17
|
+
style,
|
|
18
|
+
testID,
|
|
19
|
+
title,
|
|
20
|
+
titleVisible = true,
|
|
21
|
+
titleColor,
|
|
22
|
+
...props
|
|
23
|
+
} = _ref;
|
|
24
|
+
const colorScheme = useAppColorScheme();
|
|
25
|
+
const [titleOpacity] = useState(() => new Animated.Value(titleVisible ? 1 : 0));
|
|
26
|
+
const [sideItemWidth, setSideItemWidth] = useState();
|
|
27
|
+
const onSideItemLayout = useCallback(_ref2 => {
|
|
28
|
+
let {
|
|
29
|
+
nativeEvent: {
|
|
30
|
+
layout
|
|
31
|
+
}
|
|
32
|
+
} = _ref2;
|
|
33
|
+
return setSideItemWidth(prev => Math.max(layout.width, prev !== null && prev !== void 0 ? prev : 0));
|
|
34
|
+
}, []);
|
|
35
|
+
backgroundColor = (_backgroundColor = backgroundColor) !== null && _backgroundColor !== void 0 ? _backgroundColor : colorScheme.background;
|
|
36
|
+
const leftItemView = useMemo(() => {
|
|
37
|
+
if (!leftItem) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
if ( /*#__PURE__*/React.isValidElement(leftItem)) {
|
|
41
|
+
return leftItem;
|
|
42
|
+
} else {
|
|
43
|
+
const LeftItemComponent = leftItem;
|
|
44
|
+
return /*#__PURE__*/React.createElement(LeftItemComponent, null);
|
|
45
|
+
}
|
|
46
|
+
}, [leftItem]);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (animate) {
|
|
49
|
+
Animated.timing(titleOpacity, {
|
|
50
|
+
duration: 150,
|
|
51
|
+
easing: Easing.ease,
|
|
52
|
+
toValue: titleVisible ? 1 : 0,
|
|
53
|
+
useNativeDriver: true
|
|
54
|
+
}).start();
|
|
55
|
+
} else {
|
|
56
|
+
titleOpacity.setValue(titleVisible ? 1 : 0);
|
|
57
|
+
}
|
|
58
|
+
}, [animate, titleOpacity, titleVisible]);
|
|
59
|
+
const rightItemView = useMemo(() => {
|
|
60
|
+
if (!rightItem) {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
if ( /*#__PURE__*/React.isValidElement(rightItem)) {
|
|
64
|
+
return rightItem;
|
|
65
|
+
} else {
|
|
66
|
+
const RightItemComponent = rightItem;
|
|
67
|
+
return /*#__PURE__*/React.createElement(RightItemComponent, null);
|
|
68
|
+
}
|
|
69
|
+
}, [rightItem]);
|
|
70
|
+
const titleAnimatedStyle = {
|
|
71
|
+
opacity: titleOpacity
|
|
72
|
+
};
|
|
73
|
+
return /*#__PURE__*/React.createElement(View, _extends({}, props, {
|
|
74
|
+
style: [styles.headerContainer, !blurred ? {
|
|
75
|
+
backgroundColor
|
|
76
|
+
} : undefined, style],
|
|
77
|
+
testID: testID
|
|
78
|
+
}), blurred && /*#__PURE__*/React.createElement(BlurView, {
|
|
79
|
+
blurAmount: 10,
|
|
80
|
+
blurStyle: "header",
|
|
81
|
+
color: backgroundColor,
|
|
82
|
+
style: StyleSheet.absoluteFill
|
|
83
|
+
}), modalHandleVisible && /*#__PURE__*/React.createElement(View, {
|
|
84
|
+
style: [styles.modalHandle, {
|
|
85
|
+
backgroundColor: colorScheme.grayDark
|
|
86
|
+
}]
|
|
87
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
88
|
+
style: styles.header
|
|
89
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
90
|
+
onLayout: onSideItemLayout,
|
|
91
|
+
style: [styles.sideItem, {
|
|
92
|
+
minWidth: sideItemWidth
|
|
93
|
+
}]
|
|
94
|
+
}, leftItemView), /*#__PURE__*/React.createElement(Animated.View, {
|
|
95
|
+
style: [styles.title, titleAnimatedStyle]
|
|
96
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
97
|
+
color: titleColor !== null && titleColor !== void 0 ? titleColor : colorScheme.text,
|
|
98
|
+
preset: "m/heading",
|
|
99
|
+
align: "center",
|
|
100
|
+
numberOfLines: 1,
|
|
101
|
+
testID: concatTestID(testID, 'title')
|
|
102
|
+
}, title)), /*#__PURE__*/React.createElement(View, {
|
|
103
|
+
onLayout: onSideItemLayout,
|
|
104
|
+
style: [styles.sideItem, styles.rightSideItem, {
|
|
105
|
+
minWidth: sideItemWidth
|
|
106
|
+
}]
|
|
107
|
+
}, rightItemView)));
|
|
108
|
+
};
|
|
109
|
+
const styles = StyleSheet.create({
|
|
110
|
+
header: {
|
|
111
|
+
alignItems: 'center',
|
|
112
|
+
flexDirection: 'row',
|
|
113
|
+
height: 48,
|
|
114
|
+
width: '100%'
|
|
115
|
+
},
|
|
116
|
+
headerContainer: {
|
|
117
|
+
alignItems: 'center',
|
|
118
|
+
flexDirection: 'column',
|
|
119
|
+
paddingHorizontal: 8
|
|
120
|
+
},
|
|
121
|
+
modalHandle: {
|
|
122
|
+
borderRadius: 2.5,
|
|
123
|
+
height: 5,
|
|
124
|
+
marginVertical: 5,
|
|
125
|
+
width: 36
|
|
126
|
+
},
|
|
127
|
+
rightSideItem: {
|
|
128
|
+
alignItems: 'flex-end'
|
|
129
|
+
},
|
|
130
|
+
sideItem: {
|
|
131
|
+
padding: 12
|
|
132
|
+
},
|
|
133
|
+
title: {
|
|
134
|
+
flex: 1
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
export default NavigationHeader;
|
|
138
|
+
//# sourceMappingURL=navigation-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useMemo","useState","Animated","Easing","StyleSheet","View","BlurView","Typography","useAppColorScheme","concatTestID","NavigationHeader","_ref","_backgroundColor","animate","backgroundColor","blurred","leftItem","modalHandleVisible","rightItem","style","testID","title","titleVisible","titleColor","props","colorScheme","titleOpacity","Value","sideItemWidth","setSideItemWidth","onSideItemLayout","_ref2","nativeEvent","layout","prev","Math","max","width","background","leftItemView","undefined","isValidElement","LeftItemComponent","createElement","timing","duration","easing","ease","toValue","useNativeDriver","start","setValue","rightItemView","RightItemComponent","titleAnimatedStyle","opacity","_extends","styles","headerContainer","blurAmount","blurStyle","color","absoluteFill","modalHandle","grayDark","header","onLayout","sideItem","minWidth","text","preset","align","numberOfLines","rightSideItem","create","alignItems","flexDirection","height","paddingHorizontal","borderRadius","marginVertical","padding","flex"],"sources":["navigation-header.tsx"],"sourcesContent":["import React, { FC, useCallback, useEffect, useMemo, useState } from 'react';\nimport { Animated, ColorValue, Easing, LayoutChangeEvent, StyleSheet, View, ViewProps, ViewStyle } from 'react-native';\n\nimport BlurView from '../blur/blur-view';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\nimport { concatTestID } from '../utils';\n\nexport type NavigationHeaderProps = ViewProps & {\n animate?: boolean;\n backgroundColor?: ColorValue;\n blurred?: boolean;\n leftItem?: React.ComponentType<any> | React.ReactElement;\n modalHandleVisible?: boolean;\n rightItem?: React.ComponentType<any> | React.ReactElement;\n title?: string;\n titleColor?: string;\n titleVisible?: boolean;\n};\n\nconst NavigationHeader: FC<NavigationHeaderProps> = ({\n animate = false,\n backgroundColor,\n blurred = false,\n leftItem,\n modalHandleVisible,\n rightItem,\n style,\n testID,\n title,\n titleVisible = true,\n titleColor,\n ...props\n}) => {\n const colorScheme = useAppColorScheme();\n const [titleOpacity] = useState(() => new Animated.Value(titleVisible ? 1 : 0));\n\n const [sideItemWidth, setSideItemWidth] = useState<number>();\n const onSideItemLayout = useCallback(\n ({ nativeEvent: { layout } }: LayoutChangeEvent) => setSideItemWidth((prev) => Math.max(layout.width, prev ?? 0)),\n [],\n );\n\n backgroundColor = backgroundColor ?? colorScheme.background;\n\n const leftItemView: React.ReactElement | undefined = useMemo(() => {\n if (!leftItem) {\n return undefined;\n }\n if (React.isValidElement(leftItem)) {\n return leftItem;\n } else {\n const LeftItemComponent = leftItem as React.ComponentType<any>;\n return <LeftItemComponent />;\n }\n }, [leftItem]);\n\n useEffect(() => {\n if (animate) {\n Animated.timing(titleOpacity, {\n duration: 150,\n easing: Easing.ease,\n toValue: titleVisible ? 1 : 0,\n useNativeDriver: true,\n }).start();\n } else {\n titleOpacity.setValue(titleVisible ? 1 : 0);\n }\n }, [animate, titleOpacity, titleVisible]);\n\n const rightItemView: React.ReactElement | undefined = useMemo(() => {\n if (!rightItem) {\n return undefined;\n }\n if (React.isValidElement(rightItem)) {\n return rightItem;\n } else {\n const RightItemComponent = rightItem as React.ComponentType<any>;\n return <RightItemComponent />;\n }\n }, [rightItem]);\n\n const titleAnimatedStyle: Animated.WithAnimatedObject<ViewStyle> = {\n opacity: titleOpacity,\n };\n\n return (\n <View\n {...props}\n style={[styles.headerContainer, !blurred ? { backgroundColor } : undefined, style]}\n testID={testID}>\n {blurred && (\n <BlurView blurAmount={10} blurStyle=\"header\" color={backgroundColor} style={StyleSheet.absoluteFill} />\n )}\n {modalHandleVisible && <View style={[styles.modalHandle, { backgroundColor: colorScheme.grayDark }]} />}\n <View style={styles.header}>\n <View onLayout={onSideItemLayout} style={[styles.sideItem, { minWidth: sideItemWidth }]}>\n {leftItemView}\n </View>\n <Animated.View style={[styles.title, titleAnimatedStyle]}>\n <Typography\n color={titleColor ?? colorScheme.text}\n preset=\"m/heading\"\n align=\"center\"\n numberOfLines={1}\n testID={concatTestID(testID, 'title')}>\n {title}\n </Typography>\n </Animated.View>\n <View onLayout={onSideItemLayout} style={[styles.sideItem, styles.rightSideItem, { minWidth: sideItemWidth }]}>\n {rightItemView}\n </View>\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n header: {\n alignItems: 'center',\n flexDirection: 'row',\n height: 48,\n width: '100%',\n },\n headerContainer: {\n alignItems: 'center',\n flexDirection: 'column',\n paddingHorizontal: 8,\n },\n modalHandle: {\n borderRadius: 2.5,\n height: 5,\n marginVertical: 5,\n width: 36,\n },\n rightSideItem: {\n alignItems: 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Y,CAACW,MAAM,EAAE,OAAO;EAAE,GACrCC,KAAK,CACK,CACC,eAChBxB,KAAA,CAAA8C,aAAA,CAACtC,IAAI;IAAC6D,QAAQ,EAAEpC,gBAAiB;IAACX,KAAK,EAAE,CAACsC,MAAM,CAACU,QAAQ,EAAEV,MAAM,CAACgB,aAAa,EAAE;MAAEL,QAAQ,EAAExC;IAAc,CAAC;EAAE,GAC3GwB,aAAa,CACT,CACF,CACF;AAEX,CAAC;AAED,MAAMK,MAAM,GAAGrD,UAAU,CAACsE,MAAM,CAAC;EAC/BT,MAAM,EAAE;IACNU,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,KAAK;IACpBC,MAAM,EAAE,EAAE;IACVxC,KAAK,EAAE;EACT,CAAC;EACDqB,eAAe,EAAE;IACfiB,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,QAAQ;IACvBE,iBAAiB,EAAE;EACrB,CAAC;EACDf,WAAW,EAAE;IACXgB,YAAY,EAAE,GAAG;IACjBF,MAAM,EAAE,CAAC;IACTG,cAAc,EAAE,CAAC;IACjB3C,KAAK,EAAE;EACT,CAAC;EACDoC,aAAa,EAAE;IACbE,UAAU,EAAE;EACd,CAAC;EACDR,QAAQ,EAAE;IACRc,OAAO,EAAE;EACX,CAAC;EACD5D,KAAK,EAAE;IACL6D,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,eAAexE,gBAAgB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { StyleSheet, View } from 'react-native';
|
|
3
|
+
import Typography from '../text/typography';
|
|
4
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
5
|
+
import { concatTestID } from '../utils/testID';
|
|
6
|
+
const DataItem = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
attribute,
|
|
9
|
+
value,
|
|
10
|
+
valueColor,
|
|
11
|
+
valueIcon,
|
|
12
|
+
multiline,
|
|
13
|
+
last,
|
|
14
|
+
testID,
|
|
15
|
+
style,
|
|
16
|
+
...props
|
|
17
|
+
} = _ref;
|
|
18
|
+
const colorScheme = useAppColorScheme();
|
|
19
|
+
return /*#__PURE__*/React.createElement(View, _extends({
|
|
20
|
+
style: [styles.dataItem, {
|
|
21
|
+
borderColor: colorScheme.background
|
|
22
|
+
}, last && styles.last, style],
|
|
23
|
+
testID: testID
|
|
24
|
+
}, props), /*#__PURE__*/React.createElement(Typography, {
|
|
25
|
+
color: colorScheme.text,
|
|
26
|
+
preset: "xs/line-height-small",
|
|
27
|
+
style: styles.dataItemLabel,
|
|
28
|
+
testID: concatTestID(testID, 'title')
|
|
29
|
+
}, attribute), /*#__PURE__*/React.createElement(View, {
|
|
30
|
+
style: styles.value
|
|
31
|
+
}, valueIcon, /*#__PURE__*/React.createElement(Typography, {
|
|
32
|
+
color: valueColor !== null && valueColor !== void 0 ? valueColor : colorScheme.text,
|
|
33
|
+
numberOfLines: multiline ? undefined : 1,
|
|
34
|
+
preset: "s",
|
|
35
|
+
style: valueIcon ? styles.valueLabel : undefined,
|
|
36
|
+
testID: concatTestID(testID, 'value')
|
|
37
|
+
}, value)));
|
|
38
|
+
};
|
|
39
|
+
const styles = StyleSheet.create({
|
|
40
|
+
dataItem: {
|
|
41
|
+
borderBottomWidth: 1,
|
|
42
|
+
paddingVertical: 10
|
|
43
|
+
},
|
|
44
|
+
dataItemLabel: {
|
|
45
|
+
marginBottom: 4,
|
|
46
|
+
opacity: 0.7
|
|
47
|
+
},
|
|
48
|
+
last: {
|
|
49
|
+
borderBottomWidth: 0
|
|
50
|
+
},
|
|
51
|
+
value: {
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
flexDirection: 'row'
|
|
54
|
+
},
|
|
55
|
+
valueLabel: {
|
|
56
|
+
marginLeft: 4
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
export default DataItem;
|
|
60
|
+
//# sourceMappingURL=data-item.js.map
|