groovinads-ui 1.2.55 → 1.2.57

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.55",
4
+ "version": "1.2.57",
5
5
  "keywords": [
6
6
  "css",
7
7
  "sass",
@@ -21,13 +21,11 @@ const Sidebar = ({
21
21
  onNavigate,
22
22
  selectedClient,
23
23
  showClients = false,
24
- setGroovinProfile,
25
- inModal = false,
26
- customUrl,
24
+ setGroovinProfile
27
25
  }) => {
28
- const isMobile = inModal ? true : useMediaQuery({ query: '(max-width: 992px)' });
26
+ const isMobile = useMediaQuery({ query: '(max-width: 992px)' });
29
27
 
30
- const url = customUrl !== undefined ? customUrl : window.location.pathname; // to get current url
28
+ const url = window.location.pathname; // to get current url
31
29
 
32
30
  const [sidebarLinks, setSidebarLinks] = useState([]);
33
31
  const [openIndex, setOpenIndex] = useState(null);
@@ -54,33 +52,29 @@ const Sidebar = ({
54
52
  }, [show]);
55
53
 
56
54
  useEffect(() => {
57
- if (isMobile && setShow && !inModal) setShow(innerShow);
58
- if (!inModal) setInnerShow(isMobile ? false : firstOpen.current ? defaultOpened : show);
55
+ if (isMobile && setShow) setShow(innerShow);
56
+ setInnerShow(isMobile ? false : firstOpen.current ? defaultOpened : show);
59
57
  firstOpen.current = false;
60
58
  }, []);
61
59
 
62
60
  return (
63
61
  <Collapse in={innerShow} dimension={'width'}>
64
62
  <nav id='sidebarMenu' className='sidebar' ref={sidebarRef}>
65
- {!inModal ? (
66
- <div className='position-relative d-none d-lg-block'>
67
- <button
68
- className='collapse-button'
69
- // Toggle the sidebar
70
- onClick={() => setInnerShow((prev) => !prev)}
71
- >
72
- <Icon className='collapse-icon' iconName='chevron-left' />
73
- </button>
74
- </div>
75
- ) : (
76
- <></>
77
- )}
63
+ <div className='position-relative d-none d-lg-block'>
64
+ <button
65
+ className='collapse-button'
66
+ // Toggle the sidebar
67
+ onClick={() => setInnerShow((prev) => !prev)}
68
+ >
69
+ <Icon className='collapse-icon' iconName='chevron-left' />
70
+ </button>
71
+ </div>
78
72
 
79
73
  {/* SECTIONS */}
80
74
  <div className='scroll'>
81
75
  {customLinks.map((section, i) => (
82
76
  <div className='sidebar-section' key={`sectionIndex${i}`}>
83
- {section.title ? <h4>{section.title}</h4> : <></> }
77
+ <h4>{section.title}</h4>
84
78
 
85
79
  {/* PROPS LINKS */}
86
80
  {(section.backData ? sidebarLinks : section.links || []).map(
@@ -161,12 +155,7 @@ Sidebar.propTypes = {
161
155
  onNavigate: PropTypes.func.isRequired, // Nueva prop para manejar la navegación
162
156
  selectedClient: PropTypes.object,
163
157
  showClients:PropTypes.oneOf([true, false, 'single']),
164
- setGroovinProfile: PropTypes.func,
165
- inModal: PropTypes.bool,
166
- customUrl: PropTypes.oneOfType([
167
- PropTypes.string,
168
- PropTypes.oneOf([undefined])
169
- ]),
158
+ setGroovinProfile: PropTypes.func
170
159
  };
171
160
 
172
161
  export default Sidebar;
@@ -14,6 +14,8 @@ function ToastCardComponent({ variant, autoClose, children, className, position
14
14
  error: 'circle-xmark',
15
15
  };
16
16
 
17
+ console.log('Hola');
18
+
17
19
  return (
18
20
  <Toast
19
21
  onClose={toggleShow}