componenteshospitais 1.7.0 → 1.7.2

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
@@ -117,8 +117,8 @@ var CardImage = function (_a) {
117
117
  React$2.createElement("span", { className: styles$6.cardText }, fileName ? fileName : 'Selecione um arquivo'))) : (href ? (React$2.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$2.createElement("div", { className: "".concat(styles$6.botaoCert), onClick: handleActionClick, style: { width: '100%', height: '100%' } }, content)))));
118
118
  };
119
119
 
120
- 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_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)}.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)}";
121
- var styles$5 = {"inputSubmit":"input-module_inputSubmit__21-Pj","inputPadrao":"input-module_inputPadrao__jypjY","empresa1":"input-module_empresa1__bxBov","empresa3":"input-module_empresa3__RU89A","empresa4":"input-module_empresa4__rWmWH","empresa5":"input-module_empresa5__rJ8DJ"};
120
+ 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_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_searchIcon__miuBI{color:#888;font-size:1.2rem;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_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)}";
121
+ var styles$5 = {"inputSubmit":"input-module_inputSubmit__21-Pj","inputPadrao":"input-module_inputPadrao__jypjY","searchIcon":"input-module_searchIcon__miuBI","empresa1":"input-module_empresa1__bxBov","empresa3":"input-module_empresa3__RU89A","empresa4":"input-module_empresa4__rWmWH","empresa5":"input-module_empresa5__rJ8DJ"};
122
122
  styleInject(css_248z$5);
123
123
 
124
124
  var Button = function (_a) {
@@ -1488,6 +1488,8 @@ function FaDownload (props) {
1488
1488
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 576 512"},"child":[{"tag":"path","attr":{"d":"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"},"child":[]}]})(props);
1489
1489
  }function FaPen (props) {
1490
1490
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M290.74 93.24l128.02 128.02-277.99 277.99-114.14 12.6C11.35 513.54-1.56 500.62.14 485.34l12.7-114.22 277.9-277.88zm207.2-19.06l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.76 18.75-49.16 0-67.91z"},"child":[]}]})(props);
1491
+ }function FaSearch (props) {
1492
+ return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},"child":[]}]})(props);
1491
1493
  }
1492
1494
 
1493
1495
  var InputField = function (_a) {
@@ -1570,16 +1572,16 @@ var SelectField = function (_a) {
1570
1572
  };
1571
1573
 
1572
1574
  var Busca = function (_a) {
1573
- var options = _a.options, value = _a.value, onChange = _a.onChange, label = _a.label;
1574
- var _b = React$2.useState(options), filteredOptions = _b[0], setFilteredOptions = _b[1];
1575
- var _c = React$2.useState(false), showOptions = _c[0], setShowOptions = _c[1];
1576
- var inputRef = React$2.useRef(null); // Ref para o componente
1575
+ var options = _a.options, value = _a.value, onChange = _a.onChange, label = _a.label, _b = _a.showIcon, showIcon = _b === void 0 ? false : _b;
1576
+ var _c = React$2.useState(options), filteredOptions = _c[0], setFilteredOptions = _c[1];
1577
+ var _d = React$2.useState(false), showOptions = _d[0], setShowOptions = _d[1];
1578
+ var inputRef = React$2.useRef(null);
1577
1579
  var handleInputChange = function (e) {
1578
1580
  var inputValue = e.target.value;
1579
1581
  onChange(inputValue);
1580
1582
  if (inputValue === '') {
1581
- setFilteredOptions(options); // Mostra todas as opções se não houver entrada
1582
- setShowOptions(true); // Exibe a lista de opções
1583
+ setFilteredOptions(options);
1584
+ setShowOptions(true);
1583
1585
  }
1584
1586
  else {
1585
1587
  var filtered = options.filter(function (option) {
@@ -1590,7 +1592,6 @@ var Busca = function (_a) {
1590
1592
  }
1591
1593
  };
1592
1594
  var handleFocus = function (e) {
1593
- // Ao focar no campo de entrada, mostrar todas as opções
1594
1595
  setFilteredOptions(options);
1595
1596
  setShowOptions(true);
1596
1597
  };
@@ -1599,22 +1600,20 @@ var Busca = function (_a) {
1599
1600
  setShowOptions(false);
1600
1601
  };
1601
1602
  var handleClickOutside = function (event) {
1602
- // Fecha a lista de opções se o clique não estiver dentro do componente
1603
1603
  if (inputRef.current && !inputRef.current.contains(event.target)) {
1604
1604
  setShowOptions(false);
1605
1605
  }
1606
1606
  };
1607
1607
  React$2.useEffect(function () {
1608
- // Adiciona o listener para fechar as opções quando clicar fora
1609
1608
  document.addEventListener('mousedown', handleClickOutside);
1610
- // Remove o listener ao desmontar o componente
1611
1609
  return function () {
1612
1610
  document.removeEventListener('mousedown', handleClickOutside);
1613
1611
  };
1614
1612
  }, []);
1615
1613
  return (React$2.createElement("div", { style: { position: 'relative' }, ref: inputRef },
1616
1614
  React$2.createElement("label", { htmlFor: "codigoCbhpm" }, label),
1617
- React$2.createElement("input", { type: "text", id: "codigoCbhpm", value: value, onChange: handleInputChange, onFocus: handleFocus, placeholder: "Digite para buscar...", autoComplete: "off", className: styles$5.inputPadrao, style: { width: '100%' } }),
1615
+ showIcon && React$2.createElement(FaSearch, { className: styles$5.searchIcon }),
1616
+ React$2.createElement("input", { type: "text", id: "codigoCbhpm", value: value, onChange: handleInputChange, onFocus: handleFocus, placeholder: "Digite para buscar...", autoComplete: "off", className: styles$5.inputPadrao, style: { width: '100%', paddingLeft: showIcon ? '30px' : '0' } }),
1618
1617
  showOptions && filteredOptions.length > 0 && (React$2.createElement("ul", { style: {
1619
1618
  position: 'absolute',
1620
1619
  width: '100%',