componenteshospitais 3.1.6 → 3.1.8
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 +8 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +8 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/InputField.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/Button.tsx +9 -7
- package/src/components/InputField.tsx +5 -2
- package/src/stories/InputField.stories.tsx +4 -0
- package/src/styles/input.module.css +23 -0
package/dist/cjs/index.js
CHANGED
|
@@ -116,16 +116,17 @@ var CardImage = function (_a) {
|
|
|
116
116
|
React.createElement("span", { className: styles$6.cardText }, fileName ? fileName : 'Selecione um arquivo'))) : (href ? (React.createElement("a", { href: href, target: externo ? "_blank" : "_self", rel: externo ? "noopener noreferrer" : undefined, className: "".concat(styles$6.botaoCert), title: href, style: { width: '100%', height: '100%' } }, content)) : (React.createElement("div", { className: "".concat(styles$6.botaoCert), onClick: handleActionClick, style: { width: '100%', height: '100%' } }, content)))));
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
-
var css_248z$5 = ".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_inputWrapper__oqH8F{position:relative;width:100%}.input-module_inputPadrao__jypjY{border:1px solid #ccc;border-radius:.5rem;box-sizing:border-box;font-style:italic;padding:.8rem 1rem;width:100%}.input-module_inputPadrao__jypjY:focus{outline:none}.input-module_searchIcon__miuBI{color:#888;font-size:1.2rem;left:8px;position:absolute}.input-module_passwordToggleIcon__D8cEc{cursor:pointer;font-size:1.2rem;position:absolute;right:10px;top:25px;transform:translateY(-50%)}.input-module_iconInput__Vw-FI{padding-left:10px;position:absolute;top:.7rem}.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)}.input-module_empresa4__rWmWH .input-module_inputSubmit__21-Pj{background-color:var(--red)}.input-module_empresa4__rWmWH .input-module_inputSubmit__21-Pj:hover{background-color:var(--blue)}.input-module_empresa5__rJ8DJ .input-module_inputSubmit__21-Pj{background-color:var(--cartaoGreen)}.input-module_empresa5__rJ8DJ .input-module_inputSubmit__21-Pj:hover{background-color:var(--cartaoBlue)}";
|
|
120
|
-
var styles$5 = {"inputSubmit":"input-module_inputSubmit__21-Pj","inputWrapper":"input-module_inputWrapper__oqH8F","inputPadrao":"input-module_inputPadrao__jypjY","searchIcon":"input-module_searchIcon__miuBI","passwordToggleIcon":"input-module_passwordToggleIcon__D8cEc","iconInput":"input-module_iconInput__Vw-FI","empresa1":"input-module_empresa1__bxBov","empresa3":"input-module_empresa3__RU89A","empresa4":"input-module_empresa4__rWmWH","empresa5":"input-module_empresa5__rJ8DJ"};
|
|
119
|
+
var css_248z$5 = ".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_inputWrapper__oqH8F{position:relative;width:100%}.input-module_inputPadrao__jypjY{border:1px solid #ccc;border-radius:.5rem;box-sizing:border-box;font-style:italic;padding:.8rem 1rem;width:100%}.input-module_inputPadrao__jypjY:focus{outline:none}.input-module_searchIcon__miuBI{color:#888;font-size:1.2rem;left:8px;position:absolute}.input-module_passwordToggleIcon__D8cEc{cursor:pointer;font-size:1.2rem;position:absolute;right:10px;top:25px;transform:translateY(-50%)}.input-module_iconInput__Vw-FI{padding-left:10px;position:absolute;top:.7rem}.input-module_iconButton__o-C4y{bottom:9.5rem;color:#fff;padding-left:10px;position:absolute}.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_empresa1__bxBov .input-module_iconInput__Vw-FI{color:var(--blue)}.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)}.input-module_empresa3__RU89A .input-module_iconInput__Vw-FI{color:var(--green)}.input-module_empresa4__rWmWH .input-module_inputSubmit__21-Pj{background-color:var(--red)}.input-module_empresa4__rWmWH .input-module_inputSubmit__21-Pj:hover{background-color:var(--blue)}.input-module_empresa4__rWmWH .input-module_iconInput__Vw-FI{color:var(--red)}.input-module_empresa5__rJ8DJ .input-module_inputSubmit__21-Pj{background-color:var(--cartaoGreen)}.input-module_empresa5__rJ8DJ .input-module_inputSubmit__21-Pj:hover{background-color:var(--cartaoBlue)}.input-module_empresa5__rJ8DJ .input-module_iconInput__Vw-FI{color:var(--cartaoGreen)}";
|
|
120
|
+
var styles$5 = {"inputSubmit":"input-module_inputSubmit__21-Pj","inputWrapper":"input-module_inputWrapper__oqH8F","inputPadrao":"input-module_inputPadrao__jypjY","searchIcon":"input-module_searchIcon__miuBI","passwordToggleIcon":"input-module_passwordToggleIcon__D8cEc","iconInput":"input-module_iconInput__Vw-FI","iconButton":"input-module_iconButton__o-C4y","empresa1":"input-module_empresa1__bxBov","empresa3":"input-module_empresa3__RU89A","empresa4":"input-module_empresa4__rWmWH","empresa5":"input-module_empresa5__rJ8DJ"};
|
|
121
121
|
styleInject(css_248z$5);
|
|
122
122
|
|
|
123
123
|
var Button = function (_a) {
|
|
124
124
|
var empresa = _a.empresa, _b = _a.type, type = _b === void 0 ? 'submit' : _b, onClick = _a.onClick, texto = _a.texto, largura = _a.largura, borderRadius = _a.borderRadius, disabled = _a.disabled, icon = _a.icon;
|
|
125
125
|
var empresaClass = styles$5["empresa".concat(empresa)];
|
|
126
126
|
return (React.createElement("div", { className: "".concat(empresaClass) },
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
React.createElement("div", { className: "".concat(styles$5.inputWrapper) },
|
|
128
|
+
icon && (React.createElement("div", { className: "".concat(icon, " ").concat(styles$5.iconButton) })),
|
|
129
|
+
type === 'submit' ? (React.createElement("input", { type: "submit", className: styles$5.inputSubmit, style: { width: largura ? "".concat(largura) : '', borderRadius: borderRadius ? "".concat(borderRadius, "px") : '' }, value: texto, disabled: disabled })) : (React.createElement("button", { type: "button", className: styles$5.inputSubmit, onClick: onClick, style: { width: largura ? "".concat(largura) : '', borderRadius: borderRadius ? "".concat(borderRadius, "px") : '' }, dangerouslySetInnerHTML: { __html: texto }, disabled: disabled })))));
|
|
129
130
|
};
|
|
130
131
|
|
|
131
132
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -216,7 +217,7 @@ function FaDownload (props) {
|
|
|
216
217
|
}
|
|
217
218
|
|
|
218
219
|
var InputField = function (_a) {
|
|
219
|
-
var type = _a.type, id = _a.id, placeholder = _a.placeholder, onChange = _a.onChange, value = _a.value, label = _a.label, largura = _a.largura, readonly = _a.readonly, disabled = _a.disabled, required = _a.required, checked = _a.checked, maxLength = _a.maxLength, maskType = _a.maskType, onKeyPress = _a.onKeyPress, onBlur = _a.onBlur, corFundo = _a.corFundo, corLabel = _a.corLabel, borderRadius = _a.borderRadius, colorIcon = _a.colorIcon, border = _a.border, icon = _a.icon;
|
|
220
|
+
var type = _a.type, id = _a.id, placeholder = _a.placeholder, onChange = _a.onChange, value = _a.value, label = _a.label, largura = _a.largura, readonly = _a.readonly, disabled = _a.disabled, required = _a.required, checked = _a.checked, maxLength = _a.maxLength, maskType = _a.maskType, onKeyPress = _a.onKeyPress, onBlur = _a.onBlur, corFundo = _a.corFundo, corLabel = _a.corLabel, borderRadius = _a.borderRadius, colorIcon = _a.colorIcon, border = _a.border, icon = _a.icon, empresa = _a.empresa;
|
|
220
221
|
var _b = React.useState(false), isPasswordVisible = _b[0], setIsPasswordVisible = _b[1];
|
|
221
222
|
var togglePasswordVisibility = function () {
|
|
222
223
|
setIsPasswordVisible(!isPasswordVisible);
|
|
@@ -243,9 +244,10 @@ var InputField = function (_a) {
|
|
|
243
244
|
: maskType === 'telefone'
|
|
244
245
|
? ['(', /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/]
|
|
245
246
|
: [];
|
|
247
|
+
var empresaClass = empresa ? styles$5["empresa".concat(empresa)] : '';
|
|
246
248
|
return (React.createElement(React.Fragment, null,
|
|
247
249
|
label && React.createElement("label", { htmlFor: id, style: { color: corLabel ? corLabel : '' } }, label),
|
|
248
|
-
React.createElement("div", { className: styles$5.inputWrapper },
|
|
250
|
+
React.createElement("div", { className: "".concat(styles$5.inputWrapper, " ").concat(empresa ? empresaClass : '') },
|
|
249
251
|
maskType ? (React.createElement(React.Fragment, null,
|
|
250
252
|
icon && (React.createElement("div", { className: "".concat(icon, " ").concat(styles$5.iconInput) })),
|
|
251
253
|
React.createElement(MaskedInput, { mask: mask, value: value, onChange: handleChange, disabled: disabled, id: id, name: id, placeholder: placeholder, className: styles$5.inputPadrao, style: {
|