mainstack-design-system 0.0.3 → 0.0.5
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/README.md +9 -12
- package/package.json +1 -1
- package/src/components/InputFields/MarkdownEditor.tsx +3 -1
- package/src/components/index.ts +33 -0
- package/src/index.ts +4 -0
- package/src/pages/Home.tsx +1 -1
- package/src/stories/InputFields/MarkdownEditor.stories.ts +1 -1
- package/vite.config.ts +4 -0
package/README.md
CHANGED
|
@@ -12,29 +12,26 @@ To view the design system documentation, visit this [link](https://mainstack-des
|
|
|
12
12
|
|
|
13
13
|
## Components
|
|
14
14
|
|
|
15
|
-
Components can be used by importing from the `src
|
|
15
|
+
Components can be used by importing from the `'mainstack-design-system/src` directory. For example:
|
|
16
16
|
|
|
17
|
-
`import { Button } from 'mainstack-design-system/src
|
|
17
|
+
`import { Button } from 'mainstack-design-system/src';`
|
|
18
18
|
|
|
19
19
|
## Icons
|
|
20
20
|
|
|
21
|
-
Icons are imported from the `src
|
|
21
|
+
Icons are imported from the `'mainstack-design-system/src` directory. For example:
|
|
22
22
|
|
|
23
|
-
`import {
|
|
23
|
+
`import { ArrowRightIcon } from 'mainstack-design-system/src';`
|
|
24
24
|
|
|
25
25
|
## Colors
|
|
26
26
|
|
|
27
|
-
Colors are imported from the `mainstack-design-system/src
|
|
27
|
+
Colors are imported from the `mainstack-design-system/src` directory. For example:
|
|
28
28
|
|
|
29
29
|
```
|
|
30
|
-
|
|
30
|
+
import {Colors} from "mainstack-design-system/src";
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
<Text color={Colors.black300}>Hello World</Text>
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Conventional Commits is a specification for adding human and machine readable meaning to commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with [SemVer](https://semver.org), by describing the features, fixes, and breaking changes made in commit messages.
|
|
36
|
-
[more info](https://www.conventionalcommits.org/en/v1.0.0/)
|
|
37
|
-
|
|
38
35
|
## Contributing
|
|
39
36
|
|
|
40
37
|
Installing the application (as a developer) is simple in the following steps:
|
|
@@ -54,7 +51,7 @@ git clone git clone https://github.com/The-Mainstack/mainstack-design-system.git
|
|
|
54
51
|
- Navigate into the cloned directory and install dependencies with Yarn
|
|
55
52
|
|
|
56
53
|
```yarn
|
|
57
|
-
yarn
|
|
54
|
+
yarn add
|
|
58
55
|
```
|
|
59
56
|
|
|
60
57
|
- Make a duplicate of the **env** file and update its content accordingly. Most times, this is just fine with no update.
|
|
@@ -67,7 +64,7 @@ cp .env.sample .env
|
|
|
67
64
|
Open [http://localhost:[port]](http://localhost:[port]) to view it in the browser and start developing.
|
|
68
65
|
|
|
69
66
|
```yarn
|
|
70
|
-
yarn
|
|
67
|
+
yarn dev
|
|
71
68
|
```
|
|
72
69
|
|
|
73
70
|
To run storybook, run the following command:
|
package/package.json
CHANGED
|
@@ -133,7 +133,7 @@ const CustomToolbar = ({
|
|
|
133
133
|
);
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
const MarkdownEditor = ({
|
|
137
137
|
defaultValue,
|
|
138
138
|
onChange,
|
|
139
139
|
border,
|
|
@@ -244,3 +244,5 @@ export const MarkdownEditor = ({
|
|
|
244
244
|
</Box>
|
|
245
245
|
);
|
|
246
246
|
};
|
|
247
|
+
|
|
248
|
+
export default MarkdownEditor;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
3
|
+
export { default as Button } from "./Button";
|
|
4
|
+
export { default as IconButton } from "./Button/IconButton";
|
|
5
|
+
export { default as Accordion } from "./Accordion";
|
|
6
|
+
export { default as Avatars } from "./Avatars";
|
|
7
|
+
export { default as Chip } from "./controls/Chip";
|
|
8
|
+
export { default as DoubleTab } from "./controls/DoubleTab";
|
|
9
|
+
export { default as Pagination } from "./controls/Pagination";
|
|
10
|
+
export { default as RadioButton } from "./controls/RadioButton";
|
|
11
|
+
export { default as RectangleCheckButton } from "./controls/RectangleCheckButton";
|
|
12
|
+
export { default as RoundCheckButton } from "./controls/RoundCheckButton";
|
|
13
|
+
export { default as Stepper } from "./controls/Stepper";
|
|
14
|
+
export { default as TabMenu } from "./controls/TabMenu";
|
|
15
|
+
export { default as ToggleButton } from "./controls/ToggleButton";
|
|
16
|
+
export * from "./InputFields/SelectInput";
|
|
17
|
+
export { default as Input } from "./InputFields/Input";
|
|
18
|
+
export { default as MarkdownEditor } from "./InputFields/MarkdownEditor";
|
|
19
|
+
export { default as SearchInput } from "./InputFields/SearchInput";
|
|
20
|
+
export { default as TextArea } from "./InputFields/TextArea";
|
|
21
|
+
export { default as UsernameInput } from "./InputFields/UsernameInput";
|
|
22
|
+
export { default as Banner } from "./notifications/Banner";
|
|
23
|
+
export { default as ClickTooltip } from "./notifications/ClickTooltip";
|
|
24
|
+
export { default as HoverTooltip } from "./notifications/HoverTooltip";
|
|
25
|
+
export { default as Snackbar } from "./notifications/Snackbar";
|
|
26
|
+
export { default as Colors } from "./styleGuide/Colors";
|
|
27
|
+
export { default as Tiles } from "./Tiles";
|
|
28
|
+
export { default as Display } from "./Typography/Display";
|
|
29
|
+
export { default as Heading } from "./Typography/Heading";
|
|
30
|
+
export { default as Paragraph } from "./Typography/Paragraph";
|
|
31
|
+
export { default as Subtitle } from "./Typography/Subtitle";
|
|
32
|
+
export { default as FileUploader } from "./Uploader/FileUploader";
|
|
33
|
+
export { default as ImageUploader } from "./Uploader/ImageUploader";
|
package/src/index.ts
ADDED
package/src/pages/Home.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @format */
|
|
2
2
|
|
|
3
3
|
import { Box, Text } from "@chakra-ui/react";
|
|
4
|
-
import { MarkdownEditor } from "components
|
|
4
|
+
import { Button, MarkdownEditor, Colors } from "components";
|
|
5
5
|
import CountrySelectWrapper from "stories/InputFields/Select/CountrySelectWrapper";
|
|
6
6
|
import PhoneNumberInputWrapper from "stories/InputFields/Select/PhoneNumberInputWrapper";
|
|
7
7
|
import SelectWrapper from "stories/InputFields/Select/SelectWrapper";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @format */
|
|
2
2
|
|
|
3
3
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
4
|
-
import { MarkdownEditor as MarkdownEditorComponent } from "components
|
|
4
|
+
import { MarkdownEditor as MarkdownEditorComponent } from "components";
|
|
5
5
|
import TextArea from "components/InputFields/TextArea";
|
|
6
6
|
|
|
7
7
|
const meta: Meta<typeof MarkdownEditorComponent> = {
|
package/vite.config.ts
CHANGED
|
@@ -5,6 +5,7 @@ import react from "@vitejs/plugin-react";
|
|
|
5
5
|
import viteTsconfigPaths from "vite-tsconfig-paths";
|
|
6
6
|
import svgrPlugin from "vite-plugin-svgr";
|
|
7
7
|
import envCompatible from "vite-plugin-env-compatible";
|
|
8
|
+
import { resolve } from "path";
|
|
8
9
|
|
|
9
10
|
export default defineConfig({
|
|
10
11
|
envPrefix: "REACT_APP_",
|
|
@@ -20,6 +21,9 @@ export default defineConfig({
|
|
|
20
21
|
},
|
|
21
22
|
build: {
|
|
22
23
|
outDir: "build",
|
|
24
|
+
lib: {
|
|
25
|
+
entry: resolve(__dirname, "./src/index.ts"),
|
|
26
|
+
},
|
|
23
27
|
commonjsOptions: {
|
|
24
28
|
transformMixedEsModules: true,
|
|
25
29
|
},
|