@recursica/mantine-adapter 0.17.0 → 0.19.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 (42) 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 +1642 -1357
  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/Modal/Modal.d.ts +39 -2
  10. package/dist/src/components/Modal/index.d.ts +1 -0
  11. package/dist/src/components/Popover/Popover.d.ts +55 -0
  12. package/dist/src/components/Popover/index.d.ts +1 -0
  13. package/dist/src/components/Timeline/Timeline.d.ts +14 -2
  14. package/dist/src/components/Timeline/TimelineItem.d.ts +25 -0
  15. package/dist/src/components/Toast/Toast.d.ts +21 -2
  16. package/dist/src/components/Toast/index.d.ts +1 -0
  17. package/dist/src/components/index.d.ts +2 -1
  18. package/package.json +4 -3
  19. package/src/Introduction.stories.tsx +180 -0
  20. package/src/{OverStyling.stories.tsx → OverStyling.tsx} +1 -11
  21. package/src/{Version.stories.tsx → Version.tsx} +1 -13
  22. package/src/components/Modal/MODAL_IMPLEMENTATION_NOTES.md +15 -0
  23. package/src/components/Modal/Modal.module.css +127 -0
  24. package/src/components/Modal/Modal.stories.tsx +66 -4
  25. package/src/components/Modal/Modal.tsx +218 -3
  26. package/src/components/Modal/index.ts +1 -0
  27. package/src/components/Popover/IMPLEMENTATION_NOTES.md +77 -0
  28. package/src/components/Popover/Popover.module.css +84 -0
  29. package/src/components/Popover/Popover.stories.tsx +133 -0
  30. package/src/components/Popover/Popover.tsx +156 -0
  31. package/src/components/Popover/index.ts +1 -0
  32. package/src/components/Timeline/TIMELINE_IMPLEMENTATION_NOTES.md +13 -0
  33. package/src/components/Timeline/Timeline.module.css +361 -0
  34. package/src/components/Timeline/Timeline.stories.tsx +114 -3
  35. package/src/components/Timeline/Timeline.tsx +81 -4
  36. package/src/components/Timeline/TimelineItem.tsx +102 -0
  37. package/src/components/Toast/TOAST_IMPLEMENTATION_NOTES.md +39 -0
  38. package/src/components/Toast/Toast.module.css +109 -0
  39. package/src/components/Toast/Toast.stories.tsx +57 -7
  40. package/src/components/Toast/Toast.tsx +90 -4
  41. package/src/components/Toast/index.ts +1 -0
  42. package/src/components/index.ts +2 -1
@@ -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,3 +1,40 @@
1
1
  import { default as React } from 'react';
