ml-ui-lib 1.0.26 → 1.0.28

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.
@@ -39,20 +39,40 @@
39
39
  }
40
40
 
41
41
  /* Dropdown menu */
42
+ .navbar-dropdown-content {
43
+ position: relative;
44
+ top: 15px;
45
+ padding: 12px 45px 12px 20px;
46
+ background: #fff;
47
+ border-radius: 22px;
48
+ /* bubble feel */
49
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
50
+ }
51
+
52
+ .navbar-dropdown-content::before {
53
+ content: "";
54
+ position: absolute;
55
+ top: -8px;
56
+ right: 30px;
57
+ /* adjust to align under text */
58
+ width: 15px;
59
+ height: 15px;
60
+ background: #fff;
61
+ transform: rotate(45deg);
62
+ box-shadow: -4px 2px 8px rgba(0, 0, 0, 0.05);
63
+ }
64
+
65
+
42
66
  .navbar-dropdown {
43
- /* hidden by default */
44
- display: none;
45
- padding: 20px 25px 10px 10px;
46
67
  position: absolute;
47
68
  top: 20px;
48
- left: -25px;
49
- background: #fff;
50
- min-width: 180px;
51
- /* box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); */
52
- flex-direction: column;
53
- z-index: 999;
69
+ /* slightly lower for bubble spacing */
70
+ left: -35px;
71
+ display: none;
72
+ z-index: 10;
54
73
  }
55
74
 
75
+
56
76
  .navbar-dropdown-link {
57
77
  padding: 10px 15px;
58
78
  color: #000;
@@ -224,6 +244,7 @@
224
244
  .nav-items {
225
245
  gap: 0px;
226
246
  flex-direction: column;
247
+ overflow: auto;
227
248
  }
228
249
 
229
250
  .navbar-links {
@@ -11,7 +11,7 @@ export const Navbar = ({ siteUrl, items, logoSrc = '', logoAlt = 'M Lhuillier Lo
11
11
  const [currentPath, setCurrentPath] = useState(null);
12
12
  const [openDropdown, setOpenDropdown] = useState(null);
13
13
  useEffect(() => {
14
- const handleResize = () => setIsMobile(window.innerWidth <= 590);
14
+ const handleResize = () => setIsMobile(window.innerWidth <= 992);
15
15
  handleResize();
16
16
  setCurrentPath(window.location.pathname);
17
17
  window.addEventListener('resize', handleResize);
@@ -74,10 +74,10 @@ export const Navbar = ({ siteUrl, items, logoSrc = '', logoAlt = 'M Lhuillier Lo
74
74
  display: isMobile
75
75
  ? isDropdownOpen ? 'flex' : 'none'
76
76
  : undefined,
77
- }, children: item.subLinks.map(sub => (_jsx("a", { href: sub.link, target: sub.target || '_self', className: "navbar-dropdown-link", onClick: () => {
78
- setMenuOpen(false);
79
- setOpenDropdown(null);
80
- }, children: sub.name }, sub.name))) }))] }, item.name));
77
+ }, children: _jsx("div", { className: 'navbar-dropdown-content', children: item.subLinks.map(sub => (_jsx("a", { href: sub.link, target: sub.target || '_self', className: "navbar-dropdown-link", onClick: () => {
78
+ setMenuOpen(false);
79
+ setOpenDropdown(null);
80
+ }, children: sub.name }, sub.name))) }) }))] }, item.name));
81
81
  }) }), isMobile && login && !logedinData && (_jsx("button", { className: "mobile-login-btn", onClick: toggleLogin, children: "Login" }))] }), _jsx("div", { className: 'separator', style: { color: '#aaaaaa', fontSize: '27px', padding: '0 15px' }, children: " | " }), _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", { style: { color: '#e00000', fontWeight: '700' }, 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 && !isClosing, 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("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 })] }) })) }))] }));
82
82
  };
83
83
  export default Navbar;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ml-ui-lib",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",