@bifold/core 2.3.0 → 2.4.0
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/lib/commonjs/App.js +1 -1
- package/lib/commonjs/App.js.map +1 -1
- package/lib/commonjs/components/animated/ButtonLoading.js +2 -2
- package/lib/commonjs/components/animated/ButtonLoading.js.map +1 -1
- package/lib/commonjs/components/animated/ConnectionLoading.js +3 -3
- package/lib/commonjs/components/animated/ConnectionLoading.js.map +1 -1
- package/lib/commonjs/components/animated/LoadingIndicator.js +2 -2
- package/lib/commonjs/components/animated/LoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/animated/PresentationLoading.js +3 -3
- package/lib/commonjs/components/animated/PresentationLoading.js.map +1 -1
- package/lib/commonjs/components/animated/RecordLoading.js +5 -5
- package/lib/commonjs/components/animated/RecordLoading.js.map +1 -1
- package/lib/commonjs/components/animated/SendingProof.js +3 -3
- package/lib/commonjs/components/animated/SendingProof.js.map +1 -1
- package/lib/commonjs/components/animated/SentProof.js +3 -3
- package/lib/commonjs/components/animated/SentProof.js.map +1 -1
- package/lib/commonjs/components/buttons/Button.js +1 -1
- package/lib/commonjs/components/buttons/Button.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButton.js +3 -3
- package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
- package/lib/commonjs/components/buttons/ToggleButton.js +3 -3
- package/lib/commonjs/components/buttons/ToggleButton.js.map +1 -1
- package/lib/commonjs/components/chat/ActionSlider.js +3 -3
- package/lib/commonjs/components/chat/ActionSlider.js.map +1 -1
- package/lib/commonjs/components/forms/WalletNameForm.js +2 -2
- package/lib/commonjs/components/forms/WalletNameForm.js.map +1 -1
- package/lib/commonjs/components/inputs/BiometryControl.js +2 -2
- package/lib/commonjs/components/inputs/BiometryControl.js.map +1 -1
- package/lib/commonjs/components/inputs/BulletPoint.js +2 -2
- package/lib/commonjs/components/inputs/BulletPoint.js.map +1 -1
- package/lib/commonjs/components/listItems/ContactCredentialListItem.js +3 -3
- package/lib/commonjs/components/listItems/ContactCredentialListItem.js.map +1 -1
- package/lib/commonjs/components/listItems/ContactListItem.js +2 -2
- package/lib/commonjs/components/listItems/ContactListItem.js.map +1 -1
- package/lib/commonjs/components/listItems/NotificationListItem.js +22 -22
- package/lib/commonjs/components/listItems/NotificationListItem.js.map +1 -1
- package/lib/commonjs/components/misc/ConnectionAlert.js +5 -5
- package/lib/commonjs/components/misc/ConnectionAlert.js.map +1 -1
- package/lib/commonjs/components/misc/ConnectionImage.js +3 -3
- package/lib/commonjs/components/misc/ConnectionImage.js.map +1 -1
- package/lib/commonjs/components/misc/CredentialCard.js +2 -2
- package/lib/commonjs/components/misc/CredentialCard.js.map +1 -1
- package/lib/commonjs/components/misc/CredentialCard10.js +6 -6
- package/lib/commonjs/components/misc/CredentialCard10.js.map +1 -1
- package/lib/commonjs/components/misc/CredentialCard11.js +12 -12
- package/lib/commonjs/components/misc/CredentialCard11.js.map +1 -1
- package/lib/commonjs/components/misc/CredentialCard11ActionFooter.js +3 -3
- package/lib/commonjs/components/misc/CredentialCard11ActionFooter.js.map +1 -1
- package/lib/commonjs/components/misc/EmptyList.js +2 -2
- package/lib/commonjs/components/misc/EmptyList.js.map +1 -1
- package/lib/commonjs/components/misc/EmptyListContacts.js +2 -2
- package/lib/commonjs/components/misc/EmptyListContacts.js.map +1 -1
- package/lib/commonjs/components/misc/FauxHeader.js +2 -2
- package/lib/commonjs/components/misc/FauxHeader.js.map +1 -1
- package/lib/commonjs/components/misc/InfoBox.js +29 -29
- package/lib/commonjs/components/misc/InfoBox.js.map +1 -1
- package/lib/commonjs/components/misc/NoNewUpdates.js +2 -2
- package/lib/commonjs/components/misc/NoNewUpdates.js.map +1 -1
- package/lib/commonjs/components/misc/PINValidationHelper.js +3 -3
- package/lib/commonjs/components/misc/PINValidationHelper.js.map +1 -1
- package/lib/commonjs/components/misc/QRRenderer.js +2 -2
- package/lib/commonjs/components/misc/QRRenderer.js.map +1 -1
- package/lib/commonjs/components/misc/QRScanner.js +3 -3
- package/lib/commonjs/components/misc/QRScanner.js.map +1 -1
- package/lib/commonjs/components/misc/QRScannerTorch.js +4 -4
- package/lib/commonjs/components/misc/QRScannerTorch.js.map +1 -1
- package/lib/commonjs/components/misc/SharedProofData.js +2 -2
- package/lib/commonjs/components/misc/SharedProofData.js.map +1 -1
- package/lib/commonjs/components/misc/UnorderedList.js +3 -3
- package/lib/commonjs/components/misc/UnorderedList.js.map +1 -1
- package/lib/commonjs/components/misc/VerifierCredentialCard.js +7 -7
- package/lib/commonjs/components/misc/VerifierCredentialCard.js.map +1 -1
- package/lib/commonjs/components/modals/AppGuideModal.js +7 -7
- package/lib/commonjs/components/modals/AppGuideModal.js.map +1 -1
- package/lib/commonjs/components/modals/CameraDisclosureModal.js +4 -4
- package/lib/commonjs/components/modals/CameraDisclosureModal.js.map +1 -1
- package/lib/commonjs/components/modals/CommonRemoveModal.js +7 -7
- package/lib/commonjs/components/modals/CommonRemoveModal.js.map +1 -1
- package/lib/commonjs/components/modals/DismissiblePopupModal.js +7 -7
- package/lib/commonjs/components/modals/DismissiblePopupModal.js.map +1 -1
- package/lib/commonjs/components/modals/ErrorModal.js +4 -4
- package/lib/commonjs/components/modals/ErrorModal.js.map +1 -1
- package/lib/commonjs/components/modals/ImageModal.js +4 -4
- package/lib/commonjs/components/modals/ImageModal.js.map +1 -1
- package/lib/commonjs/components/modals/PopupModal.js +2 -2
- package/lib/commonjs/components/modals/PopupModal.js.map +1 -1
- package/lib/commonjs/components/modals/ProofCancelModal.js +2 -2
- package/lib/commonjs/components/modals/ProofCancelModal.js.map +1 -1
- package/lib/commonjs/components/record/RecordFooter.js +2 -2
- package/lib/commonjs/components/record/RecordFooter.js.map +1 -1
- package/lib/commonjs/components/record/RecordHeader.js +2 -2
- package/lib/commonjs/components/record/RecordHeader.js.map +1 -1
- package/lib/commonjs/components/record/RecordRemove.js +5 -5
- package/lib/commonjs/components/record/RecordRemove.js.map +1 -1
- package/lib/commonjs/components/texts/HighlightTextBox.js +3 -3
- package/lib/commonjs/components/texts/HighlightTextBox.js.map +1 -1
- package/lib/commonjs/components/texts/InfoTextBox.js +17 -17
- package/lib/commonjs/components/texts/InfoTextBox.js.map +1 -1
- package/lib/commonjs/components/texts/Link.js +2 -2
- package/lib/commonjs/components/texts/Link.js.map +1 -1
- package/lib/commonjs/components/toast/BaseToast.js +17 -17
- package/lib/commonjs/components/toast/BaseToast.js.map +1 -1
- package/lib/commonjs/components/tour/CredentialOfferTourSteps.js +2 -2
- package/lib/commonjs/components/tour/CredentialOfferTourSteps.js.map +1 -1
- package/lib/commonjs/components/tour/CredentialsTourSteps.js +2 -2
- package/lib/commonjs/components/tour/CredentialsTourSteps.js.map +1 -1
- package/lib/commonjs/components/tour/HomeTourSteps.js +6 -6
- package/lib/commonjs/components/tour/HomeTourSteps.js.map +1 -1
- package/lib/commonjs/components/tour/ProofRequestTourSteps.js +2 -2
- package/lib/commonjs/components/tour/ProofRequestTourSteps.js.map +1 -1
- package/lib/commonjs/components/tour/TourBox.js +6 -6
- package/lib/commonjs/components/tour/TourBox.js.map +1 -1
- package/lib/commonjs/components/views/Banner.js +19 -9
- package/lib/commonjs/components/views/Banner.js.map +1 -1
- package/lib/commonjs/components/views/CredentialDetailPrimaryHeader.js +3 -3
- package/lib/commonjs/components/views/CredentialDetailPrimaryHeader.js.map +1 -1
- package/lib/commonjs/components/views/KeyboardView.js +2 -2
- package/lib/commonjs/components/views/KeyboardView.js.map +1 -1
- package/lib/commonjs/components/views/ProgressBar.js +3 -3
- package/lib/commonjs/components/views/ProgressBar.js.map +1 -1
- package/lib/commonjs/contexts/reducers/store.js +2 -1
- package/lib/commonjs/contexts/reducers/store.js.map +1 -1
- package/lib/commonjs/hooks/chat-messages.js +3 -3
- package/lib/commonjs/hooks/chat-messages.js.map +1 -1
- package/lib/commonjs/hooks/credential-card-styles.js +4 -4
- package/lib/commonjs/hooks/credential-card-styles.js.map +1 -1
- package/lib/commonjs/index.js +11 -3
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/history/ui/HistoryPage.js +2 -2
- package/lib/commonjs/modules/history/ui/HistoryPage.js.map +1 -1
- package/lib/commonjs/modules/history/ui/HistorySettings.js +2 -2
- package/lib/commonjs/modules/history/ui/HistorySettings.js.map +1 -1
- package/lib/commonjs/modules/history/ui/components/HistoryListItem.js +2 -2
- package/lib/commonjs/modules/history/ui/components/HistoryListItem.js.map +1 -1
- package/lib/commonjs/modules/openid/components/OpenIDCredentialCard.js +5 -5
- package/lib/commonjs/modules/openid/components/OpenIDCredentialCard.js.map +1 -1
- package/lib/commonjs/modules/openid/screens/OpenIDCredentialDetails.js +2 -2
- package/lib/commonjs/modules/openid/screens/OpenIDCredentialDetails.js.map +1 -1
- package/lib/commonjs/modules/openid/screens/OpenIDCredentialOffer.js +2 -2
- package/lib/commonjs/modules/openid/screens/OpenIDCredentialOffer.js.map +1 -1
- package/lib/commonjs/modules/openid/screens/OpenIDProofChangeCredential.js +2 -2
- package/lib/commonjs/modules/openid/screens/OpenIDProofChangeCredential.js.map +1 -1
- package/lib/commonjs/modules/openid/screens/OpenIDProofPresentation.js +4 -4
- package/lib/commonjs/modules/openid/screens/OpenIDProofPresentation.js.map +1 -1
- package/lib/commonjs/navigators/TabStack.js +2 -2
- package/lib/commonjs/navigators/TabStack.js.map +1 -1
- package/lib/commonjs/navigators/defaultStackOptions.js +3 -3
- package/lib/commonjs/navigators/defaultStackOptions.js.map +1 -1
- package/lib/commonjs/screens/AttemptLockout.js +2 -2
- package/lib/commonjs/screens/AttemptLockout.js.map +1 -1
- package/lib/commonjs/screens/AutoLock.js +7 -7
- package/lib/commonjs/screens/AutoLock.js.map +1 -1
- package/lib/commonjs/screens/ConfigureMediator.js +7 -7
- package/lib/commonjs/screens/ConfigureMediator.js.map +1 -1
- package/lib/commonjs/screens/ContactDetails.js +9 -9
- package/lib/commonjs/screens/ContactDetails.js.map +1 -1
- package/lib/commonjs/screens/CredentialDetails.js +16 -16
- package/lib/commonjs/screens/CredentialDetails.js.map +1 -1
- package/lib/commonjs/screens/CredentialOffer.js +2 -2
- package/lib/commonjs/screens/CredentialOffer.js.map +1 -1
- package/lib/commonjs/screens/DataRetention.js +11 -11
- package/lib/commonjs/screens/DataRetention.js.map +1 -1
- package/lib/commonjs/screens/Developer.js +29 -29
- package/lib/commonjs/screens/Developer.js.map +1 -1
- package/lib/commonjs/screens/Home.js +2 -2
- package/lib/commonjs/screens/Home.js.map +1 -1
- package/lib/commonjs/screens/JSONDetails.js +3 -3
- package/lib/commonjs/screens/JSONDetails.js.map +1 -1
- package/lib/commonjs/screens/Language.js +7 -7
- package/lib/commonjs/screens/Language.js.map +1 -1
- package/lib/commonjs/screens/ListContacts.js +3 -3
- package/lib/commonjs/screens/ListContacts.js.map +1 -1
- package/lib/commonjs/screens/ListCredentials.js +2 -2
- package/lib/commonjs/screens/ListCredentials.js.map +1 -1
- package/lib/commonjs/screens/ListProofRequests.js +2 -2
- package/lib/commonjs/screens/ListProofRequests.js.map +1 -1
- package/lib/commonjs/screens/MobileVerifierLoading.js +3 -3
- package/lib/commonjs/screens/MobileVerifierLoading.js.map +1 -1
- package/lib/commonjs/screens/PINChange.js +2 -2
- package/lib/commonjs/screens/PINChange.js.map +1 -1
- package/lib/commonjs/screens/PINCreate.js +2 -2
- package/lib/commonjs/screens/PINCreate.js.map +1 -1
- package/lib/commonjs/screens/PINEnter.js +3 -3
- package/lib/commonjs/screens/PINEnter.js.map +1 -1
- package/lib/commonjs/screens/PINExplainer.js +3 -3
- package/lib/commonjs/screens/PINExplainer.js.map +1 -1
- package/lib/commonjs/screens/PINVerify.js +2 -2
- package/lib/commonjs/screens/PINVerify.js.map +1 -1
- package/lib/commonjs/screens/PasteUrl.js +4 -4
- package/lib/commonjs/screens/PasteUrl.js.map +1 -1
- package/lib/commonjs/screens/ProofChangeCredential.js +2 -2
- package/lib/commonjs/screens/ProofChangeCredential.js.map +1 -1
- package/lib/commonjs/screens/ProofDetails.js +3 -3
- package/lib/commonjs/screens/ProofDetails.js.map +1 -1
- package/lib/commonjs/screens/ProofRequest.js +7 -7
- package/lib/commonjs/screens/ProofRequest.js.map +1 -1
- package/lib/commonjs/screens/ProofRequestAccept.js +3 -3
- package/lib/commonjs/screens/ProofRequestAccept.js.map +1 -1
- package/lib/commonjs/screens/ProofRequestDetails.js +4 -4
- package/lib/commonjs/screens/ProofRequestDetails.js.map +1 -1
- package/lib/commonjs/screens/ProofRequestUsageHistory.js +2 -2
- package/lib/commonjs/screens/ProofRequestUsageHistory.js.map +1 -1
- package/lib/commonjs/screens/ProofRequesting.js +5 -5
- package/lib/commonjs/screens/ProofRequesting.js.map +1 -1
- package/lib/commonjs/screens/RenameContact.js +2 -2
- package/lib/commonjs/screens/RenameContact.js.map +1 -1
- package/lib/commonjs/screens/Settings.js +5 -5
- package/lib/commonjs/screens/Settings.js.map +1 -1
- package/lib/commonjs/screens/Splash.js +2 -2
- package/lib/commonjs/screens/Splash.js.map +1 -1
- package/lib/commonjs/screens/ToggleBiometry.js +2 -2
- package/lib/commonjs/screens/ToggleBiometry.js.map +1 -1
- package/lib/commonjs/screens/TogglePushNotifications.js +5 -5
- package/lib/commonjs/screens/TogglePushNotifications.js.map +1 -1
- package/lib/commonjs/screens/Tours.js +5 -5
- package/lib/commonjs/screens/Tours.js.map +1 -1
- package/lib/commonjs/screens/UpdateAvailable.js +2 -2
- package/lib/commonjs/screens/UpdateAvailable.js.map +1 -1
- package/lib/commonjs/screens/WhatAreContacts.js +2 -2
- package/lib/commonjs/screens/WhatAreContacts.js.map +1 -1
- package/lib/commonjs/theme-builder.js +116 -0
- package/lib/commonjs/theme-builder.js.map +1 -0
- package/lib/commonjs/theme.interface.js +6 -0
- package/lib/commonjs/theme.interface.js.map +1 -0
- package/lib/commonjs/theme.js +904 -670
- package/lib/commonjs/theme.js.map +1 -1
- package/lib/commonjs/utils/credential.js +3 -3
- package/lib/commonjs/utils/credential.js.map +1 -1
- package/lib/commonjs/utils/mediatorhelpers.js +16 -12
- package/lib/commonjs/utils/mediatorhelpers.js.map +1 -1
- package/lib/module/App.js +1 -1
- package/lib/module/App.js.map +1 -1
- package/lib/module/components/animated/ButtonLoading.js +2 -2
- package/lib/module/components/animated/ButtonLoading.js.map +1 -1
- package/lib/module/components/animated/ConnectionLoading.js +3 -3
- package/lib/module/components/animated/ConnectionLoading.js.map +1 -1
- package/lib/module/components/animated/LoadingIndicator.js +2 -2
- package/lib/module/components/animated/LoadingIndicator.js.map +1 -1
- package/lib/module/components/animated/PresentationLoading.js +3 -3
- package/lib/module/components/animated/PresentationLoading.js.map +1 -1
- package/lib/module/components/animated/RecordLoading.js +5 -5
- package/lib/module/components/animated/RecordLoading.js.map +1 -1
- package/lib/module/components/animated/SendingProof.js +3 -3
- package/lib/module/components/animated/SendingProof.js.map +1 -1
- package/lib/module/components/animated/SentProof.js +3 -3
- package/lib/module/components/animated/SentProof.js.map +1 -1
- package/lib/module/components/buttons/Button.js +1 -1
- package/lib/module/components/buttons/Button.js.map +1 -1
- package/lib/module/components/buttons/IconButton.js +3 -3
- package/lib/module/components/buttons/IconButton.js.map +1 -1
- package/lib/module/components/buttons/ToggleButton.js +3 -3
- package/lib/module/components/buttons/ToggleButton.js.map +1 -1
- package/lib/module/components/chat/ActionSlider.js +3 -3
- package/lib/module/components/chat/ActionSlider.js.map +1 -1
- package/lib/module/components/forms/WalletNameForm.js +2 -2
- package/lib/module/components/forms/WalletNameForm.js.map +1 -1
- package/lib/module/components/inputs/BiometryControl.js +2 -2
- package/lib/module/components/inputs/BiometryControl.js.map +1 -1
- package/lib/module/components/inputs/BulletPoint.js +2 -2
- package/lib/module/components/inputs/BulletPoint.js.map +1 -1
- package/lib/module/components/listItems/ContactCredentialListItem.js +3 -3
- package/lib/module/components/listItems/ContactCredentialListItem.js.map +1 -1
- package/lib/module/components/listItems/ContactListItem.js +2 -2
- package/lib/module/components/listItems/ContactListItem.js.map +1 -1
- package/lib/module/components/listItems/NotificationListItem.js +22 -22
- package/lib/module/components/listItems/NotificationListItem.js.map +1 -1
- package/lib/module/components/misc/ConnectionAlert.js +5 -5
- package/lib/module/components/misc/ConnectionAlert.js.map +1 -1
- package/lib/module/components/misc/ConnectionImage.js +3 -3
- package/lib/module/components/misc/ConnectionImage.js.map +1 -1
- package/lib/module/components/misc/CredentialCard.js +2 -2
- package/lib/module/components/misc/CredentialCard.js.map +1 -1
- package/lib/module/components/misc/CredentialCard10.js +6 -6
- package/lib/module/components/misc/CredentialCard10.js.map +1 -1
- package/lib/module/components/misc/CredentialCard11.js +12 -12
- package/lib/module/components/misc/CredentialCard11.js.map +1 -1
- package/lib/module/components/misc/CredentialCard11ActionFooter.js +3 -3
- package/lib/module/components/misc/CredentialCard11ActionFooter.js.map +1 -1
- package/lib/module/components/misc/EmptyList.js +2 -2
- package/lib/module/components/misc/EmptyList.js.map +1 -1
- package/lib/module/components/misc/EmptyListContacts.js +2 -2
- package/lib/module/components/misc/EmptyListContacts.js.map +1 -1
- package/lib/module/components/misc/FauxHeader.js +2 -2
- package/lib/module/components/misc/FauxHeader.js.map +1 -1
- package/lib/module/components/misc/InfoBox.js +29 -29
- package/lib/module/components/misc/InfoBox.js.map +1 -1
- package/lib/module/components/misc/NoNewUpdates.js +2 -2
- package/lib/module/components/misc/NoNewUpdates.js.map +1 -1
- package/lib/module/components/misc/PINValidationHelper.js +3 -3
- package/lib/module/components/misc/PINValidationHelper.js.map +1 -1
- package/lib/module/components/misc/QRRenderer.js +2 -2
- package/lib/module/components/misc/QRRenderer.js.map +1 -1
- package/lib/module/components/misc/QRScanner.js +3 -3
- package/lib/module/components/misc/QRScanner.js.map +1 -1
- package/lib/module/components/misc/QRScannerTorch.js +4 -4
- package/lib/module/components/misc/QRScannerTorch.js.map +1 -1
- package/lib/module/components/misc/SharedProofData.js +2 -2
- package/lib/module/components/misc/SharedProofData.js.map +1 -1
- package/lib/module/components/misc/UnorderedList.js +3 -3
- package/lib/module/components/misc/UnorderedList.js.map +1 -1
- package/lib/module/components/misc/VerifierCredentialCard.js +7 -7
- package/lib/module/components/misc/VerifierCredentialCard.js.map +1 -1
- package/lib/module/components/modals/AppGuideModal.js +7 -7
- package/lib/module/components/modals/AppGuideModal.js.map +1 -1
- package/lib/module/components/modals/CameraDisclosureModal.js +4 -4
- package/lib/module/components/modals/CameraDisclosureModal.js.map +1 -1
- package/lib/module/components/modals/CommonRemoveModal.js +7 -7
- package/lib/module/components/modals/CommonRemoveModal.js.map +1 -1
- package/lib/module/components/modals/DismissiblePopupModal.js +7 -7
- package/lib/module/components/modals/DismissiblePopupModal.js.map +1 -1
- package/lib/module/components/modals/ErrorModal.js +4 -4
- package/lib/module/components/modals/ErrorModal.js.map +1 -1
- package/lib/module/components/modals/ImageModal.js +4 -4
- package/lib/module/components/modals/ImageModal.js.map +1 -1
- package/lib/module/components/modals/PopupModal.js +2 -2
- package/lib/module/components/modals/PopupModal.js.map +1 -1
- package/lib/module/components/modals/ProofCancelModal.js +2 -2
- package/lib/module/components/modals/ProofCancelModal.js.map +1 -1
- package/lib/module/components/record/RecordFooter.js +2 -2
- package/lib/module/components/record/RecordFooter.js.map +1 -1
- package/lib/module/components/record/RecordHeader.js +2 -2
- package/lib/module/components/record/RecordHeader.js.map +1 -1
- package/lib/module/components/record/RecordRemove.js +5 -5
- package/lib/module/components/record/RecordRemove.js.map +1 -1
- package/lib/module/components/texts/HighlightTextBox.js +3 -3
- package/lib/module/components/texts/HighlightTextBox.js.map +1 -1
- package/lib/module/components/texts/InfoTextBox.js +17 -17
- package/lib/module/components/texts/InfoTextBox.js.map +1 -1
- package/lib/module/components/texts/Link.js +2 -2
- package/lib/module/components/texts/Link.js.map +1 -1
- package/lib/module/components/toast/BaseToast.js +17 -17
- package/lib/module/components/toast/BaseToast.js.map +1 -1
- package/lib/module/components/tour/CredentialOfferTourSteps.js +2 -2
- package/lib/module/components/tour/CredentialOfferTourSteps.js.map +1 -1
- package/lib/module/components/tour/CredentialsTourSteps.js +2 -2
- package/lib/module/components/tour/CredentialsTourSteps.js.map +1 -1
- package/lib/module/components/tour/HomeTourSteps.js +6 -6
- package/lib/module/components/tour/HomeTourSteps.js.map +1 -1
- package/lib/module/components/tour/ProofRequestTourSteps.js +2 -2
- package/lib/module/components/tour/ProofRequestTourSteps.js.map +1 -1
- package/lib/module/components/tour/TourBox.js +6 -6
- package/lib/module/components/tour/TourBox.js.map +1 -1
- package/lib/module/components/views/Banner.js +19 -9
- package/lib/module/components/views/Banner.js.map +1 -1
- package/lib/module/components/views/CredentialDetailPrimaryHeader.js +3 -3
- package/lib/module/components/views/CredentialDetailPrimaryHeader.js.map +1 -1
- package/lib/module/components/views/KeyboardView.js +2 -2
- package/lib/module/components/views/KeyboardView.js.map +1 -1
- package/lib/module/components/views/ProgressBar.js +3 -3
- package/lib/module/components/views/ProgressBar.js.map +1 -1
- package/lib/module/contexts/reducers/store.js +2 -1
- package/lib/module/contexts/reducers/store.js.map +1 -1
- package/lib/module/hooks/chat-messages.js +3 -3
- package/lib/module/hooks/chat-messages.js.map +1 -1
- package/lib/module/hooks/credential-card-styles.js +4 -4
- package/lib/module/hooks/credential-card-styles.js.map +1 -1
- package/lib/module/index.js +3 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/history/ui/HistoryPage.js +2 -2
- package/lib/module/modules/history/ui/HistoryPage.js.map +1 -1
- package/lib/module/modules/history/ui/HistorySettings.js +2 -2
- package/lib/module/modules/history/ui/HistorySettings.js.map +1 -1
- package/lib/module/modules/history/ui/components/HistoryListItem.js +2 -2
- package/lib/module/modules/history/ui/components/HistoryListItem.js.map +1 -1
- package/lib/module/modules/openid/components/OpenIDCredentialCard.js +5 -5
- package/lib/module/modules/openid/components/OpenIDCredentialCard.js.map +1 -1
- package/lib/module/modules/openid/screens/OpenIDCredentialDetails.js +2 -2
- package/lib/module/modules/openid/screens/OpenIDCredentialDetails.js.map +1 -1
- package/lib/module/modules/openid/screens/OpenIDCredentialOffer.js +2 -2
- package/lib/module/modules/openid/screens/OpenIDCredentialOffer.js.map +1 -1
- package/lib/module/modules/openid/screens/OpenIDProofChangeCredential.js +2 -2
- package/lib/module/modules/openid/screens/OpenIDProofChangeCredential.js.map +1 -1
- package/lib/module/modules/openid/screens/OpenIDProofPresentation.js +4 -4
- package/lib/module/modules/openid/screens/OpenIDProofPresentation.js.map +1 -1
- package/lib/module/navigators/TabStack.js +2 -2
- package/lib/module/navigators/TabStack.js.map +1 -1
- package/lib/module/navigators/defaultStackOptions.js +3 -3
- package/lib/module/navigators/defaultStackOptions.js.map +1 -1
- package/lib/module/screens/AttemptLockout.js +2 -2
- package/lib/module/screens/AttemptLockout.js.map +1 -1
- package/lib/module/screens/AutoLock.js +7 -7
- package/lib/module/screens/AutoLock.js.map +1 -1
- package/lib/module/screens/ConfigureMediator.js +7 -7
- package/lib/module/screens/ConfigureMediator.js.map +1 -1
- package/lib/module/screens/ContactDetails.js +9 -9
- package/lib/module/screens/ContactDetails.js.map +1 -1
- package/lib/module/screens/CredentialDetails.js +16 -16
- package/lib/module/screens/CredentialDetails.js.map +1 -1
- package/lib/module/screens/CredentialOffer.js +2 -2
- package/lib/module/screens/CredentialOffer.js.map +1 -1
- package/lib/module/screens/DataRetention.js +11 -11
- package/lib/module/screens/DataRetention.js.map +1 -1
- package/lib/module/screens/Developer.js +29 -29
- package/lib/module/screens/Developer.js.map +1 -1
- package/lib/module/screens/Home.js +2 -2
- package/lib/module/screens/Home.js.map +1 -1
- package/lib/module/screens/JSONDetails.js +3 -3
- package/lib/module/screens/JSONDetails.js.map +1 -1
- package/lib/module/screens/Language.js +7 -7
- package/lib/module/screens/Language.js.map +1 -1
- package/lib/module/screens/ListContacts.js +3 -3
- package/lib/module/screens/ListContacts.js.map +1 -1
- package/lib/module/screens/ListCredentials.js +2 -2
- package/lib/module/screens/ListCredentials.js.map +1 -1
- package/lib/module/screens/ListProofRequests.js +2 -2
- package/lib/module/screens/ListProofRequests.js.map +1 -1
- package/lib/module/screens/MobileVerifierLoading.js +3 -3
- package/lib/module/screens/MobileVerifierLoading.js.map +1 -1
- package/lib/module/screens/PINChange.js +2 -2
- package/lib/module/screens/PINChange.js.map +1 -1
- package/lib/module/screens/PINCreate.js +2 -2
- package/lib/module/screens/PINCreate.js.map +1 -1
- package/lib/module/screens/PINEnter.js +3 -3
- package/lib/module/screens/PINEnter.js.map +1 -1
- package/lib/module/screens/PINExplainer.js +3 -3
- package/lib/module/screens/PINExplainer.js.map +1 -1
- package/lib/module/screens/PINVerify.js +2 -2
- package/lib/module/screens/PINVerify.js.map +1 -1
- package/lib/module/screens/PasteUrl.js +4 -4
- package/lib/module/screens/PasteUrl.js.map +1 -1
- package/lib/module/screens/ProofChangeCredential.js +2 -2
- package/lib/module/screens/ProofChangeCredential.js.map +1 -1
- package/lib/module/screens/ProofDetails.js +3 -3
- package/lib/module/screens/ProofDetails.js.map +1 -1
- package/lib/module/screens/ProofRequest.js +7 -7
- package/lib/module/screens/ProofRequest.js.map +1 -1
- package/lib/module/screens/ProofRequestAccept.js +3 -3
- package/lib/module/screens/ProofRequestAccept.js.map +1 -1
- package/lib/module/screens/ProofRequestDetails.js +4 -4
- package/lib/module/screens/ProofRequestDetails.js.map +1 -1
- package/lib/module/screens/ProofRequestUsageHistory.js +2 -2
- package/lib/module/screens/ProofRequestUsageHistory.js.map +1 -1
- package/lib/module/screens/ProofRequesting.js +5 -5
- package/lib/module/screens/ProofRequesting.js.map +1 -1
- package/lib/module/screens/RenameContact.js +2 -2
- package/lib/module/screens/RenameContact.js.map +1 -1
- package/lib/module/screens/Settings.js +5 -5
- package/lib/module/screens/Settings.js.map +1 -1
- package/lib/module/screens/Splash.js +2 -2
- package/lib/module/screens/Splash.js.map +1 -1
- package/lib/module/screens/ToggleBiometry.js +2 -2
- package/lib/module/screens/ToggleBiometry.js.map +1 -1
- package/lib/module/screens/TogglePushNotifications.js +5 -5
- package/lib/module/screens/TogglePushNotifications.js.map +1 -1
- package/lib/module/screens/Tours.js +5 -5
- package/lib/module/screens/Tours.js.map +1 -1
- package/lib/module/screens/UpdateAvailable.js +2 -2
- package/lib/module/screens/UpdateAvailable.js.map +1 -1
- package/lib/module/screens/WhatAreContacts.js +2 -2
- package/lib/module/screens/WhatAreContacts.js.map +1 -1
- package/lib/module/theme-builder.js +109 -0
- package/lib/module/theme-builder.js.map +1 -0
- package/lib/module/theme.interface.js +2 -0
- package/lib/module/theme.interface.js.map +1 -0
- package/lib/module/theme.js +888 -669
- package/lib/module/theme.js.map +1 -1
- package/lib/module/utils/credential.js +3 -3
- package/lib/module/utils/credential.js.map +1 -1
- package/lib/module/utils/mediatorhelpers.js +16 -12
- package/lib/module/utils/mediatorhelpers.js.map +1 -1
- package/lib/typescript/src/components/buttons/IconButton.d.ts.map +1 -1
- package/lib/typescript/src/components/misc/CredentialCard11.d.ts.map +1 -1
- package/lib/typescript/src/components/views/Banner.d.ts.map +1 -1
- package/lib/typescript/src/contexts/reducers/store.d.ts.map +1 -1
- package/lib/typescript/src/hooks/credential-card-styles.d.ts +375 -13
- package/lib/typescript/src/hooks/credential-card-styles.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/navigators/defaultStackOptions.d.ts +1 -1
- package/lib/typescript/src/navigators/defaultStackOptions.d.ts.map +1 -1
- package/lib/typescript/src/screens/Developer.d.ts.map +1 -1
- package/lib/typescript/src/theme-builder.d.ts +62 -0
- package/lib/typescript/src/theme-builder.d.ts.map +1 -0
- package/lib/typescript/src/theme.d.ts +204 -702
- package/lib/typescript/src/theme.d.ts.map +1 -1
- package/lib/typescript/src/theme.interface.d.ts +557 -0
- package/lib/typescript/src/theme.interface.d.ts.map +1 -0
- package/lib/typescript/src/utils/credential.d.ts +1 -1
- package/lib/typescript/src/utils/credential.d.ts.map +1 -1
- package/lib/typescript/src/utils/mediatorhelpers.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/App.tsx +1 -1
- package/src/components/animated/ButtonLoading.tsx +2 -2
- package/src/components/animated/ConnectionLoading.tsx +3 -3
- package/src/components/animated/LoadingIndicator.tsx +2 -2
- package/src/components/animated/PresentationLoading.tsx +3 -3
- package/src/components/animated/RecordLoading.tsx +5 -5
- package/src/components/animated/SendingProof.tsx +3 -3
- package/src/components/animated/SentProof.tsx +3 -3
- package/src/components/buttons/Button.tsx +1 -1
- package/src/components/buttons/IconButton.tsx +5 -3
- package/src/components/buttons/ToggleButton.tsx +3 -3
- package/src/components/chat/ActionSlider.tsx +3 -3
- package/src/components/forms/WalletNameForm.tsx +2 -2
- package/src/components/inputs/BiometryControl.tsx +2 -2
- package/src/components/inputs/BulletPoint.tsx +2 -2
- package/src/components/listItems/ContactCredentialListItem.tsx +3 -3
- package/src/components/listItems/ContactListItem.tsx +2 -2
- package/src/components/listItems/NotificationListItem.tsx +22 -22
- package/src/components/misc/ConnectionAlert.tsx +5 -5
- package/src/components/misc/ConnectionImage.tsx +3 -3
- package/src/components/misc/CredentialCard.tsx +2 -2
- package/src/components/misc/CredentialCard10.tsx +6 -6
- package/src/components/misc/CredentialCard11.tsx +16 -12
- package/src/components/misc/CredentialCard11ActionFooter.tsx +3 -3
- package/src/components/misc/EmptyList.tsx +2 -2
- package/src/components/misc/EmptyListContacts.tsx +2 -2
- package/src/components/misc/FauxHeader.tsx +2 -2
- package/src/components/misc/InfoBox.tsx +29 -29
- package/src/components/misc/NoNewUpdates.tsx +2 -2
- package/src/components/misc/PINValidationHelper.tsx +3 -3
- package/src/components/misc/QRRenderer.tsx +2 -2
- package/src/components/misc/QRScanner.tsx +3 -3
- package/src/components/misc/QRScannerTorch.tsx +4 -4
- package/src/components/misc/SharedProofData.tsx +2 -2
- package/src/components/misc/UnorderedList.tsx +3 -3
- package/src/components/misc/VerifierCredentialCard.tsx +7 -7
- package/src/components/modals/AppGuideModal.tsx +7 -7
- package/src/components/modals/CameraDisclosureModal.tsx +4 -4
- package/src/components/modals/CommonRemoveModal.tsx +7 -7
- package/src/components/modals/DismissiblePopupModal.tsx +7 -7
- package/src/components/modals/ErrorModal.tsx +4 -4
- package/src/components/modals/ImageModal.tsx +4 -4
- package/src/components/modals/PopupModal.tsx +2 -2
- package/src/components/modals/ProofCancelModal.tsx +2 -2
- package/src/components/record/RecordFooter.tsx +2 -2
- package/src/components/record/RecordHeader.tsx +2 -2
- package/src/components/record/RecordRemove.tsx +5 -5
- package/src/components/texts/HighlightTextBox.tsx +3 -3
- package/src/components/texts/InfoTextBox.tsx +17 -17
- package/src/components/texts/Link.tsx +2 -2
- package/src/components/toast/BaseToast.tsx +17 -17
- package/src/components/tour/CredentialOfferTourSteps.tsx +2 -2
- package/src/components/tour/CredentialsTourSteps.tsx +2 -2
- package/src/components/tour/HomeTourSteps.tsx +6 -6
- package/src/components/tour/ProofRequestTourSteps.tsx +2 -2
- package/src/components/tour/TourBox.tsx +6 -6
- package/src/components/views/Banner.tsx +21 -14
- package/src/components/views/CredentialDetailPrimaryHeader.tsx +4 -4
- package/src/components/views/KeyboardView.tsx +2 -2
- package/src/components/views/ProgressBar.tsx +3 -3
- package/src/contexts/reducers/store.ts +4 -1
- package/src/hooks/chat-messages.tsx +3 -3
- package/src/hooks/credential-card-styles.ts +4 -4
- package/src/index.ts +4 -2
- package/src/modules/history/ui/HistoryPage.tsx +2 -2
- package/src/modules/history/ui/HistorySettings.tsx +2 -2
- package/src/modules/history/ui/components/HistoryListItem.tsx +2 -2
- package/src/modules/openid/components/OpenIDCredentialCard.tsx +5 -5
- package/src/modules/openid/screens/OpenIDCredentialDetails.tsx +2 -2
- package/src/modules/openid/screens/OpenIDCredentialOffer.tsx +2 -2
- package/src/modules/openid/screens/OpenIDProofChangeCredential.tsx +2 -2
- package/src/modules/openid/screens/OpenIDProofPresentation.tsx +4 -4
- package/src/navigators/TabStack.tsx +2 -2
- package/src/navigators/defaultStackOptions.tsx +3 -3
- package/src/screens/AttemptLockout.tsx +2 -2
- package/src/screens/AutoLock.tsx +7 -7
- package/src/screens/ConfigureMediator.tsx +7 -7
- package/src/screens/ContactDetails.tsx +9 -9
- package/src/screens/CredentialDetails.tsx +16 -16
- package/src/screens/CredentialOffer.tsx +2 -2
- package/src/screens/DataRetention.tsx +11 -11
- package/src/screens/Developer.tsx +24 -22
- package/src/screens/Home.tsx +2 -2
- package/src/screens/JSONDetails.tsx +3 -3
- package/src/screens/Language.tsx +7 -7
- package/src/screens/ListContacts.tsx +3 -3
- package/src/screens/ListCredentials.tsx +2 -2
- package/src/screens/ListProofRequests.tsx +2 -2
- package/src/screens/MobileVerifierLoading.tsx +3 -3
- package/src/screens/PINChange.tsx +2 -2
- package/src/screens/PINCreate.tsx +2 -2
- package/src/screens/PINEnter.tsx +3 -3
- package/src/screens/PINExplainer.tsx +3 -3
- package/src/screens/PINVerify.tsx +2 -2
- package/src/screens/PasteUrl.tsx +4 -4
- package/src/screens/ProofChangeCredential.tsx +2 -2
- package/src/screens/ProofDetails.tsx +3 -3
- package/src/screens/ProofRequest.tsx +7 -7
- package/src/screens/ProofRequestAccept.tsx +3 -3
- package/src/screens/ProofRequestDetails.tsx +4 -4
- package/src/screens/ProofRequestUsageHistory.tsx +2 -2
- package/src/screens/ProofRequesting.tsx +5 -5
- package/src/screens/RenameContact.tsx +2 -2
- package/src/screens/Settings.tsx +5 -5
- package/src/screens/Splash.tsx +2 -2
- package/src/screens/ToggleBiometry.tsx +2 -2
- package/src/screens/TogglePushNotifications.tsx +4 -4
- package/src/screens/Tours.tsx +5 -5
- package/src/screens/UpdateAvailable.tsx +2 -2
- package/src/screens/WhatAreContacts.tsx +2 -2
- package/src/theme-builder.ts +140 -0
- package/src/theme.interface.ts +580 -0
- package/src/theme.ts +881 -774
- package/src/utils/credential.ts +3 -3
- package/src/utils/mediatorhelpers.ts +23 -12
|
@@ -34,7 +34,7 @@ const PINVerify: React.FC<Props> = ({ setAuthenticated, usage = PINEntryUsage.PI
|
|
|
34
34
|
const [continueDisabled, setContinueDisabled] = useState(false)
|
|
35
35
|
const [loading, setLoading] = useState(false)
|
|
36
36
|
const [alertModalVisible, setAlertModalVisible] = useState<boolean>(false)
|
|
37
|
-
const {
|
|
37
|
+
const { ColorPalette } = useTheme()
|
|
38
38
|
const { ButtonLoading } = useAnimatedComponents()
|
|
39
39
|
const [inlineMessageField, setInlineMessageField] = useState<InlineMessageProps>()
|
|
40
40
|
const [{ preventScreenCapture }] = useServices([TOKENS.CONFIG])
|
|
@@ -94,7 +94,7 @@ const PINVerify: React.FC<Props> = ({ setAuthenticated, usage = PINEntryUsage.PI
|
|
|
94
94
|
screenContainer: {
|
|
95
95
|
flex: 1,
|
|
96
96
|
padding: 20,
|
|
97
|
-
backgroundColor:
|
|
97
|
+
backgroundColor: ColorPalette.brand.primaryBackground,
|
|
98
98
|
justifyContent: 'space-between',
|
|
99
99
|
},
|
|
100
100
|
buttonContainer: {
|
package/src/screens/PasteUrl.tsx
CHANGED
|
@@ -18,7 +18,7 @@ import { ThemedText } from '../components/texts/ThemedText'
|
|
|
18
18
|
export type PasteProps = StackScreenProps<ConnectStackParams>
|
|
19
19
|
|
|
20
20
|
const PasteUrl: React.FC<PasteProps> = ({ navigation }) => {
|
|
21
|
-
const {
|
|
21
|
+
const { ColorPalette, TextTheme } = useTheme()
|
|
22
22
|
const [pastedContent, setPastedContent] = useState<string>('')
|
|
23
23
|
const [errorMessage, setErrorMessage] = useState<{ title: string; message: string } | undefined>()
|
|
24
24
|
const { t } = useTranslation()
|
|
@@ -30,7 +30,7 @@ const PasteUrl: React.FC<PasteProps> = ({ navigation }) => {
|
|
|
30
30
|
const styles = StyleSheet.create({
|
|
31
31
|
container: {
|
|
32
32
|
flex: 1,
|
|
33
|
-
backgroundColor:
|
|
33
|
+
backgroundColor: ColorPalette.brand.primaryBackground,
|
|
34
34
|
},
|
|
35
35
|
content: {
|
|
36
36
|
margin: 20,
|
|
@@ -41,10 +41,10 @@ const PasteUrl: React.FC<PasteProps> = ({ navigation }) => {
|
|
|
41
41
|
textBox: {
|
|
42
42
|
...TextTheme.normal,
|
|
43
43
|
textAlignVertical: 'top',
|
|
44
|
-
borderColor:
|
|
44
|
+
borderColor: ColorPalette.grayscale.darkGrey,
|
|
45
45
|
borderWidth: 1,
|
|
46
46
|
borderRadius: 5,
|
|
47
|
-
backgroundColor:
|
|
47
|
+
backgroundColor: ColorPalette.grayscale.lightGrey,
|
|
48
48
|
},
|
|
49
49
|
buttonContainer: {
|
|
50
50
|
margin: 20,
|
|
@@ -32,7 +32,7 @@ const ProofChangeCredential: React.FC<ProofChangeProps> = ({ route, navigation }
|
|
|
32
32
|
const selectedCred = route.params.selectedCred
|
|
33
33
|
const altCredentials = route.params.altCredentials
|
|
34
34
|
const onCredChange = route.params.onCredChange
|
|
35
|
-
const {
|
|
35
|
+
const { ColorPalette, SelectedCredTheme } = useTheme()
|
|
36
36
|
const { t } = useTranslation()
|
|
37
37
|
const [loading, setLoading] = useState(false)
|
|
38
38
|
const [proofItems, setProofItems] = useState<ProofCredentialItems[]>([])
|
|
@@ -46,7 +46,7 @@ const ProofChangeCredential: React.FC<ProofChangeProps> = ({ route, navigation }
|
|
|
46
46
|
marginHorizontal: 20,
|
|
47
47
|
},
|
|
48
48
|
cardLoading: {
|
|
49
|
-
backgroundColor:
|
|
49
|
+
backgroundColor: ColorPalette.brand.secondaryBackground,
|
|
50
50
|
flex: 1,
|
|
51
51
|
flexGrow: 1,
|
|
52
52
|
marginVertical: 35,
|
|
@@ -47,21 +47,21 @@ const VerifiedProof: React.FC<VerifiedProofProps> = ({
|
|
|
47
47
|
onGenerateNewPressed,
|
|
48
48
|
}: VerifiedProofProps) => {
|
|
49
49
|
const { t } = useTranslation()
|
|
50
|
-
const {
|
|
50
|
+
const { ColorPalette, TextTheme, Assets } = useTheme()
|
|
51
51
|
const [sharedProofDataItems, setSharedProofDataItems] = useState<GroupedSharedProofDataItem[]>([])
|
|
52
52
|
const styles = StyleSheet.create({
|
|
53
53
|
container: {
|
|
54
54
|
flexGrow: 1,
|
|
55
55
|
},
|
|
56
56
|
iconContainer: {
|
|
57
|
-
backgroundColor:
|
|
57
|
+
backgroundColor: ColorPalette.notification.info,
|
|
58
58
|
width: 100,
|
|
59
59
|
height: 100,
|
|
60
60
|
alignItems: 'center',
|
|
61
61
|
justifyContent: 'center',
|
|
62
62
|
marginBottom: 15,
|
|
63
63
|
borderRadius: 50,
|
|
64
|
-
borderColor:
|
|
64
|
+
borderColor: ColorPalette.notification.infoBorder,
|
|
65
65
|
borderWidth: 3,
|
|
66
66
|
alignSelf: 'center',
|
|
67
67
|
overflow: 'hidden',
|
|
@@ -103,7 +103,7 @@ const ProofRequest: React.FC<ProofRequestProps> = ({ navigation, proofId }) => {
|
|
|
103
103
|
const [loading, setLoading] = useState<boolean>(true)
|
|
104
104
|
const [declineModalVisible, setDeclineModalVisible] = useState(false)
|
|
105
105
|
const [cancelModalVisible, setCancelModalVisible] = useState(false)
|
|
106
|
-
const {
|
|
106
|
+
const { ColorPalette, ListItems, TextTheme } = useTheme()
|
|
107
107
|
const goalCode = useOutOfBandByConnectionId(proof?.connectionId ?? '')?.outOfBandInvitation.goalCode
|
|
108
108
|
const outOfBandInvitation = useOutOfBandByReceivedInvitationId(proof?.parentThreadId ?? '')?.outOfBandInvitation
|
|
109
109
|
const [containsPI, setContainsPI] = useState(false)
|
|
@@ -174,7 +174,7 @@ const ProofRequest: React.FC<ProofRequestProps> = ({ navigation, proofId }) => {
|
|
|
174
174
|
},
|
|
175
175
|
detailsButton: {
|
|
176
176
|
...ListItems.recordAttributeText,
|
|
177
|
-
color:
|
|
177
|
+
color: ColorPalette.brand.link,
|
|
178
178
|
textDecorationLine: 'underline',
|
|
179
179
|
},
|
|
180
180
|
})
|
|
@@ -703,14 +703,14 @@ const ProofRequest: React.FC<ProofRequestProps> = ({ navigation, proofId }) => {
|
|
|
703
703
|
alignSelf: 'center',
|
|
704
704
|
flex: 1,
|
|
705
705
|
flexWrap: 'wrap',
|
|
706
|
-
color:
|
|
706
|
+
color: ColorPalette.notification.errorText,
|
|
707
707
|
}}
|
|
708
708
|
>
|
|
709
709
|
{t('ProofRequest.YouCantRespond')}{' '}
|
|
710
710
|
<ThemedText
|
|
711
711
|
style={{
|
|
712
712
|
fontWeight: TextTheme.normal.fontWeight,
|
|
713
|
-
color:
|
|
713
|
+
color: ColorPalette.brand.link,
|
|
714
714
|
}}
|
|
715
715
|
onPress={() => setShowDetailsModal(true)}
|
|
716
716
|
>
|
|
@@ -907,7 +907,7 @@ const ProofRequest: React.FC<ProofRequestProps> = ({ navigation, proofId }) => {
|
|
|
907
907
|
flexDirection: 'column',
|
|
908
908
|
justifyContent: 'center',
|
|
909
909
|
alignItems: 'center',
|
|
910
|
-
backgroundColor:
|
|
910
|
+
backgroundColor: ColorPalette.brand.primaryBackground,
|
|
911
911
|
}}
|
|
912
912
|
>
|
|
913
913
|
<InfoBox
|
|
@@ -931,7 +931,7 @@ const ProofRequest: React.FC<ProofRequestProps> = ({ navigation, proofId }) => {
|
|
|
931
931
|
flexDirection: 'column',
|
|
932
932
|
justifyContent: 'center',
|
|
933
933
|
alignItems: 'center',
|
|
934
|
-
backgroundColor:
|
|
934
|
+
backgroundColor: ColorPalette.brand.primaryBackground,
|
|
935
935
|
}}
|
|
936
936
|
>
|
|
937
937
|
<InfoBox
|
|
@@ -965,7 +965,7 @@ const ProofRequest: React.FC<ProofRequestProps> = ({ navigation, proofId }) => {
|
|
|
965
965
|
style={{
|
|
966
966
|
width: 'auto',
|
|
967
967
|
borderWidth: 1,
|
|
968
|
-
borderColor:
|
|
968
|
+
borderColor: ColorPalette.grayscale.lightGrey,
|
|
969
969
|
marginTop: 20,
|
|
970
970
|
}}
|
|
971
971
|
/>
|
|
@@ -25,13 +25,13 @@ const ProofRequestAccept: React.FC<ProofRequestAcceptProps> = ({ visible, proofI
|
|
|
25
25
|
const [proofDeliveryStatus, setProofDeliveryStatus] = useState<ProofState>(ProofState.RequestReceived)
|
|
26
26
|
const proof = useProofById(proofId)
|
|
27
27
|
const navigation = useNavigation()
|
|
28
|
-
const {
|
|
28
|
+
const { ColorPalette, TextTheme } = useTheme()
|
|
29
29
|
const { SendingProof, SentProof } = useAnimatedComponents()
|
|
30
30
|
|
|
31
31
|
const styles = StyleSheet.create({
|
|
32
32
|
container: {
|
|
33
33
|
height: '100%',
|
|
34
|
-
backgroundColor:
|
|
34
|
+
backgroundColor: ColorPalette.brand.modalPrimaryBackground,
|
|
35
35
|
padding: 20,
|
|
36
36
|
},
|
|
37
37
|
image: {
|
|
@@ -82,7 +82,7 @@ const ProofRequestAccept: React.FC<ProofRequestAcceptProps> = ({ visible, proofI
|
|
|
82
82
|
|
|
83
83
|
return (
|
|
84
84
|
<SafeAreaModal visible={visible} transparent={true} animationType={'none'}>
|
|
85
|
-
<SafeAreaView style={{ backgroundColor:
|
|
85
|
+
<SafeAreaView style={{ backgroundColor: ColorPalette.brand.modalPrimaryBackground }}>
|
|
86
86
|
<ScrollView style={styles.container}>
|
|
87
87
|
<View style={styles.messageContainer}>
|
|
88
88
|
{proofDeliveryStatus === ProofState.RequestReceived && (
|
|
@@ -36,7 +36,7 @@ interface ProofRequestAttributesCardProps {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
const ProofRequestAttributesCard: React.FC<ProofRequestAttributesCardProps> = ({ data, onChangeValue }) => {
|
|
39
|
-
const {
|
|
39
|
+
const { ColorPalette } = useTheme()
|
|
40
40
|
const { i18n } = useTranslation()
|
|
41
41
|
const [bundleResolver] = useServices([TOKENS.UTIL_OCA_RESOLVER])
|
|
42
42
|
const [attributes, setAttributes] = useState<Field[] | undefined>(undefined)
|
|
@@ -67,7 +67,7 @@ const ProofRequestAttributesCard: React.FC<ProofRequestAttributesCardProps> = ({
|
|
|
67
67
|
<VerifierCredentialCard
|
|
68
68
|
onChangeValue={onChangeValue}
|
|
69
69
|
displayItems={attributes}
|
|
70
|
-
style={{ backgroundColor:
|
|
70
|
+
style={{ backgroundColor: ColorPalette.brand.secondaryBackground }}
|
|
71
71
|
credDefId={credDefId}
|
|
72
72
|
schemaId={data.schema}
|
|
73
73
|
preview
|
|
@@ -93,7 +93,7 @@ const ProofRequestCardsComponent: React.FC<ProofRequestCardsProps> = ({ attribut
|
|
|
93
93
|
const ProofRequestCards = memo(ProofRequestCardsComponent)
|
|
94
94
|
|
|
95
95
|
const ProofRequestDetails: React.FC<ProofRequestDetailsProps> = ({ route, navigation }) => {
|
|
96
|
-
const {
|
|
96
|
+
const { ColorPalette, TextTheme } = useTheme()
|
|
97
97
|
const [store] = useStore()
|
|
98
98
|
const { t } = useTranslation()
|
|
99
99
|
const { i18n } = useTranslation()
|
|
@@ -113,7 +113,7 @@ const ProofRequestDetails: React.FC<ProofRequestDetailsProps> = ({ route, naviga
|
|
|
113
113
|
const style = StyleSheet.create({
|
|
114
114
|
container: {
|
|
115
115
|
flexGrow: 1,
|
|
116
|
-
backgroundColor:
|
|
116
|
+
backgroundColor: ColorPalette.brand.primaryBackground,
|
|
117
117
|
padding: 16,
|
|
118
118
|
},
|
|
119
119
|
header: {
|
|
@@ -41,7 +41,7 @@ const getPresentationStateLabel = (record: ProofExchangeRecord) => {
|
|
|
41
41
|
|
|
42
42
|
const ProofRequestUsageHistoryRecord: React.FC<ProofRequestUsageHistoryRecordProps> = ({ record, navigation }) => {
|
|
43
43
|
const { t } = useTranslation()
|
|
44
|
-
const { ListItems,
|
|
44
|
+
const { ListItems, ColorPalette } = useTheme()
|
|
45
45
|
const [store] = useStore()
|
|
46
46
|
const connection = useConnectionById(record.connectionId ?? '')
|
|
47
47
|
const theirLabel = useMemo(
|
|
@@ -67,7 +67,7 @@ const ProofRequestUsageHistoryRecord: React.FC<ProofRequestUsageHistoryRecordPro
|
|
|
67
67
|
marginVertical: 2,
|
|
68
68
|
},
|
|
69
69
|
valueLabel: {
|
|
70
|
-
color:
|
|
70
|
+
color: ColorPalette.grayscale.black,
|
|
71
71
|
},
|
|
72
72
|
valueText: {
|
|
73
73
|
...ListItems.requestTemplateTitle,
|
|
@@ -57,7 +57,7 @@ const ProofRequesting: React.FC<ProofRequestingProps> = ({ route, navigation })
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
const { t } = useTranslation()
|
|
60
|
-
const {
|
|
60
|
+
const { ColorPalette, TextTheme } = useTheme()
|
|
61
61
|
const isFocused = useIsFocused()
|
|
62
62
|
const [store] = useStore()
|
|
63
63
|
const [generating, setGenerating] = useState(true)
|
|
@@ -73,7 +73,7 @@ const ProofRequesting: React.FC<ProofRequestingProps> = ({ route, navigation })
|
|
|
73
73
|
const styles = StyleSheet.create({
|
|
74
74
|
container: {
|
|
75
75
|
flexGrow: 1,
|
|
76
|
-
backgroundColor:
|
|
76
|
+
backgroundColor: ColorPalette.grayscale.white,
|
|
77
77
|
},
|
|
78
78
|
headerContainer: {
|
|
79
79
|
alignItems: 'center',
|
|
@@ -88,18 +88,18 @@ const ProofRequesting: React.FC<ProofRequestingProps> = ({ route, navigation })
|
|
|
88
88
|
secondaryHeaderText: {
|
|
89
89
|
textAlign: 'center',
|
|
90
90
|
marginTop: 8,
|
|
91
|
-
color:
|
|
91
|
+
color: ColorPalette.grayscale.black,
|
|
92
92
|
},
|
|
93
93
|
interopText: {
|
|
94
94
|
alignSelf: 'center',
|
|
95
95
|
marginBottom: -20,
|
|
96
96
|
paddingHorizontal: 10,
|
|
97
|
-
backgroundColor:
|
|
97
|
+
backgroundColor: ColorPalette.grayscale.white,
|
|
98
98
|
zIndex: 100,
|
|
99
99
|
textAlign: 'center',
|
|
100
100
|
fontWeight: TextTheme.bold.fontWeight,
|
|
101
101
|
fontSize: 22,
|
|
102
|
-
color:
|
|
102
|
+
color: ColorPalette.brand.primary,
|
|
103
103
|
},
|
|
104
104
|
qrContainer: {
|
|
105
105
|
height: qrContainerSize,
|
|
@@ -31,7 +31,7 @@ const RenameContact: React.FC<RenameContactProps> = ({ route }) => {
|
|
|
31
31
|
const { connectionId } = route.params
|
|
32
32
|
const connection = useConnectionById(connectionId)
|
|
33
33
|
const { t } = useTranslation()
|
|
34
|
-
const {
|
|
34
|
+
const { ColorPalette } = useTheme()
|
|
35
35
|
const navigation = useNavigation()
|
|
36
36
|
const [store, dispatch] = useStore()
|
|
37
37
|
const [contactName, setContactName] = useState(getConnectionName(connection, store.preferences.alternateContactNames))
|
|
@@ -45,7 +45,7 @@ const RenameContact: React.FC<RenameContactProps> = ({ route }) => {
|
|
|
45
45
|
const styles = StyleSheet.create({
|
|
46
46
|
screenContainer: {
|
|
47
47
|
height: '100%',
|
|
48
|
-
backgroundColor:
|
|
48
|
+
backgroundColor: ColorPalette.brand.primaryBackground,
|
|
49
49
|
padding: 20,
|
|
50
50
|
justifyContent: 'space-between',
|
|
51
51
|
},
|
package/src/screens/Settings.tsx
CHANGED
|
@@ -40,7 +40,7 @@ const Settings: React.FC<SettingsProps> = ({ navigation }) => {
|
|
|
40
40
|
navigation.navigate(Screens.Developer)
|
|
41
41
|
}
|
|
42
42
|
const { incrementDeveloperMenuCounter } = useDeveloperMode(onDevModeTriggered)
|
|
43
|
-
const { SettingsTheme, TextTheme,
|
|
43
|
+
const { SettingsTheme, TextTheme, ColorPalette, Assets, maxFontSizeMultiplier } = useTheme()
|
|
44
44
|
const [{ settings, enableTours, enablePushNotifications, disableContactsInSettings }, historyEnabled] = useServices([
|
|
45
45
|
TOKENS.CONFIG,
|
|
46
46
|
TOKENS.HISTORY_ENABLED,
|
|
@@ -50,7 +50,7 @@ const Settings: React.FC<SettingsProps> = ({ navigation }) => {
|
|
|
50
50
|
const defaultIconSize = 24
|
|
51
51
|
const styles = StyleSheet.create({
|
|
52
52
|
container: {
|
|
53
|
-
backgroundColor:
|
|
53
|
+
backgroundColor: ColorPalette.brand.primaryBackground,
|
|
54
54
|
width: '100%',
|
|
55
55
|
},
|
|
56
56
|
section: {
|
|
@@ -77,7 +77,7 @@ const Settings: React.FC<SettingsProps> = ({ navigation }) => {
|
|
|
77
77
|
},
|
|
78
78
|
itemSeparator: {
|
|
79
79
|
borderBottomWidth: 1,
|
|
80
|
-
borderBottomColor:
|
|
80
|
+
borderBottomColor: ColorPalette.brand.primaryBackground,
|
|
81
81
|
marginHorizontal: 25,
|
|
82
82
|
},
|
|
83
83
|
footer: {
|
|
@@ -100,7 +100,7 @@ const Settings: React.FC<SettingsProps> = ({ navigation }) => {
|
|
|
100
100
|
},
|
|
101
101
|
accessibilityLabel: t('NameWallet.EditWalletName'),
|
|
102
102
|
testID: testIdWithKey('EditWalletName'),
|
|
103
|
-
style: { color:
|
|
103
|
+
style: { color: ColorPalette.brand.primary },
|
|
104
104
|
},
|
|
105
105
|
titleTestID: store.preferences.useConnectionInviterCapability ? testIdWithKey('WalletName') : undefined,
|
|
106
106
|
},
|
|
@@ -362,7 +362,7 @@ const Settings: React.FC<SettingsProps> = ({ navigation }) => {
|
|
|
362
362
|
>
|
|
363
363
|
{title}
|
|
364
364
|
</ThemedText>
|
|
365
|
-
<ThemedText style={[TextTheme.settingsText, { color:
|
|
365
|
+
<ThemedText style={[TextTheme.settingsText, { color: ColorPalette.brand.link }]}>{value}</ThemedText>
|
|
366
366
|
</TouchableOpacity>
|
|
367
367
|
</ScrollView>
|
|
368
368
|
)
|
package/src/screens/Splash.tsx
CHANGED
|
@@ -25,7 +25,7 @@ const Splash: React.FC<SplashProps> = ({ initializeAgent }) => {
|
|
|
25
25
|
const { walletSecret } = useAuth()
|
|
26
26
|
const { t } = useTranslation()
|
|
27
27
|
const [store] = useStore()
|
|
28
|
-
const {
|
|
28
|
+
const { ColorPalette } = useTheme()
|
|
29
29
|
const { LoadingIndicator } = useAnimatedComponents()
|
|
30
30
|
const initializing = useRef(false)
|
|
31
31
|
const [logger, ocaBundleResolver] = useServices([TOKENS.UTIL_LOGGER, TOKENS.UTIL_OCA_RESOLVER])
|
|
@@ -35,7 +35,7 @@ const Splash: React.FC<SplashProps> = ({ initializeAgent }) => {
|
|
|
35
35
|
flex: 1,
|
|
36
36
|
justifyContent: 'center',
|
|
37
37
|
alignItems: 'center',
|
|
38
|
-
backgroundColor:
|
|
38
|
+
backgroundColor: ColorPalette.brand.primaryBackground,
|
|
39
39
|
},
|
|
40
40
|
})
|
|
41
41
|
|
|
@@ -27,7 +27,7 @@ const ToggleBiometry: React.FC = () => {
|
|
|
27
27
|
const { commitWalletToKeychain, disableBiometrics } = useAuth()
|
|
28
28
|
const [biometryEnabled, setBiometryEnabled] = useState(store.preferences.useBiometry)
|
|
29
29
|
const [canSeeCheckPIN, setCanSeeCheckPIN] = useState<boolean>(false)
|
|
30
|
-
const {
|
|
30
|
+
const { ColorPalette, NavigationTheme } = useTheme()
|
|
31
31
|
|
|
32
32
|
const logHistoryRecord = useCallback(
|
|
33
33
|
(type: HistoryCardType) => {
|
|
@@ -131,7 +131,7 @@ const ToggleBiometry: React.FC = () => {
|
|
|
131
131
|
return (
|
|
132
132
|
<BiometryControl biometryEnabled={biometryEnabled} onBiometryToggle={handleBiometryToggle}>
|
|
133
133
|
<SafeAreaModal
|
|
134
|
-
style={{ backgroundColor:
|
|
134
|
+
style={{ backgroundColor: ColorPalette.brand.primaryBackground }}
|
|
135
135
|
visible={canSeeCheckPIN}
|
|
136
136
|
transparent={false}
|
|
137
137
|
animationType={'slide'}
|
|
@@ -20,7 +20,7 @@ const TogglePushNotifications: React.FC = () => {
|
|
|
20
20
|
const { t } = useTranslation()
|
|
21
21
|
const [store, dispatch] = useStore()
|
|
22
22
|
const { agent } = useAgent()
|
|
23
|
-
const {
|
|
23
|
+
const { ColorPalette } = useTheme()
|
|
24
24
|
const [{ enablePushNotifications }] = useServices([TOKENS.CONFIG])
|
|
25
25
|
const [notificationState, setNotificationState] = useState<boolean>(store.preferences.usePushNotifications)
|
|
26
26
|
const [notificationStatus, setNotificationStatus] = useState<'denied' | 'granted' | 'unknown'>('unknown')
|
|
@@ -97,9 +97,9 @@ const TogglePushNotifications: React.FC = () => {
|
|
|
97
97
|
<View style={styles.toggleContainer}>
|
|
98
98
|
<ThemedText>{t('PushNotifications.ReceiveNotifications')}</ThemedText>
|
|
99
99
|
<Switch
|
|
100
|
-
trackColor={{ false:
|
|
101
|
-
thumbColor={notificationState ?
|
|
102
|
-
ios_backgroundColor={
|
|
100
|
+
trackColor={{ false: ColorPalette.grayscale.lightGrey, true: ColorPalette.brand.primaryDisabled }}
|
|
101
|
+
thumbColor={notificationState ? ColorPalette.brand.primary : ColorPalette.grayscale.mediumGrey}
|
|
102
|
+
ios_backgroundColor={ColorPalette.grayscale.lightGrey}
|
|
103
103
|
onValueChange={toggleSwitch}
|
|
104
104
|
accessibilityLabel={t('PushNotifications.ReceiveNotifications')}
|
|
105
105
|
accessibilityRole="switch"
|
package/src/screens/Tours.tsx
CHANGED
|
@@ -18,11 +18,11 @@ interface Option {
|
|
|
18
18
|
const Tours: React.FC = () => {
|
|
19
19
|
const [store, dispatch] = useStore()
|
|
20
20
|
const { t } = useTranslation()
|
|
21
|
-
const {
|
|
21
|
+
const { ColorPalette, SettingsTheme } = useTheme()
|
|
22
22
|
|
|
23
23
|
const styles = StyleSheet.create({
|
|
24
24
|
container: {
|
|
25
|
-
backgroundColor:
|
|
25
|
+
backgroundColor: ColorPalette.brand.primaryBackground,
|
|
26
26
|
width: '100%',
|
|
27
27
|
},
|
|
28
28
|
section: {
|
|
@@ -37,7 +37,7 @@ const Tours: React.FC = () => {
|
|
|
37
37
|
},
|
|
38
38
|
itemSeparator: {
|
|
39
39
|
borderBottomWidth: 1,
|
|
40
|
-
borderBottomColor:
|
|
40
|
+
borderBottomColor: ColorPalette.brand.primaryBackground,
|
|
41
41
|
marginHorizontal: 25,
|
|
42
42
|
},
|
|
43
43
|
})
|
|
@@ -71,8 +71,8 @@ const Tours: React.FC = () => {
|
|
|
71
71
|
fillColor="#FFFFFFFF"
|
|
72
72
|
unfillColor="#FFFFFFFF"
|
|
73
73
|
size={36}
|
|
74
|
-
innerIconStyle={{ borderColor:
|
|
75
|
-
ImageComponent={() => <Icon name="circle" size={18} color={
|
|
74
|
+
innerIconStyle={{ borderColor: ColorPalette.brand.primary, borderWidth: 2 }}
|
|
75
|
+
ImageComponent={() => <Icon name="circle" size={18} color={ColorPalette.brand.primary}></Icon>}
|
|
76
76
|
onPress={async () => await handleSettingChange(bool)}
|
|
77
77
|
isChecked={store.tours.enableTours === bool}
|
|
78
78
|
disableBuiltInState
|
|
@@ -20,7 +20,7 @@ type UpdateAvailableProps = {
|
|
|
20
20
|
const UpdateAvailable: React.FC<UpdateAvailableProps> = ({ appleAppStoreUrl, googlePlayStoreUrl }) => {
|
|
21
21
|
const { t } = useTranslation()
|
|
22
22
|
const [, dispatch] = useStore()
|
|
23
|
-
const {
|
|
23
|
+
const { ColorPalette, Assets, Spacing } = useTheme()
|
|
24
24
|
const [logger] = useServices([TOKENS.UTIL_LOGGER])
|
|
25
25
|
|
|
26
26
|
// Check if both store links are available
|
|
@@ -41,7 +41,7 @@ const UpdateAvailable: React.FC<UpdateAvailableProps> = ({ appleAppStoreUrl, goo
|
|
|
41
41
|
}, [dispatch])
|
|
42
42
|
|
|
43
43
|
const iconOptions = {
|
|
44
|
-
fill:
|
|
44
|
+
fill: ColorPalette.notification.infoText,
|
|
45
45
|
height: 130,
|
|
46
46
|
width: 130,
|
|
47
47
|
}
|
|
@@ -13,13 +13,13 @@ interface WhatAreContactsProps {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
const WhatAreContacts: React.FC<WhatAreContactsProps> = ({ navigation }) => {
|
|
16
|
-
const {
|
|
16
|
+
const { ColorPalette } = useTheme()
|
|
17
17
|
const { t } = useTranslation()
|
|
18
18
|
const styles = StyleSheet.create({
|
|
19
19
|
container: {
|
|
20
20
|
flex: 1,
|
|
21
21
|
alignItems: 'center',
|
|
22
|
-
backgroundColor:
|
|
22
|
+
backgroundColor: ColorPalette.brand.primaryBackground,
|
|
23
23
|
},
|
|
24
24
|
pageContent: {
|
|
25
25
|
marginTop: 30,
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IColorPalette,
|
|
3
|
+
ITheme,
|
|
4
|
+
createButtonsTheme,
|
|
5
|
+
createChatTheme,
|
|
6
|
+
createHomeTheme,
|
|
7
|
+
createInputInlineMessageTheme,
|
|
8
|
+
createInputsTheme,
|
|
9
|
+
createListItemsTheme,
|
|
10
|
+
createNavigationTheme,
|
|
11
|
+
createSettingsTheme,
|
|
12
|
+
createTabTheme,
|
|
13
|
+
createTextTheme,
|
|
14
|
+
createOnboardingTheme,
|
|
15
|
+
createDialogTheme,
|
|
16
|
+
createLoadingTheme,
|
|
17
|
+
createPINInputTheme,
|
|
18
|
+
} from './theme'
|
|
19
|
+
import lodash from 'lodash'
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* DeepPartial is a utility type that recursively makes all properties of a type optional.
|
|
23
|
+
*/
|
|
24
|
+
type DeepPartial<T> = {
|
|
25
|
+
[P in keyof T]?: T[P] extends object
|
|
26
|
+
? T[P] extends (...args: any[]) => any
|
|
27
|
+
? T[P] // keep functions as is
|
|
28
|
+
: // For object types, make all keys optional recursively:
|
|
29
|
+
Partial<T[P]> extends infer O
|
|
30
|
+
? { [K in keyof O]?: DeepPartial<O[K]> }
|
|
31
|
+
: never
|
|
32
|
+
: T[P]
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* ThemeBuilder is a utility class to extend an existing theme with additional properties.
|
|
37
|
+
*
|
|
38
|
+
* @class ThemeBuilder
|
|
39
|
+
*/
|
|
40
|
+
export class ThemeBuilder {
|
|
41
|
+
private _theme: ITheme
|
|
42
|
+
private _themeOverrides: DeepPartial<ITheme>
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Creates an instance of ThemeBuilder.
|
|
46
|
+
*
|
|
47
|
+
* @param {ITheme} baseTheme - The initial theme object to extend.
|
|
48
|
+
*/
|
|
49
|
+
constructor(baseTheme: ITheme) {
|
|
50
|
+
this._theme = baseTheme
|
|
51
|
+
this._themeOverrides = {}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Sets the color pallet for the theme.
|
|
56
|
+
*
|
|
57
|
+
* Note: This method is mostly a convenience method to set the color pallet for the theme.
|
|
58
|
+
* The same can be achieved by directly modifying the theme object using the `withOverrides` method.
|
|
59
|
+
*
|
|
60
|
+
* @param {IColorPalette} colorPalette - The color pallet to set for the theme.
|
|
61
|
+
* @returns {*} {ThemeBuilder} Returns the instance of ThemeBuilder for method chaining.
|
|
62
|
+
*/
|
|
63
|
+
setColorPalette(colorPalette: IColorPalette): this {
|
|
64
|
+
this._theme.ColorPalette = colorPalette
|
|
65
|
+
|
|
66
|
+
return this
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Overrides properties in the current theme with the provided themeOverrides.
|
|
71
|
+
*
|
|
72
|
+
* Note: This will overwrite existing properties in the current theme with those from the provided themeOverrides.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* new ThemeBuilder({ Buttons: { color: 'purple', size: 'large' }})
|
|
76
|
+
* .withOverrides({ Buttons: { color: 'red' }})
|
|
77
|
+
* .withOverrides({ Buttons: { spacing: 10 }}) // => { Buttons: { color: 'red', size: 'large', spacing: 10 }}
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* new ThemeBuilder({ Buttons: { critical: { padding: 10, margin: 0 }}})
|
|
81
|
+
* .withOverrides((theme) => ({
|
|
82
|
+
* Buttons: { critical: { padding: 0, margin: -1 } },
|
|
83
|
+
* })) // => { Buttons: { critical: { padding: 0, margin: -1 } }}
|
|
84
|
+
*
|
|
85
|
+
* @param {DeepPartial<ITheme> | ((theme: ITheme) => DeepPartial<ITheme>) } themeOverrides A partial theme object to merge with the current theme or a callback function that receives the current theme and returns a partial theme object.
|
|
86
|
+
* @returns {*} {ThemeBuilder} Returns the instance of ThemeBuilder for method chaining.
|
|
87
|
+
*/
|
|
88
|
+
withOverrides(themeOverrides: DeepPartial<ITheme> | ((theme: ITheme) => DeepPartial<ITheme>)): this {
|
|
89
|
+
const resolvedOverrides = typeof themeOverrides === 'function' ? themeOverrides(this._theme) : themeOverrides
|
|
90
|
+
|
|
91
|
+
// note: without the empty object, lodash.merge will mutate the original theme overrides,
|
|
92
|
+
// and not properly update the nested properties
|
|
93
|
+
this._themeOverrides = lodash.merge({}, this._themeOverrides, resolvedOverrides)
|
|
94
|
+
|
|
95
|
+
// Rebuild the theme with the new overrides so following chained calls will use the updated theme.
|
|
96
|
+
this._theme = this.build()
|
|
97
|
+
|
|
98
|
+
// Return the instance for method chaining
|
|
99
|
+
return this
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Builds and returns the final theme object.
|
|
104
|
+
*
|
|
105
|
+
* @returns {*} {ITheme} Returns the final theme object.
|
|
106
|
+
*/
|
|
107
|
+
build(): ITheme {
|
|
108
|
+
// Step 1. Merge the theme overrides onto the original theme, producing the new base theme.
|
|
109
|
+
const baseTheme = lodash.merge({}, this._theme, this._themeOverrides)
|
|
110
|
+
|
|
111
|
+
// Step 2. Generate computed properties that depend on the base theme
|
|
112
|
+
const dependentThemes: Partial<ITheme> = {
|
|
113
|
+
TextTheme: createTextTheme(baseTheme),
|
|
114
|
+
InputInlineMessage: createInputInlineMessageTheme(baseTheme),
|
|
115
|
+
Inputs: createInputsTheme(baseTheme),
|
|
116
|
+
Buttons: createButtonsTheme(baseTheme),
|
|
117
|
+
ListItems: createListItemsTheme(baseTheme),
|
|
118
|
+
TabTheme: createTabTheme(baseTheme),
|
|
119
|
+
NavigationTheme: createNavigationTheme(baseTheme),
|
|
120
|
+
HomeTheme: createHomeTheme(baseTheme),
|
|
121
|
+
SettingsTheme: createSettingsTheme(baseTheme),
|
|
122
|
+
ChatTheme: createChatTheme(baseTheme),
|
|
123
|
+
OnboardingTheme: createOnboardingTheme(baseTheme),
|
|
124
|
+
DialogTheme: createDialogTheme(baseTheme),
|
|
125
|
+
LoadingTheme: createLoadingTheme(baseTheme),
|
|
126
|
+
PINInputTheme: createPINInputTheme(baseTheme),
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Step 3. Merge all together - base + generated + overrides
|
|
131
|
+
*
|
|
132
|
+
* Why do we apply the overrides after the dependent themes?
|
|
133
|
+
* Because the `dependentThemes` contain additional properties that may have
|
|
134
|
+
* been modified by the overrides previously.
|
|
135
|
+
*/
|
|
136
|
+
this._theme = lodash.merge({}, baseTheme, dependentThemes, this._themeOverrides)
|
|
137
|
+
|
|
138
|
+
return this._theme
|
|
139
|
+
}
|
|
140
|
+
}
|