ml-ui-lib 1.0.19 → 1.0.21

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.
@@ -297,9 +297,9 @@
297
297
  text-align: center;
298
298
  }
299
299
 
300
- .footer-column {
300
+ /* .footer-column {
301
301
  text-align: center;
302
- }
302
+ } */
303
303
 
304
304
  .footer-bottom {
305
305
  flex-direction: column;
@@ -20,7 +20,7 @@
20
20
 
21
21
  .navbar-links {
22
22
  display: flex;
23
- gap: 1.5rem;
23
+ /* gap: 1.5rem; */
24
24
  transition: all 0.3s ease;
25
25
  margin-left: 35px;
26
26
  }
@@ -29,18 +29,24 @@
29
29
  text-decoration: none;
30
30
  color: #333;
31
31
  font-weight: 400;
32
- font-size: 1rem;
32
+ font-size: 17px;
33
33
  transition: color 0.2s;
34
34
  }
35
35
 
36
36
  .navbar-links a:hover {
37
- color: #ff0000;
37
+ transition: all 0.5s ease;
38
+ background: #ff0000;
39
+ color: #fff;
38
40
  }
39
41
 
40
42
  .navbar-links a.active {
41
43
  color: #ff0000;
42
44
  }
43
45
 
46
+ .navbar-links a.active:hover {
47
+ color: #fff;
48
+ }
49
+
44
50
 
45
51
  /* Burger Icon */
46
52
  .burger {
@@ -97,49 +103,79 @@
97
103
 
98
104
  }
99
105
 
106
+ .mobile-login-btn {
107
+ display: none;
108
+ }
109
+
100
110
  /* Responsive Menu */
101
111
  @media (max-width: 992px) {
112
+ .mobile-login-btn {
113
+ display: block;
114
+ }
115
+
116
+ .login-btn {
117
+ display: none !important;
118
+ }
119
+
102
120
  .burger {
103
121
  display: flex;
122
+ z-index: 10000;
104
123
  }
105
124
 
106
125
  .navbar-container {
107
126
  padding: 1rem 1.5rem;
127
+ justify-content: space-between;
128
+ }
129
+
130
+ /* ⭐ SLIDE-IN MENU */
131
+
132
+ .nav-items {
133
+ display: flex;
134
+ flex-direction: column;
135
+ overflow: auto;
108
136
  }
109
137
 
110
138
  .navbar-links {
111
- position: absolute;
112
- top: 65px;
113
- right: 0;
139
+ position: fixed;
140
+ top: 0;
141
+ right: -100%;
142
+ height: 100vh;
143
+ width: 400px;
114
144
  background: #fff;
115
145
  flex-direction: column;
116
- align-items: flex-start;
117
- width: 100%;
118
- max-height: 0;
119
- overflow: hidden;
120
- opacity: 0;
121
- transition: all 0.3s ease;
122
- padding: 0 2rem;
123
- z-index: 100;
146
+ padding: 65px 0px 70px;
147
+ transition: right 0.3s ease-in-out;
148
+ box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
149
+ z-index: 9999;
124
150
  }
125
151
 
126
152
  .navbar-links.open {
127
- max-height: 460px;
128
- opacity: 1;
129
- padding: 1rem 2rem;
130
- border-bottom: 1px solid #eee;
153
+ right: 0;
131
154
  }
132
155
 
133
156
  .navbar-links a {
134
- padding: 0.75rem 0;
157
+ padding: 1rem 50px;
135
158
  width: 100%;
159
+ font-size: 1.2rem;
136
160
  }
137
161
 
138
- .navbar-logo img {
139
- height: 35px;
162
+ /* MOBILE LOGIN FIXED AT BOTTOM */
163
+ .mobile-login-btn {
164
+ position: absolute;
165
+ bottom: 0;
166
+ left: 0;
167
+ width: 100%;
168
+ padding: 1.3rem;
169
+ border: none;
170
+ /* background: #d00000; */
171
+ color: #333;
172
+ font-size: 1.1rem;
173
+ font-weight: 600;
174
+ /* text-align: center; */
140
175
  }
141
176
  }
142
177
 
178
+
143
179
  /* Login Button */
144
180
  .login-btn {
145
181
  color: #333;
@@ -207,4 +243,36 @@
207
243
  background: rgba(255, 0, 0, 1) !important;
208
244
  backdrop-filter: blur(3px);
209
245
  }
246
+
247
+ .navbar-links {
248
+ width: 100%;
249
+ }
250
+ }
251
+
252
+ /* Right-side group */
253
+ .navbar-right {
254
+ display: flex;
255
+ align-items: center;
256
+ gap: 20px;
257
+ }
258
+
259
+ ::-webkit-scrollbar {
260
+ width: 5px;
261
+ }
262
+
263
+ /* Track */
264
+ ::-webkit-scrollbar-track {
265
+ box-shadow: inset 0 0 5px grey;
266
+ border-radius: 10px;
267
+ }
268
+
269
+ /* Handle */
270
+ ::-webkit-scrollbar-thumb {
271
+ background: #757575;
272
+ border-radius: 10px;
273
+ }
274
+
275
+ /* Handle on hover */
276
+ ::-webkit-scrollbar-thumb:hover {
277
+ background: #4f4f4f;
210
278
  }
@@ -22,18 +22,15 @@ export const Navbar = ({ siteUrl, items, logoSrc = '', logoAlt = 'M Lhuillier Lo
22
22
  document.body.style.overflow = '';
23
23
  onClose?.();
24
24
  };
25
- return (_jsxs(_Fragment, { children: [_jsx("nav", { className: `navbar ${className}`, children: _jsxs("div", { className: "navbar-container", children: [_jsxs("div", { style: { display: 'flex', gap: '10px', alignItems: 'center' }, children: [_jsxs("button", { className: `burger ${menuOpen ? 'active' : ''}`, onClick: toggleMenu, "aria-label": "Toggle menu", children: [_jsx("span", {}), _jsx("span", {}), _jsx("span", {})] }), _jsx("div", { className: "navbar-logo", children: _jsx("a", { href: siteUrl, className: "navbar-brand", children: _jsx("img", { src: logoSrc, alt: logoAlt, width: logoWidth, height: logoHeight, style: { cursor: 'pointer', display: 'block' } }) }) }), _jsx("div", { className: `navbar-links ${menuOpen ? 'open' : ''}`, children: items.map((item) => {
26
- const linkPath = new URL(item.link, 'https://dummybase').pathname;
27
- const isActive = currentPath === linkPath;
28
- return (_jsx("a", { href: item.link, target: item.target || '_self', rel: item.target === '_blank' ? 'noopener noreferrer' : undefined, className: `navbar-link ${isActive ? 'active' : ''}`, onClick: () => setMenuOpen(false), children: item.name.includes('-')
29
- ? item.name
30
- .split('-')
31
- .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
32
- .join(' & ')
33
- : item.name }, item.name));
34
- }) })] }), login &&
35
- (logedinData ? (_jsxs("div", { className: "navbar-user", children: ["Hello, ", logedinData.name || 'User'] })) : (_jsx("span", { className: "login-btn", onClick: toggleLogin, children: "Login" })))] }) }), login && !logedinData && (_jsx(_Fragment, { children: !isMobile ? (_jsx(_Fragment, { children: showLogin && (_jsxs(_Fragment, { children: [_jsx("div", { className: "overlay-side-content", children: otherContent }), _jsx("div", { className: "navbar-login-panel", children: _jsxs(SlidingPanel, { isOpen: showLogin, width: "400px", height: "100%", position: "right", onClose: handleInternalClose, closeOnOverlayClick: false, children: [_jsx("div", { className: "navbar-panel-header" }), _jsx("div", { className: "navbar-panel-content", children: loginContent || _jsx("p", { children: "Login form goes here" }) })] }) })] })) })) : (
36
- /* Mobile → Bottom sliding */
37
- _jsx("div", { className: "navbar-login-panel", children: _jsxs(SlidingPanel, { isOpen: showLogin, height: "70%", onClose: handleInternalClose, position: "bottom", children: [_jsx("div", { className: "navbar-panel-header" }), _jsx("div", { className: "navbar-panel-content", children: loginContent || _jsx("p", { children: "Login form goes here" }) })] }) })) }))] }));
25
+ return (_jsxs(_Fragment, { children: [_jsx("nav", { className: `navbar ${className}`, children: _jsxs("div", { className: "navbar-container", children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'row', gap: '10px', alignItems: 'center' }, children: [_jsx("div", { className: "navbar-logo", children: _jsx("a", { href: siteUrl, className: "navbar-brand", children: _jsx("img", { src: logoSrc, alt: logoAlt, width: logoWidth, height: logoHeight, style: { cursor: 'pointer', display: 'block' } }) }) }), _jsxs("div", { className: `navbar-links ${menuOpen ? 'open' : ''}`, children: [_jsx("div", { className: 'nav-items', children: items.map((item) => {
26
+ const linkPath = new URL(item.link, 'https://dummybase').pathname;
27
+ const isActive = currentPath === linkPath;
28
+ return (_jsx("a", { href: item.link, target: item.target || '_self', className: `navbar-link ${isActive ? 'active' : ''}`, onClick: () => setMenuOpen(false), children: item.name.includes('-')
29
+ ? item.name
30
+ .split('-')
31
+ .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
32
+ .join(' & ')
33
+ : item.name }, item.name));
34
+ }) }), _jsx("button", { className: "mobile-login-btn", onClick: toggleLogin, children: "Login" })] })] }), _jsxs("div", { className: "navbar-right", children: [_jsxs("button", { className: `burger ${menuOpen ? 'active' : ''}`, onClick: toggleMenu, "aria-label": "Toggle menu", children: [_jsx("span", {}), _jsx("span", {}), _jsx("span", {})] }), !isMobile && login && !logedinData && (_jsx("span", { className: "login-btn", onClick: toggleLogin, children: "Login" }))] })] }) }), login && !logedinData && (_jsx(_Fragment, { children: !isMobile ? (showLogin && (_jsxs(_Fragment, { children: [_jsx("div", { className: "overlay-side-content", children: otherContent }), _jsx("div", { className: "navbar-login-panel", children: _jsxs(SlidingPanel, { isOpen: showLogin, width: "400px", height: "100%", position: "right", closeOnOverlayClick: false, onClose: handleInternalClose, children: [_jsx("div", { className: "navbar-panel-header" }), _jsx("div", { className: "navbar-panel-content", children: loginContent || _jsx("p", { children: "Login form goes here" }) })] }) })] }))) : (_jsx("div", { className: "navbar-login-panel", children: _jsxs(SlidingPanel, { isOpen: showLogin, height: "70%", position: "bottom", onClose: handleInternalClose, children: [_jsx("div", { className: "navbar-panel-header" }), _jsx("div", { className: "navbar-panel-content", children: loginContent || _jsx("p", { children: "Login form goes here" }) })] }) })) }))] }));
38
35
  };
39
36
  export default Navbar;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ml-ui-lib",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",