@thunderid/react 0.11.3 → 0.11.4
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/dist/ThunderIDReactClient.d.ts +0 -17
- package/dist/ThunderIDReactClient.d.ts.map +1 -1
- package/dist/ThunderIDReactClient.js.map +1 -1
- package/dist/api/getUsersMe.d.ts +0 -17
- package/dist/api/getUsersMe.d.ts.map +1 -1
- package/dist/api/getUsersMe.js.map +1 -1
- package/dist/api/updateMeProfile.d.ts +0 -17
- package/dist/api/updateMeProfile.d.ts.map +1 -1
- package/dist/api/updateMeProfile.js.map +1 -1
- package/dist/cjs/ThunderIDReactClient.cjs.map +1 -1
- package/dist/cjs/api/getUsersMe.cjs.map +1 -1
- package/dist/cjs/api/updateMeProfile.cjs.map +1 -1
- package/dist/cjs/components/actions/SignInButton/BaseSignInButton.cjs.map +1 -1
- package/dist/cjs/components/actions/SignInButton/SignInButton.cjs.map +1 -1
- package/dist/cjs/components/actions/SignOutButton/BaseSignOutButton.cjs.map +1 -1
- package/dist/cjs/components/actions/SignOutButton/SignOutButton.cjs.map +1 -1
- package/dist/cjs/components/actions/SignUpButton/BaseSignUpButton.cjs.map +1 -1
- package/dist/cjs/components/actions/SignUpButton/SignUpButton.cjs.map +1 -1
- package/dist/cjs/components/adapters/Consent.cjs.map +1 -1
- package/dist/cjs/components/adapters/ConsentCheckboxList.cjs.map +1 -1
- package/dist/cjs/components/adapters/ConsentCheckboxList.styles.cjs.map +1 -1
- package/dist/cjs/components/adapters/FacebookButton.cjs.map +1 -1
- package/dist/cjs/components/adapters/FlowTimer.cjs.map +1 -1
- package/dist/cjs/components/adapters/GitHubButton.cjs.map +1 -1
- package/dist/cjs/components/adapters/GoogleButton.cjs.map +1 -1
- package/dist/cjs/components/adapters/ImageComponent.cjs.map +1 -1
- package/dist/cjs/components/adapters/LinkedInButton.cjs.map +1 -1
- package/dist/cjs/components/adapters/MicrosoftButton.cjs.map +1 -1
- package/dist/cjs/components/adapters/SignInWithEthereumButton.cjs.map +1 -1
- package/dist/cjs/components/adapters/SmsOtpButton.cjs.map +1 -1
- package/dist/cjs/components/auth/Callback/Callback.cjs.map +1 -1
- package/dist/cjs/components/auth/Callback/OAuthCallback.cjs.map +1 -1
- package/dist/cjs/components/auth/Callback/TokenCallback.cjs.map +1 -1
- package/dist/cjs/components/control/Loading.cjs.map +1 -1
- package/dist/cjs/components/control/SignedIn.cjs.map +1 -1
- package/dist/cjs/components/control/SignedOut.cjs.map +1 -1
- package/dist/cjs/components/factories/FieldFactory.cjs.map +1 -1
- package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.cjs.map +1 -1
- package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/LanguageSwitcher/LanguageSwitcher.cjs.map +1 -1
- package/dist/cjs/components/presentation/User/BaseUser.cjs.map +1 -1
- package/dist/cjs/components/presentation/User/User.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserAvatar/BaseUserAvatar.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserAvatar/UserAvatar.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserDropdown/UserDropdown.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserProfile/UserProfile.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/AcceptInvite/AcceptInvite.cjs +3 -4
- package/dist/cjs/components/presentation/auth/AcceptInvite/AcceptInvite.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/InviteUser/InviteUser.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/Recovery/BaseRecovery.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/Recovery/Recovery.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignIn/SignIn.cjs +10 -1
- package/dist/cjs/components/presentation/auth/SignIn/SignIn.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignUp/SignUp.cjs.map +1 -1
- package/dist/cjs/components/primitives/AffixedField/AffixedField.cjs.map +1 -1
- package/dist/cjs/components/primitives/AffixedField/AffixedField.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Alert/Alert.cjs.map +1 -1
- package/dist/cjs/components/primitives/Alert/Alert.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Avatar/Avatar.cjs.map +1 -1
- package/dist/cjs/components/primitives/Avatar/Avatar.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Button/Button.cjs.map +1 -1
- package/dist/cjs/components/primitives/Button/Button.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Card/Card.cjs.map +1 -1
- package/dist/cjs/components/primitives/Card/Card.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/cjs/components/primitives/Checkbox/Checkbox.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/CopyableText/CopyableText.cjs.map +1 -1
- package/dist/cjs/components/primitives/CopyableText/CopyableText.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/DatePicker/DatePicker.cjs.map +1 -1
- package/dist/cjs/components/primitives/DatePicker/DatePicker.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Dialog/Dialog.cjs.map +1 -1
- package/dist/cjs/components/primitives/Dialog/Dialog.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Divider/Divider.cjs.map +1 -1
- package/dist/cjs/components/primitives/Divider/Divider.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/FormControl/FormControl.cjs.map +1 -1
- package/dist/cjs/components/primitives/FormControl/FormControl.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/ArrowLeftRight.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/ArrowRightLeft.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/BuildingAlt.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/Check.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/ChevronDown.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/CircleAlert.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/CircleCheck.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/Eye.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/EyeOff.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/Info.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/LogOut.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/Plus.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/TriangleAlert.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/User.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/X.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/flowIconRegistry.cjs.map +1 -1
- package/dist/cjs/components/primitives/InputLabel/InputLabel.cjs.map +1 -1
- package/dist/cjs/components/primitives/InputLabel/InputLabel.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/KeyValueInput/KeyValueInput.cjs.map +1 -1
- package/dist/cjs/components/primitives/KeyValueInput/KeyValueInput.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Logo/Logo.cjs.map +1 -1
- package/dist/cjs/components/primitives/Logo/Logo.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/MultiInput/MultiInput.cjs.map +1 -1
- package/dist/cjs/components/primitives/MultiInput/MultiInput.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/OtpField/OtpField.cjs.map +1 -1
- package/dist/cjs/components/primitives/OtpField/OtpField.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/PasswordField/PasswordField.cjs.map +1 -1
- package/dist/cjs/components/primitives/PasswordField/PasswordField.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Select/Select.cjs.map +1 -1
- package/dist/cjs/components/primitives/Select/Select.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Spinner/Spinner.cjs.map +1 -1
- package/dist/cjs/components/primitives/Spinner/Spinner.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/TextField/TextField.cjs.map +1 -1
- package/dist/cjs/components/primitives/TextField/TextField.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Toggle/Toggle.cjs.map +1 -1
- package/dist/cjs/components/primitives/Toggle/Toggle.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/cjs/components/primitives/Tooltip/Tooltip.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Typography/Typography.cjs.map +1 -1
- package/dist/cjs/components/primitives/Typography/Typography.styles.cjs.map +1 -1
- package/dist/cjs/contexts/ComponentRenderer/ComponentRendererContext.cjs.map +1 -1
- package/dist/cjs/contexts/ComponentRenderer/ComponentRendererProvider.cjs.map +1 -1
- package/dist/cjs/contexts/Flow/FlowContext.cjs.map +1 -1
- package/dist/cjs/contexts/Flow/FlowProvider.cjs.map +1 -1
- package/dist/cjs/contexts/Flow/useFlow.cjs.map +1 -1
- package/dist/cjs/contexts/FlowMeta/FlowMetaContext.cjs.map +1 -1
- package/dist/cjs/contexts/FlowMeta/FlowMetaProvider.cjs.map +1 -1
- package/dist/cjs/contexts/FlowMeta/useFlowMeta.cjs.map +1 -1
- package/dist/cjs/contexts/I18n/ComponentPreferencesContext.cjs.map +1 -1
- package/dist/cjs/contexts/I18n/I18nContext.cjs.map +1 -1
- package/dist/cjs/contexts/I18n/I18nProvider.cjs.map +1 -1
- package/dist/cjs/contexts/I18n/useI18n.cjs.map +1 -1
- package/dist/cjs/contexts/Theme/ThemeContext.cjs.map +1 -1
- package/dist/cjs/contexts/Theme/ThemeProvider.cjs.map +1 -1
- package/dist/cjs/contexts/Theme/useTheme.cjs.map +1 -1
- package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs.map +1 -1
- package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs.map +1 -1
- package/dist/cjs/contexts/ThunderID/useThunderID.cjs.map +1 -1
- package/dist/cjs/contexts/User/UserContext.cjs.map +1 -1
- package/dist/cjs/contexts/User/UserProvider.cjs.map +1 -1
- package/dist/cjs/contexts/User/useUser.cjs.map +1 -1
- package/dist/cjs/hooks/useBrowserUrl.cjs.map +1 -1
- package/dist/cjs/hooks/useForm.cjs.map +1 -1
- package/dist/cjs/hooks/useOAuthCallback.cjs.map +1 -1
- package/dist/cjs/hooks/useTranslation.cjs.map +1 -1
- package/dist/cjs/utils/applyThemeToDOM.cjs.map +1 -1
- package/dist/cjs/utils/buildThemeConfigFromFlowMeta.cjs.map +1 -1
- package/dist/cjs/utils/composeAffixedInputs.cjs.map +1 -1
- package/dist/cjs/utils/flowTransformer.cjs.map +1 -1
- package/dist/cjs/utils/getAuthComponentHeadings.cjs.map +1 -1
- package/dist/cjs/utils/getDisplayName.cjs.map +1 -1
- package/dist/cjs/utils/getMappedUserProfileValue.cjs.map +1 -1
- package/dist/cjs/utils/normalizeThemeConfig.cjs.map +1 -1
- package/dist/cjs/utils/oauth.cjs.map +1 -1
- package/dist/cjs/utils/passkey.cjs.map +1 -1
- package/dist/cjs/utils/resolveTranslationsInArray.cjs.map +1 -1
- package/dist/cjs/utils/resolveTranslationsInObject.cjs.map +1 -1
- package/dist/components/actions/SignInButton/BaseSignInButton.d.ts +0 -17
- package/dist/components/actions/SignInButton/BaseSignInButton.d.ts.map +1 -1
- package/dist/components/actions/SignInButton/BaseSignInButton.js.map +1 -1
- package/dist/components/actions/SignInButton/SignInButton.d.ts +0 -17
- package/dist/components/actions/SignInButton/SignInButton.d.ts.map +1 -1
- package/dist/components/actions/SignInButton/SignInButton.js.map +1 -1
- package/dist/components/actions/SignOutButton/BaseSignOutButton.d.ts +0 -17
- package/dist/components/actions/SignOutButton/BaseSignOutButton.d.ts.map +1 -1
- package/dist/components/actions/SignOutButton/BaseSignOutButton.js.map +1 -1
- package/dist/components/actions/SignOutButton/SignOutButton.d.ts +0 -17
- package/dist/components/actions/SignOutButton/SignOutButton.d.ts.map +1 -1
- package/dist/components/actions/SignOutButton/SignOutButton.js.map +1 -1
- package/dist/components/actions/SignUpButton/BaseSignUpButton.d.ts +0 -17
- package/dist/components/actions/SignUpButton/BaseSignUpButton.d.ts.map +1 -1
- package/dist/components/actions/SignUpButton/BaseSignUpButton.js.map +1 -1
- package/dist/components/actions/SignUpButton/SignUpButton.d.ts +0 -17
- package/dist/components/actions/SignUpButton/SignUpButton.d.ts.map +1 -1
- package/dist/components/actions/SignUpButton/SignUpButton.js.map +1 -1
- package/dist/components/adapters/Consent.d.ts +0 -17
- package/dist/components/adapters/Consent.d.ts.map +1 -1
- package/dist/components/adapters/Consent.js.map +1 -1
- package/dist/components/adapters/ConsentCheckboxList.d.ts +0 -17
- package/dist/components/adapters/ConsentCheckboxList.d.ts.map +1 -1
- package/dist/components/adapters/ConsentCheckboxList.js.map +1 -1
- package/dist/components/adapters/ConsentCheckboxList.styles.d.ts +0 -17
- package/dist/components/adapters/ConsentCheckboxList.styles.d.ts.map +1 -1
- package/dist/components/adapters/ConsentCheckboxList.styles.js.map +1 -1
- package/dist/components/adapters/FacebookButton.d.ts +0 -17
- package/dist/components/adapters/FacebookButton.d.ts.map +1 -1
- package/dist/components/adapters/FacebookButton.js.map +1 -1
- package/dist/components/adapters/FlowTimer.d.ts +0 -17
- package/dist/components/adapters/FlowTimer.d.ts.map +1 -1
- package/dist/components/adapters/FlowTimer.js.map +1 -1
- package/dist/components/adapters/GitHubButton.d.ts +0 -17
- package/dist/components/adapters/GitHubButton.d.ts.map +1 -1
- package/dist/components/adapters/GitHubButton.js.map +1 -1
- package/dist/components/adapters/GoogleButton.d.ts +0 -17
- package/dist/components/adapters/GoogleButton.d.ts.map +1 -1
- package/dist/components/adapters/GoogleButton.js.map +1 -1
- package/dist/components/adapters/ImageComponent.d.ts +0 -17
- package/dist/components/adapters/ImageComponent.d.ts.map +1 -1
- package/dist/components/adapters/ImageComponent.js.map +1 -1
- package/dist/components/adapters/LinkedInButton.d.ts +0 -17
- package/dist/components/adapters/LinkedInButton.d.ts.map +1 -1
- package/dist/components/adapters/LinkedInButton.js.map +1 -1
- package/dist/components/adapters/MicrosoftButton.d.ts +0 -17
- package/dist/components/adapters/MicrosoftButton.d.ts.map +1 -1
- package/dist/components/adapters/MicrosoftButton.js.map +1 -1
- package/dist/components/adapters/SignInWithEthereumButton.d.ts +0 -17
- package/dist/components/adapters/SignInWithEthereumButton.d.ts.map +1 -1
- package/dist/components/adapters/SignInWithEthereumButton.js.map +1 -1
- package/dist/components/adapters/SmsOtpButton.d.ts +0 -17
- package/dist/components/adapters/SmsOtpButton.d.ts.map +1 -1
- package/dist/components/adapters/SmsOtpButton.js.map +1 -1
- package/dist/components/auth/Callback/Callback.d.ts.map +1 -1
- package/dist/components/auth/Callback/Callback.js.map +1 -1
- package/dist/components/auth/Callback/OAuthCallback.d.ts +0 -17
- package/dist/components/auth/Callback/OAuthCallback.d.ts.map +1 -1
- package/dist/components/auth/Callback/OAuthCallback.js.map +1 -1
- package/dist/components/auth/Callback/TokenCallback.d.ts +0 -16
- package/dist/components/auth/Callback/TokenCallback.d.ts.map +1 -1
- package/dist/components/auth/Callback/TokenCallback.js.map +1 -1
- package/dist/components/control/Loading.d.ts +0 -17
- package/dist/components/control/Loading.d.ts.map +1 -1
- package/dist/components/control/Loading.js.map +1 -1
- package/dist/components/control/SignedIn.d.ts +0 -17
- package/dist/components/control/SignedIn.d.ts.map +1 -1
- package/dist/components/control/SignedIn.js.map +1 -1
- package/dist/components/control/SignedOut.d.ts +0 -17
- package/dist/components/control/SignedOut.d.ts.map +1 -1
- package/dist/components/control/SignedOut.js.map +1 -1
- package/dist/components/factories/FieldFactory.d.ts +0 -17
- package/dist/components/factories/FieldFactory.d.ts.map +1 -1
- package/dist/components/factories/FieldFactory.js.map +1 -1
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.d.ts +0 -17
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.d.ts.map +1 -1
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.js.map +1 -1
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.d.ts +0 -17
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.d.ts.map +1 -1
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.js.map +1 -1
- package/dist/components/presentation/LanguageSwitcher/LanguageSwitcher.d.ts +0 -17
- package/dist/components/presentation/LanguageSwitcher/LanguageSwitcher.d.ts.map +1 -1
- package/dist/components/presentation/LanguageSwitcher/LanguageSwitcher.js.map +1 -1
- package/dist/components/presentation/User/BaseUser.d.ts +0 -17
- package/dist/components/presentation/User/BaseUser.d.ts.map +1 -1
- package/dist/components/presentation/User/BaseUser.js.map +1 -1
- package/dist/components/presentation/User/User.d.ts +0 -17
- package/dist/components/presentation/User/User.d.ts.map +1 -1
- package/dist/components/presentation/User/User.js.map +1 -1
- package/dist/components/presentation/UserAvatar/BaseUserAvatar.d.ts +0 -17
- package/dist/components/presentation/UserAvatar/BaseUserAvatar.d.ts.map +1 -1
- package/dist/components/presentation/UserAvatar/BaseUserAvatar.js.map +1 -1
- package/dist/components/presentation/UserAvatar/UserAvatar.d.ts +0 -17
- package/dist/components/presentation/UserAvatar/UserAvatar.d.ts.map +1 -1
- package/dist/components/presentation/UserAvatar/UserAvatar.js.map +1 -1
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts +0 -17
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts.map +1 -1
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.js.map +1 -1
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.d.ts +0 -17
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.d.ts.map +1 -1
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.js.map +1 -1
- package/dist/components/presentation/UserDropdown/UserDropdown.d.ts +0 -17
- package/dist/components/presentation/UserDropdown/UserDropdown.d.ts.map +1 -1
- package/dist/components/presentation/UserDropdown/UserDropdown.js.map +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts +0 -17
- package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts.map +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.js.map +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.styles.d.ts +0 -17
- package/dist/components/presentation/UserProfile/BaseUserProfile.styles.d.ts.map +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.styles.js.map +1 -1
- package/dist/components/presentation/UserProfile/UserProfile.d.ts +0 -17
- package/dist/components/presentation/UserProfile/UserProfile.d.ts.map +1 -1
- package/dist/components/presentation/UserProfile/UserProfile.js.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/AcceptInvite.d.ts +0 -17
- package/dist/components/presentation/auth/AcceptInvite/AcceptInvite.d.ts.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/AcceptInvite.js +2 -4
- package/dist/components/presentation/auth/AcceptInvite/AcceptInvite.js.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.d.ts +0 -17
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.d.ts.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.js.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.d.ts +0 -17
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.d.ts.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.js.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/index.d.ts +0 -17
- package/dist/components/presentation/auth/AcceptInvite/index.d.ts.map +1 -1
- package/dist/components/presentation/auth/AuthOptionFactory.d.ts +0 -17
- package/dist/components/presentation/auth/AuthOptionFactory.d.ts.map +1 -1
- package/dist/components/presentation/auth/AuthOptionFactory.js.map +1 -1
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.d.ts +0 -17
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.d.ts.map +1 -1
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.js.map +1 -1
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.d.ts +0 -17
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.d.ts.map +1 -1
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.js.map +1 -1
- package/dist/components/presentation/auth/InviteUser/InviteUser.d.ts +0 -17
- package/dist/components/presentation/auth/InviteUser/InviteUser.d.ts.map +1 -1
- package/dist/components/presentation/auth/InviteUser/InviteUser.js.map +1 -1
- package/dist/components/presentation/auth/InviteUser/index.d.ts +0 -17
- package/dist/components/presentation/auth/InviteUser/index.d.ts.map +1 -1
- package/dist/components/presentation/auth/Recovery/BaseRecovery.d.ts +0 -17
- package/dist/components/presentation/auth/Recovery/BaseRecovery.d.ts.map +1 -1
- package/dist/components/presentation/auth/Recovery/BaseRecovery.js.map +1 -1
- package/dist/components/presentation/auth/Recovery/Recovery.d.ts +0 -17
- package/dist/components/presentation/auth/Recovery/Recovery.d.ts.map +1 -1
- package/dist/components/presentation/auth/Recovery/Recovery.js.map +1 -1
- package/dist/components/presentation/auth/SignIn/BaseSignIn.d.ts +0 -17
- package/dist/components/presentation/auth/SignIn/BaseSignIn.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignIn/BaseSignIn.js.map +1 -1
- package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.d.ts +0 -17
- package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.js.map +1 -1
- package/dist/components/presentation/auth/SignIn/SignIn.d.ts +0 -17
- package/dist/components/presentation/auth/SignIn/SignIn.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignIn/SignIn.js +10 -1
- package/dist/components/presentation/auth/SignIn/SignIn.js.map +1 -1
- package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts +0 -17
- package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignUp/BaseSignUp.js.map +1 -1
- package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.d.ts +0 -17
- package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.js.map +1 -1
- package/dist/components/presentation/auth/SignUp/SignUp.d.ts +0 -17
- package/dist/components/presentation/auth/SignUp/SignUp.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignUp/SignUp.js.map +1 -1
- package/dist/components/primitives/AffixedField/AffixedField.d.ts +0 -17
- package/dist/components/primitives/AffixedField/AffixedField.d.ts.map +1 -1
- package/dist/components/primitives/AffixedField/AffixedField.js.map +1 -1
- package/dist/components/primitives/AffixedField/AffixedField.styles.d.ts +0 -17
- package/dist/components/primitives/AffixedField/AffixedField.styles.d.ts.map +1 -1
- package/dist/components/primitives/AffixedField/AffixedField.styles.js.map +1 -1
- package/dist/components/primitives/AffixedField/index.d.ts +0 -17
- package/dist/components/primitives/AffixedField/index.d.ts.map +1 -1
- package/dist/components/primitives/Alert/Alert.d.ts +0 -17
- package/dist/components/primitives/Alert/Alert.d.ts.map +1 -1
- package/dist/components/primitives/Alert/Alert.js.map +1 -1
- package/dist/components/primitives/Alert/Alert.styles.d.ts +0 -17
- package/dist/components/primitives/Alert/Alert.styles.d.ts.map +1 -1
- package/dist/components/primitives/Alert/Alert.styles.js.map +1 -1
- package/dist/components/primitives/Avatar/Avatar.d.ts +0 -17
- package/dist/components/primitives/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/primitives/Avatar/Avatar.js.map +1 -1
- package/dist/components/primitives/Avatar/Avatar.styles.d.ts +0 -17
- package/dist/components/primitives/Avatar/Avatar.styles.d.ts.map +1 -1
- package/dist/components/primitives/Avatar/Avatar.styles.js.map +1 -1
- package/dist/components/primitives/Button/Button.d.ts +0 -17
- package/dist/components/primitives/Button/Button.d.ts.map +1 -1
- package/dist/components/primitives/Button/Button.js.map +1 -1
- package/dist/components/primitives/Button/Button.styles.d.ts +0 -17
- package/dist/components/primitives/Button/Button.styles.d.ts.map +1 -1
- package/dist/components/primitives/Button/Button.styles.js.map +1 -1
- package/dist/components/primitives/Card/Card.d.ts +0 -17
- package/dist/components/primitives/Card/Card.d.ts.map +1 -1
- package/dist/components/primitives/Card/Card.js.map +1 -1
- package/dist/components/primitives/Card/Card.styles.d.ts +0 -17
- package/dist/components/primitives/Card/Card.styles.d.ts.map +1 -1
- package/dist/components/primitives/Card/Card.styles.js.map +1 -1
- package/dist/components/primitives/Checkbox/Checkbox.d.ts +0 -17
- package/dist/components/primitives/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/primitives/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/primitives/Checkbox/Checkbox.styles.d.ts +0 -17
- package/dist/components/primitives/Checkbox/Checkbox.styles.d.ts.map +1 -1
- package/dist/components/primitives/Checkbox/Checkbox.styles.js.map +1 -1
- package/dist/components/primitives/CopyableText/CopyableText.d.ts +0 -17
- package/dist/components/primitives/CopyableText/CopyableText.d.ts.map +1 -1
- package/dist/components/primitives/CopyableText/CopyableText.js.map +1 -1
- package/dist/components/primitives/CopyableText/CopyableText.styles.d.ts +0 -17
- package/dist/components/primitives/CopyableText/CopyableText.styles.d.ts.map +1 -1
- package/dist/components/primitives/CopyableText/CopyableText.styles.js.map +1 -1
- package/dist/components/primitives/CopyableText/index.d.ts +0 -17
- package/dist/components/primitives/CopyableText/index.d.ts.map +1 -1
- package/dist/components/primitives/DatePicker/DatePicker.d.ts +0 -17
- package/dist/components/primitives/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/primitives/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/primitives/DatePicker/DatePicker.styles.d.ts +0 -17
- package/dist/components/primitives/DatePicker/DatePicker.styles.d.ts.map +1 -1
- package/dist/components/primitives/DatePicker/DatePicker.styles.js.map +1 -1
- package/dist/components/primitives/Dialog/Dialog.d.ts +0 -17
- package/dist/components/primitives/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/primitives/Dialog/Dialog.js.map +1 -1
- package/dist/components/primitives/Dialog/Dialog.styles.d.ts +0 -17
- package/dist/components/primitives/Dialog/Dialog.styles.d.ts.map +1 -1
- package/dist/components/primitives/Dialog/Dialog.styles.js.map +1 -1
- package/dist/components/primitives/Divider/Divider.d.ts +0 -17
- package/dist/components/primitives/Divider/Divider.d.ts.map +1 -1
- package/dist/components/primitives/Divider/Divider.js.map +1 -1
- package/dist/components/primitives/Divider/Divider.styles.d.ts +0 -17
- package/dist/components/primitives/Divider/Divider.styles.d.ts.map +1 -1
- package/dist/components/primitives/Divider/Divider.styles.js.map +1 -1
- package/dist/components/primitives/FormControl/FormControl.d.ts +0 -17
- package/dist/components/primitives/FormControl/FormControl.d.ts.map +1 -1
- package/dist/components/primitives/FormControl/FormControl.js.map +1 -1
- package/dist/components/primitives/FormControl/FormControl.styles.d.ts +0 -17
- package/dist/components/primitives/FormControl/FormControl.styles.d.ts.map +1 -1
- package/dist/components/primitives/FormControl/FormControl.styles.js.map +1 -1
- package/dist/components/primitives/Icons/ArrowLeftRight.d.ts +0 -17
- package/dist/components/primitives/Icons/ArrowLeftRight.d.ts.map +1 -1
- package/dist/components/primitives/Icons/ArrowLeftRight.js.map +1 -1
- package/dist/components/primitives/Icons/ArrowRightLeft.d.ts +0 -17
- package/dist/components/primitives/Icons/ArrowRightLeft.d.ts.map +1 -1
- package/dist/components/primitives/Icons/ArrowRightLeft.js.map +1 -1
- package/dist/components/primitives/Icons/Building.d.ts +0 -17
- package/dist/components/primitives/Icons/Building.d.ts.map +1 -1
- package/dist/components/primitives/Icons/BuildingAlt.d.ts +0 -17
- package/dist/components/primitives/Icons/BuildingAlt.d.ts.map +1 -1
- package/dist/components/primitives/Icons/BuildingAlt.js.map +1 -1
- package/dist/components/primitives/Icons/Check.d.ts +0 -17
- package/dist/components/primitives/Icons/Check.d.ts.map +1 -1
- package/dist/components/primitives/Icons/Check.js.map +1 -1
- package/dist/components/primitives/Icons/ChevronDown.d.ts +0 -17
- package/dist/components/primitives/Icons/ChevronDown.d.ts.map +1 -1
- package/dist/components/primitives/Icons/ChevronDown.js.map +1 -1
- package/dist/components/primitives/Icons/CircleAlert.d.ts +0 -17
- package/dist/components/primitives/Icons/CircleAlert.d.ts.map +1 -1
- package/dist/components/primitives/Icons/CircleAlert.js.map +1 -1
- package/dist/components/primitives/Icons/CircleCheck.d.ts +0 -17
- package/dist/components/primitives/Icons/CircleCheck.d.ts.map +1 -1
- package/dist/components/primitives/Icons/CircleCheck.js.map +1 -1
- package/dist/components/primitives/Icons/Eye.d.ts +0 -17
- package/dist/components/primitives/Icons/Eye.d.ts.map +1 -1
- package/dist/components/primitives/Icons/Eye.js.map +1 -1
- package/dist/components/primitives/Icons/EyeOff.d.ts +0 -17
- package/dist/components/primitives/Icons/EyeOff.d.ts.map +1 -1
- package/dist/components/primitives/Icons/EyeOff.js.map +1 -1
- package/dist/components/primitives/Icons/Info.d.ts +0 -17
- package/dist/components/primitives/Icons/Info.d.ts.map +1 -1
- package/dist/components/primitives/Icons/Info.js.map +1 -1
- package/dist/components/primitives/Icons/LogOut.d.ts +0 -17
- package/dist/components/primitives/Icons/LogOut.d.ts.map +1 -1
- package/dist/components/primitives/Icons/LogOut.js.map +1 -1
- package/dist/components/primitives/Icons/Plus.d.ts +0 -17
- package/dist/components/primitives/Icons/Plus.d.ts.map +1 -1
- package/dist/components/primitives/Icons/Plus.js.map +1 -1
- package/dist/components/primitives/Icons/TriangleAlert.d.ts +0 -17
- package/dist/components/primitives/Icons/TriangleAlert.d.ts.map +1 -1
- package/dist/components/primitives/Icons/TriangleAlert.js.map +1 -1
- package/dist/components/primitives/Icons/User.d.ts +0 -17
- package/dist/components/primitives/Icons/User.d.ts.map +1 -1
- package/dist/components/primitives/Icons/User.js.map +1 -1
- package/dist/components/primitives/Icons/X.d.ts +0 -17
- package/dist/components/primitives/Icons/X.d.ts.map +1 -1
- package/dist/components/primitives/Icons/X.js.map +1 -1
- package/dist/components/primitives/Icons/flowIconRegistry.d.ts +0 -17
- package/dist/components/primitives/Icons/flowIconRegistry.d.ts.map +1 -1
- package/dist/components/primitives/Icons/flowIconRegistry.js.map +1 -1
- package/dist/components/primitives/Icons/index.d.ts +0 -17
- package/dist/components/primitives/Icons/index.d.ts.map +1 -1
- package/dist/components/primitives/InputLabel/InputLabel.d.ts +0 -17
- package/dist/components/primitives/InputLabel/InputLabel.d.ts.map +1 -1
- package/dist/components/primitives/InputLabel/InputLabel.js.map +1 -1
- package/dist/components/primitives/InputLabel/InputLabel.styles.d.ts +0 -17
- package/dist/components/primitives/InputLabel/InputLabel.styles.d.ts.map +1 -1
- package/dist/components/primitives/InputLabel/InputLabel.styles.js.map +1 -1
- package/dist/components/primitives/KeyValueInput/KeyValueInput.d.ts +0 -17
- package/dist/components/primitives/KeyValueInput/KeyValueInput.d.ts.map +1 -1
- package/dist/components/primitives/KeyValueInput/KeyValueInput.js.map +1 -1
- package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.d.ts +0 -17
- package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.d.ts.map +1 -1
- package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.js.map +1 -1
- package/dist/components/primitives/Logo/Logo.d.ts +0 -17
- package/dist/components/primitives/Logo/Logo.d.ts.map +1 -1
- package/dist/components/primitives/Logo/Logo.js.map +1 -1
- package/dist/components/primitives/Logo/Logo.styles.d.ts +0 -17
- package/dist/components/primitives/Logo/Logo.styles.d.ts.map +1 -1
- package/dist/components/primitives/Logo/Logo.styles.js.map +1 -1
- package/dist/components/primitives/MultiInput/MultiInput.d.ts +0 -17
- package/dist/components/primitives/MultiInput/MultiInput.d.ts.map +1 -1
- package/dist/components/primitives/MultiInput/MultiInput.js.map +1 -1
- package/dist/components/primitives/MultiInput/MultiInput.styles.d.ts +0 -17
- package/dist/components/primitives/MultiInput/MultiInput.styles.d.ts.map +1 -1
- package/dist/components/primitives/MultiInput/MultiInput.styles.js.map +1 -1
- package/dist/components/primitives/OtpField/OtpField.d.ts +0 -17
- package/dist/components/primitives/OtpField/OtpField.d.ts.map +1 -1
- package/dist/components/primitives/OtpField/OtpField.js.map +1 -1
- package/dist/components/primitives/OtpField/OtpField.styles.d.ts +0 -17
- package/dist/components/primitives/OtpField/OtpField.styles.d.ts.map +1 -1
- package/dist/components/primitives/OtpField/OtpField.styles.js.map +1 -1
- package/dist/components/primitives/PasswordField/PasswordField.d.ts +0 -17
- package/dist/components/primitives/PasswordField/PasswordField.d.ts.map +1 -1
- package/dist/components/primitives/PasswordField/PasswordField.js.map +1 -1
- package/dist/components/primitives/PasswordField/PasswordField.styles.d.ts +0 -17
- package/dist/components/primitives/PasswordField/PasswordField.styles.d.ts.map +1 -1
- package/dist/components/primitives/PasswordField/PasswordField.styles.js.map +1 -1
- package/dist/components/primitives/Select/Select.d.ts +0 -17
- package/dist/components/primitives/Select/Select.d.ts.map +1 -1
- package/dist/components/primitives/Select/Select.js.map +1 -1
- package/dist/components/primitives/Select/Select.styles.d.ts +0 -17
- package/dist/components/primitives/Select/Select.styles.d.ts.map +1 -1
- package/dist/components/primitives/Select/Select.styles.js.map +1 -1
- package/dist/components/primitives/Spinner/Spinner.d.ts +0 -17
- package/dist/components/primitives/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/primitives/Spinner/Spinner.js.map +1 -1
- package/dist/components/primitives/Spinner/Spinner.styles.d.ts +0 -17
- package/dist/components/primitives/Spinner/Spinner.styles.d.ts.map +1 -1
- package/dist/components/primitives/Spinner/Spinner.styles.js.map +1 -1
- package/dist/components/primitives/TextField/TextField.d.ts +0 -17
- package/dist/components/primitives/TextField/TextField.d.ts.map +1 -1
- package/dist/components/primitives/TextField/TextField.js.map +1 -1
- package/dist/components/primitives/TextField/TextField.styles.d.ts +0 -17
- package/dist/components/primitives/TextField/TextField.styles.d.ts.map +1 -1
- package/dist/components/primitives/TextField/TextField.styles.js.map +1 -1
- package/dist/components/primitives/Toggle/Toggle.d.ts +0 -17
- package/dist/components/primitives/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/primitives/Toggle/Toggle.js.map +1 -1
- package/dist/components/primitives/Toggle/Toggle.styles.d.ts +0 -17
- package/dist/components/primitives/Toggle/Toggle.styles.d.ts.map +1 -1
- package/dist/components/primitives/Toggle/Toggle.styles.js.map +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.d.ts +0 -17
- package/dist/components/primitives/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.styles.d.ts +0 -17
- package/dist/components/primitives/Tooltip/Tooltip.styles.d.ts.map +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.styles.js.map +1 -1
- package/dist/components/primitives/Typography/Typography.d.ts +0 -17
- package/dist/components/primitives/Typography/Typography.d.ts.map +1 -1
- package/dist/components/primitives/Typography/Typography.js.map +1 -1
- package/dist/components/primitives/Typography/Typography.styles.d.ts +0 -17
- package/dist/components/primitives/Typography/Typography.styles.d.ts.map +1 -1
- package/dist/components/primitives/Typography/Typography.styles.js.map +1 -1
- package/dist/contexts/ComponentRenderer/ComponentRendererContext.d.ts +0 -17
- package/dist/contexts/ComponentRenderer/ComponentRendererContext.d.ts.map +1 -1
- package/dist/contexts/ComponentRenderer/ComponentRendererContext.js.map +1 -1
- package/dist/contexts/ComponentRenderer/ComponentRendererProvider.d.ts +0 -17
- package/dist/contexts/ComponentRenderer/ComponentRendererProvider.d.ts.map +1 -1
- package/dist/contexts/ComponentRenderer/ComponentRendererProvider.js.map +1 -1
- package/dist/contexts/Flow/FlowContext.d.ts +0 -17
- package/dist/contexts/Flow/FlowContext.d.ts.map +1 -1
- package/dist/contexts/Flow/FlowContext.js.map +1 -1
- package/dist/contexts/Flow/FlowProvider.d.ts +0 -17
- package/dist/contexts/Flow/FlowProvider.d.ts.map +1 -1
- package/dist/contexts/Flow/FlowProvider.js.map +1 -1
- package/dist/contexts/Flow/useFlow.d.ts +0 -17
- package/dist/contexts/Flow/useFlow.d.ts.map +1 -1
- package/dist/contexts/Flow/useFlow.js.map +1 -1
- package/dist/contexts/FlowMeta/FlowMetaContext.d.ts +0 -17
- package/dist/contexts/FlowMeta/FlowMetaContext.d.ts.map +1 -1
- package/dist/contexts/FlowMeta/FlowMetaContext.js.map +1 -1
- package/dist/contexts/FlowMeta/FlowMetaProvider.d.ts +0 -17
- package/dist/contexts/FlowMeta/FlowMetaProvider.d.ts.map +1 -1
- package/dist/contexts/FlowMeta/FlowMetaProvider.js.map +1 -1
- package/dist/contexts/FlowMeta/useFlowMeta.d.ts +0 -17
- package/dist/contexts/FlowMeta/useFlowMeta.d.ts.map +1 -1
- package/dist/contexts/FlowMeta/useFlowMeta.js.map +1 -1
- package/dist/contexts/I18n/ComponentPreferencesContext.d.ts +0 -17
- package/dist/contexts/I18n/ComponentPreferencesContext.d.ts.map +1 -1
- package/dist/contexts/I18n/ComponentPreferencesContext.js.map +1 -1
- package/dist/contexts/I18n/I18nContext.d.ts +0 -17
- package/dist/contexts/I18n/I18nContext.d.ts.map +1 -1
- package/dist/contexts/I18n/I18nContext.js.map +1 -1
- package/dist/contexts/I18n/I18nProvider.d.ts +0 -17
- package/dist/contexts/I18n/I18nProvider.d.ts.map +1 -1
- package/dist/contexts/I18n/I18nProvider.js.map +1 -1
- package/dist/contexts/I18n/useI18n.d.ts +0 -17
- package/dist/contexts/I18n/useI18n.d.ts.map +1 -1
- package/dist/contexts/I18n/useI18n.js.map +1 -1
- package/dist/contexts/Theme/ThemeContext.d.ts +0 -17
- package/dist/contexts/Theme/ThemeContext.d.ts.map +1 -1
- package/dist/contexts/Theme/ThemeContext.js.map +1 -1
- package/dist/contexts/Theme/ThemeProvider.d.ts +0 -17
- package/dist/contexts/Theme/ThemeProvider.d.ts.map +1 -1
- package/dist/contexts/Theme/ThemeProvider.js.map +1 -1
- package/dist/contexts/Theme/types.d.ts +0 -17
- package/dist/contexts/Theme/types.d.ts.map +1 -1
- package/dist/contexts/Theme/useTheme.d.ts +0 -17
- package/dist/contexts/Theme/useTheme.d.ts.map +1 -1
- package/dist/contexts/Theme/useTheme.js.map +1 -1
- package/dist/contexts/ThunderID/ThunderIDContext.d.ts +0 -17
- package/dist/contexts/ThunderID/ThunderIDContext.d.ts.map +1 -1
- package/dist/contexts/ThunderID/ThunderIDContext.js.map +1 -1
- package/dist/contexts/ThunderID/ThunderIDProvider.d.ts +0 -17
- package/dist/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -1
- package/dist/contexts/ThunderID/ThunderIDProvider.js.map +1 -1
- package/dist/contexts/ThunderID/useThunderID.d.ts +0 -17
- package/dist/contexts/ThunderID/useThunderID.d.ts.map +1 -1
- package/dist/contexts/ThunderID/useThunderID.js.map +1 -1
- package/dist/contexts/User/UserContext.d.ts +0 -17
- package/dist/contexts/User/UserContext.d.ts.map +1 -1
- package/dist/contexts/User/UserContext.js.map +1 -1
- package/dist/contexts/User/UserProvider.d.ts +0 -17
- package/dist/contexts/User/UserProvider.d.ts.map +1 -1
- package/dist/contexts/User/UserProvider.js.map +1 -1
- package/dist/contexts/User/useUser.d.ts +0 -17
- package/dist/contexts/User/useUser.d.ts.map +1 -1
- package/dist/contexts/User/useUser.js.map +1 -1
- package/dist/hooks/useBrowserUrl.d.ts +0 -17
- package/dist/hooks/useBrowserUrl.d.ts.map +1 -1
- package/dist/hooks/useBrowserUrl.js.map +1 -1
- package/dist/hooks/useForm.d.ts +0 -17
- package/dist/hooks/useForm.d.ts.map +1 -1
- package/dist/hooks/useForm.js.map +1 -1
- package/dist/hooks/useOAuthCallback.d.ts +0 -17
- package/dist/hooks/useOAuthCallback.d.ts.map +1 -1
- package/dist/hooks/useOAuthCallback.js.map +1 -1
- package/dist/hooks/useTranslation.d.ts +0 -17
- package/dist/hooks/useTranslation.d.ts.map +1 -1
- package/dist/hooks/useTranslation.js.map +1 -1
- package/dist/index.d.ts +0 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/models/adapters.d.ts +0 -17
- package/dist/models/adapters.d.ts.map +1 -1
- package/dist/models/config.d.ts +0 -17
- package/dist/models/config.d.ts.map +1 -1
- package/dist/utils/applyThemeToDOM.d.ts +0 -17
- package/dist/utils/applyThemeToDOM.d.ts.map +1 -1
- package/dist/utils/applyThemeToDOM.js.map +1 -1
- package/dist/utils/buildThemeConfigFromFlowMeta.d.ts +0 -17
- package/dist/utils/buildThemeConfigFromFlowMeta.d.ts.map +1 -1
- package/dist/utils/buildThemeConfigFromFlowMeta.js.map +1 -1
- package/dist/utils/composeAffixedInputs.d.ts +0 -17
- package/dist/utils/composeAffixedInputs.d.ts.map +1 -1
- package/dist/utils/composeAffixedInputs.js.map +1 -1
- package/dist/utils/flowTransformer.d.ts +0 -17
- package/dist/utils/flowTransformer.d.ts.map +1 -1
- package/dist/utils/flowTransformer.js.map +1 -1
- package/dist/utils/getAuthComponentHeadings.d.ts +0 -17
- package/dist/utils/getAuthComponentHeadings.d.ts.map +1 -1
- package/dist/utils/getAuthComponentHeadings.js.map +1 -1
- package/dist/utils/getDisplayName.d.ts +0 -17
- package/dist/utils/getDisplayName.d.ts.map +1 -1
- package/dist/utils/getDisplayName.js.map +1 -1
- package/dist/utils/getMappedUserProfileValue.d.ts +0 -17
- package/dist/utils/getMappedUserProfileValue.d.ts.map +1 -1
- package/dist/utils/getMappedUserProfileValue.js.map +1 -1
- package/dist/utils/normalizeThemeConfig.d.ts +0 -17
- package/dist/utils/normalizeThemeConfig.d.ts.map +1 -1
- package/dist/utils/normalizeThemeConfig.js.map +1 -1
- package/dist/utils/oauth.d.ts +0 -17
- package/dist/utils/oauth.d.ts.map +1 -1
- package/dist/utils/oauth.js.map +1 -1
- package/dist/utils/passkey.d.ts +0 -17
- package/dist/utils/passkey.d.ts.map +1 -1
- package/dist/utils/passkey.js.map +1 -1
- package/dist/utils/resolveTranslationsInArray.d.ts +0 -17
- package/dist/utils/resolveTranslationsInArray.d.ts.map +1 -1
- package/dist/utils/resolveTranslationsInArray.js.map +1 -1
- package/dist/utils/resolveTranslationsInObject.d.ts +0 -17
- package/dist/utils/resolveTranslationsInObject.d.ts.map +1 -1
- package/dist/utils/resolveTranslationsInObject.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logo.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/Logo/Logo.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Logo.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/Logo/Logo.styles.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AAGzC,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEpD;;;;;;GAMG;AACH,QAAA,MAAM,SAAS,GAAI,OAAO,KAAK,EAAE,aAAa,MAAM,EAAE,MAAM,QAAQ,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CA+D5D,CAAC;AAEjC,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logo.styles.js","names":["baseLogo: string","smallLogo: string","mediumLogo: string","largeLogo: string","sizeStyles: Record<string, string>"],"sources":["../../../../src/components/primitives/Logo/Logo.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"Logo.styles.js","names":["baseLogo: string","smallLogo: string","mediumLogo: string","largeLogo: string","sizeStyles: Record<string, string>"],"sources":["../../../../src/components/primitives/Logo/Logo.styles.ts"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {css} from '@emotion/css';\nimport {Theme} from '@thunderid/browser';\nimport {useMemo} from 'react';\n\nexport type LogoSize = 'small' | 'medium' | 'large';\n\n/**\n * Creates styles for the Logo 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 size - The size of the logo\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (theme: Theme, colorScheme: string, size: LogoSize): Record<string, string> =>\n useMemo(() => {\n const baseLogo: string = css`\n width: auto;\n object-fit: contain;\n display: block;\n `;\n\n const smallLogo: string = css`\n height: 32px;\n max-width: 120px;\n `;\n\n const mediumLogo: string = css`\n height: 48px;\n max-width: 180px;\n `;\n\n const largeLogo: string = css`\n height: 64px;\n max-width: 240px;\n `;\n\n const sizeStyles: Record<string, string> = {\n large: largeLogo,\n medium: mediumLogo,\n small: smallLogo,\n };\n\n const baseEmoji: string = css`\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n `;\n\n const emojiSizeStyles: Record<LogoSize, string> = {\n large: css`\n width: 64px;\n height: 64px;\n font-size: 36px;\n `,\n medium: css`\n width: 48px;\n height: 48px;\n font-size: 28px;\n `,\n small: css`\n width: 32px;\n height: 32px;\n font-size: 20px;\n `,\n };\n\n return {\n emoji: baseEmoji,\n emojiSize: emojiSizeStyles[size],\n large: largeLogo,\n logo: baseLogo,\n medium: mediumLogo,\n size: sizeStyles[size],\n small: smallLogo,\n };\n }, [theme, colorScheme, size]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;AAgBA,MAAM,aAAa,OAAc,aAAqB,SACpD,cAAc;CACZ,MAAMA,WAAmB,GAAG;;;;;CAM5B,MAAMC,YAAoB,GAAG;;;;CAK7B,MAAMC,aAAqB,GAAG;;;;CAK9B,MAAMC,YAAoB,GAAG;;;;CAK7B,MAAMC,aAAqC;EACzC,OAAO;EACP,QAAQ;EACR,OAAO;EACR;AA2BD,QAAO;EACL,OA1BwB,GAAG;;;;;;EA2B3B,WApBgD;GAChD,OAAO,GAAG;;;;;GAKV,QAAQ,GAAG;;;;;GAKX,OAAO,GAAG;;;;;GAKX,CAI4B;EAC3B,OAAO;EACP,MAAM;EACN,QAAQ;EACR,MAAM,WAAW;EACjB,OAAO;EACR;GACA;CAAC;CAAO;CAAa;CAAK,CAAC;AAEhC,0BAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
1
|
import { CSSProperties, FC, ReactNode } from 'react';
|
|
19
2
|
export type MultiInputType = 'text' | 'email' | 'tel' | 'url' | 'password' | 'date' | 'boolean';
|
|
20
3
|
export type MultiInputFieldType = 'STRING' | 'DATE_TIME' | 'BOOLEAN';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiInput.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/MultiInput/MultiInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MultiInput.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/MultiInput/MultiInput.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAC,aAAa,EAAE,EAAE,EAA+B,SAAS,EAAwB,MAAM,OAAO,CAAC;AASvG,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;AAChG,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;AAErE,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAMD,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA8KnC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiInput.js","names":["MultiInput: FC<MultiInputProps>","useTheme","canAddMore: boolean","canRemove: boolean","styles: Record<string, string>","useStyles","PlusIcon: FC<IconProps>","BinIcon: FC<IconProps>","handleAddValue: ReturnType<typeof useCallback>","handleRemoveValue: ReturnType<typeof useCallback>","renderInputField: ReturnType<typeof useCallback>","commonProps: Record<string, unknown>","DatePicker","Checkbox","TextField","handleInputSubmit: ReturnType<typeof useCallback>","FormControl","InputLabel"],"sources":["../../../../src/components/primitives/MultiInput/MultiInput.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 {CSSProperties, FC, KeyboardEvent, ReactElement, ReactNode, useCallback, useState} from 'react';\nimport useStyles from './MultiInput.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport Checkbox from '../Checkbox/Checkbox';\nimport DatePicker from '../DatePicker/DatePicker';\nimport FormControl from '../FormControl/FormControl';\nimport InputLabel from '../InputLabel/InputLabel';\nimport TextField from '../TextField/TextField';\n\nexport type MultiInputType = 'text' | 'email' | 'tel' | 'url' | 'password' | 'date' | 'boolean';\nexport type MultiInputFieldType = 'STRING' | 'DATE_TIME' | 'BOOLEAN';\n\nexport interface MultiInputProps {\n /**\n * Additional CSS class names\n */\n className?: string;\n /**\n * Whether the field is disabled\n */\n disabled?: boolean;\n /**\n * Icon to display at the end (right) of each input (in addition to add/remove buttons)\n */\n endIcon?: ReactNode;\n /**\n * Error message to display below the inputs\n */\n error?: string;\n /**\n * Field type for different input components\n */\n fieldType?: MultiInputFieldType;\n /**\n * Helper text to display below the inputs\n */\n helperText?: string;\n /**\n * Label text to display above the inputs\n */\n label?: string;\n /**\n * Maximum number of fields to allow (default: unlimited)\n */\n maxFields?: number;\n /**\n * Minimum number of fields to show (default: 1)\n */\n minFields?: number;\n /**\n * Callback when values change\n */\n onChange: (values: string[]) => void;\n /**\n * Placeholder text for input fields\n */\n placeholder?: string;\n /**\n * Whether the field is required\n */\n required?: boolean;\n /**\n * Icon to display at the start (left) of each input\n */\n startIcon?: ReactNode;\n /**\n * Custom style object\n */\n style?: CSSProperties;\n /**\n * Input type\n */\n type?: MultiInputType;\n /**\n * Array of values\n */\n values: string[];\n}\n\ninterface IconProps {\n iconClassName?: string;\n}\n\nconst MultiInput: FC<MultiInputProps> = ({\n label,\n error,\n required,\n className,\n disabled,\n helperText,\n placeholder = 'Enter value',\n values = [],\n onChange,\n type = 'text',\n fieldType = 'STRING',\n startIcon,\n endIcon,\n minFields = 1,\n maxFields,\n style = {},\n}: MultiInputProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const canAddMore: boolean = !maxFields || values.length < maxFields;\n const canRemove: boolean = values.length > minFields;\n const styles: Record<string, string> = useStyles(theme, colorScheme, !!disabled, !!error, canAddMore, canRemove);\n\n const PlusIcon: FC<IconProps> = ({iconClassName}: IconProps): ReactElement => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" className={cx(styles['icon'], iconClassName)}>\n <path d=\"M12 5v14M5 12h14\" />\n </svg>\n );\n\n const BinIcon: FC<IconProps> = ({iconClassName}: IconProps): ReactElement => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" className={cx(styles['icon'], iconClassName)}>\n <path d=\"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14ZM10 11v6M14 11v6\" />\n </svg>\n );\n\n const handleAddValue: ReturnType<typeof useCallback> = useCallback(\n (newValue: string) => {\n if (newValue.trim() !== '' && (!maxFields || values.length < maxFields)) {\n onChange([...values, newValue.trim()]);\n }\n },\n [values, onChange, maxFields],\n );\n\n const handleRemoveValue: ReturnType<typeof useCallback> = useCallback(\n (index: number) => {\n if (values.length > minFields) {\n const updatedValues: string[] = values.filter((_: string, i: number) => i !== index);\n onChange(updatedValues);\n }\n },\n [values, onChange, minFields],\n );\n\n const renderInputField: ReturnType<typeof useCallback> = useCallback(\n (\n value: string,\n onValueChange: (value: string) => void,\n attachedEndIcon?: ReactNode,\n onEndIconClick?: () => void,\n ): ReactElement => {\n const handleInputChange = (e: any): void => {\n const newValue: string = e.target ? e.target.value : e;\n onValueChange(newValue);\n };\n\n const handleKeyDown = (e: KeyboardEvent): void => {\n if (e.key === 'Enter' && onEndIconClick) {\n e.preventDefault();\n onEndIconClick();\n }\n };\n\n const finalEndIcon: ReactNode = attachedEndIcon || endIcon;\n\n const commonProps: Record<string, unknown> = {\n disabled,\n endIcon: finalEndIcon,\n error,\n onChange: handleInputChange,\n onEndIconClick,\n onKeyDown: handleKeyDown,\n placeholder,\n startIcon,\n value,\n };\n\n switch (fieldType) {\n case 'DATE_TIME':\n return <DatePicker {...commonProps} />;\n case 'BOOLEAN':\n return (\n <Checkbox\n {...commonProps}\n checked={value === 'true' || Boolean(value)}\n onChange={(e: any): void => onValueChange(e.target.checked ? 'true' : 'false')}\n />\n );\n default:\n return <TextField {...commonProps} type={type} />;\n }\n },\n [placeholder, disabled, startIcon, endIcon, error, fieldType, type],\n );\n\n // State for the current input value\n const [currentInputValue, setCurrentInputValue] = useState('');\n\n const handleInputSubmit: ReturnType<typeof useCallback> = useCallback((): void => {\n if (currentInputValue.trim() !== '') {\n handleAddValue(currentInputValue);\n setCurrentInputValue('');\n }\n }, [currentInputValue, handleAddValue]);\n\n return (\n <FormControl\n error={error}\n helperText={helperText}\n className={cx(withVendorCSSClassPrefix(bem('multi-input')), className)}\n style={style}\n >\n {label && (\n <InputLabel required={required} error={!!error}>\n {label}\n </InputLabel>\n )}\n <div className={cx(withVendorCSSClassPrefix(bem('multi-input', 'container')), styles['container'])}>\n {/* Input field at the top */}\n <div className={cx(withVendorCSSClassPrefix(bem('multi-input', 'input-row')), styles['inputRow'])}>\n <div className={cx(withVendorCSSClassPrefix(bem('multi-input', 'input-wrapper')), styles['inputWrapper'])}>\n {renderInputField(\n currentInputValue,\n setCurrentInputValue,\n canAddMore ? <PlusIcon iconClassName={styles['plusIcon']} /> : undefined,\n canAddMore ? handleInputSubmit : undefined,\n )}\n </div>\n </div>\n\n {/* List of added items */}\n {values.length > 0 && (\n <div className={cx(withVendorCSSClassPrefix(bem('multi-input', 'list-container')), styles['listContainer'])}>\n {values.map((value: string, index: number) => (\n <div\n key={index}\n className={cx(withVendorCSSClassPrefix(bem('multi-input', 'list-item')), styles['listItem'])}\n >\n <span\n className={cx(withVendorCSSClassPrefix(bem('multi-input', 'list-item-text')), styles['listItemText'])}\n >\n {value}\n </span>\n {canRemove && (\n <button\n type=\"button\"\n onClick={(): void => handleRemoveValue(index)}\n disabled={disabled}\n className={cx(\n withVendorCSSClassPrefix(bem('multi-input', 'remove-button')),\n styles['removeButton'],\n )}\n title=\"Remove value\"\n >\n <BinIcon iconClassName={styles['ic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aAAa,oBAAoB,OAClC;MACG;KACF,EAGL,OAAO,SAAS,KACf,oBAAC;IAAI,WAAW,GAAG,yBAAyB,IAAI,eAAe,iBAAiB,CAAC,EAAE,OAAO,iBAAiB;cACxG,OAAO,KAAK,OAAe,UAC1B,qBAAC;KAEC,WAAW,GAAG,yBAAyB,IAAI,eAAe,YAAY,CAAC,EAAE,OAAO,YAAY;gBAE5F,oBAAC;MACC,WAAW,GAAG,yBAAyB,IAAI,eAAe,iBAAiB,CAAC,EAAE,OAAO,gBAAgB;gBAEpG;OACI,EACN,aACC,oBAAC;MACC,MAAK;MACL,eAAqB,kBAAkB,MAAM;MACnC;MACV,WAAW,GACT,yBAAyB,IAAI,eAAe,gBAAgB,CAAC,EAC7D,OAAO,gBACR;MACD,OAAM;gBAEN,oBAAC,WAAQ,eAAe,OAAO,UAAW;OACnC;OApBN,MAsBD,CACN;KACE;IAEJ;GACM;;AAIlB,yBAAe"}
|
|
1
|
+
{"version":3,"file":"MultiInput.js","names":["MultiInput: FC<MultiInputProps>","useTheme","canAddMore: boolean","canRemove: boolean","styles: Record<string, string>","useStyles","PlusIcon: FC<IconProps>","BinIcon: FC<IconProps>","handleAddValue: ReturnType<typeof useCallback>","handleRemoveValue: ReturnType<typeof useCallback>","renderInputField: ReturnType<typeof useCallback>","commonProps: Record<string, unknown>","DatePicker","Checkbox","TextField","handleInputSubmit: ReturnType<typeof useCallback>","FormControl","InputLabel"],"sources":["../../../../src/components/primitives/MultiInput/MultiInput.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {cx} from '@emotion/css';\nimport {withVendorCSSClassPrefix, bem} from '@thunderid/browser';\nimport {CSSProperties, FC, KeyboardEvent, ReactElement, ReactNode, useCallback, useState} from 'react';\nimport useStyles from './MultiInput.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport Checkbox from '../Checkbox/Checkbox';\nimport DatePicker from '../DatePicker/DatePicker';\nimport FormControl from '../FormControl/FormControl';\nimport InputLabel from '../InputLabel/InputLabel';\nimport TextField from '../TextField/TextField';\n\nexport type MultiInputType = 'text' | 'email' | 'tel' | 'url' | 'password' | 'date' | 'boolean';\nexport type MultiInputFieldType = 'STRING' | 'DATE_TIME' | 'BOOLEAN';\n\nexport interface MultiInputProps {\n /**\n * Additional CSS class names\n */\n className?: string;\n /**\n * Whether the field is disabled\n */\n disabled?: boolean;\n /**\n * Icon to display at the end (right) of each input (in addition to add/remove buttons)\n */\n endIcon?: ReactNode;\n /**\n * Error message to display below the inputs\n */\n error?: string;\n /**\n * Field type for different input components\n */\n fieldType?: MultiInputFieldType;\n /**\n * Helper text to display below the inputs\n */\n helperText?: string;\n /**\n * Label text to display above the inputs\n */\n label?: string;\n /**\n * Maximum number of fields to allow (default: unlimited)\n */\n maxFields?: number;\n /**\n * Minimum number of fields to show (default: 1)\n */\n minFields?: number;\n /**\n * Callback when values change\n */\n onChange: (values: string[]) => void;\n /**\n * Placeholder text for input fields\n */\n placeholder?: string;\n /**\n * Whether the field is required\n */\n required?: boolean;\n /**\n * Icon to display at the start (left) of each input\n */\n startIcon?: ReactNode;\n /**\n * Custom style object\n */\n style?: CSSProperties;\n /**\n * Input type\n */\n type?: MultiInputType;\n /**\n * Array of values\n */\n values: string[];\n}\n\ninterface IconProps {\n iconClassName?: string;\n}\n\nconst MultiInput: FC<MultiInputProps> = ({\n label,\n error,\n required,\n className,\n disabled,\n helperText,\n placeholder = 'Enter value',\n values = [],\n onChange,\n type = 'text',\n fieldType = 'STRING',\n startIcon,\n endIcon,\n minFields = 1,\n maxFields,\n style = {},\n}: MultiInputProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const canAddMore: boolean = !maxFields || values.length < maxFields;\n const canRemove: boolean = values.length > minFields;\n const styles: Record<string, string> = useStyles(theme, colorScheme, !!disabled, !!error, canAddMore, canRemove);\n\n const PlusIcon: FC<IconProps> = ({iconClassName}: IconProps): ReactElement => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" className={cx(styles['icon'], iconClassName)}>\n <path d=\"M12 5v14M5 12h14\" />\n </svg>\n );\n\n const BinIcon: FC<IconProps> = ({iconClassName}: IconProps): ReactElement => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" className={cx(styles['icon'], iconClassName)}>\n <path d=\"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14ZM10 11v6M14 11v6\" />\n </svg>\n );\n\n const handleAddValue: ReturnType<typeof useCallback> = useCallback(\n (newValue: string) => {\n if (newValue.trim() !== '' && (!maxFields || values.length < maxFields)) {\n onChange([...values, newValue.trim()]);\n }\n },\n [values, onChange, maxFields],\n );\n\n const handleRemoveValue: ReturnType<typeof useCallback> = useCallback(\n (index: number) => {\n if (values.length > minFields) {\n const updatedValues: string[] = values.filter((_: string, i: number) => i !== index);\n onChange(updatedValues);\n }\n },\n [values, onChange, minFields],\n );\n\n const renderInputField: ReturnType<typeof useCallback> = useCallback(\n (\n value: string,\n onValueChange: (value: string) => void,\n attachedEndIcon?: ReactNode,\n onEndIconClick?: () => void,\n ): ReactElement => {\n const handleInputChange = (e: any): void => {\n const newValue: string = e.target ? e.target.value : e;\n onValueChange(newValue);\n };\n\n const handleKeyDown = (e: KeyboardEvent): void => {\n if (e.key === 'Enter' && onEndIconClick) {\n e.preventDefault();\n onEndIconClick();\n }\n };\n\n const finalEndIcon: ReactNode = attachedEndIcon || endIcon;\n\n const commonProps: Record<string, unknown> = {\n disabled,\n endIcon: finalEndIcon,\n error,\n onChange: handleInputChange,\n onEndIconClick,\n onKeyDown: handleKeyDown,\n placeholder,\n startIcon,\n value,\n };\n\n switch (fieldType) {\n case 'DATE_TIME':\n return <DatePicker {...commonProps} />;\n case 'BOOLEAN':\n return (\n <Checkbox\n {...commonProps}\n checked={value === 'true' || Boolean(value)}\n onChange={(e: any): void => onValueChange(e.target.checked ? 'true' : 'false')}\n />\n );\n default:\n return <TextField {...commonProps} type={type} />;\n }\n },\n [placeholder, disabled, startIcon, endIcon, error, fieldType, type],\n );\n\n // State for the current input value\n const [currentInputValue, setCurrentInputValue] = useState('');\n\n const handleInputSubmit: ReturnType<typeof useCallback> = useCallback((): void => {\n if (currentInputValue.trim() !== '') {\n handleAddValue(currentInputValue);\n setCurrentInputValue('');\n }\n }, [currentInputValue, handleAddValue]);\n\n return (\n <FormControl\n error={error}\n helperText={helperText}\n className={cx(withVendorCSSClassPrefix(bem('multi-input')), className)}\n style={style}\n >\n {label && (\n <InputLabel required={required} error={!!error}>\n {label}\n </InputLabel>\n )}\n <div className={cx(withVendorCSSClassPrefix(bem('multi-input', 'container')), styles['container'])}>\n {/* Input field at the top */}\n <div className={cx(withVendorCSSClassPrefix(bem('multi-input', 'input-row')), styles['inputRow'])}>\n <div className={cx(withVendorCSSClassPrefix(bem('multi-input', 'input-wrapper')), styles['inputWrapper'])}>\n {renderInputField(\n currentInputValue,\n setCurrentInputValue,\n canAddMore ? <PlusIcon iconClassName={styles['plusIcon']} /> : undefined,\n canAddMore ? handleInputSubmit : undefined,\n )}\n </div>\n </div>\n\n {/* List of added items */}\n {values.length > 0 && (\n <div className={cx(withVendorCSSClassPrefix(bem('multi-input', 'list-container')), styles['listContainer'])}>\n {values.map((value: string, index: number) => (\n <div\n key={index}\n className={cx(withVendorCSSClassPrefix(bem('multi-input', 'list-item')), styles['listItem'])}\n >\n <span\n className={cx(withVendorCSSClassPrefix(bem('multi-input', 'list-item-text')), styles['listItemText'])}\n >\n {value}\n </span>\n {canRemove && (\n <button\n type=\"button\"\n onClick={(): void => handleRemoveValue(index)}\n disabled={disabled}\n className={cx(\n withVendorCSSClassPrefix(bem('multi-input', 'remove-button')),\n styles['removeButton'],\n )}\n title=\"Remove value\"\n >\n <BinIcon iconClassName={styles['icon']} />\n </button>\n )}\n </div>\n ))}\n </div>\n )}\n </div>\n </FormControl>\n );\n};\n\nexport default M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,GAAG,yBAAyB,IAAI,eAAe,iBAAiB,CAAC,EAAE,OAAO,iBAAiB;cACxG,OAAO,KAAK,OAAe,UAC1B,qBAAC;KAEC,WAAW,GAAG,yBAAyB,IAAI,eAAe,YAAY,CAAC,EAAE,OAAO,YAAY;gBAE5F,oBAAC;MACC,WAAW,GAAG,yBAAyB,IAAI,eAAe,iBAAiB,CAAC,EAAE,OAAO,gBAAgB;gBAEpG;OACI,EACN,aACC,oBAAC;MACC,MAAK;MACL,eAAqB,kBAAkB,MAAM;MACnC;MACV,WAAW,GACT,yBAAyB,IAAI,eAAe,gBAAgB,CAAC,EAC7D,OAAO,gBACR;MACD,OAAM;gBAEN,oBAAC,WAAQ,eAAe,OAAO,UAAW;OACnC;OApBN,MAsBD,CACN;KACE;IAEJ;GACM;;AAIlB,yBAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
1
|
import { Theme } from '@thunderid/browser';
|
|
19
2
|
export type MultiInputType = 'text' | 'email' | 'tel' | 'url' | 'password' | 'date' | 'boolean';
|
|
20
3
|
export type MultiInputFieldType = 'STRING' | 'DATE_TIME' | 'BOOLEAN';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiInput.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/MultiInput/MultiInput.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MultiInput.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/MultiInput/MultiInput.styles.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AAGzC,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;AAChG,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;AAErE;;;;;;;;;GASG;AACH,QAAA,MAAM,SAAS,GACb,OAAO,KAAK,EACZ,aAAa,MAAM,EACnB,UAAU,OAAO,EACjB,UAAU,OAAO,EACjB,YAAY,OAAO,EACnB,WAAW,OAAO,KACjB,MAAM,CAAC,MAAM,EAAE,MAAM,CAgG6C,CAAC;AAEtE,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiInput.styles.js","names":["container: string","inputRow: string","inputWrapper: string","plusIcon: string","listContainer: string","listItem: string","listItemText: string","removeButton: string"],"sources":["../../../../src/components/primitives/MultiInput/MultiInput.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"MultiInput.styles.js","names":["container: string","inputRow: string","inputWrapper: string","plusIcon: string","listContainer: string","listItem: string","listItemText: string","removeButton: string"],"sources":["../../../../src/components/primitives/MultiInput/MultiInput.styles.ts"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {css} from '@emotion/css';\nimport {Theme} from '@thunderid/browser';\nimport {useMemo} from 'react';\n\nexport type MultiInputType = 'text' | 'email' | 'tel' | 'url' | 'password' | 'date' | 'boolean';\nexport type MultiInputFieldType = 'STRING' | 'DATE_TIME' | 'BOOLEAN';\n\n/**\n * Creates styles for the MultiInput 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 hasError - Whether the component has an error\n * @param canAddMore - Whether more items can be added\n * @param canRemove - Whether items can be removed\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (\n theme: Theme,\n colorScheme: string,\n disabled: boolean,\n hasError: boolean,\n canAddMore: boolean,\n canRemove: boolean,\n): Record<string, string> =>\n useMemo(() => {\n const container: string = css`\n display: flex;\n flex-direction: column;\n gap: ${theme.vars.spacing.unit};\n `;\n\n const inputRow: string = css`\n display: flex;\n align-items: center;\n gap: ${theme.vars.spacing.unit};\n position: relative;\n `;\n\n const inputWrapper: string = css`\n flex: 1;\n `;\n\n const plusIcon: string = css`\n background: ${theme.vars.colors.secondary.main};\n border-radius: 50%;\n outline: 4px ${theme.vars.colors.secondary.main} auto;\n color: ${theme.vars.colors.secondary.contrastText};\n `;\n\n const listContainer: string = css`\n display: flex;\n flex-direction: column;\n gap: 0;\n `;\n\n const listItem: string = css`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ${theme.vars.spacing.unit} calc(${theme.vars.spacing.unit} * 1.5);\n background-color: ${theme.vars.colors.background.surface};\n border-radius: ${theme.vars.borderRadius.medium};\n font-size: 1rem;\n font-family: ${theme.vars.typography.fontFamily};\n color: ${theme.vars.colors.text.primary};\n margin-bottom: calc(${theme.vars.spacing.unit} / 2);\n\n &:last-child {\n margin-bottom: 0;\n }\n `;\n\n const listItemText: string = css`\n flex: 1;\n word-break: break-word;\n `;\n\n const removeButton: string = css`\n padding: calc(${theme.vars.spacing.unit} / 2);\n min-width: auto;\n color: ${theme.vars.colors.error.main};\n background: transparent;\n border: none;\n border-radius: ${theme.vars.borderRadius.small};\n cursor: ${disabled ? 'not-allowed' : 'pointer'};\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:hover:not(:disabled) {\n background-color: ${theme.vars.colors.action.hover};\n }\n\n &:disabled {\n opacity: 0.6;\n }\n `;\n\n const icon: string = css`\n width: 16px;\n height: 16px;\n stroke: currentColor;\n stroke-width: 2;\n stroke-linecap: round;\n stroke-linejoin: round;\n fill: none;\n `;\n\n return {\n container,\n icon,\n inputRow,\n inputWrapper,\n listContainer,\n listItem,\n listItemText,\n plusIcon,\n removeButton,\n };\n }, [theme, colorScheme, disabled, hasError, canAddMore, canRemove]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;;;AAoBA,MAAM,aACJ,OACA,aACA,UACA,UACA,YACA,cAEA,cAAc;CACZ,MAAMA,YAAoB,GAAG;;;aAGpB,MAAM,KAAK,QAAQ,KAAK;;CAGjC,MAAMC,WAAmB,GAAG;;;aAGnB,MAAM,KAAK,QAAQ,KAAK;;;CAIjC,MAAMC,eAAuB,GAAG;;;CAIhC,MAAMC,WAAmB,GAAG;oBACZ,MAAM,KAAK,OAAO,UAAU,KAAK;;qBAEhC,MAAM,KAAK,OAAO,UAAU,KAAK;eACvC,MAAM,KAAK,OAAO,UAAU,aAAa;;CAGpD,MAAMC,gBAAwB,GAAG;;;;;CAMjC,MAAMC,WAAmB,GAAG;;;;iBAIf,MAAM,KAAK,QAAQ,KAAK,QAAQ,MAAM,KAAK,QAAQ,KAAK;0BAC/C,MAAM,KAAK,OAAO,WAAW,QAAQ;uBACxC,MAAM,KAAK,aAAa,OAAO;;qBAEjC,MAAM,KAAK,WAAW,WAAW;eACvC,MAAM,KAAK,OAAO,KAAK,QAAQ;4BAClB,MAAM,KAAK,QAAQ,KAAK;;;;;;CAOhD,MAAMC,eAAuB,GAAG;;;;CAKhC,MAAMC,eAAuB,GAAG;sBACd,MAAM,KAAK,QAAQ,KAAK;;eAE/B,MAAM,KAAK,OAAO,MAAM,KAAK;;;uBAGrB,MAAM,KAAK,aAAa,MAAM;gBACrC,WAAW,gBAAgB,UAAU;;;;;;4BAMzB,MAAM,KAAK,OAAO,OAAO,MAAM;;;;;;;AAkBvD,QAAO;EACL;EACA,MAZmB,GAAG;;;;;;;;;EAatB;EACA;EACA;EACA;EACA;EACA;EACA;EACD;GACA;CAAC;CAAO;CAAa;CAAU;CAAU;CAAY;CAAU,CAAC;AAErE,gCAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
1
|
import { FC, CSSProperties } from 'react';
|
|
19
2
|
export type OtpFieldType = 'text' | 'number' | 'password';
|
|
20
3
|
export interface OtpInputProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OtpField.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/OtpField/OtpField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OtpField.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/OtpField/OtpField.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,EAAE,EAOF,aAAa,EACd,MAAM,OAAO,CAAC;AAMf,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE1D,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAC,MAAM,EAAE;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC,CAAA;KAAC,KAAK,IAAI,CAAC;IACtD;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CA+K/B,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OtpField.js","names":["OtpField: FC<OtpInputProps>","useTheme","styles: Record<string, string>","useStyles","inputRefs: MutableRefObject<HTMLInputElement[]>","newOtp: string[]","newValue: string","otpValue: string","pastedData: string","nextEmptyIndex: number","focusIndex: number","FormControl","InputLabel"],"sources":["../../../../src/components/primitives/OtpField/OtpField.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 {withVendorCSSClassPrefix, bem} from '@thunderid/browser';\nimport {\n ClipboardEvent,\n FC,\n KeyboardEvent,\n ChangeEvent,\n MutableRefObject,\n useRef,\n useEffect,\n useState,\n CSSProperties,\n} from 'react';\nimport useStyles from './OtpField.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport FormControl from '../FormControl/FormControl';\nimport InputLabel from '../InputLabel/InputLabel';\n\nexport type OtpFieldType = 'text' | 'number' | 'password';\n\nexport interface OtpInputProps {\n /**\n * Auto focus the first input on mount\n */\n autoFocus?: boolean;\n /**\n * Additional CSS class names\n */\n className?: string;\n /**\n * Whether the field is disabled\n */\n disabled?: boolean;\n /**\n * Error message to display below the OTP input\n */\n error?: string;\n /**\n * Helper text to display below the OTP input\n */\n helperText?: string;\n /**\n * Label text to display above the OTP input\n */\n label?: string;\n /**\n * Number of OTP input fields\n */\n length?: number;\n /**\n * Callback function called when OTP value changes\n */\n onChange?: (event: {target: {value: string}}) => void;\n /**\n * Callback function called when OTP input is complete\n */\n onComplete?: (value: string) => void;\n /**\n * Pattern for numeric input validation\n */\n pattern?: string;\n /**\n * Placeholder character for each input field\n */\n placeholder?: string;\n /**\n * Whether the field is required\n */\n required?: boolean;\n /**\n * Custom container style\n */\n style?: CSSProperties;\n /**\n * Type of input (text, number, password)\n */\n type?: OtpFieldType;\n /**\n * Current OTP value\n */\n value?: string;\n}\n\nconst OtpField: FC<OtpInputProps> = ({\n label,\n error,\n className,\n required,\n disabled,\n helperText,\n length = 6,\n value = '',\n onChange,\n onComplete,\n type = 'text',\n placeholder = '',\n style = {},\n autoFocus = false,\n pattern,\n}: OtpInputProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, !!disabled, !!error, length);\n const [otp, setOtp] = useState<string[]>(Array(length).fill(''));\n const inputRefs: MutableRefObject<HTMLInputElement[]> = useRef<HTMLInputElement[]>([]);\n\n useEffect(() => {\n inputRefs.current = inputRefs.current.slice(0, length);\n }, [length]);\n\n useEffect(() => {\n if (value) {\n const newOtp: string[] = value.split('').slice(0, length);\n while (newOtp.length < length) {\n newOtp.push('');\n }\n setOtp(newOtp);\n } else {\n setOtp(Array(length).fill(''));\n }\n }, [value, length]);\n\n useEffect(() => {\n if (autoFocus && inputRefs.current[0]) {\n inputRefs.current[0].focus();\n }\n }, [autoFocus]);\n\n const handleChange = (index: number, event: ChangeEvent<HTMLInputElement>): void => {\n const newValue: string = event.target.value;\n\n if (newValue.length > 1) return;\n\n if (type === 'number' && newValue && !/^\\d$/.test(newValue)) return;\n\n if (pattern && newValue && !new RegExp(pattern).test(newValue)) return;\n\n const newOtp: string[] = [...otp];\n newOtp[index] = newValue;\n setOtp(newOtp);\n\n const otpValue: string = newOtp.join('');\n\n onChange?.({target: {value: otpValue}});\n\n if (newValue && index < length - 1) {\n inputRefs.current[index + 1]?.focus();\n }\n\n if (newOtp.every((digit: string) => digit !== '') && onComplete) {\n onComplete(otpValue);\n }\n };\n\n const handleKeyDown = (index: number, event: KeyboardEvent<HTMLInputElement>): void => {\n if (event.key === 'Backspace') {\n if (!otp[index] && index > 0) {\n const newOtp: string[] = [...otp];\n\n newOtp[index - 1] = '';\n setOtp(newOtp);\n inputRefs.current[index - 1]?.focus();\n onChange?.({target: {value: newOtp.join('')}});\n } else if (otp[index]) {\n const newOtp: string[] = [...otp];\n\n newOtp[index] = '';\n setOtp(newOtp);\n onChange?.({target: {value: newOtp.join('')}});\n }\n } else if (event.key === 'ArrowLeft' && index > 0) {\n inputRefs.current[index - 1]?.focus();\n } else if (event.key === 'ArrowRight' && index < length - 1) {\n inputRefs.current[index + 1]?.focus();\n } else if (event.key === 'Enter') {\n event.preventDefault();\n\n if (otp.every((digit: string) => digit !== '') && onComplete) {\n onComplete(otp.join(''));\n }\n }\n };\n\n const handlePaste = (event: ClipboardEvent<HTMLInputElement>): void => {\n event.preventDefault();\n\n const pastedData: string = event.clipboardData.getData('text').slice(0, length);\n\n let validData = '';\n\n Array.from(pastedData).forEach((char: string) => {\n if (type === 'number' && !/^\\d$/.test(char)) return;\n if (pattern && !new RegExp(pattern).test(char)) return;\n validData += char;\n });\n\n const newOtp: string[] = Array(length).fill('');\n\n for (let i = 0; i < Math.min(validData.length, length); i += 1) {\n newOtp[i] = validData[i];\n }\n\n setOtp(newOtp);\n onChange?.({target: {value: newOtp.join('')}});\n\n const nextEmptyIndex: number = newOtp.findIndex((digit: string) => digit === '');\n const focusIndex: number = nextEmptyIndex !== -1 ? nextEmptyIndex : length - 1;\n\n inputRefs.current[focusIndex]?.focus();\n\n if (newOtp.every((digit: string) => digit !== '') && onComplete) {\n onComplete(newOtp.join(''));\n }\n };\n\n return (\n <FormControl\n error={error}\n helperText={helperText}\n className={cx(withVendorCSSClassPrefix(bem('otp-field')), className)}\n helperTextAlign=\"center\"\n style={style}\n >\n {label && (\n <InputLabel required={required} error={!!error}>\n {label}\n </InputLabel>\n )}\n <div className={cx(withVendorCSSClassPrefix(bem('otp-field', 'input-container')), styles['inputContainer'])}>\n {Array.from({length}, (_: unknown, index: number) => (\n <input\n key={index}\n ref={(el: HTMLInputElement | null): void => {\n if (el) inputRefs.current[index] = el;\n }}\n type={type === 'password' ? 'password' : 'text'}\n inputMode={type === 'number' ? 'numeric' : 'text'}\n value={otp[index] || ''}\n onChange={(event: ChangeEvent<HTMLInputElement>): void => handleChange(index, event)}\n onKeyDown={(event: KeyboardEvent<HTMLInputElement>): void => handleKeyDown(index, event)}\n onPaste={handlePaste}\n className={cx(withVendorCSSClassPrefix(bem('otp-field', 'input')), styles['input'], {\n [withVendorCSSClassPrefix(bem('otp-field', 'input', 'error'))]: !!error,\n [styles['inputError']]: !!error,\n [withVendorCSSClassPrefix(bem('otp-field', 'input', 'disabled'))]: !!disabled,\n [styles['inputDisabled']]: !!disabled,\n })}\n maxLength={1}\n placeholder={placeholder}\n disabled={disabled}\n aria-label={`${label || 'OTP'} digit ${index + 1}`}\n aria-invalid={!!error}\n aria-required={required}\n autoComplete=\"one-time-code\"\n />\n ))}\n </div>\n </FormControl>\n );\n};\n\nexport default OtpField;\n"],"mappings":";;;;;;;;;;AAqGA,MAAMA,YAA+B,EACnC,OACA,OACA,WACA,UACA,UACA,YACA,SAAS,GACT,QAAQ,IACR,UACA,YACA,OAAO,QACP,cAAc,IACd,QAAQ,EAAE,EACV,YAAY,OACZ,cACmB;CACnB,MAAM,EAAC,OAAO,gBAA4CC,kBAAU;CACpE,MAAMC,SAAiCC,wBAAU,OAAO,aAAa,CAAC,CAAC,UAAU,CAAC,CAAC,OAAO,OAAO;CACjG,MAAM,CAAC,KAAK,UAAU,SAAmB,MAAM,OAAO,CAAC,KAAK,GAAG,CAAC;CAChE,MAAMC,YAAkD,OAA2B,EAAE,CAAC;AAEtF,iBAAgB;AACd,YAAU,UAAU,UAAU,QAAQ,MAAM,GAAG,OAAO;IACrD,CAAC,OAAO,CAAC;AAEZ,iBAAgB;AACd,MAAI,OAAO;GACT,MAAMC,SAAmB,MAAM,MAAM,GAAG,CAAC,MAAM,GAAG,OAAO;AACzD,UAAO,OAAO,SAAS,OACrB,QAAO,KAAK,GAAG;AAEjB,UAAO,OAAO;QAEd,QAAO,MAAM,OAAO,CAAC,KAAK,GAAG,CAAC;IAE/B,CAAC,OAAO,OAAO,CAAC;AAEnB,iBAAgB;AACd,MAAI,aAAa,UAAU,QAAQ,GACjC,WAAU,QAAQ,GAAG,OAAO;IAE7B,CAAC,UAAU,CAAC;CAEf,MAAM,gBAAgB,OAAe,UAA+C;EAClF,MAAMC,WAAmB,MAAM,OAAO;AAEtC,MAAI,SAAS,SAAS,EAAG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UAA+C,aAAa,OAAO,MAAM;IACpF,YAAY,UAAiD,cAAc,OAAO,MAAM;IACxF,SAAS;IACT,WAAW,GAAG,yBAAyB,IAAI,aAAa,QAAQ,CAAC,EAAE,OAAO,UAAU;MACjF,yBAAyB,IAAI,aAAa,SAAS,QAAQ,CAAC,GAAG,CAAC,CAAC;MACjE,OAAO,gBAAgB,CAAC,CAAC;MACzB,yBAAyB,IAAI,aAAa,SAAS,WAAW,CAAC,GAAG,CAAC,CAAC;MACpE,OAAO,mBAAmB,CAAC,CAAC;KAC9B,CAAC;IACF,WAAW;IACE;IACH;IACV,cAAY,GAAG,SAAS,MAAM,SAAS,QAAQ;IAC/C,gBAAc,CAAC,CAAC;IAChB,iBAAe;IACf,cAAa;MAtBR,MAuBL,CACF;IACE;GACM;;AAIlB,uBAAe"}
|
|
1
|
+
{"version":3,"file":"OtpField.js","names":["OtpField: FC<OtpInputProps>","useTheme","styles: Record<string, string>","useStyles","inputRefs: MutableRefObject<HTMLInputElement[]>","newOtp: string[]","newValue: string","otpValue: string","pastedData: string","nextEmptyIndex: number","focusIndex: number","FormControl","InputLabel"],"sources":["../../../../src/components/primitives/OtpField/OtpField.tsx"],"sourcesContent":["// Copyright 2024 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {cx} from '@emotion/css';\nimport {withVendorCSSClassPrefix, bem} from '@thunderid/browser';\nimport {\n ClipboardEvent,\n FC,\n KeyboardEvent,\n ChangeEvent,\n MutableRefObject,\n useRef,\n useEffect,\n useState,\n CSSProperties,\n} from 'react';\nimport useStyles from './OtpField.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport FormControl from '../FormControl/FormControl';\nimport InputLabel from '../InputLabel/InputLabel';\n\nexport type OtpFieldType = 'text' | 'number' | 'password';\n\nexport interface OtpInputProps {\n /**\n * Auto focus the first input on mount\n */\n autoFocus?: boolean;\n /**\n * Additional CSS class names\n */\n className?: string;\n /**\n * Whether the field is disabled\n */\n disabled?: boolean;\n /**\n * Error message to display below the OTP input\n */\n error?: string;\n /**\n * Helper text to display below the OTP input\n */\n helperText?: string;\n /**\n * Label text to display above the OTP input\n */\n label?: string;\n /**\n * Number of OTP input fields\n */\n length?: number;\n /**\n * Callback function called when OTP value changes\n */\n onChange?: (event: {target: {value: string}}) => void;\n /**\n * Callback function called when OTP input is complete\n */\n onComplete?: (value: string) => void;\n /**\n * Pattern for numeric input validation\n */\n pattern?: string;\n /**\n * Placeholder character for each input field\n */\n placeholder?: string;\n /**\n * Whether the field is required\n */\n required?: boolean;\n /**\n * Custom container style\n */\n style?: CSSProperties;\n /**\n * Type of input (text, number, password)\n */\n type?: OtpFieldType;\n /**\n * Current OTP value\n */\n value?: string;\n}\n\nconst OtpField: FC<OtpInputProps> = ({\n label,\n error,\n className,\n required,\n disabled,\n helperText,\n length = 6,\n value = '',\n onChange,\n onComplete,\n type = 'text',\n placeholder = '',\n style = {},\n autoFocus = false,\n pattern,\n}: OtpInputProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, !!disabled, !!error, length);\n const [otp, setOtp] = useState<string[]>(Array(length).fill(''));\n const inputRefs: MutableRefObject<HTMLInputElement[]> = useRef<HTMLInputElement[]>([]);\n\n useEffect(() => {\n inputRefs.current = inputRefs.current.slice(0, length);\n }, [length]);\n\n useEffect(() => {\n if (value) {\n const newOtp: string[] = value.split('').slice(0, length);\n while (newOtp.length < length) {\n newOtp.push('');\n }\n setOtp(newOtp);\n } else {\n setOtp(Array(length).fill(''));\n }\n }, [value, length]);\n\n useEffect(() => {\n if (autoFocus && inputRefs.current[0]) {\n inputRefs.current[0].focus();\n }\n }, [autoFocus]);\n\n const handleChange = (index: number, event: ChangeEvent<HTMLInputElement>): void => {\n const newValue: string = event.target.value;\n\n if (newValue.length > 1) return;\n\n if (type === 'number' && newValue && !/^\\d$/.test(newValue)) return;\n\n if (pattern && newValue && !new RegExp(pattern).test(newValue)) return;\n\n const newOtp: string[] = [...otp];\n newOtp[index] = newValue;\n setOtp(newOtp);\n\n const otpValue: string = newOtp.join('');\n\n onChange?.({target: {value: otpValue}});\n\n if (newValue && index < length - 1) {\n inputRefs.current[index + 1]?.focus();\n }\n\n if (newOtp.every((digit: string) => digit !== '') && onComplete) {\n onComplete(otpValue);\n }\n };\n\n const handleKeyDown = (index: number, event: KeyboardEvent<HTMLInputElement>): void => {\n if (event.key === 'Backspace') {\n if (!otp[index] && index > 0) {\n const newOtp: string[] = [...otp];\n\n newOtp[index - 1] = '';\n setOtp(newOtp);\n inputRefs.current[index - 1]?.focus();\n onChange?.({target: {value: newOtp.join('')}});\n } else if (otp[index]) {\n const newOtp: string[] = [...otp];\n\n newOtp[index] = '';\n setOtp(newOtp);\n onChange?.({target: {value: newOtp.join('')}});\n }\n } else if (event.key === 'ArrowLeft' && index > 0) {\n inputRefs.current[index - 1]?.focus();\n } else if (event.key === 'ArrowRight' && index < length - 1) {\n inputRefs.current[index + 1]?.focus();\n } else if (event.key === 'Enter') {\n event.preventDefault();\n\n if (otp.every((digit: string) => digit !== '') && onComplete) {\n onComplete(otp.join(''));\n }\n }\n };\n\n const handlePaste = (event: ClipboardEvent<HTMLInputElement>): void => {\n event.preventDefault();\n\n const pastedData: string = event.clipboardData.getData('text').slice(0, length);\n\n let validData = '';\n\n Array.from(pastedData).forEach((char: string) => {\n if (type === 'number' && !/^\\d$/.test(char)) return;\n if (pattern && !new RegExp(pattern).test(char)) return;\n validData += char;\n });\n\n const newOtp: string[] = Array(length).fill('');\n\n for (let i = 0; i < Math.min(validData.length, length); i += 1) {\n newOtp[i] = validData[i];\n }\n\n setOtp(newOtp);\n onChange?.({target: {value: newOtp.join('')}});\n\n const nextEmptyIndex: number = newOtp.findIndex((digit: string) => digit === '');\n const focusIndex: number = nextEmptyIndex !== -1 ? nextEmptyIndex : length - 1;\n\n inputRefs.current[focusIndex]?.focus();\n\n if (newOtp.every((digit: string) => digit !== '') && onComplete) {\n onComplete(newOtp.join(''));\n }\n };\n\n return (\n <FormControl\n error={error}\n helperText={helperText}\n className={cx(withVendorCSSClassPrefix(bem('otp-field')), className)}\n helperTextAlign=\"center\"\n style={style}\n >\n {label && (\n <InputLabel required={required} error={!!error}>\n {label}\n </InputLabel>\n )}\n <div className={cx(withVendorCSSClassPrefix(bem('otp-field', 'input-container')), styles['inputContainer'])}>\n {Array.from({length}, (_: unknown, index: number) => (\n <input\n key={index}\n ref={(el: HTMLInputElement | null): void => {\n if (el) inputRefs.current[index] = el;\n }}\n type={type === 'password' ? 'password' : 'text'}\n inputMode={type === 'number' ? 'numeric' : 'text'}\n value={otp[index] || ''}\n onChange={(event: ChangeEvent<HTMLInputElement>): void => handleChange(index, event)}\n onKeyDown={(event: KeyboardEvent<HTMLInputElement>): void => handleKeyDown(index, event)}\n onPaste={handlePaste}\n className={cx(withVendorCSSClassPrefix(bem('otp-field', 'input')), styles['input'], {\n [withVendorCSSClassPrefix(bem('otp-field', 'input', 'error'))]: !!error,\n [styles['inputError']]: !!error,\n [withVendorCSSClassPrefix(bem('otp-field', 'input', 'disabled'))]: !!disabled,\n [styles['inputDisabled']]: !!disabled,\n })}\n maxLength={1}\n placeholder={placeholder}\n disabled={disabled}\n aria-label={`${label || 'OTP'} digit ${index + 1}`}\n aria-invalid={!!error}\n aria-required={required}\n autoComplete=\"one-time-code\"\n />\n ))}\n </div>\n </FormControl>\n );\n};\n\nexport default OtpField;\n"],"mappings":";;;;;;;;;;AAsFA,MAAMA,YAA+B,EACnC,OACA,OACA,WACA,UACA,UACA,YACA,SAAS,GACT,QAAQ,IACR,UACA,YACA,OAAO,QACP,cAAc,IACd,QAAQ,EAAE,EACV,YAAY,OACZ,cACmB;CACnB,MAAM,EAAC,OAAO,gBAA4CC,kBAAU;CACpE,MAAMC,SAAiCC,wBAAU,OAAO,aAAa,CAAC,CAAC,UAAU,CAAC,CAAC,OAAO,OAAO;CACjG,MAAM,CAAC,KAAK,UAAU,SAAmB,MAAM,OAAO,CAAC,KAAK,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ache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
1
|
import { Theme } from '@thunderid/browser';
|
|
19
2
|
export type OtpFieldType = 'text' | 'number' | 'password';
|
|
20
3
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OtpField.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/OtpField/OtpField.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OtpField.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/OtpField/OtpField.styles.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AAGzC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE1D;;;;;;;;GAQG;AACH,QAAA,MAAM,SAAS,GACb,OAAO,KAAK,EACZ,aAAa,MAAM,EACnB,UAAU,OAAO,EACjB,UAAU,OAAO,EACjB,QAAQ,MAAM,KACb,MAAM,CAAC,MAAM,EAAE,MAAM,CA+D8B,CAAC;AAEvD,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OtpField.styles.js","names":["inputContainer: string","input: string","inputError: string"],"sources":["../../../../src/components/primitives/OtpField/OtpField.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"OtpField.styles.js","names":["inputContainer: string","input: string","inputError: string"],"sources":["../../../../src/components/primitives/OtpField/OtpField.styles.ts"],"sourcesContent":["// Copyright 2024 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {css} from '@emotion/css';\nimport {Theme} from '@thunderid/browser';\nimport {useMemo} from 'react';\n\nexport type OtpFieldType = 'text' | 'number' | 'password';\n\n/**\n * Creates styles for the OtpField 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 hasError - Whether the component has an error\n * @param length - Number of OTP input fields\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (\n theme: Theme,\n colorScheme: string,\n disabled: boolean,\n hasError: boolean,\n length: number,\n): Record<string, string> =>\n useMemo(() => {\n const inputContainer: string = css`\n display: flex;\n gap: ${theme.vars.spacing.unit};\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n `;\n\n const input: string = css`\n width: calc(${theme.vars.spacing.unit} * 6);\n height: calc(${theme.vars.spacing.unit} * 6);\n text-align: center;\n font-size: ${theme.vars.typography.fontSizes.xl};\n font-family: ${theme.vars.typography.fontFamily};\n font-weight: 500;\n border: 2px solid ${hasError ? theme.vars.colors.error.main : theme.vars.colors.border};\n border-radius: ${theme.vars.components?.Field?.root?.borderRadius || theme.vars.borderRadius.medium};\n color: ${theme.vars.colors.text.primary};\n background-color: ${disabled ? theme.vars.colors.background.disabled : theme.vars.colors.background.surface};\n outline: none;\n transition:\n border-color 0.2s ease,\n box-shadow 0.2s ease;\n\n &:focus {\n border-color: ${hasError ? theme.vars.colors.error.main : theme.vars.colors.primary.main};\n box-shadow: 0 0 0 2px ${hasError ? `${theme.vars.colors.error.main}20` : `${theme.vars.colors.primary.main}20`};\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n }\n\n &::placeholder {\n color: ${theme.vars.colors.text.secondary};\n opacity: 0.7;\n }\n `;\n\n const inputError: string = css`\n border-color: ${theme.vars.colors.error.main};\n\n &:focus {\n border-color: ${theme.vars.colors.error.main};\n box-shadow: 0 0 0 2px ${theme.vars.colors.error.main}20;\n }\n `;\n\n const inputDisabled: string = css`\n background-color: ${theme.vars.colors.background.disabled};\n cursor: not-allowed;\n opacity: 0.6;\n `;\n\n return {\n input,\n inputContainer,\n inputDisabled,\n inputError,\n };\n }, [theme, colorScheme, disabled, hasError, length]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;;AAkBA,MAAM,aACJ,OACA,aACA,UACA,UACA,WAEA,cAAc;CACZ,MAAMA,iBAAyB,GAAG;;aAEzB,MAAM,KAAK,QAAQ,KAAK;;;;;CAMjC,MAAMC,QAAgB,GAAG;oBACT,MAAM,KAAK,QAAQ,KAAK;qBACvB,MAAM,KAAK,QAAQ,KAAK;;mBAE1B,MAAM,KAAK,WAAW,UAAU,GAAG;qBACjC,MAAM,KAAK,WAAW,WAAW;;0BAE5B,WAAW,MAAM,KAAK,OAAO,MAAM,OAAO,MAAM,KAAK,OAAO,OAAO;uBACtE,MAAM,KAAK,YAAY,OAAO,MAAM,gBAAgB,MAAM,KAAK,aAAa,OAAO;eAC3F,MAAM,KAAK,OAAO,KAAK,QAAQ;0BACpB,WAAW,MAAM,KAAK,OAAO,WAAW,WAAW,MAAM,KAAK,OAAO,WAAW,QAAQ;;;;;;;wBAO1F,WAAW,MAAM,KAAK,OAAO,MAAM,OAAO,MAAM,KAAK,OAAO,QAAQ,KAAK;gCACjE,WAAW,GAAG,MAAM,KAAK,OAAO,MAAM,KAAK,MAAM,GAAG,MAAM,KAAK,OAAO,QAAQ,KAAK,IAAI;;;;;;;;;iBAStG,MAAM,KAAK,OAAO,KAAK,UAAU;;;;CAK9C,MAAMC,aAAqB,GAAG;sBACZ,MAAM,KAAK,OAAO,MAAM,KAAK;;;wBAG3B,MAAM,KAAK,OAAO,MAAM,KAAK;gCACrB,MAAM,KAAK,OAAO,MAAM,KAAK;;;AAUzD,QAAO;EACL;EACA;EACA,eAT4B,GAAG;0BACX,MAAM,KAAK,OAAO,WAAW,SAAS;;;;EAS1D;EACD;GACA;CAAC;CAAO;CAAa;CAAU;CAAU;CAAO,CAAC;AAEtD,8BAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
1
|
import { FC } from 'react';
|
|
19
2
|
import { TextFieldProps } from '../TextField/TextField';
|
|
20
3
|
export interface PasswordFieldProps extends Omit<TextFieldProps, 'type' | 'endIcon' | 'onEndIconClick' | 'onChange'> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordField.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/PasswordField/PasswordField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PasswordField.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/PasswordField/PasswordField.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAc,EAAE,EAAqB,MAAM,OAAO,CAAC;AAK1D,OAAkB,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;AAEjE,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,GAAG,gBAAgB,GAAG,UAAU,CAAC;IAClH;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;GAGG;AACH,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA0CzC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordField.js","names":["PasswordField: FC<PasswordFieldProps>","useTheme","styles: Record<string, string>","useStyles","IconComponent: FC<SVGProps<SVGSVGElement>>","EyeOff","Eye","TextField"],"sources":["../../../../src/components/primitives/PasswordField/PasswordField.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"PasswordField.js","names":["PasswordField: FC<PasswordFieldProps>","useTheme","styles: Record<string, string>","useStyles","IconComponent: FC<SVGProps<SVGSVGElement>>","EyeOff","Eye","TextField"],"sources":["../../../../src/components/primitives/PasswordField/PasswordField.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {cx} from '@emotion/css';\nimport {withVendorCSSClassPrefix, bem} from '@thunderid/browser';\nimport {ChangeEvent, FC, SVGProps, useState} from 'react';\nimport useStyles from './PasswordField.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport Eye from '../Icons/Eye';\nimport EyeOff from '../Icons/EyeOff';\nimport TextField, {TextFieldProps} from '../TextField/TextField';\n\nexport interface PasswordFieldProps extends Omit<TextFieldProps, 'type' | 'endIcon' | 'onEndIconClick' | 'onChange'> {\n /**\n * Callback function when the field value changes\n */\n onChange: (value: string) => void;\n}\n\n/**\n * Password field component with show/hide toggle functionality.\n * This component extends TextField and adds password visibility toggle functionality.\n */\nconst PasswordField: FC<PasswordFieldProps> = ({\n onChange,\n className,\n disabled,\n error,\n ...textFieldProps\n}: PasswordFieldProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const [showPassword, setShowPassword] = useState(false);\n const styles: Record<string, string> = useStyles(theme, colorScheme, showPassword, !!disabled, !!error);\n\n const togglePasswordVisibility = (): void => {\n if (!disabled) {\n setShowPassword(!showPassword);\n }\n };\n\n const IconComponent: FC<SVGProps<SVGSVGElement>> = showPassword ? EyeOff : Eye;\n\n return (\n <TextField\n {...textFieldProps}\n className={cx(withVendorCSSClassPrefix(bem('password-field')), className)}\n type={showPassword ? 'text' : 'password'}\n onChange={(e: ChangeEvent<HTMLInputElement>): void => onChange(e.target.value)}\n autoComplete=\"current-password\"\n disabled={disabled}\n error={error}\n endIcon={\n <IconComponent\n width={16}\n height={16}\n className={cx(\n withVendorCSSClassPrefix(bem('password-field', 'toggle-icon')),\n styles['toggleIcon'],\n showPassword ? styles['visibleIcon'] : styles['hiddenIcon'],\n )}\n />\n }\n onEndIconClick={togglePasswordVisibility}\n />\n );\n};\n\nexport default PasswordField;\n"],"mappings":";;;;;;;;;;;;;;;AAuBA,MAAMA,iBAAyC,EAC7C,UACA,WACA,UACA,MACA,GAAG,qBACqB;CACxB,MAAM,EAAC,OAAO,gBAA4CC,kBAAU;CACpE,MAAM,CAAC,cAAc,mBAAmB,SAAS,MAAM;CACvD,MAAMC,SAAiCC,6BAAU,OAAO,aAAa,cAAc,CAAC,CAAC,UAAU,CAAC,CAAC,MAAM;CAEvG,MAAM,iCAAuC;AAC3C,MAAI,CAAC,SACH,iBAAgB,CAAC,aAAa;;CAIlC,MAAMC,gBAA6C,eAAeC,iBAASC;AAE3E,QACE,oBAACC;EACC,GAAI;EACJ,WAAW,GAAG,yBAAyB,IAAI,iBAAiB,CAAC,EAAE,UAAU;EACzE,MAAM,eAAe,SAAS;EAC9B,WAAW,MAA2C,SAAS,EAAE,OAAO,MAAM;EAC9E,cAAa;EACH;EACH;EACP,SACE,oBAAC;GACC,OAAO;GACP,QAAQ;GACR,WAAW,GACT,yBAAyB,IAAI,kBAAkB,cAAc,CAAC,EAC9D,OAAO,eACP,eAAe,OAAO,iBAAiB,OAAO,cAC/C;IACD;EAEJ,gBAAgB;GAChB;;AAIN,4BAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
1
|
import { Theme } from '@thunderid/browser';
|
|
19
2
|
/**
|
|
20
3
|
* Creates styles for the PasswordField component using BEM methodology
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordField.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/PasswordField/PasswordField.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PasswordField.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/PasswordField/PasswordField.styles.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AAGzC;;;;;;;;GAQG;AACH,QAAA,MAAM,SAAS,GACb,OAAO,KAAK,EACZ,aAAa,MAAM,EACnB,cAAc,OAAO,EACrB,UAAU,OAAO,EACjB,UAAU,OAAO,KAChB,MAAM,CAAC,MAAM,EAAE,MAAM,CA0BoC,CAAC;AAE7D,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordField.styles.js","names":["toggleIcon: string","visibleIcon: string"],"sources":["../../../../src/components/primitives/PasswordField/PasswordField.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"PasswordField.styles.js","names":["toggleIcon: string","visibleIcon: string"],"sources":["../../../../src/components/primitives/PasswordField/PasswordField.styles.ts"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {css} from '@emotion/css';\nimport {Theme} from '@thunderid/browser';\nimport {useMemo} from 'react';\n\n/**\n * Creates styles for the PasswordField 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 showPassword - Whether the password is currently visible\n * @param disabled - Whether the component is disabled\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 showPassword: boolean,\n disabled: boolean,\n hasError: boolean,\n): Record<string, string> =>\n useMemo(() => {\n const toggleIcon: string = css`\n cursor: ${disabled ? 'not-allowed' : 'pointer'};\n color: ${theme.vars.colors.text.secondary};\n opacity: ${disabled ? 0.6 : 1};\n transition: color 0.2s ease;\n\n &:hover {\n color: ${!disabled ? theme.vars.colors.text.primary : theme.vars.colors.text.secondary};\n }\n `;\n\n const visibleIcon: string = css`\n color: ${theme.vars.colors.primary.main};\n `;\n\n const hiddenIcon: string = css`\n color: ${theme.vars.colors.text.secondary};\n `;\n\n return {\n hiddenIcon,\n toggleIcon,\n visibleIcon,\n };\n }, [theme, colorScheme, showPassword, disabled, hasError]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;;AAgBA,MAAM,aACJ,OACA,aACA,cACA,UACA,aAEA,cAAc;CACZ,MAAMA,aAAqB,GAAG;gBAClB,WAAW,gBAAgB,UAAU;eACtC,MAAM,KAAK,OAAO,KAAK,UAAU;iBAC/B,WAAW,KAAM,EAAE;;;;iBAInB,CAAC,WAAW,MAAM,KAAK,OAAO,KAAK,UAAU,MAAM,KAAK,OAAO,KAAK,UAAU;;;CAI3F,MAAMC,cAAsB,GAAG;eACpB,MAAM,KAAK,OAAO,QAAQ,KAAK;;AAO1C,QAAO;EACL,YALyB,GAAG;eACnB,MAAM,KAAK,OAAO,KAAK,UAAU;;EAK1C;EACA;EACD;GACA;CAAC;CAAO;CAAa;CAAc;CAAU;CAAS,CAAC;AAE5D,mCAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
1
|
import { FC, SelectHTMLAttributes } from 'react';
|
|
19
2
|
export interface SelectOption {
|
|
20
3
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/Select/Select.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/Select/Select.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAC,EAAE,EAAE,oBAAoB,EAAC,MAAM,OAAO,CAAC;AAM/C,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,WAAW,CAAC;IAC7F;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAuD3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","names":["Select: FC<SelectProps>","useTheme","styles: Record<string, string>","useStyles","selectClassName: string","FormControl","InputLabel"],"sources":["../../../../src/components/primitives/Select/Select.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"Select.js","names":["Select: FC<SelectProps>","useTheme","styles: Record<string, string>","useStyles","selectClassName: string","FormControl","InputLabel"],"sources":["../../../../src/components/primitives/Select/Select.tsx"],"sourcesContent":["// Copyright 2024 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {cx} from '@emotion/css';\nimport {withVendorCSSClassPrefix, bem} from '@thunderid/browser';\nimport {FC, SelectHTMLAttributes} from 'react';\nimport useStyles from './Select.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\nimport FormControl from '../FormControl/FormControl';\nimport InputLabel from '../InputLabel/InputLabel';\n\nexport interface SelectOption {\n /**\n * The text that will be displayed in the select\n */\n label: string;\n /**\n * The value that will be submitted with the form\n */\n value: string;\n}\n\nexport interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'className'> {\n /**\n * Additional CSS class names\n */\n className?: string;\n /**\n * Whether the field is disabled\n */\n disabled?: boolean;\n /**\n * Error message to display below the select\n */\n error?: string;\n /**\n * Helper text to display below the select\n */\n helperText?: string;\n /**\n * Label text to display above the select\n */\n label?: string;\n /**\n * The options to display in the select\n */\n options: SelectOption[];\n /**\n * Placeholder text for the default/empty option\n */\n placeholder?: string;\n /**\n * Whether the field is required\n */\n required?: boolean;\n}\n\nconst Select: FC<SelectProps> = ({\n label,\n error,\n className,\n required,\n disabled,\n helperText,\n placeholder,\n options,\n style = {},\n ...rest\n}: SelectProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const hasError = !!error;\n const styles: Record<string, string> = useStyles(theme, colorScheme, disabled ?? false, hasError);\n\n const selectClassName: string = cx(\n withVendorCSSClassPrefix(bem('select', 'input')),\n styles['select'],\n hasError && styles['selectError'],\n disabled && styles['selectDisabled'],\n );\n\n return (\n <FormControl\n error={error}\n helperText={helperText}\n className={cx(withVendorCSSClassPrefix(bem('select')), className)}\n style={style}\n >\n {label && (\n <InputLabel required={required} error={hasError}>\n {label}\n </InputLabel>\n )}\n <select\n className={selectClassName}\n disabled={disabled}\n aria-invalid={hasError}\n aria-required={required}\n {...rest}\n >\n {placeholder && (\n <option value=\"\" disabled>\n {placeholder}\n </option>\n )}\n {options.map((option: SelectOption) => (\n <option key={option.value} value={option.value} className={styles['option']}>\n {option.label}\n </option>\n ))}\n </select>\n </FormControl>\n );\n};\n\nexport default Select;\n"],"mappings":";;;;;;;;;AAyDA,MAAMA,UAA2B,EAC/B,OACA,OACA,WACA,UACA,UACA,YACA,aACA,SACA,QAAQ,EAAE,CACV,GAAG,WACc;CACjB,MAAM,EAAC,OAAO,gBAA4CC,kBAAU;CACpE,MAAM,WAAW,CAAC,CAAC;CACnB,MAAMC,SAAiCC,sBAAU,OAAO,aAAa,YAAY,OAAO,SAAS;CAEjG,MAAMC,kBAA0B,GAC9B,yBAAyB,IAAI,UAAU,QAAQ,CAAC,EAChD,OAAO,WACP,YAAY,OAAO,gBACnB,YAAY,OAAO,kBACpB;AAED,QACE,qBAACC;EACQ;EACK;EACZ,WAAW,GAAG,yBAAyB,IAAI,SAAS,CAAC,EAAE,UAAU;EAC1D;aAEN,SACC,oBAACC;GAAqB;GAAU,OAAO;aACpC;IACU,EAEf,qBAAC;GACC,WAAW;GACD;GACV,gBAAc;GACd,iBAAe;GACf,GAAI;cAEH,eACC,oBAAC;IAAO,OAAM;IAAG;cACd;KACM,EAEV,QAAQ,KAAK,WACZ,oBAAC;IAA0B,OAAO,OAAO;IAAO,WAAW,OAAO;cAC/D,OAAO;MADG,OAAO,MAEX,CACT;IACK;GACG;;AAIlB,qBAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
1
|
import { Theme } from '@thunderid/browser';
|
|
19
2
|
/**
|
|
20
3
|
* Creates styles for the Select component using BEM methodology
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/Select/Select.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/Select/Select.styles.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AAGzC;;;;;;;GAOG;AACH,QAAA,MAAM,SAAS,GAAI,OAAO,KAAK,EAAE,aAAa,MAAM,EAAE,UAAU,OAAO,EAAE,UAAU,OAAO,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAgFpE,CAAC;AAE/C,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.styles.js","names":["select: string","selectError: string","selectDisabled: string"],"sources":["../../../../src/components/primitives/Select/Select.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"Select.styles.js","names":["select: string","selectError: string","selectDisabled: string"],"sources":["../../../../src/components/primitives/Select/Select.styles.ts"],"sourcesContent":["// Copyright 2024 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {css} from '@emotion/css';\nimport {Theme} from '@thunderid/browser';\nimport {useMemo} from 'react';\n\n/**\n * Creates styles for the Select 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 hasError - Whether the component has an error\n * @returns Object containing CSS class names for component styling\n */\nconst useStyles = (theme: Theme, colorScheme: string, disabled: boolean, hasError: boolean): Record<string, string> =>\n useMemo(() => {\n const dropdownArrowColor: string = theme.colors.text.secondary.replace('#', '');\n const dropdownArrow = `data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23${dropdownArrowColor}%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E`;\n\n const select: string = css`\n width: 100%;\n padding: ${theme.vars.spacing.unit} calc(${theme.vars.spacing.unit} * 1.5);\n border: 1px solid ${hasError ? theme.vars.colors.error.main : theme.vars.colors.border};\n border-radius: ${theme.vars.components?.Field?.root?.borderRadius || theme.vars.borderRadius.medium};\n font-size: ${theme.vars.typography.fontSizes.md};\n font-family: ${theme.vars.typography.fontFamily};\n color: ${theme.vars.colors.text.primary};\n background-color: ${disabled ? theme.vars.colors.background.disabled : theme.vars.colors.background.surface};\n outline: none;\n transition:\n border-color 0.2s ease,\n box-shadow 0.2s ease;\n appearance: none;\n background-image: url('${dropdownArrow}');\n background-repeat: no-repeat;\n background-position: right 0.7em top 50%;\n background-size: 0.65em auto;\n cursor: ${disabled ? 'not-allowed' : 'pointer'};\n\n &:focus {\n border-color: ${hasError ? theme.vars.colors.error.main : theme.vars.colors.primary.main};\n box-shadow: 0 0 0 2px ${hasError ? `${theme.vars.colors.error.main}20` : `${theme.vars.colors.primary.main}20`};\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n &:hover:not(:disabled) {\n border-color: ${hasError ? theme.vars.colors.error.main : theme.vars.colors.primary.main};\n }\n `;\n\n const selectError: string = css`\n border-color: ${theme.vars.colors.error.main};\n\n &:focus {\n border-color: ${theme.vars.colors.error.main};\n box-shadow: 0 0 0 2px ${theme.vars.colors.error.main}20;\n }\n\n &:hover:not(:disabled) {\n border-color: ${theme.vars.colors.error.main};\n }\n `;\n\n const selectDisabled: string = css`\n background-color: ${theme.vars.colors.background.disabled};\n opacity: 0.6;\n cursor: not-allowed;\n `;\n\n const option: string = css`\n padding: calc(${theme.vars.spacing.unit} / 2) ${theme.vars.spacing.unit};\n color: ${theme.vars.colors.text.primary};\n background-color: ${theme.vars.colors.background.surface};\n\n &:hover {\n background-color: ${theme.vars.colors.action.hover};\n }\n\n &:checked {\n background-color: ${theme.vars.colors.primary.main};\n color: ${theme.vars.colors.primary.contrastText};\n }\n `;\n\n return {\n option,\n select,\n selectDisabled,\n selectError,\n };\n }, [theme, colorScheme, disabled, hasError]);\n\nexport default useStyles;\n"],"mappings":";;;;;;;;;;;;AAeA,MAAM,aAAa,OAAc,aAAqB,UAAmB,aACvE,cAAc;CAEZ,MAAM,gBAAgB,yKADa,MAAM,OAAO,KAAK,UAAU,QAAQ,KAAK,GAAG,CACmI;CAElN,MAAMA,SAAiB,GAAG;;iBAEb,MAAM,KAAK,QAAQ,KAAK,QAAQ,MAAM,KAAK,QAAQ,KAAK;0BAC/C,WAAW,MAAM,KAAK,OAAO,MAAM,OAAO,MAAM,KAAK,OAAO,OAAO;uBACtE,MAAM,KAAK,YAAY,OAAO,MAAM,gBAAgB,MAAM,KAAK,aAAa,OAAO;mBACvF,MAAM,KAAK,WAAW,UAAU,GAAG;qBACjC,MAAM,KAAK,WAAW,WAAW;eACvC,MAAM,KAAK,OAAO,KAAK,QAAQ;0BACpB,WAAW,MAAM,KAAK,OAAO,WAAW,WAAW,MAAM,KAAK,OAAO,WAAW,QAAQ;;;;;;+BAMnF,cAAc;;;;gBAI7B,WAAW,gBAAgB,UAAU;;;wBAG7B,WAAW,MAAM,KAAK,OAAO,MAAM,OAAO,MAAM,KAAK,OAAO,QAAQ,KAAK;gCACjE,WAAW,GAAG,MAAM,KAAK,OAAO,MAAM,KAAK,MAAM,GAAG,MAAM,KAAK,OAAO,QAAQ,KAAK,IAAI;;;;;;;;;wBAS/F,WAAW,MAAM,KAAK,OAAO,MAAM,OAAO,MAAM,KAAK,OAAO,QAAQ,KAAK;;;CAI7F,MAAMC,cAAsB,GAAG;sBACb,MAAM,KAAK,OAAO,MAAM,KAAK;;;wBAG3B,MAAM,KAAK,OAAO,MAAM,KAAK;gCACrB,MAAM,KAAK,OAAO,MAAM,KAAK;;;;wBAIrC,MAAM,KAAK,OAAO,MAAM,KAAK;;;CAIjD,MAAMC,iBAAyB,GAAG;0BACZ,MAAM,KAAK,OAAO,WAAW,SAAS;;;;AAoB5D,QAAO;EACL,QAhBqB,GAAG;sBACR,MAAM,KAAK,QAAQ,KAAK,QAAQ,MAAM,KAAK,QAAQ,KAAK;eAC/D,MAAM,KAAK,OAAO,KAAK,QAAQ;0BACpB,MAAM,KAAK,OAAO,WAAW,QAAQ;;;4BAGnC,MAAM,KAAK,OAAO,OAAO,MAAM;;;;4BAI/B,MAAM,KAAK,OAAO,QAAQ,KAAK;iBAC1C,MAAM,KAAK,OAAO,QAAQ,aAAa;;;EAMlD;EACA;EACA;EACD;GACA;CAAC;CAAO;CAAa;CAAU;CAAS,CAAC;AAE9C,4BAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
1
|
import { FC, CSSProperties } from 'react';
|
|
19
2
|
export type SpinnerSize = 'small' | 'medium' | 'large';
|
|
20
3
|
export interface SpinnerProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/Spinner/Spinner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/Spinner/Spinner.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAC,EAAE,EAAE,aAAa,EAAC,MAAM,OAAO,CAAC;AAIxC,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEvD,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CAc7B,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.js","names":["Spinner: FC<SpinnerProps>","useTheme","styles: Record<string, string>","useStyles"],"sources":["../../../../src/components/primitives/Spinner/Spinner.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"Spinner.js","names":["Spinner: FC<SpinnerProps>","useTheme","styles: Record<string, string>","useStyles"],"sources":["../../../../src/components/primitives/Spinner/Spinner.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {cx} from '@emotion/css';\nimport {withVendorCSSClassPrefix, bem} from '@thunderid/browser';\nimport {FC, CSSProperties} from 'react';\nimport useStyles from './Spinner.styles';\nimport useTheme from '../../../contexts/Theme/useTheme';\n\nexport type SpinnerSize = 'small' | 'medium' | 'large';\n\nexport interface SpinnerProps {\n /**\n * Additional CSS class names\n */\n className?: string;\n /**\n * Custom color for the spinner\n */\n color?: string;\n /**\n * Size of the spinner\n */\n size?: SpinnerSize;\n /**\n * Custom styles\n */\n style?: CSSProperties;\n}\n\n/**\n * Spinner component for loading states\n *\n * @example\n * ```tsx\n * // Basic spinner\n * <Spinner />\n *\n * // Large spinner with custom color\n * <Spinner size=\"large\" color=\"#3b82f6\" />\n *\n * // Small spinner\n * <Spinner size=\"small\" />\n * ```\n */\nconst Spinner: FC<SpinnerProps> = ({size = 'medium', color, className, style}: SpinnerProps) => {\n const {theme, colorScheme}: ReturnType<typeof useTheme> = useTheme();\n const styles: Record<string, string> = useStyles(theme, colorScheme, size, color);\n\n const spinnerClassName: string = cx(\n withVendorCSSClassPrefix(bem('spinner')),\n styles['spinner'],\n size === 'small' && styles['spinnerSmall'],\n size === 'medium' && styles['spinnerMedium'],\n size === 'large' && styles['spinnerLarge'],\n className,\n );\n\n return <span className={spinnerClassName} style={style} role=\"status\" aria-label=\"Loading\" />;\n};\n\nexport default Spinner;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA6CA,MAAMA,WAA6B,EAAC,OAAO,UAAU,OAAO,WAAW,YAAyB;CAC9F,MAAM,EAAC,OAAO,gBAA4CC,kBAAU;CACpE,MAAMC,SAAiCC,uBAAU,OAAO,aAAa,MAAM,MAAM;AAWjF,QAAO,oBAAC;EAAK,WAToB,GAC/B,yBAAyB,IAAI,UAAU,CAAC,EACxC,OAAO,YACP,SAAS,WAAW,OAAO,iBAC3B,SAAS,YAAY,OAAO,kBAC5B,SAAS,WAAW,OAAO,iBAC3B,UACD;EAEgD;EAAO,MAAK;EAAS,cAAW;GAAY;;AAG/F,sBAAe"}
|