UNPKG

@cerberus-design/react

Version:

The Cerberus Design React component library.

1 lines 44 kB
{"version":3,"sources":["../../../../src/components/file-upload/file-status.tsx","../../../../src/context/cerberus.tsx","../../../../src/components/progress/primitives.ts","../../../../src/system/primitive-factory.tsx","../../../../src/system/index.ts","../../../../src/components/progress/progress-bar.tsx","../../../../src/components/icon-button/primitives.ts","../../../../src/components/icon-button/button.tsx","../../../../src/utils/index.ts","../../../../src/components/show/show.tsx","../../../../src/components/avatar/primitives.tsx","../../../../src/components/avatar/parts.ts","../../../../src/components/avatar/avatar.tsx","../../../../src/components/field/field.tsx","../../../../src/components/field/primitives.tsx","../../../../src/components/field/error-text.tsx","../../../../src/components/field/helper-text.tsx"],"sourcesContent":["'use client'\n\nimport {\n useCallback,\n useMemo,\n type HTMLAttributes,\n type MouseEvent,\n} from 'react'\nimport { fileStatus, type FileStatusVariantProps } from 'styled-system/recipes'\nimport { css, cx } from 'styled-system/css'\nimport { hstack, vstack } from 'styled-system/patterns'\nimport { useCerberusContext } from '../../context/cerberus'\nimport { ProgressBar, type ProgressBarProps } from '../progress/index'\nimport { IconButton } from '../icon-button/index'\nimport { Avatar } from '../avatar/avatar'\nimport { Field, FieldHelperText } from '../field/index'\n\n/**\n * This module contains the FileStatus component.\n * @module\n */\n\n/**\n * The available values of the fileStatus helper Object.\n * @example\n * ```tsx\n * import { fileStatus } from '@cerberus/react'\n * processStatus.TODO // 'todo'\n * ```\n */\nexport type FileStatusKey = (typeof processStatus)[keyof typeof processStatus]\n\n/**\n * The actions that can be performed on a file.\n */\nexport type FileStatusActions = 'cancel' | 'retry' | 'delete'\nexport interface FileBaseStatusProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * A unique identifier for the file status. Required for accessibility.\n */\n id: string\n /**\n * The name of the file.\n */\n file: string\n /**\n * The percentage of the file that has been processed.\n */\n now: ProgressBarProps['now']\n /**\n * The status of the file.\n */\n status: processStatus\n /**\n * The action to perform on the file when a user clicks the\n * button located at the end of the status card.\n * @param status - The status of the file.\n * @param e - The event object.\n * @example\n * ```tsx\n * <FileStatus file=\"file.txt\" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />\n * ```\n * @default () => {}\n */\n onClick: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void\n}\nexport type FileStatusProps = FileBaseStatusProps & FileStatusVariantProps\n\n/**\n * A helper object to represent the status of a file.\n * @example\n * ```tsx\n * import { fileStatus } from '@cerberus/react'\n * processStatus.TODO // 'todo'\n * ```\n */\nexport const enum processStatus {\n TODO = 'todo',\n PROCESSING = 'processing',\n DONE = 'done',\n ERROR = 'error',\n}\n\n/**\n * A component that displays the status of a file during file processing.\n * @see https://cerberus.digitalu.design/react/file-uploader\n * @example\n * ```tsx\n * <FileStatus file=\"file.txt\" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />\n * ```\n */\nexport function FileStatus(props: FileStatusProps) {\n const { file, now, status, onClick, ...nativeProps } = props\n const actionLabel = useMemo(() => getStatusActionLabel(status), [status])\n const palette = useMemo(() => getPalette(status), [status])\n const modalIconPalette = useMemo(() => getModalIconPalette(status), [status])\n const styles = useMemo(() => {\n switch (status) {\n case processStatus.TODO:\n return fileStatus({ status: 'todo' })\n case processStatus.PROCESSING:\n return fileStatus({ status: 'processing' })\n case processStatus.DONE:\n return fileStatus({ status: 'done' })\n case processStatus.ERROR:\n return fileStatus({ status: 'error' })\n default:\n return fileStatus()\n }\n }, [status])\n\n const handleClick = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const actionStatus = getStatusActionLabel(\n status,\n ).toLocaleLowerCase() as FileStatusActions\n onClick(actionStatus, e)\n },\n [onClick, status],\n )\n\n return (\n <div\n {...nativeProps}\n className={cx(nativeProps.className, styles.root, hstack())}\n >\n <Avatar\n gradient={modalIconPalette}\n fallback={<MatchFileStatusIcon size={24} status={status} />}\n />\n\n <div\n className={vstack({\n alignItems: 'flex-start',\n gap: '0.12rem',\n w: 'full',\n })}\n >\n <small\n className={css({\n color: 'page.text.initial',\n textStyle: 'label-sm',\n })}\n >\n {file}\n </small>\n <ProgressBar\n id={props.id}\n label=\"File upload status\"\n now={now}\n size=\"sm\"\n />\n <Field label=\"\" invalid={modalIconPalette === 'hades-dark'}>\n <FieldHelperText\n className={css({\n color: 'page.text.100',\n })}\n id={`help:${file}`}\n >\n <MatchFileStatusText status={status} now={now} />\n </FieldHelperText>\n </Field>\n </div>\n\n <IconButton\n ariaLabel={actionLabel}\n onClick={handleClick}\n palette={palette}\n size=\"sm\"\n >\n <MatchStatusAction status={status} />\n </IconButton>\n </div>\n )\n}\n\ninterface FileStatusElProps {\n status: FileStatusProps['status']\n size?: 16 | 20 | 24 | 32\n now?: number\n}\n\nfunction MatchFileStatusIcon(props: FileStatusElProps) {\n const { icons } = useCerberusContext()\n const {\n waitingFileUploader: TodoIcon,\n fileUploader: FileUploaderIcon,\n invalidAlt: InvalidIcon,\n successNotification: DoneIcon,\n } = icons\n\n switch (props.status) {\n case processStatus.TODO:\n return <TodoIcon size={props.size} />\n case processStatus.PROCESSING:\n return <FileUploaderIcon size={props.size} />\n case processStatus.DONE:\n return <DoneIcon size={props.size} />\n case processStatus.ERROR:\n return <InvalidIcon size={props.size} />\n default:\n throw new Error('Unknown status')\n }\n}\n\nfunction MatchFileStatusText(props: FileStatusElProps) {\n switch (props.status) {\n case processStatus.TODO:\n return 'Waiting to upload'\n case processStatus.PROCESSING:\n return `${props.now}% Complete`\n case processStatus.DONE:\n return 'File uploaded successfully'\n case processStatus.ERROR:\n return 'There was an error uploading the file'\n default:\n throw new Error('Invalid status')\n }\n}\n\nfunction MatchStatusAction(props: FileStatusElProps) {\n const { icons } = useCerberusContext()\n const { close: CloseIcon, redo: RedoIcon, delete: TrashIcon } = icons\n switch (props.status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return <CloseIcon />\n case processStatus.ERROR:\n return <RedoIcon />\n case processStatus.DONE:\n return <TrashIcon />\n default:\n throw new Error('Invalid status')\n }\n}\n\nfunction getStatusActionLabel(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'Cancel'\n case processStatus.ERROR:\n return 'Retry'\n case processStatus.DONE:\n return 'Delete'\n default:\n return ''\n }\n}\n\nfunction getPalette(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'danger'\n case processStatus.ERROR:\n return 'action'\n case processStatus.DONE:\n return 'danger'\n default:\n return 'action'\n }\n}\n\nfunction getModalIconPalette(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'charon-light'\n case processStatus.ERROR:\n return 'hades-dark'\n case processStatus.DONE:\n return 'thanatos-dark'\n default:\n return 'charon-light'\n }\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport {\n progressBar,\n type ProgressBarVariantProps,\n} from 'styled-system/recipes'\nimport {\n createCerberusPrimitive,\n type CerberusPrimitiveProps,\n} from '../../system/index'\n\n/**\n * This module contains the ProgressBar component primitives.\n * @module @cerberus-design/react/components/progress-bar/primitives\n */\n\nconst { withSlotRecipe } = createCerberusPrimitive(progressBar)\n\n// Root\n\nexport type ProgressBarRootProps = CerberusPrimitiveProps<\n HTMLArkProps<'div'> & ProgressBarVariantProps\n>\nexport const ProgressBarRoot = withSlotRecipe<ProgressBarRootProps>(\n ark.div,\n 'root',\n {\n defaultProps: {\n 'aria-valuemin': '0',\n 'aria-valuemax': '100',\n role: 'progressbar',\n },\n },\n)\n\n// Bar\n\nexport type ProgressBarBarProps = CerberusPrimitiveProps<\n HTMLArkProps<'div'> & ProgressBarVariantProps\n>\nexport const ProgressBarBar = withSlotRecipe<ProgressBarBarProps>(\n ark.div,\n 'bar',\n)\n","import { css, cx } from 'styled-system/css'\nimport type { RecipeVariantRecord } from 'styled-system/types'\nimport {\n type ComponentType,\n type ElementType,\n type HTMLAttributes,\n type PropsWithChildren,\n} from 'react'\nimport type { WithCss } from '../types'\nimport type {\n CerberusPrimitiveEl,\n CerberusPrimitiveRecipe,\n CerberusRecipe,\n CerberusSlotRecipe,\n WithRecipeOptions,\n} from './types'\n\n/**\n * This module contains a factory for creating Cerberus primitives.\n * @module @cerberus/core/system/factory\n */\n\nexport class CerberusPrimitive {\n recipe: CerberusPrimitiveRecipe | null\n\n constructor(recipe?: CerberusPrimitiveRecipe) {\n this.recipe = recipe ?? null\n }\n\n private hasStyles(styles: string | undefined): Record<string, unknown> {\n if (styles) {\n return {\n className: styles,\n }\n }\n return {}\n }\n\n private validateComponent<P extends HTMLAttributes<unknown>>(\n Component: ComponentType<P> | string,\n ) {\n if (typeof Component !== 'function' && typeof Component !== 'object') {\n return false\n }\n return true\n }\n\n /**\n * Creates a Cerberus component with bare features and no recipe.\n * @param Component - The React component to enhance with Cerberus features.\n * Can be a string or a component reference.\n * @returns A new React component that applies Cerberus features to the\n * original component.\n *\n * @example\n * ```ts\n * const { withNoRecipe } = createCerberusPrimitive(buttonRecipe)\n * const Button = withNoRecipe('button')\n * ```\n */\n withNoRecipe = <P extends HTMLAttributes<unknown>>(\n Component: ComponentType<P> | string,\n options?: WithRecipeOptions,\n ): CerberusPrimitiveEl<P> => {\n const { defaultProps } = options || {}\n const El = Component as ComponentType<P> | ElementType\n\n const CerbComponent = (props: PropsWithChildren<P> & WithCss) => {\n const { css: customCss, className, ...nativeProps } = props\n const styles = this.hasStyles(cx(className, css(customCss)))\n return <El {...defaultProps} {...styles} {...(nativeProps as P)} />\n }\n\n if (this.validateComponent(El)) {\n const ElName = typeof El === 'string' ? El : El.displayName || El.name\n CerbComponent.displayName = ElName\n }\n\n return CerbComponent\n }\n\n /**\n * Creates a Cerberus component with the given recipe.\n * @param Component - The React component to enhance with the recipe.\n * @param options - Options for the recipe.\n * @returns A new React component that applies the recipe to the original\n * component.\n */\n withRecipe = <P extends HTMLAttributes<unknown>>(\n Component: ComponentType<P> | string,\n options?: WithRecipeOptions,\n ): CerberusPrimitiveEl<P & WithRecipeOptions['defaultProps']> => {\n const { defaultProps } = options || {}\n const El = Component as ComponentType<P> | ElementType\n\n const recipe = this.recipe as CerberusRecipe\n\n const CerbComponent = (internalProps: PropsWithChildren<P> & WithCss) => {\n const {\n css: customCss,\n className,\n ...restOfInternalProps\n } = internalProps\n\n const [variantOptions, nativeProps] =\n recipe.splitVariantProps(restOfInternalProps)\n const recipeStyles = recipe(variantOptions)\n\n return (\n <Component\n {...defaultProps}\n {...(nativeProps as P)}\n className={cx(className, recipeStyles, css(customCss))}\n />\n )\n }\n\n if (this.validateComponent(El)) {\n const ElName = typeof El === 'string' ? El : El.displayName || El.name\n CerbComponent.displayName = ElName\n }\n\n return CerbComponent\n }\n\n /**\n * Creates a Cerberus component with a slot recipe applied.\n * @param Component - The React component to enhance with Cerberus features.\n * @param recipe - The slot recipe to apply to the component.\n * @returns A new React component that applies Cerberus features and the\n * specified slot recipe to the original component.\n * @example\n * ```typescript\n * const { withSlotRecipe } = createCerberusPrimitive(field)\n * const Field = withSlotRecipe(RawField, field)\n * ```\n */\n withSlotRecipe = <P extends HTMLAttributes<unknown>>(\n Component: ComponentType<P> | string,\n slot: keyof RecipeVariantRecord,\n options?: WithRecipeOptions,\n ) => {\n const { defaultProps } = options || {}\n const El = Component as ComponentType<P> | ElementType\n\n const recipe = this.recipe as CerberusSlotRecipe<typeof slot>\n\n const CerbComponent = (internalProps: PropsWithChildren<P> & WithCss) => {\n const {\n css: customCss,\n className,\n ...restOfInternalProps\n } = internalProps\n\n const [variantOptions, nativeProps] =\n recipe.splitVariantProps(restOfInternalProps)\n const styles = recipe(variantOptions)\n const slotStyles = styles[slot as keyof typeof styles]\n\n return (\n <Component\n {...defaultProps}\n {...(nativeProps as P)}\n className={cx(className, slotStyles, css(customCss))}\n />\n )\n }\n\n if (this.validateComponent(El)) {\n const ElName = typeof El === 'string' ? El : El.displayName || El.name\n CerbComponent.displayName = ElName\n }\n\n return CerbComponent\n }\n}\n","import { CerberusPrimitive } from './primitive-factory'\nimport type { CerberusFactory, CerberusPrimitiveRecipe } from './types'\nimport { cerberusFactoryProxy } from './factory'\n\n/**\n * This module contains the user interface for creating Cerberus primitives.\n * @module @cerberus/core/system/create-cerb-primitive\n */\n\n/**\n * A factory function that creates a Cerberus primitive instance with the given\n * recipe.\n * @param recipe\n * @returns An object with three methods: `withNoRecipe`, `withRecipe`, and `withSlotRecipe` that\n * apply the recipes and special Cerberus helpers like `css`.\n *\n * @example\n * ```tsx\n * const { withRecipe } = createCerberusPrimitive(myCustomRecipe);\n * export const Button = withRecipe(MyCustomButton)\n * ```\n */\nexport function createCerberusPrimitive<T extends CerberusPrimitiveRecipe>(\n recipe?: T,\n) {\n return new CerberusPrimitive(recipe)\n}\n\n/**\n * A utility function to access Cerberus components by their name.\n * @param component - The name of the Cerberus component to access.\n * @returns The Cerberus component corresponding to the provided name.\n * @throws An error if the component name is not valid.\n *\n * @example\n * ```tsx\n * import { cerberus } from '@cerberus/react'\n * const Button = cerberus('button')\n *\n * <Button css={{ color: 'blue' }} asChild>\n * <Link href=\"/some-page\">Click me</Link>\n * </Button>\n * ```\n */\nexport const cerberus = cerberusFactoryProxy as CerberusFactory\n\nexport * from './types'\n","import {\n ProgressBarBar,\n ProgressBarRoot,\n type ProgressBarRootProps,\n} from './primitives'\n\n/**\n * This module contains the ProgressBar component.\n * @module\n */\n\nexport type NonIndeterminateProgressBarProps = {\n /**\n * A unique identifier for the progress bar. Required for accessibility.\n */\n id: string\n /**\n * A description label for the progress bar. Required for accessibility.\n */\n label: string\n /**\n * The state of the progress bar.\n */\n indeterminate?: never\n /**\n * The current value of the progress bar.\n */\n now: number\n}\nexport type IndeterminateProgressBarProps = {\n /**\n * A unique identifier for the progress bar. Required for accessibility.\n */\n id: string\n /**\n * A description label for the progress bar. Required for accessibility.\n */\n label: string\n /**\n * The state of the progress bar.\n */\n indeterminate?: true\n /**\n * The current value of the progress bar.\n */\n now?: never\n}\nexport type ProgressBarProps = ProgressBarRootProps &\n (NonIndeterminateProgressBarProps | IndeterminateProgressBarProps)\n\n/**\n * The ProgressBar component is used to display the progress of a task.\n * @see https://cerberus.digitalu.design/react/progress-indicators\n * @example\n * ```tsx\n * <ProgressBar value={75} />\n * ```\n */\nexport function ProgressBar(props: ProgressBarProps) {\n const { indeterminate, now, label, ...nativeProps } = props\n\n const nowClamped = Math.min(100, Math.max(0, now || 0))\n const width = {\n width: indeterminate ? '50%' : `${nowClamped}%`,\n }\n\n return (\n <ProgressBarRoot\n {...nativeProps}\n aria-label={label}\n aria-valuenow={indeterminate ? 0 : nowClamped}\n >\n <ProgressBarBar\n {...(indeterminate && { 'data-state': 'indeterminate' })}\n data-complete={nowClamped === 100}\n style={width}\n />\n </ProgressBarRoot>\n )\n}\n","import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { iconButton, type IconButtonVariantProps } from 'styled-system/recipes'\nimport {\n createCerberusPrimitive,\n type CerberusPrimitiveProps,\n} from '../../system/index'\n\n/**\n * This module contains the IconButton component primitives.\n * @module @cerberus-design/react/components/icon-button/primitives\n */\n\nconst { withRecipe } = createCerberusPrimitive(iconButton)\n\n/**\n * The root element of the Button component.\n */\nexport type IconButtonRootProps = CerberusPrimitiveProps<\n HTMLArkProps<'button'> & IconButtonVariantProps\n>\nexport const IconButtonRoot = withRecipe(ark.button)\n","import { IconButtonRoot, type IconButtonRootProps } from './primitives'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonProps extends IconButtonRootProps {\n /**\n * The aria-label attribute for the icon button.\n */\n ariaLabel: string\n}\n\n/**\n * A component that allows the user to perform actions using an icon\n * @see https://cerberus.digitalu.design/react/icon-button\n */\nexport function IconButton(props: IconButtonProps) {\n const { ariaLabel, ...rootProps } = props\n return (\n <IconButtonRoot {...rootProps} aria-label={ariaLabel ?? 'Icon Button'} />\n )\n}\n","/**\n * This module contains utility functions that are used across your app.\n * @module Utils\n */\n\n/**\n * Formats the count of notifications to be displayed in the notification badge.\n * @param count - The number of notifications.\n * @returns The formatted count of notifications.\n * @example\n * ```tsx\n * const count = formatNotifyCount(100)\n * console.log(count) // '99+'\n * ```\n */\nexport function formatNotifyCount(count: number): string {\n if (count > 99) return '99+'\n return count.toString()\n}\n\n/**\n * Splits the properties of an object into multiple groups based on lists of keys.\n * @param props - The object to split.\n * @param keyGroups - The lists of keys to include in each group.\n * @returns An array of objects: each containing the properties specified in the corresponding key group, and the last object containing the remaining keys.\n */\nexport function splitProps<T extends object>(\n props: T,\n ...keyGroups: (keyof T)[][]\n): { [K in keyof T]?: T[K] }[] {\n const result = keyGroups.map(() => ({}) as { [K in keyof T]?: T[K] })\n const rest = {} as { [K in keyof T]?: T[K] }\n\n for (const key in props) {\n let assigned = false\n for (let i = 0; i < keyGroups.length; i++) {\n if (keyGroups[i].includes(key as keyof T)) {\n result[i][key as keyof T] = props[key]\n assigned = true\n break\n }\n }\n if (!assigned) {\n rest[key as keyof T] = props[key]\n }\n }\n\n return [...result, rest]\n}\n\nexport * from './localStorage'\n","import { type PropsWithChildren, type ReactNode } from 'react'\n\n/**\n * This module contains the Show component.\n * @module\n */\n\nexport interface ShowProps<T> {\n /**\n * The condition to render memoized children or the fallback content.\n */\n when: T | boolean | null | undefined\n /**\n * The children to render when the condition is false.\n */\n fallback?: ReactNode\n}\n\n/**\n * Conditionally render a memoized version of the children or optional fallback\n * content.\n * @see https://cerberus.digitalu.design/react/show\n * @example\n * ```tsx\n * <Show when={isLoggedIn} fallback={<Navigate to=\"/login\" />}>\n * <Dashboard />\n * </Show>\n */\nexport function Show<T>(props: PropsWithChildren<ShowProps<T>>) {\n const { when, children, fallback } = props\n\n if (when) {\n return <>{children}</>\n }\n\n if (fallback) {\n return <>{fallback}</>\n }\n\n return null\n}\n","import {\n Avatar,\n type AvatarFallbackProps as ArkAvatarFallbackProps,\n type AvatarImageProps as ArkAvatarImageProps,\n type AvatarRootProps as ArkAvatarRootProps,\n} from '@ark-ui/react/avatar'\nimport { avatar, type AvatarVariantProps } from 'styled-system/recipes'\nimport {\n createCerberusPrimitive,\n type CerberusPrimitiveProps,\n} from '../../system/index'\n\n/**\n * This module provides the primitive components for the Avatar component.\n * @module 'avatar/primitives'\n */\n\nconst { withSlotRecipe } = createCerberusPrimitive(avatar)\n\n/**\n * The root component of the Avatar.\n */\nexport const AvatarRoot = withSlotRecipe<AvatarRootProps>(Avatar.Root, 'root')\nexport type AvatarRootProps = CerberusPrimitiveProps<\n ArkAvatarRootProps & AvatarVariantProps\n>\n\n/**\n * The image component of the Avatar.\n */\nexport const AvatarImage = withSlotRecipe<ArkAvatarImageProps>(\n Avatar.Image,\n 'image',\n)\nexport type AvatarImageProps = CerberusPrimitiveProps<ArkAvatarImageProps>\n\n/**\n * The fallback component of the Avatar.\n */\nexport const AvatarFallback = withSlotRecipe<ArkAvatarFallbackProps>(\n Avatar.Fallback,\n 'fallback',\n)\nexport type AvatarFallbackProps = CerberusPrimitiveProps<ArkAvatarFallbackProps>\n","import type { ElementType } from 'react'\nimport { AvatarFallback, AvatarImage, AvatarRoot } from './primitives'\n\n/**\n * This module contains the parts of the Avatar component.\n * @module 'avatar/parts'\n */\n\ninterface AvatarPartsValue {\n /**\n * The context provider of the Avatar.\n */\n Root: ElementType\n /**\n * The image of the Avatar.\n */\n Image: ElementType\n /**\n * The fallback content to display when the image fails to load.\n */\n Fallback: ElementType\n}\n\n/**\n * An Object containing the parts of the Accordion component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the AvatarParts object and\n * the entire family of components vs. only what you use.\n */\nexport const AvatarParts: AvatarPartsValue = {\n Root: AvatarRoot,\n Image: AvatarImage,\n Fallback: AvatarFallback,\n}\n","import type { AvatarVariantProps } from 'styled-system/recipes'\nimport type { ReactNode } from 'react'\nimport { splitProps } from '../../utils'\nimport { Show } from '../show/index'\nimport { AvatarParts } from './parts'\nimport type { AvatarRootProps } from './primitives'\n\n/**\n * This module provides an abstraction of the Avatar primitives.\n * @module 'avatar'\n */\n\nexport interface AvatarWithoutImage extends AvatarRootProps {\n alt?: never\n src?: never\n fallback?: ReactNode\n}\n\nexport interface AvatarWithImage extends AvatarRootProps, AvatarVariantProps {\n alt: string\n src: string\n fallback?: ReactNode\n}\n\n/**\n * Avatar component is an abstraction of the primitives that displays a\n * avatar or it's fallback when the image fails to load.\n * @description [Cerberus Docs](https://cerberus.digitalu.design/react/avatar/overview)\n * @description [Ark Docs](https://ark-ui.com/react/docs/components/avatar#api-reference)\n */\nexport function Avatar(props: AvatarWithoutImage | AvatarWithImage) {\n const [imgProps, { fallback, children }, rootProps] = splitProps(\n props,\n ['alt', 'src'],\n ['fallback', 'children'],\n )\n\n return (\n <AvatarParts.Root {...rootProps}>\n <Show\n when={children}\n fallback={\n <>\n <AvatarParts.Fallback>{fallback}</AvatarParts.Fallback>\n <AvatarParts.Image {...imgProps} />\n </>\n }\n >\n {children}\n </Show>\n </AvatarParts.Root>\n )\n}\n","import { type FieldRootProps } from '@ark-ui/react/field'\nimport { HStack } from 'styled-system/jsx'\nimport { splitProps } from '../../utils/index'\nimport { Show } from '../show/index'\nimport {\n FieldErrorText,\n FieldHelperText,\n FieldLabel,\n FieldRoot,\n} from './primitives'\nimport { HelperText } from './helper-text'\n\nexport interface FieldProps extends FieldRootProps {\n /**\n * The label of the field.\n */\n label?: string\n /**\n * The helper text of the field.\n */\n helperText?: string\n /**\n * A helper text positioned at the end of the field. Good for Textarea fields.\n */\n secondaryHelperText?: string\n /**\n * The error text of the field. Shown when the field is invalid.\n */\n errorText?: string\n}\n\n/**\n * The Field component is the context provider for all FieldParts and displays\n * the label, helperText, and ErrorText.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <Field\n * ids={{\n * control: 'firstName',\n * }}\n * label=\"Label\"\n * helperText=\"This is what people will see on your profile.\"\n * errorText=\"A first name is required to create an account.\"\n * required\n * >\n * <Input name=\"firstName\" type=\"text\" />\n * </Field>\n * ```\n */\nexport function Field(props: FieldProps) {\n const [statusProps, fieldProps, rootProps] = splitProps(\n props,\n ['disabled', 'required', 'readOnly', 'invalid'],\n ['label', 'helperText', 'secondaryHelperText', 'errorText', 'children'],\n )\n\n return (\n <FieldRoot {...statusProps} {...rootProps}>\n <Show when={fieldProps.label}>\n <FieldLabel>{fieldProps.label}</FieldLabel>\n </Show>\n\n {fieldProps.children}\n\n <HStack justifyContent=\"space-between\" w=\"full\">\n <HelperText invalid={statusProps.invalid}>\n {fieldProps.helperText}\n </HelperText>\n\n <FieldErrorText>{fieldProps.errorText}</FieldErrorText>\n\n <Show when={fieldProps.secondaryHelperText}>\n <FieldHelperText>{fieldProps.secondaryHelperText}</FieldHelperText>\n </Show>\n </HStack>\n </FieldRoot>\n )\n}\n","import {\n Field,\n type FieldHelperTextProps as ArkFieldHelperTextProps,\n type FieldInputProps as ArkFieldInputProps,\n type FieldLabelProps as ArkFieldLabelProps,\n type FieldRootProps as ArkFieldRootProps,\n type FieldTextareaProps as ArkFieldTextareaProps,\n type FieldRequiredIndicatorProps as ArkFieldRequiredIndicatorProps,\n} from '@ark-ui/react/field'\nimport { ark, type HTMLArkProps } from '@ark-ui/react'\nimport { field, type FieldVariantProps } from 'styled-system/recipes'\nimport {\n createCerberusPrimitive,\n type CerberusPrimitiveProps,\n} from '../../system/index'\nimport { CerberusFieldInput } from './input'\nimport { CerberusFieldErrorText } from './error-text'\n\n/**\n * This module contains all the primitives of the Field component.\n * @module 'field'\n */\n\nconst { withSlotRecipe, withNoRecipe } = createCerberusPrimitive(field)\n\n// Root\n\nexport type FieldRootProps = CerberusPrimitiveProps<\n ArkFieldRootProps & FieldVariantProps\n>\nexport const FieldRoot = withSlotRecipe<FieldRootProps>(Field.Root, 'root')\n\n// Label\n\nfunction FieldLabelEl(props: FieldLabelProps) {\n const { children, ...nativeProps } = props\n return (\n <Field.Label {...nativeProps}>\n {children}\n <Field.RequiredIndicator>(required)</Field.RequiredIndicator>\n </Field.Label>\n )\n}\n\nexport type FieldLabelProps = CerberusPrimitiveProps<ArkFieldLabelProps>\nexport const FieldLabel = withSlotRecipe<FieldLabelProps>(FieldLabelEl, 'label')\n\n// Required Indicator\n\nfunction FieldRequiredIndicatorEl(props: FieldRequiredIndicatorProps) {\n return (\n <Field.RequiredIndicator {...props}>(required)</Field.RequiredIndicator>\n )\n}\n\nexport type FieldRequiredIndicatorProps =\n CerberusPrimitiveProps<ArkFieldRequiredIndicatorProps>\nexport const FieldRequiredIndicator = withNoRecipe<FieldRequiredIndicatorProps>(\n FieldRequiredIndicatorEl,\n)\n\n// Input\n\nexport type FieldInputRootProps = CerberusPrimitiveProps<\n HTMLArkProps<'div'> & FieldVariantProps\n>\nexport const FieldInputRoot = withSlotRecipe<FieldInputRootProps>(\n ark.div,\n 'inputRoot',\n)\n\nexport type FieldInputProps = CerberusPrimitiveProps<\n ArkFieldInputProps & FieldVariantProps\n>\nexport const FieldInput = withSlotRecipe<FieldInputProps>(Field.Input, 'input')\n\n// Helper Text\n\nexport type FieldHelperTextProps =\n CerberusPrimitiveProps<ArkFieldHelperTextProps>\nexport const FieldHelperText = withSlotRecipe<FieldHelperTextProps>(\n Field.HelperText,\n 'helperText',\n)\n\n// Error Text\n\nexport type FieldErrorTextProps =\n CerberusPrimitiveProps<ArkFieldHelperTextProps>\nexport const FieldErrorText = withSlotRecipe<FieldErrorTextProps>(\n CerberusFieldErrorText,\n 'errorText',\n)\n\n// Textarea\n\nexport type FieldTextareaProps = CerberusPrimitiveProps<ArkFieldTextareaProps>\nexport const FieldTextarea = withSlotRecipe<FieldTextareaProps>(\n Field.Textarea,\n 'textarea',\n)\n\n/**\n * A named export for the FieldInput component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * import { Input } from '@cerberus/react'\n *\n * <Field\n * label=\"Enter your email\"\n * helperText=\"We'll never share your email with anyone else.\"\n * errorText=\"Email is required.\"\n * required\n * >\n * <Input type=\"email\" />\n * </Field>\n * ```\n */\nexport const Input = CerberusFieldInput\n\n/**\n * A named export for the FieldTextarea component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * import { Textarea } from '@cerberus/react'\n *\n * <Field\n * label=\"Comments\"\n * helperText=\"Your comments are valuable to us.\"\n * >\n * <Textarea />\n * </Field>\n * ```\n */\nexport const Textarea = FieldTextarea\n","import { Field } from '@ark-ui/react/field'\nimport type { FieldErrorTextProps } from './primitives'\n\n/**\n * The error text for the Field component that is shown when the field is\n * invalid.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldInput />\n * <FieldErrorText>Error text</FieldErrorText>\n * </FieldRoot>\n * ```\n */\nexport function CerberusFieldErrorText(props: FieldErrorTextProps) {\n if (!props.children) return null\n return <Field.ErrorText {...props} />\n}\n","import type { PropsWithChildren } from 'react'\nimport { FieldHelperText } from './primitives'\n\ninterface HelperTextProps {\n invalid?: boolean\n}\n\n/**\n * The HelperText component is an abstraction for hiding the helper text\n * when the field is invalid. Ark UI assumes people want the helper text\n * to always be visible, so this is a workaround for that.\n */\nexport function HelperText(props: PropsWithChildren<HelperTextProps>) {\n if (props.invalid) return null\n return (\n <FieldHelperText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AAA,IACT,KAAK;AACH,aAAO,GAAG,MAAM,GAAG;AAAA,IACrB,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,YAAM,IAAI,MAAM,gBAAgB;AAAA,EACpC;AACF;AAEA,SAAS,kBAAkB,OAA0B;AACnD,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,OAAO,WAAW,MAAM,UAAU,QAAQ,UAAU,IAAI;AAChE,UAAQ,MAAM,QAAQ;AAAA,IACpB,KAAK;AAAA,IACL,KAAK;AACH,aAAO,8CAAC,aAAU;AAAA,IACpB,KAAK;AACH,aAAO,8CAAC,YAAS;AAAA,IACnB,KAAK;AACH,aAAO,8CAAC,aAAU;AAAA,IACpB;AACE,YAAM,IAAI,MAAM,gBAAgB;AAAA,EACpC;AACF;AAEA,SAAS,qBAAqB,QAAuB;AACnD,UAAQ,QAAQ;AAAA,IACd,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEA,SAAS,WAAW,QAAuB;AACzC,UAAQ,QAAQ;AAAA,IACd,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEA,SAAS,oBAAoB,QAAuB;AAClD,UAAQ,QAAQ;AAAA,IACd,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;","names":["import_react","import_recipes","import_css","import_jsx_runtime","import_jsx_runtime","import_factory","import_recipes","import_jsx_runtime","import_jsx_runtime","import_recipes","withSlotRecipe","import_jsx_runtime","Avatar","import_field","import_react","import_recipes","import_jsx_runtime","import_jsx_runtime","withSlotRecipe","import_jsx_runtime","import_jsx_runtime","Field","import_jsx_runtime","processStatus","Avatar","Field"]}