ml-ui-lib 1.0.23 → 1.0.25

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.
@@ -2,8 +2,12 @@ import React from "react";
2
2
  import "./Button.css";
3
3
  export interface ButtonProps {
4
4
  label: string;
5
- variant?: "default" | "white" | "red" | "black" | "tranparent-white";
5
+ variant?: "default" | "white" | "red" | "black" | "transparent-white";
6
6
  onClick?: () => void;
7
7
  disabled?: boolean;
8
+ /** Optional custom colors */
9
+ bgColor?: string;
10
+ textColor?: string;
11
+ borderColor?: string;
8
12
  }
9
13
  export declare const Button: React.FC<ButtonProps>;
@@ -1,5 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "./Button.css";
3
- export const Button = ({ label, variant = "default", onClick, disabled = false }) => {
4
- return (_jsx("button", { className: `btn btn-${variant}`, onClick: onClick, disabled: disabled, children: label }));
3
+ export const Button = ({ label, variant = "default", onClick, disabled = false, bgColor, textColor, borderColor }) => {
4
+ const customStyle = {
5
+ background: bgColor,
6
+ color: textColor,
7
+ border: borderColor ? `1px solid ${borderColor}` : undefined
8
+ };
9
+ return (_jsx("button", { className: `btn btn-${variant}`, onClick: onClick, disabled: disabled, style: customStyle, children: label }));
5
10
  };
@@ -15,18 +15,18 @@ export const Footer = ({ footerItems, logoSrc = '', logoAlt = 'M Lhuillier Logo'
15
15
  { url: '/images/google-play.svg', link: 'https://play.google.com/store/apps/details?id=com.mlhuillier.mlwallet&pli=1' },
16
16
  { url: '/images/app-gallery.svg', link: 'https://appgallery.huawei.com/app/C102221791?source=qrCodeShare&referrer=PCWebAG&callType=SHARE&shareTo=qrcode&shareFrom=appmarket&reportEventLabel=appdetailpage' },
17
17
  ];
18
- return (_jsxs("footer", { className: `footer ${className}`, style: { backgroundColor, color: textColor }, children: [_jsx("div", { className: "footer-container", children: _jsxs("div", { className: "footer-columns", children: [footerItems.map((group, i) => {
19
- // Format the display name
20
- const displayName = group.name
21
- .split('-')
22
- .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
23
- .join(' & ');
24
- return (_jsxs("div", { className: `footer-column footer-column-${i + 1}`, children: [_jsx("h4", { className: "footer-title", children: displayName }), _jsx("ul", { className: "footer-links", children: group.items.map((item, idx) => (_jsx("li", { children: _jsx("a", { href: item.link, target: item.target || '_self', rel: item.target === '_blank' ? 'noopener noreferrer' : undefined, children: item.name }) }, idx))) })] }, i));
25
- }), _jsxs("div", { className: "footer-column socials-and-apps", children: [_jsxs("div", { className: "socials", children: [_jsx("h4", { children: "Social Media" }), _jsx("div", { className: "socials-items", children: [
26
- { name: 'fb', link: 'https://www.facebook.com/mlhuillier.official/' },
27
- { name: 'ig', link: 'https://www.instagram.com/mlhuillier_official/' },
28
- { name: 'x', link: 'https://x.com/KaMLhuillier' },
29
- { name: 'yt', link: 'https://www.youtube.com/user/MLhuillierInc' },
30
- ].map((icon) => (_jsx("a", { href: icon.link, target: "_blank", rel: "noopener noreferrer", children: _jsx("img", { src: `/icons/${icon.name}.svg`, alt: icon.name }) }, icon.name))) })] }), _jsxs("div", { className: "apps", children: [_jsx("h4", { children: "Get the MCash App" }), _jsx("div", { className: "app-items", children: appLinksArr.map((item, index) => (_jsx("a", { href: item.link, children: _jsx("img", { src: item.url, alt: "App download" }) }, index))) })] })] })] }) }), _jsxs("div", { className: 'others', children: [_jsxs("div", { className: "footer-logo", children: [_jsx("a", { href: "/", children: _jsx("img", { src: logoSrc, alt: logoAlt, width: logoWidth, height: logoHeight, style: { display: 'block' } }) }), _jsx("span", { children: "FINANCIAL SERVICES, INC." }), _jsx("br", {}), _jsx("span", { children: "M.Lhuillier Financial Services, Inc. is regulated by the Bangko Sentral ng Pilipinas (BSP). For inquiries or assistance, you may reach us via:" }), _jsx("span", { children: _jsxs("ul", { children: [_jsx("li", { children: "Email: customercare@mlhuillier.com" }), _jsx("li", { children: "Or through our official Social media channels: consumeraaffairs@bsp.gov.ph" })] }) })] }), _jsx("div", { className: 'emblems', children: empblemArr.map((item, index) => (_jsxs("div", { className: "emblem-item", children: [_jsx("img", { src: item.url, alt: item.name }), _jsx("span", { children: item.name })] }, index))) })] }), _jsxs("div", { className: "footer-bottom", children: [_jsxs("p", { children: ["Copyright \u00A9 ", new Date().getFullYear(), " M.Lhuillier Financial Services, Inc."] }), " ", _jsx("p", { children: "All rights reserved." })] })] }));
18
+ return (_jsx("footer", { className: `footer ${className}`, style: { backgroundColor, color: textColor }, children: _jsxs("div", { style: { maxWidth: '1200px', margin: '0 auto' }, children: [_jsx("div", { className: "footer-container", children: _jsxs("div", { className: "footer-columns", children: [footerItems.map((group, i) => {
19
+ // Format the display name
20
+ const displayName = group.name
21
+ .split('-')
22
+ .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
23
+ .join(' & ');
24
+ return (_jsxs("div", { className: `footer-column footer-column-${i + 1}`, children: [_jsx("h4", { className: "footer-title", children: displayName }), _jsx("ul", { className: "footer-links", children: group.items.map((item, idx) => (_jsx("li", { children: _jsx("a", { href: item.link, target: item.target || '_self', rel: item.target === '_blank' ? 'noopener noreferrer' : undefined, children: item.name }) }, idx))) })] }, i));
25
+ }), _jsxs("div", { className: "footer-column socials-and-apps", children: [_jsxs("div", { className: "socials", children: [_jsx("h4", { children: "Social Media" }), _jsx("div", { className: "socials-items", children: [
26
+ { name: 'fb', link: 'https://www.facebook.com/mlhuillier.official/' },
27
+ { name: 'ig', link: 'https://www.instagram.com/mlhuillier_official/' },
28
+ { name: 'x', link: 'https://x.com/KaMLhuillier' },
29
+ { name: 'yt', link: 'https://www.youtube.com/user/MLhuillierInc' },
30
+ ].map((icon) => (_jsx("a", { href: icon.link, target: "_blank", rel: "noopener noreferrer", children: _jsx("img", { src: `/icons/${icon.name}.svg`, alt: icon.name }) }, icon.name))) })] }), _jsxs("div", { className: "apps", children: [_jsx("h4", { children: "Get the MCash App" }), _jsx("div", { className: "app-items", children: appLinksArr.map((item, index) => (_jsx("a", { href: item.link, children: _jsx("img", { src: item.url, alt: "App download" }) }, index))) })] })] })] }) }), _jsxs("div", { className: 'others', children: [_jsxs("div", { className: "footer-logo", children: [_jsx("a", { href: "/", children: _jsx("img", { src: logoSrc, alt: logoAlt, width: logoWidth, height: logoHeight, style: { display: 'block' } }) }), _jsx("span", { children: "FINANCIAL SERVICES, INC." }), _jsx("br", {}), _jsx("span", { children: "M.Lhuillier Financial Services, Inc. is regulated by the Bangko Sentral ng Pilipinas (BSP). For inquiries or assistance, you may reach us via:" }), _jsx("span", { children: _jsxs("ul", { children: [_jsx("li", { children: "Email: customercare@mlhuillier.com" }), _jsx("li", { children: "Or through our official Social media channels: consumeraaffairs@bsp.gov.ph" })] }) })] }), _jsx("div", { className: 'emblems', children: empblemArr.map((item, index) => (_jsxs("div", { className: "emblem-item", children: [_jsx("img", { src: item.url, alt: item.name }), _jsx("span", { children: item.name })] }, index))) })] }), _jsxs("div", { className: "footer-bottom", children: [_jsxs("p", { children: ["Copyright \u00A9 ", new Date().getFullYear(), " M.Lhuillier Financial Services, Inc."] }), " ", _jsx("p", { children: "All rights reserved." })] })] }) }));
31
31
  };
32
32
  export default Footer;
@@ -10,8 +10,8 @@
10
10
  display: flex;
11
11
  justify-content: space-between;
12
12
  align-items: center;
13
- /* max-width: 1200px; */
14
- margin: 0 50px;
13
+ max-width: 1200px;
14
+ margin: 0 auto;
15
15
  }
