@thunderid/react 0.0.1
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/dist/ThunderIDReactClient.d.ts +87 -0
- package/dist/ThunderIDReactClient.d.ts.map +1 -0
- package/dist/__temp__/api.d.ts +258 -0
- package/dist/__temp__/api.d.ts.map +1 -0
- package/dist/__temp__/models.d.ts +98 -0
- package/dist/__temp__/models.d.ts.map +1 -0
- package/dist/api/createOrganization.d.ts +86 -0
- package/dist/api/createOrganization.d.ts.map +1 -0
- package/dist/api/getAllOrganizations.d.ts +78 -0
- package/dist/api/getAllOrganizations.d.ts.map +1 -0
- package/dist/api/getMeOrganizations.d.ts +82 -0
- package/dist/api/getMeOrganizations.d.ts.map +1 -0
- package/dist/api/getOrganization.d.ts +74 -0
- package/dist/api/getOrganization.d.ts.map +1 -0
- package/dist/api/getSchemas.d.ts +72 -0
- package/dist/api/getSchemas.d.ts.map +1 -0
- package/dist/api/getScim2Me.d.ts +72 -0
- package/dist/api/getScim2Me.d.ts.map +1 -0
- package/dist/api/updateMeProfile.d.ts +60 -0
- package/dist/api/updateMeProfile.d.ts.map +1 -0
- package/dist/api/updateOrganization.d.ts +81 -0
- package/dist/api/updateOrganization.d.ts.map +1 -0
- package/dist/cjs/index.js +20320 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/components/actions/SignInButton/BaseSignInButton.d.ts +71 -0
- package/dist/components/actions/SignInButton/BaseSignInButton.d.ts.map +1 -0
- package/dist/components/actions/SignInButton/SignInButton.d.ts +71 -0
- package/dist/components/actions/SignInButton/SignInButton.d.ts.map +1 -0
- package/dist/components/actions/SignOutButton/BaseSignOutButton.d.ts +71 -0
- package/dist/components/actions/SignOutButton/BaseSignOutButton.d.ts.map +1 -0
- package/dist/components/actions/SignOutButton/SignOutButton.d.ts +66 -0
- package/dist/components/actions/SignOutButton/SignOutButton.d.ts.map +1 -0
- package/dist/components/actions/SignUpButton/BaseSignUpButton.d.ts +71 -0
- package/dist/components/actions/SignUpButton/BaseSignUpButton.d.ts.map +1 -0
- package/dist/components/actions/SignUpButton/SignUpButton.d.ts +67 -0
- package/dist/components/actions/SignUpButton/SignUpButton.d.ts.map +1 -0
- package/dist/components/adapters/CheckboxInput.d.ts +25 -0
- package/dist/components/adapters/CheckboxInput.d.ts.map +1 -0
- package/dist/components/adapters/Consent.d.ts +80 -0
- package/dist/components/adapters/Consent.d.ts.map +1 -0
- package/dist/components/adapters/ConsentCheckboxList.d.ts +95 -0
- package/dist/components/adapters/ConsentCheckboxList.d.ts.map +1 -0
- package/dist/components/adapters/ConsentCheckboxList.styles.d.ts +21 -0
- package/dist/components/adapters/ConsentCheckboxList.styles.d.ts.map +1 -0
- package/dist/components/adapters/DateInput.d.ts +25 -0
- package/dist/components/adapters/DateInput.d.ts.map +1 -0
- package/dist/components/adapters/DividerComponent.d.ts +25 -0
- package/dist/components/adapters/DividerComponent.d.ts.map +1 -0
- package/dist/components/adapters/EmailInput.d.ts +25 -0
- package/dist/components/adapters/EmailInput.d.ts.map +1 -0
- package/dist/components/adapters/FacebookButton.d.ts +32 -0
- package/dist/components/adapters/FacebookButton.d.ts.map +1 -0
- package/dist/components/adapters/FlowTimer.d.ts +63 -0
- package/dist/components/adapters/FlowTimer.d.ts.map +1 -0
- package/dist/components/adapters/FormContainer.d.ts +25 -0
- package/dist/components/adapters/FormContainer.d.ts.map +1 -0
- package/dist/components/adapters/GitHubButton.d.ts +32 -0
- package/dist/components/adapters/GitHubButton.d.ts.map +1 -0
- package/dist/components/adapters/GoogleButton.d.ts +32 -0
- package/dist/components/adapters/GoogleButton.d.ts.map +1 -0
- package/dist/components/adapters/ImageComponent.d.ts +25 -0
- package/dist/components/adapters/ImageComponent.d.ts.map +1 -0
- package/dist/components/adapters/LinkedInButton.d.ts +32 -0
- package/dist/components/adapters/LinkedInButton.d.ts.map +1 -0
- package/dist/components/adapters/MicrosoftButton.d.ts +32 -0
- package/dist/components/adapters/MicrosoftButton.d.ts.map +1 -0
- package/dist/components/adapters/NumberInput.d.ts +25 -0
- package/dist/components/adapters/NumberInput.d.ts.map +1 -0
- package/dist/components/adapters/PasswordInput.d.ts +25 -0
- package/dist/components/adapters/PasswordInput.d.ts.map +1 -0
- package/dist/components/adapters/SelectInput.d.ts +25 -0
- package/dist/components/adapters/SelectInput.d.ts.map +1 -0
- package/dist/components/adapters/SignInWithEthereumButton.d.ts +32 -0
- package/dist/components/adapters/SignInWithEthereumButton.d.ts.map +1 -0
- package/dist/components/adapters/SmsOtpButton.d.ts +32 -0
- package/dist/components/adapters/SmsOtpButton.d.ts.map +1 -0
- package/dist/components/adapters/SocialButton.d.ts +25 -0
- package/dist/components/adapters/SocialButton.d.ts.map +1 -0
- package/dist/components/adapters/SubmitButton.d.ts +25 -0
- package/dist/components/adapters/SubmitButton.d.ts.map +1 -0
- package/dist/components/adapters/TelephoneInput.d.ts +25 -0
- package/dist/components/adapters/TelephoneInput.d.ts.map +1 -0
- package/dist/components/adapters/TextInput.d.ts +25 -0
- package/dist/components/adapters/TextInput.d.ts.map +1 -0
- package/dist/components/adapters/Typography.d.ts +25 -0
- package/dist/components/adapters/Typography.d.ts.map +1 -0
- package/dist/components/auth/Callback/Callback.d.ts +52 -0
- package/dist/components/auth/Callback/Callback.d.ts.map +1 -0
- package/dist/components/control/Loading.d.ts +48 -0
- package/dist/components/control/Loading.d.ts.map +1 -0
- package/dist/components/control/OrganizationContext/OrganizationContext.d.ts +40 -0
- package/dist/components/control/OrganizationContext/OrganizationContext.d.ts.map +1 -0
- package/dist/components/control/OrganizationContext/OrganizationContextController.d.ts +35 -0
- package/dist/components/control/OrganizationContext/OrganizationContextController.d.ts.map +1 -0
- package/dist/components/control/SignedIn.d.ts +48 -0
- package/dist/components/control/SignedIn.d.ts.map +1 -0
- package/dist/components/control/SignedOut.d.ts +48 -0
- package/dist/components/control/SignedOut.d.ts.map +1 -0
- package/dist/components/factories/FieldFactory.d.ts +107 -0
- package/dist/components/factories/FieldFactory.d.ts.map +1 -0
- package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.d.ts +60 -0
- package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.d.ts.map +1 -0
- package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.styles.d.ts +27 -0
- package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.styles.d.ts.map +1 -0
- package/dist/components/presentation/CreateOrganization/CreateOrganization.d.ts +68 -0
- package/dist/components/presentation/CreateOrganization/CreateOrganization.d.ts.map +1 -0
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.d.ts +80 -0
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.d.ts.map +1 -0
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.d.ts +21 -0
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.d.ts.map +1 -0
- package/dist/components/presentation/LanguageSwitcher/LanguageSwitcher.d.ts +78 -0
- package/dist/components/presentation/LanguageSwitcher/LanguageSwitcher.d.ts.map +1 -0
- package/dist/components/presentation/Organization/BaseOrganization.d.ts +67 -0
- package/dist/components/presentation/Organization/BaseOrganization.d.ts.map +1 -0
- package/dist/components/presentation/Organization/Organization.d.ts +67 -0
- package/dist/components/presentation/Organization/Organization.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationList/BaseOrganizationList.d.ts +135 -0
- package/dist/components/presentation/OrganizationList/BaseOrganizationList.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationList/BaseOrganizationList.styles.d.ts +27 -0
- package/dist/components/presentation/OrganizationList/BaseOrganizationList.styles.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationList/OrganizationList.d.ts +93 -0
- package/dist/components/presentation/OrganizationList/OrganizationList.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationList/OrganizationList.styles.d.ts +27 -0
- package/dist/components/presentation/OrganizationList/OrganizationList.styles.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.d.ts +160 -0
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.d.ts +27 -0
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationProfile/OrganizationProfile.d.ts +120 -0
- package/dist/components/presentation/OrganizationProfile/OrganizationProfile.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.d.ts +149 -0
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.d.ts +27 -0
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.d.ts +71 -0
- package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.d.ts.map +1 -0
- package/dist/components/presentation/User/BaseUser.d.ts +67 -0
- package/dist/components/presentation/User/BaseUser.d.ts.map +1 -0
- package/dist/components/presentation/User/User.d.ts +63 -0
- package/dist/components/presentation/User/User.d.ts.map +1 -0
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts +89 -0
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts.map +1 -0
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.d.ts +27 -0
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.d.ts.map +1 -0
- package/dist/components/presentation/UserDropdown/UserDropdown.d.ts +109 -0
- package/dist/components/presentation/UserDropdown/UserDropdown.d.ts.map +1 -0
- package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts +73 -0
- package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts.map +1 -0
- package/dist/components/presentation/UserProfile/BaseUserProfile.styles.d.ts +27 -0
- package/dist/components/presentation/UserProfile/BaseUserProfile.styles.d.ts.map +1 -0
- package/dist/components/presentation/UserProfile/UserProfile.d.ts +60 -0
- package/dist/components/presentation/UserProfile/UserProfile.d.ts.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/index.d.ts +22 -0
- package/dist/components/presentation/auth/AcceptInvite/index.d.ts.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/AcceptInvite.d.ts +125 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/AcceptInvite.d.ts.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.d.ts +202 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.d.ts.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.d.ts +27 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.d.ts.map +1 -0
- package/dist/components/presentation/auth/AuthOptionFactory.d.ts +114 -0
- package/dist/components/presentation/auth/AuthOptionFactory.d.ts.map +1 -0
- package/dist/components/presentation/auth/InviteUser/index.d.ts +22 -0
- package/dist/components/presentation/auth/InviteUser/index.d.ts.map +1 -0
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.d.ts +191 -0
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.d.ts.map +1 -0
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.d.ts +27 -0
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.d.ts.map +1 -0
- package/dist/components/presentation/auth/InviteUser/v2/InviteUser.d.ts +104 -0
- package/dist/components/presentation/auth/InviteUser/v2/InviteUser.d.ts.map +1 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/index.d.ts +20 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/index.d.ts.map +1 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.d.ts +30 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.d.ts.map +1 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.d.ts +21 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.d.ts.map +1 -0
- package/dist/components/presentation/auth/Recovery/BaseRecovery.d.ts +24 -0
- package/dist/components/presentation/auth/Recovery/BaseRecovery.d.ts.map +1 -0
- package/dist/components/presentation/auth/Recovery/Recovery.d.ts +57 -0
- package/dist/components/presentation/auth/Recovery/Recovery.d.ts.map +1 -0
- package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.d.ts +74 -0
- package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.d.ts.map +1 -0
- package/dist/components/presentation/auth/Recovery/v1/Recovery.d.ts +26 -0
- package/dist/components/presentation/auth/Recovery/v1/Recovery.d.ts.map +1 -0
- package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.d.ts +46 -0
- package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.d.ts.map +1 -0
- package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.d.ts +83 -0
- package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.d.ts.map +1 -0
- package/dist/components/presentation/auth/Recovery/v2/Recovery.d.ts +56 -0
- package/dist/components/presentation/auth/Recovery/v2/Recovery.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/BaseSignIn.d.ts +28 -0
- package/dist/components/presentation/auth/SignIn/BaseSignIn.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.d.ts +27 -0
- package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/SignIn.d.ts +63 -0
- package/dist/components/presentation/auth/SignIn/SignIn.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.d.ts +131 -0
- package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.d.ts +26 -0
- package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.d.ts +26 -0
- package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.d.ts +27 -0
- package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.d.ts +77 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.d.ts +26 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.d.ts +26 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/Totp.d.ts +26 -0
- package/dist/components/presentation/auth/SignIn/v1/options/Totp.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.d.ts +26 -0
- package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/types.d.ts +125 -0
- package/dist/components/presentation/auth/SignIn/v1/types.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts +222 -0
- package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts +165 -0
- package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts +28 -0
- package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.d.ts +27 -0
- package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignUp/SignUp.d.ts +98 -0
- package/dist/components/presentation/auth/SignUp/SignUp.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.d.ts +174 -0
- package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignUp/v1/SignUp.d.ts +39 -0
- package/dist/components/presentation/auth/SignUp/v1/SignUp.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.d.ts +46 -0
- package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.d.ts +186 -0
- package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignUp/v2/SignUp.d.ts +39 -0
- package/dist/components/presentation/auth/SignUp/v2/SignUp.d.ts.map +1 -0
- package/dist/components/primitives/Alert/Alert.d.ts +76 -0
- package/dist/components/primitives/Alert/Alert.d.ts.map +1 -0
- package/dist/components/primitives/Alert/Alert.styles.d.ts +29 -0
- package/dist/components/primitives/Alert/Alert.styles.d.ts.map +1 -0
- package/dist/components/primitives/Avatar/Avatar.d.ts +60 -0
- package/dist/components/primitives/Avatar/Avatar.d.ts.map +1 -0
- package/dist/components/primitives/Avatar/Avatar.styles.d.ts +31 -0
- package/dist/components/primitives/Avatar/Avatar.styles.d.ts.map +1 -0
- package/dist/components/primitives/Button/Button.d.ts +88 -0
- package/dist/components/primitives/Button/Button.d.ts.map +1 -0
- package/dist/components/primitives/Button/Button.styles.d.ts +36 -0
- package/dist/components/primitives/Button/Button.styles.d.ts.map +1 -0
- package/dist/components/primitives/Card/Card.d.ts +133 -0
- package/dist/components/primitives/Card/Card.d.ts.map +1 -0
- package/dist/components/primitives/Card/Card.styles.d.ts +30 -0
- package/dist/components/primitives/Card/Card.styles.d.ts.map +1 -0
- package/dist/components/primitives/Checkbox/Checkbox.d.ts +43 -0
- package/dist/components/primitives/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/primitives/Checkbox/Checkbox.styles.d.ts +29 -0
- package/dist/components/primitives/Checkbox/Checkbox.styles.d.ts.map +1 -0
- package/dist/components/primitives/CopyableText/CopyableText.d.ts +37 -0
- package/dist/components/primitives/CopyableText/CopyableText.d.ts.map +1 -0
- package/dist/components/primitives/CopyableText/CopyableText.styles.d.ts +21 -0
- package/dist/components/primitives/CopyableText/CopyableText.styles.d.ts.map +1 -0
- package/dist/components/primitives/CopyableText/index.d.ts +20 -0
- package/dist/components/primitives/CopyableText/index.d.ts.map +1 -0
- package/dist/components/primitives/DatePicker/DatePicker.d.ts +51 -0
- package/dist/components/primitives/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/components/primitives/DatePicker/DatePicker.styles.d.ts +29 -0
- package/dist/components/primitives/DatePicker/DatePicker.styles.d.ts.map +1 -0
- package/dist/components/primitives/Dialog/Dialog.d.ts +62 -0
- package/dist/components/primitives/Dialog/Dialog.d.ts.map +1 -0
- package/dist/components/primitives/Dialog/Dialog.styles.d.ts +27 -0
- package/dist/components/primitives/Dialog/Dialog.styles.d.ts.map +1 -0
- package/dist/components/primitives/Divider/Divider.d.ts +59 -0
- package/dist/components/primitives/Divider/Divider.d.ts.map +1 -0
- package/dist/components/primitives/Divider/Divider.styles.d.ts +33 -0
- package/dist/components/primitives/Divider/Divider.styles.d.ts.map +1 -0
- package/dist/components/primitives/FormControl/FormControl.d.ts +52 -0
- package/dist/components/primitives/FormControl/FormControl.d.ts.map +1 -0
- package/dist/components/primitives/FormControl/FormControl.styles.d.ts +31 -0
- package/dist/components/primitives/FormControl/FormControl.styles.d.ts.map +1 -0
- package/dist/components/primitives/Icons/ArrowLeftRight.d.ts +30 -0
- package/dist/components/primitives/Icons/ArrowLeftRight.d.ts.map +1 -0
- package/dist/components/primitives/Icons/ArrowRightLeft.d.ts +30 -0
- package/dist/components/primitives/Icons/ArrowRightLeft.d.ts.map +1 -0
- package/dist/components/primitives/Icons/Building.d.ts +41 -0
- package/dist/components/primitives/Icons/Building.d.ts.map +1 -0
- package/dist/components/primitives/Icons/BuildingAlt.d.ts +41 -0
- package/dist/components/primitives/Icons/BuildingAlt.d.ts.map +1 -0
- package/dist/components/primitives/Icons/Check.d.ts +41 -0
- package/dist/components/primitives/Icons/Check.d.ts.map +1 -0
- package/dist/components/primitives/Icons/ChevronDown.d.ts +41 -0
- package/dist/components/primitives/Icons/ChevronDown.d.ts.map +1 -0
- package/dist/components/primitives/Icons/CircleAlert.d.ts +24 -0
- package/dist/components/primitives/Icons/CircleAlert.d.ts.map +1 -0
- package/dist/components/primitives/Icons/CircleCheck.d.ts +24 -0
- package/dist/components/primitives/Icons/CircleCheck.d.ts.map +1 -0
- package/dist/components/primitives/Icons/Eye.d.ts +24 -0
- package/dist/components/primitives/Icons/Eye.d.ts.map +1 -0
- package/dist/components/primitives/Icons/EyeOff.d.ts +24 -0
- package/dist/components/primitives/Icons/EyeOff.d.ts.map +1 -0
- package/dist/components/primitives/Icons/Info.d.ts +24 -0
- package/dist/components/primitives/Icons/Info.d.ts.map +1 -0
- package/dist/components/primitives/Icons/LogOut.d.ts +24 -0
- package/dist/components/primitives/Icons/LogOut.d.ts.map +1 -0
- package/dist/components/primitives/Icons/Plus.d.ts +24 -0
- package/dist/components/primitives/Icons/Plus.d.ts.map +1 -0
- package/dist/components/primitives/Icons/Settings.d.ts +1 -0
- package/dist/components/primitives/Icons/Settings.d.ts.map +1 -0
- package/dist/components/primitives/Icons/TriangleAlert.d.ts +24 -0
- package/dist/components/primitives/Icons/TriangleAlert.d.ts.map +1 -0
- package/dist/components/primitives/Icons/User.d.ts +24 -0
- package/dist/components/primitives/Icons/User.d.ts.map +1 -0
- package/dist/components/primitives/Icons/X.d.ts +24 -0
- package/dist/components/primitives/Icons/X.d.ts.map +1 -0
- package/dist/components/primitives/Icons/flowIconRegistry.d.ts +29 -0
- package/dist/components/primitives/Icons/flowIconRegistry.d.ts.map +1 -0
- package/dist/components/primitives/Icons/index.d.ts +29 -0
- package/dist/components/primitives/Icons/index.d.ts.map +1 -0
- package/dist/components/primitives/InputLabel/InputLabel.d.ts +52 -0
- package/dist/components/primitives/InputLabel/InputLabel.d.ts.map +1 -0
- package/dist/components/primitives/InputLabel/InputLabel.styles.d.ts +31 -0
- package/dist/components/primitives/InputLabel/InputLabel.styles.d.ts.map +1 -0
- package/dist/components/primitives/KeyValueInput/KeyValueInput.d.ts +124 -0
- package/dist/components/primitives/KeyValueInput/KeyValueInput.d.ts.map +1 -0
- package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.d.ts +30 -0
- package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.d.ts.map +1 -0
- package/dist/components/primitives/Logo/Logo.d.ts +53 -0
- package/dist/components/primitives/Logo/Logo.d.ts.map +1 -0
- package/dist/components/primitives/Logo/Logo.styles.d.ts +29 -0
- package/dist/components/primitives/Logo/Logo.styles.d.ts.map +1 -0
- package/dist/components/primitives/MultiInput/MultiInput.d.ts +89 -0
- package/dist/components/primitives/MultiInput/MultiInput.d.ts.map +1 -0
- package/dist/components/primitives/MultiInput/MultiInput.styles.d.ts +33 -0
- package/dist/components/primitives/MultiInput/MultiInput.styles.d.ts.map +1 -0
- package/dist/components/primitives/OtpField/OtpField.d.ts +88 -0
- package/dist/components/primitives/OtpField/OtpField.d.ts.map +1 -0
- package/dist/components/primitives/OtpField/OtpField.styles.d.ts +31 -0
- package/dist/components/primitives/OtpField/OtpField.styles.d.ts.map +1 -0
- package/dist/components/primitives/PasswordField/PasswordField.d.ts +32 -0
- package/dist/components/primitives/PasswordField/PasswordField.d.ts.map +1 -0
- package/dist/components/primitives/PasswordField/PasswordField.styles.d.ts +30 -0
- package/dist/components/primitives/PasswordField/PasswordField.styles.d.ts.map +1 -0
- package/dist/components/primitives/Select/Select.d.ts +65 -0
- package/dist/components/primitives/Select/Select.d.ts.map +1 -0
- package/dist/components/primitives/Select/Select.styles.d.ts +29 -0
- package/dist/components/primitives/Select/Select.styles.d.ts.map +1 -0
- package/dist/components/primitives/Spinner/Spinner.d.ts +55 -0
- package/dist/components/primitives/Spinner/Spinner.d.ts.map +1 -0
- package/dist/components/primitives/Spinner/Spinner.styles.d.ts +30 -0
- package/dist/components/primitives/Spinner/Spinner.styles.d.ts.map +1 -0
- package/dist/components/primitives/TextField/TextField.d.ts +63 -0
- package/dist/components/primitives/TextField/TextField.d.ts.map +1 -0
- package/dist/components/primitives/TextField/TextField.styles.d.ts +31 -0
- package/dist/components/primitives/TextField/TextField.styles.d.ts.map +1 -0
- package/dist/components/primitives/Toggle/Toggle.d.ts +41 -0
- package/dist/components/primitives/Toggle/Toggle.d.ts.map +1 -0
- package/dist/components/primitives/Toggle/Toggle.styles.d.ts +21 -0
- package/dist/components/primitives/Toggle/Toggle.styles.d.ts.map +1 -0
- package/dist/components/primitives/Typography/Typography.d.ts +80 -0
- package/dist/components/primitives/Typography/Typography.d.ts.map +1 -0
- package/dist/components/primitives/Typography/Typography.styles.d.ts +39 -0
- package/dist/components/primitives/Typography/Typography.styles.d.ts.map +1 -0
- package/dist/contexts/Branding/BrandingContext.d.ts +53 -0
- package/dist/contexts/Branding/BrandingContext.d.ts.map +1 -0
- package/dist/contexts/Branding/BrandingProvider.d.ts +89 -0
- package/dist/contexts/Branding/BrandingProvider.d.ts.map +1 -0
- package/dist/contexts/Branding/useBrandingContext.d.ts +45 -0
- package/dist/contexts/Branding/useBrandingContext.d.ts.map +1 -0
- package/dist/contexts/ComponentRenderer/ComponentRendererContext.d.ts +37 -0
- package/dist/contexts/ComponentRenderer/ComponentRendererContext.d.ts.map +1 -0
- package/dist/contexts/ComponentRenderer/ComponentRendererProvider.d.ts +25 -0
- package/dist/contexts/ComponentRenderer/ComponentRendererProvider.d.ts.map +1 -0
- package/dist/contexts/Flow/FlowContext.d.ts +75 -0
- package/dist/contexts/Flow/FlowContext.d.ts.map +1 -0
- package/dist/contexts/Flow/FlowProvider.d.ts +47 -0
- package/dist/contexts/Flow/FlowProvider.d.ts.map +1 -0
- package/dist/contexts/Flow/useFlow.d.ts +49 -0
- package/dist/contexts/Flow/useFlow.d.ts.map +1 -0
- package/dist/contexts/FlowMeta/FlowMetaContext.d.ts +45 -0
- package/dist/contexts/FlowMeta/FlowMetaContext.d.ts.map +1 -0
- package/dist/contexts/FlowMeta/FlowMetaProvider.d.ts +51 -0
- package/dist/contexts/FlowMeta/FlowMetaProvider.d.ts.map +1 -0
- package/dist/contexts/FlowMeta/useFlowMeta.d.ts +21 -0
- package/dist/contexts/FlowMeta/useFlowMeta.d.ts.map +1 -0
- package/dist/contexts/I18n/ComponentPreferencesContext.d.ts +27 -0
- package/dist/contexts/I18n/ComponentPreferencesContext.d.ts.map +1 -0
- package/dist/contexts/I18n/I18nContext.d.ts +49 -0
- package/dist/contexts/I18n/I18nContext.d.ts.map +1 -0
- package/dist/contexts/I18n/I18nProvider.d.ts +32 -0
- package/dist/contexts/I18n/I18nProvider.d.ts.map +1 -0
- package/dist/contexts/I18n/useI18n.d.ts +28 -0
- package/dist/contexts/I18n/useI18n.d.ts.map +1 -0
- package/dist/contexts/Organization/OrganizationContext.d.ts +41 -0
- package/dist/contexts/Organization/OrganizationContext.d.ts.map +1 -0
- package/dist/contexts/Organization/OrganizationProvider.d.ts +94 -0
- package/dist/contexts/Organization/OrganizationProvider.d.ts.map +1 -0
- package/dist/contexts/Organization/useOrganization.d.ts +105 -0
- package/dist/contexts/Organization/useOrganization.d.ts.map +1 -0
- package/dist/contexts/Theme/ThemeContext.d.ts +43 -0
- package/dist/contexts/Theme/ThemeContext.d.ts.map +1 -0
- package/dist/contexts/Theme/ThemeProvider.d.ts +86 -0
- package/dist/contexts/Theme/ThemeProvider.d.ts.map +1 -0
- package/dist/contexts/Theme/types.d.ts +131 -0
- package/dist/contexts/Theme/types.d.ts.map +1 -0
- package/dist/contexts/Theme/useTheme.d.ts +21 -0
- package/dist/contexts/Theme/useTheme.d.ts.map +1 -0
- package/dist/contexts/Theme/v1/ThemeProvider.d.ts +89 -0
- package/dist/contexts/Theme/v1/ThemeProvider.d.ts.map +1 -0
- package/dist/contexts/Theme/v2/ThemeProvider.d.ts +58 -0
- package/dist/contexts/Theme/v2/ThemeProvider.d.ts.map +1 -0
- package/dist/contexts/ThunderID/ThunderIDContext.d.ts +184 -0
- package/dist/contexts/ThunderID/ThunderIDContext.d.ts.map +1 -0
- package/dist/contexts/ThunderID/ThunderIDProvider.d.ts +26 -0
- package/dist/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -0
- package/dist/contexts/ThunderID/useThunderID.d.ts +21 -0
- package/dist/contexts/ThunderID/useThunderID.d.ts.map +1 -0
- package/dist/contexts/User/UserContext.d.ts +42 -0
- package/dist/contexts/User/UserContext.d.ts.map +1 -0
- package/dist/contexts/User/UserProvider.d.ts +65 -0
- package/dist/contexts/User/UserProvider.d.ts.map +1 -0
- package/dist/contexts/User/useUser.d.ts +95 -0
- package/dist/contexts/User/useUser.d.ts.map +1 -0
- package/dist/hooks/useBranding.d.ts +128 -0
- package/dist/hooks/useBranding.d.ts.map +1 -0
- package/dist/hooks/useBrowserUrl.d.ts +56 -0
- package/dist/hooks/useBrowserUrl.d.ts.map +1 -0
- package/dist/hooks/useForm.d.ts +194 -0
- package/dist/hooks/useForm.d.ts.map +1 -0
- package/dist/hooks/useTranslation.d.ts +53 -0
- package/dist/hooks/useTranslation.d.ts.map +1 -0
- package/dist/hooks/v2/useOAuthCallback.d.ts +83 -0
- package/dist/hooks/v2/useOAuthCallback.d.ts.map +1 -0
- package/dist/index.d.ts +206 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20044 -0
- package/dist/index.js.map +1 -0
- package/dist/models/adapters.d.ts +69 -0
- package/dist/models/adapters.d.ts.map +1 -0
- package/dist/models/config.d.ts +20 -0
- package/dist/models/config.d.ts.map +1 -0
- package/dist/utils/applyThemeToDOM.d.ts +25 -0
- package/dist/utils/applyThemeToDOM.d.ts.map +1 -0
- package/dist/utils/getDisplayName.d.ts +44 -0
- package/dist/utils/getDisplayName.d.ts.map +1 -0
- package/dist/utils/getMappedUserProfileValue.d.ts +52 -0
- package/dist/utils/getMappedUserProfileValue.d.ts.map +1 -0
- package/dist/utils/normalizeThemeConfig.d.ts +31 -0
- package/dist/utils/normalizeThemeConfig.d.ts.map +1 -0
- package/dist/utils/oauth.d.ts +25 -0
- package/dist/utils/oauth.d.ts.map +1 -0
- package/dist/utils/v2/buildThemeConfigFromFlowMeta.d.ts +34 -0
- package/dist/utils/v2/buildThemeConfigFromFlowMeta.d.ts.map +1 -0
- package/dist/utils/v2/flowTransformer.d.ts +121 -0
- package/dist/utils/v2/flowTransformer.d.ts.map +1 -0
- package/dist/utils/v2/getAuthComponentHeadings.d.ts +70 -0
- package/dist/utils/v2/getAuthComponentHeadings.d.ts.map +1 -0
- package/dist/utils/v2/passkey.d.ts +32 -0
- package/dist/utils/v2/passkey.d.ts.map +1 -0
- package/dist/utils/v2/resolveTranslationsInArray.d.ts +30 -0
- package/dist/utils/v2/resolveTranslationsInArray.d.ts.map +1 -0
- package/dist/utils/v2/resolveTranslationsInObject.d.ts +30 -0
- package/dist/utils/v2/resolveTranslationsInObject.d.ts.map +1 -0
- package/package.json +75 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { Theme } from '@thunderid/browser';
|
|
19
|
+
import { Context } from 'react';
|
|
20
|
+
export interface ThemeContextValue {
|
|
21
|
+
/**
|
|
22
|
+
* Error from branding theme fetch, if any
|
|
23
|
+
*/
|
|
24
|
+
brandingError?: Error | null;
|
|
25
|
+
colorScheme: 'light' | 'dark';
|
|
26
|
+
/**
|
|
27
|
+
* The text direction for the UI.
|
|
28
|
+
*/
|
|
29
|
+
direction: 'ltr' | 'rtl';
|
|
30
|
+
/**
|
|
31
|
+
* Whether branding inheritance is enabled
|
|
32
|
+
*/
|
|
33
|
+
inheritFromBranding?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Whether branding theme is currently loading
|
|
36
|
+
*/
|
|
37
|
+
isBrandingLoading?: boolean;
|
|
38
|
+
theme: Theme;
|
|
39
|
+
toggleTheme: () => void;
|
|
40
|
+
}
|
|
41
|
+
declare const ThemeContext: Context<ThemeContextValue | null>;
|
|
42
|
+
export default ThemeContext;
|
|
43
|
+
//# sourceMappingURL=ThemeContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/Theme/ThemeContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAC,OAAO,EAAgB,MAAM,OAAO,CAAC;AAE7C,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAC7B,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B;;OAEG;IACH,SAAS,EAAE,KAAK,GAAG,KAAK,CAAC;IACzB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,QAAA,MAAM,YAAY,EAAE,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAiD,CAAC;AAItG,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { BrowserThemeDetection, RecursivePartial, ThemeConfig, ThemeMode, ThemePreferences } from '@thunderid/browser';
|
|
19
|
+
import { FC, PropsWithChildren } from 'react';
|
|
20
|
+
export interface ThemeProviderProps {
|
|
21
|
+
/**
|
|
22
|
+
* Configuration for theme detection when using 'class' or 'system' mode.
|
|
23
|
+
*/
|
|
24
|
+
detection?: BrowserThemeDetection;
|
|
25
|
+
/**
|
|
26
|
+
* Whether to inherit the theme from the ThunderID branding preference.
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
inheritFromBranding?: ThemePreferences['inheritFromBranding'];
|
|
30
|
+
/**
|
|
31
|
+
* The theme mode to use for automatic detection.
|
|
32
|
+
* - `'light'` | `'dark'`: Fixed color scheme.
|
|
33
|
+
* - `'system'`: Follows the OS preference.
|
|
34
|
+
* - `'class'`: Detects theme from CSS classes on the `<html>` element.
|
|
35
|
+
* - `'branding'`: Follows the active theme from the branding preference.
|
|
36
|
+
*/
|
|
37
|
+
mode?: ThemeMode | 'branding';
|
|
38
|
+
/**
|
|
39
|
+
* Optional partial theme overrides applied on top of the resolved theme.
|
|
40
|
+
* User-supplied values always take the highest precedence.
|
|
41
|
+
*/
|
|
42
|
+
theme?: RecursivePartial<ThemeConfig>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* ThemeProvider is the single entry-point for theme management in `@thunderid/react`.
|
|
46
|
+
*
|
|
47
|
+
* It transparently switches between two internal implementations:
|
|
48
|
+
*
|
|
49
|
+
* **v1** (`ThemeProvider` classic): Sources colors from the ThunderID Branding API.
|
|
50
|
+
* Used automatically when no `FlowMetaProvider` is present in the component tree.
|
|
51
|
+
*
|
|
52
|
+
* **v2** (`FlowMetaThemeProvider`): Sources colors from the `GET /flow/meta` endpoint
|
|
53
|
+
* via `FlowMetaProvider`. Used automatically when a `FlowMetaProvider` is present
|
|
54
|
+
* in the tree — or when `version="v2"` is set explicitly.
|
|
55
|
+
*
|
|
56
|
+
* The active version can also be pinned explicitly via the `version` prop.
|
|
57
|
+
* All components that consume `useTheme()` continue to work regardless of which
|
|
58
|
+
* version is active.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* Auto-detection (recommended):
|
|
62
|
+
* ```tsx
|
|
63
|
+
* // v2 mode – FlowMetaProvider is present
|
|
64
|
+
* <FlowMetaProvider config={{ baseUrl, type: FlowMetaType.App, id: appId }}>
|
|
65
|
+
* <ThemeProvider>
|
|
66
|
+
* <App />
|
|
67
|
+
* </ThemeProvider>
|
|
68
|
+
* </FlowMetaProvider>
|
|
69
|
+
*
|
|
70
|
+
* // v1 mode – no FlowMetaProvider
|
|
71
|
+
* <ThemeProvider>
|
|
72
|
+
* <App />
|
|
73
|
+
* </ThemeProvider>
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* Explicit version pinning:
|
|
78
|
+
* ```tsx
|
|
79
|
+
* <ThemeProvider version="v2">
|
|
80
|
+
* <App />
|
|
81
|
+
* </ThemeProvider>
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
declare const ThemeProvider: FC<PropsWithChildren<ThemeProviderProps>>;
|
|
85
|
+
export default ThemeProvider;
|
|
86
|
+
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/Theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,qBAAqB,EAErB,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAAe,MAAM,OAAO,CAAC;AAK1D,MAAM,WAAW,kBAAkB;IAEjC;;OAEG;IACH,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;IAC9D;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAG9B;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAoB5D,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
export interface ThemeColors {
|
|
19
|
+
background: {
|
|
20
|
+
body: {
|
|
21
|
+
main: string;
|
|
22
|
+
};
|
|
23
|
+
disabled: string;
|
|
24
|
+
surface: string;
|
|
25
|
+
};
|
|
26
|
+
border: string;
|
|
27
|
+
error: {
|
|
28
|
+
contrastText: string;
|
|
29
|
+
main: string;
|
|
30
|
+
};
|
|
31
|
+
primary: {
|
|
32
|
+
contrastText: string;
|
|
33
|
+
main: string;
|
|
34
|
+
};
|
|
35
|
+
secondary: {
|
|
36
|
+
contrastText: string;
|
|
37
|
+
main: string;
|
|
38
|
+
};
|
|
39
|
+
success: {
|
|
40
|
+
contrastText: string;
|
|
41
|
+
main: string;
|
|
42
|
+
};
|
|
43
|
+
text: {
|
|
44
|
+
primary: string;
|
|
45
|
+
secondary: string;
|
|
46
|
+
};
|
|
47
|
+
warning: {
|
|
48
|
+
contrastText: string;
|
|
49
|
+
main: string;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export interface ThemeConfig {
|
|
53
|
+
borderRadius: {
|
|
54
|
+
large: string;
|
|
55
|
+
medium: string;
|
|
56
|
+
small: string;
|
|
57
|
+
};
|
|
58
|
+
colors: ThemeColors;
|
|
59
|
+
/**
|
|
60
|
+
* The prefix used for CSS variables.
|
|
61
|
+
* @default 'thunderid' (from VendorConstants.VENDOR_PREFIX)
|
|
62
|
+
*/
|
|
63
|
+
cssVarPrefix?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The text direction for the UI.
|
|
66
|
+
* @default 'ltr'
|
|
67
|
+
*/
|
|
68
|
+
direction?: 'ltr' | 'rtl';
|
|
69
|
+
shadows: {
|
|
70
|
+
large: string;
|
|
71
|
+
medium: string;
|
|
72
|
+
small: string;
|
|
73
|
+
};
|
|
74
|
+
spacing: {
|
|
75
|
+
unit: number;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export interface ThemeVars {
|
|
79
|
+
borderRadius: {
|
|
80
|
+
large: string;
|
|
81
|
+
medium: string;
|
|
82
|
+
small: string;
|
|
83
|
+
};
|
|
84
|
+
colors: {
|
|
85
|
+
background: {
|
|
86
|
+
body: {
|
|
87
|
+
main: string;
|
|
88
|
+
};
|
|
89
|
+
disabled: string;
|
|
90
|
+
surface: string;
|
|
91
|
+
};
|
|
92
|
+
border: string;
|
|
93
|
+
error: {
|
|
94
|
+
contrastText: string;
|
|
95
|
+
main: string;
|
|
96
|
+
};
|
|
97
|
+
primary: {
|
|
98
|
+
contrastText: string;
|
|
99
|
+
main: string;
|
|
100
|
+
};
|
|
101
|
+
secondary: {
|
|
102
|
+
contrastText: string;
|
|
103
|
+
main: string;
|
|
104
|
+
};
|
|
105
|
+
success: {
|
|
106
|
+
contrastText: string;
|
|
107
|
+
main: string;
|
|
108
|
+
};
|
|
109
|
+
text: {
|
|
110
|
+
primary: string;
|
|
111
|
+
secondary: string;
|
|
112
|
+
};
|
|
113
|
+
warning: {
|
|
114
|
+
contrastText: string;
|
|
115
|
+
main: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
shadows: {
|
|
119
|
+
large: string;
|
|
120
|
+
medium: string;
|
|
121
|
+
small: string;
|
|
122
|
+
};
|
|
123
|
+
spacing: {
|
|
124
|
+
unit: string;
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
export interface Theme extends ThemeConfig {
|
|
128
|
+
cssVariables: Record<string, string>;
|
|
129
|
+
vars: ThemeVars;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/contexts/Theme/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { ThemeContextValue } from './ThemeContext';
|
|
19
|
+
declare const useTheme: () => ThemeContextValue;
|
|
20
|
+
export default useTheme;
|
|
21
|
+
//# sourceMappingURL=useTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../src/contexts/Theme/useTheme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAqB,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AAE/D,QAAA,MAAM,QAAQ,QAAO,iBAOpB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { ThemeConfig, ThemeMode, RecursivePartial, BrowserThemeDetection, ThemePreferences } from '@thunderid/browser';
|
|
19
|
+
import { FC, PropsWithChildren } from 'react';
|
|
20
|
+
export interface ThemeProviderProps {
|
|
21
|
+
/**
|
|
22
|
+
* Configuration for theme detection when using 'class' or 'system' mode
|
|
23
|
+
*/
|
|
24
|
+
detection?: BrowserThemeDetection;
|
|
25
|
+
/**
|
|
26
|
+
* Configuration for branding integration
|
|
27
|
+
*/
|
|
28
|
+
inheritFromBranding?: ThemePreferences['inheritFromBranding'];
|
|
29
|
+
/**
|
|
30
|
+
* The theme mode to use for automatic detection
|
|
31
|
+
* - 'light': Always use light theme
|
|
32
|
+
* - 'dark': Always use dark theme
|
|
33
|
+
* - 'system': Use system preference (prefers-color-scheme media query)
|
|
34
|
+
* - 'class': Detect theme based on CSS classes on HTML element
|
|
35
|
+
* - 'branding': Use active theme from branding preference (requires inheritFromBranding=true)
|
|
36
|
+
*/
|
|
37
|
+
mode?: ThemeMode | 'branding';
|
|
38
|
+
theme?: RecursivePartial<ThemeConfig>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* ThemeProvider component that manages theme state and provides theme context to child components.
|
|
42
|
+
*
|
|
43
|
+
* This provider integrates with ThunderID branding preferences to automatically apply
|
|
44
|
+
* organization-specific themes while allowing for custom theme overrides.
|
|
45
|
+
*
|
|
46
|
+
* Features:
|
|
47
|
+
* - Automatic theme mode detection (light/dark/system/class)
|
|
48
|
+
* - Integration with ThunderID branding API through useBranding hook
|
|
49
|
+
* - Merging of branding themes with custom theme configurations
|
|
50
|
+
* - CSS variable injection for easy styling
|
|
51
|
+
* - Loading and error states for branding integration
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* Basic usage with branding integration:
|
|
55
|
+
* ```tsx
|
|
56
|
+
* <ThemeProvider inheritFromBranding={true}>
|
|
57
|
+
* <App />
|
|
58
|
+
* </ThemeProvider>
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* With custom theme overrides:
|
|
63
|
+
* ```tsx
|
|
64
|
+
* <ThemeProvider
|
|
65
|
+
* theme={{
|
|
66
|
+
* colors: {
|
|
67
|
+
* primary: { main: '#custom-color' }
|
|
68
|
+
* }
|
|
69
|
+
* }}
|
|
70
|
+
* inheritFromBranding={true}
|
|
71
|
+
* >
|
|
72
|
+
* <App />
|
|
73
|
+
* </ThemeProvider>
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* With branding-driven theme mode:
|
|
78
|
+
* ```tsx
|
|
79
|
+
* <ThemeProvider
|
|
80
|
+
* mode="branding"
|
|
81
|
+
* inheritFromBranding={true}
|
|
82
|
+
* >
|
|
83
|
+
* <App />
|
|
84
|
+
* </ThemeProvider>
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
declare const ThemeProvider: FC<PropsWithChildren<ThemeProviderProps>>;
|
|
88
|
+
export default ThemeProvider;
|
|
89
|
+
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/contexts/Theme/v1/ThemeProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAGL,WAAW,EACX,SAAS,EACT,gBAAgB,EAIhB,qBAAqB,EACrB,gBAAgB,EAGjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAA0D,MAAM,OAAO,CAAC;AAYrG,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC;;OAEG;IACH,mBAAmB,CAAC,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;IAC9D;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAC9B,KAAK,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAqL5D,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { ThemeConfig, RecursivePartial } from '@thunderid/browser';
|
|
19
|
+
import { FC, PropsWithChildren } from 'react';
|
|
20
|
+
export interface ThemeProviderProps {
|
|
21
|
+
/**
|
|
22
|
+
* Optional theme overrides merged on top of the server-side flow meta theme.
|
|
23
|
+
* User-supplied values take highest precedence.
|
|
24
|
+
*/
|
|
25
|
+
theme?: RecursivePartial<ThemeConfig>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* ThemeProvider is the v2 drop-in replacement for `ThemeProvider`.
|
|
29
|
+
*
|
|
30
|
+
* It reads the design theme from the nearest `FlowMetaContext` (provided by
|
|
31
|
+
* `FlowMetaProvider`) and publishes a resolved `Theme` object through the
|
|
32
|
+
* **same** `ThemeContext` that `useTheme` consumes. This means all existing
|
|
33
|
+
* components that call `useTheme` continue to work without any changes.
|
|
34
|
+
*
|
|
35
|
+
* The `defaultColorScheme` field returned by the server is used to seed the
|
|
36
|
+
* active color scheme; the user can still toggle it locally via the
|
|
37
|
+
* `toggleTheme` value exposed in the context.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <FlowMetaProvider config={{ baseUrl, type: FlowMetaType.App, id: appId }}>
|
|
42
|
+
* <ThemeProvider>
|
|
43
|
+
* <App /> {/* useTheme() works here as usual *\/}
|
|
44
|
+
* </ThemeProvider>
|
|
45
|
+
* </FlowMetaProvider>
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* With user theme overrides (user values win over server values):
|
|
50
|
+
* ```tsx
|
|
51
|
+
* <ThemeProvider theme={{ colors: { primary: { main: '#ff0000' } } }}>
|
|
52
|
+
* <App />
|
|
53
|
+
* </ThemeProvider>
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
declare const ThemeProvider: FC<PropsWithChildren<ThemeProviderProps>>;
|
|
57
|
+
export default ThemeProvider;
|
|
58
|
+
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/contexts/Theme/v2/ThemeProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAqB,WAAW,EAAE,gBAAgB,EAAgB,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAAsE,MAAM,OAAO,CAAC;AAOjH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAyF5D,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { FlowMetadataResponse, HttpRequestConfig, HttpResponse, IdToken, OIDCDiscoveryApiResponse, Organization, SignInOptions, TokenExchangeRequestConfig, TokenResponse } from '@thunderid/browser';
|
|
19
|
+
import { Context } from 'react';
|
|
20
|
+
import { ThunderIDReactConfig } from '../../models/config';
|
|
21
|
+
import ThunderIDReactClient from '../../ThunderIDReactClient';
|
|
22
|
+
/**
|
|
23
|
+
* Props interface of {@link ThunderIDContext}
|
|
24
|
+
*/
|
|
25
|
+
export type ThunderIDContextProps = {
|
|
26
|
+
afterSignInUrl: string | undefined;
|
|
27
|
+
applicationId: string | undefined;
|
|
28
|
+
baseUrl: string | undefined;
|
|
29
|
+
clientId: string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* OIDC discovery data.
|
|
32
|
+
*/
|
|
33
|
+
discovery: {
|
|
34
|
+
/**
|
|
35
|
+
* The response from the `.well-known/openid-configuration` endpoint.
|
|
36
|
+
* Contains server capabilities, supported endpoints, and metadata.
|
|
37
|
+
* `null` while loading or when discovery has not been fetched.
|
|
38
|
+
*/
|
|
39
|
+
wellKnown: OIDCDiscoveryApiResponse | null;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Swaps the current access token with a new one based on the provided configuration (with a grant type).
|
|
43
|
+
* @param config - Configuration for the token exchange request.
|
|
44
|
+
* @returns A promise that resolves to the token response or the raw response.
|
|
45
|
+
*/
|
|
46
|
+
exchangeToken: (config: TokenExchangeRequestConfig) => Promise<TokenResponse | Response>;
|
|
47
|
+
/**
|
|
48
|
+
* Retrieves the access token stored in the storage.
|
|
49
|
+
* This function retrieves the access token and returns it.
|
|
50
|
+
* @remarks This does not work in the `webWorker` or any other worker environment.
|
|
51
|
+
* @returns A promise that resolves to the access token.
|
|
52
|
+
*/
|
|
53
|
+
getAccessToken: () => Promise<string>;
|
|
54
|
+
/**
|
|
55
|
+
* Function to retrieve the decoded ID token.
|
|
56
|
+
* This function decodes the ID token and returns its payload.
|
|
57
|
+
* It can be used to access user claims and other information contained in the ID token.
|
|
58
|
+
*
|
|
59
|
+
* @returns A promise that resolves to the decoded ID token payload.
|
|
60
|
+
*/
|
|
61
|
+
getDecodedIdToken: () => Promise<IdToken>;
|
|
62
|
+
/**
|
|
63
|
+
* Function to retrieve the ID token.
|
|
64
|
+
* This function retrieves the ID token and returns it.
|
|
65
|
+
*
|
|
66
|
+
* @returns A promise that resolves to the ID token.
|
|
67
|
+
*/
|
|
68
|
+
getIdToken: () => Promise<string>;
|
|
69
|
+
/**
|
|
70
|
+
* Returns the underlying StorageManager instance for reading and writing SDK-managed storage.
|
|
71
|
+
*/
|
|
72
|
+
getStorageManager: () => Promise<any>;
|
|
73
|
+
/**
|
|
74
|
+
* HTTP request function to make API calls.
|
|
75
|
+
* @param requestConfig - Configuration for the HTTP request.
|
|
76
|
+
* @returns A promise that resolves to the HTTP response.
|
|
77
|
+
*/
|
|
78
|
+
http: {
|
|
79
|
+
/**
|
|
80
|
+
* Makes an HTTP request using the provided configuration.
|
|
81
|
+
* @param requestConfig - Configuration for the HTTP request.
|
|
82
|
+
* @returns A promise that resolves to the HTTP response.
|
|
83
|
+
*/
|
|
84
|
+
request: (requestConfig?: HttpRequestConfig) => Promise<HttpResponse<any>>;
|
|
85
|
+
/**
|
|
86
|
+
* Makes multiple HTTP requests based on the provided configuration.
|
|
87
|
+
* @param requestConfigs - Set of configurations for the HTTP requests.
|
|
88
|
+
* @returns A promise that resolves to an array of HTTP responses.
|
|
89
|
+
*/
|
|
90
|
+
requestAll: (requestConfigs?: HttpRequestConfig[]) => Promise<HttpResponse<any>[]>;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Instance ID for multi-instance support.
|
|
94
|
+
*/
|
|
95
|
+
instanceId: number;
|
|
96
|
+
isInitialized: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Flag indicating whether the SDK is working in the background.
|
|
99
|
+
*/
|
|
100
|
+
isLoading: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Flag indicating whether flow metadata is currently being fetched.
|
|
103
|
+
*/
|
|
104
|
+
isMetaLoading: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Flag indicating whether the user is signed in or not.
|
|
107
|
+
*/
|
|
108
|
+
isSignedIn: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Flow metadata returned by `GET /flow/meta` (v2 platform only).
|
|
111
|
+
* `null` while loading or when `resolveFromMeta` is disabled.
|
|
112
|
+
*/
|
|
113
|
+
meta: FlowMetadataResponse | null;
|
|
114
|
+
organization: Organization;
|
|
115
|
+
organizationHandle: string | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* Re-initializes the client with a new configuration.
|
|
118
|
+
*
|
|
119
|
+
* @remarks
|
|
120
|
+
* This can be partial configuration to update only specific fields.
|
|
121
|
+
*
|
|
122
|
+
* @param config - New configuration to re-initialize the client with.
|
|
123
|
+
* @returns Promise resolving to boolean indicating success.
|
|
124
|
+
*/
|
|
125
|
+
reInitialize: (config: Partial<ThunderIDReactConfig>) => Promise<boolean>;
|
|
126
|
+
/**
|
|
127
|
+
* Recovery function to initiate the account/password recovery flow.
|
|
128
|
+
*/
|
|
129
|
+
recover: (...args: any[]) => Promise<any>;
|
|
130
|
+
/**
|
|
131
|
+
* Resolves `{{ t(key) }}` and `{{ meta(path) }}` template expressions in a string,
|
|
132
|
+
* using the current i18n translation function and flow metadata from context.
|
|
133
|
+
*
|
|
134
|
+
* Useful in render-props patterns where consumers need to expand template strings
|
|
135
|
+
* that come from the server (e.g. component labels, placeholders, headings).
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* const {resolveFlowTemplateLiterals} = useThunderID();
|
|
139
|
+
* resolveFlowTemplateLiterals('{{ t(signin.heading.label) }}') // → 'Sign In'
|
|
140
|
+
* resolveFlowTemplateLiterals('Login to {{ meta(application.name) }}') // → 'Login to My App'
|
|
141
|
+
*/
|
|
142
|
+
resolveFlowTemplateLiterals: (text: string | undefined) => string;
|
|
143
|
+
/**
|
|
144
|
+
* Sign-in function to initiate the authentication process.
|
|
145
|
+
* @remark This is the programmatic version of the `SignInButton` component.
|
|
146
|
+
* TODO: Fix the types.
|
|
147
|
+
*/
|
|
148
|
+
signIn: (...args: any) => Promise<any>;
|
|
149
|
+
/**
|
|
150
|
+
* Optional additional parameters to be sent in the sign-in request.
|
|
151
|
+
* This can include custom parameters that your authorization server supports.
|
|
152
|
+
* These parameters will be included in the authorization request sent to the server.
|
|
153
|
+
* If not provided, no additional parameters will be sent.
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* signInOptions: { prompt: "login", fidp: "OrganizationSSO" }
|
|
157
|
+
*/
|
|
158
|
+
signInOptions: SignInOptions;
|
|
159
|
+
/**
|
|
160
|
+
* Silent sign-in function to re-authenticate the user without user interaction.
|
|
161
|
+
* @remark This is the programmatic version of the `SilentSignIn` component.
|
|
162
|
+
*/
|
|
163
|
+
signInSilently: ThunderIDReactClient['signInSilently'];
|
|
164
|
+
signInUrl: string | undefined;
|
|
165
|
+
/**
|
|
166
|
+
* Sign-out function to terminate the authentication session.
|
|
167
|
+
* @remark This is the programmatic version of the `SignOutButton` component.
|
|
168
|
+
* FIXME: Fix the types.
|
|
169
|
+
*/
|
|
170
|
+
signOut: any;
|
|
171
|
+
/**
|
|
172
|
+
* Sign-up function to initiate the registration process.
|
|
173
|
+
* @remark This is the programmatic version of the `SignUpButton` component.
|
|
174
|
+
*/
|
|
175
|
+
signUp: (...args: any[]) => Promise<any>;
|
|
176
|
+
signUpUrl: string | undefined;
|
|
177
|
+
user: any;
|
|
178
|
+
} & Pick<ThunderIDReactConfig, 'storage' | 'platform'> & Pick<ThunderIDReactClient, 'clearSession' | 'switchOrganization'>;
|
|
179
|
+
/**
|
|
180
|
+
* Context object for managing the Authentication flow builder core context.
|
|
181
|
+
*/
|
|
182
|
+
declare const ThunderIDContext: Context<ThunderIDContextProps | null>;
|
|
183
|
+
export default ThunderIDContext;
|
|
184
|
+
//# sourceMappingURL=ThunderIDContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThunderIDContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/ThunderID/ThunderIDContext.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025-2026, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { FC, PropsWithChildren } from 'react';
|
|
19
|
+
import { ThunderIDReactConfig } from '../../models/config';
|
|
20
|
+
/**
|
|
21
|
+
* Props interface of {@link ThunderIDProvider}
|
|
22
|
+
*/
|
|
23
|
+
export type ThunderIDProviderProps = ThunderIDReactConfig;
|
|
24
|
+
declare const ThunderIDProvider: FC<PropsWithChildren<ThunderIDProviderProps>>;
|
|
25
|
+
export default ThunderIDProvider;
|
|
26
|
+
//# sourceMappingURL=ThunderIDProvider.d.ts.map
|