@recursica/mantine-adapter 0.19.0 → 0.20.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.
@@ -15,4 +15,12 @@ export interface RecursicaStackProps {
15
15
  * width, height, padding, margins, and flexbox alignment props to construct structural layouts.
16
16
  */
17
17
  export type StackProps = MantineStackProps & RecursicaStackProps;
18
- export declare const Stack: import('react').ForwardRefExoticComponent<MantineStackProps & RecursicaStackProps & import('react').RefAttributes<HTMLDivElement>>;
18
+ export declare const Stack: (<C = "div">(props: import('@mantine/core').PolymorphicComponentProps<C, StackProps>) => React.ReactElement) & Omit<import('react').FunctionComponent<(MantineStackProps & RecursicaStackProps & {
19
+ component?: any;
20
+ } & 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" | "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" | "align"> & {
21
+ ref?: any;
22
+ renderRoot?: (props: any) => any;
23
+ }) | (MantineStackProps & RecursicaStackProps & {
24
+ component: React.ElementType;
25
+ renderRoot?: (props: Record<string, any>) => any;
26
+ })>, never> & Record<string, never>;
@@ -25,6 +25,7 @@ export declare const BLOCKED_STYLING_KEYS: readonly ["className", "classNames",
25
25
  export type BlockedStylingKeys = (typeof BLOCKED_STYLING_KEYS)[number];
26
26
  export type RecursicaSpacing = "rec-none" | "rec-sm" | "rec-default" | "rec-md" | "rec-lg" | "rec-xl" | "rec-2xl";
27
27
  export type RecursicaSize = "small" | "default" | "large";
28
+ export declare const SPACING_MAP: Record<string, string>;
28
29
  export type ForbiddenStyles = {
29
30
  [K in BlockedStylingKeys]?: never;
30
31
  };
@@ -33,4 +34,5 @@ export type RecursicaOverStyled<T> = (Omit<T, BlockedStylingKeys> & ForbiddenSty
33
34
  }) | (T & {
34
35
  overStyled: true;
35
36
  });
37
+ export declare function mapLayoutProps<T extends Record<string, unknown>>(props: T): T;
36
38
  export declare function filterStylingProps<T extends Record<string, unknown>>(props: T, overStyled?: boolean): Partial<T>;
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "url": "git+https://github.com/borderux/recursica.git",
14
14
  "directory": "packages/mantine-adapter"
15
15
  },
16
- "version": "0.19.0",
16
+ "version": "0.20.0",
17
17
  "type": "module",
18
18
  "main": "./dist/mantine-adapter.cjs",
19
19
  "module": "./dist/mantine-adapter.js",
@@ -1,75 +1,49 @@
1
1
  import type { Meta } from "@storybook/react-vite";
2
2
  import { AdaptersContent, MantineLogo } from "@recursica/storybook-template";
3
- import { Button } from "./components/Button/Button";
4
3
  import { VersionInfo } from "./Version";
5
4
  import { OverStylingInfo } from "./OverStyling";
5
+ import {
6
+ Container,
7
+ Stack,
8
+ Group,
9
+ Title,
10
+ Text,
11
+ Link,
12
+ Button,
13
+ } from "./components";
6
14
 
7
15
  const DOCS_URL = "https://recursica.com";
8
16
  const FORGE_URL = "https://forge.recursica.com";
9
17
 
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
18
  function IntroductionContent() {
35
19
  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 }}>
20
+ <Container size="md" style={{ padding: "32px 0", maxWidth: 640 }}>
21
+ <Group gap="rec-md" mb="rec-xl" align="flex-start" wrap="nowrap">
22
+ <MantineLogo width={80} height={80} />
23
+ <Stack gap={0}>
24
+ <Title order={1} m={0}>
48
25
  Recursica Design System (Mantine Adapter)
49
- </h1>
50
- <a
51
- href="https://mantine.dev"
52
- target="_blank"
53
- rel="noreferrer"
54
- style={linkStyle}
55
- >
26
+ </Title>
27
+ <Link href="https://mantine.dev" target="_blank" rel="noreferrer">
56
28
  mantine.dev