16
16
 
17
17
  .navbar-logo img {
@@ -43,17 +43,17 @@
43
43
 
44
44
  .navbar-links a:hover {
45
45
  transition: all 0.5s ease;
46
- background: #ff0000;
47
- color: #fff;
46
+ background: #fff;
47
+ color: #ff0000;
48
48
  }
49
49
 
50
50
  .navbar-links a.active {
51
51
  color: #ff0000;
52
52
  }
53
53
 
54
- .navbar-links a.active:hover {
54
+ /* .navbar-links a.active:hover {
55
55
  color: #fff;
56
- }
56
+ } */
57
57
 
58
58
 
59
59
  /* Burger Icon */
@@ -131,6 +131,7 @@
131
131
  }
132
132
 
133
133
  .navbar-container {
134
+ margin: 0 20px;
134
135
  padding: 1rem 1.5rem;
135
136
  justify-content: space-between;
136
137
  }
@@ -166,6 +167,16 @@
166
167
  font-size: 1.2rem;
167
168
  }
168
169
 
170
+ .navbar-links a:hover {
171
+ background: #ff0000;
172
+ color: #fff;
173
+ }
174
+
175
+ .navbar-links a.active:hover {
176
+ color: #fff;
177
+ }
178
+
179
+
169
180
  /* ⭐ MOBILE LOGIN FIXED AT BOTTOM */
