componenteshospitais 3.2.3 → 3.2.4

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
@@ -316,7 +316,7 @@ var getArrowColorByEmpresa = function (empresa) {
316
316
  }
317
317
  };
318
318
  var SelectField = function (_a) {
319
- 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, multiple = _a.multiple, required = _a.required, corFundo = _a.corFundo, corLabel = _a.corLabel, empresa = _a.empresa, borderRadius = _a.borderRadius, border = _a.border, size = _a.size, arrow = _a.arrow;
319
+ 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, multiple = _a.multiple, required = _a.required, corFundo = _a.corFundo, corLabel = _a.corLabel, empresa = _a.empresa, borderRadius = _a.borderRadius, border = _a.border, size = _a.size, arrow = _a.arrow, txtOptionDefault = _a.txtOptionDefault;
320
320
  var handleSelectChange = function (e) {
321
321
  if (multiple) {
322
322
  var selectedOptions = Array.from(e.target.selectedOptions, function (option) { return option.value; });
@@ -340,7 +340,7 @@ var SelectField = function (_a) {
340
340
  borderRadius: (borderRadius ? "".concat(borderRadius, "px") : ''),
341
341
  border: (border ? border : '')
342
342
  }, disabled: disabled, multiple: multiple, required: required },
343
- optionDefault && !multiple && (React.createElement("option", { value: "" }, "Selecione...")),
343
+ optionDefault && !multiple && (React.createElement("option", { value: "" }, txtOptionDefault ? txtOptionDefault : 'Selecione...')),
344
344
  options.map(function (option) { return (React.createElement("option", { key: option.value, value: option.value }, option.description)); }))));
345
345
  };
346
346
 
package/dist/esm/index.js CHANGED
@@ -314,7 +314,7 @@ var getArrowColorByEmpresa = function (empresa) {
314
314
  }
315
315
  };
316
316
  var SelectField = function (_a) {
317
- 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, multiple = _a.multiple, required = _a.required, corFundo = _a.corFundo, corLabel = _a.corLabel, empresa = _a.empresa, borderRadius = _a.borderRadius, border = _a.border, size = _a.size, arrow = _a.arrow;
317
+ 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, multiple = _a.multiple, required = _a.required, corFundo = _a.corFundo, corLabel = _a.corLabel, empresa = _a.empresa, borderRadius = _a.borderRadius, border = _a.border, size = _a.size, arrow = _a.arrow, txtOptionDefault = _a.txtOptionDefault;
318
318
  var handleSelectChange = function (e) {
319
319
  if (multiple) {
320
320
  var selectedOptions = Array.from(e.target.selectedOptions, function (option) { return option.value; });
@@ -338,7 +338,7 @@ var SelectField = function (_a) {
338
338
  borderRadius: (borderRadius ? "".concat(borderRadius, "px") : ''),
339
339
  border: (border ? border : '')
340
340
  }, disabled: disabled, multiple: multiple, required: required },
341
- optionDefault && !multiple && (React.createElement("option", { value: "" }, "Selecione...")),
341
+ optionDefault && !multiple && (React.createElement("option", { value: "" }, txtOptionDefault ? txtOptionDefault : 'Selecione...')),
342
342
  options.map(function (option) { return (React.createElement("option", { key: option.value, value: option.value }, option.description)); }))));
343
343
  };
344
344
 
@@ -22,6 +22,7 @@ export interface SelectComponentProps {
22
22
  border?: string;
23
23
  size?: number;
24
24
  arrow?: boolean;
25
+ txtOptionDefault?: string;
25
26
  }
26
27
  declare const SelectField: React.FC<SelectComponentProps>;
27
28
  export default SelectField;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "componenteshospitais",
3
- "version": "3.2.3",
3
+ "version": "3.2.4",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -25,6 +25,7 @@ export interface SelectComponentProps {
25
25
  border?: string;
26
26
  size?: number;
27
27
  arrow?: boolean;
28
+ txtOptionDefault?: string;
28
29
  }
29
30
 
30
31
  // Função para mapear empresa com a cor da seta
@@ -58,6 +59,7 @@ const SelectField: React.FC<SelectComponentProps> = ({
58
59
  border,
59
60
  size,
60
61
  arrow,
62
+ txtOptionDefault
61
63
  }) => {
62
64
 
63
65
  const handleSelectChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
@@ -102,7 +104,7 @@ const SelectField: React.FC<SelectComponentProps> = ({
102
104
  required={required}
103
105
  >
104
106
  {optionDefault && !multiple && (
105
- <option value="">Selecione...</option>
107
+ <option value="">{txtOptionDefault ? txtOptionDefault : 'Selecione...'}</option>
106
108
  )}
107
109
  {options.map(option => (
108
110
  <option key={option.value} value={option.value}>