Skip to content

Commit

Permalink
Fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan-Zayne committed Aug 26, 2024
1 parent 6288908 commit 18d66fd
Show file tree
Hide file tree
Showing 44 changed files with 12,758 additions and 373 deletions.
42 changes: 42 additions & 0 deletions dist/cjs/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
"use strict";var e,r=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,a=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,i=(e,r,a,i)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let p of l(r))d.call(e,p)||p===a||t(e,p,{get:()=>r[p],enumerable:!(i=o(r,p))||i.enumerable});return e},p=(e,o,l)=>(l=null!=e?r(a(e)):{},i(!o&&e&&e.__esModule?l:t(l,"default",{value:e,enumerable:!0}),e)),n={};((e,r)=>{for(var o in r)t(e,o,{get:r[o],enumerable:!0})})(n,{Button:()=>b,Input:()=>v}),module.exports=(e=n,i(t({},"__esModule",{value:!0}),e));var s=p(require("react"),1),u=p(require("styled-components"),1).default.button`
border: 0;
line-height: 1;
font-size: 15px;
cursor: pointer;
font-weight: 700;
font-weight: bold;
border-radius: 3px;
display: inline-block;
padding: ${e=>"small"===e.size?"7px 25px 8px":"medium"===e.size?"9px 30px 11px":"14px 30px 16px"};
color: ${e=>e.primary?"#1b116e":"#ffffff"};
background-color: ${e=>e.primary?"#6bedb5":"#1b116e"};
opacity: ${e=>e.disabled?.5:1};
&:hover {
background-color: ${e=>e.primary?"#55bd90":"#6bedb5"};
}
&:active {
border: solid 2px #1b116e;
padding: ${e=>"small"===e.size?"5px 23px 6px":"medium"===e.size?"7px 28px 9px":"12px 28px 14px"};
}
`,c=({size:e,primary:r,disabled:t,text:o,onClick:l,...a})=>s.default.createElement(u,{type:"button",onClick:l,primary:r,disabled:t,size:e,...a},o),b=c,f=p(require("react"),1),x=p(require("styled-components"),1),m=x.default.input`
height: 40px;
width: 300px;
border-radius: 3px;
border: solid 2px
${e=>e.disabled?"#e4e3ea":e.error?"#a9150b":e.success?"#067d68":"#353637"};
background-color: #fff;
&:focus {
border: solid 2px #1b116e;
}
`,g=x.default.div`
font-size: 14px;
color: ${e=>e.disabled?"#e4e3ea":"#080808"};
padding-bottom: 6px;
`,y=x.default.div`
font-size: 14px;
color: #a9150b8;
padding-top: 4px;
`,h=x.default.p`
margin: 0px;
color: ${e=>e.disabled?"#e4e3ea":e.error?"#a9150b":"#080808"};
`,O=({id:e,disabled:r,label:t,message:o,error:l,success:a,onChange:d,placeholder:i,...p})=>f.default.createElement(f.Fragment,null,f.default.createElement(g,null,f.default.createElement(h,{disabled:r,error:l},t)),f.default.createElement(m,{id:e,type:"text",onChange:d,disabled:r,error:l,success:a,placeholder:i,...p}),f.default.createElement(y,null,f.default.createElement(h,{error:l},o))),v=O;//# sourceMappingURL=index.cjs.map
1 change: 1 addition & 0 deletions dist/cjs/index.cjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
2 changes: 0 additions & 2 deletions dist/cjs/index.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/cjs/index.js.map

This file was deleted.

4 changes: 0 additions & 4 deletions dist/cjs/types/components/Button.d.ts

This file was deleted.

8 changes: 0 additions & 8 deletions dist/cjs/types/components/Button.types.d.ts

This file was deleted.

4 changes: 0 additions & 4 deletions dist/cjs/types/components/Button/Button.d.ts

This file was deleted.

8 changes: 0 additions & 8 deletions dist/cjs/types/components/Button/Button.types.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions dist/cjs/types/components/Button/index.d.ts

This file was deleted.

4 changes: 0 additions & 4 deletions dist/cjs/types/components/Input.d.ts

This file was deleted.

11 changes: 0 additions & 11 deletions dist/cjs/types/components/Input.types.d.ts

