componenteshospitais 1.3.7 → 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;
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 () {
@@ -89,7 +89,11 @@ var CardImage = function (_a) {
89
89
  };
90
90
  var handleFileChange = function (event) {
91
91
  if (event.target.files && event.target.files[0]) {
92
- setFileName(event.target.files[0].name);
92
+ var file = event.target.files[0];
93
+ setFileName(file.name);
94
+ if (onFileSelect) {
95
+ onFileSelect(file); // Chama o callback com o arquivo selecionado
96
+ }
93
97
  }
94
98
  else {
95
99
  setFileName(null);
@@ -107,7 +111,7 @@ var CardImage = function (_a) {
107
111
  height: '100%',
108
112
  opacity: 0,
109
113
  cursor: 'pointer'
110
- } }),
114
+ }, accept: accept }),
111
115
  content,
112
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)))));
113
117
  };
@@ -173,10 +177,10 @@ var styles$1 = {"selectPadrao":"select-module_selectPadrao__poGiL"};
173
177
  styleInject(css_248z$1);
174
178
 
175
179
  var SelectField = function (_a) {
176
- 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;
177
181
  return (React.createElement(React.Fragment, null,
178
182
  label && React.createElement("label", { htmlFor: id }, label),
179
- 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 },
180
184
  optionDefault === true && (React.createElement("option", { value: "" }, "Selecione...")),
181
185
  options.map(function (option) { return (React.createElement("option", { key: option.value, value: option.value }, option.description)); }))));
182
186
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\r\n if ( ref === void 0 ) ref = {};\r\n var insertAt = ref.insertAt;\r\n\r\n if (!css || typeof document === 'undefined') { return; }\r\n\r\n var head = document.head || document.getElementsByTagName('head')[0];\r\n var style = document.createElement('style');\r\n style.type = 'text/css';\r\n\r\n if (insertAt === 'top') {\r\n if (head.firstChild) {\r\n head.insertBefore(style, head.firstChild);\r\n } else {\r\n head.appendChild(style);\r\n }\r\n } else {\r\n head.appendChild(style);\r\n }\r\n\r\n if (style.styleSheet) {\r\n style.styleSheet.cssText = css;\r\n } else {\r\n style.appendChild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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\r\n if ( ref === void 0 ) ref = {};\r\n var insertAt = ref.insertAt;\r\n\r\n if (!css || typeof document === 'undefined') { return; }\r\n\r\n var head = document.head || document.getElementsByTagName('head')[0];\r\n var style = document.createElement('style');\r\n style.type = 'text/css';\r\n\r\n if (insertAt === 'top') {\r\n if (head.firstChild) {\r\n head.insertBefore(style, head.firstChild);\r\n } else {\r\n head.appendChild(style);\r\n }\r\n } else {\r\n head.appendChild(style);\r\n }\r\n\r\n if (style.styleSheet) {\r\n style.styleSheet.cssText = css;\r\n } else {\r\n style.appendChild(document.createTextNode(css));\r\n }\r\n}\r\n\r\nexport default styleInject;\r\n"],"names":[],"mappings":";;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
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;
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 () {
@@ -87,7 +87,11 @@ var CardImage = function (_a) {
87
87
  };
88
88
  var handleFileChange = function (event) {
89
89
  if (event.target.files && event.target.files[0]) {
90
- setFileName(event.target.files[0].name);
90
+ var file = event.target.files[0];
91
+ setFileName(file.name);
92
+ if (onFileSelect) {
93
+ onFileSelect(file); // Chama o callback com o arquivo selecionado
94
+ }
91
95
  }
92
96
  else {
93
97
  setFileName(null);
@@ -105,7 +109,7 @@ var CardImage = function (_a) {
105
109
  height: '100%',
106
110
  opacity: 0,
107
111
  cursor: 'pointer'
108
- } }),
112
+ }, accept: accept }),
109
113
  content,
110
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)))));
111
115
  };
@@ -171,10 +175,10 @@ var styles$1 = {"selectPadrao":"select-module_selectPadrao__poGiL"};
171
175
  styleInject(css_248z$1);
