@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,24 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
import LoaderView, { LoaderViewState } from '../loader/loader';
|
|
5
|
+
const ActivityIndicator = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
animate = true,
|
|
8
|
+
style,
|
|
9
|
+
...props
|
|
10
|
+
} = _ref;
|
|
11
|
+
return /*#__PURE__*/React.createElement(View, _extends({}, props, {
|
|
12
|
+
style: [styles.wrapper, style]
|
|
13
|
+
}), /*#__PURE__*/React.createElement(LoaderView, {
|
|
14
|
+
animate: animate,
|
|
15
|
+
state: LoaderViewState.InProgress
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
18
|
+
const styles = StyleSheet.create({
|
|
19
|
+
wrapper: {
|
|
20
|
+
alignItems: 'center'
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export default ActivityIndicator;
|
|
24
|
+
//# sourceMappingURL=activity-indicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","LoaderView","LoaderViewState","ActivityIndicator","_ref","animate","style","props","createElement","_extends","styles","wrapper","state","InProgress","create","alignItems"],"sources":["activity-indicator.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport { ViewProps } from 'react-native-svg/lib/typescript/fabric/utils';\n\nimport LoaderView, { LoaderViewState } from '../loader/loader';\n\ntype ActivityIndicatorProps = ViewProps & {\n animate?: boolean;\n};\n\nconst ActivityIndicator: FC<ActivityIndicatorProps> = ({ animate = true, style, ...props }) => {\n return (\n <View {...props} style={[styles.wrapper, style]}>\n <LoaderView animate={animate} state={LoaderViewState.InProgress} />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n alignItems: 'center',\n },\n});\n\nexport default ActivityIndicator;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAc,OAAO;AACjC,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAG/C,OAAOC,UAAU,IAAIC,eAAe,QAAQ,kBAAkB;AAM9D,MAAMC,iBAA6C,GAAGC,IAAA,IAAyC;EAAA,IAAxC;IAAEC,OAAO,GAAG,IAAI;IAAEC,KAAK;IAAE,GAAGC;EAAM,CAAC,GAAAH,IAAA;EACxF,oBACEN,KAAA,CAAAU,aAAA,CAACR,IAAI,EAAAS,QAAA,KAAKF,KAAK;IAAED,KAAK,EAAE,CAACI,MAAM,CAACC,OAAO,EAAEL,KAAK;EAAE,iBAC9CR,KAAA,CAAAU,aAAA,CAACP,UAAU;IAACI,OAAO,EAAEA,OAAQ;IAACO,KAAK,EAAEV,eAAe,CAACW;EAAW,EAAG,CAC9D;AAEX,CAAC;AAED,MAAMH,MAAM,GAAGX,UAAU,CAACe,MAAM,CAAC;EAC/BH,OAAO,EAAE;IACPI,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAeZ,iBAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ActivityIndicator"],"sources":["index.ts"],"sourcesContent":["import ActivityIndicator from './activity-indicator';\n\nexport { ActivityIndicator };\n"],"mappings":"AAAA,OAAOA,iBAAiB,MAAM,sBAAsB;AAEpD,SAASA,iBAAiB"}
|
|
@@ -0,0 +1,67 @@
|
|
|
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 { BlurView as RNBlurView } from '@react-native-community/blur';
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
4
|
+
import { Platform, StyleSheet, View } from 'react-native';
|
|
5
|
+
import { useAppColorScheme } from '../theme';
|
|
6
|
+
import { colorWithAlphaComponent } from '../utils/color';
|
|
7
|
+
const BACKGROUND_COLOR = {
|
|
8
|
+
light: 'rgba(255, 255, 255, 0.8)',
|
|
9
|
+
dark: 'rgba(16, 12, 12, 0.8)',
|
|
10
|
+
thickMaterialLight: 'rgba(255, 255, 255, 0.95)',
|
|
11
|
+
thickMaterialDark: 'rgba(16, 12, 12, 0.95)',
|
|
12
|
+
thinMaterialLight: 'rgba(255, 255, 255, 0.8)',
|
|
13
|
+
thinMaterialDark: 'rgba(16, 12, 12, 0.8)'
|
|
14
|
+
};
|
|
15
|
+
const BlurView = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
blurAmount = 50,
|
|
18
|
+
blurStyle,
|
|
19
|
+
color,
|
|
20
|
+
darkMode,
|
|
21
|
+
children,
|
|
22
|
+
style,
|
|
23
|
+
...props
|
|
24
|
+
} = _ref;
|
|
25
|
+
const colorScheme = useAppColorScheme();
|
|
26
|
+
const themeDarkMode = colorScheme.darkMode;
|
|
27
|
+
const dark = darkMode !== null && darkMode !== void 0 ? darkMode : themeDarkMode;
|
|
28
|
+
const blurType = useMemo(() => {
|
|
29
|
+
if (blurStyle === 'header') {
|
|
30
|
+
return dark ? 'dark' : 'light';
|
|
31
|
+
} else if (blurStyle === 'soft') {
|
|
32
|
+
return dark ? 'thinMaterialDark' : 'thinMaterialLight';
|
|
33
|
+
} else {
|
|
34
|
+
return dark ? 'thickMaterialDark' : 'thickMaterialLight';
|
|
35
|
+
}
|
|
36
|
+
}, [blurStyle, dark]);
|
|
37
|
+
const backgroundStyle = useMemo(() => {
|
|
38
|
+
if (blurStyle === 'header' && color === colorScheme.background) {
|
|
39
|
+
return {
|
|
40
|
+
backgroundColor: '#00000005'
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}, [blurStyle, color, colorScheme.background]);
|
|
44
|
+
if (Platform.OS === 'ios') {
|
|
45
|
+
return /*#__PURE__*/React.createElement(View, _extends({
|
|
46
|
+
style: [styles.wrapper, backgroundStyle, style]
|
|
47
|
+
}, props), /*#__PURE__*/React.createElement(RNBlurView, {
|
|
48
|
+
blurAmount: blurAmount,
|
|
49
|
+
blurType: blurType,
|
|
50
|
+
reducedTransparencyFallbackColor: color,
|
|
51
|
+
style: StyleSheet.absoluteFill
|
|
52
|
+
}), children);
|
|
53
|
+
}
|
|
54
|
+
const backgroundColor = color ? colorWithAlphaComponent(color, 0.9) : BACKGROUND_COLOR[blurType];
|
|
55
|
+
return /*#__PURE__*/React.createElement(View, _extends({
|
|
56
|
+
style: [{
|
|
57
|
+
backgroundColor
|
|
58
|
+
}, style]
|
|
59
|
+
}, props), children);
|
|
60
|
+
};
|
|
61
|
+
const styles = StyleSheet.create({
|
|
62
|
+
wrapper: {
|
|
63
|
+
overflow: 'hidden'
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
export default BlurView;
|
|
67
|
+
//# sourceMappingURL=blur-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BlurView","RNBlurView","React","useMemo","Platform","StyleSheet","View","useAppColorScheme","colorWithAlphaComponent","BACKGROUND_COLOR","light","dark","thickMaterialLight","thickMaterialDark","thinMaterialLight","thinMaterialDark","_ref","blurAmount","blurStyle","color","darkMode","children","style","props","colorScheme","themeDarkMode","blurType","backgroundStyle","background","backgroundColor","OS","createElement","_extends","styles","wrapper","reducedTransparencyFallbackColor","absoluteFill","create","overflow"],"sources":["blur-view.tsx"],"sourcesContent":["import { BlurView as RNBlurView, BlurViewProps as RNBlurViewProps } from '@react-native-community/blur';\nimport React, { FC, PropsWithChildren, useMemo } from 'react';\nimport { ColorValue, Platform, StyleSheet, View, ViewProps, ViewStyle } from 'react-native';\n\nimport { useAppColorScheme } from '../theme';\nimport { colorWithAlphaComponent } from '../utils/color';\n\nexport interface BlurViewProps extends ViewProps {\n blurAmount?: number;\n color?: ColorValue;\n darkMode?: boolean;\n blurStyle: 'soft' | 'strong' | 'header';\n}\n\nconst BACKGROUND_COLOR = {\n light: 'rgba(255, 255, 255, 0.8)',\n dark: 'rgba(16, 12, 12, 0.8)',\n thickMaterialLight: 'rgba(255, 255, 255, 0.95)',\n thickMaterialDark: 'rgba(16, 12, 12, 0.95)',\n thinMaterialLight: 'rgba(255, 255, 255, 0.8)',\n thinMaterialDark: 'rgba(16, 12, 12, 0.8)',\n};\n\nconst BlurView: FC<PropsWithChildren<BlurViewProps>> = ({\n blurAmount = 50,\n blurStyle,\n color,\n darkMode,\n children,\n style,\n ...props\n}) => {\n const colorScheme = useAppColorScheme();\n const themeDarkMode = colorScheme.darkMode;\n const dark = darkMode ?? themeDarkMode;\n\n const blurType: RNBlurViewProps['blurType'] = useMemo(() => {\n if (blurStyle === 'header') {\n return dark ? 'dark' : 'light';\n } else if (blurStyle === 'soft') {\n return dark ? 'thinMaterialDark' : 'thinMaterialLight';\n } else {\n return dark ? 'thickMaterialDark' : 'thickMaterialLight';\n }\n }, [blurStyle, dark]);\n\n const backgroundStyle: ViewStyle | undefined = useMemo(() => {\n if (blurStyle === 'header' && color === colorScheme.background) {\n return { backgroundColor: '#00000005' };\n }\n }, [blurStyle, color, colorScheme.background]);\n\n if (Platform.OS === 'ios') {\n return (\n <View style={[styles.wrapper, backgroundStyle, style]} {...props}>\n <RNBlurView\n blurAmount={blurAmount}\n blurType={blurType}\n reducedTransparencyFallbackColor={color as string}\n style={StyleSheet.absoluteFill}\n />\n {children}\n </View>\n );\n }\n\n const backgroundColor = color ? colorWithAlphaComponent(color, 0.9) : BACKGROUND_COLOR[blurType];\n\n return (\n <View style={[{ backgroundColor }, style]} {...props}>\n {children}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n overflow: 'hidden',\n },\n});\n\nexport default BlurView;\n"],"mappings":";AAAA,SAASA,QAAQ,IAAIC,UAAU,QAA0C,8BAA8B;AACvG,OAAOC,KAAK,IAA2BC,OAAO,QAAQ,OAAO;AAC7D,SAAqBC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAA8B,cAAc;AAE3F,SAASC,iBAAiB,QAAQ,UAAU;AAC5C,SAASC,uBAAuB,QAAQ,gBAAgB;AASxD,MAAMC,gBAAgB,GAAG;EACvBC,KAAK,EAAE,0BAA0B;EACjCC,IAAI,EAAE,uBAAuB;EAC7BC,kBAAkB,EAAE,2BAA2B;EAC/CC,iBAAiB,EAAE,wBAAwB;EAC3CC,iBAAiB,EAAE,0BAA0B;EAC7CC,gBAAgB,EAAE;AACpB,CAAC;AAED,MAAMf,QAA8C,GAAGgB,IAAA,IAQjD;EAAA,IARkD;IACtDC,UAAU,GAAG,EAAE;IACfC,SAAS;IACTC,KAAK;IACLC,QAAQ;IACRC,QAAQ;IACRC,KAAK;IACL,GAAGC;EACL,CAAC,GAAAP,IAAA;EACC,MAAMQ,WAAW,GAAGjB,iBAAiB,EAAE;EACvC,MAAMkB,aAAa,GAAGD,WAAW,CAACJ,QAAQ;EAC1C,MAAMT,IAAI,GAAGS,QAAQ,aAARA,QAAQ,cAARA,QAAQ,GAAIK,aAAa;EAEtC,MAAMC,QAAqC,GAAGvB,OAAO,CAAC,MAAM;IAC1D,IAAIe,SAAS,KAAK,QAAQ,EAAE;MAC1B,OAAOP,IAAI,GAAG,MAAM,GAAG,OAAO;IAChC,CAAC,MAAM,IAAIO,SAAS,KAAK,MAAM,EAAE;MAC/B,OAAOP,IAAI,GAAG,kBAAkB,GAAG,mBAAmB;IACxD,CAAC,MAAM;MACL,OAAOA,IAAI,GAAG,mBAAmB,GAAG,oBAAoB;IAC1D;EACF,CAAC,EAAE,CAACO,SAAS,EAAEP,IAAI,CAAC,CAAC;EAErB,MAAMgB,eAAsC,GAAGxB,OAAO,CAAC,MAAM;IAC3D,IAAIe,SAAS,KAAK,QAAQ,IAAIC,KAAK,KAAKK,WAAW,CAACI,UAAU,EAAE;MAC9D,OAAO;QAAEC,eAAe,EAAE;MAAY,CAAC;IACzC;EACF,CAAC,EAAE,CAACX,SAAS,EAAEC,KAAK,EAAEK,WAAW,CAACI,UAAU,CAAC,CAAC;EAE9C,IAAIxB,QAAQ,CAAC0B,EAAE,KAAK,KAAK,EAAE;IACzB,oBACE5B,KAAA,CAAA6B,aAAA,CAACzB,IAAI,EAAA0B,QAAA;MAACV,KAAK,EAAE,CAACW,MAAM,CAACC,OAAO,EAAEP,eAAe,EAAEL,KAAK;IAAE,GAAKC,KAAK,gBAC9DrB,KAAA,CAAA6B,aAAA,CAAC9B,UAAU;MACTgB,UAAU,EAAEA,UAAW;MACvBS,QAAQ,EAAEA,QAAS;MACnBS,gCAAgC,EAAEhB,KAAgB;MAClDG,KAAK,EAAEjB,UAAU,CAAC+B;IAAa,EAC/B,EACDf,QAAQ,CACJ;EAEX;EAEA,MAAMQ,eAAe,GAAGV,KAAK,GAAGX,uBAAuB,CAACW,KAAK,EAAE,GAAG,CAAC,GAAGV,gBAAgB,CAACiB,QAAQ,CAAC;EAEhG,oBACExB,KAAA,CAAA6B,aAAA,CAACzB,IAAI,EAAA0B,QAAA;IAACV,KAAK,EAAE,CAAC;MAAEO;IAAgB,CAAC,EAAEP,KAAK;EAAE,GAAKC,KAAK,GACjDF,QAAQ,CACJ;AAEX,CAAC;AAED,MAAMY,MAAM,GAAG5B,UAAU,CAACgC,MAAM,CAAC;EAC/BH,OAAO,EAAE;IACPI,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,eAAetC,QAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BlurView","BlurViewProps"],"sources":["index.ts"],"sourcesContent":["import BlurView, { BlurViewProps } from './blur-view';\n\nexport { BlurView, BlurViewProps };\n"],"mappings":"AAAA,OAAOA,QAAQ,IAAIC,aAAa,QAAQ,aAAa;AAErD,SAASD,QAAQ,EAAEC,aAAa"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 { useAccessibilityTranslation } from '../accessibility/accessibilityLanguage';
|
|
4
|
+
import { BackIcon, CloseIcon } from '../icons';
|
|
5
|
+
import GhostButton from './ghost-button';
|
|
6
|
+
export let BackButtonIcon;
|
|
7
|
+
(function (BackButtonIcon) {
|
|
8
|
+
BackButtonIcon["Back"] = "back";
|
|
9
|
+
BackButtonIcon["Close"] = "close";
|
|
10
|
+
})(BackButtonIcon || (BackButtonIcon = {}));
|
|
11
|
+
const BackButton = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
style,
|
|
14
|
+
icon = BackButtonIcon.Back,
|
|
15
|
+
onPress,
|
|
16
|
+
...props
|
|
17
|
+
} = _ref;
|
|
18
|
+
const t = useAccessibilityTranslation();
|
|
19
|
+
const Icon = icon === BackButtonIcon.Close ? CloseIcon : BackIcon;
|
|
20
|
+
return /*#__PURE__*/React.createElement(GhostButton, _extends({
|
|
21
|
+
accessibilityLabel: t(icon === BackButtonIcon.Close ? 'accessibility.nav.close' : 'accessibility.nav.back'),
|
|
22
|
+
icon: Icon,
|
|
23
|
+
onPress: onPress,
|
|
24
|
+
style: style
|
|
25
|
+
}, props));
|
|
26
|
+
};
|
|
27
|
+
export default BackButton;
|
|
28
|
+
//# sourceMappingURL=back-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useAccessibilityTranslation","BackIcon","CloseIcon","GhostButton","BackButtonIcon","BackButton","_ref","style","icon","Back","onPress","props","t","Icon","Close","createElement","_extends","accessibilityLabel"],"sources":["back-button.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { useAccessibilityTranslation } from '../accessibility/accessibilityLanguage';\nimport { GhostButtonProps } from '../buttons/ghost-button';\nimport { BackIcon, CloseIcon } from '../icons';\nimport GhostButton from './ghost-button';\n\nexport enum BackButtonIcon {\n Back = 'back',\n Close = 'close',\n}\n\nexport type BackButtonProps = Omit<GhostButtonProps, 'accessibilityLabel'>;\n\nconst BackButton: FC<BackButtonProps> = ({ style, icon = BackButtonIcon.Back, onPress, ...props }) => {\n const t = useAccessibilityTranslation();\n\n const Icon = icon === BackButtonIcon.Close ? CloseIcon : BackIcon;\n\n return (\n <GhostButton\n accessibilityLabel={t(icon === BackButtonIcon.Close ? 'accessibility.nav.close' : 'accessibility.nav.back')}\n icon={Icon}\n onPress={onPress}\n style={style}\n {...props}\n />\n );\n};\n\nexport default BackButton;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAc,OAAO;AAEjC,SAASC,2BAA2B,QAAQ,wCAAwC;AAEpF,SAASC,QAAQ,EAAEC,SAAS,QAAQ,UAAU;AAC9C,OAAOC,WAAW,MAAM,gBAAgB;AAExC,WAAYC,cAAc;AAGzB,WAHWA,cAAc;EAAdA,cAAc;EAAdA,cAAc;AAAA,GAAdA,cAAc,KAAdA,cAAc;AAO1B,MAAMC,UAA+B,GAAGC,IAAA,IAA8D;EAAA,IAA7D;IAAEC,KAAK;IAAEC,IAAI,GAAGJ,cAAc,CAACK,IAAI;IAAEC,OAAO;IAAE,GAAGC;EAAM,CAAC,GAAAL,IAAA;EAC/F,MAAMM,CAAC,GAAGZ,2BAA2B,EAAE;EAEvC,MAAMa,IAAI,GAAGL,IAAI,KAAKJ,cAAc,CAACU,KAAK,GAAGZ,SAAS,GAAGD,QAAQ;EAEjE,oBACEF,KAAA,CAAAgB,aAAA,CAACZ,WAAW,EAAAa,QAAA;IACVC,kBAAkB,EAAEL,CAAC,CAACJ,IAAI,KAAKJ,cAAc,CAACU,KAAK,GAAG,yBAAyB,GAAG,wBAAwB,CAAE;IAC5GN,IAAI,EAAEK,IAAK;IACXH,OAAO,EAAEA,OAAQ;IACjBH,KAAK,EAAEA;EAAM,GACTI,KAAK,EACT;AAEN,CAAC;AAED,eAAeN,UAAU"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
import { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';
|
|
5
|
+
import { Typography } from '../text';
|
|
6
|
+
import { useAppColorScheme } from '../theme';
|
|
7
|
+
import { concatTestID } from '../utils';
|
|
8
|
+
export let ButtonType;
|
|
9
|
+
(function (ButtonType) {
|
|
10
|
+
ButtonType["Border"] = "border";
|
|
11
|
+
ButtonType["Primary"] = "primary";
|
|
12
|
+
ButtonType["Secondary"] = "secondary";
|
|
13
|
+
ButtonType["SmallTech"] = "small-tech";
|
|
14
|
+
})(ButtonType || (ButtonType = {}));
|
|
15
|
+
const SLOP_VALUE = 10;
|
|
16
|
+
const hitSlop = {
|
|
17
|
+
top: SLOP_VALUE,
|
|
18
|
+
bottom: SLOP_VALUE,
|
|
19
|
+
left: SLOP_VALUE,
|
|
20
|
+
right: SLOP_VALUE
|
|
21
|
+
};
|
|
22
|
+
const ACTIVE_OPACITY = {
|
|
23
|
+
[ButtonType.Primary]: 0.8,
|
|
24
|
+
[ButtonType.Border]: 1,
|
|
25
|
+
[ButtonType.Secondary]: 1,
|
|
26
|
+
[ButtonType.SmallTech]: 0.5
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Common button component
|
|
31
|
+
*
|
|
32
|
+
* follows design: https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=419-18389
|
|
33
|
+
*
|
|
34
|
+
* for bordered style just override `borderColor` in style
|
|
35
|
+
*/
|
|
36
|
+
export const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
37
|
+
let {
|
|
38
|
+
style,
|
|
39
|
+
type = ButtonType.Primary,
|
|
40
|
+
disabled,
|
|
41
|
+
title,
|
|
42
|
+
subtitle,
|
|
43
|
+
onPressIn,
|
|
44
|
+
onPressOut,
|
|
45
|
+
testID,
|
|
46
|
+
...props
|
|
47
|
+
} = _ref;
|
|
48
|
+
const colorScheme = useAppColorScheme();
|
|
49
|
+
const [secondaryPressed, setSecondaryPressed] = useState(false);
|
|
50
|
+
const textColor = useMemo(() => {
|
|
51
|
+
switch (type) {
|
|
52
|
+
case ButtonType.Primary:
|
|
53
|
+
return colorScheme.accentText;
|
|
54
|
+
case ButtonType.Border:
|
|
55
|
+
case ButtonType.Secondary:
|
|
56
|
+
return colorScheme.text;
|
|
57
|
+
case ButtonType.SmallTech:
|
|
58
|
+
return colorScheme.codeAccent;
|
|
59
|
+
}
|
|
60
|
+
}, [type, colorScheme]);
|
|
61
|
+
const backgroundColor = useMemo(() => {
|
|
62
|
+
switch (type) {
|
|
63
|
+
case ButtonType.Primary:
|
|
64
|
+
return colorScheme.accent;
|
|
65
|
+
case ButtonType.Border:
|
|
66
|
+
case ButtonType.Secondary:
|
|
67
|
+
return secondaryPressed ? colorScheme.background : colorScheme.white;
|
|
68
|
+
case ButtonType.SmallTech:
|
|
69
|
+
return 'rgba(255, 255, 255, 0.05)';
|
|
70
|
+
}
|
|
71
|
+
}, [type, colorScheme, secondaryPressed]);
|
|
72
|
+
const borderColor = useMemo(() => {
|
|
73
|
+
switch (type) {
|
|
74
|
+
case ButtonType.Border:
|
|
75
|
+
return colorScheme.background;
|
|
76
|
+
default:
|
|
77
|
+
return backgroundColor;
|
|
78
|
+
}
|
|
79
|
+
}, [type, colorScheme.background, backgroundColor]);
|
|
80
|
+
const secondaryPressIn = useCallback(event => {
|
|
81
|
+
setSecondaryPressed(true);
|
|
82
|
+
onPressIn === null || onPressIn === void 0 ? void 0 : onPressIn(event);
|
|
83
|
+
}, [onPressIn]);
|
|
84
|
+
const secondaryPressOut = useCallback(event => {
|
|
85
|
+
setSecondaryPressed(false);
|
|
86
|
+
onPressOut === null || onPressOut === void 0 ? void 0 : onPressOut(event);
|
|
87
|
+
}, [onPressOut]);
|
|
88
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({
|
|
89
|
+
accessibilityRole: "button",
|
|
90
|
+
activeOpacity: ACTIVE_OPACITY[type],
|
|
91
|
+
hitSlop: hitSlop,
|
|
92
|
+
ref: ref,
|
|
93
|
+
style: [styles.button, subtitle ? styles.withSubtitle : undefined, {
|
|
94
|
+
backgroundColor,
|
|
95
|
+
borderColor
|
|
96
|
+
}, type === ButtonType.SmallTech && styles.techSmall, style],
|
|
97
|
+
disabled: disabled,
|
|
98
|
+
onPressIn: type === ButtonType.Secondary ? secondaryPressIn : onPressIn,
|
|
99
|
+
onPressOut: type === ButtonType.Secondary ? secondaryPressOut : onPressOut,
|
|
100
|
+
testID: testID
|
|
101
|
+
}, props), /*#__PURE__*/React.createElement(View, {
|
|
102
|
+
style: [secondaryPressed && styles.secondaryPressedLabel, disabled && styles.disabled],
|
|
103
|
+
testID: concatTestID(testID, disabled ? 'disabled' : 'enabled')
|
|
104
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
105
|
+
preset: type === ButtonType.SmallTech ? 's' : 'regular',
|
|
106
|
+
color: textColor,
|
|
107
|
+
align: "center",
|
|
108
|
+
numberOfLines: 1
|
|
109
|
+
}, title), subtitle ? /*#__PURE__*/React.createElement(Typography, {
|
|
110
|
+
preset: "s/line-height-capped",
|
|
111
|
+
style: styles.subtitle,
|
|
112
|
+
color: textColor,
|
|
113
|
+
align: "center",
|
|
114
|
+
numberOfLines: 1
|
|
115
|
+
}, subtitle) : null));
|
|
116
|
+
});
|
|
117
|
+
Button.displayName = 'Button';
|
|
118
|
+
const styles = StyleSheet.create({
|
|
119
|
+
button: {
|
|
120
|
+
borderRadius: 12,
|
|
121
|
+
borderWidth: 1,
|
|
122
|
+
paddingHorizontal: 16,
|
|
123
|
+
paddingVertical: 20
|
|
124
|
+
},
|
|
125
|
+
disabled: {
|
|
126
|
+
opacity: 0.4
|
|
127
|
+
},
|
|
128
|
+
secondaryPressedLabel: {
|
|
129
|
+
opacity: 0.5
|
|
130
|
+
},
|
|
131
|
+
subtitle: {
|
|
132
|
+
opacity: 0.8
|
|
133
|
+
},
|
|
134
|
+
techSmall: {
|
|
135
|
+
borderRadius: 4,
|
|
136
|
+
paddingVertical: 12
|
|
137
|
+
},
|
|
138
|
+
withSubtitle: {
|
|
139
|
+
paddingBottom: 12,
|
|
140
|
+
paddingTop: 8
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","useMemo","useState","StyleSheet","View","TouchableOpacity","Typography","useAppColorScheme","concatTestID","ButtonType","SLOP_VALUE","hitSlop","top","bottom","left","right","ACTIVE_OPACITY","Primary","Border","Secondary","SmallTech","Button","forwardRef","_ref","ref","style","type","disabled","title","subtitle","onPressIn","onPressOut","testID","props","colorScheme","secondaryPressed","setSecondaryPressed","textColor","accentText","text","codeAccent","backgroundColor","accent","background","white","borderColor","secondaryPressIn","event","secondaryPressOut","createElement","_extends","accessibilityRole","activeOpacity","styles","button","withSubtitle","undefined","techSmall","secondaryPressedLabel","preset","color","align","numberOfLines","displayName","create","borderRadius","borderWidth","paddingHorizontal","paddingVertical","opacity","paddingBottom","paddingTop"],"sources":["button.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { GestureResponderEvent, Insets, StyleSheet, TouchableOpacityProps, View } from 'react-native';\n\nimport { TouchableOpacity, TouchableOpacityRef } from '../accessibility/accessibilityHistoryWrappers';\nimport { Typography } from '../text';\nimport { useAppColorScheme } from '../theme';\nimport { concatTestID } from '../utils';\n\nexport enum ButtonType {\n Border = 'border',\n Primary = 'primary',\n Secondary = 'secondary',\n SmallTech = 'small-tech',\n}\n\nexport interface ButtonProps extends TouchableOpacityProps {\n type?: ButtonType;\n title: string;\n subtitle?: string;\n disabled?: boolean;\n}\n\nconst SLOP_VALUE = 10;\nconst hitSlop: Insets = {\n top: SLOP_VALUE,\n bottom: SLOP_VALUE,\n left: SLOP_VALUE,\n right: SLOP_VALUE,\n};\n\nconst ACTIVE_OPACITY: Record<ButtonType, number> = {\n [ButtonType.Primary]: 0.8,\n [ButtonType.Border]: 1,\n [ButtonType.Secondary]: 1,\n [ButtonType.SmallTech]: 0.5,\n};\n\n/**\n * Common button component\n *\n * follows design: https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=419-18389\n *\n * for bordered style just override `borderColor` in style\n */\nexport const Button = React.forwardRef<TouchableOpacityRef, ButtonProps>(\n ({ style, type = ButtonType.Primary, disabled, title, subtitle, onPressIn, onPressOut, testID, ...props }, ref) => {\n const colorScheme = useAppColorScheme();\n const [secondaryPressed, setSecondaryPressed] = useState(false);\n\n const textColor = useMemo(() => {\n switch (type) {\n case ButtonType.Primary:\n return colorScheme.accentText;\n case ButtonType.Border:\n case ButtonType.Secondary:\n return colorScheme.text;\n case ButtonType.SmallTech:\n return colorScheme.codeAccent;\n }\n }, [type, colorScheme]);\n\n const backgroundColor = useMemo(() => {\n switch (type) {\n case ButtonType.Primary:\n return colorScheme.accent;\n case ButtonType.Border:\n case ButtonType.Secondary:\n return secondaryPressed ? colorScheme.background : colorScheme.white;\n case ButtonType.SmallTech:\n return 'rgba(255, 255, 255, 0.05)';\n }\n }, [type, colorScheme, secondaryPressed]);\n\n const borderColor = useMemo(() => {\n switch (type) {\n case ButtonType.Border:\n return colorScheme.background;\n default:\n return backgroundColor;\n }\n }, [type, colorScheme.background, backgroundColor]);\n\n const secondaryPressIn = useCallback(\n (event: GestureResponderEvent) => {\n setSecondaryPressed(true);\n onPressIn?.(event);\n },\n [onPressIn],\n );\n\n const secondaryPressOut = useCallback(\n (event: GestureResponderEvent) => {\n setSecondaryPressed(false);\n onPressOut?.(event);\n },\n [onPressOut],\n );\n\n return (\n <TouchableOpacity\n accessibilityRole=\"button\"\n activeOpacity={ACTIVE_OPACITY[type]}\n hitSlop={hitSlop}\n ref={ref}\n style={[\n styles.button,\n subtitle ? styles.withSubtitle : undefined,\n { backgroundColor, borderColor },\n type === ButtonType.SmallTech && styles.techSmall,\n style,\n ]}\n disabled={disabled}\n onPressIn={type === ButtonType.Secondary ? secondaryPressIn : onPressIn}\n onPressOut={type === ButtonType.Secondary ? secondaryPressOut : onPressOut}\n testID={testID}\n {...props}>\n <View\n style={[secondaryPressed && styles.secondaryPressedLabel, disabled && styles.disabled]}\n testID={concatTestID(testID, disabled ? 'disabled' : 'enabled')}>\n <Typography\n preset={type === ButtonType.SmallTech ? 's' : 'regular'}\n color={textColor}\n align=\"center\"\n numberOfLines={1}>\n {title}\n </Typography>\n {subtitle ? (\n <Typography\n preset=\"s/line-height-capped\"\n style={styles.subtitle}\n color={textColor}\n align=\"center\"\n numberOfLines={1}>\n {subtitle}\n </Typography>\n ) : null}\n </View>\n </TouchableOpacity>\n );\n },\n);\n\nButton.displayName = 'Button';\n\nconst styles = StyleSheet.create({\n button: {\n borderRadius: 12,\n borderWidth: 1,\n paddingHorizontal: 16,\n paddingVertical: 20,\n },\n disabled: {\n opacity: 0.4,\n },\n secondaryPressedLabel: {\n opacity: 0.5,\n },\n subtitle: {\n opacity: 0.8,\n },\n techSmall: {\n borderRadius: 4,\n paddingVertical: 12,\n },\n withSubtitle: {\n paddingBottom: 12,\n paddingTop: 8,\n },\n});\n"],"mappings":"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"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { TouchableHighlight } from '../accessibility';
|
|
4
|
+
import { ConnectivityBluetoothOffIcon, ConnectivityBluetoothOnIcon, ConnectivityInternetOffIcon, ConnectivityInternetOnIcon, ConnectivityStatusIcon } from '../icons/connectivity';
|
|
5
|
+
import { Typography } from '../text';
|
|
6
|
+
import { useAppColorScheme } from '../theme';
|
|
7
|
+
import { concatTestID } from '../utils';
|
|
8
|
+
export let ConnectivityTransport;
|
|
9
|
+
(function (ConnectivityTransport) {
|
|
10
|
+
ConnectivityTransport["Internet"] = "Internet";
|
|
11
|
+
ConnectivityTransport["Bluetooth"] = "Bluetooth";
|
|
12
|
+
ConnectivityTransport["All"] = "All";
|
|
13
|
+
})(ConnectivityTransport || (ConnectivityTransport = {}));
|
|
14
|
+
const ConnectivityButton = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
available,
|
|
17
|
+
disabled,
|
|
18
|
+
onPress,
|
|
19
|
+
status,
|
|
20
|
+
title,
|
|
21
|
+
transport,
|
|
22
|
+
testID
|
|
23
|
+
} = _ref;
|
|
24
|
+
const colorScheme = useAppColorScheme();
|
|
25
|
+
const backgroundColor = status === undefined ? colorScheme.grayDark : colorScheme.white;
|
|
26
|
+
const opacity = disabled ? 0.7 : 1.0;
|
|
27
|
+
const icons = /*#__PURE__*/React.createElement(View, {
|
|
28
|
+
style: styles.icons
|
|
29
|
+
}, transport !== ConnectivityTransport.Bluetooth && (available ? /*#__PURE__*/React.createElement(ConnectivityInternetOnIcon, {
|
|
30
|
+
testID: concatTestID(testID, 'icon.on')
|
|
31
|
+
}) : /*#__PURE__*/React.createElement(ConnectivityInternetOffIcon, {
|
|
32
|
+
testID: concatTestID(testID, 'icon.off')
|
|
33
|
+
})), transport !== ConnectivityTransport.Internet && (available ? /*#__PURE__*/React.createElement(ConnectivityBluetoothOnIcon, {
|
|
34
|
+
testID: concatTestID(testID, 'icon.on')
|
|
35
|
+
}) : /*#__PURE__*/React.createElement(ConnectivityBluetoothOffIcon, {
|
|
36
|
+
testID: concatTestID(testID, 'icon.off')
|
|
37
|
+
})));
|
|
38
|
+
return /*#__PURE__*/React.createElement(TouchableHighlight, {
|
|
39
|
+
onPress: onPress,
|
|
40
|
+
style: styles.button
|
|
41
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
42
|
+
style: [styles.container, {
|
|
43
|
+
backgroundColor,
|
|
44
|
+
opacity
|
|
45
|
+
}]
|
|
46
|
+
}, icons, title && /*#__PURE__*/React.createElement(Typography, {
|
|
47
|
+
testID: concatTestID(testID, 'title'),
|
|
48
|
+
color: colorScheme.text,
|
|
49
|
+
preset: "s"
|
|
50
|
+
}, title), status !== undefined && /*#__PURE__*/React.createElement(ConnectivityStatusIcon, {
|
|
51
|
+
status: status
|
|
52
|
+
})));
|
|
53
|
+
};
|
|
54
|
+
const styles = StyleSheet.create({
|
|
55
|
+
button: {
|
|
56
|
+
borderRadius: 20,
|
|
57
|
+
overflow: 'hidden'
|
|
58
|
+
},
|
|
59
|
+
container: {
|
|
60
|
+
alignItems: 'center',
|
|
61
|
+
flexDirection: 'row',
|
|
62
|
+
height: 40,
|
|
63
|
+
paddingHorizontal: 12,
|
|
64
|
+
paddingVertical: 9
|
|
65
|
+
},
|
|
66
|
+
icons: {
|
|
67
|
+
alignItems: 'center',
|
|
68
|
+
flexDirection: 'row',
|
|
69
|
+
gap: 5
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
export default ConnectivityButton;
|
|
73
|
+
//# sourceMappingURL=connectivity-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","TouchableHighlight","ConnectivityBluetoothOffIcon","ConnectivityBluetoothOnIcon","ConnectivityInternetOffIcon","ConnectivityInternetOnIcon","ConnectivityStatusIcon","Typography","useAppColorScheme","concatTestID","ConnectivityTransport","ConnectivityButton","_ref","available","disabled","onPress","status","title","transport","testID","colorScheme","backgroundColor","undefined","grayDark","white","opacity","icons","createElement","style","styles","Bluetooth","Internet","button","container","color","text","preset","create","borderRadius","overflow","alignItems","flexDirection","height","paddingHorizontal","paddingVertical","gap"],"sources":["connectivity-button.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport { TouchableHighlight } from '../accessibility';\nimport {\n ConnectivityBluetoothOffIcon,\n ConnectivityBluetoothOnIcon,\n ConnectivityInternetOffIcon,\n ConnectivityInternetOnIcon,\n ConnectivityStatusIcon,\n} from '../icons/connectivity';\nimport { Typography } from '../text';\nimport { useAppColorScheme } from '../theme';\nimport { concatTestID } from '../utils';\n\nexport enum ConnectivityTransport {\n Internet = 'Internet',\n Bluetooth = 'Bluetooth',\n All = 'All',\n}\n\nexport type ConnectivityButtonProps = {\n available: boolean;\n disabled?: boolean;\n onPress?: () => void;\n status?: boolean;\n title?: string;\n transport: ConnectivityTransport;\n testID?: string;\n};\n\nconst ConnectivityButton: FC<ConnectivityButtonProps> = ({\n available,\n disabled,\n onPress,\n status,\n title,\n transport,\n testID,\n}) => {\n const colorScheme = useAppColorScheme();\n\n const backgroundColor = status === undefined ? colorScheme.grayDark : colorScheme.white;\n const opacity = disabled ? 0.7 : 1.0;\n const icons = (\n <View style={styles.icons}>\n {transport !== ConnectivityTransport.Bluetooth &&\n (available ? (\n <ConnectivityInternetOnIcon testID={concatTestID(testID, 'icon.on')} />\n ) : (\n <ConnectivityInternetOffIcon testID={concatTestID(testID, 'icon.off')} />\n ))}\n {transport !== ConnectivityTransport.Internet &&\n (available ? (\n <ConnectivityBluetoothOnIcon testID={concatTestID(testID, 'icon.on')} />\n ) : (\n <ConnectivityBluetoothOffIcon testID={concatTestID(testID, 'icon.off')} />\n ))}\n </View>\n );\n return (\n <TouchableHighlight onPress={onPress} style={styles.button}>\n <View style={[styles.container, { backgroundColor, opacity }]}>\n {icons}\n {title && (\n <Typography testID={concatTestID(testID, 'title')} color={colorScheme.text} preset=\"s\">\n {title}\n </Typography>\n )}\n {status !== undefined && <ConnectivityStatusIcon status={status} />}\n </View>\n </TouchableHighlight>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n borderRadius: 20,\n overflow: 'hidden',\n },\n container: {\n alignItems: 'center',\n flexDirection: 'row',\n height: 40,\n paddingHorizontal: 12,\n paddingVertical: 9,\n },\n icons: {\n alignItems: 'center',\n flexDirection: 'row',\n gap: 5,\n },\n});\n\nexport default ConnectivityButton;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAc,OAAO;AACjC,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,SAASC,kBAAkB,QAAQ,kBAAkB;AACrD,SACEC,4BAA4B,EAC5BC,2BAA2B,EAC3BC,2BAA2B,EAC3BC,0BAA0B,EAC1BC,sBAAsB,QACjB,uBAAuB;AAC9B,SAASC,UAAU,QAAQ,SAAS;AACpC,SAASC,iBAAiB,QAAQ,UAAU;AAC5C,SAASC,YAAY,QAAQ,UAAU;AAEvC,WAAYC,qBAAqB;AAIhC,WAJWA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;AAAA,GAArBA,qBAAqB,KAArBA,qBAAqB;AAgBjC,MAAMC,kBAA+C,GAAGC,IAAA,IAQlD;EAAA,IARmD;IACvDC,SAAS;IACTC,QAAQ;IACRC,OAAO;IACPC,MAAM;IACNC,KAAK;IACLC,SAAS;IACTC;EACF,CAAC,GAAAP,IAAA;EACC,MAAMQ,WAAW,GAAGZ,iBAAiB,EAAE;EAEvC,MAAMa,eAAe,GAAGL,MAAM,KAAKM,SAAS,GAAGF,WAAW,CAACG,QAAQ,GAAGH,WAAW,CAACI,KAAK;EACvF,MAAMC,OAAO,GAAGX,QAAQ,GAAG,GAAG,GAAG,GAAG;EACpC,MAAMY,KAAK,gBACT5B,KAAA,CAAA6B,aAAA,CAAC3B,IAAI;IAAC4B,KAAK,EAAEC,MAAM,CAACH;EAAM,GACvBR,SAAS,KAAKR,qBAAqB,CAACoB,SAAS,KAC3CjB,SAAS,gBACRf,KAAA,CAAA6B,aAAA,CAACtB,0BAA0B;IAACc,MAAM,EAAEV,YAAY,CAACU,MAAM,EAAE,SAAS;EAAE,EAAG,gBAEvErB,KAAA,CAAA6B,aAAA,CAACvB,2BAA2B;IAACe,MAAM,EAAEV,YAAY,CAACU,MAAM,EAAE,UAAU;EAAE,EACvE,CAAC,EACHD,SAAS,KAAKR,qBAAqB,CAACqB,QAAQ,KAC1ClB,SAAS,gBACRf,KAAA,CAAA6B,aAAA,CAACxB,2BAA2B;IAACgB,MAAM,EAAEV,YAAY,CAACU,MAAM,EAAE,SAAS;EAAE,EAAG,gBAExErB,KAAA,CAAA6B,aAAA,CAACzB,4BAA4B;IAACiB,MAAM,EAAEV,YAAY,CAACU,MAAM,EAAE,UAAU;EAAE,EACxE,CAAC,CAEP;EACD,oBACErB,KAAA,CAAA6B,aAAA,CAAC1B,kBAAkB;IAACc,OAAO,EAAEA,OAAQ;IAACa,KAAK,EAAEC,MAAM,CAACG;EAAO,gBACzDlC,KAAA,CAAA6B,aAAA,CAAC3B,IAAI;IAAC4B,KAAK,EAAE,CAACC,MAAM,CAACI,SAAS,EAAE;MAAEZ,eAAe;MAAEI;IAAQ,CAAC;EAAE,GAC3DC,KAAK,EACLT,KAAK,iBACJnB,KAAA,CAAA6B,aAAA,CAACpB,UAAU;IAACY,MAAM,EAAEV,YAAY,CAACU,MAAM,EAAE,OAAO,CAAE;IAACe,KAAK,EAAEd,WAAW,CAACe,IAAK;IAACC,MAAM,EAAC;EAAG,GACnFnB,KAAK,CAET,EACAD,MAAM,KAAKM,SAAS,iBAAIxB,KAAA,CAAA6B,aAAA,CAACrB,sBAAsB;IAACU,MAAM,EAAEA;EAAO,EAAG,CAC9D,CACY;AAEzB,CAAC;AAED,MAAMa,MAAM,GAAG9B,UAAU,CAACsC,MAAM,CAAC;EAC/BL,MAAM,EAAE;IACNM,YAAY,EAAE,EAAE;IAChBC,QAAQ,EAAE;EACZ,CAAC;EACDN,SAAS,EAAE;IACTO,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,KAAK;IACpBC,MAAM,EAAE,EAAE;IACVC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE;EACnB,CAAC;EACDlB,KAAK,EAAE;IACLc,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,KAAK;IACpBI,GAAG,EAAE;EACP;AACF,CAAC,CAAC;AAEF,eAAelC,kBAAkB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';
|
|
5
|
+
import { FilterIcon } from '../icons/icons';
|
|
6
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
7
|
+
const hitslop = {
|
|
8
|
+
bottom: 10,
|
|
9
|
+
left: 10,
|
|
10
|
+
right: 10,
|
|
11
|
+
top: 10
|
|
12
|
+
};
|
|
13
|
+
const FilterButton = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
active,
|
|
16
|
+
style,
|
|
17
|
+
...props
|
|
18
|
+
} = _ref;
|
|
19
|
+
const colorScheme = useAppColorScheme();
|
|
20
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({
|
|
21
|
+
accessibilityRole: "button",
|
|
22
|
+
accessibilityState: {
|
|
23
|
+
selected: active
|
|
24
|
+
},
|
|
25
|
+
hitSlop: hitslop,
|
|
26
|
+
style: [styles.button, {
|
|
27
|
+
backgroundColor: active ? colorScheme.accent : undefined
|
|
28
|
+
}, style]
|
|
29
|
+
}, props), /*#__PURE__*/React.createElement(FilterIcon, {
|
|
30
|
+
color: active ? colorScheme.white : colorScheme.accent
|
|
31
|
+
}));
|
|
32
|
+
};
|
|
33
|
+
const styles = StyleSheet.create({
|
|
34
|
+
button: {
|
|
35
|
+
alignItems: 'center',
|
|
36
|
+
borderRadius: 20,
|
|
37
|
+
height: 40,
|
|
38
|
+
justifyContent: 'center',
|
|
39
|
+
width: 40
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
export default FilterButton;
|
|
43
|
+
//# sourceMappingURL=filter-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","TouchableOpacity","FilterIcon","useAppColorScheme","hitslop","bottom","left","right","top","FilterButton","_ref","active","style","props","colorScheme","createElement","_extends","accessibilityRole","accessibilityState","selected","hitSlop","styles","button","backgroundColor","accent","undefined","color","white","create","alignItems","borderRadius","height","justifyContent","width"],"sources":["filter-button.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { Insets, StyleSheet, TouchableOpacityProps } from 'react-native';\n\nimport { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';\nimport { FilterIcon } from '../icons/icons';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nexport type FilterButtonProps = TouchableOpacityProps & {\n active: boolean;\n};\n\nconst hitslop: Insets = { bottom: 10, left: 10, right: 10, top: 10 };\n\nconst FilterButton: FC<FilterButtonProps> = ({ active, style, ...props }) => {\n const colorScheme = useAppColorScheme();\n return (\n <TouchableOpacity\n accessibilityRole=\"button\"\n accessibilityState={{ selected: active }}\n hitSlop={hitslop}\n style={[styles.button, { backgroundColor: active ? colorScheme.accent : undefined }, style]}\n {...props}>\n <FilterIcon color={active ? colorScheme.white : colorScheme.accent} />\n </TouchableOpacity>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n alignItems: 'center',\n borderRadius: 20,\n height: 40,\n justifyContent: 'center',\n width: 40,\n },\n});\n\nexport default FilterButton;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAc,OAAO;AACjC,SAAiBC,UAAU,QAA+B,cAAc;AAExE,SAASC,gBAAgB,QAAQ,+CAA+C;AAChF,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,iBAAiB,QAAQ,+BAA+B;AAMjE,MAAMC,OAAe,GAAG;EAAEC,MAAM,EAAE,EAAE;EAAEC,IAAI,EAAE,EAAE;EAAEC,KAAK,EAAE,EAAE;EAAEC,GAAG,EAAE;AAAG,CAAC;AAEpE,MAAMC,YAAmC,GAAGC,IAAA,IAAiC;EAAA,IAAhC;IAAEC,MAAM;IAAEC,KAAK;IAAE,GAAGC;EAAM,CAAC,GAAAH,IAAA;EACtE,MAAMI,WAAW,GAAGX,iBAAiB,EAAE;EACvC,oBACEJ,KAAA,CAAAgB,aAAA,CAACd,gBAAgB,EAAAe,QAAA;IACfC,iBAAiB,EAAC,QAAQ;IAC1BC,kBAAkB,EAAE;MAAEC,QAAQ,EAAER;IAAO,CAAE;IACzCS,OAAO,EAAEhB,OAAQ;IACjBQ,KAAK,EAAE,CAACS,MAAM,CAACC,MAAM,EAAE;MAAEC,eAAe,EAAEZ,MAAM,GAAGG,WAAW,CAACU,MAAM,GAAGC;IAAU,CAAC,EAAEb,KAAK;EAAE,GACxFC,KAAK,gBACTd,KAAA,CAAAgB,aAAA,CAACb,UAAU;IAACwB,KAAK,EAAEf,MAAM,GAAGG,WAAW,CAACa,KAAK,GAAGb,WAAW,CAACU;EAAO,EAAG,CACrD;AAEvB,CAAC;AAED,MAAMH,MAAM,GAAGrB,UAAU,CAAC4B,MAAM,CAAC;EAC/BN,MAAM,EAAE;IACNO,UAAU,EAAE,QAAQ;IACpBC,YAAY,EAAE,EAAE;IAChBC,MAAM,EAAE,EAAE;IACVC,cAAc,EAAE,QAAQ;IACxBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAexB,YAAY"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import { StyleSheet } from 'react-native';
|
|
4
|
+
import { useAccessibleAfterTransition } from '../accessibility';
|
|
5
|
+
import { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';
|
|
6
|
+
import { useAppColorScheme } from '../theme';
|
|
7
|
+
const hitSlop = {
|
|
8
|
+
top: 10,
|
|
9
|
+
left: 10,
|
|
10
|
+
bottom: 10,
|
|
11
|
+
right: 10
|
|
12
|
+
};
|
|
13
|
+
const GhostButton = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
accessibilityLabel,
|
|
16
|
+
icon,
|
|
17
|
+
onPress,
|
|
18
|
+
style,
|
|
19
|
+
...props
|
|
20
|
+
} = _ref;
|
|
21
|
+
const colorScheme = useAppColorScheme();
|
|
22
|
+
const accessible = useAccessibleAfterTransition();
|
|
23
|
+
const iconElement = useMemo(() => {
|
|
24
|
+
if ( /*#__PURE__*/React.isValidElement(icon)) {
|
|
25
|
+
return icon;
|
|
26
|
+
}
|
|
27
|
+
const Icon = icon;
|
|
28
|
+
return /*#__PURE__*/React.createElement(Icon, {
|
|
29
|
+
color: colorScheme.text
|
|
30
|
+
});
|
|
31
|
+
}, [colorScheme.text, icon]);
|
|
32
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({
|
|
33
|
+
accessibilityLabel: accessibilityLabel,
|
|
34
|
+
accessibilityRole: "button",
|
|
35
|
+
accessible: accessible,
|
|
36
|
+
hitSlop: hitSlop,
|
|
37
|
+
onPress: onPress,
|
|
38
|
+
style: [styles.button, style]
|
|
39
|
+
}, props), iconElement);
|
|
40
|
+
};
|
|
41
|
+
const styles = StyleSheet.create({
|
|
42
|
+
button: {
|
|
43
|
+
alignItems: 'center',
|
|
44
|
+
backgroundColor: 'transparent',
|
|
45
|
+
borderRadius: 12,
|
|
46
|
+
height: 24,
|
|
47
|
+
justifyContent: 'center',
|
|
48
|
+
overflow: 'hidden',
|
|
49
|
+
width: 24
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export default GhostButton;
|
|
53
|
+
//# sourceMappingURL=ghost-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useMemo","StyleSheet","useAccessibleAfterTransition","TouchableOpacity","useAppColorScheme","hitSlop","top","left","bottom","right","GhostButton","_ref","accessibilityLabel","icon","onPress","style","props","colorScheme","accessible","iconElement","isValidElement","Icon","createElement","color","text","_extends","accessibilityRole","styles","button","create","alignItems","backgroundColor","borderRadius","height","justifyContent","overflow","width"],"sources":["ghost-button.tsx"],"sourcesContent":["import React, { FC, ReactNode, useMemo } from 'react';\nimport { Insets, StyleProp, StyleSheet, TouchableOpacityProps, ViewStyle } from 'react-native';\nimport type { SvgProps } from 'react-native-svg';\n\nimport { useAccessibleAfterTransition } from '../accessibility';\nimport { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';\nimport { useAppColorScheme } from '../theme';\n\nexport type GhostButtonProps = TouchableOpacityProps & {\n accessibilityLabel: string;\n icon?: FC<SvgProps> | ReactNode;\n onPress: () => void;\n style?: StyleProp<ViewStyle>;\n};\n\nconst hitSlop: Insets = { top: 10, left: 10, bottom: 10, right: 10 };\n\nconst GhostButton: FC<GhostButtonProps> = ({ accessibilityLabel, icon, onPress, style, ...props }) => {\n const colorScheme = useAppColorScheme();\n const accessible = useAccessibleAfterTransition();\n\n const iconElement = useMemo(() => {\n if (React.isValidElement(icon)) {\n return icon;\n }\n const Icon = icon as FC<SvgProps>;\n return <Icon color={colorScheme.text} />;\n }, [colorScheme.text, icon]);\n\n return (\n <TouchableOpacity\n accessibilityLabel={accessibilityLabel}\n accessibilityRole=\"button\"\n accessible={accessible}\n hitSlop={hitSlop}\n onPress={onPress}\n style={[styles.button, style]}\n {...props}>\n {iconElement}\n </TouchableOpacity>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n alignItems: 'center',\n backgroundColor: 'transparent',\n borderRadius: 12,\n height: 24,\n justifyContent: 'center',\n overflow: 'hidden',\n width: 24,\n },\n});\n\nexport default GhostButton;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAmBC,OAAO,QAAQ,OAAO;AACrD,SAA4BC,UAAU,QAA0C,cAAc;AAG9F,SAASC,4BAA4B,QAAQ,kBAAkB;AAC/D,SAASC,gBAAgB,QAAQ,+CAA+C;AAChF,SAASC,iBAAiB,QAAQ,UAAU;AAS5C,MAAMC,OAAe,GAAG;EAAEC,GAAG,EAAE,EAAE;EAAEC,IAAI,EAAE,EAAE;EAAEC,MAAM,EAAE,EAAE;EAAEC,KAAK,EAAE;AAAG,CAAC;AAEpE,MAAMC,WAAiC,GAAGC,IAAA,IAA4D;EAAA,IAA3D;IAAEC,kBAAkB;IAAEC,IAAI;IAAEC,OAAO;IAAEC,KAAK;IAAE,GAAGC;EAAM,CAAC,GAAAL,IAAA;EAC/F,MAAMM,WAAW,GAAGb,iBAAiB,EAAE;EACvC,MAAMc,UAAU,GAAGhB,4BAA4B,EAAE;EAEjD,MAAMiB,WAAW,GAAGnB,OAAO,CAAC,MAAM;IAChC,kBAAID,KAAK,CAACqB,cAAc,CAACP,IAAI,CAAC,EAAE;MAC9B,OAAOA,IAAI;IACb;IACA,MAAMQ,IAAI,GAAGR,IAAoB;IACjC,oBAAOd,KAAA,CAAAuB,aAAA,CAACD,IAAI;MAACE,KAAK,EAAEN,WAAW,CAACO;IAAK,EAAG;EAC1C,CAAC,EAAE,CAACP,WAAW,CAACO,IAAI,EAAEX,IAAI,CAAC,CAAC;EAE5B,oBACEd,KAAA,CAAAuB,aAAA,CAACnB,gBAAgB,EAAAsB,QAAA;IACfb,kBAAkB,EAAEA,kBAAmB;IACvCc,iBAAiB,EAAC,QAAQ;IAC1BR,UAAU,EAAEA,UAAW;IACvBb,OAAO,EAAEA,OAAQ;IACjBS,OAAO,EAAEA,OAAQ;IACjBC,KAAK,EAAE,CAACY,MAAM,CAACC,MAAM,EAAEb,KAAK;EAAE,GAC1BC,KAAK,GACRG,WAAW,CACK;AAEvB,CAAC;AAED,MAAMQ,MAAM,GAAG1B,UAAU,CAAC4B,MAAM,CAAC;EAC/BD,MAAM,EAAE;IACNE,UAAU,EAAE,QAAQ;IACpBC,eAAe,EAAE,aAAa;IAC9BC,YAAY,EAAE,EAAE;IAChBC,MAAM,EAAE,EAAE;IACVC,cAAc,EAAE,QAAQ;IACxBC,QAAQ,EAAE,QAAQ;IAClBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAe1B,WAAW"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import BackButton, { BackButtonIcon, BackButtonProps } from './back-button';
|
|
2
|
+
import { Button, ButtonProps, ButtonType } from './button';
|
|
3
|
+
import ConnectivityButton, { ConnectivityButtonProps, ConnectivityTransport } from './connectivity-button';
|
|
4
|
+
import FilterButton, { FilterButtonProps } from './filter-button';
|
|
5
|
+
import GhostButton, { GhostButtonProps } from './ghost-button';
|
|
6
|
+
import ScanButton, { ScanButtonProps } from './scan-button';
|
|
7
|
+
export { BackButton, BackButtonIcon, BackButtonProps, Button, ButtonProps, ButtonType, ConnectivityButton, ConnectivityButtonProps, ConnectivityTransport, FilterButton, FilterButtonProps, GhostButton, GhostButtonProps, ScanButton, ScanButtonProps };
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BackButton","BackButtonIcon","BackButtonProps","Button","ButtonProps","ButtonType","ConnectivityButton","ConnectivityButtonProps","ConnectivityTransport","FilterButton","FilterButtonProps","GhostButton","GhostButtonProps","ScanButton","ScanButtonProps"],"sources":["index.ts"],"sourcesContent":["import BackButton, { BackButtonIcon, BackButtonProps } from './back-button';\nimport { Button, ButtonProps, ButtonType } from './button';\nimport ConnectivityButton, { ConnectivityButtonProps, ConnectivityTransport } from './connectivity-button';\nimport FilterButton, { FilterButtonProps } from './filter-button';\nimport GhostButton, { GhostButtonProps } from './ghost-button';\nimport ScanButton, { ScanButtonProps } from './scan-button';\n\nexport {\n BackButton,\n BackButtonIcon,\n BackButtonProps,\n Button,\n ButtonProps,\n ButtonType,\n ConnectivityButton,\n ConnectivityButtonProps,\n ConnectivityTransport,\n FilterButton,\n FilterButtonProps,\n GhostButton,\n GhostButtonProps,\n ScanButton,\n ScanButtonProps,\n};\n"],"mappings":"AAAA,OAAOA,UAAU,IAAIC,cAAc,EAAEC,eAAe,QAAQ,eAAe;AAC3E,SAASC,MAAM,EAAEC,WAAW,EAAEC,UAAU,QAAQ,UAAU;AAC1D,OAAOC,kBAAkB,IAAIC,uBAAuB,EAAEC,qBAAqB,QAAQ,uBAAuB;AAC1G,OAAOC,YAAY,IAAIC,iBAAiB,QAAQ,iBAAiB;AACjE,OAAOC,WAAW,IAAIC,gBAAgB,QAAQ,gBAAgB;AAC9D,OAAOC,UAAU,IAAIC,eAAe,QAAQ,eAAe;AAE3D,SACEd,UAAU,EACVC,cAAc,EACdC,eAAe,EACfC,MAAM,EACNC,WAAW,EACXC,UAAU,EACVC,kBAAkB,EAClBC,uBAAuB,EACvBC,qBAAqB,EACrBC,YAAY,EACZC,iBAAiB,EACjBC,WAAW,EACXC,gBAAgB,EAChBC,UAAU,EACVC,eAAe"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
|
+
import { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';
|
|
6
|
+
import { useAccessibilityTranslation } from '../accessibility/accessibilityLanguage';
|
|
7
|
+
import BlurView from '../blur/blur-view';
|
|
8
|
+
import { ScanIcon } from '../icons';
|
|
9
|
+
import { useAppColorScheme } from '../theme';
|
|
10
|
+
const hitSlop = {
|
|
11
|
+
top: 10,
|
|
12
|
+
left: 10,
|
|
13
|
+
bottom: 10,
|
|
14
|
+
right: 10
|
|
15
|
+
};
|
|
16
|
+
const ScanButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
17
|
+
let {
|
|
18
|
+
style,
|
|
19
|
+
...props
|
|
20
|
+
} = _ref;
|
|
21
|
+
const t = useAccessibilityTranslation();
|
|
22
|
+
const colorScheme = useAppColorScheme();
|
|
23
|
+
const insets = useSafeAreaInsets();
|
|
24
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({
|
|
25
|
+
accessibilityLabel: t('accessibility.icon.scan'),
|
|
26
|
+
accessibilityRole: "button",
|
|
27
|
+
hitSlop: hitSlop,
|
|
28
|
+
ref: ref,
|
|
29
|
+
style: [styles.button, {
|
|
30
|
+
bottom: Math.max(24, insets.bottom)
|
|
31
|
+
}, style]
|
|
32
|
+
}, props), /*#__PURE__*/React.createElement(BlurView, {
|
|
33
|
+
blurStyle: "soft",
|
|
34
|
+
style: styles.blurWrapper
|
|
35
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
36
|
+
style: [styles.iconWrapper, {
|
|
37
|
+
backgroundColor: colorScheme.accent
|
|
38
|
+
}]
|
|
39
|
+
}, /*#__PURE__*/React.createElement(ScanIcon, {
|
|
40
|
+
color: colorScheme.white
|
|
41
|
+
}))));
|
|
42
|
+
});
|
|
43
|
+
ScanButton.displayName = 'ScanButton';
|
|
44
|
+
export default ScanButton;
|
|
45
|
+
const styles = StyleSheet.create({
|
|
46
|
+
blurWrapper: {
|
|
47
|
+
borderRadius: 28,
|
|
48
|
+
height: 80,
|
|
49
|
+
padding: 8,
|
|
50
|
+
width: 104
|
|
51
|
+
},
|
|
52
|
+
button: {
|
|
53
|
+
borderRadius: 28,
|
|
54
|
+
height: 80,
|
|
55
|
+
left: '50%',
|
|
56
|
+
marginLeft: -52,
|
|
57
|
+
position: 'absolute',
|
|
58
|
+
shadowColor: '#000000',
|
|
59
|
+
shadowOffset: {
|
|
60
|
+
height: 4,
|
|
61
|
+
width: 0
|
|
62
|
+
},
|
|
63
|
+
shadowOpacity: 0.2,
|
|
64
|
+
shadowRadius: 24,
|
|
65
|
+
width: 104
|
|
66
|
+
},
|
|
67
|
+
iconWrapper: {
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
borderRadius: 20,
|
|
70
|
+
height: '100%',
|
|
71
|
+
justifyContent: 'center',
|
|
72
|
+
width: '100%'
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
//# sourceMappingURL=scan-button.js.map
|