@mobilestockweb/modal 0.0.8 → 0.0.9

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 (2) hide show
  1. package/index.js +9 -36
  2. package/package.json +3 -4
package/index.js CHANGED
@@ -1,21 +1,21 @@
1
- "use strict";var v=Object.create;var l=Object.defineProperty,$=Object.defineProperties,z=Object.getOwnPropertyDescriptor,D=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,M=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var b=(o,e,t)=>e in o?l(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,m=(o,e)=>{for(var t in e||(e={}))c.call(e,t)&&b(o,t,e[t]);if(s)for(var t of s(e))C.call(e,t)&&b(o,t,e[t]);return o},f=(o,e)=>$(o,D(e));var w=(o,e)=>{var t={};for(var n in o)c.call(o,n)&&e.indexOf(n)<0&&(t[n]=o[n]);if(o!=null&&s)for(var n of s(o))e.indexOf(n)<0&&C.call(o,n)&&(t[n]=o[n]);return t};var B=(o,e)=>{for(var t in e)l(o,t,{get:e[t],enumerable:!0})},S=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of H(e))!c.call(o,a)&&a!==t&&l(o,a,{get:()=>e[a],enumerable:!(n=z(e,a))||n.enumerable});return o};var g=(o,e,t)=>(t=o!=null?v(M(o)):{},S(e||!o||!o.__esModule?l(t,"default",{value:o,enumerable:!0}):t,o)),I=o=>S(l({},"__esModule",{value:!0}),o);var F={};B(F,{default:()=>y});module.exports=I(F);var p=require("@mui/material"),T=require("react"),k=require("react-icons/md"),r=g(require("styled-components")),P=g(require("@mobilestockweb/button")),h=g(require("@mobilestockweb/tools"));var i=require("react/jsx-runtime"),G=(0,T.forwardRef)(function(e,t){return(0,i.jsx)(p.Slide,m({direction:"up",ref:t},e))});function y(o){let e=(0,r.useTheme)(),x=o,{visible:t,onClose:n,title:a,children:R,headerStyle:d}=x,u=w(x,["visible","onClose","title","children","headerStyle"]);return(0,i.jsxs)(J,f(m({fullScreen:!0,open:!!t,onClose:n,TransitionComponent:G},u),{children:[(0,i.jsxs)(N,{style:d,children:[a&&(0,i.jsx)(O,{children:typeof a=="string"?(0,i.jsx)(X,{$backgroundColor:(d==null?void 0:d.backgroundColor)||e.colors.header.background,children:a}):a}),n&&(0,i.jsx)(q,{$backgroundColor:(d==null?void 0:d.backgroundColor)||e.colors.header.background,"aria-label":"close",onClick:n,children:(0,i.jsx)(A,{})})]}),(0,i.jsx)(E,{}),(0,i.jsx)(j,f(m({},u),{children:R}))]}))}var J=(0,r.default)(p.Dialog)``,N=r.default.div`
1
+ "use strict";var v=Object.create;var a=Object.defineProperty,w=Object.defineProperties,D=Object.getOwnPropertyDescriptor,H=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,$=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var S=(e,o,t)=>o in e?a(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,c=(e,o)=>{for(var t in o||(o={}))f.call(o,t)&&S(e,t,o[t]);if(d)for(var t of d(o))h.call(o,t)&&S(e,t,o[t]);return e},m=(e,o)=>w(e,H(o));var T=(e,o)=>{var t={};for(var n in e)f.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&d)for(var n of d(e))o.indexOf(n)<0&&h.call(e,n)&&(t[n]=e[n]);return t};var M=(e,o)=>{for(var t in o)a(e,t,{get:o[t],enumerable:!0})},C=(e,o,t,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of N(o))!f.call(e,i)&&i!==t&&a(e,i,{get:()=>o[i],enumerable:!(n=D(o,i))||n.enumerable});return e};var b=(e,o,t)=>(t=e!=null?v($(e)):{},C(o||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)),z=e=>C(a({},"__esModule",{value:!0}),e);var j={};M(j,{default:()=>R});module.exports=z(j);var p=require("@mui/material"),x=require("react"),l=b(require("styled-components")),P=require("@mobilestockweb/button"),y=b(require("@mobilestockweb/tools"));var r=require("react/jsx-runtime"),A=(0,x.forwardRef)(function(o,t){return(0,r.jsx)(p.Slide,c({direction:"up",ref:t},o))});function R(e){let o=(0,l.useTheme)(),u=e,{visible:t,onClose:n,title:i,children:k,headerStyle:s}=u,g=T(u,["visible","onClose","title","children","headerStyle"]);return(0,r.jsxs)(B,m(c({fullScreen:!0,open:!!t,onClose:n,TransitionComponent:A},g),{children:[(0,r.jsxs)(E,{style:s,children:[i&&(0,r.jsx)(I,{children:typeof i=="string"?(0,r.jsx)(J,{$backgroundColor:(s==null?void 0:s.backgroundColor)||o.colors.header.background,children:i}):i}),n&&(0,r.jsx)(O,{icon:"X",variant:"TRANSPARENT","aria-label":"close",onClick:n})]}),(0,r.jsx)(G,{}),(0,r.jsx)(X,m(c({},g),{children:k}))]}))}var B=(0,l.default)(p.Dialog)``,E=l.default.div`
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  align-items: center;
5
- background-color: ${({theme:o})=>o.colors.header.background};
5
+ background-color: ${({theme:e})=>e.colors.header.background};
6
6
  min-height: 4rem;
