@recursica/mui-adapter 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"mui-adapter.js","sources":["../src/components/Accordion/Accordion.tsx","../src/components/AssistiveElement/AssistiveElement.tsx","../src/components/Avatar/Avatar.tsx","../src/components/Badge/Badge.tsx","../src/components/Box/Box.tsx","../src/components/Breadcrumb/Breadcrumb.tsx","../src/utils/filterStylingProps.ts","../src/components/Button/Button.tsx","../src/components/Card/Card.tsx","../src/components/Checkbox/Checkbox.tsx","../src/components/Chip/Chip.tsx","../src/components/Container/Container.tsx","../src/components/DatePicker/DatePicker.tsx","../src/components/Dropdown/Dropdown.tsx","../src/components/FileInput/FileInput.tsx","../src/components/FileUpload/FileUpload.tsx","../src/components/Flex/Flex.tsx","../src/components/FormControlLayout/FormControlLayout.tsx","../src/components/FormControlWrapper/FormControlWrapper.tsx","../src/components/Group/Group.tsx","../src/components/HoverCard/HoverCard.tsx","../src/components/Label/Label.tsx","../src/components/Link/Link.tsx","../src/components/Loader/Loader.tsx","../src/components/Menu/Menu.tsx","../src/components/Modal/Modal.tsx","../src/components/NumberInput/NumberInput.tsx","../src/components/Pagination/Pagination.tsx","../src/components/Panel/Panel.tsx","../src/components/Radio/Radio.tsx","../src/components/ReadOnlyField/ReadOnlyField.tsx","../src/components/SegmentedControl/SegmentedControl.tsx","../src/components/Slider/Slider.tsx","../src/components/Stack/Stack.tsx","../src/components/Stepper/Stepper.tsx","../src/components/Switch/Switch.tsx","../src/components/Table/Table.tsx","../src/components/Tabs/Tabs.tsx","../src/components/Typography/Typography.tsx","../src/components/Text/Text.tsx","../src/components/TextArea/TextArea.tsx","../src/components/TextField/TextField.tsx","../src/components/TimePicker/TimePicker.tsx","../src/components/Timeline/Timeline.tsx","../src/components/Title/Title.tsx","../src/components/Toast/Toast.tsx","../src/components/Tooltip/Tooltip.tsx","../src/components/TransferList/TransferList.tsx","../../adapter-common/dist/adapter-common.js"],"sourcesContent":["import React from \"react\";\n\nexport type AccordionProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Accordion: React.FC<AccordionProps> = (props) => {\n return <div {...props}>Accordion</div>;\n};\n","import React from \"react\";\n\nexport type AssistiveElementProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const AssistiveElement: React.FC<AssistiveElementProps> = (props) => {\n return <div {...props}>AssistiveElement</div>;\n};\n","import React from \"react\";\n\nexport type AvatarProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Avatar: React.FC<AvatarProps> = (props) => {\n return <div {...props}>Avatar</div>;\n};\n","import React from \"react\";\n\nexport type BadgeProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Badge: React.FC<BadgeProps> = (props) => {\n return <div {...props}>Badge</div>;\n};\n","/**\n * Box layout wrapper.\n *\n * NOTE: Box is the lowest-level primitive layout component. It explicitly ALLOWS\n * the `sx` prop as an escape hatch. It does not use the strict RecursicaOverStyled gatekeeper\n * or any style stripping utilities.\n */\nimport React, { forwardRef } from \"react\";\nimport { Box as MUIBox, type BoxProps as MUIBoxProps } from \"@mui/material\";\n\nexport type BoxProps<C extends React.ElementType = \"div\"> = MUIBoxProps<\n C,\n { component?: C }\n>;\n\nexport const Box = forwardRef(function Box<C extends React.ElementType = \"div\">(\n props: BoxProps<C>,\n ref: React.Ref<Element>,\n) {\n return <MUIBox ref={ref} {...props} />;\n}) as <C extends React.ElementType = \"div\">(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: BoxProps<C> & { ref?: React.ForwardedRef<any> },\n) => React.ReactElement | null;\n","import React from \"react\";\n\nexport type BreadcrumbProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Breadcrumb: React.FC<BreadcrumbProps> = (props) => {\n return <div {...props}>Breadcrumb</div>;\n};\n","/**\n * filterStylingProps\n *\n * This utility acts as the central gatekeeper for strict design-system adherence across\n * all Recursica components mapped over MUI.\n *\n * PHILOSOPHY:\n * Recursica components are designed to be explicitly sandboxed tokens. Allowing external\n * `className` or MUI style props (`sx`, `classes`, etc.) breaks the design system by\n * allowing developers to leak arbitrary designs into components.\n *\n * By default (`overStyled=false`), this utility actively prevents developers from overriding\n * internal component styles (such as background, colors, typography, or internal classes).\n * It safely *permits* external layout overrides (like `margin` / `m`) so that components can\n * easily be spaced alongside other DOM elements.\n *\n * If a developer passes `overStyled={true}`, this filter allows all styling properties to\n * flow through to the underlying MUI component natively, at the developer's own risk.\n *\n * @param props - The raw component props passed down to the wrapper\n * @param overStyled - Boolean toggle to allow raw external styling. Defaults to false.\n * @returns Sanitized component props safe for internal styling merging\n */\n\nexport const BLOCKED_STYLING_KEYS = [\n \"className\",\n \"classes\", // MUI specific nested class overrides\n \"style\",\n \"sx\", // MUI's primary system style prop\n\n // Potential Box/Typography system props to block (if we wrap those)\n \"color\",\n \"bgcolor\",\n \"backgroundColor\",\n \"typography\",\n \"fontFamily\",\n \"fontSize\",\n \"fontWeight\",\n \"lineHeight\",\n \"letterSpacing\",\n \"textAlign\",\n \"border\",\n \"borderTop\",\n \"borderBottom\",\n \"borderLeft\",\n \"borderRight\",\n \"borderColor\",\n \"borderRadius\",\n \"boxShadow\",\n \"display\",\n \"position\",\n \"zIndex\",\n] as const;\n\nexport type BlockedStylingKeys = (typeof BLOCKED_STYLING_KEYS)[number];\n\nexport type RecursicaSpacing =\n | \"rec-none\"\n | \"rec-sm\"\n | \"rec-default\"\n | \"rec-md\"\n | \"rec-lg\"\n | \"rec-xl\"\n | \"rec-2xl\";\n\nexport type RecursicaSize = \"small\" | \"default\" | \"large\";\n\nconst LAYOUT_PROPS = new Set([\n \"m\",\n \"my\",\n \"mx\",\n \"mt\",\n \"mb\",\n \"ml\",\n \"mr\",\n \"p\",\n \"py\",\n \"px\",\n \"pt\",\n \"pb\",\n \"pl\",\n \"pr\",\n \"gap\",\n \"rowGap\",\n \"columnGap\",\n \"top\",\n \"left\",\n \"bottom\",\n \"right\",\n]);\n\nexport const SPACING_MAP: Record<string, string> = {\n \"rec-none\": \"var(--recursica_brand_dimensions_general_none)\",\n \"rec-sm\": \"var(--recursica_brand_dimensions_general_sm)\",\n \"rec-default\": \"var(--recursica_brand_dimensions_general_default)\",\n \"rec-md\": \"var(--recursica_brand_dimensions_general_md)\",\n \"rec-lg\": \"var(--recursica_brand_dimensions_general_lg)\",\n \"rec-xl\": \"var(--recursica_brand_dimensions_general_xl)\",\n \"rec-2xl\": \"var(--recursica_brand_dimensions_general_2xl)\",\n};\n\nexport type ForbiddenStyles = { [K in BlockedStylingKeys]?: never };\n\nexport type OmitSx<T> = Omit<T, \"sx\">;\n\nexport function filterSxProp<T extends Record<string, unknown>>(\n props: T,\n): Omit<T, \"sx\"> {\n const sanitized = { ...props };\n if (\"sx\" in sanitized) {\n delete sanitized[\"sx\"];\n }\n return sanitized as Omit<T, \"sx\">;\n}\n\nexport type RecursicaOverStyled<T> =\n | (Omit<T, BlockedStylingKeys> &\n ForbiddenStyles & { overStyled?: false | undefined })\n | (T & { overStyled: true });\n\nexport function filterStylingProps<T extends Record<string, unknown>>(\n props: T,\n overStyled?: boolean,\n): Partial<T> {\n if (overStyled) {\n return props;\n }\n\n const sanitized = { ...props };\n\n for (const prop of BLOCKED_STYLING_KEYS) {\n if (prop in sanitized) {\n delete sanitized[prop];\n }\n }\n\n // Intercept Recursica spacing tokens for valid layout properties\n for (const [key, value] of Object.entries(sanitized)) {\n if (\n typeof value === \"string\" &&\n value.startsWith(\"rec-\") &&\n LAYOUT_PROPS.has(key)\n ) {\n if (value in SPACING_MAP) {\n (sanitized as Record<string, unknown>)[key] = SPACING_MAP[value];\n }\n }\n }\n\n return sanitized;\n}\n","import React, { forwardRef } from \"react\";\nimport {\n Button as MuiButton,\n type ButtonProps as MuiButtonProps,\n} from \"@mui/material\";\nimport {\n filterStylingProps,\n type RecursicaOverStyled,\n} from \"../../utils/filterStylingProps\";\nimport styles from \"./Button.module.css\";\n\nexport interface RecursicaButtonProps {\n variant?: \"solid\" | \"outline\" | \"text\";\n size?: \"default\" | \"small\";\n icon?: React.ReactNode;\n /**\n * For polymorphic support (e.g., `component=\"a\"`), native to MUI.\n */\n component?: React.ElementType;\n}\n\nexport type ButtonProps = RecursicaOverStyled<\n Omit<MuiButtonProps, \"variant\" | \"size\" | \"color\" | \"fullWidth\"> &\n RecursicaButtonProps\n>;\n\nfunction hasVisibleChildren(children: React.ReactNode): boolean {\n if (children == null || children === \"\") return false;\n if (typeof children === \"string\") return children.trim() !== \"\";\n return true;\n}\n\n/**\n * Recursica Button component wrapping MUI's Button.\n *\n * Supports polymorphism via the `component` prop for custom element rendering.\n * This is particularly useful when you need a button that behaves as a hyperlink (rendering an `<a>` tag)\n * or integrates with a routing library (e.g., `react-router-dom` or Next.js), while preserving full visual styling.\n *\n * @example\n * ```tsx\n * // Renders as an <a> tag natively\n * <Button component=\"a\" href=\"/dashboard\" target=\"_blank\">Navigate</Button>\n *\n * // Renders using a custom router link\n * <Button component={Link} to=\"/home\">Home</Button>\n * ```\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(\n {\n variant = \"solid\",\n size = \"default\",\n icon,\n children,\n overStyled = false,\n ...rest\n },\n ref,\n ) {\n const sanitizedProps = filterStylingProps(rest, overStyled);\n const restRecord = sanitizedProps as Record<string, unknown>;\n\n // Explicitly delete blocked semantic expansion dimension props that MUI uses natively\n delete restRecord[\"fullWidth\"];\n delete restRecord[\"color\"]; // Recursica handles colors internally via tokens\n\n const hasStartIcon = !!icon || !!restRecord[\"startIcon\"];\n const hasEndIcon = !!restRecord[\"endIcon\"];\n const isIconOnly =\n (hasStartIcon || hasEndIcon) && !hasVisibleChildren(children);\n\n if (\n typeof process !== \"undefined\" &&\n process.env.NODE_ENV !== \"production\" &&\n isIconOnly &&\n !restRecord[\"aria-label\"]\n ) {\n console.warn(\n '[Recursica Button] Icon-only buttons must provide an accessible name. Pass aria-label (e.g. aria-label=\"Submit\").',\n );\n }\n\n const classNameProp = restRecord.className as string | undefined;\n const finalClass = classNameProp\n ? `${styles.root} ${classNameProp}`\n : styles.root;\n\n // We don't map Recursica variant/size to MUI's because we want to completely disable MUI's native\n // variant logic (e.g., elevation, shadows) and style everything strictly through our CSS Modules.\n // However, Mui Button requires some string, but we can just leave it as standard or ignore since\n // our CSS resets its properties anyway, but to be clean we just don't pass variant to MUI.\n\n return (\n <MuiButton\n ref={ref}\n disableRipple\n disableElevation\n className={finalClass}\n startIcon={\n icon != null ? (\n <span className={styles.iconWrapper} aria-hidden>\n {icon}\n </span>\n ) : undefined\n }\n data-variant={variant}\n data-size={size}\n {...(isIconOnly ? { \"data-icon-only\": \"\" } : {})}\n {...sanitizedProps}\n >\n <span className={styles.labelText}>{children}</span>\n </MuiButton>\n );\n },\n);\n\nButton.displayName = \"Button\";\n","import React from \"react\";\n\nexport type CardProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Card: React.FC<CardProps> = (props) => {\n return <div {...props}>Card</div>;\n};\n","import React from \"react\";\n\nexport type CheckboxProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Checkbox: React.FC<CheckboxProps> = (props) => {\n return <div {...props}>Checkbox</div>;\n};\n","import React from \"react\";\n\nexport type ChipProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Chip: React.FC<ChipProps> = (props) => {\n return <div {...props}>Chip</div>;\n};\n","/**\n * Container layout wrapper.\n *\n * NOTE: As a foundational structural boundary, the Container component DOES NOT use\n * the `RecursicaOverStyled` gatekeeper. Furthermore, unlike other primitive layouts\n * (Stack, Group, Flex), Container explicitly ALLOWS the `sx` prop as an escape hatch\n * for advanced layout positioning.\n */\nimport React, { forwardRef } from \"react\";\nimport {\n Container as MUIContainer,\n type ContainerProps as MUIContainerProps,\n} from \"@mui/material\";\nimport { type RecursicaSpacing } from \"../../utils/filterStylingProps\";\n\nexport interface RecursicaContainerProps {\n children?: React.ReactNode;\n size?:\n | \"xs\"\n | \"sm\"\n | \"md\"\n | \"lg\"\n | \"xl\"\n | RecursicaSpacing\n | (string & {})\n | number;\n}\n\nexport type ContainerProps = Omit<MUIContainerProps, \"maxWidth\"> &\n RecursicaContainerProps;\n\nexport const Container = forwardRef<HTMLDivElement, ContainerProps>(\n function Container({ children, size, ...rest }, ref) {\n const mapSize: Record<string, \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"> = {\n \"rec-sm\": \"sm\",\n \"rec-default\": \"md\",\n \"rec-md\": \"md\",\n \"rec-lg\": \"lg\",\n \"rec-xl\": \"xl\",\n \"rec-2xl\": \"xl\",\n };\n\n const resolvedSize =\n typeof size === \"string\" && mapSize[size] ? mapSize[size] : size;\n\n return (\n <MUIContainer\n ref={ref}\n maxWidth={resolvedSize as MUIContainerProps[\"maxWidth\"]}\n {...rest}\n >\n {children}\n </MUIContainer>\n );\n },\n);\n\nContainer.displayName = \"Container\";\n","import React from \"react\";\n\nexport type DatePickerProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const DatePicker: React.FC<DatePickerProps> = (props) => {\n return <div {...props}>DatePicker</div>;\n};\n","import React from \"react\";\n\nexport type DropdownProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Dropdown: React.FC<DropdownProps> = (props) => {\n return <div {...props}>Dropdown</div>;\n};\n","import React from \"react\";\n\nexport type FileInputProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const FileInput: React.FC<FileInputProps> = (props) => {\n return <div {...props}>FileInput</div>;\n};\n","import React from \"react\";\n\nexport type FileUploadProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const FileUpload: React.FC<FileUploadProps> = (props) => {\n return <div {...props}>FileUpload</div>;\n};\n","/**\n * Flex layout wrapper.\n *\n * NOTE: MUI does not have a native `<Flex>` component (it relies on `<Box display=\"flex\">`\n * or `<Stack>`). To maintain API parity with the mantine-adapter and provide a consistent\n * developer experience, this component wraps MUI's Box and forces `display=\"flex\"`.\n *\n * Like Stack and Group, this is a primitive layout component. It strictly filters out the\n * `sx` prop using `OmitSx` and `filterSxProp` to enforce the use of standard layout scales.\n */\nimport React, { forwardRef } from \"react\";\nimport { Box as MUIBox, type BoxProps as MUIBoxProps } from \"@mui/material\";\nimport {\n type RecursicaSpacing,\n SPACING_MAP,\n type OmitSx,\n filterSxProp,\n} from \"../../utils/filterStylingProps\";\n\nexport interface RecursicaFlexProps {\n /**\n * Content to render inside the flex container.\n */\n children?: React.ReactNode;\n\n /**\n * The gap between flex items. Accepts standard MUI spacing or Recursica gap tokens\n * (e.g. \"rec-md\").\n */\n gap?: string | number | RecursicaSpacing;\n\n /**\n * The vertical gap between flex items when wrapping. Accepts standard MUI spacing\n * or Recursica gap tokens.\n */\n rowGap?: string | number | RecursicaSpacing;\n\n /**\n * The horizontal gap between flex items when wrapping. Accepts standard MUI spacing\n * or Recursica gap tokens.\n */\n columnGap?: string | number | RecursicaSpacing;\n}\n\nexport type FlexProps = OmitSx<MUIBoxProps & RecursicaFlexProps>;\n\nexport const Flex = forwardRef<HTMLDivElement, FlexProps>(function Flex(\n { children, gap = \"rec-default\", rowGap, columnGap, ...rest },\n ref,\n) {\n const safeProps = filterSxProp(rest as Record<string, unknown>);\n const resolvedGap =\n typeof gap === \"string\" && gap in SPACING_MAP\n ? SPACING_MAP[gap as keyof typeof SPACING_MAP]\n : gap;\n const resolvedRowGap =\n typeof rowGap === \"string\" && rowGap in SPACING_MAP\n ? SPACING_MAP[rowGap as keyof typeof SPACING_MAP]\n : rowGap;\n const resolvedColumnGap =\n typeof columnGap === \"string\" && columnGap in SPACING_MAP\n ? SPACING_MAP[columnGap as keyof typeof SPACING_MAP]\n : columnGap;\n\n return (\n <MUIBox\n ref={ref}\n display=\"flex\"\n {...safeProps}\n gap={resolvedGap}\n rowGap={resolvedRowGap}\n columnGap={resolvedColumnGap}\n >\n {children}\n </MUIBox>\n );\n});\n\nFlex.displayName = \"Flex\";\n","import React from \"react\";\n\nexport type FormControlLayoutProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const FormControlLayout: React.FC<FormControlLayoutProps> = (props) => {\n return <div {...props}>FormControlLayout</div>;\n};\n","import React from \"react\";\n\nexport type FormControlWrapperProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const FormControlWrapper: React.FC<FormControlWrapperProps> = (\n props,\n) => {\n return <div {...props}>FormControlWrapper</div>;\n};\n","import React, { forwardRef } from \"react\";\nimport {\n Stack as MUIStack,\n type StackProps as MUIStackProps,\n} from \"@mui/material\";\nimport {\n type RecursicaSpacing,\n SPACING_MAP,\n type OmitSx,\n filterSxProp,\n} from \"../../utils/filterStylingProps\";\n\nexport interface RecursicaGroupProps {\n children?: React.ReactNode;\n gap?: MUIStackProps[\"spacing\"] | RecursicaSpacing;\n rowGap?: MUIStackProps[\"spacing\"] | RecursicaSpacing;\n columnGap?: MUIStackProps[\"spacing\"] | RecursicaSpacing;\n}\n\nexport type GroupProps = OmitSx<\n Omit<MUIStackProps, \"spacing\" | \"direction\"> & RecursicaGroupProps\n>;\n\nexport const Group = forwardRef<HTMLDivElement, GroupProps>(function Group(\n { children, gap = \"rec-default\", rowGap, columnGap, ...rest },\n ref,\n) {\n const safeProps = filterSxProp(rest as Record<string, unknown>);\n const resolvedGap =\n typeof gap === \"string\" && gap in SPACING_MAP\n ? SPACING_MAP[gap as keyof typeof SPACING_MAP]\n : gap;\n const resolvedRowGap =\n typeof rowGap === \"string\" && rowGap in SPACING_MAP\n ? SPACING_MAP[rowGap as keyof typeof SPACING_MAP]\n : rowGap;\n const resolvedColumnGap =\n typeof columnGap === \"string\" && columnGap in SPACING_MAP\n ? SPACING_MAP[columnGap as keyof typeof SPACING_MAP]\n : columnGap;\n\n return (\n <MUIStack\n ref={ref}\n direction=\"row\"\n flexWrap=\"wrap\"\n spacing={resolvedGap}\n sx={{\n ...(resolvedRowGap ? { rowGap: resolvedRowGap } : {}),\n ...(resolvedColumnGap ? { columnGap: resolvedColumnGap } : {}),\n }}\n {...safeProps}\n >\n {children}\n </MUIStack>\n );\n});\n\nGroup.displayName = \"Group\";\n","import React from \"react\";\n\nexport type HoverCardProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const HoverCard: React.FC<HoverCardProps> = (props) => {\n return <div {...props}>HoverCard</div>;\n};\n","import React from \"react\";\n\nexport type LabelProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Label: React.FC<LabelProps> = (props) => {\n return <div {...props}>Label</div>;\n};\n","import React, { forwardRef } from \"react\";\nimport { Link as MUILink, type LinkProps as MUILinkProps } from \"@mui/material\";\nimport {\n filterStylingProps,\n type RecursicaOverStyled,\n} from \"../../utils/filterStylingProps\";\nimport styles from \"./Link.module.css\";\n\nexport interface RecursicaLinkProps {\n icon?: React.ReactNode;\n children?: React.ReactNode;\n component?: React.ElementType;\n}\n\nexport type LinkProps = RecursicaOverStyled<\n Omit<MUILinkProps, \"underline\"> & RecursicaLinkProps\n>;\n\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(function Link(\n { icon, children, overStyled = false, ...rest },\n ref,\n) {\n const sanitizedProps = filterStylingProps(rest, overStyled);\n const restRecord = sanitizedProps as Record<string, unknown>;\n\n const classNameProp = restRecord.className as string | undefined;\n const finalClass = classNameProp\n ? `${styles.root} ${classNameProp}`\n : styles.root;\n\n return (\n <MUILink\n ref={ref}\n className={finalClass}\n underline=\"none\"\n {...(icon ? { \"data-has-icon\": \"\" } : {})}\n {...sanitizedProps}\n >\n {icon && (\n <span className={styles.iconWrapper} aria-hidden>\n {icon}\n </span>\n )}\n <span className={styles.labelText}>{children}</span>\n </MUILink>\n );\n});\n\nLink.displayName = \"Link\";\n","import React from \"react\";\n\nexport type LoaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Loader: React.FC<LoaderProps> = (props) => {\n return <div {...props}>Loader</div>;\n};\n","import React from \"react\";\n\nexport type MenuProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Menu: React.FC<MenuProps> = (props) => {\n return <div {...props}>Menu</div>;\n};\n","import React from \"react\";\n\nexport type ModalProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Modal: React.FC<ModalProps> = (props) => {\n return <div {...props}>Modal</div>;\n};\n","import React from \"react\";\n\nexport type NumberInputProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const NumberInput: React.FC<NumberInputProps> = (props) => {\n return <div {...props}>NumberInput</div>;\n};\n","import React from \"react\";\n\nexport type PaginationProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Pagination: React.FC<PaginationProps> = (props) => {\n return <div {...props}>Pagination</div>;\n};\n","import React from \"react\";\n\nexport type PanelProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Panel: React.FC<PanelProps> = (props) => {\n return <div {...props}>Panel</div>;\n};\n","import React from \"react\";\n\nexport type RadioProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Radio: React.FC<RadioProps> = (props) => {\n return <div {...props}>Radio</div>;\n};\n","import React from \"react\";\n\nexport type ReadOnlyFieldProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const ReadOnlyField: React.FC<ReadOnlyFieldProps> = (props) => {\n return <div {...props}>ReadOnlyField</div>;\n};\n","import React from \"react\";\n\nexport type SegmentedControlProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const SegmentedControl: React.FC<SegmentedControlProps> = (props) => {\n return <div {...props}>SegmentedControl</div>;\n};\n","import React from \"react\";\n\nexport type SliderProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Slider: React.FC<SliderProps> = (props) => {\n return <div {...props}>Slider</div>;\n};\n","import React, { forwardRef } from \"react\";\nimport {\n Stack as MUIStack,\n type StackProps as MUIStackProps,\n} from \"@mui/material\";\nimport {\n type RecursicaSpacing,\n SPACING_MAP,\n type OmitSx,\n filterSxProp,\n} from \"../../utils/filterStylingProps\";\n\nexport interface RecursicaStackProps {\n children?: React.ReactNode;\n gap?: MUIStackProps[\"spacing\"] | RecursicaSpacing;\n}\n\nexport type StackProps = OmitSx<\n Omit<MUIStackProps, \"spacing\"> & RecursicaStackProps\n>;\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(function Stack(\n { children, gap = \"rec-default\", ...rest },\n ref,\n) {\n const safeProps = filterSxProp(rest as Record<string, unknown>);\n const resolvedGap =\n typeof gap === \"string\" && gap in SPACING_MAP\n ? SPACING_MAP[gap as keyof typeof SPACING_MAP]\n : gap;\n\n return (\n <MUIStack ref={ref} spacing={resolvedGap} {...safeProps}>\n {children}\n </MUIStack>\n );\n});\n\nStack.displayName = \"Stack\";\n","import React from \"react\";\n\nexport type StepperProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Stepper: React.FC<StepperProps> = (props) => {\n return <div {...props}>Stepper</div>;\n};\n","import React from \"react\";\n\nexport type SwitchProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Switch: React.FC<SwitchProps> = (props) => {\n return <div {...props}>Switch</div>;\n};\n","import React from \"react\";\n\nexport type TableProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Table: React.FC<TableProps> = (props) => {\n return <div {...props}>Table</div>;\n};\n","import React from \"react\";\n\nexport type TabsProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Tabs: React.FC<TabsProps> = (props) => {\n return <div {...props}>Tabs</div>;\n};\n","import React, { forwardRef } from \"react\";\nimport {\n Typography as MuiTypography,\n type TypographyProps as MuiTypographyProps,\n} from \"@mui/material\";\nimport {\n filterStylingProps,\n type RecursicaOverStyled,\n} from \"../../utils/filterStylingProps\";\n\nexport type TypographyProps = RecursicaOverStyled<\n Omit<MuiTypographyProps, \"variant\"> & {\n /**\n * Internal typography class mapping\n */\n typographyClass: string;\n component?: React.ElementType;\n }\n>;\n\nexport const Typography = forwardRef<HTMLElement, TypographyProps>(\n function Typography({ typographyClass, overStyled = false, ...rest }, ref) {\n const sanitizedProps = filterStylingProps(rest, overStyled);\n const restRecord = sanitizedProps as Record<string, unknown>;\n\n const classNameProp = restRecord.className as string | undefined;\n const finalClass = classNameProp\n ? `${typographyClass} ${classNameProp}`\n : typographyClass;\n\n return (\n <MuiTypography\n ref={ref}\n className={finalClass}\n variant=\"inherit\"\n {...sanitizedProps}\n />\n );\n },\n);\n\nTypography.displayName = \"Typography\";\n","import React, { forwardRef } from \"react\";\nimport { Typography } from \"../Typography/Typography\";\nimport { type RecursicaOverStyled } from \"../../utils/filterStylingProps\";\nimport { type TypographyProps as MuiTypographyProps } from \"@mui/material\";\n\nexport type TextVariant =\n | \"body\"\n | \"body-small\"\n | \"caption\"\n | \"overline\"\n | \"subtitle\"\n | \"subtitle-small\";\n\nexport type RecursicaTextProps = Omit<MuiTypographyProps, \"variant\"> & {\n variant?: TextVariant;\n children?: React.ReactNode;\n component?: React.ElementType;\n};\n\nexport type TextProps = RecursicaOverStyled<RecursicaTextProps>;\n\nexport const Text = forwardRef<HTMLElement, TextProps>(function Text(\n { variant = \"body\", ...rest },\n ref,\n) {\n const typographyClass = `recursica_brand_typography_${variant}`;\n return <Typography ref={ref} typographyClass={typographyClass} {...rest} />;\n});\n\nText.displayName = \"Text\";\n","import React from \"react\";\n\nexport type TextAreaProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const TextArea: React.FC<TextAreaProps> = (props) => {\n return <div {...props}>TextArea</div>;\n};\n","import React from \"react\";\n\nexport type TextFieldProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const TextField: React.FC<TextFieldProps> = (props) => {\n return <div {...props}>TextField</div>;\n};\n","import React from \"react\";\n\nexport type TimePickerProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const TimePicker: React.FC<TimePickerProps> = (props) => {\n return <div {...props}>TimePicker</div>;\n};\n","import React from \"react\";\n\nexport type TimelineProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Timeline: React.FC<TimelineProps> = (props) => {\n return <div {...props}>Timeline</div>;\n};\n","import React, { forwardRef } from \"react\";\nimport { Typography } from \"../Typography/Typography\";\nimport { type RecursicaOverStyled } from \"../../utils/filterStylingProps\";\nimport { type TypographyProps as MuiTypographyProps } from \"@mui/material\";\n\nexport type RecursicaTitleProps = Omit<MuiTypographyProps, \"variant\"> & {\n order?: 1 | 2 | 3 | 4 | 5 | 6;\n children?: React.ReactNode;\n component?: React.ElementType;\n};\n\nexport type TitleProps = RecursicaOverStyled<RecursicaTitleProps>;\n\nexport const Title = forwardRef<HTMLElement, TitleProps>(function Title(\n { order = 1, component, ...rest },\n ref,\n) {\n const typographyClass = `recursica_brand_typography_h${order}`;\n const defaultComponent = `h${order}` as React.ElementType;\n\n return (\n <Typography\n ref={ref}\n typographyClass={typographyClass}\n component={component || defaultComponent}\n {...rest}\n />\n );\n});\n\nTitle.displayName = \"Title\";\n","import React from \"react\";\n\nexport type ToastProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Toast: React.FC<ToastProps> = (props) => {\n return <div {...props}>Toast</div>;\n};\n","import React from \"react\";\n\nexport type TooltipProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Tooltip: React.FC<TooltipProps> = (props) => {\n return <div {...props}>Tooltip</div>;\n};\n","import React from \"react\";\n\nexport type TransferListProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const TransferList: React.FC<TransferListProps> = (props) => {\n return <div {...props}>TransferList</div>;\n};\n","import { jsx as c, Fragment as f } from \"react/jsx-runtime\";\nimport h, { forwardRef as l, useEffect as p } from \"react\";\nconst E = \"_root_1qhn7_3\", _ = \"_contents_1qhn7_18\", r = {\n root: E,\n contents: _\n}, $ = l(function({ layer: o, contentsOnly: e, children: i, className: n, style: u, ...m }, d) {\n const y = e ? n ? `${r.root} ${r.contents} ${n}` : `${r.root} ${r.contents}` : n ? `${r.root} ${n}` : r.root;\n return /* @__PURE__ */ c(\n \"div\",\n {\n ref: d,\n className: y,\n style: u,\n ...e ? {} : { \"data-recursica-layer\": String(o) },\n ...m,\n children: i\n }\n );\n});\n$.displayName = \"Layer\";\nconst a = ({ emptyText: t = \"N/A\" }) => /* @__PURE__ */ c(h.Fragment, { children: t });\na.displayName = \"EmptyValueRenderer\";\na.check = (t) => t == null || t === \"\" || Array.isArray(t) && t.length === 0;\nconst s = \"data-recursica-theme\";\nfunction g({\n children: t,\n theme: o = \"light\"\n}) {\n return p(() => {\n const e = document.documentElement;\n return e.setAttribute(s, o), () => {\n e.removeAttribute(s);\n };\n }, [o]), /* @__PURE__ */ c(f, { children: t });\n}\nexport {\n a as EmptyValueRenderer,\n $ as Layer,\n g as RecursicaThemeProvider\n};\n//# sourceMappingURL=adapter-common.js.map\n"],"names":["Accordion","props","jsx","AssistiveElement","Avatar","Badge","Box","forwardRef","ref","MUIBox","Breadcrumb","BLOCKED_STYLING_KEYS","LAYOUT_PROPS","SPACING_MAP","filterSxProp","sanitized","filterStylingProps","overStyled","prop","key","value","hasVisibleChildren","children","Button","variant","size","icon","rest","sanitizedProps","restRecord","hasStartIcon","hasEndIcon","isIconOnly","classNameProp","finalClass","styles","MuiButton","Card","Checkbox","Chip","Container","mapSize","resolvedSize","MUIContainer","DatePicker","Dropdown","FileInput","FileUpload","Flex","gap","rowGap","columnGap","safeProps","resolvedGap","resolvedRowGap","resolvedColumnGap","FormControlLayout","FormControlWrapper","Group","MUIStack","HoverCard","Label","Link","jsxs","MUILink","Loader","Menu","Modal","NumberInput","Pagination","Panel","Radio","ReadOnlyField","SegmentedControl","Slider","Stack","Stepper","Switch","Table","Tabs","Typography","typographyClass","MuiTypography","Text","TextArea","TextField","TimePicker","Timeline","Title","order","component","defaultComponent","Toast","Tooltip","TransferList","E","_","r","$","l","o","e","i","n","u","m","d","y","c","a","t","h","s","g","p","f"],"mappings":";;;AAIO,MAAMA,KAAsC,CAACC,MAC3C,gBAAAC,EAAC,OAAA,EAAK,GAAGD,GAAO,UAAA,aAAS,GCDrBE,KAAoD,CAACF,MACzD,gBAAAC,EAAC,OAAA,EAAK,GAAGD,GAAO,UAAA,oBAAgB,GCD5BG,KAAgC,CAACH,MACrC,gBAAAC,EAAC,OAAA,EAAK,GAAGD,GAAO,UAAA,UAAM,GCDlBI,KAA8B,CAACJ,MACnC,gBAAAC,EAAC,OAAA,EAAK,GAAGD,GAAO,UAA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MAC/C,GAAGK;AAAA,MACH,UAAUH;AAAA,IAChB;AAAA,EACA;AACA,CAAC;AACDJ,GAAE,cAAc;AACX,MAACW,IAAI,CAAC,EAAE,WAAWC,IAAI,MAAK,MAAuBF,gBAAAA,EAAEG,EAAE,UAAU,EAAE,UAAUD,EAAC,CAAE;AACrFD,EAAE,cAAc;AAChBA,EAAE,QAAQ,CAACC,MAAMA,KAAK,QAAQA,MAAM,MAAM,MAAM,QAAQA,CAAC,KAAKA,EAAE,WAAW;AAC3E,MAAME,IAAI;AACV,SAASC,GAAE;AAAA,EACT,UAAUH;AAAA,EACV,OAAO,IAAI;AACb,GAAG;AACD,SAAOI,EAAE,MAAM;AACb,UAAMb,IAAI,SAAS;AACnB,WAAOA,EAAE,aAAaW,GAAG,CAAC,GAAG,MAAM;AACjC,MAAAX,EAAE,gBAAgBW,CAAC;AAAA,IACrB;AAAA,EACF,GAAG,CAAC,CAAC,CAAC,GAAmBJ,gBAAAA,EAAEO,GAAG,EAAE,UAAUL,GAAG;AAC/C;"}
1
+ {"version":3,"file":"mui-adapter.js","sources":["../src/components/Accordion/Accordion.tsx","../src/components/AssistiveElement/AssistiveElement.tsx","../src/components/Avatar/Avatar.tsx","../src/components/Badge/Badge.tsx","../src/components/Box/Box.tsx","../src/components/Breadcrumb/Breadcrumb.tsx","../src/utils/filterStylingProps.ts","../src/components/Loader/Loader.tsx","../src/components/Button/Button.tsx","../src/components/Card/Card.tsx","../src/components/Checkbox/Checkbox.tsx","../src/components/Chip/Chip.tsx","../src/components/Container/Container.tsx","../src/components/DatePicker/DatePicker.tsx","../src/components/Dropdown/Dropdown.tsx","../src/components/FileInput/FileInput.tsx","../src/components/FileUpload/FileUpload.tsx","../src/components/Flex/Flex.tsx","../src/components/FormControlLayout/FormControlLayout.tsx","../src/components/FormControlWrapper/FormControlWrapper.tsx","../src/components/Group/Group.tsx","../src/components/HoverCard/HoverCard.tsx","../src/components/Label/Label.tsx","../src/components/Link/Link.tsx","../src/components/Menu/Menu.tsx","../src/components/Modal/Modal.tsx","../src/components/NumberInput/NumberInput.tsx","../src/components/Pagination/Pagination.tsx","../src/components/Panel/Panel.tsx","../src/components/Radio/Radio.tsx","../src/components/ReadOnlyField/ReadOnlyField.tsx","../src/components/SegmentedControl/SegmentedControl.tsx","../src/components/Slider/Slider.tsx","../src/components/Stack/Stack.tsx","../src/components/Stepper/Stepper.tsx","../src/components/Switch/Switch.tsx","../src/components/Table/Table.tsx","../src/components/Tabs/Tabs.tsx","../src/components/Typography/Typography.tsx","../src/components/Text/Text.tsx","../src/components/TextArea/TextArea.tsx","../src/components/TextField/TextField.tsx","../src/components/TimePicker/TimePicker.tsx","../src/components/Timeline/Timeline.tsx","../src/components/Title/Title.tsx","../src/components/Toast/Toast.tsx","../src/components/Tooltip/Tooltip.tsx","../src/components/TransferList/TransferList.tsx","../../adapter-common/dist/adapter-common.js"],"sourcesContent":["import React from \"react\";\n\nexport type AccordionProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Accordion: React.FC<AccordionProps> = (props) => {\n return <div {...props}>Accordion</div>;\n};\n","import React from \"react\";\n\nexport type AssistiveElementProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const AssistiveElement: React.FC<AssistiveElementProps> = (props) => {\n return <div {...props}>AssistiveElement</div>;\n};\n","import React from \"react\";\n\nexport type AvatarProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Avatar: React.FC<AvatarProps> = (props) => {\n return <div {...props}>Avatar</div>;\n};\n","import React from \"react\";\n\nexport type BadgeProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Badge: React.FC<BadgeProps> = (props) => {\n return <div {...props}>Badge</div>;\n};\n","/**\n * Box layout wrapper.\n *\n * NOTE: Box is the lowest-level primitive layout component. It explicitly ALLOWS\n * the `sx` prop as an escape hatch. It does not use the strict RecursicaOverStyled gatekeeper\n * or any style stripping utilities.\n */\nimport React, { forwardRef } from \"react\";\nimport { Box as MUIBox, type BoxProps as MUIBoxProps } from \"@mui/material\";\n\nexport type BoxProps<C extends React.ElementType = \"div\"> = MUIBoxProps<\n C,\n { component?: C }\n>;\n\nexport const Box = forwardRef(function Box<C extends React.ElementType = \"div\">(\n props: BoxProps<C>,\n ref: React.Ref<Element>,\n) {\n return <MUIBox ref={ref} {...props} />;\n}) as <C extends React.ElementType = \"div\">(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: BoxProps<C> & { ref?: React.ForwardedRef<any> },\n) => React.ReactElement | null;\n","import React from \"react\";\n\nexport type BreadcrumbProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Breadcrumb: React.FC<BreadcrumbProps> = (props) => {\n return <div {...props}>Breadcrumb</div>;\n};\n","/**\n * filterStylingProps\n *\n * This utility acts as the central gatekeeper for strict design-system adherence across\n * all Recursica components mapped over MUI.\n *\n * PHILOSOPHY:\n * Recursica components are designed to be explicitly sandboxed tokens. Allowing external\n * `className` or MUI style props (`sx`, `classes`, etc.) breaks the design system by\n * allowing developers to leak arbitrary designs into components.\n *\n * By default (`overStyled=false`), this utility actively prevents developers from overriding\n * internal component styles (such as background, colors, typography, or internal classes).\n * It safely *permits* external layout overrides (like `margin` / `m`) so that components can\n * easily be spaced alongside other DOM elements.\n *\n * If a developer passes `overStyled={true}`, this filter allows all styling properties to\n * flow through to the underlying MUI component natively, at the developer's own risk.\n *\n * @param props - The raw component props passed down to the wrapper\n * @param overStyled - Boolean toggle to allow raw external styling. Defaults to false.\n * @returns Sanitized component props safe for internal styling merging\n */\n\nexport const BLOCKED_STYLING_KEYS = [\n \"className\",\n \"classes\", // MUI specific nested class overrides\n \"style\",\n \"sx\", // MUI's primary system style prop\n\n // Potential Box/Typography system props to block (if we wrap those)\n \"color\",\n \"bgcolor\",\n \"backgroundColor\",\n \"typography\",\n \"fontFamily\",\n \"fontSize\",\n \"fontWeight\",\n \"lineHeight\",\n \"letterSpacing\",\n \"textAlign\",\n \"border\",\n \"borderTop\",\n \"borderBottom\",\n \"borderLeft\",\n \"borderRight\",\n \"borderColor\",\n \"borderRadius\",\n \"boxShadow\",\n \"display\",\n \"position\",\n \"zIndex\",\n] as const;\n\nexport type BlockedStylingKeys = (typeof BLOCKED_STYLING_KEYS)[number];\n\nexport type RecursicaSpacing =\n | \"rec-none\"\n | \"rec-sm\"\n | \"rec-default\"\n | \"rec-md\"\n | \"rec-lg\"\n | \"rec-xl\"\n | \"rec-2xl\";\n\nexport type RecursicaSize = \"small\" | \"default\" | \"large\";\n\nconst LAYOUT_PROPS = new Set([\n \"m\",\n \"my\",\n \"mx\",\n \"mt\",\n \"mb\",\n \"ml\",\n \"mr\",\n \"p\",\n \"py\",\n \"px\",\n \"pt\",\n \"pb\",\n \"pl\",\n \"pr\",\n \"gap\",\n \"rowGap\",\n \"columnGap\",\n \"top\",\n \"left\",\n \"bottom\",\n \"right\",\n]);\n\nexport const SPACING_MAP: Record<string, string> = {\n \"rec-none\": \"var(--recursica_brand_dimensions_general_none)\",\n \"rec-sm\": \"var(--recursica_brand_dimensions_general_sm)\",\n \"rec-default\": \"var(--recursica_brand_dimensions_general_default)\",\n \"rec-md\": \"var(--recursica_brand_dimensions_general_md)\",\n \"rec-lg\": \"var(--recursica_brand_dimensions_general_lg)\",\n \"rec-xl\": \"var(--recursica_brand_dimensions_general_xl)\",\n \"rec-2xl\": \"var(--recursica_brand_dimensions_general_2xl)\",\n};\n\nexport type ForbiddenStyles = { [K in BlockedStylingKeys]?: never };\n\nexport type OmitSx<T> = Omit<T, \"sx\">;\n\nexport function filterSxProp<T extends Record<string, unknown>>(\n props: T,\n): Omit<T, \"sx\"> {\n const sanitized = { ...props };\n if (\"sx\" in sanitized) {\n delete sanitized[\"sx\"];\n }\n return sanitized as Omit<T, \"sx\">;\n}\n\nexport type RecursicaOverStyled<T> =\n | (Omit<T, BlockedStylingKeys> &\n ForbiddenStyles & { overStyled?: false | undefined })\n | (T & { overStyled: true });\n\nexport function filterStylingProps<T extends Record<string, unknown>>(\n props: T,\n overStyled?: boolean,\n): Partial<T> {\n if (overStyled) {\n return props;\n }\n\n const sanitized = { ...props };\n\n for (const prop of BLOCKED_STYLING_KEYS) {\n if (prop in sanitized) {\n delete sanitized[prop];\n }\n }\n\n // Intercept Recursica spacing tokens for valid layout properties\n for (const [key, value] of Object.entries(sanitized)) {\n if (\n typeof value === \"string\" &&\n value.startsWith(\"rec-\") &&\n LAYOUT_PROPS.has(key)\n ) {\n if (value in SPACING_MAP) {\n (sanitized as Record<string, unknown>)[key] = SPACING_MAP[value];\n }\n }\n }\n\n return sanitized;\n}\n","import React, { forwardRef } from \"react\";\nimport {\n filterStylingProps,\n type RecursicaOverStyled,\n type RecursicaSize,\n} from \"../../utils/filterStylingProps\";\nimport styles from \"./Loader.module.css\";\n\nexport interface RecursicaLoaderProps {\n /** Map to the component styles defined in variables */\n variant?: \"oval\" | \"bars\" | \"dots\";\n /** Map to Recursica sizes */\n size?: \"sm\" | \"md\" | \"lg\" | RecursicaSize;\n}\n\nexport type LoaderProps = RecursicaOverStyled<\n React.HTMLAttributes<HTMLSpanElement> & RecursicaLoaderProps\n>;\n\nexport const Loader = forwardRef<HTMLSpanElement, LoaderProps>(function Loader(\n { variant = \"oval\", size = \"default\", overStyled = false, ...rest },\n ref,\n) {\n const mapSize = {\n sm: \"small\",\n md: \"default\",\n lg: \"large\",\n small: \"small\",\n default: \"default\",\n large: \"large\",\n } as const;\n\n const resolvedSize = mapSize[size] || \"default\";\n\n // Strip all visual override injections unless developer has specifically opted into overStyling.\n // External layout props like margins are safely preserved.\n const sanitizedProps = filterStylingProps(rest, overStyled);\n\n const classNameProp = (sanitizedProps as Record<string, unknown>)\n .className as string | undefined;\n const finalClass = classNameProp\n ? `${styles.root} ${classNameProp}`\n : styles.root;\n\n const renderChildren = () => {\n if (variant === \"bars\" || variant === \"dots\") {\n return (\n <>\n <span />\n <span />\n <span />\n </>\n );\n }\n return null; // Oval is handled purely via CSS ::after\n };\n\n return (\n <span\n ref={ref}\n data-variant={variant}\n data-size={resolvedSize}\n {...sanitizedProps}\n className={finalClass}\n >\n {renderChildren()}\n </span>\n );\n});\n\nLoader.displayName = \"Loader\";\n","import React, { forwardRef } from \"react\";\nimport { Loader } from \"../Loader/Loader\";\nimport type { RecursicaLoaderProps } from \"../Loader/Loader\";\nimport {\n Button as MuiButton,\n type ButtonProps as MuiButtonProps,\n} from \"@mui/material\";\nimport {\n filterStylingProps,\n type RecursicaOverStyled,\n} from \"../../utils/filterStylingProps\";\nimport styles from \"./Button.module.css\";\n\nexport interface RecursicaButtonProps {\n variant?: \"solid\" | \"outline\" | \"text\";\n size?: \"default\" | \"small\";\n icon?: React.ReactNode;\n /**\n * For polymorphic support (e.g., `component=\"a\"`), native to MUI.\n */\n component?: React.ElementType;\n /** Which Recursica Loader variant to use */\n loaderVariant?: RecursicaLoaderProps[\"variant\"];\n /** The size variant for the loader */\n loaderSize?: RecursicaLoaderProps[\"size\"];\n /** Whether to use the Recursica loader or fallback to the Mantine loader */\n useRecursicaLoader?: boolean;\n}\n\nexport type ButtonProps = RecursicaOverStyled<\n Omit<MuiButtonProps, \"variant\" | \"size\" | \"color\" | \"fullWidth\"> &\n RecursicaButtonProps\n>;\n\nfunction hasVisibleChildren(children: React.ReactNode): boolean {\n if (children == null || children === \"\") return false;\n if (typeof children === \"string\") return children.trim() !== \"\";\n return true;\n}\n\n/**\n * Recursica Button component wrapping MUI's Button.\n *\n * Supports polymorphism via the `component` prop for custom element rendering.\n * This is particularly useful when you need a button that behaves as a hyperlink (rendering an `<a>` tag)\n * or integrates with a routing library (e.g., `react-router-dom` or Next.js), while preserving full visual styling.\n *\n * @example\n * ```tsx\n * // Renders as an <a> tag natively\n * <Button component=\"a\" href=\"/dashboard\" target=\"_blank\">Navigate</Button>\n *\n * // Renders using a custom router link\n * <Button component={Link} to=\"/home\">Home</Button>\n * ```\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(\n {\n variant = \"solid\",\n size = \"default\",\n icon,\n children,\n overStyled = false,\n loaderVariant = \"oval\",\n loaderSize,\n useRecursicaLoader = true,\n ...rest\n },\n ref,\n ) {\n const sanitizedProps = filterStylingProps(rest, overStyled);\n const restRecord = sanitizedProps as Record<string, unknown>;\n\n // Explicitly delete blocked semantic expansion dimension props that MUI uses natively\n delete restRecord[\"fullWidth\"];\n delete restRecord[\"color\"]; // Recursica handles colors internally via tokens\n\n const hasStartIcon = !!icon || !!restRecord[\"startIcon\"];\n const hasEndIcon = !!restRecord[\"endIcon\"];\n const isIconOnly =\n (hasStartIcon || hasEndIcon) && !hasVisibleChildren(children);\n\n if (\n typeof process !== \"undefined\" &&\n process.env.NODE_ENV !== \"production\" &&\n isIconOnly &&\n !restRecord[\"aria-label\"]\n ) {\n console.warn(\n '[Recursica Button] Icon-only buttons must provide an accessible name. Pass aria-label (e.g. aria-label=\"Submit\").',\n );\n }\n\n const classNameProp = restRecord.className as string | undefined;\n const finalClass = classNameProp\n ? `${styles.root} ${classNameProp}`\n : styles.root;\n\n // We don't map Recursica variant/size to MUI's because we want to completely disable MUI's native\n // variant logic (e.g., elevation, shadows) and style everything strictly through our CSS Modules.\n // However, Mui Button requires some string, but we can just leave it as standard or ignore since\n // our CSS resets its properties anyway, but to be clean we just don't pass variant to MUI.\n\n const resolvedLoaderSize =\n loaderSize ?? (size === \"small\" ? \"small\" : \"default\");\n\n let loadingIndicator = restRecord.loadingIndicator as React.ReactNode;\n if (useRecursicaLoader) {\n loadingIndicator = (\n <Loader variant={loaderVariant} size={resolvedLoaderSize} />\n );\n }\n\n return (\n <MuiButton\n ref={ref}\n disableRipple\n disableElevation\n className={finalClass}\n loading={!!restRecord.loading}\n loadingIndicator={loadingIndicator}\n startIcon={\n icon != null ? (\n <span className={styles.iconWrapper} aria-hidden>\n {icon}\n </span>\n ) : undefined\n }\n data-variant={variant}\n data-size={size}\n {...(isIconOnly ? { \"data-icon-only\": \"\" } : {})}\n {...(restRecord.loading ? { \"data-loading\": \"true\" } : {})}\n {...sanitizedProps}\n disabled={!!restRecord.disabled || !!restRecord.loading}\n >\n <span className={styles.labelText}>{children}</span>\n </MuiButton>\n );\n },\n);\n\nButton.displayName = \"Button\";\n","import React from \"react\";\n\nexport type CardProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Card: React.FC<CardProps> = (props) => {\n return <div {...props}>Card</div>;\n};\n","import React from \"react\";\n\nexport type CheckboxProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Checkbox: React.FC<CheckboxProps> = (props) => {\n return <div {...props}>Checkbox</div>;\n};\n","import React from \"react\";\n\nexport type ChipProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Chip: React.FC<ChipProps> = (props) => {\n return <div {...props}>Chip</div>;\n};\n","/**\n * Container layout wrapper.\n *\n * NOTE: As a foundational structural boundary, the Container component DOES NOT use\n * the `RecursicaOverStyled` gatekeeper. Furthermore, unlike other primitive layouts\n * (Stack, Group, Flex), Container explicitly ALLOWS the `sx` prop as an escape hatch\n * for advanced layout positioning.\n */\nimport React, { forwardRef } from \"react\";\nimport {\n Container as MUIContainer,\n type ContainerProps as MUIContainerProps,\n} from \"@mui/material\";\nimport { type RecursicaSpacing } from \"../../utils/filterStylingProps\";\n\nexport interface RecursicaContainerProps {\n children?: React.ReactNode;\n size?:\n | \"xs\"\n | \"sm\"\n | \"md\"\n | \"lg\"\n | \"xl\"\n | RecursicaSpacing\n | (string & {})\n | number;\n}\n\nexport type ContainerProps = Omit<MUIContainerProps, \"maxWidth\"> &\n RecursicaContainerProps;\n\nexport const Container = forwardRef<HTMLDivElement, ContainerProps>(\n function Container({ children, size, ...rest }, ref) {\n const mapSize: Record<string, \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"> = {\n \"rec-sm\": \"sm\",\n \"rec-default\": \"md\",\n \"rec-md\": \"md\",\n \"rec-lg\": \"lg\",\n \"rec-xl\": \"xl\",\n \"rec-2xl\": \"xl\",\n };\n\n const resolvedSize =\n typeof size === \"string\" && mapSize[size] ? mapSize[size] : size;\n\n return (\n <MUIContainer\n ref={ref}\n maxWidth={resolvedSize as MUIContainerProps[\"maxWidth\"]}\n {...rest}\n >\n {children}\n </MUIContainer>\n );\n },\n);\n\nContainer.displayName = \"Container\";\n","import React from \"react\";\n\nexport type DatePickerProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const DatePicker: React.FC<DatePickerProps> = (props) => {\n return <div {...props}>DatePicker</div>;\n};\n","import React from \"react\";\n\nexport type DropdownProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Dropdown: React.FC<DropdownProps> = (props) => {\n return <div {...props}>Dropdown</div>;\n};\n","import React from \"react\";\n\nexport type FileInputProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const FileInput: React.FC<FileInputProps> = (props) => {\n return <div {...props}>FileInput</div>;\n};\n","import React from \"react\";\n\nexport type FileUploadProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const FileUpload: React.FC<FileUploadProps> = (props) => {\n return <div {...props}>FileUpload</div>;\n};\n","/**\n * Flex layout wrapper.\n *\n * NOTE: MUI does not have a native `<Flex>` component (it relies on `<Box display=\"flex\">`\n * or `<Stack>`). To maintain API parity with the mantine-adapter and provide a consistent\n * developer experience, this component wraps MUI's Box and forces `display=\"flex\"`.\n *\n * Like Stack and Group, this is a primitive layout component. It strictly filters out the\n * `sx` prop using `OmitSx` and `filterSxProp` to enforce the use of standard layout scales.\n */\nimport React, { forwardRef } from \"react\";\nimport { Box as MUIBox, type BoxProps as MUIBoxProps } from \"@mui/material\";\nimport {\n type RecursicaSpacing,\n SPACING_MAP,\n type OmitSx,\n filterSxProp,\n} from \"../../utils/filterStylingProps\";\n\nexport interface RecursicaFlexProps {\n /**\n * Content to render inside the flex container.\n */\n children?: React.ReactNode;\n\n /**\n * The gap between flex items. Accepts standard MUI spacing or Recursica gap tokens\n * (e.g. \"rec-md\").\n */\n gap?: string | number | RecursicaSpacing;\n\n /**\n * The vertical gap between flex items when wrapping. Accepts standard MUI spacing\n * or Recursica gap tokens.\n */\n rowGap?: string | number | RecursicaSpacing;\n\n /**\n * The horizontal gap between flex items when wrapping. Accepts standard MUI spacing\n * or Recursica gap tokens.\n */\n columnGap?: string | number | RecursicaSpacing;\n}\n\nexport type FlexProps = OmitSx<MUIBoxProps & RecursicaFlexProps>;\n\nexport const Flex = forwardRef<HTMLDivElement, FlexProps>(function Flex(\n { children, gap = \"rec-default\", rowGap, columnGap, ...rest },\n ref,\n) {\n const safeProps = filterSxProp(rest as Record<string, unknown>);\n const resolvedGap =\n typeof gap === \"string\" && gap in SPACING_MAP\n ? SPACING_MAP[gap as keyof typeof SPACING_MAP]\n : gap;\n const resolvedRowGap =\n typeof rowGap === \"string\" && rowGap in SPACING_MAP\n ? SPACING_MAP[rowGap as keyof typeof SPACING_MAP]\n : rowGap;\n const resolvedColumnGap =\n typeof columnGap === \"string\" && columnGap in SPACING_MAP\n ? SPACING_MAP[columnGap as keyof typeof SPACING_MAP]\n : columnGap;\n\n return (\n <MUIBox\n ref={ref}\n display=\"flex\"\n {...safeProps}\n gap={resolvedGap}\n rowGap={resolvedRowGap}\n columnGap={resolvedColumnGap}\n >\n {children}\n </MUIBox>\n );\n});\n\nFlex.displayName = \"Flex\";\n","import React from \"react\";\n\nexport type FormControlLayoutProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const FormControlLayout: React.FC<FormControlLayoutProps> = (props) => {\n return <div {...props}>FormControlLayout</div>;\n};\n","import React from \"react\";\n\nexport type FormControlWrapperProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const FormControlWrapper: React.FC<FormControlWrapperProps> = (\n props,\n) => {\n return <div {...props}>FormControlWrapper</div>;\n};\n","import React, { forwardRef } from \"react\";\nimport {\n Stack as MUIStack,\n type StackProps as MUIStackProps,\n} from \"@mui/material\";\nimport {\n type RecursicaSpacing,\n SPACING_MAP,\n type OmitSx,\n filterSxProp,\n} from \"../../utils/filterStylingProps\";\n\nexport interface RecursicaGroupProps {\n children?: React.ReactNode;\n gap?: MUIStackProps[\"spacing\"] | RecursicaSpacing;\n rowGap?: MUIStackProps[\"spacing\"] | RecursicaSpacing;\n columnGap?: MUIStackProps[\"spacing\"] | RecursicaSpacing;\n}\n\nexport type GroupProps = OmitSx<\n Omit<MUIStackProps, \"spacing\" | \"direction\"> & RecursicaGroupProps\n>;\n\nexport const Group = forwardRef<HTMLDivElement, GroupProps>(function Group(\n { children, gap = \"rec-default\", rowGap, columnGap, ...rest },\n ref,\n) {\n const safeProps = filterSxProp(rest as Record<string, unknown>);\n const resolvedGap =\n typeof gap === \"string\" && gap in SPACING_MAP\n ? SPACING_MAP[gap as keyof typeof SPACING_MAP]\n : gap;\n const resolvedRowGap =\n typeof rowGap === \"string\" && rowGap in SPACING_MAP\n ? SPACING_MAP[rowGap as keyof typeof SPACING_MAP]\n : rowGap;\n const resolvedColumnGap =\n typeof columnGap === \"string\" && columnGap in SPACING_MAP\n ? SPACING_MAP[columnGap as keyof typeof SPACING_MAP]\n : columnGap;\n\n return (\n <MUIStack\n ref={ref}\n direction=\"row\"\n flexWrap=\"wrap\"\n spacing={resolvedGap}\n sx={{\n ...(resolvedRowGap ? { rowGap: resolvedRowGap } : {}),\n ...(resolvedColumnGap ? { columnGap: resolvedColumnGap } : {}),\n }}\n {...safeProps}\n >\n {children}\n </MUIStack>\n );\n});\n\nGroup.displayName = \"Group\";\n","import React from \"react\";\n\nexport type HoverCardProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const HoverCard: React.FC<HoverCardProps> = (props) => {\n return <div {...props}>HoverCard</div>;\n};\n","import React from \"react\";\n\nexport type LabelProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Label: React.FC<LabelProps> = (props) => {\n return <div {...props}>Label</div>;\n};\n","import React, { forwardRef } from \"react\";\nimport { Link as MUILink, type LinkProps as MUILinkProps } from \"@mui/material\";\nimport {\n filterStylingProps,\n type RecursicaOverStyled,\n} from \"../../utils/filterStylingProps\";\nimport styles from \"./Link.module.css\";\n\nexport interface RecursicaLinkProps {\n icon?: React.ReactNode;\n children?: React.ReactNode;\n component?: React.ElementType;\n}\n\nexport type LinkProps = RecursicaOverStyled<\n Omit<MUILinkProps, \"underline\"> & RecursicaLinkProps\n>;\n\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(function Link(\n { icon, children, overStyled = false, ...rest },\n ref,\n) {\n const sanitizedProps = filterStylingProps(rest, overStyled);\n const restRecord = sanitizedProps as Record<string, unknown>;\n\n const classNameProp = restRecord.className as string | undefined;\n const finalClass = classNameProp\n ? `${styles.root} ${classNameProp}`\n : styles.root;\n\n return (\n <MUILink\n ref={ref}\n className={finalClass}\n underline=\"none\"\n {...(icon ? { \"data-has-icon\": \"\" } : {})}\n {...sanitizedProps}\n >\n {icon && (\n <span className={styles.iconWrapper} aria-hidden>\n {icon}\n </span>\n )}\n <span className={styles.labelText}>{children}</span>\n </MUILink>\n );\n});\n\nLink.displayName = \"Link\";\n","import React from \"react\";\n\nexport type MenuProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Menu: React.FC<MenuProps> = (props) => {\n return <div {...props}>Menu</div>;\n};\n","import React from \"react\";\n\nexport type ModalProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Modal: React.FC<ModalProps> = (props) => {\n return <div {...props}>Modal</div>;\n};\n","import React from \"react\";\n\nexport type NumberInputProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const NumberInput: React.FC<NumberInputProps> = (props) => {\n return <div {...props}>NumberInput</div>;\n};\n","import React from \"react\";\n\nexport type PaginationProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Pagination: React.FC<PaginationProps> = (props) => {\n return <div {...props}>Pagination</div>;\n};\n","import React from \"react\";\n\nexport type PanelProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Panel: React.FC<PanelProps> = (props) => {\n return <div {...props}>Panel</div>;\n};\n","import React from \"react\";\n\nexport type RadioProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Radio: React.FC<RadioProps> = (props) => {\n return <div {...props}>Radio</div>;\n};\n","import React from \"react\";\n\nexport type ReadOnlyFieldProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const ReadOnlyField: React.FC<ReadOnlyFieldProps> = (props) => {\n return <div {...props}>ReadOnlyField</div>;\n};\n","import React from \"react\";\n\nexport type SegmentedControlProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const SegmentedControl: React.FC<SegmentedControlProps> = (props) => {\n return <div {...props}>SegmentedControl</div>;\n};\n","import React from \"react\";\n\nexport type SliderProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Slider: React.FC<SliderProps> = (props) => {\n return <div {...props}>Slider</div>;\n};\n","import React, { forwardRef } from \"react\";\nimport {\n Stack as MUIStack,\n type StackProps as MUIStackProps,\n} from \"@mui/material\";\nimport {\n type RecursicaSpacing,\n SPACING_MAP,\n type OmitSx,\n filterSxProp,\n} from \"../../utils/filterStylingProps\";\n\nexport interface RecursicaStackProps {\n children?: React.ReactNode;\n gap?: MUIStackProps[\"spacing\"] | RecursicaSpacing;\n}\n\nexport type StackProps = OmitSx<\n Omit<MUIStackProps, \"spacing\"> & RecursicaStackProps\n>;\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(function Stack(\n { children, gap = \"rec-default\", ...rest },\n ref,\n) {\n const safeProps = filterSxProp(rest as Record<string, unknown>);\n const resolvedGap =\n typeof gap === \"string\" && gap in SPACING_MAP\n ? SPACING_MAP[gap as keyof typeof SPACING_MAP]\n : gap;\n\n return (\n <MUIStack ref={ref} spacing={resolvedGap} {...safeProps}>\n {children}\n </MUIStack>\n );\n});\n\nStack.displayName = \"Stack\";\n","import React from \"react\";\n\nexport type StepperProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Stepper: React.FC<StepperProps> = (props) => {\n return <div {...props}>Stepper</div>;\n};\n","import React from \"react\";\n\nexport type SwitchProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Switch: React.FC<SwitchProps> = (props) => {\n return <div {...props}>Switch</div>;\n};\n","import React from \"react\";\n\nexport type TableProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Table: React.FC<TableProps> = (props) => {\n return <div {...props}>Table</div>;\n};\n","import React from \"react\";\n\nexport type TabsProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Tabs: React.FC<TabsProps> = (props) => {\n return <div {...props}>Tabs</div>;\n};\n","import React, { forwardRef } from \"react\";\nimport {\n Typography as MuiTypography,\n type TypographyProps as MuiTypographyProps,\n} from \"@mui/material\";\nimport {\n filterStylingProps,\n type RecursicaOverStyled,\n} from \"../../utils/filterStylingProps\";\n\nexport type TypographyProps = RecursicaOverStyled<\n Omit<MuiTypographyProps, \"variant\"> & {\n /**\n * Internal typography class mapping\n */\n typographyClass: string;\n component?: React.ElementType;\n }\n>;\n\nexport const Typography = forwardRef<HTMLElement, TypographyProps>(\n function Typography({ typographyClass, overStyled = false, ...rest }, ref) {\n const sanitizedProps = filterStylingProps(rest, overStyled);\n const restRecord = sanitizedProps as Record<string, unknown>;\n\n const classNameProp = restRecord.className as string | undefined;\n const finalClass = classNameProp\n ? `${typographyClass} ${classNameProp}`\n : typographyClass;\n\n return (\n <MuiTypography\n ref={ref}\n className={finalClass}\n variant=\"inherit\"\n {...sanitizedProps}\n />\n );\n },\n);\n\nTypography.displayName = \"Typography\";\n","import React, { forwardRef } from \"react\";\nimport { Typography } from \"../Typography/Typography\";\nimport { type RecursicaOverStyled } from \"../../utils/filterStylingProps\";\nimport { type TypographyProps as MuiTypographyProps } from \"@mui/material\";\n\nexport type TextVariant =\n | \"body\"\n | \"body-small\"\n | \"caption\"\n | \"overline\"\n | \"subtitle\"\n | \"subtitle-small\";\n\nexport type RecursicaTextProps = Omit<MuiTypographyProps, \"variant\"> & {\n variant?: TextVariant;\n children?: React.ReactNode;\n component?: React.ElementType;\n};\n\nexport type TextProps = RecursicaOverStyled<RecursicaTextProps>;\n\nexport const Text = forwardRef<HTMLElement, TextProps>(function Text(\n { variant = \"body\", ...rest },\n ref,\n) {\n const typographyClass = `recursica_brand_typography_${variant}`;\n return <Typography ref={ref} typographyClass={typographyClass} {...rest} />;\n});\n\nText.displayName = \"Text\";\n","import React from \"react\";\n\nexport type TextAreaProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const TextArea: React.FC<TextAreaProps> = (props) => {\n return <div {...props}>TextArea</div>;\n};\n","import React from \"react\";\n\nexport type TextFieldProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const TextField: React.FC<TextFieldProps> = (props) => {\n return <div {...props}>TextField</div>;\n};\n","import React from \"react\";\n\nexport type TimePickerProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const TimePicker: React.FC<TimePickerProps> = (props) => {\n return <div {...props}>TimePicker</div>;\n};\n","import React from \"react\";\n\nexport type TimelineProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Timeline: React.FC<TimelineProps> = (props) => {\n return <div {...props}>Timeline</div>;\n};\n","import React, { forwardRef } from \"react\";\nimport { Typography } from \"../Typography/Typography\";\nimport { type RecursicaOverStyled } from \"../../utils/filterStylingProps\";\nimport { type TypographyProps as MuiTypographyProps } from \"@mui/material\";\n\nexport type RecursicaTitleProps = Omit<MuiTypographyProps, \"variant\"> & {\n order?: 1 | 2 | 3 | 4 | 5 | 6;\n children?: React.ReactNode;\n component?: React.ElementType;\n};\n\nexport type TitleProps = RecursicaOverStyled<RecursicaTitleProps>;\n\nexport const Title = forwardRef<HTMLElement, TitleProps>(function Title(\n { order = 1, component, ...rest },\n ref,\n) {\n const typographyClass = `recursica_brand_typography_h${order}`;\n const defaultComponent = `h${order}` as React.ElementType;\n\n return (\n <Typography\n ref={ref}\n typographyClass={typographyClass}\n component={component || defaultComponent}\n {...rest}\n />\n );\n});\n\nTitle.displayName = \"Title\";\n","import React from \"react\";\n\nexport type ToastProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Toast: React.FC<ToastProps> = (props) => {\n return <div {...props}>Toast</div>;\n};\n","import React from \"react\";\n\nexport type TooltipProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Tooltip: React.FC<TooltipProps> = (props) => {\n return <div {...props}>Tooltip</div>;\n};\n","import React from \"react\";\n\nexport type TransferListProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const TransferList: React.FC<TransferListProps> = (props) => {\n return <div {...props}>TransferList</div>;\n};\n","import { jsx as c, Fragment as f } from \"react/jsx-runtime\";\nimport h, { forwardRef as l, useEffect as p } from \"react\";\nconst E = \"_root_1qhn7_3\", _ = \"_contents_1qhn7_18\", r = {\n root: E,\n contents: _\n}, $ = l(function({ layer: o, contentsOnly: e, children: i, className: n, style: u, ...m }, d) {\n const y = e ? n ? `${r.root} ${r.contents} ${n}` : `${r.root} ${r.contents}` : n ? `${r.root} ${n}` : r.root;\n return /* @__PURE__ */ c(\n \"div\",\n {\n ref: d,\n className: y,\n style: u,\n ...e ? {} : { \"data-recursica-layer\": String(o) },\n ...m,\n children: i\n }\n );\n});\n$.displayName = \"Layer\";\nconst a = ({ emptyText: t = \"N/A\" }) => /* @__PURE__ */ c(h.Fragment, { children: t });\na.displayName = \"EmptyValueRenderer\";\na.check = (t) => t == null || t === \"\" || Array.isArray(t) && t.length === 0;\nconst s = \"data-recursica-theme\";\nfunction g({\n children: t,\n theme: o = \"light\"\n}) {\n return p(() => {\n const e = document.documentElement;\n return e.setAttribute(s, o), () => {\n e.removeAttribute(s);\n };\n }, [o]), /* @__PURE__ */ c(f, { children: t });\n}\nexport {\n a as EmptyValueRenderer,\n $ as Layer,\n g as RecursicaThemeProvider\n};\n//# sourceMappingURL=adapter-common.js.map\n"],"names":["Accordion","props","jsx","AssistiveElement","Avatar","Badge","Box","forwardRef","ref","MUIBox","Breadcrumb","BLOCKED_STYLING_KEYS","LAYOUT_PROPS","SPACING_MAP","filterSxProp","sanitized","filterStylingProps","overStyled","prop","key","value","Loader","variant","size","rest","resolvedSize","sanitizedProps","classNameProp","finalClass","styles","jsxs","Fragment","hasVisibleChildren","children","Button","icon","loaderVariant","loaderSize","useRecursicaLoader","restRecord","hasStartIcon","hasEndIcon","isIconOnly","resolvedLoaderSize","loadingIndicator","MuiButton","Card","Checkbox","Chip","Container","mapSize","MUIContainer","DatePicker","Dropdown","FileInput","FileUpload","Flex","gap","rowGap","columnGap","safeProps","resolvedGap","resolvedRowGap","resolvedColumnGap","FormControlLayout","FormControlWrapper","Group","MUIStack","HoverCard","Label","Link","MUILink","Menu","Modal","NumberInput","Pagination","Panel","Radio","ReadOnlyField","SegmentedControl","Slider","Stack","Stepper","Switch","Table","Tabs","Typography","typographyClass","MuiTypography","Text","TextArea","TextField","TimePicker","Timeline","Title","order","component","defaultComponent","Toast","Tooltip","TransferList","E","_","r","$","l","o","e","i","n","u","m","d","y","c","a","t","h","s","g","p","f"],"mappings":";;;AAIO,MAAMA,KAAsC,CAACC,MAC3C,gBAAAC,EAAC,OAAA,EAAK,GAAGD,GAAO,UAAA,aAAS,GCDrBE,KAAoD,CAACF,MACzD,gBAAAC,EAAC,OAAA,EAAK,GAAGD,GAAO,UAAA,oBAAgB,GCD5BG,KAAgC,CAACH,MACrC,gBAAAC,EAAC,OAAA,EAAK,GAAGD,GAAO,UAAA,UAAM,GCDlBI,KAA8B,CAACJ,MACnC,gBAAAC,EAAC,OAAA,EAAK,GAAGD,GAAO,UAAA,SAAK,GCUjBK,KAAMC,EAAW,SAC5BN,GACAO,GACA;AACA,SAAO,gBAAAN,EAACO,GAAA,EAAO,KAAAD,GAAW,GAAGP,EAAA,CAAO;AACtC,CAAC,GChBYS,KAAwC,CAACT,MAC7C,gBAAAC,EAAC,OAAA,EAAK,GAAGD,GAAO,UAAA,cAAU,GCmBtBU,IAAuB;AAAA,EAClC;AAAA,EACA;AAAA;AAAA,EACA;AAAA,EACA;AAAA;AAAA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAC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O,GAAG,EAAE,UAAUL,GAAG;AAC/C;"}
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ import { RecursicaLoaderProps } from '../Loader/Loader';
2
3
  import { ButtonProps as MuiButtonProps } from '@mui/material';
3
4
  import { RecursicaOverStyled } from '../../utils/filterStylingProps';
4
5
  export interface RecursicaButtonProps {
@@ -9,6 +10,12 @@ export interface RecursicaButtonProps {
9
10
  * For polymorphic support (e.g., `component="a"`), native to MUI.
10
11
  */
11
12
  component?: React.ElementType;
13
+ /** Which Recursica Loader variant to use */
14
+ loaderVariant?: RecursicaLoaderProps["variant"];
15
+ /** The size variant for the loader */
16
+ loaderSize?: RecursicaLoaderProps["size"];
17
+ /** Whether to use the Recursica loader or fallback to the Mantine loader */
18
+ useRecursicaLoader?: boolean;
12
19
  }
13
20
  export type ButtonProps = RecursicaOverStyled<Omit<MuiButtonProps, "variant" | "size" | "color" | "fullWidth"> & RecursicaButtonProps>;
14
21
  /**
@@ -27,8 +34,8 @@ export type ButtonProps = RecursicaOverStyled<Omit<MuiButtonProps, "variant" | "
27
34
  * <Button component={Link} to="/home">Home</Button>
28
35
  * ```
29
36
  */
30
- export declare const Button: React.ForwardRefExoticComponent<(Omit<Omit<Omit<MuiButtonProps, "color" | "fullWidth" | "size" | "variant"> & RecursicaButtonProps, "style" | "className" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "bgcolor" | "color" | "zIndex" | "position" | "boxShadow" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "backgroundColor" | "sx"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
37
+ export declare const Button: React.ForwardRefExoticComponent<(Omit<Omit<Omit<MuiButtonProps, "color" | "variant" | "size" | "fullWidth"> & RecursicaButtonProps, "style" | "className" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "bgcolor" | "color" | "zIndex" | "position" | "boxShadow" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "backgroundColor" | "sx"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
31
38
  overStyled?: false | undefined;
32
- }, "ref"> | Omit<Omit<MuiButtonProps, "color" | "fullWidth" | "size" | "variant"> & RecursicaButtonProps & {
39
+ }, "ref"> | Omit<Omit<MuiButtonProps, "color" | "variant" | "size" | "fullWidth"> & RecursicaButtonProps & {
33
40
  overStyled: true;
34
41
  }, "ref">) & React.RefAttributes<HTMLButtonElement>>;
@@ -1,3 +1,10 @@
1
1
  import { default as React } from 'react';
2
- export type LoaderProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const Loader: React.FC<LoaderProps>;
2
+ import { RecursicaOverStyled, RecursicaSize } from '../../utils/filterStylingProps';
3
+ export interface RecursicaLoaderProps {
4
+ /** Map to the component styles defined in variables */
5
+ variant?: "oval" | "bars" | "dots";
6
+ /** Map to Recursica sizes */
7
+ size?: "sm" | "md" | "lg" | RecursicaSize;
8
+ }
9
+ export type LoaderProps = RecursicaOverStyled<React.HTMLAttributes<HTMLSpanElement> & RecursicaLoaderProps>;
10
+ export declare const Loader: React.ForwardRefExoticComponent<LoaderProps & React.RefAttributes<HTMLSpanElement>>;
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "url": "git+https://github.com/borderux/recursica.git",
14
14
  "directory": "packages/mui-adapter"
15
15
  },
16
- "version": "0.3.0",
16
+ "version": "0.4.0",
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
@@ -15,3 +15,19 @@ We explicitly pass `disableRipple` and `disableElevation` to block MUI's dynamic
15
15
  **Accessibility:**
16
16
 
17
17
  - We inject a development-time warning explicitly requiring `aria-label` when the component detects an icon-only configuration.
18
+
19
+ ---
20
+
21
+ ## Loader color contrast
22
+
23
+ **Decision:** When a Button is in a loading state, the `Recursica Loader` component is injected via the `loadingIndicator` prop. The `Loader` component strictly defines its own colors and styles per variant, meaning it does not automatically inherit the text color (`currentColor`) from the Button.
24
+
25
+ **Constraint:** This can lead to contrast issues (e.g., a blue dots loader inside a solid blue button). Design has explicitly decided not to address this at the moment. As such, developers using the `loading` prop must be aware that the loader's color is fixed by its internal tokens, not by the button's context.
26
+
27
+ ---
28
+
29
+ ## Loading state enforces disabled state
30
+
31
+ **Decision:** When `loading={true}` is passed to the Button, the component explicitly forces `disabled={true}` natively on the underlying element.
32
+
33
+ **Implementation:** This ensures that loading buttons automatically inherit the brand theme disabled opacities (via the `:disabled` CSS pseudo-class) rather than relying solely on MUI's internal loading opacity adjustments.
@@ -44,7 +44,7 @@
44
44
  }
