@slashid/react
Version:
React SDK for the /id platform
65 lines • 5.76 kB
TypeScript
import { DynamicFlow } from "./components/dynamic-flow";
import { Onboarding, OnboardingProps, OnboardingStep, OnboardingStepProps, useOnboarding, OnboardingActions, OnboardingForm, OnboardingSuccess } from "./components/onboarding";
import { Form } from "./components/form";
import { Slot } from "./components/slot";
import { GDPRConsentDialog } from "./components/gdpr-consent-dialog";
import { Groups } from "./components/groups";
import { LoggedIn } from "./components/logged-in";
import { LoggedOut } from "./components/logged-out";
import { MultiFactorAuth } from "./components/multi-factor-auth";
import { OrganizationSwitcher } from "./components/organization-switcher";
import { SlashIDLoaded } from "./components/slashid-loaded";
import { StepUpAuth } from "./components/step-up-auth";
import { ConfigurationContext, ConfigurationProvider } from "./context/config-context";
import { SlashIDContext, type ISlashIDContext, SlashIDProvider, SlashIDProviderProps } from "./context/slash-id-context";
import { useGDPRConsent } from "./hooks/use-gdpr-consent";
import { useOrganizations } from "./hooks/use-organizations";
import { useSlashID, type UseSlashID } from "./hooks/use-slash-id";
import { defaultOrganization, type LoginMiddleware, type LoginMiddlewareContext } from "./middleware";
import { type CssVariable, type CssVariableConfig } from "./utils/customisation";
import type { LoginConfiguration } from "./domain/types";
declare const Customisation: {
fontFamilyRegExp: RegExp;
hexValueRegExp: RegExp;
pixelValueRegExp: RegExp;
supportedFonts: string[];
validate: (input: string | number, regexp: RegExp) => boolean;
pxValidator: (input: string | number) => boolean;
hexValidator: (input: string | number) => boolean;
rgbaValidator: (input: string | number) => boolean;
exactValidator: <T extends string | number>(values: T[]) => (input: T) => boolean;
fontFamilyValidator: (input: string | number | (string | number)[]) => boolean;
urlValidator: (input: string) => boolean;
sanitiseCssVariableCustomisationConfig: (config: Partial<Record<"--sid-color-background" | "--sid-color-mute" | "--sid-color-panel" | "--sid-color-foreground" | "--sid-color-contrast" | "--sid-color-secondary" | "--sid-color-tertiary" | "--sid-color-placeholder" | "--sid-color-smooth" | "--sid-color-subtle" | "--sid-color-soft" | "--sid-color-offset" | "--sid-color-primary" | "--sid-color-primary-hover" | "--sid-color-transparent" | "--sid-color-error" | "--sid-color-auxiliary" | "--sid-color-success" | "--sid-color-foreground-success" | "--sid-color-background-success" | "--sid-color-failure" | "--sid-color-foreground-failure" | "--sid-color-background-failure" | "--sid-font-family" | "--sid-border-width-panel" | "--sid-input-border-radius" | "--sid-input-border-color" | "--sid-input-label-color" | "--sid-button-border-radius" | "--sid-form-border-radius" | "--sid-form-logo-width", string | number>>) => Partial<Record<"--sid-color-background" | "--sid-color-mute" | "--sid-color-panel" | "--sid-color-foreground" | "--sid-color-contrast" | "--sid-color-secondary" | "--sid-color-tertiary" | "--sid-color-placeholder" | "--sid-color-smooth" | "--sid-color-subtle" | "--sid-color-soft" | "--sid-color-offset" | "--sid-color-primary" | "--sid-color-primary-hover" | "--sid-color-transparent" | "--sid-color-error" | "--sid-color-auxiliary" | "--sid-color-success" | "--sid-color-foreground-success" | "--sid-color-background-success" | "--sid-color-failure" | "--sid-color-foreground-failure" | "--sid-color-background-failure" | "--sid-font-family" | "--sid-border-width-panel" | "--sid-input-border-radius" | "--sid-input-border-color" | "--sid-input-label-color" | "--sid-button-border-radius" | "--sid-form-border-radius" | "--sid-form-logo-width", string | number>>;
getGoogleFontImports: (fontFamily: string) => string[];
};
declare const FormState: {
Authenticating: (props: import("./components/form/authenticating").AuthenticatingProps) => import("react/jsx-runtime").JSX.Element;
};
/**
* Components for SlashID internal use
*/
declare const Internal: {
OrgSwitchingForm: {
({ oid, className, onSuccess, onError, factors, text, children, }: import("./components/form/org-switching/org-switching-form").Props): import("react/jsx-runtime").JSX.Element;
Error: {
({ children }: {
children?: import("react").ReactNode | (({ context }: {
context: import("./components/form/flow/flow.common").AuthnContext & {
error: Error;
};
retry: import("./domain/types").Retry;
cancel: () => void;
}) => import("react").ReactNode);
}): import("react/jsx-runtime").JSX.Element | null;
displayName: string;
};
Authenticating: typeof import("./components/form/authenticating").Authenticating;
};
};
/**
* TODO: think about code splitting
*/
export { ConfigurationContext, ConfigurationProvider, DynamicFlow, Onboarding, type OnboardingProps, OnboardingStep, type OnboardingStepProps, useOnboarding, OnboardingActions, OnboardingForm, OnboardingSuccess, Form, GDPRConsentDialog, Groups, LoggedIn, LoggedOut, MultiFactorAuth, OrganizationSwitcher, Slot, type ISlashIDContext, SlashIDContext, SlashIDLoaded, SlashIDProvider, StepUpAuth, useGDPRConsent, useOrganizations, type UseSlashID, useSlashID, type CssVariable, type CssVariableConfig, Customisation, Internal, FormState, defaultOrganization, type LoginMiddleware, type LoginMiddlewareContext, type SlashIDProviderProps, type LoginConfiguration, };
export { ServerThemeRoot } from "@slashid/react-primitives";
//# sourceMappingURL=main.d.ts.map