@enyxs/wikex-components 0.11.33 → 0.11.35

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/dist/index.js CHANGED
@@ -4801,7 +4801,7 @@ function footerButtonField(field) {
4801
4801
  return match ? { listField: match[1], index: Number(match[3]) } : void 0;
4802
4802
  }
4803
4803
  function isCmsButtonField(field) {
4804
- return isCmsHeaderButtonField(field) || Boolean(downloadButtonField(field) || footerButtonField(field));
4804
+ return isCmsHeaderButtonField(field) || /^(vi|en)\.landing\.hero\.cta$/.test(field) || Boolean(downloadButtonField(field) || footerButtonField(field));
4805
4805
  }
4806
4806
  function safeCmsButtonHref(value4, type) {
4807
4807
  const href = safeCmsTextHref(value4);
@@ -4812,7 +4812,7 @@ function getCmsButtonLink(content, field) {
4812
4812
  const footer2 = footerButtonField(field);
4813
4813
  const item = footer2 ? parseChromeItems(content[footer2.listField])?.[footer2.index] : void 0;
4814
4814
  const key = downloadButtonField(field) ?? field;
4815
- const value4 = footer2 ? item?.href ?? "" : String(content[`${key}Href`] ?? (field.endsWith(".register") ? "/#register" : ""));
4815
+ const value4 = footer2 ? item?.href ?? "" : String(content[`${key}Href`] ?? (field.endsWith(".register") || /^(vi|en)\.landing\.hero\.cta$/.test(field) ? "/#register" : ""));
4816
4816
  const storedType = footer2 ? item?.linkType : content[`${key}LinkType`];
4817
4817
  const type = storedType === "external" || storedType !== "internal" && /^https?:\/\//i.test(value4) ? "external" : "internal";
4818
4818
  return { type, value: value4, href: item?.hrefEnabled === "false" ? void 0 : safeCmsButtonHref(value4, type) };
@@ -4829,6 +4829,30 @@ function cmsButtonLinkChanges(content, field, value4, type) {
4829
4829
  const key = downloadButtonField(field) ?? field;
4830
4830
  return { [`${key}Href`]: value4, [`${key}LinkType`]: type };
4831
4831
  }
4832
+ var cmsHeroButtonLinkFields = ["vi", "en"].flatMap((language) => {
4833
+ const field = `${language}.landing.hero.cta`;
4834
+ const group = language === "vi" ? "Ti\u1EBFng Vi\u1EC7t" : "English";
4835
+ return [
4836
+ {
4837
+ key: `${field}LinkType`,
4838
+ label: "M\u1EDF t\xE0i kho\u1EA3n \u2014 lo\u1EA1i li\xEAn k\u1EBFt",
4839
+ type: "select",
4840
+ group,
4841
+ options: [{ value: "internal", label: "Internal \u2014 trong website" }, { value: "external", label: "External \u2014 website kh\xE1c (tab m\u1EDBi)" }]
4842
+ },
4843
+ {
4844
+ key: `${field}Href`,
4845
+ label: "M\u1EDF t\xE0i kho\u1EA3n \u2014 \u0111\u01B0\u1EDDng d\u1EABn",
4846
+ type: "link",
4847
+ group,
4848
+ helperText: "Internal: /duong-dan/ ho\u1EB7c #muc. External: https://\u2026 M\u1EDF trong tab m\u1EDBi."
4849
+ }
4850
+ ];
4851
+ });
4852
+ var cmsHeroButtonLinkDefaults = Object.fromEntries(["vi", "en"].flatMap((language) => [
4853
+ [`${language}.landing.hero.ctaLinkType`, "internal"],
4854
+ [`${language}.landing.hero.ctaHref`, "/#register"]
4855
+ ]));
4832
4856
  var cmsDownloadButtonLinkFields = ["vi", "en"].flatMap(
4833
4857
  (language) => ["appStore", "googlePlay", "web"].flatMap((platform) => {
4834
4858
  const field = `${language}.landing.download.${platform}`;
@@ -5550,48 +5574,48 @@ var dropOut = (0, import_styled_components3.keyframes)([
5550
5574
  `from{opacity:1;transform:translateY(0);}to{opacity:0;transform:translateY(-12px);}`
5551
5575
  ]);
5552
5576
  var HeaderShell = import_styled_components3.default.header.withConfig({
5553
- componentId: "sc-4d456d17-0"
5577
+ componentId: "sc-eabee95e-0"
5554
5578
  })([
5555
5579
  `position:sticky;top:0;z-index:100;display:flex;height:64px;padding:12px 20px;align-items:center;justify-content:center;background:`,
5556
5580
  `;box-shadow:0 1px 12px rgb(0 0 0 / 4%);:root[data-theme="dark"] &{background:#18181a;}@media (max-width:768px){padding-inline:15px;}@media (max-width:620px){height:62px;padding:16px 16px 12px;box-shadow:0 1px 0 rgb(5 8 15 / 8%);}`
5557
5581
  ], ({ theme }) => theme.colors.background.canvas);
5558
5582
  var HeaderInner = import_styled_components3.default.div.withConfig({
5559
- componentId: "sc-4d456d17-1"
5583
+ componentId: "sc-eabee95e-1"
5560
5584
  })([
5561
5585
  `display:flex;width:100%;max-width:1560px;height:40px;margin:0 auto;align-items:center;gap:32px;@media (max-width:1279px){justify-content:space-between;}@media only screen and (max-width:767px){gap:0;}@media (max-width:620px){height:34px;justify-content:space-between;}`
5562
5586
  ]);
5563
5587
  var BrandGroup = import_styled_components3.default.div.withConfig({
5564
- componentId: "sc-4d456d17-2"
5588
+ componentId: "sc-eabee95e-2"
5565
5589
  })([
5566
5590
  `display:flex;flex:0 0 auto;align-items:center;gap:16px;`
5567
5591
  ]);
5568
5592
  var WikiBrand = (0, import_styled_components3.default)(import_link.default).withConfig({
5569
- componentId: "sc-4d456d17-3"
5593
+ componentId: "sc-eabee95e-3"
5570
5594
  })([
5571
5595
  `display:inline-flex;flex:0 0 auto;align-items:center;`
5572
5596
  ]);
5573
5597
  var WikiLogo = (0, import_styled_components3.default)(import_image.default).withConfig({
5574
- componentId: "sc-4d456d17-4"
5598
+ componentId: "sc-eabee95e-4"
5575
5599
  })([
5576
5600
  `display:block;width:142px;height:auto;@media (max-width:620px){width:84px;}`
5577
5601
  ]);
5578
5602
  var PartnerBrand = import_styled_components3.default.a.withConfig({
5579
- componentId: "sc-4d456d17-5"
5603
+ componentId: "sc-eabee95e-5"
5580
5604
  })([
5581
5605
  `display:inline-flex;align-items:center;gap:7.2px;color:#009ee3;@media (max-width:767px){display:inline-flex;}`
5582
5606
  ]);
5583
5607
  var MxvLogo = (0, import_styled_components3.default)(import_image.default).withConfig({
5584
- componentId: "sc-4d456d17-6"
5608
+ componentId: "sc-eabee95e-6"
5585
5609
  })([
5586
5610
  `display:block;width:95px;height:auto;:root[data-theme="dark"] &{filter:brightness(0) invert(1);}@media (max-width:620px){width:95px;}`
5587
5611
  ]);
5588
5612
  var DesktopNavigation = import_styled_components3.default.nav.withConfig({
5589
- componentId: "sc-4d456d17-7"
5613
+ componentId: "sc-eabee95e-7"
5590
5614
  })([
5591
5615
  `display:flex;align-items:center;gap:16px;@media (max-width:1279px){display:none;}`
5592
5616
  ]);
5593
5617
  var NavigationLink = (0, import_styled_components3.default)(import_link.default).withConfig({
5594
- componentId: "sc-4d456d17-8"
5618
+ componentId: "sc-eabee95e-8"
5595
5619
  })([
5596
5620
  `position:relative;color:`,
5597
5621
  `;font-size:14px;font-weight:700;line-height:18px;white-space:nowrap;transition:color 160ms ease;&:hover,&:focus-visible{color:`,
@@ -5599,14 +5623,14 @@ var NavigationLink = (0, import_styled_components3.default)(import_link.default)
5599
5623
  `;}@media (min-width:1280px) and (max-width:1439px){font-size:11px;}`
5600
5624
  ], ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
5601
5625
  var ProductsMenuTrigger = import_styled_components3.default.button.withConfig({
5602
- componentId: "sc-4d456d17-9"
5626
+ componentId: "sc-eabee95e-9"
5603
5627
  })([
5604
5628
  `display:inline-flex;align-items:center;gap:4px;padding:0;border:0;color:`,
5605
5629
  `;background:transparent;cursor:pointer;font-family:inherit;font-size:14px;font-weight:700;line-height:18px;white-space:nowrap;&[data-state="open"],&[data-active="true"],&:hover,&:focus-visible{color:`,
5606
5630
  `;}&:focus-visible{outline:none;}&::after{content:"";border-inline:3px solid transparent;border-top:4px solid currentColor;transition:transform 160ms ease;}&[data-state="open"]::after{transform:rotate(180deg);}@media (min-width:1280px) and (max-width:1439px){font-size:11px;}@media (prefers-reduced-motion:reduce){&::after{transition:none;}}`
5607
5631
  ], ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.accent.primary);
5608
5632
  var ProductsMenuContent = (0, import_styled_components3.default)(import_radix_ui.DropdownMenu.Content).withConfig({
5609
- componentId: "sc-4d456d17-10"
5633
+ componentId: "sc-eabee95e-10"
5610
5634
  })([
5611
5635
  `z-index:300;width:206px;max-width:var(--radix-dropdown-menu-content-available-width);padding:8px;border:1px solid `,
5612
5636
  `;border-radius:8px;color:`,
@@ -5616,42 +5640,42 @@ var ProductsMenuContent = (0, import_styled_components3.default)(import_radix_ui
5616
5640
  `;}`
5617
5641
  ], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.popup, ({ theme }) => theme.colors.effect.popupShadow, ({ theme }) => theme.colors.border.subtle);
5618
5642
  var ProductsMenuItem = (0, import_styled_components3.default)(import_radix_ui.DropdownMenu.Item).withConfig({
5619
- componentId: "sc-4d456d17-11"
5643
+ componentId: "sc-eabee95e-11"
5620
5644
  })([
5621
5645
  `display:flex;height:44px;align-items:center;padding:12px 8px;border-radius:4px;cursor:pointer;font-size:14px;font-weight:400;line-height:18px;outline:none;color:inherit;text-decoration:none;&[aria-current="page"],&[data-highlighted],&:focus-visible{color:`,
5622
5646
  `;background:transparent;outline:none;}`
5623
5647
  ], ({ theme }) => theme.colors.accent.primary);
5624
5648
  var MobileNavigation2 = import_styled_components3.default.div.withConfig({
5625
- componentId: "sc-4d456d17-12"
5649
+ componentId: "sc-eabee95e-12"
5626
5650
  })([
5627
5651
  `position:relative;display:none;align-items:center;gap:8px;@media (max-width:1279px){display:flex;}@media (max-width:767px){order:3;margin-left:auto;}@media (max-width:620px){gap:2px;}`
5628
5652
  ]);
5629
5653
  var MobileThemeToggle = import_styled_components3.default.div.withConfig({
5630
- componentId: "sc-4d456d17-13"
5654
+ componentId: "sc-eabee95e-13"
5631
5655
  })([
5632
5656
  `display:none;align-items:center;@media (max-width:767px){display:flex;}@media (max-width:620px){&& .theme-toggle--header{border-radius:4px;svg{width:20px;height:20px;}}}`
5633
5657
  ]);
5634
5658
  var MobileLanguageToggle = import_styled_components3.default.div.withConfig({
5635
- componentId: "sc-4d456d17-14"
5659
+ componentId: "sc-eabee95e-14"
5636
5660
  })([
5637
5661
  `display:none;align-items:center;@media (max-width:767px){display:flex;}`
5638
5662
  ]);
5639
5663
  var MobileMenuTrigger = import_styled_components3.default.button.withConfig({
5640
- componentId: "sc-4d456d17-15"
5664
+ componentId: "sc-eabee95e-15"
5641
5665
  })([
5642
5666
  `display:inline-flex;width:42px;height:42px;align-items:center;justify-content:center;border:0;border-radius:9999px;color:`,
5643
5667
  `;background:transparent;cursor:pointer;transition:background-color 160ms ease;&:hover,&[data-state="open"]{background:`,
5644
5668
  `;}@media (max-width:620px){width:24px;height:24px;border-radius:4px;svg{flex-shrink:0;}}`
5645
5669
  ], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover);
5646
5670
  var MobileDrawerOverlay = (0, import_styled_components3.default)(import_radix_ui.Dialog.Overlay).withConfig({
5647
- componentId: "sc-4d456d17-16"
5671
+ componentId: "sc-eabee95e-16"
5648
5672
  })([
5649
5673
  `position:fixed;z-index:200;inset:0;background:rgb(0 0 0 / 48%);backdrop-filter:blur(2px);&[data-state="open"]{animation:`,
5650
5674
  ` 220ms ease-out;}&[data-state="closed"]{animation:`,
5651
5675
  ` 180ms ease-in;}@media (prefers-reduced-motion:reduce){animation:none;}@media (max-width:767px){top:var(--header-height);background:rgb(5 8 16 / 40%);backdrop-filter:blur(5px);}`
5652
5676
  ], fadeIn, fadeOut);
5653
5677
  var MobileDrawerContent = (0, import_styled_components3.default)(import_radix_ui.Dialog.Content).withConfig({
5654
- componentId: "sc-4d456d17-17"
5678
+ componentId: "sc-eabee95e-17"
5655
5679
  })([
5656
5680
  `position:fixed;z-index:201;top:0;right:0;width:320px;max-width:calc(100% - 24px);height:100vh;padding:20px;overflow-y:auto;color:`,
5657
5681
  `;background:`,
@@ -5662,103 +5686,103 @@ var MobileDrawerContent = (0, import_styled_components3.default)(import_radix_ui
5662
5686
  ` 180ms ease-in;}}`
5663
5687
  ], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.canvas, slideIn, slideOut, dropIn, dropOut);
5664
5688
  var MobileDrawerHeader = import_styled_components3.default.div.withConfig({
5665
- componentId: "sc-4d456d17-18"
5689
+ componentId: "sc-eabee95e-18"
5666
5690
  })([
5667
5691
  `display:flex;min-height:44px;margin-bottom:24px;align-items:center;justify-content:space-between;gap:16px;@media (max-width:767px){display:none;}`
5668
5692
  ]);
5669
5693
  var MobileDrawerTitle = (0, import_styled_components3.default)(import_radix_ui.Dialog.Title).withConfig({
5670
- componentId: "sc-4d456d17-19"
5694
+ componentId: "sc-eabee95e-19"
5671
5695
  })([
5672
5696
  `margin:0;font-size:20px;font-weight:700;line-height:28px;`
5673
5697
  ]);
5674
5698
  var MobileDrawerClose = (0, import_styled_components3.default)(import_radix_ui.Dialog.Close).withConfig({
5675
- componentId: "sc-4d456d17-20"
5699
+ componentId: "sc-eabee95e-20"
5676
5700
  })([
5677
5701
  `display:inline-flex;width:40px;height:40px;flex:0 0 40px;align-items:center;justify-content:center;border:0;border-radius:50%;color:`,
5678
5702
  `;background:transparent;cursor:pointer;&:hover{background:`,
5679
5703
  `;}`
5680
5704
  ], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover);
5681
5705
  var MobileDrawerActions = import_styled_components3.default.div.withConfig({
5682
- componentId: "sc-4d456d17-21"
5706
+ componentId: "sc-eabee95e-21"
5683
5707
  })([
5684
5708
  `display:none;@media (max-width:767px){display:grid;width:100%;margin-bottom:8px;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}`
5685
5709
  ]);
5686
5710
  var MobileMenuPanel = import_styled_components3.default.nav.withConfig({
5687
- componentId: "sc-4d456d17-22"
5711
+ componentId: "sc-eabee95e-22"
5688
5712
  })([
5689
5713
  `display:flex;flex-direction:column;gap:6px;a,button{width:100%;border:0;display:flex;border-radius:8px;padding:14px 12px;color:`,
5690
5714
  `;background:transparent;cursor:pointer;font-family:inherit;font-size:14px;font-weight:600;text-align:left;transition:color 160ms ease,background-color 160ms ease;}a:hover,a:focus-visible,button:not(:disabled):hover,button:not(:disabled):focus-visible{color:`,
5691
5715
  `;background:`,
5692
5716
  `;outline:none;}button:disabled{cursor:not-allowed;opacity:0.55;}.mobile-menu-group,.mobile-menu-submenu{display:flex;flex-direction:column;}.mobile-menu-submenu[hidden]{display:none;}a[aria-current="page"],button.mobile-menu-accordion-trigger[data-active="true"],button.mobile-menu-accordion-trigger[aria-expanded="true"]{color:`,
5693
- `;}.mobile-menu-submenu a{padding-left:28px;font-size:13px;font-weight:500;}.mobile-products-chevron{display:inline-flex;transition:transform 160ms ease;}.mobile-menu-accordion-trigger[aria-expanded="true"] .mobile-products-chevron{transform:rotate(180deg);}@media (max-width:767px){gap:0;a,button{display:flex;min-height:42px;align-items:center;justify-content:space-between;padding:12px 0;font-weight:700;line-height:18px;}a[data-accent="true"]{color:#f9bb3a;}.mobile-menu-submenu a{min-height:34px;padding:7px 0 7px 20px;font-size:14px;font-weight:500;}.mobile-menu-login{display:none;}svg{width:18px;height:18px;flex:0 0 18px;}}@media (prefers-reduced-motion:reduce){.mobile-products-chevron{transition:none;}}`
5717
+ `;}.mobile-menu-submenu a{padding-left:28px;font-size:13px;font-weight:500;}.mobile-products-chevron{display:inline-flex;transition:transform 160ms ease;}.mobile-menu-accordion-trigger[aria-expanded="true"] .mobile-products-chevron{transform:rotate(180deg);}@media (max-width:767px){gap:0;a,button{display:flex;min-height:42px;align-items:center;justify-content:space-between;padding:12px;font-weight:700;line-height:18px;}a[data-accent="true"]{color:#f9bb3a;}.mobile-menu-submenu a{min-height:34px;padding:7px 12px 7px 28px;font-size:14px;font-weight:500;}.mobile-menu-login{display:none;}svg{width:18px;height:18px;flex:0 0 18px;}}@media (prefers-reduced-motion:reduce){.mobile-products-chevron{transition:none;}}`
5694
5718
  ], ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover, ({ theme }) => theme.colors.accent.primary);
5695
5719
  var RightActions = import_styled_components3.default.div.withConfig({
5696
- componentId: "sc-4d456d17-23"
5720
+ componentId: "sc-eabee95e-23"
5697
5721
  })([
5698
5722
  `display:flex;margin-left:auto;align-items:center;gap:12px;& > div{display:flex;align-items:center;gap:8px;}@media (max-width:1279px){display:none;}`
5699
5723
  ]);
5700
5724
  var IconButton2 = import_styled_components3.default.button.withConfig({
5701
- componentId: "sc-4d456d17-24"
5725
+ componentId: "sc-eabee95e-24"
5702
5726
  })([
5703
5727
  `display:inline-flex;width:36px;height:36px;flex:0 0 auto;align-items:center;justify-content:center;border:0;border-radius:8px;color:`,
5704
5728
  `;background:transparent;cursor:pointer;transition:background-color 160ms ease;svg{width:24px;height:24px;}&:hover{background:`,
5705
5729
  `;}@media (max-width:480px){display:none;}`
5706
5730
  ], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover);
5707
5731
  var LanguageTrigger = (0, import_styled_components3.default)(IconButton2).withConfig({
5708
- componentId: "sc-4d456d17-25"
5732
+ componentId: "sc-eabee95e-25"
5709
5733
  })([
5710
5734
  `&[data-state="open"]{color:#f9bb3a;background:`,
5711
5735
  `;}@media (max-width:767px){display:inline-flex;}@media (max-width:620px){border-radius:4px;svg{width:20px;height:20px;flex-shrink:0;}}`
5712
5736
  ], ({ theme }) => theme.colors.background.hover);
5713
5737
  var LanguageMenuContent = (0, import_styled_components3.default)(import_radix_ui.DropdownMenu.Content).withConfig({
5714
- componentId: "sc-4d456d17-26"
5738
+ componentId: "sc-eabee95e-26"
5715
5739
  })([
5716
5740
  `z-index:300;width:180px;padding:8px;border:1px solid #e6e7ea;border-radius:12px;color:#05080f;background:#f9fafb;box-shadow:0 4px 8px rgb(5 8 16 / 5%);outline:none;transform-origin:var(--radix-dropdown-menu-content-transform-origin);&[data-state="open"]{animation:`,
5717
5741
  ` 140ms ease-out;}&[data-state="closed"]{animation:`,
5718
5742
  ` 100ms ease-in;}:root[data-theme="dark"] &{border-color:#48484a;color:#f2f2f7;background:#2c2c2e;box-shadow:0 4px 12px rgb(0 0 0 / 24%);}&[data-compact="true"]{width:148px;padding:6px;}@media (prefers-reduced-motion:reduce){animation:none;}`
5719
5743
  ], fadeIn, fadeOut);
5720
5744
  var LanguageMenuItem = (0, import_styled_components3.default)(import_radix_ui.DropdownMenu.RadioItem).withConfig({
5721
- componentId: "sc-4d456d17-27"
5745
+ componentId: "sc-eabee95e-27"
5722
5746
  })([
5723
5747
  `display:flex;width:100%;height:46px;padding:12px 8px;align-items:center;gap:8px;border-radius:8px;cursor:pointer;font-size:16px;font-weight:500;line-height:22px;outline:none;user-select:none;&[data-highlighted]{background:#f1f2f4;}:root[data-theme="dark"] &[data-highlighted]{background:#3a3a3c;}`,
5724
5748
  `[data-compact="true"] &{height:40px;padding:10px 6px;font-size:14px;line-height:18px;}`
5725
5749
  ], LanguageMenuContent);
5726
5750
  var LanguageFlag = import_styled_components3.default.span.withConfig({
5727
- componentId: "sc-4d456d17-28"
5751
+ componentId: "sc-eabee95e-28"
5728
5752
  })([
5729
5753
  `display:inline-flex;width:20px;height:20px;flex:0 0 20px;overflow:hidden;align-items:center;justify-content:center;border-radius:50%;img{width:100%;height:100%;max-width:none;object-fit:cover;}`
5730
5754
  ]);
5731
5755
  var LanguageItemIndicator = (0, import_styled_components3.default)(import_radix_ui.DropdownMenu.ItemIndicator).withConfig({
5732
- componentId: "sc-4d456d17-29"
5756
+ componentId: "sc-eabee95e-29"
5733
5757
  })([
5734
5758
  `display:inline-flex;width:18px;height:18px;margin-left:auto;flex:0 0 18px;align-items:center;justify-content:center;img{display:block;width:18px;height:18px;}`,
5735
5759
  `[data-compact="true"] &,`,
5736
5760
  `[data-compact="true"] & img{width:16px;height:16px;flex-basis:16px;}`
5737
5761
  ], LanguageMenuContent, LanguageMenuContent);
5738
5762
  var ActionDivider = import_styled_components3.default.span.withConfig({
5739
- componentId: "sc-4d456d17-30"
5763
+ componentId: "sc-eabee95e-30"
5740
5764
  })([
5741
5765
  `width:1px;height:16px;background:`,
5742
5766
  `;@media (max-width:608px){display:none;}`
5743
5767
  ], ({ theme }) => theme.colors.border.line);
5744
5768
  var LoginLink = import_styled_components3.default.a.withConfig({
5745
- componentId: "sc-4d456d17-31"
5769
+ componentId: "sc-eabee95e-31"
5746
5770
  })([
5747
5771
  `display:inline-flex;text-decoration:none;height:40px;align-items:center;justify-content:center;border:1px solid #d2d5da;border-radius:6px;padding:0 16px;color:#05080f;background:transparent;font-size:14px;font-weight:700;line-height:18px;white-space:nowrap;transition:background-color 160ms ease,border-color 160ms ease;:root[data-theme="dark"] &{color:#fafafa;}&:not([aria-disabled="true"]):hover{background:`,
5748
5772
  `;}&[aria-disabled="true"]{cursor:not-allowed;opacity:0.55;}@media (max-width:608px){display:none;}`
5749
5773
  ], ({ theme }) => theme.colors.background.hover);
5750
5774
  var OpenAccountButton = (0, import_styled_components3.default)(Button_default).withConfig({
5751
- componentId: "sc-4d456d17-32"
5775
+ componentId: "sc-eabee95e-32"
5752
5776
  })([
5753
5777
  `width:120px;height:40px;min-height:40px;border-radius:6px;padding:0;box-shadow:0 1px 20px rgb(249 187 58 / 60%);font-family:var(--font-inter),sans-serif;font-size:14px;font-weight:600;line-height:22px;white-space:nowrap;&:hover{&::before{opacity:0.8;}}&::before{content:"";position:absolute;left:50%;bottom:0;margin-left:-49px;width:98px;height:22px;background:#ffe492;filter:blur(10px);pointer-events:none;opacity:0;transition:opacity 0.15s linear;}@media (max-width:767px){display:none;}`
5754
5778
  ]);
5755
5779
  var MobileDrawerLoginButton = (0, import_styled_components3.default)(LoginLink).withConfig({
5756
- componentId: "sc-4d456d17-33"
5780
+ componentId: "sc-eabee95e-33"
5757
5781
  })([
5758
5782
  `display:none;@media (max-width:767px){display:inline-flex;width:100%;min-width:0;padding-inline:12px;&:disabled{opacity:1;}}`
5759
5783
  ]);
5760
5784
  var MobileDrawerOpenAccountButton = (0, import_styled_components3.default)(OpenAccountButton).withConfig({
5761
- componentId: "sc-4d456d17-34"
5785
+ componentId: "sc-eabee95e-34"
5762
5786
  })([
5763
5787
  `display:none;@media (max-width:767px){display:flex;width:100%;min-width:0;}`
5764
5788
  ]);
@@ -15167,7 +15191,12 @@ var HeroArt_default = HeroArtBlock;
15167
15191
  // src/commodity-original/components/LandingPage/HeroSection.tsx
15168
15192
  var import_jsx_runtime54 = require("react/jsx-runtime");
15169
15193
  function HeroSection2() {
15170
- const { t } = (0, import_react_i18next23.useTranslation)();
15194
+ const { t, i18n } = (0, import_react_i18next23.useTranslation)();
15195
+ const language = i18n.resolvedLanguage?.startsWith("en") ? "en" : "vi";
15196
+ const ctaField = `${language}.landing.hero.cta`;
15197
+ const content = useCmsElementContent();
15198
+ const editing = useCmsElementEditing();
15199
+ const ctaLink = getCmsButtonLink(content ?? {}, ctaField);
15171
15200
  const background = useCmsImage(
15172
15201
  "heroBackgroundImage",
15173
15202
  "/landing-assets/keyvisual_bg.webp"
@@ -15206,6 +15235,21 @@ function HeroSection2() {
15206
15235
  /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
15207
15236
  Button_default,
15208
15237
  {
15238
+ labelField: "landing.hero.cta",
15239
+ "data-cms-button-field": ctaField,
15240
+ href: ctaLink.href,
15241
+ target: ctaLink.href && ctaLink.type === "external" ? "_blank" : void 0,
15242
+ rel: ctaLink.href && ctaLink.type === "external" ? "noopener noreferrer" : void 0,
15243
+ disabled: !ctaLink.href && !editing?.editable,
15244
+ onClick: (event) => {
15245
+ if (editing?.editable) {
15246
+ event.preventDefault();
15247
+ event.stopPropagation();
15248
+ const text2 = event.currentTarget.querySelector("[data-cms-text-field]");
15249
+ text2?.focus();
15250
+ editing.onSelectText?.({ field: ctaField, currentColor: text2?.ownerDocument.defaultView?.getComputedStyle(text2).color ?? "" });
15251
+ }
15252
+ },
15209
15253
  size: "sm",
15210
15254
  radius: 6,
15211
15255
  tint: "#F9FAFB",
@@ -16887,7 +16931,7 @@ var footer = exactBlock(
16887
16931
  FooterWithFloatingActions
16888
16932
  );
16889
16933
  var hero = exactBlock(
16890
- { type: "commodity-hero", name: "Landing \u2014 Hero g\u1ED1c", description: "Hero nguy\xEAn b\u1EA3n.", prefixes: ["landing.hero."], images: heroImages },
16934
+ { type: "commodity-hero", name: "Landing \u2014 Hero g\u1ED1c", description: "Hero nguy\xEAn b\u1EA3n.", prefixes: ["landing.hero."], images: heroImages, fields: cmsHeroButtonLinkFields, defaults: cmsHeroButtonLinkDefaults },
16891
16935
  function OriginalHero() {
16892
16936
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
16893
16937
  /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(LandingAnimations, {}),