/** * @fileoverview SocialAuthButton — provider-branded login buttons. * @module packages/ui/components/brand/social-auth-buttons * @package ui * * Thin brand wrapper around {@link StatefulButton}. Adds: * - a provider-locked Phosphor brand-logo icon, weight-aware via * {@link BrandIconWeight} (`regular | bold | fill | duotone | colorful`). * The colorful weight renders the canonical multi-color brand mark; the * other four flow through `useSaasflareProps` like any other icon. * - a default "Continue with {Provider}" label * - auth-screen-friendly defaults (outline / neutral) * * Inherits everything else from StatefulButton (loading, loadingText, disabled, * size, surface, radius, animated, …). * * @example * import { SocialAuthButton, GoogleAuthButton } from "@saasflare/ui"; * * * * // colored G */ import * as React from "react"; import { type StatefulButtonProps } from "../composed/stateful-button"; import { type BrandIconWeight } from "../ui/phosphor"; declare const PROVIDERS: readonly ["google", "github", "apple", "microsoft", "x", "discord", "facebook", "linkedin", "medium", "slack", "reddit", "paypal", "stripe", "gitlab", "dribbble", "tiktok"]; /** Identity provider supported by {@link SocialAuthButton} — selects the brand icon and the default "Continue with {Provider}" label. */ type SocialProvider = (typeof PROVIDERS)[number]; /** * Props for {@link SocialAuthButton}. Inherits {@link StatefulButtonProps}, * but widens `iconWeight` to {@link BrandIconWeight} so the colored brand * variant can be requested per-instance. * * The visible label is resolved with the precedence: * `children` > `label` > `"Continue with {Provider}"` */ interface SocialAuthButtonProps extends Omit { /** Identity provider — drives icon and default label. */ provider: SocialProvider; /** Override the visible label. Default: "Continue with {Provider}". */ label?: React.ReactNode; /** * Icon weight. Accepts the four Phosphor weights (theme-aware via the * Saasflare provider chain) plus the brand-locked `"colorful"` variant. */ iconWeight?: BrandIconWeight; } /** * Generic provider-branded auth button. * * Defaults: `variant="outline"` `intent="neutral"`. * * The Phosphor weights (`regular | bold | fill | duotone`) inherit from * `` via {@link useSaasflareProps}; the * `colorful` weight is opt-in per-instance and bypasses the provider chain * because brand colors are not themable. * * @component * @layer brand */ declare function SocialAuthButton({ provider, label, variant, intent, fullWidth, surface, radius, animated, iconWeight, children, ...rest }: SocialAuthButtonProps): import("react/jsx-runtime").JSX.Element; type ProviderShortcutProps = Omit; /** Pre-bound {@link SocialAuthButton} for the `google` provider. */ declare const GoogleAuthButton: { (props: ProviderShortcutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** Pre-bound {@link SocialAuthButton} for the `github` provider. */ declare const GitHubAuthButton: { (props: ProviderShortcutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** Pre-bound {@link SocialAuthButton} for the `apple` provider. */ declare const AppleAuthButton: { (props: ProviderShortcutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** Pre-bound {@link SocialAuthButton} for the `microsoft` provider. */ declare const MicrosoftAuthButton: { (props: ProviderShortcutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** Pre-bound {@link SocialAuthButton} for the `x` provider. */ declare const XAuthButton: { (props: ProviderShortcutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** Pre-bound {@link SocialAuthButton} for the `discord` provider. */ declare const DiscordAuthButton: { (props: ProviderShortcutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** Pre-bound {@link SocialAuthButton} for the `facebook` provider. */ declare const FacebookAuthButton: { (props: ProviderShortcutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** Pre-bound {@link SocialAuthButton} for the `linkedin` provider. */ declare const LinkedInAuthButton: { (props: ProviderShortcutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** Pre-bound {@link SocialAuthButton} for the `medium` provider. */ declare const MediumAuthButton: { (props: ProviderShortcutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** Pre-bound {@link SocialAuthButton} for the `slack` provider. */ declare const SlackAuthButton: { (props: ProviderShortcutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** Pre-bound {@link SocialAuthButton} for the `reddit` provider. */ declare const RedditAuthButton: { (props: ProviderShortcutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** Pre-bound {@link SocialAuthButton} for the `paypal` provider. */ declare const PayPalAuthButton: { (props: ProviderShortcutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** Pre-bound {@link SocialAuthButton} for the `stripe` provider. */ declare const StripeAuthButton: { (props: ProviderShortcutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** Pre-bound {@link SocialAuthButton} for the `gitlab` provider. */ declare const GitLabAuthButton: { (props: ProviderShortcutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** Pre-bound {@link SocialAuthButton} for the `dribbble` provider. */ declare const DribbbleAuthButton: { (props: ProviderShortcutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** Pre-bound {@link SocialAuthButton} for the `tiktok` provider. */ declare const TikTokAuthButton: { (props: ProviderShortcutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export { SocialAuthButton, GoogleAuthButton, GitHubAuthButton, AppleAuthButton, MicrosoftAuthButton, XAuthButton, DiscordAuthButton, FacebookAuthButton, LinkedInAuthButton, MediumAuthButton, SlackAuthButton, RedditAuthButton, PayPalAuthButton, StripeAuthButton, GitLabAuthButton, DribbbleAuthButton, TikTokAuthButton, PROVIDERS, type SocialAuthButtonProps, type SocialProvider, };