@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,69 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import Typography from '../text/typography';
|
|
4
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
5
|
+
const styles = StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
flexDirection: 'row',
|
|
9
|
+
height: 60,
|
|
10
|
+
justifyContent: 'center',
|
|
11
|
+
width: '100%'
|
|
12
|
+
},
|
|
13
|
+
icon: {
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
borderRadius: 18,
|
|
16
|
+
height: 36,
|
|
17
|
+
justifyContent: 'center',
|
|
18
|
+
marginRight: 12,
|
|
19
|
+
width: 36
|
|
20
|
+
},
|
|
21
|
+
label: {
|
|
22
|
+
flex: 1,
|
|
23
|
+
marginBottom: 0,
|
|
24
|
+
marginTop: 0
|
|
25
|
+
},
|
|
26
|
+
wrapper: {
|
|
27
|
+
justifyContent: 'center',
|
|
28
|
+
marginHorizontal: 16,
|
|
29
|
+
paddingHorizontal: 12
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const SettingItem = _ref => {
|
|
33
|
+
let {
|
|
34
|
+
title,
|
|
35
|
+
icon,
|
|
36
|
+
style,
|
|
37
|
+
children
|
|
38
|
+
} = _ref;
|
|
39
|
+
const colorScheme = useAppColorScheme();
|
|
40
|
+
const iconView = useMemo(() => {
|
|
41
|
+
if (!icon) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
if ( /*#__PURE__*/React.isValidElement(icon)) {
|
|
45
|
+
return icon;
|
|
46
|
+
} else {
|
|
47
|
+
const IconComponent = icon;
|
|
48
|
+
return /*#__PURE__*/React.createElement(IconComponent, null);
|
|
49
|
+
}
|
|
50
|
+
}, [icon]);
|
|
51
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
52
|
+
style: [styles.wrapper, {
|
|
53
|
+
backgroundColor: colorScheme.white
|
|
54
|
+
}, style]
|
|
55
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
56
|
+
style: styles.container
|
|
57
|
+
}, iconView && /*#__PURE__*/React.createElement(View, {
|
|
58
|
+
style: [styles.icon, {
|
|
59
|
+
backgroundColor: colorScheme.background
|
|
60
|
+
}]
|
|
61
|
+
}, iconView), /*#__PURE__*/React.createElement(Typography, {
|
|
62
|
+
accessible: false,
|
|
63
|
+
color: colorScheme.text,
|
|
64
|
+
preset: "s",
|
|
65
|
+
style: styles.label
|
|
66
|
+
}, title), children));
|
|
67
|
+
};
|
|
68
|
+
export default SettingItem;
|
|
69
|
+
//# sourceMappingURL=setting-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useMemo","StyleSheet","View","Typography","useAppColorScheme","styles","create","container","alignItems","flexDirection","height","justifyContent","width","icon","borderRadius","marginRight","label","flex","marginBottom","marginTop","wrapper","marginHorizontal","paddingHorizontal","SettingItem","_ref","title","style","children","colorScheme","iconView","undefined","isValidElement","IconComponent","createElement","backgroundColor","white","background","accessible","color","text","preset"],"sources":["setting-item.tsx"],"sourcesContent":["import React, { ComponentType, FunctionComponent, PropsWithChildren, ReactElement, useMemo } from 'react';\nimport { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nconst styles = StyleSheet.create({\n container: {\n alignItems: 'center',\n flexDirection: 'row',\n height: 60,\n justifyContent: 'center',\n width: '100%',\n },\n icon: {\n alignItems: 'center',\n borderRadius: 18,\n height: 36,\n justifyContent: 'center',\n marginRight: 12,\n width: 36,\n },\n label: {\n flex: 1,\n marginBottom: 0,\n marginTop: 0,\n },\n wrapper: {\n justifyContent: 'center',\n marginHorizontal: 16,\n paddingHorizontal: 12,\n },\n});\n\nexport type SettingItemProps = {\n icon?: ComponentType<any> | ReactElement;\n style?: StyleProp<ViewStyle>;\n title: string;\n};\n\nconst SettingItem: FunctionComponent<PropsWithChildren<SettingItemProps>> = ({ title, icon, style, children }) => {\n const colorScheme = useAppColorScheme();\n const iconView: React.ReactElement | undefined = useMemo(() => {\n if (!icon) {\n return undefined;\n }\n if (React.isValidElement(icon)) {\n return icon;\n } else {\n const IconComponent = icon as React.ComponentType<any>;\n return <IconComponent />;\n }\n }, [icon]);\n\n return (\n <View style={[styles.wrapper, { backgroundColor: colorScheme.white }, style]}>\n <View style={styles.container}>\n {iconView && <View style={[styles.icon, { backgroundColor: colorScheme.background }]}>{iconView}</View>}\n <Typography accessible={false} color={colorScheme.text} preset=\"s\" style={styles.label}>\n {title}\n </Typography>\n {children}\n </View>\n </View>\n );\n};\n\nexport default SettingItem;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAuEC,OAAO,QAAQ,OAAO;AACzG,SAAoBC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAErE,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,+BAA+B;AAEjE,MAAMC,MAAM,GAAGJ,UAAU,CAACK,MAAM,CAAC;EAC/BC,SAAS,EAAE;IACTC,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,KAAK;IACpBC,MAAM,EAAE,EAAE;IACVC,cAAc,EAAE,QAAQ;IACxBC,KAAK,EAAE;EACT,CAAC;EACDC,IAAI,EAAE;IACJL,UAAU,EAAE,QAAQ;IACpBM,YAAY,EAAE,EAAE;IAChBJ,MAAM,EAAE,EAAE;IACVC,cAAc,EAAE,QAAQ;IACxBI,WAAW,EAAE,EAAE;IACfH,KAAK,EAAE;EACT,CAAC;EACDI,KAAK,EAAE;IACLC,IAAI,EAAE,CAAC;IACPC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE;EACb,CAAC;EACDC,OAAO,EAAE;IACPT,cAAc,EAAE,QAAQ;IACxBU,gBAAgB,EAAE,EAAE;IACpBC,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC;AAQF,MAAMC,WAAmE,GAAGC,IAAA,IAAsC;EAAA,IAArC;IAAEC,KAAK;IAAEZ,IAAI;IAAEa,KAAK;IAAEC;EAAS,CAAC,GAAAH,IAAA;EAC3G,MAAMI,WAAW,GAAGxB,iBAAiB,EAAE;EACvC,MAAMyB,QAAwC,GAAG7B,OAAO,CAAC,MAAM;IAC7D,IAAI,CAACa,IAAI,EAAE;MACT,OAAOiB,SAAS;IAClB;IACA,kBAAI/B,KAAK,CAACgC,cAAc,CAAClB,IAAI,CAAC,EAAE;MAC9B,OAAOA,IAAI;IACb,CAAC,MAAM;MACL,MAAMmB,aAAa,GAAGnB,IAAgC;MACtD,oBAAOd,KAAA,CAAAkC,aAAA,CAACD,aAAa,OAAG;IAC1B;EACF,CAAC,EAAE,CAACnB,IAAI,CAAC,CAAC;EAEV,oBACEd,KAAA,CAAAkC,aAAA,CAAC/B,IAAI;IAACwB,KAAK,EAAE,CAACrB,MAAM,CAACe,OAAO,EAAE;MAAEc,eAAe,EAAEN,WAAW,CAACO;IAAM,CAAC,EAAET,KAAK;EAAE,gBAC3E3B,KAAA,CAAAkC,aAAA,CAAC/B,IAAI;IAACwB,KAAK,EAAErB,MAAM,CAACE;EAAU,GAC3BsB,QAAQ,iBAAI9B,KAAA,CAAAkC,aAAA,CAAC/B,IAAI;IAACwB,KAAK,EAAE,CAACrB,MAAM,CAACQ,IAAI,EAAE;MAAEqB,eAAe,EAAEN,WAAW,CAACQ;IAAW,CAAC;EAAE,GAAEP,QAAQ,CAAQ,eACvG9B,KAAA,CAAAkC,aAAA,CAAC9B,UAAU;IAACkC,UAAU,EAAE,KAAM;IAACC,KAAK,EAAEV,WAAW,CAACW,IAAK;IAACC,MAAM,EAAC,GAAG;IAACd,KAAK,EAAErB,MAAM,CAACW;EAAM,GACpFS,KAAK,CACK,EACZE,QAAQ,CACJ,CACF;AAEX,CAAC;AAED,eAAeJ,WAAW"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 } from 'react-native';
|
|
4
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
5
|
+
import ButtonSetting from './button-setting';
|
|
6
|
+
const SettingsButton = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
style,
|
|
9
|
+
...props
|
|
10
|
+
} = _ref;
|
|
11
|
+
const colorScheme = useAppColorScheme();
|
|
12
|
+
return /*#__PURE__*/React.createElement(ButtonSetting, _extends({
|
|
13
|
+
style: [styles.button, {
|
|
14
|
+
backgroundColor: colorScheme.background
|
|
15
|
+
}, style]
|
|
16
|
+
}, props));
|
|
17
|
+
};
|
|
18
|
+
const styles = StyleSheet.create({
|
|
19
|
+
button: {
|
|
20
|
+
borderRadius: 12,
|
|
21
|
+
height: 68,
|
|
22
|
+
marginHorizontal: 0,
|
|
23
|
+
paddingHorizontal: 12
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export default SettingsButton;
|
|
27
|
+
//# sourceMappingURL=settings-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","useAppColorScheme","ButtonSetting","SettingsButton","_ref","style","props","colorScheme","createElement","_extends","styles","button","backgroundColor","background","create","borderRadius","height","marginHorizontal","paddingHorizontal"],"sources":["settings-button.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleSheet } from 'react-native';\n\nimport { useAppColorScheme } from '../theme/color-scheme-context';\nimport ButtonSetting, { ButtonSettingProps } from './button-setting';\n\nexport type SettingsButtonProps = ButtonSettingProps;\n\nconst SettingsButton: FC<SettingsButtonProps> = ({ style, ...props }) => {\n const colorScheme = useAppColorScheme();\n return <ButtonSetting style={[styles.button, { backgroundColor: colorScheme.background }, style]} {...props} />;\n};\n\nconst styles = StyleSheet.create({\n button: {\n borderRadius: 12,\n height: 68,\n marginHorizontal: 0,\n paddingHorizontal: 12,\n },\n});\n\nexport default SettingsButton;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAc,OAAO;AACjC,SAASC,UAAU,QAAQ,cAAc;AAEzC,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE,OAAOC,aAAa,MAA8B,kBAAkB;AAIpE,MAAMC,cAAuC,GAAGC,IAAA,IAAyB;EAAA,IAAxB;IAAEC,KAAK;IAAE,GAAGC;EAAM,CAAC,GAAAF,IAAA;EAClE,MAAMG,WAAW,GAAGN,iBAAiB,EAAE;EACvC,oBAAOF,KAAA,CAAAS,aAAA,CAACN,aAAa,EAAAO,QAAA;IAACJ,KAAK,EAAE,CAACK,MAAM,CAACC,MAAM,EAAE;MAAEC,eAAe,EAAEL,WAAW,CAACM;IAAW,CAAC,EAAER,KAAK;EAAE,GAAKC,KAAK,EAAI;AACjH,CAAC;AAED,MAAMI,MAAM,GAAGV,UAAU,CAACc,MAAM,CAAC;EAC/BH,MAAM,EAAE;IACNI,YAAY,EAAE,EAAE;IAChBC,MAAM,EAAE,EAAE;IACVC,gBAAgB,EAAE,CAAC;IACnBC,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC;AAEF,eAAef,cAAc"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Switch } from '../control/switch';
|
|
3
|
+
import SettingItem from './setting-item';
|
|
4
|
+
const SwitchSetting = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
title,
|
|
7
|
+
value,
|
|
8
|
+
onChange,
|
|
9
|
+
icon,
|
|
10
|
+
style,
|
|
11
|
+
disabled = false,
|
|
12
|
+
testID
|
|
13
|
+
} = _ref;
|
|
14
|
+
return /*#__PURE__*/React.createElement(SettingItem, {
|
|
15
|
+
icon: icon,
|
|
16
|
+
style: style,
|
|
17
|
+
title: title
|
|
18
|
+
}, /*#__PURE__*/React.createElement(Switch, {
|
|
19
|
+
accessibilityLabel: title,
|
|
20
|
+
disabled: disabled,
|
|
21
|
+
onChange: onChange,
|
|
22
|
+
testID: testID,
|
|
23
|
+
value: value
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
export default SwitchSetting;
|
|
27
|
+
//# sourceMappingURL=switch-setting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Switch","SettingItem","SwitchSetting","_ref","title","value","onChange","icon","style","disabled","testID","createElement","accessibilityLabel"],"sources":["switch-setting.tsx"],"sourcesContent":["import React, { ComponentType, FunctionComponent, ReactElement } from 'react';\nimport type { StyleProp, ViewStyle } from 'react-native';\n\nimport { Switch } from '../control/switch';\nimport SettingItem from './setting-item';\n\nexport type SwitchSettingProps = {\n disabled?: boolean;\n icon?: ComponentType<any> | ReactElement;\n onChange: (newValue: boolean) => void;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n title: string;\n value: boolean;\n};\n\nconst SwitchSetting: FunctionComponent<SwitchSettingProps> = ({\n title,\n value,\n onChange,\n icon,\n style,\n disabled = false,\n testID,\n}) => {\n return (\n <SettingItem icon={icon} style={style} title={title}>\n <Switch accessibilityLabel={title} disabled={disabled} onChange={onChange} testID={testID} value={value} />\n </SettingItem>\n );\n};\n\nexport default SwitchSetting;\n"],"mappings":"AAAA,OAAOA,KAAK,MAA0D,OAAO;AAG7E,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,WAAW,MAAM,gBAAgB;AAYxC,MAAMC,aAAoD,GAAGC,IAAA,IAQvD;EAAA,IARwD;IAC5DC,KAAK;IACLC,KAAK;IACLC,QAAQ;IACRC,IAAI;IACJC,KAAK;IACLC,QAAQ,GAAG,KAAK;IAChBC;EACF,CAAC,GAAAP,IAAA;EACC,oBACEJ,KAAA,CAAAY,aAAA,CAACV,WAAW;IAACM,IAAI,EAAEA,IAAK;IAACC,KAAK,EAAEA,KAAM;IAACJ,KAAK,EAAEA;EAAM,gBAClDL,KAAA,CAAAY,aAAA,CAACX,MAAM;IAACY,kBAAkB,EAAER,KAAM;IAACK,QAAQ,EAAEA,QAAS;IAACH,QAAQ,EAAEA,QAAS;IAACI,MAAM,EAAEA,MAAO;IAACL,KAAK,EAAEA;EAAM,EAAG,CAC/F;AAElB,CAAC;AAED,eAAeH,aAAa"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { ScrollViewScreen } from '..';
|
|
4
|
+
import { Button } from '../buttons';
|
|
5
|
+
import { CredentialWarningIcon } from '../icons';
|
|
6
|
+
import { Typography } from '../text';
|
|
7
|
+
import { useAppColorScheme } from '../theme';
|
|
8
|
+
const ErrorScreen = _ref => {
|
|
9
|
+
let {
|
|
10
|
+
testID,
|
|
11
|
+
title,
|
|
12
|
+
subtitle,
|
|
13
|
+
button
|
|
14
|
+
} = _ref;
|
|
15
|
+
const colorScheme = useAppColorScheme();
|
|
16
|
+
return /*#__PURE__*/React.createElement(ScrollViewScreen, {
|
|
17
|
+
header: {
|
|
18
|
+
static: true,
|
|
19
|
+
title: title
|
|
20
|
+
},
|
|
21
|
+
modalPresentation: true,
|
|
22
|
+
scrollView: {
|
|
23
|
+
testID
|
|
24
|
+
}
|
|
25
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
26
|
+
style: [styles.wrapper, {
|
|
27
|
+
backgroundColor: colorScheme.background
|
|
28
|
+
}]
|
|
29
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
30
|
+
style: styles.warning
|
|
31
|
+
}, /*#__PURE__*/React.createElement(CredentialWarningIcon, {
|
|
32
|
+
height: 42,
|
|
33
|
+
width: 42
|
|
34
|
+
}), /*#__PURE__*/React.createElement(Typography, {
|
|
35
|
+
color: colorScheme.text,
|
|
36
|
+
preset: "regular",
|
|
37
|
+
style: styles.message
|
|
38
|
+
}, subtitle)), button ? /*#__PURE__*/React.createElement(Button, {
|
|
39
|
+
disabled: button.disabled,
|
|
40
|
+
onPress: button.onPress,
|
|
41
|
+
testID: button.testID,
|
|
42
|
+
title: button.label
|
|
43
|
+
}) : undefined));
|
|
44
|
+
};
|
|
45
|
+
const styles = StyleSheet.create({
|
|
46
|
+
message: {
|
|
47
|
+
textAlign: 'center'
|
|
48
|
+
},
|
|
49
|
+
warning: {
|
|
50
|
+
alignItems: 'center',
|
|
51
|
+
display: 'flex',
|
|
52
|
+
flexGrow: 1,
|
|
53
|
+
justifyContent: 'center'
|
|
54
|
+
},
|
|
55
|
+
wrapper: {
|
|
56
|
+
display: 'flex',
|
|
57
|
+
flexDirection: 'column',
|
|
58
|
+
height: '100%',
|
|
59
|
+
paddingHorizontal: 16
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export default ErrorScreen;
|
|
63
|
+
//# sourceMappingURL=error-screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","ScrollViewScreen","Button","CredentialWarningIcon","Typography","useAppColorScheme","ErrorScreen","_ref","testID","title","subtitle","button","colorScheme","createElement","header","static","modalPresentation","scrollView","style","styles","wrapper","backgroundColor","background","warning","height","width","color","text","preset","message","disabled","onPress","label","undefined","create","textAlign","alignItems","display","flexGrow","justifyContent","flexDirection","paddingHorizontal"],"sources":["error-screen.tsx"],"sourcesContent":["import React, { FunctionComponent } from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport { ScrollViewScreen } from '..';\nimport { Button } from '../buttons';\nimport { CredentialWarningIcon } from '../icons';\nimport { Typography } from '../text';\nimport { useAppColorScheme } from '../theme';\n\nexport interface ErrorScreenButton {\n testID?: string;\n label: string;\n disabled?: boolean;\n onPress?: () => void;\n}\n\nexport interface ErrorScreenProps {\n testID?: string;\n title: string;\n subtitle: string;\n button: ErrorScreenButton;\n}\n\nconst ErrorScreen: FunctionComponent<ErrorScreenProps> = ({ testID, title, subtitle, button }) => {\n const colorScheme = useAppColorScheme();\n\n return (\n <ScrollViewScreen\n header={{\n static: true,\n title: title,\n }}\n modalPresentation\n scrollView={{\n testID,\n }}>\n <View style={[styles.wrapper, { backgroundColor: colorScheme.background }]}>\n <View style={styles.warning}>\n <CredentialWarningIcon height={42} width={42} />\n <Typography color={colorScheme.text} preset=\"regular\" style={styles.message}>\n {subtitle}\n </Typography>\n </View>\n\n {button ? (\n <Button disabled={button.disabled} onPress={button.onPress} testID={button.testID} title={button.label} />\n ) : undefined}\n </View>\n </ScrollViewScreen>\n );\n};\n\nconst styles = StyleSheet.create({\n message: {\n textAlign: 'center',\n },\n warning: {\n alignItems: 'center',\n display: 'flex',\n flexGrow: 1,\n justifyContent: 'center',\n },\n wrapper: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n paddingHorizontal: 16,\n },\n});\n\nexport default ErrorScreen;\n"],"mappings":"AAAA,OAAOA,KAAK,MAA6B,OAAO;AAChD,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,SAASC,gBAAgB,QAAQ,IAAI;AACrC,SAASC,MAAM,QAAQ,YAAY;AACnC,SAASC,qBAAqB,QAAQ,UAAU;AAChD,SAASC,UAAU,QAAQ,SAAS;AACpC,SAASC,iBAAiB,QAAQ,UAAU;AAgB5C,MAAMC,WAAgD,GAAGC,IAAA,IAAyC;EAAA,IAAxC;IAAEC,MAAM;IAAEC,KAAK;IAAEC,QAAQ;IAAEC;EAAO,CAAC,GAAAJ,IAAA;EAC3F,MAAMK,WAAW,GAAGP,iBAAiB,EAAE;EAEvC,oBACEP,KAAA,CAAAe,aAAA,CAACZ,gBAAgB;IACfa,MAAM,EAAE;MACNC,MAAM,EAAE,IAAI;MACZN,KAAK,EAAEA;IACT,CAAE;IACFO,iBAAiB;IACjBC,UAAU,EAAE;MACVT;IACF;EAAE,gBACFV,KAAA,CAAAe,aAAA,CAACb,IAAI;IAACkB,KAAK,EAAE,CAACC,MAAM,CAACC,OAAO,EAAE;MAAEC,eAAe,EAAET,WAAW,CAACU;IAAW,CAAC;EAAE,gBACzExB,KAAA,CAAAe,aAAA,CAACb,IAAI;IAACkB,KAAK,EAAEC,MAAM,CAACI;EAAQ,gBAC1BzB,KAAA,CAAAe,aAAA,CAACV,qBAAqB;IAACqB,MAAM,EAAE,EAAG;IAACC,KAAK,EAAE;EAAG,EAAG,eAChD3B,KAAA,CAAAe,aAAA,CAACT,UAAU;IAACsB,KAAK,EAAEd,WAAW,CAACe,IAAK;IAACC,MAAM,EAAC,SAAS;IAACV,KAAK,EAAEC,MAAM,CAACU;EAAQ,GACzEnB,QAAQ,CACE,CACR,EAENC,MAAM,gBACLb,KAAA,CAAAe,aAAA,CAACX,MAAM;IAAC4B,QAAQ,EAAEnB,MAAM,CAACmB,QAAS;IAACC,OAAO,EAAEpB,MAAM,CAACoB,OAAQ;IAACvB,MAAM,EAAEG,MAAM,CAACH,MAAO;IAACC,KAAK,EAAEE,MAAM,CAACqB;EAAM,EAAG,GACxGC,SAAS,CACR,CACU;AAEvB,CAAC;AAED,MAAMd,MAAM,GAAGpB,UAAU,CAACmC,MAAM,CAAC;EAC/BL,OAAO,EAAE;IACPM,SAAS,EAAE;EACb,CAAC;EACDZ,OAAO,EAAE;IACPa,UAAU,EAAE,QAAQ;IACpBC,OAAO,EAAE,MAAM;IACfC,QAAQ,EAAE,CAAC;IACXC,cAAc,EAAE;EAClB,CAAC;EACDnB,OAAO,EAAE;IACPiB,OAAO,EAAE,MAAM;IACfG,aAAa,EAAE,QAAQ;IACvBhB,MAAM,EAAE,MAAM;IACdiB,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC;AAEF,eAAenC,WAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ErrorScreen","ErrorScreenButton","ErrorScreenProps"],"sources":["index.ts"],"sourcesContent":["import ErrorScreen, { ErrorScreenButton, ErrorScreenProps } from './error-screen';\n\nexport { ErrorScreen, ErrorScreenButton, ErrorScreenProps };\n"],"mappings":"AAAA,OAAOA,WAAW,IAAIC,iBAAiB,EAAEC,gBAAgB,QAAQ,gBAAgB;AAEjF,SAASF,WAAW,EAAEC,iBAAiB,EAAEC,gBAAgB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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, { useEffect } from 'react';
|
|
3
|
+
import { Text } from 'react-native';
|
|
4
|
+
import { useAccessibilityAnnouncementCumulative } from '../accessibility/accessibility';
|
|
5
|
+
export const BaseText = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
6
|
+
let {
|
|
7
|
+
align = 'left',
|
|
8
|
+
color,
|
|
9
|
+
style,
|
|
10
|
+
children,
|
|
11
|
+
announcementActive,
|
|
12
|
+
announcementCumulative,
|
|
13
|
+
onAnnouncementFinished,
|
|
14
|
+
...props
|
|
15
|
+
} = _ref;
|
|
16
|
+
const announcementFinished = useAccessibilityAnnouncementCumulative(announcementActive && typeof children === 'string' ? children : undefined, announcementCumulative);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
onAnnouncementFinished === null || onAnnouncementFinished === void 0 ? void 0 : onAnnouncementFinished(announcementFinished);
|
|
19
|
+
}, [announcementFinished, onAnnouncementFinished]);
|
|
20
|
+
const baseStyle = {
|
|
21
|
+
textAlign: align,
|
|
22
|
+
color
|
|
23
|
+
};
|
|
24
|
+
return /*#__PURE__*/React.createElement(Text, _extends({
|
|
25
|
+
ref: ref,
|
|
26
|
+
style: [baseStyle, style],
|
|
27
|
+
maxFontSizeMultiplier: 2
|
|
28
|
+
}, props), children);
|
|
29
|
+
});
|
|
30
|
+
BaseText.displayName = 'BaseText';
|
|
31
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","Text","useAccessibilityAnnouncementCumulative","BaseText","forwardRef","_ref","ref","align","color","style","children","announcementActive","announcementCumulative","onAnnouncementFinished","props","announcementFinished","undefined","baseStyle","textAlign","createElement","_extends","maxFontSizeMultiplier","displayName"],"sources":["base.tsx"],"sourcesContent":["import React, { PropsWithChildren, useEffect } from 'react';\nimport { ColorValue, StyleProp, Text, TextProps, TextStyle } from 'react-native';\n\nimport { useAccessibilityAnnouncementCumulative } from '../accessibility/accessibility';\n\nexport type BaseTextProps = TextProps & {\n align?: 'center' | 'left' | 'right';\n color: ColorValue;\n style?: StyleProp<TextStyle>;\n\n /* accessibility automatic voice-over */\n announcementActive?: boolean;\n announcementCumulative?: boolean;\n /* only supported (fired) on iOS */\n onAnnouncementFinished?: (finished: boolean) => void;\n};\n\nexport const BaseText = React.forwardRef<Text, PropsWithChildren<BaseTextProps>>(\n (\n {\n align = 'left',\n color,\n style,\n children,\n announcementActive,\n announcementCumulative,\n onAnnouncementFinished,\n ...props\n },\n ref,\n ) => {\n const announcementFinished = useAccessibilityAnnouncementCumulative(\n announcementActive && typeof children === 'string' ? (children as string) : undefined,\n announcementCumulative,\n );\n useEffect(() => {\n onAnnouncementFinished?.(announcementFinished);\n }, [announcementFinished, onAnnouncementFinished]);\n\n const baseStyle: TextStyle = {\n textAlign: align,\n color,\n };\n\n return (\n <Text ref={ref} style={[baseStyle, style]} maxFontSizeMultiplier={2} {...props}>\n {children}\n </Text>\n );\n },\n);\n\nBaseText.displayName = 'BaseText';\n"],"mappings":";AAAA,OAAOA,KAAK,IAAuBC,SAAS,QAAQ,OAAO;AAC3D,SAAgCC,IAAI,QAA8B,cAAc;AAEhF,SAASC,sCAAsC,QAAQ,gCAAgC;AAcvF,OAAO,MAAMC,QAAQ,gBAAGJ,KAAK,CAACK,UAAU,CACtC,CAAAC,IAAA,EAWEC,GAAG,KACA;EAAA,IAXH;IACEC,KAAK,GAAG,MAAM;IACdC,KAAK;IACLC,KAAK;IACLC,QAAQ;IACRC,kBAAkB;IAClBC,sBAAsB;IACtBC,sBAAsB;IACtB,GAAGC;EACL,CAAC,GAAAT,IAAA;EAGD,MAAMU,oBAAoB,GAAGb,sCAAsC,CACjES,kBAAkB,IAAI,OAAOD,QAAQ,KAAK,QAAQ,GAAIA,QAAQ,GAAcM,SAAS,EACrFJ,sBAAsB,CACvB;EACDZ,SAAS,CAAC,MAAM;IACda,sBAAsB,aAAtBA,sBAAsB,uBAAtBA,sBAAsB,CAAGE,oBAAoB,CAAC;EAChD,CAAC,EAAE,CAACA,oBAAoB,EAAEF,sBAAsB,CAAC,CAAC;EAElD,MAAMI,SAAoB,GAAG;IAC3BC,SAAS,EAAEX,KAAK;IAChBC;EACF,CAAC;EAED,oBACET,KAAA,CAAAoB,aAAA,CAAClB,IAAI,EAAAmB,QAAA;IAACd,GAAG,EAAEA,GAAI;IAACG,KAAK,EAAE,CAACQ,SAAS,EAAER,KAAK,CAAE;IAACY,qBAAqB,EAAE;EAAE,GAAKP,KAAK,GAC3EJ,QAAQ,CACJ;AAEX,CAAC,CACF;AAEDP,QAAQ,CAACmB,WAAW,GAAG,UAAU"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
var FontFace;
|
|
3
|
+
(function (FontFace) {
|
|
4
|
+
FontFace["OpenSans"] = "Open Sans";
|
|
5
|
+
FontFace["IBMPlexMono"] = "IBM Plex Mono";
|
|
6
|
+
FontFace["ProcivisBook"] = "Procivis-Book";
|
|
7
|
+
})(FontFace || (FontFace = {}));
|
|
8
|
+
var FontWeight;
|
|
9
|
+
(function (FontWeight) {
|
|
10
|
+
FontWeight["Medium"] = "500";
|
|
11
|
+
FontWeight["Regular"] = "400";
|
|
12
|
+
})(FontWeight || (FontWeight = {}));
|
|
13
|
+
// generate styles for a font with given weight and style
|
|
14
|
+
export const fontFactory = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
face,
|
|
17
|
+
weight
|
|
18
|
+
} = _ref;
|
|
19
|
+
if (Platform.OS === 'android') {
|
|
20
|
+
var _Object$values$Object;
|
|
21
|
+
const filePrefix = (_Object$values$Object = Object.values(FontFace)[Object.values(FontFace).indexOf(face)]) === null || _Object$values$Object === void 0 ? void 0 : _Object$values$Object.replace(' ', '');
|
|
22
|
+
if (!weight) {
|
|
23
|
+
return {
|
|
24
|
+
fontFamily: filePrefix
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
const fileSuffix = Object.keys(FontWeight)[Object.values(FontWeight).indexOf(weight)];
|
|
28
|
+
return {
|
|
29
|
+
fontFamily: `${filePrefix}-${fileSuffix}`
|
|
30
|
+
};
|
|
31
|
+
} else {
|
|
32
|
+
return {
|
|
33
|
+
fontFamily: face,
|
|
34
|
+
fontWeight: weight
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const font = {
|
|
39
|
+
regular: fontFactory({
|
|
40
|
+
face: FontFace.OpenSans,
|
|
41
|
+
weight: FontWeight.Regular
|
|
42
|
+
}),
|
|
43
|
+
medium: fontFactory({
|
|
44
|
+
face: FontFace.OpenSans,
|
|
45
|
+
weight: FontWeight.Medium
|
|
46
|
+
}),
|
|
47
|
+
code: fontFactory({
|
|
48
|
+
face: FontFace.IBMPlexMono,
|
|
49
|
+
weight: FontWeight.Regular
|
|
50
|
+
}),
|
|
51
|
+
heading: fontFactory({
|
|
52
|
+
face: FontFace.ProcivisBook
|
|
53
|
+
})
|
|
54
|
+
};
|
|
55
|
+
export default font;
|
|
56
|
+
//# sourceMappingURL=font.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","FontFace","FontWeight","fontFactory","_ref","face","weight","OS","_Object$values$Object","filePrefix","Object","values","indexOf","replace","fontFamily","fileSuffix","keys","fontWeight","font","regular","OpenSans","Regular","medium","Medium","code","IBMPlexMono","heading","ProcivisBook"],"sources":["font.ts"],"sourcesContent":["import { Platform, TextStyle } from 'react-native';\n\nexport interface FontStyle {\n fontFamily?: string;\n fontWeight?: TextStyle['fontWeight'];\n}\n\nenum FontFace {\n OpenSans = 'Open Sans',\n IBMPlexMono = 'IBM Plex Mono',\n ProcivisBook = 'Procivis-Book',\n}\n\nenum FontWeight {\n Medium = '500',\n Regular = '400',\n}\n\nexport interface FontFactoryProps {\n face: FontFace;\n weight?: FontWeight;\n}\n\n// generate styles for a font with given weight and style\nexport const fontFactory = ({ face, weight }: FontFactoryProps): FontStyle => {\n if (Platform.OS === 'android') {\n const filePrefix = Object.values(FontFace)[Object.values(FontFace).indexOf(face)]?.replace(' ', '');\n if (!weight) {\n return {\n fontFamily: filePrefix,\n };\n }\n const fileSuffix = Object.keys(FontWeight)[Object.values(FontWeight).indexOf(weight)];\n return {\n fontFamily: `${filePrefix}-${fileSuffix}`,\n };\n } else {\n return {\n fontFamily: face,\n fontWeight: weight,\n };\n }\n};\n\nconst font = {\n regular: fontFactory({ face: FontFace.OpenSans, weight: FontWeight.Regular }),\n medium: fontFactory({ face: FontFace.OpenSans, weight: FontWeight.Medium }),\n code: fontFactory({ face: FontFace.IBMPlexMono, weight: FontWeight.Regular }),\n heading: fontFactory({ face: FontFace.ProcivisBook }),\n};\n\nexport default font;\n"],"mappings":"AAAA,SAASA,QAAQ,QAAmB,cAAc;AAAC,IAO9CC,QAAQ;AAAA,WAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;AAAA,GAARA,QAAQ,KAARA,QAAQ;AAAA,IAMRC,UAAU;AAAA,WAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;AAAA,GAAVA,UAAU,KAAVA,UAAU;AAUf;AACA,OAAO,MAAMC,WAAW,GAAGC,IAAA,IAAmD;EAAA,IAAlD;IAAEC,IAAI;IAAEC;EAAyB,CAAC,GAAAF,IAAA;EAC5D,IAAIJ,QAAQ,CAACO,EAAE,KAAK,SAAS,EAAE;IAAA,IAAAC,qBAAA;IAC7B,MAAMC,UAAU,IAAAD,qBAAA,GAAGE,MAAM,CAACC,MAAM,CAACV,QAAQ,CAAC,CAACS,MAAM,CAACC,MAAM,CAACV,QAAQ,CAAC,CAACW,OAAO,CAACP,IAAI,CAAC,CAAC,cAAAG,qBAAA,uBAA9DA,qBAAA,CAAgEK,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;IACnG,IAAI,CAACP,MAAM,EAAE;MACX,OAAO;QACLQ,UAAU,EAAEL;MACd,CAAC;IACH;IACA,MAAMM,UAAU,GAAGL,MAAM,CAACM,IAAI,CAACd,UAAU,CAAC,CAACQ,MAAM,CAACC,MAAM,CAACT,UAAU,CAAC,CAACU,OAAO,CAACN,MAAM,CAAC,CAAC;IACrF,OAAO;MACLQ,UAAU,EAAG,GAAEL,UAAW,IAAGM,UAAW;IAC1C,CAAC;EACH,CAAC,MAAM;IACL,OAAO;MACLD,UAAU,EAAET,IAAI;MAChBY,UAAU,EAAEX;IACd,CAAC;EACH;AACF,CAAC;AAED,MAAMY,IAAI,GAAG;EACXC,OAAO,EAAEhB,WAAW,CAAC;IAAEE,IAAI,EAAEJ,QAAQ,CAACmB,QAAQ;IAAEd,MAAM,EAAEJ,UAAU,CAACmB;EAAQ,CAAC,CAAC;EAC7EC,MAAM,EAAEnB,WAAW,CAAC;IAAEE,IAAI,EAAEJ,QAAQ,CAACmB,QAAQ;IAAEd,MAAM,EAAEJ,UAAU,CAACqB;EAAO,CAAC,CAAC;EAC3EC,IAAI,EAAErB,WAAW,CAAC;IAAEE,IAAI,EAAEJ,QAAQ,CAACwB,WAAW;IAAEnB,MAAM,EAAEJ,UAAU,CAACmB;EAAQ,CAAC,CAAC;EAC7EK,OAAO,EAAEvB,WAAW,CAAC;IAAEE,IAAI,EAAEJ,QAAQ,CAAC0B;EAAa,CAAC;AACtD,CAAC;AAED,eAAeT,IAAI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Typography","TypographyProps"],"sources":["index.ts"],"sourcesContent":["import Typography, { TypographyProps } from './typography';\n\nexport { Typography, TypographyProps };\n"],"mappings":"AAAA,OAAOA,UAAU,IAAIC,eAAe,QAAQ,cAAc;AAE1D,SAASD,UAAU,EAAEC,eAAe"}
|
|
@@ -0,0 +1,111 @@
|
|
|
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 } from 'react-native';
|
|
4
|
+
import { useAppColorScheme } from '../theme';
|
|
5
|
+
import { BaseText } from './base';
|
|
6
|
+
import font from './font';
|
|
7
|
+
const presets = {
|
|
8
|
+
xl: {
|
|
9
|
+
...font.heading,
|
|
10
|
+
fontSize: 26,
|
|
11
|
+
lineHeight: 36,
|
|
12
|
+
letterSpacing: 0.2
|
|
13
|
+
},
|
|
14
|
+
l: {
|
|
15
|
+
...font.heading,
|
|
16
|
+
fontSize: 24,
|
|
17
|
+
lineHeight: 33
|
|
18
|
+
},
|
|
19
|
+
'l/line-height-large': {
|
|
20
|
+
...font.heading,
|
|
21
|
+
fontSize: 24,
|
|
22
|
+
lineHeight: 28
|
|
23
|
+
},
|
|
24
|
+
regular: {
|
|
25
|
+
...font.regular,
|
|
26
|
+
fontSize: 17,
|
|
27
|
+
lineHeight: 24
|
|
28
|
+
},
|
|
29
|
+
m: {
|
|
30
|
+
...font.medium,
|
|
31
|
+
fontSize: 17,
|
|
32
|
+
lineHeight: 22,
|
|
33
|
+
letterSpacing: -0.2
|
|
34
|
+
},
|
|
35
|
+
'm/heading': {
|
|
36
|
+
...font.heading,
|
|
37
|
+
fontSize: 17,
|
|
38
|
+
lineHeight: 22,
|
|
39
|
+
letterSpacing: -0.2
|
|
40
|
+
},
|
|
41
|
+
s: {
|
|
42
|
+
...font.regular,
|
|
43
|
+
fontSize: 14,
|
|
44
|
+
lineHeight: 22
|
|
45
|
+
},
|
|
46
|
+
's/line-height-capped': {
|
|
47
|
+
...font.regular,
|
|
48
|
+
fontSize: 14,
|
|
49
|
+
lineHeight: 22,
|
|
50
|
+
letterSpacing: -0.2
|
|
51
|
+
// TODO: vertical trim: cap height
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
's/line-height-small': {
|
|
55
|
+
...font.regular,
|
|
56
|
+
fontSize: 14,
|
|
57
|
+
lineHeight: 18,
|
|
58
|
+
letterSpacing: 0.3
|
|
59
|
+
},
|
|
60
|
+
's/code': {
|
|
61
|
+
...font.code,
|
|
62
|
+
fontSize: 14,
|
|
63
|
+
lineHeight: 22,
|
|
64
|
+
letterSpacing: 0.2
|
|
65
|
+
},
|
|
66
|
+
xs: {
|
|
67
|
+
...font.regular,
|
|
68
|
+
fontSize: 12,
|
|
69
|
+
lineHeight: 22,
|
|
70
|
+
letterSpacing: -0.1
|
|
71
|
+
},
|
|
72
|
+
'xs/line-height-small': {
|
|
73
|
+
...font.regular,
|
|
74
|
+
fontSize: 12,
|
|
75
|
+
lineHeight: 18,
|
|
76
|
+
letterSpacing: 0.3
|
|
77
|
+
},
|
|
78
|
+
'xs/code': {
|
|
79
|
+
...font.code,
|
|
80
|
+
fontSize: 12,
|
|
81
|
+
lineHeight: 18,
|
|
82
|
+
letterSpacing: 0.3
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* General text component
|
|
87
|
+
* @see https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=1045-30326
|
|
88
|
+
*/
|
|
89
|
+
const Typography = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
90
|
+
let {
|
|
91
|
+
preset = 'regular',
|
|
92
|
+
color,
|
|
93
|
+
caps,
|
|
94
|
+
style,
|
|
95
|
+
...props
|
|
96
|
+
} = _ref;
|
|
97
|
+
const colorScheme = useAppColorScheme();
|
|
98
|
+
return /*#__PURE__*/React.createElement(BaseText, _extends({
|
|
99
|
+
ref: ref,
|
|
100
|
+
style: [presets[preset], caps && styles.caps, style],
|
|
101
|
+
color: color !== null && color !== void 0 ? color : colorScheme.text
|
|
102
|
+
}, props));
|
|
103
|
+
});
|
|
104
|
+
Typography.displayName = 'Typography';
|
|
105
|
+
const styles = StyleSheet.create({
|
|
106
|
+
caps: {
|
|
107
|
+
textTransform: 'uppercase'
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
export default Typography;
|
|
111
|
+
//# sourceMappingURL=typography.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","useAppColorScheme","BaseText","font","presets","xl","heading","fontSize","lineHeight","letterSpacing","l","regular","m","medium","s","code","xs","Typography","forwardRef","_ref","ref","preset","color","caps","style","props","colorScheme","createElement","_extends","styles","text","displayName","create","textTransform"],"sources":["typography.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, Text } from 'react-native';\n\nimport { useAppColorScheme } from '../theme';\nimport { BaseText, BaseTextProps } from './base';\nimport font from './font';\n\nconst presets = {\n xl: {\n ...font.heading,\n fontSize: 26,\n lineHeight: 36,\n letterSpacing: 0.2,\n },\n l: {\n ...font.heading,\n fontSize: 24,\n lineHeight: 33,\n },\n 'l/line-height-large': {\n ...font.heading,\n fontSize: 24,\n lineHeight: 28,\n },\n regular: {\n ...font.regular,\n fontSize: 17,\n lineHeight: 24,\n },\n m: {\n ...font.medium,\n fontSize: 17,\n lineHeight: 22,\n letterSpacing: -0.2,\n },\n 'm/heading': {\n ...font.heading,\n fontSize: 17,\n lineHeight: 22,\n letterSpacing: -0.2,\n },\n s: {\n ...font.regular,\n fontSize: 14,\n lineHeight: 22,\n },\n 's/line-height-capped': {\n ...font.regular,\n fontSize: 14,\n lineHeight: 22,\n letterSpacing: -0.2,\n // TODO: vertical trim: cap height\n },\n 's/line-height-small': {\n ...font.regular,\n fontSize: 14,\n lineHeight: 18,\n letterSpacing: 0.3,\n },\n 's/code': {\n ...font.code,\n fontSize: 14,\n lineHeight: 22,\n letterSpacing: 0.2,\n },\n xs: {\n ...font.regular,\n fontSize: 12,\n lineHeight: 22,\n letterSpacing: -0.1,\n },\n 'xs/line-height-small': {\n ...font.regular,\n fontSize: 12,\n lineHeight: 18,\n letterSpacing: 0.3,\n },\n 'xs/code': {\n ...font.code,\n fontSize: 12,\n lineHeight: 18,\n letterSpacing: 0.3,\n },\n} as const;\n\nexport type TypographyProps = BaseTextProps & {\n preset?: keyof typeof presets;\n caps?: boolean;\n};\n\n/**\n * General text component\n * @see https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=1045-30326\n */\nconst Typography = React.forwardRef<Text, TypographyProps>(\n ({ preset = 'regular', color, caps, style, ...props }, ref) => {\n const colorScheme = useAppColorScheme();\n return (\n <BaseText\n ref={ref}\n style={[presets[preset], caps && styles.caps, style]}\n color={color ?? colorScheme.text}\n {...props}\n />\n );\n },\n);\n\nTypography.displayName = 'Typography';\n\nconst styles = StyleSheet.create({\n caps: {\n textTransform: 'uppercase',\n },\n});\n\nexport default Typography;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAc,cAAc;AAE/C,SAASC,iBAAiB,QAAQ,UAAU;AAC5C,SAASC,QAAQ,QAAuB,QAAQ;AAChD,OAAOC,IAAI,MAAM,QAAQ;AAEzB,MAAMC,OAAO,GAAG;EACdC,EAAE,EAAE;IACF,GAAGF,IAAI,CAACG,OAAO;IACfC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE;EACjB,CAAC;EACDC,CAAC,EAAE;IACD,GAAGP,IAAI,CAACG,OAAO;IACfC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACD,qBAAqB,EAAE;IACrB,GAAGL,IAAI,CAACG,OAAO;IACfC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDG,OAAO,EAAE;IACP,GAAGR,IAAI,CAACQ,OAAO;IACfJ,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDI,CAAC,EAAE;IACD,GAAGT,IAAI,CAACU,MAAM;IACdN,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,CAAC;EAClB,CAAC;EACD,WAAW,EAAE;IACX,GAAGN,IAAI,CAACG,OAAO;IACfC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,CAAC;EAClB,CAAC;EACDK,CAAC,EAAE;IACD,GAAGX,IAAI,CAACQ,OAAO;IACfJ,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACD,sBAAsB,EAAE;IACtB,GAAGL,IAAI,CAACQ,OAAO;IACfJ,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,CAAC;IAChB;EACF,CAAC;;EACD,qBAAqB,EAAE;IACrB,GAAGN,IAAI,CAACQ,OAAO;IACfJ,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE;EACjB,CAAC;EACD,QAAQ,EAAE;IACR,GAAGN,IAAI,CAACY,IAAI;IACZR,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE;EACjB,CAAC;EACDO,EAAE,EAAE;IACF,GAAGb,IAAI,CAACQ,OAAO;IACfJ,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,CAAC;EAClB,CAAC;EACD,sBAAsB,EAAE;IACtB,GAAGN,IAAI,CAACQ,OAAO;IACfJ,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE;EACjB,CAAC;EACD,SAAS,EAAE;IACT,GAAGN,IAAI,CAACY,IAAI;IACZR,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE;EACjB;AACF,CAAU;AAOV;AACA;AACA;AACA;AACA,MAAMQ,UAAU,gBAAGlB,KAAK,CAACmB,UAAU,CACjC,CAAAC,IAAA,EAAuDC,GAAG,KAAK;EAAA,IAA9D;IAAEC,MAAM,GAAG,SAAS;IAAEC,KAAK;IAAEC,IAAI;IAAEC,KAAK;IAAE,GAAGC;EAAM,CAAC,GAAAN,IAAA;EACnD,MAAMO,WAAW,GAAGzB,iBAAiB,EAAE;EACvC,oBACEF,KAAA,CAAA4B,aAAA,CAACzB,QAAQ,EAAA0B,QAAA;IACPR,GAAG,EAAEA,GAAI;IACTI,KAAK,EAAE,CAACpB,OAAO,CAACiB,MAAM,CAAC,EAAEE,IAAI,IAAIM,MAAM,CAACN,IAAI,EAAEC,KAAK,CAAE;IACrDF,KAAK,EAAEA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAII,WAAW,CAACI;EAAK,GAC7BL,KAAK,EACT;AAEN,CAAC,CACF;AAEDR,UAAU,CAACc,WAAW,GAAG,YAAY;AAErC,MAAMF,MAAM,GAAG7B,UAAU,CAACgC,MAAM,CAAC;EAC/BT,IAAI,EAAE;IACJU,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEF,eAAehB,UAAU"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
const defaultColorScheme = {
|
|
3
|
+
accent: '#0F151A',
|
|
4
|
+
accentText: '#EBF2F4',
|
|
5
|
+
background: '#F1F3F5',
|
|
6
|
+
backgroundScroll: 'rgba(241, 243, 245, 0.7)',
|
|
7
|
+
black: '#000000',
|
|
8
|
+
codeAccent: '#CFD2E7',
|
|
9
|
+
credentialHeaderBackground: 'rgba(255, 255, 255, 0.87)',
|
|
10
|
+
error: '#D90D0D',
|
|
11
|
+
grayDark: '#CDD4DA',
|
|
12
|
+
linkText: '#3F7BA6',
|
|
13
|
+
success: '#00D066',
|
|
14
|
+
successText: '#006B34',
|
|
15
|
+
text: '#0D0E10',
|
|
16
|
+
warning: '#F7BF0B',
|
|
17
|
+
white: '#FFFFFF',
|
|
18
|
+
darkMode: false,
|
|
19
|
+
nerdView: {
|
|
20
|
+
background: 'rgba(2, 4, 21, 0.95)',
|
|
21
|
+
attributeLabel: '#929497',
|
|
22
|
+
attributeValueBackground: 'rgba(255, 255, 255, 0.02)',
|
|
23
|
+
attributeValueBorder: 'rgba(255, 255, 255, 0.2)',
|
|
24
|
+
attributeSectionBackground: 'rgba(2, 4, 21, 0.8)',
|
|
25
|
+
button: 'rgba(255, 255, 255, 0.05)',
|
|
26
|
+
codeHighlightText: 'rgba(232, 135, 114, 1)'
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const ColorSchemeContext = /*#__PURE__*/React.createContext(defaultColorScheme);
|
|
30
|
+
ColorSchemeContext.displayName = 'ColorSchemeContext';
|
|
31
|
+
export function ColorSchemeProvider(props) {
|
|
32
|
+
return /*#__PURE__*/React.createElement(ColorSchemeContext.Provider, {
|
|
33
|
+
value: props.colorScheme
|
|
34
|
+
}, props.children);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* A hook to gain access to the current `ColorScheme`
|
|
39
|
+
* @note A custom superset of `ColorScheme` can be used (must also be passed to the `ColorSchemeProvider`)
|
|
40
|
+
*/
|
|
41
|
+
export function useAppColorScheme() {
|
|
42
|
+
return React.useContext(ColorSchemeContext);
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=color-scheme-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","defaultColorScheme","accent","accentText","background","backgroundScroll","black","codeAccent","credentialHeaderBackground","error","grayDark","linkText","success","successText","text","warning","white","darkMode","nerdView","attributeLabel","attributeValueBackground","attributeValueBorder","attributeSectionBackground","button","codeHighlightText","ColorSchemeContext","createContext","displayName","ColorSchemeProvider","props","createElement","Provider","value","colorScheme","children","useAppColorScheme","useContext"],"sources":["color-scheme-context.tsx"],"sourcesContent":["import React, { PropsWithChildren } from 'react';\n\nimport type { ColorScheme } from './color-scheme';\n\nconst defaultColorScheme: ColorScheme = {\n accent: '#0F151A',\n accentText: '#EBF2F4',\n background: '#F1F3F5',\n backgroundScroll: 'rgba(241, 243, 245, 0.7)',\n black: '#000000',\n codeAccent: '#CFD2E7',\n credentialHeaderBackground: 'rgba(255, 255, 255, 0.87)',\n error: '#D90D0D',\n grayDark: '#CDD4DA',\n linkText: '#3F7BA6',\n success: '#00D066',\n successText: '#006B34',\n text: '#0D0E10',\n warning: '#F7BF0B',\n white: '#FFFFFF',\n darkMode: false,\n nerdView: {\n background: 'rgba(2, 4, 21, 0.95)',\n attributeLabel: '#929497',\n attributeValueBackground: 'rgba(255, 255, 255, 0.02)',\n attributeValueBorder: 'rgba(255, 255, 255, 0.2)',\n attributeSectionBackground: 'rgba(2, 4, 21, 0.8)',\n button: 'rgba(255, 255, 255, 0.05)',\n codeHighlightText: 'rgba(232, 135, 114, 1)',\n },\n};\n\nconst ColorSchemeContext = React.createContext<ColorScheme>(defaultColorScheme);\nColorSchemeContext.displayName = 'ColorSchemeContext';\n\nexport function ColorSchemeProvider<Scheme extends ColorScheme = ColorScheme>(\n props: PropsWithChildren<{ colorScheme: Scheme }>,\n) {\n return <ColorSchemeContext.Provider value={props.colorScheme}>{props.children}</ColorSchemeContext.Provider>;\n}\n\n/**\n * A hook to gain access to the current `ColorScheme`\n * @note A custom superset of `ColorScheme` can be used (must also be passed to the `ColorSchemeProvider`)\n */\nexport function useAppColorScheme<Scheme extends ColorScheme = ColorScheme>(): Readonly<Scheme> {\n return React.useContext(ColorSchemeContext) as Scheme;\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAA6B,OAAO;AAIhD,MAAMC,kBAA+B,GAAG;EACtCC,MAAM,EAAE,SAAS;EACjBC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAE,SAAS;EACrBC,gBAAgB,EAAE,0BAA0B;EAC5CC,KAAK,EAAE,SAAS;EAChBC,UAAU,EAAE,SAAS;EACrBC,0BAA0B,EAAE,2BAA2B;EACvDC,KAAK,EAAE,SAAS;EAChBC,QAAQ,EAAE,SAAS;EACnBC,QAAQ,EAAE,SAAS;EACnBC,OAAO,EAAE,SAAS;EAClBC,WAAW,EAAE,SAAS;EACtBC,IAAI,EAAE,SAAS;EACfC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,SAAS;EAChBC,QAAQ,EAAE,KAAK;EACfC,QAAQ,EAAE;IACRd,UAAU,EAAE,sBAAsB;IAClCe,cAAc,EAAE,SAAS;IACzBC,wBAAwB,EAAE,2BAA2B;IACrDC,oBAAoB,EAAE,0BAA0B;IAChDC,0BAA0B,EAAE,qBAAqB;IACjDC,MAAM,EAAE,2BAA2B;IACnCC,iBAAiB,EAAE;EACrB;AACF,CAAC;AAED,MAAMC,kBAAkB,gBAAGzB,KAAK,CAAC0B,aAAa,CAAczB,kBAAkB,CAAC;AAC/EwB,kBAAkB,CAACE,WAAW,GAAG,oBAAoB;AAErD,OAAO,SAASC,mBAAmBA,CACjCC,KAAiD,EACjD;EACA,oBAAO7B,KAAA,CAAA8B,aAAA,CAACL,kBAAkB,CAACM,QAAQ;IAACC,KAAK,EAAEH,KAAK,CAACI;EAAY,GAAEJ,KAAK,CAACK,QAAQ,CAA+B;AAC9G;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAA,EAA+D;EAC9F,OAAOnC,KAAK,CAACoC,UAAU,CAACX,kBAAkB,CAAC;AAC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["color-scheme.ts"],"sourcesContent":["/**\n * Color flavour of the application\n * colors according to figma design: https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=0-1\n */\nexport interface ColorScheme {\n accent: string;\n accentText: string;\n background: string;\n backgroundScroll: string;\n black: string;\n codeAccent: string;\n credentialHeaderBackground: string;\n error: string;\n grayDark: string;\n linkText: string;\n success: string;\n successText: string;\n text: string;\n warning: string;\n white: string;\n darkMode: boolean;\n nerdView: {\n background: string;\n attributeLabel: string;\n attributeSectionBackground: string;\n attributeValueBackground: string;\n attributeValueBorder: string;\n button: string;\n codeHighlightText: string;\n };\n}\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ColorSchemeProvider","useAppColorScheme"],"sources":["index.ts"],"sourcesContent":["export type { ColorScheme } from './color-scheme';\nimport { ColorSchemeProvider, useAppColorScheme } from './color-scheme-context';\n\nexport { ColorSchemeProvider, useAppColorScheme };\n"],"mappings":"AACA,SAASA,mBAAmB,EAAEC,iBAAiB,QAAQ,wBAAwB;AAE/E,SAASD,mBAAmB,EAAEC,iBAAiB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable no-bitwise */
|
|
2
|
+
import normalizeColor from '@react-native/normalize-color';
|
|
3
|
+
export const colorArray = color => {
|
|
4
|
+
const normalized = normalizeColor(color);
|
|
5
|
+
const r = normalized >> 24 & 0xff;
|
|
6
|
+
const g = normalized >> 16 & 0xff;
|
|
7
|
+
const b = normalized >> 8 & 0xff;
|
|
8
|
+
const a = normalized & 0xff;
|
|
9
|
+
return [r / 255, g / 255, b / 255, a / 255];
|
|
10
|
+
};
|
|
11
|
+
export const colorWithAlphaComponent = (color, alpha) => {
|
|
12
|
+
alpha = Math.min(1, Math.max(0, alpha));
|
|
13
|
+
const colorValues = colorArray(color);
|
|
14
|
+
colorValues[3] = alpha;
|
|
15
|
+
const colorHexString = colorValues.map(value => Math.round(255 * value).toString(16).padStart(2, '0')).join('');
|
|
16
|
+
return `#${colorHexString}`;
|
|
17
|
+
};
|
|
18
|
+
export const getBrightness = color => {
|
|
19
|
+
const rgb = colorArray(color);
|
|
20
|
+
// https://en.wikipedia.org/wiki/Relative_luminance
|
|
21
|
+
return 0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2];
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=color.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["normalizeColor","colorArray","color","normalized","r","g","b","a","colorWithAlphaComponent","alpha","Math","min","max","colorValues","colorHexString","map","value","round","toString","padStart","join","getBrightness","rgb"],"sources":["color.ts"],"sourcesContent":["/* eslint-disable no-bitwise */\nimport normalizeColor from '@react-native/normalize-color';\nimport type { ColorValue } from 'react-native';\n\nexport const colorArray = (color: ColorValue) => {\n const normalized = normalizeColor(color);\n\n const r = (normalized >> 24) & 0xff;\n const g = (normalized >> 16) & 0xff;\n const b = (normalized >> 8) & 0xff;\n const a = normalized & 0xff;\n\n return [r / 255, g / 255, b / 255, a / 255];\n};\n\nexport const colorWithAlphaComponent = (color: ColorValue, alpha: number): ColorValue => {\n alpha = Math.min(1, Math.max(0, alpha));\n const colorValues = colorArray(color);\n colorValues[3] = alpha;\n const colorHexString = colorValues\n .map((value) =>\n Math.round(255 * value)\n .toString(16)\n .padStart(2, '0'),\n )\n .join('');\n return `#${colorHexString}`;\n};\n\nexport const getBrightness = (color: ColorValue) => {\n const rgb = colorArray(color);\n // https://en.wikipedia.org/wiki/Relative_luminance\n return 0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2];\n};\n"],"mappings":"AAAA;AACA,OAAOA,cAAc,MAAM,+BAA+B;AAG1D,OAAO,MAAMC,UAAU,GAAIC,KAAiB,IAAK;EAC/C,MAAMC,UAAU,GAAGH,cAAc,CAACE,KAAK,CAAC;EAExC,MAAME,CAAC,GAAID,UAAU,IAAI,EAAE,GAAI,IAAI;EACnC,MAAME,CAAC,GAAIF,UAAU,IAAI,EAAE,GAAI,IAAI;EACnC,MAAMG,CAAC,GAAIH,UAAU,IAAI,CAAC,GAAI,IAAI;EAClC,MAAMI,CAAC,GAAGJ,UAAU,GAAG,IAAI;EAE3B,OAAO,CAACC,CAAC,GAAG,GAAG,EAAEC,CAAC,GAAG,GAAG,EAAEC,CAAC,GAAG,GAAG,EAAEC,CAAC,GAAG,GAAG,CAAC;AAC7C,CAAC;AAED,OAAO,MAAMC,uBAAuB,GAAGA,CAACN,KAAiB,EAAEO,KAAa,KAAiB;EACvFA,KAAK,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAED,IAAI,CAACE,GAAG,CAAC,CAAC,EAAEH,KAAK,CAAC,CAAC;EACvC,MAAMI,WAAW,GAAGZ,UAAU,CAACC,KAAK,CAAC;EACrCW,WAAW,CAAC,CAAC,CAAC,GAAGJ,KAAK;EACtB,MAAMK,cAAc,GAAGD,WAAW,CAC/BE,GAAG,CAAEC,KAAK,IACTN,IAAI,CAACO,KAAK,CAAC,GAAG,GAAGD,KAAK,CAAC,CACpBE,QAAQ,CAAC,EAAE,CAAC,CACZC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CACpB,CACAC,IAAI,CAAC,EAAE,CAAC;EACX,OAAQ,IAAGN,cAAe,EAAC;AAC7B,CAAC;AAED,OAAO,MAAMO,aAAa,GAAInB,KAAiB,IAAK;EAClD,MAAMoB,GAAG,GAAGrB,UAAU,CAACC,KAAK,CAAC;EAC7B;EACA,OAAO,MAAM,GAAGoB,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,GAAGA,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,GAAGA,GAAG,CAAC,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { StatusBar } from 'react-native';
|
|
4
|
+
import { getBrightness } from './color';
|
|
5
|
+
/**
|
|
6
|
+
* Defines transparent status bar with content contrasting to the background
|
|
7
|
+
*/
|
|
8
|
+
const ContrastingStatusBar = _ref => {
|
|
9
|
+
let {
|
|
10
|
+
backgroundColor,
|
|
11
|
+
...props
|
|
12
|
+
} = _ref;
|
|
13
|
+
const barStyle = useMemo(() => getBrightness(backgroundColor) > 0.5 ? 'dark-content' : 'light-content', [backgroundColor]);
|
|
14
|
+
return /*#__PURE__*/React.createElement(StatusBar, _extends({
|
|
15
|
+
translucent: true,
|
|
16
|
+
barStyle: barStyle,
|
|
17
|
+
backgroundColor: 'transparent'
|
|
18
|
+
}, props));
|
|
19
|
+
};
|
|
20
|
+
export default ContrastingStatusBar;
|
|
21
|
+
//# sourceMappingURL=contrasting-status-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useMemo","StatusBar","getBrightness","ContrastingStatusBar","_ref","backgroundColor","props","barStyle","createElement","_extends","translucent"],"sources":["contrasting-status-bar.tsx"],"sourcesContent":["import React, { FC, useMemo } from 'react';\nimport { ColorValue, StatusBar, StatusBarProps, StatusBarStyle } from 'react-native';\n\nimport { getBrightness } from './color';\n\ninterface ContrastingStatusBarProps extends Omit<StatusBarProps, 'barStyle'> {\n backgroundColor: ColorValue;\n}\n\n/**\n * Defines transparent status bar with content contrasting to the background\n */\nconst ContrastingStatusBar: FC<ContrastingStatusBarProps> = ({ backgroundColor, ...props }) => {\n const barStyle = useMemo<StatusBarStyle>(\n () => (getBrightness(backgroundColor) > 0.5 ? 'dark-content' : 'light-content'),\n [backgroundColor],\n );\n return <StatusBar translucent={true} barStyle={barStyle} backgroundColor={'transparent'} {...props} />;\n};\n\nexport default ContrastingStatusBar;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAQC,OAAO,QAAQ,OAAO;AAC1C,SAAqBC,SAAS,QAAwC,cAAc;AAEpF,SAASC,aAAa,QAAQ,SAAS;AAMvC;AACA;AACA;AACA,MAAMC,oBAAmD,GAAGC,IAAA,IAAmC;EAAA,IAAlC;IAAEC,eAAe;IAAE,GAAGC;EAAM,CAAC,GAAAF,IAAA;EACxF,MAAMG,QAAQ,GAAGP,OAAO,CACtB,MAAOE,aAAa,CAACG,eAAe,CAAC,GAAG,GAAG,GAAG,cAAc,GAAG,eAAgB,EAC/E,CAACA,eAAe,CAAC,CAClB;EACD,oBAAON,KAAA,CAAAS,aAAA,CAACP,SAAS,EAAAQ,QAAA;IAACC,WAAW,EAAE,IAAK;IAACH,QAAQ,EAAEA,QAAS;IAACF,eAAe,EAAE;EAAc,GAAKC,KAAK,EAAI;AACxG,CAAC;AAED,eAAeH,oBAAoB"}
|