@mobilestock-native/modalalert 0.0.6 → 0.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.
- package/index.js +21 -28
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -1,35 +1,28 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
background-color: ${({$type:x})
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
${({$type:x})=>o.css`
|
|
7
|
-
color: ${O.default.defineTextColor($.getBackgroundToTheme(x))};
|
|
1
|
+
"use strict";var _5=Object.create;var $=Object.defineProperty,t5=Object.defineProperties,a5=Object.getOwnPropertyDescriptor,l5=Object.getOwnPropertyDescriptors,e5=Object.getOwnPropertyNames,A=Object.getOwnPropertySymbols,i5=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var m=(x,_,t)=>_ in x?$(x,_,{enumerable:!0,configurable:!0,writable:!0,value:t}):x[_]=t,p=(x,_)=>{for(var t in _||(_={}))o.call(_,t)&&m(x,t,_[t]);if(A)for(var t of A(_))P.call(_,t)&&m(x,t,_[t]);return x},X=(x,_)=>t5(x,l5(_));var T=(x,_)=>{var t={};for(var e in x)o.call(x,e)&&_.indexOf(e)<0&&(t[e]=x[e]);if(x!=null&&A)for(var e of A(x))_.indexOf(e)<0&&P.call(x,e)&&(t[e]=x[e]);return t};var a=(x,_)=>()=>(_||x((_={exports:{}}).exports,_),_.exports),r5=(x,_)=>{for(var t in _)$(x,t,{get:_[t],enumerable:!0})},D=(x,_,t,e)=>{if(_&&typeof _=="object"||typeof _=="function")for(let r of e5(_))!o.call(x,r)&&r!==t&&$(x,r,{get:()=>_[r],enumerable:!(e=a5(_,r))||e.enumerable});return x};var n=(x,_,t)=>(t=x!=null?_5(i5(x)):{},D(_||!x||!x.__esModule?$(t,"default",{value:x,enumerable:!0}):t,x)),h5=x=>D($({},"__esModule",{value:!0}),x);var w=a((G5,$5)=>{$5.exports="./Poppins-JNHL4IDV.ttf"});var L=a((S5,n5)=>{n5.exports="./Arial-2OMNVK5Z.ttf"});var U=a((q5,d5)=>{d5.exports="./Exile-IEVVURNB.ttf"});var F=a((V5,A5)=>{A5.exports="./Poppins-Thin-MBJSJ55P.ttf"});var u=a((I5,H5)=>{H5.exports="./Poppins-ExtraLight-SEBPXBAV.ttf"});var N=a((f5,c5)=>{c5.exports="./Poppins-Light-RMQAEPUP.ttf"});var K=a((J5,s5)=>{s5.exports="./Poppins-Medium-UUWQX4EV.ttf"});var M=a((k5,o5)=>{o5.exports="./Poppins-SemiBold-TBISX6G2.ttf"});var b=a((O5,p5)=>{p5.exports="./Poppins-Bold-QAA2AGZS.ttf"});var B=a((Z5,X5)=>{X5.exports="./Poppins-ExtraBold-OVZKTNJI.ttf"});var R=a((W5,v5)=>{v5.exports="./Poppins-Black-U4YX6GHD.ttf"});var C=a((Q5,g5)=>{g5.exports="./Monocraft-ExtraLight-GLDH63ON.ttf"});var E=a((j5,m5)=>{m5.exports="./Monocraft-Light-DLZ6FRZW.ttf"});var y=a((z5,P5)=>{P5.exports="./Monocraft-WO7A2TJN.ttf"});var Y=a((xx,T5)=>{T5.exports="./Monocraft-SemiBold-Q46FFEQV.ttf"});var G=a((_x,D5)=>{D5.exports="./Monocraft-Bold-K74Y2QNP.ttf"});var S=a((tx,w5)=>{w5.exports="./Monocraft-Black-CI4CW4ZC.ttf"});var y5={};r5(y5,{ModalAlert:()=>M5});module.exports=h5(y5);var c=require("react"),W=require("react-native"),i=n(require("styled-components/native")),Q=require("@mobilestock-native/button"),s=require("@mobilestock-native/container"),j=require("@mobilestock-native/icons"),z=require("@mobilestock-native/spacer"),x5=require("@mobilestock-native/typography");var d=n(require("styled-components/native")),J=require("@mobilestock-native/container"),k=n(require("@mobilestock-native/tools")),O=require("@mobilestock-native/typography");var H=n(require("chroma-js")),I=n(require("@mobilestock-native/tools"));var V=require("@mobilestock-native/theme");var q=V.themeGlobal,{font:L5}=q,U5=T(q,["font"]),v=X(p({},U5),{font:X(p({},L5),{families:[{name:"Poppins",require:w(),weight:"regular"},{name:"Arial",require:L(),weight:"regular"},{name:"Exile",require:U(),weight:"regular"},{name:"Poppins-Thin",require:F(),weight:"thin"},{name:"Poppins-ExtraLight",require:u(),weight:"extraLight"},{name:"Poppins-Light",require:N(),weight:"light"},{name:"Poppins-Medium",require:K(),weight:"medium"},{name:"Poppins-SemiBold",require:M(),weight:"semiBold"},{name:"Poppins-Bold",require:b(),weight:"bold"},{name:"Poppins-ExtraBold",require:B(),weight:"extraBold"},{name:"Poppins-Black",require:R(),weight:"black"},{name:"Monocraft-ExtraLight",require:C(),weight:"extraLight"},{name:"Monocraft-Light",require:E(),weight:"light"},{name:"Monocraft",require:y(),weight:"regular"},{name:"Monocraft-SemiBold",require:Y(),weight:"semiBold"},{name:"Monocraft-Bold",require:G(),weight:"bold"},{name:"Monocraft-Black",require:S(),weight:"black"}]})});function f(x){return(0,H.default)(x).luminance()<.55?(0,H.default)(x).brighten(2.6).css():(0,H.default)(x).darken(1).css()}function F5(x){return I.default.defineTextColor(f(v.colors.alert[x.toLowerCase()]))}function u5(x){return v.colors.alert[x.toLowerCase()]}var h={defineBackgroundColor:f,modalTextColor:F5,getBackgroundToTheme:u5};var g=require("react/jsx-runtime");function Z(x){return(0,g.jsx)(N5,{$type:x.type,padding:"3XL",children:(0,g.jsx)(K5,{size:"LG",align:"CENTER",family:"POPPINS-BOLD",weight:"BOLD",$type:x.type,children:x.title})})}var N5=(0,d.default)(J.Container)`
|
|
2
|
+
background-color: ${({$type:x})=>h.getBackgroundToTheme(x)};
|
|
3
|
+
`,K5=(0,d.default)(O.Typography)`
|
|
4
|
+
${({$type:x})=>d.css`
|
|
5
|
+
color: ${k.default.defineTextColor(h.getBackgroundToTheme(x))};
|
|
8
6
|
`}
|
|
9
|
-
`;var
|
|
10
|
-
${({$type:x})=>x&&
|
|
11
|
-
background-color: ${
|
|
7
|
+
`;var l=require("react/jsx-runtime");function M5(x){let[_,t]=(0,c.useState)(x.visible);(0,c.useEffect)(()=>{t(x.visible)},[x.visible]);function e(){x.onClose&&x.onClose(),t(!1)}let r="AddCart";switch(x.type){case"ERROR_NOTICE":r="AlertCircle";break;case"FATAL_ERROR":r="AlertTriangle";break;case"SUCCESS":case"SUCCESS_NOTICE":r="CheckBold";break}return(0,l.jsxs)(W.Modal,{animationType:"slide",statusBarTranslucent:!0,visible:_,children:[!!x.title&&(0,l.jsx)(Z,{title:x.title,type:x.type}),(0,l.jsx)(B5,{$type:x.type,full:!0,padding:"NONE_2XS_XS_2XS",children:(0,l.jsx)(l.Fragment,{children:x.children?x.children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(s.Container,{align:"CENTER",full:!0,children:[(0,l.jsx)(E5,{name:r,size:"3XL",$type:x.type}),(0,l.jsx)(z.Spacer,{size:"3XL"}),(0,l.jsx)(C5,{align:"CENTER",size:"LG",$type:x.type,children:x.message})]}),(0,l.jsx)(R5,{padding:"NONE_2XS_XS_2XS",children:(0,l.jsx)(b5,{onPress:e,text:"Fechar",size:"LG",$type:x.type})})]})})})]})}var b5=(0,i.default)(Q.Button)`
|
|
8
|
+
${({$type:x})=>x&&i.css`
|
|
9
|
+
background-color: ${h.getBackgroundToTheme(x)};
|
|
12
10
|
`}
|
|
13
|
-
`,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
background-color: ${
|
|
18
|
-
`:n.css`
|
|
19
|
-
background-color: ${$.defineBackgroundColor($.getBackgroundToTheme(x))};
|
|
11
|
+
`,B5=(0,i.default)(s.Container)`
|
|
12
|
+
${({$type:x,theme:_})=>x==="SUCCESS_NOTICE"?i.css`
|
|
13
|
+
background-color: ${_.colors.container.default};
|
|
14
|
+
`:i.css`
|
|
15
|
+
background-color: ${h.defineBackgroundColor(h.getBackgroundToTheme(x))};
|
|
20
16
|
`}
|
|
21
|
-
`,
|
|
22
|
-
position:
|
|
17
|
+
`,R5=(0,i.default)(s.Container)`
|
|
18
|
+
position: relative;
|
|
23
19
|
bottom: 50px;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
`,B5=(0,n.default)(_5.Typography)`
|
|
28
|
-
${({$type:x})=>x&&n.css`
|
|
29
|
-
color: ${$.modalTextColor(x)};
|
|
20
|
+
`,C5=(0,i.default)(x5.Typography)`
|
|
21
|
+
${({$type:x})=>x&&i.css`
|
|
22
|
+
color: ${h.modalTextColor(x)};
|
|
30
23
|
`}
|
|
31
|
-
`,
|
|
32
|
-
${({$type:x})=>x&&
|
|
33
|
-
color: ${
|
|
24
|
+
`,E5=(0,i.default)(j.Icon)`
|
|
25
|
+
${({$type:x})=>x&&i.css`
|
|
26
|
+
color: ${h.modalTextColor(x)};
|
|
34
27
|
`}
|
|
35
28
|
`;0&&(module.exports={ModalAlert});
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mobilestock-native/modalalert",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@mobilestock-native/typography": "^0.0.7",
|
|
7
7
|
"@mobilestock-native/spacer": "^0.0.6",
|
|
8
|
-
"@mobilestock-native/
|
|
9
|
-
"@mobilestock-native/
|
|
8
|
+
"@mobilestock-native/button": "^1.0.6",
|
|
9
|
+
"@mobilestock-native/icons": "^0.0.5"
|
|
10
10
|
},
|
|
11
11
|
"peerDependencies": {
|
|
12
12
|
"react": "catalog",
|