componenteshospitais 1.3.8 → 1.3.9

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
@@ -79,7 +79,7 @@ var styles$5 = {"botaoCert":"cardImage-module_botaoCert__Rs0fg","iconeOna":"card
79
79
  styleInject(css_248z$5);
80
80
 
81
81
  var CardImage = function (_a) {
82
- var img = _a.img, href = _a.href, texto = _a.texto, empresa = _a.empresa, largura = _a.largura, altura = _a.altura, externo = _a.externo, funcao = _a.funcao, parametro = _a.parametro, fileInput = _a.fileInput, alturaImage = _a.alturaImage, larguraImage = _a.larguraImage, onFileSelect = _a.onFileSelect;
82
+ var img = _a.img, href = _a.href, texto = _a.texto, empresa = _a.empresa, largura = _a.largura, altura = _a.altura, externo = _a.externo, funcao = _a.funcao, parametro = _a.parametro, fileInput = _a.fileInput, alturaImage = _a.alturaImage, larguraImage = _a.larguraImage, onFileSelect = _a.onFileSelect, accept = _a.accept;
83
83
  var _b = React.useState(null), fileName = _b[0], setFileName = _b[1];
84
84
  var empresaClass = styles$5["empresa".concat(empresa)];
85
85
  var handleActionClick = function () {
@@ -111,7 +111,7 @@ var CardImage = function (_a) {
111
111
  height: '100%',
112
112
  opacity: 0,
113
113
  cursor: 'pointer'
114
- } }),
114
+ }, accept: accept }),
115
115
  content,
116
116
  React.createElement("span", { className: styles$5.cardText }, fileName ? fileName : 'Selecione um arquivo'))) : (href ? (React.createElement("a", { href: href, target: externo ? "_blank" : "_self", rel: externo ? "noopener noreferrer" : undefined, className: "".concat(styles$5.botaoCert), title: href, style: { width: '100%', height: '100%' } }, content)) : (React.createElement("div", { className: "".concat(styles$5.botaoCert), onClick: handleActionClick, style: { width: '100%', height: '100%' } }, content)))));
117
117
  };
@@ -177,10 +177,10 @@ var styles$1 = {"selectPadrao":"select-module_selectPadrao__poGiL"};
177
177
  styleInject(css_248z$1);
178
178
 
179
179
  var SelectField = function (_a) {
180
- var id = _a.id, name = _a.name, options = _a.options, value = _a.value, onChange = _a.onChange, label = _a.label, optionDefault = _a.optionDefault, largura = _a.largura;
180
+ var id = _a.id, name = _a.name, options = _a.options, value = _a.value, onChange = _a.onChange, label = _a.label, optionDefault = _a.optionDefault, largura = _a.largura, disabled = _a.disabled;
181
181
  return (React.createElement(React.Fragment, null,
182
182
  label && React.createElement("label", { htmlFor: id }, label),
183
- React.createElement("select", { id: id, name: name, className: styles$1.selectPadrao, value: value, onChange: function (e) { return onChange(e.target.value); }, style: { width: largura ? "".concat(largura) : '' } },
183
+ React.createElement("select", { id: id, name: name, className: styles$1.selectPadrao, value: value, onChange: function (e) { return onChange(e.target.value); }, style: { width: largura ? "".concat(largura) : '' }, disabled: disabled },
184
184
  optionDefault === true && (React.createElement("option", { value: "" }, "Selecione...")),
185
185
  options.map(function (option) { return (React.createElement("option", { key: option.value, value: option.value }, option.description)); }))));
186
186
  };
package/dist/esm/index.js CHANGED
@@ -77,7 +77,7 @@ var styles$5 = {"botaoCert":"cardImage-module_botaoCert__Rs0fg","iconeOna":"card
77
77
  styleInject(css_248z$5);
78
78
 
79
79
  var CardImage = function (_a) {
80
- var img = _a.img, href = _a.href, texto = _a.texto, empresa = _a.empresa, largura = _a.largura, altura = _a.altura, externo = _a.externo, funcao = _a.funcao, parametro = _a.parametro, fileInput = _a.fileInput, alturaImage = _a.alturaImage, larguraImage = _a.larguraImage, onFileSelect = _a.onFileSelect;
80
+ var img = _a.img, href = _a.href, texto = _a.texto, empresa = _a.empresa, largura = _a.largura, altura = _a.altura, externo = _a.externo, funcao = _a.funcao, parametro = _a.parametro, fileInput = _a.fileInput, alturaImage = _a.alturaImage, larguraImage = _a.larguraImage, onFileSelect = _a.onFileSelect, accept = _a.accept;
81
81
  var _b = useState(null), fileName = _b[0], setFileName = _b[1];
82
82
  var empresaClass = styles$5["empresa".concat(empresa)];
83
83
  var handleActionClick = function () {
@@ -109,7 +109,7 @@ var CardImage = function (_a) {
109
109
  height: '100%',
110
110
  opacity: 0,
111
111
  cursor: 'pointer'
112
- } }),
112
+ }, accept: accept }),
113
113
  content,
