componenteshospitais 3.8.4 → 3.8.5

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
@@ -378,7 +378,7 @@ var SelectField = function (_a) {
378
378
  };
379
379
 
380
380
  var Busca = function (_a) {
381
- var options = _a.options; _a.value; var onChange = _a.onChange, label = _a.label, _b = _a.showIcon, showIcon = _b === undefined ? false : _b, corLabel = _a.corLabel, corFundo = _a.corFundo, borderRadius = _a.borderRadius, border = _a.border;
381
+ var options = _a.options; _a.value; var onChange = _a.onChange, label = _a.label, _b = _a.showIcon, showIcon = _b === undefined ? false : _b, corLabel = _a.corLabel, corFundo = _a.corFundo, borderRadius = _a.borderRadius, border = _a.border, id = _a.id;
382
382
  var _c = React.useState(options), filteredOptions = _c[0], setFilteredOptions = _c[1];
383
383
  var _d = React.useState(false), showOptions = _d[0], setShowOptions = _d[1];
384
384
  var _e = React.useState(''), inputValue = _e[0], setInputValue = _e[1];
@@ -422,7 +422,7 @@ var Busca = function (_a) {
422
422
  label && React.createElement("label", { htmlFor: "busca", style: { color: corLabel ? corLabel : '' } }, label),
423
423
  React.createElement("div", { style: { position: 'relative', display: 'flex', alignItems: 'center', gap: '10px', width: '100%' } },
424
424
  showIcon && React.createElement(FaSearch, { className: styles$7.searchIcon }),
425
- React.createElement("input", { type: "text", id: "busca", value: inputValue, onChange: handleInputChange, onFocus: handleFocus, placeholder: "Digite para buscar...", autoComplete: "off", className: styles$7.inputPadrao, style: {
425
+ React.createElement("input", { type: "text", id: id ? id : 'busca', value: inputValue, onChange: handleInputChange, onFocus: handleFocus, placeholder: "Digite para buscar...", autoComplete: "off", className: styles$7.inputPadrao, style: {
426
426
  width: '100%',
427
427
  paddingLeft: showIcon ? '30px' : '0',
428
428
  backgroundColor: (corFundo ? corFundo : ''),
package/dist/esm/index.js CHANGED
@@ -376,7 +376,7 @@ var SelectField = function (_a) {
376
376
  };
377
377
 
378
378
  var Busca = function (_a) {
379
- var options = _a.options; _a.value; var onChange = _a.onChange, label = _a.label, _b = _a.showIcon, showIcon = _b === undefined ? false : _b, corLabel = _a.corLabel, corFundo = _a.corFundo, borderRadius = _a.borderRadius, border = _a.border;
379
+ var options = _a.options; _a.value; var onChange = _a.onChange, label = _a.label, _b = _a.showIcon, showIcon = _b === undefined ? false : _b, corLabel = _a.corLabel, corFundo = _a.corFundo, borderRadius = _a.borderRadius, border = _a.border, id = _a.id;
380
380
  var _c = useState(options), filteredOptions = _c[0], setFilteredOptions = _c[1];
381
381
  var _d = useState(false), showOptions = _d[0], setShowOptions = _d[1];
382
382
  var _e = useState(''), inputValue = _e[0], setInputValue = _e[1];
@@ -420,7 +420,7 @@ var Busca = function (_a) {
420
420
  label && React.createElement("label", { htmlFor: "busca", style: { color: corLabel ? corLabel : '' } }, label),
421
421
  React.createElement("div", { style: { position: 'relative', display: 'flex', alignItems: 'center', gap: '10px', width: '100%' } },
422
422
  showIcon && React.createElement(FaSearch, { className: styles$7.searchIcon }),
423
- React.createElement("input", { type: "text", id: "busca", value: inputValue, onChange: handleInputChange, onFocus: handleFocus, placeholder: "Digite para buscar...", autoComplete: "off", className: styles$7.inputPadrao, style: {
423
+ React.createElement("input", { type: "text", id: id ? id : 'busca', value: inputValue, onChange: handleInputChange, onFocus: handleFocus, placeholder: "Digite para buscar...", autoComplete: "off", className: styles$7.inputPadrao, style: {
424
424
  width: '100%',
425
425
  paddingLeft: showIcon ? '30px' : '0',
426
426
  backgroundColor: (corFundo ? corFundo : ''),
@@ -13,6 +13,7 @@ export interface FilterableInputProps {
13
13
  corLabel?: string;
14
14
  borderRadius?: string;
15
15
  border?: string;
16
+ id?: string;
16
17
  }
17
18
  declare const Busca: React.FC<FilterableInputProps>;
18
19
  export default Busca;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "componenteshospitais",
3
- "version": "3.8.4",
3
+ "version": "3.8.5",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -17,9 +17,10 @@ export interface FilterableInputProps {
17
17
  corLabel?: string;
18
18
  borderRadius?: string;
19
19
  border?: string;
20
+ id?: string;
20
21
  }
21
22
 
22
- const Busca: React.FC<FilterableInputProps> = ({ options, value, onChange, label, showIcon = false, corLabel, corFundo, borderRadius, border }) => {
23
+ const Busca: React.FC<FilterableInputProps> = ({ options, value, onChange, label, showIcon = false, corLabel, corFundo, borderRadius, border, id }) => {
23
24
  const [filteredOptions, setFilteredOptions] = useState<OptionType[]>(options);
24
25
  const [showOptions, setShowOptions] = useState<boolean>(false);
25
26
  const [inputValue, setInputValue] = useState<string>('');
@@ -74,7 +75,7 @@ const Busca: React.FC<FilterableInputProps> = ({ options, value, onChange, label
74
75
  {showIcon && <FaSearch className={styles.searchIcon} />}
75
76
  <input
76
77
  type="text"
77
- id="busca"
78
+ id={id ? id : 'busca'}
78
79
  value={inputValue}
79
80
  onChange={handleInputChange}
80
81
  onFocus={handleFocus}