nvis-fe-cms-libs 1.1.17 → 1.1.19
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.
|
@@ -4525,6 +4525,149 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4525
4525
|
` })
|
|
4526
4526
|
] });
|
|
4527
4527
|
};
|
|
4528
|
+
const PageHighlightSection = ({ data, t, isDarkMode, imageBaseUrl = "" }) => {
|
|
4529
|
+
var _a;
|
|
4530
|
+
const [activeTab, setActiveTab] = require$$0.useState(0);
|
|
4531
|
+
const rawData = ((_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.filter((item) => item == null ? void 0 : item.data).map((item) => item.data)) || [];
|
|
4532
|
+
const getImageUrl = (imagePath) => {
|
|
4533
|
+
if (imagePath) {
|
|
4534
|
+
return `${imageBaseUrl}${imagePath}`;
|
|
4535
|
+
}
|
|
4536
|
+
return null;
|
|
4537
|
+
};
|
|
4538
|
+
const highlightData = rawData.map((item) => {
|
|
4539
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
4540
|
+
const mainImagePath = ((_b = (_a2 = item.pageImages) == null ? void 0 : _a2.find((img) => img.isMain)) == null ? void 0 : _b.url) || ((_d = (_c = item.pageImages) == null ? void 0 : _c[0]) == null ? void 0 : _d.url) || null;
|
|
4541
|
+
const mainImage = getImageUrl(mainImagePath);
|
|
4542
|
+
const primaryTag = ((_f = (_e = item.tagKeys) == null ? void 0 : _e[0]) == null ? void 0 : _f.key) || item.title;
|
|
4543
|
+
return {
|
|
4544
|
+
title: item.title,
|
|
4545
|
+
slug: item.slug,
|
|
4546
|
+
description: item.description,
|
|
4547
|
+
image: mainImage,
|
|
4548
|
+
tag: primaryTag,
|
|
4549
|
+
tagKeys: item.tagKeys || [],
|
|
4550
|
+
features: item.features || []
|
|
4551
|
+
// Nếu có features trong data
|
|
4552
|
+
};
|
|
4553
|
+
});
|
|
4554
|
+
require$$0.useEffect(() => {
|
|
4555
|
+
if (highlightData.length === 0) return;
|
|
4556
|
+
const interval = setInterval(() => {
|
|
4557
|
+
setActiveTab((prev) => (prev + 1) % highlightData.length);
|
|
4558
|
+
}, 5e3);
|
|
4559
|
+
return () => clearInterval(interval);
|
|
4560
|
+
}, [highlightData.length]);
|
|
4561
|
+
const handleNavigate = (slug) => {
|
|
4562
|
+
if (slug) {
|
|
4563
|
+
window.open(slug, "_blank");
|
|
4564
|
+
}
|
|
4565
|
+
};
|
|
4566
|
+
const gradientColors = [
|
|
4567
|
+
"from-blue-600 to-purple-600",
|
|
4568
|
+
"from-purple-600 to-pink-600",
|
|
4569
|
+
"from-blue-500 to-purple-500",
|
|
4570
|
+
"from-purple-500 to-pink-500",
|
|
4571
|
+
"from-emerald-600 to-teal-600",
|
|
4572
|
+
"from-orange-500 to-red-500"
|
|
4573
|
+
];
|
|
4574
|
+
const defaultImage = "https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=1200&h=800&fit=crop&q=80";
|
|
4575
|
+
if (!highlightData.length) {
|
|
4576
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("section", { className: `py-20 ${isDarkMode ? "bg-gray-900/50" : "bg-white"}`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-7xl mx-auto px-4 text-center", children: [
|
|
4577
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: `text-lg font-semibold mb-2 ${isDarkMode ? "text-white" : "text-gray-900"}`, children: t("highlight.noData.title") || "Chưa có dữ liệu" }),
|
|
4578
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: `${isDarkMode ? "text-gray-300" : "text-gray-600"}`, children: t("highlight.noData.description") || "Hiện tại chưa có sản phẩm nào được thiết lập." })
|
|
4579
|
+
] }) });
|
|
4580
|
+
}
|
|
4581
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `min-h-screen py-6 px-2 relative overflow-hidden transition-colors duration-500 ${isDarkMode ? "bg-gradient-to-br from-gray-950 via-purple-900 to-slate-900" : "bg-gradient-to-br from-slate-50 via-blue-50 to-purple-50"}`, children: [
|
|
4582
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `absolute top-20 left-10 w-72 h-72 rounded-full blur-3xl animate-pulse ${isDarkMode ? "bg-purple-600/20" : "bg-blue-400/10"}` }),
|
|
4583
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `absolute bottom-20 right-10 w-96 h-96 rounded-full blur-3xl animate-pulse ${isDarkMode ? "bg-pink-600/20" : "bg-purple-400/10"}` }),
|
|
4584
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-7xl mx-auto relative z-10", children: [
|
|
4585
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative", children: highlightData.map((item, index2) => {
|
|
4586
|
+
const color = gradientColors[index2 % gradientColors.length];
|
|
4587
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4588
|
+
"div",
|
|
4589
|
+
{
|
|
4590
|
+
className: `transition-opacity duration-700 ${activeTab === index2 ? "opacity-100" : "opacity-0 absolute inset-0 pointer-events-none"}`,
|
|
4591
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${isDarkMode ? "bg-gradient-to-br from-gray-800/50 to-gray-900/50 border-gray-700/50" : "bg-white/90 border-white/50"} backdrop-blur-xl rounded-3xl shadow-2xl overflow-hidden border transition-colors duration-500`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid lg:grid-cols-2 gap-0 lg:h-[420px]", children: [
|
|
4592
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative h-[280px] lg:h-full overflow-hidden group", children: [
|
|
4593
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4594
|
+
"img",
|
|
4595
|
+
{
|
|
4596
|
+
src: item.image || defaultImage,
|
|
4597
|
+
alt: item.title,
|
|
4598
|
+
className: "w-full h-full object-position transition-transform duration-700 group-hover:scale-110",
|
|
4599
|
+
onError: (e) => {
|
|
4600
|
+
e.target.src = defaultImage;
|
|
4601
|
+
}
|
|
4602
|
+
}
|
|
4603
|
+
),
|
|
4604
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `absolute inset-0 bg-gradient-to-br ${color} opacity-20` }),
|
|
4605
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent" }),
|
|
4606
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-8 left-8", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `inline-block bg-gradient-to-r ${color} text-white px-6 py-3 rounded-full text-sm font-bold shadow-xl`, children: item.tag }) })
|
|
4607
|
+
] }),
|
|
4608
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-5 lg:p-8 flex flex-col justify-center", children: [
|
|
4609
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: `text-3xl lg:text-4xl font-black mb-3 bg-gradient-to-r ${color} bg-clip-text text-transparent`, children: item.title }),
|
|
4610
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: `${isDarkMode ? "text-gray-300" : "text-gray-600"} text-sm leading-relaxed mb-5`, children: item.description }),
|
|
4611
|
+
item.features && item.features.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-2 mb-6", children: item.features.map((feature, idx) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-2 group", children: [
|
|
4612
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `mt-0.5 w-4 h-4 rounded-full bg-gradient-to-r ${color} flex items-center justify-center flex-shrink-0`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-2.5 h-2.5 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 3, d: "M5 13l4 4L19 7" }) }) }),
|
|
4613
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `${isDarkMode ? "text-gray-300 group-hover:text-white" : "text-gray-700 group-hover:text-gray-900"} font-medium text-xs transition-colors`, children: feature })
|
|
4614
|
+
] }, idx)) }),
|
|
4615
|
+
item.tagKeys.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-wrap gap-2", children: item.tagKeys.map((tag, idx) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4616
|
+
"span",
|
|
4617
|
+
{
|
|
4618
|
+
className: `px-3 py-1 rounded-lg text-xs font-semibold transition-all duration-300 ${isDarkMode ? "bg-gray-700/50 text-gray-300 hover:bg-gray-700" : "bg-gray-100 text-gray-700 hover:bg-gray-200"}`,
|
|
4619
|
+
children: tag.key
|
|
4620
|
+
},
|
|
4621
|
+
idx
|
|
4622
|
+
)) }) }),
|
|
4623
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
4624
|
+
"button",
|
|
4625
|
+
{
|
|
4626
|
+
onClick: () => handleNavigate(item.slug),
|
|
4627
|
+
className: `group relative px-6 py-3 rounded-xl font-bold text-sm transition-all duration-300 transform hover:scale-105 hover:shadow-2xl overflow-hidden bg-gradient-to-r ${color} text-white shadow-xl w-full`,
|
|
4628
|
+
children: [
|
|
4629
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "relative z-10 flex items-center justify-center gap-2", children: [
|
|
4630
|
+
t("highlight.cta") || "Khám phá",
|
|
4631
|
+
" ",
|
|
4632
|
+
item.title,
|
|
4633
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-5 h-5 group-hover:translate-x-1 transition-transform", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M17 8l4 4m0 0l-4 4m4-4H3" }) })
|
|
4634
|
+
] }),
|
|
4635
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-white/20 transform scale-x-0 group-hover:scale-x-100 transition-transform origin-left" })
|
|
4636
|
+
]
|
|
4637
|
+
}
|
|
4638
|
+
)
|
|
4639
|
+
] })
|
|
4640
|
+
] }) })
|
|
4641
|
+
},
|
|
4642
|
+
index2
|
|
4643
|
+
);
|
|
4644
|
+
}) }),
|
|
4645
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-wrap justify-center gap-4 mt-12", children: highlightData.map((item, index2) => {
|
|
4646
|
+
const color = gradientColors[index2 % gradientColors.length];
|
|
4647
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
4648
|
+
"button",
|
|
4649
|
+
{
|
|
4650
|
+
onClick: () => setActiveTab(index2),
|
|
4651
|
+
className: `group relative px-8 py-4 rounded-xl font-bold text-lg transition-all duration-300 transform hover:scale-105 overflow-hidden ${activeTab === index2 ? `bg-gradient-to-r ${color} text-white shadow-xl` : isDarkMode ? "bg-gray-800/50 text-gray-300 hover:shadow-xl shadow-lg border border-gray-700/50 backdrop-blur-sm" : "bg-white text-gray-700 hover:shadow-xl shadow-lg"}`,
|
|
4652
|
+
children: [
|
|
4653
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "relative z-10", children: item.title }),
|
|
4654
|
+
activeTab !== index2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `absolute inset-0 bg-gradient-to-r ${color} opacity-0 group-hover:opacity-100 transition-opacity duration-300` })
|
|
4655
|
+
]
|
|
4656
|
+
},
|
|
4657
|
+
index2
|
|
4658
|
+
);
|
|
4659
|
+
}) }),
|
|
4660
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center gap-3 mt-8", children: highlightData.map((_, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4661
|
+
"button",
|
|
4662
|
+
{
|
|
4663
|
+
onClick: () => setActiveTab(index2),
|
|
4664
|
+
className: `transition-all duration-300 rounded-full ${activeTab === index2 ? "w-12 h-3 bg-gradient-to-r from-blue-600 to-purple-600" : isDarkMode ? "w-3 h-3 bg-gray-600 hover:bg-gray-500" : "w-3 h-3 bg-gray-300 hover:bg-gray-400"}`
|
|
4665
|
+
},
|
|
4666
|
+
index2
|
|
4667
|
+
)) })
|
|
4668
|
+
] })
|
|
4669
|
+
] });
|
|
4670
|
+
};
|
|
4528
4671
|
const index = {
|
|
4529
4672
|
AboutCompanySection,
|
|
4530
4673
|
CompanyValues,
|
|
@@ -4546,7 +4689,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4546
4689
|
TextSection,
|
|
4547
4690
|
DiagramSection,
|
|
4548
4691
|
DiagramSection2,
|
|
4549
|
-
FaqSection
|
|
4692
|
+
FaqSection,
|
|
4693
|
+
PageHighlightSection
|
|
4550
4694
|
};
|
|
4551
4695
|
exports2.AboutCompanySection = AboutCompanySection;
|
|
4552
4696
|
exports2.CompanyValues = CompanyValues;
|
|
@@ -4560,6 +4704,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
4560
4704
|
exports2.ImageSection = ImageSection;
|
|
4561
4705
|
exports2.ImageSingleSection = ImageSingleSection;
|
|
4562
4706
|
exports2.MilestoneSection = MilestoneSection;
|
|
4707
|
+
exports2.PageHighlightSection = PageHighlightSection;
|
|
4563
4708
|
exports2.PartnerCard = PartnerCard;
|
|
4564
4709
|
exports2.PartnerListCard = PartnerListCard;
|
|
4565
4710
|
exports2.PartnerListSection = PartnerListSection;
|