170
181
  .mobile-login-btn {
171
182
  position: absolute;
@@ -6,6 +6,7 @@ import { SlidingPanel } from '../SlidingPanel/SlidingPanel';
6
6
  export const Navbar = ({ siteUrl, items, logoSrc = '', logoAlt = 'M Lhuillier Logo', logoWidth = 220, logoHeight = 40, className = '', login = false, logedinData = null, loginContent, otherContent, onClose, }) => {
7
7
  const [menuOpen, setMenuOpen] = useState(false);
8
8
  const [showLogin, setShowLogin] = useState(false);
9
+ const [isClosing, setIsClosing] = useState(false);
9
10
  const [isMobile, setIsMobile] = useState(false);
10
11
  const [currentPath, setCurrentPath] = useState(null);
11
12
  useEffect(() => {
@@ -16,11 +17,18 @@ export const Navbar = ({ siteUrl, items, logoSrc = '', logoAlt = 'M Lhuillier Lo
16
17
  return () => window.removeEventListener('resize', handleResize);
17
18
  }, []);
18
19
  const toggleMenu = () => setMenuOpen((prev) => !prev);
19
- const toggleLogin = () => setShowLogin((prev) => !prev);
20
+ const toggleLogin = () => {
21
+ setMenuOpen(false);
22
+ setShowLogin((prev) => !prev);
23
+ };
20
24
  const handleInternalClose = () => {
21
- setShowLogin(false);
22
- document.body.style.overflow = '';
23
- onClose?.();
25
+ setIsClosing(true);
26
+ setTimeout(() => {
27
+ setShowLogin(false);
28
+ setIsClosing(false);
29
+ document.body.style.overflow = '';
30
+ onClose?.();
31
+ }, 350); // match CSS transition
24
32
  };
25
33
  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
34
  const linkPath = new URL(item.link, 'https://dummybase').pathname;
@@ -31,6 +39,6 @@ export const Navbar = ({ siteUrl, items, logoSrc = '', logoAlt = 'M Lhuillier Lo
31
39
  .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
32
40
  .join(' & ')
33
41
  : 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" }) })] }) })) }))] }));
42
+ }) }), _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 && !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("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" }) })] }) })) }))] }));
35
43
  };
36
44
  export default Navbar;
@@ -145,13 +145,14 @@
145
145
  font-size: 20px;
146
146
  line-height: 1;
147
147
  cursor: pointer;
148
- padding: 5px 15px;
148
+ padding: 5px 10px;
149
149
  border-radius: 6px;
150
150
  color: #111827;
151
+ margin-right: 7px;
151
152
  }
152
153
 
153
154
  .spb-close-btn:hover {
154
- background: rgba(0, 0, 0, 0.03);
155
+ background: rgb(255 0 0 / 27%);
155
156
  }
156
157
 
157
158
  /* Handle (mobile) */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ml-ui-lib",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",