groovinads-ui 1.2.64 → 1.2.66

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "groovinads-ui",
3
3
  "description": "Groovinads UI is a React component library designed exclusively for Groovinads applications. It provides ready-to-use UI elements styled according to Groovinads design guidelines to facilitate rapid development.",
4
- "version": "1.2.64",
4
+ "version": "1.2.66",
5
5
  "keywords": [
6
6
  "css",
7
7
  "sass",
@@ -1,7 +1,6 @@
1
1
  import React, { useEffect, useState, useRef } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import Dropdown from 'react-bootstrap/Dropdown';
4
- import { DropdownItem } from 'react-bootstrap';
5
4
 
6
5
  const DropdownComponent = ({
7
6
  autoClose = false,
@@ -25,7 +24,7 @@ const DropdownComponent = ({
25
24
  // Cierra el dropdown solo si autoClose es 'true' o 'inside'
26
25
  if (autoClose === true || autoClose === 'inside') {
27
26
  setInnerShow(false);
28
- setShow(false);
27
+ if (setShow) setShow(false);
29
28
  }
30
29
  };
31
30
 
@@ -40,8 +39,7 @@ const DropdownComponent = ({
40
39
  },
41
40
  });
42
41
 
43
- const modifiedMenu = React.cloneElement(Menu,
44
- {
42
+ const modifiedMenu = React.cloneElement(Menu, {
45
43
  as: 'ul',
46
44
  align,
47
45
  className: fullWidth ? 'w-100' : '',
@@ -65,19 +63,21 @@ const DropdownComponent = ({
65
63
  },
66
64
  }),
67
65
  )
68
- : React.cloneElement(Menu.props.children, {
69
- as: 'li',
70
- key: `${child}${i}`,
71
- onClick: () => {
72
- if (
73
- Menu.props.children.props &&
74
- Menu.props.children.props.onClick
75
- ) {
76
- Menu.props.children.props.onClick();
77
- }
78
- onAutoclose();
79
- },
80
- }),
66
+ : Menu.props.children.map((child, i) =>
67
+ React.cloneElement(Menu.props.children, {
68
+ as: 'li',
69
+ key: `${child}${i}`,
70
+ onClick: () => {
71
+ if (
72
+ Menu.props.children.props &&
73
+ Menu.props.children.props.onClick
74
+ ) {
75
+ Menu.props.children.props.onClick();
76
+ }
77
+ onAutoclose();
78
+ },
79
+ }),
80
+ ),
81
81
  });
82
82
 
83
83
  useEffect(() => {
@@ -28,6 +28,7 @@ const Input = ({
28
28
  value,
29
29
  min,
30
30
  max,
31
+ maxLength,
31
32
  }) => {
32
33
  const { toCamelCase } = useTextFormatter();
33
34
  const inputRef = useRef(null);
@@ -103,6 +104,7 @@ const Input = ({
103
104
  ref={inputRef}
104
105
  min={min}
105
106
  max={max}
107
+ maxLength={maxLength}
106
108
  />
107
109
  <label htmlFor={id}>{label}</label>
108
110
  </div>
@@ -32,7 +32,6 @@ const InputEmail = ({
32
32
  // GET, Returns a list of emails
33
33
  const fetchNotifications = async () => {
34
34
  const resp = await ComponentsService.getInfo(apiGetEmail);
35
- console.log('resp', resp);
36
35
  setNotifications(resp || []);
37
36
 
38
37
  };