@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,21 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import ActivityIndicator from './activity-indicator';
|
|
5
|
+
|
|
6
|
+
const Basic: ComponentStory<typeof ActivityIndicator> = (args) => <ActivityIndicator {...args} />;
|
|
7
|
+
|
|
8
|
+
Basic.args = {};
|
|
9
|
+
|
|
10
|
+
export { Basic as ActivityIndicator };
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
title: 'base/activity/Activity Indicator',
|
|
14
|
+
component: ActivityIndicator,
|
|
15
|
+
parameters: {
|
|
16
|
+
design: {
|
|
17
|
+
type: 'figma',
|
|
18
|
+
url: 'https://www.figma.com/design/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=444-45709&node-type=symbol&t=OQxawbbArhzkDVkZ-0',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
} as ComponentMeta<typeof ActivityIndicator>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { ViewProps } from 'react-native-svg/lib/typescript/fabric/utils';
|
|
4
|
+
|
|
5
|
+
import LoaderView, { LoaderViewState } from '../loader/loader';
|
|
6
|
+
|
|
7
|
+
type ActivityIndicatorProps = ViewProps & {
|
|
8
|
+
animate?: boolean;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const ActivityIndicator: FC<ActivityIndicatorProps> = ({ animate = true, style, ...props }) => {
|
|
12
|
+
return (
|
|
13
|
+
<View {...props} style={[styles.wrapper, style]}>
|
|
14
|
+
<LoaderView animate={animate} state={LoaderViewState.InProgress} />
|
|
15
|
+
</View>
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const styles = StyleSheet.create({
|
|
20
|
+
wrapper: {
|
|
21
|
+
alignItems: 'center',
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export default ActivityIndicator;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { BlurView as RNBlurView, BlurViewProps as RNBlurViewProps } from '@react-native-community/blur';
|
|
2
|
+
import React, { FC, PropsWithChildren, useMemo } from 'react';
|
|
3
|
+
import { ColorValue, Platform, StyleSheet, View, ViewProps, ViewStyle } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { useAppColorScheme } from '../theme';
|
|
6
|
+
import { colorWithAlphaComponent } from '../utils/color';
|
|
7
|
+
|
|
8
|
+
export interface BlurViewProps extends ViewProps {
|
|
9
|
+
blurAmount?: number;
|
|
10
|
+
color?: ColorValue;
|
|
11
|
+
darkMode?: boolean;
|
|
12
|
+
blurStyle: 'soft' | 'strong' | 'header';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const BACKGROUND_COLOR = {
|
|
16
|
+
light: 'rgba(255, 255, 255, 0.8)',
|
|
17
|
+
dark: 'rgba(16, 12, 12, 0.8)',
|
|
18
|
+
thickMaterialLight: 'rgba(255, 255, 255, 0.95)',
|
|
19
|
+
thickMaterialDark: 'rgba(16, 12, 12, 0.95)',
|
|
20
|
+
thinMaterialLight: 'rgba(255, 255, 255, 0.8)',
|
|
21
|
+
thinMaterialDark: 'rgba(16, 12, 12, 0.8)',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const BlurView: FC<PropsWithChildren<BlurViewProps>> = ({
|
|
25
|
+
blurAmount = 50,
|
|
26
|
+
blurStyle,
|
|
27
|
+
color,
|
|
28
|
+
darkMode,
|
|
29
|
+
children,
|
|
30
|
+
style,
|
|
31
|
+
...props
|
|
32
|
+
}) => {
|
|
33
|
+
const colorScheme = useAppColorScheme();
|
|
34
|
+
const themeDarkMode = colorScheme.darkMode;
|
|
35
|
+
const dark = darkMode ?? themeDarkMode;
|
|
36
|
+
|
|
37
|
+
const blurType: RNBlurViewProps['blurType'] = useMemo(() => {
|
|
38
|
+
if (blurStyle === 'header') {
|
|
39
|
+
return dark ? 'dark' : 'light';
|
|
40
|
+
} else if (blurStyle === 'soft') {
|
|
41
|
+
return dark ? 'thinMaterialDark' : 'thinMaterialLight';
|
|
42
|
+
} else {
|
|
43
|
+
return dark ? 'thickMaterialDark' : 'thickMaterialLight';
|
|
44
|
+
}
|
|
45
|
+
}, [blurStyle, dark]);
|
|
46
|
+
|
|
47
|
+
const backgroundStyle: ViewStyle | undefined = useMemo(() => {
|
|
48
|
+
if (blurStyle === 'header' && color === colorScheme.background) {
|
|
49
|
+
return { backgroundColor: '#00000005' };
|
|
50
|
+
}
|
|
51
|
+
}, [blurStyle, color, colorScheme.background]);
|
|
52
|
+
|
|
53
|
+
if (Platform.OS === 'ios') {
|
|
54
|
+
return (
|
|
55
|
+
<View style={[styles.wrapper, backgroundStyle, style]} {...props}>
|
|
56
|
+
<RNBlurView
|
|
57
|
+
blurAmount={blurAmount}
|
|
58
|
+
blurType={blurType}
|
|
59
|
+
reducedTransparencyFallbackColor={color as string}
|
|
60
|
+
style={StyleSheet.absoluteFill}
|
|
61
|
+
/>
|
|
62
|
+
{children}
|
|
63
|
+
</View>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const backgroundColor = color ? colorWithAlphaComponent(color, 0.9) : BACKGROUND_COLOR[blurType];
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<View style={[{ backgroundColor }, style]} {...props}>
|
|
71
|
+
{children}
|
|
72
|
+
</View>
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const styles = StyleSheet.create({
|
|
77
|
+
wrapper: {
|
|
78
|
+
overflow: 'hidden',
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export default BlurView;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import BackButton, { BackButtonIcon } from './back-button';
|
|
5
|
+
|
|
6
|
+
const Basic: ComponentStory<typeof BackButton> = (args) => <BackButton {...args} />;
|
|
7
|
+
|
|
8
|
+
Basic.args = {
|
|
9
|
+
icon: BackButtonIcon.Back,
|
|
10
|
+
style: { margin: 24 },
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { Basic as BackButton };
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
title: 'base/button/Back Button',
|
|
17
|
+
component: BackButton,
|
|
18
|
+
argTypes: {
|
|
19
|
+
icon: {
|
|
20
|
+
options: [BackButtonIcon.Back, BackButtonIcon.Close],
|
|
21
|
+
control: { type: 'radio' },
|
|
22
|
+
},
|
|
23
|
+
onPress: { action: 'onPress' },
|
|
24
|
+
},
|
|
25
|
+
parameters: {
|
|
26
|
+
design: {
|
|
27
|
+
type: 'figma',
|
|
28
|
+
url: 'https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=425-18650&t=KAAJ0oKY3xb6VNtA-4',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
} as ComponentMeta<typeof BackButton>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
import { useAccessibilityTranslation } from '../accessibility/accessibilityLanguage';
|
|
4
|
+
import { GhostButtonProps } from '../buttons/ghost-button';
|
|
5
|
+
import { BackIcon, CloseIcon } from '../icons';
|
|
6
|
+
import GhostButton from './ghost-button';
|
|
7
|
+
|
|
8
|
+
export enum BackButtonIcon {
|
|
9
|
+
Back = 'back',
|
|
10
|
+
Close = 'close',
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type BackButtonProps = Omit<GhostButtonProps, 'accessibilityLabel'>;
|
|
14
|
+
|
|
15
|
+
const BackButton: FC<BackButtonProps> = ({ style, icon = BackButtonIcon.Back, onPress, ...props }) => {
|
|
16
|
+
const t = useAccessibilityTranslation();
|
|
17
|
+
|
|
18
|
+
const Icon = icon === BackButtonIcon.Close ? CloseIcon : BackIcon;
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<GhostButton
|
|
22
|
+
accessibilityLabel={t(icon === BackButtonIcon.Close ? 'accessibility.nav.close' : 'accessibility.nav.back')}
|
|
23
|
+
icon={Icon}
|
|
24
|
+
onPress={onPress}
|
|
25
|
+
style={style}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default BackButton;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { Button } from './button';
|
|
5
|
+
|
|
6
|
+
const Basic: ComponentStory<typeof Button> = (args) => <Button {...args} />;
|
|
7
|
+
|
|
8
|
+
Basic.args = {
|
|
9
|
+
title: 'Title',
|
|
10
|
+
subtitle: '',
|
|
11
|
+
disabled: false,
|
|
12
|
+
style: { margin: 24 },
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { Basic as Button };
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
title: 'base/button/Button',
|
|
19
|
+
component: Button,
|
|
20
|
+
argTypes: {
|
|
21
|
+
onPress: { action: 'onPress' },
|
|
22
|
+
},
|
|
23
|
+
parameters: {
|
|
24
|
+
design: {
|
|
25
|
+
type: 'figma',
|
|
26
|
+
url: 'https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=419-18389',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
} as ComponentMeta<typeof Button>;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
2
|
+
import { GestureResponderEvent, Insets, StyleSheet, TouchableOpacityProps, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { TouchableOpacity, TouchableOpacityRef } from '../accessibility/accessibilityHistoryWrappers';
|
|
5
|
+
import { Typography } from '../text';
|
|
6
|
+
import { useAppColorScheme } from '../theme';
|
|
7
|
+
import { concatTestID } from '../utils';
|
|
8
|
+
|
|
9
|
+
export enum ButtonType {
|
|
10
|
+
Border = 'border',
|
|
11
|
+
Primary = 'primary',
|
|
12
|
+
Secondary = 'secondary',
|
|
13
|
+
SmallTech = 'small-tech',
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ButtonProps extends TouchableOpacityProps {
|
|
17
|
+
type?: ButtonType;
|
|
18
|
+
title: string;
|
|
19
|
+
subtitle?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const SLOP_VALUE = 10;
|
|
24
|
+
const hitSlop: Insets = {
|
|
25
|
+
top: SLOP_VALUE,
|
|
26
|
+
bottom: SLOP_VALUE,
|
|
27
|
+
left: SLOP_VALUE,
|
|
28
|
+
right: SLOP_VALUE,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const ACTIVE_OPACITY: Record<ButtonType, number> = {
|
|
32
|
+
[ButtonType.Primary]: 0.8,
|
|
33
|
+
[ButtonType.Border]: 1,
|
|
34
|
+
[ButtonType.Secondary]: 1,
|
|
35
|
+
[ButtonType.SmallTech]: 0.5,
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Common button component
|
|
40
|
+
*
|
|
41
|
+
* follows design: https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=419-18389
|
|
42
|
+
*
|
|
43
|
+
* for bordered style just override `borderColor` in style
|
|
44
|
+
*/
|
|
45
|
+
export const Button = React.forwardRef<TouchableOpacityRef, ButtonProps>(
|
|
46
|
+
({ style, type = ButtonType.Primary, disabled, title, subtitle, onPressIn, onPressOut, testID, ...props }, ref) => {
|
|
47
|
+
const colorScheme = useAppColorScheme();
|
|
48
|
+
const [secondaryPressed, setSecondaryPressed] = useState(false);
|
|
49
|
+
|
|
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
|
+
|
|
62
|
+
const backgroundColor = useMemo(() => {
|
|
63
|
+
switch (type) {
|
|
64
|
+
case ButtonType.Primary:
|
|
65
|
+
return colorScheme.accent;
|
|
66
|
+
case ButtonType.Border:
|
|
67
|
+
case ButtonType.Secondary:
|
|
68
|
+
return secondaryPressed ? colorScheme.background : colorScheme.white;
|
|
69
|
+
case ButtonType.SmallTech:
|
|
70
|
+
return 'rgba(255, 255, 255, 0.05)';
|
|
71
|
+
}
|
|
72
|
+
}, [type, colorScheme, secondaryPressed]);
|
|
73
|
+
|
|
74
|
+
const borderColor = useMemo(() => {
|
|
75
|
+
switch (type) {
|
|
76
|
+
case ButtonType.Border:
|
|
77
|
+
return colorScheme.background;
|
|
78
|
+
default:
|
|
79
|
+
return backgroundColor;
|
|
80
|
+
}
|
|
81
|
+
}, [type, colorScheme.background, backgroundColor]);
|
|
82
|
+
|
|
83
|
+
const secondaryPressIn = useCallback(
|
|
84
|
+
(event: GestureResponderEvent) => {
|
|
85
|
+
setSecondaryPressed(true);
|
|
86
|
+
onPressIn?.(event);
|
|
87
|
+
},
|
|
88
|
+
[onPressIn],
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
const secondaryPressOut = useCallback(
|
|
92
|
+
(event: GestureResponderEvent) => {
|
|
93
|
+
setSecondaryPressed(false);
|
|
94
|
+
onPressOut?.(event);
|
|
95
|
+
},
|
|
96
|
+
[onPressOut],
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
<TouchableOpacity
|
|
101
|
+
accessibilityRole="button"
|
|
102
|
+
activeOpacity={ACTIVE_OPACITY[type]}
|
|
103
|
+
hitSlop={hitSlop}
|
|
104
|
+
ref={ref}
|
|
105
|
+
style={[
|
|
106
|
+
styles.button,
|
|
107
|
+
subtitle ? styles.withSubtitle : undefined,
|
|
108
|
+
{ backgroundColor, borderColor },
|
|
109
|
+
type === ButtonType.SmallTech && styles.techSmall,
|
|
110
|
+
style,
|
|
111
|
+
]}
|
|
112
|
+
disabled={disabled}
|
|
113
|
+
onPressIn={type === ButtonType.Secondary ? secondaryPressIn : onPressIn}
|
|
114
|
+
onPressOut={type === ButtonType.Secondary ? secondaryPressOut : onPressOut}
|
|
115
|
+
testID={testID}
|
|
116
|
+
{...props}>
|
|
117
|
+
<View
|
|
118
|
+
style={[secondaryPressed && styles.secondaryPressedLabel, disabled && styles.disabled]}
|
|
119
|
+
testID={concatTestID(testID, disabled ? 'disabled' : 'enabled')}>
|
|
120
|
+
<Typography
|
|
121
|
+
preset={type === ButtonType.SmallTech ? 's' : 'regular'}
|
|
122
|
+
color={textColor}
|
|
123
|
+
align="center"
|
|
124
|
+
numberOfLines={1}>
|
|
125
|
+
{title}
|
|
126
|
+
</Typography>
|
|
127
|
+
{subtitle ? (
|
|
128
|
+
<Typography
|
|
129
|
+
preset="s/line-height-capped"
|
|
130
|
+
style={styles.subtitle}
|
|
131
|
+
color={textColor}
|
|
132
|
+
align="center"
|
|
133
|
+
numberOfLines={1}>
|
|
134
|
+
{subtitle}
|
|
135
|
+
</Typography>
|
|
136
|
+
) : null}
|
|
137
|
+
</View>
|
|
138
|
+
</TouchableOpacity>
|
|
139
|
+
);
|
|
140
|
+
},
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
Button.displayName = 'Button';
|
|
144
|
+
|
|
145
|
+
const styles = StyleSheet.create({
|
|
146
|
+
button: {
|
|
147
|
+
borderRadius: 12,
|
|
148
|
+
borderWidth: 1,
|
|
149
|
+
paddingHorizontal: 16,
|
|
150
|
+
paddingVertical: 20,
|
|
151
|
+
},
|
|
152
|
+
disabled: {
|
|
153
|
+
opacity: 0.4,
|
|
154
|
+
},
|
|
155
|
+
secondaryPressedLabel: {
|
|
156
|
+
opacity: 0.5,
|
|
157
|
+
},
|
|
158
|
+
subtitle: {
|
|
159
|
+
opacity: 0.8,
|
|
160
|
+
},
|
|
161
|
+
techSmall: {
|
|
162
|
+
borderRadius: 4,
|
|
163
|
+
paddingVertical: 12,
|
|
164
|
+
},
|
|
165
|
+
withSubtitle: {
|
|
166
|
+
paddingBottom: 12,
|
|
167
|
+
paddingTop: 8,
|
|
168
|
+
},
|
|
169
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import ConnectivityButton, { ConnectivityTransport } from './connectivity-button';
|
|
5
|
+
|
|
6
|
+
const Basic: ComponentStory<typeof ConnectivityButton> = (args) => <ConnectivityButton {...args} />;
|
|
7
|
+
|
|
8
|
+
Basic.args = {
|
|
9
|
+
available: true,
|
|
10
|
+
disabled: false,
|
|
11
|
+
status: true,
|
|
12
|
+
title: 'Connectivity message',
|
|
13
|
+
transport: ConnectivityTransport.Internet,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { Basic as ConnectivityButton };
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
title: 'base/button/Connectivity Button',
|
|
20
|
+
component: ConnectivityButton,
|
|
21
|
+
argTypes: {
|
|
22
|
+
transport: {
|
|
23
|
+
options: [ConnectivityTransport.Internet, ConnectivityTransport.Bluetooth, ConnectivityTransport.All],
|
|
24
|
+
control: { type: 'radio' },
|
|
25
|
+
},
|
|
26
|
+
onPress: { action: 'onPress' },
|
|
27
|
+
},
|
|
28
|
+
parameters: {
|
|
29
|
+
design: {
|
|
30
|
+
type: 'figma',
|
|
31
|
+
url: 'https://www.figma.com/design/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=4237-32033&node-type=frame&t=TJ4R3WHLQ1CsXNeT-0',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
} as ComponentMeta<typeof ConnectivityButton>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { TouchableHighlight } from '../accessibility';
|
|
5
|
+
import {
|
|
6
|
+
ConnectivityBluetoothOffIcon,
|
|
7
|
+
ConnectivityBluetoothOnIcon,
|
|
8
|
+
ConnectivityInternetOffIcon,
|
|
9
|
+
ConnectivityInternetOnIcon,
|
|
10
|
+
ConnectivityStatusIcon,
|
|
11
|
+
} from '../icons/connectivity';
|
|
12
|
+
import { Typography } from '../text';
|
|
13
|
+
import { useAppColorScheme } from '../theme';
|
|
14
|
+
import { concatTestID } from '../utils';
|
|
15
|
+
|
|
16
|
+
export enum ConnectivityTransport {
|
|
17
|
+
Internet = 'Internet',
|
|
18
|
+
Bluetooth = 'Bluetooth',
|
|
19
|
+
All = 'All',
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type ConnectivityButtonProps = {
|
|
23
|
+
available: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
onPress?: () => void;
|
|
26
|
+
status?: boolean;
|
|
27
|
+
title?: string;
|
|
28
|
+
transport: ConnectivityTransport;
|
|
29
|
+
testID?: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const ConnectivityButton: FC<ConnectivityButtonProps> = ({
|
|
33
|
+
available,
|
|
34
|
+
disabled,
|
|
35
|
+
onPress,
|
|
36
|
+
status,
|
|
37
|
+
title,
|
|
38
|
+
transport,
|
|
39
|
+
testID,
|
|
40
|
+
}) => {
|
|
41
|
+
const colorScheme = useAppColorScheme();
|
|
42
|
+
|
|
43
|
+
const backgroundColor = status === undefined ? colorScheme.grayDark : colorScheme.white;
|
|
44
|
+
const opacity = disabled ? 0.7 : 1.0;
|
|
45
|
+
const icons = (
|
|
46
|
+
<View style={styles.icons}>
|
|
47
|
+
{transport !== ConnectivityTransport.Bluetooth &&
|
|
48
|
+
(available ? (
|
|
49
|
+
<ConnectivityInternetOnIcon testID={concatTestID(testID, 'icon.on')} />
|
|
50
|
+
) : (
|
|
51
|
+
<ConnectivityInternetOffIcon testID={concatTestID(testID, 'icon.off')} />
|
|
52
|
+
))}
|
|
53
|
+
{transport !== ConnectivityTransport.Internet &&
|
|
54
|
+
(available ? (
|
|
55
|
+
<ConnectivityBluetoothOnIcon testID={concatTestID(testID, 'icon.on')} />
|
|
56
|
+
) : (
|
|
57
|
+
<ConnectivityBluetoothOffIcon testID={concatTestID(testID, 'icon.off')} />
|
|
58
|
+
))}
|
|
59
|
+
</View>
|
|
60
|
+
);
|
|
61
|
+
return (
|
|
62
|
+
<TouchableHighlight onPress={onPress} style={styles.button}>
|
|
63
|
+
<View style={[styles.container, { backgroundColor, opacity }]}>
|
|
64
|
+
{icons}
|
|
65
|
+
{title && (
|
|
66
|
+
<Typography testID={concatTestID(testID, 'title')} color={colorScheme.text} preset="s">
|
|
67
|
+
{title}
|
|
68
|
+
</Typography>
|
|
69
|
+
)}
|
|
70
|
+
{status !== undefined && <ConnectivityStatusIcon status={status} />}
|
|
71
|
+
</View>
|
|
72
|
+
</TouchableHighlight>
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const styles = StyleSheet.create({
|
|
77
|
+
button: {
|
|
78
|
+
borderRadius: 20,
|
|
79
|
+
overflow: 'hidden',
|
|
80
|
+
},
|
|
81
|
+
container: {
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
flexDirection: 'row',
|
|
84
|
+
height: 40,
|
|
85
|
+
paddingHorizontal: 12,
|
|
86
|
+
paddingVertical: 9,
|
|
87
|
+
},
|
|
88
|
+
icons: {
|
|
89
|
+
alignItems: 'center',
|
|
90
|
+
flexDirection: 'row',
|
|
91
|
+
gap: 5,
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
export default ConnectivityButton;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { Insets, StyleSheet, TouchableOpacityProps } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';
|
|
5
|
+
import { FilterIcon } from '../icons/icons';
|
|
6
|
+
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
7
|
+
|
|
8
|
+
export type FilterButtonProps = TouchableOpacityProps & {
|
|
9
|
+
active: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const hitslop: Insets = { bottom: 10, left: 10, right: 10, top: 10 };
|
|
13
|
+
|
|
14
|
+
const FilterButton: FC<FilterButtonProps> = ({ active, style, ...props }) => {
|
|
15
|
+
const colorScheme = useAppColorScheme();
|
|
16
|
+
return (
|
|
17
|
+
<TouchableOpacity
|
|
18
|
+
accessibilityRole="button"
|
|
19
|
+
accessibilityState={{ selected: active }}
|
|
20
|
+
hitSlop={hitslop}
|
|
21
|
+
style={[styles.button, { backgroundColor: active ? colorScheme.accent : undefined }, style]}
|
|
22
|
+
{...props}>
|
|
23
|
+
<FilterIcon color={active ? colorScheme.white : colorScheme.accent} />
|
|
24
|
+
</TouchableOpacity>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const styles = StyleSheet.create({
|
|
29
|
+
button: {
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
borderRadius: 20,
|
|
32
|
+
height: 40,
|
|
33
|
+
justifyContent: 'center',
|
|
34
|
+
width: 40,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export default FilterButton;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { CloseIcon } from '../icons';
|
|
5
|
+
import GhostButton from './ghost-button';
|
|
6
|
+
|
|
7
|
+
const Basic: ComponentStory<typeof GhostButton> = (args) => <GhostButton {...args} />;
|
|
8
|
+
|
|
9
|
+
Basic.args = {
|
|
10
|
+
icon: CloseIcon,
|
|
11
|
+
style: { margin: 24 },
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { Basic as GhostButton };
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
title: 'base/button/Ghost Button',
|
|
18
|
+
component: GhostButton,
|
|
19
|
+
argTypes: {
|
|
20
|
+
onPress: { action: 'onPress' },
|
|
21
|
+
},
|
|
22
|
+
parameters: {
|
|
23
|
+
design: {
|
|
24
|
+
type: 'figma',
|
|
25
|
+
url: 'https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=425-18650&t=KAAJ0oKY3xb6VNtA-4',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
} as ComponentMeta<typeof GhostButton>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, { FC, ReactNode, useMemo } from 'react';
|
|
2
|
+
import { Insets, StyleProp, StyleSheet, TouchableOpacityProps, ViewStyle } from 'react-native';
|
|
3
|
+
import type { SvgProps } from 'react-native-svg';
|
|
4
|
+
|
|
5
|
+
import { useAccessibleAfterTransition } from '../accessibility';
|
|
6
|
+
import { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';
|
|
7
|
+
import { useAppColorScheme } from '../theme';
|
|
8
|
+
|
|
9
|
+
export type GhostButtonProps = TouchableOpacityProps & {
|
|
10
|
+
accessibilityLabel: string;
|
|
11
|
+
icon?: FC<SvgProps> | ReactNode;
|
|
12
|
+
onPress: () => void;
|
|
13
|
+
style?: StyleProp<ViewStyle>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const hitSlop: Insets = { top: 10, left: 10, bottom: 10, right: 10 };
|
|
17
|
+
|
|
18
|
+
const GhostButton: FC<GhostButtonProps> = ({ accessibilityLabel, icon, onPress, style, ...props }) => {
|
|
19
|
+
const colorScheme = useAppColorScheme();
|
|
20
|
+
const accessible = useAccessibleAfterTransition();
|
|
21
|
+
|
|
22
|
+
const iconElement = useMemo(() => {
|
|
23
|
+
if (React.isValidElement(icon)) {
|
|
24
|
+
return icon;
|
|
25
|
+
}
|
|
26
|
+
const Icon = icon as FC<SvgProps>;
|
|
27
|
+
return <Icon color={colorScheme.text} />;
|
|
28
|
+
}, [colorScheme.text, icon]);
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<TouchableOpacity
|
|
32
|
+
accessibilityLabel={accessibilityLabel}
|
|
33
|
+
accessibilityRole="button"
|
|
34
|
+
accessible={accessible}
|
|
35
|
+
hitSlop={hitSlop}
|
|
36
|
+
onPress={onPress}
|
|
37
|
+
style={[styles.button, style]}
|
|
38
|
+
{...props}>
|
|
39
|
+
{iconElement}
|
|
40
|
+
</TouchableOpacity>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const styles = StyleSheet.create({
|
|
45
|
+
button: {
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
backgroundColor: 'transparent',
|
|
48
|
+
borderRadius: 12,
|
|
49
|
+
height: 24,
|
|
50
|
+
justifyContent: 'center',
|
|
51
|
+
overflow: 'hidden',
|
|
52
|
+
width: 24,
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export default GhostButton;
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
|
|
8
|
+
export {
|
|
9
|
+
BackButton,
|
|
10
|
+
BackButtonIcon,
|
|
11
|
+
BackButtonProps,
|
|
12
|
+
Button,
|
|
13
|
+
ButtonProps,
|
|
14
|
+
ButtonType,
|
|
15
|
+
ConnectivityButton,
|
|
16
|
+
ConnectivityButtonProps,
|
|
17
|
+
ConnectivityTransport,
|
|
18
|
+
FilterButton,
|
|
19
|
+
FilterButtonProps,
|
|
20
|
+
GhostButton,
|
|
21
|
+
GhostButtonProps,
|
|
22
|
+
ScanButton,
|
|
23
|
+
ScanButtonProps,
|
|
24
|
+
};
|