57
- </a>
58
- </div>
59
- </div>
60
- <p style={{ ...bodyStyle, marginBottom: 24 }}>
29
+ </Link>
30
+ </Stack>
31
+ </Group>
32
+ <Text mb="rec-xl">
61
33
  This Storybook showcases the Recursica design system implemented for the{" "}
62
34
  <strong>Mantine UI Kit</strong>. It provides reusable components that
63
35
  map our design tokens to Mantine's robust component layer.
64
- </p>
36
+ </Text>
65
37
 
66
- <section style={sectionStyle}>
67
- <h2 style={headingStyle}>Looking for another UI Kit?</h2>
68
- <p style={bodyStyle}>
38
+ <Stack mb="rec-xl">
39
+ <Title order={2} mb="rec-md">
40
+ Looking for another UI Kit?
41
+ </Title>
42
+ <Text mb="rec-md">
69
43
  Are you using a different UI Kit (like Material UI)? Recursica
70
44
  provides multiple adapters for different frameworks.
71
- </p>
72
- <div style={{ marginTop: "16px" }}>
45
+ </Text>
46
+ <Group mt="rec-md">
73
47
  <Button
74
48
  component="a"
75
49
  href="./?path=/story/introduction--adapters"
@@ -78,15 +52,17 @@ function IntroductionContent() {
78
52
  >
79
53
  View Supported Adapters
80
54
  </Button>
81
- </div>
82
- </section>
83
-
84
- <section style={sectionStyle}>
85
- <h2 style={headingStyle}>Installation</h2>
86
- <p style={bodyStyle}>
55
+ </Group>
56
+ </Stack>
57
+
58
+ <Stack mb="rec-xl">
59
+ <Title order={2} mb="rec-md">
60
+ Installation
61
+ </Title>
62
+ <Text mb="rec-md">
87
63
  To install the Mantine adapter in your project, run:
88
- </p>
89
- <pre
64
+ </Text>
65
+ <Stack
90
66
  style={{
91
67
  padding: 12,
92
68
  backgroundColor: "#f5f5f5",
@@ -98,60 +74,58 @@ function IntroductionContent() {
98
74
  <code>
99
75
  npm install @recursica/mantine-adapter @mantine/core @mantine/hooks
100
76
  </code>
101
- </pre>
102
- </section>
103
-
104
- <section style={sectionStyle}>
105
- <h2 style={headingStyle}>Tokens</h2>
106
- <p style={bodyStyle}>
77
+ </Stack>
78
+ </Stack>
79
+
80
+ <Stack mb="rec-xl">
81
+ <Title order={2} mb="rec-md">
82
+ Tokens
83
+ </Title>
84
+ <Text mb="rec-md">
107
85
  Raw design tokens (colors, sizes, font weights, opacities, etc.) that
108
86
  feed the theme and components. These are the primitive values defined
109
87
  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}>
88
+ </Text>
89
+ </Stack>
90
+
91
+ <Stack mb="rec-xl">
92
+ <Title order={2} mb="rec-md">
93
+ Theme
94
+ </Title>
95
+ <Text mb="rec-md">
116
96
  Brand and theme layer built on top of tokens. Typography types,
117
97
  dimensions, and layout grids are defined here. Theme uses the tokens
118
98
  and exposes both CSS variables and helper classes (e.g. typography
119
99
  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}>
100
+ </Text>
101
+ </Stack>
102
+
103
+ <Stack mb="rec-xl">
104
+ <Title order={2} mb="rec-md">
105
+ Configuring Recursica
106
+ </Title>
107
+ <Text mb="rec-md">
126
108
  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
- >
109
+ <Link href={FORGE_URL} target="_blank" rel="noopener noreferrer">
133
110
  {FORGE_URL}
134
- </a>
111
+ </Link>
135
112
  . 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}>
113
+ </Text>
114
+ </Stack>
115
+
116
+ <Stack mb="rec-xl">
117
+ <Title order={2} mb="rec-md">
118
+ Documentation
119
+ </Title>
120
+ <Text mb="rec-md">
142
121
  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
- >
122
+ <Link href={DOCS_URL} target="_blank" rel="noopener noreferrer">
149
123
  {DOCS_URL}
150
- </a>
124
+ </Link>
151
125
  .
152
- </p>
153
- </section>
154
- </div>
126
+ </Text>
127
+ </Stack>
128
+ </Container>
155
129
  );
156
130
  }
157
131