@recursica/mantine-adapter 0.15.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 (58) hide show
  1. package/CHANGELOG.md +12 -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 +1688 -1330
  6. package/dist/mantine-adapter.js.map +1 -1
  7. package/dist/src/components/Button/Button.d.ts +7 -1
  8. package/dist/src/components/Container/Container.d.ts +8 -5
  9. package/dist/src/components/Flex/Flex.d.ts +10 -7
  10. package/dist/src/components/Group/Group.d.ts +8 -5
  11. package/dist/src/components/Link/Link.d.ts +32 -2
  12. package/dist/src/components/Link/index.d.ts +1 -0
  13. package/dist/src/components/Pagination/Pagination.d.ts +50 -2
  14. package/dist/src/components/Pagination/Pagination.icons.d.ts +8 -0
  15. package/dist/src/components/Pagination/index.d.ts +1 -0
  16. package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +16 -3
  17. package/dist/src/components/Stack/Stack.d.ts +8 -5
  18. package/dist/src/components/Stepper/Stepper.d.ts +12 -2
  19. package/dist/src/components/Tabs/Tabs.d.ts +19 -3
  20. package/dist/src/components/index.d.ts +0 -2
  21. package/package.json +1 -1
  22. package/src/OverStyling.stories.tsx +22 -0
  23. package/src/components/Button/Button.stories.tsx +11 -0
  24. package/src/components/Button/Button.tsx +7 -1
  25. package/src/components/Card/Card.tsx +1 -1
  26. package/src/components/Container/Container.tsx +13 -17
  27. package/src/components/Flex/Flex.tsx +13 -17
  28. package/src/components/Group/Group.tsx +13 -17
  29. package/src/components/Link/IMPLEMENTATION_NOTES.md +26 -0
  30. package/src/components/Link/Link.module.css +133 -0
  31. package/src/components/Link/Link.stories.tsx +46 -4
  32. package/src/components/Link/Link.tsx +82 -5
  33. package/src/components/Link/index.ts +1 -0
  34. package/src/components/Pagination/IMPLEMENTATION_NOTES.md +16 -0
  35. package/src/components/Pagination/Pagination.icons.tsx +66 -0
  36. package/src/components/Pagination/Pagination.module.css +225 -0
  37. package/src/components/Pagination/Pagination.stories.tsx +43 -4
  38. package/src/components/Pagination/Pagination.tsx +214 -4
  39. package/src/components/Pagination/index.ts +5 -0
  40. package/src/components/Panel/Panel.stories.tsx +1 -1
  41. package/src/components/SegmentedControl/IMPLEMENTATION_NOTES.md +17 -0
  42. package/src/components/SegmentedControl/SegmentedControl.module.css +138 -0
  43. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +108 -6
  44. package/src/components/SegmentedControl/SegmentedControl.tsx +96 -5
  45. package/src/components/Stack/Stack.tsx +13 -17
  46. package/src/components/Stepper/Stepper.module.css +353 -0
  47. package/src/components/Stepper/Stepper.stories.tsx +135 -4
  48. package/src/components/Stepper/Stepper.tsx +68 -5
  49. package/src/components/Tabs/Tabs.module.css +401 -0
  50. package/src/components/Tabs/Tabs.stories.tsx +141 -4
  51. package/src/components/Tabs/Tabs.tsx +107 -5
  52. package/src/components/index.ts +0 -2
  53. package/dist/src/components/Popover/Popover.d.ts +0 -3
  54. package/dist/src/components/Search/Search.d.ts +0 -3
  55. package/src/components/Popover/Popover.stories.tsx +0 -17
  56. package/src/components/Popover/Popover.tsx +0 -7
  57. package/src/components/Search/Search.stories.tsx +0 -17
  58. package/src/components/Search/Search.tsx +0 -7
@@ -11,9 +11,15 @@ export type ButtonProps = RecursicaOverStyled<Omit<MantineButtonProps, "variant"
11
11
  * Recursica Button component wrapping Mantine's Button.
12
12
  *
13
13
  * Supports polymorphism via the `component` prop or `renderRoot` for custom element rendering.
