@fluid-app/portal-sdk 0.1.299 → 0.1.301

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.
Files changed (33) hide show
  1. package/dist/{MessagingScreen-BD8ERG5Y.cjs → MessagingScreen-2M2ETWXp.cjs} +54 -48
  2. package/dist/{MessagingScreen-BD8ERG5Y.cjs.map → MessagingScreen-2M2ETWXp.cjs.map} +1 -1
  3. package/dist/{MessagingScreen-BcV-HK8F.mjs → MessagingScreen-B4vUvkRg.mjs} +1 -1
  4. package/dist/{MessagingScreen-DoeAiV25.cjs → MessagingScreen-BI4AufwC.cjs} +1 -1
  5. package/dist/{MessagingScreen-ZvDwEc5y.mjs → MessagingScreen-CwzSY_G8.mjs} +54 -48
  6. package/dist/{MessagingScreen-ZvDwEc5y.mjs.map → MessagingScreen-CwzSY_G8.mjs.map} +1 -1
  7. package/dist/{OrdersScreen-sLr0z213.cjs → OrdersScreen-B-Nfx1pU.cjs} +1 -1
  8. package/dist/{OrdersScreen-DoopejMR.mjs → OrdersScreen-BR1WDP_v.mjs} +1 -1
  9. package/dist/{OrdersScreen-CS1xA9q5.cjs → OrdersScreen-CtAlBgys.cjs} +39 -39
  10. package/dist/OrdersScreen-CtAlBgys.cjs.map +1 -0
  11. package/dist/{OrdersScreen-CFfrQG4i.mjs → OrdersScreen-E0HjjKxj.mjs} +39 -39
  12. package/dist/OrdersScreen-E0HjjKxj.mjs.map +1 -0
  13. package/dist/{ProfileScreen-CwP66ls2.cjs → ProfileScreen-CL8xD-q8.cjs} +1 -1
  14. package/dist/{ProfileScreen-wj0KTaQF.mjs → ProfileScreen-COZw57uK.mjs} +1 -1
  15. package/dist/{ProfileScreen-BCR3FU5g.cjs → ProfileScreen-CPzuS8kI.cjs} +69 -69
  16. package/dist/ProfileScreen-CPzuS8kI.cjs.map +1 -0
  17. package/dist/{ProfileScreen-CefqZr-Q.mjs → ProfileScreen-fIQkeFTu.mjs} +69 -69
  18. package/dist/ProfileScreen-fIQkeFTu.mjs.map +1 -0
  19. package/dist/{SubscriptionsScreen-DKihggHx.cjs → SubscriptionsScreen-6Xp62ubF.cjs} +1 -1
  20. package/dist/{SubscriptionsScreen-Cjd2aGeW.mjs → SubscriptionsScreen-D8XUHV0b.mjs} +47 -47
  21. package/dist/{SubscriptionsScreen-Cjd2aGeW.mjs.map → SubscriptionsScreen-D8XUHV0b.mjs.map} +1 -1
  22. package/dist/{SubscriptionsScreen-DLLDU_aU.cjs → SubscriptionsScreen-YL-1_nFd.cjs} +47 -47
  23. package/dist/{SubscriptionsScreen-DLLDU_aU.cjs.map → SubscriptionsScreen-YL-1_nFd.cjs.map} +1 -1
  24. package/dist/index.cjs +12 -12
  25. package/dist/index.d.cts.map +1 -1
  26. package/dist/index.d.mts.map +1 -1
  27. package/dist/index.mjs +12 -12
  28. package/package.json +15 -15
  29. package/styles/globals.css +0 -222
  30. package/dist/OrdersScreen-CFfrQG4i.mjs.map +0 -1
  31. package/dist/OrdersScreen-CS1xA9q5.cjs.map +0 -1
  32. package/dist/ProfileScreen-BCR3FU5g.cjs.map +0 -1
  33. package/dist/ProfileScreen-CefqZr-Q.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProfileScreen-fIQkeFTu.mjs","names":[],"sources":["../src/screens/profile/derive-last-name.ts","../src/screens/profile/ProfileLayout.tsx","../src/screens/ProfileContentScreen.tsx","../src/screens/ProfileScreen.tsx"],"sourcesContent":["export function deriveLastName(firstName: string, fullName: string): string {\n if (!firstName) return \"\";\n const prefix = `${firstName} `;\n return fullName.startsWith(prefix) ? fullName.slice(prefix.length) : \"\";\n}\n","import { type JSX, type ReactNode, useState, type ComponentType } from \"react\";\nimport {\n Dialog,\n DialogContent,\n DialogHeader,\n DialogTitle,\n} from \"@fluid-app/ui-primitives\";\nimport {\n Sparkles,\n Pencil,\n Plus,\n Copy,\n Link2,\n MapPin,\n User,\n Mail,\n Phone,\n Quote,\n Linkedin,\n Facebook,\n Twitter,\n Instagram,\n Youtube,\n Globe,\n LogOut,\n} from \"lucide-react\";\nimport type { fluidPay } from \"@fluid-app/fluid-pay-core\";\nimport type { PointsLedger } from \"@fluid-app/profile-core\";\nimport { useProfileTranslation } from \"@fluid-app/profile-core/translation-api-context\";\nimport { EllipsesDropdown } from \"@fluid-app/profile-ui\";\nimport type { AccountRep } from \"@fluid-app/portal-core/account-types\";\n\ninterface ProfileLayoutProps {\n account: AccountRep;\n pointsBalance: number | undefined;\n pointsLedger?: PointsLedger[];\n rewardsEnabled?: boolean;\n addresses: fluidPay.CustomerAddress[];\n paymentMethods: fluidPay.CustomerPaymentMethod[];\n mySiteDisplayUrl: string;\n socialLinks: Partial<Record<SocialKey, string>>;\n onEditPersonalInfo: () => void;\n onAddAddress: () => void;\n onEditAddress: (address: fluidPay.CustomerAddress) => void;\n onDeleteAddress: (address: fluidPay.CustomerAddress) => void;\n onAddPaymentMethod: () => void;\n onEditPaymentMethod: (method: fluidPay.CustomerPaymentMethod) => void;\n onCopyMySiteLink: () => void;\n onEditMySiteLink?: () => void;\n onConnectSocial: (key: SocialKey) => void;\n onSignOut?: () => void;\n}\n\nexport function ProfileLayout(props: ProfileLayoutProps): JSX.Element {\n const { t } = useProfileTranslation();\n const {\n account,\n pointsBalance,\n pointsLedger,\n rewardsEnabled,\n addresses,\n paymentMethods,\n mySiteDisplayUrl,\n socialLinks,\n onEditPersonalInfo,\n onAddAddress,\n onEditAddress,\n onDeleteAddress,\n onAddPaymentMethod,\n onEditPaymentMethod,\n onCopyMySiteLink,\n onEditMySiteLink,\n onConnectSocial,\n onSignOut,\n } = props;\n\n const fullName =\n `${account.first_name ?? \"\"} ${account.last_name ?? \"\"}`.trim();\n const heroFirstName = (account.first_name || \"\").trim().split(\" \")[0] || \"\";\n const heroDisplay =\n heroFirstName || account.email?.split(\"@\")[0] || t(\"account_fallback\");\n const connectedSocialCount = Object.values(socialLinks).filter(\n (v) => typeof v === \"string\" && v.length > 0,\n ).length;\n const [isPointsHistoryOpen, setIsPointsHistoryOpen] = useState(false);\n const POINTS_PREVIEW_COUNT = 4;\n const ledger = pointsLedger ?? [];\n const ledgerPreview = ledger.slice(0, POINTS_PREVIEW_COUNT);\n const hasMoreLedger = ledger.length > POINTS_PREVIEW_COUNT;\n\n return (\n <div className=\"relative\">\n <div className=\"relative mx-auto max-w-4xl px-5 pt-8 pb-20 md:px-8\">\n {/* Hero */}\n <section className=\"flex items-center gap-3.5\">\n <div className=\"relative size-12 shrink-0 overflow-hidden rounded-full ring-1 ring-black/5 md:size-13\">\n {account.avatar_url ? (\n <img\n src={account.avatar_url}\n alt=\"\"\n className=\"h-full w-full object-cover\"\n />\n ) : (\n <div className=\"bg-primary text-primary-foreground flex h-full w-full items-center justify-center text-lg font-semibold\">\n {heroDisplay.charAt(0).toUpperCase()}\n </div>\n )}\n </div>\n <div className=\"min-w-0 flex-1\">\n <h1 className=\"text-foreground truncate text-xl font-bold tracking-tight md:text-2xl\">\n {heroDisplay}\n </h1>\n <p className=\"text-muted-foreground mt-0.5 truncate text-sm\">\n {account.email}\n </p>\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n {rewardsEnabled && (\n <div className=\"ring-border text-foreground inline-flex items-center gap-1.5 rounded-md bg-transparent px-2.5 py-1 text-xs font-semibold ring-1\">\n <Sparkles className=\"text-primary size-3\" strokeWidth={2.25} />\n {(pointsBalance ?? 0).toLocaleString()} {t(\"pts\")}\n </div>\n )}\n </div>\n </section>\n\n {/* Personal information */}\n <SectionHeader\n title={t(\"personal_information\")}\n action={\n <PillButton\n onClick={onEditPersonalInfo}\n icon={Pencil}\n label={t(\"edit\")}\n />\n }\n />\n <div className=\"ring-border mt-2.5 overflow-hidden rounded-2xl bg-transparent ring-1\">\n <FieldRow\n icon={User}\n label={t(\"name\")}\n value={fullName || account.first_name || \"\"}\n />\n <FieldRow\n icon={Mail}\n label={t(\"email\")}\n value={account.email ?? \"\"}\n />\n <FieldRow\n icon={Phone}\n label={t(\"phone\")}\n value={account.phone ?? \"\"}\n placeholder={t(\"add_phone_number\")}\n />\n <FieldRow\n icon={Quote}\n label={t(\"bio\")}\n value={account.bio ?? \"\"}\n placeholder={t(\"add_a_short_bio\")}\n multiline\n isLast\n />\n </div>\n\n {/* Payment methods */}\n <SectionHeader title={t(\"payment_methods\")} />\n <div className=\"mt-2.5 grid grid-cols-1 gap-2.5 sm:grid-cols-3\">\n {paymentMethods.map((method) => (\n <PaymentCardVisual\n key={method.id}\n method={method}\n onClick={() => onEditPaymentMethod(method)}\n />\n ))}\n <AddPaymentTile onClick={onAddPaymentMethod} />\n </div>\n\n {/* Points history */}\n {rewardsEnabled && (\n <>\n <SectionHeader\n title={t(\"points_history\")}\n action={\n <span className=\"text-muted-foreground/75 text-xs\">\n {t(\"pts_available\", {\n count: String((pointsBalance ?? 0).toLocaleString()),\n })}\n </span>\n }\n />\n {ledger.length > 0 ? (\n <div className=\"ring-border mt-2.5 overflow-hidden rounded-2xl bg-transparent ring-1\">\n {ledgerPreview.map((entry, i) => (\n <PointsLedgerRow\n key={entry.id}\n entry={entry}\n isLast={!hasMoreLedger && i === ledgerPreview.length - 1}\n />\n ))}\n {hasMoreLedger && (\n <button\n type=\"button\"\n onClick={() => setIsPointsHistoryOpen(true)}\n className=\"text-foreground hover:bg-muted flex w-full items-center justify-center gap-1 px-4 py-3 text-xs font-bold transition-colors\"\n >\n {t(\"see_all_transactions\", { count: ledger.length })}\n </button>\n )}\n </div>\n ) : (\n <div className=\"ring-dashed ring-border mt-2.5 flex flex-col items-center justify-center gap-1 rounded-2xl bg-transparent px-4 py-8 text-center ring-1\">\n <Sparkles\n className=\"text-muted-foreground/75 size-5\"\n strokeWidth={1.75}\n />\n <div className=\"text-foreground text-sm font-bold\">\n {t(\"no_points_yet\")}\n </div>\n <div className=\"text-muted-foreground text-xs\">\n {t(\"earn_points_hint\")}\n </div>\n </div>\n )}\n </>\n )}\n\n {/* Your MySite link */}\n <SectionHeader\n title={t(\"your_mysite_link\")}\n action={\n onEditMySiteLink ? (\n <PillButton\n onClick={onEditMySiteLink}\n icon={Pencil}\n label={t(\"edit_link\")}\n />\n ) : undefined\n }\n />\n <div className=\"ring-border mt-2.5 flex items-center gap-3 rounded-2xl bg-transparent p-3.5 ring-1\">\n <div className=\"bg-muted text-foreground flex size-11 shrink-0 items-center justify-center rounded-full\">\n <Link2 className=\"size-[18px]\" strokeWidth={2} />\n </div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"text-muted-foreground/75 text-xs font-bold tracking-widest uppercase\">\n {t(\"public_link\")}\n </div>\n <div className=\"text-foreground mt-0.5 truncate font-mono text-sm font-semibold\">\n {mySiteDisplayUrl || t(\"set_your_mysite_link\")}\n </div>\n </div>\n <button\n type=\"button\"\n onClick={onCopyMySiteLink}\n disabled={!mySiteDisplayUrl}\n className=\"ring-border text-foreground hover:bg-muted inline-flex items-center gap-1 rounded-md bg-transparent px-3 py-1.5 text-xs font-bold ring-1 transition-all disabled:cursor-not-allowed disabled:opacity-40\"\n >\n <Copy className=\"size-3\" strokeWidth={2.25} />\n {t(\"copy\")}\n </button>\n </div>\n\n {/* Shipping addresses */}\n <SectionHeader title={t(\"shipping_addresses\")} />\n <div className=\"mt-2.5 grid grid-cols-1 gap-2.5 sm:grid-cols-2\">\n {addresses.map((address) => (\n <AddressCard\n key={address.id}\n address={address}\n onEdit={() => onEditAddress(address)}\n onDelete={\n address.default ? undefined : () => onDeleteAddress(address)\n }\n />\n ))}\n <AddAddressTile onClick={onAddAddress} />\n </div>\n\n {/* Social media */}\n <SectionHeader\n title={t(\"social_media\")}\n action={\n <span className=\"text-muted-foreground/75 text-xs\">\n {t(\"connected_count\", { count: connectedSocialCount })}\n </span>\n }\n />\n <div className=\"ring-border mt-2.5 overflow-hidden rounded-2xl bg-transparent ring-1\">\n {SOCIAL_ENTRIES.map((entry, i) => (\n <SocialRow\n key={entry.key}\n entry={entry}\n handle={socialLinks[entry.key] ?? \"\"}\n isLast={i === SOCIAL_ENTRIES.length - 1}\n onConnect={() => onConnectSocial(entry.key)}\n />\n ))}\n </div>\n\n <Dialog\n open={isPointsHistoryOpen}\n onOpenChange={setIsPointsHistoryOpen}\n >\n <DialogContent className=\"max-w-md md:max-w-lg\">\n <DialogHeader>\n <DialogTitle>{t(\"points_history\")}</DialogTitle>\n </DialogHeader>\n <div className=\"ring-border max-h-[60vh] overflow-y-auto rounded-2xl bg-transparent ring-1\">\n {ledger.map((entry, i) => (\n <PointsLedgerRow\n key={entry.id}\n entry={entry}\n isLast={i === ledger.length - 1}\n />\n ))}\n </div>\n </DialogContent>\n </Dialog>\n\n {onSignOut && (\n <div className=\"ring-border mt-8 flex flex-wrap items-center justify-between gap-3 rounded-2xl bg-transparent p-3.5 ring-1\">\n <div className=\"flex items-center gap-3\">\n <div className=\"bg-destructive/10 flex size-9 items-center justify-center rounded-md\">\n <LogOut\n className=\"text-destructive size-4\"\n strokeWidth={2.25}\n />\n </div>\n <div>\n <div className=\"text-foreground text-sm font-bold\">\n {t(\"sign_out\")}\n </div>\n <div className=\"text-muted-foreground text-xs\">\n {t(\"sign_out_description\")}\n </div>\n </div>\n </div>\n <button\n type=\"button\"\n onClick={onSignOut}\n className=\"bg-destructive/15 text-destructive hover:bg-destructive/25 rounded-md px-4 py-2 text-xs font-bold transition-colors\"\n >\n {t(\"sign_out\")}\n </button>\n </div>\n )}\n </div>\n </div>\n );\n}\n\nfunction SectionHeader({\n title,\n action,\n}: {\n title: string;\n action?: ReactNode;\n}): JSX.Element {\n return (\n <div className=\"mt-8 flex items-end justify-between\">\n <h2 className=\"text-foreground text-base font-bold tracking-tight\">\n {title}\n </h2>\n {action ?? null}\n </div>\n );\n}\n\nfunction PillButton({\n onClick,\n icon: Icon,\n label,\n disabled,\n}: {\n onClick: () => void;\n icon: ComponentType<{ className?: string; strokeWidth?: number }>;\n label: string;\n disabled?: boolean;\n}): JSX.Element {\n return (\n <button\n type=\"button\"\n onClick={onClick}\n disabled={disabled}\n className=\"ring-border text-foreground hover:bg-muted inline-flex items-center gap-1 rounded-md bg-transparent px-3 py-1.5 text-xs font-bold ring-1 transition-all disabled:cursor-not-allowed disabled:opacity-40\"\n >\n <Icon className=\"size-3\" strokeWidth={2.25} />\n {label}\n </button>\n );\n}\n\nfunction PointsLedgerRow({\n entry,\n isLast,\n}: {\n entry: PointsLedger;\n isLast: boolean;\n}): JSX.Element {\n const { t } = useProfileTranslation();\n const isCredit = entry.amount >= 0;\n const sign = isCredit ? \"+\" : \"−\";\n const magnitude = Math.abs(entry.amount).toLocaleString();\n const amountColor = isCredit ? \"text-emerald-600\" : \"text-destructive\";\n const sourceName = entry.metadata?.source?.name?.trim();\n const transactionType = entry.metadata?.transaction_type;\n const label =\n sourceName ||\n (transactionType\n ? transactionType.charAt(0).toUpperCase() + transactionType.slice(1)\n : isCredit\n ? t(\"points_awarded\")\n : t(\"points_redeemed\"));\n const dateLabel = formatLedgerDate(entry.created_at);\n return (\n <div\n className={`flex items-center gap-3 px-4 py-3.5 ${isLast ? \"\" : \"border-border border-b\"}`}\n >\n <div className=\"bg-muted flex size-9 shrink-0 items-center justify-center rounded-full\">\n <Sparkles\n className={`size-4 ${isCredit ? \"text-primary\" : \"text-muted-foreground\"}`}\n strokeWidth={2}\n />\n </div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"text-foreground truncate text-sm font-medium\">\n {label}\n </div>\n <div className=\"text-muted-foreground text-xs\">{dateLabel}</div>\n </div>\n <div\n className={`shrink-0 font-mono text-sm font-bold tabular-nums ${amountColor}`}\n >\n {sign}\n {magnitude}\n </div>\n </div>\n );\n}\n\nfunction formatLedgerDate(iso: string): string {\n try {\n const d = new Date(iso);\n return d.toLocaleDateString(undefined, {\n month: \"short\",\n day: \"numeric\",\n year: \"numeric\",\n });\n } catch {\n return iso;\n }\n}\n\nfunction FieldRow({\n icon: Icon,\n label,\n value,\n placeholder,\n isLast,\n multiline,\n}: {\n icon: ComponentType<{ className?: string; strokeWidth?: number }>;\n label: string;\n value: string;\n placeholder?: string;\n isLast?: boolean;\n multiline?: boolean;\n}): JSX.Element {\n const display = value || placeholder || \"\";\n const isPlaceholder = !value && Boolean(placeholder);\n const valueClasses = multiline ? \"whitespace-pre-line\" : \"truncate\";\n return (\n <div\n className={`flex gap-3 px-4 py-3.5 ${multiline ? \"items-start\" : \"items-center\"} ${isLast ? \"\" : \"border-border border-b\"}`}\n >\n <div className=\"bg-muted text-muted-foreground flex size-9 shrink-0 items-center justify-center rounded-full\">\n <Icon className=\"size-4\" strokeWidth={2} />\n </div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"text-muted-foreground/75 text-xs font-bold tracking-widest uppercase\">\n {label}\n </div>\n <div\n className={`mt-0.5 ${valueClasses} text-sm font-medium ${isPlaceholder ? \"text-muted-foreground/55\" : \"text-foreground\"}`}\n >\n {display}\n </div>\n </div>\n </div>\n );\n}\n\nconst CARD_BRAND_LABEL: Record<string, string> = {\n amex: \"AMERICAN EXPRESS\",\n visa: \"VISA\",\n mastercard: \"MASTERCARD\",\n discover: \"DISCOVER\",\n diners: \"DINERS CLUB\",\n jcb: \"JCB\",\n unionpay: \"UNIONPAY\",\n};\n\nconst CARD_BRAND_BADGE: Record<string, string> = {\n amex: \"AMEX\",\n visa: \"VISA\",\n mastercard: \"MC\",\n discover: \"DISC\",\n diners: \"DC\",\n jcb: \"JCB\",\n unionpay: \"UPI\",\n};\n\nfunction PaymentCardVisual({\n method,\n onClick,\n}: {\n method: fluidPay.CustomerPaymentMethod;\n onClick: () => void;\n}): JSX.Element {\n const { t } = useProfileTranslation();\n const brand = (method.details.card_brand || \"\").toLowerCase();\n const brandLabel =\n CARD_BRAND_LABEL[brand] || (brand ? brand.toUpperCase() : \"CARD\");\n const badge = CARD_BRAND_BADGE[brand] || \"CARD\";\n const last4 = method.details.last_four ?? \"••••\";\n const expMonth = String(method.details.exp_month ?? \"\").padStart(2, \"0\");\n const expYear = String(method.details.exp_year ?? \"\").slice(-2);\n const exp = expMonth && expYear ? `${expMonth}/${expYear}` : \"\";\n const holder = method.billing_address?.name ?? \"\";\n const badgeBg =\n brand === \"visa\"\n ? \"bg-[#1A1F71]\"\n : brand === \"mastercard\"\n ? \"bg-[#EB001B]\"\n : \"bg-[#0064D2]\";\n\n return (\n <button\n type=\"button\"\n onClick={onClick}\n className=\"group bg-foreground text-background ring-foreground/10 relative flex aspect-[1.586/1] flex-col justify-between overflow-hidden rounded-xl p-4 text-left shadow-sm ring-1 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-lg\"\n >\n <div\n aria-hidden\n className=\"absolute inset-0 bg-[repeating-linear-gradient(135deg,transparent_0px,transparent_22px,currentColor_22px,currentColor_24px)] opacity-[0.04]\"\n />\n <div className=\"relative flex items-start justify-between\">\n <div>\n <div className=\"text-background/50 text-xs font-semibold tracking-widest uppercase\">\n {brandLabel}\n </div>\n <div className=\"text-background mt-1 font-mono text-xl font-bold tracking-wider\">\n {last4}\n </div>\n </div>\n {method.default && (\n <span className=\"bg-background/10 text-background/80 rounded-md px-2 py-0.5 text-xs font-bold tracking-wider uppercase\">\n {t(\"default\")}\n </span>\n )}\n </div>\n <div className=\"relative flex items-end justify-between gap-2\">\n <div className=\"min-w-0 flex-1\">\n <div className=\"text-background/40 text-xs font-semibold tracking-widest uppercase\">\n {t(\"cardholder\")}\n </div>\n <div className=\"text-background truncate text-xs font-semibold\">\n {holder || \" \"}\n </div>\n </div>\n <div>\n <div className=\"text-background/40 text-xs font-semibold tracking-widest uppercase\">\n {t(\"card_expires\")}\n </div>\n <div className=\"text-background font-mono text-xs font-semibold\">\n {exp}\n </div>\n </div>\n <div\n className={`shrink-0 rounded px-1.5 py-0.5 text-xs font-bold tracking-wider text-white ${badgeBg}`}\n >\n {badge}\n </div>\n </div>\n </button>\n );\n}\n\nfunction AddPaymentTile({ onClick }: { onClick: () => void }): JSX.Element {\n const { t } = useProfileTranslation();\n return (\n <button\n type=\"button\"\n onClick={onClick}\n className=\"group ring-dashed ring-border text-muted-foreground hover:bg-background hover:text-foreground flex aspect-[1.586/1] flex-col items-center justify-center gap-1.5 rounded-xl bg-transparent ring-1 transition-colors\"\n >\n <div className=\"ring-border flex size-9 items-center justify-center rounded-full bg-transparent ring-1\">\n <Plus className=\"size-4\" strokeWidth={2.25} />\n </div>\n <div className=\"text-foreground text-xs font-bold\">\n {t(\"add_payment_method\")}\n </div>\n <div className=\"text-muted-foreground/75 text-xs\">\n {t(\"accepted_cards\")}\n </div>\n </button>\n );\n}\n\nfunction AddressCard({\n address,\n onEdit,\n onDelete,\n}: {\n address: fluidPay.CustomerAddress;\n onEdit: () => void;\n onDelete?: () => void;\n}): JSX.Element {\n const { t } = useProfileTranslation();\n const label = address.name?.trim() || t(\"address\");\n const cityLine = [address.city, address.state, address.postal_code]\n .filter(Boolean)\n .join(\", \");\n return (\n <div className=\"ring-border hover:bg-muted focus-within:ring-foreground/40 relative flex flex-col rounded-2xl bg-transparent ring-1 transition-all duration-200 focus-within:ring-2 hover:ring-2\">\n <button\n type=\"button\"\n onClick={onEdit}\n className=\"flex w-full flex-col rounded-2xl p-4 pr-12 text-left focus-visible:outline-none\"\n >\n <div className=\"flex items-start justify-between gap-2\">\n <div className=\"flex items-center gap-2\">\n <div className=\"bg-muted flex size-8 items-center justify-center rounded-full\">\n <MapPin\n className=\"text-muted-foreground size-4\"\n strokeWidth={2}\n />\n </div>\n <div className=\"text-foreground text-sm font-bold\">{label}</div>\n </div>\n {address.default && (\n <span className=\"bg-primary text-primary-foreground rounded-md px-2 py-0.5 text-xs font-bold tracking-wider uppercase\">\n {t(\"default\")}\n </span>\n )}\n </div>\n <div className=\"text-foreground mt-3 space-y-0.5 text-sm leading-snug\">\n {address.address1 && <div>{address.address1}</div>}\n {address.address2 && <div>{address.address2}</div>}\n {cityLine && <div>{cityLine}</div>}\n {address.country_code && (\n <div className=\"text-muted-foreground\">{address.country_code}</div>\n )}\n </div>\n </button>\n {onDelete && (\n <div className=\"absolute top-2 right-2 z-10\">\n <EllipsesDropdown\n onEdit={onEdit}\n onDelete={onDelete}\n editLabel={t(\"edit\")}\n deleteLabel={t(\"delete\")}\n />\n </div>\n )}\n </div>\n );\n}\n\nfunction AddAddressTile({ onClick }: { onClick: () => void }): JSX.Element {\n const { t } = useProfileTranslation();\n return (\n <button\n type=\"button\"\n onClick={onClick}\n className=\"group ring-dashed ring-border text-muted-foreground hover:bg-background hover:text-foreground flex min-h-37 flex-col items-center justify-center gap-1.5 rounded-2xl bg-transparent ring-1 transition-colors\"\n >\n <div className=\"ring-border flex size-9 items-center justify-center rounded-full bg-transparent ring-1\">\n <Plus className=\"size-4\" strokeWidth={2.25} />\n </div>\n <div className=\"text-foreground text-sm font-bold\">\n {t(\"add_an_address\")}\n </div>\n </button>\n );\n}\n\ntype SocialKey =\n | \"linkedin\"\n | \"facebook\"\n | \"x\"\n | \"instagram\"\n | \"youtube\"\n | \"pinterest\"\n | \"tiktok\";\n\ninterface SocialEntry {\n key: SocialKey;\n label: string;\n icon: ComponentType<{ className?: string; strokeWidth?: number }>;\n placeholder: string;\n}\n\nconst SOCIAL_ENTRIES: readonly SocialEntry[] = [\n {\n key: \"linkedin\",\n label: \"LinkedIn\",\n icon: Linkedin,\n placeholder: \"linkedin.com/in/username\",\n },\n {\n key: \"facebook\",\n label: \"Facebook\",\n icon: Facebook,\n placeholder: \"facebook.com/username\",\n },\n { key: \"x\", label: \"X\", icon: Twitter, placeholder: \"x.com/username\" },\n {\n key: \"instagram\",\n label: \"Instagram\",\n icon: Instagram,\n placeholder: \"instagram.com/username\",\n },\n {\n key: \"youtube\",\n label: \"YouTube\",\n icon: Youtube,\n placeholder: \"youtube.com/@channel\",\n },\n {\n key: \"pinterest\",\n label: \"Pinterest\",\n icon: Globe,\n placeholder: \"pinterest.com/username\",\n },\n {\n key: \"tiktok\",\n label: \"TikTok\",\n icon: Globe,\n placeholder: \"tiktok.com/@username\",\n },\n] as const;\n\nfunction SocialRow({\n entry,\n handle,\n isLast,\n onConnect,\n}: {\n entry: SocialEntry;\n handle: string;\n isLast: boolean;\n onConnect: () => void;\n}): JSX.Element {\n const { t } = useProfileTranslation();\n const Icon = entry.icon;\n return (\n <div\n className={`flex items-center gap-3 px-4 py-3.5 ${isLast ? \"\" : \"border-border border-b\"}`}\n >\n <div className=\"bg-muted text-foreground flex size-9 shrink-0 items-center justify-center rounded-full\">\n <Icon className=\"size-4\" strokeWidth={2} />\n </div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"text-foreground text-sm font-bold\">{entry.label}</div>\n <div\n className={`truncate text-xs ${handle ? \"text-muted-foreground\" : \"text-muted-foreground/55\"}`}\n >\n {handle || entry.placeholder}\n </div>\n </div>\n <PillButton\n onClick={onConnect}\n icon={handle ? Pencil : Plus}\n label={handle ? t(\"edit\") : t(\"connect\")}\n />\n </div>\n );\n}\n\nexport type { SocialKey };\n","import { useCallback, useMemo, useState } from \"react\";\nimport { z } from \"zod\";\nimport { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport {\n Button,\n Dialog,\n DialogContent,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n Input,\n Label,\n useZodForm,\n} from \"@fluid-app/ui-primitives\";\nimport { useProfileTranslation } from \"@fluid-app/profile-core/translation-api-context\";\nimport type { Language, PointsLedger } from \"@fluid-app/profile-core\";\nimport {\n AddressFormDialog,\n ConfirmActionDialog,\n CreditCardFormDialog,\n EditPaymentMethodDialog,\n UserInfoDialog,\n socialFields,\n} from \"@fluid-app/profile-ui\";\nimport type {\n UserFormData,\n EditPaymentMethodFormData,\n} from \"@fluid-app/profile-ui\";\nimport {\n FluidPayCoreProvider,\n type fluidPay,\n type State,\n} from \"@fluid-app/fluid-pay-core\";\nimport type { PayAddress } from \"@fluid-app/portal-core/pay-types\";\nimport {\n createFluidPayApiAdapter,\n mapToFluidPayPaymentMethod,\n} from \"../adapters/fluid-pay-api-adapter\";\nimport type { AccountRep } from \"@fluid-app/portal-core/account-types\";\nimport { useAccountApi } from \"@fluid-app/portal-core/account-api-context\";\nimport { usePayApi } from \"@fluid-app/portal-core/pay-api-context\";\nimport { usePortalMySiteProfile } from \"@fluid-app/mysite-ui/portal/hooks/use-mysite-portal\";\nimport { useCountriesApi } from \"@fluid-app/store-core/countries-api-context\";\nimport { useLanguagesApi } from \"@fluid-app/store-core/languages-api-context\";\nimport { AddressAutocompleteInput } from \"@fluid-app/address-autocomplete/components/AddressAutocompleteInput\";\nimport { accountKeys, payKeys, storeKeys } from \"../account/query-keys\";\nimport { useAccount } from \"../hooks/use-account\";\nimport { deriveLastName } from \"./profile/derive-last-name\";\nimport { ProfileLayout, type SocialKey } from \"./profile/ProfileLayout\";\n\ninterface ProfileContentScreenProps {\n onToast: (message: string, type: \"success\" | \"error\" | \"warning\") => void;\n countryIso: string;\n}\n\nfunction mapAccountToCustomerAccount(\n raw: AccountRep,\n): fluidPay.CustomerAccount {\n return {\n fluid_pay_account: {\n id: raw.id,\n email: raw.email,\n address_count: 0,\n payment_methods_count: 0,\n language_iso: null,\n },\n customer: {\n id: raw.id,\n active: true,\n active_subscriptions_count: 0,\n display_total_spent: \"0\",\n email: raw.email,\n first_name: raw.first_name,\n full_name: `${raw.first_name} ${raw.last_name}`.trim(),\n inactive_subscriptions_count: 0,\n is_rep: raw.member_type === \"rep\",\n phone: raw.phone,\n orders_count: 0,\n },\n };\n}\n\nfunction composeAddressName(\n firstName: string,\n lastName: string,\n): string | null {\n const combined = `${firstName} ${lastName}`.trim();\n return combined.length > 0 ? combined : null;\n}\n\nfunction mapToFluidPayAddress(raw: PayAddress): fluidPay.CustomerAddress {\n return {\n id: raw.id,\n address1: raw.street1,\n address2: raw.street2,\n city: raw.city,\n country_code: raw.country,\n default: raw.default,\n name: raw.name,\n postal_code: raw.zip,\n state: raw.state,\n subdivision_code: null,\n };\n}\n\ntype SocialFieldKey = (typeof socialFields)[number][\"name\"];\n\nconst SOCIAL_KEY_TO_FIELD: Record<SocialKey, SocialFieldKey | null> = {\n linkedin: \"linkedin\" as SocialFieldKey,\n facebook: \"facebook\" as SocialFieldKey,\n x: \"twitter\" as SocialFieldKey,\n instagram: \"instagram\" as SocialFieldKey,\n youtube: \"youtube\" as SocialFieldKey,\n pinterest: null,\n tiktok: \"tiktok\" as SocialFieldKey,\n};\n\nconst SOCIAL_LABELS: Record<SocialKey, string> = {\n linkedin: \"LinkedIn\",\n facebook: \"Facebook\",\n x: \"X\",\n instagram: \"Instagram\",\n youtube: \"YouTube\",\n pinterest: \"Pinterest\",\n tiktok: \"TikTok\",\n};\n\nconst SOCIAL_PLACEHOLDERS: Record<SocialKey, string> = {\n linkedin: \"linkedin.com/in/username\",\n facebook: \"facebook.com/username\",\n x: \"x.com/username\",\n instagram: \"instagram.com/username\",\n youtube: \"youtube.com/@channel\",\n pinterest: \"pinterest.com/username\",\n tiktok: \"tiktok.com/@username\",\n};\n\nexport function ProfileContentScreen({\n onToast,\n}: ProfileContentScreenProps): React.JSX.Element {\n const { t } = useProfileTranslation();\n const payApi = usePayApi();\n const accountApi = useAccountApi();\n const queryClient = useQueryClient();\n const fluidPayShim = useMemo(\n () => createFluidPayApiAdapter(payApi),\n [payApi],\n );\n\n const { data: mySiteProfile } = usePortalMySiteProfile();\n\n const mySiteUrl = mySiteProfile?.mysite_url ?? \"\";\n const mySiteDisplayUrl = mySiteUrl\n ? mySiteUrl.replace(/^https?:\\/\\//, \"\")\n : \"\";\n\n // Reuse the app-wide useAccount() cache entry shared with AppShell/PageRouter.\n const {\n data: accountRep,\n isLoading: isLoadingAccount,\n isError: isAccountError,\n } = useAccount();\n\n const accountData = useMemo(\n () => (accountRep ? mapAccountToCustomerAccount(accountRep) : undefined),\n [accountRep],\n );\n\n const { data: addressesData } = useQuery({\n queryKey: payKeys.addresses.list(),\n queryFn: async () => {\n const response = await payApi.fetchAddresses();\n return response.addresses.map(mapToFluidPayAddress);\n },\n enabled: true,\n });\n\n const { data: paymentMethodsData } = useQuery({\n queryKey: payKeys.paymentMethods.list(),\n queryFn: async () => {\n const response = await payApi.fetchPaymentMethods();\n return response.payment_methods.map(mapToFluidPayPaymentMethod);\n },\n enabled: true,\n });\n\n const countriesAdapter = useCountriesApi();\n const languagesAdapter = useLanguagesApi();\n\n const { data: countriesData } = useQuery({\n queryKey: storeKeys.countries(),\n queryFn: () => countriesAdapter.listCountries(),\n enabled: true,\n });\n\n const { data: languagesData } = useQuery({\n queryKey: storeKeys.languages(),\n queryFn: () => languagesAdapter.listLanguages(),\n enabled: true,\n });\n\n const { data: pointsLedgerData, isError: isPointsLedgerError } = useQuery({\n queryKey: payKeys.pointsLedgers.list(),\n queryFn: () => payApi.fetchPointsLedgers(),\n enabled: true,\n retry: (failureCount, error) => {\n if (\n error instanceof Error &&\n \"status\" in error &&\n (error as { status: number }).status === 403\n ) {\n return false;\n }\n return failureCount < 1;\n },\n });\n\n const rewardPointsEnabled = !isPointsLedgerError && pointsLedgerData != null;\n\n const adaptedPointsLedger: PointsLedger[] = useMemo(() => {\n return (pointsLedgerData?.points_ledgers ?? []).map((entry) => {\n const meta = entry.metadata as {\n transaction_type?: string | null;\n source?: {\n name: string;\n email?: string;\n reason?: string;\n user_id?: number;\n } | null;\n } | null;\n return {\n id: entry.id,\n amount: entry.amount,\n company_id: 0,\n created_at: entry.created_at,\n customer_id: 0,\n metadata: {\n transaction_type: meta?.transaction_type ?? undefined,\n source: meta?.source ?? undefined,\n },\n total_balance: entry.total_balance,\n updated_at: entry.created_at,\n };\n });\n }, [pointsLedgerData]);\n\n const updateCustomerMutation = useMutation({\n mutationFn: async (data: UserFormData) => {\n await accountApi.updateAccount({\n account: {\n first_name: data.first_name,\n last_name: data.last_name,\n phone: data.phone_number,\n bio: data.bio,\n },\n });\n },\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: accountKeys.all });\n onToast(t(\"profile_updated\"), \"success\");\n },\n onError: () => {\n onToast(t(\"failed_to_update_profile\"), \"error\");\n },\n });\n\n const deletePaymentMethodMutation = useMutation({\n mutationFn: (paymentMethodId: number) =>\n payApi.deletePaymentMethod(paymentMethodId),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: payKeys.paymentMethods.all,\n });\n },\n onError: () => {\n onToast(t(\"failed_to_delete_payment_method\"), \"error\");\n },\n });\n\n const updatePaymentMethodMutation = useMutation({\n mutationFn: ({\n paymentMethodId,\n data,\n }: {\n paymentMethodId: number;\n data: EditPaymentMethodFormData;\n }) =>\n payApi.updatePaymentMethod(paymentMethodId, {\n payment_method: {\n default: data.set_as_default,\n billing_address: {\n name: data.billing_address.name,\n street1: data.billing_address.address1,\n street2: data.billing_address.address2 ?? null,\n city: data.billing_address.city,\n state: data.billing_address.state,\n zip: data.billing_address.zip,\n country: data.billing_address.country_code,\n },\n },\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: payKeys.paymentMethods.all,\n });\n },\n onError: () => {\n onToast(t(\"failed_to_update_payment_method\"), \"error\");\n },\n });\n\n const createAddressMutation = useMutation({\n mutationFn: (body: fluidPay.CreateAddressBody) =>\n payApi.createAddress({\n address: {\n name: composeAddressName(\n body.address.first_name,\n body.address.last_name,\n ),\n street1: body.address.address1,\n street2: body.address.address2,\n city: body.address.city,\n state: body.address.state,\n zip: body.address.postal_code,\n country: body.address.country_code,\n },\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: payKeys.addresses.all });\n onToast(t(\"address_created\"), \"success\");\n },\n onError: () => {\n onToast(t(\"failed_to_create_address\"), \"error\");\n },\n });\n\n const updateAddressMutation = useMutation({\n mutationFn: ({\n addressId,\n body,\n }: {\n addressId: number;\n body: fluidPay.CreateAddressBody;\n }) =>\n payApi.updateAddress(addressId, {\n address: {\n name: composeAddressName(\n body.address.first_name,\n body.address.last_name,\n ),\n street1: body.address.address1,\n street2: body.address.address2,\n city: body.address.city,\n state: body.address.state,\n zip: body.address.postal_code,\n country: body.address.country_code,\n },\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: payKeys.addresses.all });\n onToast(t(\"address_updated\"), \"success\");\n },\n onError: () => {\n onToast(t(\"failed_to_update_address\"), \"error\");\n },\n });\n\n const deleteAddressMutation = useMutation({\n mutationFn: (addressId: number) => payApi.deleteAddress(addressId),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: payKeys.addresses.all });\n onToast(t(\"address_deleted\"), \"success\");\n },\n onError: () => {\n onToast(t(\"failed_to_delete_address\"), \"error\");\n },\n });\n\n const addCreditCardMutation = useMutation({\n mutationFn: (data: fluidPay.AddCreditCardData) =>\n payApi.createPaymentMethod({\n payment_method: {\n type: \"card\",\n token: data.payment_method.token,\n default: data.default_payment_method,\n },\n ...(data.billing_address && {\n billing_address: {\n country: data.billing_address.country_code,\n name: data.billing_address.name ?? null,\n street1: data.billing_address.address1,\n street2: data.billing_address.address2 ?? null,\n city: data.billing_address.city,\n state: data.billing_address.state,\n zip: data.billing_address.zip,\n },\n }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: payKeys.paymentMethods.all,\n });\n onToast(t(\"payment_method_added\"), \"success\");\n },\n onError: () => {\n onToast(t(\"failed_to_add_payment_method\"), \"error\");\n },\n });\n\n const addresses = addressesData ?? [];\n const paymentMethods = paymentMethodsData ?? [];\n\n const adaptedLanguages: Language[] = (languagesData?.languages ?? []).map(\n (l, i) => ({ id: i, name: l.name, iso: l.code }),\n );\n\n const countries = countriesData?.countries;\n\n const countryOptions = useMemo(\n () =>\n [...(countries ?? [])]\n .map((c) => ({ iso: c.code, name: c.name }))\n .sort((a, b) => a.name.localeCompare(b.name)),\n [countries],\n );\n\n const statesByCountry = useMemo(() => {\n const map = new Map<string, State[]>();\n for (const c of countries ?? []) {\n map.set(\n c.code,\n c.states.map((s) => ({ name: s.name, isoCode: s.code })),\n );\n }\n return map;\n }, [countries]);\n\n const fetchStatesFromCountries = useCallback(\n (countryCode: string): Promise<State[]> =>\n Promise.resolve(statesByCountry.get(countryCode) ?? []),\n [statesByCountry],\n );\n\n // Dialog open state\n const [isInfoDialogOpen, setIsInfoDialogOpen] = useState(false);\n const [addressDialog, setAddressDialog] = useState<{\n open: boolean;\n selected: fluidPay.CustomerAddress | null;\n }>({ open: false, selected: null });\n const [deletingAddress, setDeletingAddress] =\n useState<fluidPay.CustomerAddress | null>(null);\n const [isAddCardOpen, setIsAddCardOpen] = useState(false);\n const [editPaymentMethod, setEditPaymentMethod] =\n useState<fluidPay.CustomerPaymentMethod | null>(null);\n\n // User-info form (for the existing dialog)\n const userInfoLanguage = useMemo(() => {\n return (\n adaptedLanguages.find(\n (l) => l.iso === accountData?.fluid_pay_account.language_iso,\n )?.name ?? \"\"\n );\n }, [adaptedLanguages, accountData]);\n\n const derivedLastName = useMemo(() => {\n if (!accountData) return \"\";\n const { first_name, full_name } = accountData.customer;\n return deriveLastName(first_name, full_name);\n }, [accountData]);\n\n const userInfoSchema = useMemo(\n () =>\n z.object({\n first_name: z.string().min(1, t(\"first_name_is_required\")),\n last_name: z.string().min(1, t(\"last_name_is_required\")),\n phone_number: z.string().optional(),\n language: z.string().min(1, t(\"language_is_required\")),\n bio: z.string().optional(),\n }),\n [t],\n );\n\n const userInfoForm = useZodForm<UserFormData>(userInfoSchema, {\n defaultValues: {\n first_name: accountData?.customer.first_name ?? \"\",\n last_name: derivedLastName,\n phone_number: accountData?.customer.phone ?? \"\",\n language: userInfoLanguage,\n bio: accountRep?.bio ?? \"\",\n },\n });\n\n const handleOpenInfoDialog = useCallback(() => {\n userInfoForm.reset({\n first_name: accountData?.customer.first_name ?? \"\",\n last_name: derivedLastName,\n phone_number: accountData?.customer.phone ?? \"\",\n language: userInfoLanguage,\n bio: accountRep?.bio ?? \"\",\n });\n setIsInfoDialogOpen(true);\n }, [\n accountData,\n accountRep,\n derivedLastName,\n userInfoLanguage,\n userInfoForm,\n ]);\n\n const onSubmitUserInfo = userInfoForm.handleSubmit(async (data) => {\n try {\n await updateCustomerMutation.mutateAsync(data);\n setIsInfoDialogOpen(false);\n } catch {\n // toast surfaced via onError\n }\n });\n\n const socialLinks = useMemo<Partial<Record<SocialKey, string>>>(() => {\n const src: Partial<Record<SocialFieldKey, string>> =\n accountRep?.social_links ?? {};\n const result: Partial<Record<SocialKey, string>> = {};\n for (const [key, field] of Object.entries(SOCIAL_KEY_TO_FIELD) as [\n SocialKey,\n SocialFieldKey | null,\n ][]) {\n if (!field) continue;\n const v = src[field];\n if (typeof v === \"string\" && v.length > 0) {\n result[key] = v;\n }\n }\n return result;\n }, [accountRep]);\n\n const handleCopyMySiteLink = useCallback(async () => {\n if (!mySiteUrl) return;\n try {\n await navigator.clipboard.writeText(mySiteUrl);\n onToast(t(\"mysite_link_copied\"), \"success\");\n } catch {\n onToast(t(\"failed_to_copy_link\"), \"error\");\n }\n }, [mySiteUrl, onToast, t]);\n\n const [editingSocial, setEditingSocial] = useState<SocialKey | null>(null);\n const [socialDraft, setSocialDraft] = useState(\"\");\n\n const handleConnectSocial = useCallback(\n (key: SocialKey) => {\n const field = SOCIAL_KEY_TO_FIELD[key];\n if (!field) {\n onToast(t(\"platform_not_editable\"), \"warning\");\n return;\n }\n const current = accountRep?.social_links?.[field] ?? \"\";\n setSocialDraft(current);\n setEditingSocial(key);\n },\n [accountRep, onToast, t],\n );\n\n const updateSocialMutation = useMutation({\n mutationFn: async ({\n field,\n value,\n }: {\n field: SocialFieldKey;\n value: string;\n }) => {\n const current = accountRep?.social_links ?? {};\n await accountApi.updateAccount({\n account: {\n social_links: { ...current, [field]: value },\n },\n });\n },\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: accountKeys.all });\n onToast(t(\"social_link_updated\"), \"success\");\n },\n onError: () => {\n onToast(t(\"failed_to_update_social_link\"), \"error\");\n },\n });\n\n const handleSubmitSocial = useCallback(async () => {\n if (!editingSocial) return;\n const field = SOCIAL_KEY_TO_FIELD[editingSocial];\n if (!field) return;\n await updateSocialMutation.mutateAsync({\n field,\n value: socialDraft.trim(),\n });\n setEditingSocial(null);\n }, [editingSocial, socialDraft, updateSocialMutation]);\n\n if (isAccountError && !isLoadingAccount) {\n return (\n <div className=\"px-4 py-8 sm:px-9\">\n <div className=\"text-muted-foreground text-center text-sm\">\n {t(\"unable_to_load_account\")}\n </div>\n </div>\n );\n }\n\n if (isLoadingAccount || !accountData || !accountRep) {\n return (\n <div className=\"px-4 pt-4 sm:px-9 md:pt-8\">\n <div className=\"space-y-4\">\n <div className=\"bg-muted h-16 animate-pulse rounded\" />\n <div className=\"bg-muted h-32 animate-pulse rounded\" />\n <div className=\"bg-muted h-32 animate-pulse rounded\" />\n </div>\n </div>\n );\n }\n\n const pointsBalance = rewardPointsEnabled\n ? (pointsLedgerData?.points_ledgers?.[0]?.total_balance ?? 0)\n : undefined;\n\n return (\n <FluidPayCoreProvider api={fluidPayShim}>\n <ProfileLayout\n account={accountRep}\n pointsBalance={pointsBalance}\n pointsLedger={adaptedPointsLedger}\n rewardsEnabled={rewardPointsEnabled}\n addresses={addresses}\n paymentMethods={paymentMethods}\n mySiteDisplayUrl={mySiteDisplayUrl}\n socialLinks={socialLinks}\n onEditPersonalInfo={handleOpenInfoDialog}\n onAddAddress={() => setAddressDialog({ open: true, selected: null })}\n onEditAddress={(address) =>\n setAddressDialog({ open: true, selected: address })\n }\n onDeleteAddress={(address) => setDeletingAddress(address)}\n onAddPaymentMethod={() => setIsAddCardOpen(true)}\n onEditPaymentMethod={(pm) => setEditPaymentMethod(pm)}\n onCopyMySiteLink={handleCopyMySiteLink}\n onConnectSocial={handleConnectSocial}\n />\n\n <UserInfoDialog\n control={userInfoForm.control}\n isOpen={isInfoDialogOpen}\n onSubmit={onSubmitUserInfo}\n handleClose={() => setIsInfoDialogOpen(false)}\n languageOptions={adaptedLanguages.map((l) => ({\n name: l.name,\n value: l.name,\n }))}\n errorMsg={undefined}\n isSubmitting={updateCustomerMutation.isPending}\n email={accountRep.email ?? \"\"}\n />\n\n <AddressFormDialog\n isOpen={addressDialog.open}\n onClose={() => setAddressDialog({ open: false, selected: null })}\n selectedAddress={addressDialog.selected}\n t={(key: string) => t(key as never)}\n onSubmit={async (formData) => {\n if (addressDialog.selected) {\n await updateAddressMutation.mutateAsync({\n addressId: addressDialog.selected.id,\n body: formData,\n });\n } else {\n await createAddressMutation.mutateAsync(formData);\n }\n setAddressDialog({ open: false, selected: null });\n }}\n isSubmitting={\n createAddressMutation.isPending || updateAddressMutation.isPending\n }\n onDelete={\n addressDialog.selected && !addressDialog.selected.default\n ? async () => {\n if (!addressDialog.selected) return;\n try {\n await deleteAddressMutation.mutateAsync(\n addressDialog.selected.id,\n );\n setAddressDialog({ open: false, selected: null });\n } catch {\n // toast surfaced via onError\n }\n }\n : undefined\n }\n isDeleting={deleteAddressMutation.isPending}\n countries={countryOptions}\n fetchStates={fetchStatesFromCountries}\n renderAddressAutocomplete={({ control, setValue, countryCode }) => (\n <AddressAutocompleteInput\n control={control}\n setValue={setValue}\n countryIso={countryCode}\n addressLineField=\"address1\"\n cityField=\"city\"\n stateField=\"state\"\n postalCodeField=\"postal_code\"\n placeholder={t(\"address_line_1\")}\n />\n )}\n />\n\n <ConfirmActionDialog\n title={t(\"delete_address\")}\n description={t(\"delete_address_message\")}\n openDialog={deletingAddress !== null}\n setOpenDialog={(open) => {\n if (!open) setDeletingAddress(null);\n }}\n onAction={async () => {\n if (!deletingAddress) return;\n try {\n await deleteAddressMutation.mutateAsync(deletingAddress.id);\n setDeletingAddress(null);\n } catch {\n // toast surfaced via onError\n }\n }}\n isLoading={deleteAddressMutation.isPending}\n actionText={t(\"delete\")}\n />\n\n <CreditCardFormDialog\n isOpen={isAddCardOpen}\n onClose={() => setIsAddCardOpen(false)}\n t={(key: string) => t(key as never)}\n onSubmit={async (data) => {\n try {\n await addCreditCardMutation.mutateAsync(data);\n setIsAddCardOpen(false);\n } catch {\n // toast surfaced via onError\n }\n }}\n isSubmitting={addCreditCardMutation.isPending}\n countries={countryOptions}\n jwt=\"\"\n renderAddressAutocomplete={({ control, setValue, countryCode }) => (\n <AddressAutocompleteInput\n control={control}\n setValue={setValue}\n countryIso={countryCode}\n addressLineField=\"address1\"\n cityField=\"city\"\n stateField=\"state\"\n postalCodeField=\"zip\"\n placeholder={t(\"address_line_1\")}\n />\n )}\n />\n\n {editPaymentMethod && (\n <EditPaymentMethodDialog\n isOpen\n onClose={() => setEditPaymentMethod(null)}\n paymentMethod={editPaymentMethod}\n billingAddress={editPaymentMethod.billing_address}\n countries={countryOptions}\n onSubmit={(data) => {\n updatePaymentMethodMutation.mutate(\n { paymentMethodId: editPaymentMethod.id, data },\n { onSuccess: () => setEditPaymentMethod(null) },\n );\n }}\n isSubmitting={updatePaymentMethodMutation.isPending}\n onDelete={() => {\n deletePaymentMethodMutation.mutate(editPaymentMethod.id, {\n onSuccess: () => setEditPaymentMethod(null),\n });\n }}\n isDeleting={deletePaymentMethodMutation.isPending}\n />\n )}\n\n <Dialog\n open={editingSocial !== null}\n onOpenChange={(open) => !open && setEditingSocial(null)}\n >\n <DialogContent className=\"max-w-sm md:max-w-md\">\n <DialogHeader>\n <DialogTitle>\n {editingSocial\n ? t(\"edit_platform_link\", {\n platform: SOCIAL_LABELS[editingSocial] ?? \"\",\n })\n : t(\"edit_social_link\")}\n </DialogTitle>\n </DialogHeader>\n <div className=\"space-y-2 pt-2\">\n <Label\n htmlFor=\"social-handle\"\n className=\"mb-1.5 block text-sm font-medium\"\n >\n {t(\"url\")}\n </Label>\n <Input\n id=\"social-handle\"\n value={socialDraft}\n onChange={(e) => setSocialDraft(e.target.value)}\n placeholder={\n editingSocial ? SOCIAL_PLACEHOLDERS[editingSocial] : \"\"\n }\n onKeyDown={(e) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n void handleSubmitSocial();\n }\n }}\n autoFocus\n />\n </div>\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => setEditingSocial(null)}\n disabled={updateSocialMutation.isPending}\n >\n {t(\"cancel\")}\n </Button>\n <Button\n type=\"button\"\n onClick={() => {\n void handleSubmitSocial();\n }}\n disabled={updateSocialMutation.isPending}\n >\n {updateSocialMutation.isPending ? t(\"saving\") : t(\"save\")}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n </FluidPayCoreProvider>\n );\n}\n","import type { ComponentProps } from \"react\";\nimport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbPage,\n fluidToast,\n} from \"@fluid-app/ui-primitives\";\nimport { ScreenHeaderBreadcrumbs } from \"@fluid-app/portal-react/shell/ScreenHeaderContext\";\nimport { useProfileTranslation } from \"@fluid-app/profile-core/translation-api-context\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n PaddingOptions,\n} from \"../types\";\nimport type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { useFluidContext } from \"../providers/FluidProvider\";\nimport { ProfileTranslationBridge } from \"../providers/ProfileTranslationBridge\";\nimport { ProfileContentScreen } from \"./ProfileContentScreen\";\n\ntype ProfileScreenProps = ComponentProps<\"div\"> & {\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n onToast?: (message: string, type: \"success\" | \"error\" | \"warning\") => void;\n};\n\nfunction defaultToast(message: string, type: \"success\" | \"error\" | \"warning\") {\n fluidToast({ title: message, type });\n}\n\nexport function ProfileScreen({\n onToast,\n /* eslint-disable @typescript-eslint/no-unused-vars -- destructured to exclude from divProps spread */\n background,\n textColor,\n accentColor,\n padding,\n borderRadius,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ...divProps\n}: ProfileScreenProps): React.JSX.Element {\n const { config } = useFluidContext();\n const effectiveToast = onToast ?? defaultToast;\n const countryIso = config.countryIso ?? \"US\";\n\n return (\n <ProfileTranslationBridge>\n <ProfileScreenContent\n onToast={effectiveToast}\n countryIso={countryIso}\n divProps={divProps}\n />\n </ProfileTranslationBridge>\n );\n}\n\nfunction ProfileScreenContent({\n onToast,\n countryIso,\n divProps,\n}: {\n onToast: (message: string, type: \"success\" | \"error\" | \"warning\") => void;\n countryIso: string;\n divProps: ComponentProps<\"div\">;\n}): React.JSX.Element {\n const { t } = useProfileTranslation();\n\n return (\n <>\n <ScreenHeaderBreadcrumbs>\n <Breadcrumb>\n <BreadcrumbList className=\"text-lg\">\n <BreadcrumbItem>\n <BreadcrumbPage className=\"font-semibold\">\n {t(\"breadcrumb\")}\n </BreadcrumbPage>\n </BreadcrumbItem>\n </BreadcrumbList>\n </Breadcrumb>\n </ScreenHeaderBreadcrumbs>\n <div {...divProps}>\n <ProfileContentScreen onToast={onToast} countryIso={countryIso} />\n </div>\n </>\n );\n}\n\nexport const profileScreenPropertySchema: WidgetPropertySchema = {\n widgetType: \"ProfileScreen\",\n displayName: \"Profile Screen\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAgB,eAAe,WAAmB,UAA0B;AAC1E,KAAI,CAAC,UAAW,QAAO;CACvB,MAAM,SAAS,GAAG,UAAU;AAC5B,QAAO,SAAS,WAAW,OAAO,GAAG,SAAS,MAAM,OAAO,OAAO,GAAG;;;;ACkDvE,SAAgB,cAAc,OAAwC;CACpE,MAAM,EAAE,MAAM,uBAAuB;CACrC,MAAM,EACJ,SACA,eACA,cACA,gBACA,WACA,gBACA,kBACA,aACA,oBACA,cACA,eACA,iBACA,oBACA,qBACA,kBACA,kBACA,iBACA,cACE;CAEJ,MAAM,WACJ,GAAG,QAAQ,cAAc,GAAG,GAAG,QAAQ,aAAa,KAAK,MAAM;CAEjE,MAAM,eADiB,QAAQ,cAAc,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,MAEhD,QAAQ,OAAO,MAAM,IAAI,CAAC,MAAM,EAAE,mBAAmB;CACxE,MAAM,uBAAuB,OAAO,OAAO,YAAY,CAAC,QACrD,MAAM,OAAO,MAAM,YAAY,EAAE,SAAS,EAC5C,CAAC;CACF,MAAM,CAAC,qBAAqB,0BAA0B,SAAS,MAAM;CACrE,MAAM,uBAAuB;CAC7B,MAAM,SAAS,gBAAgB,EAAE;CACjC,MAAM,gBAAgB,OAAO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8
8
  require("./translation-api-context-factory-CFtMAp8h.cjs");
9
9
  require("./AddressAutocompleteInput-kE3jh0Gq.cjs");
10
- const require_SubscriptionsScreen = require("./SubscriptionsScreen-DLLDU_aU.cjs");
10
+ const require_SubscriptionsScreen = require("./SubscriptionsScreen-YL-1_nFd.cjs");
11
11
  exports.SubscriptionsScreen = require_SubscriptionsScreen.SubscriptionsScreen;
12
12
  exports.subscriptionsScreenPropertySchema = require_SubscriptionsScreen.subscriptionsScreenPropertySchema;
@@ -3070,10 +3070,10 @@ function PortalSubscriptionsList({ customerId, isLoadingCustomer, onSubscription
3070
3070
  }) }) }), /* @__PURE__ */ jsx("div", {
3071
3071
  className: "relative",
3072
3072
  children: /* @__PURE__ */ jsxs("div", {
3073
- className: "max-w-profile-container relative mx-auto px-5 pt-8 pb-20 md:px-8",
3073
+ className: "relative mx-auto max-w-4xl px-5 pt-8 pb-20 md:px-8",
3074
3074
  children: [
3075
3075
  /* @__PURE__ */ jsx("h1", {
3076
- className: "text-profile-hero tracking-profile-hero text-profile-text md:text-profile-hero-lg font-bold",
3076
+ className: "text-foreground text-xl font-bold tracking-tight md:text-2xl",
3077
3077
  children: t("list_title")
3078
3078
  }),
3079
3079
  list.length > 0 && /* @__PURE__ */ jsx(FilterPills, {
@@ -3102,7 +3102,7 @@ function PortalSubscriptionsList({ customerId, isLoadingCustomer, onSubscription
3102
3102
  }), inactiveSubs.length > 0 && /* @__PURE__ */ jsxs("div", {
3103
3103
  className: activeSubs.length > 0 ? "mt-10" : "mt-6",
3104
3104
  children: [/* @__PURE__ */ jsx("div", {
3105
- className: "text-profile-xs text-profile-text-muted mb-2 px-1 font-semibold",
3105
+ className: "text-muted-foreground mb-2 px-1 text-xs font-semibold",
3106
3106
  children: t("list_cancelled_section_label", { n: String(inactiveSubs.length) })
3107
3107
  }), /* @__PURE__ */ jsx("div", {
3108
3108
  className: "space-y-3",
@@ -3119,7 +3119,7 @@ function PortalSubscriptionsList({ customerId, isLoadingCustomer, onSubscription
3119
3119
  type: "button",
3120
3120
  onClick: () => fetchNextPage(),
3121
3121
  disabled: isFetchingNextPage,
3122
- className: "ring-profile-border bg-profile-card text-profile-text hover:bg-profile-pill-hover text-profile-xs inline-flex items-center gap-1 rounded-md px-3 py-1.5 font-bold ring-1 transition-all disabled:cursor-not-allowed disabled:opacity-40",
3122
+ className: "ring-border text-foreground hover:bg-muted inline-flex items-center gap-1 rounded-md bg-transparent px-3 py-1.5 text-xs font-bold ring-1 transition-all disabled:cursor-not-allowed disabled:opacity-40",
3123
3123
  children: isFetchingNextPage ? t("list_loading") : t("list_load_more")
3124
3124
  })
3125
3125
  })
@@ -3154,9 +3154,9 @@ function FilterPills({ active, counts, onChange, t }) {
3154
3154
  return /* @__PURE__ */ jsxs("button", {
3155
3155
  type: "button",
3156
3156
  onClick: () => onChange(f.key),
3157
- className: `text-profile-xs inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 font-bold transition-all ${isActive ? "bg-profile-dark text-profile-dark-foreground" : "ring-profile-border bg-profile-card text-profile-text hover:bg-profile-pill-hover ring-1"}`,
3157
+ className: `inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-bold transition-all ${isActive ? "bg-primary text-primary-foreground" : "ring-border text-foreground hover:bg-muted bg-transparent ring-1"}`,
3158
3158
  children: [t(f.labelKey), /* @__PURE__ */ jsx("span", {
3159
- className: `text-profile-micro tabular-nums ${isActive ? "text-profile-dark-foreground/70" : "text-profile-text-muted"}`,
3159
+ className: `text-xs tabular-nums ${isActive ? "text-primary-foreground/70" : "text-muted-foreground"}`,
3160
3160
  children: count
3161
3161
  })]
3162
3162
  }, f.key);
@@ -3175,7 +3175,7 @@ function SubscriptionCard({ sub, onClick, onResume, t }) {
3175
3175
  const cycle = computeCycleProgress(sub.last_bill_date, sub.next_bill_date, t);
3176
3176
  const showCycle = cycle != null && !isPaused && !isCancelled && !isPastDue;
3177
3177
  return /* @__PURE__ */ jsxs("div", {
3178
- className: `group has-[:focus-visible]:ring-profile-text/30 relative flex flex-col gap-5 rounded-2xl p-5 ring-1 transition-all duration-300 hover:-translate-y-0.5 has-[:focus-visible]:ring-2 ${isPastDue ? "bg-profile-card from-profile-danger-wash via-profile-danger-wash-faint shadow-profile-card ring-profile-danger-edge hover:shadow-profile-danger-card-hover hover:ring-profile-danger-edge-strong bg-gradient-to-br to-transparent" : "bg-profile-card ring-profile-card-edge shadow-profile-card hover:ring-profile-text/10 hover:shadow-profile-card-hover"} ${isPaused || isCancelled ? "opacity-90" : ""}`,
3178
+ className: `group has-[:focus-visible]:ring-foreground/30 relative flex flex-col gap-5 rounded-2xl p-5 ring-1 transition-all duration-300 hover:-translate-y-0.5 has-[:focus-visible]:ring-2 ${isPastDue ? "from-destructive/10 via-destructive/[0.03] ring-destructive/15 hover:ring-destructive/30 bg-transparent bg-gradient-to-br to-transparent shadow-sm hover:shadow-lg" : "ring-foreground/5 hover:ring-foreground/10 bg-transparent shadow-sm hover:shadow-lg"} ${isPaused || isCancelled ? "opacity-90" : ""}`,
3179
3179
  children: [/* @__PURE__ */ jsxs("button", {
3180
3180
  type: "button",
3181
3181
  onClick,
@@ -3191,52 +3191,52 @@ function SubscriptionCard({ sub, onClick, onResume, t }) {
3191
3191
  className: "min-w-0 flex-1 pt-1",
3192
3192
  children: [
3193
3193
  /* @__PURE__ */ jsx("div", {
3194
- className: "text-profile-lg text-profile-text truncate font-bold",
3194
+ className: "text-foreground truncate text-base font-bold",
3195
3195
  children: sub.variant.product.title || t("list_product_fallback")
3196
3196
  }),
3197
3197
  /* @__PURE__ */ jsx("div", {
3198
- className: "text-profile-sm-plus text-profile-text-muted mt-0.5",
3198
+ className: "text-muted-foreground mt-0.5 text-sm",
3199
3199
  children: cadence
3200
3200
  }),
3201
3201
  (isPaused || isCancelled || isPastDue) && /* @__PURE__ */ jsxs("div", {
3202
- className: `text-profile-xs mt-2 inline-flex items-center gap-1.5 font-semibold ${isPastDue ? "text-profile-danger-icon" : "text-profile-text-faint"}`,
3203
- children: [/* @__PURE__ */ jsx("span", { className: `size-1.5 rounded-full ${isCancelled || isPastDue ? "bg-profile-danger-icon" : "bg-profile-text-muted"}` }), status.label]
3202
+ className: `mt-2 inline-flex items-center gap-1.5 text-xs font-semibold ${isPastDue ? "text-destructive" : "text-muted-foreground/75"}`,
3203
+ children: [/* @__PURE__ */ jsx("span", { className: `size-1.5 rounded-full ${isCancelled || isPastDue ? "bg-destructive" : "bg-muted-foreground"}` }), status.label]
3204
3204
  })
3205
3205
  ]
3206
3206
  })]
3207
3207
  }),
3208
3208
  isCancelled ? /* @__PURE__ */ jsx("div", {
3209
- className: "bg-profile-icon-bg text-profile-base text-profile-text-muted rounded-xl px-4 py-3 font-semibold",
3209
+ className: "bg-muted text-muted-foreground rounded-xl px-4 py-3 text-sm font-semibold",
3210
3210
  children: status.label
3211
3211
  }) : /* @__PURE__ */ jsxs("div", {
3212
- className: "bg-profile-icon-bg rounded-xl px-4 py-3.5",
3212
+ className: "bg-muted rounded-xl px-4 py-3.5",
3213
3213
  children: [/* @__PURE__ */ jsx("div", {
3214
- className: `text-profile-md font-bold ${isPastDue ? "text-profile-danger-icon" : "text-profile-text"}`,
3214
+ className: `text-sm font-bold ${isPastDue ? "text-destructive" : "text-foreground"}`,
3215
3215
  children: isPastDue ? daysOverdue === 1 ? t("list_bill_due_1_day_ago") : daysOverdue > 0 ? t("list_bill_due_n_days_ago", { n: String(daysOverdue) }) : t("list_bill_overdue") : isPaused ? t("list_last_bill_label") : t("list_next_bill_label")
3216
3216
  }), /* @__PURE__ */ jsxs("div", {
3217
3217
  className: "mt-3 grid grid-cols-2",
3218
3218
  children: [/* @__PURE__ */ jsxs("div", {
3219
3219
  className: "pr-4",
3220
3220
  children: [/* @__PURE__ */ jsx("div", {
3221
- className: "text-profile-xs text-profile-text-muted",
3221
+ className: "text-muted-foreground text-xs",
3222
3222
  children: isPaused ? t("list_last_bill_date") : t("list_bill_date")
3223
3223
  }), /* @__PURE__ */ jsx("div", {
3224
- className: `text-profile-lg tracking-profile-tight mt-1 font-bold tabular-nums ${isPastDue ? "text-profile-danger-icon" : "text-profile-text"}`,
3224
+ className: `mt-1 text-base font-bold tracking-tight tabular-nums ${isPastDue ? "text-destructive" : "text-foreground"}`,
3225
3225
  children: (isPaused ? lastBillLong : nextBillLong) ?? "—"
3226
3226
  })]
3227
3227
  }), /* @__PURE__ */ jsxs("div", {
3228
- className: "border-profile-divider border-l pl-4",
3228
+ className: "border-border border-l pl-4",
3229
3229
  children: [
3230
3230
  /* @__PURE__ */ jsx("div", {
3231
- className: "text-profile-xs text-profile-text-muted",
3231
+ className: "text-muted-foreground text-xs",
3232
3232
  children: isPaused ? t("list_last_bill_amount") : t("list_bill_amount")
3233
3233
  }),
3234
3234
  /* @__PURE__ */ jsx("div", {
3235
- className: "text-profile-lg tracking-profile-tight text-profile-text mt-1 font-bold tabular-nums",
3235
+ className: "text-foreground mt-1 text-base font-bold tracking-tight tabular-nums",
3236
3236
  children: formatPrice(sub)
3237
3237
  }),
3238
3238
  /* @__PURE__ */ jsx("div", {
3239
- className: "text-profile-xs text-profile-text-muted",
3239
+ className: "text-muted-foreground text-xs",
3240
3240
  children: pricingSuffix(sub.subscription_plan, t)
3241
3241
  })
3242
3242
  ]
@@ -3249,7 +3249,7 @@ function SubscriptionCard({ sub, onClick, onResume, t }) {
3249
3249
  type: "button",
3250
3250
  onClick: onResume,
3251
3251
  disabled: !onResume,
3252
- className: "bg-profile-dark text-profile-dark-foreground hover:bg-profile-dark-hover text-profile-xs inline-flex w-full items-center justify-center gap-1.5 rounded-md py-2.5 font-bold transition-colors focus:outline-none disabled:cursor-not-allowed disabled:opacity-40",
3252
+ className: "bg-primary text-primary-foreground hover:bg-primary/90 inline-flex w-full items-center justify-center gap-1.5 rounded-md py-2.5 text-xs font-bold transition-colors focus:outline-none disabled:cursor-not-allowed disabled:opacity-40",
3253
3253
  children: [/* @__PURE__ */ jsx(Play, {
3254
3254
  className: "size-3 fill-current",
3255
3255
  strokeWidth: 2.25
@@ -3259,13 +3259,13 @@ function SubscriptionCard({ sub, onClick, onResume, t }) {
3259
3259
  }
3260
3260
  function CycleProgress({ cycle }) {
3261
3261
  return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
3262
- className: "bg-profile-icon-bg relative h-1.5 overflow-hidden rounded-full",
3262
+ className: "bg-muted relative h-1.5 overflow-hidden rounded-full",
3263
3263
  children: /* @__PURE__ */ jsx("div", {
3264
- className: "bg-profile-text absolute top-0 left-0 h-full rounded-full transition-all duration-500",
3264
+ className: "bg-foreground absolute top-0 left-0 h-full rounded-full transition-all duration-500",
3265
3265
  style: { width: `${Math.round(cycle.progress * 100)}%` }
3266
3266
  })
3267
3267
  }), /* @__PURE__ */ jsxs("div", {
3268
- className: "text-profile-2xs text-profile-text-muted mt-2 flex items-center justify-between font-medium",
3268
+ className: "text-muted-foreground mt-2 flex items-center justify-between text-xs font-medium",
3269
3269
  children: [/* @__PURE__ */ jsx("span", { children: cycle.startLabel }), /* @__PURE__ */ jsx("span", { children: cycle.endLabel })]
3270
3270
  })] });
3271
3271
  }
@@ -3275,15 +3275,15 @@ function InactiveSubscriptionRow({ sub, onClick, t }) {
3275
3275
  return /* @__PURE__ */ jsxs("button", {
3276
3276
  type: "button",
3277
3277
  onClick,
3278
- className: "group bg-profile-card ring-profile-card-edge shadow-profile-card hover:ring-profile-text/10 hover:shadow-profile-card-hover focus-visible:ring-profile-text/30 flex w-full cursor-pointer items-center gap-3 rounded-2xl px-4 py-3 text-left ring-1 transition-all duration-300 hover:-translate-y-0.5 focus-visible:ring-2 focus-visible:outline-none",
3278
+ className: "group ring-foreground/5 hover:ring-foreground/10 focus-visible:ring-foreground/30 flex w-full cursor-pointer items-center gap-3 rounded-2xl bg-transparent px-4 py-3 text-left shadow-sm ring-1 transition-all duration-300 hover:-translate-y-0.5 hover:shadow-lg focus-visible:ring-2 focus-visible:outline-none",
3279
3279
  children: [/* @__PURE__ */ jsx("div", {
3280
3280
  className: "relative size-10 shrink-0 opacity-60 saturate-50",
3281
3281
  children: sub.variant.product.image_url ? /* @__PURE__ */ jsx("img", {
3282
3282
  src: sub.variant.product.image_url,
3283
3283
  alt: "",
3284
- className: "bg-profile-card ring-profile-canvas size-10 rounded-xl object-cover ring-[3px]"
3284
+ className: "ring-background size-10 rounded-xl bg-transparent object-cover ring-[3px]"
3285
3285
  }) : /* @__PURE__ */ jsx("div", {
3286
- className: "bg-profile-icon-bg ring-profile-canvas text-profile-text-muted flex size-10 items-center justify-center rounded-xl ring-[3px]",
3286
+ className: "bg-muted ring-background text-muted-foreground flex size-10 items-center justify-center rounded-xl ring-[3px]",
3287
3287
  children: /* @__PURE__ */ jsx(ImageOff, {
3288
3288
  className: "size-4",
3289
3289
  strokeWidth: 1.75
@@ -3292,10 +3292,10 @@ function InactiveSubscriptionRow({ sub, onClick, t }) {
3292
3292
  }), /* @__PURE__ */ jsxs("div", {
3293
3293
  className: "min-w-0 flex-1",
3294
3294
  children: [/* @__PURE__ */ jsx("div", {
3295
- className: "text-profile-md text-profile-text truncate font-bold",
3295
+ className: "text-foreground truncate text-sm font-bold",
3296
3296
  children: sub.variant.product.title || t("list_product_fallback")
3297
3297
  }), /* @__PURE__ */ jsx("div", {
3298
- className: "text-profile-xs text-profile-text-muted truncate",
3298
+ className: "text-muted-foreground truncate text-xs",
3299
3299
  children: detail
3300
3300
  })]
3301
3301
  })]
@@ -3307,15 +3307,15 @@ function Thumbnail({ product, muted, t }) {
3307
3307
  children: [product.image_url ? /* @__PURE__ */ jsx("img", {
3308
3308
  src: product.image_url,
3309
3309
  alt: "",
3310
- className: "bg-profile-card ring-profile-canvas size-24 rounded-2xl object-cover ring-[3px] shadow-sm"
3310
+ className: "bg-transparent ring-background size-24 rounded-2xl object-cover ring-[3px] shadow-sm"
3311
3311
  }) : /* @__PURE__ */ jsx("div", {
3312
- className: "bg-profile-icon-bg ring-profile-canvas text-profile-text-muted flex size-24 items-center justify-center rounded-2xl shadow-sm ring-[3px]",
3312
+ className: "bg-muted ring-background text-muted-foreground flex size-24 items-center justify-center rounded-2xl shadow-sm ring-[3px]",
3313
3313
  children: /* @__PURE__ */ jsx(ImageOff, {
3314
3314
  className: "size-7",
3315
3315
  strokeWidth: 1.75
3316
3316
  })
3317
3317
  }), /* @__PURE__ */ jsx("div", {
3318
- className: "bg-profile-dark text-profile-dark-foreground ring-profile-canvas absolute -top-1 -right-1 z-40 flex size-6 items-center justify-center rounded-full ring-2",
3318
+ className: "bg-primary text-primary-foreground ring-background absolute -top-1 -right-1 z-40 flex size-6 items-center justify-center rounded-full ring-2",
3319
3319
  title: t("list_recurring_badge"),
3320
3320
  children: /* @__PURE__ */ jsx(Repeat, {
3321
3321
  className: "size-3",
@@ -3326,55 +3326,55 @@ function Thumbnail({ product, muted, t }) {
3326
3326
  }
3327
3327
  function SubscriptionCardSkeleton() {
3328
3328
  return /* @__PURE__ */ jsxs("div", {
3329
- className: "ring-profile-border bg-profile-card flex flex-col gap-5 rounded-2xl p-5 ring-1",
3329
+ className: "ring-border flex flex-col gap-5 rounded-2xl bg-transparent p-5 ring-1",
3330
3330
  children: [
3331
3331
  /* @__PURE__ */ jsxs("div", {
3332
3332
  className: "flex items-start gap-4",
3333
- children: [/* @__PURE__ */ jsx("div", { className: "bg-profile-icon-bg size-20 shrink-0 animate-pulse rounded-2xl" }), /* @__PURE__ */ jsxs("div", {
3333
+ children: [/* @__PURE__ */ jsx("div", { className: "bg-muted size-20 shrink-0 animate-pulse rounded-2xl" }), /* @__PURE__ */ jsxs("div", {
3334
3334
  className: "flex-1 space-y-2 pt-1",
3335
- children: [/* @__PURE__ */ jsx("div", { className: "bg-profile-icon-bg h-5 w-2/3 animate-pulse rounded" }), /* @__PURE__ */ jsx("div", { className: "bg-profile-icon-bg h-4 w-1/2 animate-pulse rounded" })]
3335
+ children: [/* @__PURE__ */ jsx("div", { className: "bg-muted h-5 w-2/3 animate-pulse rounded" }), /* @__PURE__ */ jsx("div", { className: "bg-muted h-4 w-1/2 animate-pulse rounded" })]
3336
3336
  })]
3337
3337
  }),
3338
- /* @__PURE__ */ jsx("div", { className: "bg-profile-icon-bg h-12 animate-pulse rounded" }),
3339
- /* @__PURE__ */ jsx("div", { className: "bg-profile-icon-bg h-6 animate-pulse rounded" })
3338
+ /* @__PURE__ */ jsx("div", { className: "bg-muted h-12 animate-pulse rounded" }),
3339
+ /* @__PURE__ */ jsx("div", { className: "bg-muted h-6 animate-pulse rounded" })
3340
3340
  ]
3341
3341
  });
3342
3342
  }
3343
3343
  function EmptyState({ filtered, t }) {
3344
3344
  return /* @__PURE__ */ jsxs("div", {
3345
- className: "ring-profile-border bg-profile-card mx-auto mt-12 flex max-w-md flex-col items-center gap-2 rounded-2xl px-6 py-12 text-center ring-1",
3345
+ className: "ring-border mx-auto mt-12 flex max-w-md flex-col items-center gap-2 rounded-2xl bg-transparent px-6 py-12 text-center ring-1",
3346
3346
  children: [/* @__PURE__ */ jsx("div", {
3347
- className: "text-profile-base text-profile-text font-bold",
3347
+ className: "text-foreground text-sm font-bold",
3348
3348
  children: filtered ? t("list_no_in_view") : t("list_none_yet")
3349
3349
  }), /* @__PURE__ */ jsx("div", {
3350
- className: "text-profile-xs text-profile-text-muted",
3350
+ className: "text-muted-foreground text-xs",
3351
3351
  children: filtered ? t("list_filtered_hint") : t("list_empty_hint")
3352
3352
  })]
3353
3353
  });
3354
3354
  }
3355
3355
  function ErrorState({ onRetry, t }) {
3356
3356
  return /* @__PURE__ */ jsxs("div", {
3357
- className: "ring-profile-border bg-profile-card mx-auto mt-12 flex max-w-md flex-col items-center gap-2 rounded-2xl px-6 py-12 text-center ring-1",
3357
+ className: "ring-border mx-auto mt-12 flex max-w-md flex-col items-center gap-2 rounded-2xl bg-transparent px-6 py-12 text-center ring-1",
3358
3358
  children: [
3359
3359
  /* @__PURE__ */ jsx("div", {
3360
- className: "bg-profile-icon-bg flex size-12 items-center justify-center rounded-full",
3360
+ className: "bg-muted flex size-12 items-center justify-center rounded-full",
3361
3361
  children: /* @__PURE__ */ jsx(AlertCircle, {
3362
- className: "text-profile-text-muted size-5",
3362
+ className: "text-muted-foreground size-5",
3363
3363
  strokeWidth: 2
3364
3364
  })
3365
3365
  }),
3366
3366
  /* @__PURE__ */ jsx("div", {
3367
- className: "text-profile-base text-profile-text font-bold",
3367
+ className: "text-foreground text-sm font-bold",
3368
3368
  children: t("list_load_failed_title")
3369
3369
  }),
3370
3370
  /* @__PURE__ */ jsx("div", {
3371
- className: "text-profile-xs text-profile-text-muted",
3371
+ className: "text-muted-foreground text-xs",
3372
3372
  children: t("list_load_failed_hint")
3373
3373
  }),
3374
3374
  /* @__PURE__ */ jsx("button", {
3375
3375
  type: "button",
3376
3376
  onClick: onRetry,
3377
- className: "bg-profile-dark text-profile-dark-foreground hover:bg-profile-dark-hover text-profile-xs mt-2 inline-flex items-center gap-1 rounded-md px-3 py-1.5 font-bold transition-all",
3377
+ className: "bg-primary text-primary-foreground hover:bg-primary/90 mt-2 inline-flex items-center gap-1 rounded-md px-3 py-1.5 text-xs font-bold transition-all",
3378
3378
  children: t("list_try_again")
3379
3379
  })
3380
3380
  ]
@@ -5699,4 +5699,4 @@ const subscriptionsScreenPropertySchema = {
5699
5699
  //#endregion
5700
5700
  export { SubscriptionsScreen_exports as n, subscriptionsScreenPropertySchema as r, SubscriptionsScreen as t };
5701
5701
 
5702
- //# sourceMappingURL=SubscriptionsScreen-Cjd2aGeW.mjs.map
5702
+ //# sourceMappingURL=SubscriptionsScreen-D8XUHV0b.mjs.map