@enyxs/wikex-components 0.11.50 → 0.11.51
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/README.md +4 -0
- package/dist/chrome-model.js +23 -0
- package/dist/chrome-model.mjs +23 -0
- package/dist/fees.js +26 -12
- package/dist/fees.mjs +26 -12
- package/dist/index.js +165 -82
- package/dist/index.mjs +165 -82
- package/dist/products.js +26 -12
- package/dist/products.mjs +26 -12
- package/dist/ui.d.mts +2 -1
- package/dist/ui.d.ts +2 -1
- package/dist/ui.js +26 -12
- package/dist/ui.mjs +26 -12
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7943,6 +7943,29 @@ function migrateWikexChromeContent(type, content) {
|
|
|
7943
7943
|
delete result[key + "Color"];
|
|
7944
7944
|
delete result[key + "TextLayout"];
|
|
7945
7945
|
}
|
|
7946
|
+
if (type === "commodity-footer") for (const language of ["vi", "en"]) {
|
|
7947
|
+
const key = `${language}.footer.productLinks`;
|
|
7948
|
+
const items = parseChromeItems(result[key]);
|
|
7949
|
+
if (!items) continue;
|
|
7950
|
+
const categories = {
|
|
7951
|
+
"kim lo\u1EA1i": "metal",
|
|
7952
|
+
"metals": "metal",
|
|
7953
|
+
"metal": "metal",
|
|
7954
|
+
"n\xF4ng s\u1EA3n": "agriculture",
|
|
7955
|
+
"agriculture": "agriculture",
|
|
7956
|
+
"agricultural products": "agriculture",
|
|
7957
|
+
"c\xF4ng nghi\u1EC7p": "industrial",
|
|
7958
|
+
"nguy\xEAn li\u1EC7u c\xF4ng nghi\u1EC7p": "industrial",
|
|
7959
|
+
"industrial": "industrial",
|
|
7960
|
+
"industrial materials": "industrial",
|
|
7961
|
+
"n\u0103ng l\u01B0\u1EE3ng": "energy",
|
|
7962
|
+
"energy": "energy"
|
|
7963
|
+
};
|
|
7964
|
+
result[key] = JSON.stringify(items.map((item) => {
|
|
7965
|
+
const category = categories[item.label?.trim().toLocaleLowerCase("vi")];
|
|
7966
|
+
return category && /^\/(?:products|san-pham)\/?$/.test(item.href ?? "") ? { ...item, href: `${item.href.replace(/\/$/, "")}/?category=${category}` } : item;
|
|
7967
|
+
}));
|
|
7968
|
+
}
|
|
7946
7969
|
return result;
|
|
7947
7970
|
}
|
|
7948
7971
|
function flattenChromeLists(type, content, language) {
|
|
@@ -8130,7 +8153,7 @@ function ExactTextProvider({ content, fields: fields2, children }) {
|
|
|
8130
8153
|
}, [content, fields2]);
|
|
8131
8154
|
return /* @__PURE__ */ jsx28(ExactTextContext.Provider, { value: entries, children });
|
|
8132
8155
|
}
|
|
8133
|
-
function ExactText({ cmsAs, children, style, cmsDefaultRichText, cmsField, ...props }) {
|
|
8156
|
+
function ExactText({ cmsAs, cmsHeading, children, style, cmsDefaultRichText, cmsField, ...props }) {
|
|
8134
8157
|
const entries = useContext5(ExactTextContext);
|
|
8135
8158
|
const content = useCmsElementContent();
|
|
8136
8159
|
const editing = useCmsElementEditing();
|
|
@@ -8141,10 +8164,10 @@ function ExactText({ cmsAs, children, style, cmsDefaultRichText, cmsField, ...pr
|
|
|
8141
8164
|
const hidden2 = useCmsElementHidden(entry?.field);
|
|
8142
8165
|
const metadata = parseCmsTextLayout(entry?.layout);
|
|
8143
8166
|
const legacyList = metadata.blockType === "ul" || metadata.blockType === "ol" ? metadata.blockType : void 0;
|
|
8144
|
-
const listType = metadata.listType ?? legacyList;
|
|
8145
|
-
const block = legacyList ? void 0 : metadata.blockType;
|
|
8167
|
+
const listType = cmsHeading ? void 0 : metadata.listType ?? legacyList;
|
|
8168
|
+
const block = cmsHeading ?? (legacyList ? void 0 : metadata.blockType);
|
|
8146
8169
|
const listItem = cmsAs === "li" && Boolean(block);
|
|
8147
|
-
const templateBlock = useCmsTextBlock(block);
|
|
8170
|
+
const templateBlock = useCmsTextBlock(cmsHeading ? void 0 : block);
|
|
8148
8171
|
if (hidden2) return /* @__PURE__ */ jsx28(CmsAddedElements, { field: entry?.field });
|
|
8149
8172
|
const host = block ?? (listType ? "span" : cmsAs);
|
|
8150
8173
|
const layout = entry ? cmsTextLayoutStyle(entry.layout, Boolean(templateBlock)) : void 0;
|
|
@@ -8311,63 +8334,68 @@ var submenuOut = keyframes([
|
|
|
8311
8334
|
`from{opacity:1;transform:translateY(0) scale(1);}to{opacity:0;transform:translateY(-4px) scale(0.98);}`
|
|
8312
8335
|
]);
|
|
8313
8336
|
var HeaderShell = styled5.header.withConfig({
|
|
8314
|
-
componentId: "sc-
|
|
8337
|
+
componentId: "sc-a7662b4d-0"
|
|
8315
8338
|
})([
|
|
8316
8339
|
`position:sticky;top:0;z-index:100;display:flex;height:64px;padding:12px 20px;align-items:center;justify-content:center;background:`,
|
|
8317
8340
|
`;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%);}`
|
|
8318
8341
|
], ({ theme }) => theme.colors.background.canvas);
|
|
8319
8342
|
var HeaderInner = styled5.div.withConfig({
|
|
8320
|
-
componentId: "sc-
|
|
8343
|
+
componentId: "sc-a7662b4d-1"
|
|
8321
8344
|
})([
|
|
8322
8345
|
`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;}`
|
|
8323
8346
|
]);
|
|
8324
8347
|
var BrandGroup = styled5.div.withConfig({
|
|
8325
|
-
componentId: "sc-
|
|
8348
|
+
componentId: "sc-a7662b4d-2"
|
|
8326
8349
|
})([
|
|
8327
8350
|
`display:flex;flex:0 0 auto;align-items:center;gap:16px;`
|
|
8328
8351
|
]);
|
|
8329
8352
|
var WikiBrand = styled5(Link3).withConfig({
|
|
8330
|
-
componentId: "sc-
|
|
8353
|
+
componentId: "sc-a7662b4d-3"
|
|
8331
8354
|
})([
|
|
8332
8355
|
`display:inline-flex;flex:0 0 auto;align-items:center;`
|
|
8333
8356
|
]);
|
|
8334
8357
|
var WikiLogo = styled5(Image).withConfig({
|
|
8335
|
-
componentId: "sc-
|
|
8358
|
+
componentId: "sc-a7662b4d-4"
|
|
8336
8359
|
})([
|
|
8337
8360
|
`display:block;width:142px;height:auto;@media (max-width:620px){width:84px;}`
|
|
8338
8361
|
]);
|
|
8339
8362
|
var PartnerBrand = styled5.a.withConfig({
|
|
8340
|
-
componentId: "sc-
|
|
8363
|
+
componentId: "sc-a7662b4d-5"
|
|
8341
8364
|
})([
|
|
8342
8365
|
`display:inline-flex;align-items:center;gap:7.2px;color:#009ee3;@media (max-width:767px){display:inline-flex;}`
|
|
8343
8366
|
]);
|
|
8344
8367
|
var MxvLogo = styled5(Image).withConfig({
|
|
8345
|
-
componentId: "sc-
|
|
8368
|
+
componentId: "sc-a7662b4d-6"
|
|
8346
8369
|
})([
|
|
8347
8370
|
`display:block;width:95px;height:auto;:root[data-theme="dark"] &{filter:brightness(0) invert(1);}@media (max-width:620px){width:95px;}`
|
|
8348
8371
|
]);
|
|
8349
8372
|
var DesktopNavigation = styled5.nav.withConfig({
|
|
8350
|
-
componentId: "sc-
|
|
8373
|
+
componentId: "sc-a7662b4d-7"
|
|
8351
8374
|
})([
|
|
8352
8375
|
`display:flex;align-items:center;gap:16px;@media (max-width:1279px){display:none;}`
|
|
8353
8376
|
]);
|
|
8354
8377
|
var NavigationLink = styled5(Link3).withConfig({
|
|
8355
|
-
componentId: "sc-
|
|
8378
|
+
componentId: "sc-a7662b4d-8"
|
|
8356
8379
|
})([
|
|
8357
8380
|
`position:relative;color:`,
|
|
8358
8381
|
`;font-size:14px;font-weight:700;line-height:18px;white-space:nowrap;transition:color 160ms ease;&:hover,&:focus-visible{color:`,
|
|
8359
8382
|
`;}&:focus-visible{outline:none;}&[aria-current="page"]{color:`,
|
|
8360
8383
|
`;}@media (min-width:1280px) and (max-width:1439px){font-size:11px;}`
|
|
8361
8384
|
], ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
|
|
8385
|
+
var ProductsMenuGroup = styled5.div.withConfig({
|
|
8386
|
+
componentId: "sc-a7662b4d-9"
|
|
8387
|
+
})([
|
|
8388
|
+
`display:inline-flex;align-items:center;gap:4px;`
|
|
8389
|
+
]);
|
|
8362
8390
|
var ProductsMenuTrigger = styled5.button.withConfig({
|
|
8363
|
-
componentId: "sc-
|
|
8391
|
+
componentId: "sc-a7662b4d-10"
|
|
8364
8392
|
})([
|
|
8365
8393
|
`display:inline-flex;align-items:center;gap:4px;padding:0;border:0;color:`,
|
|
8366
|
-
`;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:`,
|
|
8394
|
+
`;background:transparent;cursor:pointer;font-family:inherit;font-size:14px;font-weight:700;line-height:18px;white-space:nowrap;min-width:24px;min-height:32px;justify-content:center;&[data-state="open"],&[data-active="true"],&:hover,&:focus-visible{color:`,
|
|
8367
8395
|
`;}&: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;}}`
|
|
8368
8396
|
], ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.accent.primary);
|
|
8369
8397
|
var ProductsMenuContent = styled5(DropdownMenu.Content).withConfig({
|
|
8370
|
-
componentId: "sc-
|
|
8398
|
+
componentId: "sc-a7662b4d-11"
|
|
8371
8399
|
})([
|
|
8372
8400
|
`z-index:300;width:206px;max-width:var(--radix-dropdown-menu-content-available-width);padding:8px;border:1px solid `,
|
|
8373
8401
|
`;border-radius:8px;color:`,
|
|
@@ -8379,42 +8407,42 @@ var ProductsMenuContent = styled5(DropdownMenu.Content).withConfig({
|
|
|
8379
8407
|
`;}@media (prefers-reduced-motion:reduce){animation:none !important;}`
|
|
8380
8408
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.popup, ({ theme }) => theme.colors.effect.popupShadow, submenuIn, submenuOut, ({ theme }) => theme.colors.border.subtle);
|
|
8381
8409
|
var ProductsMenuItem = styled5(DropdownMenu.Item).withConfig({
|
|
8382
|
-
componentId: "sc-
|
|
8410
|
+
componentId: "sc-a7662b4d-12"
|
|
8383
8411
|
})([
|
|
8384
8412
|
`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:`,
|
|
8385
8413
|
`;background:transparent;outline:none;}`
|
|
8386
8414
|
], ({ theme }) => theme.colors.accent.primary);
|
|
8387
8415
|
var MobileNavigation2 = styled5.div.withConfig({
|
|
8388
|
-
componentId: "sc-
|
|
8416
|
+
componentId: "sc-a7662b4d-13"
|
|
8389
8417
|
})([
|
|
8390
8418
|
`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;}`
|
|
8391
8419
|
]);
|
|
8392
8420
|
var MobileThemeToggle = styled5.div.withConfig({
|
|
8393
|
-
componentId: "sc-
|
|
8421
|
+
componentId: "sc-a7662b4d-14"
|
|
8394
8422
|
})([
|
|
8395
8423
|
`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;}}}`
|
|
8396
8424
|
]);
|
|
8397
8425
|
var MobileLanguageToggle = styled5.div.withConfig({
|
|
8398
|
-
componentId: "sc-
|
|
8426
|
+
componentId: "sc-a7662b4d-15"
|
|
8399
8427
|
})([
|
|
8400
8428
|
`display:none;align-items:center;@media (max-width:767px){display:flex;}`
|
|
8401
8429
|
]);
|
|
8402
8430
|
var MobileMenuTrigger = styled5.button.withConfig({
|
|
8403
|
-
componentId: "sc-
|
|
8431
|
+
componentId: "sc-a7662b4d-16"
|
|
8404
8432
|
})([
|
|
8405
8433
|
`display:inline-flex;width:42px;height:42px;align-items:center;justify-content:center;border:0;border-radius:9999px;color:`,
|
|
8406
8434
|
`;background:transparent;cursor:pointer;transition:background-color 160ms ease;&:hover,&[data-state="open"]{background:`,
|
|
8407
8435
|
`;}@media (max-width:620px){width:24px;height:24px;border-radius:4px;svg{flex-shrink:0;}}`
|
|
8408
8436
|
], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover);
|
|
8409
8437
|
var MobileDrawerOverlay = styled5(Dialog.Overlay).withConfig({
|
|
8410
|
-
componentId: "sc-
|
|
8438
|
+
componentId: "sc-a7662b4d-17"
|
|
8411
8439
|
})([
|
|
8412
8440
|
`position:fixed;z-index:200;inset:0;background:rgb(0 0 0 / 48%);backdrop-filter:blur(2px);&[data-state="open"]{animation:`,
|
|
8413
8441
|
` 220ms ease-out;}&[data-state="closed"]{animation:`,
|
|
8414
8442
|
` 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);}`
|
|
8415
8443
|
], fadeIn, fadeOut);
|
|
8416
8444
|
var MobileDrawerContent = styled5(Dialog.Content).withConfig({
|
|
8417
|
-
componentId: "sc-
|
|
8445
|
+
componentId: "sc-a7662b4d-18"
|
|
8418
8446
|
})([
|
|
8419
8447
|
`position:fixed;z-index:201;top:0;right:0;width:320px;max-width:calc(100% - 24px);height:100vh;padding:20px;overflow-y:auto;color:`,
|
|
8420
8448
|
`;background:`,
|
|
@@ -8425,103 +8453,103 @@ var MobileDrawerContent = styled5(Dialog.Content).withConfig({
|
|
|
8425
8453
|
` 180ms ease-in;}}`
|
|
8426
8454
|
], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.canvas, slideIn, slideOut, dropIn, dropOut);
|
|
8427
8455
|
var MobileDrawerHeader = styled5.div.withConfig({
|
|
8428
|
-
componentId: "sc-
|
|
8456
|
+
componentId: "sc-a7662b4d-19"
|
|
8429
8457
|
})([
|
|
8430
8458
|
`display:flex;min-height:44px;margin-bottom:24px;align-items:center;justify-content:space-between;gap:16px;@media (max-width:767px){display:none;}`
|
|
8431
8459
|
]);
|
|
8432
8460
|
var MobileDrawerTitle = styled5(Dialog.Title).withConfig({
|
|
8433
|
-
componentId: "sc-
|
|
8461
|
+
componentId: "sc-a7662b4d-20"
|
|
8434
8462
|
})([
|
|
8435
8463
|
`margin:0;font-size:20px;font-weight:700;line-height:28px;`
|
|
8436
8464
|
]);
|
|
8437
8465
|
var MobileDrawerClose = styled5(Dialog.Close).withConfig({
|
|
8438
|
-
componentId: "sc-
|
|
8466
|
+
componentId: "sc-a7662b4d-21"
|
|
8439
8467
|
})([
|
|
8440
8468
|
`display:inline-flex;width:40px;height:40px;flex:0 0 40px;align-items:center;justify-content:center;border:0;border-radius:50%;color:`,
|
|
8441
8469
|
`;background:transparent;cursor:pointer;&:hover{background:`,
|
|
8442
8470
|
`;}`
|
|
8443
8471
|
], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover);
|
|
8444
8472
|
var MobileDrawerActions = styled5.div.withConfig({
|
|
8445
|
-
componentId: "sc-
|
|
8473
|
+
componentId: "sc-a7662b4d-22"
|
|
8446
8474
|
})([
|
|
8447
8475
|
`display:none;@media (max-width:767px){display:grid;width:100%;margin-bottom:8px;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}`
|
|
8448
8476
|
]);
|
|
8449
8477
|
var MobileMenuPanel = styled5.nav.withConfig({
|
|
8450
|
-
componentId: "sc-
|
|
8478
|
+
componentId: "sc-a7662b4d-23"
|
|
8451
8479
|
})([
|
|
8452
8480
|
`display:flex;flex-direction:column;gap:6px;a,button{width:100%;border:0;display:flex;border-radius:8px;padding:14px 12px;color:`,
|
|
8453
8481
|
`;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:`,
|
|
8454
8482
|
`;background:`,
|
|
8455
|
-
`;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:`,
|
|
8483
|
+
`;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;}.mobile-menu-parent{display:flex;align-items:center;}.mobile-menu-parent > a,.mobile-menu-parent > span{flex:1;min-width:0;}.mobile-menu-parent > button{flex:0 0 44px;width:44px;justify-content:center;}a[aria-current="page"],button.mobile-menu-accordion-trigger[data-active="true"],button.mobile-menu-accordion-trigger[aria-expanded="true"]{color:`,
|
|
8456
8484
|
`;}.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;}}`
|
|
8457
8485
|
], ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover, ({ theme }) => theme.colors.accent.primary);
|
|
8458
8486
|
var RightActions = styled5.div.withConfig({
|
|
8459
|
-
componentId: "sc-
|
|
8487
|
+
componentId: "sc-a7662b4d-24"
|
|
8460
8488
|
})([
|
|
8461
8489
|
`display:flex;margin-left:auto;align-items:center;gap:12px;& > div{display:flex;align-items:center;gap:8px;}@media (max-width:1279px){display:none;}`
|
|
8462
8490
|
]);
|
|
8463
8491
|
var IconButton2 = styled5.button.withConfig({
|
|
8464
|
-
componentId: "sc-
|
|
8492
|
+
componentId: "sc-a7662b4d-25"
|
|
8465
8493
|
})([
|
|
8466
8494
|
`display:inline-flex;width:36px;height:36px;flex:0 0 auto;align-items:center;justify-content:center;border:0;border-radius:8px;color:`,
|
|
8467
8495
|
`;background:transparent;cursor:pointer;transition:background-color 160ms ease;svg{width:24px;height:24px;}&:hover{background:`,
|
|
8468
8496
|
`;}@media (max-width:480px){display:none;}`
|
|
8469
8497
|
], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover);
|
|
8470
8498
|
var LanguageTrigger = styled5(IconButton2).withConfig({
|
|
8471
|
-
componentId: "sc-
|
|
8499
|
+
componentId: "sc-a7662b4d-26"
|
|
8472
8500
|
})([
|
|
8473
8501
|
`&[data-state="open"]{color:#f9bb3a;background:`,
|
|
8474
8502
|
`;}@media (max-width:767px){display:inline-flex;}@media (max-width:620px){border-radius:4px;svg{width:20px;height:20px;flex-shrink:0;}}`
|
|
8475
8503
|
], ({ theme }) => theme.colors.background.hover);
|
|
8476
8504
|
var LanguageMenuContent = styled5(DropdownMenu.Content).withConfig({
|
|
8477
|
-
componentId: "sc-
|
|
8505
|
+
componentId: "sc-a7662b4d-27"
|
|
8478
8506
|
})([
|
|
8479
8507
|
`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:`,
|
|
8480
8508
|
` 140ms ease-out;}&[data-state="closed"]{animation:`,
|
|
8481
8509
|
` 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;}`
|
|
8482
8510
|
], fadeIn, fadeOut);
|
|
8483
8511
|
var LanguageMenuItem = styled5(DropdownMenu.RadioItem).withConfig({
|
|
8484
|
-
componentId: "sc-
|
|
8512
|
+
componentId: "sc-a7662b4d-28"
|
|
8485
8513
|
})([
|
|
8486
8514
|
`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;}`,
|
|
8487
8515
|
`[data-compact="true"] &{height:40px;padding:10px 6px;font-size:14px;line-height:18px;}`
|
|
8488
8516
|
], LanguageMenuContent);
|
|
8489
8517
|
var LanguageFlag = styled5.span.withConfig({
|
|
8490
|
-
componentId: "sc-
|
|
8518
|
+
componentId: "sc-a7662b4d-29"
|
|
8491
8519
|
})([
|
|
8492
8520
|
`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;}`
|
|
8493
8521
|
]);
|
|
8494
8522
|
var LanguageItemIndicator = styled5(DropdownMenu.ItemIndicator).withConfig({
|
|
8495
|
-
componentId: "sc-
|
|
8523
|
+
componentId: "sc-a7662b4d-30"
|
|
8496
8524
|
})([
|
|
8497
8525
|
`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;}`,
|
|
8498
8526
|
`[data-compact="true"] &,`,
|
|
8499
8527
|
`[data-compact="true"] & img{width:16px;height:16px;flex-basis:16px;}`
|
|
8500
8528
|
], LanguageMenuContent, LanguageMenuContent);
|
|
8501
8529
|
var ActionDivider = styled5.span.withConfig({
|
|
8502
|
-
componentId: "sc-
|
|
8530
|
+
componentId: "sc-a7662b4d-31"
|
|
8503
8531
|
})([
|
|
8504
8532
|
`width:1px;height:16px;background:`,
|
|
8505
8533
|
`;@media (max-width:608px){display:none;}`
|
|
8506
8534
|
], ({ theme }) => theme.colors.border.line);
|
|
8507
8535
|
var LoginLink = styled5.a.withConfig({
|
|
8508
|
-
componentId: "sc-
|
|
8536
|
+
componentId: "sc-a7662b4d-32"
|
|
8509
8537
|
})([
|
|
8510
8538
|
`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:`,
|
|
8511
8539
|
`;}&[aria-disabled="true"]{cursor:not-allowed;opacity:0.55;}@media (max-width:608px){display:none;}`
|
|
8512
8540
|
], ({ theme }) => theme.colors.background.hover);
|
|
8513
8541
|
var OpenAccountButton = styled5(Button_default2).withConfig({
|
|
8514
|
-
componentId: "sc-
|
|
8542
|
+
componentId: "sc-a7662b4d-33"
|
|
8515
8543
|
})([
|
|
8516
8544
|
`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;}`
|
|
8517
8545
|
]);
|
|
8518
8546
|
var MobileDrawerLoginButton = styled5(LoginLink).withConfig({
|
|
8519
|
-
componentId: "sc-
|
|
8547
|
+
componentId: "sc-a7662b4d-34"
|
|
8520
8548
|
})([
|
|
8521
8549
|
`display:none;@media (max-width:767px){display:inline-flex;width:100%;min-width:0;padding-inline:12px;&:disabled{opacity:1;}}`
|
|
8522
8550
|
]);
|
|
8523
8551
|
var MobileDrawerOpenAccountButton = styled5(OpenAccountButton).withConfig({
|
|
8524
|
-
componentId: "sc-
|
|
8552
|
+
componentId: "sc-a7662b4d-35"
|
|
8525
8553
|
})([
|
|
8526
8554
|
`display:none;@media (max-width:767px){display:flex;width:100%;min-width:0;}`
|
|
8527
8555
|
]);
|
|
@@ -11220,24 +11248,24 @@ var chevron_right_default = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL
|
|
|
11220
11248
|
// src/commodity-original/components/Pagination/style.ts
|
|
11221
11249
|
import { styled as styled10 } from "styled-components";
|
|
11222
11250
|
var PaginationNav = styled10.nav.withConfig({
|
|
11223
|
-
componentId: "sc-
|
|
11251
|
+
componentId: "sc-e6c46071-0"
|
|
11224
11252
|
})([
|
|
11225
11253
|
`display:flex;justify-content:center;`
|
|
11226
11254
|
]);
|
|
11227
11255
|
var PaginationList = styled10.ul.withConfig({
|
|
11228
|
-
componentId: "sc-
|
|
11256
|
+
componentId: "sc-e6c46071-1"
|
|
11229
11257
|
})([
|
|
11230
11258
|
`display:flex;margin:0;padding:0;align-items:center;gap:8px;list-style:none;`
|
|
11231
11259
|
]);
|
|
11232
11260
|
var PaginationItem = styled10.li.withConfig({
|
|
11233
|
-
componentId: "sc-
|
|
11261
|
+
componentId: "sc-e6c46071-2"
|
|
11234
11262
|
})([
|
|
11235
11263
|
`display:flex;`
|
|
11236
11264
|
]);
|
|
11237
11265
|
var PaginationButton = styled10.button.withConfig({
|
|
11238
|
-
componentId: "sc-
|
|
11266
|
+
componentId: "sc-e6c46071-3"
|
|
11239
11267
|
})([
|
|
11240
|
-
`display:inline-flex;width:28px;height:28px;align-items:center;justify-content:center;border:1px solid `,
|
|
11268
|
+
`box-sizing:border-box;text-decoration:none;display:inline-flex;width:28px;height:28px;align-items:center;justify-content:center;border:1px solid `,
|
|
11241
11269
|
`;border-radius:4px;padding:4px;color:`,
|
|
11242
11270
|
`;background:`,
|
|
11243
11271
|
`;font-family:var(--font-manrope),Arial,Helvetica,sans-serif;font-size:14px;font-weight:500;line-height:18px;cursor:pointer;transition:color 160ms ease,background-color 160ms ease,border-color 160ms ease;&[data-control]{border-color:transparent;background:transparent;}&[data-active]{border-color:`,
|
|
@@ -11250,7 +11278,7 @@ var PaginationButton = styled10.button.withConfig({
|
|
|
11250
11278
|
`;outline-offset:2px;}`
|
|
11251
11279
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.background.canvas, ({ theme }) => theme.colors.accent.primary, ({ theme }) => theme.colors.accent.foreground, ({ theme }) => theme.colors.accent.primary, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover, ({ theme }) => theme.colors.accent.primary, ({ theme }) => theme.colors.accent.primary);
|
|
11252
11280
|
var PaginationArrow = styled10.span.withConfig({
|
|
11253
|
-
componentId: "sc-
|
|
11281
|
+
componentId: "sc-e6c46071-4"
|
|
11254
11282
|
})([
|
|
11255
11283
|
`width:16px;height:16px;background:currentColor;mask:url("`,
|
|
11256
11284
|
`") center / contain no-repeat;-webkit-mask:url("`,
|
|
@@ -11283,6 +11311,7 @@ function Pagination2({
|
|
|
11283
11311
|
page,
|
|
11284
11312
|
pageCount,
|
|
11285
11313
|
onPageChange,
|
|
11314
|
+
getPageHref,
|
|
11286
11315
|
siblingCount = 1,
|
|
11287
11316
|
ariaLabel,
|
|
11288
11317
|
labels: labels2,
|
|
@@ -11294,6 +11323,13 @@ function Pagination2({
|
|
|
11294
11323
|
const items = getPaginationItems(currentPage, safePageCount, siblingCount);
|
|
11295
11324
|
const hasPreviousPage = currentPage > 1;
|
|
11296
11325
|
const hasNextPage = currentPage < safePageCount;
|
|
11326
|
+
const pageClick = (page2) => (event) => {
|
|
11327
|
+
if (getPageHref) {
|
|
11328
|
+
if (event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;
|
|
11329
|
+
event.preventDefault();
|
|
11330
|
+
}
|
|
11331
|
+
onPageChange(page2);
|
|
11332
|
+
};
|
|
11297
11333
|
return /* @__PURE__ */ jsx38(
|
|
11298
11334
|
PaginationNav,
|
|
11299
11335
|
{
|
|
@@ -11303,33 +11339,39 @@ function Pagination2({
|
|
|
11303
11339
|
/* @__PURE__ */ jsx38(PaginationItem, { children: /* @__PURE__ */ jsx38(
|
|
11304
11340
|
PaginationButton,
|
|
11305
11341
|
{
|
|
11342
|
+
as: getPageHref && hasPreviousPage ? "a" : "button",
|
|
11343
|
+
href: getPageHref && hasPreviousPage ? getPageHref(currentPage - 1) : void 0,
|
|
11306
11344
|
"aria-label": labels2?.previous ?? t("pagination.previous"),
|
|
11307
11345
|
"data-control": "previous",
|
|
11308
11346
|
disabled: !hasPreviousPage,
|
|
11309
|
-
onClick: (
|
|
11310
|
-
type: "button",
|
|
11347
|
+
onClick: pageClick(currentPage - 1),
|
|
11348
|
+
type: getPageHref && hasPreviousPage ? void 0 : "button",
|
|
11311
11349
|
children: /* @__PURE__ */ jsx38(PaginationArrow, { "data-direction": "previous" })
|
|
11312
11350
|
}
|
|
11313
11351
|
) }),
|
|
11314
11352
|
items.map((item, index) => /* @__PURE__ */ jsx38(PaginationItem, { children: item === "ellipsis" ? /* @__PURE__ */ jsx38(PaginationButton, { "aria-hidden": "true", disabled: true, tabIndex: -1, type: "button", children: "\u2026" }) : /* @__PURE__ */ jsx38(
|
|
11315
11353
|
PaginationButton,
|
|
11316
11354
|
{
|
|
11355
|
+
as: getPageHref ? "a" : "button",
|
|
11356
|
+
href: getPageHref?.(item),
|
|
11317
11357
|
"aria-current": item === currentPage ? "page" : void 0,
|
|
11318
11358
|
"aria-label": item === currentPage ? labels2?.current(item) ?? t("pagination.current", { page: item }) : labels2?.page(item) ?? t("pagination.page", { page: item }),
|
|
11319
11359
|
"data-active": item === currentPage || void 0,
|
|
11320
|
-
onClick: (
|
|
11321
|
-
type: "button",
|
|
11360
|
+
onClick: pageClick(item),
|
|
11361
|
+
type: getPageHref ? void 0 : "button",
|
|
11322
11362
|
children: item
|
|
11323
11363
|
}
|
|
11324
11364
|
) }, `${item}-${index}`)),
|
|
11325
11365
|
/* @__PURE__ */ jsx38(PaginationItem, { children: /* @__PURE__ */ jsx38(
|
|
11326
11366
|
PaginationButton,
|
|
11327
11367
|
{
|
|
11368
|
+
as: getPageHref && hasNextPage ? "a" : "button",
|
|
11369
|
+
href: getPageHref && hasNextPage ? getPageHref(currentPage + 1) : void 0,
|
|
11328
11370
|
"aria-label": labels2?.next ?? t("pagination.next"),
|
|
11329
11371
|
"data-control": "next",
|
|
11330
11372
|
disabled: !hasNextPage,
|
|
11331
|
-
onClick: (
|
|
11332
|
-
type: "button",
|
|
11373
|
+
onClick: pageClick(currentPage + 1),
|
|
11374
|
+
type: getPageHref && hasNextPage ? void 0 : "button",
|
|
11333
11375
|
children: /* @__PURE__ */ jsx38(PaginationArrow, { "data-direction": "next" })
|
|
11334
11376
|
}
|
|
11335
11377
|
) })
|
|
@@ -16437,21 +16479,50 @@ function Header() {
|
|
|
16437
16479
|
const isItemActive = item.children.length > 0 ? item.children.some((child) => !child.linkDisabled && isRouteActive2(child.href)) : !item.linkDisabled && isRouteActive2(item.href);
|
|
16438
16480
|
const activeChildren = activeChildIndexes2(item.children);
|
|
16439
16481
|
if (item.children.length > 0) {
|
|
16440
|
-
|
|
16482
|
+
const childLinks = item.children.map((child) => /* @__PURE__ */ createElement4(
|
|
16483
|
+
ExactText,
|
|
16484
|
+
{
|
|
16485
|
+
cmsAs: Link9,
|
|
16486
|
+
cmsField: child.labelKey,
|
|
16487
|
+
...chromeItemAttributes(language, "header.menuItems", child.index, item.index),
|
|
16488
|
+
key: child.labelKey,
|
|
16489
|
+
href: child.href,
|
|
16490
|
+
"aria-disabled": child.linkDisabled || void 0,
|
|
16491
|
+
onClick: (event) => {
|
|
16492
|
+
if (child.linkDisabled) event.preventDefault();
|
|
16493
|
+
},
|
|
16494
|
+
"aria-current": activeChildren.has(child.index) ? "page" : void 0
|
|
16495
|
+
},
|
|
16496
|
+
child.label
|
|
16497
|
+
));
|
|
16498
|
+
return /* @__PURE__ */ jsx57(ProductsMenuGroup, { children: /* @__PURE__ */ jsxs46(
|
|
16441
16499
|
DropdownMenu2.Root,
|
|
16442
16500
|
{
|
|
16443
16501
|
modal: false,
|
|
16444
16502
|
open: isDesktopProductsOpen === item.index,
|
|
16445
16503
|
onOpenChange: (open) => setIsDesktopProductsOpen((current) => open ? item.index : current === item.index ? null : current),
|
|
16446
16504
|
children: [
|
|
16505
|
+
!item.linkDisabled && /* @__PURE__ */ jsx57(
|
|
16506
|
+
ExactText,
|
|
16507
|
+
{
|
|
16508
|
+
cmsAs: NavigationLink,
|
|
16509
|
+
as: Link9,
|
|
16510
|
+
cmsField: item.labelKey,
|
|
16511
|
+
...chromeItemAttributes(language, "header.menuItems", item.index),
|
|
16512
|
+
href: item.href,
|
|
16513
|
+
"aria-current": isRouteActive2(item.href) ? "page" : void 0,
|
|
16514
|
+
children: item.label
|
|
16515
|
+
}
|
|
16516
|
+
),
|
|
16447
16517
|
/* @__PURE__ */ jsx57(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ jsx57(
|
|
16448
16518
|
ProductsMenuTrigger,
|
|
16449
16519
|
{
|
|
16450
16520
|
...chromeItemAttributes(language, "header.menuItems", item.index),
|
|
16451
16521
|
type: "button",
|
|
16522
|
+
"aria-label": `${language === "en" ? "Open submenu" : "M\u1EDF menu con"}: ${item.label}`,
|
|
16452
16523
|
"aria-current": isItemActive ? "page" : void 0,
|
|
16453
16524
|
"data-active": isItemActive ? "true" : void 0,
|
|
16454
|
-
children: /* @__PURE__ */ jsx57(ExactText, { cmsAs: "span", cmsField: item.labelKey, children: item.label })
|
|
16525
|
+
children: item.linkDisabled && /* @__PURE__ */ jsx57(ExactText, { cmsAs: "span", cmsField: item.labelKey, children: item.label })
|
|
16455
16526
|
}
|
|
16456
16527
|
) }),
|
|
16457
16528
|
/* @__PURE__ */ jsx57(DropdownMenu2.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx57(
|
|
@@ -16464,15 +16535,13 @@ function Header() {
|
|
|
16464
16535
|
align: "center",
|
|
16465
16536
|
sideOffset: 10,
|
|
16466
16537
|
"aria-label": item.label,
|
|
16467
|
-
children:
|
|
16468
|
-
if (child.linkDisabled) event.preventDefault();
|
|
16469
|
-
}, "aria-current": activeChildren.has(child.index) ? "page" : void 0, children: child.label }) }, child.labelKey))
|
|
16538
|
+
children: childLinks.map((link2) => /* @__PURE__ */ jsx57(ProductsMenuItem, { asChild: true, children: link2 }, link2.key))
|
|
16470
16539
|
}
|
|
16471
|
-
) })
|
|
16540
|
+
) }),
|
|
16541
|
+
isDesktopProductsOpen !== item.index && /* @__PURE__ */ jsx57("div", { hidden: true, "data-cms-closed-submenu": true, children: childLinks })
|
|
16472
16542
|
]
|
|
16473
|
-
}
|
|
16474
|
-
|
|
16475
|
-
);
|
|
16543
|
+
}
|
|
16544
|
+
) }, item.labelKey);
|
|
16476
16545
|
}
|
|
16477
16546
|
return /* @__PURE__ */ createElement4(
|
|
16478
16547
|
ExactText,
|
|
@@ -16599,22 +16668,36 @@ function Header() {
|
|
|
16599
16668
|
const activeChildren = activeChildIndexes2(item.children);
|
|
16600
16669
|
if (item.children.length > 0) {
|
|
16601
16670
|
return /* @__PURE__ */ jsxs46("div", { className: "mobile-menu-group", ...chromeItemAttributes(language, "header.menuItems", item.index), children: [
|
|
16602
|
-
/* @__PURE__ */ jsxs46(
|
|
16603
|
-
|
|
16604
|
-
|
|
16605
|
-
|
|
16606
|
-
|
|
16607
|
-
|
|
16608
|
-
|
|
16609
|
-
|
|
16610
|
-
|
|
16611
|
-
|
|
16612
|
-
|
|
16613
|
-
|
|
16614
|
-
|
|
16615
|
-
|
|
16616
|
-
|
|
16617
|
-
|
|
16671
|
+
/* @__PURE__ */ jsxs46("div", { className: "mobile-menu-parent", children: [
|
|
16672
|
+
!item.linkDisabled ? /* @__PURE__ */ jsx57(
|
|
16673
|
+
ExactText,
|
|
16674
|
+
{
|
|
16675
|
+
cmsAs: Link9,
|
|
16676
|
+
cmsField: item.labelKey,
|
|
16677
|
+
href: item.href,
|
|
16678
|
+
"aria-current": isRouteActive2(item.href) ? "page" : void 0,
|
|
16679
|
+
onClick: () => {
|
|
16680
|
+
setIsProductsOpen(null);
|
|
16681
|
+
setIsMenuOpen(false);
|
|
16682
|
+
},
|
|
16683
|
+
children: item.label
|
|
16684
|
+
}
|
|
16685
|
+
) : /* @__PURE__ */ jsx57(ExactText, { cmsAs: "span", cmsField: item.labelKey, children: item.label }),
|
|
16686
|
+
/* @__PURE__ */ jsx57(
|
|
16687
|
+
"button",
|
|
16688
|
+
{
|
|
16689
|
+
"aria-current": isItemActive ? "page" : void 0,
|
|
16690
|
+
"data-active": isItemActive ? "true" : void 0,
|
|
16691
|
+
"aria-controls": `mobile-products-panel-${item.index}`,
|
|
16692
|
+
"aria-expanded": isProductsOpen === item.index,
|
|
16693
|
+
"aria-label": `${language === "en" ? "Open submenu" : "M\u1EDF menu con"}: ${item.label}`,
|
|
16694
|
+
className: "mobile-menu-accordion-trigger",
|
|
16695
|
+
id: `mobile-products-trigger-${item.index}`,
|
|
16696
|
+
onClick: () => {
|
|
16697
|
+
setIsProductsOpen((current) => current === item.index ? null : item.index);
|
|
16698
|
+
},
|
|
16699
|
+
type: "button",
|
|
16700
|
+
children: /* @__PURE__ */ jsx57(
|
|
16618
16701
|
"span",
|
|
16619
16702
|
{
|
|
16620
16703
|
"aria-hidden": "true",
|
|
@@ -16631,9 +16714,9 @@ function Header() {
|
|
|
16631
16714
|
)
|
|
16632
16715
|
}
|
|
16633
16716
|
)
|
|
16634
|
-
|
|
16635
|
-
|
|
16636
|
-
),
|
|
16717
|
+
}
|
|
16718
|
+
)
|
|
16719
|
+
] }),
|
|
16637
16720
|
/* @__PURE__ */ jsx57(
|
|
16638
16721
|
"div",
|
|
16639
16722
|
{
|
|
@@ -18288,7 +18371,7 @@ function HeroSection2() {
|
|
|
18288
18371
|
),
|
|
18289
18372
|
/* @__PURE__ */ jsxs55(HeroInner, { children: [
|
|
18290
18373
|
/* @__PURE__ */ jsxs55(HeroCopy, { "data-hero-copy": true, children: [
|
|
18291
|
-
/* @__PURE__ */ jsx66(ExactText, { cmsAs: HeroTitle, children: t("landing.hero.title") }),
|
|
18374
|
+
/* @__PURE__ */ jsx66(ExactText, { cmsAs: HeroTitle, cmsHeading: "h1", cmsField: "landing.hero.title", children: t("landing.hero.title") }),
|
|
18292
18375
|
/* @__PURE__ */ jsx66(ExactText, { cmsAs: "p", children: t("landing.hero.description") }),
|
|
18293
18376
|
/* @__PURE__ */ jsx66(
|
|
18294
18377
|
Button_default2,
|