@recursica/mantine-adapter 0.16.0 → 0.17.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 (40) hide show
  1. package/CHANGELOG.md +6 -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/components/Container/Container.d.ts +8 -5
  8. package/dist/src/components/Flex/Flex.d.ts +10 -7
  9. package/dist/src/components/Group/Group.d.ts +8 -5
  10. package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +16 -3
  11. package/dist/src/components/Stack/Stack.d.ts +8 -5
  12. package/dist/src/components/Stepper/Stepper.d.ts +12 -2
  13. package/dist/src/components/Tabs/Tabs.d.ts +19 -3
  14. package/dist/src/components/index.d.ts +0 -2
  15. package/package.json +1 -1
  16. package/src/OverStyling.stories.tsx +22 -0
  17. package/src/components/Card/Card.tsx +1 -1
  18. package/src/components/Container/Container.tsx +13 -17
  19. package/src/components/Flex/Flex.tsx +13 -17
  20. package/src/components/Group/Group.tsx +13 -17
  21. package/src/components/Pagination/Pagination.stories.tsx +0 -1
  22. package/src/components/Panel/Panel.stories.tsx +1 -1
  23. package/src/components/SegmentedControl/IMPLEMENTATION_NOTES.md +17 -0
  24. package/src/components/SegmentedControl/SegmentedControl.module.css +138 -0
  25. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +108 -6
  26. package/src/components/SegmentedControl/SegmentedControl.tsx +96 -5
  27. package/src/components/Stack/Stack.tsx +13 -17
  28. package/src/components/Stepper/Stepper.module.css +353 -0
  29. package/src/components/Stepper/Stepper.stories.tsx +135 -4
  30. package/src/components/Stepper/Stepper.tsx +68 -5
  31. package/src/components/Tabs/Tabs.module.css +401 -0
  32. package/src/components/Tabs/Tabs.stories.tsx +141 -4
  33. package/src/components/Tabs/Tabs.tsx +107 -5
  34. package/src/components/index.ts +0 -2
  35. package/dist/src/components/Popover/Popover.d.ts +0 -3
  36. package/dist/src/components/Search/Search.d.ts +0 -3
  37. package/src/components/Popover/Popover.stories.tsx +0 -17
  38. package/src/components/Popover/Popover.tsx +0 -7
  39. package/src/components/Search/Search.stories.tsx +0 -17
  40. package/src/components/Search/Search.tsx +0 -7
@@ -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
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "git+https://github.com/borderux/recursica.git"
13
13
  },
14
- "version": "0.16.0",
14
+ "version": "0.17.0",
15
15
  "type": "module",
16
16
  "main": "./dist/mantine-adapter.cjs",
17
17
  "module": "./dist/mantine-adapter.js",
