@thunderid/react 0.0.5 → 0.2.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/README.md +1 -1
- package/dist/ThunderIDReactClient.d.ts +2 -2
- package/dist/ThunderIDReactClient.d.ts.map +1 -1
- package/dist/ThunderIDReactClient.js +233 -0
- package/dist/ThunderIDReactClient.js.map +1 -0
- package/dist/api/createOrganization.d.ts +2 -2
- package/dist/api/createOrganization.js +80 -0
- package/dist/api/createOrganization.js.map +1 -0
- package/dist/api/getAllOrganizations.d.ts +2 -2
- package/dist/api/getAllOrganizations.js +71 -0
- package/dist/api/getAllOrganizations.js.map +1 -0
- package/dist/api/getMeOrganizations.d.ts +2 -2
- package/dist/api/getMeOrganizations.js +75 -0
- package/dist/api/getMeOrganizations.js.map +1 -0
- package/dist/api/getOrganization.d.ts +2 -2
- package/dist/api/getOrganization.js +67 -0
- package/dist/api/getOrganization.js.map +1 -0
- package/dist/api/getSchemas.d.ts +2 -2
- package/dist/api/getSchemas.js +65 -0
- package/dist/api/getSchemas.js.map +1 -0
- package/dist/api/getScim2Me.d.ts +2 -2
- package/dist/api/getScim2Me.js +65 -0
- package/dist/api/getScim2Me.js.map +1 -0
- package/dist/api/updateMeProfile.d.ts +2 -2
- package/dist/api/updateMeProfile.js +54 -0
- package/dist/api/updateMeProfile.js.map +1 -0
- package/dist/api/updateOrganization.d.ts +3 -3
- package/dist/api/updateOrganization.js +74 -0
- package/dist/api/updateOrganization.js.map +1 -0
- package/dist/cjs/ThunderIDReactClient.cjs +235 -0
- package/dist/cjs/ThunderIDReactClient.cjs.map +1 -0
- package/dist/cjs/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/cjs/api/createOrganization.cjs +82 -0
- package/dist/cjs/api/createOrganization.cjs.map +1 -0
- package/dist/cjs/api/getAllOrganizations.cjs +73 -0
- package/dist/cjs/api/getAllOrganizations.cjs.map +1 -0
- package/dist/cjs/api/getMeOrganizations.cjs +77 -0
- package/dist/cjs/api/getMeOrganizations.cjs.map +1 -0
- package/dist/cjs/api/getOrganization.cjs +69 -0
- package/dist/cjs/api/getOrganization.cjs.map +1 -0
- package/dist/cjs/api/getSchemas.cjs +67 -0
- package/dist/cjs/api/getSchemas.cjs.map +1 -0
- package/dist/cjs/api/getScim2Me.cjs +67 -0
- package/dist/cjs/api/getScim2Me.cjs.map +1 -0
- package/dist/cjs/api/updateMeProfile.cjs +56 -0
- package/dist/cjs/api/updateMeProfile.cjs.map +1 -0
- package/dist/cjs/api/updateOrganization.cjs +76 -0
- package/dist/cjs/api/updateOrganization.cjs.map +1 -0
- package/dist/cjs/components/actions/SignInButton/BaseSignInButton.cjs +54 -0
- package/dist/cjs/components/actions/SignInButton/BaseSignInButton.cjs.map +1 -0
- package/dist/cjs/components/actions/SignInButton/SignInButton.cjs +88 -0
- package/dist/cjs/components/actions/SignInButton/SignInButton.cjs.map +1 -0
- package/dist/cjs/components/actions/SignOutButton/BaseSignOutButton.cjs +54 -0
- package/dist/cjs/components/actions/SignOutButton/BaseSignOutButton.cjs.map +1 -0
- package/dist/cjs/components/actions/SignOutButton/SignOutButton.cjs +84 -0
- package/dist/cjs/components/actions/SignOutButton/SignOutButton.cjs.map +1 -0
- package/dist/cjs/components/actions/SignUpButton/BaseSignUpButton.cjs +56 -0
- package/dist/cjs/components/actions/SignUpButton/BaseSignUpButton.cjs.map +1 -0
- package/dist/cjs/components/actions/SignUpButton/SignUpButton.cjs +86 -0
- package/dist/cjs/components/actions/SignUpButton/SignUpButton.cjs.map +1 -0
- package/dist/cjs/components/adapters/CheckboxInput.cjs +30 -0
- package/dist/cjs/components/adapters/CheckboxInput.cjs.map +1 -0
- package/dist/cjs/components/adapters/Consent.cjs +69 -0
- package/dist/cjs/components/adapters/Consent.cjs.map +1 -0
- package/dist/cjs/components/adapters/ConsentCheckboxList.cjs +81 -0
- package/dist/cjs/components/adapters/ConsentCheckboxList.cjs.map +1 -0
- package/dist/cjs/components/adapters/ConsentCheckboxList.styles.cjs +46 -0
- package/dist/cjs/components/adapters/ConsentCheckboxList.styles.cjs.map +1 -0
- package/dist/cjs/components/adapters/DateInput.cjs +30 -0
- package/dist/cjs/components/adapters/DateInput.cjs.map +1 -0
- package/dist/cjs/components/adapters/DividerComponent.cjs +24 -0
- package/dist/cjs/components/adapters/DividerComponent.cjs.map +1 -0
- package/dist/cjs/components/adapters/EmailInput.cjs +30 -0
- package/dist/cjs/components/adapters/EmailInput.cjs.map +1 -0
- package/dist/cjs/components/adapters/FacebookButton.cjs +41 -0
- package/dist/cjs/components/adapters/FacebookButton.cjs.map +1 -0
- package/dist/cjs/components/adapters/FlowTimer.cjs +52 -0
- package/dist/cjs/components/adapters/FlowTimer.cjs.map +1 -0
- package/dist/cjs/components/adapters/FormContainer.cjs +36 -0
- package/dist/cjs/components/adapters/FormContainer.cjs.map +1 -0
- package/dist/cjs/components/adapters/GitHubButton.cjs +41 -0
- package/dist/cjs/components/adapters/GitHubButton.cjs.map +1 -0
- package/dist/cjs/components/adapters/GoogleButton.cjs +59 -0
- package/dist/cjs/components/adapters/GoogleButton.cjs.map +1 -0
- package/dist/cjs/components/adapters/ImageComponent.cjs +77 -0
- package/dist/cjs/components/adapters/ImageComponent.cjs.map +1 -0
- package/dist/cjs/components/adapters/LinkedInButton.cjs +38 -0
- package/dist/cjs/components/adapters/LinkedInButton.cjs.map +1 -0
- package/dist/cjs/components/adapters/MicrosoftButton.cjs +56 -0
- package/dist/cjs/components/adapters/MicrosoftButton.cjs.map +1 -0
- package/dist/cjs/components/adapters/NumberInput.cjs +30 -0
- package/dist/cjs/components/adapters/NumberInput.cjs.map +1 -0
- package/dist/cjs/components/adapters/PasswordInput.cjs +52 -0
- package/dist/cjs/components/adapters/PasswordInput.cjs.map +1 -0
- package/dist/cjs/components/adapters/SelectInput.cjs +36 -0
- package/dist/cjs/components/adapters/SelectInput.cjs.map +1 -0
- package/dist/cjs/components/adapters/SignInWithEthereumButton.cjs +38 -0
- package/dist/cjs/components/adapters/SignInWithEthereumButton.cjs.map +1 -0
- package/dist/cjs/components/adapters/SmsOtpButton.cjs +38 -0
- package/dist/cjs/components/adapters/SmsOtpButton.cjs.map +1 -0
- package/dist/cjs/components/adapters/SubmitButton.cjs +61 -0
- package/dist/cjs/components/adapters/SubmitButton.cjs.map +1 -0
- package/dist/cjs/components/adapters/TelephoneInput.cjs +32 -0
- package/dist/cjs/components/adapters/TelephoneInput.cjs.map +1 -0
- package/dist/cjs/components/adapters/TextInput.cjs +30 -0
- package/dist/cjs/components/adapters/TextInput.cjs.map +1 -0
- package/dist/cjs/components/adapters/Typography.cjs +60 -0
- package/dist/cjs/components/adapters/Typography.cjs.map +1 -0
- package/dist/cjs/components/auth/Callback/Callback.cjs +26 -0
- package/dist/cjs/components/auth/Callback/Callback.cjs.map +1 -0
- package/dist/cjs/components/auth/Callback/OAuthCallback.cjs +104 -0
- package/dist/cjs/components/auth/Callback/OAuthCallback.cjs.map +1 -0
- package/dist/cjs/components/auth/Callback/TokenCallback.cjs +134 -0
- package/dist/cjs/components/auth/Callback/TokenCallback.cjs.map +1 -0
- package/dist/cjs/components/control/Loading.cjs +35 -0
- package/dist/cjs/components/control/Loading.cjs.map +1 -0
- package/dist/cjs/components/control/OrganizationContext/OrganizationContext.cjs +34 -0
- package/dist/cjs/components/control/OrganizationContext/OrganizationContext.cjs.map +1 -0
- package/dist/cjs/components/control/OrganizationContext/OrganizationContextController.cjs +58 -0
- package/dist/cjs/components/control/OrganizationContext/OrganizationContextController.cjs.map +1 -0
- package/dist/cjs/components/control/SignedIn.cjs +35 -0
- package/dist/cjs/components/control/SignedIn.cjs.map +1 -0
- package/dist/cjs/components/control/SignedOut.cjs +35 -0
- package/dist/cjs/components/control/SignedOut.cjs.map +1 -0
- package/dist/cjs/components/factories/FieldFactory.cjs +142 -0
- package/dist/cjs/components/factories/FieldFactory.cjs.map +1 -0
- package/dist/cjs/components/presentation/CreateOrganization/BaseCreateOrganization.cjs +183 -0
- package/dist/cjs/components/presentation/CreateOrganization/BaseCreateOrganization.cjs.map +1 -0
- package/dist/cjs/components/presentation/CreateOrganization/BaseCreateOrganization.styles.cjs +150 -0
- package/dist/cjs/components/presentation/CreateOrganization/BaseCreateOrganization.styles.cjs.map +1 -0
- package/dist/cjs/components/presentation/CreateOrganization/CreateOrganization.cjs +90 -0
- package/dist/cjs/components/presentation/CreateOrganization/CreateOrganization.cjs.map +1 -0
- package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.cjs +118 -0
- package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.cjs.map +1 -0
- package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.cjs +118 -0
- package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.cjs.map +1 -0
- package/dist/cjs/components/presentation/LanguageSwitcher/LanguageSwitcher.cjs +76 -0
- package/dist/cjs/components/presentation/LanguageSwitcher/LanguageSwitcher.cjs.map +1 -0
- package/dist/cjs/components/presentation/Organization/BaseOrganization.cjs +41 -0
- package/dist/cjs/components/presentation/Organization/BaseOrganization.cjs.map +1 -0
- package/dist/cjs/components/presentation/Organization/Organization.cjs +49 -0
- package/dist/cjs/components/presentation/Organization/Organization.cjs.map +1 -0
- package/dist/cjs/components/presentation/OrganizationList/BaseOrganizationList.cjs +257 -0
- package/dist/cjs/components/presentation/OrganizationList/BaseOrganizationList.cjs.map +1 -0
- package/dist/cjs/components/presentation/OrganizationList/BaseOrganizationList.styles.cjs +236 -0
- package/dist/cjs/components/presentation/OrganizationList/BaseOrganizationList.styles.cjs.map +1 -0
- package/dist/cjs/components/presentation/OrganizationList/OrganizationList.cjs +86 -0
- package/dist/cjs/components/presentation/OrganizationList/OrganizationList.cjs.map +1 -0
- package/dist/cjs/components/presentation/OrganizationList/OrganizationList.styles.cjs +75 -0
- package/dist/cjs/components/presentation/OrganizationList/OrganizationList.styles.cjs.map +1 -0
- package/dist/cjs/components/presentation/OrganizationProfile/BaseOrganizationProfile.cjs +328 -0
- package/dist/cjs/components/presentation/OrganizationProfile/BaseOrganizationProfile.cjs.map +1 -0
- package/dist/cjs/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.cjs +166 -0
- package/dist/cjs/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.cjs.map +1 -0
- package/dist/cjs/components/presentation/OrganizationProfile/OrganizationProfile.cjs +126 -0
- package/dist/cjs/components/presentation/OrganizationProfile/OrganizationProfile.cjs.map +1 -0
- package/dist/cjs/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.cjs +288 -0
- package/dist/cjs/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.cjs.map +1 -0
- package/dist/cjs/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.cjs +237 -0
- package/dist/cjs/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.cjs.map +1 -0
- package/dist/cjs/components/presentation/OrganizationSwitcher/OrganizationSwitcher.cjs +127 -0
- package/dist/cjs/components/presentation/OrganizationSwitcher/OrganizationSwitcher.cjs.map +1 -0
- package/dist/cjs/components/presentation/User/BaseUser.cjs +41 -0
- package/dist/cjs/components/presentation/User/BaseUser.cjs.map +1 -0
- package/dist/cjs/components/presentation/User/User.cjs +45 -0
- package/dist/cjs/components/presentation/User/User.cjs.map +1 -0
- package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.cjs +191 -0
- package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.cjs.map +1 -0
- package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.styles.cjs +201 -0
- package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.styles.cjs.map +1 -0
- package/dist/cjs/components/presentation/UserDropdown/UserDropdown.cjs +111 -0
- package/dist/cjs/components/presentation/UserDropdown/UserDropdown.cjs.map +1 -0
- package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.cjs +460 -0
- package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.cjs.map +1 -0
- package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.styles.cjs +217 -0
- package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.styles.cjs.map +1 -0
- package/dist/cjs/components/presentation/UserProfile/UserProfile.cjs +81 -0
- package/dist/cjs/components/presentation/UserProfile/UserProfile.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/AcceptInvite/v2/AcceptInvite.cjs +109 -0
- package/dist/cjs/components/presentation/auth/AcceptInvite/v2/AcceptInvite.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.cjs +504 -0
- package/dist/cjs/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.cjs +52 -0
- package/dist/cjs/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs +454 -0
- package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/InviteUser/v2/BaseInviteUser.cjs +419 -0
- package/dist/cjs/components/presentation/auth/InviteUser/v2/BaseInviteUser.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.cjs +52 -0
- package/dist/cjs/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/InviteUser/v2/InviteUser.cjs +118 -0
- package/dist/cjs/components/presentation/auth/InviteUser/v2/InviteUser.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.cjs +183 -0
- package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.cjs +128 -0
- package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/Recovery/BaseRecovery.cjs +20 -0
- package/dist/cjs/components/presentation/auth/Recovery/BaseRecovery.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/Recovery/Recovery.cjs +49 -0
- package/dist/cjs/components/presentation/auth/Recovery/Recovery.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/Recovery/v1/BaseRecovery.cjs +293 -0
- package/dist/cjs/components/presentation/auth/Recovery/v1/BaseRecovery.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/Recovery/v1/Recovery.cjs +43 -0
- package/dist/cjs/components/presentation/auth/Recovery/v1/Recovery.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.cjs +163 -0
- package/dist/cjs/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/Recovery/v2/BaseRecovery.cjs +378 -0
- package/dist/cjs/components/presentation/auth/Recovery/v2/BaseRecovery.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/Recovery/v2/Recovery.cjs +78 -0
- package/dist/cjs/components/presentation/auth/Recovery/v2/Recovery.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.cjs +20 -0
- package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.styles.cjs +154 -0
- package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.styles.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignIn/SignIn.cjs +86 -0
- package/dist/cjs/components/presentation/auth/SignIn/SignIn.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/BaseSignIn.cjs +734 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/BaseSignIn.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/EmailOtp.cjs +68 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/EmailOtp.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/IdentifierFirst.cjs +59 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/IdentifierFirst.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/MultiOptionButton.cjs +139 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/MultiOptionButton.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.cjs +147 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/SmsOtp.cjs +68 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/SmsOtp.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/SocialButton.cjs +38 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/SocialButton.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/Totp.cjs +68 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/Totp.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/UsernamePassword.cjs +60 -0
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/UsernamePassword.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignIn/v2/BaseSignIn.cjs +330 -0
- package/dist/cjs/components/presentation/auth/SignIn/v2/BaseSignIn.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignIn/v2/SignIn.cjs +560 -0
- package/dist/cjs/components/presentation/auth/SignIn/v2/SignIn.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs +20 -0
- package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.styles.cjs +150 -0
- package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.styles.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignUp/SignUp.cjs +90 -0
- package/dist/cjs/components/presentation/auth/SignUp/SignUp.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignUp/v1/BaseSignUp.cjs +451 -0
- package/dist/cjs/components/presentation/auth/SignUp/v1/BaseSignUp.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignUp/v1/SignUp.cjs +54 -0
- package/dist/cjs/components/presentation/auth/SignUp/v1/SignUp.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignUp/v1/SignUpOptionFactory.cjs +164 -0
- package/dist/cjs/components/presentation/auth/SignUp/v1/SignUpOptionFactory.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignUp/v2/BaseSignUp.cjs +656 -0
- package/dist/cjs/components/presentation/auth/SignUp/v2/BaseSignUp.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/SignUp/v2/SignUp.cjs +80 -0
- package/dist/cjs/components/presentation/auth/SignUp/v2/SignUp.cjs.map +1 -0
- package/dist/cjs/components/primitives/Alert/Alert.cjs +107 -0
- package/dist/cjs/components/primitives/Alert/Alert.cjs.map +1 -0
- package/dist/cjs/components/primitives/Alert/Alert.styles.cjs +89 -0
- package/dist/cjs/components/primitives/Alert/Alert.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/Avatar/Avatar.cjs +65 -0
- package/dist/cjs/components/primitives/Avatar/Avatar.cjs.map +1 -0
- package/dist/cjs/components/primitives/Avatar/Avatar.styles.cjs +87 -0
- package/dist/cjs/components/primitives/Avatar/Avatar.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/Button/Button.cjs +97 -0
- package/dist/cjs/components/primitives/Button/Button.cjs.map +1 -0
- package/dist/cjs/components/primitives/Button/Button.styles.cjs +347 -0
- package/dist/cjs/components/primitives/Button/Button.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/Card/Card.cjs +178 -0
- package/dist/cjs/components/primitives/Card/Card.cjs.map +1 -0
- package/dist/cjs/components/primitives/Card/Card.styles.cjs +100 -0
- package/dist/cjs/components/primitives/Card/Card.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/Checkbox/Checkbox.cjs +46 -0
- package/dist/cjs/components/primitives/Checkbox/Checkbox.cjs.map +1 -0
- package/dist/cjs/components/primitives/Checkbox/Checkbox.styles.cjs +79 -0
- package/dist/cjs/components/primitives/Checkbox/Checkbox.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/CopyableText/CopyableText.cjs +63 -0
- package/dist/cjs/components/primitives/CopyableText/CopyableText.cjs.map +1 -0
- package/dist/cjs/components/primitives/CopyableText/CopyableText.styles.cjs +48 -0
- package/dist/cjs/components/primitives/CopyableText/CopyableText.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/DatePicker/DatePicker.cjs +47 -0
- package/dist/cjs/components/primitives/DatePicker/DatePicker.cjs.map +1 -0
- package/dist/cjs/components/primitives/DatePicker/DatePicker.styles.cjs +87 -0
- package/dist/cjs/components/primitives/DatePicker/DatePicker.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/Dialog/Dialog.cjs +200 -0
- package/dist/cjs/components/primitives/Dialog/Dialog.cjs.map +1 -0
- package/dist/cjs/components/primitives/Dialog/Dialog.styles.cjs +75 -0
- package/dist/cjs/components/primitives/Dialog/Dialog.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/Divider/Divider.cjs +71 -0
- package/dist/cjs/components/primitives/Divider/Divider.cjs.map +1 -0
- package/dist/cjs/components/primitives/Divider/Divider.styles.cjs +72 -0
- package/dist/cjs/components/primitives/Divider/Divider.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/FormControl/FormControl.cjs +33 -0
- package/dist/cjs/components/primitives/FormControl/FormControl.cjs.map +1 -0
- package/dist/cjs/components/primitives/FormControl/FormControl.styles.cjs +43 -0
- package/dist/cjs/components/primitives/FormControl/FormControl.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/ArrowLeftRight.cjs +31 -0
- package/dist/cjs/components/primitives/Icons/ArrowLeftRight.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/ArrowRightLeft.cjs +31 -0
- package/dist/cjs/components/primitives/Icons/ArrowRightLeft.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/Building.cjs +75 -0
- package/dist/cjs/components/primitives/Icons/Building.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/BuildingAlt.cjs +37 -0
- package/dist/cjs/components/primitives/Icons/BuildingAlt.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/Check.cjs +31 -0
- package/dist/cjs/components/primitives/Icons/Check.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/ChevronDown.cjs +31 -0
- package/dist/cjs/components/primitives/Icons/ChevronDown.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/CircleAlert.cjs +44 -0
- package/dist/cjs/components/primitives/Icons/CircleAlert.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/CircleCheck.cjs +30 -0
- package/dist/cjs/components/primitives/Icons/CircleCheck.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/Eye.cjs +30 -0
- package/dist/cjs/components/primitives/Icons/Eye.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/EyeOff.cjs +31 -0
- package/dist/cjs/components/primitives/Icons/EyeOff.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/Info.cjs +34 -0
- package/dist/cjs/components/primitives/Icons/Info.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/LogOut.cjs +30 -0
- package/dist/cjs/components/primitives/Icons/LogOut.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/Plus.cjs +26 -0
- package/dist/cjs/components/primitives/Icons/Plus.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/TriangleAlert.cjs +30 -0
- package/dist/cjs/components/primitives/Icons/TriangleAlert.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/User.cjs +30 -0
- package/dist/cjs/components/primitives/Icons/User.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/X.cjs +26 -0
- package/dist/cjs/components/primitives/Icons/X.cjs.map +1 -0
- package/dist/cjs/components/primitives/Icons/flowIconRegistry.cjs +17 -0
- package/dist/cjs/components/primitives/Icons/flowIconRegistry.cjs.map +1 -0
- package/dist/cjs/components/primitives/InputLabel/InputLabel.cjs +32 -0
- package/dist/cjs/components/primitives/InputLabel/InputLabel.cjs.map +1 -0
- package/dist/cjs/components/primitives/InputLabel/InputLabel.styles.cjs +58 -0
- package/dist/cjs/components/primitives/InputLabel/InputLabel.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/KeyValueInput/KeyValueInput.cjs +215 -0
- package/dist/cjs/components/primitives/KeyValueInput/KeyValueInput.cjs.map +1 -0
- package/dist/cjs/components/primitives/KeyValueInput/KeyValueInput.styles.cjs +175 -0
- package/dist/cjs/components/primitives/KeyValueInput/KeyValueInput.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/Logo/Logo.cjs +37 -0
- package/dist/cjs/components/primitives/Logo/Logo.cjs.map +1 -0
- package/dist/cjs/components/primitives/Logo/Logo.styles.cjs +53 -0
- package/dist/cjs/components/primitives/Logo/Logo.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/MultiInput/MultiInput.cjs +142 -0
- package/dist/cjs/components/primitives/MultiInput/MultiInput.cjs.map +1 -0
- package/dist/cjs/components/primitives/MultiInput/MultiInput.styles.cjs +115 -0
- package/dist/cjs/components/primitives/MultiInput/MultiInput.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/OtpField/OtpField.cjs +129 -0
- package/dist/cjs/components/primitives/OtpField/OtpField.cjs.map +1 -0
- package/dist/cjs/components/primitives/OtpField/OtpField.styles.cjs +85 -0
- package/dist/cjs/components/primitives/OtpField/OtpField.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/PasswordField/PasswordField.cjs +49 -0
- package/dist/cjs/components/primitives/PasswordField/PasswordField.cjs.map +1 -0
- package/dist/cjs/components/primitives/PasswordField/PasswordField.styles.cjs +49 -0
- package/dist/cjs/components/primitives/PasswordField/PasswordField.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/Select/Select.cjs +50 -0
- package/dist/cjs/components/primitives/Select/Select.cjs.map +1 -0
- package/dist/cjs/components/primitives/Select/Select.styles.cjs +98 -0
- package/dist/cjs/components/primitives/Select/Select.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/Spinner/Spinner.cjs +41 -0
- package/dist/cjs/components/primitives/Spinner/Spinner.cjs.map +1 -0
- package/dist/cjs/components/primitives/Spinner/Spinner.styles.cjs +67 -0
- package/dist/cjs/components/primitives/Spinner/Spinner.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/TextField/TextField.cjs +66 -0
- package/dist/cjs/components/primitives/TextField/TextField.cjs.map +1 -0
- package/dist/cjs/components/primitives/TextField/TextField.styles.cjs +132 -0
- package/dist/cjs/components/primitives/TextField/TextField.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/Toggle/Toggle.cjs +64 -0
- package/dist/cjs/components/primitives/Toggle/Toggle.cjs.map +1 -0
- package/dist/cjs/components/primitives/Toggle/Toggle.styles.cjs +101 -0
- package/dist/cjs/components/primitives/Toggle/Toggle.styles.cjs.map +1 -0
- package/dist/cjs/components/primitives/Typography/Typography.cjs +64 -0
- package/dist/cjs/components/primitives/Typography/Typography.cjs.map +1 -0
- package/dist/cjs/components/primitives/Typography/Typography.styles.cjs +276 -0
- package/dist/cjs/components/primitives/Typography/Typography.styles.cjs.map +1 -0
- package/dist/cjs/contexts/Branding/BrandingContext.cjs +12 -0
- package/dist/cjs/contexts/Branding/BrandingContext.cjs.map +1 -0
- package/dist/cjs/contexts/Branding/BrandingProvider.cjs +96 -0
- package/dist/cjs/contexts/Branding/BrandingProvider.cjs.map +1 -0
- package/dist/cjs/contexts/Branding/useBrandingContext.cjs +40 -0
- package/dist/cjs/contexts/Branding/useBrandingContext.cjs.map +1 -0
- package/dist/cjs/contexts/ComponentRenderer/ComponentRendererContext.cjs +11 -0
- package/dist/cjs/contexts/ComponentRenderer/ComponentRendererContext.cjs.map +1 -0
- package/dist/cjs/contexts/ComponentRenderer/ComponentRendererProvider.cjs +15 -0
- package/dist/cjs/contexts/ComponentRenderer/ComponentRendererProvider.cjs.map +1 -0
- package/dist/cjs/contexts/Flow/FlowContext.cjs +17 -0
- package/dist/cjs/contexts/Flow/FlowContext.cjs.map +1 -0
- package/dist/cjs/contexts/Flow/FlowProvider.cjs +135 -0
- package/dist/cjs/contexts/Flow/FlowProvider.cjs.map +1 -0
- package/dist/cjs/contexts/Flow/useFlow.cjs +44 -0
- package/dist/cjs/contexts/Flow/useFlow.cjs.map +1 -0
- package/dist/cjs/contexts/FlowMeta/FlowMetaContext.cjs +12 -0
- package/dist/cjs/contexts/FlowMeta/FlowMetaContext.cjs.map +1 -0
- package/dist/cjs/contexts/FlowMeta/FlowMetaProvider.cjs +154 -0
- package/dist/cjs/contexts/FlowMeta/FlowMetaProvider.cjs.map +1 -0
- package/dist/cjs/contexts/FlowMeta/useFlowMeta.cjs +16 -0
- package/dist/cjs/contexts/FlowMeta/useFlowMeta.cjs.map +1 -0
- package/dist/cjs/contexts/I18n/ComponentPreferencesContext.cjs +16 -0
- package/dist/cjs/contexts/I18n/ComponentPreferencesContext.cjs.map +1 -0
- package/dist/cjs/contexts/I18n/I18nContext.cjs +12 -0
- package/dist/cjs/contexts/I18n/I18nContext.cjs.map +1 -0
- package/dist/cjs/contexts/I18n/I18nProvider.cjs +217 -0
- package/dist/cjs/contexts/I18n/I18nProvider.cjs.map +1 -0
- package/dist/cjs/contexts/I18n/useI18n.cjs +23 -0
- package/dist/cjs/contexts/I18n/useI18n.cjs.map +1 -0
- package/dist/cjs/contexts/Organization/OrganizationContext.cjs +27 -0
- package/dist/cjs/contexts/Organization/OrganizationContext.cjs.map +1 -0
- package/dist/cjs/contexts/Organization/OrganizationProvider.cjs +97 -0
- package/dist/cjs/contexts/Organization/OrganizationProvider.cjs.map +1 -0
- package/dist/cjs/contexts/Organization/useOrganization.cjs +100 -0
- package/dist/cjs/contexts/Organization/useOrganization.cjs.map +1 -0
- package/dist/cjs/contexts/Theme/ThemeContext.cjs +12 -0
- package/dist/cjs/contexts/Theme/ThemeContext.cjs.map +1 -0
- package/dist/cjs/contexts/Theme/ThemeProvider.cjs +69 -0
- package/dist/cjs/contexts/Theme/ThemeProvider.cjs.map +1 -0
- package/dist/cjs/contexts/Theme/useTheme.cjs +16 -0
- package/dist/cjs/contexts/Theme/useTheme.cjs.map +1 -0
- package/dist/cjs/contexts/Theme/v1/ThemeProvider.cjs +190 -0
- package/dist/cjs/contexts/Theme/v1/ThemeProvider.cjs.map +1 -0
- package/dist/cjs/contexts/Theme/v2/ThemeProvider.cjs +108 -0
- package/dist/cjs/contexts/Theme/v2/ThemeProvider.cjs.map +1 -0
- package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs +52 -0
- package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs.map +1 -0
- package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs +407 -0
- package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs.map +1 -0
- package/dist/cjs/contexts/ThunderID/useThunderID.cjs +32 -0
- package/dist/cjs/contexts/ThunderID/useThunderID.cjs.map +1 -0
- package/dist/cjs/contexts/User/UserContext.cjs +22 -0
- package/dist/cjs/contexts/User/UserContext.cjs.map +1 -0
- package/dist/cjs/contexts/User/UserProvider.cjs +60 -0
- package/dist/cjs/contexts/User/UserProvider.cjs.map +1 -0
- package/dist/cjs/contexts/User/useUser.cjs +90 -0
- package/dist/cjs/contexts/User/useUser.cjs.map +1 -0
- package/dist/cjs/hooks/useBranding.cjs +71 -0
- package/dist/cjs/hooks/useBranding.cjs.map +1 -0
- package/dist/cjs/hooks/useBrowserUrl.cjs +33 -0
- package/dist/cjs/hooks/useBrowserUrl.cjs.map +1 -0
- package/dist/cjs/hooks/useForm.cjs +217 -0
- package/dist/cjs/hooks/useForm.cjs.map +1 -0
- package/dist/cjs/hooks/useTranslation.cjs +79 -0
- package/dist/cjs/hooks/useTranslation.cjs.map +1 -0
- package/dist/cjs/hooks/v2/useOAuthCallback.cjs +86 -0
- package/dist/cjs/hooks/v2/useOAuthCallback.cjs.map +1 -0
- package/dist/cjs/index.cjs +375 -0
- package/dist/cjs/utils/applyThemeToDOM.cjs +16 -0
- package/dist/cjs/utils/applyThemeToDOM.cjs.map +1 -0
- package/dist/cjs/utils/getDisplayName.cjs +50 -0
- package/dist/cjs/utils/getDisplayName.cjs.map +1 -0
- package/dist/cjs/utils/getMappedUserProfileValue.cjs +61 -0
- package/dist/cjs/utils/getMappedUserProfileValue.cjs.map +1 -0
- package/dist/cjs/utils/normalizeThemeConfig.cjs +43 -0
- package/dist/cjs/utils/normalizeThemeConfig.cjs.map +1 -0
- package/dist/cjs/utils/oauth.cjs +28 -0
- package/dist/cjs/utils/oauth.cjs.map +1 -0
- package/dist/cjs/utils/v2/buildThemeConfigFromFlowMeta.cjs +48 -0
- package/dist/cjs/utils/v2/buildThemeConfigFromFlowMeta.cjs.map +1 -0
- package/dist/cjs/utils/v2/flowTransformer.cjs +153 -0
- package/dist/cjs/utils/v2/flowTransformer.cjs.map +1 -0
- package/dist/cjs/utils/v2/getAuthComponentHeadings.cjs +103 -0
- package/dist/cjs/utils/v2/getAuthComponentHeadings.cjs.map +1 -0
- package/dist/cjs/utils/v2/passkey.cjs +93 -0
- package/dist/cjs/utils/v2/passkey.cjs.map +1 -0
- package/dist/cjs/utils/v2/resolveTranslationsInArray.cjs +21 -0
- package/dist/cjs/utils/v2/resolveTranslationsInArray.cjs.map +1 -0
- package/dist/cjs/utils/v2/resolveTranslationsInObject.cjs +33 -0
- package/dist/cjs/utils/v2/resolveTranslationsInObject.cjs.map +1 -0
- package/dist/components/actions/SignInButton/BaseSignInButton.js +49 -0
- package/dist/components/actions/SignInButton/BaseSignInButton.js.map +1 -0
- package/dist/components/actions/SignInButton/SignInButton.d.ts +6 -0
- package/dist/components/actions/SignInButton/SignInButton.d.ts.map +1 -1
- package/dist/components/actions/SignInButton/SignInButton.js +84 -0
- package/dist/components/actions/SignInButton/SignInButton.js.map +1 -0
- package/dist/components/actions/SignOutButton/BaseSignOutButton.js +49 -0
- package/dist/components/actions/SignOutButton/BaseSignOutButton.js.map +1 -0
- package/dist/components/actions/SignOutButton/SignOutButton.js +80 -0
- package/dist/components/actions/SignOutButton/SignOutButton.js.map +1 -0
- package/dist/components/actions/SignUpButton/BaseSignUpButton.js +51 -0
- package/dist/components/actions/SignUpButton/BaseSignUpButton.js.map +1 -0
- package/dist/components/actions/SignUpButton/SignUpButton.js +82 -0
- package/dist/components/actions/SignUpButton/SignUpButton.js.map +1 -0
- package/dist/components/adapters/CheckboxInput.js +28 -0
- package/dist/components/adapters/CheckboxInput.js.map +1 -0
- package/dist/components/adapters/Consent.js +67 -0
- package/dist/components/adapters/Consent.js.map +1 -0
- package/dist/components/adapters/ConsentCheckboxList.d.ts.map +1 -1
- package/dist/components/adapters/ConsentCheckboxList.js +76 -0
- package/dist/components/adapters/ConsentCheckboxList.js.map +1 -0
- package/dist/components/adapters/ConsentCheckboxList.styles.js +43 -0
- package/dist/components/adapters/ConsentCheckboxList.styles.js.map +1 -0
- package/dist/components/adapters/DateInput.js +28 -0
- package/dist/components/adapters/DateInput.js.map +1 -0
- package/dist/components/adapters/DividerComponent.js +22 -0
- package/dist/components/adapters/DividerComponent.js.map +1 -0
- package/dist/components/adapters/EmailInput.js +28 -0
- package/dist/components/adapters/EmailInput.js.map +1 -0
- package/dist/components/adapters/FacebookButton.js +39 -0
- package/dist/components/adapters/FacebookButton.js.map +1 -0
- package/dist/components/adapters/FlowTimer.js +49 -0
- package/dist/components/adapters/FlowTimer.js.map +1 -0
- package/dist/components/adapters/FormContainer.js +34 -0
- package/dist/components/adapters/FormContainer.js.map +1 -0
- package/dist/components/adapters/GitHubButton.js +39 -0
- package/dist/components/adapters/GitHubButton.js.map +1 -0
- package/dist/components/adapters/GoogleButton.js +57 -0
- package/dist/components/adapters/GoogleButton.js.map +1 -0
- package/dist/components/adapters/ImageComponent.js +74 -0
- package/dist/components/adapters/ImageComponent.js.map +1 -0
- package/dist/components/adapters/LinkedInButton.js +36 -0
- package/dist/components/adapters/LinkedInButton.js.map +1 -0
- package/dist/components/adapters/MicrosoftButton.js +54 -0
- package/dist/components/adapters/MicrosoftButton.js.map +1 -0
- package/dist/components/adapters/NumberInput.js +28 -0
- package/dist/components/adapters/NumberInput.js.map +1 -0
- package/dist/components/adapters/PasswordInput.js +50 -0
- package/dist/components/adapters/PasswordInput.js.map +1 -0
- package/dist/components/adapters/SelectInput.js +34 -0
- package/dist/components/adapters/SelectInput.js.map +1 -0
- package/dist/components/adapters/SignInWithEthereumButton.js +36 -0
- package/dist/components/adapters/SignInWithEthereumButton.js.map +1 -0
- package/dist/components/adapters/SmsOtpButton.js +36 -0
- package/dist/components/adapters/SmsOtpButton.js.map +1 -0
- package/dist/components/adapters/SubmitButton.js +59 -0
- package/dist/components/adapters/SubmitButton.js.map +1 -0
- package/dist/components/adapters/TelephoneInput.js +30 -0
- package/dist/components/adapters/TelephoneInput.js.map +1 -0
- package/dist/components/adapters/TextInput.js +28 -0
- package/dist/components/adapters/TextInput.js.map +1 -0
- package/dist/components/adapters/Typography.js +58 -0
- package/dist/components/adapters/Typography.js.map +1 -0
- package/dist/components/auth/Callback/Callback.d.ts +6 -44
- package/dist/components/auth/Callback/Callback.d.ts.map +1 -1
- package/dist/components/auth/Callback/Callback.js +23 -0
- package/dist/components/auth/Callback/Callback.js.map +1 -0
- package/dist/components/auth/Callback/OAuthCallback.d.ts +52 -0
- package/dist/components/auth/Callback/OAuthCallback.d.ts.map +1 -0
- package/dist/components/auth/Callback/OAuthCallback.js +101 -0
- package/dist/components/auth/Callback/OAuthCallback.js.map +1 -0
- package/dist/components/auth/Callback/TokenCallback.d.ts +44 -0
- package/dist/components/auth/Callback/TokenCallback.d.ts.map +1 -0
- package/dist/components/auth/Callback/TokenCallback.js +131 -0
- package/dist/components/auth/Callback/TokenCallback.js.map +1 -0
- package/dist/components/control/Loading.js +33 -0
- package/dist/components/control/Loading.js.map +1 -0
- package/dist/components/control/OrganizationContext/OrganizationContext.js +32 -0
- package/dist/components/control/OrganizationContext/OrganizationContext.js.map +1 -0
- package/dist/components/control/OrganizationContext/OrganizationContextController.js +55 -0
- package/dist/components/control/OrganizationContext/OrganizationContextController.js.map +1 -0
- package/dist/components/control/SignedIn.js +33 -0
- package/dist/components/control/SignedIn.js.map +1 -0
- package/dist/components/control/SignedOut.js +33 -0
- package/dist/components/control/SignedOut.js.map +1 -0
- package/dist/components/factories/FieldFactory.js +137 -0
- package/dist/components/factories/FieldFactory.js.map +1 -0
- package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.js +178 -0
- package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.js.map +1 -0
- package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.styles.js +147 -0
- package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.styles.js.map +1 -0
- package/dist/components/presentation/CreateOrganization/CreateOrganization.d.ts +1 -1
- package/dist/components/presentation/CreateOrganization/CreateOrganization.d.ts.map +1 -1
- package/dist/components/presentation/CreateOrganization/CreateOrganization.js +87 -0
- package/dist/components/presentation/CreateOrganization/CreateOrganization.js.map +1 -0
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.js +113 -0
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.js.map +1 -0
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.js +115 -0
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.js.map +1 -0
- package/dist/components/presentation/LanguageSwitcher/LanguageSwitcher.js +72 -0
- package/dist/components/presentation/LanguageSwitcher/LanguageSwitcher.js.map +1 -0
- package/dist/components/presentation/Organization/BaseOrganization.js +39 -0
- package/dist/components/presentation/Organization/BaseOrganization.js.map +1 -0
- package/dist/components/presentation/Organization/Organization.js +47 -0
- package/dist/components/presentation/Organization/Organization.js.map +1 -0
- package/dist/components/presentation/OrganizationList/BaseOrganizationList.js +252 -0
- package/dist/components/presentation/OrganizationList/BaseOrganizationList.js.map +1 -0
- package/dist/components/presentation/OrganizationList/BaseOrganizationList.styles.js +233 -0
- package/dist/components/presentation/OrganizationList/BaseOrganizationList.styles.js.map +1 -0
- package/dist/components/presentation/OrganizationList/OrganizationList.js +82 -0
- package/dist/components/presentation/OrganizationList/OrganizationList.js.map +1 -0
- package/dist/components/presentation/OrganizationList/OrganizationList.styles.js +72 -0
- package/dist/components/presentation/OrganizationList/OrganizationList.styles.js.map +1 -0
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.d.ts +1 -1
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.d.ts.map +1 -1
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.js +323 -0
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.js.map +1 -0
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.js +163 -0
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.js.map +1 -0
- package/dist/components/presentation/OrganizationProfile/OrganizationProfile.js +122 -0
- package/dist/components/presentation/OrganizationProfile/OrganizationProfile.js.map +1 -0
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.d.ts +1 -1
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.d.ts.map +1 -1
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.js +282 -0
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.js.map +1 -0
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.js +234 -0
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.js.map +1 -0
- package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.d.ts +1 -1
- package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.d.ts.map +1 -1
- package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.js +124 -0
- package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.js.map +1 -0
- package/dist/components/presentation/User/BaseUser.js +39 -0
- package/dist/components/presentation/User/BaseUser.js.map +1 -0
- package/dist/components/presentation/User/User.js +43 -0
- package/dist/components/presentation/User/User.js.map +1 -0
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts +1 -1
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts.map +1 -1
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.js +184 -0
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.js.map +1 -0
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.js +198 -0
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.js.map +1 -0
- package/dist/components/presentation/UserDropdown/UserDropdown.js +108 -0
- package/dist/components/presentation/UserDropdown/UserDropdown.js.map +1 -0
- package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts.map +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.js +455 -0
- package/dist/components/presentation/UserProfile/BaseUserProfile.js.map +1 -0
- package/dist/components/presentation/UserProfile/BaseUserProfile.styles.js +213 -0
- package/dist/components/presentation/UserProfile/BaseUserProfile.styles.js.map +1 -0
- package/dist/components/presentation/UserProfile/UserProfile.js +77 -0
- package/dist/components/presentation/UserProfile/UserProfile.js.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/AcceptInvite.js +106 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/AcceptInvite.js.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.d.ts +7 -3
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.d.ts.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.js +500 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.js.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.js +49 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.js.map +1 -0
- package/dist/components/presentation/auth/AuthOptionFactory.d.ts.map +1 -1
- package/dist/components/presentation/auth/AuthOptionFactory.js +445 -0
- package/dist/components/presentation/auth/AuthOptionFactory.js.map +1 -0
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.d.ts +3 -3
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.d.ts.map +1 -1
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.js +414 -0
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.js.map +1 -0
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.js +49 -0
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.js.map +1 -0
- package/dist/components/presentation/auth/InviteUser/v2/InviteUser.js +114 -0
- package/dist/components/presentation/auth/InviteUser/v2/InviteUser.js.map +1 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.js +179 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.js.map +1 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.js +125 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.js.map +1 -0
- package/dist/components/presentation/auth/Recovery/BaseRecovery.js +17 -0
- package/dist/components/presentation/auth/Recovery/BaseRecovery.js.map +1 -0
- package/dist/components/presentation/auth/Recovery/Recovery.js +46 -0
- package/dist/components/presentation/auth/Recovery/Recovery.js.map +1 -0
- package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.js +288 -0
- package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.js.map +1 -0
- package/dist/components/presentation/auth/Recovery/v1/Recovery.js +40 -0
- package/dist/components/presentation/auth/Recovery/v1/Recovery.js.map +1 -0
- package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.js +160 -0
- package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.js.map +1 -0
- package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.d.ts +5 -5
- package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.d.ts.map +1 -1
- package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.js +373 -0
- package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.js.map +1 -0
- package/dist/components/presentation/auth/Recovery/v2/Recovery.d.ts.map +1 -1
- package/dist/components/presentation/auth/Recovery/v2/Recovery.js +74 -0
- package/dist/components/presentation/auth/Recovery/v2/Recovery.js.map +1 -0
- package/dist/components/presentation/auth/SignIn/BaseSignIn.js +17 -0
- package/dist/components/presentation/auth/SignIn/BaseSignIn.js.map +1 -0
- package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.js +151 -0
- package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.js.map +1 -0
- package/dist/components/presentation/auth/SignIn/SignIn.js +83 -0
- package/dist/components/presentation/auth/SignIn/SignIn.js.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.js +729 -0
- package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.js.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.js +64 -0
- package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.js.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.js +55 -0
- package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.js.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.js +136 -0
- package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.js.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.js +143 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.js.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.js +64 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.js.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.js +36 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.js.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/Totp.js +64 -0
- package/dist/components/presentation/auth/SignIn/v1/options/Totp.js.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.js +56 -0
- package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.js.map +1 -0
- package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts +1 -1
- package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.js +325 -0
- package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.js.map +1 -0
- package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts +1 -1
- package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignIn/v2/SignIn.js +556 -0
- package/dist/components/presentation/auth/SignIn/v2/SignIn.js.map +1 -0
- package/dist/components/presentation/auth/SignUp/BaseSignUp.js +17 -0
- package/dist/components/presentation/auth/SignUp/BaseSignUp.js.map +1 -0
- package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.js +147 -0
- package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.js.map +1 -0
- package/dist/components/presentation/auth/SignUp/SignUp.js +87 -0
- package/dist/components/presentation/auth/SignUp/SignUp.js.map +1 -0
- package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.js +446 -0
- package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.js.map +1 -0
- package/dist/components/presentation/auth/SignUp/v1/SignUp.js +51 -0
- package/dist/components/presentation/auth/SignUp/v1/SignUp.js.map +1 -0
- package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.js +160 -0
- package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.js.map +1 -0
- package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.d.ts +6 -6
- package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.js +651 -0
- package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.js.map +1 -0
- package/dist/components/presentation/auth/SignUp/v2/SignUp.d.ts +1 -1
- package/dist/components/presentation/auth/SignUp/v2/SignUp.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignUp/v2/SignUp.js +77 -0
- package/dist/components/presentation/auth/SignUp/v2/SignUp.js.map +1 -0
- package/dist/components/primitives/Alert/Alert.js +102 -0
- package/dist/components/primitives/Alert/Alert.js.map +1 -0
- package/dist/components/primitives/Alert/Alert.styles.js +86 -0
- package/dist/components/primitives/Alert/Alert.styles.js.map +1 -0
- package/dist/components/primitives/Avatar/Avatar.js +60 -0
- package/dist/components/primitives/Avatar/Avatar.js.map +1 -0
- package/dist/components/primitives/Avatar/Avatar.styles.js +84 -0
- package/dist/components/primitives/Avatar/Avatar.styles.js.map +1 -0
- package/dist/components/primitives/Button/Button.js +92 -0
- package/dist/components/primitives/Button/Button.js.map +1 -0
- package/dist/components/primitives/Button/Button.styles.js +344 -0
- package/dist/components/primitives/Button/Button.styles.js.map +1 -0
- package/dist/components/primitives/Card/Card.js +173 -0
- package/dist/components/primitives/Card/Card.js.map +1 -0
- package/dist/components/primitives/Card/Card.styles.js +97 -0
- package/dist/components/primitives/Card/Card.styles.js.map +1 -0
- package/dist/components/primitives/Checkbox/Checkbox.js +42 -0
- package/dist/components/primitives/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/primitives/Checkbox/Checkbox.styles.js +76 -0
- package/dist/components/primitives/Checkbox/Checkbox.styles.js.map +1 -0
- package/dist/components/primitives/CopyableText/CopyableText.js +60 -0
- package/dist/components/primitives/CopyableText/CopyableText.js.map +1 -0
- package/dist/components/primitives/CopyableText/CopyableText.styles.js +45 -0
- package/dist/components/primitives/CopyableText/CopyableText.styles.js.map +1 -0
- package/dist/components/primitives/DatePicker/DatePicker.js +43 -0
- package/dist/components/primitives/DatePicker/DatePicker.js.map +1 -0
- package/dist/components/primitives/DatePicker/DatePicker.styles.js +84 -0
- package/dist/components/primitives/DatePicker/DatePicker.styles.js.map +1 -0
- package/dist/components/primitives/Dialog/Dialog.js +194 -0
- package/dist/components/primitives/Dialog/Dialog.js.map +1 -0
- package/dist/components/primitives/Dialog/Dialog.styles.js +72 -0
- package/dist/components/primitives/Dialog/Dialog.styles.js.map +1 -0
- package/dist/components/primitives/Divider/Divider.js +67 -0
- package/dist/components/primitives/Divider/Divider.js.map +1 -0
- package/dist/components/primitives/Divider/Divider.styles.js +69 -0
- package/dist/components/primitives/Divider/Divider.styles.js.map +1 -0
- package/dist/components/primitives/FormControl/FormControl.js +29 -0
- package/dist/components/primitives/FormControl/FormControl.js.map +1 -0
- package/dist/components/primitives/FormControl/FormControl.styles.js +40 -0
- package/dist/components/primitives/FormControl/FormControl.styles.js.map +1 -0
- package/dist/components/primitives/Icons/ArrowLeftRight.js +29 -0
- package/dist/components/primitives/Icons/ArrowLeftRight.js.map +1 -0
- package/dist/components/primitives/Icons/ArrowRightLeft.js +29 -0
- package/dist/components/primitives/Icons/ArrowRightLeft.js.map +1 -0
- package/dist/components/primitives/Icons/Building.js +73 -0
- package/dist/components/primitives/Icons/Building.js.map +1 -0
- package/dist/components/primitives/Icons/BuildingAlt.js +35 -0
- package/dist/components/primitives/Icons/BuildingAlt.js.map +1 -0
- package/dist/components/primitives/Icons/Check.js +29 -0
- package/dist/components/primitives/Icons/Check.js.map +1 -0
- package/dist/components/primitives/Icons/ChevronDown.js +29 -0
- package/dist/components/primitives/Icons/ChevronDown.js.map +1 -0
- package/dist/components/primitives/Icons/CircleAlert.js +42 -0
- package/dist/components/primitives/Icons/CircleAlert.js.map +1 -0
- package/dist/components/primitives/Icons/CircleCheck.js +28 -0
- package/dist/components/primitives/Icons/CircleCheck.js.map +1 -0
- package/dist/components/primitives/Icons/Eye.js +28 -0
- package/dist/components/primitives/Icons/Eye.js.map +1 -0
- package/dist/components/primitives/Icons/EyeOff.js +29 -0
- package/dist/components/primitives/Icons/EyeOff.js.map +1 -0
- package/dist/components/primitives/Icons/Info.js +32 -0
- package/dist/components/primitives/Icons/Info.js.map +1 -0
- package/dist/components/primitives/Icons/LogOut.js +28 -0
- package/dist/components/primitives/Icons/LogOut.js.map +1 -0
- package/dist/components/primitives/Icons/Plus.js +24 -0
- package/dist/components/primitives/Icons/Plus.js.map +1 -0
- package/dist/components/primitives/Icons/TriangleAlert.js +28 -0
- package/dist/components/primitives/Icons/TriangleAlert.js.map +1 -0
- package/dist/components/primitives/Icons/User.js +28 -0
- package/dist/components/primitives/Icons/User.js.map +1 -0
- package/dist/components/primitives/Icons/X.js +24 -0
- package/dist/components/primitives/Icons/X.js.map +1 -0
- package/dist/components/primitives/Icons/flowIconRegistry.js +17 -0
- package/dist/components/primitives/Icons/flowIconRegistry.js.map +1 -0
- package/dist/components/primitives/InputLabel/InputLabel.js +28 -0
- package/dist/components/primitives/InputLabel/InputLabel.js.map +1 -0
- package/dist/components/primitives/InputLabel/InputLabel.styles.js +55 -0
- package/dist/components/primitives/InputLabel/InputLabel.styles.js.map +1 -0
- package/dist/components/primitives/KeyValueInput/KeyValueInput.js +210 -0
- package/dist/components/primitives/KeyValueInput/KeyValueInput.js.map +1 -0
- package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.js +172 -0
- package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.js.map +1 -0
- package/dist/components/primitives/Logo/Logo.js +33 -0
- package/dist/components/primitives/Logo/Logo.js.map +1 -0
- package/dist/components/primitives/Logo/Logo.styles.js +50 -0
- package/dist/components/primitives/Logo/Logo.styles.js.map +1 -0
- package/dist/components/primitives/MultiInput/MultiInput.js +137 -0
- package/dist/components/primitives/MultiInput/MultiInput.js.map +1 -0
- package/dist/components/primitives/MultiInput/MultiInput.styles.js +112 -0
- package/dist/components/primitives/MultiInput/MultiInput.styles.js.map +1 -0
- package/dist/components/primitives/OtpField/OtpField.js +124 -0
- package/dist/components/primitives/OtpField/OtpField.js.map +1 -0
- package/dist/components/primitives/OtpField/OtpField.styles.js +82 -0
- package/dist/components/primitives/OtpField/OtpField.styles.js.map +1 -0
- package/dist/components/primitives/PasswordField/PasswordField.js +44 -0
- package/dist/components/primitives/PasswordField/PasswordField.js.map +1 -0
- package/dist/components/primitives/PasswordField/PasswordField.styles.js +46 -0
- package/dist/components/primitives/PasswordField/PasswordField.styles.js.map +1 -0
- package/dist/components/primitives/Select/Select.js +46 -0
- package/dist/components/primitives/Select/Select.js.map +1 -0
- package/dist/components/primitives/Select/Select.styles.js +95 -0
- package/dist/components/primitives/Select/Select.styles.js.map +1 -0
- package/dist/components/primitives/Spinner/Spinner.js +37 -0
- package/dist/components/primitives/Spinner/Spinner.js.map +1 -0
- package/dist/components/primitives/Spinner/Spinner.styles.js +64 -0
- package/dist/components/primitives/Spinner/Spinner.styles.js.map +1 -0
- package/dist/components/primitives/TextField/TextField.d.ts.map +1 -1
- package/dist/components/primitives/TextField/TextField.js +62 -0
- package/dist/components/primitives/TextField/TextField.js.map +1 -0
- package/dist/components/primitives/TextField/TextField.styles.js +129 -0
- package/dist/components/primitives/TextField/TextField.styles.js.map +1 -0
- package/dist/components/primitives/Toggle/Toggle.js +60 -0
- package/dist/components/primitives/Toggle/Toggle.js.map +1 -0
- package/dist/components/primitives/Toggle/Toggle.styles.js +98 -0
- package/dist/components/primitives/Toggle/Toggle.styles.js.map +1 -0
- package/dist/components/primitives/Typography/Typography.js +60 -0
- package/dist/components/primitives/Typography/Typography.js.map +1 -0
- package/dist/components/primitives/Typography/Typography.styles.js +273 -0
- package/dist/components/primitives/Typography/Typography.styles.js.map +1 -0
- package/dist/contexts/Branding/BrandingContext.js +10 -0
- package/dist/contexts/Branding/BrandingContext.js.map +1 -0
- package/dist/contexts/Branding/BrandingProvider.js +92 -0
- package/dist/contexts/Branding/BrandingProvider.js.map +1 -0
- package/dist/contexts/Branding/useBrandingContext.js +38 -0
- package/dist/contexts/Branding/useBrandingContext.js.map +1 -0
- package/dist/contexts/ComponentRenderer/ComponentRendererContext.js +9 -0
- package/dist/contexts/ComponentRenderer/ComponentRendererContext.js.map +1 -0
- package/dist/contexts/ComponentRenderer/ComponentRendererProvider.js +13 -0
- package/dist/contexts/ComponentRenderer/ComponentRendererProvider.js.map +1 -0
- package/dist/contexts/Flow/FlowContext.js +15 -0
- package/dist/contexts/Flow/FlowContext.js.map +1 -0
- package/dist/contexts/Flow/FlowProvider.js +132 -0
- package/dist/contexts/Flow/FlowProvider.js.map +1 -0
- package/dist/contexts/Flow/useFlow.js +42 -0
- package/dist/contexts/Flow/useFlow.js.map +1 -0
- package/dist/contexts/FlowMeta/FlowMetaContext.js +10 -0
- package/dist/contexts/FlowMeta/FlowMetaContext.js.map +1 -0
- package/dist/contexts/FlowMeta/FlowMetaProvider.d.ts.map +1 -1
- package/dist/contexts/FlowMeta/FlowMetaProvider.js +150 -0
- package/dist/contexts/FlowMeta/FlowMetaProvider.js.map +1 -0
- package/dist/contexts/FlowMeta/useFlowMeta.js +14 -0
- package/dist/contexts/FlowMeta/useFlowMeta.js.map +1 -0
- package/dist/contexts/I18n/ComponentPreferencesContext.js +14 -0
- package/dist/contexts/I18n/ComponentPreferencesContext.js.map +1 -0
- package/dist/contexts/I18n/I18nContext.js +10 -0
- package/dist/contexts/I18n/I18nContext.js.map +1 -0
- package/dist/contexts/I18n/I18nProvider.js +213 -0
- package/dist/contexts/I18n/I18nProvider.js.map +1 -0
- package/dist/contexts/I18n/useI18n.js +21 -0
- package/dist/contexts/I18n/useI18n.js.map +1 -0
- package/dist/contexts/Organization/OrganizationContext.js +25 -0
- package/dist/contexts/Organization/OrganizationContext.js.map +1 -0
- package/dist/contexts/Organization/OrganizationProvider.d.ts.map +1 -1
- package/dist/contexts/Organization/OrganizationProvider.js +93 -0
- package/dist/contexts/Organization/OrganizationProvider.js.map +1 -0
- package/dist/contexts/Organization/useOrganization.js +98 -0
- package/dist/contexts/Organization/useOrganization.js.map +1 -0
- package/dist/contexts/Theme/ThemeContext.js +10 -0
- package/dist/contexts/Theme/ThemeContext.js.map +1 -0
- package/dist/contexts/Theme/ThemeProvider.js +66 -0
- package/dist/contexts/Theme/ThemeProvider.js.map +1 -0
- package/dist/contexts/Theme/useTheme.js +14 -0
- package/dist/contexts/Theme/useTheme.js.map +1 -0
- package/dist/contexts/Theme/v1/ThemeProvider.js +186 -0
- package/dist/contexts/Theme/v1/ThemeProvider.js.map +1 -0
- package/dist/contexts/Theme/v2/ThemeProvider.js +104 -0
- package/dist/contexts/Theme/v2/ThemeProvider.js.map +1 -0
- package/dist/contexts/ThunderID/ThunderIDContext.d.ts +12 -2
- package/dist/contexts/ThunderID/ThunderIDContext.d.ts.map +1 -1
- package/dist/contexts/ThunderID/ThunderIDContext.js +50 -0
- package/dist/contexts/ThunderID/ThunderIDContext.js.map +1 -0
- package/dist/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -1
- package/dist/contexts/ThunderID/ThunderIDProvider.js +403 -0
- package/dist/contexts/ThunderID/ThunderIDProvider.js.map +1 -0
- package/dist/contexts/ThunderID/useThunderID.js +29 -0
- package/dist/contexts/ThunderID/useThunderID.js.map +1 -0
- package/dist/contexts/User/UserContext.js +20 -0
- package/dist/contexts/User/UserContext.js.map +1 -0
- package/dist/contexts/User/UserProvider.js +57 -0
- package/dist/contexts/User/UserProvider.js.map +1 -0
- package/dist/contexts/User/useUser.js +88 -0
- package/dist/contexts/User/useUser.js.map +1 -0
- package/dist/hooks/useBranding.d.ts +1 -1
- package/dist/hooks/useBranding.js +69 -0
- package/dist/hooks/useBranding.js.map +1 -0
- package/dist/hooks/useBrowserUrl.js +31 -0
- package/dist/hooks/useBrowserUrl.js.map +1 -0
- package/dist/hooks/useForm.js +214 -0
- package/dist/hooks/useForm.js.map +1 -0
- package/dist/hooks/useTranslation.js +76 -0
- package/dist/hooks/useTranslation.js.map +1 -0
- package/dist/hooks/v2/useOAuthCallback.js +84 -0
- package/dist/hooks/v2/useOAuthCallback.js.map +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +123 -25694
- package/dist/utils/applyThemeToDOM.js +15 -0
- package/dist/utils/applyThemeToDOM.js.map +1 -0
- package/dist/utils/getDisplayName.d.ts.map +1 -1
- package/dist/utils/getDisplayName.js +50 -0
- package/dist/utils/getDisplayName.js.map +1 -0
- package/dist/utils/getMappedUserProfileValue.js +59 -0
- package/dist/utils/getMappedUserProfileValue.js.map +1 -0
- package/dist/utils/normalizeThemeConfig.js +42 -0
- package/dist/utils/normalizeThemeConfig.js.map +1 -0
- package/dist/utils/oauth.js +26 -0
- package/dist/utils/oauth.js.map +1 -0
- package/dist/utils/v2/buildThemeConfigFromFlowMeta.js +47 -0
- package/dist/utils/v2/buildThemeConfigFromFlowMeta.js.map +1 -0
- package/dist/utils/v2/flowTransformer.d.ts +17 -8
- package/dist/utils/v2/flowTransformer.d.ts.map +1 -1
- package/dist/utils/v2/flowTransformer.js +152 -0
- package/dist/utils/v2/flowTransformer.js.map +1 -0
- package/dist/utils/v2/getAuthComponentHeadings.d.ts.map +1 -1
- package/dist/utils/v2/getAuthComponentHeadings.js +102 -0
- package/dist/utils/v2/getAuthComponentHeadings.js.map +1 -0
- package/dist/utils/v2/passkey.js +90 -0
- package/dist/utils/v2/passkey.js.map +1 -0
- package/dist/utils/v2/resolveTranslationsInArray.js +21 -0
- package/dist/utils/v2/resolveTranslationsInArray.js.map +1 -0
- package/dist/utils/v2/resolveTranslationsInObject.js +31 -0
- package/dist/utils/v2/resolveTranslationsInObject.js.map +1 -0
- package/package.json +16 -10
- package/dist/cjs/index.js +0 -25967
- package/dist/cjs/index.js.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/primitives/Icons/X.tsx
|
|
4
|
+
/**
|
|
5
|
+
* X (close) icon component.
|
|
6
|
+
*/
|
|
7
|
+
const X = (props) => /* @__PURE__ */ jsxs("svg", {
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
width: "24",
|
|
10
|
+
height: "24",
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
fill: "none",
|
|
13
|
+
stroke: "currentColor",
|
|
14
|
+
strokeWidth: "2",
|
|
15
|
+
strokeLinecap: "round",
|
|
16
|
+
strokeLinejoin: "round",
|
|
17
|
+
...props,
|
|
18
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }), /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })]
|
|
19
|
+
});
|
|
20
|
+
var X_default = X;
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { X_default as default };
|
|
24
|
+
//# sourceMappingURL=X.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"X.js","names":["X: FC<SVGProps<SVGSVGElement>>"],"sources":["../../../../src/components/primitives/Icons/X.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FC, SVGProps} from 'react';\n\n/**\n * X (close) icon component.\n */\nconst X: FC<SVGProps<SVGSVGElement>> = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n {...props}\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n);\n\nexport default X;\n"],"mappings":";;;;;;AAuBA,MAAMA,KAAkC,UACtC,qBAAC;CACC,OAAM;CACN,OAAM;CACN,QAAO;CACP,SAAQ;CACR,MAAK;CACL,QAAO;CACP,aAAY;CACZ,eAAc;CACd,gBAAe;CACf,GAAI;YAEJ,oBAAC,UAAK,GAAE,eAAe,EACvB,oBAAC,UAAK,GAAE,eAAe;EACnB;AAGR,gBAAe"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import ArrowLeftRight_default from "./ArrowLeftRight.js";
|
|
2
|
+
import ArrowRightLeft_default from "./ArrowRightLeft.js";
|
|
3
|
+
|
|
4
|
+
//#region src/components/primitives/Icons/flowIconRegistry.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Registry of icon components keyed by their lucide-compatible name.
|
|
7
|
+
* Add new icons here as needed by flow definitions.
|
|
8
|
+
*/
|
|
9
|
+
const flowIconRegistry = {
|
|
10
|
+
ArrowLeftRight: ArrowLeftRight_default,
|
|
11
|
+
ArrowRightLeft: ArrowRightLeft_default
|
|
12
|
+
};
|
|
13
|
+
var flowIconRegistry_default = flowIconRegistry;
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { flowIconRegistry_default as default };
|
|
17
|
+
//# sourceMappingURL=flowIconRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flowIconRegistry.js","names":["flowIconRegistry: Record<string, FC<FlowIconProps>>"],"sources":["../../../../src/components/primitives/Icons/flowIconRegistry.tsx"],"sourcesContent":["/**\n * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FC} from 'react';\nimport ArrowLeftRight from './ArrowLeftRight';\nimport ArrowRightLeft from './ArrowRightLeft';\n\nexport interface FlowIconProps {\n color?: string;\n size?: number;\n}\n\n/**\n * Registry of icon components keyed by their lucide-compatible name.\n * Add new icons here as needed by flow definitions.\n */\nconst flowIconRegistry: Record<string, FC<FlowIconProps>> = {\n ArrowLeftRight,\n ArrowRightLeft,\n};\n\nexport default flowIconRegistry;\n"],"mappings":";;;;;;;;AA+BA,MAAMA,mBAAsD;CAC1D;CACA;CACD;AAED,+BAAe"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import useTheme_default from "../../../contexts/Theme/useTheme.js";
|
|
2
|
+
import InputLabel_styles_default from "./InputLabel.styles.js";
|
|
3
|
+
import { bem, withVendorCSSClassPrefix } from "@thunderid/browser";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { cx } from "@emotion/css";
|
|
6
|
+
|
|
7
|
+
//#region src/components/primitives/InputLabel/InputLabel.tsx
|
|
8
|
+
const InputLabel = ({ children, required = false, error = false, variant = "block", marginBottom, className, style = {},...rest }) => {
|
|
9
|
+
const { theme, colorScheme } = useTheme_default();
|
|
10
|
+
const styles = InputLabel_styles_default(theme, colorScheme, variant, error, marginBottom);
|
|
11
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
12
|
+
className: cx(withVendorCSSClassPrefix(bem("input-label")), withVendorCSSClassPrefix(bem("input-label", variant)), styles["label"], variant === "block" ? styles["block"] : styles["inline"], {
|
|
13
|
+
[withVendorCSSClassPrefix(bem("input-label", "error"))]: error,
|
|
14
|
+
[styles["error"]]: error
|
|
15
|
+
}, className),
|
|
16
|
+
style,
|
|
17
|
+
...rest,
|
|
18
|
+
children: [children, required && /* @__PURE__ */ jsx("span", {
|
|
19
|
+
className: cx(withVendorCSSClassPrefix(bem("input-label", "required")), styles["requiredIndicator"]),
|
|
20
|
+
children: " *"
|
|
21
|
+
})]
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
var InputLabel_default = InputLabel;
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { InputLabel_default as default };
|
|
28
|
+
//# sourceMappingURL=InputLabel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputLabel.js","names":["InputLabel: FC<InputLabelProps>","useTheme","styles: Record<string, string>","useStyles"],"sources":["../../../../src/components/primitives/InputLabel/InputLabel.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {cx} from '@emotion/css';\nimport {bem, withVendorCSSClassPrefix} from '@thunderid/browser';\nimport {CSSProperties, FC, LabelHTMLAttributes, ReactNode} from 'react';\nimport useStyles from './InputLabel.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\n\nexport type InputLabelVariant = 'block' | 'inline';\n\nexport interface InputLabelProps extends Omit<LabelHTMLAttributes<HTMLLabelElement>, 'style'> {\n /**\n * Label text or content\n */\n children: ReactNode;\n /**\n * Additional CSS class names\n */\n className?: string;\n /**\n * Whether there's an error state\n */\n error?: boolean;\n /**\n * Custom margin bottom (useful for different form layouts)\n */\n marginBottom?: string;\n /**\n * Whether the field is required\n */\n required?: boolean;\n /**\n * Custom style overrides\n */\n style?: CSSProperties;\n /**\n * Display type for label positioning\n */\n variant?: InputLabelVariant;\n}\n\nconst InputLabel: FC<InputLabelProps> = ({\n children,\n required = false,\n error = false,\n variant = 'block',\n marginBottom,\n className,\n style = {},\n ...rest\n}: InputLabelProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, variant, error, marginBottom);\n\n return (\n <label\n className={cx(\n withVendorCSSClassPrefix(bem('input-label')),\n withVendorCSSClassPrefix(bem('input-label', variant)),\n styles['label'],\n variant === 'block' ? styles['block'] : styles['inline'],\n {\n [withVendorCSSClassPrefix(bem('input-label', 'error'))]: error,\n [styles['error']]: error,\n },\n className,\n )}\n style={style}\n {...rest}\n >\n {children}\n {required && (\n <span className={cx(withVendorCSSClassPrefix(bem('input-label', 'required')), styles['requiredIndicator'])}>\n {' *'}\n </span>\n )}\n </label>\n );\n};\n\nexport default InputLabel;\n"],"mappings":";;;;;;;AAyDA,MAAMA,cAAmC,EACvC,UACA,WAAW,OACX,QAAQ,OACR,UAAU,SACV,cACA,WACA,QAAQ,EAAE,CACV,GAAG,WACkB;CACrB,MAAM,EAAC,OAAO,gBAA4CC,kBAAU;CACpE,MAAMC,SAAiCC,0BAAU,OAAO,aAAa,SAAS,OAAO,aAAa;AAElG,QACE,qBAAC;EACC,WAAW,GACT,yBAAyB,IAAI,cAAc,CAAC,EAC5C,yBAAyB,IAAI,eAAe,QAAQ,CAAC,EACrD,OAAO,UACP,YAAY,UAAU,OAAO,WAAW,OAAO,WAC/C;IACG,yBAAyB,IAAI,eAAe,QAAQ,CAAC,GAAG;IACxD,OAAO,WAAW;GACpB,EACD,UACD;EACM;EACP,GAAI;aAEH,UACA,YACC,oBAAC;GAAK,WAAW,GAAG,yBAAyB,IAAI,eAAe,WAAW,CAAC,EAAE,OAAO,qBAAqB;aACvG;IACI;GAEH;;AAIZ,yBAAe"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { css } from "@emotion/css";
|
|
3
|
+
|
|
4
|
+
//#region src/components/primitives/InputLabel/InputLabel.styles.ts
|
|
5
|
+
/**
|
|
6
|
+
* Creates styles for the InputLabel component using BEM methodology
|
|
7
|
+
* @param theme - The theme object containing design tokens
|
|
8
|
+
* @param colorScheme - The current color scheme (used for memoization)
|
|
9
|
+
* @param variant - The display variant of the label
|
|
10
|
+
* @param error - Whether the label has an error state
|
|
11
|
+
* @param marginBottom - Custom margin bottom value
|
|
12
|
+
* @returns Object containing CSS class names for component styling
|
|
13
|
+
*/
|
|
14
|
+
const useStyles = (theme, colorScheme, variant, error, marginBottom) => useMemo(() => {
|
|
15
|
+
const baseLabel = css`
|
|
16
|
+
display: ${variant};
|
|
17
|
+
margin-bottom: ${marginBottom || (variant === "block" ? `calc(${theme.vars.spacing.unit} + 1px)` : "0")};
|
|
18
|
+
color: ${error ? theme.vars.colors.error.main : theme.vars.colors.text.secondary};
|
|
19
|
+
font-size: ${theme.vars.typography.fontSizes.sm};
|
|
20
|
+
font-family: ${theme.vars.typography.fontFamily};
|
|
21
|
+
font-weight: ${variant === "block" ? 500 : "normal"};
|
|
22
|
+
`;
|
|
23
|
+
const errorLabel = css`
|
|
24
|
+
color: ${theme.vars.colors.error.main};
|
|
25
|
+
`;
|
|
26
|
+
const requiredIndicator = css`
|
|
27
|
+
color: ${theme.vars.colors.error.main};
|
|
28
|
+
`;
|
|
29
|
+
return {
|
|
30
|
+
block: css`
|
|
31
|
+
display: block;
|
|
32
|
+
font-weight: 500;
|
|
33
|
+
margin-bottom: ${marginBottom || `calc(${theme.vars.spacing.unit} + 1px)`};
|
|
34
|
+
`,
|
|
35
|
+
error: errorLabel,
|
|
36
|
+
inline: css`
|
|
37
|
+
display: inline;
|
|
38
|
+
font-weight: normal;
|
|
39
|
+
margin-bottom: 0;
|
|
40
|
+
`,
|
|
41
|
+
label: baseLabel,
|
|
42
|
+
requiredIndicator
|
|
43
|
+
};
|
|
44
|
+
}, [
|
|
45
|
+
theme,
|
|
46
|
+
colorScheme,
|
|
47
|
+
variant,
|
|
48
|
+
error,
|
|
49
|
+
marginBottom
|
|
50
|
+
]);
|
|
51
|
+
var InputLabel_styles_default = useStyles;
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { InputLabel_styles_default as default };
|
|
55
|
+
//# sourceMappingURL=InputLabel.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputLabel.styles.js","names":["baseLabel: string","errorLabel: string","requiredIndicator: string"],"sources":["../../../../src/components/primitives/InputLabel/InputLabel.styles.ts"],"sourcesContent":["/**\n * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {css} from '@emotion/css';\nimport {Theme} from '@thunderid/browser';\nimport {useMemo} from 'react';\n\nexport type InputLabelVariant = 'block' | 'inline';\n\n/**\n * Creates styles for the InputLabel component using BEM methodology\n * @param theme - The theme object containing design tokens\n * @param colorScheme - The current color scheme (used for memoization)\n * @param variant - The display variant of the label\n * @param error - Whether the label has an error state\n * @param marginBottom - Custom margin bottom value\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (\n theme: Theme,\n colorScheme: string,\n variant: InputLabelVariant,\n error: boolean,\n marginBottom?: string,\n): Record<string, string> =>\n useMemo(() => {\n const baseLabel: string = css`\n display: ${variant};\n margin-bottom: ${marginBottom || (variant === 'block' ? `calc(${theme.vars.spacing.unit} + 1px)` : '0')};\n color: ${error ? theme.vars.colors.error.main : theme.vars.colors.text.secondary};\n font-size: ${theme.vars.typography.fontSizes.sm};\n font-family: ${theme.vars.typography.fontFamily};\n font-weight: ${variant === 'block' ? 500 : 'normal'};\n `;\n\n const errorLabel: string = css`\n color: ${theme.vars.colors.error.main};\n `;\n\n const requiredIndicator: string = css`\n color: ${theme.vars.colors.error.main};\n `;\n\n const blockVariant: string = css`\n display: block;\n font-weight: 500;\n margin-bottom: ${marginBottom || `calc(${theme.vars.spacing.unit} + 1px)`};\n `;\n\n const inlineVariant: string = css`\n display: inline;\n font-weight: normal;\n margin-bottom: 0;\n `;\n\n return {\n block: blockVariant,\n error: errorLabel,\n inline: inlineVariant,\n label: baseLabel,\n requiredIndicator,\n };\n }, [theme, colorScheme, variant, error, marginBottom]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;;AAiCA,MAAM,aACJ,OACA,aACA,SACA,OACA,iBAEA,cAAc;CACZ,MAAMA,YAAoB,GAAG;iBAChB,QAAQ;uBACF,iBAAiB,YAAY,UAAU,QAAQ,MAAM,KAAK,QAAQ,KAAK,WAAW,KAAK;eAC/F,QAAQ,MAAM,KAAK,OAAO,MAAM,OAAO,MAAM,KAAK,OAAO,KAAK,UAAU;mBACpE,MAAM,KAAK,WAAW,UAAU,GAAG;qBACjC,MAAM,KAAK,WAAW,WAAW;qBACjC,YAAY,UAAU,MAAM,SAAS;;CAGtD,MAAMC,aAAqB,GAAG;eACnB,MAAM,KAAK,OAAO,MAAM,KAAK;;CAGxC,MAAMC,oBAA4B,GAAG;eAC1B,MAAM,KAAK,OAAO,MAAM,KAAK;;AAexC,QAAO;EACL,OAb2B,GAAG;;;uBAGb,gBAAgB,QAAQ,MAAM,KAAK,QAAQ,KAAK,SAAS;;EAW1E,OAAO;EACP,QAT4B,GAAG;;;;;EAU/B,OAAO;EACP;EACD;GACA;CAAC;CAAO;CAAa;CAAS;CAAO;CAAa,CAAC;AAExD,gCAAe"}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import useTheme_default from "../../../contexts/Theme/useTheme.js";
|
|
2
|
+
import TextField_default from "../TextField/TextField.js";
|
|
3
|
+
import Plus_default from "../Icons/Plus.js";
|
|
4
|
+
import X_default from "../Icons/X.js";
|
|
5
|
+
import KeyValueInput_styles_default from "./KeyValueInput.styles.js";
|
|
6
|
+
import { bem, withVendorCSSClassPrefix } from "@thunderid/browser";
|
|
7
|
+
import { useCallback, useState } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { cx } from "@emotion/css";
|
|
10
|
+
|
|
11
|
+
//#region src/components/primitives/KeyValueInput/KeyValueInput.tsx
|
|
12
|
+
/**
|
|
13
|
+
* KeyValueInput component allows users to manage key-value pairs with add/remove functionality.
|
|
14
|
+
* It provides a user-friendly interface for editing organization attributes or similar data structures.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* // Basic usage
|
|
19
|
+
* <KeyValueInput
|
|
20
|
+
* label="Organization Attributes"
|
|
21
|
+
* onChange={(pairs) => console.log(pairs)}
|
|
22
|
+
* />
|
|
23
|
+
*
|
|
24
|
+
* // With initial values
|
|
25
|
+
* <KeyValueInput
|
|
26
|
+
* label="Organization Attributes"
|
|
27
|
+
* value={{department: 'IT', location: 'New York'}}
|
|
28
|
+
* onChange={(pairs) => console.log(pairs)}
|
|
29
|
+
* />
|
|
30
|
+
*
|
|
31
|
+
* // With add/remove callbacks
|
|
32
|
+
* <KeyValueInput
|
|
33
|
+
* label="Custom Attributes"
|
|
34
|
+
* value={attributes}
|
|
35
|
+
* onChange={(pairs) => setAttributes(pairs)}
|
|
36
|
+
* onAdd={(pair) => console.log('Added:', pair)}
|
|
37
|
+
* onRemove={(pair, index) => console.log('Removed:', pair, 'at index:', index)}
|
|
38
|
+
* />
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
const KeyValueInput = ({ className = "", disabled = false, error, helperText, keyLabel = "Key", keyPlaceholder = "Enter key", label, maxPairs, onChange, onAdd, onRemove, readOnly = false, removeButtonText = "Remove", required = false, value = {}, valueLabel = "Value", valuePlaceholder = "Enter value" }) => {
|
|
42
|
+
const { theme, colorScheme } = useTheme_default();
|
|
43
|
+
const styles = KeyValueInput_styles_default(theme, colorScheme, disabled, readOnly, !!error);
|
|
44
|
+
const [pairs, setPairs] = useState(Array.isArray(value) ? value : Object.entries(value).map(([key, val]) => ({
|
|
45
|
+
key,
|
|
46
|
+
value: String(val)
|
|
47
|
+
})));
|
|
48
|
+
const [newKey, setNewKey] = useState("");
|
|
49
|
+
const [newValue, setNewValue] = useState("");
|
|
50
|
+
const handleAddPair = useCallback(() => {
|
|
51
|
+
if (!newKey.trim() || !newValue.trim()) return;
|
|
52
|
+
if (maxPairs && pairs.length >= maxPairs) return;
|
|
53
|
+
const newPair = {
|
|
54
|
+
key: newKey.trim(),
|
|
55
|
+
value: newValue.trim()
|
|
56
|
+
};
|
|
57
|
+
const updatedPairs = [...pairs, newPair];
|
|
58
|
+
setPairs(updatedPairs);
|
|
59
|
+
setNewKey("");
|
|
60
|
+
setNewValue("");
|
|
61
|
+
if (onChange) onChange(updatedPairs);
|
|
62
|
+
if (onAdd) onAdd(newPair);
|
|
63
|
+
}, [
|
|
64
|
+
newKey,
|
|
65
|
+
newValue,
|
|
66
|
+
pairs,
|
|
67
|
+
maxPairs,
|
|
68
|
+
onChange,
|
|
69
|
+
onAdd
|
|
70
|
+
]);
|
|
71
|
+
const handleRemovePair = useCallback((index) => {
|
|
72
|
+
const pairToRemove = pairs[index];
|
|
73
|
+
const updatedPairs = pairs.filter((_, i) => i !== index);
|
|
74
|
+
setPairs(updatedPairs);
|
|
75
|
+
if (onChange) onChange(updatedPairs);
|
|
76
|
+
if (onRemove) onRemove(pairToRemove, index);
|
|
77
|
+
}, [
|
|
78
|
+
pairs,
|
|
79
|
+
onChange,
|
|
80
|
+
onRemove
|
|
81
|
+
]);
|
|
82
|
+
const handleUpdatePair = useCallback((index, field, newVal) => {
|
|
83
|
+
const updatedPairs = pairs.map((pair, i) => {
|
|
84
|
+
if (i === index) return {
|
|
85
|
+
...pair,
|
|
86
|
+
[field]: newVal
|
|
87
|
+
};
|
|
88
|
+
return pair;
|
|
89
|
+
});
|
|
90
|
+
setPairs(updatedPairs);
|
|
91
|
+
if (onChange) onChange(updatedPairs);
|
|
92
|
+
}, [pairs, onChange]);
|
|
93
|
+
const canAddMore = !maxPairs || pairs.length < maxPairs;
|
|
94
|
+
const isAddDisabled = disabled || readOnly || !canAddMore || !newKey.trim() || !newValue.trim();
|
|
95
|
+
const renderReadOnlyContent = () => {
|
|
96
|
+
if (pairs.length === 0) return /* @__PURE__ */ jsx("div", {
|
|
97
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "empty-state")), styles["emptyState"]),
|
|
98
|
+
children: "No attributes defined"
|
|
99
|
+
});
|
|
100
|
+
return pairs.map((pair, index) => /* @__PURE__ */ jsxs("div", {
|
|
101
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "readonly-pair")), styles["readOnlyPair"]),
|
|
102
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
103
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "readonly-key")), styles["readOnlyKey"]),
|
|
104
|
+
children: [pair.key, ":"]
|
|
105
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
106
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "readonly-value")), styles["readOnlyValue"]),
|
|
107
|
+
children: pair.value
|
|
108
|
+
})]
|
|
109
|
+
}, `${pair.key}-${index}`));
|
|
110
|
+
};
|
|
111
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
112
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input")), styles["container"], className),
|
|
113
|
+
children: [
|
|
114
|
+
label && /* @__PURE__ */ jsxs("label", {
|
|
115
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "label")), styles["label"]),
|
|
116
|
+
children: [label, required && /* @__PURE__ */ jsx("span", {
|
|
117
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "required")), styles["requiredIndicator"]),
|
|
118
|
+
children: " *"
|
|
119
|
+
})]
|
|
120
|
+
}),
|
|
121
|
+
/* @__PURE__ */ jsxs("div", {
|
|
122
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "pairs-list")), styles["pairsList"]),
|
|
123
|
+
children: [readOnly ? renderReadOnlyContent() : pairs.map((pair, index) => /* @__PURE__ */ jsxs("div", {
|
|
124
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "pair-row")), styles["pairRow"]),
|
|
125
|
+
children: [
|
|
126
|
+
/* @__PURE__ */ jsx(TextField_default, {
|
|
127
|
+
placeholder: keyPlaceholder,
|
|
128
|
+
value: pair.key,
|
|
129
|
+
onChange: (e) => handleUpdatePair(index, "key", e.target.value),
|
|
130
|
+
disabled: disabled || readOnly,
|
|
131
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "pair-input")), styles["pairInput"]),
|
|
132
|
+
"aria-label": `${keyLabel} ${index + 1}`
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ jsx(TextField_default, {
|
|
135
|
+
placeholder: valuePlaceholder,
|
|
136
|
+
value: pair.value,
|
|
137
|
+
onChange: (e) => handleUpdatePair(index, "value", e.target.value),
|
|
138
|
+
disabled: disabled || readOnly,
|
|
139
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "pair-input")), styles["pairInput"]),
|
|
140
|
+
"aria-label": `${valueLabel} ${index + 1}`
|
|
141
|
+
}),
|
|
142
|
+
!readOnly && /* @__PURE__ */ jsx("button", {
|
|
143
|
+
type: "button",
|
|
144
|
+
onClick: () => handleRemovePair(index),
|
|
145
|
+
disabled,
|
|
146
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "remove-button")), styles["removeButton"]),
|
|
147
|
+
"aria-label": `${removeButtonText} ${pair.key}`,
|
|
148
|
+
children: /* @__PURE__ */ jsx(X_default, {
|
|
149
|
+
width: 16,
|
|
150
|
+
height: 16
|
|
151
|
+
})
|
|
152
|
+
})
|
|
153
|
+
]
|
|
154
|
+
}, `${pair.key}-${index}`)), !readOnly && /* @__PURE__ */ jsxs("div", {
|
|
155
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "add-row")), styles["addRow"]),
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ jsx(TextField_default, {
|
|
158
|
+
placeholder: keyPlaceholder,
|
|
159
|
+
value: newKey,
|
|
160
|
+
onChange: (e) => setNewKey(e.target.value),
|
|
161
|
+
disabled,
|
|
162
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "pair-input")), styles["pairInput"]),
|
|
163
|
+
"aria-label": "New key"
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ jsx(TextField_default, {
|
|
166
|
+
placeholder: valuePlaceholder,
|
|
167
|
+
value: newValue,
|
|
168
|
+
onChange: (e) => setNewValue(e.target.value),
|
|
169
|
+
disabled,
|
|
170
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "pair-input")), styles["pairInput"]),
|
|
171
|
+
"aria-label": "New value",
|
|
172
|
+
onKeyPress: (e) => {
|
|
173
|
+
if (e.key === "Enter" && !isAddDisabled) handleAddPair();
|
|
174
|
+
}
|
|
175
|
+
}),
|
|
176
|
+
/* @__PURE__ */ jsx("button", {
|
|
177
|
+
type: "button",
|
|
178
|
+
onClick: handleAddPair,
|
|
179
|
+
disabled: isAddDisabled,
|
|
180
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "add-button")), styles["addButton"]),
|
|
181
|
+
"aria-label": "Add new key-value pair",
|
|
182
|
+
children: /* @__PURE__ */ jsx(Plus_default, {
|
|
183
|
+
width: 16,
|
|
184
|
+
height: 16
|
|
185
|
+
})
|
|
186
|
+
})
|
|
187
|
+
]
|
|
188
|
+
})]
|
|
189
|
+
}),
|
|
190
|
+
(helperText || error) && /* @__PURE__ */ jsx("div", {
|
|
191
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "helper-text")), styles["helperText"]),
|
|
192
|
+
children: error || helperText
|
|
193
|
+
}),
|
|
194
|
+
maxPairs && /* @__PURE__ */ jsxs("div", {
|
|
195
|
+
className: cx(withVendorCSSClassPrefix(bem("key-value-input", "counter")), styles["counterText"]),
|
|
196
|
+
children: [
|
|
197
|
+
pairs.length,
|
|
198
|
+
" of ",
|
|
199
|
+
maxPairs,
|
|
200
|
+
" pairs used"
|
|
201
|
+
]
|
|
202
|
+
})
|
|
203
|
+
]
|
|
204
|
+
});
|
|
205
|
+
};
|
|
206
|
+
var KeyValueInput_default = KeyValueInput;
|
|
207
|
+
|
|
208
|
+
//#endregion
|
|
209
|
+
export { KeyValueInput_default as default };
|
|
210
|
+
//# sourceMappingURL=KeyValueInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyValueInput.js","names":["KeyValueInput: FC<KeyValueInputProps>","useTheme","styles: Record<string, string>","useStyles","handleAddPair: ReturnType<typeof useCallback>","newPair: KeyValuePair","updatedPairs: KeyValuePair[]","handleRemovePair: ReturnType<typeof useCallback>","pairToRemove: KeyValuePair","handleUpdatePair: ReturnType<typeof useCallback>","canAddMore: boolean","isAddDisabled: boolean","TextField","X","Plus"],"sources":["../../../../src/components/primitives/KeyValueInput/KeyValueInput.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {cx} from '@emotion/css';\nimport {withVendorCSSClassPrefix, bem} from '@thunderid/browser';\nimport {ChangeEvent, FC, KeyboardEvent, MouseEventHandler, ReactElement, useState, useCallback} from 'react';\nimport useStyles from './KeyValueInput.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport {Plus, X} from '../Icons';\nimport TextField from '../TextField/TextField';\n\nexport interface KeyValuePair {\n key: string;\n value: string;\n}\n\nexport interface KeyValueInputProps {\n /**\n * CSS class name for styling the component.\n */\n className?: string;\n\n /**\n * Whether the input is disabled.\n */\n disabled?: boolean;\n\n /**\n * Error message to display.\n */\n error?: string;\n\n /**\n * Help text to display below the input.\n */\n helperText?: string;\n\n /**\n * Label for the key input field.\n */\n keyLabel?: string;\n\n /**\n * Placeholder text for the key input field.\n */\n keyPlaceholder?: string;\n\n /**\n * Label for the component.\n */\n label?: string;\n\n /**\n * Maximum number of key-value pairs allowed.\n */\n maxPairs?: number;\n /**\n * Callback fired when a pair is added.\n */\n onAdd?: (pair: KeyValuePair) => void;\n\n /**\n * Callback fired when the key-value pairs change.\n */\n onChange?: (pairs: KeyValuePair[]) => void;\n\n /**\n * Callback fired when a pair is removed.\n */\n onRemove?: (pair: KeyValuePair, index: number) => void;\n\n /**\n * Whether the component is in read-only mode.\n */\n readOnly?: boolean;\n\n /**\n * Text for the remove button.\n */\n removeButtonText?: string;\n\n /**\n * Whether the component is required.\n */\n required?: boolean;\n\n /**\n * Current key-value pairs.\n */\n value?: Record<string, any> | KeyValuePair[];\n\n /**\n * Label for the value input field.\n */\n valueLabel?: string;\n\n /**\n * Placeholder text for the value input field.\n */\n valuePlaceholder?: string;\n}\n\n/**\n * KeyValueInput component allows users to manage key-value pairs with add/remove functionality.\n * It provides a user-friendly interface for editing organization attributes or similar data structures.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <KeyValueInput\n * label=\"Organization Attributes\"\n * onChange={(pairs) => console.log(pairs)}\n * />\n *\n * // With initial values\n * <KeyValueInput\n * label=\"Organization Attributes\"\n * value={{department: 'IT', location: 'New York'}}\n * onChange={(pairs) => console.log(pairs)}\n * />\n *\n * // With add/remove callbacks\n * <KeyValueInput\n * label=\"Custom Attributes\"\n * value={attributes}\n * onChange={(pairs) => setAttributes(pairs)}\n * onAdd={(pair) => console.log('Added:', pair)}\n * onRemove={(pair, index) => console.log('Removed:', pair, 'at index:', index)}\n * />\n * ```\n */\nconst KeyValueInput: FC<KeyValueInputProps> = ({\n className = '',\n disabled = false,\n error,\n helperText,\n keyLabel = 'Key',\n keyPlaceholder = 'Enter key',\n label,\n maxPairs,\n onChange,\n onAdd,\n onRemove,\n readOnly = false,\n removeButtonText = 'Remove',\n required = false,\n value = {},\n valueLabel = 'Value',\n valuePlaceholder = 'Enter value',\n}: KeyValueInputProps): ReactElement => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, disabled, readOnly, !!error);\n\n // Convert value to array format\n const initialPairs: KeyValuePair[] = Array.isArray(value)\n ? value\n : Object.entries(value).map(([key, val]: [string, any]) => ({key, value: String(val)}));\n\n const [pairs, setPairs] = useState<KeyValuePair[]>(initialPairs);\n const [newKey, setNewKey] = useState('');\n const [newValue, setNewValue] = useState('');\n\n const handleAddPair: ReturnType<typeof useCallback> = useCallback(() => {\n if (!newKey.trim() || !newValue.trim()) return;\n if (maxPairs && pairs.length >= maxPairs) return;\n\n const newPair: KeyValuePair = {\n key: newKey.trim(),\n value: newValue.trim(),\n };\n\n const updatedPairs: KeyValuePair[] = [...pairs, newPair];\n setPairs(updatedPairs);\n setNewKey('');\n setNewValue('');\n\n if (onChange) {\n onChange(updatedPairs);\n }\n\n if (onAdd) {\n onAdd(newPair);\n }\n }, [newKey, newValue, pairs, maxPairs, onChange, onAdd]);\n\n const handleRemovePair: ReturnType<typeof useCallback> = useCallback(\n (index: number) => {\n const pairToRemove: KeyValuePair = pairs[index];\n const updatedPairs: KeyValuePair[] = pairs.filter((_: KeyValuePair, i: number) => i !== index);\n setPairs(updatedPairs);\n\n if (onChange) {\n onChange(updatedPairs);\n }\n\n if (onRemove) {\n onRemove(pairToRemove, index);\n }\n },\n [pairs, onChange, onRemove],\n );\n\n const handleUpdatePair: ReturnType<typeof useCallback> = useCallback(\n (index: number, field: 'key' | 'value', newVal: string) => {\n const updatedPairs: KeyValuePair[] = pairs.map((pair: KeyValuePair, i: number) => {\n if (i === index) {\n return {...pair, [field]: newVal};\n }\n return pair;\n });\n setPairs(updatedPairs);\n\n if (onChange) {\n onChange(updatedPairs);\n }\n },\n [pairs, onChange],\n );\n\n const canAddMore: boolean = !maxPairs || pairs.length < maxPairs;\n const isAddDisabled: boolean = disabled || readOnly || !canAddMore || !newKey.trim() || !newValue.trim();\n\n const renderReadOnlyContent = (): ReactElement | ReactElement[] => {\n if (pairs.length === 0) {\n return (\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'empty-state')), styles['emptyState'])}>\n No attributes defined\n </div>\n );\n }\n\n return pairs.map((pair: KeyValuePair, index: number) => (\n <div\n key={`${pair.key}-${index}`}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'readonly-pair')), styles['readOnlyPair'])}\n >\n <span className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'readonly-key')), styles['readOnlyKey'])}>\n {pair.key}:\n </span>\n <span\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'readonly-value')), styles['readOnlyValue'])}\n >\n {pair.value}\n </span>\n </div>\n ));\n };\n\n return (\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input')), styles['container'], className)}>\n {label && (\n <label className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'label')), styles['label'])}>\n {label}\n {required && (\n <span\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'required')), styles['requiredIndicator'])}\n >\n {' *'}\n </span>\n )}\n </label>\n )}\n\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pairs-list')), styles['pairsList'])}>\n {readOnly\n ? renderReadOnlyContent()\n : pairs.map((pair: KeyValuePair, index: number) => (\n <div\n key={`${pair.key}-${index}`}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pair-row')), styles['pairRow'])}\n >\n <TextField\n placeholder={keyPlaceholder}\n value={pair.key}\n onChange={(e: ChangeEvent<HTMLInputElement>): void => handleUpdatePair(index, 'key', e.target.value)}\n disabled={disabled || readOnly}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pair-input')), styles['pairInput'])}\n aria-label={`${keyLabel} ${index + 1}`}\n />\n <TextField\n placeholder={valuePlaceholder}\n value={pair.value}\n onChange={(e: ChangeEvent<HTMLInputElement>): void =>\n handleUpdatePair(index, 'value', e.target.value)\n }\n disabled={disabled || readOnly}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pair-input')), styles['pairInput'])}\n aria-label={`${valueLabel} ${index + 1}`}\n />\n {!readOnly && (\n <button\n type=\"button\"\n onClick={(): void => handleRemovePair(index)}\n disabled={disabled}\n className={cx(\n withVendorCSSClassPrefix(bem('key-value-input', 'remove-button')),\n styles['removeButton'],\n )}\n aria-label={`${removeButtonText} ${pair.key}`}\n >\n <X width={16} height={16} />\n </button>\n )}\n </div>\n ))}\n\n {!readOnly && (\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'add-row')), styles['addRow'])}>\n <TextField\n placeholder={keyPlaceholder}\n value={newKey}\n onChange={(e: ChangeEvent<HTMLInputElement>): void => setNewKey(e.target.value)}\n disabled={disabled}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pair-input')), styles['pairInput'])}\n aria-label=\"New key\"\n />\n <TextField\n placeholder={valuePlaceholder}\n value={newValue}\n onChange={(e: ChangeEvent<HTMLInputElement>): void => setNewValue(e.target.value)}\n disabled={disabled}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'pair-input')), styles['pairInput'])}\n aria-label=\"New value\"\n onKeyPress={(e: KeyboardEvent<HTMLInputElement>): void => {\n if (e.key === 'Enter' && !isAddDisabled) {\n handleAddPair();\n }\n }}\n />\n <button\n type=\"button\"\n onClick={handleAddPair as MouseEventHandler<HTMLButtonElement>}\n disabled={isAddDisabled}\n className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'add-button')), styles['addButton'])}\n aria-label=\"Add new key-value pair\"\n >\n <Plus width={16} height={16} />\n </button>\n </div>\n )}\n </div>\n\n {(helperText || error) && (\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'helper-text')), styles['helperText'])}>\n {error || helperText}\n </div>\n )}\n\n {maxPairs && (\n <div className={cx(withVendorCSSClassPrefix(bem('key-value-input', 'counter')), styles['counterText'])}>\n {pairs.length} of {maxPairs} pairs used\n </div>\n )}\n </div>\n );\n};\n\nexport default KeyValueInput;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkJA,MAAMA,iBAAyC,EAC7C,YAAY,IACZ,WAAW,OACX,OACA,YACA,WAAW,OACX,iBAAiB,aACjB,OACA,UACA,UACA,OACA,UACA,WAAW,OACX,mBAAmB,UACnB,WAAW,OACX,QAAQ,EAAE,EACV,aAAa,SACb,mBAAmB,oBACmB;CACtC,MAAM,EAAC,OAAO,gBAA4CC,kBAAU;CACpE,MAAMC,SAAiCC,6BAAU,OAAO,aAAa,UAAU,UAAU,CAAC,CAAC,MAAM;CAOjG,MAAM,CAAC,OAAO,YAAY,SAJW,MAAM,QAAQ,MAAM,GACrD,QACA,OAAO,QAAQ,MAAM,CAAC,KAAK,CAAC,KAAK,UAAyB;EAAC;EAAK,OAAO,OAAO,IAAI;EAAC,EAAE,CAEzB;CAChE,MAAM,CAAC,QAAQ,aAAa,SAAS,GAAG;CACxC,MAAM,CAAC,UAAU,eAAe,SAAS,GAAG;CAE5C,MAAMC,gBAAgD,kBAAkB;AACtE,MAAI,CAAC,OAAO,MAAM,IAAI,CAAC,SAAS,MAAM,CAAE;AACxC,MAAI,YAAY,MAAM,UAAU,SAAU;EAE1C,MAAMC,UAAwB;GAC5B,KAAK,OAAO,MAAM;GAClB,OAAO,SAAS,MAAM;GACvB;EAED,MAAMC,eAA+B,CAAC,GAAG,OAAO,QAAQ;AACxD,WAAS,aAAa;AACtB,YAAU,GAAG;AACb,cAAY,GAAG;AAEf,MAAI,SACF,UAAS,aAAa;AAGxB,MAAI,MACF,OAAM,QAAQ;IAEf;EAAC;EAAQ;EAAU;EAAO;EAAU;EAAU;EAAM,CAAC;CAExD,MAAMC,mBAAmD,aACtD,UAAkB;EACjB,MAAMC,eAA6B,MAAM;EACzC,MAAMF,eAA+B,MAAM,QAAQ,GAAiB,MAAc,MAAM,MAAM;AAC9F,WAAS,aAAa;AAEtB,MAAI,SACF,UAAS,aAAa;AAGxB,MAAI,SACF,UAAS,cAAc,MAAM;IAGjC;EAAC;EAAO;EAAU;EAAS,CAC5B;CAED,MAAMG,mBAAmD,aACtD,OAAe,OAAwB,WAAmB;EACzD,MAAMH,eAA+B,MAAM,KAAK,MAAoB,MAAc;AAChF,OAAI,MAAM,MACR,QAAO;IAAC,GAAG;KAAO,QAAQ;IAAO;AAEnC,UAAO;IACP;AACF,WAAS,aAAa;AAEtB,MAAI,SACF,UAAS,aAAa;IAG1B,CAAC,OAAO,SAAS,CAClB;CAED,MAAMI,aAAsB,CAAC,YAAY,MAAM,SAAS;CACxD,MAAMC,gBAAyB,YAAY,YAAY,CAAC,cAAc,CAAC,OAAO,MAAM,IAAI,CAAC,SAAS,MAAM;CAExG,MAAM,8BAA6D;AACjE,MAAI,MAAM,WAAW,EACnB,QACE,oBAAC;GAAI,WAAW,GAAG,yBAAyB,IAAI,mBAAmB,cAAc,CAAC,EAAE,OAAO,cAAc;aAAE;IAErG;AAIV,SAAO,MAAM,KAAK,MAAoB,UACpC,qBAAC;GAEC,WAAW,GAAG,yBAAyB,IAAI,mBAAmB,gBAAgB,CAAC,EAAE,OAAO,gBAAgB;cAExG,qBAAC;IAAK,WAAW,GAAG,yBAAyB,IAAI,mBAAmB,eAAe,CAAC,EAAE,OAAO,eAAe;eACzG,KAAK,KAAI;KACL,EACP,oBAAC;IACC,WAAW,GAAG,yBAAyB,IAAI,mBAAmB,iBAAiB,CAAC,EAAE,OAAO,iBAAiB;cAEzG,KAAK;KACD;KAVF,GAAG,KAAK,IAAI,GAAG,QAWhB,CACN;;AAGJ,QACE,qBAAC;EAAI,WAAW,GAAG,yBAAyB,IAAI,kBAAkB,CAAC,EAAE,OAAO,cAAc,UAAU;;GACjG,SACC,qBAAC;IAAM,WAAW,GAAG,yBAAyB,IAAI,mBAAmB,QAAQ,CAAC,EAAE,OAAO,SAAS;eAC7F,OACA,YACC,oBAAC;KACC,WAAW,GAAG,yBAAyB,IAAI,mBAAmB,WAAW,CAAC,EAAE,OAAO,qBAAqB;eAEvG;MACI;KAEH;GAGV,qBAAC;IAAI,WAAW,GAAG,yBAAyB,IAAI,mBAAmB,aAAa,CAAC,EAAE,OAAO,aAAa;eACpG,WACG,uBAAuB,GACvB,MAAM,KAAK,MAAoB,UAC7B,qBAAC;KAEC,WAAW,GAAG,yBAAyB,IAAI,mBAAmB,WAAW,CAAC,EAAE,OAAO,WAAW;;MAE9F,oBAACC;OACC,aAAa;OACb,OAAO,KAAK;OACZ,WAAW,MAA2C,iBAAiB,OAAO,OAAO,EAAE,OAAO,MAAM;OACpG,UAAU,YAAY;OACtB,WAAW,GAAG,yBAAyB,IAAI,mBAAmB,aAAa,CAAC,EAAE,OAAO,aAAa;OAClG,cAAY,GAAG,SAAS,GAAG,QAAQ;QACnC;MACF,oBAACA;OACC,aAAa;OACb,OAAO,KAAK;OACZ,WAAW,MACT,iBAAiB,OAAO,SAAS,EAAE,OAAO,MAAM;OAElD,UAAU,YAAY;OACtB,WAAW,GAAG,yBAAyB,IAAI,mBAAmB,aAAa,CAAC,EAAE,OAAO,aAAa;OAClG,cAAY,GAAG,WAAW,GAAG,QAAQ;QACrC;MACD,CAAC,YACA,oBAAC;OACC,MAAK;OACL,eAAqB,iBAAiB,MAAM;OAClC;OACV,WAAW,GACT,yBAAyB,IAAI,mBAAmB,gBAAgB,CAAC,EACjE,OAAO,gBACR;OACD,cAAY,GAAG,iBAAiB,GAAG,KAAK;iBAExC,oBAACC;QAAE,OAAO;QAAI,QAAQ;SAAM;QACrB;;OAjCN,GAAG,KAAK,IAAI,GAAG,QAmChB,CACN,EAEL,CAAC,YACA,qBAAC;KAAI,WAAW,GAAG,yBAAyB,IAAI,mBAAmB,UAAU,CAAC,EAAE,OAAO,UAAU;;MAC/F,oBAACD;OACC,aAAa;OACb,OAAO;OACP,WAAW,MAA2C,UAAU,EAAE,OAAO,MAAM;OACrE;OACV,WAAW,GAAG,yBAAyB,IAAI,mBAAmB,aAAa,CAAC,EAAE,OAAO,aAAa;OAClG,cAAW;QACX;MACF,oBAACA;OACC,aAAa;OACb,OAAO;OACP,WAAW,MAA2C,YAAY,EAAE,OAAO,MAAM;OACvE;OACV,WAAW,GAAG,yBAAyB,IAAI,mBAAmB,aAAa,CAAC,EAAE,OAAO,aAAa;OAClG,cAAW;OACX,aAAa,MAA6C;AACxD,YAAI,EAAE,QAAQ,WAAW,CAAC,cACxB,gBAAe;;QAGnB;MACF,oBAAC;OACC,MAAK;OACL,SAAS;OACT,UAAU;OACV,WAAW,GAAG,yBAAyB,IAAI,mBAAmB,aAAa,CAAC,EAAE,OAAO,aAAa;OAClG,cAAW;iBAEX,oBAACE;QAAK,OAAO;QAAI,QAAQ;SAAM;QACxB;;MACL;KAEJ;IAEJ,cAAc,UACd,oBAAC;IAAI,WAAW,GAAG,yBAAyB,IAAI,mBAAmB,cAAc,CAAC,EAAE,OAAO,cAAc;cACtG,SAAS;KACN;GAGP,YACC,qBAAC;IAAI,WAAW,GAAG,yBAAyB,IAAI,mBAAmB,UAAU,CAAC,EAAE,OAAO,eAAe;;KACnG,MAAM;KAAO;KAAK;KAAS;;KACxB;;GAEJ;;AAIV,4BAAe"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { css } from "@emotion/css";
|
|
3
|
+
|
|
4
|
+
//#region src/components/primitives/KeyValueInput/KeyValueInput.styles.ts
|
|
5
|
+
/**
|
|
6
|
+
* Creates styles for the KeyValueInput component using BEM methodology
|
|
7
|
+
* @param theme - The theme object containing design tokens
|
|
8
|
+
* @param colorScheme - The current color scheme (used for memoization)
|
|
9
|
+
* @param disabled - Whether the component is disabled
|
|
10
|
+
* @param readOnly - Whether the component is read-only
|
|
11
|
+
* @param hasError - Whether the component has an error
|
|
12
|
+
* @returns Object containing CSS class names for component styling
|
|
13
|
+
*/
|
|
14
|
+
const useStyles = (theme, colorScheme, disabled, readOnly, hasError) => useMemo(() => {
|
|
15
|
+
const container = css`
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
font-family: ${theme.vars.typography.fontFamily};
|
|
19
|
+
gap: calc(${theme.vars.spacing.unit} / 2);
|
|
20
|
+
`;
|
|
21
|
+
const label = css`
|
|
22
|
+
font-size: 0.875rem;
|
|
23
|
+
font-weight: 500;
|
|
24
|
+
color: ${theme.vars.colors.text.primary};
|
|
25
|
+
margin-bottom: calc(${theme.vars.spacing.unit} / 2);
|
|
26
|
+
`;
|
|
27
|
+
const requiredIndicator = css`
|
|
28
|
+
color: ${theme.vars.colors.error.main};
|
|
29
|
+
`;
|
|
30
|
+
const pairsList = css`
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
gap: calc(${theme.vars.spacing.unit} / 4);
|
|
34
|
+
`;
|
|
35
|
+
const pairRow = css`
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
gap: calc(${theme.vars.spacing.unit} / 2);
|
|
39
|
+
padding: calc(${theme.vars.spacing.unit} / 2);
|
|
40
|
+
border-radius: ${theme.vars.borderRadius.small};
|
|
41
|
+
background-color: transparent;
|
|
42
|
+
border: none;
|
|
43
|
+
|
|
44
|
+
&:hover {
|
|
45
|
+
background-color: ${theme.vars.colors.action.hover};
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
48
|
+
const pairInput = css`
|
|
49
|
+
flex: 1;
|
|
50
|
+
min-width: 0;
|
|
51
|
+
`;
|
|
52
|
+
const addRow = css`
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: calc(${theme.vars.spacing.unit} / 2);
|
|
56
|
+
padding: calc(${theme.vars.spacing.unit} / 2);
|
|
57
|
+
border: none;
|
|
58
|
+
border-radius: ${theme.vars.borderRadius.small};
|
|
59
|
+
background-color: transparent;
|
|
60
|
+
margin-top: calc(${theme.vars.spacing.unit} / 2);
|
|
61
|
+
`;
|
|
62
|
+
const removeButton = css`
|
|
63
|
+
min-width: auto;
|
|
64
|
+
width: 24px;
|
|
65
|
+
height: 24px;
|
|
66
|
+
padding: 0;
|
|
67
|
+
background-color: transparent;
|
|
68
|
+
color: ${theme.vars.colors.text.secondary};
|
|
69
|
+
border: none;
|
|
70
|
+
border-radius: ${theme.vars.borderRadius.small};
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
cursor: ${disabled ? "not-allowed" : "pointer"};
|
|
75
|
+
|
|
76
|
+
&:hover:not(:disabled) {
|
|
77
|
+
background-color: ${theme.vars.colors.action.hover};
|
|
78
|
+
color: ${theme.vars.colors.error.main};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&:disabled {
|
|
82
|
+
opacity: 0.6;
|
|
83
|
+
}
|
|
84
|
+
`;
|
|
85
|
+
const addButton = css`
|
|
86
|
+
min-width: auto;
|
|
87
|
+
width: 24px;
|
|
88
|
+
height: 24px;
|
|
89
|
+
padding: 0;
|
|
90
|
+
background-color: transparent;
|
|
91
|
+
color: ${theme.vars.colors.primary.main};
|
|
92
|
+
border: none;
|
|
93
|
+
border-radius: ${theme.vars.borderRadius.small};
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
cursor: ${disabled ? "not-allowed" : "pointer"};
|
|
98
|
+
|
|
99
|
+
&:hover:not(:disabled) {
|
|
100
|
+
background-color: ${theme.vars.colors.primary.main};
|
|
101
|
+
color: ${theme.vars.colors.primary.contrastText};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:disabled {
|
|
105
|
+
opacity: 0.6;
|
|
106
|
+
}
|
|
107
|
+
`;
|
|
108
|
+
const helperText = css`
|
|
109
|
+
font-size: 0.75rem;
|
|
110
|
+
color: ${hasError ? theme.vars.colors.error.main : theme.vars.colors.text.secondary};
|
|
111
|
+
margin-top: calc(${theme.vars.spacing.unit} / 2);
|
|
112
|
+
`;
|
|
113
|
+
const emptyState = css`
|
|
114
|
+
padding: ${theme.vars.spacing.unit};
|
|
115
|
+
text-align: center;
|
|
116
|
+
color: ${theme.vars.colors.text.secondary};
|
|
117
|
+
font-style: italic;
|
|
118
|
+
font-size: 0.75rem;
|
|
119
|
+
`;
|
|
120
|
+
const readOnlyPair = css`
|
|
121
|
+
display: flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
gap: calc(${theme.vars.spacing.unit} / 2);
|
|
124
|
+
padding: calc(${theme.vars.spacing.unit} / 4) 0;
|
|
125
|
+
min-height: 20px;
|
|
126
|
+
`;
|
|
127
|
+
const readOnlyKey = css`
|
|
128
|
+
font-size: 0.75rem;
|
|
129
|
+
font-weight: 500;
|
|
130
|
+
color: ${theme.vars.colors.text.secondary};
|
|
131
|
+
min-width: 80px;
|
|
132
|
+
flex-shrink: 0;
|
|
133
|
+
`;
|
|
134
|
+
const readOnlyValue = css`
|
|
135
|
+
font-size: 0.75rem;
|
|
136
|
+
color: ${theme.vars.colors.text.primary};
|
|
137
|
+
word-break: break-word;
|
|
138
|
+
flex: 1;
|
|
139
|
+
`;
|
|
140
|
+
return {
|
|
141
|
+
addButton,
|
|
142
|
+
addRow,
|
|
143
|
+
container,
|
|
144
|
+
counterText: css`
|
|
145
|
+
font-size: 0.75rem;
|
|
146
|
+
color: ${theme.vars.colors.text.secondary};
|
|
147
|
+
margin-top: calc(${theme.vars.spacing.unit} / 2);
|
|
148
|
+
`,
|
|
149
|
+
emptyState,
|
|
150
|
+
helperText,
|
|
151
|
+
label,
|
|
152
|
+
pairInput,
|
|
153
|
+
pairRow,
|
|
154
|
+
pairsList,
|
|
155
|
+
readOnlyKey,
|
|
156
|
+
readOnlyPair,
|
|
157
|
+
readOnlyValue,
|
|
158
|
+
removeButton,
|
|
159
|
+
requiredIndicator
|
|
160
|
+
};
|
|
161
|
+
}, [
|
|
162
|
+
theme,
|
|
163
|
+
colorScheme,
|
|
164
|
+
disabled,
|
|
165
|
+
readOnly,
|
|
166
|
+
hasError
|
|
167
|
+
]);
|
|
168
|
+
var KeyValueInput_styles_default = useStyles;
|
|
169
|
+
|
|
170
|
+
//#endregion
|
|
171
|
+
export { KeyValueInput_styles_default as default };
|
|
172
|
+
//# sourceMappingURL=KeyValueInput.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyValueInput.styles.js","names":["container: string","label: string","requiredIndicator: string","pairsList: string","pairRow: string","pairInput: string","addRow: string","removeButton: string","addButton: string","helperText: string","emptyState: string","readOnlyPair: string","readOnlyKey: string","readOnlyValue: string"],"sources":["../../../../src/components/primitives/KeyValueInput/KeyValueInput.styles.ts"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {css} from '@emotion/css';\nimport {Theme} from '@thunderid/browser';\nimport {useMemo} from 'react';\n\n/**\n * Creates styles for the KeyValueInput component using BEM methodology\n * @param theme - The theme object containing design tokens\n * @param colorScheme - The current color scheme (used for memoization)\n * @param disabled - Whether the component is disabled\n * @param readOnly - Whether the component is read-only\n * @param hasError - Whether the component has an error\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (\n theme: Theme,\n colorScheme: string,\n disabled: boolean,\n readOnly: boolean,\n hasError: boolean,\n): Record<string, string> =>\n useMemo(() => {\n const container: string = css`\n display: flex;\n flex-direction: column;\n font-family: ${theme.vars.typography.fontFamily};\n gap: calc(${theme.vars.spacing.unit} / 2);\n `;\n\n const label: string = css`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${theme.vars.colors.text.primary};\n margin-bottom: calc(${theme.vars.spacing.unit} / 2);\n `;\n\n const requiredIndicator: string = css`\n color: ${theme.vars.colors.error.main};\n `;\n\n const pairsList: string = css`\n display: flex;\n flex-direction: column;\n gap: calc(${theme.vars.spacing.unit} / 4);\n `;\n\n const pairRow: string = css`\n display: flex;\n align-items: center;\n gap: calc(${theme.vars.spacing.unit} / 2);\n padding: calc(${theme.vars.spacing.unit} / 2);\n border-radius: ${theme.vars.borderRadius.small};\n background-color: transparent;\n border: none;\n\n &:hover {\n background-color: ${theme.vars.colors.action.hover};\n }\n `;\n\n const pairInput: string = css`\n flex: 1;\n min-width: 0;\n `;\n\n const addRow: string = css`\n display: flex;\n align-items: center;\n gap: calc(${theme.vars.spacing.unit} / 2);\n padding: calc(${theme.vars.spacing.unit} / 2);\n border: none;\n border-radius: ${theme.vars.borderRadius.small};\n background-color: transparent;\n margin-top: calc(${theme.vars.spacing.unit} / 2);\n `;\n\n const removeButton: string = css`\n min-width: auto;\n width: 24px;\n height: 24px;\n padding: 0;\n background-color: transparent;\n color: ${theme.vars.colors.text.secondary};\n border: none;\n border-radius: ${theme.vars.borderRadius.small};\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: ${disabled ? 'not-allowed' : 'pointer'};\n\n &:hover:not(:disabled) {\n background-color: ${theme.vars.colors.action.hover};\n color: ${theme.vars.colors.error.main};\n }\n\n &:disabled {\n opacity: 0.6;\n }\n `;\n\n const addButton: string = css`\n min-width: auto;\n width: 24px;\n height: 24px;\n padding: 0;\n background-color: transparent;\n color: ${theme.vars.colors.primary.main};\n border: none;\n border-radius: ${theme.vars.borderRadius.small};\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: ${disabled ? 'not-allowed' : 'pointer'};\n\n &:hover:not(:disabled) {\n background-color: ${theme.vars.colors.primary.main};\n color: ${theme.vars.colors.primary.contrastText};\n }\n\n &:disabled {\n opacity: 0.6;\n }\n `;\n\n const helperText: string = css`\n font-size: 0.75rem;\n color: ${hasError ? theme.vars.colors.error.main : theme.vars.colors.text.secondary};\n margin-top: calc(${theme.vars.spacing.unit} / 2);\n `;\n\n const emptyState: string = css`\n padding: ${theme.vars.spacing.unit};\n text-align: center;\n color: ${theme.vars.colors.text.secondary};\n font-style: italic;\n font-size: 0.75rem;\n `;\n\n const readOnlyPair: string = css`\n display: flex;\n align-items: center;\n gap: calc(${theme.vars.spacing.unit} / 2);\n padding: calc(${theme.vars.spacing.unit} / 4) 0;\n min-height: 20px;\n `;\n\n const readOnlyKey: string = css`\n font-size: 0.75rem;\n font-weight: 500;\n color: ${theme.vars.colors.text.secondary};\n min-width: 80px;\n flex-shrink: 0;\n `;\n\n const readOnlyValue: string = css`\n font-size: 0.75rem;\n color: ${theme.vars.colors.text.primary};\n word-break: break-word;\n flex: 1;\n `;\n\n const counterText: string = css`\n font-size: 0.75rem;\n color: ${theme.vars.colors.text.secondary};\n margin-top: calc(${theme.vars.spacing.unit} / 2);\n `;\n\n return {\n addButton,\n addRow,\n container,\n counterText,\n emptyState,\n helperText,\n label,\n pairInput,\n pairRow,\n pairsList,\n readOnlyKey,\n readOnlyPair,\n readOnlyValue,\n removeButton,\n requiredIndicator,\n };\n }, [theme, colorScheme, disabled, readOnly, hasError]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;;AA+BA,MAAM,aACJ,OACA,aACA,UACA,UACA,aAEA,cAAc;CACZ,MAAMA,YAAoB,GAAG;;;qBAGZ,MAAM,KAAK,WAAW,WAAW;kBACpC,MAAM,KAAK,QAAQ,KAAK;;CAGtC,MAAMC,QAAgB,GAAG;;;eAGd,MAAM,KAAK,OAAO,KAAK,QAAQ;4BAClB,MAAM,KAAK,QAAQ,KAAK;;CAGhD,MAAMC,oBAA4B,GAAG;eAC1B,MAAM,KAAK,OAAO,MAAM,KAAK;;CAGxC,MAAMC,YAAoB,GAAG;;;kBAGf,MAAM,KAAK,QAAQ,KAAK;;CAGtC,MAAMC,UAAkB,GAAG;;;kBAGb,MAAM,KAAK,QAAQ,KAAK;sBACpB,MAAM,KAAK,QAAQ,KAAK;uBACvB,MAAM,KAAK,aAAa,MAAM;;;;;4BAKzB,MAAM,KAAK,OAAO,OAAO,MAAM;;;CAIvD,MAAMC,YAAoB,GAAG;;;;CAK7B,MAAMC,SAAiB,GAAG;;;kBAGZ,MAAM,KAAK,QAAQ,KAAK;sBACpB,MAAM,KAAK,QAAQ,KAAK;;uBAEvB,MAAM,KAAK,aAAa,MAAM;;yBAE5B,MAAM,KAAK,QAAQ,KAAK;;CAG7C,MAAMC,eAAuB,GAAG;;;;;;eAMrB,MAAM,KAAK,OAAO,KAAK,UAAU;;uBAEzB,MAAM,KAAK,aAAa,MAAM;;;;gBAIrC,WAAW,gBAAgB,UAAU;;;4BAGzB,MAAM,KAAK,OAAO,OAAO,MAAM;iBAC1C,MAAM,KAAK,OAAO,MAAM,KAAK;;;;;;;CAQ1C,MAAMC,YAAoB,GAAG;;;;;;eAMlB,MAAM,KAAK,OAAO,QAAQ,KAAK;;uBAEvB,MAAM,KAAK,aAAa,MAAM;;;;gBAIrC,WAAW,gBAAgB,UAAU;;;4BAGzB,MAAM,KAAK,OAAO,QAAQ,KAAK;iBAC1C,MAAM,KAAK,OAAO,QAAQ,aAAa;;;;;;;CAQpD,MAAMC,aAAqB,GAAG;;eAEnB,WAAW,MAAM,KAAK,OAAO,MAAM,OAAO,MAAM,KAAK,OAAO,KAAK,UAAU;yBACjE,MAAM,KAAK,QAAQ,KAAK;;CAG7C,MAAMC,aAAqB,GAAG;iBACjB,MAAM,KAAK,QAAQ,KAAK;;eAE1B,MAAM,KAAK,OAAO,KAAK,UAAU;;;;CAK5C,MAAMC,eAAuB,GAAG;;;kBAGlB,MAAM,KAAK,QAAQ,KAAK;sBACpB,MAAM,KAAK,QAAQ,KAAK;;;CAI1C,MAAMC,cAAsB,GAAG;;;eAGpB,MAAM,KAAK,OAAO,KAAK,UAAU;;;;CAK5C,MAAMC,gBAAwB,GAAG;;eAEtB,MAAM,KAAK,OAAO,KAAK,QAAQ;;;;AAW1C,QAAO;EACL;EACA;EACA;EACA,aAV0B,GAAG;;eAEpB,MAAM,KAAK,OAAO,KAAK,UAAU;yBACvB,MAAM,KAAK,QAAQ,KAAK;;EAQ3C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;GACA;CAAC;CAAO;CAAa;CAAU;CAAU;CAAS,CAAC;AAExD,mCAAe"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import useTheme_default from "../../../contexts/Theme/useTheme.js";
|
|
2
|
+
import Logo_styles_default from "./Logo.styles.js";
|
|
3
|
+
import { bem, withVendorCSSClassPrefix } from "@thunderid/browser";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { cx } from "@emotion/css";
|
|
6
|
+
|
|
7
|
+
//#region src/components/primitives/Logo/Logo.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Logo component that displays the brand logo from theme or custom source.
|
|
10
|
+
*
|
|
11
|
+
* @param props - The props for the Logo component.
|
|
12
|
+
* @returns The rendered Logo component.
|
|
13
|
+
*/
|
|
14
|
+
const Logo = ({ className, src, alt, title, size = "medium" }) => {
|
|
15
|
+
const { theme, colorScheme } = useTheme_default();
|
|
16
|
+
const styles = Logo_styles_default(theme, colorScheme, size);
|
|
17
|
+
const logoConfig = theme.images?.logo;
|
|
18
|
+
const logoSrc = src || logoConfig?.["url"];
|
|
19
|
+
const logoAlt = alt || logoConfig?.["alt"] || "Logo";
|
|
20
|
+
const logoTitle = title || logoConfig?.["title"];
|
|
21
|
+
if (!logoSrc) return null;
|
|
22
|
+
return /* @__PURE__ */ jsx("img", {
|
|
23
|
+
src: logoSrc,
|
|
24
|
+
alt: logoAlt,
|
|
25
|
+
title: logoTitle,
|
|
26
|
+
className: cx(withVendorCSSClassPrefix(bem("logo")), withVendorCSSClassPrefix(bem("logo", size)), styles["logo"], styles["size"], className)
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
var Logo_default = Logo;
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { Logo_default as default };
|
|
33
|
+
//# sourceMappingURL=Logo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logo.js","names":["Logo: FC<LogoProps>","useTheme","styles: Record<string, string>","useStyles","logoConfig: Record<string, string> | undefined","logoSrc: string | undefined","logoAlt: string","logoTitle: string | undefined"],"sources":["../../../../src/components/primitives/Logo/Logo.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {cx} from '@emotion/css';\nimport {withVendorCSSClassPrefix, bem} from '@thunderid/browser';\nimport {FC} from 'react';\nimport useStyles from './Logo.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\n\nexport type LogoSize = 'small' | 'medium' | 'large';\n\n/**\n * Props for the Logo component.\n */\nexport interface LogoProps {\n /**\n * Custom alt text for the logo.\n */\n alt?: string;\n /**\n * Custom CSS class name for the logo.\n */\n className?: string;\n /**\n * Size of the logo.\n */\n size?: LogoSize;\n /**\n * Custom logo URL to override theme logo.\n */\n src?: string;\n /**\n * Custom title for the logo.\n */\n title?: string;\n}\n\n/**\n * Logo component that displays the brand logo from theme or custom source.\n *\n * @param props - The props for the Logo component.\n * @returns The rendered Logo component.\n */\nconst Logo: FC<LogoProps> = ({className, src, alt, title, size = 'medium'}: LogoProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, size);\n\n const logoConfig: Record<string, string> | undefined = theme.images?.logo as Record<string, string> | undefined;\n\n const logoSrc: string | undefined = src || logoConfig?.['url'];\n\n const logoAlt: string = alt || logoConfig?.['alt'] || 'Logo';\n\n const logoTitle: string | undefined = title || logoConfig?.['title'];\n\n if (!logoSrc) {\n return null;\n }\n\n return (\n <img\n src={logoSrc}\n alt={logoAlt}\n title={logoTitle}\n className={cx(\n withVendorCSSClassPrefix(bem('logo')),\n withVendorCSSClassPrefix(bem('logo', size)),\n styles['logo'],\n styles['size'],\n className,\n )}\n />\n );\n};\n\nexport default Logo;\n"],"mappings":";;;;;;;;;;;;;AA0DA,MAAMA,QAAuB,EAAC,WAAW,KAAK,KAAK,OAAO,OAAO,eAAyB;CACxF,MAAM,EAAC,OAAO,gBAA4CC,kBAAU;CACpE,MAAMC,SAAiCC,oBAAU,OAAO,aAAa,KAAK;CAE1E,MAAMC,aAAiD,MAAM,QAAQ;CAErE,MAAMC,UAA8B,OAAO,aAAa;CAExD,MAAMC,UAAkB,OAAO,aAAa,UAAU;CAEtD,MAAMC,YAAgC,SAAS,aAAa;AAE5D,KAAI,CAAC,QACH,QAAO;AAGT,QACE,oBAAC;EACC,KAAK;EACL,KAAK;EACL,OAAO;EACP,WAAW,GACT,yBAAyB,IAAI,OAAO,CAAC,EACrC,yBAAyB,IAAI,QAAQ,KAAK,CAAC,EAC3C,OAAO,SACP,OAAO,SACP,UACD;GACD;;AAIN,mBAAe"}
|