2
- export type ModalProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const Modal: React.FC<ModalProps>;
2
+ import { Modal as MantineModal, ModalProps as MantineModalProps } from '@mantine/core';
3
+ import { RecursicaOverStyled } from '../../utils/filterStylingProps';
4
+ /**
5
+ * Properties for the strictly-tokenized Modal component.
6
+ * Native Mantine abstract properties like `size`, `radius`, and `shadow` have been stripped out
7
+ * because they directly conflict with the non-negotiable pixel boundaries defined in the Recursica UI Kit.
8
+ */
9
+ export type ModalProps = RecursicaOverStyled<Omit<MantineModalProps, "size" | "radius" | "shadow">>;
10
+ /**
11
+ * The `Modal.Footer` provides a perfectly padded container for modal actions.
12
+ *
13
+ * **Recursica Abstract:**
14
+ * By default, this container aligns its children to the right (`justify-content: flex-end`)
15
+ * and applies the standard Figma button-gap spacing.
16
+ *
17
+ * > [!IMPORTANT]
18
+ * > **Button Hierarchy:** Recursica design language explicitly requires that the
19
+ * > primary action button MUST be the right-most element, with the secondary
20
+ * > (outline variant) action placed immediately to the left of it.
21
+ */
22
+ declare const ModalFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const ModalBody: React.ForwardRefExoticComponent<Omit<import('@mantine/core').ModalBodyProps & React.RefAttributes<HTMLDivElement> & {
24
+ component?: any;
25
+ renderRoot?: (props: Record<string, any>) => React.ReactNode;
26
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
27
+ interface ModalComponent extends React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>> {
28
+ Root: typeof MantineModal.Root;
29
+ Overlay: typeof MantineModal.Overlay;
30
+ Content: typeof MantineModal.Content;
31
+ Header: typeof MantineModal.Header;
32
+ Title: typeof MantineModal.Title;
33
+ CloseButton: typeof MantineModal.CloseButton;
34
+ Body: typeof ModalBody;
35
+ Footer: typeof ModalFooter;
36
+ }
37
+ export declare const Modal: ModalComponent & {
38
+ Footer: typeof ModalFooter;
39
+ };
40
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Modal';
@@ -0,0 +1,55 @@
1
+ import { PopoverProps as MantinePopoverProps, PopoverTargetProps as MantinePopoverTargetProps, PopoverDropdownProps as MantinePopoverDropdownProps } from '@mantine/core';
2
+ import { RecursicaOverStyled } from '../../utils/filterStylingProps';
3
+ /**
4
+ * Recursica-specific props for Popover.
5
+ */
6
+ export interface RecursicaPopoverProps {
7
+ /**
8
+ * Whether to display a beak (arrow) pointing from the dropdown to the target.
9
+ * This is the Recursica equivalent of Mantine's `withArrow`.
10
+ * When both `withBeak` and `withArrow` are provided, `withBeak` takes precedence.
11
+ */
12
+ withBeak?: boolean;
13
+ }
14
+ /**
15
+ * Recursica Popover component wrapping Mantine's composable Popover.
16
+ *
17
+ * Displays a dropdown panel when the user clicks or interacts with a target element.
18
+ * Uses the composable dot-notation pattern:
19
+ * ```tsx
20
+ * <Popover withBeak>
21
+ * <Popover.Target>
22
+ * <Button>Click me</Button>
23
+ * </Popover.Target>
24
+ * <Popover.Dropdown>
25
+ * Content displayed in popover
26
+ * </Popover.Dropdown>
27
+ * </Popover>
28
+ * ```
29
+ */
30
+ export type PopoverProps = RecursicaOverStyled<MantinePopoverProps & RecursicaPopoverProps>;
31
+ declare const PopoverBase: {
32
+ ({ overStyled, withBeak, ...rest }: PopoverProps): import("react/jsx-runtime").JSX.Element;
33
+ displayName: string;
34
+ };
35
+ /**
36
+ * Wrapper for the element that triggers the popover.
37
+ * Requires a single child element that supports ref forwarding.
38
+ */
39
+ export type PopoverTargetProps = MantinePopoverTargetProps;
40
+ declare const PopoverTarget: {
41
+ (props: PopoverTargetProps): import("react/jsx-runtime").JSX.Element;
42
+ displayName: string;
43
+ };
44
+ /** The dropdown panel displayed from the popover. */
45
+ export type PopoverDropdownProps = RecursicaOverStyled<MantinePopoverDropdownProps>;
46
+ declare const PopoverDropdown: {
47
+ ({ overStyled, ...rest }: PopoverDropdownProps): import("react/jsx-runtime").JSX.Element;
48
+ displayName: string;
49
+ };
50
+ type PopoverComponent = typeof PopoverBase & {
51
+ Target: typeof PopoverTarget;
52
+ Dropdown: typeof PopoverDropdown;
53
+ };
54
+ export declare const Popover: PopoverComponent;
55
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Popover';
@@ -1,3 +1,15 @@
1
1
  import { default as React } from 'react';
2
- export type TimelineProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const Timeline: React.FC<TimelineProps>;
2
+ import { TimelineProps as MantineTimelineProps } from '@mantine/core';
3
+ import { RecursicaOverStyled } from '../../utils/filterStylingProps';
4
+ import { TimelineItem } from './TimelineItem';
5
+ /**
6
+ * Properties for the strictly-tokenized Timeline component.
7
+ * Native Mantine abstract properties like `color`, `radius`, `bulletSize`, and `lineWidth`
8
+ * have been stripped out to strictly enforce the structural mappings of the Recursica UI Kit.
9
+ */
10
+ export type TimelineProps = RecursicaOverStyled<Omit<MantineTimelineProps, "color" | "radius" | "bulletSize" | "lineWidth">>;
11
+ interface TimelineComponent extends React.ForwardRefExoticComponent<TimelineProps & React.RefAttributes<HTMLDivElement>> {
12
+ Item: typeof TimelineItem;
13
+ }
14
+ export declare const Timeline: TimelineComponent;
15
+ export {};
@@ -0,0 +1,25 @@
1
+ import { default as React } from 'react';
2
+ import { TimelineItemProps as MantineTimelineItemProps } from '@mantine/core';
3
+ import { RecursicaOverStyled } from '../../utils/filterStylingProps';
4
+ export interface RecursicaTimelineItemProps {
5
+ /**
6
+ * Timestamp text displayed below the description.
7
+ */
8
+ timestamp?: React.ReactNode;
9
+ /**
10
+ * The structural styling variant of the bullet container.
11
+ * Maps to the UI Kit structural tokens.
12
+ * @default "default"
13
+ */
14
+ bulletVariant?: "default" | "avatar" | "icon" | "icon-alternative";
15
+ }
16
+ export type TimelineItemProps = RecursicaOverStyled<Omit<MantineTimelineItemProps, "radius" | "color" | "lineVariant"> & RecursicaTimelineItemProps>;
17
+ /**
18
+ * The individual item component for the Timeline.
19
+ *
20
+ * **Recursica Abstract:**
21
+ * The `Timeline.Item` has been extended to support a `timestamp` string natively,
22
+ * rendering it below the body content. It also accepts a `bulletVariant` to morph
23
+ * the structural dimensions of the node circle automatically.
24
+ */
25
+ export declare const TimelineItem: React.ForwardRefExoticComponent<TimelineItemProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,3 +1,22 @@
1
1
  import { default as React } from 'react';
2
- export type ToastProps = React.HTMLAttributes<HTMLDivElement>;
3
- export declare const Toast: React.FC<ToastProps>;
2
+ import { NotificationProps as MantineNotificationProps } from '@mantine/core';
3
+ import { RecursicaOverStyled } from '../../utils/filterStylingProps';
4
+ export interface RecursicaToastProps {
5
+ /**
6
+ * The visual variant of the toast.
7
+ * @default "default"
8
+ */
9
+ variant?: "default";
10
+ /**
11
+ * Loading state is natively unsupported by Recursica UI Kit.
12
+ * If a loading state is required, pass a `<Loader size="sm" />` directly into the `icon` prop.
13
+ */
14
+ loading?: false;
15
+ }
16
+ /**
17
+ * Toast component wrapping Mantine's Notification.
18
+ *
19
+ * Can be used as a standalone visual component to display a notification or message.
20
+ */
21
+ export type ToastProps = RecursicaOverStyled<Omit<MantineNotificationProps, "color" | "radius" | "variant" | "loading"> & RecursicaToastProps>;
22
+ export declare const Toast: React.ForwardRefExoticComponent<ToastProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export * from './Toast';
@@ -24,6 +24,7 @@ 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';
27
28
  export * from './Radio/Radio';
28
29
  export * from './Radio/RadioGroup';
29
30
  export * from './ReadOnlyField';
@@ -41,6 +42,6 @@ export * from './TextField/TextField';
41
42
  export * from './TimePicker/TimePicker';
42
43
  export * from './Timeline/Timeline';
43
44
  export * from './Title/Title';
44
- export * from './Toast/Toast';
45
+ export * from './Toast';
45
46
  export * from './Tooltip/Tooltip';
46
47
  export * from './TransferList/TransferList';
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.17.0",
16
+ "version": "0.19.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">
@@ -185,12 +184,3 @@ const OverStylingInfo = () => {
185
184
  </Container>
186
185
  );
187
186
  };