@@ -133,6 +133,28 @@ const OverStylingInfo = () => {
133
133
 
134
134
  <Divider mb="xl" />
135
135
 
136
+ <Title order={3} mb="sm">
137
+ Primitive Layout Components Exemption
138
+ </Title>
139
+ <Text mb="sm">
140
+ Unlike complex UI components (Buttons, Tabs, Inputs) which are
141
+ strictly protected, <strong>Primitive Layout Components</strong> (
142
+ <Code>Flex</Code>,<Code>Stack</Code>, <Code>Group</Code>,{" "}
143
+ <Code>Container</Code>) are entirely exempt from the{" "}
144
+ <Code>RecursicaOverStyled</Code> gatekeeper.
145
+ </Text>
146
+ <Text mb="xl">
147
+ Because the entire functional purpose of these components is
148
+ structural layout composition, developers are free to pass any
149
+ standard Mantine width, height, padding, margin, gap, and alignment
150
+ property directly to them without needing to flag{" "}
151
+ <Code>overStyled={`{true}`}</Code>. The internal custom token mapper
152
+ (such as converting <Code>gap="rec-md"</Code>) is still active
153
+ natively on these wrappers.
154
+ </Text>
155
+
156
+ <Divider mb="xl" />
157
+
136
158
  <Title order={3} mb="md">
137
159
  Live Example
138
160
  </Title>
@@ -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>
@@ -1,14 +1,10 @@
1
- import React, { forwardRef } from "react";
1
+ import { forwardRef } from "react";
2
2
  import {
3
3
  Flex as MantineFlex,
4
4
  type FlexProps as MantineFlexProps,
5
5
  createPolymorphicComponent,
6
6
  } from "@mantine/core";
7
- import {
8
- filterStylingProps,
9
- type RecursicaOverStyled,
10
- type RecursicaSpacing,
11
- } from "../../utils/filterStylingProps";
7
+ import { type RecursicaSpacing } from "../../utils/filterStylingProps";
12
8
  import styles from "./Flex.module.css";
13
9
 
14
10
  export interface RecursicaFlexProps {
@@ -22,24 +18,23 @@ export interface RecursicaFlexProps {
22
18
  }
23
19
 
24
20
  /**
25
- * Flex layout wrapper
21
+ * Flex layout wrapper.
22
+ *
23
+ * Note: Unlike complex UI components, primitive layout components (Flex, Stack, Group, Container)
24
+ * DO NOT use the `RecursicaOverStyled` gatekeeper. Developers must be able to freely pass
25
+ * width, height, padding, margins, and flexbox alignment props to construct structural layouts.
26
26
  */
27
- export type FlexProps = RecursicaOverStyled<
28
- MantineFlexProps & RecursicaFlexProps
29
- >;
27
+ export type FlexProps = MantineFlexProps & RecursicaFlexProps;
30
28
 
31
29
  const _Flex = forwardRef<HTMLDivElement, FlexProps>(function Flex(
32
- { children, overStyled = false, gap = "rec-default", ...rest },
30
+ { children, gap = "rec-default", ...rest },
33
31
  ref,
34
32
  ) {
35
- const sanitizedProps = filterStylingProps({ ...rest, gap }, overStyled);
36
- const restRecord = sanitizedProps as Record<string, unknown>;
37
-
38
33
  const mergedClassNames: Partial<Record<string, string>> = {
39
34
  root: styles.root,
40
35
  };
41
36
 
42
- const classNamesProp = restRecord.classNames;
37
+ const classNamesProp = rest.classNames;
43
38
  if (
44
39
  classNamesProp &&
45
40
  typeof classNamesProp === "object" &&
@@ -49,7 +44,7 @@ const _Flex = forwardRef<HTMLDivElement, FlexProps>(function Flex(
49
44
  mergedClassNames.root = o.root ? `${styles.root} ${o.root}` : styles.root;
50
45
  }
51
46
 
52
- const classNameProp = restRecord.className as string | undefined;
47
+ const classNameProp = rest.className as string | undefined;
53
48
  const finalClass = classNameProp
54
49
  ? `${styles.root} ${classNameProp}`
55
50
  : styles.root;
@@ -59,7 +54,8 @@ const _Flex = forwardRef<HTMLDivElement, FlexProps>(function Flex(
59
54
  ref={ref}
60
55
  className={finalClass}
61
56
  classNames={mergedClassNames}
62
- {...sanitizedProps}
57
+ gap={gap}
58
+ {...rest}
63
59
  >
64
60
  {children}
65
61
  </MantineFlex>
@@ -1,13 +1,9 @@
1
- import React, { forwardRef } from "react";
1
+ import { forwardRef } from "react";
2
2
  import {
3
3
  Group as MantineGroup,
4
4
  type GroupProps as MantineGroupProps,
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 "./Group.module.css";
12
8
 
13
9
  export interface RecursicaGroupProps {
@@ -21,24 +17,23 @@ export interface RecursicaGroupProps {
21
17
  }
22
18
 
23
19
  /**
24
- * Group flex layout wrapper
20
+ * Group flex layout wrapper.
21
+ *
22
+ * Note: Unlike complex UI components, primitive layout components (Flex, Stack, Group, Container)
23
+ * DO NOT use the `RecursicaOverStyled` gatekeeper. Developers must be able to freely pass
24
+ * width, height, padding, margins, and flexbox alignment props to construct structural layouts.
25
25
  */
26
- export type GroupProps = RecursicaOverStyled<
27
- MantineGroupProps & RecursicaGroupProps
28
- >;
26
+ export type GroupProps = MantineGroupProps & RecursicaGroupProps;
29
27
 
30
28
  export const Group = forwardRef<HTMLDivElement, GroupProps>(function Group(
31
- { children, overStyled = false, gap = "rec-default", ...rest },
29
+ { children, gap = "rec-default", ...rest },
32
30
  ref,
33
31
  ) {
34
- const sanitizedProps = filterStylingProps({ ...rest, gap }, overStyled);
35
- const restRecord = sanitizedProps as Record<string, unknown>;
36
-
37
32
  const mergedClassNames: Partial<Record<string, string>> = {
38
33
  root: styles.root,
39
34
  };
40
35
 
41
- const classNamesProp = restRecord.classNames;
36
+ const classNamesProp = rest.classNames;
42
37
  if (
43
38
  classNamesProp &&
44
39
  typeof classNamesProp === "object" &&
@@ -48,7 +43,7 @@ export const Group = forwardRef<HTMLDivElement, GroupProps>(function Group(
48
43
  mergedClassNames.root = o.root ? `${styles.root} ${o.root}` : styles.root;
49
44
  }
50
45
 
51
- const classNameProp = restRecord.className as string | undefined;
46
+ const classNameProp = rest.className as string | undefined;
52
47
  const finalClass = classNameProp
53
48
  ? `${styles.root} ${classNameProp}`
54
49
  : styles.root;
@@ -58,7 +53,8 @@ export const Group = forwardRef<HTMLDivElement, GroupProps>(function Group(
58
53
  ref={ref}
59
54
  className={finalClass}
60
55
  classNames={mergedClassNames}
61
- {...sanitizedProps}
56
+ gap={gap}
57
+ {...rest}
62
58
  >
63
59
  {children}
64
60
  </MantineGroup>
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import type { Meta, StoryObj } from "@storybook/react";
3
2
  import { Pagination } from "./Pagination";
4
3
 
@@ -94,12 +94,12 @@ export const Default: Story = {
94
94
  Open Panel
95
95
  </Button>
96
96
  <Panel
97
+ {...(args as PanelProps)}
97
98
  opened={opened}
98
99
  onClose={() => setOpened(false)}
99
100
  title="Panel Title"
100
101
  position="right"
101
102
  wrapHeaderText={wrapHeaderText}
102
- {...(args as PanelProps)}
103
103
  >
104
104
  <Text>
105
105
  This is the panel body content area. Panels slide in from the edge
@@ -0,0 +1,17 @@
1
+ # SegmentedControl Implementation Notes
2
+
3
+ ## 1. Stripping Mantine's Native Variants and Sizes
4
+
5
+ The Figma design tokens for the SegmentedControl component do not define nested layers of variants (such as `solid`, `outline`) or specific sizing steps (`xs`, `sm`, etc.). They are defined globally. Therefore, we explicitly `Omit` the standard `variant`, `size`, `radius`, and `color` props from the generic Mantine `SegmentedControlProps` interface.
6
+
7
+ ## 2. Hardcoded Overrides for Figma Strictness
8
+
9
+ Mantine injects inline hover styles on `.label` (specifically, adding a subtle gray background when hovering). Since Recursica defines explicit transparent or specifically-driven hover states, we use `!important` tags within `SegmentedControl.module.css` for background and typography overriding.
10
+
11
+ ## 3. Divider Separators
12
+
13
+ Mantine uses an `::before` pseudo-element on the `.control` block to draw standard visual separators between adjacent elements. Instead of stripping this functionality out, we hook directly into the pseudo-element and override its `background-color` with `--recursica_ui-kit_components_segmented-control_properties_colors_divider-color`.
14
+
15
+ ## 4. Indicator Mapping
16
+
17
+ The moving active background element (`.indicator`) is decoupled from the actual text label. It is styled natively with its own background color, border size, and elevation shadow variables to match the exact visual parity of a "floating active chip" as defined in the Recursica properties map.