14
+ * This is particularly useful when you need a button that behaves as a hyperlink (rendering an `<a>` tag)
15
+ * or integrates with a routing library (e.g., `react-router-dom` or Next.js), while preserving full visual styling.
16
+ *
14
17
  * @example
15
18
  * ```tsx
16
- * <Button component="a" href="/dashboard">Navigate</Button>
19
+ * // Renders as an <a> tag natively
20
+ * <Button component="a" href="/dashboard" target="_blank">Navigate</Button>
21
+ *
22
+ * // Renders using a custom router link
17
23
  * <Button renderRoot={(props) => <Link to="/home" {...props} />}>Home</Button>
18
24
  * ```
19
25
  */
@@ -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,33 @@
1
1
  import { default as React } from 'react';
2
- export type LinkProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const Link: React.FC<LinkProps>;
2
+ import { AnchorProps as MantineAnchorProps } from '@mantine/core';
3
+ import { RecursicaOverStyled } from '../../utils/filterStylingProps';
4
+ export interface RecursicaLinkProps {
5
+ /**
6
+ * Optional leading icon to display next to the link text.
7
+ */
8
+ icon?: React.ReactNode;
9
+ /**
10
+ * The text or elements to display inside the link.
11
+ */
12
+ children?: React.ReactNode;
13
+ }
14
+ export type LinkProps = RecursicaOverStyled<Omit<MantineAnchorProps, "underline"> & RecursicaLinkProps>;
15
+ /**
16
+ * Recursica Link component wrapping Mantine's Anchor.
17
+ *
18
+ * Supports polymorphism via the `component` prop or `renderRoot` for custom element rendering (e.g. react-router Link).
19
+ * @example
20
+ * ```tsx
21
+ * <Link component="a" href="https://example.com">External Link</Link>
22
+ * <Link renderRoot={(props) => <RouterLink to="/home" {...props} />}>Home</Link>
23
+ * ```
24
+ */
25
+ export declare const Link: (<C = "a">(props: import('@mantine/core').PolymorphicComponentProps<C, LinkProps>) => React.ReactElement) & Omit<React.FunctionComponent<((LinkProps & {
26
+ component?: any;
27
+ }) & 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" | "top" | "left" | "bottom" | "right" | "color" | "children" | "__vars" | "__size" | "hiddenFrom" | "visibleFrom" | "lightHidden" | "darkHidden" | "mod" | "ms" | "me" | "ps" | "pe" | "bdrs" | "bgsz" | "bgp" | "bgr" | "bga" | "pos" | "inset" | "display" | "flex" | "unstyled" | "variant" | "attributes" | "overStyled" | "icon" | "inherit" | "inline" | "size" | "gradient" | "component" | "__staticSelector" | "lineClamp" | "truncate"> & {
28
+ ref?: any;
29
+ renderRoot?: (props: any) => any;
30
+ }) | (LinkProps & {
31
+ component: React.ElementType;
32
+ renderRoot?: (props: Record<string, any>) => any;
33
+ })>, never> & Record<string, never>;
@@ -0,0 +1 @@
1
+ export * from './Link';
@@ -1,3 +1,51 @@
1
1
  import { default as React } from 'react';
