@mobilestockweb/button 0.0.4 → 0.0.6

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 ADDED
@@ -0,0 +1,36 @@
1
+ "use strict";var C=Object.create;var i=Object.defineProperty,P=Object.defineProperties,S=Object.getOwnPropertyDescriptor,$=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,M=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var m=(t,o,e)=>o in t?i(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e,p=(t,o)=>{for(var e in o||(o={}))a.call(o,e)&&m(t,e,o[e]);if(s)for(var e of s(o))f.call(o,e)&&m(t,e,o[e]);return t},g=(t,o)=>P(t,$(o));var h=(t,o)=>{var e={};for(var n in t)a.call(t,n)&&o.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&s)for(var n of s(t))o.indexOf(n)<0&&f.call(t,n)&&(e[n]=t[n]);return e};var T=(t,o)=>{for(var e in o)i(t,e,{get:o[e],enumerable:!0})},B=(t,o,e,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of H(o))!a.call(t,r)&&r!==e&&i(t,r,{get:()=>o[r],enumerable:!(n=S(o,r))||n.enumerable});return t};var b=(t,o,e)=>(e=t!=null?C(M(t)):{},B(o||!t||!t.__esModule?i(e,"default",{value:t,enumerable:!0}):e,t)),v=t=>B(i({},"__esModule",{value:!0}),t);var k={};T(k,{default:()=>w});module.exports=v(k);var L=b(require("styled-components"));var x=require("@mui/material"),d=b(require("styled-components")),u=require("react/jsx-runtime");function y({isLoading:t,text:o,children:e}){switch(!0){case t:return(0,u.jsx)(A,{className:"circular"});case!!o:return(0,u.jsx)(N,{children:o});default:return e}}var A=(0,d.default)(x.CircularProgress)`
2
+ width: 1rem !important;
3
+ height: 1rem !important;
4
+ color: ${({theme:t})=>t.colors.text.default};
5
+ svg {
6
+ margin-right: 0;
7
+ }
8
+ `,N=d.default.span`
9
+ text-transform: uppercase;
10
+ `;var c=require("react/jsx-runtime");function w(r){var l=r,{isLoading:t,text:o,children:e}=l,n=h(l,["isLoading","text","children"]);return(0,c.jsx)(R,g(p({},n),{children:(0,c.jsx)(y,{isLoading:t,text:o,children:e})}))}var R=L.default.button`
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+
15
+ width: 100%;
16
+ min-height: 3rem;
17
+ padding: 0.9rem 1rem;
18
+
19
+ font-size: 0.9rem;
20
+ font-family: 'Open Sans', sans-serif;
21
+ font-weight: 400;
22
+
23
+ cursor: pointer;
24
+
25
+ box-shadow: 0 0.25rem 0.25rem ${({theme:t})=>t.colors.button.shadow};
26
+ border: none;
27
+ border-radius: 0.4rem;
28
+ background-color: ${({theme:t})=>t.colors.button.default};
29
+ color: ${({theme:t})=>t.colors.text.default};
30
+ &:hover {
31
+ opacity: 0.8;
32
+ }
33
+ &:disabled {
34
+ opacity: 0.7;
35
+ }
36
+ `;
package/package.json CHANGED
@@ -1,37 +1,11 @@
1
1
  {
2
2
  "name": "@mobilestockweb/button",
3
- "version": "0.0.4",
4
- "main": "./dist/index.js",
5
- "files": [
6
- "./dist/*"
7
- ],
8
- "exports": {
9
- ".": {
10
- "default": "./dist/index.js"
11
- }
12
- },
13
- "tsup": {
14
- "entry": [
15
- "src/index.tsx"
16
- ],
17
- "minify": true,
18
- "dts": true,
19
- "clean": true,
20
- "tsconfig": "../../../../../tsconfig.base.json",
21
- "external": [
22
- "react",
23
- "react-dom",
24
- "styled-components",
25
- "@mui/material"
26
- ]
27
- },
28
- "scripts": {
29
- "prepublishOnly": "tsup"
30
- },
3
+ "version": "0.0.6",
4
+ "main": "index.js",
31
5
  "peerDependencies": {
32
- "react": "*",
33
- "react-dom": "*",
34
- "styled-components": "*",
35
- "@mui/material": "*"
6
+ "react": "18.2.0",
7
+ "react-dom": "18.2.0",
8
+ "styled-components": "^6.1.8",
9
+ "@mui/material": "^6.1.10"
36
10
  }
37
11
  }
package/dist/index.js DELETED
@@ -1,42 +0,0 @@
1
- "use strict";var y=Object.create;var s=Object.defineProperty,B=Object.defineProperties,w=Object.getOwnPropertyDescriptor,L=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,v=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;var u=(t,r,o)=>r in t?s(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o,p=(t,r)=>{for(var o in r||(r={}))m.call(r,o)&&u(t,o,r[o]);if(i)for(var o of i(r))c.call(r,o)&&u(t,o,r[o]);return t},d=(t,r)=>B(t,L(r));var f=(t,r)=>{var o={};for(var e in t)m.call(t,e)&&r.indexOf(e)<0&&(o[e]=t[e]);if(t!=null&&i)for(var e of i(t))r.indexOf(e)<0&&c.call(t,e)&&(o[e]=t[e]);return o};var H=(t,r)=>{for(var o in r)s(t,o,{get:r[o],enumerable:!0})},g=(t,r,o,e)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of $(r))!m.call(t,n)&&n!==o&&s(t,n,{get:()=>r[n],enumerable:!(e=w(r,n))||e.enumerable});return t};var M=(t,r,o)=>(o=t!=null?y(v(t)):{},g(r||!t||!t.__esModule?s(o,"default",{value:t,enumerable:!0}):o,t)),P=t=>g(s({},"__esModule",{value:!0}),t);var T={};H(T,{default:()=>x});module.exports=P(T);var h=require("@mui/material"),b=M(require("styled-components"));var a=require("react/jsx-runtime");function x(n){var l=n,{isLoading:t,text:r,children:o}=l,e=f(l,["isLoading","text","children"]);return(0,a.jsx)(S,d(p({},e),{children:t?(0,a.jsx)(h.CircularProgress,{className:"circular"}):(0,a.jsx)("span",{className:"emphasis",children:r||o})}))}var S=b.default.button`
2
- display: flex;
3
- align-items: center;
4
- justify-content: center;
5
-
6
- width: 100%;
7
- min-height: 3rem;
8
- padding: 0.9rem 1rem;
9
-
10
- font-size: 0.9rem;
11
- font-family: 'Open Sans', sans-serif;
12
- font-weight: 400;
13
-
14
- cursor: pointer;
15
-
16
- box-shadow: 0 0.25rem 0.25rem ${({theme:t})=>t.colors.button.shadow};
17
- border: none;
18
- border-radius: 0.4rem;
19
- background-color: ${({theme:t})=>t.colors.button.default};
20
- color: ${({theme:t})=>t.colors.text.default};
21
- svg {
22
- font-size: 1.6rem;
23
- margin-right: 0.3rem;
24
- }
25
- &:hover {
26
- opacity: 0.8;
27
- }
28
- .emphasis {
29
- text-transform: uppercase;
30
- }
31
- .circular {
32
- width: 1rem !important;
33
- height: 1rem !important;
34
- color: ${({theme:t})=>t.colors.text.default};
35
- svg {
36
- margin-right: 0;
37
- }
38
- }
39
- &:disabled {
40
- opacity: 0.7;
41
- }
42
- `;
File without changes