@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.mjs CHANGED
@@ -4733,7 +4733,7 @@ function footerButtonField(field) {
4733
4733
  return match ? { listField: match[1], index: Number(match[3]) } : void 0;
4734
4734
  }
4735
4735
  function isCmsButtonField(field) {
4736
- return isCmsHeaderButtonField(field) || Boolean(downloadButtonField(field) || footerButtonField(field));
4736
+ return isCmsHeaderButtonField(field) || /^(vi|en)\.landing\.hero\.cta$/.test(field) || Boolean(downloadButtonField(field) || footerButtonField(field));
4737
4737
  }
4738
4738
  function safeCmsButtonHref(value4, type) {
4739
4739
  const href = safeCmsTextHref(value4);
@@ -4744,7 +4744,7 @@ function getCmsButtonLink(content, field) {
4744
4744
  const footer2 = footerButtonField(field);
4745
4745
  const item = footer2 ? parseChromeItems(content[footer2.listField])?.[footer2.index] : void 0;
4746
4746
  const key = downloadButtonField(field) ?? field;
4747
- const value4 = footer2 ? item?.href ?? "" : String(content[`${key}Href`] ?? (field.endsWith(".register") ? "/#register" : ""));
4747
+ const value4 = footer2 ? item?.href ?? "" : String(content[`${key}Href`] ?? (field.endsWith(".register") || /^(vi|en)\.landing\.hero\.cta$/.test(field) ? "/#register" : ""));
4748
4748
  const storedType = footer2 ? item?.linkType : content[`${key}LinkType`];
4749
4749
  const type = storedType === "external" || storedType !== "internal" && /^https?:\/\//i.test(value4) ? "external" : "internal";
4750
4750
  return { type, value: value4, href: item?.hrefEnabled === "false" ? void 0 : safeCmsButtonHref(value4, type) };
@@ -4761,6 +4761,30 @@ function cmsButtonLinkChanges(content, field, value4, type) {
4761
4761
  const key = downloadButtonField(field) ?? field;
4762
4762
  return { [`${key}Href`]: value4, [`${key}LinkType`]: type };
4763
4763
  }
4764
+ var cmsHeroButtonLinkFields = ["vi", "en"].flatMap((language) => {
4765
+ const field = `${language}.landing.hero.cta`;
4766
+ const group = language === "vi" ? "Ti\u1EBFng Vi\u1EC7t" : "English";
4767
+ return [
4768
+ {
4769
+ key: `${field}LinkType`,
4770
+ label: "M\u1EDF t\xE0i kho\u1EA3n \u2014 lo\u1EA1i li\xEAn k\u1EBFt",
4771
+ type: "select",
4772
+ group,
4773
+ options: [{ value: "internal", label: "Internal \u2014 trong website" }, { value: "external", label: "External \u2014 website kh\xE1c (tab m\u1EDBi)" }]
4774
+ },
4775
+ {
4776
+ key: `${field}Href`,
4777
+ label: "M\u1EDF t\xE0i kho\u1EA3n \u2014 \u0111\u01B0\u1EDDng d\u1EABn",
4778
+ type: "link",
4779
+ group,
4780
+ helperText: "Internal: /duong-dan/ ho\u1EB7c #muc. External: https://\u2026 M\u1EDF trong tab m\u1EDBi."
4781
+ }
4782
+ ];
4783
+ });
4784
+ var cmsHeroButtonLinkDefaults = Object.fromEntries(["vi", "en"].flatMap((language) => [
4785
+ [`${language}.landing.hero.ctaLinkType`, "internal"],
4786
+ [`${language}.landing.hero.ctaHref`, "/#register"]
4787
+ ]));
4764
4788
  var cmsDownloadButtonLinkFields = ["vi", "en"].flatMap(
4765
4789
  (language) => ["appStore", "googlePlay", "web"].flatMap((platform) => {
4766
4790
  const field = `${language}.landing.download.${platform}`;
@@ -5487,48 +5511,48 @@ var dropOut = keyframes([
5487
5511
  `from{opacity:1;transform:translateY(0);}to{opacity:0;transform:translateY(-12px);}`
5488
5512
  ]);
5489
5513
  var HeaderShell = styled3.header.withConfig({
5490
- componentId: "sc-4d456d17-0"
5514
+ componentId: "sc-eabee95e-0"
5491
5515
  })([
5492
5516
  `position:sticky;top:0;z-index:100;display:flex;height:64px;padding:12px 20px;align-items:center;justify-content:center;background:`,
5493
5517
  `;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%);}`
5494
5518
  ], ({ theme }) => theme.colors.background.canvas);
5495
5519
  var HeaderInner = styled3.div.withConfig({
5496
- componentId: "sc-4d456d17-1"
5520
+ componentId: "sc-eabee95e-1"
5497
5521
  })([
5498
5522
  `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;}`
5499
5523
  ]);
5500
5524
  var BrandGroup = styled3.div.withConfig({
5501
- componentId: "sc-4d456d17-2"
5525
+ componentId: "sc-eabee95e-2"
5502
5526
  })([
5503
5527
  `display:flex;flex:0 0 auto;align-items:center;gap:16px;`
5504
5528
  ]);
5505
5529
  var WikiBrand = styled3(Link3).withConfig({
5506
- componentId: "sc-4d456d17-3"
5530
+ componentId: "sc-eabee95e-3"
5507
5531
  })([
5508
5532
  `display:inline-flex;flex:0 0 auto;align-items:center;`
5509
5533
  ]);
5510
5534
  var WikiLogo = styled3(Image).withConfig({
5511
- componentId: "sc-4d456d17-4"
5535
+ componentId: "sc-eabee95e-4"
5512
5536
  })([
5513
5537
  `display:block;width:142px;height:auto;@media (max-width:620px){width:84px;}`
5514
5538
  ]);
5515
5539
  var PartnerBrand = styled3.a.withConfig({
5516
- componentId: "sc-4d456d17-5"
5540
+ componentId: "sc-eabee95e-5"
5517
5541
  })([
5518
5542
  `display:inline-flex;align-items:center;gap:7.2px;color:#009ee3;@media (max-width:767px){display:inline-flex;}`
5519
5543
  ]);
5520
5544
  var MxvLogo = styled3(Image).withConfig({
5521
- componentId: "sc-4d456d17-6"
5545
+ componentId: "sc-eabee95e-6"
5522
5546
  })([
5523
5547
  `display:block;width:95px;height:auto;:root[data-theme="dark"] &{filter:brightness(0) invert(1);}@media (max-width:620px){width:95px;}`
5524
5548
  ]);
5525
5549
  var DesktopNavigation = styled3.nav.withConfig({
5526
- componentId: "sc-4d456d17-7"
5550
+ componentId: "sc-eabee95e-7"
5527
5551
  })([
5528
5552
  `display:flex;align-items:center;gap:16px;@media (max-width:1279px){display:none;}`
5529
5553
  ]);
5530
5554
  var NavigationLink = styled3(Link3).withConfig({
5531
- componentId: "sc-4d456d17-8"
5555
+ componentId: "sc-eabee95e-8"
5532
5556
  })([
5533
5557
  `position:relative;color:`,
5534
5558
  `;font-size:14px;font-weight:700;line-height:18px;white-space:nowrap;transition:color 160ms ease;&:hover,&:focus-visible{color:`,
@@ -5536,14 +5560,14 @@ var NavigationLink = styled3(Link3).withConfig({
5536
5560
  `;}@media (min-width:1280px) and (max-width:1439px){font-size:11px;}`
5537
5561
  ], ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
5538
5562
  var ProductsMenuTrigger = styled3.button.withConfig({
5539
- componentId: "sc-4d456d17-9"
5563
+ componentId: "sc-eabee95e-9"
5540
5564
  })([
5541
5565
  `display:inline-flex;align-items:center;gap:4px;padding:0;border:0;color:`,
5542
5566
  `;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:`,
5543
5567
  `;}&: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;}}`
5544
5568
  ], ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.accent.primary);
5545
5569
  var ProductsMenuContent = styled3(DropdownMenu.Content).withConfig({
5546
- componentId: "sc-4d456d17-10"
5570
+ componentId: "sc-eabee95e-10"
5547
5571
  })([
5548
5572
  `z-index:300;width:206px;max-width:var(--radix-dropdown-menu-content-available-width);padding:8px;border:1px solid `,
5549
5573
  `;border-radius:8px;color:`,
@@ -5553,42 +5577,42 @@ var ProductsMenuContent = styled3(DropdownMenu.Content).withConfig({
5553
5577
  `;}`
5554
5578
  ], ({ 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);
5555
5579
  var ProductsMenuItem = styled3(DropdownMenu.Item).withConfig({
5556
- componentId: "sc-4d456d17-11"
5580
+ componentId: "sc-eabee95e-11"
5557
5581
  })([
5558
5582
  `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:`,
5559
5583
  `;background:transparent;outline:none;}`
5560
5584
  ], ({ theme }) => theme.colors.accent.primary);
5561
5585
  var MobileNavigation2 = styled3.div.withConfig({
5562
- componentId: "sc-4d456d17-12"
5586
+ componentId: "sc-eabee95e-12"
5563
5587
  })([
5564
5588
  `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;}`
5565
5589
  ]);
5566
5590
  var MobileThemeToggle = styled3.div.withConfig({
5567
- componentId: "sc-4d456d17-13"
5591
+ componentId: "sc-eabee95e-13"
5568
5592
  })([
5569
5593
  `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;}}}`
5570
5594
  ]);
5571
5595
  var MobileLanguageToggle = styled3.div.withConfig({
5572
- componentId: "sc-4d456d17-14"
5596
+ componentId: "sc-eabee95e-14"
5573
5597
  })([
5574
5598
  `display:none;align-items:center;@media (max-width:767px){display:flex;}`
5575
5599
  ]);
5576
5600
  var MobileMenuTrigger = styled3.button.withConfig({
5577
- componentId: "sc-4d456d17-15"
5601
+ componentId: "sc-eabee95e-15"
5578
5602
  })([
5579
5603
  `display:inline-flex;width:42px;height:42px;align-items:center;justify-content:center;border:0;border-radius:9999px;color:`,
5580
5604
  `;background:transparent;cursor:pointer;transition:background-color 160ms ease;&:hover,&[data-state="open"]{background:`,
5581
5605
  `;}@media (max-width:620px){width:24px;height:24px;border-radius:4px;svg{flex-shrink:0;}}`
5582
5606
  ], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover);
5583
5607
  var MobileDrawerOverlay = styled3(Dialog.Overlay).withConfig({
5584
- componentId: "sc-4d456d17-16"
5608
+ componentId: "sc-eabee95e-16"
5585
5609
  })([
5586
5610
  `position:fixed;z-index:200;inset:0;background:rgb(0 0 0 / 48%);backdrop-filter:blur(2px);&[data-state="open"]{animation:`,
5587
5611
  ` 220ms ease-out;}&[data-state="closed"]{animation:`,
5588
5612
  ` 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);}`
5589
5613
  ], fadeIn, fadeOut);
5590
5614
  var MobileDrawerContent = styled3(Dialog.Content).withConfig({
5591
- componentId: "sc-4d456d17-17"
5615
+ componentId: "sc-eabee95e-17"
5592
5616
  })([
5593
5617
  `position:fixed;z-index:201;top:0;right:0;width:320px;max-width:calc(100% - 24px);height:100vh;padding:20px;overflow-y:auto;color:`,
5594
5618
  `;background:`,
@@ -5599,103 +5623,103 @@ var MobileDrawerContent = styled3(Dialog.Content).withConfig({
5599
5623
  ` 180ms ease-in;}}`
5600
5624
  ], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.canvas, slideIn, slideOut, dropIn, dropOut);
5601
5625
  var MobileDrawerHeader = styled3.div.withConfig({
5602
- componentId: "sc-4d456d17-18"
5626
+ componentId: "sc-eabee95e-18"
5603
5627
  })([
5604
5628
  `display:flex;min-height:44px;margin-bottom:24px;align-items:center;justify-content:space-between;gap:16px;@media (max-width:767px){display:none;}`
5605
5629
  ]);
5606
5630
  var MobileDrawerTitle = styled3(Dialog.Title).withConfig({
5607
- componentId: "sc-4d456d17-19"
5631
+ componentId: "sc-eabee95e-19"
5608
5632
  })([
5609
5633
  `margin:0;font-size:20px;font-weight:700;line-height:28px;`
5610
5634
  ]);
5611
5635
  var MobileDrawerClose = styled3(Dialog.Close).withConfig({
5612
- componentId: "sc-4d456d17-20"
5636
+ componentId: "sc-eabee95e-20"
5613
5637
  })([
5614
5638
  `display:inline-flex;width:40px;height:40px;flex:0 0 40px;align-items:center;justify-content:center;border:0;border-radius:50%;color:`,
5615
5639
  `;background:transparent;cursor:pointer;&:hover{background:`,
5616
5640
  `;}`
5617
5641
  ], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover);
5618
5642
  var MobileDrawerActions = styled3.div.withConfig({
5619
- componentId: "sc-4d456d17-21"
5643
+ componentId: "sc-eabee95e-21"
5620
5644
  })([
5621
5645
  `display:none;@media (max-width:767px){display:grid;width:100%;margin-bottom:8px;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}`
5622
5646
  ]);
5623
5647
  var MobileMenuPanel = styled3.nav.withConfig({
5624
- componentId: "sc-4d456d17-22"
5648
+ componentId: "sc-eabee95e-22"
5625
5649
  })([
5626
5650
  `display:flex;flex-direction:column;gap:6px;a,button{width:100%;border:0;display:flex;border-radius:8px;padding:14px 12px;color:`,
5627
5651
  `;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:`,
5628
5652
  `;background:`,
5629
5653
  `;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:`,
5630
- `;}.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;}}`
5654
+ `;}.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;}}`
5631
5655
  ], ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover, ({ theme }) => theme.colors.accent.primary);
5632
5656
  var RightActions = styled3.div.withConfig({
5633
- componentId: "sc-4d456d17-23"
5657
+ componentId: "sc-eabee95e-23"
5634
5658
  })([
5635
5659
  `display:flex;margin-left:auto;align-items:center;gap:12px;& > div{display:flex;align-items:center;gap:8px;}@media (max-width:1279px){display:none;}`
5636
5660
  ]);
5637
5661
  var IconButton2 = styled3.button.withConfig({
5638
- componentId: "sc-4d456d17-24"
5662
+ componentId: "sc-eabee95e-24"
5639
5663
  })([
5640
5664
  `display:inline-flex;width:36px;height:36px;flex:0 0 auto;align-items:center;justify-content:center;border:0;border-radius:8px;color:`,
5641
5665
  `;background:transparent;cursor:pointer;transition:background-color 160ms ease;svg{width:24px;height:24px;}&:hover{background:`,
5642
5666
  `;}@media (max-width:480px){display:none;}`
5643
5667
  ], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover);
5644
5668
  var LanguageTrigger = styled3(IconButton2).withConfig({
5645
- componentId: "sc-4d456d17-25"
5669
+ componentId: "sc-eabee95e-25"
5646
5670
  })([
5647
5671
  `&[data-state="open"]{color:#f9bb3a;background:`,
5648
5672
  `;}@media (max-width:767px){display:inline-flex;}@media (max-width:620px){border-radius:4px;svg{width:20px;height:20px;flex-shrink:0;}}`
5649
5673
  ], ({ theme }) => theme.colors.background.hover);
5650
5674
  var LanguageMenuContent = styled3(DropdownMenu.Content).withConfig({
5651
- componentId: "sc-4d456d17-26"
5675
+ componentId: "sc-eabee95e-26"
5652
5676
  })([
5653
5677
  `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:`,
5654
5678
  ` 140ms ease-out;}&[data-state="closed"]{animation:`,
5655
5679
  ` 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;}`
5656
5680
  ], fadeIn, fadeOut);
5657
5681
  var LanguageMenuItem = styled3(DropdownMenu.RadioItem).withConfig({
5658
- componentId: "sc-4d456d17-27"
5682
+ componentId: "sc-eabee95e-27"
5659
5683
  })([
5660
5684
  `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;}`,
5661
5685
  `[data-compact="true"] &{height:40px;padding:10px 6px;font-size:14px;line-height:18px;}`
5662
5686
  ], LanguageMenuContent);
5663
5687
  var LanguageFlag = styled3.span.withConfig({
5664
- componentId: "sc-4d456d17-28"
5688
+ componentId: "sc-eabee95e-28"
5665
5689
  })([
5666
5690
  `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;}`
5667
5691
  ]);
5668
5692
  var LanguageItemIndicator = styled3(DropdownMenu.ItemIndicator).withConfig({
5669
- componentId: "sc-4d456d17-29"
5693
+ componentId: "sc-eabee95e-29"
5670
5694
  })([
5671
5695
  `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;}`,
5672
5696
  `[data-compact="true"] &,`,
5673
5697
  `[data-compact="true"] & img{width:16px;height:16px;flex-basis:16px;}`
5674
5698
  ], LanguageMenuContent, LanguageMenuContent);
5675
5699
  var ActionDivider = styled3.span.withConfig({
5676
- componentId: "sc-4d456d17-30"
5700
+ componentId: "sc-eabee95e-30"
5677
5701
  })([
5678
5702
  `width:1px;height:16px;background:`,
5679
5703
  `;@media (max-width:608px){display:none;}`
5680
5704
  ], ({ theme }) => theme.colors.border.line);
5681
5705
  var LoginLink = styled3.a.withConfig({
5682
- componentId: "sc-4d456d17-31"
5706
+ componentId: "sc-eabee95e-31"
5683
5707
  })([
5684
5708
  `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:`,
5685
5709
  `;}&[aria-disabled="true"]{cursor:not-allowed;opacity:0.55;}@media (max-width:608px){display:none;}`
5686
5710
  ], ({ theme }) => theme.colors.background.hover);
5687
5711
  var OpenAccountButton = styled3(Button_default).withConfig({
5688
- componentId: "sc-4d456d17-32"
5712
+ componentId: "sc-eabee95e-32"
5689
5713
  })([
5690
5714
  `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;}`
5691
5715
  ]);
5692
5716
  var MobileDrawerLoginButton = styled3(LoginLink).withConfig({
5693
- componentId: "sc-4d456d17-33"
5717
+ componentId: "sc-eabee95e-33"
5694
5718
  })([
5695
5719
  `display:none;@media (max-width:767px){display:inline-flex;width:100%;min-width:0;padding-inline:12px;&:disabled{opacity:1;}}`
5696
5720
  ]);
5697
5721
  var MobileDrawerOpenAccountButton = styled3(OpenAccountButton).withConfig({
5698
- componentId: "sc-4d456d17-34"
5722
+ componentId: "sc-eabee95e-34"
5699
5723
  })([
5700
5724
  `display:none;@media (max-width:767px){display:flex;width:100%;min-width:0;}`
5701
5725
  ]);
@@ -15112,7 +15136,12 @@ var HeroArt_default = HeroArtBlock;
15112
15136
  // src/commodity-original/components/LandingPage/HeroSection.tsx
15113
15137
  import { jsx as jsx46, jsxs as jsxs38 } from "react/jsx-runtime";
15114
15138
  function HeroSection2() {
15115
- const { t } = useTranslation23();
15139
+ const { t, i18n } = useTranslation23();
15140
+ const language = i18n.resolvedLanguage?.startsWith("en") ? "en" : "vi";
15141
+ const ctaField = `${language}.landing.hero.cta`;
15142
+ const content = useCmsElementContent();
15143
+ const editing = useCmsElementEditing();
15144
+ const ctaLink = getCmsButtonLink(content ?? {}, ctaField);
15116
15145
  const background = useCmsImage(
15117
15146
  "heroBackgroundImage",
15118
15147
  "/landing-assets/keyvisual_bg.webp"
@@ -15151,6 +15180,21 @@ function HeroSection2() {
15151
15180
  /* @__PURE__ */ jsx46(
15152
15181
  Button_default,
15153
15182
  {
15183
+ labelField: "landing.hero.cta",
15184
+ "data-cms-button-field": ctaField,
15185
+ href: ctaLink.href,
15186
+ target: ctaLink.href && ctaLink.type === "external" ? "_blank" : void 0,
15187
+ rel: ctaLink.href && ctaLink.type === "external" ? "noopener noreferrer" : void 0,
15188
+ disabled: !ctaLink.href && !editing?.editable,
15189
+ onClick: (event) => {
15190
+ if (editing?.editable) {
15191
+ event.preventDefault();
15192
+ event.stopPropagation();
15193
+ const text2 = event.currentTarget.querySelector("[data-cms-text-field]");
15194
+ text2?.focus();
15195
+ editing.onSelectText?.({ field: ctaField, currentColor: text2?.ownerDocument.defaultView?.getComputedStyle(text2).color ?? "" });
15196
+ }
15197
+ },
15154
15198
  size: "sm",
15155
15199
  radius: 6,
15156
15200
  tint: "#F9FAFB",
@@ -16832,7 +16876,7 @@ var footer = exactBlock(
16832
16876
  FooterWithFloatingActions
16833
16877
  );
16834
16878
  var hero = exactBlock(
16835
- { type: "commodity-hero", name: "Landing \u2014 Hero g\u1ED1c", description: "Hero nguy\xEAn b\u1EA3n.", prefixes: ["landing.hero."], images: heroImages },
16879
+ { type: "commodity-hero", name: "Landing \u2014 Hero g\u1ED1c", description: "Hero nguy\xEAn b\u1EA3n.", prefixes: ["landing.hero."], images: heroImages, fields: cmsHeroButtonLinkFields, defaults: cmsHeroButtonLinkDefaults },
16836
16880
  function OriginalHero() {
16837
16881
  return /* @__PURE__ */ jsxs41(Fragment12, { children: [
16838
16882
  /* @__PURE__ */ jsx49(LandingAnimations, {}),