@telicent-oss/ds 0.0.1 → 0.0.2-rc2
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 +25 -119
- package/dist/ds.js +8789 -8768
- package/dist/ds.umd.cjs +92 -92
- package/dist/src/components/OntologyClassMarker/OntologyClassMarker.stories.d.ts +1 -1
- package/dist/src/components/OntologyHierarchy/OntologyHierarchy.d.ts +2 -0
- package/dist/src/components/OntologyHierarchy/OntologyHierarchy.stories.d.ts +3 -1
- package/dist/src/components/OntologyHierarchy/OntologyHierarchyFunctions.d.ts +5 -4
- package/dist/src/components/SearchAutocomplete/SearchAutocomplete.stories.d.ts +1 -1
- package/dist/src/components/SearchAutocompleteDialog/SearchAutocompleteDialog.stories.d.ts +1 -1
- package/dist/src/components/TeliSelect/TeliSelect.stories.d.ts +1 -1
- package/dist/src/components/TeliToolbar/TeliToolbar.stories.d.ts +1 -1
- package/dist/src/components/TeliTypeIcon/TeliTypeIcon.stories.d.ts +1 -1
- package/dist/src/components/TeliTypeahead/TeliTypeahead.stories.d.ts +1 -1
- package/dist/src/hooks/useTypeahead.d.ts +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -1,135 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
Telicent Design System (DS)
|
|
3
|
-
</h1>
|
|
1
|
+
# Telicent Design System (DS)
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
A component library to help developers create frontend applications for [Telicent.io](https://telicent.io/) platform apps.
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
This repo contains:
|
|
6
|
+
1. ReactJS Components that adhere to the _Design System rules_<sup>1</sup>
|
|
7
|
+
2. A generated [Storybook](https://telicent-oss.github.io/ds/), describing the components
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- **Layouts**. Common layouts used in various Telicent applications
|
|
9
|
+
<sup>1</sup> The _Design System rules_ are contained in a Figma file (private for now)
|
|
11
10
|
|
|
12
|
-
##
|
|
11
|
+
## Install
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
This repository is published as an npm package at [@telicent-oss/ds](https://www.npmjs.com/package/@telicent-oss/ds) and is installable via:
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
If using yarn
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
yarn add @telicent-oss/ds
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
If using npm
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
npm install @telicent-oss/ds
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
2. Import css styles
|
|
31
|
-
|
|
32
|
-
Note: The order of css imports matters. In order to override the styles from
|
|
33
|
-
the DS, the imports below should appear before the applications css file(s)
|
|
34
|
-
import.
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
import "@telicent-oss/ds/dist/style.css";
|
|
38
|
-
|
|
39
|
-
// Adds fontawesome icon pack
|
|
40
|
-
import "@telicent-oss/ds/dist/fontawesome.css";
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
3. Disable tailwind preflight (only if using tailwind in your application)
|
|
44
|
-
|
|
45
|
-
In tailwind.config.[js | ts]
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
{
|
|
49
|
-
...
|
|
50
|
-
corePlugins: {
|
|
51
|
-
preflight: false,
|
|
52
|
-
}
|
|
53
|
-
...
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Developer notes
|
|
58
|
-
|
|
59
|
-
### Pre-deployment
|
|
60
|
-
|
|
61
|
-
To test the components before pushing to a npm registry please perform the following steps:
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
git clone https://github.com/Telicent-oss/telicent-ds.git
|
|
65
|
-
cd telicent-ds
|
|
66
|
-
yarn install
|
|
67
|
-
yarn link #this will make it so you have a endpoint to link projects to
|
|
68
|
-
cd <project-root>/node_modules/react
|
|
69
|
-
yarn link # needs to be done or you app will throw errors due to clashing react instances
|
|
70
|
-
cd <project-root>/node_modules/react-dom # needs to be done or you app will throw errors due to clashing react instances
|
|
71
|
-
|
|
72
|
-
# Navigate to project you want to test the components in
|
|
73
|
-
cd /path/to/project
|
|
74
|
-
yarn link telicent/ds
|
|
75
|
-
yarn link react
|
|
76
|
-
yarn link react-dom
|
|
15
|
+
```sh
|
|
16
|
+
npm install @telicent-oss/ds
|
|
77
17
|
```
|
|
78
18
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
To host the component library viewer
|
|
19
|
+
## Usage
|
|
82
20
|
|
|
21
|
+
Before you start, import the required styles into your top-level file:
|
|
22
|
+
```tsx
|
|
23
|
+
import "@telicent-oss/ds/dist/style.css";
|
|
24
|
+
import "@telicent-oss/ds/dist/fontawesome.css";
|
|
83
25
|
```
|
|
84
|
-
cd /path/to/project
|
|
85
|
-
yarn storybook
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Build library viewer
|
|
89
|
-
|
|
90
|
-
To build the library viewer so that it can be hosted on something like Nginx just type `yarn build-storybook`.
|
|
91
|
-
By default the output will be created in the storybook-static folder.
|
|
92
|
-
|
|
93
|
-
### Build components
|
|
94
|
-
|
|
95
|
-
To build the components ready for uploading to a package manager type `yarn build:babel`
|
|
96
|
-
|
|
97
|
-
### Publish Component Library
|
|
98
|
-
|
|
99
|
-
To publish this library to git packages:
|
|
100
26
|
|
|
101
|
-
|
|
102
|
-
- push feature branch to git (this will kick off the chromatic action)
|
|
103
|
-
- if there are changes in chromatic this will need to be reviewed
|
|
104
|
-
- raise a pull request
|
|
105
|
-
- requires at least one reviewer to accept to merge
|
|
106
|
-
- merge pr in to main
|
|
107
|
-
- on the main branch raise a release
|
|
108
|
-
- this will kick off chromatic and npm-publish actions
|
|
27
|
+
Then search for a component in the Storybook. Navigate between stories by clicking on them in the sidebar or using the sidebar searchbox.
|
|
109
28
|
|
|
110
|
-
|
|
29
|
+
Once you have found the component, you can import it into your application:
|
|
111
30
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
[Create a personal access token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) that has read permissions to Packages
|
|
115
|
-
|
|
116
|
-
Modify your ~/.npmrc file with the following:
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
prefix=/Users/dave/.npm
|
|
120
|
-
@telicent-oss:registry=https://npm.pkg.github.com/
|
|
121
|
-
//npm.pkg.github.com/:_authToken={GITHUB_PERSONAL_ACCESS_TOKEN}
|
|
31
|
+
```tsx
|
|
32
|
+
import { TeliStandardLayout } from '@telicent-oss/ds';
|
|
122
33
|
```
|
|
123
34
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
### How to publish a release candidate
|
|
127
|
-
|
|
128
|
-
In this section you will learn the steps required to publish a release candidate to test bleeding edge capabilities in your app.
|
|
35
|
+
## Run storybook locally
|
|
129
36
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
The workflow will now run and publish the package to [Telicent's private npm repo](https://github.com/Telicent-oss/telicent-ds/pkgs/npm/ds)
|
|
37
|
+
```sh
|
|
38
|
+
git clone https://github.com/Telicent-oss/telicent-ds.git
|
|
39
|
+
cd telicent-ds
|
|
40
|
+
yarn && yarn storybook
|
|
41
|
+
```
|