45
45
 
46
46
  /* Internal layout logic for Truncation */
47
- .root > * {
47
+ .root > *:not(:global(.MuiButton-loadingIndicator)) {
48
48
  min-width: 0;
49
49
  position: relative;
50
50
  z-index: 1;
@@ -66,6 +66,49 @@
66
66
  font-size: inherit;
67
67
  line-height: inherit;
68
68
  }
69
+ .root[data-loading="true"] .labelText {
70
+ visibility: hidden;
71
+ }
72
+
73
+ /*
74
+ * Keep the loader fully opaque, but make the background transparent
75
+ * to create contrast for solid variants without changing the loader color.
76
+ */
77
+ .root[data-loading="true"] {
78
+ opacity: 1 !important;
79
+ }
80
+
81
+ .root[data-size="default"][data-variant="solid"][data-loading="true"] {
82
+ background-color: color-mix(
83
+ in srgb,
84
+ var(
85
+ --recursica_ui-kit_components_button_variants_styles_solid_properties_colors_background
86
+ )
87
+ calc(
88
+ var(
89
+ --recursica_ui-kit_components_button_variants_sizes_default_properties_disabled-opacity
90
+ ) *
91
+ 100%
92
+ ),
93
+ transparent
94
+ ) !important;
95
+ }
96
+
97
+ .root[data-size="small"][data-variant="solid"][data-loading="true"] {
98
+ background-color: color-mix(
99
+ in srgb,
100
+ var(
101
+ --recursica_ui-kit_components_button_variants_styles_solid_properties_colors_background
102
+ )
103
+ calc(
104
+ var(
105
+ --recursica_ui-kit_components_button_variants_sizes_small_properties_disabled-opacity
106
+ ) *
107
+ 100%
108
+ ),
109
+ transparent
110
+ ) !important;
111
+ }
69
112
 
70
113
  /* ==== SIZES ==== */
71
114
  .root[data-size="default"] {
@@ -20,6 +20,30 @@ const meta: Meta<ButtonStoryProps> = {
20
20
  options: ["default", "small"],
21
21
  description: "The size of the button",
22
22
  },
23
+ loading: {
24
+ control: "boolean",
25
+ description: "Sets the button to a loading state",
26
+ },
27
+ useRecursicaLoader: {
28
+ control: "boolean",
29
+ description:
30
+ "Use the Recursica Loader component instead of the default Mantine loader",
31
+ },
32
+ loaderVariant: {
33
+ control: "select",
34
+ options: ["oval", "bars", "dots"],
35
+ description: "The visual variant of the Recursica Loader",
36
+ },
37
+ loaderSize: {
38
+ control: "select",
39
+ options: [undefined, "sm", "md", "lg", "small", "default", "large"],
40
+ description: "The size variant for the loader",
41
+ },
42
+ },
43
+ args: {
44
+ useRecursicaLoader: true,
45
+ loaderVariant: "oval",
46
+ loaderSize: undefined,
23
47
  },
24
48
  parameters: {
25
49
  controls: {
@@ -37,6 +61,10 @@ const meta: Meta<ButtonStoryProps> = {
37
61
  "onChange",
38
62
  "value",
39
63
  "checked",
64
+ "loading",
65
+ "useRecursicaLoader",
66
+ "loaderVariant",
67
+ "loaderSize",
40
68
  ],
41
69
  },
42
70
  },
@@ -145,3 +173,20 @@ export const TruncatedLabel: Story = {
145
173
  </div>
146
174
  ),
147
175
  };
