@recursica/mui-adapter 0.4.0 → 0.6.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 +15 -0
- package/dist/mui-adapter.cjs +74 -1
- package/dist/mui-adapter.cjs.map +1 -1
- package/dist/mui-adapter.css +1 -1
- package/dist/mui-adapter.js +6651 -201
- package/dist/mui-adapter.js.map +1 -1
- package/dist/src/components/Accordion/Accordion.d.ts +63 -2
- package/dist/src/components/AssistiveElement/AssistiveElement.d.ts +9 -2
- package/dist/src/components/Autocomplete/Autocomplete.d.ts +17 -0
- package/dist/src/components/Autocomplete/index.d.ts +1 -0
- package/dist/src/components/Avatar/Avatar.d.ts +14 -2
- package/dist/src/components/Badge/Badge.d.ts +13 -3
- package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +10 -3
- package/dist/src/components/Button/Button.d.ts +1 -1
- package/dist/src/components/Card/Card.d.ts +40 -3
- package/dist/src/components/Checkbox/Checkbox.d.ts +15 -2
- package/dist/src/components/Checkbox/CheckboxGroup.d.ts +16 -0
- package/dist/src/components/Checkbox/index.d.ts +5 -1
- package/dist/src/components/Chip/Chip.d.ts +18 -2
- package/dist/src/components/Dropdown/Dropdown.d.ts +23 -3
- package/dist/src/components/FormControlLayout/FormControlLayout.d.ts +10 -2
- package/dist/src/components/FormControlWrapper/FormControlWrapper.d.ts +24 -2
- package/dist/src/components/HoverCard/HoverCard.d.ts +55 -3
- package/dist/src/components/Label/Label.d.ts +13 -2
- package/dist/src/components/Link/Link.d.ts +1 -1
- package/dist/src/components/Menu/Menu.d.ts +99 -3
- package/dist/src/components/Modal/Modal.d.ts +36 -2
- package/dist/src/components/NumberInput/NumberInput.d.ts +14 -2
- package/dist/src/components/Pagination/Pagination.d.ts +44 -2
- package/dist/src/components/Pagination/Pagination.icons.d.ts +8 -0
- package/dist/src/components/Panel/Panel.d.ts +65 -3
- package/dist/src/components/Radio/Radio.d.ts +13 -3
- package/dist/src/components/Radio/RadioGroup.d.ts +13 -0
- package/dist/src/components/ReadOnlyField/ReadOnlyBooleanField.d.ts +5 -0
- package/dist/src/components/ReadOnlyField/ReadOnlyField.d.ts +7 -2
- package/dist/src/components/ReadOnlyField/ReadOnlySwitchField.d.ts +5 -0
- package/dist/src/components/ReadOnlyField/ReadOnlyTextField.d.ts +8 -0
- package/dist/src/components/ReadOnlyField/WithReadOnlyWrapper.d.ts +28 -0
- package/dist/src/components/ReadOnlyField/index.d.ts +1 -0
- package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +31 -3
- package/dist/src/components/Slider/Slider.d.ts +28 -2
- package/dist/src/components/Stepper/Stepper.d.ts +21 -2
- package/dist/src/components/Switch/Switch.d.ts +10 -3
- package/dist/src/components/Switch/SwitchGroup.d.ts +13 -0
- package/dist/src/components/Tabs/Tabs.d.ts +35 -3
- package/dist/src/components/Text/Text.d.ts +1 -1
- package/dist/src/components/TextArea/TextArea.d.ts +18 -2
- package/dist/src/components/TextField/TextField.d.ts +16 -2
- package/dist/src/components/Timeline/Timeline.d.ts +14 -2
- package/dist/src/components/Timeline/TimelineItem.d.ts +29 -0
- package/dist/src/components/Title/Title.d.ts +1 -1
- package/dist/src/components/Toast/Toast.d.ts +25 -2
- package/dist/src/components/Tooltip/Tooltip.d.ts +42 -3
- package/dist/src/components/Typography/Typography.d.ts +1 -1
- package/dist/src/components/index.d.ts +1 -0
- package/package.json +12 -2
- package/src/GlobalExemptions.modules.css +13 -0
- package/src/components/Accordion/Accordion.module.css +295 -0
- package/src/components/Accordion/Accordion.stories.tsx +149 -21
- package/src/components/Accordion/Accordion.tsx +264 -4
- package/src/components/AssistiveElement/AssistiveElement.module.css +111 -0
- package/src/components/AssistiveElement/AssistiveElement.stories.tsx +76 -19
- package/src/components/AssistiveElement/AssistiveElement.tsx +85 -4
- package/src/components/Autocomplete/Autocomplete.module.css +325 -0
- package/src/components/Autocomplete/Autocomplete.stories.tsx +196 -0
- package/src/components/Autocomplete/Autocomplete.tsx +201 -0
- package/src/components/Autocomplete/index.ts +1 -0
- package/src/components/Avatar/Avatar.module.css +344 -0
- package/src/components/Avatar/Avatar.stories.tsx +94 -22
- package/src/components/Avatar/Avatar.tsx +110 -5
- package/src/components/Badge/Badge.module.css +127 -0
- package/src/components/Badge/Badge.stories.tsx +65 -22
- package/src/components/Badge/Badge.tsx +70 -5
- package/src/components/Breadcrumb/Breadcrumb.module.css +26 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +57 -22
- package/src/components/Breadcrumb/Breadcrumb.tsx +62 -5
- package/src/components/Button/Button.module.css +113 -20
- package/src/components/Button/Button.stories.tsx +3 -0
- package/src/components/Button/Button.tsx +10 -3
- package/src/components/Card/Card.module.css +118 -0
- package/src/components/Card/Card.stories.tsx +117 -19
- package/src/components/Card/Card.tsx +179 -4
- package/src/components/Checkbox/Checkbox.module.css +232 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +81 -19
- package/src/components/Checkbox/Checkbox.tsx +146 -4
- package/src/components/Checkbox/CheckboxGroup.tsx +117 -0
- package/src/components/Checkbox/index.ts +6 -1
- package/src/components/Chip/Chip.module.css +236 -0
- package/src/components/Chip/Chip.stories.tsx +101 -21
- package/src/components/Chip/Chip.tsx +138 -5
- package/src/components/DatePicker/DatePicker.module.css +42 -0
- package/src/components/DatePicker/DatePicker.tsx +1 -0
- package/src/components/Dropdown/Dropdown.module.css +296 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +80 -21
- package/src/components/Dropdown/Dropdown.tsx +182 -5
- package/src/components/FileInput/FileInput.module.css +47 -0
- package/src/components/FileInput/FileInput.tsx +1 -0
- package/src/components/FileUpload/FileUpload.module.css +40 -0
- package/src/components/FileUpload/FileUpload.tsx +1 -0
- package/src/components/FormControlLayout/FormControlLayout.module.css +92 -0
- package/src/components/FormControlLayout/FormControlLayout.stories.tsx +74 -19
- package/src/components/FormControlLayout/FormControlLayout.tsx +58 -4
- package/src/components/FormControlWrapper/FormControlWrapper.module.css +96 -0
- package/src/components/FormControlWrapper/FormControlWrapper.stories.tsx +122 -19
- package/src/components/FormControlWrapper/FormControlWrapper.tsx +145 -6
- package/src/components/HoverCard/HoverCard.module.css +91 -0
- package/src/components/HoverCard/HoverCard.stories.tsx +158 -21
- package/src/components/HoverCard/HoverCard.tsx +150 -4
- package/src/components/Label/Label.module.css +136 -0
- package/src/components/Label/Label.stories.tsx +98 -17
- package/src/components/Label/Label.tsx +88 -4
- package/src/components/Link/Link.module.css +8 -0
- package/src/components/Menu/Menu.module.css +287 -0
- package/src/components/Menu/Menu.stories.tsx +307 -21
- package/src/components/Menu/Menu.tsx +318 -4
- package/src/components/Modal/Modal.module.css +172 -0
- package/src/components/Modal/Modal.stories.tsx +66 -22
- package/src/components/Modal/Modal.tsx +216 -3
- package/src/components/NumberInput/NumberInput.module.css +281 -0
- package/src/components/NumberInput/NumberInput.stories.tsx +83 -20
- package/src/components/NumberInput/NumberInput.tsx +148 -5
- package/src/components/Pagination/Pagination.icons.tsx +66 -0
- package/src/components/Pagination/Pagination.module.css +307 -0
- package/src/components/Pagination/Pagination.stories.tsx +42 -21
- package/src/components/Pagination/Pagination.tsx +193 -4
- package/src/components/Panel/Panel.module.css +206 -0
- package/src/components/Panel/Panel.stories.tsx +214 -22
- package/src/components/Panel/Panel.tsx +153 -4
- package/src/components/Radio/Radio.module.css +220 -0
- package/src/components/Radio/Radio.stories.tsx +77 -19
- package/src/components/Radio/Radio.tsx +178 -4
- package/src/components/Radio/RadioGroup.tsx +111 -0
- package/src/components/ReadOnlyField/ReadOnlyBooleanField.tsx +21 -0
- package/src/components/ReadOnlyField/ReadOnlyField.module.css +54 -0
- package/src/components/ReadOnlyField/ReadOnlyField.stories.tsx +175 -16
- package/src/components/ReadOnlyField/ReadOnlyField.tsx +109 -4
- package/src/components/ReadOnlyField/ReadOnlySwitchField.tsx +21 -0
- package/src/components/ReadOnlyField/ReadOnlyTextField.tsx +48 -0
- package/src/components/ReadOnlyField/WithReadOnlyWrapper.tsx +93 -0
- package/src/components/ReadOnlyField/index.ts +1 -0
- package/src/components/SegmentedControl/SegmentedControl.module.css +203 -0
- package/src/components/SegmentedControl/SegmentedControl.stories.tsx +102 -20
- package/src/components/SegmentedControl/SegmentedControl.tsx +110 -5
- package/src/components/Slider/Slider.module.css +542 -0
- package/src/components/Slider/Slider.stories.tsx +157 -19
- package/src/components/Slider/Slider.tsx +282 -4
- package/src/components/Stepper/Stepper.module.css +410 -0
- package/src/components/Stepper/Stepper.stories.tsx +132 -19
- package/src/components/Stepper/Stepper.tsx +145 -5
- package/src/components/Switch/Switch.module.css +238 -0
- package/src/components/Switch/Switch.stories.tsx +98 -19
- package/src/components/Switch/Switch.tsx +153 -5
- package/src/components/Switch/SwitchGroup.tsx +111 -0
- package/src/components/Tabs/Tabs.module.css +422 -0
- package/src/components/Tabs/Tabs.stories.tsx +138 -19
- package/src/components/Tabs/Tabs.tsx +103 -5
- package/src/components/TextArea/TextArea.module.css +160 -0
- package/src/components/TextArea/TextArea.stories.tsx +80 -21
- package/src/components/TextArea/TextArea.tsx +156 -5
- package/src/components/TextField/TextField.module.css +266 -0
- package/src/components/TextField/TextField.stories.tsx +168 -15
- package/src/components/TextField/TextField.tsx +171 -5
- package/src/components/TimePicker/TimePicker.module.css +41 -0
- package/src/components/TimePicker/TimePicker.tsx +1 -0
- package/src/components/Timeline/Timeline.module.css +367 -0
- package/src/components/Timeline/Timeline.stories.tsx +114 -21
- package/src/components/Timeline/Timeline.tsx +80 -4
- package/src/components/Timeline/TimelineItem.tsx +101 -0
- package/src/components/Toast/Toast.module.css +170 -0
- package/src/components/Toast/Toast.stories.tsx +54 -22
- package/src/components/Toast/Toast.tsx +90 -4
- package/src/components/Tooltip/Tooltip.module.css +90 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +152 -22
- package/src/components/Tooltip/Tooltip.tsx +114 -4
- package/src/components/TransferList/TransferList.module.css +38 -0
- package/src/components/TransferList/TransferList.tsx +1 -0
- package/src/components/index.ts +1 -0
|
@@ -1,3 +1,64 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { AccordionProps as MuiAccordionProps, AccordionSummaryProps as MuiAccordionSummaryProps, AccordionDetailsProps as MuiAccordionDetailsProps } from '@mui/material';
|
|
3
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
4
|
+
export type AccordionProps = RecursicaOverStyled<React.HTMLAttributes<HTMLDivElement> & {
|
|
5
|
+
variant?: string;
|
|
6
|
+
value?: string | string[];
|
|
7
|
+
defaultValue?: string | string[];
|
|
8
|
+
onChange?: (value: string | string[] | null) => void;
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
declare const AccordionBase: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export type AccordionItemWrapperProps = RecursicaOverStyled<Omit<MuiAccordionProps, "children" | "value"> & {
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
title?: React.ReactNode;
|
|
15
|
+
leftIcon?: React.ReactNode;
|
|
16
|
+
divider?: boolean;
|
|
17
|
+
value: string;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const AccordionItem: React.ForwardRefExoticComponent<(Omit<Omit<Omit<MuiAccordionProps, "value" | "children"> & {
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
title?: React.ReactNode;
|
|
22
|
+
leftIcon?: React.ReactNode;
|
|
23
|
+
divider?: boolean;
|
|
24
|
+
value: string;
|
|
25
|
+
}, "className" | "classes" | "style" | "sx" | "color" | "bgcolor" | "backgroundColor" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "textAlign" | "border" | "borderTop" | "borderBottom" | "borderLeft" | "borderRight" | "borderColor" | "borderRadius" | "boxShadow" | "display" | "position" | "zIndex"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
|
|
26
|
+
overStyled?: false | undefined;
|
|
27
|
+
}, "ref"> | Omit<Omit<MuiAccordionProps, "value" | "children"> & {
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
title?: React.ReactNode;
|
|
30
|
+
leftIcon?: React.ReactNode;
|
|
31
|
+
divider?: boolean;
|
|
32
|
+
value: string;
|
|
33
|
+
} & {
|
|
34
|
+
overStyled: true;
|
|
35
|
+
}, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
export type AccordionControlWrapperProps = RecursicaOverStyled<MuiAccordionSummaryProps & {
|
|
37
|
+
leftIcon?: React.ReactNode;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const AccordionControl: React.ForwardRefExoticComponent<(Omit<Omit<import('@mui/material').AccordionSummaryOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "classes" | "style" | "sx" | "tabIndex" | "children" | "disabled" | "slots" | "slotProps" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "expandIcon"> & {
|
|
40
|
+
component?: React.ElementType | undefined;
|
|
41
|
+
} & {
|
|
42
|
+
leftIcon?: React.ReactNode;
|
|
43
|
+
}, "className" | "classes" | "style" | "sx" | "color" | "bgcolor" | "backgroundColor" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "textAlign" | "border" | "borderTop" | "borderBottom" | "borderLeft" | "borderRight" | "borderColor" | "borderRadius" | "boxShadow" | "display" | "position" | "zIndex"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
|
|
44
|
+
overStyled?: false | undefined;
|
|
45
|
+
}, "ref"> | Omit<import('@mui/material').AccordionSummaryOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "classes" | "style" | "sx" | "tabIndex" | "children" | "disabled" | "slots" | "slotProps" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "expandIcon"> & {
|
|
46
|
+
component?: React.ElementType | undefined;
|
|
47
|
+
} & {
|
|
48
|
+
leftIcon?: React.ReactNode;
|
|
49
|
+
} & {
|
|
50
|
+
overStyled: true;
|
|
51
|
+
}, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
52
|
+
export type AccordionPanelWrapperProps = RecursicaOverStyled<MuiAccordionDetailsProps>;
|
|
53
|
+
export declare const AccordionPanel: React.ForwardRefExoticComponent<(Omit<Omit<MuiAccordionDetailsProps, "className" | "classes" | "style" | "sx" | "color" | "bgcolor" | "backgroundColor" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "textAlign" | "border" | "borderTop" | "borderBottom" | "borderLeft" | "borderRight" | "borderColor" | "borderRadius" | "boxShadow" | "display" | "position" | "zIndex"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
|
|
54
|
+
overStyled?: false | undefined;
|
|
55
|
+
}, "ref"> | Omit<MuiAccordionDetailsProps & {
|
|
56
|
+
overStyled: true;
|
|
57
|
+
}, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
58
|
+
type AccordionComponent = typeof AccordionBase & {
|
|
59
|
+
Item: typeof AccordionItem;
|
|
60
|
+
Control: typeof AccordionControl;
|
|
61
|
+
Panel: typeof AccordionPanel;
|
|
62
|
+
};
|
|
63
|
+
export declare const Accordion: AccordionComponent;
|
|
64
|
+
export {};
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
import { FormHelperTextProps } from '@mui/material';
|
|
3
|
+
export interface AssistiveElementProps extends FormHelperTextProps {
|
|
4
|
+
/** Governs the semantic rendering block (changes icon and CSS structural hooks natively). */
|
|
5
|
+
assistiveVariant?: "help" | "error";
|
|
6
|
+
/** Renders the structural mapping icon inline beside the text natively. */
|
|
7
|
+
assistiveWithIcon?: boolean;
|
|
8
|
+
overStyled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const AssistiveElement: React.ForwardRefExoticComponent<Omit<AssistiveElementProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AutocompleteProps as MuiAutocompleteProps, InputWrapperProps } from '@mui/material';
|
|
3
|
+
import { ReadOnlyControlProps } from '@recursica/adapter-common';
|
|
4
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
5
|
+
import { RecursicaFormControlWrapperProps } from '../FormControlWrapper/FormControlWrapper';
|
|
6
|
+
export interface RecursicaAutocompleteProps extends Omit<MuiAutocompleteProps<any, any, any, any>, "size" | "variant" | "radius" | "wrapperProps" | "renderInput">, Pick<InputWrapperProps, "label" | "error" | "required" | "withAsterisk" | "id">, Omit<RecursicaFormControlWrapperProps, "controlMaxWidth" | "controlMinWidth">, ReadOnlyControlProps {
|
|
7
|
+
data?: any[];
|
|
8
|
+
leftSection?: React.ReactNode;
|
|
9
|
+
rightSection?: React.ReactNode;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
}
|
|
12
|
+
export type AutocompleteProps = RecursicaOverStyled<RecursicaAutocompleteProps>;
|
|
13
|
+
export declare const Autocomplete: React.ForwardRefExoticComponent<(Omit<Omit<RecursicaAutocompleteProps, "className" | "classes" | "style" | "sx" | "color" | "bgcolor" | "backgroundColor" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "textAlign" | "border" | "borderTop" | "borderBottom" | "borderLeft" | "borderRight" | "borderColor" | "borderRadius" | "boxShadow" | "display" | "position" | "zIndex"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
|
|
14
|
+
overStyled?: false | undefined;
|
|
15
|
+
}, "ref"> | Omit<RecursicaAutocompleteProps & {
|
|
16
|
+
overStyled: true;
|
|
17
|
+
}, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Autocomplete';
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { AvatarProps as MuiAvatarProps } from '@mui/material';
|
|
3
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
4
|
+
export interface RecursicaAvatarProps {
|
|
5
|
+
size?: "small" | "default" | "large";
|
|
6
|
+
variant?: "solid" | "outline" | "ghost";
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export type AvatarProps = RecursicaOverStyled<Omit<MuiAvatarProps, "variant" | "size" | "color" | "radius"> & RecursicaAvatarProps>;
|
|
10
|
+
/**
|
|
11
|
+
* Recursica Avatar component wrapping Mui's Avatar.
|
|
12
|
+
*
|
|
13
|
+
* Supports polymorphism via the `component` prop or `renderRoot` for custom element rendering.
|
|
14
|
+
*/
|
|
15
|
+
export declare const Avatar: any;
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
import { BadgeProps as MuiBadgeProps } from '@mui/material';
|
|
2
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
3
|
+
export interface RecursicaBadgeProps {
|
|
4
|
+
/** Map to the component styles defined in variables */
|
|
5
|
+
variant?: "alert" | "primary-color" | "success" | "warning";
|
|
6
|
+
}
|
|
7
|
+
export type BadgeProps = RecursicaOverStyled<Omit<MuiBadgeProps, "variant" | "size" | "color" | "radius"> & RecursicaBadgeProps>;
|
|
8
|
+
/**
|
|
9
|
+
* Recursica Badge component wrapping Mui's Badge.
|
|
10
|
+
*
|
|
11
|
+
* Supports polymorphism via the `component` prop or `renderRoot` for custom element rendering.
|
|
12
|
+
*/
|
|
13
|
+
export declare const Badge: any;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
import { BreadcrumbsProps as MuiBreadcrumbsProps } from '@mui/material';
|
|
2
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
3
|
+
export interface RecursicaBreadcrumbProps {
|
|
4
|
+
}
|
|
5
|
+
export type BreadcrumbProps = RecursicaOverStyled<Omit<MuiBreadcrumbsProps, "variant" | "size"> & RecursicaBreadcrumbProps>;
|
|
6
|
+
export declare const Breadcrumb: import('react').ForwardRefExoticComponent<(Omit<Omit<Omit<MuiBreadcrumbsProps, "variant" | "size"> & RecursicaBreadcrumbProps, "className" | "classes" | "style" | "sx" | "color" | "bgcolor" | "backgroundColor" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "textAlign" | "border" | "borderTop" | "borderBottom" | "borderLeft" | "borderRight" | "borderColor" | "borderRadius" | "boxShadow" | "display" | "position" | "zIndex"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
|
|
7
|
+
overStyled?: false | undefined;
|
|
8
|
+
}, "ref"> | Omit<Omit<MuiBreadcrumbsProps, "variant" | "size"> & RecursicaBreadcrumbProps & {
|
|
9
|
+
overStyled: true;
|
|
10
|
+
}, "ref">) & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -34,7 +34,7 @@ export type ButtonProps = RecursicaOverStyled<Omit<MuiButtonProps, "variant" | "
|
|
|
34
34
|
* <Button component={Link} to="/home">Home</Button>
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
export declare const Button: React.ForwardRefExoticComponent<(Omit<Omit<Omit<MuiButtonProps, "color" | "variant" | "size" | "fullWidth"> & RecursicaButtonProps, "
|
|
37
|
+
export declare const Button: React.ForwardRefExoticComponent<(Omit<Omit<Omit<MuiButtonProps, "color" | "variant" | "size" | "fullWidth"> & RecursicaButtonProps, "className" | "classes" | "style" | "sx" | "color" | "bgcolor" | "backgroundColor" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "textAlign" | "border" | "borderTop" | "borderBottom" | "borderLeft" | "borderRight" | "borderColor" | "borderRadius" | "boxShadow" | "display" | "position" | "zIndex"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
|
|
38
38
|
overStyled?: false | undefined;
|
|
39
39
|
}, "ref"> | Omit<Omit<MuiButtonProps, "color" | "variant" | "size" | "fullWidth"> & RecursicaButtonProps & {
|
|
40
40
|
overStyled: true;
|
|
@@ -1,3 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
import { CardProps as MuiCardProps } from '@mui/material';
|
|
2
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
3
|
+
export type CardProps = RecursicaOverStyled<MuiCardProps>;
|
|
4
|
+
export type RecursicaCardSectionProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export type CardSectionProps = RecursicaOverStyled<RecursicaCardSectionProps>;
|
|
8
|
+
/**
|
|
9
|
+
* A generalized edge-to-edge structural wrapper native to Mui. Strips typical boundary padding via negative margins to allow content (like maps or header images) to touch the border seamlessly.
|
|
10
|
+
*/
|
|
11
|
+
export declare const CardSection: import('react').ForwardRefExoticComponent<CardSectionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export type CardHeaderProps = RecursicaOverStyled<RecursicaCardSectionProps>;
|
|
13
|
+
/**
|
|
14
|
+
* Replaces standard generic Mui `<Card.Section>` wrappers by directly injecting the strict Recursica design tokens for header sizing, background drops, and intrinsic padding limits.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CardHeader: import('react').ForwardRefExoticComponent<CardHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export type CardFooterProps = RecursicaOverStyled<RecursicaCardSectionProps>;
|
|
18
|
+
/**
|
|
19
|
+
* Counterpart to `Card.Header`, applying specific footer elevation margins, sizes, and padding natively.
|
|
20
|
+
*/
|
|
21
|
+
export declare const CardFooter: import('react').ForwardRefExoticComponent<CardFooterProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export type CardContentProps = RecursicaOverStyled<React.HTMLAttributes<HTMLDivElement>>;
|
|
23
|
+
/**
|
|
24
|
+
* Internal container that safely binds typography and structural flex gaps driven by the active UI kit tokens natively, preserving correct padding blocks compared to rigid `Card.Section` edges.
|
|
25
|
+
*/
|
|
26
|
+
export declare const CardContent: import('react').ForwardRefExoticComponent<CardContentProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
27
|
+
/**
|
|
28
|
+
* Recursica Card component wrapping Mui's Card (Paper).
|
|
29
|
+
*
|
|
30
|
+
* Supports polymorphism via the `component` prop or `renderRoot` for custom element rendering.
|
|
31
|
+
* Use dot-notation sub-components for structured card layouts.
|
|
32
|
+
*/
|
|
33
|
+
declare const PolymorphicCard: any;
|
|
34
|
+
export declare const Card: typeof PolymorphicCard & {
|
|
35
|
+
Section: typeof CardSection;
|
|
36
|
+
Header: typeof CardHeader;
|
|
37
|
+
Footer: typeof CardFooter;
|
|
38
|
+
Content: typeof CardContent;
|
|
39
|
+
};
|
|
40
|
+
export {};
|
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { CheckboxProps as MuiCheckboxProps } from '@mui/material';
|
|
3
|
+
import { ReadOnlyControlProps } from '@recursica/adapter-common';
|
|
4
|
+
import { CheckboxGroup } from './CheckboxGroup';
|
|
5
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
6
|
+
import { RequireAccessibleLabel } from '../../utils/RequireAccessibleLabel';
|
|
7
|
+
import { FormControlLayoutProps } from '../FormControlLayout/FormControlLayout';
|
|
8
|
+
export type RecursicaCheckboxProps = RequireAccessibleLabel<Omit<MuiCheckboxProps, "size" | "color"> & {
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
} & ReadOnlyControlProps & Pick<FormControlLayoutProps, "formLayout" | "labelSize" | "controlMaxWidth" | "controlMinWidth">>;
|
|
11
|
+
export type CheckboxProps = RecursicaOverStyled<RecursicaCheckboxProps>;
|
|
12
|
+
type CheckboxComponent = React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>> & {
|
|
13
|
+
Group: typeof CheckboxGroup;
|
|
14
|
+
};
|
|
15
|
+
export declare const Checkbox: CheckboxComponent;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FormGroupProps } from '@mui/material';
|
|
3
|
+
import { ReadOnlyControlProps } from '@recursica/adapter-common';
|
|
4
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
5
|
+
import { RecursicaFormControlWrapperProps } from '../FormControlWrapper/FormControlWrapper';
|
|
6
|
+
export interface RecursicaCheckboxGroupProps extends Omit<FormGroupProps, "size" | "onChange">, Omit<RecursicaFormControlWrapperProps, "controlMaxWidth" | "controlMinWidth">, ReadOnlyControlProps {
|
|
7
|
+
value?: any[];
|
|
8
|
+
defaultValue?: any[];
|
|
9
|
+
onChange?: (value: any[]) => void;
|
|
10
|
+
}
|
|
11
|
+
export type CheckboxGroupProps = RecursicaOverStyled<RecursicaCheckboxGroupProps>;
|
|
12
|
+
export declare const CheckboxGroup: React.ForwardRefExoticComponent<(Omit<Omit<RecursicaCheckboxGroupProps, "className" | "classes" | "style" | "sx" | "color" | "bgcolor" | "backgroundColor" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "textAlign" | "border" | "borderTop" | "borderBottom" | "borderLeft" | "borderRight" | "borderColor" | "borderRadius" | "boxShadow" | "display" | "position" | "zIndex"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
|
|
13
|
+
overStyled?: false | undefined;
|
|
14
|
+
}, "ref"> | Omit<RecursicaCheckboxGroupProps & {
|
|
15
|
+
overStyled: true;
|
|
16
|
+
}, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,3 +1,19 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { ChipProps as MuiChipProps } from '@mui/material';
|
|
3
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
4
|
+
export interface RecursicaChipProps {
|
|
5
|
+
/** Enables the error state styling */
|
|
6
|
+
error?: boolean;
|
|
7
|
+
/** Leading icon content */
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
/** Called when the remove (X) icon is clicked. If provided, the remove icon will be displayed. */
|
|
10
|
+
onRemove?: (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void;
|
|
11
|
+
/** Screen reader label for the remove button. Defaults to 'Remove' */
|
|
12
|
+
removeLabel?: string;
|
|
13
|
+
}
|
|
14
|
+
export type ChipProps = RecursicaOverStyled<Omit<MuiChipProps, "variant" | "size" | "color" | "radius"> & RecursicaChipProps>;
|
|
15
|
+
export declare const Chip: React.ForwardRefExoticComponent<(Omit<Omit<Omit<MuiChipProps, "color" | "variant" | "size" | "radius"> & RecursicaChipProps, "className" | "classes" | "style" | "sx" | "color" | "bgcolor" | "backgroundColor" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "textAlign" | "border" | "borderTop" | "borderBottom" | "borderLeft" | "borderRight" | "borderColor" | "borderRadius" | "boxShadow" | "display" | "position" | "zIndex"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
|
|
16
|
+
overStyled?: false | undefined;
|
|
17
|
+
}, "ref"> | Omit<Omit<MuiChipProps, "color" | "variant" | "size" | "radius"> & RecursicaChipProps & {
|
|
18
|
+
overStyled: true;
|
|
19
|
+
}, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { SelectProps as MuiSelectProps } from '@mui/material';
|
|
3
|
+
import { ReadOnlyControlProps } from '@recursica/adapter-common';
|
|
4
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
5
|
+
import { RecursicaFormControlWrapperProps } from '../FormControlWrapper/FormControlWrapper';
|
|
6
|
+
export interface RecursicaDropdownProps extends Omit<MuiSelectProps, "size" | "variant" | "classes" | "inputProps" | "SelectDisplayProps">, Pick<RecursicaFormControlWrapperProps, "assistiveText" | "assistiveWithIcon" | "formLayout" | "labelSize" | "labelAlignment" | "labelOptionalText" | "labelWithEditIcon" | "onLabelEditClick">, ReadOnlyControlProps {
|
|
7
|
+
/** Internal hook for Selects to override raw layout width properties when necessary */
|
|
8
|
+
containerWidth?: React.CSSProperties["width"];
|
|
9
|
+
data?: (string | {
|
|
10
|
+
value: string;
|
|
11
|
+
label: ReactNode;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
})[];
|
|
14
|
+
searchable?: boolean;
|
|
15
|
+
clearable?: boolean;
|
|
16
|
+
withAsterisk?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export type DropdownProps = RecursicaOverStyled<RecursicaDropdownProps>;
|
|
19
|
+
export declare const Dropdown: React.ForwardRefExoticComponent<(Omit<Omit<RecursicaDropdownProps, "className" | "classes" | "style" | "sx" | "color" | "bgcolor" | "backgroundColor" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "textAlign" | "border" | "borderTop" | "borderBottom" | "borderLeft" | "borderRight" | "borderColor" | "borderRadius" | "boxShadow" | "display" | "position" | "zIndex"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
|
|
20
|
+
overStyled?: false | undefined;
|
|
21
|
+
}, "ref"> | Omit<RecursicaDropdownProps & {
|
|
22
|
+
overStyled: true;
|
|
23
|
+
}, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export
|
|
3
|
-
|
|
2
|
+
export interface FormControlLayoutProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
overStyled?: boolean;
|
|
4
|
+
formLayout?: "stacked" | "side-by-side";
|
|
5
|
+
labelSize?: "small" | "default" | "md";
|
|
6
|
+
controlMaxWidth?: string;
|
|
7
|
+
controlMinWidth?: string;
|
|
8
|
+
leftSection?: React.ReactNode;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const FormControlLayout: React.ForwardRefExoticComponent<FormControlLayoutProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,3 +1,25 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
import { FormControlProps } from '@mui/material';
|
|
3
|
+
export interface RecursicaFormControlWrapperProps extends Omit<FormControlProps, "margin" | "variant" | "size" | "color"> {
|
|
4
|
+
overStyled?: boolean;
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
/** Primary assistive description bound natively to the component footer. Maps to MUI's 'helperText' dynamically. */
|
|
7
|
+
assistiveText?: React.ReactNode;
|
|
8
|
+
/** Secondary parameter fallback identical to assistiveText to match MUI / Mantine native APIs safely. */
|
|
9
|
+
description?: React.ReactNode;
|
|
10
|
+
/** Fallback mapping for MUI's native helperText */
|
|
11
|
+
helperText?: React.ReactNode;
|
|
12
|
+
assistiveWithIcon?: boolean;
|
|
13
|
+
formLayout?: "stacked" | "side-by-side";
|
|
14
|
+
labelSize?: "small" | "default" | "md";
|
|
15
|
+
labelAlignment?: "left" | "right";
|
|
16
|
+
labelOptionalText?: React.ReactNode | true;
|
|
17
|
+
labelWithEditIcon?: boolean;
|
|
18
|
+
onLabelEditClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
19
|
+
labelActionArea?: React.ReactNode;
|
|
20
|
+
/** Allows layout mapping to limit the input's bounding box without impacting the label */
|
|
21
|
+
controlMaxWidth?: string;
|
|
22
|
+
controlMinWidth?: string;
|
|
23
|
+
}
|
|
24
|
+
export type FormControlWrapperProps = RecursicaFormControlWrapperProps;
|
|
25
|
+
export declare const FormControlWrapper: React.ForwardRefExoticComponent<Omit<RecursicaFormControlWrapperProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,3 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { PopoverProps as MuiHoverCardProps } from '@mui/material';
|
|
2
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
3
|
+
/**
|
|
4
|
+
* Recursica-specific props for HoverCard.
|
|
5
|
+
*/
|
|
6
|
+
export interface RecursicaHoverCardProps {
|
|
7
|
+
/**
|
|
8
|
+
* Whether to display a beak (arrow) pointing from the dropdown to the target.
|
|
9
|
+
* This is the Recursica equivalent of Mui's `withArrow`.
|
|
10
|
+
* When both `withBeak` and `withArrow` are provided, `withBeak` takes precedence.
|
|
11
|
+
*/
|
|
12
|
+
withBeak?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Recursica HoverCard component wrapping Mui's composable HoverCard.
|
|
16
|
+
*
|
|
17
|
+
* Displays a dropdown panel when the user hovers over a target element.
|
|
18
|
+
* Uses the composable dot-notation pattern:
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <HoverCard withBeak>
|
|
21
|
+
* <HoverCard.Target>
|
|
22
|
+
* <Button>Hover me</Button>
|
|
23
|
+
* </HoverCard.Target>
|
|
24
|
+
* <HoverCard.Dropdown>
|
|
25
|
+
* Content displayed on hover
|
|
26
|
+
* </HoverCard.Dropdown>
|
|
27
|
+
* </HoverCard>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export type HoverCardProps = RecursicaOverStyled<MuiHoverCardProps & RecursicaHoverCardProps>;
|
|
31
|
+
declare const HoverCardBase: {
|
|
32
|
+
({ overStyled, withBeak, ...rest }: HoverCardProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
displayName: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Wrapper for the element that triggers the hover card.
|
|
37
|
+
* Requires a single child element that supports ref forwarding.
|
|
38
|
+
*/
|
|
39
|
+
export type HoverCardTargetProps = any;
|
|
40
|
+
declare const HoverCardTarget: {
|
|
41
|
+
(props: HoverCardTargetProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
/** The dropdown panel displayed when hovering over the target. */
|
|
45
|
+
export type HoverCardDropdownProps = RecursicaOverStyled<any>;
|
|
46
|
+
declare const HoverCardDropdown: {
|
|
47
|
+
({ overStyled, ...rest }: HoverCardDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
displayName: string;
|
|
49
|
+
};
|
|
50
|
+
type HoverCardComponent = typeof HoverCardBase & {
|
|
51
|
+
Target: typeof HoverCardTarget;
|
|
52
|
+
Dropdown: typeof HoverCardDropdown;
|
|
53
|
+
};
|
|
54
|
+
export declare const HoverCard: HoverCardComponent;
|
|
55
|
+
export {};
|
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
import { InputLabelProps } from '@mui/material';
|
|
3
|
+
export interface LabelProps extends InputLabelProps {
|
|
4
|
+
overStyled?: boolean;
|
|
5
|
+
/** Explicit optional text to render safely mapping alongside the label. Hidden natively if 'required' is flagged true. */
|
|
6
|
+
labelOptionalText?: React.ReactNode | true;
|
|
7
|
+
/** Triggers the inline edit action icon native layout hook beside the label element. */
|
|
8
|
+
labelWithEditIcon?: boolean;
|
|
9
|
+
/** Fires specifically on icon click natively. */
|
|
10
|
+
onLabelEditClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
11
|
+
/** Replaces the right side optional text block natively with any custom React node (e.g. actions, toggles). */
|
|
12
|
+
labelActionArea?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const Label: React.ForwardRefExoticComponent<Omit<LabelProps, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
@@ -7,7 +7,7 @@ export interface RecursicaLinkProps {
|
|
|
7
7
|
component?: React.ElementType;
|
|
8
8
|
}
|
|
9
9
|
export type LinkProps = RecursicaOverStyled<Omit<MUILinkProps, "underline"> & RecursicaLinkProps>;
|
|
10
|
-
export declare const Link: React.ForwardRefExoticComponent<(Omit<Omit<Omit<MUILinkProps, "underline"> & RecursicaLinkProps, "
|
|
10
|
+
export declare const Link: React.ForwardRefExoticComponent<(Omit<Omit<Omit<MUILinkProps, "underline"> & RecursicaLinkProps, "className" | "classes" | "style" | "sx" | "color" | "bgcolor" | "backgroundColor" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "textAlign" | "border" | "borderTop" | "borderBottom" | "borderLeft" | "borderRight" | "borderColor" | "borderRadius" | "boxShadow" | "display" | "position" | "zIndex"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
|
|
11
11
|
overStyled?: false | undefined;
|
|
12
12
|
}, "ref"> | Omit<Omit<MUILinkProps, "underline"> & RecursicaLinkProps & {
|
|
13
13
|
overStyled: true;
|
|
@@ -1,3 +1,99 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { MenuProps as MuiMenuProps } from '@mui/material';
|
|
2
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
3
|
+
/**
|
|
4
|
+
* Recursica Menu component wrapping Mui's composable Menu.
|
|
5
|
+
*
|
|
6
|
+
* Usage follows the composable dot-notation pattern:
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <Menu>
|
|
9
|
+
* <Menu.Target><Button>Open</Button></Menu.Target>
|
|
10
|
+
* <Menu.Dropdown>
|
|
11
|
+
* <Menu.Label>Section</Menu.Label>
|
|
12
|
+
* <Menu.Item>Action</Menu.Item>
|
|
13
|
+
* <Menu.Divider />
|
|
14
|
+
* <Menu.Item>Another action</Menu.Item>
|
|
15
|
+
* </Menu.Dropdown>
|
|
16
|
+
* </Menu>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export type MenuProps = RecursicaOverStyled<MuiMenuProps>;
|
|
20
|
+
declare const MenuBase: {
|
|
21
|
+
({ overStyled, ...rest }: MenuProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Wrapper for the element that triggers the menu.
|
|
26
|
+
* Requires a single child element that supports ref forwarding.
|
|
27
|
+
*/
|
|
28
|
+
export type MenuTargetProps = any;
|
|
29
|
+
declare const MenuTarget: {
|
|
30
|
+
(props: MenuTargetProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
33
|
+
/** The dropdown panel containing menu items, dividers, and labels. */
|
|
34
|
+
export type MenuDropdownProps = RecursicaOverStyled<any>;
|
|
35
|
+
declare const MenuDropdown: import('react').ForwardRefExoticComponent<Omit<any, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
36
|
+
/**
|
|
37
|
+
* An individual actionable item within the menu dropdown.
|
|
38
|
+
*
|
|
39
|
+
* **Note:** Mui's `color` prop is stripped in strict mode to enforce
|
|
40
|
+
* design token adherence. Use `overStyled={true}` if you need to bypass.
|
|
41
|
+
*/
|
|
42
|
+
export type MenuItemProps = RecursicaOverStyled<Omit<any, "color">>;
|
|
43
|
+
/**
|
|
44
|
+
* An individual actionable item within the menu dropdown.
|
|
45
|
+
*
|
|
46
|
+
* Supports polymorphism via the `component` prop for link-style items.
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <Menu.Item component="a" href="/settings">Settings</Menu.Item>
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
declare const MenuItem: any;
|
|
53
|
+
/** A visual separator between groups of menu items. */
|
|
54
|
+
export type MenuDividerProps = RecursicaOverStyled<any>;
|
|
55
|
+
declare const MenuDivider: import('react').ForwardRefExoticComponent<Omit<any, "ref"> & import('react').RefAttributes<HTMLHRElement>>;
|
|
56
|
+
/** A non-interactive section label used to categorize groups of menu items. */
|
|
57
|
+
export type MenuLabelProps = RecursicaOverStyled<any>;
|
|
58
|
+
declare const MenuLabel: import('react').ForwardRefExoticComponent<Omit<any, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
59
|
+
/** Container for a submenu, wrapping Menu.Sub.Target and Menu.Sub.Dropdown. */
|
|
60
|
+
export type MenuSubProps = any;
|
|
61
|
+
declare const MenuSubBase: {
|
|
62
|
+
(props: MenuSubProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
displayName: string;
|
|
64
|
+
};
|
|
65
|
+
/** Wrapper for the element that triggers the submenu. */
|
|
66
|
+
export type MenuSubTargetProps = any;
|
|
67
|
+
declare const MenuSubTarget: {
|
|
68
|
+
(props: MenuSubTargetProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
displayName: string;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* A menu item that acts as a submenu trigger.
|
|
73
|
+
* Renders within Menu.Sub.Target and displays a chevron indicator.
|
|
74
|
+
*/
|
|
75
|
+
export type MenuSubItemProps = RecursicaOverStyled<Omit<any, "color">>;
|
|
76
|
+
/**
|
|
77
|
+
* A menu item that acts as a submenu trigger.
|
|
78
|
+
*
|
|
79
|
+
* Supports polymorphism via the `component` prop.
|
|
80
|
+
*/
|
|
81
|
+
declare const MenuSubItem: any;
|
|
82
|
+
/** The dropdown panel for a submenu. */
|
|
83
|
+
export type MenuSubDropdownProps = RecursicaOverStyled<any>;
|
|
84
|
+
declare const MenuSubDropdown: import('react').ForwardRefExoticComponent<Omit<any, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
85
|
+
type MenuSubComponent = typeof MenuSubBase & {
|
|
86
|
+
Target: typeof MenuSubTarget;
|
|
87
|
+
Item: typeof MenuSubItem;
|
|
88
|
+
Dropdown: typeof MenuSubDropdown;
|
|
89
|
+
};
|
|
90
|
+
type MenuComponent = typeof MenuBase & {
|
|
91
|
+
Target: typeof MenuTarget;
|
|
92
|
+
Dropdown: typeof MenuDropdown;
|
|
93
|
+
Item: typeof MenuItem;
|
|
94
|
+
Divider: typeof MenuDivider;
|
|
95
|
+
Label: typeof MenuLabel;
|
|
96
|
+
Sub: MenuSubComponent;
|
|
97
|
+
};
|
|
98
|
+
export declare const Menu: MenuComponent;
|
|
99
|
+
export {};
|
|
@@ -1,3 +1,37 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { Modal as MuiModal, ModalProps as MuiModalProps } from '@mui/material';
|
|
3
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
4
|
+
/**
|
|
5
|
+
* Properties for the strictly-tokenized Modal component.
|
|
6
|
+
* Native Mui 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<MuiModalProps, "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<any>;
|
|
24
|
+
interface ModalComponent extends React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>> {
|
|
25
|
+
Root: typeof MuiModal.Root;
|
|
26
|
+
Overlay: typeof MuiModal.Overlay;
|
|
27
|
+
Content: typeof MuiModal.Content;
|
|
28
|
+
Header: typeof MuiModal.Header;
|
|
29
|
+
Title: typeof MuiModal.Title;
|
|
30
|
+
CloseButton: typeof MuiModal.CloseButton;
|
|
31
|
+
Body: typeof ModalBody;
|
|
32
|
+
Footer: typeof ModalFooter;
|
|
33
|
+
}
|
|
34
|
+
export declare const Modal: ModalComponent & {
|
|
35
|
+
Footer: typeof ModalFooter;
|
|
36
|
+
};
|
|
37
|
+
export {};
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { TextFieldProps as MuiNumberInputProps } from '@mui/material';
|
|
3
|
+
import { ReadOnlyControlProps } from '@recursica/adapter-common';
|
|
4
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
5
|
+
import { RecursicaFormControlWrapperProps } from '../FormControlWrapper/FormControlWrapper';
|
|
6
|
+
export interface RecursicaNumberInputProps extends Omit<MuiNumberInputProps, "size" | "variant" | "radius" | "wrapperProps" | "classNames" | "styles">, Pick<RecursicaFormControlWrapperProps, "assistiveText" | "assistiveWithIcon" | "formLayout" | "labelSize" | "labelAlignment" | "labelOptionalText" | "labelWithEditIcon" | "onLabelEditClick">, ReadOnlyControlProps {
|
|
7
|
+
/** Enables/disables the controls to increment and decrement the value */
|
|
8
|
+
hideControls?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export type NumberInputProps = RecursicaOverStyled<RecursicaNumberInputProps>;
|
|
11
|
+
export declare const NumberInput: React.ForwardRefExoticComponent<(Omit<Omit<RecursicaNumberInputProps, "className" | "classes" | "style" | "sx" | "color" | "bgcolor" | "backgroundColor" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "textAlign" | "border" | "borderTop" | "borderBottom" | "borderLeft" | "borderRight" | "borderColor" | "borderRadius" | "boxShadow" | "display" | "position" | "zIndex"> & import('../../utils/filterStylingProps').ForbiddenStyles & {
|
|
12
|
+
overStyled?: false | undefined;
|
|
13
|
+
}, "ref"> | Omit<RecursicaNumberInputProps & {
|
|
14
|
+
overStyled: true;
|
|
15
|
+
}, "ref">) & React.RefAttributes<HTMLInputElement>>;
|