Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/full-webs-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@clerk/localizations': patch
'@clerk/clerk-js': patch
---

Move `<__experimental_PaymentSources />` component under `Billing` -> `Subscriptions` tab and delete `Payment methods` tab
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
SubscriberTypeContext,
useSubscriptions,
} from '../../contexts';
import { Button, Col, descriptors, localizationKeys } from '../../customizables';
import { Button, Col, descriptors, Flex, localizationKeys } from '../../customizables';
import {
Card,
Header,
Expand Down Expand Up @@ -73,28 +73,26 @@ const OrganizationBillingPageInternal = withCardStateProvider(() => {
<Tab
localizationKey={localizationKeys('userProfile.__experimental_billingPage.start.headerTitle__invoices')}
/>
<Tab
localizationKey={localizationKeys(
'userProfile.__experimental_billingPage.start.headerTitle__paymentMethods',
)}
/>
</TabsList>
<TabPanels>
<TabPanel sx={{ width: '100%', flexDirection: 'column' }}>
{subscriptions.data.length > 0 ? (
<>
<Flex
sx={{ width: '100%', flexDirection: 'column' }}
gap={4}
>
<SubscriptionsList />
<Button
localizationKey='View all plans'
hasArrow
variant='ghost'
onClick={() => navigate('plans')}
sx={t => ({
sx={{
width: 'fit-content',
marginTop: t.space.$4,
})}
}}
/>
</>
<__experimental_PaymentSources />
</Flex>
) : (
<__experimental_PricingTableContext.Provider value={{ componentName: 'PricingTable', mode: 'modal' }}>
<__experimental_PricingTable />
Expand All @@ -106,9 +104,6 @@ const OrganizationBillingPageInternal = withCardStateProvider(() => {
<InvoicesList />
</InvoicesContextProvider>
</TabPanel>
<TabPanel sx={{ width: '100%' }}>
<__experimental_PaymentSources />
</TabPanel>
</TabPanels>
</Tabs>
</Col>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ const PaymentSources = () => {
title={localizationKeys('userProfile.__experimental_billingPage.paymentSourcesSection.title')}
centered={false}
id='profile'
sx={{ paddingTop: 0, borderTop: 'none', flex: 1 }}
sx={t => ({
flex: 1,
borderTopWidth: t.borderWidths.$normal,
borderTopStyle: t.borderStyles.$solid,
borderTopColor: t.colors.$neutralAlpha100,
})}
>
<Action.Root>
<ProfileSection.ItemList id='paymentSources'>
Expand Down
23 changes: 9 additions & 14 deletions packages/clerk-js/src/ui/components/UserProfile/BillingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
SubscriberTypeContext,
useSubscriptions,
} from '../../contexts';
import { Button, Col, descriptors, localizationKeys } from '../../customizables';
import { Button, Col, descriptors, Flex, localizationKeys } from '../../customizables';
import {
Card,
Header,
Expand Down Expand Up @@ -75,28 +75,26 @@ const BillingPageInternal = withCardStateProvider(() => {
<Tab
localizationKey={localizationKeys('userProfile.__experimental_billingPage.start.headerTitle__invoices')}
/>
<Tab
localizationKey={localizationKeys(
'userProfile.__experimental_billingPage.start.headerTitle__paymentMethods',
)}
/>
</TabsList>
<TabPanels>
<TabPanel sx={_ => ({ width: '100%', flexDirection: 'column' })}>
{subscriptions.data.length > 0 ? (
<>
<Flex
sx={{ width: '100%', flexDirection: 'column' }}
gap={4}
>
<SubscriptionsList />
<Button
localizationKey='View all plans'
hasArrow
variant='ghost'
onClick={() => navigate('plans')}
sx={t => ({
sx={{
width: 'fit-content',
marginTop: t.space.$4,
})}
}}
/>
</>
<__experimental_PaymentSources />
</Flex>
) : (
<__experimental_PricingTableContext.Provider value={{ componentName: 'PricingTable', mode: 'modal' }}>
<__experimental_PricingTable />
Expand All @@ -108,9 +106,6 @@ const BillingPageInternal = withCardStateProvider(() => {
<InvoicesList />
</InvoicesContextProvider>
</TabPanel>
<TabPanel sx={{ width: '100%' }}>
<__experimental_PaymentSources />
</TabPanel>
</TabPanels>
</Tabs>
</Col>
Expand Down
8 changes: 7 additions & 1 deletion packages/localizations/src/ar-SA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type { LocalizationResource } from '@clerk/types';
export const arSA: LocalizationResource = {
locale: 'ar-SA',
__experimental_commerce: {
availableFeatures: undefined,
billedAnnually: undefined,
cancelSubscription: undefined,
checkout: {
Expand All @@ -33,22 +34,28 @@ export const arSA: LocalizationResource = {
title__paymentSuccessful: undefined,
title__subscriptionSuccessful: undefined,
},
defaultFreePlanActive: undefined,
free: undefined,
getStarted: undefined,
keepSubscription: undefined,
manage: undefined,
manageSubscription: undefined,
month: undefined,
reSubscribe: undefined,
seeAllFeatures: undefined,
switchPlan: undefined,
switchToAnnual: undefined,
viewFeatures: undefined,
},
backButton: 'الرجوع',
badge__canceledEndsAt: undefined,
badge__currentPlan: undefined,
badge__default: 'الأفتراضي',
badge__endsAt: undefined,
badge__expired: undefined,
badge__otherImpersonatorDevice: 'جهاز منتحل آخر',
badge__primary: 'الرئيسي',
badge__renewsAt: undefined,
badge__requiresAction: 'الإجراء المطلوب',
badge__startsAt: undefined,
badge__thisDevice: 'هذا الجهاز',
Expand Down Expand Up @@ -707,7 +714,6 @@ export const arSA: LocalizationResource = {
},
start: {
headerTitle__invoices: undefined,
headerTitle__paymentMethods: undefined,
headerTitle__plans: undefined,
headerTitle__subscriptions: undefined,
},
Expand Down
8 changes: 7 additions & 1 deletion packages/localizations/src/be-BY.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type { LocalizationResource } from '@clerk/types';
export const beBY: LocalizationResource = {
locale: 'be-BY',
__experimental_commerce: {
availableFeatures: undefined,
billedAnnually: undefined,
cancelSubscription: undefined,
checkout: {
Expand All @@ -33,22 +34,28 @@ export const beBY: LocalizationResource = {
title__paymentSuccessful: undefined,
title__subscriptionSuccessful: undefined,
},
defaultFreePlanActive: undefined,
free: undefined,
getStarted: undefined,
keepSubscription: undefined,
manage: undefined,
manageSubscription: undefined,
month: undefined,
reSubscribe: undefined,
seeAllFeatures: undefined,
switchPlan: undefined,
switchToAnnual: undefined,
viewFeatures: undefined,
},
backButton: 'Назад',
badge__canceledEndsAt: undefined,
badge__currentPlan: undefined,
badge__default: 'Па-змаўчанні',
badge__endsAt: undefined,
badge__expired: undefined,
badge__otherImpersonatorDevice: 'Іншая прылада',
badge__primary: 'Асноўная',
badge__renewsAt: undefined,
badge__requiresAction: 'Патрабуецца дзеянне',
badge__startsAt: undefined,
badge__thisDevice: 'Гэта прылада',
Expand Down Expand Up @@ -715,7 +722,6 @@ export const beBY: LocalizationResource = {
},
start: {
headerTitle__invoices: undefined,
headerTitle__paymentMethods: undefined,
headerTitle__plans: undefined,
headerTitle__subscriptions: undefined,
},
Expand Down
8 changes: 7 additions & 1 deletion packages/localizations/src/bg-BG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type { LocalizationResource } from '@clerk/types';
export const bgBG: LocalizationResource = {
locale: 'bg-BG',
__experimental_commerce: {
availableFeatures: undefined,
billedAnnually: undefined,
cancelSubscription: undefined,
checkout: {
Expand All @@ -33,22 +34,28 @@ export const bgBG: LocalizationResource = {
title__paymentSuccessful: undefined,
title__subscriptionSuccessful: undefined,
},
defaultFreePlanActive: undefined,
free: undefined,
getStarted: undefined,
keepSubscription: undefined,
manage: undefined,
manageSubscription: undefined,
month: undefined,
reSubscribe: undefined,
seeAllFeatures: undefined,
switchPlan: undefined,
switchToAnnual: undefined,
viewFeatures: undefined,
},
backButton: 'Назад',
badge__canceledEndsAt: undefined,
badge__currentPlan: undefined,
badge__default: 'По подразбиране',
badge__endsAt: undefined,
badge__expired: undefined,
badge__otherImpersonatorDevice: 'Друго устройство за имитация',
badge__primary: 'Основен',
badge__renewsAt: undefined,
badge__requiresAction: 'Изисква действие',
badge__startsAt: undefined,
badge__thisDevice: 'Това устройство',
Expand Down Expand Up @@ -706,7 +713,6 @@ export const bgBG: LocalizationResource = {
},
start: {
headerTitle__invoices: undefined,
headerTitle__paymentMethods: undefined,
headerTitle__plans: undefined,
headerTitle__subscriptions: undefined,
},
Expand Down
8 changes: 7 additions & 1 deletion packages/localizations/src/ca-ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type { LocalizationResource } from '@clerk/types';
export const caES: LocalizationResource = {
locale: 'ca-ES',
__experimental_commerce: {
availableFeatures: undefined,
billedAnnually: undefined,
cancelSubscription: undefined,
checkout: {
Expand All @@ -33,22 +34,28 @@ export const caES: LocalizationResource = {
title__paymentSuccessful: undefined,
title__subscriptionSuccessful: undefined,
},
defaultFreePlanActive: undefined,
free: undefined,
getStarted: undefined,
keepSubscription: undefined,
manage: undefined,
manageSubscription: undefined,
month: undefined,
reSubscribe: undefined,
seeAllFeatures: undefined,
switchPlan: undefined,
switchToAnnual: undefined,
viewFeatures: undefined,
},
backButton: 'Enrere',
badge__canceledEndsAt: undefined,
badge__currentPlan: undefined,
badge__default: 'Per defecte',
badge__endsAt: undefined,
badge__expired: undefined,
badge__otherImpersonatorDevice: 'Un altre dispositiu impostor',
badge__primary: 'Principal',
badge__renewsAt: undefined,
badge__requiresAction: 'Requereix acció',
badge__startsAt: undefined,
badge__thisDevice: 'Aquest dispositiu',
Expand Down Expand Up @@ -710,7 +717,6 @@ export const caES: LocalizationResource = {
},
start: {
headerTitle__invoices: undefined,
headerTitle__paymentMethods: undefined,
headerTitle__plans: undefined,
headerTitle__subscriptions: undefined,
},
Expand Down
8 changes: 7 additions & 1 deletion packages/localizations/src/cs-CZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type { LocalizationResource } from '@clerk/types';
export const csCZ: LocalizationResource = {
locale: 'cs-CZ',
__experimental_commerce: {
availableFeatures: undefined,
billedAnnually: undefined,
cancelSubscription: undefined,
checkout: {
Expand All @@ -33,22 +34,28 @@ export const csCZ: LocalizationResource = {
title__paymentSuccessful: undefined,
title__subscriptionSuccessful: undefined,
},
defaultFreePlanActive: undefined,
free: undefined,
getStarted: undefined,
keepSubscription: undefined,
manage: undefined,
manageSubscription: undefined,
month: undefined,
reSubscribe: undefined,
seeAllFeatures: undefined,
switchPlan: undefined,
switchToAnnual: undefined,
viewFeatures: undefined,
},
backButton: 'Zpět',
badge__canceledEndsAt: undefined,
badge__currentPlan: undefined,
badge__default: 'Výchozí',
badge__endsAt: undefined,
badge__expired: undefined,
badge__otherImpersonatorDevice: 'Jiné zařízení představitele',
badge__primary: 'Hlavní',
badge__renewsAt: undefined,
badge__requiresAction: 'Vyžaduje akci',
badge__startsAt: undefined,
badge__thisDevice: 'Toto zařízení',
Expand Down Expand Up @@ -706,7 +713,6 @@ export const csCZ: LocalizationResource = {
},
start: {
headerTitle__invoices: undefined,
headerTitle__paymentMethods: undefined,
headerTitle__plans: undefined,
headerTitle__subscriptions: undefined,
},
Expand Down
Loading