@recursica/mantine-adapter 0.32.0 → 0.34.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/OVERSTYLING.md +56 -0
- package/USAGE.md +6 -4
- package/dist/mantine-adapter.cjs +2 -2
- package/dist/mantine-adapter.cjs.map +1 -1
- package/dist/mantine-adapter.js +1765 -1445
- package/dist/mantine-adapter.js.map +1 -1
- package/dist/src/components/Modal/Modal.d.ts +21 -8
- package/dist/src/components/Pagination/Pagination.d.ts +45 -25
- package/dist/src/components/Panel/Panel.d.ts +22 -8
- package/dist/src/components/Stepper/Stepper.d.ts +4 -2
- package/dist/src/components/Table/Table.d.ts +25 -9
- package/dist/src/components/Tooltip/Tooltip.d.ts +4 -2
- package/llms.txt +57 -2
- package/package.json +3 -2
- package/src/OverStyling.tsx +10 -226
- package/src/components/Accordion/USAGE.md +90 -0
- package/src/components/AssistiveElement/USAGE.md +36 -0
- package/src/components/AutoComplete/USAGE.md +66 -0
- package/src/components/Avatar/USAGE.md +65 -0
- package/src/components/Badge/USAGE.md +59 -0
- package/src/components/Breadcrumb/USAGE.md +59 -0
- package/src/components/Button/USAGE.md +100 -0
- package/src/components/Card/USAGE.md +71 -0
- package/src/components/Checkbox/USAGE.md +64 -0
- package/src/components/Chip/USAGE.md +77 -0
- package/src/components/Container/USAGE.md +47 -0
- package/src/components/DatePicker/USAGE.md +55 -0
- package/src/components/Dropdown/USAGE.md +51 -0
- package/src/components/FileInput/USAGE.md +36 -0
- package/src/components/FileUpload/USAGE.md +41 -0
- package/src/components/Flex/USAGE.md +48 -0
- package/src/components/FormControlLayout/USAGE.md +40 -0
- package/src/components/FormControlWrapper/USAGE.md +75 -0
- package/src/components/Group/USAGE.md +48 -0
- package/src/components/HoverCard/USAGE.md +121 -0
- package/src/components/Label/USAGE.md +87 -0
- package/src/components/Link/USAGE.md +69 -0
- package/src/components/Loader/USAGE.md +63 -0
- package/src/components/Menu/USAGE.md +124 -0
- package/src/components/Modal/Modal.tsx +129 -23
- package/src/components/Modal/USAGE.md +58 -0
- package/src/components/NumberInput/USAGE.md +55 -0
- package/src/components/Pagination/Pagination.tsx +73 -17
- package/src/components/Pagination/USAGE.md +55 -0
- package/src/components/Panel/Panel.tsx +134 -14
- package/src/components/Panel/USAGE.md +145 -0
- package/src/components/Popover/USAGE.md +121 -0
- package/src/components/Radio/USAGE.md +36 -0
- package/src/components/ReadOnlyField/USAGE.md +52 -0
- package/src/components/SegmentedControl/USAGE.md +56 -0
- package/src/components/Slider/USAGE.md +86 -0
- package/src/components/Stack/USAGE.md +48 -0
- package/src/components/Stepper/Stepper.tsx +20 -2
- package/src/components/Stepper/USAGE.md +41 -0
- package/src/components/Switch/USAGE.md +65 -0
- package/src/components/Table/Table.tsx +153 -16
- package/src/components/Table/USAGE.md +41 -0
- package/src/components/Tabs/USAGE.md +45 -0
- package/src/components/Text/USAGE.md +40 -0
- package/src/components/TextArea/USAGE.md +48 -0
- package/src/components/TextField/USAGE.md +60 -0
- package/src/components/TimePicker/USAGE.md +36 -0
- package/src/components/Timeline/USAGE.md +57 -0
- package/src/components/Title/USAGE.md +36 -0
- package/src/components/Toast/USAGE.md +80 -0
- package/src/components/Tooltip/Tooltip.tsx +26 -2
- package/src/components/Tooltip/USAGE.md +124 -0
- package/src/components/TransferList/USAGE.md +46 -0
- package/src/components/Tree/USAGE.md +46 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ModalProps as MantineModalProps, ModalRootProps as MantineModalRootProps, ModalOverlayProps as MantineModalOverlayProps, ModalContentProps as MantineModalContentProps, ModalHeaderProps as MantineModalHeaderProps, ModalTitleProps as MantineModalTitleProps, ModalCloseButtonProps as MantineModalCloseButtonProps } from '@mantine/core';
|
|
3
3
|
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
4
4
|
import { RecursicaModalProps } from '@recursica/adapter-common';
|
|
5
5
|
/**
|
|
@@ -20,18 +20,31 @@ export type ModalProps = RecursicaOverStyled<Omit<MantineModalProps, "size" | "r
|
|
|
20
20
|
* > primary action button MUST be the right-most element, with the secondary
|
|
21
21
|
* > (outline variant) action placed immediately to the left of it.
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
export type ModalFooterProps = RecursicaOverStyled<React.ComponentPropsWithoutRef<"div">>;
|
|
24
|
+
declare const ModalFooter: React.ForwardRefExoticComponent<ModalFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
25
|
declare const ModalBody: React.ForwardRefExoticComponent<Omit<import('@mantine/core').ModalBodyProps & React.RefAttributes<HTMLDivElement> & {
|
|
25
26
|
component?: any;
|
|
26
27
|
renderRoot?: (props: Record<string, any>) => React.ReactNode;
|
|
27
28
|
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
export type ModalRootProps = RecursicaOverStyled<MantineModalRootProps>;
|
|
30
|
+
declare const ModalRoot: React.ForwardRefExoticComponent<ModalRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
export type ModalOverlayProps = RecursicaOverStyled<MantineModalOverlayProps>;
|
|
32
|
+
declare const ModalOverlay: React.ForwardRefExoticComponent<ModalOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
export type ModalContentProps = RecursicaOverStyled<MantineModalContentProps>;
|
|
34
|
+
declare const ModalContent: React.ForwardRefExoticComponent<ModalContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
export type ModalHeaderProps = RecursicaOverStyled<MantineModalHeaderProps>;
|
|
36
|
+
declare const ModalHeader: React.ForwardRefExoticComponent<ModalHeaderProps & React.RefAttributes<HTMLElement>>;
|
|
37
|
+
export type ModalTitleProps = RecursicaOverStyled<MantineModalTitleProps>;
|
|
38
|
+
declare const ModalTitle: React.ForwardRefExoticComponent<ModalTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
39
|
+
export type ModalCloseButtonProps = RecursicaOverStyled<MantineModalCloseButtonProps>;
|
|
40
|
+
declare const ModalCloseButton: React.ForwardRefExoticComponent<ModalCloseButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
28
41
|
interface ModalComponent extends React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>> {
|
|
29
|
-
Root: typeof
|
|
30
|
-
Overlay: typeof
|
|
31
|
-
Content: typeof
|
|
32
|
-
Header: typeof
|
|
33
|
-
Title: typeof
|
|
34
|
-
CloseButton: typeof
|
|
42
|
+
Root: typeof ModalRoot;
|
|
43
|
+
Overlay: typeof ModalOverlay;
|
|
44
|
+
Content: typeof ModalContent;
|
|
45
|
+
Header: typeof ModalHeader;
|
|
46
|
+
Title: typeof ModalTitle;
|
|
47
|
+
CloseButton: typeof ModalCloseButton;
|
|
35
48
|
Body: typeof ModalBody;
|
|
36
49
|
Footer: typeof ModalFooter;
|
|
37
50
|
}
|
|
@@ -1,45 +1,65 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { Pagination as MantinePagination, PaginationProps as MantinePaginationProps, PaginationRootProps as MantinePaginationRootProps } from '@mantine/core';
|
|
2
|
+
import { Pagination as MantinePagination, PaginationProps as MantinePaginationProps, PaginationRootProps as MantinePaginationRootProps, PaginationControlProps as MantinePaginationControlProps, PaginationDotsProps as MantinePaginationDotsProps } from '@mantine/core';
|
|
3
3
|
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
4
4
|
import { PaginationIcon } from './Pagination.icons';
|
|
5
5
|
import { RecursicaPaginationProps } from '@recursica/adapter-common';
|
|
6
6
|
export type PaginationProps = RecursicaOverStyled<MantinePaginationProps & RecursicaPaginationProps>;
|
|
7
7
|
export type PaginationRootProps = RecursicaOverStyled<MantinePaginationRootProps>;
|
|
8
|
-
export type PaginationEdgeProps<T extends React.ElementType> = React.ComponentProps<T> & {
|
|
8
|
+
export type PaginationEdgeProps<T extends React.ElementType> = RecursicaOverStyled<React.ComponentProps<T> & {
|
|
9
9
|
/** If set to true, displays text labels alongside the icon. */
|
|
10
10
|
withLabel?: boolean;
|
|
11
11
|
icon?: any;
|
|
12
|
-
}
|
|
12
|
+
}>;
|
|
13
13
|
declare const _PaginationRoot: React.ForwardRefExoticComponent<PaginationRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
-
declare const _PaginationNext: React.ForwardRefExoticComponent<{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} &
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
14
|
+
declare const _PaginationNext: React.ForwardRefExoticComponent<PaginationEdgeProps<(<C = "button">(props: import('@mantine/core').PolymorphicComponentProps<C, import('@mantine/core').PaginationEdgeProps>) => React.ReactElement) & Omit<React.FunctionComponent<(import('@mantine/core').PaginationEdgeProps & {
|
|
15
|
+
component?: any;
|
|
16
|
+
} & Omit<Omit<any, "ref">, "component" | keyof import('@mantine/core').PaginationEdgeProps> & {
|
|
17
|
+
ref?: any;
|
|
18
|
+
renderRoot?: (props: any) => any;
|
|
19
|
+
}) | (import('@mantine/core').PaginationEdgeProps & {
|
|
20
|
+
component: React.ElementType;
|
|
21
|
+
renderRoot?: (props: Record<string, any>) => any;
|
|
22
|
+
})>, never> & Record<string, never>> & React.RefAttributes<HTMLButtonElement>>;
|
|
23
|
+
declare const _PaginationPrevious: React.ForwardRefExoticComponent<PaginationEdgeProps<(<C = "button">(props: import('@mantine/core').PolymorphicComponentProps<C, import('@mantine/core').PaginationEdgeProps>) => React.ReactElement) & Omit<React.FunctionComponent<(import('@mantine/core').PaginationEdgeProps & {
|
|
24
|
+
component?: any;
|
|
25
|
+
} & Omit<Omit<any, "ref">, "component" | keyof import('@mantine/core').PaginationEdgeProps> & {
|
|
26
|
+
ref?: any;
|
|
27
|
+
renderRoot?: (props: any) => any;
|
|
28
|
+
}) | (import('@mantine/core').PaginationEdgeProps & {
|
|
29
|
+
component: React.ElementType;
|
|
30
|
+
renderRoot?: (props: Record<string, any>) => any;
|
|
31
|
+
})>, never> & Record<string, never>> & React.RefAttributes<HTMLButtonElement>>;
|
|
32
|
+
declare const _PaginationFirst: React.ForwardRefExoticComponent<PaginationEdgeProps<(<C = "button">(props: import('@mantine/core').PolymorphicComponentProps<C, import('@mantine/core').PaginationEdgeProps>) => React.ReactElement) & Omit<React.FunctionComponent<(import('@mantine/core').PaginationEdgeProps & {
|
|
33
|
+
component?: any;
|
|
34
|
+
} & Omit<Omit<any, "ref">, "component" | keyof import('@mantine/core').PaginationEdgeProps> & {
|
|
35
|
+
ref?: any;
|
|
36
|
+
renderRoot?: (props: any) => any;
|
|
37
|
+
}) | (import('@mantine/core').PaginationEdgeProps & {
|
|
38
|
+
component: React.ElementType;
|
|
39
|
+
renderRoot?: (props: Record<string, any>) => any;
|
|
40
|
+
})>, never> & Record<string, never>> & React.RefAttributes<HTMLButtonElement>>;
|
|
41
|
+
declare const _PaginationLast: React.ForwardRefExoticComponent<PaginationEdgeProps<(<C = "button">(props: import('@mantine/core').PolymorphicComponentProps<C, import('@mantine/core').PaginationEdgeProps>) => React.ReactElement) & Omit<React.FunctionComponent<(import('@mantine/core').PaginationEdgeProps & {
|
|
42
|
+
component?: any;
|
|
43
|
+
} & Omit<Omit<any, "ref">, "component" | keyof import('@mantine/core').PaginationEdgeProps> & {
|
|
44
|
+
ref?: any;
|
|
45
|
+
renderRoot?: (props: any) => any;
|
|
46
|
+
}) | (import('@mantine/core').PaginationEdgeProps & {
|
|
47
|
+
component: React.ElementType;
|
|
48
|
+
renderRoot?: (props: Record<string, any>) => any;
|
|
49
|
+
})>, never> & Record<string, never>> & React.RefAttributes<HTMLButtonElement>>;
|
|
34
50
|
declare const _Pagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLDivElement>>;
|
|
51
|
+
export type PaginationControlProps = RecursicaOverStyled<MantinePaginationControlProps>;
|
|
52
|
+
declare const _PaginationControl: React.ForwardRefExoticComponent<PaginationControlProps & React.RefAttributes<HTMLButtonElement>>;
|
|
53
|
+
export type PaginationDotsProps = RecursicaOverStyled<MantinePaginationDotsProps>;
|
|
54
|
+
declare const _PaginationDots: React.ForwardRefExoticComponent<PaginationDotsProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
55
|
/**
|
|
36
56
|
* Recursica Pagination component wrapping Mantine's Pagination.
|
|
37
57
|
*/
|
|
38
58
|
export declare const Pagination: typeof _Pagination & {
|
|
39
59
|
Root: typeof _PaginationRoot;
|
|
40
60
|
Items: typeof MantinePagination.Items;
|
|
41
|
-
Control: typeof
|
|
42
|
-
Dots: typeof
|
|
61
|
+
Control: typeof _PaginationControl;
|
|
62
|
+
Dots: typeof _PaginationDots;
|
|
43
63
|
Next: typeof _PaginationNext;
|
|
44
64
|
Previous: typeof _PaginationPrevious;
|
|
45
65
|
First: typeof _PaginationFirst;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Drawer as MantineDrawer, DrawerProps as MantineDrawerProps } from '@mantine/core';
|
|
1
|
+
import { Drawer as MantineDrawer, DrawerProps as MantineDrawerProps, DrawerRootProps as MantineDrawerRootProps, DrawerOverlayProps as MantineDrawerOverlayProps, DrawerContentProps as MantineDrawerContentProps, DrawerHeaderProps as MantineDrawerHeaderProps, DrawerTitleProps as MantineDrawerTitleProps, DrawerCloseButtonProps as MantineDrawerCloseButtonProps, DrawerBodyProps as MantineDrawerBodyProps } from '@mantine/core';
|
|
2
2
|
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
3
3
|
import { RecursicaPanelProps as BaseRecursicaPanelProps } from '@recursica/adapter-common';
|
|
4
4
|
/**
|
|
@@ -45,14 +45,28 @@ export type PanelFooterProps = RecursicaOverStyled<React.HTMLAttributes<HTMLDivE
|
|
|
45
45
|
* natively provide a footer.
|
|
46
46
|
*/
|
|
47
47
|
export declare const PanelFooter: import('react').ForwardRefExoticComponent<PanelFooterProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
48
|
+
export type PanelRootProps = RecursicaOverStyled<MantineDrawerRootProps>;
|
|
49
|
+
export declare const PanelRoot: import('react').ForwardRefExoticComponent<PanelRootProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
50
|
+
export type PanelOverlayProps = RecursicaOverStyled<MantineDrawerOverlayProps>;
|
|
51
|
+
export declare const PanelOverlay: import('react').ForwardRefExoticComponent<PanelOverlayProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
52
|
+
export type PanelContentProps = RecursicaOverStyled<MantineDrawerContentProps>;
|
|
53
|
+
export declare const PanelContent: import('react').ForwardRefExoticComponent<PanelContentProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
54
|
+
export type PanelHeaderProps = RecursicaOverStyled<MantineDrawerHeaderProps>;
|
|
55
|
+
export declare const PanelHeader: import('react').ForwardRefExoticComponent<PanelHeaderProps & import('react').RefAttributes<HTMLElement>>;
|
|
56
|
+
export type PanelTitleProps = RecursicaOverStyled<MantineDrawerTitleProps>;
|
|
57
|
+
export declare const PanelTitle: import('react').ForwardRefExoticComponent<PanelTitleProps & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
58
|
+
export type PanelCloseButtonProps = RecursicaOverStyled<MantineDrawerCloseButtonProps>;
|
|
59
|
+
export declare const PanelCloseButton: import('react').ForwardRefExoticComponent<PanelCloseButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
60
|
+
export type PanelBodyProps = RecursicaOverStyled<MantineDrawerBodyProps>;
|
|
61
|
+
export declare const PanelBody: import('react').ForwardRefExoticComponent<PanelBodyProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
48
62
|
type PanelComponent = typeof PanelBase & {
|
|
49
|
-
Root: typeof
|
|
50
|
-
Overlay: typeof
|
|
51
|
-
Content: typeof
|
|
52
|
-
Header: typeof
|
|
53
|
-
Title: typeof
|
|
54
|
-
CloseButton: typeof
|
|
55
|
-
Body: typeof
|
|
63
|
+
Root: typeof PanelRoot;
|
|
64
|
+
Overlay: typeof PanelOverlay;
|
|
65
|
+
Content: typeof PanelContent;
|
|
66
|
+
Header: typeof PanelHeader;
|
|
67
|
+
Title: typeof PanelTitle;
|
|
68
|
+
CloseButton: typeof PanelCloseButton;
|
|
69
|
+
Body: typeof PanelBody;
|
|
56
70
|
Stack: typeof MantineDrawer.Stack;
|
|
57
71
|
Footer: typeof PanelFooter;
|
|
58
72
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { Stepper as MantineStepper, StepperProps as MantineStepperProps } from '@mantine/core';
|
|
2
|
+
import { Stepper as MantineStepper, StepperProps as MantineStepperProps, StepperStepProps as MantineStepperStepProps } from '@mantine/core';
|
|
3
3
|
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
4
4
|
import { RecursicaStepperProps } from '@recursica/adapter-common';
|
|
5
5
|
export interface RecursicaStepperPropsExtended extends Omit<MantineStepperProps, "size">, RecursicaStepperProps {
|
|
6
6
|
}
|
|
7
7
|
export type StepperProps = RecursicaOverStyled<RecursicaStepperPropsExtended>;
|
|
8
8
|
declare const _Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export type StepperStepProps = RecursicaOverStyled<MantineStepperStepProps>;
|
|
10
|
+
declare const _StepperStep: React.ForwardRefExoticComponent<StepperStepProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
11
|
export declare const Stepper: typeof _Stepper & {
|
|
10
|
-
Step: typeof
|
|
12
|
+
Step: typeof _StepperStep;
|
|
11
13
|
Completed: typeof MantineStepper.Completed;
|
|
12
14
|
};
|
|
13
15
|
export {};
|
|
@@ -1,17 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TableProps as MantineTableProps, TableTheadProps as MantineTableTheadProps, TableTbodyProps as MantineTableTbodyProps, TableTrProps as MantineTableTrProps, TableThProps as MantineTableThProps, TableTdProps as MantineTableTdProps, TableTfootProps as MantineTableTfootProps, TableCaptionProps as MantineTableCaptionProps, TableScrollContainerProps as MantineTableScrollContainerProps } from '@mantine/core';
|
|
2
2
|
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
3
3
|
import { RecursicaTableProps } from '@recursica/adapter-common';
|
|
4
4
|
export type TableProps = RecursicaOverStyled<MantineTableProps & RecursicaTableProps>;
|
|
5
5
|
declare const TableBase: import('react').ForwardRefExoticComponent<TableProps & import('react').RefAttributes<HTMLTableElement>>;
|
|
6
|
+
export type TableTheadProps = RecursicaOverStyled<MantineTableTheadProps>;
|
|
7
|
+
export declare const TableThead: import('react').ForwardRefExoticComponent<TableTheadProps & import('react').RefAttributes<HTMLTableSectionElement>>;
|
|
8
|
+
export type TableTbodyProps = RecursicaOverStyled<MantineTableTbodyProps>;
|
|
9
|
+
export declare const TableTbody: import('react').ForwardRefExoticComponent<TableTbodyProps & import('react').RefAttributes<HTMLTableSectionElement>>;
|
|
10
|
+
export type TableTrProps = RecursicaOverStyled<MantineTableTrProps>;
|
|
11
|
+
export declare const TableTr: import('react').ForwardRefExoticComponent<TableTrProps & import('react').RefAttributes<HTMLTableRowElement>>;
|
|
12
|
+
export type TableThProps = RecursicaOverStyled<MantineTableThProps>;
|
|
13
|
+
export declare const TableTh: import('react').ForwardRefExoticComponent<TableThProps & import('react').RefAttributes<HTMLTableCellElement>>;
|
|
14
|
+
export type TableTdProps = RecursicaOverStyled<MantineTableTdProps>;
|
|
15
|
+
export declare const TableTd: import('react').ForwardRefExoticComponent<TableTdProps & import('react').RefAttributes<HTMLTableCellElement>>;
|
|
16
|
+
export type TableTfootProps = RecursicaOverStyled<MantineTableTfootProps>;
|
|
17
|
+
export declare const TableTfoot: import('react').ForwardRefExoticComponent<TableTfootProps & import('react').RefAttributes<HTMLTableSectionElement>>;
|
|
18
|
+
export type TableCaptionProps = RecursicaOverStyled<MantineTableCaptionProps>;
|
|
19
|
+
export declare const TableCaption: import('react').ForwardRefExoticComponent<TableCaptionProps & import('react').RefAttributes<HTMLTableCaptionElement>>;
|
|
20
|
+
export type TableScrollContainerProps = RecursicaOverStyled<MantineTableScrollContainerProps>;
|
|
21
|
+
export declare const TableScrollContainer: import('react').ForwardRefExoticComponent<TableScrollContainerProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
22
|
type TableComponent = typeof TableBase & {
|
|
7
|
-
Thead: typeof
|
|
8
|
-
Tbody: typeof
|
|
9
|
-
Tr: typeof
|
|
10
|
-
Th: typeof
|
|
11
|
-
Td: typeof
|
|
12
|
-
Tfoot: typeof
|
|
13
|
-
Caption: typeof
|
|
14
|
-
ScrollContainer: typeof
|
|
23
|
+
Thead: typeof TableThead;
|
|
24
|
+
Tbody: typeof TableTbody;
|
|
25
|
+
Tr: typeof TableTr;
|
|
26
|
+
Th: typeof TableTh;
|
|
27
|
+
Td: typeof TableTd;
|
|
28
|
+
Tfoot: typeof TableTfoot;
|
|
29
|
+
Caption: typeof TableCaption;
|
|
30
|
+
ScrollContainer: typeof TableScrollContainer;
|
|
15
31
|
};
|
|
16
32
|
export declare const Table: TableComponent;
|
|
17
33
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tooltip as MantineTooltip, TooltipProps as MantineTooltipProps } from '@mantine/core';
|
|
1
|
+
import { Tooltip as MantineTooltip, TooltipProps as MantineTooltipProps, TooltipFloatingProps as MantineTooltipFloatingProps } from '@mantine/core';
|
|
2
2
|
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
3
3
|
import { RecursicaTooltipProps } from '@recursica/adapter-common';
|
|
4
4
|
/**
|
|
@@ -23,8 +23,10 @@ declare const TooltipBase: {
|
|
|
23
23
|
({ overStyled, withBeak, ...rest }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
displayName: string;
|
|
25
25
|
};
|
|
26
|
+
export type TooltipFloatingProps = RecursicaOverStyled<MantineTooltipFloatingProps>;
|
|
27
|
+
export declare const TooltipFloating: import('react').ForwardRefExoticComponent<TooltipFloatingProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
26
28
|
type TooltipComponent = typeof TooltipBase & {
|
|
27
|
-
Floating: typeof
|
|
29
|
+
Floating: typeof TooltipFloating;
|
|
28
30
|
Group: typeof MantineTooltip.Group;
|
|
29
31
|
};
|
|
30
32
|
export declare const Tooltip: TooltipComponent;
|
package/llms.txt
CHANGED
|
@@ -9,8 +9,63 @@ This adapter converts Recursica design tokens into Mantine-specific themes and c
|
|
|
9
9
|
- Relies on `@mantine/core`, `@mantine/dates`, and `@mantine/hooks` peer dependencies.
|
|
10
10
|
- When building UI in consumer applications, prioritize using components exported by this package to adhere to the Recursica design system.
|
|
11
11
|
|
|
12
|
-
## Documentation
|
|
12
|
+
## Reference Documentation
|
|
13
13
|
|
|
14
|
-
- [USAGE](USAGE.md): Detailed usage instructions.
|
|
14
|
+
- [USAGE](USAGE.md): Detailed usage instructions, import rules, and layout/token conventions.
|
|
15
|
+
- [OVERSTYLING](OVERSTYLING.md): The `overStyled` escape hatch — when it's appropriate, what's permitted by default, and how to visually audit its usage.
|
|
16
|
+
- [SETUP](SETUP.md): Installation and integration steps.
|
|
15
17
|
- [ARCHITECTURE](ARCHITECTURE.md): Package architecture and dependencies.
|
|
16
18
|
- [README](README.md)
|
|
19
|
+
|
|
20
|
+
## Components
|
|
21
|
+
|
|
22
|
+
Each component has its own `USAGE.md` documenting its props, adapter-specific behaviors, layout constraints, and accessibility requirements.
|
|
23
|
+
|
|
24
|
+
- [Accordion](src/components/Accordion/USAGE.md)
|
|
25
|
+
- [AssistiveElement](src/components/AssistiveElement/USAGE.md)
|
|
26
|
+
- [AutoComplete](src/components/AutoComplete/USAGE.md)
|
|
27
|
+
- [Avatar](src/components/Avatar/USAGE.md)
|
|
28
|
+
- [Badge](src/components/Badge/USAGE.md)
|
|
29
|
+
- [Breadcrumb](src/components/Breadcrumb/USAGE.md)
|
|
30
|
+
- [Button](src/components/Button/USAGE.md)
|
|
31
|
+
- [Card](src/components/Card/USAGE.md)
|
|
32
|
+
- [Checkbox](src/components/Checkbox/USAGE.md)
|
|
33
|
+
- [Chip](src/components/Chip/USAGE.md)
|
|
34
|
+
- [Container](src/components/Container/USAGE.md)
|
|
35
|
+
- [DatePicker](src/components/DatePicker/USAGE.md)
|
|
36
|
+
- [Dropdown](src/components/Dropdown/USAGE.md)
|
|
37
|
+
- [FileInput](src/components/FileInput/USAGE.md)
|
|
38
|
+
- [FileUpload](src/components/FileUpload/USAGE.md)
|
|
39
|
+
- [Flex](src/components/Flex/USAGE.md)
|
|
40
|
+
- [FormControlLayout](src/components/FormControlLayout/USAGE.md)
|
|
41
|
+
- [FormControlWrapper](src/components/FormControlWrapper/USAGE.md)
|
|
42
|
+
- [Group](src/components/Group/USAGE.md)
|
|
43
|
+
- [HoverCard](src/components/HoverCard/USAGE.md)
|
|
44
|
+
- [Label](src/components/Label/USAGE.md)
|
|
45
|
+
- [Link](src/components/Link/USAGE.md)
|
|
46
|
+
- [Loader](src/components/Loader/USAGE.md)
|
|
47
|
+
- [Menu](src/components/Menu/USAGE.md)
|
|
48
|
+
- [Modal](src/components/Modal/USAGE.md)
|
|
49
|
+
- [NumberInput](src/components/NumberInput/USAGE.md)
|
|
50
|
+
- [Pagination](src/components/Pagination/USAGE.md)
|
|
51
|
+
- [Panel](src/components/Panel/USAGE.md)
|
|
52
|
+
- [Popover](src/components/Popover/USAGE.md)
|
|
53
|
+
- [Radio](src/components/Radio/USAGE.md)
|
|
54
|
+
- [ReadOnlyField](src/components/ReadOnlyField/USAGE.md)
|
|
55
|
+
- [SegmentedControl](src/components/SegmentedControl/USAGE.md)
|
|
56
|
+
- [Slider](src/components/Slider/USAGE.md)
|
|
57
|
+
- [Stack](src/components/Stack/USAGE.md)
|
|
58
|
+
- [Stepper](src/components/Stepper/USAGE.md)
|
|
59
|
+
- [Switch](src/components/Switch/USAGE.md)
|
|
60
|
+
- [Table](src/components/Table/USAGE.md)
|
|
61
|
+
- [Tabs](src/components/Tabs/USAGE.md)
|
|
62
|
+
- [Text](src/components/Text/USAGE.md)
|
|
63
|
+
- [TextArea](src/components/TextArea/USAGE.md)
|
|
64
|
+
- [TextField](src/components/TextField/USAGE.md)
|
|
65
|
+
- [TimePicker](src/components/TimePicker/USAGE.md)
|
|
66
|
+
- [Timeline](src/components/Timeline/USAGE.md)
|
|
67
|
+
- [Title](src/components/Title/USAGE.md)
|
|
68
|
+
- [Toast](src/components/Toast/USAGE.md)
|
|
69
|
+
- [Tooltip](src/components/Tooltip/USAGE.md)
|
|
70
|
+
- [TransferList](src/components/TransferList/USAGE.md)
|
|
71
|
+
- [Tree](src/components/Tree/USAGE.md)
|
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.
|
|
16
|
+
"version": "0.34.0",
|
|
17
17
|
"type": "module",
|
|
18
18
|
"main": "./dist/mantine-adapter.cjs",
|
|
19
19
|
"module": "./dist/mantine-adapter.js",
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"llms.txt",
|
|
35
35
|
"USAGE.md",
|
|
36
36
|
"ARCHITECTURE.md",
|
|
37
|
-
"SETUP.md"
|
|
37
|
+
"SETUP.md",
|
|
38
|
+
"OVERSTYLING.md"
|
|
38
39
|
],
|
|
39
40
|
"keywords": [
|
|
40
41
|
"react",
|
package/src/OverStyling.tsx
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import ReactMarkdown from "react-markdown";
|
|
2
|
+
import { TypographyStylesProvider } from "@mantine/core";
|
|
1
3
|
import {
|
|
2
4
|
Container,
|
|
3
5
|
Card,
|
|
@@ -13,6 +15,7 @@ import {
|
|
|
13
15
|
toggleGlobalOverStyled,
|
|
14
16
|
wrapComponent,
|
|
15
17
|
} from "@recursica/adapter-common";
|
|
18
|
+
import overStylingDoc from "../OVERSTYLING.md?raw";
|
|
16
19
|
|
|
17
20
|
const Button = wrapComponent(RawButton);
|
|
18
21
|
const Text = wrapComponent(RawText);
|
|
@@ -24,246 +27,27 @@ export const OverStylingInfo = () => {
|
|
|
24
27
|
<Container size="md" style={{ padding: "32px 0" }}>
|
|
25
28
|
<Card>
|
|
26
29
|
<Card.Content>
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
</
|
|
30
|
-
<Text mb="rec-md">
|
|
31
|
-
By default, all Recursica components are strictly sandboxed. This
|
|
32
|
-
means they are protected against arbitrary styling configurations
|
|
33
|
-
(like passing generic React <code>style</code> objects, custom{" "}
|
|
34
|
-
<code>classNames</code> injections, or using deep Mantine layout
|
|
35
|
-
hooks like <code>bg</code> and <code>c</code>). This strict
|
|
36
|
-
compile-time and run-time enforcement guarantees that your design
|
|
37
|
-
system tokens remain true across your application.
|
|
38
|
-
</Text>
|
|
39
|
-
<Text mb="rec-md">
|
|
40
|
-
However, there may be edge cases where a developer absolutely must
|
|
41
|
-
modify a component beyond what the design tokens natively allow. For
|
|
42
|
-
this, we provide the <strong>escape hatch</strong> property:{" "}
|
|
43
|
-
<code>overStyled={`{true}`}</code>.
|
|
44
|
-
</Text>
|
|
45
|
-
|
|
46
|
-
<Title order={3} mb="rec-sm">
|
|
47
|
-
The Core Philosophy
|
|
48
|
-
</Title>
|
|
49
|
-
<Text mb="rec-sm">
|
|
50
|
-
**You should not over-style components.** Using{" "}
|
|
51
|
-
<code>overStyled</code> explicitly signifies that you are breaking
|
|
52
|
-
design system rules.
|
|
53
|
-
</Text>
|
|
54
|
-
<Stack
|
|
55
|
-
component="ol"
|
|
56
|
-
style={{ paddingLeft: "24px" }}
|
|
57
|
-
mb="rec-xl"
|
|
58
|
-
gap="rec-sm"
|
|
59
|
-
>
|
|
60
|
-
<li>
|
|
61
|
-
<Text>
|
|
62
|
-
<strong>Technical Debt:</strong> If over-styling is required, it
|
|
63
|
-
should be treated as a short-term workaround. Ideally, the
|
|
64
|
-
component will be refactored once the required layouts or
|
|
65
|
-
variants are officially integrated into the core Recursica
|
|
66
|
-
component library.
|
|
67
|
-
</Text>
|
|
68
|
-
</li>
|
|
69
|
-
<li>
|
|
70
|
-
<Text>
|
|
71
|
-
<strong>Auditing & Searching:</strong> Because this pattern
|
|
72
|
-
creates technical debt, we enforce the explicit{" "}
|
|
73
|
-
<code>overStyled</code> boolean. This provides a highly
|
|
74
|
-
auditable, easily searchable string. Product managers and
|
|
75
|
-
engineers can quickly grep the codebase for{" "}
|
|
76
|
-
<code>overStyled</code> (or the <code>RecursicaOverStyled</code>{" "}
|
|
77
|
-
typings) to hunt down components that don't match standard
|
|
78
|
-
patterns.
|
|
79
|
-
</Text>
|
|
80
|
-
</li>
|
|
81
|
-
<li>
|
|
82
|
-
<Text>
|
|
83
|
-
<strong>Highly Custom Components:</strong> If your application
|
|
84
|
-
genuinely requires massive custom layouts that the UI kit cannot
|
|
85
|
-
support, <strong>do not hack the Recursica component</strong>.
|
|
86
|
-
Instead, it is highly encouraged that you import the underlying
|
|
87
|
-
primitive component directly from <code>@mantine/core</code> and
|
|
88
|
-
construct your independent feature there. While you can utilize
|
|
89
|
-
raw Recursica CSS variables on these custom components, note
|
|
90
|
-
that they are not guaranteed to be accurately maintained as
|
|
91
|
-
Recursica evolves. Keep strict components strict!
|
|
92
|
-
</Text>
|
|
93
|
-
</li>
|
|
94
|
-
</Stack>
|
|
30
|
+
<TypographyStylesProvider>
|
|
31
|
+
<ReactMarkdown>{overStylingDoc}</ReactMarkdown>
|
|
32
|
+
</TypographyStylesProvider>
|
|
95
33
|
|
|
96
34
|
<Stack
|
|
97
35
|
style={{ height: 1, backgroundColor: "#eaeaea" }}
|
|
98
|
-
|
|
36
|
+
my="rec-xl"
|
|
99
37
|
/>
|
|
100
38
|
|
|
101
|
-
<Title order={3} mb="rec-
|
|
102
|
-
|
|
103
|
-
</Title>
|
|
104
|
-
<Text mb="rec-sm">
|
|
105
|
-
Unlike deep styling bounds (colors, typography, padding,
|
|
106
|
-
dimensions), external <strong>layout spacing properties</strong>{" "}
|
|
107
|
-
like Margins (<code>m</code>, <code>mt</code>, <code>mb</code>,{" "}
|
|
108
|
-
<code>mx</code>) are safely <strong>permitted by default</strong>.
|
|
109
|
-
This allows integrators to structurally compose components alongside
|
|
110
|
-
siblings without breaching internal token boundaries.
|
|
111
|
-
</Text>
|
|
112
|
-
<Text mb="rec-xl">
|
|
113
|
-
When using layout properties, you have the flexibility to use either
|
|
114
|
-
ecosystem seamlessly:
|
|
115
|
-
</Text>
|
|
116
|
-
<Stack
|
|
117
|
-
component="ol"
|
|
118
|
-
style={{ paddingLeft: "24px" }}
|
|
119
|
-
mb="rec-md"
|
|
120
|
-
gap="rec-sm"
|
|
121
|
-
>
|
|
122
|
-
<li>
|
|
123
|
-
<Text>
|
|
124
|
-
<strong>Mantine Core Values:</strong> Passing standard Mantine
|
|
125
|
-
sizes (like <code>mt="md"</code>) passes straight through to
|
|
126
|
-
Mantine natively, allowing you to interface completely normally
|
|
127
|
-
with a parent application's existing Mantine Theme setup that
|
|
128
|
-
might fall outside Recursica's scope.
|
|
129
|
-
</Text>
|
|
130
|
-
</li>
|
|
131
|
-
<li>
|
|
132
|
-
<Text>
|
|
133
|
-
<strong>Recursica Strict Tokens:</strong> Passing our custom
|
|
134
|
-
prefixed tokens (like <code>mt="rec-md"</code>) signals our
|
|
135
|
-
internal layout interceptor to securely translate the value
|
|
136
|
-
directly to our native <code>recursica_brand_dimensions</code>{" "}
|
|
137
|
-
CSS variables. This ensures strict design token measurements
|
|
138
|
-
while sharing the exact same prop interface!
|
|
139
|
-
</Text>
|
|
140
|
-
</li>
|
|
141
|
-
</Stack>
|
|
142
|
-
<Text mb="rec-sm" overStyled fw={500}>
|
|
143
|
-
Available Recursica Layout Tokens:
|
|
144
|
-
</Text>
|
|
145
|
-
<Stack
|
|
146
|
-
component="ul"
|
|
147
|
-
style={{ paddingLeft: "24px" }}
|
|
148
|
-
mb="rec-xl"
|
|
149
|
-
gap="rec-none"
|
|
150
|
-
>
|
|
151
|
-
<li>
|
|
152
|
-
<Text>
|
|
153
|
-
<code>rec-none</code> (0px limit)
|
|
154
|
-
</Text>
|
|
155
|
-
</li>
|
|
156
|
-
<li>
|
|
157
|
-
<Text>
|
|
158
|
-
<code>rec-sm</code> (0.5x scaling)
|
|
159
|
-
</Text>
|
|
160
|
-
</li>
|
|
161
|
-
<li>
|
|
162
|
-
<Text>
|
|
163
|
-
<code>rec-default</code> (1.0x scaling)
|
|
164
|
-
</Text>
|
|
165
|
-
</li>
|
|
166
|
-
<li>
|
|
167
|
-
<Text>
|
|
168
|
-
<code>rec-md</code> (1.5x scaling)
|
|
169
|
-
</Text>
|
|
170
|
-
</li>
|
|
171
|
-
<li>
|
|
172
|
-
<Text>
|
|
173
|
-
<code>rec-lg</code> (2.0x scaling)
|
|
174
|
-
</Text>
|
|
175
|
-
</li>
|
|
176
|
-
<li>
|
|
177
|
-
<Text>
|
|
178
|
-
<code>rec-xl</code> (3.0x scaling)
|
|
179
|
-
</Text>
|
|
180
|
-
</li>
|
|
181
|
-
<li>
|
|
182
|
-
<Text>
|
|
183
|
-
<code>rec-2xl</code> (4.0x scaling)
|
|
184
|
-
</Text>
|
|
185
|
-
</li>
|
|
186
|
-
</Stack>
|
|
187
|
-
|
|
188
|
-
<Stack
|
|
189
|
-
style={{ height: 1, backgroundColor: "#eaeaea" }}
|
|
190
|
-
mb="rec-xl"
|
|
191
|
-
/>
|
|
192
|
-
|
|
193
|
-
<Title order={3} mb="rec-sm">
|
|
194
|
-
Primitive Layout Components Exemption
|
|
39
|
+
<Title order={3} mb="rec-md">
|
|
40
|
+
Try It Yourself
|
|
195
41
|
</Title>
|
|
196
|
-
<Text mb="rec-sm">
|
|
197
|
-
Unlike complex UI components (Buttons, Tabs, Inputs) which are
|
|
198
|
-
strictly protected, <strong>Primitive Layout Components</strong> (
|
|
199
|
-
<code>Flex</code>, <code>Stack</code>, <code>Group</code>,{" "}
|
|
200
|
-
<code>Container</code>) are entirely exempt from the{" "}
|
|
201
|
-
<code>RecursicaOverStyled</code> gatekeeper.
|
|
202
|
-
</Text>
|
|
203
|
-
<Text mb="rec-xl">
|
|
204
|
-
Because the entire functional purpose of these components is
|
|
205
|
-
structural layout composition, developers are free to pass any
|
|
206
|
-
standard Mantine width, height, padding, margin, gap, and alignment
|
|
207
|
-
property directly to them without needing to flag{" "}
|
|
208
|
-
<code>overStyled={`{true}`}</code>. The internal custom token mapper
|
|
209
|
-
(such as converting <code>gap="rec-md"</code>) is still active
|
|
210
|
-
natively on these wrappers.
|
|
211
|
-
</Text>
|
|
212
|
-
|
|
213
|
-
<Stack
|
|
214
|
-
style={{ height: 1, backgroundColor: "#eaeaea" }}
|
|
215
|
-
mb="rec-xl"
|
|
216
|
-
/>
|
|
217
42
|
|
|
218
|
-
<
|
|
219
|
-
Visual Auditing & Highlights (Development Only)
|
|
220
|
-
</Title>
|
|
221
|
-
<Text mb="rec-sm">
|
|
222
|
-
To make it easy to spot technical debt and design system violations,
|
|
223
|
-
Recursica automatically tracks any component that uses the{" "}
|
|
224
|
-
<code>overStyled={`{true}`}</code> prop.
|
|
225
|
-
</Text>
|
|
226
|
-
<Text mb="rec-sm">
|
|
227
|
-
In <strong>development builds</strong>, you can highlight all
|
|
228
|
-
over-styled components on the page. Open your browser's developer
|
|
229
|
-
console and run:
|
|
230
|
-
</Text>
|
|
231
|
-
<Stack
|
|
232
|
-
style={{
|
|
233
|
-
padding: 12,
|
|
234
|
-
backgroundColor: "#f5f5f5",
|
|
235
|
-
borderRadius: 6,
|
|
236
|
-
fontSize: 13,
|
|
237
|
-
marginTop: 8,
|
|
238
|
-
marginBottom: 16,
|
|
239
|
-
}}
|
|
240
|
-
>
|
|
241
|
-
<code>recursica.toggleOverStyled()</code>
|
|
242
|
-
</Stack>
|
|
243
|
-
<Group mb="rec-md">
|
|
43
|
+
<Group mb="rec-xl">
|
|
244
44
|
<Switch
|
|
245
45
|
label="Highlight Over-Styled Components"
|
|
246
46
|
checked={isHighlightActive}
|
|
247
47
|
onChange={() => toggleGlobalOverStyled()}
|
|
248
48
|
/>
|
|
249
49
|
</Group>
|
|
250
|
-
<Text mb="rec-xl">
|
|
251
|
-
This toggles a <strong>cyan 2px box shadow</strong> outline around
|
|
252
|
-
the children of all over-styled components. The wrapping elements
|
|
253
|
-
use <code>display: contents</code> under the hood to ensure they
|
|
254
|
-
occupy zero DOM space and do not affect flex, grid, or absolute
|
|
255
|
-
positioning flow. In production builds, this debugging helper is
|
|
256
|
-
completely disabled and stripped with zero performance overhead.
|
|
257
|
-
</Text>
|
|
258
50
|
|
|
259
|
-
<Stack
|
|
260
|
-
style={{ height: 1, backgroundColor: "#eaeaea" }}
|
|
261
|
-
mb="rec-xl"
|
|
262
|
-
/>
|
|
263
|
-
|
|
264
|
-
<Title order={3} mb="rec-md">
|
|
265
|
-
Live Example
|
|
266
|
-
</Title>
|
|
267
51
|
<Text mb="rec-xl">
|
|
268
52
|
Below is a side-by-side comparison. The first is a standard
|
|
269
53
|
Recursica Button protected by the design tokens mapping. The second
|