@successtar/cogo-toast 5.0.5 → 5.0.7

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.
Files changed (3) hide show
  1. package/README.md +7 -7
  2. package/package.json +6 -5
  3. package/CHANGELOG.md +0 -126
package/README.md CHANGED
@@ -1,19 +1,19 @@
1
1
  <h2>Disclaimer:</h2>
2
- <p>This is a fork of Cogoport/cogo-toast with fixes for warnings in React <code>^18.x.x</code></p>
2
+ <p>This is a fork of Cogoport/cogo-toast with fixes for React <code>^18.x.x</code> and Above</p>
3
3
  <p align="center"><a href="https://cogoport.github.io/cogo-toast/" target="_blank"><img src="https://cogoport.github.io/cogo-toast/meta/android-chrome-96x96.png" alt="cogo-toast" title="cogo-toast" width="120"></a></p>
4
4
  <h1 align="center">Cogo Toast</h1>
5
5
  <p align="center" style="font-size: 1.2rem;">Beautiful, Zero Configuration, Toast Messages for React ~4kb gzip (with styles and icons)</p>
6
- <p align="center"><a href="https://cogoport.github.io/cogo-toast/">https://cogoport.github.io/cogo-toast/</a></p>
6
+ <p align="center"><a href="https://successtar.github.io/cogo-toast/">https://successtar.github.io/cogo-toast/</a></p>
7
7
 
