burnout-components
Version:
A component library for burnout brands that contains common react-components and util functions used throughout it and it's portfolio companies
144 lines (120 loc) • 5.05 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import { ReadonlyURLSearchParams } from 'next/navigation';
interface Props$c {
colorSwap?: boolean;
fromLabel: string;
href: string;
linkLabel: string;
}
declare function BurnoutBreadCrumbNext({ colorSwap, fromLabel, href, linkLabel }: Props$c): react_jsx_runtime.JSX.Element;
interface Props$b {
children: React.ReactNode;
colorSwap?: boolean;
href: string;
prefetch?: boolean;
target?: '_blank' | '_self' | '_parent' | '_top';
}
declare function BurnoutButtonLinkNext({ children, colorSwap, href, prefetch, target }: Props$b): react_jsx_runtime.JSX.Element;
interface Props$a {
children: React.ReactNode;
colorSwap?: boolean;
header: number | string;
}
declare function BurnoutInfoCard({ children, colorSwap, header }: Props$a): react_jsx_runtime.JSX.Element;
interface Props$9 {
children: React.ReactNode;
href: string;
prefetch?: boolean;
target?: '_blank' | '_self' | '_parent' | '_top';
}
declare function BurnoutStyledLinkNext({ children, href, prefetch, target }: Props$9): react_jsx_runtime.JSX.Element;
interface Props$8 {
colorSwap?: boolean;
fromLabel: string;
href: string;
linkLabel: string;
}
declare function GlassMonsterBreadCrumbNext({ colorSwap, fromLabel, href, linkLabel }: Props$8): react_jsx_runtime.JSX.Element;
interface Props$7 {
children: React.ReactNode;
colorSwap?: boolean;
header: number | string;
}
declare function GlassMonsterInfoCard({ children, colorSwap, header }: Props$7): react_jsx_runtime.JSX.Element;
interface Props$6 {
children: React.ReactNode;
label: number | string;
}
declare function Info({ children, label }: Props$6): react_jsx_runtime.JSX.Element;
interface Props$5 {
colorSwap?: boolean;
fromLabel: string;
href: string;
linkLabel: string;
}
declare function MonsterBreadCrumbNext({ colorSwap, fromLabel, href, linkLabel }: Props$5): react_jsx_runtime.JSX.Element;
interface Props$4 {
children: React.ReactNode;
colorSwap?: boolean;
href: string;
prefetch?: boolean;
target?: '_blank' | '_self' | '_parent' | '_top';
}
declare function MonsterButtonLinkNext({ children, colorSwap, href, prefetch, target }: Props$4): react_jsx_runtime.JSX.Element;
interface Props$3 {
children: React.ReactNode;
colorSwap?: boolean;
href: string;
prefetch?: boolean;
target?: '_blank' | '_self' | '_parent' | '_top';
}
declare function MonsterGlassButtonLinkNext({ children, colorSwap, href, prefetch, target }: Props$3): react_jsx_runtime.JSX.Element;
interface Props$2 {
children: React.ReactNode;
colorSwap?: boolean;
header: number | string;
}
declare function MonsterInfoCard({ children, colorSwap, header }: Props$2): react_jsx_runtime.JSX.Element;
interface Props$1 {
children: React.ReactNode;
href: string;
prefetch?: boolean;
target?: '_blank' | '_self' | '_parent' | '_top';
}
declare function MonsterStyledLinkNext({ children, href, prefetch, target }: Props$1): react_jsx_runtime.JSX.Element;
interface Props {
fill?: 'blue' | 'green' | 'red' | 'yellow';
}
declare function TailwindLoadingSpinner({ fill }: Props): react_jsx_runtime.JSX.Element | undefined;
declare function allowedWithPermissionsNext(permissions: string[], validPermissions: string[]): undefined;
declare function capitalizeFirstLetters(str: string | null): string;
declare const CURRENCY_LOCALE_MAP: {
readonly AUD: "en-AU";
readonly BRL: "pt-BR";
readonly CAD: "en-CA";
readonly CHF: "de-CH";
readonly CNY: "zh-CN";
readonly EUR: "de-DE";
readonly GBP: "en-GB";
readonly INR: "en-IN";
readonly JPY: "ja-JP";
readonly USD: "en-US";
};
type SupportedCurrency = keyof typeof CURRENCY_LOCALE_MAP;
declare function createDollarAmount(amountInput: number | string, currency?: SupportedCurrency): string;
declare const createQueryString: (name: string, value: string, searchParams: ReadonlyURLSearchParams | URLSearchParams) => string;
declare function extractNumber(input: number | string): number | null;
declare function formatPhone(phoneNumber: string): string | null;
declare function trimStringProperties<T extends Record<string, unknown>>(obj: T): T;
declare function truncateText(text: string, length: number): string;
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
type Result<T, E = Error> = Success<T> | Failure<E>;
declare function tryCatch<T, E = Error>(promise: Promise<T>): Promise<Result<T, E>>;
export { BurnoutBreadCrumbNext, BurnoutButtonLinkNext, BurnoutInfoCard, BurnoutStyledLinkNext, GlassMonsterBreadCrumbNext, GlassMonsterInfoCard, Info, MonsterBreadCrumbNext, MonsterButtonLinkNext, MonsterGlassButtonLinkNext, MonsterInfoCard, MonsterStyledLinkNext, TailwindLoadingSpinner, allowedWithPermissionsNext, capitalizeFirstLetters, createDollarAmount, createQueryString, extractNumber, formatPhone, trimStringProperties, truncateText, tryCatch };