reshaped 2.8.3 → 2.9.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 +5 -0
- package/bundle.css +1 -1
- package/bundle.d.ts +2 -0
- package/bundle.js +10 -10
- package/components/Accordion/tests/Accordion.stories.d.ts +10 -0
- package/components/Accordion/tests/Accordion.stories.js +9 -3
- package/components/ActionBar/tests/ActionBar.stories.d.ts +9 -4
- package/components/ActionBar/tests/ActionBar.stories.js +9 -2
- package/components/Actionable/Actionable.d.ts +2 -2
- package/components/Actionable/Actionable.js +4 -4
- package/components/Actionable/tests/Actionable.stories.d.ts +10 -5
- package/components/Actionable/tests/Actionable.stories.js +10 -3
- package/components/Alert/tests/Alert.stories.d.ts +9 -4
- package/components/Alert/tests/Alert.stories.js +9 -2
- package/components/Autocomplete/tests/Autocomplete.stories.d.ts +9 -0
- package/components/Autocomplete/tests/Autocomplete.stories.js +9 -1
- package/components/Avatar/tests/Avatar.stories.d.ts +10 -5
- package/components/Avatar/tests/Avatar.stories.js +9 -2
- package/components/Badge/tests/Badge.stories.d.ts +9 -0
- package/components/Badge/tests/Badge.stories.js +9 -1
- package/components/Breadcrumbs/tests/Breadcrumbs.stories.d.ts +13 -6
- package/components/Breadcrumbs/tests/Breadcrumbs.stories.js +9 -2
- package/components/Button/Button.js +3 -4
- package/components/Button/Button.types.d.ts +2 -6
- package/components/Button/tests/Button.stories.d.ts +18 -13
- package/components/Button/tests/Button.stories.js +9 -2
- package/components/Calendar/tests/Calendar.stories.d.ts +10 -5
- package/components/Calendar/tests/Calendar.stories.js +9 -2
- package/components/Card/Card.d.ts +2 -2
- package/components/Card/Card.js +4 -4
- package/components/Card/tests/Card.stories.d.ts +19 -0
- package/components/Card/tests/Card.stories.js +9 -1
- package/components/Carousel/tests/Carousel.stories.d.ts +6 -0
- package/components/Carousel/tests/Carousel.stories.js +9 -1
- package/components/Checkbox/tests/Checkbox.stories.d.ts +9 -4
- package/components/Checkbox/tests/Checkbox.stories.js +9 -2
- package/components/CheckboxGroup/tests/CheckboxGroup.stories.d.ts +8 -3
- package/components/CheckboxGroup/tests/CheckboxGroup.stories.js +9 -2
- package/components/Container/tests/Container.stories.d.ts +8 -3
- package/components/Container/tests/Container.stories.js +9 -2
- package/components/Dismissible/tests/Dismissible.stories.d.ts +9 -4
- package/components/Dismissible/tests/Dismissible.stories.js +9 -2
- package/components/Divider/tests/Divider.stories.d.ts +8 -3
- package/components/Divider/tests/Divider.stories.js +9 -2
- package/components/DropdownMenu/tests/DropdownMenu.stories.d.ts +20 -7
- package/components/DropdownMenu/tests/DropdownMenu.stories.js +9 -2
- package/components/FileUpload/tests/FileUpload.stories.d.ts +9 -0
- package/components/FileUpload/tests/FileUpload.stories.js +9 -1
- package/components/FormControl/tests/FormControl.stories.d.ts +16 -6
- package/components/FormControl/tests/FormControl.stories.js +9 -2
- package/components/Hidden/tests/Hidden.stories.d.ts +8 -3
- package/components/Hidden/tests/Hidden.stories.js +9 -2
- package/components/HiddenVisually/tests/HiddenVisually.stories.d.ts +7 -2
- package/components/HiddenVisually/tests/HiddenVisually.stories.js +9 -2
- package/components/Hotkey/tests/Hotkey.stories.d.ts +7 -2
- package/components/Hotkey/tests/Hotkey.stories.js +9 -2
- package/components/Icon/tests/Icon.stories.d.ts +9 -4
- package/components/Icon/tests/Icon.stories.js +9 -2
- package/components/Image/tests/Image.stories.d.ts +11 -6
- package/components/Image/tests/Image.stories.js +9 -2
- package/components/Link/Link.d.ts +4 -5
- package/components/Link/Link.js +4 -4
- package/components/Link/tests/Link.stories.d.ts +15 -6
- package/components/Link/tests/Link.stories.js +9 -2
- package/components/Loader/tests/Loader.stories.d.ts +8 -3
- package/components/Loader/tests/Loader.stories.js +9 -2
- package/components/MenuItem/MenuItem.js +3 -4
- package/components/MenuItem/MenuItem.types.d.ts +1 -1
- package/components/MenuItem/tests/MenuItem.stories.d.ts +13 -8
- package/components/MenuItem/tests/MenuItem.stories.js +9 -2
- package/components/Modal/Modal.js +3 -0
- package/components/Modal/tests/Modal.stories.d.ts +17 -8
- package/components/Modal/tests/Modal.stories.js +9 -2
- package/components/Overlay/tests/Overlay.stories.d.ts +7 -2
- package/components/Overlay/tests/Overlay.stories.js +9 -2
- package/components/Popover/tests/Popover.stories.d.ts +15 -6
- package/components/Popover/tests/Popover.stories.js +9 -2
- package/components/Progress/tests/Progress.stories.d.ts +6 -0
- package/components/Progress/tests/Progress.stories.js +9 -1
- package/components/Radio/tests/Radio.stories.d.ts +9 -4
- package/components/Radio/tests/Radio.stories.js +9 -2
- package/components/RadioGroup/tests/RadioGroup.stories.d.ts +8 -3
- package/components/RadioGroup/tests/RadioGroup.stories.js +9 -2
- package/components/Reshaped/Reshaped.css +1 -1
- package/components/Scrim/tests/Scrim.stories.d.ts +8 -3
- package/components/Scrim/tests/Scrim.stories.js +9 -2
- package/components/ScrollArea/ScrollArea.d.ts +4 -0
- package/components/ScrollArea/ScrollArea.js +139 -0
- package/components/ScrollArea/ScrollArea.module.css +1 -0
- package/components/ScrollArea/ScrollArea.types.d.ts +23 -0
- package/components/ScrollArea/ScrollArea.types.js +1 -0
- package/components/ScrollArea/index.d.ts +2 -0
- package/components/ScrollArea/index.js +1 -0
- package/components/ScrollArea/tests/ScrollArea.stories.d.ts +13 -0
- package/components/ScrollArea/tests/ScrollArea.stories.js +115 -0
- package/components/Select/tests/Select.stories.d.ts +15 -10
- package/components/Select/tests/Select.stories.js +9 -2
- package/components/Skeleton/tests/Skeleton.stories.d.ts +8 -3
- package/components/Skeleton/tests/Skeleton.stories.js +9 -2
- package/components/Slider/SliderControlled.js +3 -0
- package/components/Slider/tests/Slider.stories.d.ts +11 -6
- package/components/Slider/tests/Slider.stories.js +9 -2
- package/components/Stepper/tests/Stepper.stories.d.ts +9 -0
- package/components/Stepper/tests/Stepper.stories.js +9 -1
- package/components/Switch/tests/Switch.stories.d.ts +10 -5
- package/components/Switch/tests/Switch.stories.js +9 -2
- package/components/Table/tests/Table.stories.d.ts +13 -0
- package/components/Table/tests/Table.stories.js +9 -1
- package/components/Tabs/tests/Tabs.stories.d.ts +20 -10
- package/components/Tabs/tests/Tabs.stories.js +9 -2
- package/components/Text/tests/Text.stories.d.ts +12 -7
- package/components/Text/tests/Text.stories.js +9 -2
- package/components/TextArea/tests/TextArea.stories.d.ts +16 -8
- package/components/TextArea/tests/TextArea.stories.js +14 -3
- package/components/TextField/tests/TextField.stories.d.ts +19 -11
- package/components/TextField/tests/TextField.stories.js +9 -2
- package/components/Theme/tests/Theme.stories.d.ts +8 -3
- package/components/Theme/tests/Theme.stories.js +9 -2
- package/components/Timeline/tests/Timeline.stories.d.ts +11 -3
- package/components/Timeline/tests/Timeline.stories.js +9 -2
- package/components/Toast/tests/Toast.stories.d.ts +13 -9
- package/components/Toast/tests/Toast.stories.js +8 -2
- package/components/Tooltip/tests/Tooltip.stories.d.ts +8 -3
- package/components/Tooltip/tests/Tooltip.stories.js +9 -2
- package/components/View/tests/View.stories.d.ts +10 -0
- package/components/View/tests/View.stories.js +9 -1
- package/index.d.ts +2 -0
- package/index.js +1 -0
- package/package.json +10 -7
- package/styles/width/width.module.css +1 -1
- package/themes/_generator/tests/themes.stories.d.ts +8 -4
- package/themes/_generator/tests/themes.stories.js +6 -2
- package/utilities/dom.d.ts +2 -0
- package/utilities/dom.js +6 -0
@@ -0,0 +1,115 @@
|
|
1
|
+
import { useRef } from "react";
|
2
|
+
import { Example } from "../../../utilities/storybook/index.js";
|
3
|
+
import ScrollArea from "../index.js";
|
4
|
+
import View from "../../View/index.js";
|
5
|
+
import Button from "../../Button/index.js";
|
6
|
+
export default {
|
7
|
+
title: "Utilities/ScrollArea",
|
8
|
+
component: ScrollArea,
|
9
|
+
parameters: {
|
10
|
+
iframe: {
|
11
|
+
url: "https://reshaped.so/docs/utilities/scroll-area",
|
12
|
+
},
|
13
|
+
},
|
14
|
+
};
|
15
|
+
const Demo = () => {
|
16
|
+
const ref = useRef(null);
|
17
|
+
return (<View gap={4}>
|
18
|
+
<Button onClick={() => { var _a; return (_a = ref.current) === null || _a === void 0 ? void 0 : _a.scrollTo({ top: 100, behavior: "smooth" }); }}>
|
19
|
+
Scroll
|
20
|
+
</Button>
|
21
|
+
<ScrollArea height="100px" scrollbarDisplay="visible" ref={ref}>
|
22
|
+
<View backgroundColor="neutral-faded" padding={4}>
|
23
|
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
|
24
|
+
been the industry's standard dummy text ever since the 1500s, when an unknown printer took
|
25
|
+
a galley of type and scrambled it to make a type specimen book. It has survived not only
|
26
|
+
five centuries, but also the leap into electronic typesetting, remaining essentially
|
27
|
+
unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
28
|
+
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus
|
29
|
+
PageMaker including versions of Lorem Ipsum.
|
30
|
+
</View>
|
31
|
+
</ScrollArea>
|
32
|
+
</View>);
|
33
|
+
};
|
34
|
+
export const direction = () => (<Example>
|
35
|
+
<Example.Item title="vertical">
|
36
|
+
<ScrollArea height="100px" scrollbarDisplay="visible">
|
37
|
+
<View backgroundColor="neutral-faded" padding={4}>
|
38
|
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
|
39
|
+
been the industry's standard dummy text ever since the 1500s, when an unknown printer took
|
40
|
+
a galley of type and scrambled it to make a type specimen book. It has survived not only
|
41
|
+
five centuries, but also the leap into electronic typesetting, remaining essentially
|
42
|
+
unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
43
|
+
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus
|
44
|
+
PageMaker including versions of Lorem Ipsum.
|
45
|
+
</View>
|
46
|
+
</ScrollArea>
|
47
|
+
</Example.Item>
|
48
|
+
<Example.Item title="horizontal">
|
49
|
+
<ScrollArea height="120px" scrollbarDisplay="visible">
|
50
|
+
<View backgroundColor="neutral-faded" padding={4} width="500px">
|
51
|
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
|
52
|
+
been the industry's standard dummy text ever since the 1500s
|
53
|
+
</View>
|
54
|
+
</ScrollArea>
|
55
|
+
</Example.Item>
|
56
|
+
<Example.Item title="both directions">
|
57
|
+
<ScrollArea height="100px" scrollbarDisplay="visible">
|
58
|
+
<View backgroundColor="neutral-faded" padding={4} width="500px">
|
59
|
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
|
60
|
+
been the industry's standard dummy text ever since the 1500s, when an unknown printer took
|
61
|
+
a galley of type and scrambled it to make a type specimen book. It has survived not only
|
62
|
+
five centuries, but also the leap into electronic typesetting, remaining essentially
|
63
|
+
unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
64
|
+
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus
|
65
|
+
PageMaker including versions of Lorem Ipsum.
|
66
|
+
</View>
|
67
|
+
</ScrollArea>
|
68
|
+
</Example.Item>
|
69
|
+
</Example>);
|
70
|
+
export const visibility = () => (<Example>
|
71
|
+
<Example.Item title="visibility: hover">
|
72
|
+
<ScrollArea height="100px">
|
73
|
+
<View backgroundColor="neutral-faded" padding={4}>
|
74
|
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
|
75
|
+
been the industry's standard dummy text ever since the 1500s, when an unknown printer took
|
76
|
+
a galley of type and scrambled it to make a type specimen book. It has survived not only
|
77
|
+
five centuries, but also the leap into electronic typesetting, remaining essentially
|
78
|
+
unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
79
|
+
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus
|
80
|
+
PageMaker including versions of Lorem Ipsum.
|
81
|
+
</View>
|
82
|
+
</ScrollArea>
|
83
|
+
</Example.Item>
|
84
|
+
<Example.Item title="visibility: hidden">
|
85
|
+
<ScrollArea height="100px" scrollbarDisplay="hidden">
|
86
|
+
<View backgroundColor="neutral-faded" padding={4}>
|
87
|
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
|
88
|
+
been the industry's standard dummy text ever since the 1500s, when an unknown printer took
|
89
|
+
a galley of type and scrambled it to make a type specimen book. It has survived not only
|
90
|
+
five centuries, but also the leap into electronic typesetting, remaining essentially
|
91
|
+
unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
92
|
+
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus
|
93
|
+
PageMaker including versions of Lorem Ipsum.
|
94
|
+
</View>
|
95
|
+
</ScrollArea>
|
96
|
+
</Example.Item>
|
97
|
+
<Example.Item title="visibility: visible">
|
98
|
+
<ScrollArea height="100px" scrollbarDisplay="visible">
|
99
|
+
<View backgroundColor="neutral-faded" padding={4}>
|
100
|
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
|
101
|
+
been the industry's standard dummy text ever since the 1500s, when an unknown printer took
|
102
|
+
a galley of type and scrambled it to make a type specimen book. It has survived not only
|
103
|
+
five centuries, but also the leap into electronic typesetting, remaining essentially
|
104
|
+
unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
105
|
+
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus
|
106
|
+
PageMaker including versions of Lorem Ipsum.
|
107
|
+
</View>
|
108
|
+
</ScrollArea>
|
109
|
+
</Example.Item>
|
110
|
+
</Example>);
|
111
|
+
export const ref = () => (<Example>
|
112
|
+
<Example.Item title="external ref">
|
113
|
+
<Demo />
|
114
|
+
</Example.Item>
|
115
|
+
</Example>);
|
@@ -1,14 +1,19 @@
|
|
1
|
-
import React from "react";
|
2
1
|
declare const _default: {
|
3
2
|
title: string;
|
3
|
+
component: (props: import("./..").SelectProps) => import("react").JSX.Element;
|
4
|
+
parameters: {
|
5
|
+
iframe: {
|
6
|
+
url: string;
|
7
|
+
};
|
8
|
+
};
|
4
9
|
};
|
5
10
|
export default _default;
|
6
|
-
export declare const selection: () =>
|
7
|
-
export declare const variants: () =>
|
8
|
-
export declare const size: () =>
|
9
|
-
export declare const disabled: () =>
|
10
|
-
export declare const error: () =>
|
11
|
-
export declare const icon: () =>
|
12
|
-
export declare const slots: () =>
|
13
|
-
export declare const triggerComposition: () =>
|
14
|
-
export declare const formControl: () =>
|
11
|
+
export declare const selection: () => import("react").JSX.Element;
|
12
|
+
export declare const variants: () => import("react").JSX.Element;
|
13
|
+
export declare const size: () => import("react").JSX.Element;
|
14
|
+
export declare const disabled: () => import("react").JSX.Element;
|
15
|
+
export declare const error: () => import("react").JSX.Element;
|
16
|
+
export declare const icon: () => import("react").JSX.Element;
|
17
|
+
export declare const slots: () => import("react").JSX.Element;
|
18
|
+
export declare const triggerComposition: () => import("react").JSX.Element;
|
19
|
+
export declare const formControl: () => import("react").JSX.Element;
|
@@ -1,11 +1,18 @@
|
|
1
|
-
import React from "react";
|
2
1
|
import { Example, Placeholder } from "../../../utilities/storybook/index.js";
|
3
2
|
import IconZap from "../../../icons/Zap.js";
|
4
3
|
import Select from "../index.js";
|
5
4
|
import View from "../../View/index.js";
|
6
5
|
import DropdownMenu from "../../DropdownMenu/DropdownMenu.js";
|
7
6
|
import FormControl from "../../FormControl/index.js";
|
8
|
-
export default {
|
7
|
+
export default {
|
8
|
+
title: "Components/Select",
|
9
|
+
component: Select,
|
10
|
+
parameters: {
|
11
|
+
iframe: {
|
12
|
+
url: "https://reshaped.so/docs/components/select",
|
13
|
+
},
|
14
|
+
},
|
15
|
+
};
|
9
16
|
export const selection = () => (<Example>
|
10
17
|
<Example.Item title="unselected, placeholder">
|
11
18
|
<Select name="animal" placeholder="Select an animal" inputAttributes={{ "aria-label": "test select" }} options={[
|
@@ -1,7 +1,12 @@
|
|
1
|
-
import React from "react";
|
2
1
|
declare const _default: {
|
3
2
|
title: string;
|
3
|
+
component: (props: import("./..").SkeletonProps) => import("react").JSX.Element;
|
4
|
+
parameters: {
|
5
|
+
iframe: {
|
6
|
+
url: string;
|
7
|
+
};
|
8
|
+
};
|
4
9
|
};
|
5
10
|
export default _default;
|
6
|
-
export declare const variant: () =>
|
7
|
-
export declare const radius: () =>
|
11
|
+
export declare const variant: () => import("react").JSX.Element;
|
12
|
+
export declare const radius: () => import("react").JSX.Element;
|
@@ -1,7 +1,14 @@
|
|
1
|
-
import React from "react";
|
2
1
|
import { Example } from "../../../utilities/storybook/index.js";
|
3
2
|
import Skeleton from "../index.js";
|
4
|
-
export default {
|
3
|
+
export default {
|
4
|
+
title: "Components/Skeleton",
|
5
|
+
component: Skeleton,
|
6
|
+
parameters: {
|
7
|
+
iframe: {
|
8
|
+
url: "https://reshaped.so/docs/components/skeleton",
|
9
|
+
},
|
10
|
+
},
|
11
|
+
};
|
5
12
|
export const variant = () => (<Example>
|
6
13
|
<Example.Item title="text">
|
7
14
|
<Skeleton />
|
@@ -2,6 +2,7 @@
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
3
3
|
import React from "react";
|
4
4
|
import { classNames } from "../../utilities/helpers.js";
|
5
|
+
import { enableUserSelect, disableUserSelect } from "../../utilities/dom.js";
|
5
6
|
import useRTL from "../../hooks/useRTL.js";
|
6
7
|
import useElementId from "../../hooks/useElementId.js";
|
7
8
|
import { useFormControl } from "../FormControl/index.js";
|
@@ -94,6 +95,7 @@ const SliderControlled = (props) => {
|
|
94
95
|
handleMinChange(nextValue);
|
95
96
|
if (closestId === maxId)
|
96
97
|
handleMaxChange(nextValue);
|
98
|
+
disableUserSelect();
|
97
99
|
setDraggingId(closestId);
|
98
100
|
};
|
99
101
|
const handleMinDragStart = () => {
|
@@ -113,6 +115,7 @@ const SliderControlled = (props) => {
|
|
113
115
|
if (draggingId === maxId) {
|
114
116
|
handleMaxChange(maxValue, { commit: true });
|
115
117
|
}
|
118
|
+
enableUserSelect();
|
116
119
|
setDraggingId(null);
|
117
120
|
}, [minValue, maxValue, handleMinChange, handleMaxChange, draggingId, minId, maxId]);
|
118
121
|
const handleDrag = React.useCallback((e) => {
|
@@ -1,10 +1,15 @@
|
|
1
|
-
import React from "react";
|
2
1
|
declare const _default: {
|
3
2
|
title: string;
|
3
|
+
component: (props: import("./..").SliderProps) => import("react").JSX.Element;
|
4
|
+
parameters: {
|
5
|
+
iframe: {
|
6
|
+
url: string;
|
7
|
+
};
|
8
|
+
};
|
4
9
|
};
|
5
10
|
export default _default;
|
6
|
-
export declare const base: () =>
|
7
|
-
export declare const boundaries: () =>
|
8
|
-
export declare const status: () =>
|
9
|
-
export declare const customRender: () =>
|
10
|
-
export declare const formControl: () =>
|
11
|
+
export declare const base: () => import("react").JSX.Element;
|
12
|
+
export declare const boundaries: () => import("react").JSX.Element;
|
13
|
+
export declare const status: () => import("react").JSX.Element;
|
14
|
+
export declare const customRender: () => import("react").JSX.Element;
|
15
|
+
export declare const formControl: () => import("react").JSX.Element;
|
@@ -1,8 +1,15 @@
|
|
1
|
-
import React from "react";
|
2
1
|
import { Example } from "../../../utilities/storybook/index.js";
|
3
2
|
import Slider from "../index.js";
|
4
3
|
import FormControl from "../../FormControl/index.js";
|
5
|
-
export default {
|
4
|
+
export default {
|
5
|
+
title: "Components/Slider",
|
6
|
+
component: Slider,
|
7
|
+
parameters: {
|
8
|
+
iframe: {
|
9
|
+
url: "https://reshaped.so/docs/components/slider",
|
10
|
+
},
|
11
|
+
},
|
12
|
+
};
|
6
13
|
export const base = () => (<Example>
|
7
14
|
<Example.Item title="single">
|
8
15
|
<Slider name="slider" defaultValue={30}/>
|
@@ -1,6 +1,15 @@
|
|
1
1
|
import React from "react";
|
2
2
|
declare const _default: {
|
3
3
|
title: string;
|
4
|
+
component: {
|
5
|
+
(props: import("./..").StepperProps): React.JSX.Element;
|
6
|
+
Item: (_: import("../Stepper.types").ItemProps) => null;
|
7
|
+
};
|
8
|
+
parameters: {
|
9
|
+
iframe: {
|
10
|
+
url: string;
|
11
|
+
};
|
12
|
+
};
|
4
13
|
};
|
5
14
|
export default _default;
|
6
15
|
export declare const direction: () => React.JSX.Element;
|
@@ -3,7 +3,15 @@ import { Example, Placeholder } from "../../../utilities/storybook/index.js";
|
|
3
3
|
import Stepper from "../index.js";
|
4
4
|
import Button from "../../Button/index.js";
|
5
5
|
import View from "../../View/index.js";
|
6
|
-
export default {
|
6
|
+
export default {
|
7
|
+
title: "Components/Stepper",
|
8
|
+
component: Stepper,
|
9
|
+
parameters: {
|
10
|
+
iframe: {
|
11
|
+
url: "https://reshaped.so/docs/components/stepper",
|
12
|
+
},
|
13
|
+
},
|
14
|
+
};
|
7
15
|
const Demo = (props) => {
|
8
16
|
var _a;
|
9
17
|
const [activeId, setActiveId] = React.useState((_a = props.activeId) !== null && _a !== void 0 ? _a : 1);
|
@@ -1,9 +1,14 @@
|
|
1
|
-
import React from "react";
|
2
1
|
declare const _default: {
|
3
2
|
title: string;
|
3
|
+
component: (props: import("./..").SwitchProps) => import("react").JSX.Element;
|
4
|
+
parameters: {
|
5
|
+
iframe: {
|
6
|
+
url: string;
|
7
|
+
};
|
8
|
+
};
|
4
9
|
};
|
5
10
|
export default _default;
|
6
|
-
export declare const selection: () =>
|
7
|
-
export declare const size: () =>
|
8
|
-
export declare const label: () =>
|
9
|
-
export declare const disabled: () =>
|
11
|
+
export declare const selection: () => import("react").JSX.Element;
|
12
|
+
export declare const size: () => import("react").JSX.Element;
|
13
|
+
export declare const label: () => import("react").JSX.Element;
|
14
|
+
export declare const disabled: () => import("react").JSX.Element;
|
@@ -1,7 +1,14 @@
|
|
1
|
-
import React from "react";
|
2
1
|
import { Example } from "../../../utilities/storybook/index.js";
|
3
2
|
import Switch from "../index.js";
|
4
|
-
export default {
|
3
|
+
export default {
|
4
|
+
title: "Components/Switch",
|
5
|
+
component: Switch,
|
6
|
+
parameters: {
|
7
|
+
iframe: {
|
8
|
+
url: "https://reshaped.so/docs/components/switch",
|
9
|
+
},
|
10
|
+
},
|
11
|
+
};
|
5
12
|
export const selection = () => (<Example>
|
6
13
|
<Example.Item title="unselected">
|
7
14
|
<Switch name="active" inputAttributes={{ "aria-label": "test switch" }}/>
|
@@ -1,6 +1,19 @@
|
|
1
1
|
import React from "react";
|
2
2
|
declare const _default: {
|
3
3
|
title: string;
|
4
|
+
component: {
|
5
|
+
(props: import("./..").TableProps): React.JSX.Element;
|
6
|
+
Cell: (props: import("../Table.types").CellProps) => React.JSX.Element;
|
7
|
+
Heading: (props: import("../Table.types").HeadingProps) => React.JSX.Element;
|
8
|
+
Row: (props: import("../Table.types").RowProps) => React.JSX.Element;
|
9
|
+
Body: (props: import("../Table.types").BodyProps) => React.JSX.Element;
|
10
|
+
Head: (props: import("../Table.types").HeadProps) => React.JSX.Element;
|
11
|
+
};
|
12
|
+
parameters: {
|
13
|
+
iframe: {
|
14
|
+
url: string;
|
15
|
+
};
|
16
|
+
};
|
4
17
|
};
|
5
18
|
export default _default;
|
6
19
|
export declare const layout: () => React.JSX.Element;
|
@@ -3,7 +3,15 @@ import { Example } from "../../../utilities/storybook/index.js";
|
|
3
3
|
import Table from "../index.js";
|
4
4
|
import Checkbox from "../../Checkbox/index.js";
|
5
5
|
import Card from "../../Card/index.js";
|
6
|
-
export default {
|
6
|
+
export default {
|
7
|
+
title: "Components/Table",
|
8
|
+
component: Table,
|
9
|
+
parameters: {
|
10
|
+
iframe: {
|
11
|
+
url: "https://reshaped.so/docs/components/table",
|
12
|
+
},
|
13
|
+
},
|
14
|
+
};
|
7
15
|
export const layout = () => (<Example>
|
8
16
|
<Example.Item title="base">
|
9
17
|
<Table>
|
@@ -1,14 +1,24 @@
|
|
1
|
-
import React from "react";
|
2
1
|
declare const _default: {
|
3
2
|
title: string;
|
3
|
+
component: {
|
4
|
+
(props: import("./..").TabsProps): import("react").JSX.Element;
|
5
|
+
Item: import("react").ForwardRefExoticComponent<import("./..").TabsItemProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
6
|
+
List: (props: import("../Tabs.types").ListProps) => import("react").JSX.Element;
|
7
|
+
Panel: (props: import("../Tabs.types").PanelProps) => import("react").JSX.Element;
|
8
|
+
};
|
9
|
+
parameters: {
|
10
|
+
iframe: {
|
11
|
+
url: string;
|
12
|
+
};
|
13
|
+
};
|
4
14
|
};
|
5
15
|
export default _default;
|
6
|
-
export declare const variant: () =>
|
7
|
-
export declare const size: () =>
|
8
|
-
export declare const direction: () =>
|
9
|
-
export declare const composition: () =>
|
10
|
-
export declare const icon: () =>
|
11
|
-
export declare const equalWidth: () =>
|
12
|
-
export declare const selection: () =>
|
13
|
-
export declare const navigation: () =>
|
14
|
-
export declare const edgeCases: () =>
|
16
|
+
export declare const variant: () => import("react").JSX.Element;
|
17
|
+
export declare const size: () => import("react").JSX.Element;
|
18
|
+
export declare const direction: () => import("react").JSX.Element;
|
19
|
+
export declare const composition: () => import("react").JSX.Element;
|
20
|
+
export declare const icon: () => import("react").JSX.Element;
|
21
|
+
export declare const equalWidth: () => import("react").JSX.Element;
|
22
|
+
export declare const selection: () => import("react").JSX.Element;
|
23
|
+
export declare const navigation: () => import("react").JSX.Element;
|
24
|
+
export declare const edgeCases: () => import("react").JSX.Element;
|
@@ -1,9 +1,16 @@
|
|
1
|
-
import React from "react";
|
2
1
|
import { Example } from "../../../utilities/storybook/index.js";
|
3
2
|
import Tabs from "../index.js";
|
4
3
|
import View from "../../View/index.js";
|
5
4
|
import IconZap from "../../../icons/Zap.js";
|
6
|
-
export default {
|
5
|
+
export default {
|
6
|
+
title: "Components/Tabs",
|
7
|
+
component: Tabs,
|
8
|
+
parameters: {
|
9
|
+
iframe: {
|
10
|
+
url: "https://reshaped.so/docs/components/tabs",
|
11
|
+
},
|
12
|
+
},
|
13
|
+
};
|
7
14
|
export const variant = () => (<Example>
|
8
15
|
<Example.Item title="variant: default">
|
9
16
|
<Tabs>
|
@@ -1,11 +1,16 @@
|
|
1
|
-
import React from "react";
|
2
1
|
declare const _default: {
|
3
2
|
title: string;
|
3
|
+
component: <As extends keyof JSX.IntrinsicElements>(props: import("./..").TextProps<As>) => import("react").JSX.Element;
|
4
|
+
parameters: {
|
5
|
+
iframe: {
|
6
|
+
url: string;
|
7
|
+
};
|
8
|
+
};
|
4
9
|
};
|
5
10
|
export default _default;
|
6
|
-
export declare const variant: () =>
|
7
|
-
export declare const weight: () =>
|
8
|
-
export declare const color: () =>
|
9
|
-
export declare const decoration: () =>
|
10
|
-
export declare const maxLines: () =>
|
11
|
-
export declare const align: () =>
|
11
|
+
export declare const variant: () => import("react").JSX.Element;
|
12
|
+
export declare const weight: () => import("react").JSX.Element;
|
13
|
+
export declare const color: () => import("react").JSX.Element;
|
14
|
+
export declare const decoration: () => import("react").JSX.Element;
|
15
|
+
export declare const maxLines: () => import("react").JSX.Element;
|
16
|
+
export declare const align: () => import("react").JSX.Element;
|
@@ -1,7 +1,14 @@
|
|
1
|
-
import React from "react";
|
2
1
|
import { Example } from "../../../utilities/storybook/index.js";
|
3
2
|
import Text from "../index.js";
|
4
|
-
export default {
|
3
|
+
export default {
|
4
|
+
title: "Utilities/Text",
|
5
|
+
component: Text,
|
6
|
+
parameters: {
|
7
|
+
iframe: {
|
8
|
+
url: "https://reshaped.so/docs/components/text",
|
9
|
+
},
|
10
|
+
},
|
11
|
+
};
|
5
12
|
export const variant = () => (<Example>
|
6
13
|
<Example.Item title="variant: title-1">
|
7
14
|
<Text variant="title-1">Title 1</Text>
|
@@ -1,12 +1,20 @@
|
|
1
|
-
import React from "react";
|
2
1
|
declare const _default: {
|
3
2
|
title: string;
|
3
|
+
component: {
|
4
|
+
(props: import("./..").TextAreaProps): import("react").JSX.Element;
|
5
|
+
Aligner: (props: import("../../_private/Aligner").AlignerProps) => import("react").JSX.Element;
|
6
|
+
};
|
7
|
+
parameters: {
|
8
|
+
iframe: {
|
9
|
+
url: string;
|
10
|
+
};
|
11
|
+
};
|
4
12
|
};
|
5
13
|
export default _default;
|
6
|
-
export declare const value: () =>
|
7
|
-
export declare const variants: () =>
|
8
|
-
export declare const size: () =>
|
9
|
-
export declare const disabled: () =>
|
10
|
-
export declare const error: () =>
|
11
|
-
export declare const formControl: () =>
|
12
|
-
export declare const aligner: () =>
|
14
|
+
export declare const value: () => import("react").JSX.Element;
|
15
|
+
export declare const variants: () => import("react").JSX.Element;
|
16
|
+
export declare const size: () => import("react").JSX.Element;
|
17
|
+
export declare const disabled: () => import("react").JSX.Element;
|
18
|
+
export declare const error: () => import("react").JSX.Element;
|
19
|
+
export declare const formControl: () => import("react").JSX.Element;
|
20
|
+
export declare const aligner: () => import("react").JSX.Element;
|
@@ -1,14 +1,25 @@
|
|
1
|
-
import React from "react";
|
2
1
|
import { Example } from "../../../utilities/storybook/index.js";
|
3
2
|
import TextArea from "../index.js";
|
4
3
|
import FormControl from "../../FormControl/index.js";
|
5
4
|
import View from "../../View/index.js";
|
6
5
|
import Button from "../../Button/index.js";
|
7
6
|
import Text from "../../Text/index.js";
|
8
|
-
|
7
|
+
import TextField from "../../TextField/index.js";
|
8
|
+
export default {
|
9
|
+
title: "Components/TextArea",
|
10
|
+
component: TextArea,
|
11
|
+
parameters: {
|
12
|
+
iframe: {
|
13
|
+
url: "https://reshaped.so/docs/components/text-area",
|
14
|
+
},
|
15
|
+
},
|
16
|
+
};
|
9
17
|
export const value = () => (<Example>
|
10
18
|
<Example.Item title="no value, placeholder">
|
11
|
-
<
|
19
|
+
<View gap={4}>
|
20
|
+
<TextField placeholder="hello" name="22"/>
|
21
|
+
<TextArea name="Name" placeholder="Enter your name"/>
|
22
|
+
</View>
|
12
23
|
</Example.Item>
|
13
24
|
<Example.Item title="value, uncontrolled">
|
14
25
|
<TextArea name="Name" placeholder="Enter your name" defaultValue="Reshaped"/>
|
@@ -1,15 +1,23 @@
|
|
1
|
-
import React from "react";
|
2
1
|
declare const _default: {
|
3
2
|
title: string;
|
3
|
+
component: {
|
4
|
+
(props: import("./..").TextFieldProps): import("react").JSX.Element;
|
5
|
+
Aligner: (props: import("../../_private/Aligner").AlignerProps) => import("react").JSX.Element;
|
6
|
+
};
|
7
|
+
parameters: {
|
8
|
+
iframe: {
|
9
|
+
url: string;
|
10
|
+
};
|
11
|
+
};
|
4
12
|
};
|
5
13
|
export default _default;
|
6
|
-
export declare const value: () =>
|
7
|
-
export declare const variants: () =>
|
8
|
-
export declare const disabled: () =>
|
9
|
-
export declare const error: () =>
|
10
|
-
export declare const icon: () =>
|
11
|
-
export declare const size: () =>
|
12
|
-
export declare const affixes: () =>
|
13
|
-
export declare const slots: () =>
|
14
|
-
export declare const formControl: () =>
|
15
|
-
export declare const aligner: () =>
|
14
|
+
export declare const value: () => import("react").JSX.Element;
|
15
|
+
export declare const variants: () => import("react").JSX.Element;
|
16
|
+
export declare const disabled: () => import("react").JSX.Element;
|
17
|
+
export declare const error: () => import("react").JSX.Element;
|
18
|
+
export declare const icon: () => import("react").JSX.Element;
|
19
|
+
export declare const size: () => import("react").JSX.Element;
|
20
|
+
export declare const affixes: () => import("react").JSX.Element;
|
21
|
+
export declare const slots: () => import("react").JSX.Element;
|
22
|
+
export declare const formControl: () => import("react").JSX.Element;
|
23
|
+
export declare const aligner: () => import("react").JSX.Element;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import React from "react";
|
2
1
|
import { Example, Placeholder } from "../../../utilities/storybook/index.js";
|
3
2
|
import IconZap from "../../../icons/Zap.js";
|
4
3
|
import TextField from "../index.js";
|
@@ -6,7 +5,15 @@ import FormControl from "../../FormControl/index.js";
|
|
6
5
|
import View from "../../View/index.js";
|
7
6
|
import Text from "../../Text/index.js";
|
8
7
|
import Button from "../../Button/index.js";
|
9
|
-
export default {
|
8
|
+
export default {
|
9
|
+
title: "Components/TextField",
|
10
|
+
component: TextField,
|
11
|
+
parameters: {
|
12
|
+
iframe: {
|
13
|
+
url: "https://reshaped.so/docs/components/text-field",
|
14
|
+
},
|
15
|
+
},
|
16
|
+
};
|
10
17
|
export const value = () => (<Example>
|
11
18
|
<Example.Item title="no value, placeholder">
|
12
19
|
<TextField name="Name" placeholder="Enter your name" icon={IconZap}/>
|
@@ -1,7 +1,12 @@
|
|
1
|
-
import React from "react";
|
2
1
|
declare const _default: {
|
3
2
|
title: string;
|
3
|
+
component: (props: import("./..").ThemeProps) => import("react").JSX.Element;
|
4
|
+
parameters: {
|
5
|
+
iframe: {
|
6
|
+
url: string;
|
7
|
+
};
|
8
|
+
};
|
4
9
|
};
|
5
10
|
export default _default;
|
6
|
-
export declare const uncontrolled: () =>
|
7
|
-
export declare const edgeCases: () =>
|
11
|
+
export declare const uncontrolled: () => import("react").JSX.Element;
|
12
|
+
export declare const edgeCases: () => import("react").JSX.Element;
|
@@ -1,11 +1,18 @@
|
|
1
|
-
import React from "react";
|
2
1
|
import Card from "../../Card/index.js";
|
3
2
|
import Button from "../../Button/index.js";
|
4
3
|
import View from "../../View/index.js";
|
5
4
|
import MenuItem from "../../MenuItem/index.js";
|
6
5
|
import Theme, { useTheme } from "../index.js";
|
7
6
|
import { Example } from "../../../utilities/storybook/index.js";
|
8
|
-
export default {
|
7
|
+
export default {
|
8
|
+
title: "Utilities/Theme",
|
9
|
+
component: Theme,
|
10
|
+
parameters: {
|
11
|
+
iframe: {
|
12
|
+
url: "https://reshaped.so/docs/utilities/theme",
|
13
|
+
},
|
14
|
+
},
|
15
|
+
};
|
9
16
|
const UncontrolledDemo = () => {
|
10
17
|
const { setTheme, theme } = useTheme();
|
11
18
|
return (<Button color="primary" onClick={() => setTheme(theme === "reshaped" ? "fake" : "reshaped")}>
|