@recursica/mantine-adapter 0.5.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/dist/mantine-adapter.cjs +1 -1
- package/dist/mantine-adapter.cjs.map +1 -1
- package/dist/mantine-adapter.css +1 -1
- package/dist/mantine-adapter.js +997 -261
- package/dist/mantine-adapter.js.map +1 -1
- package/dist/src/components/Accordion/Accordion.d.ts +13 -28
- package/dist/src/components/AssistiveElement/AssistiveElement.d.ts +10 -0
- package/dist/src/components/Avatar/Avatar.d.ts +1 -1
- package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +6 -3
- package/dist/src/components/Button/Button.d.ts +1 -1
- package/dist/src/components/Card/Card.d.ts +38 -3
- package/dist/src/components/Checkbox/Checkbox.d.ts +11 -3
- package/dist/src/components/Checkbox/CheckboxGroup.d.ts +9 -0
- package/dist/src/components/FormControlWrapper/FormControlWrapper.d.ts +18 -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/ReadOnlyField/ReadOnlyField.d.ts +19 -2
- 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/Text/Text.d.ts +17 -0
- package/dist/src/components/TextField/TextField.d.ts +8 -2
- package/dist/src/components/Title/Title.d.ts +13 -0
- package/dist/src/components/index.d.ts +3 -1
- package/dist/src/utils/ColorSchemeWrapper.d.ts +3 -0
- package/dist/src/utils/filterStylingProps.d.ts +6 -2
- package/package.json +5 -4
|
@@ -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,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>>;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
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>>;
|
|
@@ -5,6 +5,7 @@ export * from './Breadcrumb/Breadcrumb';
|
|
|
5
5
|
export * from './Button';
|
|
6
6
|
export * from './Card/Card';
|
|
7
7
|
export * from './Checkbox/Checkbox';
|
|
8
|
+
export * from './Checkbox/CheckboxGroup';
|
|
8
9
|
export * from './Chip/Chip';
|
|
9
10
|
export * from './DatePicker/DatePicker';
|
|
10
11
|
export * from './Dropdown/Dropdown';
|
|
@@ -13,6 +14,7 @@ export * from './FileUpload/FileUpload';
|
|
|
13
14
|
export * from './HoverCard/HoverCard';
|
|
14
15
|
export * from './Link/Link';
|
|
15
16
|
export * from './Loader/Loader';
|
|
17
|
+
export * from './Label';
|
|
16
18
|
export * from './Menu/Menu';
|
|
17
19
|
export * from './Modal/Modal';
|
|
18
20
|
export * from './NumberInput/NumberInput';
|
|
@@ -20,7 +22,7 @@ export * from './Pagination/Pagination';
|
|
|
20
22
|
export * from './Panel/Panel';
|
|
21
23
|
export * from './Popover/Popover';
|
|
22
24
|
export * from './Radio/Radio';
|
|
23
|
-
export * from './ReadOnlyField
|
|
25
|
+
export * from './ReadOnlyField';
|
|
24
26
|
export * from './Search/Search';
|
|
25
27
|
export * from './SegmentedControl/SegmentedControl';
|
|
26
28
|
export * from './Slider/Slider';
|
|
@@ -21,9 +21,13 @@
|
|
|
21
21
|
* @param overStyled - Boolean toggle to allow raw external styling. Defaults to false.
|
|
22
22
|
* @returns Sanitized component props safe for internal styling merging
|
|
23
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"];
|
|
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
25
|
export type BlockedStylingKeys = (typeof BLOCKED_STYLING_KEYS)[number];
|
|
26
|
-
export type
|
|
26
|
+
export type RecursicaSpacing = "rec-none" | "rec-sm" | "rec-default" | "rec-md" | "rec-lg" | "rec-xl" | "rec-2xl";
|
|
27
|
+
export type ForbiddenStyles = {
|
|
28
|
+
[K in BlockedStylingKeys]?: never;
|
|
29
|
+
};
|
|
30
|
+
export type RecursicaOverStyled<T> = (Omit<T, BlockedStylingKeys> & ForbiddenStyles & {
|
|
27
31
|
overStyled?: false | undefined;
|
|
28
32
|
}) | (T & {
|
|
29
33
|
overStyled: true;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git+https://github.com/borderux/recursica.git"
|
|
13
13
|
},
|
|
14
|
-
"version": "0.
|
|
14
|
+
"version": "0.6.0",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"main": "./dist/mantine-adapter.cjs",
|
|
17
17
|
"module": "./dist/mantine-adapter.js",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"sass": "^1.89.2",
|
|
73
73
|
"sirv": "^3.0.2",
|
|
74
74
|
"storybook": "^10.3.3",
|
|
75
|
+
"storybook-dark-mode": "^5.0.0",
|
|
75
76
|
"strip-literal": "^3.0.0",
|
|
76
77
|
"typescript": "~5.8.3",
|
|
77
78
|
"typescript-eslint": "^8.30.1",
|
|
@@ -81,9 +82,9 @@
|
|
|
81
82
|
"vitest": "^3.2.4"
|
|
82
83
|
},
|
|
83
84
|
"peerDependencies": {
|
|
84
|
-
"@mantine/core": "
|
|
85
|
-
"@mantine/dates": "
|
|
86
|
-
"@mantine/hooks": "
|
|
85
|
+
"@mantine/core": "^8.0.0",
|
|
86
|
+
"@mantine/dates": "^8.0.0",
|
|
87
|
+
"@mantine/hooks": "^8.0.0",
|
|
87
88
|
"react": ">=16.8.0",
|
|
88
89
|
"react-dom": ">=16.8.0"
|
|
89
90
|
}
|