@recursica/mui-adapter 0.2.0 → 0.3.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 +6 -0
- package/dist/mui-adapter.cjs +1 -1
- package/dist/mui-adapter.cjs.map +1 -1
- package/dist/mui-adapter.css +1 -1
- package/dist/mui-adapter.js +249 -90
- package/dist/mui-adapter.js.map +1 -1
- package/dist/src/components/Box/Box.d.ts +2 -3
- package/dist/src/components/Button/Button.d.ts +33 -2
- package/dist/src/components/Container/Container.d.ts +8 -2
- package/dist/src/components/Flex/Flex.d.ts +25 -2
- package/dist/src/components/Group/Group.d.ts +10 -2
- package/dist/src/components/Link/Link.d.ts +13 -2
- package/dist/src/components/Stack/Stack.d.ts +8 -2
- package/dist/src/components/Text/Text.d.ts +18 -2
- package/dist/src/components/Title/Title.d.ts +17 -2
- package/dist/src/components/Typography/Typography.d.ts +27 -0
- package/dist/src/utils/filterStylingProps.d.ts +3 -0
- package/package.json +2 -1
- package/src/Introduction.stories.tsx +113 -110
- package/src/OverStyling.tsx +18 -23
- package/src/Version.tsx +14 -21
- package/src/components/Accordion/Accordion.stories.tsx +19 -0
- package/src/components/AssistiveElement/AssistiveElement.stories.tsx +19 -0
- package/src/components/Avatar/Avatar.stories.tsx +19 -0
- package/src/components/Badge/Badge.stories.tsx +19 -0
- package/src/components/Box/Box.stories.tsx +19 -10
- package/src/components/Box/Box.tsx +11 -14
- package/src/components/Box/IMPLEMENTATION_NOTES.md +5 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +19 -0
- package/src/components/Button/BUTTON_IMPLEMENTATION_NOTES.md +17 -0
- package/src/components/Button/Button.module.css +300 -0
- package/src/components/Button/Button.stories.tsx +136 -5
- package/src/components/Button/Button.tsx +116 -5
- package/src/components/Card/Card.stories.tsx +19 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +19 -0
- package/src/components/Chip/Chip.stories.tsx +19 -0
- package/src/components/Container/Container.stories.tsx +19 -0
- package/src/components/Container/Container.tsx +56 -5
- package/src/components/Container/IMPLEMENTATION_NOTES.md +5 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +19 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +19 -0
- package/src/components/FileInput/FileInput.stories.tsx +19 -0
- package/src/components/FileUpload/FileUpload.stories.tsx +19 -0
- package/src/components/Flex/Flex.stories.tsx +19 -0
- package/src/components/Flex/Flex.tsx +77 -5
- package/src/components/FormControlLayout/FormControlLayout.stories.tsx +19 -0
- package/src/components/FormControlWrapper/FormControlWrapper.stories.tsx +19 -0
- package/src/components/Group/Group.stories.tsx +133 -5
- package/src/components/Group/Group.tsx +57 -5
- package/src/components/HoverCard/HoverCard.stories.tsx +19 -0
- package/src/components/Label/Label.stories.tsx +19 -0
- package/src/components/Link/Link.module.css +133 -0
- package/src/components/Link/Link.stories.tsx +52 -4
- package/src/components/Link/Link.tsx +47 -5
- package/src/components/Loader/Loader.stories.tsx +19 -0
- package/src/components/Menu/Menu.stories.tsx +19 -0
- package/src/components/Modal/Modal.stories.tsx +19 -0
- package/src/components/NumberInput/NumberInput.stories.tsx +19 -0
- package/src/components/Pagination/Pagination.stories.tsx +19 -0
- package/src/components/Panel/Panel.stories.tsx +19 -0
- package/src/components/Radio/Radio.stories.tsx +19 -0
- package/src/components/ReadOnlyField/ReadOnlyField.stories.tsx +19 -0
- package/src/components/SegmentedControl/SegmentedControl.stories.tsx +19 -0
- package/src/components/Slider/Slider.stories.tsx +19 -0
- package/src/components/Stack/Stack.stories.tsx +118 -5
- package/src/components/Stack/Stack.tsx +37 -5
- package/src/components/Stepper/Stepper.stories.tsx +19 -0
- package/src/components/Switch/Switch.stories.tsx +19 -0
- package/src/components/Table/Table.stories.tsx +19 -0
- package/src/components/Tabs/Tabs.stories.tsx +19 -0
- package/src/components/Text/Text.stories.tsx +87 -3
- package/src/components/Text/Text.tsx +27 -4
- package/src/components/TextArea/TextArea.stories.tsx +19 -0
- package/src/components/TextField/TextField.stories.tsx +19 -0
- package/src/components/TimePicker/TimePicker.stories.tsx +19 -0
- package/src/components/Timeline/Timeline.stories.tsx +19 -0
- package/src/components/Title/Title.stories.tsx +68 -3
- package/src/components/Title/Title.tsx +29 -5
- package/src/components/Toast/Toast.stories.tsx +19 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +19 -0
- package/src/components/TransferList/TransferList.stories.tsx +19 -0
- package/src/components/Typography/Typography.tsx +42 -0
- package/src/utils/ColorSchemeWrapper.tsx +1 -5
- package/src/utils/filterStylingProps.ts +13 -1
|
@@ -6,6 +6,25 @@ const meta: Meta<typeof Radio> = {
|
|
|
6
6
|
title: "UI-Kit/🚧 Radio",
|
|
7
7
|
component: Radio,
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
controls: {
|
|
11
|
+
include: [
|
|
12
|
+
"layer",
|
|
13
|
+
"withLayer",
|
|
14
|
+
"children",
|
|
15
|
+
"component",
|
|
16
|
+
"variant",
|
|
17
|
+
"size",
|
|
18
|
+
"icon",
|
|
19
|
+
"disabled",
|
|
20
|
+
"href",
|
|
21
|
+
"onClick",
|
|
22
|
+
"onChange",
|
|
23
|
+
"value",
|
|
24
|
+
"checked",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
9
28
|
};
|
|
10
29
|
|
|
11
30
|
export default meta;
|
|
@@ -6,6 +6,25 @@ const meta: Meta<typeof ReadOnlyField> = {
|
|
|
6
6
|
title: "UI-Kit/🚧 ReadOnlyField",
|
|
7
7
|
component: ReadOnlyField,
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
controls: {
|
|
11
|
+
include: [
|
|
12
|
+
"layer",
|
|
13
|
+
"withLayer",
|
|
14
|
+
"children",
|
|
15
|
+
"component",
|
|
16
|
+
"variant",
|
|
17
|
+
"size",
|
|
18
|
+
"icon",
|
|
19
|
+
"disabled",
|
|
20
|
+
"href",
|
|
21
|
+
"onClick",
|
|
22
|
+
"onChange",
|
|
23
|
+
"value",
|
|
24
|
+
"checked",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
9
28
|
};
|
|
10
29
|
|
|
11
30
|
export default meta;
|
|
@@ -6,6 +6,25 @@ const meta: Meta<typeof SegmentedControl> = {
|
|
|
6
6
|
title: "UI-Kit/🚧 SegmentedControl",
|
|
7
7
|
component: SegmentedControl,
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
controls: {
|
|
11
|
+
include: [
|
|
12
|
+
"layer",
|
|
13
|
+
"withLayer",
|
|
14
|
+
"children",
|
|
15
|
+
"component",
|
|
16
|
+
"variant",
|
|
17
|
+
"size",
|
|
18
|
+
"icon",
|
|
19
|
+
"disabled",
|
|
20
|
+
"href",
|
|
21
|
+
"onClick",
|
|
22
|
+
"onChange",
|
|
23
|
+
"value",
|
|
24
|
+
"checked",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
9
28
|
};
|
|
10
29
|
|
|
11
30
|
export default meta;
|
|
@@ -6,6 +6,25 @@ const meta: Meta<typeof Slider> = {
|
|
|
6
6
|
title: "UI-Kit/🚧 Slider",
|
|
7
7
|
component: Slider,
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
controls: {
|
|
11
|
+
include: [
|
|
12
|
+
"layer",
|
|
13
|
+
"withLayer",
|
|
14
|
+
"children",
|
|
15
|
+
"component",
|
|
16
|
+
"variant",
|
|
17
|
+
"size",
|
|
18
|
+
"icon",
|
|
19
|
+
"disabled",
|
|
20
|
+
"href",
|
|
21
|
+
"onClick",
|
|
22
|
+
"onChange",
|
|
23
|
+
"value",
|
|
24
|
+
"checked",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
9
28
|
};
|
|
10
29
|
|
|
11
30
|
export default meta;
|
|
@@ -1,16 +1,129 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
3
|
import { Stack } from "./Stack";
|
|
3
|
-
import {
|
|
4
|
+
import { Button } from "../Button";
|
|
5
|
+
import { Text } from "../Text/Text";
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
type StackStoryProps = React.ComponentProps<typeof Stack>;
|
|
8
|
+
|
|
9
|
+
const meta: Meta<StackStoryProps> = {
|
|
10
|
+
title: "UI-Kit/Stack",
|
|
7
11
|
component: Stack,
|
|
8
12
|
tags: ["autodocs"],
|
|
13
|
+
parameters: {
|
|
14
|
+
docs: {
|
|
15
|
+
description: {
|
|
16
|
+
component:
|
|
17
|
+
"Stack is a flex vertical layout container that maps directly to Mantine's Stack component allowing safe layout property passing.",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
controls: {
|
|
21
|
+
include: [
|
|
22
|
+
"layer",
|
|
23
|
+
"withLayer",
|
|
24
|
+
"gap",
|
|
25
|
+
"alignItems",
|
|
26
|
+
"justifyContent",
|
|
27
|
+
"defaultChecked",
|
|
28
|
+
"children",
|
|
29
|
+
"component",
|
|
30
|
+
"variant",
|
|
31
|
+
"size",
|
|
32
|
+
"icon",
|
|
33
|
+
"disabled",
|
|
34
|
+
"href",
|
|
35
|
+
"onClick",
|
|
36
|
+
"onChange",
|
|
37
|
+
"value",
|
|
38
|
+
"checked",
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
args: {
|
|
43
|
+
gap: "rec-default",
|
|
44
|
+
alignItems: "stretch",
|
|
45
|
+
justifyContent: "flex-start",
|
|
46
|
+
},
|
|
47
|
+
argTypes: {
|
|
48
|
+
gap: {
|
|
49
|
+
control: "select",
|
|
50
|
+
options: [
|
|
51
|
+
"rec-none",
|
|
52
|
+
"rec-sm",
|
|
53
|
+
"rec-default",
|
|
54
|
+
"rec-md",
|
|
55
|
+
"rec-lg",
|
|
56
|
+
"rec-xl",
|
|
57
|
+
"rec-2xl",
|
|
58
|
+
"xs",
|
|
59
|
+
"sm",
|
|
60
|
+
"md",
|
|
61
|
+
"lg",
|
|
62
|
+
"xl",
|
|
63
|
+
],
|
|
64
|
+
description: "Gap between elements",
|
|
65
|
+
},
|
|
66
|
+
alignItems: {
|
|
67
|
+
control: "select",
|
|
68
|
+
options: ["flex-start", "center", "flex-end", "stretch"],
|
|
69
|
+
description: "Align-items property",
|
|
70
|
+
},
|
|
71
|
+
justifyContent: {
|
|
72
|
+
control: "select",
|
|
73
|
+
options: [
|
|
74
|
+
"flex-start",
|
|
75
|
+
"center",
|
|
76
|
+
"flex-end",
|
|
77
|
+
"space-between",
|
|
78
|
+
"space-around",
|
|
79
|
+
],
|
|
80
|
+
description: "Justify-content property",
|
|
81
|
+
},
|
|
82
|
+
defaultChecked: {
|
|
83
|
+
table: { disable: true },
|
|
84
|
+
},
|
|
85
|
+
},
|
|
9
86
|
};
|
|
10
87
|
|
|
11
88
|
export default meta;
|
|
12
|
-
|
|
89
|
+
|
|
90
|
+
type Story = StoryObj<StackStoryProps>;
|
|
13
91
|
|
|
14
92
|
export const Default: Story = {
|
|
15
|
-
|
|
93
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
|
|
94
|
+
render: ({ withLayer, layer, ...args }: any) => (
|
|
95
|
+
<Stack {...args}>
|
|
96
|
+
<Button variant="solid">Primary Block</Button>
|
|
97
|
+
<Button variant="outline">Secondary Block</Button>
|
|
98
|
+
<Text>Text element within Stack</Text>
|
|
99
|
+
</Stack>
|
|
100
|
+
),
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export const StaticGapSmall: Story = {
|
|
104
|
+
args: {
|
|
105
|
+
gap: "rec-sm",
|
|
106
|
+
},
|
|
107
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
|
|
108
|
+
render: ({ withLayer, layer, ...args }: any) => (
|
|
109
|
+
<Stack {...args}>
|
|
110
|
+
<Button variant="solid">Item 1</Button>
|
|
111
|
+
<Button variant="solid">Item 2</Button>
|
|
112
|
+
<Button variant="solid">Item 3</Button>
|
|
113
|
+
</Stack>
|
|
114
|
+
),
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export const StaticGapLarge: Story = {
|
|
118
|
+
args: {
|
|
119
|
+
gap: "rec-xl",
|
|
120
|
+
},
|
|
121
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
|
|
122
|
+
render: ({ withLayer, layer, ...args }: any) => (
|
|
123
|
+
<Stack {...args}>
|
|
124
|
+
<Button variant="solid">Item 1</Button>
|
|
125
|
+
<Button variant="solid">Item 2</Button>
|
|
126
|
+
<Button variant="solid">Item 3</Button>
|
|
127
|
+
</Stack>
|
|
128
|
+
),
|
|
16
129
|
};
|
|
@@ -1,7 +1,39 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import {
|
|
3
|
+
Stack as MUIStack,
|
|
4
|
+
type StackProps as MUIStackProps,
|
|
5
|
+
} from "@mui/material";
|
|
6
|
+
import {
|
|
7
|
+
type RecursicaSpacing,
|
|
8
|
+
SPACING_MAP,
|
|
9
|
+
type OmitSx,
|
|
10
|
+
filterSxProp,
|
|
11
|
+
} from "../../utils/filterStylingProps";
|
|
2
12
|
|
|
3
|
-
export
|
|
13
|
+
export interface RecursicaStackProps {
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
gap?: MUIStackProps["spacing"] | RecursicaSpacing;
|
|
16
|
+
}
|
|
4
17
|
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
18
|
+
export type StackProps = OmitSx<
|
|
19
|
+
Omit<MUIStackProps, "spacing"> & RecursicaStackProps
|
|
20
|
+
>;
|
|
21
|
+
|
|
22
|
+
export const Stack = forwardRef<HTMLDivElement, StackProps>(function Stack(
|
|
23
|
+
{ children, gap = "rec-default", ...rest },
|
|
24
|
+
ref,
|
|
25
|
+
) {
|
|
26
|
+
const safeProps = filterSxProp(rest as Record<string, unknown>);
|
|
27
|
+
const resolvedGap =
|
|
28
|
+
typeof gap === "string" && gap in SPACING_MAP
|
|
29
|
+
? SPACING_MAP[gap as keyof typeof SPACING_MAP]
|
|
30
|
+
: gap;
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<MUIStack ref={ref} spacing={resolvedGap} {...safeProps}>
|
|
34
|
+
{children}
|
|
35
|
+
</MUIStack>
|
|
36
|
+
);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
Stack.displayName = "Stack";
|
|
@@ -6,6 +6,25 @@ const meta: Meta<typeof Stepper> = {
|
|
|
6
6
|
title: "UI-Kit/🚧 Stepper",
|
|
7
7
|
component: Stepper,
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
controls: {
|
|
11
|
+
include: [
|
|
12
|
+
"layer",
|
|
13
|
+
"withLayer",
|
|
14
|
+
"children",
|
|
15
|
+
"component",
|
|
16
|
+
"variant",
|
|
17
|
+
"size",
|
|
18
|
+
"icon",
|
|
19
|
+
"disabled",
|
|
20
|
+
"href",
|
|
21
|
+
"onClick",
|
|
22
|
+
"onChange",
|
|
23
|
+
"value",
|
|
24
|
+
"checked",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
9
28
|
};
|
|
10
29
|
|
|
11
30
|
export default meta;
|
|
@@ -6,6 +6,25 @@ const meta: Meta<typeof Switch> = {
|
|
|
6
6
|
title: "UI-Kit/🚧 Switch",
|
|
7
7
|
component: Switch,
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
controls: {
|
|
11
|
+
include: [
|
|
12
|
+
"layer",
|
|
13
|
+
"withLayer",
|
|
14
|
+
"children",
|
|
15
|
+
"component",
|
|
16
|
+
"variant",
|
|
17
|
+
"size",
|
|
18
|
+
"icon",
|
|
19
|
+
"disabled",
|
|
20
|
+
"href",
|
|
21
|
+
"onClick",
|
|
22
|
+
"onChange",
|
|
23
|
+
"value",
|
|
24
|
+
"checked",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
9
28
|
};
|
|
10
29
|
|
|
11
30
|
export default meta;
|
|
@@ -6,6 +6,25 @@ const meta: Meta<typeof Table> = {
|
|
|
6
6
|
title: "UI-Kit/🚧 Table",
|
|
7
7
|
component: Table,
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
controls: {
|
|
11
|
+
include: [
|
|
12
|
+
"layer",
|
|
13
|
+
"withLayer",
|
|
14
|
+
"children",
|
|
15
|
+
"component",
|
|
16
|
+
"variant",
|
|
17
|
+
"size",
|
|
18
|
+
"icon",
|
|
19
|
+
"disabled",
|
|
20
|
+
"href",
|
|
21
|
+
"onClick",
|
|
22
|
+
"onChange",
|
|
23
|
+
"value",
|
|
24
|
+
"checked",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
9
28
|
};
|
|
10
29
|
|
|
11
30
|
export default meta;
|
|
@@ -6,6 +6,25 @@ const meta: Meta<typeof Tabs> = {
|
|
|
6
6
|
title: "UI-Kit/🚧 Tabs",
|
|
7
7
|
component: Tabs,
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
controls: {
|
|
11
|
+
include: [
|
|
12
|
+
"layer",
|
|
13
|
+
"withLayer",
|
|
14
|
+
"children",
|
|
15
|
+
"component",
|
|
16
|
+
"variant",
|
|
17
|
+
"size",
|
|
18
|
+
"icon",
|
|
19
|
+
"disabled",
|
|
20
|
+
"href",
|
|
21
|
+
"onClick",
|
|
22
|
+
"onChange",
|
|
23
|
+
"value",
|
|
24
|
+
"checked",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
9
28
|
};
|
|
10
29
|
|
|
11
30
|
export default meta;
|
|
@@ -1,16 +1,100 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Text } from "./Text";
|
|
3
|
-
import {
|
|
3
|
+
import { Layer } from "@recursica/adapter-common";
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof Text> = {
|
|
6
|
-
title: "UI-Kit
|
|
6
|
+
title: "UI-Kit/Text",
|
|
7
7
|
component: Text,
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component:
|
|
13
|
+
"The standard `<Text>` component controls common body sizing scales and implicit paragraphs governed by the active theme layer. For semantic headings (`h1` through `h6`), use `<Title>` instead.",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
controls: {
|
|
17
|
+
include: [
|
|
18
|
+
"layer",
|
|
19
|
+
"withLayer",
|
|
20
|
+
"variant",
|
|
21
|
+
"children",
|
|
22
|
+
"component",
|
|
23
|
+
"size",
|
|
24
|
+
"icon",
|
|
25
|
+
"disabled",
|
|
26
|
+
"href",
|
|
27
|
+
"onClick",
|
|
28
|
+
"onChange",
|
|
29
|
+
"value",
|
|
30
|
+
"checked",
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
argTypes: {
|
|
35
|
+
variant: {
|
|
36
|
+
control: "select",
|
|
37
|
+
options: [
|
|
38
|
+
"body",
|
|
39
|
+
"body-small",
|
|
40
|
+
"caption",
|
|
41
|
+
"overline",
|
|
42
|
+
"subtitle",
|
|
43
|
+
"subtitle-small",
|
|
44
|
+
],
|
|
45
|
+
description:
|
|
46
|
+
"Controls the standard logical boundary definitions natively extracted from Figma.",
|
|
47
|
+
},
|
|
48
|
+
},
|
|
9
49
|
};
|
|
10
50
|
|
|
11
51
|
export default meta;
|
|
52
|
+
|
|
12
53
|
type Story = StoryObj<typeof Text>;
|
|
13
54
|
|
|
14
55
|
export const Default: Story = {
|
|
15
|
-
|
|
56
|
+
args: {
|
|
57
|
+
variant: "body",
|
|
58
|
+
children:
|
|
59
|
+
"This is standard body typography controlled by the central UI-kit boundaries exclusively.",
|
|
60
|
+
},
|
|
61
|
+
render: ({ ...args }) => (
|
|
62
|
+
<Layer layer={0} style={{ padding: "48px" }}>
|
|
63
|
+
<Text {...args} />
|
|
64
|
+
</Layer>
|
|
65
|
+
),
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const StaticVariations: Story = {
|
|
69
|
+
args: {},
|
|
70
|
+
render: () => (
|
|
71
|
+
<Layer
|
|
72
|
+
layer={0}
|
|
73
|
+
style={{
|
|
74
|
+
padding: "48px",
|
|
75
|
+
display: "flex",
|
|
76
|
+
flexDirection: "column",
|
|
77
|
+
gap: "16px",
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
<Text variant="body">
|
|
81
|
+
Body (Base paragraph and generic information flow)
|
|
82
|
+
</Text>
|
|
83
|
+
<Text variant="body-small">
|
|
84
|
+
Body Small (Compacted list items and helper blocks)
|
|
85
|
+
</Text>
|
|
86
|
+
<Text variant="caption">
|
|
87
|
+
Caption (Data table descriptions or micro-labels)
|
|
88
|
+
</Text>
|
|
89
|
+
<Text variant="overline">
|
|
90
|
+
Overline (Card contextual pre-headers and categorical tags)
|
|
91
|
+
</Text>
|
|
92
|
+
<Text variant="subtitle">
|
|
93
|
+
Subtitle (Minor sub-headers avoiding heavy display weights)
|
|
94
|
+
</Text>
|
|
95
|
+
<Text variant="subtitle-small">
|
|
96
|
+
Subtitle Small (Section anchors deep in hierarchy)
|
|
97
|
+
</Text>
|
|
98
|
+
</Layer>
|
|
99
|
+
),
|
|
16
100
|
};
|
|
@@ -1,7 +1,30 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import { Typography } from "../Typography/Typography";
|
|
3
|
+
import { type RecursicaOverStyled } from "../../utils/filterStylingProps";
|
|
4
|
+
import { type TypographyProps as MuiTypographyProps } from "@mui/material";
|
|
2
5
|
|
|
3
|
-
export type
|
|
6
|
+
export type TextVariant =
|
|
7
|
+
| "body"
|
|
8
|
+
| "body-small"
|
|
9
|
+
| "caption"
|
|
10
|
+
| "overline"
|
|
11
|
+
| "subtitle"
|
|
12
|
+
| "subtitle-small";
|
|
4
13
|
|
|
5
|
-
export
|
|
6
|
-
|
|
14
|
+
export type RecursicaTextProps = Omit<MuiTypographyProps, "variant"> & {
|
|
15
|
+
variant?: TextVariant;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
component?: React.ElementType;
|
|
7
18
|
};
|
|
19
|
+
|
|
20
|
+
export type TextProps = RecursicaOverStyled<RecursicaTextProps>;
|
|
21
|
+
|
|
22
|
+
export const Text = forwardRef<HTMLElement, TextProps>(function Text(
|
|
23
|
+
{ variant = "body", ...rest },
|
|
24
|
+
ref,
|
|
25
|
+
) {
|
|
26
|
+
const typographyClass = `recursica_brand_typography_${variant}`;
|
|
27
|
+
return <Typography ref={ref} typographyClass={typographyClass} {...rest} />;
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
Text.displayName = "Text";
|
|
@@ -6,6 +6,25 @@ const meta: Meta<typeof TextArea> = {
|
|
|
6
6
|
title: "UI-Kit/🚧 TextArea",
|
|
7
7
|
component: TextArea,
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
controls: {
|
|
11
|
+
include: [
|
|
12
|
+
"layer",
|
|
13
|
+
"withLayer",
|
|
14
|
+
"children",
|
|
15
|
+
"component",
|
|
16
|
+
"variant",
|
|
17
|
+
"size",
|
|
18
|
+
"icon",
|
|
19
|
+
"disabled",
|
|
20
|
+
"href",
|
|
21
|
+
"onClick",
|
|
22
|
+
"onChange",
|
|
23
|
+
"value",
|
|
24
|
+
"checked",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
9
28
|
};
|
|
10
29
|
|
|
11
30
|
export default meta;
|
|
@@ -6,6 +6,25 @@ const meta: Meta<typeof TextField> = {
|
|
|
6
6
|
title: "UI-Kit/🚧 TextField",
|
|
7
7
|
component: TextField,
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
controls: {
|
|
11
|
+
include: [
|
|
12
|
+
"layer",
|
|
13
|
+
"withLayer",
|
|
14
|
+
"children",
|
|
15
|
+
"component",
|
|
16
|
+
"variant",
|
|
17
|
+
"size",
|
|
18
|
+
"icon",
|
|
19
|
+
"disabled",
|
|
20
|
+
"href",
|
|
21
|
+
"onClick",
|
|
22
|
+
"onChange",
|
|
23
|
+
"value",
|
|
24
|
+
"checked",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
9
28
|
};
|
|
10
29
|
|
|
11
30
|
export default meta;
|
|
@@ -6,6 +6,25 @@ const meta: Meta<typeof TimePicker> = {
|
|
|
6
6
|
title: "UI-Kit/🚧 TimePicker",
|
|
7
7
|
component: TimePicker,
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
controls: {
|
|
11
|
+
include: [
|
|
12
|
+
"layer",
|
|
13
|
+
"withLayer",
|
|
14
|
+
"children",
|
|
15
|
+
"component",
|
|
16
|
+
"variant",
|
|
17
|
+
"size",
|
|
18
|
+
"icon",
|
|
19
|
+
"disabled",
|
|
20
|
+
"href",
|
|
21
|
+
"onClick",
|
|
22
|
+
"onChange",
|
|
23
|
+
"value",
|
|
24
|
+
"checked",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
9
28
|
};
|
|
10
29
|
|
|
11
30
|
export default meta;
|
|
@@ -6,6 +6,25 @@ const meta: Meta<typeof Timeline> = {
|
|
|
6
6
|
title: "UI-Kit/🚧 Timeline",
|
|
7
7
|
component: Timeline,
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
controls: {
|
|
11
|
+
include: [
|
|
12
|
+
"layer",
|
|
13
|
+
"withLayer",
|
|
14
|
+
"children",
|
|
15
|
+
"component",
|
|
16
|
+
"variant",
|
|
17
|
+
"size",
|
|
18
|
+
"icon",
|
|
19
|
+
"disabled",
|
|
20
|
+
"href",
|
|
21
|
+
"onClick",
|
|
22
|
+
"onChange",
|
|
23
|
+
"value",
|
|
24
|
+
"checked",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
9
28
|
};
|
|
10
29
|
|
|
11
30
|
export default meta;
|