@momo-webplatform/mobase 0.0.25 → 0.0.27
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 +4 -2
- package/publish/cjs/components/Card/Card.js +47 -0
- package/publish/cjs/components/Card/index.js +10 -0
- package/publish/cjs/components/Dialog/Dialog.js +64 -0
- package/publish/cjs/components/Dialog/index.js +15 -0
- package/publish/cjs/components/Footer/Footer.js +15 -0
- package/publish/cjs/components/Footer/FooterContent.js +27 -0
- package/publish/cjs/components/Footer/index.js +5 -0
- package/publish/cjs/components/Header/Header.js +19 -0
- package/publish/cjs/components/Header/ListItem.js +12 -0
- package/publish/cjs/components/Header/ListItemMobile.js +15 -0
- package/publish/cjs/components/Header/MobileMenu.js +61 -0
- package/publish/cjs/components/Header/NavItems.js +26 -0
- package/publish/cjs/components/Header/NavItemsMobile.js +35 -0
- package/publish/cjs/components/Header/index.js +5 -0
- package/publish/cjs/components/NavigationMenu/NavigationMenu.js +1 -1
- package/publish/cjs/components/Select/Select.js +7 -22
- package/publish/cjs/components/Toast/toaster.js +1 -1
- package/publish/cjs/helpers/animations.js +18 -0
- package/publish/cjs/helpers/constants.js +204 -0
- package/publish/cjs/helpers/utils.js +15 -1
- package/publish/cjs/index.js +4 -0
- package/publish/cjs/mobase-tw-plugin/plugin.js +54 -1
- package/publish/cjs/tsconfig.lib.tsbuildinfo +1 -1
- package/publish/esm/components/Badge/Badge.d.ts +1 -0
- package/publish/esm/components/Breadcrumb/Breadcrumb.d.ts +1 -0
- package/publish/esm/components/Card/Card.d.ts +9 -0
- package/publish/esm/components/Card/Card.js +16 -0
- package/publish/esm/components/Card/index.d.ts +1 -0
- package/publish/esm/components/Card/index.js +1 -0
- package/publish/esm/components/Dialog/Dialog.d.ts +47 -0
- package/publish/esm/components/Dialog/Dialog.js +28 -0
- package/publish/esm/components/Dialog/index.d.ts +1 -0
- package/publish/esm/components/Dialog/index.js +1 -0
- package/publish/esm/components/Footer/Footer.d.ts +22 -0
- package/publish/esm/components/Footer/Footer.js +9 -0
- package/publish/esm/components/Footer/FooterContent.d.ts +4 -0
- package/publish/esm/components/Footer/FooterContent.js +27 -0
- package/publish/esm/components/Footer/index.d.ts +1 -0
- package/publish/esm/components/Footer/index.js +1 -0
- package/publish/esm/components/Header/Header.d.ts +44 -0
- package/publish/esm/components/Header/Header.js +13 -0
- package/publish/esm/components/Header/ListItem.d.ts +9 -0
- package/publish/esm/components/Header/ListItem.js +10 -0
- package/publish/esm/components/Header/ListItemMobile.d.ts +9 -0
- package/publish/esm/components/Header/ListItemMobile.js +10 -0
- package/publish/esm/components/Header/MobileMenu.d.ts +6 -0
- package/publish/esm/components/Header/MobileMenu.js +56 -0
- package/publish/esm/components/Header/NavItems.d.ts +2 -0
- package/publish/esm/components/Header/NavItems.js +21 -0
- package/publish/esm/components/Header/NavItemsMobile.d.ts +2 -0
- package/publish/esm/components/Header/NavItemsMobile.js +30 -0
- package/publish/esm/components/Header/index.d.ts +1 -0
- package/publish/esm/components/Header/index.js +1 -0
- package/publish/esm/components/NavigationMenu/NavigationMenu.js +1 -1
- package/publish/esm/components/Select/Select.js +7 -22
- package/publish/esm/components/Toast/toaster.js +1 -1
- package/publish/esm/helpers/animations.d.ts +26 -0
- package/publish/esm/helpers/animations.js +14 -0
- package/publish/esm/helpers/constants.d.ts +69 -0
- package/publish/esm/helpers/constants.js +201 -0
- package/publish/esm/helpers/utils.d.ts +6 -0
- package/publish/esm/helpers/utils.js +13 -0
- package/publish/esm/index.d.ts +4 -0
- package/publish/esm/index.js +4 -0
- package/publish/esm/mobase-tw-plugin/plugin.js +54 -1
- package/publish/esm/tsconfig.lib.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@momo-webplatform/mobase",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.27",
|
|
4
4
|
"description": "Mobase is the UI framework upon we build product experiences at MoMo.vn, base on Radix primitives, and Tailwind CSS.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "next dev",
|
|
@@ -70,7 +70,8 @@
|
|
|
70
70
|
"deepmerge": "^4.3.1",
|
|
71
71
|
"dlv": "^1.1.3",
|
|
72
72
|
"flat": "^3.0.1",
|
|
73
|
-
"framer-motion": "^11.0.
|
|
73
|
+
"framer-motion": "^11.0.24",
|
|
74
|
+
"html-react-parser": "^5.1.10",
|
|
74
75
|
"lodash": "^4.17.21",
|
|
75
76
|
"lodash.foreach": "^4.5.0",
|
|
76
77
|
"lodash.omit": "^4.5.0",
|
|
@@ -85,6 +86,7 @@
|
|
|
85
86
|
"react-dom": "^18.2.0",
|
|
86
87
|
"react-icons": "^4.11.0",
|
|
87
88
|
"react-indiana-drag-scroll": "^2.2.0",
|
|
89
|
+
"react-use": "^17.5.0",
|
|
88
90
|
"tailwind-merge": "^2.2.0",
|
|
89
91
|
"tailwindcss": "^3.4.3",
|
|
90
92
|
"tailwindcss-animate": "^1.0.7",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.CardContent = exports.CardDescription = exports.CardTitle = exports.CardFooter = exports.CardHeader = exports.Card = void 0;
|
|
27
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
const React = __importStar(require("react"));
|
|
29
|
+
const utils_1 = require("../../helpers/utils");
|
|
30
|
+
const Card = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("div", { ref: ref, className: (0, utils_1.cn)("rounded-xl border bg-card text-card-foreground shadow", className), ...props })));
|
|
31
|
+
exports.Card = Card;
|
|
32
|
+
Card.displayName = "Card";
|
|
33
|
+
const CardHeader = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("div", { ref: ref, className: (0, utils_1.cn)("flex flex-col space-y-1.5 p-6", className), ...props })));
|
|
34
|
+
exports.CardHeader = CardHeader;
|
|
35
|
+
CardHeader.displayName = "CardHeader";
|
|
36
|
+
const CardTitle = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("h3", { ref: ref, className: (0, utils_1.cn)("font-semibold leading-none tracking-tight", className), ...props })));
|
|
37
|
+
exports.CardTitle = CardTitle;
|
|
38
|
+
CardTitle.displayName = "CardTitle";
|
|
39
|
+
const CardDescription = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("p", { ref: ref, className: (0, utils_1.cn)("text-sm text-muted-foreground", className), ...props })));
|
|
40
|
+
exports.CardDescription = CardDescription;
|
|
41
|
+
CardDescription.displayName = "CardDescription";
|
|
42
|
+
const CardContent = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("div", { ref: ref, className: (0, utils_1.cn)("p-6 pt-0", className), ...props })));
|
|
43
|
+
exports.CardContent = CardContent;
|
|
44
|
+
CardContent.displayName = "CardContent";
|
|
45
|
+
const CardFooter = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("div", { ref: ref, className: (0, utils_1.cn)("flex items-center p-6 pt-0", className), ...props })));
|
|
46
|
+
exports.CardFooter = CardFooter;
|
|
47
|
+
CardFooter.displayName = "CardFooter";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CardTitle = exports.CardHeader = exports.CardFooter = exports.CardDescription = exports.CardContent = exports.Card = void 0;
|
|
4
|
+
var Card_1 = require("./Card");
|
|
5
|
+
Object.defineProperty(exports, "Card", { enumerable: true, get: function () { return Card_1.Card; } });
|
|
6
|
+
Object.defineProperty(exports, "CardContent", { enumerable: true, get: function () { return Card_1.CardContent; } });
|
|
7
|
+
Object.defineProperty(exports, "CardDescription", { enumerable: true, get: function () { return Card_1.CardDescription; } });
|
|
8
|
+
Object.defineProperty(exports, "CardFooter", { enumerable: true, get: function () { return Card_1.CardFooter; } });
|
|
9
|
+
Object.defineProperty(exports, "CardHeader", { enumerable: true, get: function () { return Card_1.CardHeader; } });
|
|
10
|
+
Object.defineProperty(exports, "CardTitle", { enumerable: true, get: function () { return Card_1.CardTitle; } });
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.DialogDescription = exports.DialogTitle = exports.DialogFooter = exports.DialogBody = exports.DialogHeader = exports.DialogContent = exports.DialogTrigger = exports.DialogClose = exports.DialogOverlay = exports.DialogPortal = exports.Dialog = void 0;
|
|
27
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
const React = __importStar(require("react"));
|
|
29
|
+
const DialogPrimitive = __importStar(require("@radix-ui/react-dialog"));
|
|
30
|
+
const utils_1 = require("../../helpers/utils");
|
|
31
|
+
const solid_1 = require("@heroicons/react/24/solid");
|
|
32
|
+
const Dialog = DialogPrimitive.Root;
|
|
33
|
+
exports.Dialog = Dialog;
|
|
34
|
+
const DialogTrigger = DialogPrimitive.Trigger;
|
|
35
|
+
exports.DialogTrigger = DialogTrigger;
|
|
36
|
+
const DialogPortal = DialogPrimitive.Portal;
|
|
37
|
+
exports.DialogPortal = DialogPortal;
|
|
38
|
+
const DialogClose = DialogPrimitive.Close;
|
|
39
|
+
exports.DialogClose = DialogClose;
|
|
40
|
+
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(DialogPrimitive.Overlay, { ref: ref, className: (0, utils_1.cn)("fixed inset-0 z-50 bg-black/60 !duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props })));
|
|
41
|
+
exports.DialogOverlay = DialogOverlay;
|
|
42
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
43
|
+
const DialogContent = React.forwardRef(({ className, isRightCloseButton, size = "md", position = "center", isFull = false, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(DialogPortal, { children: [(0, jsx_runtime_1.jsx)(DialogOverlay, {}), (0, jsx_runtime_1.jsxs)(DialogPrimitive.Content, { ref: ref, className: (0, utils_1.cn)("fixed z-50 flex border bg-background shadow-lg sm:rounded-lg bg-white text-gray-900 max-h-full w-full max-w-full flex-col", size === "sm" && "md:max-w-xs max-h-[432px] md:max-h-[432px]", size === "md" && "md:max-w-lg max-h-[432px] md:max-h-[432px]", size === "lg" && "md:max-w-2xl max-h-[454px] md:max-h-[454px]", size === "xl" && "md:max-w-5xl max-h-[640px] md:max-h-[640px]", position === "center" &&
|
|
44
|
+
"left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] max-w-xs rounded-lg", position === "left" &&
|
|
45
|
+
"!duration-300 max-h-screen md:max-h-screen rounded-r-lg sm:rounded-l-none h-full top-0 data-[state=open]:animate-in data-[state=open]:slide-in-from-left data-[state=closed]:animate-out data-[state=closed]:slide-out-to-left max-w-xs ease-in-out", position === "right" &&
|
|
46
|
+
"!duration-300 max-h-screen md:max-h-screen rounded-l-lg sm:rounded-r-none h-full top-0 right-0 data-[state=open]:animate-in data-[state=open]:slide-in-from-right data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right max-w-xs ease-in-out", position === "bottom" &&
|
|
47
|
+
"!duration-300 bottom-0 sm:bottom-1/2 left-1/2 rounded-t-lg sm:translate-y-1/2 data-[state=closed]:animate-out -translate-x-1/2 data-[state=open]:animate-in data-[state=open]:slide-in-from-left-1/2 ease-in-out data-[state=open]:slide-in-from-bottom-2/3 data-[state=closed]:slide-out-to-bottom-2/3 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", isFull && "h-full max-h-screen max-w-full w-full rounded-none", className), ...props, children: [children, (0, jsx_runtime_1.jsxs)(DialogPrimitive.Close, { className: (0, utils_1.cn)("absolute md:top-4 top-2 focus:outline-none focus:ring-0 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-gray-900 w-8 h-8 flex justify-center items-center rounded-full hover:bg-gray-50 hover:bg-opacity-20 hover:opacity-70", isRightCloseButton ? "md:right-4 right-3" : "md:left-4 left-3"), title: "\u0110\u00F3ng", children: [(0, jsx_runtime_1.jsx)(solid_1.XMarkIcon, { className: "h-5 w-5 text-gray-900" }), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Close" })] })] })] })));
|
|
48
|
+
exports.DialogContent = DialogContent;
|
|
49
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
50
|
+
const DialogHeader = ({ className, ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("dialog-header py-2 md:py-4 h-12 md:h-16 px-10 md:px-12 items-center justify-center flex border-b border-gray-200 w-full shrink-0", className), ...props }));
|
|
51
|
+
exports.DialogHeader = DialogHeader;
|
|
52
|
+
DialogHeader.displayName = "DialogHeader";
|
|
53
|
+
const DialogBody = ({ className, isCondensed = false, ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("dialog-body p-6 flex-1 overflow-y-auto", isCondensed && "p-5", className), ...props }));
|
|
54
|
+
exports.DialogBody = DialogBody;
|
|
55
|
+
DialogBody.displayName = "DialogBody";
|
|
56
|
+
const DialogFooter = ({ className, isDivider = true, ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("dialog-footer flex sm:flex-row justify-center [&>*]:basis-1/2 [&>*]:sm:basis-auto sm:justify-end space-x-2 px-6 pb-4 shrink-0", isDivider && "border-gray-200 border-t py-4", className), ...props }));
|
|
57
|
+
exports.DialogFooter = DialogFooter;
|
|
58
|
+
DialogFooter.displayName = "DialogFooter";
|
|
59
|
+
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(DialogPrimitive.Title, { ref: ref, className: (0, utils_1.cn)("text-base font-bold line-clamp-1 max-w-full", className), ...props })));
|
|
60
|
+
exports.DialogTitle = DialogTitle;
|
|
61
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
62
|
+
const DialogDescription = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(DialogPrimitive.Description, { ref: ref, className: (0, utils_1.cn)("text-sm text-muted-foreground", className), ...props })));
|
|
63
|
+
exports.DialogDescription = DialogDescription;
|
|
64
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DialogDescription = exports.DialogTitle = exports.DialogFooter = exports.DialogBody = exports.DialogHeader = exports.DialogContent = exports.DialogTrigger = exports.DialogClose = exports.DialogOverlay = exports.DialogPortal = exports.Dialog = void 0;
|
|
4
|
+
var Dialog_1 = require("./Dialog");
|
|
5
|
+
Object.defineProperty(exports, "Dialog", { enumerable: true, get: function () { return Dialog_1.Dialog; } });
|
|
6
|
+
Object.defineProperty(exports, "DialogPortal", { enumerable: true, get: function () { return Dialog_1.DialogPortal; } });
|
|
7
|
+
Object.defineProperty(exports, "DialogOverlay", { enumerable: true, get: function () { return Dialog_1.DialogOverlay; } });
|
|
8
|
+
Object.defineProperty(exports, "DialogClose", { enumerable: true, get: function () { return Dialog_1.DialogClose; } });
|
|
9
|
+
Object.defineProperty(exports, "DialogTrigger", { enumerable: true, get: function () { return Dialog_1.DialogTrigger; } });
|
|
10
|
+
Object.defineProperty(exports, "DialogContent", { enumerable: true, get: function () { return Dialog_1.DialogContent; } });
|
|
11
|
+
Object.defineProperty(exports, "DialogHeader", { enumerable: true, get: function () { return Dialog_1.DialogHeader; } });
|
|
12
|
+
Object.defineProperty(exports, "DialogBody", { enumerable: true, get: function () { return Dialog_1.DialogBody; } });
|
|
13
|
+
Object.defineProperty(exports, "DialogFooter", { enumerable: true, get: function () { return Dialog_1.DialogFooter; } });
|
|
14
|
+
Object.defineProperty(exports, "DialogTitle", { enumerable: true, get: function () { return Dialog_1.DialogTitle; } });
|
|
15
|
+
Object.defineProperty(exports, "DialogDescription", { enumerable: true, get: function () { return Dialog_1.DialogDescription; } });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Footer = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const FooterContent_1 = __importDefault(require("./FooterContent"));
|
|
10
|
+
const utils_1 = require("../../helpers/utils");
|
|
11
|
+
const Footer = (0, react_1.memo)(({ className, dataMenu }) => {
|
|
12
|
+
// const { logo, name, url } = serviceInfo;
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("footer", { className: (0, utils_1.cn)("grid grid-cols-1 flex-wrap bg-gray-900", className), children: (0, jsx_runtime_1.jsx)(FooterContent_1.default, { dataMenu: dataMenu }) }));
|
|
14
|
+
});
|
|
15
|
+
exports.Footer = Footer;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const constants_1 = require("../../helpers/constants");
|
|
5
|
+
const utils_1 = require("../../helpers/utils");
|
|
6
|
+
const FooterContent = ({ dataMenu }) => {
|
|
7
|
+
const data = dataMenu || constants_1.FooterItemsDefault;
|
|
8
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "footer-main order-2 py-7 text-white md:order-1 text-sm", children: (0, jsx_runtime_1.jsxs)("div", { className: "wrapper grid grid-cols-2 gap-5 sm:gap-x-20 sm:gap-y-10 lg:flex lg:flex-nowrap lg:gap-14", children: [(0, jsx_runtime_1.jsxs)("div", { className: "block grow md:w-44 md:shrink-0 md:border-none md:pb-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "whitespace-nowrap text-xs font-bold uppercase text-white text-opacity-80", children: data?.heading }), data?.lists?.map((item, index) => ((0, jsx_runtime_1.jsx)("div", { className: "mt-3 text-sm", children: (0, jsx_runtime_1.jsx)("a", { className: "text-white text-opacity-50 duration-300 hover:text-opacity-100",
|
|
9
|
+
// href={addQueryToLink({
|
|
10
|
+
// link: item.url,
|
|
11
|
+
// query: { fromType: FROM_TYPE_FOOTER_MENU },
|
|
12
|
+
// })}
|
|
13
|
+
href: `${item.url}?fromType=${constants_1.FROM_TYPE_FOOTER_MENU}`, children: item.title }) }, index)))] }), (0, jsx_runtime_1.jsxs)("div", { className: " md:order-none md:w-40 md:flex-none md:shrink-0 md:border-none md:pb-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "whitespace-nowrap text-xs font-bold uppercase text-white text-opacity-80", children: "D\u1ECBch v\u1EE5 n\u1ED5i b\u1EADt" }), (0, jsx_runtime_1.jsx)("div", { className: "flex flex-wrap", children: constants_1.SERVICES_DEFAULT.map((item, index) => ((0, jsx_runtime_1.jsx)("div", { className: "mt-3 flex w-full text-sm", children: (0, jsx_runtime_1.jsxs)("a", { href: (0, utils_1.addQueryToLink)({
|
|
14
|
+
link: item.Href,
|
|
15
|
+
query: { fromType: constants_1.FROM_TYPE_FOOTER_MENU },
|
|
16
|
+
}), target: "_blank", rel: "noreferrer", className: "item-center inline-flex text-white text-opacity-50 duration-300 hover:text-opacity-100", children: [(0, jsx_runtime_1.jsx)("span", { className: "relative aspect-1 h-5 w-5 md:-mt-0.5 md:h-6 md:w-6", children: (0, jsx_runtime_1.jsx)("img", { src: item.Image, className: "absolute inset-0" }) }), (0, jsx_runtime_1.jsx)("span", { className: "block pl-2", children: item.Name })] }) }, index))) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "col-span-2 grow border-t border-gray-700 pt-5 sm:col-span-1 md:border-none md:pt-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "border-b border-gray-700 pb-5 md:border-0 md:pb-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "whitespace-nowrap text-xs font-bold uppercase text-white text-opacity-80", children: "Ch\u0103m s\u00F3c kh\u00E1ch h\u00E0ng" }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-2 text-sm md:mt-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-white text-opacity-50", children: "\u0110\u1ECBa ch\u1EC9: " }), (0, jsx_runtime_1.jsx)("span", { className: "inline text-white text-opacity-70 duration-300 hover:text-opacity-100", children: constants_1.SUPPORT.Address })] }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-1 text-sm", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-white text-opacity-50", children: "Hotline : " }), (0, jsx_runtime_1.jsx)("a", { className: "inline text-white text-opacity-70 duration-300 hover:text-opacity-100", href: `tel:${constants_1.MOMO_TEXT.Support.Hotline}`, children: constants_1.MOMO_TEXT.Support.Hotline_Format }), (0, jsx_runtime_1.jsxs)("small", { className: "text-xs italic text-white text-opacity-60", children: [" ", "(Ph\u00ED 1.000\u0111/ph\u00FAt)"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-1 text-sm", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-white text-opacity-50", children: "Email : " }), (0, jsx_runtime_1.jsx)("a", { className: "inline text-white text-opacity-70 duration-300 hover:text-opacity-100", href: `mailto:${constants_1.MOMO_TEXT.Support.Email}`, children: constants_1.MOMO_TEXT.Support.Email })] }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-1 text-sm", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-white text-opacity-50", children: ["T\u1ED5ng \u0111\u00E0i g\u1ECDi ra :", " "] }), (0, jsx_runtime_1.jsx)("a", { className: "inline text-white text-opacity-70 duration-300 hover:text-opacity-100", href: `tel:${constants_1.MOMO_TEXT.Support.Phone_Ext_1}`, children: constants_1.MOMO_TEXT.Support.Phone_Ext_1_Format }), (0, jsx_runtime_1.jsx)("span", { className: "text-white text-opacity-60", children: " - " }), (0, jsx_runtime_1.jsx)("a", { className: "inline text-white text-opacity-70 duration-300 hover:text-opacity-100", href: `tel:${constants_1.MOMO_TEXT.Support.Phone_Ext_2}`, children: constants_1.MOMO_TEXT.Support.Phone_Ext_2_Format }), (0, jsx_runtime_1.jsx)("span", { className: "text-white text-opacity-60", children: ", c\u00E1c \u0111\u1EA7u s\u1ED1 di \u0111\u1ED9ng Brandname MoMo" })] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-3 flex", children: (0, jsx_runtime_1.jsx)("a", { href: "https://momo.vn/huong-dan/huong-dan-gui-yeu-cau-ho-tro-bang-tinh-nang-tro-giup", rel: "noreferrer", target: "_blank", children: (0, jsx_runtime_1.jsxs)("div", { className: "relative block overflow-hidden rounded border border-gray-400 bg-black py-1 pl-10 pr-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute left-1 top-1 ", style: { paddingTop: "3px" }, children: (0, jsx_runtime_1.jsx)("svg", { className: "h-7 w-7 text-gray-100 ", fill: "currentColor", stroke: "currentColor", viewBox: "0 0 345.1 512", children: (0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("title", { children: "Asset 1" }), (0, jsx_runtime_1.jsx)("path", { d: "M279.4,23.7H30.8C14.5,23.7,0,38.2,0,56.3v401.8c0,16.3,14.5,30.8,30.8,30.8H76h23.8L76,449.4H34.5V96.2h243.1v152l34.5,22\n V56.3C312,38.2,297.5,23.7,279.4,23.7z M226.8,77.1H86.1c-8.1,0-13.5-5.4-13.5-13.5c0-8.1,5.4-13.5,13.5-13.5h140.8\n c5.4,0,10.8,5.4,10.8,13.5C237.7,71.7,232.3,77.1,226.8,77.1z" }), (0, jsx_runtime_1.jsx)("path", { d: "M189.4,200.7c-14.4,0-25.9,11.6-25.9,25.9v155.7l-17.3-34.6c-14.2-26.3-28.1-23.6-38.9-17.3c-12.5,8.3-17.2,17-8.6,38.9\n c19.6,48.2,49.8,105.6,82.2,142.7h116.7c41-30.4,74-175,17.3-181.6c-5.2,0-13.5,0.8-17.3,4.3c0-17.3-15.1-21.7-21.6-21.6\n c-7.5,0.1-13,4.3-17.3,13c0-17.3-14.1-21.6-21.6-21.6c-8.3,0-17.9,5.2-21.6,13v-90.8C215.4,212.3,203.8,200.7,189.4,200.7z" })] }) }) }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-white text-opacity-70", children: "H\u01B0\u1EDBng d\u1EABn tr\u1EE3 gi\u00FAp tr\u00EAn" }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs font-bold uppercase text-white text-opacity-90", children: "\u1EE8ng d\u1EE5ng MoMo" })] }) }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-4 border-b border-gray-700 pb-5 md:mt-8 md:border-none md:pb-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "whitespace-nowrap text-xs font-bold uppercase text-white text-opacity-80", children: "H\u1EE3p t\u00E1c doanh nghi\u1EC7p" }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-2 text-sm md:mt-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-white text-opacity-50", children: "Hotline : " }), (0, jsx_runtime_1.jsx)("a", { className: "inline text-white text-opacity-70 duration-300 hover:text-opacity-100", href: `tel:${constants_1.MOMO_TEXT.Business.Phome}`, children: constants_1.MOMO_TEXT.Business.Phome_Format })] }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-1 text-sm", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-white text-opacity-50", children: "Email : " }), (0, jsx_runtime_1.jsx)("a", { className: "inline text-white text-opacity-70 duration-300 hover:text-opacity-100", href: `mailto:${constants_1.MOMO_TEXT.Business.Email}`, children: constants_1.MOMO_TEXT.Business.Email })] }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-1 text-sm", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-white text-opacity-50", children: "Website : " }), (0, jsx_runtime_1.jsx)("a", { className: "inline text-white text-opacity-70 duration-300 hover:text-opacity-100", href: "https://business.momo.vn/", "aria-label": "MoMo Business", rel: "noreferrer", target: "_blank", children: "business.momo.vn" })] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-3 flex", children: (0, jsx_runtime_1.jsx)("a", { href: "https://business.momo.vn/#menutop", rel: "noreferrer", target: "_blank", children: (0, jsx_runtime_1.jsxs)("div", { className: "relative block overflow-hidden rounded border border-gray-400 bg-black py-1 pl-12 pr-2 ", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute left-1 top-1 flex aspect-1 items-center justify-center", children: (0, jsx_runtime_1.jsxs)("svg", { width: "30", height: "20", viewBox: "0 0 30 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "mt-2", children: [(0, jsx_runtime_1.jsx)("path", { d: "M9.5688 5.21563C8.63815 5.98097 9.08817 8.15453 11.2556 6.84427C11.2556 6.84427 13.9037 5.51871 15.4497 4.6401C15.7864 4.4503 16.0129 4.51152 16.2946 4.83297C16.6038 5.05644 23.6112 12.8813 23.6112 12.8813C23.6112 12.8813 25.7725 11.2404 26.6144 9.51683C26.6144 9.51683 24.6735 5.8677 22.8214 2.24612C22.2857 2.5492 21.8265 2.83696 21.2111 2.66247C20.5744 2.48185 20.0478 1.98285 19.4723 1.64916C18.8171 1.26649 18.26 0.92362 17.5283 0.819534C16.4446 0.663406 15.5935 1.15016 14.6598 1.6859C13.5975 2.29511 12.5689 2.97779 11.5617 3.69414C10.8821 4.17171 10.2178 4.6799 9.5688 5.21563Z", fill: "#fff" }), (0, jsx_runtime_1.jsx)("path", { d: "M10.9281 17.4029C10.5638 16.9008 10.6342 16.1538 11.0842 15.7344L13.3068 13.7109C13.7568 13.2884 14.415 13.3527 14.7793 13.8517C15.1436 14.3507 15.0731 15.0977 14.6231 15.5232L12.4006 17.5467C11.9536 17.9631 11.2924 17.9019 10.9281 17.4029Z", fill: "#fff" }), (0, jsx_runtime_1.jsx)("path", { d: "M8.87706 15.5385C8.51275 15.0364 8.58317 14.2895 9.03318 13.867L10.7873 12.272C11.2374 11.8496 11.8955 11.9139 12.2598 12.4129C12.6241 12.9149 12.5537 13.6619 12.1037 14.0844L10.3496 15.6824C9.90261 16.1018 9.24136 16.0375 8.87706 15.5385Z", fill: "#fff" }), (0, jsx_runtime_1.jsx)("path", { d: "M6.39426 14.014C6.05751 13.4905 6.1616 12.7496 6.62998 12.3547L7.02184 12.0486C7.49022 11.6537 8.14535 11.7608 8.48822 12.2812L8.51271 12.3118C8.85252 12.8353 8.72395 13.5456 8.2525 13.9405L7.86065 14.2466C7.39226 14.6415 6.73407 14.5374 6.39426 14.014Z", fill: "#fff" }), (0, jsx_runtime_1.jsx)("path", { d: "M16.2182 16.2671C15.8325 15.7895 15.1712 15.762 14.7396 16.2089L13.7814 17.2039C13.3497 17.6508 13.313 18.4009 13.6987 18.8815C14.0844 19.3621 14.7488 19.3866 15.1773 18.9397L16.1355 17.9447C16.5672 17.4978 16.6039 16.7477 16.2182 16.2671Z", fill: "#fff" }), (0, jsx_runtime_1.jsx)("path", { d: "M29.9207 7.86982C30.0799 8.1729 29.9911 8.53108 29.7278 8.66884L28.1145 9.51989C27.8512 9.65459 27.5084 9.51989 27.3522 9.21682L23.5255 1.81447C23.3694 1.5114 23.4551 1.15322 23.7184 1.01546L25.3317 0.167464C25.595 0.0297027 25.9379 0.167463 26.094 0.470537L29.9207 7.86982Z", fill: "#fff" }), (0, jsx_runtime_1.jsx)("path", { d: "M2.61348 9.14334C2.49409 9.46479 2.18489 9.6454 1.92467 9.54744L0.299097 8.98415C0.0388821 8.88619 -0.0713265 8.54638 0.0480662 8.228L2.9839 0.430738C3.10329 0.109296 3.41249 -0.0713245 3.67271 0.0266388L5.29828 0.592989C5.5585 0.690952 5.66871 1.03076 5.54931 1.34914L2.61348 9.14334Z", fill: "#fff" }), (0, jsx_runtime_1.jsx)("path", { d: "M23.5224 13.8395L23.5163 13.8333C23.4826 14.0109 23.4336 14.1609 23.2989 14.3109C23.0816 14.5528 22.7999 14.6721 22.5152 14.6721C22.2183 14.6721 21.9183 14.5405 21.6887 14.2772L18.9212 11.1393C18.8692 11.0781 18.8049 11.0506 18.7375 11.0506C18.4742 11.0506 18.1804 11.4853 18.4191 11.7363L20.6907 14.2466C21.1223 14.7426 21.1315 15.5079 20.7029 15.9855C20.5039 16.2059 20.259 16.313 20.011 16.313C19.7233 16.313 19.4294 16.1722 19.1967 15.9059L16.5946 13.0037C16.5364 12.9119 16.4629 12.8721 16.3864 12.8721C16.1415 12.8721 15.8843 13.2792 16.1415 13.5731L18.1436 15.8691C18.563 16.3498 18.5293 17.0967 18.1161 17.5621C17.9263 17.7733 17.6936 17.8743 17.4548 17.8743C17.3171 17.8743 17.1762 17.8406 17.0415 17.7733C16.9589 17.9937 16.8364 18.2019 16.6772 18.3856C16.9221 18.5203 17.1885 18.5968 17.4548 18.5968C17.8926 18.5968 18.3059 18.407 18.6181 18.058C18.9426 17.6968 19.111 17.2376 19.1294 16.7753C19.3988 16.9437 19.7049 17.0355 20.011 17.0355C20.4611 17.0355 20.8866 16.8396 21.208 16.4814C21.5295 16.1232 21.6948 15.6579 21.707 15.1895C21.955 15.3242 22.2336 15.3946 22.5152 15.3946C23.005 15.3946 23.4612 15.1834 23.801 14.8038C24.1255 14.4395 24.1837 14.0599 24.2235 13.7844C24.2449 13.6343 24.2173 13.4843 24.1561 13.3527C24.0765 13.417 24.0275 13.4537 24.0153 13.4629L23.5224 13.8395Z", fill: "#fff" }), (0, jsx_runtime_1.jsx)("path", { d: "M6.20135 11.7914L6.21053 11.7822L6.21972 11.7731L6.38503 11.6445C5.02579 10.2669 4.19616 9.2505 4.19616 9.2505C5.5003 5.92894 6.97587 1.88183 6.97587 1.88183C6.96363 2.11143 7.73509 2.52166 7.89122 2.58288C8.14837 2.68697 8.42695 2.73595 8.70553 2.73595C8.78513 2.73595 8.86166 2.73289 8.9382 2.7237C9.75252 2.64105 10.5179 2.17266 11.2342 1.7655C11.7179 1.49304 12.3179 1.21446 12.8843 1.21446C13.1537 1.21446 13.4139 1.28487 13.6557 1.441C13.8731 1.30936 14.0874 1.18078 14.2986 1.06139C14.2619 1.01547 14.2221 0.972612 14.1762 0.935876C13.8088 0.641986 13.3741 0.495041 12.8873 0.495041C12.1312 0.495041 11.3965 0.859342 10.9097 1.1318L10.723 1.23895C10.1107 1.58794 9.48006 1.94612 8.87391 2.00735C8.8188 2.01347 8.76064 2.01653 8.70553 2.01653C8.50349 2.01653 8.30756 1.9798 8.13918 1.91245C8.01673 1.8604 7.73815 1.69815 7.60651 1.59407C7.52079 1.38589 7.34323 1.22977 7.11976 1.17772C7.07077 1.16548 7.02179 1.16242 6.97587 1.16242C6.69729 1.16242 6.43707 1.34304 6.33299 1.62774C6.31768 1.66754 4.84517 5.70546 3.5594 8.97804C3.46144 9.22907 3.5043 9.51684 3.67267 9.72195C3.70941 9.76481 4.52985 10.7659 5.87991 12.1374C5.97175 12.0149 6.0789 11.8955 6.20135 11.7914Z", fill: "#fff" })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-white text-opacity-70", children: "H\u1EE3p t\u00E1c doanh nghi\u1EC7p" }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs font-semibold uppercase text-white text-opacity-90", children: "\u0110\u0103ng k\u00FD h\u1EE3p t\u00E1c" })] }) }) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "col-span-2 gap-8 sm:col-span-1 md:mt-0 md:flex md:flex-col md:flex-wrap md:justify-between ", children: [(0, jsx_runtime_1.jsxs)("div", { className: "h-auto", children: [(0, jsx_runtime_1.jsx)("div", { className: "hidden whitespace-nowrap text-xs font-bold uppercase text-white text-opacity-80 md:block", children: "K\u1EBFt n\u1ED1i v\u1EDBi ch\u00FAng t\u00F4i" }), (0, jsx_runtime_1.jsx)("div", { className: "mt-3 hidden flex-row items-stretch md:flex", children: (0, jsx_runtime_1.jsx)("ul", { className: "item-center flex list-none flex-wrap space-x-4", children: constants_1.SOCIAL_ITEMS &&
|
|
17
|
+
constants_1.SOCIAL_ITEMS.map((item, index) => ((0, jsx_runtime_1.jsx)("li", { className: "inline-block", children: (0, jsx_runtime_1.jsx)("a", { href: item.Link, target: "_blank", rel: "noreferrer", className: "duration-300 hover:brightness-125", children: (0, jsx_runtime_1.jsx)("img", { src: item.Image, loading: "lazy", width: "40", height: "40" }) }) }, index))) }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "h-auto", children: [(0, jsx_runtime_1.jsx)("div", { className: "hidden whitespace-nowrap text-xs font-bold uppercase text-white text-opacity-80 md:block", children: "T\u1EA3i \u1EE9ng d\u1EE5ng tr\u00EAn \u0111i\u1EC7n tho\u1EA1i" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-wrap md:mt-3 md:space-x-1.5", children: [(0, jsx_runtime_1.jsx)("div", { className: "relative hidden h-20 w-20 grow-0 overflow-hidden rounded-sm bg-white md:block", children: (0, jsx_runtime_1.jsx)("img", { src: "https://homepage.momocdn.net/img/momo-upload-api-230627140125-638234712853800898.jpg", alt: "Qr-Dowbnload MoMo", className: " absolute inset-0" }) }), (0, jsx_runtime_1.jsx)("div", { className: "flex grow justify-center gap-2 md:grid md:grid-cols-1 md:gap-1.5", children: constants_1.APP_DOWNLOAD &&
|
|
18
|
+
constants_1.APP_DOWNLOAD.map((item, index) => ((0, jsx_runtime_1.jsx)("a", { href: item.Link, target: "_blank", rel: "noreferrer", className: "button-download", style: {
|
|
19
|
+
background: `url(${item.Image}) no-repeat center/contain`,
|
|
20
|
+
} }, index))) }), (0, jsx_runtime_1.jsx)("div", { className: "mt-4 flex w-full justify-center text-center md:hidden", children: (0, jsx_runtime_1.jsx)("ul", { className: "item-center flex list-none flex-wrap space-x-3.5", children: constants_1.SOCIAL_ITEMS &&
|
|
21
|
+
constants_1.SOCIAL_ITEMS.map((item, index) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("a", { href: item.Link, target: "_blank", rel: "noreferrer", className: "flex duration-300 hover:brightness-125", children: (0, jsx_runtime_1.jsx)("img", { alt: item.Name, src: item.Image, loading: "lazy", width: "36", height: "36" }) }) }, index))) }) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "h-auto", children: [(0, jsx_runtime_1.jsx)("div", { className: "hidden whitespace-nowrap text-xs font-bold uppercase text-white text-opacity-80 md:block", children: "\u0110\u01B0\u1EE3c ch\u1EE9ng nh\u1EADn b\u1EDFi" }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-6 flex items-center justify-between md:mt-3 md:justify-normal", children: [(0, jsx_runtime_1.jsxs)("span", { className: "block text-right text-xs text-white text-opacity-50 md:hidden", children: ["\u00A9Copyright M_Service ", new Date().getFullYear()] }), (0, jsx_runtime_1.jsx)("a", { rel: "noopener noreferrer", href: "http://online.gov.vn/Home/AppDetails/163", target: "_blank", className: " flex w-28 items-center md:w-auto", children: (0, jsx_runtime_1.jsx)("img", { alt: "ch\u1EE9ng nh\u1EADn", src: "https://homepage.momocdn.net/blogscontents/momo-upload-api-210629153623-637605777831780706.png", width: 119, height: 45 }) })] })] })] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: " footer-bottom order-1 bg-gray-800 py-3.5 md:order-2 md:py-5", children: (0, jsx_runtime_1.jsxs)("div", { className: "wrapper flex flex-wrap items-end justify-between md:flex-nowrap md:space-x-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "mb-2.5 flex justify-between md:mb-0", children: [(0, jsx_runtime_1.jsx)("img", { src: "https://homepage.momocdn.net/fileuploads/svg/momo-file-240411162904.svg", className: "w-9 h-9", alt: "MoMo" }), (0, jsx_runtime_1.jsxs)("div", { className: "shrink pl-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-sm text-white text-opacity-80 md:mb-1.5 ", children: "C\u00D4NG TY C\u1ED4 PH\u1EA6N D\u1ECACH V\u1EE4 DI \u0110\u1ED8NG TR\u1EF0C TUY\u1EBEN" }), (0, jsx_runtime_1.jsx)("span", { className: "hidden text-xs text-white text-opacity-50 md:block lg:text-sm lg:leading-none", children: "L\u1EA7u 6, To\u00E0 nh\u00E0 Ph\u00FA M\u1EF9 H\u01B0ng, s\u1ED1 8 Ho\u00E0ng V\u0103n Th\u00E1i, khu ph\u1ED1 1, P. T\u00E2n Ph\u00FA, Q. 7, Th\u00E0nh ph\u1ED1 H\u1ED3 Ch\u00ED Minh" })] })] }), (0, jsx_runtime_1.jsx)("span", { className: "block text-sm text-white text-opacity-50 md:hidden", children: "L\u1EA7u 6, To\u00E0 nh\u00E0 Ph\u00FA M\u1EF9 H\u01B0ng, s\u1ED1 8 Ho\u00E0ng V\u0103n Th\u00E1i, khu ph\u1ED1 1, P. T\u00E2n Ph\u00FA, Q. 7, Th\u00E0nh ph\u1ED1 H\u1ED3 Ch\u00ED Minh" }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden w-48 flex-none text-right text-sm text-white text-opacity-50 md:block", children: ["\u00A9Copyright M_Service ", new Date().getFullYear()] })] }) }), (0, jsx_runtime_1.jsx)("style", { children: `
|
|
22
|
+
footer .button-download {
|
|
23
|
+
max-width: 150px;
|
|
24
|
+
}
|
|
25
|
+
` })] }));
|
|
26
|
+
};
|
|
27
|
+
exports.default = FooterContent;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Header = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const utils_1 = require("../../helpers/utils");
|
|
10
|
+
const link_1 = __importDefault(require("next/link"));
|
|
11
|
+
const NavItems_1 = __importDefault(require("./NavItems"));
|
|
12
|
+
const MobileMenu_1 = __importDefault(require("./MobileMenu"));
|
|
13
|
+
const html_react_parser_1 = __importDefault(require("html-react-parser"));
|
|
14
|
+
const Header = (0, react_1.memo)(({ className, dataMenu, serviceInfo }) => {
|
|
15
|
+
const { logo, name, url } = serviceInfo;
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)(className, "sticky top-0 z-40 w-full flex-none transition-colors duration-500 lg:z-50 border-b border-gray-900/10 "), children: [(0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("absolute inset-0 h-full w-full bg-white/95 backdrop-blursupports-backdrop-blur:bg-white/60 ") }), (0, jsx_runtime_1.jsx)("nav", { className: (0, utils_1.cn)("wrapper border-b border-gray-900/10 grid grid-cols-1 items-center lg:border-0 [--header-height:64px] "), style: { minHeight: "var(--header-height)" }, children: (0, jsx_runtime_1.jsxs)("div", { className: "relative flex items-center ", children: [(0, jsx_runtime_1.jsxs)(link_1.default, { href: "https://momo.vn/", title: "MoMo", className: "mr-3 flex-none w-9 h-9 overflow-hidden rounded-none hover:opacity-80", children: [(0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "MoMo home page" }), (0, jsx_runtime_1.jsx)("img", { src: "https://homepage.momocdn.net/fileuploads/svg/momo-file-240411162904.svg", className: "w-9 h-9", alt: "MoMo" })] }), serviceInfo && (0, jsx_runtime_1.jsxs)(link_1.default, { href: url, title: name, className: " relative flex space-x-1 pl-2 items-center rounded-none hover:opacity-80 after:absolute after:left-0 after:h-8 after:w-[1px] after:bg-gray-300 after:content-[''] ", children: [(0, jsx_runtime_1.jsx)("img", { src: logo, className: "w-9 h-9", alt: "MoMo" }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm font-semibold leading-[1.1] text-pink-500", children: name && (0, html_react_parser_1.default)(name) })] }), (0, jsx_runtime_1.jsx)("div", { className: "relative hidden lg:flex items-center ml-auto", children: (0, jsx_runtime_1.jsx)(NavItems_1.default, { data: dataMenu }) }), (0, jsx_runtime_1.jsx)(MobileMenu_1.default, { data: dataMenu, className: "lg:hidden ml-auto " })] }) })] }));
|
|
17
|
+
});
|
|
18
|
+
exports.Header = Header;
|
|
19
|
+
Header.displayName = "Header";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const utils_1 = require("../../helpers/utils");
|
|
5
|
+
const index_1 = require("../NavigationMenu/index");
|
|
6
|
+
const ListItem = ({ className = "", icon = "", title, children = "", href = "", newTab = false, }) => {
|
|
7
|
+
const linkProps = newTab
|
|
8
|
+
? { target: "_blank", rel: "noopener noreferrer" }
|
|
9
|
+
: {};
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)("li", { className: "", children: (0, jsx_runtime_1.jsx)(index_1.NavigationMenuLink, { asChild: true, children: (0, jsx_runtime_1.jsxs)("a", { className: (0, utils_1.cn)(" select-none space-y-1 rounded-md px-2.5 py-2 leading-none no-underline outline-none transition-colors hover:bg-pink-50 hover:text-pink-500 focus:bg-pink-50 focus:text-pink-500 flex flex-nowrap space-x-2 items-center min-h-9", className), href: href, ...linkProps, children: [icon && ((0, jsx_runtime_1.jsx)("div", { className: "w-7 h-7 shrink-0", children: (0, jsx_runtime_1.jsx)("img", { src: icon, loading: "lazy", className: "w-7 h-7 object-cover", alt: title }) })), (0, jsx_runtime_1.jsxs)("div", { className: " ", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-sm font-medium text-gray-900 leading-none", children: title }), children && ((0, jsx_runtime_1.jsx)("p", { className: "line-clamp-1 text-xs mt-1 text-gray-500", children: children }))] })] }) }) }));
|
|
11
|
+
};
|
|
12
|
+
exports.default = ListItem;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const utils_1 = require("../../helpers/utils");
|
|
8
|
+
const link_1 = __importDefault(require("next/link"));
|
|
9
|
+
const ListItemMobile = ({ className = "", icon = "", title, children = "", href = "", newTab = false, }) => {
|
|
10
|
+
const linkProps = newTab
|
|
11
|
+
? { target: "_blank", rel: "noopener noreferrer" }
|
|
12
|
+
: {};
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("li", { className: "", children: (0, jsx_runtime_1.jsxs)(link_1.default, { className: (0, utils_1.cn)(" select-none py-2 flex flex-nowrap space-x-2 items-center", className), href: href, ...linkProps, children: [icon && ((0, jsx_runtime_1.jsx)("div", { className: "w-7 h-7 shrink-0", children: (0, jsx_runtime_1.jsx)("img", { src: icon, loading: "lazy", className: "w-7 h-7 object-cover", alt: title }) })), (0, jsx_runtime_1.jsxs)("div", { className: " ", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-sm text-gray-800 leading-none", children: title }), children && ((0, jsx_runtime_1.jsx)("p", { className: "line-clamp-1 text-xs mt-1 text-gray-500", children: children }))] })] }) }));
|
|
14
|
+
};
|
|
15
|
+
exports.default = ListItemMobile;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const animations_1 = require("../../helpers/animations");
|
|
9
|
+
const utils_1 = require("../../helpers/utils");
|
|
10
|
+
const react_use_1 = require("react-use");
|
|
11
|
+
const router_1 = __importDefault(require("next/router"));
|
|
12
|
+
const NavItemsMobile_1 = __importDefault(require("./NavItemsMobile"));
|
|
13
|
+
const link_1 = __importDefault(require("next/link"));
|
|
14
|
+
const framer_motion_1 = require("framer-motion");
|
|
15
|
+
const constants_1 = require("../../helpers/constants");
|
|
16
|
+
const computeInsetTop = () => typeof window !== "undefined" && window.pageYOffset !== undefined
|
|
17
|
+
? window.pageYOffset
|
|
18
|
+
: 0;
|
|
19
|
+
const MobileMenu = ({ data, className }) => {
|
|
20
|
+
// useKey("Escape", () => setOpen(false));
|
|
21
|
+
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
22
|
+
(0, react_use_1.useKey)("Escape", () => setIsOpen(false));
|
|
23
|
+
(0, react_1.useEffect)(() => {
|
|
24
|
+
if (!isOpen)
|
|
25
|
+
return;
|
|
26
|
+
const memoizedInsetTop = computeInsetTop();
|
|
27
|
+
function handleRouteChange() {
|
|
28
|
+
setIsOpen(false);
|
|
29
|
+
}
|
|
30
|
+
document.body.style.position = "fixed";
|
|
31
|
+
document.body.style.width = "100%";
|
|
32
|
+
router_1.default.events.on("routeChangeComplete", handleRouteChange);
|
|
33
|
+
return () => {
|
|
34
|
+
document.body.style.position = '';
|
|
35
|
+
document.body.style.width = '';
|
|
36
|
+
window.scrollTo({
|
|
37
|
+
top: memoizedInsetTop || 0,
|
|
38
|
+
behavior: "instant",
|
|
39
|
+
});
|
|
40
|
+
router_1.default.events.off("routeChangeComplete", handleRouteChange);
|
|
41
|
+
};
|
|
42
|
+
}, [isOpen]);
|
|
43
|
+
const variants = {
|
|
44
|
+
visible: { opacity: 1, transition: { duration: 0.2 } },
|
|
45
|
+
hidden: { opacity: 0, transition: { duration: 0.2 } },
|
|
46
|
+
};
|
|
47
|
+
const containerVariants = {
|
|
48
|
+
hidden: { opacity: 0 },
|
|
49
|
+
show: {
|
|
50
|
+
opacity: 1,
|
|
51
|
+
transition: {
|
|
52
|
+
duration: 0.15,
|
|
53
|
+
staggerChildren: 0.05,
|
|
54
|
+
ease: animations_1.DEFAULT_EASE,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
exit: { opacity: 0, transition: { duration: 0.15 } },
|
|
58
|
+
};
|
|
59
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)(className), children: [(0, jsx_runtime_1.jsxs)("button", { type: "button", className: "text-gray-800 w-10 h-10 flex items-center justify-center hover:text-gray-700 ", onClick: () => setIsOpen(!isOpen), children: [(0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Navigation" }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { animate: isOpen ? "hidden" : "visible", variants: variants, children: (0, jsx_runtime_1.jsx)("svg", { className: (0, utils_1.cn)("block w-7 h-7", isOpen && "hidden"), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M4 6h16M4 12h16M4 18h16" }) }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { animate: isOpen ? "visible" : "hidden", variants: variants, children: (0, jsx_runtime_1.jsx)("svg", { className: (0, utils_1.cn)("block w-7 h-7", !isOpen && "hidden"), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) }) })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.LazyMotion, { features: framer_motion_1.domAnimation, children: (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { mode: "wait", children: isOpen && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.nav, { variants: containerVariants, initial: "hidden", animate: "show", exit: "exit", className: (0, utils_1.cn)(className, "fixed block w-full max-w-full z-50 px-5 bg-white left-0 right-0 bottom-0 overflow-y-auto top-[calc(var(--header-height)+1px)] "), children: [(0, jsx_runtime_1.jsx)(NavItemsMobile_1.default, { data: data }), (0, jsx_runtime_1.jsxs)("div", { className: "py-4 text-sm animate-fade-in duration-500 delay-300", children: [(0, jsx_runtime_1.jsx)("h4", { className: "mb-2 mt-5 text-sm font-semibold text-gray-700 ", children: "T\u1EA2I V\u00C0 \u0110\u0102NG K\u00DD" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-nowrap", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex-initial", children: (0, jsx_runtime_1.jsx)(link_1.default, { href: "https://itunes.apple.com/vn/app/id918751511?utm_source=website-momo&utm_medium=download&utm_campaign=momo-1dong", legacyBehavior: true, children: (0, jsx_runtime_1.jsx)("a", { className: "link-white", target: "_blank", children: (0, jsx_runtime_1.jsx)("img", { src: "https://homepage.momocdn.net/img/momo-upload-api-210724113855-637627235353131497.jpg", width: 130, loading: "lazy", className: "img-fluid", alt: "" }) }) }) }), (0, jsx_runtime_1.jsx)("div", { className: "ml-3 flex-initial", children: (0, jsx_runtime_1.jsx)(link_1.default, { href: "https://play.google.com/store/apps/details?id=com.mservice.momotransfer&utm_source=website-momo&utm_medium=download&utm_campaign=momo-1dong", legacyBehavior: true, children: (0, jsx_runtime_1.jsx)("a", { className: "link-white", target: "_blank", children: (0, jsx_runtime_1.jsx)("img", { src: "https://homepage.momocdn.net/img/momo-upload-api-210724113959-637627235994410679.jpg", width: 130, loading: "lazy", className: "img-fluid", alt: "" }) }) }) })] }), (0, jsx_runtime_1.jsx)("h4", { className: "mb-2 mt-5 text-tiny font-semibold text-gray-700", children: "H\u1ED6 TR\u1EE2 KH\u00C1CH H\u00C0NG" }), (0, jsx_runtime_1.jsxs)("ul", { className: "mb-2 text-tiny text-gray-500", children: [(0, jsx_runtime_1.jsxs)("li", { className: "mb-1", children: ["Hotline :", (0, jsx_runtime_1.jsx)(link_1.default, { href: `tel:${constants_1.MoMoText.Support.Hotline}`, legacyBehavior: true, children: (0, jsx_runtime_1.jsx)("a", { className: "text-gray-600", children: constants_1.MoMoText.Support.Hotline_Format }) })] }), (0, jsx_runtime_1.jsxs)("li", { className: "mb-1", children: ["Email:", (0, jsx_runtime_1.jsx)(link_1.default, { href: `mailto:${constants_1.MoMoText.Support.Email}`, legacyBehavior: true, children: (0, jsx_runtime_1.jsx)("a", { className: "text-gray-600", children: constants_1.MoMoText.Support.Email }) })] })] }), (0, jsx_runtime_1.jsx)("a", { href: "https://momo.vn/huong-dan/huong-dan-gui-yeu-cau-ho-tro-bang-tinh-nang-tro-giup", rel: "noreferrer", target: "_blank", children: (0, jsx_runtime_1.jsxs)("div", { className: "relative inline-block overflow-hidden rounded border border-gray-300 bg-white py-1 pl-10 pr-2 hover:bg-gray-100", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute left-1 top-1 ", style: { paddingTop: "3px" }, children: (0, jsx_runtime_1.jsx)("svg", { className: "h-7 w-7 text-pink-700 ", fill: "currentColor", stroke: "currentColor", viewBox: "0 0 345.1 512", children: (0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("title", { children: "Asset 1" }), (0, jsx_runtime_1.jsx)("path", { d: "M279.4,23.7H30.8C14.5,23.7,0,38.2,0,56.3v401.8c0,16.3,14.5,30.8,30.8,30.8H76h23.8L76,449.4H34.5V96.2h243.1v152l34.5,22\n V56.3C312,38.2,297.5,23.7,279.4,23.7z M226.8,77.1H86.1c-8.1,0-13.5-5.4-13.5-13.5c0-8.1,5.4-13.5,13.5-13.5h140.8\n c5.4,0,10.8,5.4,10.8,13.5C237.7,71.7,232.3,77.1,226.8,77.1z" }), (0, jsx_runtime_1.jsx)("path", { d: "M189.4,200.7c-14.4,0-25.9,11.6-25.9,25.9v155.7l-17.3-34.6c-14.2-26.3-28.1-23.6-38.9-17.3c-12.5,8.3-17.2,17-8.6,38.9\n c19.6,48.2,49.8,105.6,82.2,142.7h116.7c41-30.4,74-175,17.3-181.6c-5.2,0-13.5,0.8-17.3,4.3c0-17.3-15.1-21.7-21.6-21.6\n c-7.5,0.1-13,4.3-17.3,13c0-17.3-14.1-21.6-21.6-21.6c-8.3,0-17.9,5.2-21.6,13v-90.8C215.4,212.3,203.8,200.7,189.4,200.7z" })] }) }) }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-gray-500 ", children: "H\u01B0\u1EDBng d\u1EABn tr\u1EE3 gi\u00FAp tr\u00EAn" }), (0, jsx_runtime_1.jsx)("div", { className: "text-tiny font-semibold text-gray-800", children: "\u1EE8ng d\u1EE5ng V\u00ED MoMo" })] }) }), (0, jsx_runtime_1.jsx)("h4", { className: "mb-2 mt-5 text-tiny font-semibold text-gray-700", children: "H\u1EE2P T\u00C1C DOANH NGHI\u1EC6P" }), (0, jsx_runtime_1.jsxs)("ul", { className: "mb-2 text-tiny text-gray-500", children: [(0, jsx_runtime_1.jsxs)("li", { className: "mb-1", children: ["Hotline :", (0, jsx_runtime_1.jsx)(link_1.default, { href: `tel:${constants_1.MoMoText.Business.Phome}`, legacyBehavior: true, children: (0, jsx_runtime_1.jsx)("a", { className: "text-gray-600", children: constants_1.MoMoText.Business.Phome_Format }) })] }), (0, jsx_runtime_1.jsxs)("li", { className: "mb-1", children: ["Email :", (0, jsx_runtime_1.jsx)(link_1.default, { href: `mailto:${constants_1.MoMoText.Business.Email}`, legacyBehavior: true, children: (0, jsx_runtime_1.jsxs)("a", { className: "text-gray-600", children: [" ", constants_1.MoMoText.Business.Email] }) })] })] }), (0, jsx_runtime_1.jsx)("a", { href: "https://business.momo.vn/#menutop", rel: "noreferrer", target: "_blank", children: (0, jsx_runtime_1.jsxs)("div", { className: "relative inline-block overflow-hidden rounded border border-gray-300 bg-white py-1 pl-12 pr-2 hover:bg-gray-100", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute left-1 top-1 ", children: (0, jsx_runtime_1.jsx)("img", { src: "https://homepage.momocdn.net/fileuploads/svg/momo-file-210724114053.svg", className: "w-10", loading: "lazy", alt: "" }) }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-gray-500 ", children: "H\u1EE3p t\u00E1c doanh nghi\u1EC7p" }), (0, jsx_runtime_1.jsx)("div", { className: "text-tiny font-semibold text-gray-800", children: "\u0110\u0103ng k\u00FD h\u1EE3p t\u00E1c" })] }) })] })] })) }) })] }));
|
|
60
|
+
};
|
|
61
|
+
exports.default = MobileMenu;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const utils_1 = require("../../helpers/utils");
|
|
8
|
+
const index_1 = require("../NavigationMenu/index");
|
|
9
|
+
const ListItem_1 = __importDefault(require("./ListItem"));
|
|
10
|
+
const link_1 = __importDefault(require("next/link"));
|
|
11
|
+
const NavItems = ({ data }) => {
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(index_1.NavigationMenu, { children: (0, jsx_runtime_1.jsxs)(index_1.NavigationMenuList, { children: [(0, jsx_runtime_1.jsx)(index_1.NavigationMenuIndicator, {}), data.map((menuItem) => {
|
|
13
|
+
const linkProps = menuItem.newTab
|
|
14
|
+
? { target: "_blank", rel: "noopener noreferrer" }
|
|
15
|
+
: {};
|
|
16
|
+
return menuItem.hasDropdown ? ((0, jsx_runtime_1.jsxs)(index_1.NavigationMenuItem, { children: [(0, jsx_runtime_1.jsx)(index_1.NavigationMenuTrigger, { children: menuItem.title }), (0, jsx_runtime_1.jsx)(index_1.NavigationMenuContent, { children: (0, jsx_runtime_1.jsx)("ul", { className: (0, utils_1.cn)(menuItem.dropDownCompact === true
|
|
17
|
+
? "grid gap-1 p-2.5 w-[540px] md:grid-cols-2 "
|
|
18
|
+
: "grid w-[250px] gap-1 p-2.5 grid-cols-1"), children: menuItem.subMenu &&
|
|
19
|
+
menuItem.subMenu.map((component) => ((0, jsx_runtime_1.jsx)(ListItem_1.default, { title: component.title, href: component.url, newTab: component.newTab, icon: menuItem.dropDownCompact === true
|
|
20
|
+
? component.icon
|
|
21
|
+
: "", children: menuItem.dropDownCompact === true
|
|
22
|
+
? component.description
|
|
23
|
+
: "" }, component.title))) }) })] }, menuItem.id)) : ((0, jsx_runtime_1.jsx)(index_1.NavigationMenuItem, { children: (0, jsx_runtime_1.jsx)(link_1.default, { href: menuItem.url, legacyBehavior: true, passHref: true, children: (0, jsx_runtime_1.jsx)(index_1.NavigationMenuLink, { className: (0, index_1.navigationMenuTriggerStyle)(), ...linkProps, children: menuItem.title }) }) }, menuItem.id));
|
|
24
|
+
})] }) }));
|
|
25
|
+
};
|
|
26
|
+
exports.default = NavItems;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const utils_1 = require("../../helpers/utils");
|
|
8
|
+
const animations_1 = require("../../helpers/animations");
|
|
9
|
+
const index_1 = require("../Accordion/index");
|
|
10
|
+
const ListItemMobile_1 = __importDefault(require("./ListItemMobile"));
|
|
11
|
+
const link_1 = __importDefault(require("next/link"));
|
|
12
|
+
const framer_motion_1 = require("framer-motion");
|
|
13
|
+
const listItem = {
|
|
14
|
+
hidden: { opacity: 0, y: 10 },
|
|
15
|
+
show: {
|
|
16
|
+
opacity: 1,
|
|
17
|
+
y: 0,
|
|
18
|
+
transition: { duration: 0.25, ease: animations_1.DEFAULT_EASE },
|
|
19
|
+
},
|
|
20
|
+
exit: { opacity: 0, transition: { duration: 0.05 } },
|
|
21
|
+
};
|
|
22
|
+
const NavItemsMobile = ({ data }) => {
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(index_1.Accordion, { type: "single", collapsible: true, children: data.map((menuItem) => {
|
|
24
|
+
const linkProps = menuItem.newTab
|
|
25
|
+
? { target: "_blank", rel: "noopener noreferrer" }
|
|
26
|
+
: {};
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { variants: listItem, children: menuItem.hasDropdown ? ((0, jsx_runtime_1.jsxs)(index_1.AccordionItem, { value: menuItem.id, children: [(0, jsx_runtime_1.jsx)(index_1.AccordionTrigger, { className: "py-3", children: menuItem.title }), (0, jsx_runtime_1.jsx)(index_1.AccordionContent, { children: (0, jsx_runtime_1.jsx)("ul", { className: (0, utils_1.cn)("grid gap-1 grid-cols-1"), children: menuItem.subMenu &&
|
|
28
|
+
menuItem.subMenu.map((component) => ((0, jsx_runtime_1.jsx)(ListItemMobile_1.default, { title: component.title, href: component.url, newTab: component.newTab, icon: menuItem.dropDownCompact === true
|
|
29
|
+
? component.icon
|
|
30
|
+
: "", children: menuItem.dropDownCompact === true
|
|
31
|
+
? component.description
|
|
32
|
+
: "" }, component.title))) }) })] })) : ((0, jsx_runtime_1.jsx)(link_1.default, { className: "py-3 flex flex-1 items-center text-left justify-between font-medium transition-all hover:underline text-gray-900 border-b border-gray-200", href: menuItem.url, ...linkProps, children: menuItem.title })) }, menuItem.id));
|
|
33
|
+
}) }));
|
|
34
|
+
};
|
|
35
|
+
exports.default = NavItemsMobile;
|
|
@@ -52,7 +52,7 @@ exports.NavigationMenuContent = NavigationMenuContent;
|
|
|
52
52
|
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
53
53
|
const NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
54
54
|
exports.NavigationMenuLink = NavigationMenuLink;
|
|
55
|
-
const NavigationMenuViewport = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("absolute left-0 top-full flex justify-center"), children: (0, jsx_runtime_1.jsx)(NavigationMenuPrimitive.Viewport, { className: (0, utils_1.cn)("origin-top-center relative mt-
|
|
55
|
+
const NavigationMenuViewport = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("absolute left-0 top-full flex justify-center"), children: (0, jsx_runtime_1.jsx)(NavigationMenuPrimitive.Viewport, { className: (0, utils_1.cn)("origin-top-center relative mt-3.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border border-gray-200 bg-white text-gray-900 shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]", className), ref: ref, ...props }) })));
|
|
56
56
|
exports.NavigationMenuViewport = NavigationMenuViewport;
|
|
57
57
|
NavigationMenuViewport.displayName =
|
|
58
58
|
NavigationMenuPrimitive.Viewport.displayName;
|
|
@@ -31,30 +31,15 @@ const outline_1 = require("@heroicons/react/24/outline");
|
|
|
31
31
|
const solid_2 = require("@heroicons/react/24/solid");
|
|
32
32
|
const SelectPrimitive = __importStar(require("@radix-ui/react-select"));
|
|
33
33
|
const utils_1 = require("../../helpers/utils");
|
|
34
|
-
const Select = React.forwardRef(({ className, children, label, message, size, isError, disabled, ...props }) => ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("select-mobase relative", className, disabled ? "disabled" : "", isError
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
.select-mobase.select-size-lg {
|
|
41
|
-
.select-mobase-button {
|
|
42
|
-
font-size: var(--mobase-font-size-base);
|
|
43
|
-
line-height: 1.25rem;
|
|
44
|
-
height: var(--mobase-spacing-unit-12);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
.select-mobase.is-error {
|
|
48
|
-
.select-mobase-button {
|
|
49
|
-
box-shadow: 0px 0px 0px 1px rgb(var(--mobase-red-500) / 1) inset;
|
|
50
|
-
border-color: rgb(var(--mobase-red-500) / 1);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
` })] })));
|
|
34
|
+
const Select = React.forwardRef(({ className, children, label, message, size, isError, disabled, ...props }) => ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("select-mobase relative", className, disabled ? "disabled" : "", isError
|
|
35
|
+
? "[&>.select-mobase-button]:border-red-500 [&>.select-mobase-button]:ring-red-500 [&>.select-mobase-button]:ring-1"
|
|
36
|
+
: "", size === "lg"
|
|
37
|
+
? "[&>.select-mobase-button]:text-base [&>.select-mobase-button]:h-12"
|
|
38
|
+
: ""), children: [label && ((0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)("mobase-select-label absolute bg-white -top-2 px-1.5 left-2 text-xs text-gray-500", size === "lg" && "text-sm -top-2.5", disabled && "text-gray-400", isError && "text-red-500"), children: label })), (0, jsx_runtime_1.jsx)(SelectPrimitive.Root, { disabled: disabled, ...props, children: children }), message && ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("mobase-select-message flex space-x-1 items-center mt-1 text-gray-500", disabled && "text-gray-400", isError && "text-red-500"), children: [isError ? ((0, jsx_runtime_1.jsx)(solid_2.XCircleIcon, { width: 16, height: 16 })) : ((0, jsx_runtime_1.jsx)(outline_1.QuestionMarkCircleIcon, { width: 16, height: 16 })), (0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)(size === "lg" ? "text-sm" : "text-xs"), children: message })] }))] })));
|
|
54
39
|
exports.Select = Select;
|
|
55
40
|
const SelectValue = SelectPrimitive.Value;
|
|
56
41
|
exports.SelectValue = SelectValue;
|
|
57
|
-
const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, { ref: ref, className: (0, utils_1.cn)("select-mobase-button bg-white w-full ring-0 transition-all focus-visible:ring-offset-0 focus-visible:ring-offset-transparent focus-visible:ring-
|
|
42
|
+
const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, { ref: ref, className: (0, utils_1.cn)("select-mobase-button bg-white w-full ring-0 transition-all focus-visible:border-pink-500 focus-visible:ring-offset-0 focus-visible:ring-offset-transparent focus-visible:ring-1 focus-visible:!ring-pink-500 rounded border border-gray-400 data-[placeholder]:text-gray-500 p-3 disabled:bg-gray-50 disabled:border-gray-300 disabled:text-gray-500 disabled:pointer-events-none flex items-center justify-between data-[state=open]:border-pink-500 data-[state=open]:ring-1 hover:ring-1 hover:ring-gray-400 data-[state=open]:ring-pink-500 text-gray-900 h-11 ring-inset text-sm", className), ...props, children: [(0, jsx_runtime_1.jsx)("div", { className: "line-clamp-1 text-left", children: children }), (0, jsx_runtime_1.jsx)(SelectPrimitive.Icon, { asChild: true, children: (0, jsx_runtime_1.jsx)(solid_1.ChevronDownIcon, { className: "h-4 w-4 text-gray-700 flex-none" }) })] })));
|
|
58
43
|
exports.SelectTrigger = SelectTrigger;
|
|
59
44
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
60
45
|
const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.ScrollUpButton, { ref: ref, className: (0, utils_1.cn)("flex cursor-default items-center justify-center py-1", className), ...props, children: (0, jsx_runtime_1.jsx)(solid_1.ChevronUpIcon, { className: "h-5 w-5" }) })));
|
|
@@ -66,7 +51,7 @@ SelectScrollDownButton.displayName =
|
|
|
66
51
|
SelectPrimitive.ScrollDownButton.displayName;
|
|
67
52
|
const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.Portal, { children: (0, jsx_runtime_1.jsxs)(SelectPrimitive.Content, { ref: ref, className: (0, utils_1.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-gray-300 bg-white text-gray-900 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" &&
|
|
68
53
|
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, ...props, children: [(0, jsx_runtime_1.jsx)(SelectScrollUpButton, {}), (0, jsx_runtime_1.jsx)(SelectPrimitive.Viewport, { className: (0, utils_1.cn)("p-0", position === "popper" &&
|
|
69
|
-
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]
|
|
54
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"), children: children }), (0, jsx_runtime_1.jsx)(SelectScrollDownButton, {})] }) })));
|
|
70
55
|
exports.SelectContent = SelectContent;
|
|
71
56
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
72
57
|
const SelectGroup = React.forwardRef(({ className, children, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.Group, { ref: ref, className: (0, utils_1.cn)("relative p-1 after:w-full border-b border-gray-200 last:border-0", className), ...props, children: children })));
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Toaster = void 0;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const Toast_1 = require("../..//components/Toast/Toast");
|
|
7
|
-
const use_toast_1 = require("
|
|
7
|
+
const use_toast_1 = require("../../components/Toast/use-toast");
|
|
8
8
|
function Toaster() {
|
|
9
9
|
const { toasts } = (0, use_toast_1.useToast)();
|
|
10
10
|
return ((0, jsx_runtime_1.jsxs)(Toast_1.ToastProvider, { children: [toasts.map(function ({ id, title, description, action, ...props }) {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAnimation = exports.INITIAL_BOTTOM = exports.DEFAULT_TRANSITION = exports.DEFAULT_DELAY = exports.DEFAULT_DURATION = exports.DEFAULT_EASE = void 0;
|
|
4
|
+
exports.DEFAULT_EASE = [0.24, 0.25, 0.05, 1];
|
|
5
|
+
exports.DEFAULT_DURATION = 0.4;
|
|
6
|
+
exports.DEFAULT_DELAY = 0;
|
|
7
|
+
exports.DEFAULT_TRANSITION = { ease: exports.DEFAULT_EASE, duration: exports.DEFAULT_DURATION };
|
|
8
|
+
exports.INITIAL_BOTTOM = { opacity: 0, y: 20 };
|
|
9
|
+
const getAnimation = ({ delay, duration, ease }) => ({
|
|
10
|
+
opacity: 1,
|
|
11
|
+
y: 0,
|
|
12
|
+
transition: {
|
|
13
|
+
delay: delay ?? exports.DEFAULT_DELAY,
|
|
14
|
+
ease: ease ?? exports.DEFAULT_EASE,
|
|
15
|
+
duration: duration ?? exports.DEFAULT_DURATION,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
exports.getAnimation = getAnimation;
|