@@ -3,7 +3,7 @@ import type {
33 __experimental_CommercePlanResource ,
44 __experimental_CommerceSubscriptionPlanPeriod ,
55 __experimental_CommerceSubscriptionResource ,
6- __experimental_SubscriptionDetailsProps ,
6+ __experimental_PlanDetailsProps ,
77 ClerkAPIError ,
88 ClerkRuntimeError ,
99} from '@clerk/types' ;
@@ -27,22 +27,22 @@ import { Alert, Avatar, Drawer, SegmentedControl, useDrawerContext } from '../..
2727import { InformationCircle } from '../../icons' ;
2828import { formatDate , handleError } from '../../utils' ;
2929
30- export const SubscriptionDetails = ( props : __experimental_SubscriptionDetailsProps ) => {
30+ export const PlanDetails = ( props : __experimental_PlanDetailsProps ) => {
3131 return (
3232 < SubscriberTypeContext . Provider value = { props . subscriberType || 'user' } >
3333 < PlansContextProvider >
34- < _SubscriptionDetails { ...props } />
34+ < _PlanDetails { ...props } />
3535 </ PlansContextProvider >
3636 </ SubscriberTypeContext . Provider >
3737 ) ;
3838} ;
3939
40- const _SubscriptionDetails = ( {
40+ const _PlanDetails = ( {
4141 plan,
4242 onSubscriptionCancel,
4343 portalId,
4444 planPeriod : _planPeriod = 'month' ,
45- } : __experimental_SubscriptionDetailsProps ) => {
45+ } : __experimental_PlanDetailsProps ) => {
4646 const clerk = useClerk ( ) ;
4747 const { organization } = useOrganization ( ) ;
4848 const [ showConfirmation , setShowConfirmation ] = useState ( false ) ;
@@ -134,7 +134,7 @@ const _SubscriptionDetails = ({
134134 { hasFeatures ? (
135135 < Drawer . Body >
136136 < Text
137- elementDescriptor = { descriptors . subscriptionDetailCaption }
137+ elementDescriptor = { descriptors . planDetailCaption }
138138 variant = { 'caption' }
139139 localizationKey = { localizationKeys ( '__experimental_commerce.availableFeatures' ) }
140140 colorScheme = 'secondary'
@@ -144,7 +144,7 @@ const _SubscriptionDetails = ({
144144 } ) }
145145 />
146146 < Box
147- elementDescriptor = { descriptors . subscriptionDetailFeaturesList }
147+ elementDescriptor = { descriptors . planDetailFeaturesList }
148148 as = 'ul'
149149 role = 'list'
150150 sx = { t => ( {
@@ -156,7 +156,7 @@ const _SubscriptionDetails = ({
156156 { features . map ( feature => (
157157 < Box
158158 key = { feature . id }
159- elementDescriptor = { descriptors . subscriptionDetailFeaturesListItem }
159+ elementDescriptor = { descriptors . planDetailFeaturesListItem }
160160 as = 'li'
161161 sx = { t => ( {
162162 display : 'flex' ,
@@ -173,9 +173,9 @@ const _SubscriptionDetails = ({
173173 imageUrl = { feature . avatarUrl }
174174 />
175175 ) : null }
176- < Span elementDescriptor = { descriptors . subscriptionDetailFeaturesListItemContent } >
176+ < Span elementDescriptor = { descriptors . planDetailFeaturesListItemContent } >
177177 < Text
178- elementDescriptor = { descriptors . subscriptionDetailFeaturesListItemTitle }
178+ elementDescriptor = { descriptors . planDetailFeaturesListItemTitle }
179179 colorScheme = 'body'
180180 sx = { t => ( {
181181 fontWeight : t . fontWeights . $medium ,
@@ -185,7 +185,7 @@ const _SubscriptionDetails = ({
185185 </ Text >
186186 { feature . description ? (
187187 < Text
188- elementDescriptor = { descriptors . subscriptionDetailFeaturesListItemDescription }
188+ elementDescriptor = { descriptors . planDetailFeaturesListItemDescription }
189189 colorScheme = 'secondary'
190190 sx = { t => ( {
191191 marginBlockStart : t . space . $0x25 ,
@@ -319,7 +319,7 @@ const Header = React.forwardRef<HTMLDivElement, HeaderProps>((props, ref) => {
319319 return (
320320 < Box
321321 ref = { ref }
322- elementDescriptor = { descriptors . subscriptionDetailHeader }
322+ elementDescriptor = { descriptors . planDetailHeader }
323323 sx = { t => ( {
324324 width : '100%' ,
325325 padding : t . space . $4 ,
@@ -340,7 +340,7 @@ const Header = React.forwardRef<HTMLDivElement, HeaderProps>((props, ref) => {
340340
341341 { plan . avatarUrl ? (
342342 < Avatar
343- boxElementDescriptor = { descriptors . subscriptionDetailAvatar }
343+ boxElementDescriptor = { descriptors . planDetailAvatar }
344344 size = { _ => 40 }
345345 title = { plan . name }
346346 initials = { plan . name [ 0 ] }
@@ -353,20 +353,20 @@ const Header = React.forwardRef<HTMLDivElement, HeaderProps>((props, ref) => {
353353 ) : null }
354354 { subscription ? (
355355 < Box
356- elementDescriptor = { descriptors . subscriptionDetailBadgeContainer }
356+ elementDescriptor = { descriptors . planDetailBadgeContainer }
357357 sx = { t => ( {
358358 marginBlockEnd : t . space . $3 ,
359359 } ) }
360360 >
361361 { subscription . status === 'active' ? (
362362 < Badge
363- elementDescriptor = { descriptors . subscriptionDetailBadge }
363+ elementDescriptor = { descriptors . planDetailBadge }
364364 localizationKey = { localizationKeys ( 'badge__currentPlan' ) }
365365 colorScheme = { 'secondary' }
366366 />
367367 ) : (
368368 < Badge
369- elementDescriptor = { descriptors . subscriptionDetailBadge }
369+ elementDescriptor = { descriptors . planDetailBadge }
370370 localizationKey = { localizationKeys ( 'badge__upcomingPlan' ) }
371371 colorScheme = { 'primary' }
372372 />
@@ -380,15 +380,15 @@ const Header = React.forwardRef<HTMLDivElement, HeaderProps>((props, ref) => {
380380 } ) }
381381 >
382382 < Heading
383- elementDescriptor = { descriptors . subscriptionDetailTitle }
383+ elementDescriptor = { descriptors . planDetailTitle }
384384 as = 'h2'
385385 textVariant = 'h2'
386386 >
387387 { plan . name }
388388 </ Heading >
389389 { plan . description ? (
390390 < Text
391- elementDescriptor = { descriptors . subscriptionDetailDescription }
391+ elementDescriptor = { descriptors . planDetailDescription }
392392 variant = 'subtitle'
393393 colorScheme = 'secondary'
394394 >
@@ -399,7 +399,7 @@ const Header = React.forwardRef<HTMLDivElement, HeaderProps>((props, ref) => {
399399
400400 { plan . amount > 0 ? (
401401 < Flex
402- elementDescriptor = { descriptors . subscriptionDetailFeeContainer }
402+ elementDescriptor = { descriptors . planDetailFeeContainer }
403403 align = 'center'
404404 wrap = 'wrap'
405405 sx = { t => ( {
@@ -409,7 +409,7 @@ const Header = React.forwardRef<HTMLDivElement, HeaderProps>((props, ref) => {
409409 >
410410 < >
411411 < Text
412- elementDescriptor = { descriptors . subscriptionDetailFee }
412+ elementDescriptor = { descriptors . planDetailFee }
413413 variant = 'h1'
414414 colorScheme = 'body'
415415 >
@@ -419,7 +419,7 @@ const Header = React.forwardRef<HTMLDivElement, HeaderProps>((props, ref) => {
419419 : plan . amountFormatted }
420420 </ Text >
421421 < Text
422- elementDescriptor = { descriptors . subscriptionDetailFeePeriod }
422+ elementDescriptor = { descriptors . planDetailFeePeriod }
423423 variant = 'caption'
424424 colorScheme = 'secondary'
425425 sx = { t => ( {
@@ -433,7 +433,7 @@ const Header = React.forwardRef<HTMLDivElement, HeaderProps>((props, ref) => {
433433 />
434434 { plan . annualMonthlyAmount > 0 ? (
435435 < Box
436- elementDescriptor = { descriptors . subscriptionDetailFeePeriodNotice }
436+ elementDescriptor = { descriptors . planDetailFeePeriodNotice }
437437 sx = { [
438438 _ => ( {
439439 width : '100%' ,
@@ -448,14 +448,14 @@ const Header = React.forwardRef<HTMLDivElement, HeaderProps>((props, ref) => {
448448 }
449449 >
450450 < Box
451- elementDescriptor = { descriptors . subscriptionDetailFeePeriodNoticeInner }
451+ elementDescriptor = { descriptors . planDetailFeePeriodNoticeInner }
452452 sx = { {
453453 overflow : 'hidden' ,
454454 minHeight : 0 ,
455455 } }
456456 >
457457 < Text
458- elementDescriptor = { descriptors . subscriptionDetailFeePeriodNoticeLabel }
458+ elementDescriptor = { descriptors . planDetailFeePeriodNoticeLabel }
459459 variant = 'caption'
460460 colorScheme = 'secondary'
461461 sx = { t => ( {
@@ -482,7 +482,7 @@ const Header = React.forwardRef<HTMLDivElement, HeaderProps>((props, ref) => {
482482
483483 { ! ! subscription && (
484484 < Text
485- elementDescriptor = { descriptors . subscriptionDetailCaption }
485+ elementDescriptor = { descriptors . planDetailCaption }
486486 variant = { 'caption' }
487487 localizationKey = { captionForSubscription ( subscription ) }
488488 colorScheme = 'secondary'
@@ -494,7 +494,7 @@ const Header = React.forwardRef<HTMLDivElement, HeaderProps>((props, ref) => {
494494
495495 { ! subscription && plan . annualMonthlyAmount > 0 ? (
496496 < Box
497- elementDescriptor = { descriptors . subscriptionDetailPeriodToggle }
497+ elementDescriptor = { descriptors . planDetailPeriodToggle }
498498 sx = { t => ( {
499499 display : 'flex' ,
500500 marginTop : t . space . $3 ,
0 commit comments