@nimbus-ds/toast 2.4.0-rc.2 → 2.4.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/CHANGELOG.md +10 -0
- package/dist/CHANGELOG.md +106 -0
- package/dist/README.md +64 -0
- package/dist/index.js +1 -0
- package/package.json +7 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
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
4
|
|
|
5
|
+
## 2025-03-18 `2.4.0`
|
|
6
|
+
|
|
7
|
+
#### 🎉 New features
|
|
8
|
+
|
|
9
|
+
- Adds `use-client` directive to the build output in order to support NextJS applications. ([#276](https://github.com/TiendaNube/nimbus-design-system/pull/276) by [@joacotornello](https://github.com/joacotornello))
|
|
10
|
+
|
|
11
|
+
### 💡 Others
|
|
12
|
+
|
|
13
|
+
- Rebuild after build process changes to add support for modular imports and Server Components. ([#276](https://github.com/TiendaNube/nimbus-design-system/pull/276) by [@joacotornello](https://github.com/joacotornello))
|
|
14
|
+
|
|
5
15
|
## 2024-03-18 `2.3.1`
|
|
6
16
|
|
|
7
17
|
### 🐛 Bug fixes
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
## 2025-03-18 `2.4.0`
|
|
6
|
+
|
|
7
|
+
#### 🎉 New features
|
|
8
|
+
|
|
9
|
+
- Adds `use-client` directive to the build output in order to support NextJS applications. ([#276](https://github.com/TiendaNube/nimbus-design-system/pull/276) by [@joacotornello](https://github.com/joacotornello))
|
|
10
|
+
|
|
11
|
+
### 💡 Others
|
|
12
|
+
|
|
13
|
+
- Rebuild after build process changes to add support for modular imports and Server Components. ([#276](https://github.com/TiendaNube/nimbus-design-system/pull/276) by [@joacotornello](https://github.com/joacotornello))
|
|
14
|
+
|
|
15
|
+
## 2024-03-18 `2.3.1`
|
|
16
|
+
|
|
17
|
+
### 🐛 Bug fixes
|
|
18
|
+
|
|
19
|
+
- 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))
|
|
20
|
+
|
|
21
|
+
## 2023-03-13 `2.3.0`
|
|
22
|
+
|
|
23
|
+
### 💡 Others
|
|
24
|
+
|
|
25
|
+
- 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))
|
|
26
|
+
- Refactored style classes to have more semantic names. ([#110](https://github.com/TiendaNube/nimbus-design-system/pull/110) by [@juniorconquista](https://github.com/juniorconquista))
|
|
27
|
+
|
|
28
|
+
## 2023-02-23 `2.2.0`
|
|
29
|
+
|
|
30
|
+
### 🎉 New features
|
|
31
|
+
|
|
32
|
+
- Added server side-rendering support to component. ([#105](https://github.com/TiendaNube/nimbus-design-system/pull/105) by [@juniorconquista](https://github.com/juniorconquista))
|
|
33
|
+
|
|
34
|
+
## 2023-02-16 `2.1.0`
|
|
35
|
+
|
|
36
|
+
### 🎉 New features
|
|
37
|
+
|
|
38
|
+
- 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))
|
|
39
|
+
|
|
40
|
+
### 📚 3rd party library updates
|
|
41
|
+
|
|
42
|
+
- Removed `@tiendanube/icons@0.3.1`. ([#94](https://github.com/TiendaNube/nimbus-design-system/pull/#94) by [@juniorconquista](https://github.com/juniorconquista))
|
|
43
|
+
|
|
44
|
+
## 2022-12-22 `2.0.0`
|
|
45
|
+
|
|
46
|
+
### 💡 Others
|
|
47
|
+
|
|
48
|
+
- 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))
|
|
49
|
+
|
|
50
|
+
## 2022-12-16 `1.5.1`
|
|
51
|
+
|
|
52
|
+
### 🎉 New features
|
|
53
|
+
|
|
54
|
+
- Update color rules. ([#67](https://github.com/TiendaNube/nimbus-design-system/pull/67) by [@juanchigallego](https://github.com/juanchigallego))
|
|
55
|
+
|
|
56
|
+
## 2022-12-07 `1.5.0`
|
|
57
|
+
|
|
58
|
+
### 🎉 New features
|
|
59
|
+
|
|
60
|
+
- 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))
|
|
61
|
+
|
|
62
|
+
### 📚 3rd party library updates
|
|
63
|
+
|
|
64
|
+
- Removed `terser-webpack-plugin@5.3.5`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
65
|
+
- Removed `ts-loader@9.3.1`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
66
|
+
- Removed `webpack-cli@4.10.0`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
67
|
+
- Removed `webpack@5.74.0`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
68
|
+
- Removed `typescript@4.7.4`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
69
|
+
|
|
70
|
+
## 2022-11-18 `1.3.0`
|
|
71
|
+
|
|
72
|
+
### 📚 3rd party library updates
|
|
73
|
+
|
|
74
|
+
- Updated `@tiendanube/icons@0.3.1`. ([#57](https://github.com/TiendaNube/nimbus-design-system/pull/#57) by [@juniorconquista](https://github.com/juniorconquista))
|
|
75
|
+
|
|
76
|
+
## 2022-10-01 `1.2.0`
|
|
77
|
+
|
|
78
|
+
### 🎉 New features
|
|
79
|
+
|
|
80
|
+
- Added displayName to component `Toast`. ([#34](https://github.com/TiendaNube/nimbus-design-system/pull/34) by [@juniorconquista](https://github.com/juniorconquista))
|
|
81
|
+
- Added displayName to component `ToastProvider`. ([#34](https://github.com/TiendaNube/nimbus-design-system/pull/34) by [@juniorconquista](https://github.com/juniorconquista))
|
|
82
|
+
|
|
83
|
+
## 2022-09-24 `1.1.0`
|
|
84
|
+
|
|
85
|
+
### 💡 Others
|
|
86
|
+
|
|
87
|
+
- 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))
|
|
88
|
+
- 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))
|
|
89
|
+
|
|
90
|
+
## 2022-09-21 `1.0.0`
|
|
91
|
+
|
|
92
|
+
### 📚 3rd party library updates
|
|
93
|
+
|
|
94
|
+
- Added `terser-webpack-plugin@5.3.5`. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
95
|
+
- Added `ts-loader@9.3.1`. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
96
|
+
- Added `typescript@4.7.4`. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
97
|
+
- Added `webpack@5.74.0`. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
98
|
+
- Added `webpack-cli@4.10.0`. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
99
|
+
|
|
100
|
+
### 🎉 New features
|
|
101
|
+
|
|
102
|
+
- 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))
|
|
103
|
+
- Added stories on Component. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
104
|
+
- Created new `ToastProvider` subcomponent. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
105
|
+
- Created new `ToastContext` context to use `ToastProvider`. ([#27](https://github.com/TiendaNube/nimbus-design-system/pull/27) by [@juniorconquista](https://github.com/juniorconquista))
|
|
106
|
+
- 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/dist/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/spinner"),require("@nimbus-ds/text"),require("@nimbus-ds/icon"),require("@nimbus-ds/icons"),require("@nimbus-ds/styles")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/spinner","@nimbus-ds/text","@nimbus-ds/icon","@nimbus-ds/icons","@nimbus-ds/styles"],t):"object"==typeof exports?exports["@nimbus-ds/toast"]=t(require("react"),require("@nimbus-ds/spinner"),require("@nimbus-ds/text"),require("@nimbus-ds/icon"),require("@nimbus-ds/icons"),require("@nimbus-ds/styles")):e["@nimbus-ds/toast"]=t(e.react,e["@nimbus-ds/spinner"],e["@nimbus-ds/text"],e["@nimbus-ds/icon"],e["@nimbus-ds/icons"],e["@nimbus-ds/styles"])}(global,((e,t,r,n,o,a)=>(()=>{"use strict";var s={965:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Toast=void 0;const n=r(769).__importStar(r(155)),o=r(50),a=r(526),s=r(208),i=r(809),u=r(367),c=r(711),l=r(337),f={primary:n.default.createElement(i.InfoCircleIcon,null),danger:n.default.createElement(i.ExclamationTriangleIcon,null),success:n.default.createElement(i.CheckCircleIcon,null),progress:n.default.createElement(i.CheckCircleIcon,null)},d=({className:e,style:t,type:r="primary",duration:i=4e3,position:l=0,autoClose:d=!0,id:p,text:y,..._})=>{const b=(0,n.useRef)(),v=(0,n.useRef)(),[m,h]=(0,n.useState)(!1),{closeToast:w}=(0,c.useToast)(),P=(0,n.useCallback)((()=>{h(!0),b.current=setInterval((()=>{h(!1),v.current=setTimeout((()=>{w(p)}),200)}),i)}),[h,w,p,i,b,v]);(0,n.useEffect)((()=>(d&&P(),()=>{clearInterval(b?.current),clearInterval(v?.current)})),[P,d]);const g=(0,n.useMemo)((()=>"progress"===r),[r]),T=(0,n.useMemo)((()=>m||!d),[d,m]),O=(0,n.useMemo)((()=>r.replace("progress","neutral")),[r]),j={primary:"primary-surface",success:"success-surface",danger:"danger-surface",neutral:"neutral-surface"};return n.default.createElement("div",{id:p,className:u.toast.classnames.appearance[r],style:{transform:T?`translateY(${-32*l}%)`:"translateY(300%)"},"data-testid":"toast-element",..._},!g&&n.default.createElement(s.Icon,{"data-testid":`toast-icon-${O}`,color:j[O],source:f[r]}),g&&n.default.createElement(o.Spinner,{"data-testid":`toast-spinner-${O}`,color:"neutral-surface",size:"small"}),n.default.createElement(a.Text,{color:j[O],fontSize:"caption",lineHeight:"caption"},y))};t.Toast=d,d.Provider=l.ToastProvider,d.displayName="Toast",d.Provider.displayName="Toast.Provider"},102:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToastProvider=void 0;const n=r(769).__importStar(r(155)),o=r(367),a=r(373),s=r(965),i=r(930),u=({children:e})=>{const[t,r]=n.default.useState([]),u=(0,n.useCallback)((({id:e,...t})=>{r((r=>[...r,{...t,id:e||(0,i.uniqueId)()}]))}),[]),c=(0,n.useCallback)((e=>{r((t=>t.filter((t=>t.id!==e))))}),[]),l=(0,n.useMemo)((()=>({closeToast:c,addToast:u})),[c,u]);return n.default.createElement(a.ToastContext.Provider,{value:l},e,n.default.createElement("div",{className:o.toast.classnames.container},t.map(((e,t)=>n.default.createElement(s.Toast,{key:e.id,position:t,...e})))))};t.ToastProvider=u,u.displayName="ToastProvider"},68:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToastProvider=void 0;const n=r(102);var o=r(102);Object.defineProperty(t,"ToastProvider",{enumerable:!0,get:function(){return o.ToastProvider}}),t.default=n.ToastProvider},930:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueId=void 0;t.uniqueId=()=>`${Math.floor(Math.random()*Date.now()+1)}`},337:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});r(769).__exportStar(r(68),t)},964:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToastContext=void 0;const n=r(155);t.ToastContext=(0,n.createContext)({})},864:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToastContext=void 0;const n=r(964);var o=r(964);Object.defineProperty(t,"ToastContext",{enumerable:!0,get:function(){return o.ToastContext}}),t.default=n.ToastContext},373:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});r(769).__exportStar(r(864),t)},711:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useToast=void 0;var n=r(194);Object.defineProperty(t,"useToast",{enumerable:!0,get:function(){return n.useToast}})},194:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useToast=void 0;var n=r(874);Object.defineProperty(t,"useToast",{enumerable:!0,get:function(){return n.useToast}})},874:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useToast=void 0;const n=r(155),o=r(373);t.useToast=()=>(0,n.useContext)(o.ToastContext)},208:e=>{e.exports=n},809:e=>{e.exports=o},50:e=>{e.exports=t},367:e=>{e.exports=a},526:e=>{e.exports=r},155:t=>{t.exports=e},769:(e,t,r)=>{r.r(t),r.d(t,{__addDisposableResource:()=>D,__assign:()=>a,__asyncDelegator:()=>j,__asyncGenerator:()=>O,__asyncValues:()=>x,__await:()=>T,__awaiter:()=>y,__classPrivateFieldGet:()=>M,__classPrivateFieldIn:()=>q,__classPrivateFieldSet:()=>k,__createBinding:()=>b,__decorate:()=>i,__disposeResources:()=>A,__esDecorate:()=>c,__exportStar:()=>v,__extends:()=>o,__generator:()=>_,__importDefault:()=>I,__importStar:()=>C,__makeTemplateObject:()=>S,__metadata:()=>p,__param:()=>u,__propKey:()=>f,__read:()=>h,__rest:()=>s,__runInitializers:()=>l,__setFunctionName:()=>d,__spread:()=>w,__spreadArray:()=>g,__spreadArrays:()=>P,__values:()=>m,default:()=>F});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function i(e,t,r,n){var o,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(s=(a<3?o(s):a>3?o(t,r,s):o(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t,r,n,o,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var i,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,p=r.length-1;p>=0;p--){var y={};for(var _ in n)y[_]="access"===_?{}:n[_];for(var _ in n.access)y.access[_]=n.access[_];y.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var b=(0,r[p])("accessor"===u?{get:f.get,set:f.set}:f[c],y);if("accessor"===u){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(i=s(b.get))&&(f.get=i),(i=s(b.set))&&(f.set=i),(i=s(b.init))&&o.unshift(i)}else(i=s(b))&&("field"===u?o.unshift(i):f[c]=i)}l&&Object.defineProperty(l,n.name,f),d=!0}function l(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function d(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function p(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function y(e,t,r,n){return new(r||(r=Promise))((function(o,a){function s(e){try{u(n.next(e))}catch(e){a(e)}}function i(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,i)}u((n=n.apply(e,t||[])).next())}))}function _(e,t){var r,n,o,a,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,i[0]&&(s=0)),s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var b=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function v(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||b(t,e,r)}function m(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return s}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}function P(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var a=arguments[t],s=0,i=a.length;s<i;s++,o++)n[o]=a[s];return n}function g(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function T(e){return this instanceof T?(this.v=e,this):new T(e)}function O(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),a=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){a.push([e,t,r,n])>1||i(e,t)}))})}function i(e,t){try{(r=o[e](t)).value instanceof T?Promise.resolve(r.value.v).then(u,c):l(a[0][2],r)}catch(e){l(a[0][3],e)}var r}function u(e){i("next",e)}function c(e){i("throw",e)}function l(e,t){e(t),a.shift(),a.length&&i(a[0][0],a[0][1])}}function j(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:T(e[n](t)),done:!1}:o?o(t):t}:o}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=m(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var E=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&b(t,e,r);return E(t,e),t}function I(e){return e&&e.__esModule?e:{default:e}}function M(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function k(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function q(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function D(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var R="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function A(e){function t(t){e.error=e.hasError?new R(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,(function(e){return t(e),r()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}const F={__extends:o,__assign:a,__rest:s,__decorate:i,__param:u,__metadata:p,__awaiter:y,__generator:_,__createBinding:b,__exportStar:v,__values:m,__read:h,__spread:w,__spreadArrays:P,__spreadArray:g,__await:T,__asyncGenerator:O,__asyncDelegator:j,__asyncValues:x,__makeTemplateObject:S,__importStar:C,__importDefault:I,__classPrivateFieldGet:M,__classPrivateFieldSet:k,__classPrivateFieldIn:q,__addDisposableResource:D,__disposeResources:A}}},i={};function u(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return s[e](r,r.exports,u),r.exports}u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{var e=c;Object.defineProperty(e,"__esModule",{value:!0}),e.useToast=e.ToastProvider=e.Toast=void 0;const t=u(965);var r=u(965);Object.defineProperty(e,"Toast",{enumerable:!0,get:function(){return r.Toast}});var n=u(337);Object.defineProperty(e,"ToastProvider",{enumerable:!0,get:function(){return n.ToastProvider}});var o=u(711);Object.defineProperty(e,"useToast",{enumerable:!0,get:function(){return o.useToast}}),e.default=t.Toast})(),c})()));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nimbus-ds/toast",
|
|
3
|
-
"version": "2.4.0
|
|
3
|
+
"version": "2.4.0",
|
|
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.
|
|
18
|
-
"@nimbus-ds/icons": "^1.6.
|
|
19
|
-
"@nimbus-ds/spinner": "^3.1.0
|
|
20
|
-
"@nimbus-ds/text": "^6.
|
|
17
|
+
"@nimbus-ds/icon": "^3.0.1",
|
|
18
|
+
"@nimbus-ds/icons": "^1.6.1",
|
|
19
|
+
"@nimbus-ds/spinner": "^3.1.0",
|
|
20
|
+
"@nimbus-ds/text": "^6.3.1"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": "^16.8 || ^17.0 || ^18.0",
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"url": "https://github.com/TiendaNube/nimbus-design-system/issues"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@nimbus-ds/webpack": "^1.
|
|
36
|
-
}
|
|
37
|
-
"stableVersion": "2.3.1"
|
|
35
|
+
"@nimbus-ds/webpack": "^1.5.0"
|
|
36
|
+
}
|
|
38
37
|
}
|