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.
|
@@ -4522,6 +4522,149 @@ const FaqSection = ({ data, t, isDarkMode }) => {
|
|
|
4522
4522
|
` })
|
|
4523
4523
|
] });
|
|
4524
4524
|
};
|
|
4525
|
+
const PageHighlightSection = ({ data, t, isDarkMode, imageBaseUrl = "" }) => {
|
|
4526
|
+
var _a;
|
|
4527
|
+
const [activeTab, setActiveTab] = useState(0);
|
|
4528
|
+
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)) || [];
|
|
4529
|
+
const getImageUrl = (imagePath) => {
|
|
4530
|
+
if (imagePath) {
|
|
4531
|
+
return `${imageBaseUrl}${imagePath}`;
|
|
4532
|
+
}
|
|
4533
|
+
return null;
|
|
4534
|
+
};
|
|
4535
|
+
const highlightData = rawData.map((item) => {
|
|
4536
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
4537
|
+
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;
|
|
4538
|
+
const mainImage = getImageUrl(mainImagePath);
|
|
4539
|
+
const primaryTag = ((_f = (_e = item.tagKeys) == null ? void 0 : _e[0]) == null ? void 0 : _f.key) || item.title;
|
|
4540
|
+
return {
|
|
4541
|
+
title: item.title,
|
|
4542
|
+
slug: item.slug,
|
|
4543
|
+
description: item.description,
|
|
4544
|
+
image: mainImage,
|
|
4545
|
+
tag: primaryTag,
|
|
4546
|
+
tagKeys: item.tagKeys || [],
|
|
4547
|
+
features: item.features || []
|
|
4548
|
+
// Nếu có features trong data
|
|
4549
|
+
};
|
|
4550
|
+
});
|
|
4551
|
+
useEffect(() => {
|
|
4552
|
+
if (highlightData.length === 0) return;
|
|
4553
|
+
const interval = setInterval(() => {
|
|
4554
|
+
setActiveTab((prev) => (prev + 1) % highlightData.length);
|
|
4555
|
+
}, 5e3);
|
|
4556
|
+
return () => clearInterval(interval);
|
|
4557
|
+
}, [highlightData.length]);
|
|
4558
|
+
const handleNavigate = (slug) => {
|
|
4559
|
+
if (slug) {
|
|
4560
|
+
window.open(slug, "_blank");
|
|
4561
|
+
}
|
|
4562
|
+
};
|
|
4563
|
+
const gradientColors = [
|
|
4564
|
+
"from-blue-600 to-purple-600",
|
|
4565
|
+
"from-purple-600 to-pink-600",
|
|
4566
|
+
"from-blue-500 to-purple-500",
|
|
4567
|
+
"from-purple-500 to-pink-500",
|
|
4568
|
+
"from-emerald-600 to-teal-600",
|
|
4569
|
+
"from-orange-500 to-red-500"
|
|
4570
|
+
];
|
|
4571
|
+
const defaultImage = "https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=1200&h=800&fit=crop&q=80";
|
|
4572
|
+
if (!highlightData.length) {
|
|
4573
|
+
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: [
|
|
4574
|
+
/* @__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" }),
|
|
4575
|
+
/* @__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." })
|
|
4576
|
+
] }) });
|
|
4577
|
+
}
|
|
4578
|
+
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: [
|
|
4579
|
+
/* @__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"}` }),
|
|
4580
|
+
/* @__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"}` }),
|
|
4581
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-7xl mx-auto relative z-10", children: [
|
|
4582
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative", children: highlightData.map((item, index2) => {
|
|
4583
|
+
const color = gradientColors[index2 % gradientColors.length];
|
|
4584
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4585
|
+
"div",
|
|
4586
|
+
{
|
|
4587
|
+
className: `transition-opacity duration-700 ${activeTab === index2 ? "opacity-100" : "opacity-0 absolute inset-0 pointer-events-none"}`,
|
|
4588
|
+
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: [
|
|
4589
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative h-[280px] lg:h-full overflow-hidden group", children: [
|
|
4590
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4591
|
+
"img",
|
|
4592
|
+
{
|
|
4593
|
+
src: item.image || defaultImage,
|
|
4594
|
+
alt: item.title,
|
|
4595
|
+
className: "w-full h-full object-position transition-transform duration-700 group-hover:scale-110",
|
|
4596
|
+
onError: (e) => {
|
|
4597
|
+
e.target.src = defaultImage;
|
|
4598
|
+
}
|
|
4599
|
+
}
|
|
4600
|
+
),
|
|
4601
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `absolute inset-0 bg-gradient-to-br ${color} opacity-20` }),
|
|
4602
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent" }),
|
|
4603
|
+
/* @__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 }) })
|
|
4604
|
+
] }),
|
|
4605
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-5 lg:p-8 flex flex-col justify-center", children: [
|
|
4606
|
+
/* @__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 }),
|
|
4607
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: `${isDarkMode ? "text-gray-300" : "text-gray-600"} text-sm leading-relaxed mb-5`, children: item.description }),
|
|
4608
|
+
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: [
|
|
4609
|
+
/* @__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" }) }) }),
|
|
4610
|
+
/* @__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 })
|
|
4611
|
+
] }, idx)) }),
|
|
4612
|
+
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(
|
|
4613
|
+
"span",
|
|
4614
|
+
{
|
|
4615
|
+
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"}`,
|
|
4616
|
+
children: tag.key
|
|
4617
|
+
},
|
|
4618
|
+
idx
|
|
4619
|
+
)) }) }),
|
|
4620
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
4621
|
+
"button",
|
|
4622
|
+
{
|
|
4623
|
+
onClick: () => handleNavigate(item.slug),
|
|
4624
|
+
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`,
|
|
4625
|
+
children: [
|
|
4626
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "relative z-10 flex items-center justify-center gap-2", children: [
|
|
4627
|
+
t("highlight.cta") || "Khám phá",
|
|
4628
|
+
" ",
|
|
4629
|
+
item.title,
|
|
4630
|
+
/* @__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" }) })
|
|
4631
|
+
] }),
|
|
4632
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-white/20 transform scale-x-0 group-hover:scale-x-100 transition-transform origin-left" })
|
|
4633
|
+
]
|
|
4634
|
+
}
|
|
4635
|
+
)
|
|
4636
|
+
] })
|
|
4637
|
+
] }) })
|
|
4638
|
+
},
|
|
4639
|
+
index2
|
|
4640
|
+
);
|
|
4641
|
+
}) }),
|
|
4642
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-wrap justify-center gap-4 mt-12", children: highlightData.map((item, index2) => {
|
|
4643
|
+
const color = gradientColors[index2 % gradientColors.length];
|
|
4644
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
4645
|
+
"button",
|
|
4646
|
+
{
|
|
4647
|
+
onClick: () => setActiveTab(index2),
|
|
4648
|
+
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"}`,
|
|
4649
|
+
children: [
|
|
4650
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "relative z-10", children: item.title }),
|
|
4651
|
+
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` })
|
|
4652
|
+
]
|
|
4653
|
+
},
|
|
4654
|
+
index2
|
|
4655
|
+
);
|
|
4656
|
+
}) }),
|
|
4657
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center gap-3 mt-8", children: highlightData.map((_, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4658
|
+
"button",
|
|
4659
|
+
{
|
|
4660
|
+
onClick: () => setActiveTab(index2),
|
|
4661
|
+
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"}`
|
|
4662
|
+
},
|
|
4663
|
+
index2
|
|
4664
|
+
)) })
|
|
4665
|
+
] })
|
|
4666
|
+
] });
|
|
4667
|
+
};
|
|
4525
4668
|
const index = {
|
|
4526
4669
|
AboutCompanySection,
|
|
4527
4670
|
CompanyValues,
|
|
@@ -4543,7 +4686,8 @@ const index = {
|
|
|
4543
4686
|
TextSection,
|
|
4544
4687
|
DiagramSection,
|
|
4545
4688
|
DiagramSection2,
|
|
4546
|
-
FaqSection
|
|
4689
|
+
FaqSection,
|
|
4690
|
+
PageHighlightSection
|
|
4547
4691
|
};
|
|
4548
4692
|
export {
|
|
4549
4693
|
AboutCompanySection,
|
|
@@ -4558,6 +4702,7 @@ export {
|
|
|
4558
4702
|
ImageSection,
|
|
4559
4703
|
ImageSingleSection,
|
|
4560
4704
|
MilestoneSection,
|
|
4705
|
+
PageHighlightSection,
|
|
4561
4706
|
PartnerCard,
|
|
4562
4707
|
PartnerListCard,
|
|
4563
4708
|
PartnerListSection,
|