2
- export type PaginationProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const Pagination: React.FC<PaginationProps>;
2
+ import { Pagination as MantinePagination, PaginationProps as MantinePaginationProps, PaginationRootProps as MantinePaginationRootProps } from '@mantine/core';
3
+ import { RecursicaOverStyled } from '../../utils/filterStylingProps';
4
+ import { PaginationIcon } from './Pagination.icons';
5
+ export type PaginationProps = RecursicaOverStyled<MantinePaginationProps> & {
6
+ /** If set to true, displays text labels alongside the icons for next/previous/first/last edges. */
7
+ withLabels?: boolean;
8
+ };
9
+ export type PaginationRootProps = RecursicaOverStyled<MantinePaginationRootProps>;
10
+ export type PaginationEdgeProps<T extends React.ElementType> = React.ComponentProps<T> & {
11
+ /** If set to true, displays text labels alongside the icon. */
12
+ withLabel?: boolean;
13
+ icon?: any;
14
+ };
15
+ declare const _PaginationRoot: React.ForwardRefExoticComponent<PaginationRootProps & React.RefAttributes<HTMLDivElement>>;
16
+ declare const _PaginationNext: React.ForwardRefExoticComponent<{
17
+ /** If set to true, displays text labels alongside the icon. */
18
+ withLabel?: boolean;
19
+ icon?: any;
20
+ } & React.RefAttributes<HTMLButtonElement>>;
21
+ declare const _PaginationPrevious: React.ForwardRefExoticComponent<{
22
+ /** If set to true, displays text labels alongside the icon. */
23
+ withLabel?: boolean;
24
+ icon?: any;
25
+ } & React.RefAttributes<HTMLButtonElement>>;
26
+ declare const _PaginationFirst: React.ForwardRefExoticComponent<{
27
+ /** If set to true, displays text labels alongside the icon. */
28
+ withLabel?: boolean;
29
+ icon?: any;
30
+ } & React.RefAttributes<HTMLButtonElement>>;
31
+ declare const _PaginationLast: React.ForwardRefExoticComponent<{
32
+ /** If set to true, displays text labels alongside the icon. */
33
+ withLabel?: boolean;
34
+ icon?: any;
35
+ } & React.RefAttributes<HTMLButtonElement>>;
36
+ declare const _Pagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLDivElement>>;
37
+ /**
38
+ * Recursica Pagination component wrapping Mantine's Pagination.
39
+ */
40
+ export declare const Pagination: typeof _Pagination & {
41
+ Root: typeof _PaginationRoot;
42
+ Items: typeof MantinePagination.Items;
43
+ Control: typeof MantinePagination.Control;
44
+ Dots: typeof MantinePagination.Dots;
45
+ Next: typeof _PaginationNext;
46
+ Previous: typeof _PaginationPrevious;
47
+ First: typeof _PaginationFirst;
48
+ Last: typeof _PaginationLast;
49
+ Icon: typeof PaginationIcon;
50
+ };
51
+ export {};
@@ -0,0 +1,8 @@
1
+ export type PaginationIconType = "next" | "prev" | "first" | "last";
2
+ export declare const PaginationIcon: ({ type, className, ...props }: React.ComponentProps<"svg"> & {
3
+ type: PaginationIconType;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const NextWithLabel: (props: any) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const PrevWithLabel: (props: any) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const FirstWithLabel: (props: any) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const LastWithLabel: (props: any) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { Pagination, type PaginationProps, type PaginationRootProps, } from './Pagination';
@@ -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.15.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>
@@ -101,3 +101,14 @@ export const DisabledSolid: Story = {
101
101
  disabled: true,
102
102
  },
103
103
  };
104
+
105
+ export const PolymorphicAsLink: Story = {
106
+ args: {
107
+ children: "Button as Link",
108
+ variant: "solid",
109
+ size: "default",
110
+ component: "a",
111
+ href: "https://example.com",
112
+ target: "_blank",
113
+ },
114
+ };
@@ -123,9 +123,15 @@ _Button.displayName = "Button";
123
123
  * Recursica Button component wrapping Mantine's Button.
124
124
  *
125
125
  * Supports polymorphism via the `component` prop or `renderRoot` for custom element rendering.
126
+ * This is particularly useful when you need a button that behaves as a hyperlink (rendering an `<a>` tag)
127
+ * or integrates with a routing library (e.g., `react-router-dom` or Next.js), while preserving full visual styling.
128
+ *
126
129
  * @example
127
130
  * ```tsx
128
- * <Button component="a" href="/dashboard">Navigate</Button>
131
+ * // Renders as an <a> tag natively
132
+ * <Button component="a" href="/dashboard" target="_blank">Navigate</Button>
133
+ *
134
+ * // Renders using a custom router link
129
135
  * <Button renderRoot={(props) => <Link to="/home" {...props} />}>Home</Button>
130
136
  * ```
131
137
  */
@@ -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>