@lifesg/react-design-system 1.0.0-alpha.1 → 1.0.0-alpha.2
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/{dist/accordion → accordion}/accordion-context.d.ts +0 -0
- package/{dist/accordion → accordion}/accordion-item.d.ts +0 -0
- package/{dist/accordion → accordion}/accordion-item.style.d.ts +0 -0
- package/{dist/accordion → accordion}/accordion.d.ts +0 -0
- package/{dist/accordion → accordion}/accordion.style.d.ts +0 -0
- package/{dist/accordion → accordion}/index.d.ts +0 -0
- package/{dist/accordion → accordion}/index.js +0 -0
- package/{dist/accordion → accordion}/index.js.map +0 -0
- package/{dist/accordion → accordion}/package.json +0 -0
- package/{dist/accordion → accordion}/types.d.ts +0 -0
- package/{dist/alert → alert}/alert.d.ts +0 -0
- package/{dist/alert → alert}/alert.style.d.ts +0 -0
- package/{dist/alert → alert}/index.d.ts +0 -0
- package/{dist/alert → alert}/index.js +0 -0
- package/{dist/alert → alert}/index.js.map +0 -0
- package/{dist/alert → alert}/package.json +0 -0
- package/{dist/alert → alert}/types.d.ts +0 -0
- package/{dist/animations → animations}/index.d.ts +0 -0
- package/{dist/animations → animations}/index.js +0 -0
- package/{dist/animations → animations}/index.js.map +0 -0
- package/{dist/animations → animations}/loading-dots/loading-dots.d.ts +0 -0
- package/{dist/animations → animations}/loading-dots/lottie-animation.d.ts +0 -0
- package/{dist/animations → animations}/loading-spinner/loading-spinner.d.ts +0 -0
- package/{dist/animations → animations}/loading-spinner/lottie-animation.d.ts +0 -0
- package/{dist/animations → animations}/package.json +0 -0
- package/{dist/box-container → box-container}/box-container.d.ts +0 -0
- package/{dist/box-container → box-container}/box-container.styles.d.ts +0 -0
- package/{dist/box-container → box-container}/index.d.ts +0 -0
- package/{dist/box-container → box-container}/index.js +0 -0
- package/{dist/box-container → box-container}/index.js.map +0 -0
- package/{dist/box-container → box-container}/package.json +0 -0
- package/{dist/box-container → box-container}/types.d.ts +0 -0
- package/{dist/breadcrumb → breadcrumb}/breadcrumb.d.ts +0 -0
- package/{dist/breadcrumb → breadcrumb}/breadcrumb.style.d.ts +0 -0
- package/{dist/breadcrumb → breadcrumb}/index.d.ts +0 -0
- package/{dist/breadcrumb → breadcrumb}/index.js +0 -0
- package/{dist/breadcrumb → breadcrumb}/index.js.map +0 -0
- package/{dist/breadcrumb → breadcrumb}/package.json +0 -0
- package/{dist/breadcrumb → breadcrumb}/types.d.ts +0 -0
- package/{dist/button → button}/button.d.ts +0 -0
- package/{dist/button → button}/button.style.d.ts +0 -0
- package/{dist/button → button}/index.d.ts +0 -0
- package/{dist/button → button}/index.js +0 -0
- package/{dist/button → button}/index.js.map +0 -0
- package/{dist/button → button}/package.json +0 -0
- package/{dist/button → button}/types.d.ts +0 -0
- package/{dist/checkbox → checkbox}/checkbox.d.ts +0 -0
- package/{dist/checkbox → checkbox}/checkbox.style.d.ts +0 -0
- package/{dist/checkbox → checkbox}/index.d.ts +0 -0
- package/{dist/checkbox → checkbox}/index.js +0 -0
- package/{dist/checkbox → checkbox}/index.js.map +0 -0
- package/{dist/checkbox → checkbox}/package.json +0 -0
- package/{dist/checkbox → checkbox}/types.d.ts +0 -0
- package/{dist/cjs → cjs}/index.js +0 -0
- package/{dist/cjs → cjs}/index.js.map +0 -0
- package/{dist/color → color}/color.d.ts +0 -0
- package/{dist/color → color}/index.d.ts +0 -0
- package/{dist/color → color}/index.js +0 -0
- package/{dist/color → color}/index.js.map +0 -0
- package/{dist/color → color}/package.json +0 -0
- package/{dist/color → color}/types.d.ts +0 -0
- package/{dist/date-input → date-input}/date-input.d.ts +0 -0
- package/{dist/date-input → date-input}/date-input.style.d.ts +0 -0
- package/{dist/date-input → date-input}/index.d.ts +0 -0
- package/{dist/date-input → date-input}/index.js +0 -0
- package/{dist/date-input → date-input}/index.js.map +0 -0
- package/{dist/date-input → date-input}/package.json +0 -0
- package/{dist/date-input → date-input}/types.d.ts +0 -0
- package/{dist/form → form}/form-date-input.d.ts +0 -0
- package/{dist/form → form}/form-input-group.d.ts +0 -0
- package/{dist/form → form}/form-input.d.ts +0 -0
- package/{dist/form → form}/form-label-addon.d.ts +0 -0
- package/{dist/form → form}/form-label-addon.style.d.ts +0 -0
- package/{dist/form → form}/form-label.d.ts +0 -0
- package/{dist/form → form}/form-label.style.d.ts +0 -0
- package/{dist/form → form}/form-multi-select.d.ts +0 -0
- package/{dist/form → form}/form-select.d.ts +0 -0
- package/{dist/form → form}/form-textarea.d.ts +0 -0
- package/{dist/form → form}/form-textarea.style.d.ts +0 -0
- package/{dist/form → form}/form-timepicker.d.ts +0 -0
- package/{dist/form → form}/form-wrapper.d.ts +0 -0
- package/{dist/form → form}/form-wrapper.style.d.ts +0 -0
- package/{dist/form → form}/index.d.ts +0 -0
- package/{dist/form → form}/index.js +0 -0
- package/{dist/form → form}/index.js.map +0 -0
- package/{dist/form → form}/package.json +0 -0
- package/{dist/form → form}/types.d.ts +0 -0
- package/{dist/icon → icon}/arrow-right-icon.d.ts +0 -0
- package/{dist/icon → icon}/icon.d.ts +0 -0
- package/{dist/icon → icon}/index.d.ts +0 -0
- package/{dist/icon → icon}/index.js +0 -0
- package/{dist/icon → icon}/index.js.map +0 -0
- package/{dist/icon → icon}/info-icon.d.ts +0 -0
- package/{dist/icon → icon}/package.json +0 -0
- package/{dist/icon → icon}/play-alt-icon.d.ts +0 -0
- package/{dist/icon → icon}/search-icon.d.ts +0 -0
- package/{dist/icon → icon}/shared.style.d.ts +0 -0
- package/{dist/icon → icon}/types.d.ts +0 -0
- package/{dist/icon-button → icon-button}/icon-button.d.ts +0 -0
- package/{dist/icon-button → icon-button}/icon-button.style.d.ts +0 -0
- package/{dist/icon-button → icon-button}/index.d.ts +0 -0
- package/{dist/icon-button → icon-button}/index.js +0 -0
- package/{dist/icon-button → icon-button}/index.js.map +0 -0
- package/{dist/icon-button → icon-button}/package.json +0 -0
- package/{dist/icon-button → icon-button}/types.d.ts +0 -0
- package/{dist/index.d.ts → index.d.ts} +0 -0
- package/{dist/index.js → index.js} +0 -0
- package/{dist/index.js.map → index.js.map} +0 -0
- package/{dist/input → input}/index.d.ts +0 -0
- package/{dist/input → input}/index.js +0 -0
- package/{dist/input → input}/index.js.map +0 -0
- package/{dist/input → input}/input.d.ts +0 -0
- package/{dist/input → input}/input.style.d.ts +0 -0
- package/{dist/input → input}/package.json +0 -0
- package/{dist/input → input}/types.d.ts +0 -0
- package/{dist/input-group → input-group}/index.d.ts +0 -0
- package/{dist/input-group → input-group}/index.js +0 -0
- package/{dist/input-group → input-group}/index.js.map +0 -0
- package/{dist/input-group → input-group}/input-group-list-addon.d.ts +0 -0
- package/{dist/input-group → input-group}/input-group-list-addon.style.d.ts +0 -0
- package/{dist/input-group → input-group}/input-group.d.ts +0 -0
- package/{dist/input-group → input-group}/input-group.style.d.ts +0 -0
- package/{dist/input-group → input-group}/package.json +0 -0
- package/{dist/input-group → input-group}/types.d.ts +0 -0
- package/{dist/input-select → input-select}/index.d.ts +0 -0
- package/{dist/input-select → input-select}/index.js +0 -0
- package/{dist/input-select → input-select}/index.js.map +0 -0
- package/{dist/input-select → input-select}/input-multi-select.d.ts +0 -0
- package/{dist/input-select → input-select}/input-select-wrapper.d.ts +0 -0
- package/{dist/input-select → input-select}/input-select.d.ts +0 -0
- package/{dist/input-select → input-select}/input-select.styles.d.ts +0 -0
- package/{dist/input-select → input-select}/package.json +0 -0
- package/{dist/input-select → input-select}/types.d.ts +0 -0
- package/{dist/input-textarea → input-textarea}/index.d.ts +0 -0
- package/{dist/input-textarea → input-textarea}/index.js +0 -0
- package/{dist/input-textarea → input-textarea}/index.js.map +0 -0
- package/{dist/input-textarea → input-textarea}/package.json +0 -0
- package/{dist/input-textarea → input-textarea}/textara-counter.style.d.ts +0 -0
- package/{dist/input-textarea → input-textarea}/textarea-counter.d.ts +0 -0
- package/{dist/input-textarea → input-textarea}/textarea.d.ts +0 -0
- package/{dist/input-textarea → input-textarea}/textarea.style.d.ts +0 -0
- package/{dist/input-textarea → input-textarea}/types.d.ts +0 -0
- package/{dist/link-list → link-list}/index.d.ts +0 -0
- package/{dist/link-list → link-list}/index.js +0 -0
- package/{dist/link-list → link-list}/index.js.map +0 -0
- package/{dist/link-list → link-list}/link-list.d.ts +0 -0
- package/{dist/link-list → link-list}/link-list.styles.d.ts +0 -0
- package/{dist/link-list → link-list}/package.json +0 -0
- package/{dist/link-list → link-list}/types.d.ts +0 -0
- package/{dist/masonry → masonry}/index.d.ts +0 -0
- package/{dist/masonry → masonry}/index.js +0 -0
- package/{dist/masonry → masonry}/index.js.map +0 -0
- package/{dist/masonry → masonry}/masonry.d.ts +0 -0
- package/{dist/masonry → masonry}/masonry.style.d.ts +0 -0
- package/{dist/masonry → masonry}/package.json +0 -0
- package/{dist/masonry → masonry}/types.d.ts +0 -0
- package/{dist/media → media}/index.d.ts +0 -0
- package/{dist/media → media}/index.js +0 -0
- package/{dist/media → media}/index.js.map +0 -0
- package/{dist/media → media}/media.d.ts +0 -0
- package/{dist/media → media}/package.json +0 -0
- package/{dist/media → media}/types.d.ts +0 -0
- package/{dist/modal → modal}/index.d.ts +0 -0
- package/{dist/modal → modal}/index.js +0 -0
- package/{dist/modal → modal}/index.js.map +0 -0
- package/{dist/modal → modal}/modal-box.d.ts +0 -0
- package/{dist/modal → modal}/modal-box.styles.d.ts +0 -0
- package/{dist/modal → modal}/modal.d.ts +0 -0
- package/{dist/modal → modal}/modal.styles.d.ts +0 -0
- package/{dist/modal → modal}/package.json +0 -0
- package/{dist/modal → modal}/types.d.ts +0 -0
- package/{dist/overlay → overlay}/index.d.ts +0 -0
- package/{dist/overlay → overlay}/index.js +0 -0
- package/{dist/overlay → overlay}/index.js.map +0 -0
- package/{dist/overlay → overlay}/overlay.d.ts +0 -0
- package/{dist/overlay → overlay}/overlay.styles.d.ts +0 -0
- package/{dist/overlay → overlay}/package.json +0 -0
- package/{dist/overlay → overlay}/types.d.ts +0 -0
- package/package.json +31 -105
- package/{dist/popover → popover}/index.d.ts +0 -0
- package/{dist/popover → popover}/index.js +0 -0
- package/{dist/popover → popover}/index.js.map +0 -0
- package/{dist/popover → popover}/package.json +0 -0
- package/{dist/popover → popover}/popover-hoc.d.ts +0 -0
- package/{dist/popover → popover}/popover.d.ts +0 -0
- package/{dist/popover → popover}/popover.styles.d.ts +0 -0
- package/{dist/popover → popover}/types.d.ts +0 -0
- package/{dist/radio-button → radio-button}/index.d.ts +0 -0
- package/{dist/radio-button → radio-button}/index.js +0 -0
- package/{dist/radio-button → radio-button}/index.js.map +0 -0
- package/{dist/radio-button → radio-button}/package.json +0 -0
- package/{dist/radio-button → radio-button}/radio-button.d.ts +0 -0
- package/{dist/radio-button → radio-button}/radio-button.styles.d.ts +0 -0
- package/{dist/radio-button → radio-button}/types.d.ts +0 -0
- package/{dist/shared → shared}/component-loading-spinner/component-loading-spinner.d.ts +0 -0
- package/{dist/shared → shared}/component-loading-spinner/component-loading-spinner.style.d.ts +0 -0
- package/{dist/shared → shared}/dropdown-list/dropdown-list.d.ts +0 -0
- package/{dist/shared → shared}/dropdown-list/dropdown-list.styles.d.ts +0 -0
- package/{dist/shared → shared}/dropdown-list/dropdown-search.d.ts +0 -0
- package/{dist/shared → shared}/dropdown-list/dropdown-search.styles.d.ts +0 -0
- package/{dist/shared → shared}/dropdown-list/types.d.ts +0 -0
- package/{dist/spec → spec}/color-spec/base-color-set.d.ts +0 -0
- package/{dist/spec → spec}/color-spec/bookingsg-color-set.d.ts +0 -0
- package/{dist/spec → spec}/media-spec.d.ts +0 -0
- package/{dist/spec → spec}/text-spec/base-text-style-set.d.ts +0 -0
- package/{dist/spec → spec}/text-spec/font-spec.d.ts +0 -0
- package/{dist/text → text}/helper.d.ts +0 -0
- package/{dist/text → text}/index.d.ts +0 -0
- package/{dist/text → text}/index.js +0 -0
- package/{dist/text → text}/index.js.map +0 -0
- package/{dist/text → text}/package.json +0 -0
- package/{dist/text → text}/text-style.d.ts +0 -0
- package/{dist/text → text}/text.d.ts +0 -0
- package/{dist/text → text}/types.d.ts +0 -0
- package/{dist/text-list → text-list}/index.d.ts +0 -0
- package/{dist/text-list → text-list}/index.js +0 -0
- package/{dist/text-list → text-list}/index.js.map +0 -0
- package/{dist/text-list → text-list}/ordered-list.d.ts +0 -0
- package/{dist/text-list → text-list}/package.json +0 -0
- package/{dist/text-list → text-list}/text-list.styles.d.ts +0 -0
- package/{dist/text-list → text-list}/types.d.ts +0 -0
- package/{dist/text-list → text-list}/unordered-list.d.ts +0 -0
- package/{dist/theme → theme}/color-theme-helper.d.ts +0 -0
- package/{dist/theme → theme}/helper.d.ts +0 -0
- package/{dist/theme → theme}/index.d.ts +0 -0
- package/{dist/theme → theme}/index.js +0 -0
- package/{dist/theme → theme}/index.js.map +0 -0
- package/{dist/theme → theme}/package.json +0 -0
- package/{dist/theme → theme}/text-theme-helper.d.ts +0 -0
- package/{dist/theme → theme}/types.d.ts +0 -0
- package/{dist/timeline → timeline}/index.d.ts +0 -0
- package/{dist/timeline → timeline}/index.js +0 -0
- package/{dist/timeline → timeline}/index.js.map +0 -0
- package/{dist/timeline → timeline}/package.json +0 -0
- package/{dist/timeline → timeline}/timeline.d.ts +0 -0
- package/{dist/timeline → timeline}/timeline.style.d.ts +0 -0
- package/{dist/timeline → timeline}/types.d.ts +0 -0
- package/{dist/timepicker → timepicker}/helper.d.ts +0 -0
- package/{dist/timepicker → timepicker}/index.d.ts +0 -0
- package/{dist/timepicker → timepicker}/index.js +0 -0
- package/{dist/timepicker → timepicker}/index.js.map +0 -0
- package/{dist/timepicker → timepicker}/package.json +0 -0
- package/{dist/timepicker → timepicker}/timepicker-dropdown.d.ts +0 -0
- package/{dist/timepicker → timepicker}/timepicker-dropdown.styles.d.ts +0 -0
- package/{dist/timepicker → timepicker}/timepicker.d.ts +0 -0
- package/{dist/timepicker → timepicker}/timepicker.styles.d.ts +0 -0
- package/{dist/timepicker → timepicker}/types.d.ts +0 -0
- package/{dist/toggle-button → toggle-button}/index.d.ts +0 -0
- package/{dist/toggle-button → toggle-button}/index.js +0 -0
- package/{dist/toggle-button → toggle-button}/index.js.map +0 -0
- package/{dist/toggle-button → toggle-button}/package.json +0 -0
- package/{dist/toggle-button → toggle-button}/toggle-button.d.ts +0 -0
- package/{dist/toggle-button → toggle-button}/toggle-button.styles.d.ts +0 -0
- package/{dist/toggle-button → toggle-button}/types.d.ts +0 -0
- package/{dist/tooltip → tooltip}/index.d.ts +0 -0
- package/{dist/tooltip → tooltip}/index.js +0 -0
- package/{dist/tooltip → tooltip}/index.js.map +0 -0
- package/{dist/tooltip → tooltip}/package.json +0 -0
- package/{dist/tooltip → tooltip}/tooltip-hoc.d.ts +0 -0
- package/{dist/tooltip → tooltip}/tooltip.d.ts +0 -0
- package/{dist/tooltip → tooltip}/tooltip.styles.d.ts +0 -0
- package/{dist/tooltip → tooltip}/types.d.ts +0 -0
- package/{dist/transition → transition}/index.d.ts +0 -0
- package/{dist/transition → transition}/index.js +0 -0
- package/{dist/transition → transition}/index.js.map +0 -0
- package/{dist/transition → transition}/package.json +0 -0
- package/{dist/util → util}/string-helper.d.ts +0 -0
- package/CONTRIBUTING.md +0 -175
- package/dist/README.md +0 -68
- package/dist/package.json +0 -35
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/{dist/shared → shared}/component-loading-spinner/component-loading-spinner.style.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
# Contributing
|
|
2
|
-
|
|
3
|
-
When contributing components, do discuss with the designers as well as the team managing this repository.
|
|
4
|
-
|
|
5
|
-
Do also adhere to the guidelines mentioned below.
|
|
6
|
-
|
|
7
|
-
- <a href="#contributor">As a contributor</a>
|
|
8
|
-
- <a href="#creating-branch">Creating a branch</a>
|
|
9
|
-
- <a href="#adding-components">Adding components</a>
|
|
10
|
-
- <a href="#previewing-components">Previewing components</a>
|
|
11
|
-
- <a href="#writing-stories">Writing stories</a>
|
|
12
|
-
- <a href="#pull-request">Creating pull requests</a>
|
|
13
|
-
- <a href="#repo-owner">As a repository owner</a>
|
|
14
|
-
- <a href="#versioning">Version Management</a>
|
|
15
|
-
- <a href="#documenting-change">Documenting change</a>
|
|
16
|
-
- <a href="#updating">How to update this library?</a>
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
<a id="contributor"></a>
|
|
21
|
-
|
|
22
|
-
## As a contributor
|
|
23
|
-
|
|
24
|
-
<a id="creating-branch"></a>
|
|
25
|
-
<br />
|
|
26
|
-
|
|
27
|
-
### **1. Creating a branch**
|
|
28
|
-
|
|
29
|
-
Now that you are starting off, first create a branch following these conventions:
|
|
30
|
-
|
|
31
|
-
- If you have a ticket, `<ticket_num>-a-short-description` (e.g. `MOL-1234-fix-navbar`)
|
|
32
|
-
- If you do not have a ticket, `just-a-short-description` (e.g. `fix-navbar`)
|
|
33
|
-
|
|
34
|
-
> Note that branches are to be created in kebab-case
|
|
35
|
-
|
|
36
|
-
<a id="adding-components"></a>
|
|
37
|
-
<br />
|
|
38
|
-
|
|
39
|
-
### **2. Adding components**
|
|
40
|
-
|
|
41
|
-
Components are to be added in the `src/components` directory in a structure like this
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
├── src
|
|
45
|
-
├── __tests__
|
|
46
|
-
└── components
|
|
47
|
-
├── component-name
|
|
48
|
-
│ ├── component-name.tsx
|
|
49
|
-
│ ├── component-name.styles.tsx
|
|
50
|
-
│ ├── index.tsx
|
|
51
|
-
│ └── types.ts
|
|
52
|
-
└── dir-2
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Where
|
|
56
|
-
|
|
57
|
-
- `component-name.tsx` contains the component src
|
|
58
|
-
- `component-name.styles.tsx` contains the styled components of the component
|
|
59
|
-
- `index.ts` the exportable file of the component which should be re-exported in the `src/components/index.ts`
|
|
60
|
-
- `types.ts` the type definitions which should be re-exported in the `src/components/types.ts`
|
|
61
|
-
|
|
62
|
-
Tests files will sit in the `__tests__` folder bearing the same folder name as the component.
|
|
63
|
-
|
|
64
|
-
> File and folder structure are in `kebab-case`
|
|
65
|
-
|
|
66
|
-
<a id="previewing-components"></a>
|
|
67
|
-
<br />
|
|
68
|
-
|
|
69
|
-
### **3. Previewing components**
|
|
70
|
-
|
|
71
|
-
You can preview the components you have created via Storybook.
|
|
72
|
-
|
|
73
|
-
Run Storybook
|
|
74
|
-
|
|
75
|
-
> `npm run storybook`
|
|
76
|
-
|
|
77
|
-
If the web page does not load automatically, you may go to this url
|
|
78
|
-
|
|
79
|
-
> `http://localhost:6006`
|
|
80
|
-
|
|
81
|
-
<a id="writing-stories"></a>
|
|
82
|
-
<br />
|
|
83
|
-
|
|
84
|
-
### **4. Writing stories**
|
|
85
|
-
|
|
86
|
-
It is very important to provide enough information for potential users to understand and use the components.
|
|
87
|
-
|
|
88
|
-
Some principles include:
|
|
89
|
-
|
|
90
|
-
- Properly describing and documenting your props
|
|
91
|
-
- If need, create a Usage document for advanced usages
|
|
92
|
-
- Have enough examples and provide controls only if deemed necessary/logical
|
|
93
|
-
|
|
94
|
-
<a id="pull-request"></a>
|
|
95
|
-
<br />
|
|
96
|
-
|
|
97
|
-
### **5. Creating pull requests**
|
|
98
|
-
|
|
99
|
-
Once you have committed and pushed your code, you are to create a pull request to have it approved to be in the `master` branch.
|
|
100
|
-
|
|
101
|
-
Simply create a pull request with a meaningful title and description of the change. This will be used in the `Changelog` document when the code owner publishes a new version.
|
|
102
|
-
|
|
103
|
-
An example of a good title is
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
Add a new event handler prop for <ComponentName>
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Some of the changes could result in some breaking changes or things to note for users of the component. You can add the `[WARNING]` or `[BREAKING]` indicator so that the repository owner can help indicate these in the `Changelog` document.
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
[BREAKING] Rename `data` prop for <ComponentName> for better clarity
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
<a id="repo-owner"></a>
|
|
118
|
-
<br />
|
|
119
|
-
|
|
120
|
-
## As a repository owner
|
|
121
|
-
|
|
122
|
-
<a id="versioning"></a>
|
|
123
|
-
<br />
|
|
124
|
-
|
|
125
|
-
### **1. Version management**
|
|
126
|
-
|
|
127
|
-
The design system follows a **canary release system**. This allows us to test new features/fixes before we roll out the official version to the other users. The version tags are as such:
|
|
128
|
-
|
|
129
|
-
- `canary` v6.0.1-canary.1
|
|
130
|
-
- `stable` v6.0.1
|
|
131
|
-
|
|
132
|
-
In terms of versioning, you may follow the guidelines as such:
|
|
133
|
-
|
|
134
|
-
- If it is breaking change (not backward compatible), increase the major version (e.g. `x.0.0`)
|
|
135
|
-
- If it is a regular enhancement, increase the minor version (e.g. `6.x.0`)
|
|
136
|
-
- If it is a bug fix, increase thepatch version (e.g. `6.1.x`)
|
|
137
|
-
|
|
138
|
-
<a id="documenting-change"></a>
|
|
139
|
-
<br />
|
|
140
|
-
|
|
141
|
-
### **2. Documenting change**
|
|
142
|
-
|
|
143
|
-
Like all libraries, documenting changes are extremely important for users to note of the changes being made in the code. This is done in `CHANGELOG.md`. Some principles include:
|
|
144
|
-
|
|
145
|
-
- Indicate version number and date of release
|
|
146
|
-
- State the type if it is `Fixes` or `Changes`
|
|
147
|
-
- State purpose clearly. Indicate if it is Breaking change by indicating the tag `[BREAKING]`
|
|
148
|
-
- If you would warn users of the change you can indicate using the tag `[WARNING]`
|
|
149
|
-
|
|
150
|
-
Here is an example of the changelog entry
|
|
151
|
-
|
|
152
|
-
```markdown
|
|
153
|
-
## v6.0.1-canary.1 (27 June, 2022)
|
|
154
|
-
|
|
155
|
-
### Changes
|
|
156
|
-
|
|
157
|
-
- Introduce `Masonry` component
|
|
158
|
-
|
|
159
|
-
### Fixes
|
|
160
|
-
|
|
161
|
-
- Fix fonts not being accessible on `index.css` of library
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
#### **Updating the version in storybook**
|
|
165
|
-
|
|
166
|
-
As we have a Storybook documentation to document the components, it is required to also update the `VersionTag` component's `currentStable` prop in `src/stories/intro/intro-stories.mdx`. The beta will always reference the `package.json` version. So your job is just to indicate the stable version.
|
|
167
|
-
|
|
168
|
-
<a id="updating"></a>
|
|
169
|
-
<br />
|
|
170
|
-
|
|
171
|
-
### **3. How to update this library?**
|
|
172
|
-
|
|
173
|
-
1. Create a branch with a signature as such `bump-v6.0.1-canary.1`
|
|
174
|
-
2. Update the `CHANGELOG.md`
|
|
175
|
-
3. Create a pull request to have it merged
|
package/dist/README.md
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# LifeSG React Design System
|
|
2
|
-
|
|
3
|
-
A React component library for LifeSG and BookingSG related products.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
npm i @lifesg/react-design-system
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
<br />
|
|
12
|
-
|
|
13
|
-
## Getting Started
|
|
14
|
-
|
|
15
|
-
The module requires some custom css for certain components to work properly. As the module does not ship with css, you will need to add this into the `head` of your html file.
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
<link
|
|
19
|
-
rel="stylesheet"
|
|
20
|
-
type="text/css"
|
|
21
|
-
href="https://assets.life.gov.sg/react-design-system/css/main.css"
|
|
22
|
-
/>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Or if you are importing to an existing css file
|
|
26
|
-
|
|
27
|
-
```css
|
|
28
|
-
@import url("https://assets.life.gov.sg/react-design-system/css/main.css");
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
<br />
|
|
32
|
-
|
|
33
|
-
## Setting up the theme
|
|
34
|
-
|
|
35
|
-
If you are intending to make use of the themes, you will need [**Styled Components**](https://styled-components.com/docs).
|
|
36
|
-
|
|
37
|
-
Styled components provide us with the `ThemeProvider` which you could make use of.
|
|
38
|
-
|
|
39
|
-
```tsx
|
|
40
|
-
// app.tsx
|
|
41
|
-
import { ThemeProvider } from "styled-components";
|
|
42
|
-
import { BaseTheme } from "@lifesg/react-design-system/theme";
|
|
43
|
-
import { Component } from "./index";
|
|
44
|
-
|
|
45
|
-
const App = () => {
|
|
46
|
-
return (
|
|
47
|
-
<ThemeProvider theme={BaseTheme}>
|
|
48
|
-
<Component />
|
|
49
|
-
</ThemeProvider>
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export default App;
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
For more information on the usage of themes, you can visit our [documentation](https://designsystem.life.gov.sg/react/index.html?path=/docs/getting-started-themes--page) about it.
|
|
57
|
-
|
|
58
|
-
<br />
|
|
59
|
-
|
|
60
|
-
## Importing the components
|
|
61
|
-
|
|
62
|
-
```tsx
|
|
63
|
-
// Efficient manner
|
|
64
|
-
import { Button } from "@lifesg/react-design-system/button";
|
|
65
|
-
|
|
66
|
-
// Less ideal manner
|
|
67
|
-
import { Button } from "@lifesg/react-design-system";
|
|
68
|
-
```
|
package/dist/package.json
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@lifesg/react-design-system",
|
|
3
|
-
"version": "1.0.0-alpha.1",
|
|
4
|
-
"description": "A component design system for LifeSG web apps",
|
|
5
|
-
"main": "./cjs/index.js",
|
|
6
|
-
"module": "./index.js",
|
|
7
|
-
"typings": "./index.d.ts",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/LifeSG/react-design-system.git"
|
|
11
|
-
},
|
|
12
|
-
"publishConfig": {
|
|
13
|
-
"registry": "https://npm.pkg.github.com"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"design-system"
|
|
17
|
-
],
|
|
18
|
-
"author": "LifeSG",
|
|
19
|
-
"license": "ISC",
|
|
20
|
-
"bugs": {
|
|
21
|
-
"url": "https://github.com/LifeSG/react-design-system/issues"
|
|
22
|
-
},
|
|
23
|
-
"homepage": "https://github.com/LifeSG/react-design-system#readme",
|
|
24
|
-
"peerDependencies": {
|
|
25
|
-
"react": "^17.0.2 || ^18.0.0",
|
|
26
|
-
"react-dom": "^17.0.2 || ^18.0.0",
|
|
27
|
-
"styled-components": "^5.3.5"
|
|
28
|
-
},
|
|
29
|
-
"lint-staged": {
|
|
30
|
-
"*.ts{x}": [
|
|
31
|
-
"eslint --fix"
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
"private": false
|
|
35
|
-
}
|