@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,90 @@
|
|
|
1
|
+
import { barcode } from 'pure-svg-code';
|
|
2
|
+
import QRCode from 'qrcode-svg';
|
|
3
|
+
import React, { FC, useMemo } from 'react';
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { SvgXml } from 'react-native-svg';
|
|
6
|
+
|
|
7
|
+
import Typography from '../text/typography';
|
|
8
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
9
|
+
|
|
10
|
+
const styles = StyleSheet.create({
|
|
11
|
+
barcodeBackground: {
|
|
12
|
+
alignSelf: 'center',
|
|
13
|
+
backgroundColor: 'white',
|
|
14
|
+
borderRadius: 5,
|
|
15
|
+
},
|
|
16
|
+
barcodeContent: {
|
|
17
|
+
margin: 12,
|
|
18
|
+
},
|
|
19
|
+
container: {
|
|
20
|
+
flex: 1,
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
},
|
|
23
|
+
mrzBackground: {
|
|
24
|
+
backgroundColor: 'white',
|
|
25
|
+
paddingHorizontal: 12,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
type BarcodeProps = {
|
|
30
|
+
content: string;
|
|
31
|
+
height?: number;
|
|
32
|
+
testID?: string;
|
|
33
|
+
width?: number;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const Barcode: FC<BarcodeProps> = ({ content, width = 220, height = 80, testID }) => {
|
|
37
|
+
const colorScheme = useAppColorScheme();
|
|
38
|
+
const barcodeXml = useMemo(
|
|
39
|
+
() =>
|
|
40
|
+
barcode(content, 'code128', {
|
|
41
|
+
barHeight: height,
|
|
42
|
+
bgColor: colorScheme.white,
|
|
43
|
+
width: width,
|
|
44
|
+
}),
|
|
45
|
+
[content, colorScheme, height, width],
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<View style={styles.container}>
|
|
50
|
+
<View style={styles.barcodeBackground}>
|
|
51
|
+
<SvgXml
|
|
52
|
+
height={height}
|
|
53
|
+
style={[styles.barcodeBackground, styles.barcodeContent]}
|
|
54
|
+
testID={testID}
|
|
55
|
+
width={width}
|
|
56
|
+
xml={barcodeXml}
|
|
57
|
+
/>
|
|
58
|
+
</View>
|
|
59
|
+
</View>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
type QrCodeProps = {
|
|
64
|
+
content: string;
|
|
65
|
+
padding?: number;
|
|
66
|
+
testID?: string;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const QrCode: FC<QrCodeProps> = ({ content, padding, testID }) => {
|
|
70
|
+
const qrCodeXml = useMemo(() => {
|
|
71
|
+
return new QRCode({
|
|
72
|
+
container: 'svg-viewbox',
|
|
73
|
+
content,
|
|
74
|
+
join: true,
|
|
75
|
+
padding: padding ?? 1,
|
|
76
|
+
}).svg();
|
|
77
|
+
}, [content, padding]);
|
|
78
|
+
return <SvgXml height={'100%'} testID={testID} width={'100%'} xml={qrCodeXml} />;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const Mrz: FC<{ content: string; testID?: string }> = ({ content, testID }) => {
|
|
82
|
+
const colorScheme = useAppColorScheme();
|
|
83
|
+
return (
|
|
84
|
+
<View style={[styles.container, styles.mrzBackground]}>
|
|
85
|
+
<Typography color={colorScheme.text} preset={'s/code'} testID={testID}>
|
|
86
|
+
{content}
|
|
87
|
+
</Typography>
|
|
88
|
+
</View>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import CredentialAttributeItem, {
|
|
2
|
+
CredentialAttribute,
|
|
3
|
+
CredentialAttributeItemProps,
|
|
4
|
+
CredentialAttributeValue,
|
|
5
|
+
} from './credential-attribute-item';
|
|
6
|
+
import { Barcode, Mrz, QrCode } from './credential-carousel-images';
|
|
7
|
+
import Selector from './selector';
|
|
8
|
+
import { SelectorStatus } from './selector-status';
|
|
9
|
+
|
|
10
|
+
export { CredentialAttribute, CredentialAttributeItem, CredentialAttributeItemProps, CredentialAttributeValue };
|
|
11
|
+
export { Barcode, Mrz, QrCode };
|
|
12
|
+
export { Selector, SelectorStatus };
|
|
13
|
+
export * from './card';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import CredentialAttributeSelector from './selector';
|
|
5
|
+
import { SelectorStatus } from './selector-status';
|
|
6
|
+
|
|
7
|
+
const Basic: ComponentStory<typeof CredentialAttributeSelector> = (args) => <CredentialAttributeSelector {...args} />;
|
|
8
|
+
Basic.args = {
|
|
9
|
+
status: SelectorStatus.SelectedCheckmark,
|
|
10
|
+
style: { margin: 12 },
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { Basic as Selector };
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
title: 'credential/Selector',
|
|
17
|
+
component: CredentialAttributeSelector,
|
|
18
|
+
argTypes: {
|
|
19
|
+
status: {
|
|
20
|
+
options: [
|
|
21
|
+
SelectorStatus.Empty,
|
|
22
|
+
SelectorStatus.SelectedRadio,
|
|
23
|
+
SelectorStatus.SelectedCheckmark,
|
|
24
|
+
SelectorStatus.Required,
|
|
25
|
+
SelectorStatus.Disabled,
|
|
26
|
+
SelectorStatus.Rejected,
|
|
27
|
+
],
|
|
28
|
+
control: { type: 'radio' },
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
parameters: {
|
|
32
|
+
design: {
|
|
33
|
+
type: 'figma',
|
|
34
|
+
url: 'https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=433-28352&mode=design&t=91K8am4RSNRB8qgZ-0',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
} as ComponentMeta<typeof CredentialAttributeSelector>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React, { FC, useMemo } from 'react';
|
|
2
|
+
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { SelectorIcon } from '../icons/selector';
|
|
5
|
+
import { useAppColorScheme } from '../theme';
|
|
6
|
+
import { concatTestID } from '../utils/testID';
|
|
7
|
+
import { SelectorStatus } from './selector-status';
|
|
8
|
+
|
|
9
|
+
interface SelectorProps {
|
|
10
|
+
status: SelectorStatus;
|
|
11
|
+
style?: StyleProp<ViewStyle>;
|
|
12
|
+
testID?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Generic selector display
|
|
17
|
+
*
|
|
18
|
+
* Following the design: https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=433-28352&mode=design&t=91K8am4RSNRB8qgZ-0
|
|
19
|
+
*/
|
|
20
|
+
const Selector: FC<SelectorProps> = ({ status, style, testID }) => {
|
|
21
|
+
const colorScheme = useAppColorScheme();
|
|
22
|
+
|
|
23
|
+
const statusStyle = useMemo<StyleProp<ViewStyle>>(() => {
|
|
24
|
+
switch (status) {
|
|
25
|
+
case SelectorStatus.Empty:
|
|
26
|
+
return [styles.bordered, { backgroundColor: colorScheme.white, borderColor: colorScheme.grayDark }];
|
|
27
|
+
case SelectorStatus.SelectedRadio:
|
|
28
|
+
return [styles.selectedRadio, { backgroundColor: colorScheme.white, borderColor: colorScheme.accent }];
|
|
29
|
+
case SelectorStatus.SelectedCheckmark:
|
|
30
|
+
return { backgroundColor: colorScheme.accent };
|
|
31
|
+
case SelectorStatus.Disabled:
|
|
32
|
+
return [styles.bordered, { backgroundColor: colorScheme.background, borderColor: colorScheme.grayDark }];
|
|
33
|
+
default:
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
}, [colorScheme, status]);
|
|
37
|
+
|
|
38
|
+
const checked = status === SelectorStatus.SelectedCheckmark || status === SelectorStatus.Required;
|
|
39
|
+
const rejected = status === SelectorStatus.Rejected;
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<View testID={testID} style={[styles.wrapper, statusStyle, style]}>
|
|
43
|
+
{(checked || rejected) && <SelectorIcon testID={concatTestID(testID, 'status', status)} status={status} />}
|
|
44
|
+
</View>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const styles = StyleSheet.create({
|
|
49
|
+
bordered: {
|
|
50
|
+
borderWidth: 1,
|
|
51
|
+
},
|
|
52
|
+
selectedRadio: {
|
|
53
|
+
borderWidth: 8,
|
|
54
|
+
},
|
|
55
|
+
wrapper: {
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
borderRadius: 12,
|
|
58
|
+
height: 24,
|
|
59
|
+
justifyContent: 'center',
|
|
60
|
+
width: 24,
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export default Selector;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { ComponentMeta, Story } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Insets, StyleSheet } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { Placeholder } from '../../storybook/placeholder';
|
|
6
|
+
import { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';
|
|
7
|
+
import DetailScreen, { DetailScreenProps } from './detail';
|
|
8
|
+
|
|
9
|
+
type Args = DetailScreenProps & {
|
|
10
|
+
contentHeight?: number;
|
|
11
|
+
onRightAction?: () => void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const hitSlop: Insets = { top: 8, bottom: 12, left: 24, right: 24 };
|
|
15
|
+
|
|
16
|
+
const Basic: Story<Args> = ({ onRightAction, contentHeight, headerProps }) => {
|
|
17
|
+
return (
|
|
18
|
+
<DetailScreen
|
|
19
|
+
headerProps={{
|
|
20
|
+
...headerProps,
|
|
21
|
+
rightButton: (
|
|
22
|
+
<TouchableOpacity onPress={onRightAction} hitSlop={hitSlop}>
|
|
23
|
+
<Placeholder id="R" style={styles.rightButton} />
|
|
24
|
+
</TouchableOpacity>
|
|
25
|
+
),
|
|
26
|
+
}}>
|
|
27
|
+
<Placeholder id="Content" style={[contentHeight ? { height: contentHeight } : styles.content]} />
|
|
28
|
+
</DetailScreen>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
Basic.args = {
|
|
33
|
+
headerProps: {
|
|
34
|
+
title: 'Title',
|
|
35
|
+
onBack: () => {},
|
|
36
|
+
},
|
|
37
|
+
contentHeight: 0,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { Basic as DetailScreen };
|
|
41
|
+
|
|
42
|
+
export default {
|
|
43
|
+
title: 'view/Detail Screen',
|
|
44
|
+
component: DetailScreen,
|
|
45
|
+
parameters: {
|
|
46
|
+
noSafeArea: true,
|
|
47
|
+
design: {
|
|
48
|
+
type: 'figma',
|
|
49
|
+
url: 'https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=466-138689',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
argTypes: {
|
|
53
|
+
onRightAction: { action: 'onRightAction' },
|
|
54
|
+
},
|
|
55
|
+
} as ComponentMeta<typeof DetailScreen>;
|
|
56
|
+
|
|
57
|
+
const styles = StyleSheet.create({
|
|
58
|
+
content: {
|
|
59
|
+
flex: 1,
|
|
60
|
+
},
|
|
61
|
+
rightButton: {
|
|
62
|
+
height: 24,
|
|
63
|
+
width: 24,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import React, { FunctionComponent, PropsWithChildren, useCallback, useState } from 'react';
|
|
2
|
+
import { LayoutChangeEvent, ScrollView, ScrollViewProps, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
|
|
3
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
+
|
|
5
|
+
import { Header, HeaderProps } from '../header';
|
|
6
|
+
import { useAppColorScheme } from '../theme';
|
|
7
|
+
import { concatTestID } from '../utils/testID';
|
|
8
|
+
|
|
9
|
+
type StaticContentProps = {
|
|
10
|
+
staticContent: true;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
type DynamicContentProps = {
|
|
14
|
+
staticContent?: false;
|
|
15
|
+
scrollViewProps?: ScrollViewProps;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type DetailScreenProps = {
|
|
19
|
+
testID?: string;
|
|
20
|
+
headerProps: HeaderProps;
|
|
21
|
+
style?: StyleProp<ViewStyle>;
|
|
22
|
+
contentStyle?: StyleProp<ViewStyle>;
|
|
23
|
+
} & (StaticContentProps | DynamicContentProps);
|
|
24
|
+
|
|
25
|
+
const DetailScreen: FunctionComponent<PropsWithChildren<DetailScreenProps>> = ({
|
|
26
|
+
children,
|
|
27
|
+
staticContent,
|
|
28
|
+
contentStyle,
|
|
29
|
+
testID,
|
|
30
|
+
style,
|
|
31
|
+
headerProps,
|
|
32
|
+
}) => {
|
|
33
|
+
const colorScheme = useAppColorScheme();
|
|
34
|
+
const insets = useSafeAreaInsets();
|
|
35
|
+
const bottomPadding = Math.max(insets.bottom, 24);
|
|
36
|
+
|
|
37
|
+
const [layoutHeight, setLayoutHeight] = useState<number>(0);
|
|
38
|
+
const layoutHandler = useCallback((event: LayoutChangeEvent) => {
|
|
39
|
+
setLayoutHeight(event.nativeEvent.layout.height);
|
|
40
|
+
}, []);
|
|
41
|
+
|
|
42
|
+
const [headerHeight, setHeaderHeight] = useState<number>(0);
|
|
43
|
+
const headerLayoutHandler = useCallback((event: LayoutChangeEvent) => {
|
|
44
|
+
setHeaderHeight(event.nativeEvent.layout.height);
|
|
45
|
+
}, []);
|
|
46
|
+
|
|
47
|
+
const contentHeight = layoutHeight && headerHeight ? layoutHeight - headerHeight - insets.top : undefined;
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<View
|
|
51
|
+
testID={testID}
|
|
52
|
+
onLayout={layoutHandler}
|
|
53
|
+
onAccessibilityEscape={() => {}}
|
|
54
|
+
style={[styles.container, { paddingTop: insets.top, backgroundColor: colorScheme.background }]}>
|
|
55
|
+
<Header onLayout={headerLayoutHandler} {...headerProps} />
|
|
56
|
+
{contentHeight ? (
|
|
57
|
+
staticContent ? (
|
|
58
|
+
<View
|
|
59
|
+
testID={concatTestID(testID, 'content')}
|
|
60
|
+
style={[styles.contentWrapper, styles.staticContent, { height: contentHeight }, style]}>
|
|
61
|
+
{children}
|
|
62
|
+
</View>
|
|
63
|
+
) : (
|
|
64
|
+
<ScrollView
|
|
65
|
+
testID={concatTestID(testID, 'content')}
|
|
66
|
+
showsVerticalScrollIndicator={false}
|
|
67
|
+
alwaysBounceVertical={false}
|
|
68
|
+
contentContainerStyle={{ minHeight: contentHeight }}
|
|
69
|
+
style={style}>
|
|
70
|
+
<View
|
|
71
|
+
style={[styles.contentWrapper, styles.scrollableContent, { paddingBottom: bottomPadding }, contentStyle]}>
|
|
72
|
+
{children}
|
|
73
|
+
</View>
|
|
74
|
+
</ScrollView>
|
|
75
|
+
)
|
|
76
|
+
) : null}
|
|
77
|
+
</View>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const styles = StyleSheet.create({
|
|
82
|
+
container: {
|
|
83
|
+
height: '100%',
|
|
84
|
+
width: '100%',
|
|
85
|
+
},
|
|
86
|
+
contentWrapper: {
|
|
87
|
+
paddingHorizontal: 24,
|
|
88
|
+
paddingTop: 20,
|
|
89
|
+
},
|
|
90
|
+
scrollableContent: {
|
|
91
|
+
flex: 1,
|
|
92
|
+
},
|
|
93
|
+
staticContent: {
|
|
94
|
+
width: '100%',
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
export default DetailScreen;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ComponentMeta, Story } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { EntityTrustedIcon } from '../icons/entity';
|
|
5
|
+
import Avatar, { AvatarProps } from './avatar';
|
|
6
|
+
|
|
7
|
+
type Args = AvatarProps & {
|
|
8
|
+
withStatusIcon: boolean;
|
|
9
|
+
withImage: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const Basic: Story<Args> = ({ withStatusIcon, withImage, ...args }) => {
|
|
13
|
+
return (
|
|
14
|
+
<Avatar
|
|
15
|
+
{...args}
|
|
16
|
+
avatar={withImage ? { imageSource: { uri: 'https://i.pravatar.cc/72' } } : undefined}
|
|
17
|
+
statusIcon={withStatusIcon ? EntityTrustedIcon : undefined}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
Basic.args = {
|
|
23
|
+
placeholderText: 'A',
|
|
24
|
+
withStatusIcon: true,
|
|
25
|
+
withImage: true,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { Basic as Avatar };
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
title: 'component/entity/Avatar',
|
|
32
|
+
component: Avatar,
|
|
33
|
+
parameters: {
|
|
34
|
+
design: {
|
|
35
|
+
type: 'figma',
|
|
36
|
+
url: 'https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=426-25581&mode=design&t=YI1oD2BfBie5HcvJ-0',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
} as ComponentMeta<typeof Avatar>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import React, { ComponentType, FunctionComponent, ReactElement, useMemo } from 'react';
|
|
2
|
+
import { StyleSheet, View, ViewProps } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import ImageOrComponent, { ImageOrComponentSource } from '../image/image-or-component';
|
|
5
|
+
import Typography from '../text/typography';
|
|
6
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
7
|
+
|
|
8
|
+
export type AvatarProps = ViewProps & {
|
|
9
|
+
avatar?: ImageOrComponentSource;
|
|
10
|
+
placeholderText?: string;
|
|
11
|
+
statusIcon?: ComponentType<any> | ReactElement;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=426-25581&mode=design&t=YI1oD2BfBie5HcvJ-0
|
|
15
|
+
const Avatar: FunctionComponent<AvatarProps> = ({ avatar, placeholderText, statusIcon, style, ...viewProps }) => {
|
|
16
|
+
const colorScheme = useAppColorScheme();
|
|
17
|
+
|
|
18
|
+
const statusIconView: React.ReactElement | undefined = useMemo(() => {
|
|
19
|
+
if (!statusIcon) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
if (React.isValidElement(statusIcon)) {
|
|
23
|
+
return statusIcon;
|
|
24
|
+
} else {
|
|
25
|
+
const StatusIconComponent = statusIcon as React.ComponentType<any>;
|
|
26
|
+
return <StatusIconComponent />;
|
|
27
|
+
}
|
|
28
|
+
}, [statusIcon]);
|
|
29
|
+
|
|
30
|
+
const imageSource = useMemo<ImageOrComponentSource>(() => {
|
|
31
|
+
if (avatar) {
|
|
32
|
+
return avatar;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
component: (
|
|
37
|
+
<View style={[styles.avatarPlaceholder, { backgroundColor: colorScheme.accent }]}>
|
|
38
|
+
<Typography color={colorScheme.accentText} style={styles.avatarPlaceholderText}>
|
|
39
|
+
{placeholderText}
|
|
40
|
+
</Typography>
|
|
41
|
+
</View>
|
|
42
|
+
),
|
|
43
|
+
};
|
|
44
|
+
}, [colorScheme, avatar, placeholderText]);
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<View accessibilityElementsHidden={true} style={[styles.avatar, style]} {...viewProps}>
|
|
48
|
+
<View style={styles.imageWrapper}>
|
|
49
|
+
<ImageOrComponent source={imageSource} style={styles.image} />
|
|
50
|
+
</View>
|
|
51
|
+
{statusIconView && <View style={styles.statusIcon}>{statusIconView}</View>}
|
|
52
|
+
</View>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const styles = StyleSheet.create({
|
|
57
|
+
avatar: {
|
|
58
|
+
height: 72,
|
|
59
|
+
width: 72,
|
|
60
|
+
},
|
|
61
|
+
avatarPlaceholder: {
|
|
62
|
+
alignItems: 'center',
|
|
63
|
+
flex: 1,
|
|
64
|
+
justifyContent: 'center',
|
|
65
|
+
},
|
|
66
|
+
avatarPlaceholderText: {
|
|
67
|
+
textTransform: 'uppercase',
|
|
68
|
+
},
|
|
69
|
+
image: {
|
|
70
|
+
backgroundColor: 'orange',
|
|
71
|
+
height: '100%',
|
|
72
|
+
width: '100%',
|
|
73
|
+
},
|
|
74
|
+
imageWrapper: {
|
|
75
|
+
borderRadius: 36,
|
|
76
|
+
height: '100%',
|
|
77
|
+
overflow: 'hidden',
|
|
78
|
+
width: '100%',
|
|
79
|
+
},
|
|
80
|
+
statusIcon: {
|
|
81
|
+
bottom: 4,
|
|
82
|
+
position: 'absolute',
|
|
83
|
+
right: 4,
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
export default Avatar;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ComponentMeta, Story } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { EntityTrustedIcon } from '../icons/entity';
|
|
5
|
+
import EntityCluster, { EntityClusterProps } from './entity-cluster';
|
|
6
|
+
|
|
7
|
+
type Args = EntityClusterProps & {
|
|
8
|
+
withStatusIcon: boolean;
|
|
9
|
+
withImage: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const Basic: Story<Args> = ({ withStatusIcon, withImage, ...args }) => {
|
|
13
|
+
return (
|
|
14
|
+
<EntityCluster
|
|
15
|
+
{...args}
|
|
16
|
+
avatar={{
|
|
17
|
+
avatar: withImage ? { imageSource: { uri: 'https://i.pravatar.cc/72' } } : undefined,
|
|
18
|
+
statusIcon: withStatusIcon ? EntityTrustedIcon : undefined,
|
|
19
|
+
}}
|
|
20
|
+
/>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
Basic.args = {
|
|
25
|
+
entityName: 'Entity name',
|
|
26
|
+
subline: 'entity detail',
|
|
27
|
+
withStatusIcon: true,
|
|
28
|
+
withImage: true,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { Basic as EntityCluster };
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
title: 'component/entity/EntityCluster',
|
|
35
|
+
component: EntityCluster,
|
|
36
|
+
parameters: {
|
|
37
|
+
design: {
|
|
38
|
+
type: 'figma',
|
|
39
|
+
url: 'https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=426-25595&mode=design&t=YI1oD2BfBie5HcvJ-0',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
} as ComponentMeta<typeof EntityCluster>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React, { FunctionComponent, useMemo } from 'react';
|
|
2
|
+
import { StyleSheet, View, ViewProps } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import Typography from '../text/typography';
|
|
5
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
6
|
+
import { concatTestID } from '../utils';
|
|
7
|
+
import Avatar, { AvatarProps } from './avatar';
|
|
8
|
+
|
|
9
|
+
export type EntityClusterProps = ViewProps & {
|
|
10
|
+
avatar?: AvatarProps;
|
|
11
|
+
entityName: string;
|
|
12
|
+
subline?: string;
|
|
13
|
+
textColor?: string;
|
|
14
|
+
testID?: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=426-25595&mode=design&t=YI1oD2BfBie5HcvJ-0
|
|
18
|
+
const EntityCluster: FunctionComponent<EntityClusterProps> = ({
|
|
19
|
+
avatar,
|
|
20
|
+
entityName,
|
|
21
|
+
subline,
|
|
22
|
+
textColor,
|
|
23
|
+
style,
|
|
24
|
+
testID,
|
|
25
|
+
...viewProps
|
|
26
|
+
}) => {
|
|
27
|
+
const colorScheme = useAppColorScheme();
|
|
28
|
+
|
|
29
|
+
const avatarProps = useMemo<AvatarProps>(() => {
|
|
30
|
+
const initials = entityName.split(' ', 3).map((word: string) => word[0]);
|
|
31
|
+
const placeholderText = initials.length > 0 ? initials.join('') : '';
|
|
32
|
+
return {
|
|
33
|
+
...avatar,
|
|
34
|
+
placeholderText: avatar?.placeholderText ?? placeholderText,
|
|
35
|
+
};
|
|
36
|
+
}, [avatar, entityName]);
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<View style={[styles.entity, style]} testID={testID} {...viewProps}>
|
|
40
|
+
<Avatar {...avatarProps} />
|
|
41
|
+
<View style={styles.labels}>
|
|
42
|
+
<Typography
|
|
43
|
+
testID={concatTestID(testID, 'entityName')}
|
|
44
|
+
color={textColor ?? colorScheme.text}
|
|
45
|
+
numberOfLines={2}
|
|
46
|
+
preset="m">
|
|
47
|
+
{entityName}
|
|
48
|
+
</Typography>
|
|
49
|
+
{subline && (
|
|
50
|
+
<View>
|
|
51
|
+
<Typography testID={concatTestID(testID, 'subline')} color={textColor ?? colorScheme.text} preset="xs">
|
|
52
|
+
{subline}
|
|
53
|
+
</Typography>
|
|
54
|
+
</View>
|
|
55
|
+
)}
|
|
56
|
+
</View>
|
|
57
|
+
</View>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const styles = StyleSheet.create({
|
|
62
|
+
entity: {
|
|
63
|
+
alignItems: 'center',
|
|
64
|
+
flexDirection: 'row',
|
|
65
|
+
},
|
|
66
|
+
labels: {
|
|
67
|
+
flex: 1,
|
|
68
|
+
marginLeft: 12,
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export default EntityCluster;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useIsFocused } from '@react-navigation/native';
|
|
2
|
+
import React, { FunctionComponent } from 'react';
|
|
3
|
+
import { StatusBar, StatusBarProps } from 'react-native';
|
|
4
|
+
|
|
5
|
+
const FocusAwareStatusBar: FunctionComponent<StatusBarProps> = (props) => {
|
|
6
|
+
const isFocused = useIsFocused();
|
|
7
|
+
return isFocused ? <StatusBar animated={true} {...props} /> : null;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default FocusAwareStatusBar;
|