@ilo-org/react 0.0.12 → 0.0.14
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/manager-head.html +1 -6
- package/.storybook/preview.tsx +7 -0
- package/.turbo/turbo-build.log +78 -77
- package/.turbo/turbo-check.log +1 -1
- package/.turbo/turbo-test.log +28 -28
- package/CHANGELOG.md +38 -0
- package/README.md +183 -5
- package/package.json +6 -6
- package/src/components/Video/VideoPlayer.tsx +11 -2
- package/src/stories/Introduction.stories.mdx +252 -6
- package/src/stories/Welcome.stories.mdx +63 -0
- package/storybook-static/212.faba6ad0.iframe.bundle.js +7 -0
- package/storybook-static/{804.292f3e06.iframe.bundle.js.LICENSE.txt → 212.faba6ad0.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/212.faba6ad0.iframe.bundle.js.map +1 -0
- package/storybook-static/iframe.html +2 -2
- package/storybook-static/index.html +1 -1
- package/storybook-static/{main.2a251da6.iframe.bundle.js → main.22c1d441.iframe.bundle.js} +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/static/css/main.d45ebb04.css +3 -0
- package/storybook-static/static/css/main.d45ebb04.css.map +1 -0
- package/src/public/favicon.ico +0 -0
- package/src/public/index.html +0 -43
- package/src/public/logo192.png +0 -0
- package/src/public/logo512.png +0 -0
- package/src/public/manifest.json +0 -25
- package/src/public/robots.txt +0 -3
- package/storybook-static/804.292f3e06.iframe.bundle.js +0 -2
- package/storybook-static/static/css/main.23626b74.css +0 -3
- package/storybook-static/static/css/main.23626b74.css.map +0 -1
package/README.md
CHANGED
|
@@ -1,11 +1,189 @@
|
|
|
1
1
|
# ILO Design System - React Package
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package provides the implementation of the Design System using [React](https://reactjs.org). It also includes a [Storybook](https://storybook.js.org/) project for documentation and development of the components in the system. It has dependencies on the following other @ilo-org packages:
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- [@ilo-org/themes](./packages/themes)
|
|
6
|
+
- [@ilo-org/fonts](./packages/fonts)
|
|
7
|
+
- [@ilo-org/styles](./packages/styles)
|
|
8
|
+
- [@ilo-org/utils](./packages/utils)
|
|
9
|
+
- [@ilo-org/icons](./packages/icons)
|
|
10
|
+
- [@ilo-org/icons-react](./packages/icons-react)
|
|
6
11
|
|
|
7
|
-
|
|
12
|
+
## Installation and PNPM Commands
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
To install
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
```bash
|
|
17
|
+
npm i @ilo-org/react
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
To start storybook
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pnpm storybook
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
To build storybook
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pnpm build:storybook
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
To test formatting
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pnpm format
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
To test formatting and fix errors
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pnpm format:fix
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
To lint
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pnpm lint
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
To test formatting and fix errors
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pnpm lint:fix
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Questions and Feedback
|
|
57
|
+
|
|
58
|
+
(TBD)
|
|
59
|
+
|
|
60
|
+
## Accessibility Standards
|
|
61
|
+
|
|
62
|
+
(TBD)
|
|
63
|
+
|
|
64
|
+
## Contributing
|
|
65
|
+
|
|
66
|
+
ILO Design System is an open-source project and we welcome your contributions! Before submitting a pull request, please take a moment to review the following guidelines.
|
|
67
|
+
|
|
68
|
+
### Branches
|
|
69
|
+
|
|
70
|
+
| Branch | Purpose |
|
|
71
|
+
| --------- | ---------------------------------- |
|
|
72
|
+
| `main` | The latest version of all packages |
|
|
73
|
+
| `develop` | The next release of all packages |
|
|
74
|
+
|
|
75
|
+
### Contribution workflow
|
|
76
|
+
|
|
77
|
+
1. Fork and clone the repo
|
|
78
|
+
2. Create a new branch from the `develop` branch
|
|
79
|
+
3. Make your changes and [add a changeset](#versioning) identifying the changes and affected packages
|
|
80
|
+
4. Push your branch to the forked version of the repo
|
|
81
|
+
5. Open a pull request back to the `develop` branch of the main repo
|
|
82
|
+
|
|
83
|
+
### Versioning
|
|
84
|
+
|
|
85
|
+
The project uses [changesets](https://github.com/changesets/changesets) to manage package versioning. All pull requests that will affect the project's semantic versioning must include a changest.
|
|
86
|
+
|
|
87
|
+
See more information on [how to add a changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md)
|
|
88
|
+
|
|
89
|
+
### Conventions
|
|
90
|
+
|
|
91
|
+
Contributions should respect the following conventions for branch names, commit messages and pull request descriptions
|
|
92
|
+
|
|
93
|
+
#### Commits
|
|
94
|
+
|
|
95
|
+
Commits should follow [Angular Commit Message Guidelines](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#commit).
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
<type>(<scope>): <subject>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Examples:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
fix(react): change button color on hover
|
|
105
|
+
feat(twig): add button component
|
|
106
|
+
ci(github): add release workflow
|
|
107
|
+
perf(react): improve modal animations
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
#### Types
|
|
111
|
+
|
|
112
|
+
- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
|
|
113
|
+
- ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
|
|
114
|
+
- docs: Documentation only changes
|
|
115
|
+
- feat: A new feature
|
|
116
|
+
- fix: A bug fix
|
|
117
|
+
- perf: A code change that improves performance
|
|
118
|
+
- refactor: A code change that neither fixes a bug nor adds a feature
|
|
119
|
+
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
|
|
120
|
+
- test: Adding missing tests or correcting existing tests
|
|
121
|
+
|
|
122
|
+
#### Scopes
|
|
123
|
+
|
|
124
|
+
This should be a package name or an aspect of the project's configuration.
|
|
125
|
+
|
|
126
|
+
### Branches
|
|
127
|
+
|
|
128
|
+
Branch names should broadly mirror the same convention as commits.
|
|
129
|
+
|
|
130
|
+
Examples:
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
feat/react/modal-wrapper
|
|
134
|
+
fix/twig/modal-wrapper
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Pull requests
|
|
138
|
+
|
|
139
|
+
Pull requests should include a descriptive name and detailed explanation of what merging the pull request will accomplish. Authors should make sure to reference Github issues that the the pull request will fix or affect.
|
|
140
|
+
|
|
141
|
+
## Building the project
|
|
142
|
+
|
|
143
|
+
Use [nvm](https://github.com/nvm-sh/nvm) to make sure you have the correct version of node installed.
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
nvm use
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Install [pnpm](https://pnpm.io/).
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
npm i -g pnpm
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Install dependencies
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
pnpm recursive install
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Build all packages.
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
pnpm build:all
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Start React storybook
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
pnpm start:react-storybook
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Start Twig storybook
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
pnpm start:twig-storybook
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Check types
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
pnpm check:types
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Run all tests
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
pnpm test:all
|
|
189
|
+
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ilo-org/react",
|
|
3
3
|
"description": "React components for the ILO's Design System",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.14",
|
|
5
5
|
"author": "@justintemps",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "lib/index.js",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@ilo-org/brand-assets": "0.0.1",
|
|
27
27
|
"@ilo-org/fonts": "0.0.2",
|
|
28
|
-
"@ilo-org/icons-react": "0.0.
|
|
29
|
-
"@ilo-org/styles": "0.1.
|
|
30
|
-
"@ilo-org/themes": "0.1.
|
|
31
|
-
"@ilo-org/utils": "0.0.
|
|
28
|
+
"@ilo-org/icons-react": "0.0.12",
|
|
29
|
+
"@ilo-org/styles": "0.1.10",
|
|
30
|
+
"@ilo-org/themes": "0.1.10",
|
|
31
|
+
"@ilo-org/utils": "0.0.6",
|
|
32
32
|
"classnames": "^2.3.1",
|
|
33
33
|
"dom-helpers": "^5.2.1",
|
|
34
34
|
"global": "^4.4.0",
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
|
|
112
112
|
"lint:fix": "pnpm lint -- --fix"
|
|
113
113
|
},
|
|
114
|
-
"readme": "# ILO Design System - React Package\n\
|
|
114
|
+
"readme": "# ILO Design System - React Package\n\nThis package provides the implementation of the Design System using [React](https://reactjs.org). It also includes a [Storybook](https://storybook.js.org/) project for documentation and development of the components in the system. It has dependencies on the following other @ilo-org packages:\n\n- [@ilo-org/themes](./packages/themes)\n- [@ilo-org/fonts](./packages/fonts)\n- [@ilo-org/styles](./packages/styles)\n- [@ilo-org/utils](./packages/utils)\n- [@ilo-org/icons](./packages/icons)\n- [@ilo-org/icons-react](./packages/icons-react)\n\n## Installation and PNPM Commands\n\nTo install\n\n```bash\nnpm i @ilo-org/react\n```\n\nTo start storybook\n\n```bash\npnpm storybook\n```\n\nTo build storybook\n\n```bash\npnpm build:storybook\n```\n\nTo test formatting\n\n```bash\npnpm format\n```\n\nTo test formatting and fix errors\n\n```bash\npnpm format:fix\n```\n\nTo lint\n\n```bash\npnpm lint\n```\n\nTo test formatting and fix errors\n\n```bash\npnpm lint:fix\n```\n\n## Questions and Feedback\n\n(TBD)\n\n## Accessibility Standards\n\n(TBD)\n\n## Contributing\n\nILO Design System is an open-source project and we welcome your contributions! Before submitting a pull request, please take a moment to review the following guidelines.\n\n### Branches\n\n| Branch | Purpose |\n| --------- | ---------------------------------- |\n| `main` | The latest version of all packages |\n| `develop` | The next release of all packages |\n\n### Contribution workflow\n\n1. Fork and clone the repo\n2. Create a new branch from the `develop` branch\n3. Make your changes and [add a changeset](#versioning) identifying the changes and affected packages\n4. Push your branch to the forked version of the repo\n5. Open a pull request back to the `develop` branch of the main repo\n\n### Versioning\n\nThe project uses [changesets](https://github.com/changesets/changesets) to manage package versioning. All pull requests that will affect the project's semantic versioning must include a changest.\n\nSee more information on [how to add a changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md)\n\n### Conventions\n\nContributions should respect the following conventions for branch names, commit messages and pull request descriptions\n\n#### Commits\n\nCommits should follow [Angular Commit Message Guidelines](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#commit).\n\n```\n<type>(<scope>): <subject>\n```\n\nExamples:\n\n```\nfix(react): change button color on hover\nfeat(twig): add button component\nci(github): add release workflow\nperf(react): improve modal animations\n```\n\n#### Types\n\n- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)\n- ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)\n- docs: Documentation only changes\n- feat: A new feature\n- fix: A bug fix\n- perf: A code change that improves performance\n- refactor: A code change that neither fixes a bug nor adds a feature\n- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)\n- test: Adding missing tests or correcting existing tests\n\n#### Scopes\n\nThis should be a package name or an aspect of the project's configuration.\n\n### Branches\n\nBranch names should broadly mirror the same convention as commits.\n\nExamples:\n\n```\nfeat/react/modal-wrapper\nfix/twig/modal-wrapper\n```\n\n### Pull requests\n\nPull requests should include a descriptive name and detailed explanation of what merging the pull request will accomplish. Authors should make sure to reference Github issues that the the pull request will fix or affect.\n\n## Building the project\n\nUse [nvm](https://github.com/nvm-sh/nvm) to make sure you have the correct version of node installed.\n\n```bash\nnvm use\n```\n\nInstall [pnpm](https://pnpm.io/).\n\n```bash\nnpm i -g pnpm\n```\n\nInstall dependencies\n\n```bash\npnpm recursive install\n```\n\nBuild all packages.\n\n```bash\npnpm build:all\n```\n\nStart React storybook\n\n```bash\npnpm start:react-storybook\n```\n\nStart Twig storybook\n\n```bash\npnpm start:twig-storybook\n```\n\nCheck types\n\n```bash\npnpm check:types\n```\n\nRun all tests\n\n```bash\npnpm test:all\n```\n"
|
|
115
115
|
}
|
|
@@ -50,6 +50,11 @@ const VideoPlayer: FC<VideoPlayerProps> = ({
|
|
|
50
50
|
*/
|
|
51
51
|
const videoElement = createRef();
|
|
52
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Ref for the video container
|
|
55
|
+
*/
|
|
56
|
+
const videoContainer = createRef();
|
|
57
|
+
|
|
53
58
|
const youtubeparams = {
|
|
54
59
|
controls: 0,
|
|
55
60
|
modestbranding: 1,
|
|
@@ -68,7 +73,7 @@ const VideoPlayer: FC<VideoPlayerProps> = ({
|
|
|
68
73
|
const toggleFullscreen = () => {
|
|
69
74
|
/* This is a known issue with ReactPlayer */
|
|
70
75
|
/* @ts-ignore */
|
|
71
|
-
screenfull.request(findDOMNode(
|
|
76
|
+
screenfull.request(findDOMNode(videoContainer.current));
|
|
72
77
|
};
|
|
73
78
|
|
|
74
79
|
/**
|
|
@@ -162,7 +167,10 @@ const VideoPlayer: FC<VideoPlayerProps> = ({
|
|
|
162
167
|
};
|
|
163
168
|
|
|
164
169
|
return (
|
|
165
|
-
<div
|
|
170
|
+
<div
|
|
171
|
+
className={`${baseClass}--container`}
|
|
172
|
+
ref={videoContainer as React.RefObject<HTMLDivElement>}
|
|
173
|
+
>
|
|
166
174
|
<ReactPlayer
|
|
167
175
|
className={playerClasses}
|
|
168
176
|
config={playerconfig as any}
|
|
@@ -173,6 +181,7 @@ const VideoPlayer: FC<VideoPlayerProps> = ({
|
|
|
173
181
|
url={src as any}
|
|
174
182
|
width="100%"
|
|
175
183
|
height="100%"
|
|
184
|
+
progressInterval={30}
|
|
176
185
|
volume={volume}
|
|
177
186
|
onProgress={handleProgress}
|
|
178
187
|
onDuration={handleDuration}
|
|
@@ -1,12 +1,258 @@
|
|
|
1
|
-
import { Meta } from "@storybook/addon-docs";
|
|
1
|
+
import { Meta, Canvas } from "@storybook/addon-docs/blocks";
|
|
2
|
+
import { Badge } from "@storybook/components";
|
|
3
|
+
import { getStorybook, storiesOf } from "@storybook/react";
|
|
4
|
+
import LinkTo from "@storybook/addon-links/react";
|
|
2
5
|
|
|
3
6
|
<Meta title="Introduction" />
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
<div style={{ paddingTop: "40px", color: "inherit" }}>
|
|
9
|
+
<h2
|
|
10
|
+
style={{
|
|
11
|
+
fontFamily: "Overpass",
|
|
12
|
+
fontSize: "56.95px",
|
|
13
|
+
fontWeight: "700",
|
|
14
|
+
marginBottom: "40px",
|
|
15
|
+
border: "none",
|
|
16
|
+
}}
|
|
17
|
+
>
|
|
18
|
+
ILO Design System
|
|
19
|
+
</h2>
|
|
20
|
+
<h3
|
|
21
|
+
style={{
|
|
22
|
+
fontFamily: "Overpass",
|
|
23
|
+
fontSize: "45.56px",
|
|
24
|
+
fontWeight: "700",
|
|
25
|
+
marginBottom: "40px",
|
|
26
|
+
}}
|
|
27
|
+
>
|
|
28
|
+
Getting Started
|
|
29
|
+
</h3>
|
|
30
|
+
</div>
|
|
6
31
|
|
|
7
|
-
|
|
32
|
+
This package provides the implementation of the Design System using [React](https://reactjs.org). It also includes a [Storybook](https://storybook.js.org/) project for documentation and development of the components in the system. It has dependencies on the following other @ilo-org packages:
|
|
8
33
|
|
|
9
|
-
|
|
34
|
+
- [@ilo-org/themes](./packages/themes)
|
|
35
|
+
- [@ilo-org/fonts](./packages/fonts)
|
|
36
|
+
- [@ilo-org/styles](./packages/styles)
|
|
37
|
+
- [@ilo-org/utils](./packages/utils)
|
|
38
|
+
- [@ilo-org/icons](./packages/icons)
|
|
39
|
+
- [@ilo-org/icons-react](./packages/icons-react)
|
|
10
40
|
|
|
11
|
-
|
|
12
|
-
|
|
41
|
+
<h4
|
|
42
|
+
style={{
|
|
43
|
+
fontFamily: "Overpass",
|
|
44
|
+
fontSize: "29px",
|
|
45
|
+
fontWeight: "700",
|
|
46
|
+
marginBottom: "40px",
|
|
47
|
+
marginTop: "40px",
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
Installation and PNPM Commands
|
|
51
|
+
</h4>
|
|
52
|
+
|
|
53
|
+
To install
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm i @ilo-org/react
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
To start storybook
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pnpm storybook
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
To build storybook
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
pnpm build:storybook
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
To test formatting
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pnpm format
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
To test formatting and fix errors
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pnpm format:fix
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
To lint
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pnpm lint
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
To test formatting and fix errors
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pnpm lint:fix
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
<h4
|
|
96
|
+
style={{
|
|
97
|
+
fontFamily: "Overpass",
|
|
98
|
+
fontSize: "29px",
|
|
99
|
+
fontWeight: "700",
|
|
100
|
+
marginBottom: "40px",
|
|
101
|
+
marginTop: "40px",
|
|
102
|
+
}}
|
|
103
|
+
>
|
|
104
|
+
Questions and Feedback
|
|
105
|
+
</h4>
|
|
106
|
+
|
|
107
|
+
(TBD)
|
|
108
|
+
|
|
109
|
+
<h4
|
|
110
|
+
style={{
|
|
111
|
+
fontFamily: "Overpass",
|
|
112
|
+
fontSize: "29px",
|
|
113
|
+
fontWeight: "700",
|
|
114
|
+
marginBottom: "40px",
|
|
115
|
+
marginTop: "40px",
|
|
116
|
+
}}
|
|
117
|
+
>
|
|
118
|
+
Accessibility Standards
|
|
119
|
+
</h4>
|
|
120
|
+
|
|
121
|
+
(TBD)
|
|
122
|
+
|
|
123
|
+
<h4
|
|
124
|
+
style={{
|
|
125
|
+
fontFamily: "Overpass",
|
|
126
|
+
fontSize: "29px",
|
|
127
|
+
fontWeight: "700",
|
|
128
|
+
marginBottom: "40px",
|
|
129
|
+
marginTop: "40px",
|
|
130
|
+
}}
|
|
131
|
+
>
|
|
132
|
+
Contributing
|
|
133
|
+
</h4>
|
|
134
|
+
|
|
135
|
+
ILO Design System is an open-source project and we welcome your contributions! Before submitting a pull request, please take a moment to review the following guidelines.
|
|
136
|
+
|
|
137
|
+
## Branches
|
|
138
|
+
|
|
139
|
+
| Branch | Purpose |
|
|
140
|
+
| --------- | ---------------------------------- |
|
|
141
|
+
| `main` | The latest version of all packages |
|
|
142
|
+
| `develop` | The next release of all packages |
|
|
143
|
+
|
|
144
|
+
## Contribution workflow
|
|
145
|
+
|
|
146
|
+
1. Fork and clone the repo
|
|
147
|
+
2. Create a new branch from the `develop` branch
|
|
148
|
+
3. Make your changes and [add a changeset](#versioning) identifying the changes and affected packages
|
|
149
|
+
4. Push your branch to the forked version of the repo
|
|
150
|
+
5. Open a pull request back to the `develop` branch of the main repo
|
|
151
|
+
|
|
152
|
+
## Versioning
|
|
153
|
+
|
|
154
|
+
The project uses [changesets](https://github.com/changesets/changesets) to manage package versioning. All pull requests that will affect the project's semantic versioning must include a changest.
|
|
155
|
+
|
|
156
|
+
See more information on [how to add a changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md)
|
|
157
|
+
|
|
158
|
+
## Conventions
|
|
159
|
+
|
|
160
|
+
Contributions should respect the following conventions for branch names, commit messages and pull request descriptions
|
|
161
|
+
|
|
162
|
+
### Commits
|
|
163
|
+
|
|
164
|
+
Commits should follow [Angular Commit Message Guidelines](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#commit).
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
<type>(<scope>): <subject>
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Examples:
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
fix(react): change button color on hover
|
|
174
|
+
feat(twig): add button component
|
|
175
|
+
ci(github): add release workflow
|
|
176
|
+
perf(react): improve modal animations
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
#### Types
|
|
180
|
+
|
|
181
|
+
- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
|
|
182
|
+
- ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
|
|
183
|
+
- docs: Documentation only changes
|
|
184
|
+
- feat: A new feature
|
|
185
|
+
- fix: A bug fix
|
|
186
|
+
- perf: A code change that improves performance
|
|
187
|
+
- refactor: A code change that neither fixes a bug nor adds a feature
|
|
188
|
+
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
|
|
189
|
+
- test: Adding missing tests or correcting existing tests
|
|
190
|
+
|
|
191
|
+
#### Scopes
|
|
192
|
+
|
|
193
|
+
This should be a package name or an aspect of the project's configuration.
|
|
194
|
+
|
|
195
|
+
### Branches
|
|
196
|
+
|
|
197
|
+
Branch names should broadly mirror the same convention as commits.
|
|
198
|
+
|
|
199
|
+
Examples:
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
feat/react/modal-wrapper
|
|
203
|
+
fix/twig/modal-wrapper
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Pull requests
|
|
207
|
+
|
|
208
|
+
Pull requests should include a descriptive name and detailed explanation of what merging the pull request will accomplish. Authors should make sure to reference Github issues that the the pull request will fix or affect.
|
|
209
|
+
|
|
210
|
+
## Building the project
|
|
211
|
+
|
|
212
|
+
Use [nvm](https://github.com/nvm-sh/nvm) to make sure you have the correct version of node installed.
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
nvm use
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Install [pnpm](https://pnpm.io/).
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
npm i -g pnpm
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Install dependencies
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
pnpm recursive install
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Build all packages.
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
pnpm build:all
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Start React storybook
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
pnpm start:react-storybook
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Start Twig storybook
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
pnpm start:twig-storybook
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Check types
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
pnpm check:types
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Run all tests
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
pnpm test:all
|
|
258
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Meta } from "@storybook/addon-docs";
|
|
2
|
+
|
|
3
|
+
<Meta title="Welcome" />
|
|
4
|
+
|
|
5
|
+
<div style={{ paddingTop: "40px", color: "inherit" }}>
|
|
6
|
+
<h2
|
|
7
|
+
style={{
|
|
8
|
+
fontFamily: "Overpass",
|
|
9
|
+
fontSize: "56.95px",
|
|
10
|
+
fontWeight: "700",
|
|
11
|
+
marginBottom: "40px",
|
|
12
|
+
border: "none",
|
|
13
|
+
}}
|
|
14
|
+
>
|
|
15
|
+
ILO Design System
|
|
16
|
+
</h2>
|
|
17
|
+
<h3
|
|
18
|
+
style={{
|
|
19
|
+
fontFamily: "Overpass",
|
|
20
|
+
fontSize: "45.56px",
|
|
21
|
+
fontWeight: "700",
|
|
22
|
+
marginBottom: "40px",
|
|
23
|
+
}}
|
|
24
|
+
>
|
|
25
|
+
React Component Library 0.0.12
|
|
26
|
+
</h3>
|
|
27
|
+
<a
|
|
28
|
+
class="ilo--button ilo--button--large ilo--button--primary optionalclass"
|
|
29
|
+
href="/docs/introduction--page"
|
|
30
|
+
target="true"
|
|
31
|
+
rel="noopener noreferrer"
|
|
32
|
+
style={{ color: "inherit", marginRight: "20px" }}
|
|
33
|
+
>
|
|
34
|
+
<span class="link__label">Get started</span>
|
|
35
|
+
</a>
|
|
36
|
+
<a
|
|
37
|
+
class="ilo--button ilo--button--large ilo--button--primary optionalclass"
|
|
38
|
+
href="https://github.com/international-labour-organization/designsystem"
|
|
39
|
+
target="true"
|
|
40
|
+
rel="noopener noreferrer"
|
|
41
|
+
style={{ color: "inherit", marginRight: "20px" }}
|
|
42
|
+
>
|
|
43
|
+
<span class="link__label">Follow on Github</span>
|
|
44
|
+
</a>
|
|
45
|
+
<a
|
|
46
|
+
class="ilo--button ilo--button--large ilo--button--primary optionalclass"
|
|
47
|
+
href="https://brand.ilo.org"
|
|
48
|
+
target="true"
|
|
49
|
+
rel="noopener noreferrer"
|
|
50
|
+
style={{ color: "inherit", marginRight: "20px" }}
|
|
51
|
+
>
|
|
52
|
+
<span class="link__label">See Design Docs</span>
|
|
53
|
+
</a>
|
|
54
|
+
<a
|
|
55
|
+
class="ilo--button ilo--button--large ilo--button--primary optionalclass"
|
|
56
|
+
href="https://ilo-ui-twig.netlify.app"
|
|
57
|
+
target="true"
|
|
58
|
+
rel="noopener noreferrer"
|
|
59
|
+
style={{ color: "inherit", marginRight: "20px" }}
|
|
60
|
+
>
|
|
61
|
+
<span class="link__label">ILO Design System for Twig</span>
|
|
62
|
+
</a>
|
|
63
|
+
</div>
|