diff --git a/.changeset/neat-numbers-decide.md b/.changeset/neat-numbers-decide.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/neat-numbers-decide.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/clerk-js/src/ui.retheme/components/UserButton/SessionActions.tsx b/packages/clerk-js/src/ui.retheme/components/UserButton/SessionActions.tsx index 14b51f9f22..56d9607485 100644 --- a/packages/clerk-js/src/ui.retheme/components/UserButton/SessionActions.tsx +++ b/packages/clerk-js/src/ui.retheme/components/UserButton/SessionActions.tsx @@ -18,7 +18,6 @@ export const SingleSessionActions = (props: SessionActionsProps) => { role='menu' elementDescriptor={descriptors.userButtonPopoverActions} elementId={descriptors.userButtonPopoverActions.setId('singleSession')} - sx={t => ({ backgroundColor: t.colors.$blackAlpha100 })} > ({ - borderBottomLeftRadius: t.radii.$lg, - borderBottomRightRadius: t.radii.$lg, backgroundColor: t.colors.$colorBackground, })} /> @@ -52,7 +50,6 @@ export const UserButtonPopover = React.forwardRef ({ padding: t.space.$2, - backgroundColor: t.colors.$blackAlpha100, borderBottom: `${t.borders.$normal} ${t.colors.$blackAlpha200}`, })} > @@ -81,10 +78,7 @@ export const UserButtonPopover = React.forwardRef - ({ backgroundColor: t.colors.$blackAlpha100 })} - > + {otherSessions.map(session => ( - {signOutAllButton} ); @@ -152,7 +145,9 @@ export const UserButtonPopover = React.forwardRef )} - + + {!authConfig.singleSessionMode && signOutAllButton} + ); diff --git a/packages/clerk-js/src/ui.retheme/components/UserProfile/RootPage.tsx b/packages/clerk-js/src/ui.retheme/components/UserProfile/RootPage.tsx index b15a1419f7..68022cb3b3 100644 --- a/packages/clerk-js/src/ui.retheme/components/UserProfile/RootPage.tsx +++ b/packages/clerk-js/src/ui.retheme/components/UserProfile/RootPage.tsx @@ -34,19 +34,19 @@ export const RootPage = withCardStateProvider(() => { return ( ({ gap: t.space.$8 })} > {card.error} ({ marginBottom: t.space.$4 })} + textVariant='h2' /> diff --git a/packages/clerk-js/src/ui.retheme/components/UserProfile/UserProfile.tsx b/packages/clerk-js/src/ui.retheme/components/UserProfile/UserProfile.tsx index 6c702fe9c7..8a586db1fb 100644 --- a/packages/clerk-js/src/ui.retheme/components/UserProfile/UserProfile.tsx +++ b/packages/clerk-js/src/ui.retheme/components/UserProfile/UserProfile.tsx @@ -6,6 +6,7 @@ import { ComponentContext, withCoreUserGuard } from '../../contexts'; import { Flow } from '../../customizables'; import { ProfileCard, withCardStateProvider } from '../../elements'; import { Route, Switch } from '../../router'; +import { mqu } from '../../styledSystem'; import type { UserProfileCtx } from '../../types'; import { UserProfileNavbar } from './UserProfileNavbar'; import { UserProfileRoutes } from './UserProfileRoutes'; @@ -33,7 +34,15 @@ const AuthenticatedRoutes = withCoreUserGuard(() => { const contentRef = React.useRef(null); return ( ({ display: 'grid', gridTemplateColumns: '1fr 3fr', height: t.sizes.$176, overflow: 'hidden' })} + sx={t => ({ + display: 'grid', + gridTemplateColumns: '1fr 2.5fr', + [mqu.md]: { + display: 'block', + }, + height: t.sizes.$176, + overflow: 'hidden', + })} > diff --git a/packages/clerk-js/src/ui.retheme/elements/Card.tsx b/packages/clerk-js/src/ui.retheme/elements/Card.tsx index 13e8d21918..b441df3605 100644 --- a/packages/clerk-js/src/ui.retheme/elements/Card.tsx +++ b/packages/clerk-js/src/ui.retheme/elements/Card.tsx @@ -47,8 +47,10 @@ export const Card = React.forwardRef((props, ref) => padding: t.space.$8, boxShadow: '0px 0px 2px 0px rgba(0, 0, 0, 0.08), 0px 1px 2px 0px rgba(25, 28, 33, 0.06), 0px 0px 0px 1px rgba(25, 28, 33, 0.04)', + maxWidth: `calc(100vw - ${t.sizes.$20})`, width: t.sizes.$100, - borderRadius: `${t.radii.$xl} ${t.radii.$xl} ${t.radii.$lg} ${t.radii.$lg}`, + borderRadius: t.radii.$lg, + textAlign: 'center', }), sx, ]} @@ -77,6 +79,7 @@ export const ProfileCard = React.forwardRef((props, r sx={[ t => ({ width: t.sizes.$220, + maxWidth: `calc(100vw - ${t.sizes.$20})`, }), sx, ]} @@ -102,7 +105,7 @@ export const BaseCard = React.forwardRef((props, elementDescriptor={[descriptors.card, props.elementDescriptor as ElementDescriptor]} sx={[ t => ({ - backgroundColor: t.colors.$colorBackground, + background: `linear-gradient(${t.colors.$blackAlpha100},${t.colors.$blackAlpha100}), linear-gradient(${t.colors.$colorBackground}, ${t.colors.$colorBackground})`, overflow: 'hidden', willChange: 'transform, opacity, height', transitionProperty: t.transitionProperty.$common, @@ -155,12 +158,8 @@ export const CardFooter = React.forwardRef((pro justify='center' elementDescriptor={descriptors.cardFooter} sx={t => ({ - '>:first-of-type': { - padding: `${t.space.$4} ${t.space.$2} ${t.space.$2} ${t.space.$2}`, - marginTop: `-${t.space.$2}`, - }, + padding: t.space.$2, '>:not(:first-of-type)': { - padding: `${t.space.$2}`, borderTop: t.borders.$normal, borderColor: t.colors.$blackAlpha300, }, @@ -186,7 +185,6 @@ export const CardFooterItem = React.forwardRef): JSX.Element => { ); }); const Title = React.memo((props: PropsOfComponent): JSX.Element => { + const { sx, ...rest } = props; return ( ); }); diff --git a/packages/clerk-js/src/ui.retheme/elements/Navbar.tsx b/packages/clerk-js/src/ui.retheme/elements/Navbar.tsx index 68a052f175..8981545fb9 100644 --- a/packages/clerk-js/src/ui.retheme/elements/Navbar.tsx +++ b/packages/clerk-js/src/ui.retheme/elements/Navbar.tsx @@ -188,13 +188,10 @@ const NavbarContainer = ( ({ - maxWidth: t.space.$60, - borderRight: `${t.borders.$normal} ${t.colors.$blackAlpha300}`, - backgroundColor: t.colors.$blackAlpha100, [mqu.md]: { display: 'none', }, - padding: `${t.space.$10} ${t.space.$6} ${t.space.$3} ${t.space.$6}`, + padding: `${t.space.$9} ${t.space.$6} ${t.space.$3} ${t.space.$6}`, color: t.colors.$colorText, justifyContent: 'space-between', })} diff --git a/packages/clerk-js/src/ui.retheme/elements/PopoverCard.tsx b/packages/clerk-js/src/ui.retheme/elements/PopoverCard.tsx index 150bac515b..2e5e9ec4a8 100644 --- a/packages/clerk-js/src/ui.retheme/elements/PopoverCard.tsx +++ b/packages/clerk-js/src/ui.retheme/elements/PopoverCard.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { useEnvironment } from '../contexts'; -import { descriptors, Flex, Flow, Link, localizationKeys, useAppearance } from '../customizables'; +import { Col, descriptors, Flex, Flow, Link, localizationKeys, useAppearance } from '../customizables'; import type { PropsOfComponent } from '../styledSystem'; import { animations } from '../styledSystem'; import { BaseCard } from './Card'; @@ -32,7 +32,7 @@ const PopoverCardMain = (props: PropsOfComponent) => { return ( ({ backgroundColor: t.colors.$colorBackground, borderRadius: t.radii.$lg, overflow: 'hidden' }), sx]} {...rest} > {props.children} @@ -41,7 +41,7 @@ const PopoverCardMain = (props: PropsOfComponent) => { }; const PopoverCardFooter = (props: PropsOfComponent) => { - const { sx, ...rest } = props; + const { sx, children, ...rest } = props; const { branded } = useEnvironment().displayConfig; const { privacyPageUrl, termsPageUrl } = useAppearance().parsedLayout; const shouldShow = branded || privacyPageUrl || termsPageUrl; @@ -51,25 +51,24 @@ const PopoverCardFooter = (props: PropsOfComponent) => { } return ( - ({ - padding: `${t.space.$4} 0`, + { borderBottomLeftRadius: 'inherit', borderBottomRightRadius: 'inherit', - backgroundColor: t.colors.$blackAlpha100, '&:empty': { padding: '0', }, - }), + }, sx, ]} {...rest} > - + {children} + ({ padding: `${t.space.$4} 0` })} /> - + ); }; diff --git a/packages/clerk-js/src/ui.retheme/elements/ProfileCardContent.tsx b/packages/clerk-js/src/ui.retheme/elements/ProfileCardContent.tsx index 2172872215..3907f68b82 100644 --- a/packages/clerk-js/src/ui.retheme/elements/ProfileCardContent.tsx +++ b/packages/clerk-js/src/ui.retheme/elements/ProfileCardContent.tsx @@ -31,7 +31,13 @@ export const ProfileCardContent = (props: ProfileCardContentProps) => { return ( ({ position: 'relative', borderRadius: t.radii.$xl, width: '100%', overflowY: 'auto' })} + sx={t => ({ + backgroundColor: t.colors.$colorBackground, + position: 'relative', + borderRadius: t.radii.$lg, + width: '100%', + overflowY: 'auto', + })} > , 'title'> & { }; export const ProfileSection = (props: ProfileSectionProps) => { - const { title, children, id, subtitle, ...rest } = props; + const { title, children, id, subtitle, sx, ...rest } = props; return ( ({ + borderTop: `${t.borders.$normal} ${t.colors.$blackAlpha100}`, + padding: `${t.space.$4} 0`, + gap: t.space.$4, + }), + sx, + ]} {...rest} - gap={2} > { textElementDescriptor={descriptors.profileSectionTitleText} textElementId={descriptors.profileSectionTitleText.setId(id)} /> - {subtitle && ( - - )} - - {children} - + {subtitle && ( + + )} + + {children} + + ); }; @@ -56,13 +69,10 @@ type SectionHeaderProps = PropsOfComponent & { export const SectionHeader = (props: SectionHeaderProps) => { const { textElementDescriptor, textElementId, localizationKey, ...rest } = props; return ( - ({ borderBottom: `${theme.borders.$normal} ${theme.colors.$blackAlpha100}` })} - > + diff --git a/packages/localizations/src/en-US.retheme.ts b/packages/localizations/src/en-US.retheme.ts index 50b930295b..331f2ae06f 100644 --- a/packages/localizations/src/en-US.retheme.ts +++ b/packages/localizations/src/en-US.retheme.ts @@ -251,7 +251,7 @@ export const enUS: LocalizationResource = { description: 'Manage your account info.', }, start: { - headerTitle__account: 'Profile', + headerTitle__account: 'Profile details', headerTitle__security: 'Security', profileSection: { title: 'Profile', diff --git a/playground/nextjs/pages/_app.tsx b/playground/nextjs/pages/_app.tsx index 117e2616c0..4336b53d2d 100644 --- a/playground/nextjs/pages/_app.tsx +++ b/playground/nextjs/pages/_app.tsx @@ -35,7 +35,6 @@ function MyApp({ Component, pageProps }: AppProps) {