UNPKG

@cerberus-design/react

Version:

The Cerberus Design React component library.

1 lines 25.3 kB
{"version":3,"sources":["../../../../src/components/select/select.tsx","../../../../src/context/cerberus.tsx","../../../../src/components/portal/portal.tsx","../../../../src/components/show/show.tsx","../../../../src/components/select/primitives.tsx","../../../../src/system/primitive-factory.tsx","../../../../src/system/index.ts","../../../../src/components/select/parts.ts"],"sourcesContent":["'use client'\n\nimport { HStack } from 'styled-system/jsx'\nimport { useCerberusContext } from '../../context/cerberus'\nimport { Portal } from '../portal/index'\nimport { Show } from '../show/index'\nimport { SelectParts } from './parts'\nimport type { RefObject } from 'react'\nimport type { SelectRootProps } from './primitives'\n\n/**\n * This module contains the Select components.\n * @module 'react/select'\n */\n\nexport interface SelectCollectionItem {\n /**\n * What is displayed in the dropdown list.\n */\n label: string\n /**\n * The value of the selected item used in the form.\n */\n value: string\n /**\n * If the item is disabled.\n */\n disabled?: boolean\n}\n\nexport interface SelectCollection {\n /**\n * The items to be displayed in the dropdown list.\n */\n items: SelectCollectionItem[]\n}\n\nexport interface SelectProps extends SelectRootProps {\n /**\n * The placeholder text when no option is selected.\n */\n placeholder?: string\n /**\n * The container element to render the Select dropdown in. This is used\n * to render the Select dropdown in a specific context, such as a modal.\n * @default document.body\n */\n container?: RefObject<HTMLElement | null>\n}\n\n/**\n * The Select component is a dropdown list that allows users to select an\n * option from a list.\n * @definition [Select docs](https://cerberus.digitalu.design/react/select)\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/select)\n * @example\n * ```tsx\n * import { Select, Option, createListCollection } from '@cerberus-design/react'\n *\n * export function SelectBasicPreview() {\n * const collection = createListCollection({\n * items: [\n * { label: 'Hades', value: 'hades' },\n * { label: 'Persephone', value: 'persephone' },\n * { label: 'Zeus', value: 'zeus', disabled: true },\n * ]\n * })\n *\n * return (\n * <Select\n * collection={collection}\n * label=\"Select Relative\"\n * placeholder=\"Choose option\"\n * >\n * {collection.items.map((item) => (\n * <Option key={item.value} item={item} />\n * ))}\n * </Select>\n * )\n * }\n */\nexport function Select(props: SelectProps) {\n const { collection, container, placeholder, ...rootProps } = props\n\n const { icons } = useCerberusContext()\n const { selectArrow: SelectArrow, invalid: InvalidIcon } = icons\n\n return (\n <SelectParts.Root collection={collection} {...rootProps}>\n <SelectParts.Control>\n <SelectParts.Trigger>\n <SelectParts.ValueText placeholder={placeholder} />\n\n <HStack>\n <Show when={props.invalid}>\n <InvalidIcon data-part=\"invalid-icon\" />\n </Show>\n <SelectParts.Indicator>\n <SelectArrow />\n </SelectParts.Indicator>\n </HStack>\n </SelectParts.Trigger>\n </SelectParts.Control>\n\n <Portal container={container}>\n <SelectParts.Positioner>\n <SelectParts.Content size={rootProps.size}>\n {props.children}\n </SelectParts.Content>\n </SelectParts.Positioner>\n </Portal>\n\n <SelectParts.HiddenSelect />\n </SelectParts.Root>\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 { Portal as ArkPortal, type PortalProps } from '@ark-ui/react'\n\n/**\n * This module is the Portal component.\n * @module\n */\n\nexport type { PortalProps }\n\n/**\n * The Portal component is used to render children into a DOM node that exists outside the DOM hierarchy of the parent component.\n * @see https://cerberus.digitalu.design/react/portal\n * @definition [React Portal Docs](https://react.dev/reference/react-dom/createPortal)\n * @example\n * ```tsx\n * 'use client'\n *\n * import { Portal } from '@cerberus/react'\n *\n * function SomeFeatureWithinSSRPage() {\n * return (\n * <Portal>\n * <div>Portal Content outside of the React VDom tree</div>\n * </Portal>\n * )\n * }\n */\nexport const Portal = ArkPortal\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 createListCollection,\n Select,\n type ListCollection,\n type SelectClearTriggerProps as ArkSelectClearTrigger,\n type SelectContentProps as ArkSelectContentProps,\n type SelectControlProps as ArkSelectControlProps,\n type SelectHiddenSelectProps as ArkSelectHiddenSelectProps,\n type SelectIndicatorProps as ArkSelectIndicatorProps,\n type SelectItemGroupLabelProps as ArkSelectItemGroupLabelProps,\n type SelectItemGroupProps as ArkSelectItemGroupProps,\n type SelectItemIndicatorProps as ArkSelectItemIndicatorProps,\n type SelectItemProps as ArkSelectItemProps,\n type SelectItemTextProps as ArkSelectItemTextProps,\n type SelectLabelProps as ArkSelectLabelProps,\n type SelectPositionerProps as ArkSelectPositionerProps,\n type SelectRootProps as ArkSelectRootProps,\n type SelectTriggerProps as ArkSelectTriggerProps,\n type SelectValueChangeDetails,\n type SelectValueTextProps as ArkSelectValueTextProps,\n} from '@ark-ui/react/select'\nimport { select, type SelectVariantProps } from 'styled-system/recipes'\nimport {\n createCerberusPrimitive,\n type CerberusPrimitiveProps,\n} from '../../system/index'\nimport type { SelectCollectionItem } from './select'\n\n/**\n * This module contains the Select primitives\n * @module 'react/select'\n */\n\nconst { withSlotRecipe, withNoRecipe } = createCerberusPrimitive(select)\n\n// Root\n\nexport type SelectRootProps = CerberusPrimitiveProps<\n ArkSelectRootProps<SelectCollectionItem> & SelectVariantProps\n>\n// @ts-expect-error this is a workaround for the type mismatch WIP\nexport const SelectRoot = withSlotRecipe<SelectRootProps>(Select.Root, 'root')\n\n// Label\n\nexport type SelectLabelProps = CerberusPrimitiveProps<ArkSelectLabelProps>\nexport const SelectLabel = withSlotRecipe<SelectLabelProps>(\n Select.Label,\n 'label',\n)\n\n// Control\n\nexport type SelectControlProps = CerberusPrimitiveProps<ArkSelectControlProps>\nexport const SelectControl = withNoRecipe<SelectControlProps>(Select.Control)\n\n// Trigger\n\nexport type SelectTriggerProps = CerberusPrimitiveProps<ArkSelectTriggerProps>\nexport const SelectTrigger = withSlotRecipe<SelectTriggerProps>(\n Select.Trigger,\n 'trigger',\n)\n\n// Value Text\n\nexport type SelectValueTextProps =\n CerberusPrimitiveProps<ArkSelectValueTextProps>\nexport const SelectValueText = withNoRecipe<SelectValueTextProps>(\n Select.ValueText,\n)\n\n// Indicator\n\nexport type SelectIndicatorProps =\n CerberusPrimitiveProps<ArkSelectIndicatorProps>\nexport const SelectIndicator = withSlotRecipe<SelectIndicatorProps>(\n Select.Indicator,\n 'indicator',\n)\n\n// Clear Trigger\n\nexport type SelectClearTriggerProps =\n CerberusPrimitiveProps<ArkSelectClearTrigger>\nexport const SelectClearTrigger = withNoRecipe<SelectClearTriggerProps>(\n Select.ClearTrigger,\n)\n\n// Positioner\n\nexport type SelectPositionerProps =\n CerberusPrimitiveProps<ArkSelectPositionerProps>\nexport const SelectPositioner = withSlotRecipe<SelectPositionerProps>(\n Select.Positioner,\n 'positioner',\n)\n\n// Content\n\nexport type SelectContentProps = CerberusPrimitiveProps<\n ArkSelectContentProps & SelectVariantProps\n>\nexport const SelectContent = withSlotRecipe<SelectContentProps>(\n Select.Content,\n 'content',\n)\n\n// Item Group\n\nexport type SelectItemGroupProps =\n CerberusPrimitiveProps<ArkSelectItemGroupProps>\nexport const SelectItemGroup = withNoRecipe<SelectItemGroupProps>(\n Select.ItemGroup,\n)\n\n// Item Group Label\n\nexport type SelectItemGroupLabelProps =\n CerberusPrimitiveProps<ArkSelectItemGroupLabelProps>\nexport const SelectItemGroupLabel = withSlotRecipe<SelectItemGroupLabelProps>(\n Select.ItemGroupLabel,\n 'itemGroupLabel',\n)\n\n// Item\n\nexport type SelectItemProps = CerberusPrimitiveProps<ArkSelectItemProps>\nexport const SelectItem = withSlotRecipe<SelectItemProps>(Select.Item, 'item')\n\n// Item Text\n\nexport type SelectItemTextProps = CerberusPrimitiveProps<ArkSelectItemTextProps>\nexport const SelectItemText = withNoRecipe<SelectItemTextProps>(Select.ItemText)\n\n// Item Indicator\n\nexport type SelectItemIndicatorProps =\n CerberusPrimitiveProps<ArkSelectItemIndicatorProps>\nexport const SelectItemIndicator = withSlotRecipe<SelectItemIndicatorProps>(\n Select.ItemIndicator,\n 'itemIndicator',\n)\n\n// Hidden Select\n\nexport type SelectHiddenSelectProps =\n CerberusPrimitiveProps<ArkSelectHiddenSelectProps>\nexport const SelectHiddenSelect = withNoRecipe<SelectHiddenSelectProps>(\n Select.HiddenSelect,\n)\n\n// Collection\n\n/**\n * A helper function to create a SelectCollection object.\n * @param collection - An array of SelectCollectionItem objects that matches\n * the following shape:\n * ```ts\n * [{ label: 'Hades', value: 'hades', disabled?: true }]\n * ```\n */\nexport function createSelectCollection(\n collection: SelectCollectionItem[],\n): ListCollection<SelectCollectionItem> {\n return createListCollection({\n items: collection,\n })\n}\n\nexport type { SelectValueChangeDetails, ListCollection }\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 type { ElementType } from 'react'\nimport {\n SelectClearTrigger,\n SelectContent,\n SelectControl,\n SelectHiddenSelect,\n SelectIndicator,\n SelectItem,\n SelectItemGroup,\n SelectItemGroupLabel,\n SelectItemIndicator,\n SelectItemText,\n SelectLabel,\n SelectPositioner,\n SelectRoot,\n SelectTrigger,\n SelectValueText,\n} from './primitives'\n\n/**\n * This module contains the parts of the Select parts.\n * @module 'select/parts'\n */\n\ninterface SelectPartsValue {\n /**\n * The context provider for the Select component.\n */\n Root: ElementType\n /**\n * The label that appears above the select input.\n */\n Label: ElementType\n /**\n * The control that wraps the select trigger.\n */\n Control: ElementType\n /**\n * The trigger that opens the dropdown.\n */\n Trigger: ElementType\n /**\n * The trigger to clear the select input.\n */\n ClearTrigger: ElementType\n /**\n * The text that appears in the trigger.\n */\n ValueText: ElementType\n /**\n * The indicator that appears in the trigger.\n */\n Indicator: ElementType\n /**\n * The positioner that wraps the content.\n */\n Positioner: ElementType\n /**\n * The content of the select component.\n */\n Content: ElementType\n /**\n * A group of items in the select component.\n */\n ItemGroup: ElementType\n /**\n * The label for a group of items in the select component.\n */\n ItemGroupLabel: ElementType\n /**\n * An individual item in the select component.\n */\n Item: ElementType\n /**\n * The text that labels a single radio of the field.\n */\n ItemText: ElementType\n /**\n * The indicator that appears when the item has been selected.\n */\n ItemIndicator: ElementType\n /**\n * The native select for use within a field.\n */\n HiddenSelect: ElementType\n}\n\n/**\n * An Object containing the parts of the Radio component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the SelectParts object and\n * the entire family of components vs. only what you use.\n */\nexport const SelectParts: SelectPartsValue = {\n Root: SelectRoot,\n Label: SelectLabel,\n Control: SelectControl,\n Trigger: SelectTrigger,\n ClearTrigger: SelectClearTrigger,\n ValueText: SelectValueText,\n Indicator: SelectIndicator,\n Positioner: SelectPositioner,\n Content: SelectContent,\n ItemGroup: SelectItemGroup,\n ItemGroupLabel: SelectItemGroupLabel,\n Item: SelectItem,\n ItemText: SelectItemText,\n ItemIndicator: SelectItemIndicator,\n HiddenSelect: SelectHiddenSelect,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,gBAAAA;AAAA;AAAA;AAEA,iBAAuB;;;ACAvB,mBAAkE;AAyB9D;AAfJ,IAAM,sBAAkB,4BAA2C,IAAI;AAyBhE,SAAS,qBAAqB;AACnC,QAAM,cAAU,yBAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;;;AC3CA,IAAAC,gBAAsD;AA2B/C,IAAM,SAAS,cAAAC;;;ACKX,IAAAC,sBAAA;AAJJ,SAAS,KAAQ,OAAwC;AAC9D,QAAM,EAA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