8
8
  [![Dependencies](https://img.shields.io/david/Cogoport/cogo-toast.svg)](https://david-dm.org/Cogoport/cogo-toast.svg)
9
9
  [![npm package](https://img.shields.io/npm/v/@successtar/cogo-toast/latest.svg)](https://www.npmjs.com/package/@successtar/cogo-toast)
10
10
  [![Small size](https://img.badgesize.io/https://unpkg.com/cogo-toast/dist/index.js?compression=gzip)](https://unpkg.com/@successtar/cogo-toast/dist/index.js)
11
11
  [![npm downloads](https://img.shields.io/npm/dm/cogo-toast.svg)](https://www.npmjs.com/package/@successtar/cogo-toast)
12
12
  ![Code style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)
13
- [![License](https://img.shields.io/npm/l/@xstyled/styled-components.svg)](https://github.com/Cogoport/cogo-toast/blob/master/LICENSE)
13
+ [![License](https://img.shields.io/npm/l/@xstyled/styled-components.svg)](https://github.com/successtar/cogo-toast/blob/master/LICENSE)
14
14
 
15
15
  <p align="center">
16
- <a href="https://cogoport.github.io/cogo-toast/" target="_blank"><img src="docs/public/images/preview.gif" alt="cogo-toast-preview" title="cogo-toast-preview"></a>
16
+ <a href="https://successtar.github.io/cogo-toast/" target="_blank"><img src="docs/public/images/preview.gif" alt="cogo-toast-preview" title="cogo-toast-preview"></a>
17
17
  </p>
18
18
 
19
19
  ### Install via NPM:
@@ -30,7 +30,7 @@ yarn add @successtar/cogo-toast
30
30
 
31
31
  #### Note:
32
32
 
33
- The latest version `^5.0.0` is only compatible with React `^18.0.0`.
33
+ The latest version `^5.0.0` is only compatible with React `^18.0.0` and Above.
34
34
 
35
35
  To use this package in projects with React below `18.0.0`.
36
36
 
@@ -38,7 +38,7 @@ To use this package in projects with React below `18.0.0`.
38
38
  yarn add cogo-toast@4.2.3
39
39
  ```
40
40
 
41
- The version `^3.0.0` makes the use of React Hooks internally.
41
+ Version `^3.0.0` makes use of React Hooks internally.
42
42
 
43
43
  To use this package in projects that don't support hooks, use `v2.0.1` instead.
44
44
 
@@ -51,7 +51,7 @@ yarn add cogo-toast@2.0.1
51
51
  Its Plug and Play. No configuration required. Just import and you are good to go.
52
52
 
53
53
  ```javascript
54
- import cogoToast from 'cogo-toast';
54
+ import cogoToast from '@successtar/cogo-toast';
55
55
 
56
56
  cogoToast.success('This is a success message!');
57
57
  ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@successtar/cogo-toast",
3
- "description": "Beautiful, Zero Configuration, Toast Messages - Built with React (^18.2.0)",
4
- "version": "5.0.5",
3
+ "description": "Beautiful, Zero Configuration, Toast Messages - Built with React (^18.2.0 || ^19.0.0)",
4
+ "version": "5.0.7",
5
5
  "license": "MIT",
6
6
  "scripts": {
7
7
  "setup": "yarn install && cd docs && yarn install",
@@ -15,12 +15,13 @@
15
15
  "minify": "concurrently --kill-others-on-fail \"yarn run minify-cjs\" \"yarn run minify-es\"",
16
16
  "postbuild": "yarn run minify",
17
17
  "predeploy": "cd docs && yarn install && yarn run deploy",
18
- "deploy": "gh-pages -t -d docs/out"
18
+ "deploy": "gh-pages -t -d docs/out",
19
+ "test": "echo \"No test specified\""
19
20
  },
20
21
  "peerDependencies": {
21
22
  "prop-types": "^15.6.2",
22
- "react": "^18.2.0",
23
- "react-dom": "^18.2.0"
23
+ "react": "^18.2.0 || ^19.0.0",
24
+ "react-dom": "^18.2.0 || ^19.0.0"
24
25
  },
25
26
  "devDependencies": {
26
27
  "@babel/core": "7.9.6",
package/CHANGELOG.md DELETED
@@ -1,126 +0,0 @@
1
- ### Features
2
-
3
- - 5.0.1
4
-
5
- - Fix: ReactDOM.render warning in React 18.x.x
6
-
7
- - 4.2.3
8
-
9
- - Fix: install error at 4.2.2. #53
10
-
11
- - 4.2.2
12
-
13
- - Fix: useEffect not cancelling timeouts. #49
14
- - Switched from pnpm to yarn to manage package dependencies - Better community support.
15
-
16
- - 4.2.1
17
-
18
- - Fix: Heading and renderIcon not being passed to the toast component
19
-
20
- - 4.2.0
21
-
22
- - Refactored entire codebase to TypeScript.
23
- - Switched from yarn to pnpm to manage package dependencies.
24
- - Bundle Size reduced to 4 KB
25
- - No change to the package API or features. Everything should work as before.
26
-
27
- - 4.2.0-beta.0
28
-
29
- - Refactored entire codebase to TypeScript.
30
- - Switched from yarn to pnpm to manage package dependencies.
31
- - Bundle Size reduced to 4 KB
32
- - No change to the package API or features. Everything should work as before.
33
-
34
- - 4.1.3
35
-
36
- - Fixes #44 and #45
37
-
38
- - 4.1.1
39
-
40
- - Added missing types for 4.0, role, and toastContainerID. #35
41
-
42
- - 4.1.0
43
-
44
- - Added a new option `toastContainerID`. This enables specifying the id of the parent dom element, to which the toast is mounted as a child. #27
45
-
46
- - 4.0.0
47
-
48
- - Breaking Change
49
-
50
- - Hide the toast on Click
51
-
52
- Before:
53
-
54
- ```javascript
55
- cogoToast.success('This is a success message.', {
56
- onClick: (hide) => {
57
- hide();
58
- },
59
- };
60
- ```
61
-
62
- Now:
63
-
64
- ```javascript
65
- const { hide } = cogoToast.success('This is a success message.', {
66
- onClick: () => {
67
- hide();
68
- },
69
- };
70
- ```
71
-
72
- - Toast now always returns a promise, as opposed to before. See issue #28
73
-
74
- - Accesibilty - Added a role of `status` by default. Configurable via options. Thanks @balazsorban44.
75
-
76
- - v3.2.2
77
-
78
- - classnames added to each type of toast, to enable css overrides
79
-
80
- - v3.2.1
81
-
82
- - 3.2.0 Accidentally published a Non-Minified Build. 3.2.1 fixes this
83
-
84
- - v3.2.0
85
-
86
- - JSX Support:
87
-
88
- - Prop types fix when using React node instead of a text message.
89
- - JSX Usage added in the documentation.
90
-
91
- - v3.1.0
92
-
93
- - Ability to hide the toast immediately on click. `hide` function passed as a param in `onClick`.
94
-
95
- ```javascript
96
- cogoToast.success('This is a success message.', {
97
- onClick: (hide) => {
98
- hide();
99
- },
100
- });
101
- ```
102
-
103
- - v3.0.0
104
-
105
- - Major internal rewrite to remove ReactDOMServer dependency.
106
-
107
- - Using react hooks internally, so support for React versions before hooks is now dropped. Use `v2.0.1` if you want to use this library in versions before React@16.8 (pre-hooks)
108
-
109
- **Breaking:**
110
-
111
- - `icon` option changed to `renderIcon`, where you can pass a render function instead of a node. (Useful for Lazy Rendering)
112
- - Export for `create` function removed. `cogoToast()` works like create did before.
113
-
114
- - v2.0.1
115
-
116
- - Fix for top level typings declaration
117
-
118
- - v2.0.0
119
-
120
- - Custom styling is now supported. Just extend the css classes to specify your own styles. For all classnames, refer to [/src/styles.css](/src/styles.css)
121
-
122
- - Typescript typings added. Shout out to @sebastien-p
123
-
124
- - v1.0.7 - Internal dependencies and build system upgraded. No changes to the toast.
125
-
126
- - **cogoToast:** `cogoToast` is the root object of the containing of 5 functions, `success`, `info`, `loading`, `warn`, and `error`.