@recursica/mantine-adapter 0.9.3 → 0.10.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/.storybook/commonArgTypes.ts +148 -0
- package/CHANGELOG.md +88 -0
- package/README.md +48 -332
- package/dist/index.d.ts +2 -0
- package/dist/mantine-adapter.cjs +2 -0
- package/dist/mantine-adapter.cjs.map +1 -0
- package/dist/mantine-adapter.css +1 -0
- package/dist/mantine-adapter.js +1797 -0
- package/dist/mantine-adapter.js.map +1 -0
- package/dist/src/components/Accordion/Accordion.d.ts +42 -0
- package/dist/src/components/Accordion/index.d.ts +1 -0
- package/dist/src/components/AssistiveElement/AssistiveElement.d.ts +10 -0
- package/dist/src/components/Avatar/Avatar.d.ts +9 -0
- package/dist/src/components/Avatar/index.d.ts +1 -0
- package/dist/src/components/Badge/Badge.d.ts +8 -0
- package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +6 -0
- package/dist/src/components/Button/Button.d.ts +10 -0
- package/dist/src/components/Button/index.d.ts +1 -0
- package/dist/src/components/Card/Card.d.ts +38 -0
- package/dist/src/components/Checkbox/Checkbox.d.ts +11 -0
- package/dist/src/components/Checkbox/CheckboxGroup.d.ts +9 -0
- package/dist/src/components/Chip/Chip.d.ts +15 -0
- package/dist/src/components/Container/Container.d.ts +18 -0
- package/dist/src/components/DatePicker/DatePicker.d.ts +3 -0
- package/dist/src/components/Dropdown/Dropdown.d.ts +11 -0
- package/dist/src/components/FileInput/FileInput.d.ts +3 -0
- package/dist/src/components/FileUpload/FileUpload.d.ts +3 -0
- package/dist/src/components/Flex/Flex.d.ts +17 -0
- package/dist/src/components/FormControlWrapper/FormControlWrapper.d.ts +18 -0
- package/dist/src/components/Group/Group.d.ts +17 -0
- package/dist/src/components/HoverCard/HoverCard.d.ts +3 -0
- package/dist/src/components/Label/Label.d.ts +21 -0
- package/dist/src/components/Label/index.d.ts +1 -0
- package/dist/src/components/Link/Link.d.ts +3 -0
- package/dist/src/components/Loader/Loader.d.ts +10 -0
- package/dist/src/components/Menu/Menu.d.ts +3 -0
- package/dist/src/components/Modal/Modal.d.ts +3 -0
- package/dist/src/components/NumberInput/NumberInput.d.ts +3 -0
- package/dist/src/components/Pagination/Pagination.d.ts +3 -0
- package/dist/src/components/Panel/Panel.d.ts +3 -0
- package/dist/src/components/Popover/Popover.d.ts +3 -0
- package/dist/src/components/Radio/Radio.d.ts +11 -0
- package/dist/src/components/Radio/RadioGroup.d.ts +9 -0
- package/dist/src/components/ReadOnlyField/ReadOnlyField.d.ts +20 -0
- package/dist/src/components/ReadOnlyField/ReadOnlyTextField.d.ts +8 -0
- package/dist/src/components/ReadOnlyField/WithReadOnlyWrapper.d.ts +22 -0
- package/dist/src/components/ReadOnlyField/index.d.ts +3 -0
- package/dist/src/components/Search/Search.d.ts +3 -0
- package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +3 -0
- package/dist/src/components/Slider/Slider.d.ts +3 -0
- package/dist/src/components/Stack/Stack.d.ts +15 -0
- package/dist/src/components/Stepper/Stepper.d.ts +3 -0
- package/dist/src/components/Switch/Switch.d.ts +11 -0
- package/dist/src/components/Switch/SwitchGroup.d.ts +9 -0
- package/dist/src/components/Table/Table.d.ts +3 -0
- package/dist/src/components/Tabs/Tabs.d.ts +3 -0
- package/dist/src/components/Text/Text.d.ts +17 -0
- package/dist/src/components/TextArea/TextArea.d.ts +15 -0
- package/dist/src/components/TextField/TextField.d.ts +9 -0
- package/dist/src/components/TimePicker/TimePicker.d.ts +3 -0
- package/dist/src/components/Timeline/Timeline.d.ts +3 -0
- package/dist/src/components/Title/Title.d.ts +13 -0
- package/dist/src/components/Toast/Toast.d.ts +3 -0
- package/dist/src/components/Tooltip/Tooltip.d.ts +3 -0
- package/dist/src/components/TransferList/TransferList.d.ts +3 -0
- package/dist/src/components/index.d.ts +47 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/types/index.d.ts +6 -0
- package/dist/src/utils/ColorSchemeWrapper.d.ts +3 -0
- package/dist/src/utils/copyToClipboard.d.ts +8 -0
- package/dist/src/utils/filterStylingProps.d.ts +36 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/vite.config.d.ts +2 -0
- package/dist/vite.svg +1 -0
- package/dist/vitest.workspace.d.ts +2 -0
- package/package.json +74 -35
- package/src/OverStyling.stories.tsx +174 -0
- package/src/Version.stories.tsx +56 -0
- package/src/components/Accordion/ACCORDION_IMPLEMENTATION_NOTES.md +48 -0
- package/src/components/Accordion/Accordion.module.css +282 -0
- package/src/components/Accordion/Accordion.stories.tsx +145 -0
- package/src/components/Accordion/Accordion.tsx +200 -0
- package/src/components/Accordion/index.ts +1 -0
- package/src/components/AssistiveElement/AssistiveElement.module.css +111 -0
- package/src/components/AssistiveElement/AssistiveElement.stories.tsx +73 -0
- package/src/components/AssistiveElement/AssistiveElement.tsx +91 -0
- package/src/components/Avatar/AVATAR_IMPLEMENTATION_NOTES.md +24 -0
- package/src/components/Avatar/Avatar.module.css +340 -0
- package/src/components/Avatar/Avatar.stories.tsx +102 -0
- package/src/components/Avatar/Avatar.tsx +100 -0
- package/src/components/Avatar/index.ts +1 -0
- package/src/components/Badge/BADGE_IMPLEMENTATION_NOTES.md +18 -0
- package/src/components/Badge/Badge.module.css +124 -0
- package/src/components/Badge/Badge.stories.tsx +77 -0
- package/src/components/Badge/Badge.tsx +66 -0
- package/src/components/Breadcrumb/BREADCRUMB_IMPLEMENTATION_NOTES.md +14 -0
- package/src/components/Breadcrumb/Breadcrumb.module.css +26 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +77 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +64 -0
- package/src/components/Button/Button.module.css +275 -0
- package/src/components/Button/Button.stories.tsx +105 -0
- package/src/components/Button/Button.tsx +122 -0
- package/src/components/Button/IMPLEMENTATION_NOTES.md +45 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Card/CARD_IMPLEMENTATION_NOTES.md +10 -0
- package/src/components/Card/Card.module.css +60 -0
- package/src/components/Card/Card.stories.tsx +141 -0
- package/src/components/Card/Card.tsx +176 -0
- package/src/components/Checkbox/CHECKBOX_IMPLEMENTATION_NOTES.md +25 -0
- package/src/components/Checkbox/Checkbox.module.css +204 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +73 -0
- package/src/components/Checkbox/Checkbox.tsx +102 -0
- package/src/components/Checkbox/CheckboxGroup.stories.tsx +138 -0
- package/src/components/Checkbox/CheckboxGroup.tsx +140 -0
- package/src/components/Chip/CHIP_IMPLEMENTATION_NOTES.md +35 -0
- package/src/components/Chip/Chip.module.css +218 -0
- package/src/components/Chip/Chip.stories.tsx +115 -0
- package/src/components/Chip/Chip.tsx +143 -0
- package/src/components/Container/CONTAINER_IMPLEMENTATION_NOTES.md +4 -0
- package/src/components/Container/Container.module.css +7 -0
- package/src/components/Container/Container.stories.tsx +115 -0
- package/src/components/Container/Container.tsx +89 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +22 -0
- package/src/components/DatePicker/DatePicker.tsx +7 -0
- package/src/components/Dropdown/DROPDOWN_IMPLEMENTATION_NOTES.md +7 -0
- package/src/components/Dropdown/Dropdown.module.css +272 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +94 -0
- package/src/components/Dropdown/Dropdown.tsx +173 -0
- package/src/components/FileInput/FileInput.stories.tsx +22 -0
- package/src/components/FileInput/FileInput.tsx +7 -0
- package/src/components/FileUpload/FileUpload.stories.tsx +22 -0
- package/src/components/FileUpload/FileUpload.tsx +7 -0
- package/src/components/Flex/FLEX_IMPLEMENTATION_NOTES.md +4 -0
- package/src/components/Flex/Flex.module.css +7 -0
- package/src/components/Flex/Flex.stories.tsx +125 -0
- package/src/components/Flex/Flex.tsx +68 -0
- package/src/components/FormControlWrapper/FORMCONTROLWRAPPER_IMPLEMENTATION_NOTES.md +32 -0
- package/src/components/FormControlWrapper/FormControlWrapper.module.css +46 -0
- package/src/components/FormControlWrapper/FormControlWrapper.stories.tsx +116 -0
- package/src/components/FormControlWrapper/FormControlWrapper.tsx +170 -0
- package/src/components/Group/GROUP_IMPLEMENTATION_NOTES.md +4 -0
- package/src/components/Group/Group.module.css +7 -0
- package/src/components/Group/Group.stories.tsx +117 -0
- package/src/components/Group/Group.tsx +68 -0
- package/src/components/HoverCard/HoverCard.stories.tsx +17 -0
- package/src/components/HoverCard/HoverCard.tsx +7 -0
- package/src/components/Label/LABEL_IMPLEMENTATION_NOTES.md +48 -0
- package/src/components/Label/Label.module.css +177 -0
- package/src/components/Label/Label.stories.tsx +123 -0
- package/src/components/Label/Label.tsx +132 -0
- package/src/components/Label/index.ts +1 -0
- package/src/components/Link/Link.stories.tsx +17 -0
- package/src/components/Link/Link.tsx +7 -0
- package/src/components/Loader/Loader.module.css +60 -0
- package/src/components/Loader/Loader.stories.tsx +98 -0
- package/src/components/Loader/Loader.tsx +76 -0
- package/src/components/Menu/Menu.stories.tsx +17 -0
- package/src/components/Menu/Menu.tsx +7 -0
- package/src/components/Modal/Modal.stories.tsx +17 -0
- package/src/components/Modal/Modal.tsx +7 -0
- package/src/components/NumberInput/NumberInput.stories.tsx +22 -0
- package/src/components/NumberInput/NumberInput.tsx +7 -0
- package/src/components/Pagination/Pagination.stories.tsx +17 -0
- package/src/components/Pagination/Pagination.tsx +7 -0
- package/src/components/Panel/Panel.stories.tsx +17 -0
- package/src/components/Panel/Panel.tsx +7 -0
- package/src/components/Popover/Popover.stories.tsx +17 -0
- package/src/components/Popover/Popover.tsx +7 -0
- package/src/components/Radio/Radio.module.css +207 -0
- package/src/components/Radio/Radio.stories.tsx +76 -0
- package/src/components/Radio/Radio.tsx +115 -0
- package/src/components/Radio/RadioGroup.stories.tsx +98 -0
- package/src/components/Radio/RadioGroup.tsx +138 -0
- package/src/components/ReadOnlyField/READ_ONLY_FIELD_IMPLEMENTATION_NOTES.md +15 -0
- package/src/components/ReadOnlyField/ReadOnlyField.module.css +49 -0
- package/src/components/ReadOnlyField/ReadOnlyField.stories.tsx +120 -0
- package/src/components/ReadOnlyField/ReadOnlyField.tsx +75 -0
- package/src/components/ReadOnlyField/ReadOnlyTextField.tsx +46 -0
- package/src/components/ReadOnlyField/WithReadOnlyWrapper.tsx +85 -0
- package/src/components/ReadOnlyField/index.ts +3 -0
- package/src/components/Search/Search.stories.tsx +17 -0
- package/src/components/Search/Search.tsx +7 -0
- package/src/components/SegmentedControl/SegmentedControl.stories.tsx +22 -0
- package/src/components/SegmentedControl/SegmentedControl.tsx +7 -0
- package/src/components/Slider/Slider.stories.tsx +22 -0
- package/src/components/Slider/Slider.tsx +7 -0
- package/src/components/Stack/STACK_IMPLEMENTATION_NOTES.md +4 -0
- package/src/components/Stack/Stack.module.css +7 -0
- package/src/components/Stack/Stack.stories.tsx +105 -0
- package/src/components/Stack/Stack.tsx +66 -0
- package/src/components/Stepper/Stepper.stories.tsx +17 -0
- package/src/components/Stepper/Stepper.tsx +7 -0
- package/src/components/Switch/SWITCH_IMPLEMENTATION_NOTES.md +28 -0
- package/src/components/Switch/Switch.module.css +207 -0
- package/src/components/Switch/Switch.stories.tsx +96 -0
- package/src/components/Switch/Switch.tsx +119 -0
- package/src/components/Switch/SwitchGroup.stories.tsx +112 -0
- package/src/components/Switch/SwitchGroup.tsx +138 -0
- package/src/components/Table/Table.stories.tsx +17 -0
- package/src/components/Table/Table.tsx +7 -0
- package/src/components/Tabs/Tabs.stories.tsx +17 -0
- package/src/components/Tabs/Tabs.tsx +7 -0
- package/src/components/Text/Text.stories.tsx +88 -0
- package/src/components/Text/Text.tsx +54 -0
- package/src/components/TextArea/TEXTAREA_IMPLEMENTATION_NOTES.md +7 -0
- package/src/components/TextArea/TextArea.module.css +225 -0
- package/src/components/TextArea/TextArea.stories.tsx +94 -0
- package/src/components/TextArea/TextArea.tsx +151 -0
- package/src/components/TextField/TEXTFIELD_IMPLEMENTATION_NOTES.md +19 -0
- package/src/components/TextField/TextField.module.css +225 -0
- package/src/components/TextField/TextField.stories.tsx +162 -0
- package/src/components/TextField/TextField.tsx +138 -0
- package/src/components/TimePicker/TimePicker.stories.tsx +22 -0
- package/src/components/TimePicker/TimePicker.tsx +7 -0
- package/src/components/Timeline/Timeline.stories.tsx +17 -0
- package/src/components/Timeline/Timeline.tsx +7 -0
- package/src/components/Title/Title.stories.tsx +63 -0
- package/src/components/Title/Title.tsx +45 -0
- package/src/components/Toast/Toast.stories.tsx +17 -0
- package/src/components/Toast/Toast.tsx +7 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +17 -0
- package/src/components/Tooltip/Tooltip.tsx +7 -0
- package/src/components/TransferList/TransferList.stories.tsx +17 -0
- package/src/components/TransferList/TransferList.tsx +7 -0
- package/src/components/index.ts +47 -0
- package/src/env.d.ts +7 -0
- package/src/index.ts +3 -0
- package/src/types/index.ts +9 -0
- package/src/types/mantine.d.ts +7 -0
- package/src/types/scss-modules.d.ts +9 -0
- package/src/utils/ColorSchemeWrapper.tsx +27 -0
- package/src/utils/copyToClipboard.ts +36 -0
- package/src/utils/filterStylingProps.ts +141 -0
- package/src/utils/index.ts +1 -0
- package/dist/index.js +0 -917
- package/dist/index.js.map +0 -1
- package/dist/main.cjs +0 -924
- package/dist/main.cjs.map +0 -1
- package/dist/main.js +0 -922
- package/dist/main.js.map +0 -1
- package/dist/webworker.js +0 -787
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SelectProps as MantineSelectProps } from '@mantine/core';
|
|
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<MantineSelectProps, "size" | "variant" | "radius" | "wrapperProps">, 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
|
+
}
|
|
10
|
+
export type DropdownProps = RecursicaOverStyled<RecursicaDropdownProps>;
|
|
11
|
+
export declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FlexProps as MantineFlexProps } from '@mantine/core';
|
|
3
|
+
import { RecursicaOverStyled, RecursicaSpacing } from '../../utils/filterStylingProps';
|
|
4
|
+
export interface RecursicaFlexProps {
|
|
5
|
+
/**
|
|
6
|
+
* Children components inside the Flex container
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
gap?: MantineFlexProps["gap"] | RecursicaSpacing;
|
|
10
|
+
rowGap?: MantineFlexProps["gap"] | RecursicaSpacing;
|
|
11
|
+
columnGap?: MantineFlexProps["gap"] | RecursicaSpacing;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Flex layout wrapper
|
|
15
|
+
*/
|
|
16
|
+
export type FlexProps = RecursicaOverStyled<MantineFlexProps & RecursicaFlexProps>;
|
|
17
|
+
export declare const Flex: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InputWrapperProps } from '@mantine/core';
|
|
3
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
4
|
+
import { RecursicaLabelProps } from '../Label/Label';
|
|
5
|
+
export interface RecursicaFormControlWrapperProps extends RecursicaLabelProps {
|
|
6
|
+
/** Securely replaces standard Mantine descriptions safely providing standard Assistive properties. */
|
|
7
|
+
assistiveText?: React.ReactNode;
|
|
8
|
+
/** Explicit toggle to suppress the Info icon rendering natively alongside the assistiveText. Defaults to true. */
|
|
9
|
+
assistiveWithIcon?: boolean;
|
|
10
|
+
/** Custom action area to render alongside the label instead of the default edit icon. */
|
|
11
|
+
labelActionArea?: React.ReactNode;
|
|
12
|
+
/** Pass the native maximum width design variable dynamically bounding the specific wrapper width exclusively. */
|
|
13
|
+
controlMaxWidth: string | undefined;
|
|
14
|
+
/** Pass the native minimum width design variable dynamically bounding the specific wrapper width exclusively. */
|
|
15
|
+
controlMinWidth: string | undefined;
|
|
16
|
+
}
|
|
17
|
+
export type FormControlWrapperProps = RecursicaOverStyled<Omit<InputWrapperProps, "labelProps" | "inputWrapperOrder"> & RecursicaFormControlWrapperProps>;
|
|
18
|
+
export declare const FormControlWrapper: React.ForwardRefExoticComponent<FormControlWrapperProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { GroupProps as MantineGroupProps } from '@mantine/core';
|
|
3
|
+
import { RecursicaOverStyled, RecursicaSpacing } from '../../utils/filterStylingProps';
|
|
4
|
+
export interface RecursicaGroupProps {
|
|
5
|
+
/**
|
|
6
|
+
* Children components inside the group
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
gap?: MantineGroupProps["gap"] | RecursicaSpacing;
|
|
10
|
+
rowGap?: MantineGroupProps["gap"] | RecursicaSpacing;
|
|
11
|
+
columnGap?: MantineGroupProps["gap"] | RecursicaSpacing;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Group flex layout wrapper
|
|
15
|
+
*/
|
|
16
|
+
export type GroupProps = RecursicaOverStyled<MantineGroupProps & RecursicaGroupProps>;
|
|
17
|
+
export declare const Group: React.ForwardRefExoticComponent<GroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InputLabelProps } from '@mantine/core';
|
|
3
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
4
|
+
export interface RecursicaLabelProps {
|
|
5
|
+
/** Overall structural flow mapping the Form Control natively cascading down to Label and Input logic. */
|
|
6
|
+
formLayout?: "stacked" | "side-by-side";
|
|
7
|
+
/** Specifies the sizing metrics natively mapping the Label boundaries. */
|
|
8
|
+
labelSize?: "default" | "small";
|
|
9
|
+
/** Overall alignment directive for the label strings natively forcing Left/Right justification. */
|
|
10
|
+
labelAlignment?: "left" | "right";
|
|
11
|
+
/** Injects an indicator text block alongside the label. Can be boolean (`true` maps to '(Optional)') or custom React nodes. */
|
|
12
|
+
labelOptionalText?: boolean | React.ReactNode;
|
|
13
|
+
/** When true, forces the native Edit Icon to replace the standard asterisk visually. */
|
|
14
|
+
labelWithEditIcon?: boolean;
|
|
15
|
+
/** Custom action area to render alongside the label instead of the default edit icon. */
|
|
16
|
+
labelActionArea?: React.ReactNode;
|
|
17
|
+
/** Interaction hook invoked whenever a generated edit icon block natively triggers a click event. */
|
|
18
|
+
onLabelEditClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
19
|
+
}
|
|
20
|
+
export type LabelProps = RecursicaOverStyled<Omit<InputLabelProps, "size"> & RecursicaLabelProps>;
|
|
21
|
+
export declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Label';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LoaderProps as MantineLoaderProps } from '@mantine/core';
|
|
2
|
+
import { RecursicaOverStyled, RecursicaSize } from '../../utils/filterStylingProps';
|
|
3
|
+
export interface RecursicaLoaderProps {
|
|
4
|
+
/** Map to the component styles defined in variables */
|
|
5
|
+
variant?: "oval" | "bars" | "dots";
|
|
6
|
+
/** Map to Recursica sizes */
|
|
7
|
+
size?: "sm" | "md" | "lg" | RecursicaSize;
|
|
8
|
+
}
|
|
9
|
+
export type LoaderProps = RecursicaOverStyled<Omit<MantineLoaderProps, "variant" | "size" | "type"> & RecursicaLoaderProps>;
|
|
10
|
+
export declare const Loader: import('react').ForwardRefExoticComponent<LoaderProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RadioProps as MantineRadioProps } from '@mantine/core';
|
|
2
|
+
import { ReadOnlyControlProps } from '@recursica/adapter-common';
|
|
3
|
+
import { RadioGroup } from './RadioGroup';
|
|
4
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
5
|
+
export type RecursicaRadioProps = Omit<MantineRadioProps, "size" | "color" | "radius" | "iconColor" | "variant"> & ReadOnlyControlProps;
|
|
6
|
+
export type RadioProps = RecursicaOverStyled<RecursicaRadioProps>;
|
|
7
|
+
type RadioComponent = React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>> & {
|
|
8
|
+
Group: typeof RadioGroup;
|
|
9
|
+
};
|
|
10
|
+
export declare const Radio: RadioComponent;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { RadioGroupProps as MantineRadioGroupProps } from '@mantine/core';
|
|
3
|
+
import { ReadOnlyControlProps } from '@recursica/adapter-common';
|
|
4
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
5
|
+
import { RecursicaFormControlWrapperProps } from '../FormControlWrapper/FormControlWrapper';
|
|
6
|
+
export interface RecursicaRadioGroupProps extends Omit<MantineRadioGroupProps, "size" | "labelProps">, Omit<RecursicaFormControlWrapperProps, "controlMaxWidth" | "controlMinWidth">, ReadOnlyControlProps {
|
|
7
|
+
}
|
|
8
|
+
export type RadioGroupProps = RecursicaOverStyled<RecursicaRadioGroupProps>;
|
|
9
|
+
export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ReadOnlyFieldType } from '@recursica/adapter-common';
|
|
3
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
4
|
+
import { FormControlWrapperProps } from '../FormControlWrapper/FormControlWrapper';
|
|
5
|
+
export interface RecursicaReadOnlyFieldProps extends Omit<FormControlWrapperProps, "children" | "overStyled"> {
|
|
6
|
+
/** The specific value to be rendered in read-only mode explicitly matching the original field input */
|
|
7
|
+
value?: any;
|
|
8
|
+
/** The data type formatting rules bounding how the string is presented to the user */
|
|
9
|
+
type?: ReadOnlyFieldType;
|
|
10
|
+
/** Custom renderer explicitly responsible for formatting missing/empty value mappings (overriding default 'N/A') */
|
|
11
|
+
emptyValueComponent?: React.ElementType<{
|
|
12
|
+
value?: any;
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
export type ReadOnlyFieldProps = RecursicaOverStyled<RecursicaReadOnlyFieldProps>;
|
|
16
|
+
/**
|
|
17
|
+
* A native generic form control wrapper exclusively responsible for displaying fixed data.
|
|
18
|
+
* Internally maps to structural ReadOnly primitive blocks bridging standard `FormControlWrapper` layouts natively.
|
|
19
|
+
*/
|
|
20
|
+
export declare const ReadOnlyField: React.ForwardRefExoticComponent<ReadOnlyFieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
3
|
+
export interface RecursicaReadOnlyTextFieldProps {
|
|
4
|
+
/** The value strictly rendered as text output */
|
|
5
|
+
value?: any;
|
|
6
|
+
}
|
|
7
|
+
export type ReadOnlyTextFieldProps = RecursicaOverStyled<RecursicaReadOnlyTextFieldProps>;
|
|
8
|
+
export declare const ReadOnlyTextField: React.FC<ReadOnlyTextFieldProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ReadOnlyFieldType } from '@recursica/adapter-common';
|
|
3
|
+
import { FormControlWrapperProps } from '../FormControlWrapper/FormControlWrapper';
|
|
4
|
+
export interface WithReadOnlyWrapperProps extends Omit<FormControlWrapperProps, "children" | "overStyled"> {
|
|
5
|
+
/** Injects whether the field defaults to reading mode natively */
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
/** Explicit React component directly overtaking the baseline text renderer when read-only mode is active */
|
|
8
|
+
readOnlyComponent?: React.ReactNode;
|
|
9
|
+
/** Instructs the underlying generic ReadOnlyField which raw visual structure to bridge automatically */
|
|
10
|
+
readOnlyType?: ReadOnlyFieldType;
|
|
11
|
+
/** The isolated raw data value intercepted explicitly into the ReadOnly formatters */
|
|
12
|
+
readOnlyValue?: any;
|
|
13
|
+
/** Safely enables deep Mantine overrides transparently bypassing block filters */
|
|
14
|
+
overStyled?: boolean;
|
|
15
|
+
/** The nested active node dynamically exposed exclusively when read-only bounds are disabled */
|
|
16
|
+
activeComponent: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Universal execution barrier trapping readOnly states globally.
|
|
20
|
+
* Natively delegates active logic down avoiding duplicative internal component bindings dynamically.
|
|
21
|
+
*/
|
|
22
|
+
export declare const WithReadOnlyWrapper: React.ForwardRefExoticComponent<WithReadOnlyWrapperProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StackProps as MantineStackProps } from '@mantine/core';
|
|
3
|
+
import { RecursicaOverStyled, RecursicaSpacing } from '../../utils/filterStylingProps';
|
|
4
|
+
export interface RecursicaStackProps {
|
|
5
|
+
/**
|
|
6
|
+
* Children components inside the stack
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
gap?: MantineStackProps["gap"] | RecursicaSpacing;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Stack flex layout wrapper
|
|
13
|
+
*/
|
|
14
|
+
export type StackProps = RecursicaOverStyled<MantineStackProps & RecursicaStackProps>;
|
|
15
|
+
export declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SwitchProps as MantineSwitchProps } from '@mantine/core';
|
|
2
|
+
import { ReadOnlyControlProps } from '@recursica/adapter-common';
|
|
3
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
4
|
+
import { SwitchGroup } from './SwitchGroup';
|
|
5
|
+
export type RecursicaSwitchProps = Omit<MantineSwitchProps, "size" | "color" | "radius" | "variant"> & ReadOnlyControlProps;
|
|
6
|
+
export type SwitchProps = RecursicaOverStyled<RecursicaSwitchProps>;
|
|
7
|
+
type SwitchComponent = React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>> & {
|
|
8
|
+
Group: typeof SwitchGroup;
|
|
9
|
+
};
|
|
10
|
+
export declare const Switch: SwitchComponent;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SwitchGroupProps as MantineSwitchGroupProps } from '@mantine/core';
|
|
3
|
+
import { ReadOnlyControlProps } from '@recursica/adapter-common';
|
|
4
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
5
|
+
import { RecursicaFormControlWrapperProps } from '../FormControlWrapper/FormControlWrapper';
|
|
6
|
+
export interface RecursicaSwitchGroupProps extends Omit<MantineSwitchGroupProps, "size" | "labelProps">, Omit<RecursicaFormControlWrapperProps, "controlMaxWidth" | "controlMinWidth">, ReadOnlyControlProps {
|
|
7
|
+
}
|
|
8
|
+
export type SwitchGroupProps = RecursicaOverStyled<RecursicaSwitchGroupProps>;
|
|
9
|
+
export declare const SwitchGroup: React.ForwardRefExoticComponent<SwitchGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TextProps as MantineTextProps } from '@mantine/core';
|
|
3
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
4
|
+
export type TextVariant = "body" | "body-small" | "caption" | "overline" | "subtitle" | "subtitle-small";
|
|
5
|
+
export type RecursicaTextProps = Omit<MantineTextProps, "variant"> & {
|
|
6
|
+
/**
|
|
7
|
+
* The explicit typography hierarchy dictated by Recursica's global design tokens.
|
|
8
|
+
*/
|
|
9
|
+
variant?: TextVariant;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
export type TextProps = RecursicaOverStyled<RecursicaTextProps>;
|
|
13
|
+
/**
|
|
14
|
+
* A generalized typographical wrapper limiting text properties to bounded Recursica UI-kit tokens inherently.
|
|
15
|
+
* Do not use for semantic headings; use the explicit `<Title>` component for `<h1>` - `<h6>`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const Text: import('react').ForwardRefExoticComponent<TextProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TextareaProps as MantineTextareaProps } from '@mantine/core';
|
|
3
|
+
import { ReadOnlyControlProps } from '@recursica/adapter-common';
|
|
4
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
5
|
+
import { RecursicaFormControlWrapperProps } from '../FormControlWrapper/FormControlWrapper';
|
|
6
|
+
export interface RecursicaTextAreaProps extends Omit<MantineTextareaProps, "size" | "variant" | "radius" | "wrapperProps">, Pick<RecursicaFormControlWrapperProps, "assistiveText" | "assistiveWithIcon" | "formLayout" | "labelSize" | "labelAlignment" | "labelOptionalText" | "labelWithEditIcon" | "onLabelEditClick">, ReadOnlyControlProps {
|
|
7
|
+
/** Maximum rows for autosize textarea to grow */
|
|
8
|
+
maxRows?: number;
|
|
9
|
+
/** Minimum rows of autosize textarea */
|
|
10
|
+
minRows?: number;
|
|
11
|
+
/** If set, enables textarea height growing with its content */
|
|
12
|
+
autosize?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export type TextAreaProps = RecursicaOverStyled<RecursicaTextAreaProps>;
|
|
15
|
+
export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InputProps, InputWrapperProps } from '@mantine/core';
|
|
3
|
+
import { ReadOnlyControlProps } from '@recursica/adapter-common';
|
|
4
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
5
|
+
import { RecursicaFormControlWrapperProps } from '../FormControlWrapper/FormControlWrapper';
|
|
6
|
+
export interface RecursicaTextFieldProps extends Omit<InputProps, "size" | "variant" | "radius" | "wrapperProps">, Pick<InputWrapperProps, "label" | "error" | "required" | "withAsterisk" | "id">, Omit<React.ComponentPropsWithoutRef<"input">, "size" | "style" | "className" | "id">, Omit<RecursicaFormControlWrapperProps, "controlMaxWidth" | "controlMinWidth">, ReadOnlyControlProps {
|
|
7
|
+
}
|
|
8
|
+
export type TextFieldProps = RecursicaOverStyled<RecursicaTextFieldProps>;
|
|
9
|
+
export declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TitleProps as MantineTitleProps } from '@mantine/core';
|
|
2
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
3
|
+
export type RecursicaTitleProps = Omit<MantineTitleProps, "order"> & {
|
|
4
|
+
/**
|
|
5
|
+
* Enforces semantic HTML headers (h1-h6) cleanly bound to native typographic scaling variables in the design system.
|
|
6
|
+
*/
|
|
7
|
+
order?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
8
|
+
};
|
|
9
|
+
export type TitleProps = RecursicaOverStyled<RecursicaTitleProps>;
|
|
10
|
+
/**
|
|
11
|
+
* Enforces highly accessible structural markup utilizing semantic `<h1>` through `<h6>` tags securely bound directly to Recursica typographic scales.
|
|
12
|
+
*/
|
|
13
|
+
export declare const Title: import('react').ForwardRefExoticComponent<TitleProps & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export * from './Accordion';
|
|
2
|
+
export * from './Avatar';
|
|
3
|
+
export * from './Badge/Badge';
|
|
4
|
+
export * from './Breadcrumb/Breadcrumb';
|
|
5
|
+
export * from './Button';
|
|
6
|
+
export * from './Card/Card';
|
|
7
|
+
export * from './Checkbox/Checkbox';
|
|
8
|
+
export * from './Checkbox/CheckboxGroup';
|
|
9
|
+
export * from './Chip/Chip';
|
|
10
|
+
export * from './Container/Container';
|
|
11
|
+
export * from './DatePicker/DatePicker';
|
|
12
|
+
export * from './Dropdown/Dropdown';
|
|
13
|
+
export * from './FileInput/FileInput';
|
|
14
|
+
export * from './FileUpload/FileUpload';
|
|
15
|
+
export * from './Flex/Flex';
|
|
16
|
+
export * from './Group/Group';
|
|
17
|
+
export * from './HoverCard/HoverCard';
|
|
18
|
+
export * from './Link/Link';
|
|
19
|
+
export * from './Loader/Loader';
|
|
20
|
+
export * from './Label';
|
|
21
|
+
export * from './Menu/Menu';
|
|
22
|
+
export * from './Modal/Modal';
|
|
23
|
+
export * from './NumberInput/NumberInput';
|
|
24
|
+
export * from './Pagination/Pagination';
|
|
25
|
+
export * from './Panel/Panel';
|
|
26
|
+
export * from './Popover/Popover';
|
|
27
|
+
export * from './Radio/Radio';
|
|
28
|
+
export * from './Radio/RadioGroup';
|
|
29
|
+
export * from './ReadOnlyField';
|
|
30
|
+
export * from './Search/Search';
|
|
31
|
+
export * from './SegmentedControl/SegmentedControl';
|
|
32
|
+
export * from './Slider/Slider';
|
|
33
|
+
export * from './Stack/Stack';
|
|
34
|
+
export * from './Stepper/Stepper';
|
|
35
|
+
export * from './Switch/Switch';
|
|
36
|
+
export * from './Switch/SwitchGroup';
|
|
37
|
+
export * from './Table/Table';
|
|
38
|
+
export * from './Tabs/Tabs';
|
|
39
|
+
export * from './Text/Text';
|
|
40
|
+
export * from './TextArea/TextArea';
|
|
41
|
+
export * from './TextField/TextField';
|
|
42
|
+
export * from './TimePicker/TimePicker';
|
|
43
|
+
export * from './Timeline/Timeline';
|
|
44
|
+
export * from './Title/Title';
|
|
45
|
+
export * from './Toast/Toast';
|
|
46
|
+
export * from './Tooltip/Tooltip';
|
|
47
|
+
export * from './TransferList/TransferList';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Helper function for copy text to clipboard
|
|
4
|
+
* @param {string} textToCopy The text string for copying to the clipboard
|
|
5
|
+
* @param {element|node} componentRef The ref of the component that we want to trigger the copy
|
|
6
|
+
*/
|
|
7
|
+
declare const copyToClipboard: (textToCopy: string, componentRef: React.RefObject<HTMLElement | null>) => Promise<void>;
|
|
8
|
+
export { copyToClipboard };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* filterStylingProps
|
|
3
|
+
*
|
|
4
|
+
* This utility acts as the central gatekeeper for strict design-system adherence across
|
|
5
|
+
* all Recursica components mapped over Mantine.
|
|
6
|
+
*
|
|
7
|
+
* PHILOSOPHY:
|
|
8
|
+
* Recursica components are designed to be explicitly sandboxed tokens. Allowing external
|
|
9
|
+
* `className` or Mantine style system props (`bg`, `p`, etc.) breaks the design system by
|
|
10
|
+
* allowing developers to leak arbitrary designs into components.
|
|
11
|
+
*
|
|
12
|
+
* By default (`overStyled=false`), this utility actively prevents developers from overriding
|
|
13
|
+
* internal component styles (such as background, colors, typography, or internal classNames).
|
|
14
|
+
* It safely *permits* external layout overrides (like `margin` / `m`) so that components can
|
|
15
|
+
* easily be spaced alongside other DOM elements.
|
|
16
|
+
*
|
|
17
|
+
* If a developer passes `overStyled={true}`, this filter allows all styling properties to
|
|
18
|
+
* flow through to the underlying Mantine component natively, at the developer's own risk.
|
|
19
|
+
*
|
|
20
|
+
* @param props - The raw component props passed down to the wrapper
|
|
21
|
+
* @param overStyled - Boolean toggle to allow raw external styling. Defaults to false.
|
|
22
|
+
* @returns Sanitized component props safe for internal styling merging
|
|
23
|
+
*/
|
|
24
|
+
export declare const BLOCKED_STYLING_KEYS: readonly ["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", "bdw", "bds", "bdc", "bdr", "shadow", "w", "miw", "maw", "h", "mih", "mah"];
|
|
25
|
+
export type BlockedStylingKeys = (typeof BLOCKED_STYLING_KEYS)[number];
|
|
26
|
+
export type RecursicaSpacing = "rec-none" | "rec-sm" | "rec-default" | "rec-md" | "rec-lg" | "rec-xl" | "rec-2xl";
|
|
27
|
+
export type RecursicaSize = "small" | "default" | "large";
|
|
28
|
+
export type ForbiddenStyles = {
|
|
29
|
+
[K in BlockedStylingKeys]?: never;
|
|
30
|
+
};
|
|
31
|
+
export type RecursicaOverStyled<T> = (Omit<T, BlockedStylingKeys> & ForbiddenStyles & {
|
|
32
|
+
overStyled?: false | undefined;
|
|
33
|
+
}) | (T & {
|
|
34
|
+
overStyled: true;
|
|
35
|
+
});
|
|
36
|
+
export declare function filterStylingProps<T extends Record<string, unknown>>(props: T, overStyled?: boolean): Partial<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './copyToClipboard';
|
package/dist/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|