188
-
189
- const meta: Meta<typeof OverStylingInfo> = {
190
- title: "Introduction/Over Styling",
191
- component: OverStylingInfo,
192
- };
193
-
194
- export default meta;
195
-
196
- 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 = {};
@@ -0,0 +1,15 @@
1
+ # Modal Implementation Notes
2
+
3
+ ## Architecture
4
+
5
+ The `Modal` component strictly wraps Mantine's `<Modal>` primitive. We strip Mantine's abstract native styling props (`size`, `radius`, `shadow`) via the `overStyled` interface and strictly inject CSS variable definitions onto the internal node abstractions (`.content`, `.header`, `.body`, `.title`).
6
+
7
+ ## Limitations & Structural Decisions
8
+
9
+ ### 1. Stripped `size` Prop
10
+
11
+ Mantine natively exposes an abstract `size` prop (`"sm" | "md" | "lg" | "xl"`) that scales the Modal geometry. The Recursica UI Kit explicitly dictates strict geometric bounding boxes: `max-width: 960px` and `min-width: 304px`. To enforce absolute parity with the design system, the `size` prop has been intentionally omitted from the component's interface. The width of the Modal will scale fluidly strictly between these Figma-driven pixel limits.
12
+
13
+ ### 2. Scroll Dividers behavior
14
+
15
+ Mantine internally handles scroll state natively, dynamically showing/hiding a divider line when content overflows in `.body`. This logic is tightly coupled to React DOM measurements internally. Our component inherits this dynamic behavior rather than statically rendering a permanent divider, matching Mantine's robust overflow UX. However, we aggressively override the generated `border-bottom` via CSS modules to ensure that when it _does_ appear, it correctly utilizes the `--recursica_ui-kit_components_modal_colors_scroll-divider` variable and `--recursica_ui-kit_components_modal_properties_scroll-divider-thickness` token.
@@ -0,0 +1,127 @@
1
+ .root {
2
+ }
3
+
4
+ .inner {
5
+ /* Mantine applies padding to inner to keep modal away from edges. We rely on content constraints. */
6
+ }
7
+
8
+ .content {
9
+ /* Geometric Bounds */
10
+ min-width: var(
11
+ --recursica_ui-kit_components_modal_properties_min-width
12
+ ) !important;
13
+ max-width: var(
14
+ --recursica_ui-kit_components_modal_properties_max-width
15
+ ) !important;
16
+ min-height: var(
17
+ --recursica_ui-kit_components_modal_properties_min-height
18
+ ) !important;
19
+
20
+ /* Restrict max-height to either the UI Kit max or the viewport bounds to force internal scrolling */
21
+ max-height: min(
22
+ var(--recursica_ui-kit_components_modal_properties_max-height),
23
+ calc(100vh - 4rem)
24
+ ) !important;
25
+ overflow: hidden !important;
26
+
27
+ /* Box model */
28
+ border-radius: var(
29
+ --recursica_ui-kit_components_modal_properties_border-radius
30
+ ) !important;
31
+ border-width: var(
32
+ --recursica_ui-kit_components_modal_properties_border-size
33
+ ) !important;
34
+ border-color: var(
35
+ --recursica_ui-kit_components_modal_colors_border-color
36
+ ) !important;
37
+ border-style: solid !important;
38
+
39
+ /* Appearance */
40
+ background-color: var(
41
+ --recursica_ui-kit_components_modal_colors_background
42
+ ) !important;
43
+ box-shadow: var(
44
+ --recursica_ui-kit_components_modal_properties_elevation
45
+ ) !important;
46
+
47
+ /* Internal Flex container to trap header and let body scroll */
48
+ display: flex !important;
49
+ flex-direction: column !important;
50
+ }
51
+
52
+ .header {
53
+ padding: var(--recursica_ui-kit_components_modal_properties_vertical-padding)
54
+ var(--recursica_ui-kit_components_modal_properties_horizontal-padding) !important;
55
+ background-color: transparent !important; /* Inherit from content */
56
+ }
57
+
58
+ .title {
59
+ /* Typography Class Injection */
60
+ composes: recursica_brand_typography_h2 from global;
61
+ color: var(--recursica_ui-kit_components_modal_colors_title) !important;
62
+ }
63
+
64
+ .bodyWrapper {
65
+ /* This is the container that overrides Mantine's native Body. It strips padding and acts as a flex column. */
66
+ padding: 0 !important;
67
+ display: flex;
68
+ flex-direction: column;
69
+ flex: 1 1 auto;
70
+ overflow: hidden !important;
71
+ min-height: 0 !important; /* Critical for flex child scrolling constraint */
72
+ }
73
+
74
+ .scrollArea {
75
+ padding: var(--recursica_ui-kit_components_modal_properties_vertical-padding)
76
+ var(--recursica_ui-kit_components_modal_properties_horizontal-padding) !important;
77
+
78
+ /* Internal scrolling */
79
+ flex: 1 1 auto;
80
+ overflow-y: auto !important;
81
+ min-height: 0 !important; /* Critical for flex child scrolling constraint */
82
+
83
+ /* Typography */
84
+ composes: recursica_brand_typography_body from global;
85
+ color: var(--recursica_ui-kit_components_modal_colors_content) !important;
86
+
87
+ /* Ensure button gap token is easily usable if developers use standard spacing */
88
+ --modal-button-gap: var(
89
+ --recursica_ui-kit_components_modal_properties_button-gap
90
+ );
91
+
92
+ /* Smooth divider transitions */
93
+ transition: border-color 0.15s ease;
94
+ border-top: var(
95
+ --recursica_ui-kit_components_modal_properties_scroll-divider-thickness
96
+ )
97
+ solid transparent !important;
98
+ border-bottom: var(
99
+ --recursica_ui-kit_components_modal_properties_scroll-divider-thickness
100
+ )
101
+ solid transparent !important;
102
+ }
103
+
104
+ .scrollArea[data-scrolled-top] {
105
+ border-top-color: var(
106
+ --recursica_ui-kit_components_modal_colors_scroll-divider
107
+ ) !important;
108
+ }
109
+
110
+ .scrollArea[data-scrolled-bottom] {
111
+ border-bottom-color: var(
112
+ --recursica_ui-kit_components_modal_colors_scroll-divider
113
+ ) !important;
114
+ }
115
+
116
+ .footer {
117
+ padding: var(--recursica_ui-kit_components_modal_properties_vertical-padding)
118
+ var(--recursica_ui-kit_components_modal_properties_horizontal-padding) !important;
119
+ background-color: transparent !important;
120
+ display: flex;
121
+ justify-content: flex-end;
122
+ gap: var(--recursica_ui-kit_components_modal_properties_button-gap);
123
+ }
124
+
125
+ .close {
126
+ /* Inherits standard icon button tokens natively, but we can override if required */
127
+ }