componenteshospitais 1.2.5 → 1.2.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/dist/cjs/index.js
CHANGED
|
@@ -50,19 +50,19 @@ var styles$6 = {"icone":"card-module_icone__8F-jV","item":"card-module_item__YYE
|
|
|
50
50
|
styleInject(css_248z$6);
|
|
51
51
|
|
|
52
52
|
var Card = function (_a) {
|
|
53
|
-
var img = _a.img, imgLateral = _a.imgLateral, text = _a.text, link = _a.link, empresa = _a.empresa, largura = _a.largura,
|
|
53
|
+
var img = _a.img, imgLateral = _a.imgLateral, text = _a.text, link = _a.link, empresa = _a.empresa, largura = _a.largura, externo = _a.externo;
|
|
54
54
|
var empresaClass = styles$6["empresa".concat(empresa)];
|
|
55
|
-
var handleActionClick = function () {
|
|
56
|
-
if (funcao && parametro) {
|
|
57
|
-
funcao(parametro);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
55
|
var handleClick = function () {
|
|
61
56
|
if (link) {
|
|
62
|
-
|
|
57
|
+
if (externo) {
|
|
58
|
+
window.open(link, '_blank');
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
window.location.href = link;
|
|
62
|
+
}
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
-
return (React.createElement("div", { className: "".concat(empresaClass), onClick:
|
|
65
|
+
return (React.createElement("div", { className: "".concat(empresaClass), onClick: handleClick, style: { cursor: link ? 'pointer' : 'default' } },
|
|
66
66
|
React.createElement("div", { className: "".concat(styles$6.item, " empresa").concat(empresa), style: { width: largura ? "".concat(largura) : '' } },
|
|
67
67
|
img && (React.createElement("img", { src: img, alt: text, className: styles$6.icone })),
|
|
68
68
|
React.createElement("span", { className: styles$6.texto, dangerouslySetInnerHTML: { __html: text } }),
|
|
@@ -74,12 +74,12 @@ var styles$5 = {"botaoCert":"cardImage-module_botaoCert__Rs0fg","iconeOna":"card
|
|
|
74
74
|
styleInject(css_248z$5);
|
|
75
75
|
|
|
76
76
|
var CardImage = function (_a) {
|
|
77
|
-
var img = _a.img, href = _a.href, texto = _a.texto, empresa = _a.empresa, largura = _a.largura, altura = _a.altura;
|
|
77
|
+
var img = _a.img, href = _a.href, texto = _a.texto, empresa = _a.empresa, largura = _a.largura, altura = _a.altura, externo = _a.externo;
|
|
78
78
|
var empresaClass = styles$5["empresa".concat(empresa)];
|
|
79
79
|
var content = (React.createElement(React.Fragment, null,
|
|
80
80
|
React.createElement("img", { src: img, alt: img, className: styles$5.iconeOna }),
|
|
81
81
|
texto && (React.createElement("span", { className: styles$5.cardText, dangerouslySetInnerHTML: { __html: texto } }))));
|
|
82
|
-
return (React.createElement("div", { className: "".concat(empresaClass) }, href ? (React.createElement("a", { href: href, target: "_blank", rel: "noopener noreferrer", className: "".concat(styles$5.botaoCert, " empresa").concat(empresa), title: href, style: { width: largura ? "".concat(largura) : '', height: altura ? "".concat(altura) : '' } }, content)) : (React.createElement("div", { className: "".concat(styles$5.botaoCert, " empresa").concat(empresa), style: { width: largura ? "".concat(largura) : '', height: altura ? "".concat(altura) : '' } }, content))));
|
|
82
|
+
return (React.createElement("div", { className: "".concat(empresaClass) }, href ? (React.createElement("a", { href: href, target: externo ? "_blank" : "_self", rel: externo ? "noopener noreferrer" : undefined, className: "".concat(styles$5.botaoCert, " empresa").concat(empresa), title: href, style: { width: largura ? "".concat(largura) : '', height: altura ? "".concat(altura) : '' } }, content)) : (React.createElement("div", { className: "".concat(styles$5.botaoCert, " empresa").concat(empresa), style: { width: largura ? "".concat(largura) : '', height: altura ? "".concat(altura) : '' } }, content))));
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
var css_248z$4 = ".input-module_inputSubmit__21-Pj{align-self:center;border:none;border-radius:20px;color:#fff;cursor:pointer;font-size:15px;padding:10px;width:10rem}.input-module_inputPadrao__jypjY{border:1px solid #ccc;border-radius:.5rem;font-style:italic;padding:.8rem 0 .8rem 1rem;width:100%}.input-module_inputPadrao__jypjY:focus{outline:none}.input-module_empresa1__bxBov .input-module_inputSubmit__21-Pj{background-color:var(--blue)}.input-module_empresa1__bxBov .input-module_inputSubmit__21-Pj:hover{background-color:var(--red)}.input-module_empresa3__RU89A .input-module_inputSubmit__21-Pj{background-color:var(--green)}.input-module_empresa3__RU89A .input-module_inputSubmit__21-Pj:hover{background-color:var(--lightblue)}";
|
package/dist/esm/index.js
CHANGED
|
@@ -48,19 +48,19 @@ var styles$6 = {"icone":"card-module_icone__8F-jV","item":"card-module_item__YYE
|
|
|
48
48
|
styleInject(css_248z$6);
|
|
49
49
|
|
|
50
50
|
var Card = function (_a) {
|
|
51
|
-
var img = _a.img, imgLateral = _a.imgLateral, text = _a.text, link = _a.link, empresa = _a.empresa, largura = _a.largura,
|
|
51
|
+
var img = _a.img, imgLateral = _a.imgLateral, text = _a.text, link = _a.link, empresa = _a.empresa, largura = _a.largura, externo = _a.externo;
|
|
52
52
|
var empresaClass = styles$6["empresa".concat(empresa)];
|
|
53
|
-
var handleActionClick = function () {
|
|
54
|
-
if (funcao && parametro) {
|
|
55
|
-
funcao(parametro);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
53
|
var handleClick = function () {
|
|
59
54
|
if (link) {
|
|
60
|
-
|
|
55
|
+
if (externo) {
|
|
56
|
+
window.open(link, '_blank');
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
window.location.href = link;
|
|
60
|
+
}
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
|
-
return (React.createElement("div", { className: "".concat(empresaClass), onClick:
|
|
63
|
+
return (React.createElement("div", { className: "".concat(empresaClass), onClick: handleClick, style: { cursor: link ? 'pointer' : 'default' } },
|
|
64
64
|
React.createElement("div", { className: "".concat(styles$6.item, " empresa").concat(empresa), style: { width: largura ? "".concat(largura) : '' } },
|
|
65
65
|
img && (React.createElement("img", { src: img, alt: text, className: styles$6.icone })),
|
|
66
66
|
React.createElement("span", { className: styles$6.texto, dangerouslySetInnerHTML: { __html: text } }),
|
|
@@ -72,12 +72,12 @@ var styles$5 = {"botaoCert":"cardImage-module_botaoCert__Rs0fg","iconeOna":"card
|
|
|
72
72
|
styleInject(css_248z$5);
|
|
73
73
|
|
|
74
74
|
var CardImage = function (_a) {
|
|
75
|
-
var img = _a.img, href = _a.href, texto = _a.texto, empresa = _a.empresa, largura = _a.largura, altura = _a.altura;
|
|
75
|
+
var img = _a.img, href = _a.href, texto = _a.texto, empresa = _a.empresa, largura = _a.largura, altura = _a.altura, externo = _a.externo;
|
|
76
76
|
var empresaClass = styles$5["empresa".concat(empresa)];
|
|
77
77
|
var content = (React.createElement(React.Fragment, null,
|
|
78
78
|
React.createElement("img", { src: img, alt: img, className: styles$5.iconeOna }),
|
|
79
79
|
texto && (React.createElement("span", { className: styles$5.cardText, dangerouslySetInnerHTML: { __html: texto } }))));
|
|
80
|
-
return (React.createElement("div", { className: "".concat(empresaClass) }, href ? (React.createElement("a", { href: href, target: "_blank", rel: "noopener noreferrer", className: "".concat(styles$5.botaoCert, " empresa").concat(empresa), title: href, style: { width: largura ? "".concat(largura) : '', height: altura ? "".concat(altura) : '' } }, content)) : (React.createElement("div", { className: "".concat(styles$5.botaoCert, " empresa").concat(empresa), style: { width: largura ? "".concat(largura) : '', height: altura ? "".concat(altura) : '' } }, content))));
|
|
80
|
+
return (React.createElement("div", { className: "".concat(empresaClass) }, href ? (React.createElement("a", { href: href, target: externo ? "_blank" : "_self", rel: externo ? "noopener noreferrer" : undefined, className: "".concat(styles$5.botaoCert, " empresa").concat(empresa), title: href, style: { width: largura ? "".concat(largura) : '', height: altura ? "".concat(altura) : '' } }, content)) : (React.createElement("div", { className: "".concat(styles$5.botaoCert, " empresa").concat(empresa), style: { width: largura ? "".concat(largura) : '', height: altura ? "".concat(altura) : '' } }, content))));
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
var css_248z$4 = ".input-module_inputSubmit__21-Pj{align-self:center;border:none;border-radius:20px;color:#fff;cursor:pointer;font-size:15px;padding:10px;width:10rem}.input-module_inputPadrao__jypjY{border:1px solid #ccc;border-radius:.5rem;font-style:italic;padding:.8rem 0 .8rem 1rem;width:100%}.input-module_inputPadrao__jypjY:focus{outline:none}.input-module_empresa1__bxBov .input-module_inputSubmit__21-Pj{background-color:var(--blue)}.input-module_empresa1__bxBov .input-module_inputSubmit__21-Pj:hover{background-color:var(--red)}.input-module_empresa3__RU89A .input-module_inputSubmit__21-Pj{background-color:var(--green)}.input-module_empresa3__RU89A .input-module_inputSubmit__21-Pj:hover{background-color:var(--lightblue)}";
|
package/package.json
CHANGED
package/src/components/Card.tsx
CHANGED
|
@@ -8,29 +8,24 @@ interface CardProps {
|
|
|
8
8
|
link?: string;
|
|
9
9
|
empresa: '1' | '2' | '3';
|
|
10
10
|
largura?: string;
|
|
11
|
-
|
|
12
|
-
parametro?: string;
|
|
11
|
+
externo?: boolean
|
|
13
12
|
}
|
|
14
13
|
|
|
15
|
-
const Card: React.FC<CardProps> = ({ img, imgLateral, text, link, empresa, largura,
|
|
14
|
+
const Card: React.FC<CardProps> = ({ img, imgLateral, text, link, empresa, largura, externo }) => {
|
|
16
15
|
const empresaClass = styles[`empresa${empresa}`];
|
|
17
16
|
|
|
18
|
-
const handleActionClick = () => {
|
|
19
|
-
if (funcao && parametro) {
|
|
20
|
-
funcao(parametro);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
17
|
const handleClick = () => {
|
|
25
18
|
if (link) {
|
|
26
|
-
|
|
19
|
+
if (externo) {
|
|
20
|
+
window.open(link, '_blank');
|
|
21
|
+
} else {
|
|
22
|
+
window.location.href = link;
|
|
23
|
+
}
|
|
27
24
|
}
|
|
28
25
|
};
|
|
29
26
|
|
|
30
27
|
return (
|
|
31
|
-
<div className={`${empresaClass}`}
|
|
32
|
-
onClick={link ? handleClick : handleActionClick}
|
|
33
|
-
style={{ cursor: link || (funcao && parametro) ? 'pointer' : 'default' }}>
|
|
28
|
+
<div className={`${empresaClass}`} onClick={handleClick} style={{ cursor: link ? 'pointer' : 'default' }}>
|
|
34
29
|
<div className={`${styles.item} empresa${empresa}`} style={{width: largura ? `${largura}` : ''}}>
|
|
35
30
|
{ img && (
|
|
36
31
|
<img src={img} alt={text} className={styles.icone} />
|
|
@@ -8,9 +8,10 @@ interface CardImageProps {
|
|
|
8
8
|
empresa: '1' | '2' | '3';
|
|
9
9
|
largura?: string;
|
|
10
10
|
altura?: string;
|
|
11
|
+
externo?: boolean;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
const CardImage: React.FC<CardImageProps> = ({ img, href, texto, empresa, largura, altura }) => {
|
|
14
|
+
const CardImage: React.FC<CardImageProps> = ({ img, href, texto, empresa, largura, altura, externo }) => {
|
|
14
15
|
const empresaClass = styles[`empresa${empresa}`];
|
|
15
16
|
|
|
16
17
|
const content = (
|
|
@@ -27,8 +28,8 @@ const CardImage: React.FC<CardImageProps> = ({ img, href, texto, empresa, largur
|
|
|
27
28
|
{href ? (
|
|
28
29
|
<a
|
|
29
30
|
href={href}
|
|
30
|
-
target="_blank"
|
|
31
|
-
rel="noopener noreferrer"
|
|
31
|
+
target={externo ? "_blank" : "_self"}
|
|
32
|
+
rel={externo ? "noopener noreferrer" : undefined}
|
|
32
33
|
className={`${styles.botaoCert} empresa${empresa}`}
|
|
33
34
|
title={href}
|
|
34
35
|
style={{ width: largura ? `${largura}` : '', height: altura ? `${altura}` : '' }}
|