@recursica/mantine-adapter 0.16.0 → 0.18.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/mantine-adapter.cjs +1 -1
  3. package/dist/mantine-adapter.cjs.map +1 -1
  4. package/dist/mantine-adapter.css +1 -1
  5. package/dist/mantine-adapter.js +1677 -1505
  6. package/dist/mantine-adapter.js.map +1 -1
  7. package/dist/src/OverStyling.d.ts +1 -0
  8. package/dist/src/Version.d.ts +1 -0
  9. package/dist/src/components/Container/Container.d.ts +8 -5
  10. package/dist/src/components/Flex/Flex.d.ts +10 -7
  11. package/dist/src/components/Group/Group.d.ts +8 -5
  12. package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +16 -3
  13. package/dist/src/components/Stack/Stack.d.ts +8 -5
  14. package/dist/src/components/Stepper/Stepper.d.ts +12 -2
  15. package/dist/src/components/Tabs/Tabs.d.ts +19 -3
  16. package/dist/src/components/index.d.ts +0 -2
  17. package/package.json +4 -3
  18. package/src/Introduction.stories.tsx +180 -0
  19. package/src/{OverStyling.stories.tsx → OverStyling.tsx} +23 -11
  20. package/src/{Version.stories.tsx → Version.tsx} +1 -13
  21. package/src/components/Card/Card.tsx +1 -1
  22. package/src/components/Container/Container.tsx +13 -17
  23. package/src/components/Flex/Flex.tsx +13 -17
  24. package/src/components/Group/Group.tsx +13 -17
  25. package/src/components/Pagination/Pagination.stories.tsx +0 -1
  26. package/src/components/Panel/Panel.stories.tsx +1 -1
  27. package/src/components/SegmentedControl/IMPLEMENTATION_NOTES.md +17 -0
  28. package/src/components/SegmentedControl/SegmentedControl.module.css +138 -0
  29. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +108 -6
  30. package/src/components/SegmentedControl/SegmentedControl.tsx +96 -5
  31. package/src/components/Stack/Stack.tsx +13 -17
  32. package/src/components/Stepper/Stepper.module.css +353 -0
  33. package/src/components/Stepper/Stepper.stories.tsx +135 -4
  34. package/src/components/Stepper/Stepper.tsx +68 -5
  35. package/src/components/Tabs/Tabs.module.css +401 -0
  36. package/src/components/Tabs/Tabs.stories.tsx +141 -4
  37. package/src/components/Tabs/Tabs.tsx +107 -5
  38. package/src/components/index.ts +0 -2
  39. package/dist/src/components/Popover/Popover.d.ts +0 -3
  40. package/dist/src/components/Search/Search.d.ts +0 -3
  41. package/src/components/Popover/Popover.stories.tsx +0 -17
  42. package/src/components/Popover/Popover.tsx +0 -7
  43. package/src/components/Search/Search.stories.tsx +0 -17
  44. package/src/components/Search/Search.tsx +0 -7