176
+
177
+ export const Loading: Story = {
178
+ args: {
179
+ children: "Saving Changes",
180
+ variant: "solid",
181
+ size: "default",
182
+ loading: true,
183
+ },
184
+ parameters: {
185
+ docs: {
186
+ description: {
187
+ story:
188
+ "When `loading={true}` is applied, the Button injects the Recursica `<Loader />` component. Per Recursica design rules, placing a Button in a loading state automatically forces the `disabled={true}` state on the underlying element. This ensures the button immediately receives the brand theme disabled opacities without relying solely on semantic logic.",
189
+ },
190
+ },
191
+ },
192
+ };
@@ -1,4 +1,6 @@
1
1
  import React, { forwardRef } from "react";
2
+ import { Loader } from "../Loader/Loader";
3
+ import type { RecursicaLoaderProps } from "../Loader/Loader";
2
4
  import {
3
5
  Button as MuiButton,
4
6
  type ButtonProps as MuiButtonProps,
@@ -17,6 +19,12 @@ export interface RecursicaButtonProps {
17
19
  * For polymorphic support (e.g., `component="a"`), native to MUI.
18
20
  */
19
21
  component?: React.ElementType;
22
+ /** Which Recursica Loader variant to use */
23
+ loaderVariant?: RecursicaLoaderProps["variant"];
24
+ /** The size variant for the loader */
25
+ loaderSize?: RecursicaLoaderProps["size"];
26
+ /** Whether to use the Recursica loader or fallback to the Mantine loader */
27
+ useRecursicaLoader?: boolean;
20
28
  }
21
29
 
22
30
  export type ButtonProps = RecursicaOverStyled<
@@ -54,6 +62,9 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
54
62
  icon,
55
63
  children,
56
64
  overStyled = false,
65
+ loaderVariant = "oval",
66
+ loaderSize,
67
+ useRecursicaLoader = true,
57
68
  ...rest
58
69
  },