172
176
 
173
177
  var SelectField = function (_a) {
174
- 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;
175
179
  return (React.createElement(React.Fragment, null,
176
180
  label && React.createElement("label", { htmlFor: id }, label),
177
- 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 },
178
182
  optionDefault === true && (React.createElement("option", { value: "" }, "Selecione...")),
179
183
  options.map(function (option) { return (React.createElement("option", { key: option.value, value: option.value }, option.description)); }))));
180
184
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\r\n if ( ref === void 0 ) ref = {};\r\n var insertAt = ref.insertAt;\r\n\r\n if (!css || typeof document === 'undefined') { return; }\r\n\r\n var head = document.head || document.getElementsByTagName('head')[0];\r\n var style = document.createElement('style');\r\n style.type = 'text/css';\r\n\r\n if (insertAt === 'top') {\r\n if (head.firstChild) {\r\n head.insertBefore(style, head.firstChild);\r\n } else {\r\n head.appendChild(style);\r\n }\r\n } else {\r\n head.appendChild(style);\r\n }\r\n\r\n if (style.styleSheet) {\r\n style.styleSheet.cssText = css;\r\n } else {\r\n style.appendChild(document.createTextNode(css));\r\n }\r\n}\r\n\r\nexport default styleInject;\r\n"],"names":[],"mappings":";;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\r\n if ( ref === void 0 ) ref = {};\r\n var insertAt = ref.insertAt;\r\n\r\n if (!css || typeof document === 'undefined') { return; }\r\n\r\n var head = document.head || document.getElementsByTagName('head')[0];\r\n var style = document.createElement('style');\r\n style.type = 'text/css';\r\n\r\n if (insertAt === 'top') {\r\n if (head.firstChild) {\r\n head.insertBefore(style, head.firstChild);\r\n } else {\r\n head.appendChild(style);\r\n }\r\n } else {\r\n head.appendChild(style);\r\n }\r\n\r\n if (style.styleSheet) {\r\n style.styleSheet.cssText =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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
@@ -12,6 +12,8 @@ interface CardImageProps {
12
12
  funcao?: (parametro: string) => void;
13
13
  parametro?: string;
14
14
  fileInput?: boolean;
15
+ onFileSelect?: (file: File) => void;
16
+ accept?: string;
15
17
  }
16
18
  declare const CardImage: React.FC<CardImageProps>;
17
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.7",
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,9 +14,11 @@ interface CardImageProps {
14
14
  funcao?: (parametro: string) => void;
15
15
  parametro?: string;
16
16
  fileInput?: boolean;
17
+ onFileSelect?: (file: File) => void;
18
+ accept?: string;
17
19
  }
18
20
 
19
- const CardImage: React.FC<CardImageProps> = ({ img, href, texto, empresa, largura, altura, externo, funcao, parametro, fileInput, alturaImage, larguraImage }) => {
21
+ const CardImage: React.FC<CardImageProps> = ({ img, href, texto, empresa, largura, altura, externo, funcao, parametro, fileInput, alturaImage, larguraImage, onFileSelect, accept }) => {
20
22
  const [fileName, setFileName] = useState<string | null>(null);
21
23
  const empresaClass = styles[`empresa${empresa}`];
22
24
 
@@ -28,7 +30,11 @@ const CardImage: React.FC<CardImageProps> = ({ img, href, texto, empresa, largur
28
30
 
29
31
  const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {
30
32
  if (event.target.files && event.target.files[0]) {
31
- setFileName(event.target.files[0].name);
33
+ const file = event.target.files[0];
34
+ setFileName(file.name);
35
+ if (onFileSelect) {
36
+ onFileSelect(file); // Chama o callback com o arquivo selecionado
37
+ }
32
38
  } else {
33
39
  setFileName(null);
34
40
  }
@@ -59,6 +65,7 @@ const CardImage: React.FC<CardImageProps> = ({ img, href, texto, empresa, largur
59
65
  opacity: 0,
60
66
  cursor: 'pointer'
61
67
  }}
68
+ accept={accept}
62
69
  />
63
70
  {content}
64
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>