@clerk/ui 1.0.0-snapshot.v20251215212157 → 1.0.0-snapshot.v20251217162523
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/{207_ui_3321de_1.0.0-snapshot.v20251215212157.js → 207_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{217_ui_3321de_1.0.0-snapshot.v20251215212157.js → 217_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{360_ui_3321de_1.0.0-snapshot.v20251215212157.js → 360_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{444_ui_3321de_1.0.0-snapshot.v20251215212157.js → 444_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{573_ui_3321de_1.0.0-snapshot.v20251215212157.js → 573_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{970_ui_3321de_1.0.0-snapshot.v20251215212157.js → 970_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/ClerkUi.js +2 -2
- package/dist/Components.js +0 -7
- package/dist/Components.js.map +1 -1
- package/dist/{apiKeys_ui_3321de_1.0.0-snapshot.v20251215212157.js → apiKeys_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{checkout_ui_3321de_1.0.0-snapshot.v20251215212157.js → checkout_ui_d63654_1.0.0-snapshot.v20251217162523.js} +2 -2
- package/dist/common/EmailLinkVerify.js +1 -1
- package/dist/common/Gate.js +1 -1
- package/dist/common/RemoveResourceForm.js +1 -1
- package/dist/common/SSOCallback.js +1 -1
- package/dist/common/withRedirect.js +1 -1
- package/dist/components/APIKeys/APIKeys.js +1 -1
- package/dist/components/APIKeys/RevokeAPIKeyConfirmationModal.js +1 -1
- package/dist/components/Checkout/CheckoutComplete.js +1 -1
- package/dist/components/Checkout/CheckoutForm.js +1 -1
- package/dist/components/Checkout/CheckoutPage.js +1 -1
- package/dist/components/Checkout/parts.js +1 -1
- package/dist/components/CreateOrganization/CreateOrganizationForm.js +1 -1
- package/dist/components/CreateOrganization/CreateOrganizationPage.js +1 -1
- package/dist/components/ImpersonationFab/index.js +1 -1
- package/dist/components/OAuthConsent/OAuthConsent.js +1 -1
- package/dist/components/OrganizationList/UserInvitationList.js +1 -1
- package/dist/components/OrganizationList/UserMembershipList.js +1 -1
- package/dist/components/OrganizationList/UserSuggestionList.js +1 -1
- package/dist/components/OrganizationProfile/ActionConfirmationPage.js +1 -1
- package/dist/components/OrganizationProfile/ActiveMembersList.js +1 -1
- package/dist/components/OrganizationProfile/AddDomainForm.js +1 -1
- package/dist/components/OrganizationProfile/DomainList.js +1 -1
- package/dist/components/OrganizationProfile/InviteMembersForm.js +1 -1
- package/dist/components/OrganizationProfile/InviteMembersScreen.js +1 -1
- package/dist/components/OrganizationProfile/InvitedMembersList.js +1 -1
- package/dist/components/OrganizationProfile/OrganizationAPIKeysPage.js +1 -1
- package/dist/components/OrganizationProfile/OrganizationGeneralPage.js +1 -1
- package/dist/components/OrganizationProfile/OrganizationMembers.js +1 -1
- package/dist/components/OrganizationProfile/OrganizationProfileNavbar.js +1 -1
- package/dist/components/OrganizationProfile/ProfileForm.js +1 -1
- package/dist/components/OrganizationProfile/RemoveDomainForm.js +1 -1
- package/dist/components/OrganizationProfile/RequestToJoinList.js +1 -1
- package/dist/components/OrganizationProfile/VerifiedDomainForm.js +1 -1
- package/dist/components/OrganizationProfile/VerifyDomainForm.js +1 -1
- package/dist/components/OrganizationProfile/index.js +5 -4
- package/dist/components/OrganizationProfile/index.js.map +1 -1
- package/dist/components/OrganizationSwitcher/OrganizationSwitcherPopover.js +3 -6
- package/dist/components/OrganizationSwitcher/OrganizationSwitcherPopover.js.map +1 -1
- package/dist/components/OrganizationSwitcher/OrganizationSwitcherTrigger.js +1 -1
- package/dist/components/OrganizationSwitcher/UserInvitationSuggestionList.js +1 -1
- package/dist/components/OrganizationSwitcher/UserMembershipList.js +1 -1
- package/dist/components/PaymentMethods/AddPaymentMethod.js +1 -1
- package/dist/components/PaymentMethods/PaymentMethods.js +1 -1
- package/dist/components/PricingTable/PricingTable.js +2 -3
- package/dist/components/PricingTable/PricingTable.js.map +1 -1
- package/dist/components/PricingTable/PricingTableDefault.js +1 -1
- package/dist/components/SessionTasks/index.js +1 -1
- package/dist/components/SessionTasks/tasks/TaskChooseOrganization/ChooseOrganizationScreen.js +1 -1
- package/dist/components/SessionTasks/tasks/TaskChooseOrganization/CreateOrganizationScreen.js +1 -1
- package/dist/components/SessionTasks/tasks/TaskChooseOrganization/index.js +1 -1
- package/dist/components/SessionTasks/tasks/TaskResetPassword/index.js +1 -1
- package/dist/components/SignIn/SignInFactorOne.js +1 -1
- package/dist/components/SignIn/SignInFactorOneAlternativeChannelCodeForm.js +1 -1
- package/dist/components/SignIn/SignInFactorOneCodeForm.js +1 -1
- package/dist/components/SignIn/SignInFactorOneEmailLinkCard.js +1 -1
- package/dist/components/SignIn/SignInFactorOnePasswordCard.js +1 -1
- package/dist/components/SignIn/SignInFactorTwoAlternativeMethods.js +3 -1
- package/dist/components/SignIn/SignInFactorTwoAlternativeMethods.js.map +1 -1
- package/dist/components/SignIn/SignInFactorTwoBackupCodeCard.js +1 -1
- package/dist/components/SignIn/SignInFactorTwoCodeForm.js +1 -1
- package/dist/components/SignIn/SignInFactorTwoEmailLinkCard.js +1 -1
- package/dist/components/SignIn/SignInSocialButtons.js +1 -1
- package/dist/components/SignIn/SignInStart.js +1 -1
- package/dist/components/SignIn/index.js +3 -2
- package/dist/components/SignIn/index.js.map +1 -1
- package/dist/components/SignIn/shared.js +1 -1
- package/dist/components/SignUp/SignUpContinue.js +1 -1
- package/dist/components/SignUp/SignUpEmailLinkCard.js +1 -1
- package/dist/components/SignUp/SignUpRestrictedAccess.js +1 -1
- package/dist/components/SignUp/SignUpSocialButtons.js +1 -1
- package/dist/components/SignUp/SignUpStart.js +1 -1
- package/dist/components/SignUp/SignUpVerificationCodeForm.js +1 -1
- package/dist/components/SignUp/index.js +3 -2
- package/dist/components/SignUp/index.js.map +1 -1
- package/dist/components/SubscriptionDetails/index.js +1 -1
- package/dist/components/UserButton/UserButtonPopover.js +1 -1
- package/dist/components/UserButton/UserButtonTopLevelIdentifier.js +1 -1
- package/dist/components/UserButton/UserButtonTrigger.js +1 -1
- package/dist/components/UserButton/useMultisessionActions.js +2 -7
- package/dist/components/UserButton/useMultisessionActions.js.map +1 -1
- package/dist/components/UserProfile/APIKeysPage.js +1 -1
- package/dist/components/UserProfile/AccountPage.js +1 -1
- package/dist/components/UserProfile/ActiveDevicesSection.js +1 -1
- package/dist/components/UserProfile/AddAuthenticatorApp.js +1 -1
- package/dist/components/UserProfile/ConnectedAccountsMenu.js +1 -1
- package/dist/components/UserProfile/ConnectedAccountsSection.js +1 -1
- package/dist/components/UserProfile/DeleteUserForm.js +1 -1
- package/dist/components/UserProfile/EmailForm.js +1 -1
- package/dist/components/UserProfile/EmailsSection.js +1 -1
- package/dist/components/UserProfile/EnterpriseAccountsSection.js +1 -1
- package/dist/components/UserProfile/MfaBackupCodeCreateForm.js +1 -1
- package/dist/components/UserProfile/MfaBackupCodeList.js +1 -1
- package/dist/components/UserProfile/MfaForm.js +1 -1
- package/dist/components/UserProfile/MfaPhoneCodeScreen.js +1 -1
- package/dist/components/UserProfile/MfaSection.js +1 -1
- package/dist/components/UserProfile/PasskeySection.js +1 -1
- package/dist/components/UserProfile/PasswordForm.js +1 -1
- package/dist/components/UserProfile/PasswordSection.js +1 -1
- package/dist/components/UserProfile/PhoneForm.js +1 -1
- package/dist/components/UserProfile/PhoneSection.js +1 -1
- package/dist/components/UserProfile/ProfileForm.js +1 -1
- package/dist/components/UserProfile/RemoveResourceForm.js +1 -1
- package/dist/components/UserProfile/SecurityPage.js +1 -1
- package/dist/components/UserProfile/UserProfileSection.js +1 -1
- package/dist/components/UserProfile/UsernameForm.js +1 -1
- package/dist/components/UserProfile/UsernameSection.js +1 -1
- package/dist/components/UserProfile/VerifyTOTP.js +1 -1
- package/dist/components/UserProfile/Web3Form.js +1 -1
- package/dist/components/UserProfile/Web3Section.js +1 -1
- package/dist/components/UserProfile/index.js +3 -2
- package/dist/components/UserProfile/index.js.map +1 -1
- package/dist/components/UserVerification/UVFactorOneCodeForm.js +1 -1
- package/dist/components/UserVerification/UVFactorOnePasskeysCard.js +1 -1
- package/dist/components/UserVerification/UVFactorTwoBackupCodeCard.js +1 -1
- package/dist/components/UserVerification/UVFactorTwoCodeForm.js +1 -1
- package/dist/components/UserVerification/UVFactorTwoPhoneCodeCard.js +1 -1
- package/dist/components/UserVerification/UserVerificationFactorOnePassword.js +1 -1
- package/dist/components/UserVerification/UserVerificationFactorTwo.js +1 -1
- package/dist/components/UserVerification/UserVerificationFactorTwo.js.map +1 -1
- package/dist/components/UserVerification/index.js.map +1 -1
- package/dist/components/UserVerification/useUserVerificationSession.js +1 -1
- package/dist/components/Waitlist/WaitlistForm.js +1 -1
- package/dist/components/Waitlist/index.js +1 -1
- package/dist/components/devPrompts/EnableOrganizationsPrompt/index.js +1 -1
- package/dist/components/devPrompts/KeylessPrompt/index.js +1 -1
- package/dist/contexts/CoreClerkContextWrapper.js +1 -1
- package/dist/contexts/CoreSessionContext.js +1 -1
- package/dist/contexts/CoreUserContext.js +1 -1
- package/dist/{createorganization_ui_3321de_1.0.0-snapshot.v20251215212157.js → createorganization_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/customizables/AppearanceContext.js +1 -1
- package/dist/customizables/parseAppearance.d.ts +2 -2
- package/dist/customizables/parseAppearance.d.ts.map +1 -1
- package/dist/customizables/parseAppearance.js.map +1 -1
- package/dist/elements/Action/ActionRoot.js +1 -1
- package/dist/elements/CodeControl.js +1 -1
- package/dist/elements/Drawer.js +2 -8
- package/dist/elements/Drawer.js.map +1 -1
- package/dist/elements/Form.js +1 -1
- package/dist/elements/Menu.js +2 -3
- package/dist/elements/Menu.js.map +1 -1
- package/dist/elements/Modal.js +2 -3
- package/dist/elements/Modal.js.map +1 -1
- package/dist/elements/Navbar.js +1 -1
- package/dist/elements/PhoneInput/index.js +1 -1
- package/dist/elements/Popover.js +1 -4
- package/dist/elements/Popover.js.map +1 -1
- package/dist/elements/Select.js +1 -1
- package/dist/elements/SocialButtons.js +1 -1
- package/dist/elements/Tabs.js +1 -1
- package/dist/elements/TimerButton.js +1 -1
- package/dist/elements/Tooltip.js +24 -29
- package/dist/elements/Tooltip.js.map +1 -1
- package/dist/elements/contexts/index.js +1 -1
- package/dist/{enableOrganizationsPrompt_ui_3321de_1.0.0-snapshot.v20251215212157.js → enableOrganizationsPrompt_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/foundations/defaultFoundations.d.ts +153 -153
- package/dist/{impersonationfab_ui_3321de_1.0.0-snapshot.v20251215212157.js → impersonationfab_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/index.d.ts +2 -1
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/routing.d.ts +13 -0
- package/dist/internal/routing.d.ts.map +1 -0
- package/dist/{keylessPrompt_ui_3321de_1.0.0-snapshot.v20251215212157.js → keylessPrompt_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/lazyModules/MountedCheckoutDrawer.js +1 -1
- package/dist/lazyModules/MountedPlanDetailDrawer.js +1 -1
- package/dist/lazyModules/MountedSubscriptionDetailDrawer.js +1 -1
- package/dist/lazyModules/components.d.ts +21 -20
- package/dist/lazyModules/components.d.ts.map +1 -1
- package/dist/lazyModules/providers.js +17 -24
- package/dist/lazyModules/providers.js.map +1 -1
- package/dist/{oauthConsent_ui_3321de_1.0.0-snapshot.v20251215212157.js → oauthConsent_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{onetap_ui_3321de_1.0.0-snapshot.v20251215212157.js → onetap_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{op-api-keys-page_ui_3321de_1.0.0-snapshot.v20251215212157.js → op-api-keys-page_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{organizationlist_ui_3321de_1.0.0-snapshot.v20251215212157.js → organizationlist_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{organizationprofile_ui_3321de_1.0.0-snapshot.v20251215212157.js → organizationprofile_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/organizationswitcher_ui_d63654_1.0.0-snapshot.v20251217162523.js +1 -0
- package/dist/{payment-attempt-page_ui_3321de_1.0.0-snapshot.v20251215212157.js → payment-attempt-page_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{planDetails_ui_3321de_1.0.0-snapshot.v20251215212157.js → planDetails_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{prefetchorganizationlist_ui_3321de_1.0.0-snapshot.v20251215212157.js → prefetchorganizationlist_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{pricingTable_ui_3321de_1.0.0-snapshot.v20251215212157.js → pricingTable_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/primitives/hooks/useFormField.js +1 -1
- package/dist/{revoke-api-key-modal_ui_3321de_1.0.0-snapshot.v20251215212157.js → revoke-api-key-modal_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/router/BaseRouter.js +1 -1
- package/dist/router/PathRouter.js +1 -1
- package/dist/router/Route.js +1 -1
- package/dist/router/VirtualRouter.js +1 -1
- package/dist/{sessionTasks_ui_3321de_1.0.0-snapshot.v20251215212157.js → sessionTasks_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/signin_ui_d63654_1.0.0-snapshot.v20251217162523.js +1 -0
- package/dist/{signup_ui_3321de_1.0.0-snapshot.v20251215212157.js → signup_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{statement-page_ui_3321de_1.0.0-snapshot.v20251215212157.js → statement-page_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{subscriptionDetails_ui_3321de_1.0.0-snapshot.v20251215212157.js → subscriptionDetails_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{taskChooseOrganization_ui_3321de_1.0.0-snapshot.v20251215212157.js → taskChooseOrganization_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{taskResetPassword_ui_3321de_1.0.0-snapshot.v20251215212157.js → taskResetPassword_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/ui-common_ui_d63654_1.0.0-snapshot.v20251217162523.js +139 -0
- package/dist/ui.browser.js +3 -20
- package/dist/{up-api-keys-page_ui_3321de_1.0.0-snapshot.v20251215212157.js → up-api-keys-page_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{useravatar_ui_3321de_1.0.0-snapshot.v20251215212157.js → useravatar_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{userbutton_ui_3321de_1.0.0-snapshot.v20251215212157.js → userbutton_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/{userprofile_ui_3321de_1.0.0-snapshot.v20251215212157.js → userprofile_ui_d63654_1.0.0-snapshot.v20251217162523.js} +2 -2
- package/dist/{userverification_ui_3321de_1.0.0-snapshot.v20251215212157.js → userverification_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/dist/vendors_ui_d63654_1.0.0-snapshot.v20251217162523.js +20 -0
- package/dist/{waitlist_ui_3321de_1.0.0-snapshot.v20251215212157.js → waitlist_ui_d63654_1.0.0-snapshot.v20251217162523.js} +1 -1
- package/package.json +6 -6
- package/dist/organizationswitcher_ui_3321de_1.0.0-snapshot.v20251215212157.js +0 -1
- package/dist/signin_ui_3321de_1.0.0-snapshot.v20251215212157.js +0 -1
- package/dist/ui-common_ui_3321de_1.0.0-snapshot.v20251215212157.js +0 -122
- package/dist/vendors_ui_3321de_1.0.0-snapshot.v20251215212157.js +0 -20
- /package/dist/{blankcaptcha_ui_3321de_1.0.0-snapshot.v20251215212157.js → blankcaptcha_ui_d63654_1.0.0-snapshot.v20251217162523.js} +0 -0
- /package/dist/{copy-api-key-modal_ui_3321de_1.0.0-snapshot.v20251215212157.js → copy-api-key-modal_ui_d63654_1.0.0-snapshot.v20251217162523.js} +0 -0
- /package/dist/{framework_ui_3321de_1.0.0-snapshot.v20251215212157.js → framework_ui_d63654_1.0.0-snapshot.v20251217162523.js} +0 -0
- /package/dist/{op-billing-page_ui_3321de_1.0.0-snapshot.v20251215212157.js → op-billing-page_ui_d63654_1.0.0-snapshot.v20251217162523.js} +0 -0
- /package/dist/{op-plans-page_ui_3321de_1.0.0-snapshot.v20251215212157.js → op-plans-page_ui_d63654_1.0.0-snapshot.v20251217162523.js} +0 -0
- /package/dist/{up-billing-page_ui_3321de_1.0.0-snapshot.v20251215212157.js → up-billing-page_ui_d63654_1.0.0-snapshot.v20251217162523.js} +0 -0
- /package/dist/{up-plans-page_ui_3321de_1.0.0-snapshot.v20251215212157.js → up-plans-page_ui_d63654_1.0.0-snapshot.v20251217162523.js} +0 -0
|
@@ -11,8 +11,8 @@ import { RemovePhoneForm } from "./RemoveResourceForm.js";
|
|
|
11
11
|
import { sortIdentificationBasedOnVerification } from "./utils.js";
|
|
12
12
|
import { PhoneForm } from "./PhoneForm.js";
|
|
13
13
|
import { Fragment } from "react";
|
|
14
|
-
import { useReverification, useUser } from "@clerk/shared/react";
|
|
15
14
|
import { Fragment as Fragment$1, jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
15
|
+
import { useReverification, useUser } from "@clerk/shared/react";
|
|
16
16
|
|
|
17
17
|
//#region src/components/UserProfile/PhoneSection.tsx
|
|
18
18
|
const RemovePhoneScreen = (props) => {
|
|
@@ -10,8 +10,8 @@ import { isDefaultImage } from "../../utils/image.js";
|
|
|
10
10
|
import { InformationBox } from "../../elements/InformationBox.js";
|
|
11
11
|
import { UserProfileAvatarUploader } from "./UserProfileAvatarUploader.js";
|
|
12
12
|
import React from "react";
|
|
13
|
-
import { useUser } from "@clerk/shared/react";
|
|
14
13
|
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
14
|
+
import { useUser } from "@clerk/shared/react";
|
|
15
15
|
|
|
16
16
|
//#region src/components/UserProfile/ProfileForm.tsx
|
|
17
17
|
const ProfileForm = withCardStateProvider((props) => {
|
|
@@ -2,8 +2,8 @@ import { useEnabledThirdPartyProviders } from "../../hooks/useEnabledThirdPartyP
|
|
|
2
2
|
import { localizationKeys } from "../../localization/localizationKeys.js";
|
|
3
3
|
import { RemoveResourceForm } from "../../common/RemoveResourceForm.js";
|
|
4
4
|
import React from "react";
|
|
5
|
-
import { useUser } from "@clerk/shared/react";
|
|
6
5
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
6
|
+
import { useUser } from "@clerk/shared/react";
|
|
7
7
|
|
|
8
8
|
//#region src/components/UserProfile/RemoveResourceForm.tsx
|
|
9
9
|
const RemoveEmailForm = (props) => {
|
|
@@ -12,8 +12,8 @@ import { DeleteSection } from "./DeleteSection.js";
|
|
|
12
12
|
import { MfaSection } from "./MfaSection.js";
|
|
13
13
|
import { PasskeySection } from "./PasskeySection.js";
|
|
14
14
|
import { PasswordSection } from "./PasswordSection.js";
|
|
15
|
-
import { useUser } from "@clerk/shared/react";
|
|
16
15
|
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
16
|
+
import { useUser } from "@clerk/shared/react";
|
|
17
17
|
|
|
18
18
|
//#region src/components/UserProfile/SecurityPage.tsx
|
|
19
19
|
const SecurityPage = withCardStateProvider(() => {
|
|
@@ -5,8 +5,8 @@ import { Action } from "../../elements/Action/index.js";
|
|
|
5
5
|
import { UserPreview } from "../../elements/UserPreview.js";
|
|
6
6
|
import { ProfileSection } from "../../elements/Section.js";
|
|
7
7
|
import { ProfileForm } from "./ProfileForm.js";
|
|
8
|
-
import { useUser } from "@clerk/shared/react";
|
|
9
8
|
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
9
|
+
import { useUser } from "@clerk/shared/react";
|
|
10
10
|
|
|
11
11
|
//#region src/components/UserProfile/UserProfileSection.tsx
|
|
12
12
|
const ProfileScreen = () => {
|
|
@@ -8,8 +8,8 @@ import { Form } from "../../elements/Form.js";
|
|
|
8
8
|
import { FormButtons } from "../../elements/FormButtons.js";
|
|
9
9
|
import { FormContainer } from "../../elements/FormContainer.js";
|
|
10
10
|
import { createUsernameError } from "../../utils/usernameUtils.js";
|
|
11
|
-
import { useReverification, useUser } from "@clerk/shared/react";
|
|
12
11
|
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
12
|
+
import { useReverification, useUser } from "@clerk/shared/react";
|
|
13
13
|
|
|
14
14
|
//#region src/components/UserProfile/UsernameForm.tsx
|
|
15
15
|
const UsernameForm = withCardStateProvider((props) => {
|
|
@@ -5,8 +5,8 @@ import { useActionContext } from "../../elements/Action/ActionRoot.js";
|
|
|
5
5
|
import { Action } from "../../elements/Action/index.js";
|
|
6
6
|
import { ProfileSection } from "../../elements/Section.js";
|
|
7
7
|
import { UsernameForm } from "./UsernameForm.js";
|
|
8
|
-
import { useUser } from "@clerk/shared/react";
|
|
9
8
|
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
9
|
+
import { useUser } from "@clerk/shared/react";
|
|
10
10
|
|
|
11
11
|
//#region src/components/UserProfile/UsernameSection.tsx
|
|
12
12
|
const UsernameScreen = () => {
|
|
@@ -7,8 +7,8 @@ import { Form } from "../../elements/Form.js";
|
|
|
7
7
|
import { FormButtonContainer } from "../../elements/FormButtons.js";
|
|
8
8
|
import { FormContainer } from "../../elements/FormContainer.js";
|
|
9
9
|
import React from "react";
|
|
10
|
-
import { useUser } from "@clerk/shared/react";
|
|
11
10
|
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
11
|
+
import { useUser } from "@clerk/shared/react";
|
|
12
12
|
|
|
13
13
|
//#region src/components/UserProfile/VerifyTOTP.tsx
|
|
14
14
|
const VerifyTOTP = withCardStateProvider((props) => {
|
|
@@ -6,8 +6,8 @@ import { useCardState, withCardStateProvider } from "../../elements/contexts/ind
|
|
|
6
6
|
import { Image, Text } from "../../customizables/index.js";
|
|
7
7
|
import { getFieldError, handleError } from "../../utils/errorHandler.js";
|
|
8
8
|
import { ProfileSection } from "../../elements/Section.js";
|
|
9
|
-
import { useReverification, useUser } from "@clerk/shared/react";
|
|
10
9
|
import { Fragment, jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
10
|
+
import { useReverification, useUser } from "@clerk/shared/react";
|
|
11
11
|
import { createWeb3 } from "@clerk/shared/internal/clerk-js/web3";
|
|
12
12
|
|
|
13
13
|
//#region src/components/UserProfile/Web3Form.tsx
|
|
@@ -12,8 +12,8 @@ import { RemoveWeb3WalletForm } from "./RemoveResourceForm.js";
|
|
|
12
12
|
import { sortIdentificationBasedOnVerification } from "./utils.js";
|
|
13
13
|
import { AddWeb3WalletActionMenu } from "./Web3Form.js";
|
|
14
14
|
import { Fragment, useState } from "react";
|
|
15
|
-
import { useReverification, useUser } from "@clerk/shared/react";
|
|
16
15
|
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
16
|
+
import { useReverification, useUser } from "@clerk/shared/react";
|
|
17
17
|
|
|
18
18
|
//#region src/components/UserProfile/Web3Section.tsx
|
|
19
19
|
const RemoveWeb3WalletScreen = (props) => {
|
|
@@ -15,7 +15,7 @@ import React from "react";
|
|
|
15
15
|
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/UserProfile/index.tsx
|
|
18
|
-
const _UserProfile = (
|
|
18
|
+
const _UserProfile = () => {
|
|
19
19
|
return /* @__PURE__ */ jsx(Flow.Root, {
|
|
20
20
|
flow: "userProfile",
|
|
21
21
|
children: /* @__PURE__ */ jsx(Flow.Part, { children: /* @__PURE__ */ jsxs(Switch, { children: [/* @__PURE__ */ jsx(Route, {
|
|
@@ -36,6 +36,7 @@ const AuthenticatedRoutes = withCoreUserGuard(() => {
|
|
|
36
36
|
}) });
|
|
37
37
|
});
|
|
38
38
|
const UserProfile = withCardStateProvider(_UserProfile);
|
|
39
|
+
const InternalUserProfile = withCardStateProvider(_UserProfile);
|
|
39
40
|
const UserProfileModal = (props) => {
|
|
40
41
|
const userProfileProps = {
|
|
41
42
|
...props,
|
|
@@ -47,7 +48,7 @@ const UserProfileModal = (props) => {
|
|
|
47
48
|
path: "user",
|
|
48
49
|
children: /* @__PURE__ */ jsx(UserProfileContext.Provider, {
|
|
49
50
|
value: userProfileProps,
|
|
50
|
-
children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
51
|
+
children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(InternalUserProfile, { ...userProfileProps }) })
|
|
51
52
|
})
|
|
52
53
|
});
|
|
53
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["userProfileProps: UserProfileCtx"],"sources":["../../../src/components/UserProfile/index.tsx"],"sourcesContent":["import type { UserProfileModalProps, UserProfileProps } from '@clerk/shared/types';\nimport React from 'react';\n\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","names":["UserProfile: React.ComponentType<UserProfileProps>","InternalUserProfile: React.ComponentType<WithInternalRouting<UserProfileProps>>","userProfileProps: UserProfileCtx"],"sources":["../../../src/components/UserProfile/index.tsx"],"sourcesContent":["import type { UserProfileModalProps, UserProfileProps } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { USER_PROFILE_CARD_SCROLLBOX_ID } from '@/constants';\nimport { UserProfileContext, withCoreUserGuard } from '@/contexts';\nimport { Flow, localizationKeys } from '@/customizables';\nimport { withCardStateProvider } from '@/elements/contexts';\nimport { NavbarMenuButtonRow } from '@/elements/Navbar';\nimport { ProfileCard } from '@/elements/ProfileCard';\nimport type { WithInternalRouting } from '@/internal';\nimport { Route, Switch } from '@/router';\nimport type { UserProfileCtx } from '@/types';\n\nimport { UserProfileNavbar } from './UserProfileNavbar';\nimport { UserProfileRoutes } from './UserProfileRoutes';\nimport { VerificationSuccessPage } from './VerifyWithLink';\n\nconst _UserProfile = () => {\n return (\n <Flow.Root flow='userProfile'>\n <Flow.Part>\n <Switch>\n {/* PublicRoutes */}\n <Route path='verify'>\n <VerificationSuccessPage />\n </Route>\n <Route>\n <AuthenticatedRoutes />\n </Route>\n </Switch>\n </Flow.Part>\n </Flow.Root>\n );\n};\n\nconst AuthenticatedRoutes = withCoreUserGuard(() => {\n const contentRef = React.useRef<HTMLDivElement>(null);\n return (\n <ProfileCard.Root>\n <UserProfileNavbar contentRef={contentRef}>\n <NavbarMenuButtonRow navbarTitleLocalizationKey={localizationKeys('userProfile.navbar.title')} />\n <ProfileCard.Content\n contentRef={contentRef}\n scrollBoxId={USER_PROFILE_CARD_SCROLLBOX_ID}\n >\n <UserProfileRoutes />\n </ProfileCard.Content>\n </UserProfileNavbar>\n </ProfileCard.Root>\n );\n});\n\nexport const UserProfile: React.ComponentType<UserProfileProps> = withCardStateProvider(_UserProfile);\n\nconst InternalUserProfile: React.ComponentType<WithInternalRouting<UserProfileProps>> =\n withCardStateProvider(_UserProfile);\n\nexport const UserProfileModal = (props: UserProfileModalProps): JSX.Element => {\n const userProfileProps: UserProfileCtx = {\n ...props,\n routing: 'virtual',\n componentName: 'UserProfile',\n mode: 'modal',\n };\n\n return (\n <Route path='user'>\n <UserProfileContext.Provider value={userProfileProps}>\n {/*TODO: Used by InvisibleRootBox, can we simplify? */}\n <div>\n <InternalUserProfile {...userProfileProps} />\n </div>\n </UserProfileContext.Provider>\n </Route>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,MAAM,qBAAqB;AACzB,QACE,oBAAC,KAAK;EAAK,MAAK;YACd,oBAAC,KAAK,kBACJ,qBAAC,qBAEC,oBAAC;GAAM,MAAK;aACV,oBAAC,4BAA0B;IACrB,EACR,oBAAC,mBACC,oBAAC,wBAAsB,GACjB,IACD,GACC;GACF;;AAIhB,MAAM,sBAAsB,wBAAwB;CAClD,MAAM,aAAa,MAAM,OAAuB,KAAK;AACrD,QACE,oBAAC,YAAY,kBACX,qBAAC;EAA8B;aAC7B,oBAAC,uBAAoB,4BAA4B,iBAAiB,2BAA2B,GAAI,EACjG,oBAAC,YAAY;GACC;GACZ,aAAa;aAEb,oBAAC,sBAAoB;IACD;GACJ,GACH;EAErB;AAEF,MAAaA,cAAqD,sBAAsB,aAAa;AAErG,MAAMC,sBACJ,sBAAsB,aAAa;AAErC,MAAa,oBAAoB,UAA8C;CAC7E,MAAMC,mBAAmC;EACvC,GAAG;EACH,SAAS;EACT,eAAe;EACf,MAAM;EACP;AAED,QACE,oBAAC;EAAM,MAAK;YACV,oBAAC,mBAAmB;GAAS,OAAO;aAElC,oBAAC,mBACC,oBAAC,uBAAoB,GAAI,mBAAoB,GACzC;IACsB;GACxB"}
|
|
@@ -3,8 +3,8 @@ import { handleError } from "../../utils/errorHandler.js";
|
|
|
3
3
|
import { VerificationCodeCard } from "../../elements/VerificationCodeCard.js";
|
|
4
4
|
import { useAfterVerification } from "./use-after-verification.js";
|
|
5
5
|
import React from "react";
|
|
6
|
-
import { useSession } from "@clerk/shared/react";
|
|
7
6
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
7
|
+
import { useSession } from "@clerk/shared/react";
|
|
8
8
|
|
|
9
9
|
//#region src/components/UserVerification/UVFactorOneCodeForm.tsx
|
|
10
10
|
const UVFactorOneCodeForm = (props) => {
|
|
@@ -8,8 +8,8 @@ import { handleError } from "../../utils/errorHandler.js";
|
|
|
8
8
|
import { Form } from "../../elements/Form.js";
|
|
9
9
|
import { useAfterVerification } from "./use-after-verification.js";
|
|
10
10
|
import React from "react";
|
|
11
|
-
import { useClerk, useSession } from "@clerk/shared/react";
|
|
12
11
|
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
12
|
+
import { useClerk, useSession } from "@clerk/shared/react";
|
|
13
13
|
|
|
14
14
|
//#region src/components/UserVerification/UVFactorOnePasskeysCard.tsx
|
|
15
15
|
const UVFactorOnePasskeysCard = (props) => {
|
|
@@ -9,8 +9,8 @@ import { handleError } from "../../utils/errorHandler.js";
|
|
|
9
9
|
import { Form } from "../../elements/Form.js";
|
|
10
10
|
import { useAfterVerification } from "./use-after-verification.js";
|
|
11
11
|
import React from "react";
|
|
12
|
-
import { useSession } from "@clerk/shared/react";
|
|
13
12
|
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
13
|
+
import { useSession } from "@clerk/shared/react";
|
|
14
14
|
|
|
15
15
|
//#region src/components/UserVerification/UVFactorTwoBackupCodeCard.tsx
|
|
16
16
|
const UVFactorTwoBackupCodeCard = (props) => {
|
|
@@ -3,8 +3,8 @@ import { handleError } from "../../utils/errorHandler.js";
|
|
|
3
3
|
import { VerificationCodeCard } from "../../elements/VerificationCodeCard.js";
|
|
4
4
|
import { useAfterVerification } from "./use-after-verification.js";
|
|
5
5
|
import React from "react";
|
|
6
|
-
import { useSession } from "@clerk/shared/react";
|
|
7
6
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
7
|
+
import { useSession } from "@clerk/shared/react";
|
|
8
8
|
|
|
9
9
|
//#region src/components/UserVerification/UVFactorTwoCodeForm.tsx
|
|
10
10
|
const UVFactorTwoCodeForm = (props) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { localizationKeys } from "../../localization/localizationKeys.js";
|
|
2
2
|
import { Flow } from "../../customizables/Flow.js";
|
|
3
3
|
import { UVFactorTwoCodeForm } from "./UVFactorTwoCodeForm.js";
|
|
4
|
-
import { useSession } from "@clerk/shared/react";
|
|
5
4
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
5
|
+
import { useSession } from "@clerk/shared/react";
|
|
6
6
|
|
|
7
7
|
//#region src/components/UserVerification/UVFactorTwoPhoneCodeCard.tsx
|
|
8
8
|
const UVFactorTwoPhoneCodeCard = (props) => {
|
|
@@ -11,8 +11,8 @@ import { Form } from "../../elements/Form.js";
|
|
|
11
11
|
import { HavingTrouble } from "../SignIn/HavingTrouble.js";
|
|
12
12
|
import { useAfterVerification } from "./use-after-verification.js";
|
|
13
13
|
import React from "react";
|
|
14
|
-
import { useSession } from "@clerk/shared/react";
|
|
15
14
|
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
15
|
+
import { useSession } from "@clerk/shared/react";
|
|
16
16
|
|
|
17
17
|
//#region src/components/UserVerification/UserVerificationFactorOnePassword.tsx
|
|
18
18
|
function UserVerificationFactorOnePasswordCard(props) {
|
|
@@ -9,7 +9,7 @@ import { UserVerificationFactorTwoTOTP } from "./UserVerificationFactorTwoTOTP.j
|
|
|
9
9
|
import { UVFactorTwoAlternativeMethods } from "./UVFactorTwoAlternativeMethods.js";
|
|
10
10
|
import { UVFactorTwoBackupCodeCard } from "./UVFactorTwoBackupCodeCard.js";
|
|
11
11
|
import { UVFactorTwoPhoneCodeCard } from "./UVFactorTwoPhoneCodeCard.js";
|
|
12
|
-
import
|
|
12
|
+
import { useEffect, useMemo } from "react";
|
|
13
13
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
14
14
|
|
|
15
15
|
//#region src/components/UserVerification/UserVerificationFactorTwo.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserVerificationFactorTwo.js","names":["SUPPORTED_STRATEGIES: SessionVerificationSecondFactor['strategy'][]"],"sources":["../../../src/components/UserVerification/UserVerificationFactorTwo.tsx"],"sourcesContent":["import type { SessionVerificationResource, SessionVerificationSecondFactor } from '@clerk/shared/types';\nimport
|
|
1
|
+
{"version":3,"file":"UserVerificationFactorTwo.js","names":["SUPPORTED_STRATEGIES: SessionVerificationSecondFactor['strategy'][]"],"sources":["../../../src/components/UserVerification/UserVerificationFactorTwo.tsx"],"sourcesContent":["import type { SessionVerificationResource, SessionVerificationSecondFactor } from '@clerk/shared/types';\nimport { useEffect, useMemo } from 'react';\n\nimport { withCardStateProvider } from '@/elements/contexts';\nimport { LoadingCard } from '@/elements/LoadingCard';\nimport { useRouter } from '@/router';\n\nimport { useSecondFactorSelection } from '../SignIn/useSecondFactorSelection';\nimport { secondFactorsAreEqual } from './useReverificationAlternativeStrategies';\nimport { UserVerificationFactorTwoTOTP } from './UserVerificationFactorTwoTOTP';\nimport { useUserVerificationSession, withUserVerificationSessionGuard } from './useUserVerificationSession';\nimport { sortByPrimaryFactor } from './utils';\nimport { UVFactorTwoAlternativeMethods } from './UVFactorTwoAlternativeMethods';\nimport { UVFactorTwoBackupCodeCard } from './UVFactorTwoBackupCodeCard';\nimport { UVFactorTwoPhoneCodeCard } from './UVFactorTwoPhoneCodeCard';\n\nconst SUPPORTED_STRATEGIES: SessionVerificationSecondFactor['strategy'][] = [\n 'phone_code',\n 'totp',\n 'backup_code',\n] as const;\n\nexport function UserVerificationFactorTwoComponent(): JSX.Element {\n const { navigate } = useRouter();\n const { data } = useUserVerificationSession();\n const sessionVerification = data as SessionVerificationResource;\n\n const availableFactors = useMemo(() => {\n return (\n sessionVerification.supportedSecondFactors\n ?.filter(factor => SUPPORTED_STRATEGIES.includes(factor.strategy))\n ?.sort(sortByPrimaryFactor) || null\n );\n }, [sessionVerification.supportedSecondFactors]);\n\n const {\n currentFactor,\n factorAlreadyPrepared,\n handleFactorPrepare,\n selectFactor,\n showAllStrategies,\n toggleAllStrategies,\n } = useSecondFactorSelection<SessionVerificationSecondFactor>(availableFactors);\n\n const secondFactorsExcludingCurrent = useMemo(\n () => availableFactors?.filter(factor => !secondFactorsAreEqual(factor, currentFactor)),\n [availableFactors, currentFactor],\n );\n\n const hasAlternativeStrategies = useMemo(\n () => (secondFactorsExcludingCurrent && secondFactorsExcludingCurrent.length > 0) || false,\n [secondFactorsExcludingCurrent],\n );\n\n useEffect(() => {\n if (sessionVerification.status === 'needs_first_factor') {\n void navigate('../');\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!currentFactor) {\n return <LoadingCard />;\n }\n\n if (showAllStrategies && hasAlternativeStrategies) {\n return (\n <UVFactorTwoAlternativeMethods\n supportedSecondFactors={secondFactorsExcludingCurrent || null}\n onBackLinkClick={toggleAllStrategies}\n onFactorSelected={selectFactor}\n />\n );\n }\n\n switch (currentFactor?.strategy) {\n case 'phone_code':\n return (\n <UVFactorTwoPhoneCodeCard\n factorAlreadyPrepared={factorAlreadyPrepared}\n onFactorPrepare={handleFactorPrepare}\n factor={currentFactor}\n onShowAlternativeMethodsClicked={toggleAllStrategies}\n showAlternativeMethods={hasAlternativeStrategies}\n />\n );\n case 'totp':\n return (\n <UserVerificationFactorTwoTOTP\n factorAlreadyPrepared={factorAlreadyPrepared}\n onFactorPrepare={handleFactorPrepare}\n factor={currentFactor}\n onShowAlternativeMethodsClicked={toggleAllStrategies}\n showAlternativeMethods={hasAlternativeStrategies}\n />\n );\n case 'backup_code':\n return <UVFactorTwoBackupCodeCard onShowAlternativeMethodsClicked={toggleAllStrategies} />;\n default:\n return <LoadingCard />;\n }\n}\n\nexport const UserVerificationFactorTwo = withUserVerificationSessionGuard(\n withCardStateProvider(UserVerificationFactorTwoComponent),\n);\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,MAAMA,uBAAsE;CAC1E;CACA;CACA;CACD;AAED,SAAgB,qCAAkD;CAChE,MAAM,EAAE,aAAa,WAAW;CAChC,MAAM,EAAE,SAAS,4BAA4B;CAC7C,MAAM,sBAAsB;CAE5B,MAAM,mBAAmB,cAAc;AACrC,SACE,oBAAoB,wBAChB,QAAO,WAAU,qBAAqB,SAAS,OAAO,SAAS,CAAC,EAChE,KAAK,oBAAoB,IAAI;IAElC,CAAC,oBAAoB,uBAAuB,CAAC;CAEhD,MAAM,EACJ,eACA,uBACA,qBACA,cACA,mBACA,wBACE,yBAA0D,iBAAiB;CAE/E,MAAM,gCAAgC,cAC9B,kBAAkB,QAAO,WAAU,CAAC,sBAAsB,QAAQ,cAAc,CAAC,EACvF,CAAC,kBAAkB,cAAc,CAClC;CAED,MAAM,2BAA2B,cACxB,iCAAiC,8BAA8B,SAAS,KAAM,OACrF,CAAC,8BAA8B,CAChC;AAED,iBAAgB;AACd,MAAI,oBAAoB,WAAW,qBACjC,CAAK,SAAS,MAAM;IAGrB,EAAE,CAAC;AAEN,KAAI,CAAC,cACH,QAAO,oBAAC,gBAAc;AAGxB,KAAI,qBAAqB,yBACvB,QACE,oBAAC;EACC,wBAAwB,iCAAiC;EACzD,iBAAiB;EACjB,kBAAkB;GAClB;AAIN,SAAQ,eAAe,UAAvB;EACE,KAAK,aACH,QACE,oBAAC;GACwB;GACvB,iBAAiB;GACjB,QAAQ;GACR,iCAAiC;GACjC,wBAAwB;IACxB;EAEN,KAAK,OACH,QACE,oBAAC;GACwB;GACvB,iBAAiB;GACjB,QAAQ;GACR,iCAAiC;GACjC,wBAAwB;IACxB;EAEN,KAAK,cACH,QAAO,oBAAC,6BAA0B,iCAAiC,sBAAuB;EAC5F,QACE,QAAO,oBAAC,gBAAc;;;AAI5B,MAAa,4BAA4B,iCACvC,sBAAsB,mCAAmC,CAC1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["UserVerification: React.ComponentType<__internal_UserVerificationProps
|
|
1
|
+
{"version":3,"file":"index.js","names":["UserVerification: React.ComponentType<WithInternalRouting<__internal_UserVerificationProps>>"],"sources":["../../../src/components/UserVerification/index.tsx"],"sourcesContent":["import type { __internal_UserVerificationModalProps, __internal_UserVerificationProps } from '@clerk/shared/types';\nimport React, { useEffect } from 'react';\n\nimport { UserVerificationContext, withCoreSessionSwitchGuard } from '@/contexts';\nimport { Flow } from '@/customizables';\nimport type { WithInternalRouting } from '@/internal';\nimport { Route, Switch } from '@/router';\n\nimport { UserVerificationFactorOne } from './UserVerificationFactorOne';\nimport { UserVerificationFactorTwo } from './UserVerificationFactorTwo';\nimport { useUserVerificationSession } from './useUserVerificationSession';\n\nfunction UserVerificationRoutes(): JSX.Element {\n const { invalidate } = useUserVerificationSession();\n useEffect(() => {\n return () => {\n invalidate();\n };\n }, []);\n return (\n <Flow.Root flow='userVerification'>\n <Switch>\n <Route path='factor-two'>\n <UserVerificationFactorTwo />\n </Route>\n <Route index>\n <UserVerificationFactorOne />\n </Route>\n </Switch>\n </Flow.Root>\n );\n}\n\nUserVerificationRoutes.displayName = 'UserVerification';\n\nconst UserVerification: React.ComponentType<WithInternalRouting<__internal_UserVerificationProps>> =\n withCoreSessionSwitchGuard(UserVerificationRoutes);\n\nconst UserVerificationModal = (props: __internal_UserVerificationModalProps): JSX.Element => {\n return (\n <Route path='user-verification'>\n <UserVerificationContext.Provider\n value={{\n componentName: 'UserVerification',\n ...props,\n routing: 'virtual',\n }}\n >\n {/*TODO: Used by InvisibleRootBox, can we simplify? */}\n <div>\n <UserVerification\n {...props}\n routing='virtual'\n />\n </div>\n </UserVerificationContext.Provider>\n </Route>\n );\n};\n\nexport { UserVerification, UserVerificationModal };\n"],"mappings":";;;;;;;;;;;;AAYA,SAAS,yBAAsC;CAC7C,MAAM,EAAE,eAAe,4BAA4B;AACnD,iBAAgB;AACd,eAAa;AACX,eAAY;;IAEb,EAAE,CAAC;AACN,QACE,oBAAC,KAAK;EAAK,MAAK;YACd,qBAAC,qBACC,oBAAC;GAAM,MAAK;aACV,oBAAC,8BAA4B;IACvB,EACR,oBAAC;GAAM;aACL,oBAAC,8BAA4B;IACvB,IACD;GACC;;AAIhB,uBAAuB,cAAc;AAErC,MAAMA,mBACJ,2BAA2B,uBAAuB;AAEpD,MAAM,yBAAyB,UAA8D;AAC3F,QACE,oBAAC;EAAM,MAAK;YACV,oBAAC,wBAAwB;GACvB,OAAO;IACL,eAAe;IACf,GAAG;IACH,SAAS;IACV;aAGD,oBAAC,mBACC,oBAAC;IACC,GAAI;IACJ,SAAQ;KACR,GACE;IAC2B;GAC7B"}
|
|
@@ -2,8 +2,8 @@ import { useFetch } from "../../hooks/useFetch.js";
|
|
|
2
2
|
import { useUserVerification } from "../../contexts/components/UserVerification.js";
|
|
3
3
|
import { LoadingCard } from "../../elements/LoadingCard.js";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
|
-
import { useSession } from "@clerk/shared/react";
|
|
6
5
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
6
|
+
import { useSession } from "@clerk/shared/react";
|
|
7
7
|
|
|
8
8
|
//#region src/components/UserVerification/useUserVerificationSession.tsx
|
|
9
9
|
const useUserVerificationSessionKey = () => {
|
|
@@ -12,8 +12,8 @@ import { Header } from "../../elements/Header.js";
|
|
|
12
12
|
import { handleError } from "../../utils/errorHandler.js";
|
|
13
13
|
import { Form } from "../../elements/Form.js";
|
|
14
14
|
import { Wizard, useWizard } from "../../common/Wizard.js";
|
|
15
|
-
import { useClerk } from "@clerk/shared/react";
|
|
16
15
|
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
16
|
+
import { useClerk } from "@clerk/shared/react";
|
|
17
17
|
|
|
18
18
|
//#region src/components/Waitlist/WaitlistForm.tsx
|
|
19
19
|
const WaitlistForm = (props) => {
|
|
@@ -7,8 +7,8 @@ import { withCardStateProvider } from "../../elements/contexts/index.js";
|
|
|
7
7
|
import { Flow } from "../../customizables/Flow.js";
|
|
8
8
|
import { Card } from "../../elements/Card/index.js";
|
|
9
9
|
import { WaitlistForm } from "./WaitlistForm.js";
|
|
10
|
-
import { useClerk } from "@clerk/shared/react";
|
|
11
10
|
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
11
|
+
import { useClerk } from "@clerk/shared/react";
|
|
12
12
|
|
|
13
13
|
//#region src/components/Waitlist/index.tsx
|
|
14
14
|
const _Waitlist = () => {
|
|
@@ -6,8 +6,8 @@ import { Modal } from "../../../elements/Modal.js";
|
|
|
6
6
|
import { Portal } from "../../../elements/Portal.js";
|
|
7
7
|
import { ClerkLogoIcon, PromptContainer, PromptSuccessIcon, basePromptElementStyles } from "../shared.js";
|
|
8
8
|
import { forwardRef, useId, useLayoutEffect, useRef, useState } from "react";
|
|
9
|
-
import { useClerk } from "@clerk/shared/react";
|
|
10
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
10
|
+
import { useClerk } from "@clerk/shared/react";
|
|
11
11
|
import { css } from "@emotion/react";
|
|
12
12
|
|
|
13
13
|
//#region src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
|
|
@@ -5,8 +5,8 @@ import { ClerkLogoIcon, PromptContainer, PromptSuccessIcon, basePromptElementSty
|
|
|
5
5
|
import { KeySlashIcon } from "./KeySlashIcon.js";
|
|
6
6
|
import { useRevalidateEnvironment } from "./use-revalidate-environment.js";
|
|
7
7
|
import { useEffect, useMemo, useState } from "react";
|
|
8
|
-
import { useUser } from "@clerk/shared/react";
|
|
9
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
9
|
+
import { useUser } from "@clerk/shared/react";
|
|
10
10
|
import { css } from "@emotion/react";
|
|
11
11
|
import { createPortal } from "react-dom";
|
|
12
12
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { assertClerkSingletonExists } from "./utils.js";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { ClerkInstanceContext, ClientContext, OrganizationProvider, SessionContext, UserContext, __experimental_CheckoutProvider } from "@clerk/shared/react";
|
|
4
3
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
4
|
+
import { ClerkInstanceContext, ClientContext, OrganizationProvider, SessionContext, UserContext, __experimental_CheckoutProvider } from "@clerk/shared/react";
|
|
5
5
|
|
|
6
6
|
//#region src/contexts/CoreClerkContextWrapper.tsx
|
|
7
7
|
function CoreClerkContextWrapper(props) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { useSessionContext } from "@clerk/shared/react";
|
|
3
2
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { useSessionContext } from "@clerk/shared/react";
|
|
4
4
|
|
|
5
5
|
//#region src/contexts/CoreSessionContext.tsx
|
|
6
6
|
function withCoreSessionSwitchGuard(Component) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { useUserContext } from "@clerk/shared/react";
|
|
3
2
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { useUserContext } from "@clerk/shared/react";
|
|
4
4
|
|
|
5
5
|
//#region src/contexts/CoreUserContext.tsx
|
|
6
6
|
function withCoreUserGuard(Component) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["243"],{9302:function(e,t,a){a.d(t,{A:()=>P});var r=a(4518),i=a(
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["243"],{9302:function(e,t,a){a.d(t,{A:()=>P});var r=a(4518),i=a(1210),n=a(5074),o=a(7697),l=a(3269),s=a(2454),d=a(1475),c=a(3549),u=a(6153),g=a(155),h=a(6370),p=a(5485),m=a(4468),f=a(8640),z=a(6245),v=a(8272),b=a(7068),C=a(2861),Y=a(3934),$=a(3100),x=a(5377),O=a(3689);let P=(0,l.dm)(e=>{let t=(0,l.f0)(),a=(0,z.X)({onNextStep:()=>t.setError(void 0)}),P=n.useRef(null),{createOrganization:S,isLoaded:w,setActive:k,userMemberships:A}=(0,i.D_)({userMemberships:O.mu.userMemberships}),{organization:R}=(0,i.Z5)(),{organizationSettings:F}=(0,o.O)(),[T,_]=n.useState(),y=(0,f.tJ)("name","",{type:"text",label:(0,C.G)("formFieldLabel__organizationName"),placeholder:(0,C.G)("formFieldInputPlaceholder__organizationName")}),I=(0,f.tJ)("slug","",{type:"text",label:(0,C.G)("formFieldLabel__organizationSlug"),placeholder:(0,C.G)("formFieldInputPlaceholder__organizationSlug")}),D=!!y.value,G=!F.slug.disabled,M=async r=>{if((r.preventDefault(),D)&&w)try{let t={name:y.value};G&&(t.slug=I.value);let r=await S(t);if(T&&await r.setLogo({file:T}),P.current=r,await k({organization:r}),A.revalidate?.(),e.skipInvitationScreen??1===r.maxAllowedMemberships)return B();a.nextStep()}catch(e){(0,m.H4)(e,[y,I],t.setError)}},B=()=>{e.navigateAfterCreateOrganization?.(P.current),e.onComplete?.()},U=e=>{I.setValue(e)},V="organizationList"===e.flow?"subtitle":void 0;return(0,r.FD)(z.s,{...a.props,children:[(0,r.Y)(c.M,{headerTitle:e?.startPage?.headerTitle,headerSubtitle:e?.startPage?.headerSubtitle,headerTitleTextVariant:"h2",headerSubtitleTextVariant:V,sx:e=>({minHeight:e.sizes.$60,gap:e.space.$6,textAlign:"left"}),children:(0,r.FD)(s.l.Root,{onSubmit:M,sx:e=>({gap:e.space.$6}),children:[(0,r.Y)(v.fv,{children:(0,r.Y)(x.i,{organization:{name:y.value},onAvatarChange:async e=>await _(e),onAvatarRemove:T?()=>(t.setIdle(),_(null)):null,avatarPreviewPlaceholder:(0,r.Y)(g.K,{variant:"ghost","aria-label":"Upload organization logo",icon:(0,r.Y)(v.In,{size:"md",icon:b.A,sx:e=>({color:e.colors.$colorMutedForeground,transitionDuration:e.transitionDuration.$controls})}),sx:e=>({width:e.sizes.$16,height:e.sizes.$16,borderRadius:e.radii.$md,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$dashed,borderColor:e.colors.$borderAlpha200,backgroundColor:e.colors.$neutralAlpha50,":hover":{backgroundColor:e.colors.$neutralAlpha50,svg:{transform:"scale(1.2)"}}})})})}),(0,r.Y)(s.l.ControlRow,{elementId:y.id,children:(0,r.Y)(s.l.PlainInput,{...y.props,onChange:e=>{y.setValue(e.target.value),U((0,p.e)(e.target.value))},isRequired:!0,autoFocus:!0,ignorePasswordManager:!0})}),G&&(0,r.Y)(s.l.ControlRow,{elementId:I.id,children:(0,r.Y)(s.l.PlainInput,{...I.props,onChange:e=>{U(e.target.value)},isRequired:!0,pattern:"^(?=.*[a-z0-9])[a-z0-9\\-]+$",ignorePasswordManager:!0})}),(0,r.FD)(d.c,{sx:e=>({marginTop:e.space.$none}),children:[(0,r.Y)(s.l.SubmitButton,{block:!1,isDisabled:!D,localizationKey:(0,C.G)("createOrganization.formButtonSubmit")}),e.onCancel&&(0,r.Y)(s.l.ResetButton,{localizationKey:(0,C.G)("userProfile.formButtonReset"),block:!1,onClick:e.onCancel})]})]})}),(0,r.Y)(c.M,{headerTitle:(0,C.G)("organizationProfile.invitePage.title"),headerTitleTextVariant:"h2",headerSubtitleTextVariant:V,sx:e=>({minHeight:e.sizes.$60,textAlign:"left"}),children:R&&(0,r.Y)(Y.B,{resetButtonLabel:(0,C.G)("createOrganization.invitePage.formButtonReset"),onSuccess:a.nextStep,onReset:B})}),(0,r.FD)(v.fv,{children:[(0,r.Y)(u.Y.Root,{children:(0,r.Y)(u.Y.Title,{localizationKey:(0,C.G)("organizationProfile.invitePage.title"),sx:{textAlign:"left"}})}),(0,r.Y)(h.B,{contents:(0,r.Y)($.k,{}),sx:e=>({minHeight:e.sizes.$60}),onFinish:B})]})]})})},4472:function(e,t,a){a.r(t),a.d(t,{CreateOrganization:()=>z,CreateOrganizationModal:()=>v});var r=a(4518),i=a(3269),n=a(3264),o=a(1),l=a(4607),s=a(7831),d=a(2265),c=a(1210),u=a(6088),g=a(2861),h=a(180),p=a(9302);let m=(0,i.dm)(()=>{let{closeCreateOrganization:e}=(0,c.ho)(),{mode:t,navigateAfterCreateOrganization:a,skipInvitationScreen:n}=(0,o.W)(),l=(0,i.f0)(),{showDevModeNotice:s}=(0,h.Q)();return(0,r.FD)(u.Z.Root,{sx:e=>({width:e.sizes.$108}),children:[(0,r.FD)(u.Z.Content,{sx:e=>({padding:`${e.space.$4} ${e.space.$5} ${s?e.space.$12:e.space.$6}`}),children:[(0,r.Y)(u.Z.Alert,{children:l.error}),(0,r.Y)(p.A,{skipInvitationScreen:n,startPage:{headerTitle:(0,g.G)("createOrganization.title")},navigateAfterCreateOrganization:a,flow:"default",onComplete:()=>{"modal"===t&&e()}})]}),(0,r.Y)(u.Z.Footer,{})]})}),f=(0,n.G)(()=>(0,r.Y)(m,{})),z=(0,i.dm)(()=>(0,r.Y)(l.n.Root,{flow:"createOrganization",children:(0,r.Y)(l.n.Part,{children:(0,r.Y)(s.d,{children:(0,r.Y)(d.q,{children:(0,r.Y)(f,{})})})})})),v=e=>{let t={...e,routing:"virtual",componentName:"CreateOrganization",mode:"modal"};return(0,r.Y)(d.q,{path:"createOrganization",children:(0,r.Y)(o.$.Provider,{value:t,children:(0,r.Y)("div",{children:(0,r.Y)(z,{})})})})}},1:function(e,t,a){a.d(t,{$:()=>l,W:()=>s});var r=a(5074),i=a(7697),n=a(4964),o=a(2117);let l=(0,r.createContext)(null),s=()=>{let e=(0,r.useContext)(l),{navigate:t}=(0,n.r)(),{displayConfig:a}=(0,i.O)();if(!e||"CreateOrganization"!==e.componentName)throw Error("Clerk: useCreateOrganizationContext called outside CreateOrganization.");let{componentName:s,...d}=e;return{...d,skipInvitationScreen:d.skipInvitationScreen||!1,navigateAfterCreateOrganization:e=>"function"==typeof d.afterCreateOrganizationUrl?t(d.afterCreateOrganizationUrl(e)):d.afterCreateOrganizationUrl?t((0,o.tR)({urlWithParam:d.afterCreateOrganizationUrl,entity:e})):t(a.afterCreateOrganizationUrl),componentName:s}}}}]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseAppearance } from "./parseAppearance.js";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { createContextAndHook, useDeepEqualMemo } from "@clerk/shared/react";
|
|
4
3
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
4
|
+
import { createContextAndHook, useDeepEqualMemo } from "@clerk/shared/react";
|
|
5
5
|
|
|
6
6
|
//#region src/customizables/AppearanceContext.tsx
|
|
7
7
|
const [AppearanceContext, useAppearance] = createContextAndHook("AppearanceContext");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Appearance } from "../internal/appearance.js";
|
|
1
|
+
import { Appearance, Theme } from "../internal/appearance.js";
|
|
2
2
|
|
|
3
3
|
//#region src/customizables/parseAppearance.d.ts
|
|
4
4
|
|
|
5
|
-
type PublicAppearanceTopLevelKey = keyof
|
|
5
|
+
type PublicAppearanceTopLevelKey = Exclude<keyof Appearance, keyof Theme | 'captcha' | 'cssLayerName' | 'elements' | 'layout' | 'theme' | 'variables'>;
|
|
6
6
|
type AppearanceCascade = {
|
|
7
7
|
globalAppearance?: Appearance;
|
|
8
8
|
appearance?: Appearance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseAppearance.d.ts","names":[],"sources":["../../src/customizables/parseAppearance.ts"],"sourcesContent":[],"mappings":";;;;KAsBK,2BAAA,
|
|
1
|
+
{"version":3,"file":"parseAppearance.d.ts","names":[],"sources":["../../src/customizables/parseAppearance.ts"],"sourcesContent":[],"mappings":";;;;KAsBK,2BAAA,GAA8B,OAAA,CAAA,MAC3B,UAD2B,EAAA,MAE3B,KAF2B,GAAA,SAAA,GAAA,cAAA,GAAA,UAAA,GAAA,QAAA,GAAA,OAAA,GAAA,WAAA,CAAA;AAAO,KAK9B,iBAAA,GAL8B;EAK9B,gBAAA,CAAA,EACS,UADQ;EACR,UAAA,CAAA,EACN,UADM;EACN,aAAA,EACE,2BADF,GAAA,kBAAA,GAAA,2BAAA;CACE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseAppearance.js","names":["defaultOptions: ParsedOptions","defaultCaptchaOptions: ParsedCaptcha","appearanceList: Appearance[]"],"sources":["../../src/customizables/parseAppearance.ts"],"sourcesContent":["import type { DeepPartial } from '@clerk/shared/types';\nimport { fastDeepMergeAndReplace } from '@clerk/shared/utils';\n\nimport { baseTheme, getBaseTheme } from '../baseTheme';\nimport { createInternalTheme, defaultInternalTheme } from '../foundations';\nimport type { Appearance, CaptchaAppearanceOptions, Elements, Options, Theme } from '../internal/appearance';\nimport type { InternalTheme } from '../styledSystem';\nimport {\n createColorScales,\n createFonts,\n createFontSizeScale,\n createFontWeightScale,\n createRadiiUnits,\n createShadowsUnits,\n createSpaceScale,\n} from './parseVariables';\n\nexport type ParsedElements = Elements[];\nexport type ParsedInternalTheme = InternalTheme;\nexport type ParsedOptions = Required<Options>;\nexport type ParsedCaptcha = Required<CaptchaAppearanceOptions>;\n\ntype PublicAppearanceTopLevelKey =
|
|
1
|
+
{"version":3,"file":"parseAppearance.js","names":["defaultOptions: ParsedOptions","defaultCaptchaOptions: ParsedCaptcha","appearanceList: Appearance[]"],"sources":["../../src/customizables/parseAppearance.ts"],"sourcesContent":["import type { DeepPartial } from '@clerk/shared/types';\nimport { fastDeepMergeAndReplace } from '@clerk/shared/utils';\n\nimport { baseTheme, getBaseTheme } from '../baseTheme';\nimport { createInternalTheme, defaultInternalTheme } from '../foundations';\nimport type { Appearance, CaptchaAppearanceOptions, Elements, Options, Theme } from '../internal/appearance';\nimport type { InternalTheme } from '../styledSystem';\nimport {\n createColorScales,\n createFonts,\n createFontSizeScale,\n createFontWeightScale,\n createRadiiUnits,\n createShadowsUnits,\n createSpaceScale,\n} from './parseVariables';\n\nexport type ParsedElements = Elements[];\nexport type ParsedInternalTheme = InternalTheme;\nexport type ParsedOptions = Required<Options>;\nexport type ParsedCaptcha = Required<CaptchaAppearanceOptions>;\n\ntype PublicAppearanceTopLevelKey = Exclude<\n keyof Appearance,\n keyof Theme | 'captcha' | 'cssLayerName' | 'elements' | 'layout' | 'theme' | 'variables'\n>;\n\nexport type AppearanceCascade = {\n globalAppearance?: Appearance;\n appearance?: Appearance;\n appearanceKey: PublicAppearanceTopLevelKey | 'impersonationFab' | 'enableOrganizationsPrompt';\n};\n\nexport type ParsedAppearance = {\n parsedElements: ParsedElements;\n parsedInternalTheme: ParsedInternalTheme;\n parsedOptions: ParsedOptions;\n parsedCaptcha: ParsedCaptcha;\n};\n\nconst defaultOptions: ParsedOptions = {\n logoPlacement: 'inside',\n socialButtonsPlacement: 'top',\n socialButtonsVariant: 'auto',\n logoImageUrl: '',\n logoLinkUrl: '',\n showOptionalFields: false,\n helpPageUrl: '',\n privacyPageUrl: '',\n termsPageUrl: '',\n shimmer: true,\n animations: true,\n unsafe_disableDevelopmentModeWarnings: false,\n};\n\nconst defaultCaptchaOptions: ParsedCaptcha = {\n theme: 'auto',\n size: 'normal',\n language: '',\n};\n\n/**\n * Parses the public appearance object.\n * It splits the resulting styles into 2 objects: parsedElements, parsedInternalTheme\n * parsedElements is used by the makeCustomizables HOC to handle per-element styling\n * parsedInternalTheme is used by FlowCard/InternalThemeProvider for generic theming\n * Both are injected by the AppearanceContext\n */\nexport const parseAppearance = (cascade: AppearanceCascade): ParsedAppearance => {\n const { globalAppearance, appearance: componentAppearance, appearanceKey } = cascade;\n\n const appearanceList: Appearance[] = [];\n [globalAppearance, globalAppearance?.[appearanceKey as PublicAppearanceTopLevelKey], componentAppearance].forEach(a =>\n expand(a, appearanceList),\n );\n\n const parsedInternalTheme = parseVariables(appearanceList);\n const parsedOptions = parseOptions(appearanceList);\n const parsedCaptcha = parseCaptcha(appearanceList);\n\n if (\n !appearanceList.find(a => {\n //@ts-expect-error not public api\n return !!a.simpleStyles;\n })\n ) {\n appearanceList.unshift(baseTheme);\n }\n\n const parsedElements = parseElements(\n appearanceList.map(appearance => {\n if (!appearance.elements || typeof appearance.elements !== 'function') {\n return appearance;\n }\n const res = { ...appearance };\n res.elements = appearance.elements({ theme: parsedInternalTheme });\n return res;\n }),\n );\n return { parsedElements, parsedInternalTheme, parsedOptions, parsedCaptcha };\n};\n\nconst expand = (theme: Theme | undefined, cascade: any[]) => {\n if (!theme) {\n return;\n }\n\n const themeProperty = theme.theme;\n\n if (themeProperty !== undefined) {\n (Array.isArray(themeProperty) ? themeProperty : [themeProperty]).forEach(t => {\n if (typeof t === 'string') {\n expand(getBaseTheme(t), cascade);\n } else {\n expand(t as Theme, cascade);\n }\n });\n }\n\n cascade.push(theme);\n};\n\nconst parseElements = (appearances: Appearance[]) => {\n return appearances.map(appearance => ({ ...appearance?.elements }));\n};\n\nconst parseOptions = (appearanceList: Appearance[]) => {\n return { ...defaultOptions, ...appearanceList.reduce((acc, appearance) => ({ ...acc, ...appearance.options }), {}) };\n};\n\nconst parseCaptcha = (appearanceList: Appearance[]) => {\n return {\n ...defaultCaptchaOptions,\n ...appearanceList.reduce((acc, appearance) => {\n if (appearance.captcha) {\n const { theme: captchaTheme, size, language } = appearance.captcha;\n return {\n ...acc,\n ...(captchaTheme && { theme: captchaTheme }),\n ...(size && { size }),\n ...(language && { language }),\n };\n }\n return acc;\n }, {} as Partial<CaptchaAppearanceOptions>),\n };\n};\n\nconst parseVariables = (appearances: Appearance[]) => {\n const res = {} as DeepPartial<InternalTheme>;\n fastDeepMergeAndReplace({ ...defaultInternalTheme }, res);\n appearances.forEach(appearance => {\n fastDeepMergeAndReplace(createInternalThemeFromVariables(appearance), res);\n });\n return res as ParsedInternalTheme;\n};\n\nconst createInternalThemeFromVariables = (theme: Theme | undefined): DeepPartial<InternalTheme> => {\n if (!theme) {\n return {};\n }\n const colors = { ...createColorScales(theme) };\n const radii = { ...createRadiiUnits(theme) };\n const space = { ...createSpaceScale(theme) };\n const fontSizes = { ...createFontSizeScale(theme) };\n const fontWeights = { ...createFontWeightScale(theme) };\n const fonts = { ...createFonts(theme) };\n const shadows = { ...createShadowsUnits(theme) };\n return createInternalTheme({ colors, radii, space, fontSizes, fontWeights, fonts, shadows } as any);\n};\n"],"mappings":";;;;;;;AAwCA,MAAMA,iBAAgC;CACpC,eAAe;CACf,wBAAwB;CACxB,sBAAsB;CACtB,cAAc;CACd,aAAa;CACb,oBAAoB;CACpB,aAAa;CACb,gBAAgB;CAChB,cAAc;CACd,SAAS;CACT,YAAY;CACZ,uCAAuC;CACxC;AAED,MAAMC,wBAAuC;CAC3C,OAAO;CACP,MAAM;CACN,UAAU;CACX;;;;;;;;AASD,MAAa,mBAAmB,YAAiD;CAC/E,MAAM,EAAE,kBAAkB,YAAY,qBAAqB,kBAAkB;CAE7E,MAAMC,iBAA+B,EAAE;AACvC;EAAC;EAAkB,mBAAmB;EAA+C;EAAoB,CAAC,SAAQ,MAChH,OAAO,GAAG,eAAe,CAC1B;CAED,MAAM,sBAAsB,eAAe,eAAe;CAC1D,MAAM,gBAAgB,aAAa,eAAe;CAClD,MAAM,gBAAgB,aAAa,eAAe;AAElD,KACE,CAAC,eAAe,MAAK,MAAK;AAExB,SAAO,CAAC,CAAC,EAAE;GACX,CAEF,gBAAe,QAAQ,UAAU;AAanC,QAAO;EAAE,gBAVc,cACrB,eAAe,KAAI,eAAc;AAC/B,OAAI,CAAC,WAAW,YAAY,OAAO,WAAW,aAAa,WACzD,QAAO;GAET,MAAM,MAAM,EAAE,GAAG,YAAY;AAC7B,OAAI,WAAW,WAAW,SAAS,EAAE,OAAO,qBAAqB,CAAC;AAClE,UAAO;IACP,CACH;EACwB;EAAqB;EAAe;EAAe;;AAG9E,MAAM,UAAU,OAA0B,YAAmB;AAC3D,KAAI,CAAC,MACH;CAGF,MAAM,gBAAgB,MAAM;AAE5B,KAAI,kBAAkB,OACpB,EAAC,MAAM,QAAQ,cAAc,GAAG,gBAAgB,CAAC,cAAc,EAAE,SAAQ,MAAK;AAC5E,MAAI,OAAO,MAAM,SACf,QAAO,aAAa,EAAE,EAAE,QAAQ;MAEhC,QAAO,GAAY,QAAQ;GAE7B;AAGJ,SAAQ,KAAK,MAAM;;AAGrB,MAAM,iBAAiB,gBAA8B;AACnD,QAAO,YAAY,KAAI,gBAAe,EAAE,GAAG,YAAY,UAAU,EAAE;;AAGrE,MAAM,gBAAgB,mBAAiC;AACrD,QAAO;EAAE,GAAG;EAAgB,GAAG,eAAe,QAAQ,KAAK,gBAAgB;GAAE,GAAG;GAAK,GAAG,WAAW;GAAS,GAAG,EAAE,CAAC;EAAE;;AAGtH,MAAM,gBAAgB,mBAAiC;AACrD,QAAO;EACL,GAAG;EACH,GAAG,eAAe,QAAQ,KAAK,eAAe;AAC5C,OAAI,WAAW,SAAS;IACtB,MAAM,EAAE,OAAO,cAAc,MAAM,aAAa,WAAW;AAC3D,WAAO;KACL,GAAG;KACH,GAAI,gBAAgB,EAAE,OAAO,cAAc;KAC3C,GAAI,QAAQ,EAAE,MAAM;KACpB,GAAI,YAAY,EAAE,UAAU;KAC7B;;AAEH,UAAO;KACN,EAAE,CAAsC;EAC5C;;AAGH,MAAM,kBAAkB,gBAA8B;CACpD,MAAM,MAAM,EAAE;AACd,yBAAwB,EAAE,GAAG,sBAAsB,EAAE,IAAI;AACzD,aAAY,SAAQ,eAAc;AAChC,0BAAwB,iCAAiC,WAAW,EAAE,IAAI;GAC1E;AACF,QAAO;;AAGT,MAAM,oCAAoC,UAAyD;AACjG,KAAI,CAAC,MACH,QAAO,EAAE;AASX,QAAO,oBAAoB;EAAE,QAPd,EAAE,GAAG,kBAAkB,MAAM,EAAE;EAOT,OANvB,EAAE,GAAG,iBAAiB,MAAM,EAAE;EAMA,OAL9B,EAAE,GAAG,iBAAiB,MAAM,EAAE;EAKO,WAJjC,EAAE,GAAG,oBAAoB,MAAM,EAAE;EAIW,aAH1C,EAAE,GAAG,sBAAsB,MAAM,EAAE;EAGoB,OAF7D,EAAE,GAAG,YAAY,MAAM,EAAE;EAE2C,SADlE,EAAE,GAAG,mBAAmB,MAAM,EAAE;EAC2C,CAAQ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Animated } from "../Animated.js";
|
|
2
2
|
import { useCallback, useState } from "react";
|
|
3
|
-
import { createContextAndHook } from "@clerk/shared/react";
|
|
4
3
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
4
|
+
import { createContextAndHook } from "@clerk/shared/react";
|
|
5
5
|
|
|
6
6
|
//#region src/elements/Action/ActionRoot.tsx
|
|
7
7
|
const [ActionContext, useActionContext, _] = createContextAndHook("ActionContext");
|
|
@@ -9,8 +9,8 @@ import { sleep } from "../utils/sleep.js";
|
|
|
9
9
|
import { handleError } from "../utils/errorHandler.js";
|
|
10
10
|
import { TimerButton } from "./TimerButton.js";
|
|
11
11
|
import React, { useCallback } from "react";
|
|
12
|
-
import { createContextAndHook } from "@clerk/shared/react";
|
|
13
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
13
|
+
import { createContextAndHook } from "@clerk/shared/react";
|
|
14
14
|
import { OTPInput, REGEXP_ONLY_DIGITS } from "input-otp";
|
|
15
15
|
|
|
16
16
|
//#region src/elements/CodeControl.tsx
|
package/dist/elements/Drawer.js
CHANGED
|
@@ -12,7 +12,7 @@ import { IconButton } from "./IconButton.js";
|
|
|
12
12
|
import * as React$1 from "react";
|
|
13
13
|
import { Fragment as Fragment$1, jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
14
14
|
import { FloatingFocusManager, FloatingPortal, useClick, useDismiss, useFloating, useInteractions, useMergeRefs, useRole, useTransitionStyles } from "@floating-ui/react";
|
|
15
|
-
import {
|
|
15
|
+
import { useSafeLayoutEffect } from "@clerk/shared/react/index";
|
|
16
16
|
|
|
17
17
|
//#region src/elements/Drawer.tsx
|
|
18
18
|
const DrawerContext = React$1.createContext(null);
|
|
@@ -23,8 +23,6 @@ const useDrawerContext = () => {
|
|
|
23
23
|
};
|
|
24
24
|
function Root({ children, open, onOpenChange, strategy = "fixed", floatingProps, portalProps, dismissProps }) {
|
|
25
25
|
const direction = useDirection();
|
|
26
|
-
const portalRoot = usePortalRoot();
|
|
27
|
-
const effectivePortalRoot = portalProps?.root ?? portalRoot?.() ?? void 0;
|
|
28
26
|
const { refs, context } = useFloating({
|
|
29
27
|
open,
|
|
30
28
|
onOpenChange,
|
|
@@ -43,10 +41,7 @@ function Root({ children, open, onOpenChange, strategy = "fixed", floatingProps,
|
|
|
43
41
|
isOpen: open,
|
|
44
42
|
setIsOpen: onOpenChange,
|
|
45
43
|
strategy,
|
|
46
|
-
portalProps: {
|
|
47
|
-
...portalProps,
|
|
48
|
-
root: effectivePortalRoot
|
|
49
|
-
},
|
|
44
|
+
portalProps: portalProps || {},
|
|
50
45
|
refs,
|
|
51
46
|
context,
|
|
52
47
|
getFloatingProps,
|
|
@@ -54,7 +49,6 @@ function Root({ children, open, onOpenChange, strategy = "fixed", floatingProps,
|
|
|
54
49
|
},
|
|
55
50
|
children: /* @__PURE__ */ jsx(FloatingPortal, {
|
|
56
51
|
...portalProps,
|
|
57
|
-
root: effectivePortalRoot,
|
|
58
52
|
children
|
|
59
53
|
})
|
|
60
54
|
});
|