@nimbus-ds/toast 2.3.1-rc.9 → 2.4.0-rc.1
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/CHANGELOG.md +96 -0
- package/dist/README.md +64 -0
- package/package.json +7 -7
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
The Toast component allows us to notify users in an informational tone, describing that something has happened or is happening, without interrupting navigation.
|
|
4
|
+
|
|
5
|
+
## 2024-03-18 `2.3.1`
|
|
6
|
+
|
|
7
|
+
### 🐛 Bug fixes
|
|
8
|
+
|
|
9
|
+
- Fixed type bug on expected icon and text color values. ([#233](https://github.com/TiendaNube/nimbus-design-system/pull/233) by [@juanchigallego](https://github.com/juanchigallego))
|
|
10
|
+
|
|
11
|
+
## 2023-03-13 `2.3.0`
|
|
12
|
+
|
|
13
|
+
### 💡 Others
|
|
14
|
+
|
|
15
|
+
- Refactored use of `color tokens` in internal components by removing `.` per `-`. ([#110](https://github.com/TiendaNube/nimbus-design-system/pull/110) by [@juniorconquista](https://github.com/juniorconquista))
|
|
16
|
+
- Refactored style classes to have more semantic names. ([#110](https://github.com/TiendaNube/nimbus-design-system/pull/110) by [@juniorconquista](https://github.com/juniorconquista))
|
|
17
|
+
|
|
18
|
+
## 2023-02-23 `2.2.0`
|
|
19
|
+
|
|
20
|
+
### 🎉 New features
|
|
21
|
+
|
|
22
|
+
- Added server side-rendering support to component. ([#105](https://github.com/TiendaNube/nimbus-design-system/pull/105) by [@juniorconquista](https://github.com/juniorconquista))
|
|
23
|
+
|
|
24
|
+
## 2023-02-16 `2.1.0`
|
|
25
|
+
|
|
26
|
+
### 🎉 New features
|
|
27
|
+
|
|
28
|
+
- Removed external dependency from `@tiendanube/icons` package to now use internal `@nimbus-ds/icons` package. ([#94](https://github.com/TiendaNube/nimbus-design-system/pull/#94) by [@juniorconquista](https://github.com/juniorconquista))
|
|
29
|
+
|
|
30
|
+
### 📚 3rd party library updates
|
|
31
|
+
|
|
32
|
+
- Removed `@tiendanube/icons@0.3.1`. ([#94](https://github.com/TiendaNube/nimbus-design-system/pull/#94) by [@juniorconquista](https://github.com/juniorconquista))
|
|
33
|
+
|
|
34
|
+
## 2022-12-22 `2.0.0`
|
|
35
|
+
|
|
36
|
+
### 💡 Others
|
|
37
|
+
|
|
38
|
+
- Removed direct dependency on `nimbus-ds/styles` package from component build. ([#69](https://github.com/TiendaNube/nimbus-design-system/pull/69) by [@juniorconquista](https://github.com/juniorconquista))
|
|
39
|
+
|
|
40
|
+
## 2022-12-16 `1.5.1`
|
|
41
|
+
|
|
42
|
+
### 🎉 New features
|
|
43
|
+
|
|
44
|
+
- Update color rules. ([#67](https://github.com/TiendaNube/nimbus-design-system/pull/67) by [@juanchigallego](https://github.com/juanchigallego))
|
|
45
|
+
|
|
46
|
+
## 2022-12-07 `1.5.0`
|
|
47
|
+
|
|
48
|
+
### 🎉 New features
|
|
49
|
+
|
|
50
|
+
- Changed build build to consume inner package `@nimbus-ds/webpack`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
51
|
+
|
|
52
|
+
### 📚 3rd party library updates
|
|
53
|
+
|
|
54
|
+
- Removed `terser-webpack-plugin@5.3.5`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
55
|
+
- Removed `ts-loader@9.3.1`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
56
|
+
- Removed `webpack-cli@4.10.0`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
57
|
+
- Removed `webpack@5.74.0`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
58
|
+
- Removed `typescript@4.7.4`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
59
|
+
|
|
60
|
+
## 2022-11-18 `1.3.0`
|
|
61
|
+
|
|
62
|
+
### 📚 3rd party library updates
|
|
63
|
+
|
|
64
|
+
- Updated `@tiendanube/icons@0.3.1`. ([#57](https://github.com/TiendaNube/nimbus-design-system/pull/#57) by [@juniorconquista](https://github.com/juniorconquista))
|
|
65
|
+
|
|
66
|
+
## 2022-10-01 `1.2.0`
|
|
67
|
+
|
|
68
|
+
### 🎉 New features
|
|
69
|
+
|
|
70
|
+
- Added displayName to component `Toast`. ([#34](https://github.com/TiendaNube/nimbus-design-system/pull/34) by [@juniorconquista](https://github.com/juniorconquista))
|
|
71
|
+
- Added displayName to component `ToastProvider`. ([#34](https://github.com/TiendaNube/nimbus-design-system/pull/34) by [@juniorconquista](https://github.com/juniorconquista))
|
|
72
|
+
|
|
73
|
+
## 2022-09-24 `1.1.0`
|
|
74
|
+
|
|
75
|
+
### 💡 Others
|
|
76
|
+
|
|
77
|
+
- Adjusted `fontSize` size of internal `Text` component from `small` to `caption`. ([#29](https://github.com/TiendaNube/nimbus-design-system/pull/29) by [@juniorconquista](https://github.com/juniorconquista))
|
|
78
|
+
- Adjusted `lineHeight` size of internal `Text` component from `small` to `caption`. ([#29](https://github.com/TiendaNube/nimbus-design-system/pull/29) by [@juniorconquista](https://github.com/juniorconquista))
|
|
79
|
+
|
|
80
|
+
## 2022-09-21 `1.0.0`
|
|
81
|
+
|
|
82
|
+
### 📚 3rd party library updates
|
|
83
|
+
|
|
84
|
+
- Added `terser-webpack-plugin@5.3.5`. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
85
|
+
- Added `ts-loader@9.3.1`. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
86
|
+
- Added `typescript@4.7.4`. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
87
|
+
- Added `webpack@5.74.0`. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
88
|
+
- Added `webpack-cli@4.10.0`. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
89
|
+
|
|
90
|
+
### 🎉 New features
|
|
91
|
+
|
|
92
|
+
- Added `id`, `type`, `text`, `duration`, `autoClose` and `position` properties to the Component. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
93
|
+
- Added stories on Component. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
94
|
+
- Created new `ToastProvider` subcomponent. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
95
|
+
- Created new `ToastContext` context to use `ToastProvider`. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
96
|
+
- Created new `useToast` hook. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
package/dist/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# `@nimbus-ds/toast`
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@nimbus-ds/toast)
|
|
4
|
+
|
|
5
|
+
The Toast component allows us to notify users in an informational tone, describing that something has happened or is happening, without interrupting navigation.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
$ yarn add @nimbus-ds/toast
|
|
11
|
+
# or
|
|
12
|
+
$ npm install @nimbus-ds/toast
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Component Anatomy
|
|
16
|
+
|
|
17
|
+
The component consists of an icon and text, inside a box with a background and border stylized according to the possible states.
|
|
18
|
+
|
|
19
|
+
## Guidelines
|
|
20
|
+
|
|
21
|
+
We use this component to show informative, short and temporary notifications related to actions that have just taken place or are taking place, when there is no need to interrupt navigation or require interactions on other screens.
|
|
22
|
+
|
|
23
|
+
### Variants
|
|
24
|
+
|
|
25
|
+
- Primary - Used in neutral contexts, not associated with a positive or negative action;
|
|
26
|
+
- Success - Used in positive contexts, associated with actions performed successfully;
|
|
27
|
+
- Danger - Used in negative contexts, associated with processing or filling errors;
|
|
28
|
+
- Progress - Used in neutral contexts, associated with an action that is still in process and has no defined success or error status.
|
|
29
|
+
|
|
30
|
+
### Content
|
|
31
|
+
|
|
32
|
+
This component's text is limited to a maximum of 30 characters and its message should be short and concise, informing the user about something that just happened, right after the action was performed or while it was being processed.
|
|
33
|
+
|
|
34
|
+
The message must be written in the infinitive and with the following structure:
|
|
35
|
+
The action we just took (example: creating a product)
|
|
36
|
+
The result of the action (example: with success / with error)
|
|
37
|
+
|
|
38
|
+
### Presentation time
|
|
39
|
+
|
|
40
|
+
The presentation time can be customized according to the context in which the toast is applied, we must always take into account the number of characters following the suggestions below.
|
|
41
|
+
|
|
42
|
+
- 4 seconds - For messages with up to 10 characters;
|
|
43
|
+
- 8 seconds - For message with more than 10 characters;
|
|
44
|
+
- 16 seconds - For messages with more than 20 characters;
|
|
45
|
+
- Custom - Use restricted to toast progress.
|
|
46
|
+
|
|
47
|
+
### Recommendation for use
|
|
48
|
+
|
|
49
|
+
- Inform about unfilled fields in a form
|
|
50
|
+
- Inform about filling errors in forms
|
|
51
|
+
- Inform that there is a processing or upload taking place
|
|
52
|
+
- Inform what information was saved
|
|
53
|
+
- Inform that a systemic error has occurred
|
|
54
|
+
|
|
55
|
+
### Related components
|
|
56
|
+
|
|
57
|
+
- Alert - Can be used to notify the user in a timely manner about an important event that requires their action.
|
|
58
|
+
- Modal - Can be used to notify the user in an intrusive way, giving the possibility to make a decision based on something that just happened.
|
|
59
|
+
|
|
60
|
+
## Usage
|
|
61
|
+
|
|
62
|
+
View docs [here](https://nimbus.nuvemshop.com.br/documentation/atomic-components/toast).
|
|
63
|
+
|
|
64
|
+
<img alt="Nimbus" style="margin-bottom: 30px;" src="https://tiendanube.github.io/design-system-nimbus/static/media/nimbus-logo.ab60bd79.png" height="30" />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nimbus-ds/toast",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0-rc.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"version": "yarn version"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@nimbus-ds/icon": "^3.0.
|
|
18
|
-
"@nimbus-ds/icons": "^1.
|
|
19
|
-
"@nimbus-ds/spinner": "^3.0.
|
|
20
|
-
"@nimbus-ds/text": "^6.
|
|
17
|
+
"@nimbus-ds/icon": "^3.1.0-rc.5",
|
|
18
|
+
"@nimbus-ds/icons": "^1.7.0-rc.2",
|
|
19
|
+
"@nimbus-ds/spinner": "^3.1.0-rc.5",
|
|
20
|
+
"@nimbus-ds/text": "^6.4.0-rc.5"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": "^16.8 || ^17.0 || ^18.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"url": "https://github.com/TiendaNube/nimbus-design-system/issues"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@nimbus-ds/webpack": "^1.
|
|
35
|
+
"@nimbus-ds/webpack": "^1.5.0-rc.1"
|
|
36
36
|
},
|
|
37
|
-
"stableVersion": "2.3.
|
|
37
|
+
"stableVersion": "2.3.1"
|
|
38
38
|
}
|