@popsure/dirty-swan 0.41.0 → 0.41.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/cjs/index.js +6 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/toast/index.js +1 -1
- package/dist/esm/components/toast/index.stories.js +5 -3
- package/dist/esm/components/toast/index.stories.js.map +1 -1
- package/dist/esm/components/toast/index.test.js +1 -1
- package/dist/esm/{index-eff726d3.js → index-45edc7d0.js} +7 -7
- package/dist/esm/index-45edc7d0.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
- package/src/lib/components/toast/index.stories.tsx +7 -2
- package/src/lib/components/toast/index.tsx +8 -4
- package/src/lib/components/toast/style.module.scss +9 -5
- package/dist/esm/index-eff726d3.js.map +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -36163,8 +36163,8 @@ var Toggle = function (_a) {
|
|
|
36163
36163
|
}) }), void 0));
|
|
36164
36164
|
};
|
|
36165
36165
|
|
|
36166
|
-
var css_248z = ".style-module_toastWrapper__1SC4C {\n margin: 0;\n padding: 0;\n}\n\n.style-module_toast__NY8bo {\n position: relative;\n margin: 0;\n width: 392px;\n overflow: hidden;\n padding:
|
|
36167
|
-
var styles = {"toastWrapper":"style-module_toastWrapper__1SC4C","toast":"style-module_toast__NY8bo","toastSidebar":"style-module_toastSidebar__NUxSa","toastSidebar--information":"style-module_toastSidebar--information__2nKT_","toastSidebar--error":"style-module_toastSidebar--error__15Vwo","toastSidebar--warning":"style-module_toastSidebar--warning__33N9y","toastSidebar--success":"style-module_toastSidebar--success__27652","closeButton":"style-module_closeButton__3S_5n","actionButton":"style-module_actionButton__3ziRG","actionButton--warning":"style-module_actionButton--warning__2I0LT","actionButton--error":"style-module_actionButton--error__1kJIR","actionButton--success":"style-module_actionButton--success__y96NI","actionButton--information":"style-module_actionButton--information__1oeAG"};
|
|
36166
|
+
var css_248z = ".style-module_toastWrapper__1SC4C {\n margin: 0;\n padding: 0;\n}\n\n.style-module_toast__NY8bo {\n position: relative;\n margin: 0;\n padding: 0;\n width: 392px;\n overflow: hidden;\n}\n\n.style-module_toastContent__3RHpU {\n padding: 4px 0 4px 8px;\n}\n\n.style-module_toastSidebar__NUxSa {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 8px;\n}\n.style-module_toastSidebar--information__2nKT_ {\n background-color: #8bb4ea;\n}\n.style-module_toastSidebar--error__15Vwo {\n background-color: #e55454;\n}\n.style-module_toastSidebar--warning__33N9y {\n background-color: #f7ce5c;\n}\n.style-module_toastSidebar--success__27652 {\n background-color: #84de8a;\n}\n\n.style-module_closeButton__3S_5n {\n background-color: transparent;\n color: #d2d2d8;\n min-width: 24px;\n}\n.style-module_closeButton__3S_5n:hover {\n color: #696970;\n}\n\n.style-module_actionButton__3ziRG {\n background-color: transparent;\n}\n.style-module_actionButton--warning__2I0LT {\n color: #cc9e21;\n}\n.style-module_actionButton--warning__2I0LT:hover {\n color: #4a3d10;\n}\n.style-module_actionButton--error__1kJIR {\n color: #e55454;\n}\n.style-module_actionButton--error__1kJIR:hover {\n color: #c64848;\n}\n.style-module_actionButton--success__y96NI {\n color: #599278;\n}\n.style-module_actionButton--success__y96NI:hover {\n color: #2b4639;\n}\n.style-module_actionButton--information__1oeAG {\n color: #5f7ba0;\n}\n.style-module_actionButton--information__1oeAG:hover {\n color: #2d394a;\n}";
|
|
36167
|
+
var styles = {"toastWrapper":"style-module_toastWrapper__1SC4C","toast":"style-module_toast__NY8bo","toastContent":"style-module_toastContent__3RHpU","toastSidebar":"style-module_toastSidebar__NUxSa","toastSidebar--information":"style-module_toastSidebar--information__2nKT_","toastSidebar--error":"style-module_toastSidebar--error__15Vwo","toastSidebar--warning":"style-module_toastSidebar--warning__33N9y","toastSidebar--success":"style-module_toastSidebar--success__27652","closeButton":"style-module_closeButton__3S_5n","actionButton":"style-module_actionButton__3ziRG","actionButton--warning":"style-module_actionButton--warning__2I0LT","actionButton--error":"style-module_actionButton--error__1kJIR","actionButton--success":"style-module_actionButton--success__y96NI","actionButton--information":"style-module_actionButton--information__1oeAG"};
|
|
36168
36168
|
styleInject(css_248z);
|
|
36169
36169
|
|
|
36170
36170
|
let e={data:""},t=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e,r=e=>{let r=t(e),l=r.data;return r.data="",l},l$1=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/| +/g,n$1=/\n+/g,o=(e,t)=>{let r="",l="",a="";for(let n in e){let c=e[n];"@"==n[0]?"i"==n[1]?r=n+" "+c+";":l+="f"==n[1]?o(c,n):n+"{"+o(c,"k"==n[1]?"":t)+"}":"object"==typeof c?l+=o(c,t?t.replace(/([^,])+/g,e=>n.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=o.p?o.p(n,c):n+":"+c+";");}return r+(t&&a?t+"{"+a+"}":a)+l},c={},s=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+s(e[r]);return t}return e},i=(e,t,r,i,p)=>{let u=s(e),d=c[u]||(c[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(u));if(!c[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l$1.exec(e.replace(a,""));)t[4]?o.shift():t[3]?(r=t[3].replace(n$1," ").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n$1," ").trim();return o[0]})(e);c[d]=o(p?{["@keyframes "+d]:t}:t,r?"":"."+d);}let f=r&&c.g?c.g:null;return r&&(c.g=c[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(c[d],t,i,f),d},p=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?"."+t:e&&"object"==typeof e?e.props?"":o(e,""):!1===e?"":e;}return e+l+(null==n?"":n)},"");function u$1(e){let r=this||{},l=e.call?e(r.p):e;return i(l.unshift?l.raw?p(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t(r.target),r.g,r.o,r.k)}let d,f$1,g,b$1=u$1.bind({g:1}),h$1=u$1.bind({k:1});function m(e,t,r,l){o.p=t,d=e,f$1=r,g=l;}function j$1(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f$1&&f$1()},c),r.o=/ *go\d+/.test(s),c.className=u$1.apply(r,l)+(s?" "+s:""),t&&(c.ref=o);let i=e;return e[0]&&(i=c.as||e,delete c.as),g&&i[0]&&g(c),d(i,c)}return t?t(a):a}}
|
|
@@ -36364,14 +36364,14 @@ var Toaster = function () { return (jsxRuntime.jsx(dist.Toaster, { toastOptions:
|
|
|
36364
36364
|
} }, void 0)); };
|
|
36365
36365
|
var Toast = function (_a) {
|
|
36366
36366
|
var action = _a.action, description = _a.description, onDismiss = _a.onDismiss, title = _a.title, _b = _a.type, type = _b === void 0 ? "success" : _b;
|
|
36367
|
-
return (jsxRuntime.jsxs("div", __assign({ className: 'd-flex jc-between w100' }, { children: [jsxRuntime.jsx("div", { className: classNames(styles.toastSidebar, styles["toastSidebar--" + type]) }, void 0),
|
|
36368
|
-
jsxRuntime.jsxs("div", __assign({ className: '
|
|
36367
|
+
return (jsxRuntime.jsxs("div", __assign({ className: classNames(styles.toastContent, 'd-flex jc-between w100') }, { children: [jsxRuntime.jsx("div", { className: classNames(styles.toastSidebar, styles["toastSidebar--" + type]) }, void 0),
|
|
36368
|
+
jsxRuntime.jsxs("div", __assign({ className: 'd-flex fd-column jc-center ta-left mr8' }, { children: [jsxRuntime.jsx("h4", __assign({ className: 'p-h4' }, { children: title }), void 0),
|
|
36369
36369
|
description && (jsxRuntime.jsx("p", __assign({ className: 'p-p p-p--small mt8 tc-grey-600' }, { children: description }), void 0)),
|
|
36370
|
-
action && (jsxRuntime.jsx("button", __assign({ className: classNames(styles.actionButton, styles["actionButton--" + type], 'mt8 c-pointer'), onClick: function () {
|
|
36370
|
+
action && (jsxRuntime.jsx("button", __assign({ className: classNames(styles.actionButton, styles["actionButton--" + type], 'mt8 c-pointer ta-left'), onClick: function () {
|
|
36371
36371
|
action.onClick();
|
|
36372
36372
|
onDismiss();
|
|
36373
36373
|
}, type: "button" }, { children: action.title }), void 0))] }), void 0),
|
|
36374
|
-
jsxRuntime.jsx("div", __assign({ className: 'd-flex ai-center' }, { children: jsxRuntime.jsx("button", __assign({ className: classNames(styles.closeButton, 'c-pointer'), onClick: onDismiss, "data-testid": "toast-close-button" }, { children: jsxRuntime.jsx(XIcon, {}, void 0) }), void 0) }), void 0)] }), void 0));
|
|
36374
|
+
jsxRuntime.jsx("div", __assign({ className: 'd-flex ai-center' }, { children: jsxRuntime.jsx("button", __assign({ className: classNames(styles.closeButton, 'c-pointer'), onClick: onDismiss, "data-testid": "toast-close-button" }, { children: jsxRuntime.jsx(XIcon, { size: 24 }, void 0) }), void 0) }), void 0)] }), void 0));
|
|
36375
36375
|
};
|
|
36376
36376
|
var toast = function (title, _a) {
|
|
36377
36377
|
var _b = _a.duration, duration = _b === void 0 ? 3000 : _b, toastOptions = __rest$1(_a, ["duration"]);
|