@narmi/design_system 0.2.0 → 1.2.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/README.md CHANGED
@@ -8,85 +8,33 @@ This design system is intended to provide primitive "building blocks" for custom
8
8
 
9
9
  Please follow the below steps to install, consume, or contribute to the design_system.
10
10
 
11
- ## Consuming design_system
11
+ # Getting Started
12
12
 
13
- Please follow all steps below to set up your copy of design_system.
13
+ ## Installation
14
14
 
15
- ### 1. Install design_system
16
-
17
- Install the latest version of design_system from NPM:
15
+ Narmi Design System is currently published as a single NPM package.
18
16
 
19
17
  ```
20
18
  npm add @narmi/design_system --save
21
19
  ```
22
20
 
23
-
24
- ### 2. Install PeerDependencies
25
-
26
- design_system doesn't package 2 key dependencies, because we want to let users configure their own versions of these deps, and avoid [forcing multiple copies](https://reactjs.org/warnings/invalid-hook-call-warning.html).
27
-
28
- You will need to install in your repo:
21
+ ### Peer dependencies
22
+ Your project must provide the following packages as peer dependencies:
29
23
 
30
24
  - React (>=16.9, supports Hooks)
31
25
  - styled-components (>=5)
32
26
 
33
- ```
34
- # in the repo where you are consuming design_system
35
- npm install react@16.9 styled-components@5 -S
36
- ```
37
-
38
- These are included as peerDependencies in package.json.
39
-
40
- ### 3. Configure Your Theme
41
-
42
- Set up a `<GlobalStyles />` and a `<ThemeProvider />` component at each of your application's entry points to provide the necessary CSS variables to design_system components:
43
-
44
- ```
45
- # In your top-level App.js or HTML page file
46
- import {ThemeProvider} from "styled-components"
47
- import {GlobalStyles} from "design_system"
48
-
49
- <ThemeProvider
50
- theme={{
51
- primaryColor: "your-primary-color",
52
- secondaryColor: "your-secondary-color",
53
- tertiaryColor: "your-tertiary-color",
54
- }}
55
- >
56
- <GlobalStyles />
57
- </ThemeProvider>
58
-
59
- ...the rest of your app...
60
- # no other design_system components should need access to `theme`
61
- ```
62
-
63
- This will write a `<style>` tag to your page that contains the CSS variables the design system components depend on. Without this, you may see empty or colorless Buttons and pages.
27
+ ### Documentation
64
28
 
65
- All CSS variables are prefixed with --nds (e.g. `--nds-my-variable`), to avoid collision with any existing CSS variables that may be contained in your app.
29
+ - 📖 [Storybook (latest)](https://master--60620d422ffdf100216415b2.chromatic.com/)
66
30
 
67
- ### 4. View Available Components
31
+ ### Versioning
68
32
 
69
- ```
70
- # from design_system/
71
- npm run storybook
72
- ```
73
-
74
- You can use [Storybook](https://storybook.js.org/tutorials/intro-to-storybook/react/en/get-started/) to see what components are available.
75
-
76
- We typically add a `Story` for each view or distinct state of each component.
77
-
78
- These distinct views or states are controlled by Storybook `args` (similar to props).
79
-
80
- If contributing a change, please test your components out in Storybook before making a PR.
81
-
82
- ### 5. Additional Config and Tips
33
+ This project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
34
+ Refer to the [**Changelog**](https://github.com/narmi/design_system/blob/master/CHANGELOG.md) for details.
83
35
 
84
- #### Consuming design_system Themes in Your App
85
36
 
86
- `styled-components` exposes a [ThemeProvider context](https://styled-components.com/docs/advanced#getting-the-theme-without-styled-components) if you wish to grab the design_system Theme for use in your own components or Pages.
87
-
88
-
89
- ## Browser Support Notes
37
+ ### Browser Support
90
38
 
91
39
  Please check the following chart to see the minimum browser versions supported by design_system:
92
40
 
@@ -94,7 +42,7 @@ Please check the following chart to see the minimum browser versions supported b
94
42
 
95
43
  ----
96
44
 
97
- ## Developing
45
+ # Developing
98
46
 
99
47
  We need to set up your copy of `design_system` for local development.
100
48
 
@@ -120,7 +68,7 @@ Results:
120
68
  - On each change to files in design_system, the `dist/index.js` file will be rebuilt -
121
69
  - This allows local changes to design_system to be live-updated in your consuming repo.
122
70
 
123
- ### Releases
71
+ ## Releases
124
72
 
125
73
  This project uses [`semantic-release`](https://semantic-release.gitbook.io/semantic-release/),
126
74
  configured to use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
@@ -128,12 +76,7 @@ This project uses [`semantic-release`](https://semantic-release.gitbook.io/seman
128
76
  Any time new commits are added to the `master` branch, the GitHub Action "release" will run `semantic-release`. The job will
129
77
  parse recent git tags and commit messages to determine the new version number, tag the release, publish to NPM, and update the changelog.
130
78
 
131
- #### Versioning
132
-
133
- This project uses [Semantic Versioning](https://semver.org/).
134
- The `[major].[minor].[patch]` versions should be thought of as `[breaking].[feature].[fix]`
135
-
136
- #### Commit Guidelines
79
+ ### Commit Guidelines
137
80
 
138
81
  This project requires structured commit messages in the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format:
139
82
 
@@ -145,7 +88,7 @@ Allowed types are `[build, chore, ci, docs, feat, fix, perf, refactor, revert, s
145
88
  The `build`, `chore`, and `ci` commit types will skip CI and do not trigger a release.
146
89
  Adding a bang (`!`) to the commit type denotes a breaking change ([see docs](https://www.conventionalcommits.org/en/v1.0.0/#commit-message-with-description-and-breaking-change-footer) for more details).
147
90
 
148
- ##### Examples
91
+ #### Examples
149
92
 
150
93
  Making a fix without scope specified:
151
94
  ```
@@ -330,6 +273,3 @@ Feel free to ask us for suggestions or feedback - we're happy to help!
330
273
 
331
274
  Source code is under a custom license based on MIT. The license restricts design_system usage to applications that integrate or interoperate with Narmi software or services, with additional restrictions for external, stand-alone applications. Please see LICENSE.md for full details.
332
275
 
333
-
334
-
335
-