7
7
  padding: 0 0.85rem;
8
8
  position: fixed;
9
9
  width: 100%;
10
10
  z-index: 1;
11
- `,E=r.default.div`
11
+ `,G=l.default.div`
12
12
  padding-top: 4rem;
13
- `,O=r.default.div`
13
+ `,I=l.default.div`
14
14
  display: flex;
15
15
  align-items: center;
16
- `,X=r.default.h3`
16
+ `,J=l.default.h3`
17
17
  font-family: 'Josefin Sans', sans-serif;
18
- color: ${({$backgroundColor:o})=>h.default.defineTextColor(o)};
18
+ color: ${({$backgroundColor:e})=>y.default.defineTextColor(e)};
19
19
  font-weight: 100;
20
20
  margin-left: 1rem;
21
21
  white-space: nowrap;
@@ -23,36 +23,9 @@
23
23
  @media (max-width: 325px) {
24
24
  font-size: 1.4rem;
25
25
  }
26
- `,j=r.default.div`
26
+ `,X=l.default.div`
27
27
  margin-top: 1rem;
28
28
  height: 100%;
29
- `,q=(0,r.default)(P.default)`
30
- background-color: transparent !important;
31
- color: ${({$backgroundColor:o})=>h.default.defineTextColor(o)};
32
- border: none;
33
- box-shadow: none !important;
34
- font-size: 0;
35
- padding: 0.5rem 1rem;
36
- margin: 0;
37
- min-width: 0;
38
- width: fit-content;
39
-
40
- @media (max-width: 325px) {
41
- padding: 0.5rem 0.6rem !important;
42
- }
43
- `,A=(0,r.default)(k.MdClose)`
44
- min-height: 1.9rem;
45
- min-width: 1.9rem;
46
-
47
- @media (max-width: 325px) {
48
- font-size: 2rem;
49
- width: 23px !important;
50
- height: 23px !important;
51
- }
52
-
53
- @media (min-width: 326px) {
54
- font-size: 1.8rem;
55
- width: 25px !important;
56
- height: 25px !important;
57
- }
29
+ `,O=(0,l.default)(P.Button)`
30
+ flex: 0;
58
31
  `;
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "@mobilestockweb/modal",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "@mui/material": "^6.1.10",
7
- "react-icons": "^5.3.0",
8
- "@mobilestockweb/button": "^0.0.11",
9
- "@mobilestockweb/tools": "^0.0.13"
7
+ "@mobilestockweb/button": "^1.0.0",
8
+ "@mobilestockweb/tools": "^0.0.14"
10
9
  },
11
10
  "peerDependencies": {
12
11
  "react": "18.2.0",