This file was deleted.

4 changes: 0 additions & 4 deletions dist/cjs/types/components/Input/Input.d.ts

This file was deleted.

11 changes: 0 additions & 11 deletions dist/cjs/types/components/Input/Input.types.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions dist/cjs/types/components/Input/index.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions dist/cjs/types/components/index.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/cjs/types/index.d.ts

This file was deleted.

26 changes: 26 additions & 0 deletions dist/esm/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React, { MouseEventHandler, ChangeEventHandler, FC } from 'react';

interface ButtonProps {
text?: string;
primary?: boolean;
disabled?: boolean;
size?: "small" | "medium" | "large";
onClick?: MouseEventHandler<HTMLButtonElement>;
}

declare const Button: React.FC<ButtonProps>;

interface InputProps {
id?: string;
label?: string;
error?: boolean;
message?: string;
success?: boolean;
disabled?: boolean;
placeholder?: string;
onChange?: ChangeEventHandler<HTMLInputElement>;
}

declare const Input: FC<InputProps>;

export { Button, Input };
44 changes: 42 additions & 2 deletions dist/esm/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,42 @@
import n,{Fragment as e}from"react";import r from"styled-components";var o=function(){return o=Object.assign||function(n){for(var e,r=1,o=arguments.length;r<o;r++)for(var t in e=arguments[r])Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n},o.apply(this,arguments)};function t(n,e){var r={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&e.indexOf(o)<0&&(r[o]=n[o]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(o=Object.getOwnPropertySymbols(n);t<o.length;t++)e.indexOf(o[t])<0&&Object.prototype.propertyIsEnumerable.call(n,o[t])&&(r[o[t]]=n[o[t]])}return r}function i(n,e){return Object.defineProperty?Object.defineProperty(n,"raw",{value:e}):n.raw=e,n}var p,d,a,l,c,s=r.button(p||(p=i(["\n border: 0;\n line-height: 1;\n font-size: 15px;\n cursor: pointer;\n font-weight: 700;\n font-weight: bold;\n border-radius: 3px;\n display: inline-block;\n padding: ",";\n color: ",";\n background-color: ",";\n opacity: ",";\n &:hover {\n background-color: ",";\n }\n &:active {\n border: solid 2px #1b116e;\n padding: ",";\n }\n"],["\n border: 0;\n line-height: 1;\n font-size: 15px;\n cursor: pointer;\n font-weight: 700;\n font-weight: bold;\n border-radius: 3px;\n display: inline-block;\n padding: ",";\n color: ",";\n background-color: ",";\n opacity: ",";\n &:hover {\n background-color: ",";\n }\n &:active {\n border: solid 2px #1b116e;\n padding: ",";\n }\n"])),(function(n){return"small"===n.size?"7px 25px 8px":"medium"===n.size?"9px 30px 11px":"14px 30px 16px"}),(function(n){return n.primary?"#1b116e":"#ffffff"}),(function(n){return n.primary?"#6bedb5":"#1b116e"}),(function(n){return n.disabled?.5:1}),(function(n){return n.primary?"#55bd90":"#6bedb5"}),(function(n){return"small"===n.size?"5px 23px 6px":"medium"===n.size?"7px 28px 9px":"12px 28px 14px"})),b=function(e){var r=e.size,i=e.primary,p=e.disabled,d=e.text,a=e.onClick,l=t(e,["size","primary","disabled","text","onClick"]);return n.createElement(s,o({type:"button",onClick:a,primary:i,disabled:p,size:r},l),d)},u=r.input(d||(d=i(["\n height: 40px;\n width: 300px;\n border-radius: 3px;\n border: solid 2px\n ",";\n background-color: #fff;\n &:focus {\n border: solid 2px #1b116e;\n }\n"],["\n height: 40px;\n width: 300px;\n border-radius: 3px;\n border: solid 2px\n ",";\n background-color: #fff;\n &:focus {\n border: solid 2px #1b116e;\n }\n"])),(function(n){return n.disabled?"#e4e3ea":n.error?"#a9150b":n.success?"#067d68":"#353637"})),f=r.div(a||(a=i(["\n font-size: 14px;\n color: ",";\n padding-bottom: 6px;\n"],["\n font-size: 14px;\n color: ",";\n padding-bottom: 6px;\n"])),(function(n){return n.disabled?"#e4e3ea":"#080808"})),x=r.div(l||(l=i(["\n font-size: 14px;\n color: #a9150b8;\n padding-top: 4px;\n"],["\n font-size: 14px;\n color: #a9150b8;\n padding-top: 4px;\n"]))),g=r.p(c||(c=i(["\n margin: 0px;\n color: ",";\n"],["\n margin: 0px;\n color: ",";\n"])),(function(n){return n.disabled?"#e4e3ea":n.error?"#a9150b":"#080808"})),m=function(r){var i=r.id,p=r.disabled,d=r.label,a=r.message,l=r.error,c=r.success,s=r.onChange,b=r.placeholder,m=t(r,["id","disabled","label","message","error","success","onChange","placeholder"]);return n.createElement(e,null,n.createElement(f,null,n.createElement(g,{disabled:p,error:l},d)),n.createElement(u,o({id:i,type:"text",onChange:s,disabled:p,error:l,success:c,placeholder:b},m)),n.createElement(x,null,n.createElement(g,{error:l},a)))};export{b as Button,m as Input};
//# sourceMappingURL=index.js.map
import e,{Fragment as r}from"react";import o from"styled-components";var d=o.button`
border: 0;
line-height: 1;
font-size: 15px;
cursor: pointer;
font-weight: 700;
font-weight: bold;
border-radius: 3px;
display: inline-block;
padding: ${e=>"small"===e.size?"7px 25px 8px":"medium"===e.size?"9px 30px 11px":"14px 30px 16px"};
color: ${e=>e.primary?"#1b116e":"#ffffff"};
background-color: ${e=>e.primary?"#6bedb5":"#1b116e"};
opacity: ${e=>e.disabled?.5:1};
&:hover {
background-color: ${e=>e.primary?"#55bd90":"#6bedb5"};
}
&:active {
border: solid 2px #1b116e;
padding: ${e=>"small"===e.size?"5px 23px 6px":"medium"===e.size?"7px 28px 9px":"12px 28px 14px"};
}
`,i=({size:r,primary:o,disabled:i,text:p,onClick:a,...l})=>e.createElement(d,{type:"button",onClick:a,primary:o,disabled:i,size:r,...l},p),p=o.input`
height: 40px;
width: 300px;
border-radius: 3px;
border: solid 2px
${e=>e.disabled?"#e4e3ea":e.error?"#a9150b":e.success?"#067d68":"#353637"};
background-color: #fff;
&:focus {
border: solid 2px #1b116e;
}
`,a=o.div`
font-size: 14px;
color: ${e=>e.disabled?"#e4e3ea":"#080808"};
padding-bottom: 6px;
`,l=o.div`
font-size: 14px;
color: #a9150b8;
padding-top: 4px;
`,t=o.p`
margin: 0px;
color: ${e=>e.disabled?"#e4e3ea":e.error?"#a9150b":"#080808"};
`,s=({id:o,disabled:d,label:i,message:s,error:n,success:b,onChange:c,placeholder:x,...m})=>e.createElement(r,null,e.createElement(a,null,e.createElement(t,{disabled:d,error:n},i)),e.createElement(p,{id:o,type:"text",onChange:c,disabled:d,error:n,success:b,placeholder:x,...m}),e.createElement(l,null,e.createElement(t,{error:n},s)));export{i as Button,s as Input};//# sourceMappingURL=index.js.map
2 changes: 1 addition & 1 deletion dist/esm/index.js.map

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions dist/esm/types/components/Button.d.ts

This file was deleted.

8 changes: 0 additions & 8 deletions dist/esm/types/components/Button.types.d.ts

This file was deleted.

4 changes: 0 additions & 4 deletions dist/esm/types/components/Button/Button.d.ts

This file was deleted.

8 changes: 0 additions & 8 deletions dist/esm/types/components/Button/Button.types.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions dist/esm/types/components/Button/index.d.ts

This file was deleted.

4 changes: 0 additions & 4 deletions dist/esm/types/components/Input.d.ts

This file was deleted.

Loading

0 comments on commit 18d66fd

Please sign in to comment.