114
114
  React.createElement("span", { className: styles$5.cardText }, fileName ? fileName : 'Selecione um arquivo'))) : (href ? (React.createElement("a", { href: href, target: externo ? "_blank" : "_self", rel: externo ? "noopener noreferrer" : undefined, className: "".concat(styles$5.botaoCert), title: href, style: { width: '100%', height: '100%' } }, content)) : (React.createElement("div", { className: "".concat(styles$5.botaoCert), onClick: handleActionClick, style: { width: '100%', height: '100%' } }, content)))));
115
115
  };
@@ -175,10 +175,10 @@ var styles$1 = {"selectPadrao":"select-module_selectPadrao__poGiL"};
175
175
  styleInject(css_248z$1);
176
176
 
177
177
  var SelectField = function (_a) {
178
- var id = _a.id, name = _a.name, options = _a.options, value = _a.value, onChange = _a.onChange, label = _a.label, optionDefault = _a.optionDefault, largura = _a.largura;
178
+ var id = _a.id, name = _a.name, options = _a.options, value = _a.value, onChange = _a.onChange, label = _a.label, optionDefault = _a.optionDefault, largura = _a.largura, disabled = _a.disabled;
179
179
  return (React.createElement(React.Fragment, null,
180
180
  label && React.createElement("label", { htmlFor: id }, label),
181
- React.createElement("select", { id: id, name: name, className: styles$1.selectPadrao, value: value, onChange: function (e) { return onChange(e.target.value); }, style: { width: largura ? "".concat(largura) : '' } },
181
+ React.createElement("select", { id: id, name: name, className: styles$1.selectPadrao, value: value, onChange: function (e) { return onChange(e.target.value); }, style: { width: largura ? "".concat(largura) : '' }, disabled: disabled },
182
182
  optionDefault === true && (React.createElement("option", { value: "" }, "Selecione...")),
183
183
  options.map(function (option) { return (React.createElement("option", { key: option.value, value: option.value }, option.description)); }))));
184
184
  };
@@ -13,6 +13,7 @@ interface CardImageProps {
13
13
  parametro?: string;
14
14
  fileInput?: boolean;
15
15
  onFileSelect?: (file: File) => void;
16
+ accept?: string;
16
17
  }
17
18
  declare const CardImage: React.FC<CardImageProps>;
18
19
  export default CardImage;
@@ -12,6 +12,7 @@ interface SelectComponentProps {
12
12
  label?: string;
13
13
  optionDefault?: boolean;
14
14
  largura?: string;
15
+ disabled?: boolean;
15
16
  }
16
17
  declare const SelectField: React.FC<SelectComponentProps>;
17
18
  export default SelectField;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "componenteshospitais",
3
- "version": "1.3.8",
3
+ "version": "1.3.9",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -14,10 +14,11 @@ interface CardImageProps {
14
14
  funcao?: (parametro: string) => void;
15
15
  parametro?: string;
16
16
  fileInput?: boolean;
17
- onFileSelect?: (file: File) => void; // Adiciona a prop onFileSelect
17
+ onFileSelect?: (file: File) => void;
18
+ accept?: string;
18
19
  }
19
20
 
20
- const CardImage: React.FC<CardImageProps> = ({ img, href, texto, empresa, largura, altura, externo, funcao, parametro, fileInput, alturaImage, larguraImage, onFileSelect }) => {
21
+ const CardImage: React.FC<CardImageProps> = ({ img, href, texto, empresa, largura, altura, externo, funcao, parametro, fileInput, alturaImage, larguraImage, onFileSelect, accept }) => {
21
22
  const [fileName, setFileName] = useState<string | null>(null);
22
23
  const empresaClass = styles[`empresa${empresa}`];
23
24
 
@@ -64,6 +65,7 @@ const CardImage: React.FC<CardImageProps> = ({ img, href, texto, empresa, largur
64
65
  opacity: 0,
65
66
  cursor: 'pointer'
66
67
  }}
68
+ accept={accept}
67
69
  />
68
70
  {content}
69
71
  <span className={styles.cardText}>{fileName ? fileName : 'Selecione um arquivo'}</span>
@@ -14,10 +14,11 @@ interface SelectComponentProps {
14
14
  onChange: (value: string) => void;
15
15
  label?: string;
16
16
  optionDefault?: boolean;
17
- largura?: string
17
+ largura?: string;
18
+ disabled?: boolean;
18
19
  }
19
20
 
20
- const SelectField: React.FC<SelectComponentProps> = ({ id, name, options, value, onChange, label, optionDefault, largura }) => {
21
+ const SelectField: React.FC<SelectComponentProps> = ({ id, name, options, value, onChange, label, optionDefault, largura, disabled }) => {
21
22
  return (
22
23
  <>
23
24
  {label && <label htmlFor={id}>{label}</label>}
@@ -28,6 +29,7 @@ const SelectField: React.FC<SelectComponentProps> = ({ id, name, options, value,
28
29
  value={value}
29
30
  onChange={(e) => onChange(e.target.value)}
30
31
  style={{width: largura ? `${largura}` : ''}}
32
+ disabled={disabled}
31
33
  >
32
34
  {optionDefault===true && (
33
35
  <option value="">Selecione...</option>