@recursica/mantine-adapter 0.18.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.
- package/CHANGELOG.md +12 -0
- package/dist/mantine-adapter.cjs +1 -1
- package/dist/mantine-adapter.cjs.map +1 -1
- package/dist/mantine-adapter.css +1 -1
- package/dist/mantine-adapter.js +1654 -1366
- package/dist/mantine-adapter.js.map +1 -1
- package/dist/src/components/Modal/Modal.d.ts +39 -2
- package/dist/src/components/Modal/index.d.ts +1 -0
- package/dist/src/components/Popover/Popover.d.ts +55 -0
- package/dist/src/components/Popover/index.d.ts +1 -0
- package/dist/src/components/Stack/Stack.d.ts +9 -1
- package/dist/src/components/Timeline/Timeline.d.ts +14 -2
- package/dist/src/components/Timeline/TimelineItem.d.ts +25 -0
- package/dist/src/components/Toast/Toast.d.ts +21 -2
- package/dist/src/components/Toast/index.d.ts +1 -0
- package/dist/src/components/index.d.ts +2 -1
- package/dist/src/utils/filterStylingProps.d.ts +2 -0
- package/package.json +1 -1
- package/src/Introduction.stories.tsx +77 -103
- package/src/OverStyling.tsx +216 -171
- package/src/components/Button/Button.module.css +21 -4
- package/src/components/Button/Button.stories.tsx +14 -0
- package/src/components/Flex/Flex.tsx +9 -4
- package/src/components/Group/Group.tsx +5 -3
- package/src/components/Modal/MODAL_IMPLEMENTATION_NOTES.md +15 -0
- package/src/components/Modal/Modal.module.css +127 -0
- package/src/components/Modal/Modal.stories.tsx +66 -4
- package/src/components/Modal/Modal.tsx +218 -3
- package/src/components/Modal/index.ts +1 -0
- package/src/components/Popover/IMPLEMENTATION_NOTES.md +77 -0
- package/src/components/Popover/Popover.module.css +84 -0
- package/src/components/Popover/Popover.stories.tsx +133 -0
- package/src/components/Popover/Popover.tsx +156 -0
- package/src/components/Popover/index.ts +1 -0
- package/src/components/Stack/Stack.tsx +9 -5
- package/src/components/Timeline/TIMELINE_IMPLEMENTATION_NOTES.md +13 -0
- package/src/components/Timeline/Timeline.module.css +361 -0
- package/src/components/Timeline/Timeline.stories.tsx +114 -3
- package/src/components/Timeline/Timeline.tsx +81 -4
- package/src/components/Timeline/TimelineItem.tsx +102 -0
- package/src/components/Toast/TOAST_IMPLEMENTATION_NOTES.md +39 -0
- package/src/components/Toast/Toast.module.css +109 -0
- package/src/components/Toast/Toast.stories.tsx +57 -7
- package/src/components/Toast/Toast.tsx +90 -4
- package/src/components/Toast/index.ts +1 -0
- package/src/components/index.ts +2 -1
- package/src/utils/filterStylingProps.ts +17 -1
|
@@ -1,3 +1,40 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
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';
|
|
@@ -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('
|
|
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>;
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
3
|
-
|
|
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
|
|
45
|
+
export * from './Toast';
|
|
45
46
|
export * from './Tooltip/Tooltip';
|
|
46
47
|
export * from './TransferList/TransferList';
|
|
@@ -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
|
@@ -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
|
-
<
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
</
|
|
50
|
-
<
|
|
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
|
-
</
|
|
58
|
-
</
|
|
59
|
-
</
|
|
60
|
-
<
|
|
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
|
-
</
|
|
36
|
+
</Text>
|
|
65
37
|
|
|
66
|
-
<
|
|
67
|
-
<
|
|
68
|
-
|
|
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
|
-
</
|
|
72
|
-
<
|
|
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
|
-
</
|
|
82
|
-
</
|
|
83
|
-
|
|
84
|
-
<
|
|
85
|
-
<
|
|
86
|
-
|
|
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
|
-
</
|
|
89
|
-
<
|
|
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
|
-
</
|
|
102
|
-
</
|
|
103
|
-
|
|
104
|
-
<
|
|
105
|
-
<
|
|
106
|
-
|
|
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
|
-
</
|
|
111
|
-
</
|
|
112
|
-
|
|
113
|
-
<
|
|
114
|
-
<
|
|
115
|
-
|
|
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
|
-
</
|
|
121
|
-
</
|
|
122
|
-
|
|
123
|
-
<
|
|
124
|
-
<
|
|
125
|
-
|
|
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
|
-
<
|
|
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
|
-
</
|
|
111
|
+
</Link>
|
|
135
112
|
. Changes there drive the tokens and theme you see in this Storybook.
|
|
136
|
-
</
|
|
137
|
-
</
|
|
138
|
-
|
|
139
|
-
<
|
|
140
|
-
<
|
|
141
|
-
|
|
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
|
-
<
|
|
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
|
-
</
|
|
124
|
+
</Link>
|
|
151
125
|
.
|
|
152
|
-
</
|
|
153
|
-
</
|
|
154
|
-
</
|
|
126
|
+
</Text>
|
|
127
|
+
</Stack>
|
|
128
|
+
</Container>
|
|
155
129
|
);
|
|
156
130
|
}
|
|
157
131
|
|