componenteshospitais 3.1.5 → 3.1.7
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 +12 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +12 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/Button.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/Button.tsx +3 -1
- package/src/components/InputField.tsx +6 -4
- package/src/stories/Button.stories.tsx +4 -0
- package/src/stories/InputField.stories.tsx +4 -0
- package/src/styles/input.module.css +29 -0
package/dist/cjs/index.js
CHANGED
|
@@ -116,14 +116,16 @@ 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_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","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
|
-
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;
|
|
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
|
-
return (React.createElement("div", { className: "".concat(empresaClass) },
|
|
126
|
+
return (React.createElement("div", { className: "".concat(empresaClass) },
|
|
127
|
+
icon && (React.createElement("div", { className: "".concat(icon, " ").concat(styles$5.iconButton) })),
|
|
128
|
+
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 }))));
|
|
127
129
|
};
|
|
128
130
|
|
|
129
131
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -245,19 +247,21 @@ var InputField = function (_a) {
|
|
|
245
247
|
label && React.createElement("label", { htmlFor: id, style: { color: corLabel ? corLabel : '' } }, label),
|
|
246
248
|
React.createElement("div", { className: styles$5.inputWrapper },
|
|
247
249
|
maskType ? (React.createElement(React.Fragment, null,
|
|
248
|
-
icon && (React.createElement("div", { className: icon })),
|
|
250
|
+
icon && (React.createElement("div", { className: "".concat(icon, " ").concat(styles$5.iconInput) })),
|
|
249
251
|
React.createElement(MaskedInput, { mask: mask, value: value, onChange: handleChange, disabled: disabled, id: id, name: id, placeholder: placeholder, className: styles$5.inputPadrao, style: {
|
|
250
252
|
width: largura ? "".concat(largura) : '',
|
|
251
253
|
backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')),
|
|
252
254
|
borderRadius: (borderRadius ? "".concat(borderRadius, "px") : ''),
|
|
253
|
-
border: (border ? border : '')
|
|
255
|
+
border: (border ? border : ''),
|
|
256
|
+
paddingLeft: (icon ? '30px' : '')
|
|
254
257
|
}, readOnly: readonly, required: required, checked: checked, onKeyPress: onKeyPress }))) : (React.createElement(React.Fragment, null,
|
|
255
|
-
icon && (React.createElement("div", { className: icon })),
|
|
258
|
+
icon && (React.createElement("div", { className: "".concat(icon, " ").concat(styles$5.iconInput) })),
|
|
256
259
|
React.createElement("input", { type: type === 'password' && isPasswordVisible ? 'text' : type, id: id, name: id, value: value, placeholder: placeholder, onChange: handleChange, className: styles$5.inputPadrao, style: {
|
|
257
260
|
width: largura ? "".concat(largura) : '',
|
|
258
261
|
backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')),
|
|
259
262
|
borderRadius: (borderRadius ? "".concat(borderRadius, "px") : ''),
|
|
260
|
-
border: (border ? border : '')
|
|
263
|
+
border: (border ? border : ''),
|
|
264
|
+
paddingLeft: (icon ? '30px' : '')
|
|
261
265
|
}, readOnly: readonly, disabled: disabled, required: required, checked: checked, maxLength: type === 'text' ? appliedMaxLength : undefined, onKeyPress: onKeyPress, onBlur: onBlur }))),
|
|
262
266
|
type === 'password' && (React.createElement("div", { className: styles$5.passwordToggleIcon, onClick: togglePasswordVisibility }, isPasswordVisible ? React.createElement(FaEyeSlash, { style: { color: colorIcon ? colorIcon : '' } }) : React.createElement(FaEye, { style: { color: colorIcon ? colorIcon : '' } }))))));
|
|
263
267
|
};
|