@@ -0,0 +1 @@
1
+ export declare const OverStylingInfo: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const VersionInfo: () => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { ContainerProps as MantineContainerProps } from '@mantine/core';
3
- import { RecursicaOverStyled, RecursicaSpacing } from '../../utils/filterStylingProps';
2
+ import { RecursicaSpacing } from '../../utils/filterStylingProps';
4
3
  export interface RecursicaContainerProps {
5
4
  /**
6
5
  * Children components inside the layout container
@@ -12,7 +11,11 @@ export interface RecursicaContainerProps {
12
11
  size?: "xs" | "sm" | "md" | "lg" | "xl" | RecursicaSpacing | (string & {}) | number;
13
12
  }
14
13
  /**
15
- * Container layout wrapper
14
+ * Container layout wrapper.
15
+ *
16
+ * Note: Unlike complex UI components, primitive layout components (Flex, Stack, Group, Container)
17
+ * DO NOT use the `RecursicaOverStyled` gatekeeper. Developers must be able to freely pass
18
+ * width, height, padding, margins, and flexbox alignment props to construct structural layouts.
16
19
  */
17
- export type ContainerProps = RecursicaOverStyled<Omit<MantineContainerProps, "size"> & RecursicaContainerProps>;
18
- export declare const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>;
20
+ export type ContainerProps = Omit<MantineContainerProps, "size"> & RecursicaContainerProps;
21
+ export declare const Container: import('react').ForwardRefExoticComponent<Omit<MantineContainerProps, "size"> & RecursicaContainerProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,6 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { FlexProps as MantineFlexProps } from '@mantine/core';
3
- import { RecursicaOverStyled, RecursicaSpacing } from '../../utils/filterStylingProps';
2
+ import { RecursicaSpacing } from '../../utils/filterStylingProps';
4
3
  export interface RecursicaFlexProps {
5
4
  /**
6
5
  * Children components inside the Flex container
@@ -11,9 +10,13 @@ export interface RecursicaFlexProps {
11
10
  columnGap?: MantineFlexProps["gap"] | RecursicaSpacing;
12
11
  }
13
12
  /**
14
- * Flex layout wrapper
13
+ * Flex layout wrapper.
14
+ *
15
+ * Note: Unlike complex UI components, primitive layout components (Flex, Stack, Group, Container)
16
+ * DO NOT use the `RecursicaOverStyled` gatekeeper. Developers must be able to freely pass
17
+ * width, height, padding, margins, and flexbox alignment props to construct structural layouts.
15
18
  */
16
- export type FlexProps = RecursicaOverStyled<MantineFlexProps & RecursicaFlexProps>;
19
+ export type FlexProps = MantineFlexProps & RecursicaFlexProps;
17
20
  /**
18
21
  * Recursica Flex layout wrapper.
19
22
  *
@@ -24,12 +27,12 @@ export type FlexProps = RecursicaOverStyled<MantineFlexProps & RecursicaFlexProp
24
27
  * <Flex component="section">...</Flex>
25
28
  * ```
26
29
  */
27
- export declare const Flex: (<C = "div">(props: import('@mantine/core').PolymorphicComponentProps<C, FlexProps>) => React.ReactElement) & Omit<React.FunctionComponent<((FlexProps & {
30
+ export declare const Flex: (<C = "div">(props: import('@mantine/core').PolymorphicComponentProps<C, FlexProps>) => React.ReactElement) & Omit<import('react').FunctionComponent<(MantineFlexProps & RecursicaFlexProps & {
28
31
  component?: any;
29
- }) & Omit<Omit<any, "ref">, "className" | "classNames" | "style" | "styles" | "vars" | "p" | "px" | "py" | "pt" | "pb" | "pl" | "pr" | "bg" | "c" | "opacity" | "ff" | "fz" | "fw" | "lts" | "ta" | "lh" | "fs" | "tt" | "td" | "bd" | "w" | "miw" | "maw" | "h" | "mih" | "mah" | "m" | "my" | "mx" | "mt" | "mb" | "ml" | "mr" | "gap" | "rowGap" | "columnGap" | "top" | "left" | "bottom" | "right" | "key" | "defaultValue" | "onChange" | "slot" | "title" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "__vars" | "__size" | "hiddenFrom" | "visibleFrom" | "lightHidden" | "darkHidden" | "mod" | "ms" | "me" | "ps" | "pe" | "bdrs" | "bgsz" | "bgp" | "bgr" | "bga" | "pos" | "inset" | "display" | "flex" | "unstyled" | "variant" | "attributes" | "overStyled" | "justify" | "component" | "direction" | "wrap" | "align"> & {
32
+ } & Omit<Omit<any, "ref">, "className" | "classNames" | "style" | "styles" | "vars" | "p" | "px" | "py" | "pt" | "pb" | "pl" | "pr" | "bg" | "c" | "opacity" | "ff" | "fz" | "fw" | "lts" | "ta" | "lh" | "fs" | "tt" | "td" | "bd" | "w" | "miw" | "maw" | "h" | "mih" | "mah" | "m" | "my" | "mx" | "mt" | "mb" | "ml" | "mr" | "gap" | "rowGap" | "columnGap" | "top" | "left" | "bottom" | "right" | "key" | "defaultValue" | "onChange" | "slot" | "title" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "__vars" | "__size" | "hiddenFrom" | "visibleFrom" | "lightHidden" | "darkHidden" | "mod" | "ms" | "me" | "ps" | "pe" | "bdrs" | "bgsz" | "bgp" | "bgr" | "bga" | "pos" | "inset" | "display" | "flex" | "unstyled" | "variant" | "attributes" | "justify" | "component" | "direction" | "wrap" | "align"> & {
30
33
  ref?: any;
31
34
  renderRoot?: (props: any) => any;
32
- }) | (FlexProps & {
35
+ }) | (MantineFlexProps & RecursicaFlexProps & {
33
36
  component: React.ElementType;
34
37
  renderRoot?: (props: Record<string, any>) => any;
35
38
  })>, never> & Record<string, never>;
@@ -1,6 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { GroupProps as MantineGroupProps } from '@mantine/core';
3
- import { RecursicaOverStyled, RecursicaSpacing } from '../../utils/filterStylingProps';
2
+ import { RecursicaSpacing } from '../../utils/filterStylingProps';
4
3
  export interface RecursicaGroupProps {
5
4
  /**
6
5
  * Children components inside the group
@@ -11,7 +10,11 @@ export interface RecursicaGroupProps {
11
10
  columnGap?: MantineGroupProps["gap"] | RecursicaSpacing;
12
11
  }
13
12
  /**
14
- * Group flex layout wrapper
13
+ * Group flex layout wrapper.
14
+ *
15
+ * Note: Unlike complex UI components, primitive layout components (Flex, Stack, Group, Container)
16
+ * DO NOT use the `RecursicaOverStyled` gatekeeper. Developers must be able to freely pass
17
+ * width, height, padding, margins, and flexbox alignment props to construct structural layouts.
15
18
  */
16
- export type GroupProps = RecursicaOverStyled<MantineGroupProps & RecursicaGroupProps>;
17
- export declare const Group: React.ForwardRefExoticComponent<GroupProps & React.RefAttributes<HTMLDivElement>>;
19
+ export type GroupProps = MantineGroupProps & RecursicaGroupProps;
20
+ export declare const Group: import('react').ForwardRefExoticComponent<MantineGroupProps & RecursicaGroupProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,3 +1,16 @@
1
- import { default as React } from 'react';
2
- export type SegmentedControlProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const SegmentedControl: React.FC<SegmentedControlProps>;
1
+ import { SegmentedControlProps as MantineSegmentedControlProps } from '@mantine/core';
2
+ import { RecursicaOverStyled } from '../../utils/filterStylingProps';
3
+ export interface RecursicaSegmentedControlProps {
4
+ /** The orientation of the control */
5
+ orientation?: "horizontal" | "vertical";
6
+ /** If true, the control will take up the full width of its container */
7
+ fullWidth?: boolean;
8
+ }
9
+ export type SegmentedControlProps = RecursicaOverStyled<Omit<MantineSegmentedControlProps, "variant" | "size" | "radius" | "color" | "classNames" | "className"> & {
10
+ className?: string;
11
+ classNames?: Partial<Record<string, string>>;
12
+ } & RecursicaSegmentedControlProps>;
13
+ /**
14
+ * Recursica SegmentedControl component wrapping Mantine's SegmentedControl.
15
+ */
16
+ export declare const SegmentedControl: import('react').ForwardRefExoticComponent<SegmentedControlProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,6 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { StackProps as MantineStackProps } from '@mantine/core';
3
- import { RecursicaOverStyled, RecursicaSpacing } from '../../utils/filterStylingProps';
2
+ import { RecursicaSpacing } from '../../utils/filterStylingProps';
4
3
  export interface RecursicaStackProps {
5
4
  /**
6
5
  * Children components inside the stack
@@ -9,7 +8,11 @@ export interface RecursicaStackProps {
9
8
  gap?: MantineStackProps["gap"] | RecursicaSpacing;
10
9
  }
11
10
  /**
12
- * Stack flex layout wrapper
11
+ * Stack flex layout wrapper.
12
+ *
13
+ * Note: Unlike complex UI components, primitive layout components (Flex, Stack, Group, Container)
14
+ * DO NOT use the `RecursicaOverStyled` gatekeeper. Developers must be able to freely pass
15
+ * width, height, padding, margins, and flexbox alignment props to construct structural layouts.
13
16
  */
14
- export type StackProps = RecursicaOverStyled<MantineStackProps & RecursicaStackProps>;
15
- export declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>;
17
+ export type StackProps = MantineStackProps & RecursicaStackProps;
18
+ export declare const Stack: import('react').ForwardRefExoticComponent<MantineStackProps & RecursicaStackProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,3 +1,13 @@
1
1
  import { default as React } from 'react';
2
- export type StepperProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const Stepper: React.FC<StepperProps>;
2
+ import { Stepper as MantineStepper, StepperProps as MantineStepperProps } from '@mantine/core';
3
+ import { RecursicaOverStyled } from '../../utils/filterStylingProps';
4
+ export interface RecursicaStepperProps extends Omit<MantineStepperProps, "size" | "color" | "radius" | "iconSize" | "contentPadding"> {
5
+ size?: "small" | "large";
6
+ }
7
+ export type StepperProps = RecursicaOverStyled<RecursicaStepperProps>;
8
+ declare const _Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLDivElement>>;
9
+ export declare const Stepper: typeof _Stepper & {
10
+ Step: typeof MantineStepper.Step;
11
+ Completed: typeof MantineStepper.Completed;
12
+ };
13
+ export {};
@@ -1,3 +1,19 @@
1
- import { default as React } from 'react';
2
- export type TabsProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const Tabs: React.FC<TabsProps>;
1
+ import { TabsProps as MantineTabsProps, TabsListProps as MantineTabsListProps, TabsTabProps as MantineTabsTabProps, TabsPanelProps as MantineTabsPanelProps } from '@mantine/core';
2
+ import { RecursicaOverStyled } from '../../utils/filterStylingProps';
3
+ export interface RecursicaTabsProps extends Omit<MantineTabsProps, "variant" | "classNames" | "color" | "radius"> {
4
+ variant?: "default" | "outline" | "pills";
5
+ }
6
+ export type TabsProps = RecursicaOverStyled<RecursicaTabsProps>;
7
+ declare const _Tabs: import('react').ForwardRefExoticComponent<TabsProps & import('react').RefAttributes<HTMLDivElement>>;
8
+ export type TabsListProps = RecursicaOverStyled<MantineTabsListProps>;
9
+ declare const _TabsList: import('react').ForwardRefExoticComponent<TabsListProps & import('react').RefAttributes<HTMLDivElement>>;
10
+ export type TabsTabProps = RecursicaOverStyled<MantineTabsTabProps>;
11
+ declare const _TabsTab: import('react').ForwardRefExoticComponent<TabsTabProps & import('react').RefAttributes<HTMLButtonElement>>;
12
+ export type TabsPanelProps = RecursicaOverStyled<MantineTabsPanelProps>;
13
+ declare const _TabsPanel: import('react').ForwardRefExoticComponent<TabsPanelProps & import('react').RefAttributes<HTMLDivElement>>;
14
+ export declare const Tabs: typeof _Tabs & {
15
+ List: typeof _TabsList;
16
+ Tab: typeof _TabsTab;
17
+ Panel: typeof _TabsPanel;
18
+ };
19
+ export {};
@@ -24,11 +24,9 @@ export * from './Modal/Modal';
24
24
  export * from './NumberInput/NumberInput';
25
25
  export * from './Pagination/Pagination';
26
26
  export * from './Panel/Panel';
27
- export * from './Popover/Popover';
28
27
  export * from './Radio/Radio';
29
28
  export * from './Radio/RadioGroup';
30
29
  export * from './ReadOnlyField';
31
- export * from './Search/Search';
32
30
  export * from './SegmentedControl/SegmentedControl';
33
31
  export * from './Slider/Slider';
34
32
  export * from './Stack/Stack';
package/package.json CHANGED
@@ -4,14 +4,16 @@
4
4
  "private": false,
5
5
  "homepage": "https://github.com/borderux/recursica/tree/main/packages/mantine-adapter",
6
6
  "author": "hi@borderux.com",
7
+ "license": "MIT",
7
8
  "bugs": {
8
9
  "url": "https://github.com/borderux/recursica/issues"
9
10
  },
10
11
  "repository": {
11
12
  "type": "git",
12
- "url": "git+https://github.com/borderux/recursica.git"
13
+ "url": "git+https://github.com/borderux/recursica.git",
14
+ "directory": "packages/mantine-adapter"
13
15
  },
14
- "version": "0.16.0",
16
+ "version": "0.18.0",
15
17
  "type": "module",
16
18
  "main": "./dist/mantine-adapter.cjs",
17
19
  "module": "./dist/mantine-adapter.js",
@@ -57,7 +59,6 @@
57
59
  "@storybook/addon-a11y": "^10.3.3",
58
60
  "@storybook/addon-docs": "^10.3.3",
59
61
  "@storybook/addon-mcp": "^0.4.2",
60
- "@storybook/addon-onboarding": "^10.3.3",
61
62
  "@storybook/addon-vitest": "^10.3.3",
62
63
  "@storybook/react-vite": "^10.3.3",
63
64
  "@types/react": "^19.1.2",
@@ -0,0 +1,180 @@
1
+ import type { Meta } from "@storybook/react-vite";
2
+ import { AdaptersContent, MantineLogo } from "@recursica/storybook-template";
3
+ import { Button } from "./components/Button/Button";
4
+ import { VersionInfo } from "./Version";
5
+ import { OverStylingInfo } from "./OverStyling";
6
+
7
+ const DOCS_URL = "https://recursica.com";
8
+ const FORGE_URL = "https://forge.recursica.com";
9
+
10
+ const sectionStyle: React.CSSProperties = {
11
+ marginBottom: 32,
12
+ };
13
+
14
+ const headingStyle: React.CSSProperties = {
15
+ fontSize: 14,
16
+ fontWeight: 600,
17
+ color: "#333",
18
+ marginBottom: 8,
19
+ marginTop: 0,
20
+ };
21
+
22
+ const bodyStyle: React.CSSProperties = {
23
+ fontSize: 14,
24
+ lineHeight: 1.6,
25
+ color: "#444",
26
+ margin: 0,
27
+ };
28
+
29
+ const linkStyle: React.CSSProperties = {
30
+ color: "#0066cc",
31
+ textDecoration: "none",
32
+ };
33
+
34
+ function IntroductionContent() {
35
+ return (
36
+ <div style={{ padding: 24, maxWidth: 640 }}>
37
+ <div
38
+ style={{
39
+ display: "flex",
40
+ alignItems: "center",
41
+ gap: "16px",
42
+ marginBottom: "16px",
43
+ }}
44
+ >
45
+ <MantineLogo width={40} height={40} />
46
+ <div>
47
+ <h1 style={{ fontSize: 24, fontWeight: 700, margin: 0 }}>
48
+ Recursica Design System (Mantine Adapter)
49
+ </h1>
50
+ <a
51
+ href="https://mantine.dev"
52
+ target="_blank"
53
+ rel="noreferrer"
54
+ style={linkStyle}
55
+ >
56
+ mantine.dev
57
+ </a>
58
+ </div>
59
+ </div>
60
+ <p style={{ ...bodyStyle, marginBottom: 24 }}>
61
+ This Storybook showcases the Recursica design system implemented for the{" "}
62
+ <strong>Mantine UI Kit</strong>. It provides reusable components that
63
+ map our design tokens to Mantine's robust component layer.
64
+ </p>
65
+
66
+ <section style={sectionStyle}>
67
+ <h2 style={headingStyle}>Looking for another UI Kit?</h2>
68
+ <p style={bodyStyle}>
69
+ Are you using a different UI Kit (like Material UI)? Recursica
70
+ provides multiple adapters for different frameworks.
71
+ </p>
72
+ <div style={{ marginTop: "16px" }}>
73
+ <Button
74
+ component="a"
75
+ href="./?path=/story/introduction--adapters"
76
+ target="_parent"
77
+ variant="solid"
78
+ >
79
+ View Supported Adapters
80
+ </Button>
81
+ </div>
82
+ </section>
83
+
84
+ <section style={sectionStyle}>
85
+ <h2 style={headingStyle}>Installation</h2>
86
+ <p style={bodyStyle}>
87
+ To install the Mantine adapter in your project, run:
88
+ </p>
89
+ <pre
90
+ style={{
91
+ padding: 12,
92
+ backgroundColor: "#f5f5f5",
93
+ borderRadius: 6,
94
+ fontSize: 13,
95
+ marginTop: 8,
96
+ }}
97
+ >
98
+ <code>
99
+ npm install @recursica/mantine-adapter @mantine/core @mantine/hooks
100
+ </code>
101
+ </pre>
102
+ </section>
103
+
104
+ <section style={sectionStyle}>
105
+ <h2 style={headingStyle}>Tokens</h2>
106
+ <p style={bodyStyle}>
107
+ Raw design tokens (colors, sizes, font weights, opacities, etc.) that
108
+ feed the theme and components. These are the primitive values defined
109
+ in your token set and exposed as CSS custom properties.
110
+ </p>
111
+ </section>
112
+
113
+ <section style={sectionStyle}>
114
+ <h2 style={headingStyle}>Theme</h2>
115
+ <p style={bodyStyle}>
116
+ Brand and theme layer built on top of tokens. Typography types,
117
+ dimensions, and layout grids are defined here. Theme uses the tokens
118
+ and exposes both CSS variables and helper classes (e.g. typography
119
+ classes) for consistent styling across the product.
120
+ </p>
121
+ </section>
122
+
123
+ <section style={sectionStyle}>
124
+ <h2 style={headingStyle}>Configuring Recursica</h2>
125
+ <p style={bodyStyle}>
126
+ To modify the Recursica configuration (tokens, brand, theme), go to{" "}
127
+ <a
128
+ href={FORGE_URL}
129
+ target="_blank"
130
+ rel="noopener noreferrer"
131
+ style={linkStyle}
132
+ >
133
+ {FORGE_URL}
134
+ </a>
135
+ . Changes there drive the tokens and theme you see in this Storybook.
136
+ </p>
137
+ </section>
138
+
139
+ <section style={sectionStyle}>
140
+ <h2 style={headingStyle}>Documentation</h2>
141
+ <p style={bodyStyle}>
142
+ For full documentation, guides, and API reference, visit{" "}
143
+ <a
144
+ href={DOCS_URL}
145
+ target="_blank"
146
+ rel="noopener noreferrer"
147
+ style={linkStyle}
148
+ >
149
+ {DOCS_URL}
150
+ </a>
151
+ .
152
+ </p>
153
+ </section>
154
+ </div>
155
+ );
156
+ }
157
+
158
+ const meta = {
159
+ title: "Introduction",
160
+ } satisfies Meta;
161
+
162
+ export default meta;
163
+
164
+ export const Welcome = {
165
+ render: () => <IntroductionContent />,
166
+ };
167
+
168
+ export const Adapters = {
169
+ render: () => <AdaptersContent />,
170
+ };
171
+
172
+ export const OverStyling = {
173
+ name: "Over Styling",
174
+ render: () => <OverStylingInfo />,
175
+ };
176
+
177
+ export const VersionInfoStory = {
178
+ name: "Version Info",
179
+ render: () => <VersionInfo />,
180
+ };
@@ -1,4 +1,3 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
1
  import {
3
2
  Container,
4
3
  Paper,
@@ -11,7 +10,7 @@ import {
11
10
  } from "@mantine/core";
12
11
  import { Button } from "./components/Button/Button";
13
12
 
14
- const OverStylingInfo = () => {
13
+ export const OverStylingInfo = () => {
15
14
  return (
16
15
  <Container size="md" py="xl">
17
16
  <Paper withBorder p="xl" radius="md">
@@ -133,6 +132,28 @@ const OverStylingInfo = () => {
133
132
 
134
133
  <Divider mb="xl" />
135
134
 
135
+ <Title order={3} mb="sm">
136
+ Primitive Layout Components Exemption
137
+ </Title>
138
+ <Text mb="sm">
139
+ Unlike complex UI components (Buttons, Tabs, Inputs) which are
140
+ strictly protected, <strong>Primitive Layout Components</strong> (
141
+ <Code>Flex</Code>,<Code>Stack</Code>, <Code>Group</Code>,{" "}
142
+ <Code>Container</Code>) are entirely exempt from the{" "}
143
+ <Code>RecursicaOverStyled</Code> gatekeeper.
144
+ </Text>
145
+ <Text mb="xl">
146
+ Because the entire functional purpose of these components is
147
+ structural layout composition, developers are free to pass any
148
+ standard Mantine width, height, padding, margin, gap, and alignment
149
+ property directly to them without needing to flag{" "}
150
+ <Code>overStyled={`{true}`}</Code>. The internal custom token mapper
151
+ (such as converting <Code>gap="rec-md"</Code>) is still active
152
+ natively on these wrappers.
153
+ </Text>
154
+
155
+ <Divider mb="xl" />
156
+
136
157
  <Title order={3} mb="md">
137
158
  Live Example
138
159
  </Title>
@@ -163,12 +184,3 @@ const OverStylingInfo = () => {
163
184
  </Container>
164
185
  );
165
186
  };
166
-
167
- const meta: Meta<typeof OverStylingInfo> = {
168
- title: "Introduction/Over Styling",
169
- component: OverStylingInfo,
170
- };
171
-
172
- export default meta;
173
-
174
- export const Default: StoryObj<typeof OverStylingInfo> = {};
@@ -1,4 +1,3 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
1
  import ReactMarkdown from "react-markdown";
3
2
  import {
4
3
  Container,
@@ -12,7 +11,7 @@ import {
12
11
  import pkg from "../package.json";
13
12
  import changelog from "../CHANGELOG.md?raw";
14
13
 
15
- const VersionInfo = () => {
14
+ export const VersionInfo = () => {
16
15
  return (
17
16
  <Container size="md" py="xl">
18
17
  <Paper withBorder p="xl" radius="md">
@@ -43,14 +42,3 @@ const VersionInfo = () => {
43
42
  </Container>
44
43
  );
45
44
  };
46
-
47
- const meta: Meta<typeof VersionInfo> = {
48
- title: "Introduction/Version Info",
49
- component: VersionInfo,
50
- };
51
-
52
- export default meta;
53
-
54
- type Story = StoryObj<typeof VersionInfo>;
55
-
56
- export const Default: Story = {};
@@ -182,7 +182,7 @@ const PolymorphicCard = createPolymorphicComponent<
182
182
  >(CardBase);
183
183
 
184
184
  // Attach static components for dot-notation access
185
- const _card = PolymorphicCard as Record<string, unknown>;
185
+ const _card = PolymorphicCard as unknown as Record<string, unknown>;
186
186
  _card.Section = CardSection;
187
187
  _card.Header = CardHeader;
188
188
  _card.Footer = CardFooter;
@@ -1,13 +1,9 @@
1
- import React, { forwardRef } from "react";
1
+ import { forwardRef } from "react";
2
2
  import {
3
3
  Container as MantineContainer,
4
4
  type ContainerProps as MantineContainerProps,
5
5
  } from "@mantine/core";
6
- import {
7
- filterStylingProps,
8
- type RecursicaOverStyled,
9
- type RecursicaSpacing,
10
- } from "../../utils/filterStylingProps";
6
+ import { type RecursicaSpacing } from "../../utils/filterStylingProps";
11
7
  import styles from "./Container.module.css";
12
8
 
13
9
  export interface RecursicaContainerProps {
@@ -30,17 +26,17 @@ export interface RecursicaContainerProps {
30
26
  }
31
27
 
32
28
  /**
33
- * Container layout wrapper
29
+ * Container layout wrapper.
30
+ *
31
+ * Note: Unlike complex UI components, primitive layout components (Flex, Stack, Group, Container)
32
+ * DO NOT use the `RecursicaOverStyled` gatekeeper. Developers must be able to freely pass
33
+ * width, height, padding, margins, and flexbox alignment props to construct structural layouts.
34
34
  */
35
- export type ContainerProps = RecursicaOverStyled<
36
- Omit<MantineContainerProps, "size"> & RecursicaContainerProps
37
- >;
35
+ export type ContainerProps = Omit<MantineContainerProps, "size"> &
36
+ RecursicaContainerProps;
38
37
 
39
38
  export const Container = forwardRef<HTMLDivElement, ContainerProps>(
40
- function Container({ children, size, overStyled = false, ...rest }, ref) {
41
- const sanitizedProps = filterStylingProps(rest, overStyled);
42
- const restRecord = sanitizedProps as Record<string, unknown>;
43
-
39
+ function Container({ children, size, ...rest }, ref) {
44
40
  const mapSize: Record<string, string> = {
45
41
  "rec-sm": "sm",
46
42
  "rec-default": "md",
@@ -57,7 +53,7 @@ export const Container = forwardRef<HTMLDivElement, ContainerProps>(
57
53
  root: styles.root,
58
54
  };
59
55
 
60
- const classNamesProp = restRecord.classNames;
56
+ const classNamesProp = rest.classNames;
61
57
  if (
62
58
  classNamesProp &&
63
59
  typeof classNamesProp === "object" &&
@@ -67,7 +63,7 @@ export const Container = forwardRef<HTMLDivElement, ContainerProps>(
67
63
  mergedClassNames.root = o.root ? `${styles.root} ${o.root}` : styles.root;
68
64
  }
69
65
 
70
- const classNameProp = restRecord.className as string | undefined;
66
+ const classNameProp = rest.className as string | undefined;
71
67
  const finalClass = classNameProp
72
68
  ? `${styles.root} ${classNameProp}`
73
69
  : styles.root;
@@ -78,7 +74,7 @@ export const Container = forwardRef<HTMLDivElement, ContainerProps>(
78
74
  size={resolvedSize}
79
75
  className={finalClass}
80
76
  classNames={mergedClassNames}
81
- {...sanitizedProps}
77
+ {...rest}
82
78
  >
83
79
  {children}
84
80
  </MantineContainer>