59
70
  ref,
@@ -91,12 +102,24 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
91
102
  // However, Mui Button requires some string, but we can just leave it as standard or ignore since
92
103
  // our CSS resets its properties anyway, but to be clean we just don't pass variant to MUI.
93
104
 
105
+ const resolvedLoaderSize =
106
+ loaderSize ?? (size === "small" ? "small" : "default");
107
+
108
+ let loadingIndicator = restRecord.loadingIndicator as React.ReactNode;
109
+ if (useRecursicaLoader) {
110
+ loadingIndicator = (
111
+ <Loader variant={loaderVariant} size={resolvedLoaderSize} />
112
+ );
113
+ }
114
+
94
115
  return (
95
116
  <MuiButton
96
117
  ref={ref}
97
118
  disableRipple
98
119
  disableElevation
99
120
  className={finalClass}
121
+ loading={!!restRecord.loading}
122
+ loadingIndicator={loadingIndicator}
100
123
  startIcon={
101
124
  icon != null ? (
102
125
  <span className={styles.iconWrapper} aria-hidden>
@@ -107,7 +130,9 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
107
130
  data-variant={variant}
108
131
  data-size={size}
109
132
  {...(isIconOnly ? { "data-icon-only": "" } : {})}
133
+ {...(restRecord.loading ? { "data-loading": "true" } : {})}
110
134
  {...sanitizedProps}
135
+ disabled={!!restRecord.disabled || !!restRecord.loading}
111
136
  >
112
137
  <span className={styles.labelText}>{children}</span>
113
138
  </MuiButton>
@@ -0,0 +1,25 @@
1
+ # Loader Implementation Notes
2
+
3
+ ## Architecture & Integration
4
+
5
+ The `Loader` component for the MUI adapter has been completely hand-coded from scratch using pure CSS and basic HTML `<span>` elements. It explicitly **does not** use MUI's native `<CircularProgress>` component.
6
+
7
+ This was a deliberate architectural decision to ensure 100% feature and visual parity with the `mantine-adapter`.
8
+
9
+ ### Key Decisions:
10
+
11
+ - **Bypassing Native Components:** MUI's native loaders (like `<CircularProgress>`) are built using complex animated SVGs and only support a circular "oval" shape. Since the Recursica design system mandates `oval`, `bars`, and `dots` variants, relying on MUI's primitives would have forced a fragmented architecture where `oval` used MUI but `bars` and `dots` were hand-coded.
12
+ - **Parity with Mantine:** To guarantee identical animation timing, easing curves, and DOM structures across frameworks, the CSS keyframes and layout strategies used internally by Mantine's `<Loader>` were extracted and directly replicated in this adapter's `Loader.module.css`.
13
+
14
+ ### Token Mapping:
15
+
16
+ Sizes are bound through `data-size` attributes (`sm`, `md`, `lg` parsing to target `<div data-size="small">`, etc.).
17
+
18
+ - **Oval Variant:** Uses a CSS spinning `::after` pseudo-element. To avoid CSS border inheritance bugs when computing tokenized border-widths, a custom `--loader-thickness` CSS variable is used to bridge the token into the spinning element.
19
+ - **Bars & Dots Variants:** Render three internal `<span />` elements sequentially, styled via `Loader.module.css` to handle individual keyframe delays for bouncing or fading animations.
20
+
21
+ ### Color Contrast Rules:
22
+
23
+ Loaders are hardcoded to map to their explicitly defined design tokens (e.g., `--recursica_ui-kit_components_loader_properties_indicator-color`). By default, they do **not** inherit `currentColor`.
24
+
25
+ When injected into components like the `Button` (where contrast issues may arise against solid backgrounds), it is the responsibility of the parent component (e.g., `Button.module.css`) to use contextual CSS overrides to force `--loader-color: currentColor !important` if necessary.