@enyxs/wikex-components 0.10.0 → 0.11.1
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 +23 -0
- package/dist/index.d.mts +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.js +2149 -1622
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1343 -817
- package/dist/index.mjs.map +1 -1
- package/dist/manifest.json +405 -1
- package/package.json +5 -2
package/dist/index.mjs
CHANGED
|
@@ -2988,12 +2988,12 @@ var dynamicListBlocks = configs.map(createBlock);
|
|
|
2988
2988
|
var dynamicListTypes = new Set(dynamicListBlocks.map((block) => block.definition.type));
|
|
2989
2989
|
|
|
2990
2990
|
// src/wikex/original-commodity-blocks.tsx
|
|
2991
|
-
import { useEffect as useEffect9, useLayoutEffect as
|
|
2991
|
+
import { useEffect as useEffect9, useLayoutEffect as useLayoutEffect4, useMemo as useMemo6, useRef as useRef8 } from "react";
|
|
2992
2992
|
import { usePathname as usePathname2 } from "next/navigation.js";
|
|
2993
2993
|
import { createInstance } from "i18next";
|
|
2994
2994
|
import { I18nextProvider, initReactI18next } from "react-i18next";
|
|
2995
2995
|
import Box6 from "@mui/material/Box";
|
|
2996
|
-
import
|
|
2996
|
+
import Button8 from "@mui/material/Button";
|
|
2997
2997
|
import Stack4 from "@mui/material/Stack";
|
|
2998
2998
|
|
|
2999
2999
|
// src/commodity-original/components/Header/style.ts
|
|
@@ -5646,224 +5646,213 @@ function AboutRegistrationSection() {
|
|
|
5646
5646
|
}
|
|
5647
5647
|
|
|
5648
5648
|
// src/commodity-original/app/bang-phi-ky-quy/FeesAndMarginContent.tsx
|
|
5649
|
-
import {
|
|
5649
|
+
import { useState as useState6 } from "react";
|
|
5650
5650
|
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
5651
5651
|
|
|
5652
|
-
// src/
|
|
5653
|
-
import
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
`;background:transparent;font-family:var(--font-manrope),Arial,Helvetica,sans-serif;font-size:14px;font-weight:500;line-height:18px;`,
|
|
5667
|
-
`[data-size="sm"] &{font-size:12px;line-height:16px;}`,
|
|
5668
|
-
`[data-size="lg"] &{font-size:16px;line-height:22px;}&::placeholder{color:#9ea3ad;opacity:1;}&:disabled{cursor:not-allowed;}`
|
|
5669
|
-
], ({ theme }) => theme.colors.text.primary, InputCommonRoot, InputCommonRoot);
|
|
5670
|
-
var InputAdornment = styled6.span.withConfig({
|
|
5671
|
-
componentId: "sc-5ccafcdd-2"
|
|
5672
|
-
})([
|
|
5673
|
-
`display:inline-flex;width:16px;height:16px;flex:0 0 16px;align-items:center;justify-content:center;color:`,
|
|
5674
|
-
`;> svg,> img{width:100%;height:100%;}`,
|
|
5675
|
-
`[data-size="sm"] &{width:14px;height:14px;flex-basis:14px;}`,
|
|
5676
|
-
`[data-size="lg"] &{width:20px;height:20px;flex-basis:20px;}`
|
|
5677
|
-
], ({ theme }) => theme.colors.text.secondary, InputCommonRoot, InputCommonRoot);
|
|
5652
|
+
// src/wikex/fees-table.tsx
|
|
5653
|
+
import { jsx as _jsx3, jsxs as _jsxs3 } from "react/jsx-runtime";
|
|
5654
|
+
import { useId as useId2, useLayoutEffect as useLayoutEffect2, useRef as useRef2, useState as useState5 } from "react";
|
|
5655
|
+
import styled11, { ThemeProvider } from "styled-components";
|
|
5656
|
+
import TextField2 from "@mui/material/TextField";
|
|
5657
|
+
import Dialog2 from "@mui/material/Dialog";
|
|
5658
|
+
import DialogTitle from "@mui/material/DialogTitle";
|
|
5659
|
+
import DialogContent from "@mui/material/DialogContent";
|
|
5660
|
+
import DialogContentText from "@mui/material/DialogContentText";
|
|
5661
|
+
import DialogActions from "@mui/material/DialogActions";
|
|
5662
|
+
import Button7 from "@mui/material/Button";
|
|
5663
|
+
import Select2 from "@mui/material/Select";
|
|
5664
|
+
import MenuItem from "@mui/material/MenuItem";
|
|
5665
|
+
import Checkbox from "@mui/material/Checkbox";
|
|
5678
5666
|
|
|
5679
|
-
// src/commodity-original/
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5667
|
+
// src/commodity-original/styles/colors.ts
|
|
5668
|
+
var lightColors = {
|
|
5669
|
+
background: {
|
|
5670
|
+
canvas: "#ffffff",
|
|
5671
|
+
card: "#ffffff",
|
|
5672
|
+
deep: "#ffffff",
|
|
5673
|
+
hover: "#f5f5f5",
|
|
5674
|
+
input: "#f3f4f6",
|
|
5675
|
+
warm: "#fffbf3",
|
|
5676
|
+
popup: "#f9fafb"
|
|
5677
|
+
},
|
|
5678
|
+
text: {
|
|
5679
|
+
primary: "#171717",
|
|
5680
|
+
secondary: "#707580",
|
|
5681
|
+
placeholder: "#9ea3ad",
|
|
5682
|
+
content: "#4E5560"
|
|
5683
|
+
},
|
|
5684
|
+
action: {
|
|
5685
|
+
primaryBackground: "#171717",
|
|
5686
|
+
primaryForeground: "#ffffff",
|
|
5687
|
+
primaryHover: "#383838"
|
|
5688
|
+
},
|
|
5689
|
+
accent: {
|
|
5690
|
+
primary: "#f9bb3a",
|
|
5691
|
+
foreground: "#05080f",
|
|
5692
|
+
deep: "#c78806"
|
|
5693
|
+
},
|
|
5694
|
+
border: {
|
|
5695
|
+
subtle: "#D2D5DA",
|
|
5696
|
+
line: "#E6E7EA"
|
|
5697
|
+
},
|
|
5698
|
+
informationHero: {
|
|
5699
|
+
start: "#e55f2a",
|
|
5700
|
+
middle: "#e87a2f",
|
|
5701
|
+
foreground: "#ffffff",
|
|
5702
|
+
placeholder: "rgb(116 116 116 / 50%)"
|
|
5703
|
+
},
|
|
5704
|
+
datePicker: {
|
|
5705
|
+
selected: "#4f39f6",
|
|
5706
|
+
range: "#eef2ff",
|
|
5707
|
+
rangeForeground: "#312c85"
|
|
5708
|
+
},
|
|
5709
|
+
effect: {
|
|
5710
|
+
popupShadow: "rgb(5 8 16 / 5%)"
|
|
5711
|
+
}
|
|
5712
|
+
};
|
|
5713
|
+
var darkColors = {
|
|
5714
|
+
background: {
|
|
5715
|
+
canvas: "#2c2c2f",
|
|
5716
|
+
card: "#48484a",
|
|
5717
|
+
deep: "#1c1c1e",
|
|
5718
|
+
hover: "#48484a",
|
|
5719
|
+
input: "#48484a",
|
|
5720
|
+
warm: "#2c2c2f",
|
|
5721
|
+
popup: "#2c2c2f"
|
|
5722
|
+
},
|
|
5723
|
+
text: {
|
|
5724
|
+
primary: "#f2f2f7",
|
|
5725
|
+
secondary: "#aeaeb2",
|
|
5726
|
+
placeholder: "#636366",
|
|
5727
|
+
content: "#c7c7cc"
|
|
5728
|
+
},
|
|
5729
|
+
action: {
|
|
5730
|
+
primaryBackground: "#f2f2f7",
|
|
5731
|
+
primaryForeground: "#1c1c1e",
|
|
5732
|
+
primaryHover: "#c7c7cc"
|
|
5733
|
+
},
|
|
5734
|
+
accent: {
|
|
5735
|
+
primary: "#f9bb3a",
|
|
5736
|
+
foreground: "#05080f",
|
|
5737
|
+
deep: "#c78806"
|
|
5738
|
+
},
|
|
5739
|
+
border: {
|
|
5740
|
+
subtle: "#494b4e",
|
|
5741
|
+
line: "#48484a"
|
|
5742
|
+
},
|
|
5743
|
+
informationHero: {
|
|
5744
|
+
start: "#e55f2a",
|
|
5745
|
+
middle: "#e87a2f",
|
|
5746
|
+
foreground: "#ffffff",
|
|
5747
|
+
placeholder: "rgb(116 116 116 / 50%)"
|
|
5748
|
+
},
|
|
5749
|
+
datePicker: {
|
|
5750
|
+
selected: "#8b7bff",
|
|
5751
|
+
range: "#2b2856",
|
|
5752
|
+
rangeForeground: "#d9d4ff"
|
|
5753
|
+
},
|
|
5754
|
+
effect: {
|
|
5755
|
+
popupShadow: "rgb(0 0 0 / 24%)"
|
|
5756
|
+
}
|
|
5757
|
+
};
|
|
5758
|
+
var cssVariableColors = {
|
|
5759
|
+
background: {
|
|
5760
|
+
canvas: "var(--color-background-canvas)",
|
|
5761
|
+
card: "var(--color-background-card)",
|
|
5762
|
+
deep: "var(--color-background-deep)",
|
|
5763
|
+
hover: "var(--color-background-hover)",
|
|
5764
|
+
input: "var(--color-background-input)",
|
|
5765
|
+
warm: "var(--color-background-warm)",
|
|
5766
|
+
popup: "var(--color-background-popup)"
|
|
5767
|
+
},
|
|
5768
|
+
text: {
|
|
5769
|
+
primary: "var(--color-text-primary)",
|
|
5770
|
+
secondary: "var(--color-text-secondary)",
|
|
5771
|
+
placeholder: "var(--color-text-placeholder)",
|
|
5772
|
+
content: "var(--color-text-content)"
|
|
5773
|
+
},
|
|
5774
|
+
action: {
|
|
5775
|
+
primaryBackground: "var(--color-action-primary-background)",
|
|
5776
|
+
primaryForeground: "var(--color-action-primary-foreground)",
|
|
5777
|
+
primaryHover: "var(--color-action-primary-hover)"
|
|
5778
|
+
},
|
|
5779
|
+
accent: {
|
|
5780
|
+
primary: "var(--color-accent-primary)",
|
|
5781
|
+
foreground: "var(--color-accent-foreground)",
|
|
5782
|
+
deep: "var(--color-accent-deep)"
|
|
5783
|
+
},
|
|
5784
|
+
border: {
|
|
5785
|
+
subtle: "var(--color-border-subtle)",
|
|
5786
|
+
line: "var(--color-border-line)"
|
|
5787
|
+
},
|
|
5788
|
+
informationHero: {
|
|
5789
|
+
start: "var(--color-information-hero-start)",
|
|
5790
|
+
middle: "var(--color-information-hero-middle)",
|
|
5791
|
+
foreground: "var(--color-information-hero-foreground)",
|
|
5792
|
+
placeholder: "var(--color-information-hero-placeholder)"
|
|
5793
|
+
},
|
|
5794
|
+
datePicker: {
|
|
5795
|
+
selected: "var(--color-date-picker-selected)",
|
|
5796
|
+
range: "var(--color-date-picker-range)",
|
|
5797
|
+
rangeForeground: "var(--color-date-picker-range-foreground)"
|
|
5798
|
+
},
|
|
5799
|
+
effect: {
|
|
5800
|
+
popupShadow: "var(--color-effect-popup-shadow)"
|
|
5801
|
+
}
|
|
5802
|
+
};
|
|
5698
5803
|
|
|
5699
|
-
// src/commodity-original/
|
|
5700
|
-
|
|
5804
|
+
// src/commodity-original/styles/theme.ts
|
|
5805
|
+
var appTheme = {
|
|
5806
|
+
colors: cssVariableColors
|
|
5807
|
+
};
|
|
5701
5808
|
|
|
5702
|
-
// src/commodity-original/components/
|
|
5703
|
-
import
|
|
5704
|
-
|
|
5705
|
-
|
|
5809
|
+
// src/commodity-original/components/Table/index.tsx
|
|
5810
|
+
import { Fragment as Fragment4 } from "react";
|
|
5811
|
+
|
|
5812
|
+
// src/commodity-original/components/Table/style.ts
|
|
5813
|
+
import styled6 from "styled-components";
|
|
5814
|
+
var TableScrollContainer = styled6.div.withConfig({
|
|
5815
|
+
componentId: "sc-b3eceaf0-0"
|
|
5706
5816
|
})([
|
|
5707
|
-
`
|
|
5817
|
+
`min-width:0;width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;`
|
|
5708
5818
|
]);
|
|
5709
|
-
var
|
|
5710
|
-
componentId: "sc-
|
|
5819
|
+
var TableRoot = styled6.table.withConfig({
|
|
5820
|
+
componentId: "sc-b3eceaf0-1"
|
|
5711
5821
|
})([
|
|
5712
|
-
`
|
|
5713
|
-
|
|
5714
|
-
var
|
|
5715
|
-
|
|
5822
|
+
`width:100%;min-width:`,
|
|
5823
|
+
`;border-spacing:0;border-collapse:separate;border-radius:12px 12px 0 0;color:`,
|
|
5824
|
+
`;font-family:var(--font-manrope),Arial,Helvetica,sans-serif;text-align:left;`
|
|
5825
|
+
], ({ $minWidth }) => $minWidth ?? "100%", ({ theme }) => theme.colors.text.primary);
|
|
5826
|
+
var TableHeaderRow = styled6.tr.withConfig({
|
|
5827
|
+
componentId: "sc-b3eceaf0-2"
|
|
5716
5828
|
})([
|
|
5717
|
-
`
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5829
|
+
`background:`,
|
|
5830
|
+
`;`
|
|
5831
|
+
], ({ theme }) => theme.colors.background.input);
|
|
5832
|
+
var TableHeaderCell = styled6.th.withConfig({
|
|
5833
|
+
componentId: "sc-b3eceaf0-3"
|
|
5721
5834
|
})([
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
`;background:`,
|
|
5725
|
-
`;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:`,
|
|
5835
|
+
``,
|
|
5836
|
+
` padding:11.5px 8px 11.5px 16px;border-bottom:1px solid `,
|
|
5726
5837
|
`;color:`,
|
|
5727
|
-
`;
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
}
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
// src/commodity-original/components/Pagination/index.tsx
|
|
5741
|
-
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
5742
|
-
function getPaginationItems(page, pageCount, siblingCount) {
|
|
5743
|
-
const maxVisibleItems = siblingCount * 2 + 5;
|
|
5744
|
-
if (pageCount <= maxVisibleItems) {
|
|
5745
|
-
return Array.from({ length: pageCount }, (_, index) => index + 1);
|
|
5746
|
-
}
|
|
5747
|
-
const leftSibling = Math.max(page - siblingCount, 2);
|
|
5748
|
-
const rightSibling = Math.min(page + siblingCount, pageCount - 1);
|
|
5749
|
-
const items = [1];
|
|
5750
|
-
if (leftSibling > 2) {
|
|
5751
|
-
items.push("ellipsis");
|
|
5752
|
-
}
|
|
5753
|
-
for (let value4 = leftSibling; value4 <= rightSibling; value4 += 1) {
|
|
5754
|
-
items.push(value4);
|
|
5755
|
-
}
|
|
5756
|
-
if (rightSibling < pageCount - 1) {
|
|
5757
|
-
items.push("ellipsis");
|
|
5758
|
-
}
|
|
5759
|
-
items.push(pageCount);
|
|
5760
|
-
return items;
|
|
5761
|
-
}
|
|
5762
|
-
function Pagination2({
|
|
5763
|
-
page,
|
|
5764
|
-
pageCount,
|
|
5765
|
-
onPageChange,
|
|
5766
|
-
siblingCount = 1,
|
|
5767
|
-
ariaLabel,
|
|
5768
|
-
className
|
|
5769
|
-
}) {
|
|
5770
|
-
const { t } = useTranslation3();
|
|
5771
|
-
const safePageCount = Math.max(1, Math.floor(pageCount));
|
|
5772
|
-
const currentPage = Math.min(Math.max(1, Math.floor(page)), safePageCount);
|
|
5773
|
-
const items = getPaginationItems(currentPage, safePageCount, siblingCount);
|
|
5774
|
-
const hasPreviousPage = currentPage > 1;
|
|
5775
|
-
const hasNextPage = currentPage < safePageCount;
|
|
5776
|
-
return /* @__PURE__ */ jsx12(
|
|
5777
|
-
PaginationNav,
|
|
5778
|
-
{
|
|
5779
|
-
"aria-label": ariaLabel ?? t("pagination.navigation"),
|
|
5780
|
-
className,
|
|
5781
|
-
children: /* @__PURE__ */ jsxs8(PaginationList, { children: [
|
|
5782
|
-
/* @__PURE__ */ jsx12(PaginationItem, { children: /* @__PURE__ */ jsx12(
|
|
5783
|
-
PaginationButton,
|
|
5784
|
-
{
|
|
5785
|
-
"aria-label": t("pagination.previous"),
|
|
5786
|
-
"data-control": "previous",
|
|
5787
|
-
disabled: !hasPreviousPage,
|
|
5788
|
-
onClick: () => onPageChange(currentPage - 1),
|
|
5789
|
-
type: "button",
|
|
5790
|
-
children: /* @__PURE__ */ jsx12(PaginationArrow, { "data-direction": "previous" })
|
|
5791
|
-
}
|
|
5792
|
-
) }),
|
|
5793
|
-
items.map((item, index) => /* @__PURE__ */ jsx12(PaginationItem, { children: item === "ellipsis" ? /* @__PURE__ */ jsx12(PaginationButton, { "aria-hidden": "true", disabled: true, tabIndex: -1, type: "button", children: "\u2026" }) : /* @__PURE__ */ jsx12(
|
|
5794
|
-
PaginationButton,
|
|
5795
|
-
{
|
|
5796
|
-
"aria-current": item === currentPage ? "page" : void 0,
|
|
5797
|
-
"aria-label": item === currentPage ? t("pagination.current", { page: item }) : t("pagination.page", { page: item }),
|
|
5798
|
-
"data-active": item === currentPage || void 0,
|
|
5799
|
-
onClick: () => onPageChange(item),
|
|
5800
|
-
type: "button",
|
|
5801
|
-
children: item
|
|
5802
|
-
}
|
|
5803
|
-
) }, `${item}-${index}`)),
|
|
5804
|
-
/* @__PURE__ */ jsx12(PaginationItem, { children: /* @__PURE__ */ jsx12(
|
|
5805
|
-
PaginationButton,
|
|
5806
|
-
{
|
|
5807
|
-
"aria-label": t("pagination.next"),
|
|
5808
|
-
"data-control": "next",
|
|
5809
|
-
disabled: !hasNextPage,
|
|
5810
|
-
onClick: () => onPageChange(currentPage + 1),
|
|
5811
|
-
type: "button",
|
|
5812
|
-
children: /* @__PURE__ */ jsx12(PaginationArrow, { "data-direction": "next" })
|
|
5813
|
-
}
|
|
5814
|
-
) })
|
|
5815
|
-
] })
|
|
5816
|
-
}
|
|
5817
|
-
);
|
|
5818
|
-
}
|
|
5819
|
-
|
|
5820
|
-
// src/commodity-original/components/Table/index.tsx
|
|
5821
|
-
import { Fragment as Fragment4 } from "react";
|
|
5822
|
-
|
|
5823
|
-
// src/commodity-original/components/Table/style.ts
|
|
5824
|
-
import styled8 from "styled-components";
|
|
5825
|
-
var TableScrollContainer = styled8.div.withConfig({
|
|
5826
|
-
componentId: "sc-b3eceaf0-0"
|
|
5827
|
-
})([
|
|
5828
|
-
`min-width:0;width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;`
|
|
5829
|
-
]);
|
|
5830
|
-
var TableRoot = styled8.table.withConfig({
|
|
5831
|
-
componentId: "sc-b3eceaf0-1"
|
|
5832
|
-
})([
|
|
5833
|
-
`width:100%;min-width:`,
|
|
5834
|
-
`;border-spacing:0;border-collapse:separate;border-radius:12px 12px 0 0;color:`,
|
|
5835
|
-
`;font-family:var(--font-manrope),Arial,Helvetica,sans-serif;text-align:left;`
|
|
5836
|
-
], ({ $minWidth }) => $minWidth ?? "100%", ({ theme }) => theme.colors.text.primary);
|
|
5837
|
-
var TableHeaderRow = styled8.tr.withConfig({
|
|
5838
|
-
componentId: "sc-b3eceaf0-2"
|
|
5839
|
-
})([
|
|
5840
|
-
`background:`,
|
|
5841
|
-
`;`
|
|
5842
|
-
], ({ theme }) => theme.colors.background.input);
|
|
5843
|
-
var TableHeaderCell = styled8.th.withConfig({
|
|
5844
|
-
componentId: "sc-b3eceaf0-3"
|
|
5845
|
-
})([
|
|
5846
|
-
``,
|
|
5847
|
-
` padding:11.5px 8px 11.5px 16px;border-bottom:1px solid `,
|
|
5848
|
-
`;color:`,
|
|
5849
|
-
`;font-size:10px;font-weight:600;line-height:14px;vertical-align:middle;&:first-child{padding-left:16px;border-top-left-radius:12px;}&:last-child{border-top-right-radius:12px;}`,
|
|
5850
|
-
`[data-size="sm"] &{padding:12px 8px 12px 16px;font-size:var(--Size-Overline-M,8px);font-weight:600;line-height:var(--Line-height-Overline-M,10px);}`
|
|
5851
|
-
], ({ $fixed, $fixedOffset, $width, theme }) => `
|
|
5852
|
-
${$width ? `width: ${$width}; min-width: ${$width};` : ""}
|
|
5853
|
-
${$fixed && $fixedOffset ? `
|
|
5854
|
-
position: sticky;
|
|
5855
|
-
${$fixed}: ${$fixedOffset};
|
|
5856
|
-
z-index: 3;
|
|
5857
|
-
background: ${theme.colors.background.input};
|
|
5858
|
-
` : ""}
|
|
5859
|
-
`, ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.text.primary, TableRoot);
|
|
5860
|
-
var TableRow = styled8.tr.withConfig({
|
|
5861
|
-
componentId: "sc-b3eceaf0-4"
|
|
5838
|
+
`;font-size:10px;font-weight:600;line-height:14px;vertical-align:middle;&:first-child{padding-left:16px;border-top-left-radius:12px;}&:last-child{border-top-right-radius:12px;}`,
|
|
5839
|
+
`[data-size="sm"] &{padding:12px 8px 12px 16px;font-size:var(--Size-Overline-M,8px);font-weight:600;line-height:var(--Line-height-Overline-M,10px);}`
|
|
5840
|
+
], ({ $fixed, $fixedOffset, $width, theme }) => `
|
|
5841
|
+
${$width ? `width: ${$width}; min-width: ${$width};` : ""}
|
|
5842
|
+
${$fixed && $fixedOffset ? `
|
|
5843
|
+
position: sticky;
|
|
5844
|
+
${$fixed}: ${$fixedOffset};
|
|
5845
|
+
z-index: 3;
|
|
5846
|
+
background: ${theme.colors.background.input};
|
|
5847
|
+
` : ""}
|
|
5848
|
+
`, ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.text.primary, TableRoot);
|
|
5849
|
+
var TableRow = styled6.tr.withConfig({
|
|
5850
|
+
componentId: "sc-b3eceaf0-4"
|
|
5862
5851
|
})([
|
|
5863
5852
|
`background:`,
|
|
5864
5853
|
`;`
|
|
5865
5854
|
], ({ theme }) => theme.colors.background.deep);
|
|
5866
|
-
var TableCell =
|
|
5855
|
+
var TableCell = styled6.td.withConfig({
|
|
5867
5856
|
componentId: "sc-b3eceaf0-5"
|
|
5868
5857
|
})([
|
|
5869
5858
|
``,
|
|
@@ -5880,26 +5869,26 @@ var TableCell = styled8.td.withConfig({
|
|
|
5880
5869
|
background: ${theme.colors.background.deep};
|
|
5881
5870
|
` : ""}
|
|
5882
5871
|
`, ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.text.primary, TableRoot);
|
|
5883
|
-
var TableSortButton =
|
|
5872
|
+
var TableSortButton = styled6.button.withConfig({
|
|
5884
5873
|
componentId: "sc-b3eceaf0-6"
|
|
5885
5874
|
})([
|
|
5886
5875
|
`display:inline-flex;max-width:100%;margin:0;padding:0;align-items:center;border:0;color:inherit;background:transparent;cursor:pointer;font:inherit;line-height:inherit;text-align:left;&:focus-visible{outline:2px solid `,
|
|
5887
5876
|
`;outline-offset:3px;}`
|
|
5888
5877
|
], ({ theme }) => theme.colors.accent.primary);
|
|
5889
|
-
var TableSelectionInput =
|
|
5878
|
+
var TableSelectionInput = styled6.input.withConfig({
|
|
5890
5879
|
componentId: "sc-b3eceaf0-7"
|
|
5891
5880
|
})([
|
|
5892
5881
|
`width:16px;height:16px;margin:0;accent-color:`,
|
|
5893
5882
|
`;cursor:pointer;&:disabled{cursor:not-allowed;}`
|
|
5894
5883
|
], ({ theme }) => theme.colors.accent.primary);
|
|
5895
|
-
var TableExpandButton =
|
|
5884
|
+
var TableExpandButton = styled6.button.withConfig({
|
|
5896
5885
|
componentId: "sc-b3eceaf0-8"
|
|
5897
5886
|
})([
|
|
5898
5887
|
`margin:0;padding:0;border:0;color:`,
|
|
5899
5888
|
`;background:transparent;cursor:pointer;font:inherit;line-height:inherit;&:focus-visible{outline:2px solid `,
|
|
5900
5889
|
`;outline-offset:3px;}`
|
|
5901
5890
|
], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
|
|
5902
|
-
var TableExpandedCell =
|
|
5891
|
+
var TableExpandedCell = styled6(TableCell).withConfig({
|
|
5903
5892
|
componentId: "sc-b3eceaf0-9"
|
|
5904
5893
|
})([
|
|
5905
5894
|
`background:`,
|
|
@@ -5935,7 +5924,7 @@ function getTableFixedColumnOffset(columns, columnIndex) {
|
|
|
5935
5924
|
}
|
|
5936
5925
|
|
|
5937
5926
|
// src/commodity-original/components/Table/index.tsx
|
|
5938
|
-
import { jsx as
|
|
5927
|
+
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
5939
5928
|
function getCellValue(column, record) {
|
|
5940
5929
|
return column.dataIndex === void 0 ? void 0 : record[column.dataIndex];
|
|
5941
5930
|
}
|
|
@@ -6007,7 +5996,7 @@ function Table({
|
|
|
6007
5996
|
const nextSelectedRowKeys = event.target.checked ? [...selectedRowKeys, recordKey] : selectedRowKeys.filter((key) => key !== recordKey);
|
|
6008
5997
|
emitSelectionChange(nextSelectedRowKeys);
|
|
6009
5998
|
};
|
|
6010
|
-
return /* @__PURE__ */
|
|
5999
|
+
return /* @__PURE__ */ jsx11(TableScrollContainer, { children: /* @__PURE__ */ jsxs7(
|
|
6011
6000
|
TableRoot,
|
|
6012
6001
|
{
|
|
6013
6002
|
$minWidth: scroll?.x === void 0 ? void 0 : getTableColumnSize(scroll.x),
|
|
@@ -6015,8 +6004,8 @@ function Table({
|
|
|
6015
6004
|
className,
|
|
6016
6005
|
"data-size": size,
|
|
6017
6006
|
children: [
|
|
6018
|
-
/* @__PURE__ */
|
|
6019
|
-
rowSelection ? /* @__PURE__ */
|
|
6007
|
+
/* @__PURE__ */ jsx11("thead", { children: /* @__PURE__ */ jsxs7(TableHeaderRow, { children: [
|
|
6008
|
+
rowSelection ? /* @__PURE__ */ jsx11(TableHeaderCell, { scope: "col", children: selectionType === "checkbox" ? /* @__PURE__ */ jsx11(
|
|
6020
6009
|
TableSelectionInput,
|
|
6021
6010
|
{
|
|
6022
6011
|
checked: isAllSelected,
|
|
@@ -6025,15 +6014,15 @@ function Table({
|
|
|
6025
6014
|
type: "checkbox"
|
|
6026
6015
|
}
|
|
6027
6016
|
) : null }) : null,
|
|
6028
|
-
expandable ? /* @__PURE__ */
|
|
6029
|
-
columns.map((column, columnIndex) => /* @__PURE__ */
|
|
6017
|
+
expandable ? /* @__PURE__ */ jsx11(TableHeaderCell, { scope: "col" }) : null,
|
|
6018
|
+
columns.map((column, columnIndex) => /* @__PURE__ */ jsx11(
|
|
6030
6019
|
TableHeaderCell,
|
|
6031
6020
|
{
|
|
6032
6021
|
$fixed: column.fixed,
|
|
6033
6022
|
$fixedOffset: getTableFixedColumnOffset(columns, columnIndex),
|
|
6034
6023
|
$width: column.width === void 0 ? void 0 : getTableColumnSize(column.width),
|
|
6035
6024
|
scope: "col",
|
|
6036
|
-
children: column.sortable ? /* @__PURE__ */
|
|
6025
|
+
children: column.sortable ? /* @__PURE__ */ jsx11(
|
|
6037
6026
|
TableSortButton,
|
|
6038
6027
|
{
|
|
6039
6028
|
"aria-pressed": sort?.field === column.key,
|
|
@@ -6046,13 +6035,13 @@ function Table({
|
|
|
6046
6035
|
column.key
|
|
6047
6036
|
))
|
|
6048
6037
|
] }) }),
|
|
6049
|
-
/* @__PURE__ */
|
|
6038
|
+
/* @__PURE__ */ jsx11("tbody", { children: loading ? /* @__PURE__ */ jsx11(TableRow, { children: /* @__PURE__ */ jsx11(TableCell, { colSpan: columnCount, children: loadingContent }) }) : dataSource.length === 0 ? /* @__PURE__ */ jsx11(TableRow, { children: /* @__PURE__ */ jsx11(TableCell, { colSpan: columnCount, children: empty }) }) : dataSource.map((record, index) => {
|
|
6050
6039
|
const recordKey = getRowKey(record);
|
|
6051
6040
|
const selectionProps = rowSelection?.getCheckboxProps?.(record);
|
|
6052
6041
|
const isExpanded = expandedRowKeySet.has(recordKey);
|
|
6053
|
-
return /* @__PURE__ */
|
|
6054
|
-
/* @__PURE__ */
|
|
6055
|
-
rowSelection ? /* @__PURE__ */
|
|
6042
|
+
return /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
6043
|
+
/* @__PURE__ */ jsxs7(TableRow, { children: [
|
|
6044
|
+
rowSelection ? /* @__PURE__ */ jsx11(TableCell, { children: /* @__PURE__ */ jsx11(
|
|
6056
6045
|
TableSelectionInput,
|
|
6057
6046
|
{
|
|
6058
6047
|
checked: selectedRowKeySet.has(recordKey),
|
|
@@ -6062,7 +6051,7 @@ function Table({
|
|
|
6062
6051
|
type: selectionType
|
|
6063
6052
|
}
|
|
6064
6053
|
) }) : null,
|
|
6065
|
-
expandable ? /* @__PURE__ */
|
|
6054
|
+
expandable ? /* @__PURE__ */ jsx11(TableCell, { children: /* @__PURE__ */ jsx11(
|
|
6066
6055
|
TableExpandButton,
|
|
6067
6056
|
{
|
|
6068
6057
|
"aria-expanded": isExpanded,
|
|
@@ -6073,7 +6062,7 @@ function Table({
|
|
|
6073
6062
|
) }) : null,
|
|
6074
6063
|
columns.map((column, columnIndex) => {
|
|
6075
6064
|
const value4 = getCellValue(column, record);
|
|
6076
|
-
return /* @__PURE__ */
|
|
6065
|
+
return /* @__PURE__ */ jsx11(
|
|
6077
6066
|
TableCell,
|
|
6078
6067
|
{
|
|
6079
6068
|
$fixed: column.fixed,
|
|
@@ -6085,7 +6074,7 @@ function Table({
|
|
|
6085
6074
|
);
|
|
6086
6075
|
})
|
|
6087
6076
|
] }),
|
|
6088
|
-
expandable?.render && isExpanded ? /* @__PURE__ */
|
|
6077
|
+
expandable?.render && isExpanded ? /* @__PURE__ */ jsx11(TableRow, { children: /* @__PURE__ */ jsx11(TableExpandedCell, { colSpan: columnCount, children: expandable.render(record) }) }) : null
|
|
6089
6078
|
] }, recordKey);
|
|
6090
6079
|
}) })
|
|
6091
6080
|
]
|
|
@@ -6093,6 +6082,174 @@ function Table({
|
|
|
6093
6082
|
) });
|
|
6094
6083
|
}
|
|
6095
6084
|
|
|
6085
|
+
// src/commodity-original/components/Pagination/index.tsx
|
|
6086
|
+
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
6087
|
+
|
|
6088
|
+
// src/commodity-original/components/Pagination/style.ts
|
|
6089
|
+
import styled7 from "styled-components";
|
|
6090
|
+
var PaginationNav = styled7.nav.withConfig({
|
|
6091
|
+
componentId: "sc-27e2bcfb-0"
|
|
6092
|
+
})([
|
|
6093
|
+
`display:flex;justify-content:center;`
|
|
6094
|
+
]);
|
|
6095
|
+
var PaginationList = styled7.ul.withConfig({
|
|
6096
|
+
componentId: "sc-27e2bcfb-1"
|
|
6097
|
+
})([
|
|
6098
|
+
`display:flex;margin:0;padding:0;align-items:center;gap:8px;list-style:none;`
|
|
6099
|
+
]);
|
|
6100
|
+
var PaginationItem = styled7.li.withConfig({
|
|
6101
|
+
componentId: "sc-27e2bcfb-2"
|
|
6102
|
+
})([
|
|
6103
|
+
`display:flex;`
|
|
6104
|
+
]);
|
|
6105
|
+
var PaginationButton = styled7.button.withConfig({
|
|
6106
|
+
componentId: "sc-27e2bcfb-3"
|
|
6107
|
+
})([
|
|
6108
|
+
`display:inline-flex;width:28px;height:28px;align-items:center;justify-content:center;border:1px solid `,
|
|
6109
|
+
`;border-radius:4px;padding:4px;color:`,
|
|
6110
|
+
`;background:`,
|
|
6111
|
+
`;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:`,
|
|
6112
|
+
`;color:`,
|
|
6113
|
+
`;background:`,
|
|
6114
|
+
`;}&:not(:disabled):hover{color:`,
|
|
6115
|
+
`;background:`,
|
|
6116
|
+
`;}&[data-active]:not(:disabled):hover{background:`,
|
|
6117
|
+
`;}&:disabled{cursor:not-allowed;}&:focus-visible{outline:2px solid `,
|
|
6118
|
+
`;outline-offset:2px;}`
|
|
6119
|
+
], ({ 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);
|
|
6120
|
+
var PaginationArrow = styled7.span.withConfig({
|
|
6121
|
+
componentId: "sc-27e2bcfb-4"
|
|
6122
|
+
})([
|
|
6123
|
+
`width:16px;height:16px;background:currentColor;mask:url("/icons/chevron-right.svg") center / contain no-repeat;-webkit-mask:url("/icons/chevron-right.svg") center / contain no-repeat;&[data-direction="previous"]{transform:scaleX(-1);}`
|
|
6124
|
+
]);
|
|
6125
|
+
|
|
6126
|
+
// src/commodity-original/components/Pagination/index.tsx
|
|
6127
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
6128
|
+
function getPaginationItems(page, pageCount, siblingCount) {
|
|
6129
|
+
const maxVisibleItems = siblingCount * 2 + 5;
|
|
6130
|
+
if (pageCount <= maxVisibleItems) {
|
|
6131
|
+
return Array.from({ length: pageCount }, (_, index) => index + 1);
|
|
6132
|
+
}
|
|
6133
|
+
const leftSibling = Math.max(page - siblingCount, 2);
|
|
6134
|
+
const rightSibling = Math.min(page + siblingCount, pageCount - 1);
|
|
6135
|
+
const items = [1];
|
|
6136
|
+
if (leftSibling > 2) {
|
|
6137
|
+
items.push("ellipsis");
|
|
6138
|
+
}
|
|
6139
|
+
for (let value4 = leftSibling; value4 <= rightSibling; value4 += 1) {
|
|
6140
|
+
items.push(value4);
|
|
6141
|
+
}
|
|
6142
|
+
if (rightSibling < pageCount - 1) {
|
|
6143
|
+
items.push("ellipsis");
|
|
6144
|
+
}
|
|
6145
|
+
items.push(pageCount);
|
|
6146
|
+
return items;
|
|
6147
|
+
}
|
|
6148
|
+
function Pagination2({
|
|
6149
|
+
page,
|
|
6150
|
+
pageCount,
|
|
6151
|
+
onPageChange,
|
|
6152
|
+
siblingCount = 1,
|
|
6153
|
+
ariaLabel,
|
|
6154
|
+
className
|
|
6155
|
+
}) {
|
|
6156
|
+
const { t } = useTranslation3();
|
|
6157
|
+
const safePageCount = Math.max(1, Math.floor(pageCount));
|
|
6158
|
+
const currentPage = Math.min(Math.max(1, Math.floor(page)), safePageCount);
|
|
6159
|
+
const items = getPaginationItems(currentPage, safePageCount, siblingCount);
|
|
6160
|
+
const hasPreviousPage = currentPage > 1;
|
|
6161
|
+
const hasNextPage = currentPage < safePageCount;
|
|
6162
|
+
return /* @__PURE__ */ jsx12(
|
|
6163
|
+
PaginationNav,
|
|
6164
|
+
{
|
|
6165
|
+
"aria-label": ariaLabel ?? t("pagination.navigation"),
|
|
6166
|
+
className,
|
|
6167
|
+
children: /* @__PURE__ */ jsxs8(PaginationList, { children: [
|
|
6168
|
+
/* @__PURE__ */ jsx12(PaginationItem, { children: /* @__PURE__ */ jsx12(
|
|
6169
|
+
PaginationButton,
|
|
6170
|
+
{
|
|
6171
|
+
"aria-label": t("pagination.previous"),
|
|
6172
|
+
"data-control": "previous",
|
|
6173
|
+
disabled: !hasPreviousPage,
|
|
6174
|
+
onClick: () => onPageChange(currentPage - 1),
|
|
6175
|
+
type: "button",
|
|
6176
|
+
children: /* @__PURE__ */ jsx12(PaginationArrow, { "data-direction": "previous" })
|
|
6177
|
+
}
|
|
6178
|
+
) }),
|
|
6179
|
+
items.map((item, index) => /* @__PURE__ */ jsx12(PaginationItem, { children: item === "ellipsis" ? /* @__PURE__ */ jsx12(PaginationButton, { "aria-hidden": "true", disabled: true, tabIndex: -1, type: "button", children: "\u2026" }) : /* @__PURE__ */ jsx12(
|
|
6180
|
+
PaginationButton,
|
|
6181
|
+
{
|
|
6182
|
+
"aria-current": item === currentPage ? "page" : void 0,
|
|
6183
|
+
"aria-label": item === currentPage ? t("pagination.current", { page: item }) : t("pagination.page", { page: item }),
|
|
6184
|
+
"data-active": item === currentPage || void 0,
|
|
6185
|
+
onClick: () => onPageChange(item),
|
|
6186
|
+
type: "button",
|
|
6187
|
+
children: item
|
|
6188
|
+
}
|
|
6189
|
+
) }, `${item}-${index}`)),
|
|
6190
|
+
/* @__PURE__ */ jsx12(PaginationItem, { children: /* @__PURE__ */ jsx12(
|
|
6191
|
+
PaginationButton,
|
|
6192
|
+
{
|
|
6193
|
+
"aria-label": t("pagination.next"),
|
|
6194
|
+
"data-control": "next",
|
|
6195
|
+
disabled: !hasNextPage,
|
|
6196
|
+
onClick: () => onPageChange(currentPage + 1),
|
|
6197
|
+
type: "button",
|
|
6198
|
+
children: /* @__PURE__ */ jsx12(PaginationArrow, { "data-direction": "next" })
|
|
6199
|
+
}
|
|
6200
|
+
) })
|
|
6201
|
+
] })
|
|
6202
|
+
}
|
|
6203
|
+
);
|
|
6204
|
+
}
|
|
6205
|
+
|
|
6206
|
+
// src/commodity-original/components/InputCommon/style.ts
|
|
6207
|
+
import styled8 from "styled-components";
|
|
6208
|
+
var InputCommonRoot = styled8.div.withConfig({
|
|
6209
|
+
componentId: "sc-5ccafcdd-0"
|
|
6210
|
+
})([
|
|
6211
|
+
`display:flex;width:100%;min-width:0;gap:6px;padding:10px 12px;align-items:center;border:1px solid transparent;border-radius:6px;background:`,
|
|
6212
|
+
`;transition:border-color 160ms ease,background-color 160ms ease;&[data-size="sm"]{gap:4px;padding:8px 12px;}&[data-size="lg"]{gap:8px;padding:14px 16px;}&:focus-within{border-color:`,
|
|
6213
|
+
`;background:`,
|
|
6214
|
+
`;}&[data-disabled]{cursor:not-allowed;opacity:0.6;}&[data-error]{border-color:#dc2626;}> button{border:0;background:transparent;cursor:pointer;font-size:18px;}> [role="alert"]{position:absolute;margin-top:52px;color:#dc2626;font-size:12px;}`
|
|
6215
|
+
], ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.accent.primary, ({ theme }) => theme.colors.background.canvas);
|
|
6216
|
+
var InputCommonField = styled8.input.withConfig({
|
|
6217
|
+
componentId: "sc-5ccafcdd-1"
|
|
6218
|
+
})([
|
|
6219
|
+
`width:100%;min-width:0;border:0;outline:0;color:`,
|
|
6220
|
+
`;background:transparent;font-family:var(--font-manrope),Arial,Helvetica,sans-serif;font-size:14px;font-weight:500;line-height:18px;`,
|
|
6221
|
+
`[data-size="sm"] &{font-size:12px;line-height:16px;}`,
|
|
6222
|
+
`[data-size="lg"] &{font-size:16px;line-height:22px;}&::placeholder{color:#9ea3ad;opacity:1;}&:disabled{cursor:not-allowed;}`
|
|
6223
|
+
], ({ theme }) => theme.colors.text.primary, InputCommonRoot, InputCommonRoot);
|
|
6224
|
+
var InputAdornment = styled8.span.withConfig({
|
|
6225
|
+
componentId: "sc-5ccafcdd-2"
|
|
6226
|
+
})([
|
|
6227
|
+
`display:inline-flex;width:16px;height:16px;flex:0 0 16px;align-items:center;justify-content:center;color:`,
|
|
6228
|
+
`;> svg,> img{width:100%;height:100%;}`,
|
|
6229
|
+
`[data-size="sm"] &{width:14px;height:14px;flex-basis:14px;}`,
|
|
6230
|
+
`[data-size="lg"] &{width:20px;height:20px;flex-basis:20px;}`
|
|
6231
|
+
], ({ theme }) => theme.colors.text.secondary, InputCommonRoot, InputCommonRoot);
|
|
6232
|
+
|
|
6233
|
+
// src/commodity-original/components/InputCommon/index.tsx
|
|
6234
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
6235
|
+
function InputCommon({
|
|
6236
|
+
leftIcon,
|
|
6237
|
+
rightIcon,
|
|
6238
|
+
size = "md",
|
|
6239
|
+
error = false,
|
|
6240
|
+
errorMessage,
|
|
6241
|
+
clearable = false,
|
|
6242
|
+
onClear,
|
|
6243
|
+
...inputProps
|
|
6244
|
+
}) {
|
|
6245
|
+
return /* @__PURE__ */ jsxs9(InputCommonRoot, { "data-disabled": inputProps.disabled || void 0, "data-error": error || void 0, "data-size": size, children: [
|
|
6246
|
+
leftIcon ? /* @__PURE__ */ jsx13(InputAdornment, { "aria-hidden": "true", children: leftIcon }) : null,
|
|
6247
|
+
/* @__PURE__ */ jsx13(InputCommonField, { ...inputProps }),
|
|
6248
|
+
clearable && inputProps.value ? /* @__PURE__ */ jsx13("button", { "aria-label": "X\xF3a n\u1ED9i dung", onClick: onClear, type: "button", children: "\xD7" }) : rightIcon ? /* @__PURE__ */ jsx13(InputAdornment, { "aria-hidden": "true", children: rightIcon }) : null,
|
|
6249
|
+
errorMessage ? /* @__PURE__ */ jsx13("span", { role: "alert", children: errorMessage }) : null
|
|
6250
|
+
] });
|
|
6251
|
+
}
|
|
6252
|
+
|
|
6096
6253
|
// src/commodity-original/components/TabCommon/style.ts
|
|
6097
6254
|
import styled9 from "styled-components";
|
|
6098
6255
|
var TabCommonList = styled9.div.withConfig({
|
|
@@ -6245,10 +6402,43 @@ var FeesMonthCode = styled10.span.withConfig({
|
|
|
6245
6402
|
`;font-family:var(--Font-Main,Manrope);font-size:var(--Size-Title-S,14px);font-style:normal;font-weight:500;line-height:var(--Line-height-Body-S,18px);`
|
|
6246
6403
|
], ({ theme }) => theme.colors.text.primary);
|
|
6247
6404
|
|
|
6248
|
-
// src/
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6405
|
+
// src/wikex/fees-table-model.ts
|
|
6406
|
+
var FEES_PAGE_SIZE = 10;
|
|
6407
|
+
function normalizeFeesSearch(value4) {
|
|
6408
|
+
return value4.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/đ/g, "d").replace(/Đ/g, "D").toLowerCase().trim();
|
|
6409
|
+
}
|
|
6410
|
+
function filterFeesRows(data, search, tag) {
|
|
6411
|
+
const query = normalizeFeesSearch(search);
|
|
6412
|
+
return data.rows.filter((row) => (!tag || row.tags.includes(tag)) && (!query || normalizeFeesSearch(row.cells.name ?? "").includes(query) || normalizeFeesSearch(row.cells.code ?? "").includes(query)));
|
|
6413
|
+
}
|
|
6414
|
+
function paginateFeesRows(rows, requestedPage) {
|
|
6415
|
+
const pageCount = Math.max(1, Math.ceil(rows.length / FEES_PAGE_SIZE));
|
|
6416
|
+
const page = Math.min(pageCount, Math.max(1, requestedPage));
|
|
6417
|
+
return { page, pageCount, rows: rows.slice((page - 1) * FEES_PAGE_SIZE, page * FEES_PAGE_SIZE) };
|
|
6418
|
+
}
|
|
6419
|
+
function parseFeesTable(value4, fallback) {
|
|
6420
|
+
if (typeof value4 !== "string") return fallback;
|
|
6421
|
+
try {
|
|
6422
|
+
const data = JSON.parse(value4);
|
|
6423
|
+
if (!data || !Array.isArray(data.columns) || !Array.isArray(data.rows) || !data.columns.length) return fallback;
|
|
6424
|
+
if (data.tags !== void 0 && (!Array.isArray(data.tags) || data.tags.some((tag) => typeof tag !== "string"))) return fallback;
|
|
6425
|
+
const keys2 = /* @__PURE__ */ new Set();
|
|
6426
|
+
for (const column of data.columns) {
|
|
6427
|
+
if (!column || typeof column.key !== "string" || !column.key || keys2.has(column.key) || typeof column.title !== "string") return fallback;
|
|
6428
|
+
keys2.add(column.key);
|
|
6429
|
+
}
|
|
6430
|
+
if (!keys2.has("name")) return fallback;
|
|
6431
|
+
const ids = /* @__PURE__ */ new Set();
|
|
6432
|
+
for (const row of data.rows) {
|
|
6433
|
+
if (!row || typeof row.id !== "string" || !row.id || ids.has(row.id) || !row.cells || typeof row.cells !== "object" || Array.isArray(row.cells) || Object.values(row.cells).some((value5) => typeof value5 !== "string") || !Array.isArray(row.tags) || row.tags.some((tag) => typeof tag !== "string")) return fallback;
|
|
6434
|
+
ids.add(row.id);
|
|
6435
|
+
}
|
|
6436
|
+
return data;
|
|
6437
|
+
} catch {
|
|
6438
|
+
return fallback;
|
|
6439
|
+
}
|
|
6440
|
+
}
|
|
6441
|
+
var legacyMarginRates = [
|
|
6252
6442
|
{
|
|
6253
6443
|
category: "agriculture",
|
|
6254
6444
|
code: "SISCO",
|
|
@@ -6335,6 +6525,564 @@ var marginRates = [
|
|
|
6335
6525
|
tradingHours: "Phi\xEAn 1: 7h00 - 19h45\nPhi\xEAn 2: 20h30 - 1h45"
|
|
6336
6526
|
}
|
|
6337
6527
|
];
|
|
6528
|
+
function defaultFeesTable(t) {
|
|
6529
|
+
const keys2 = ["name", "code", "exchange", "initialMargin", "tradingFee", "tickSize", "margin", "priceUnit", "contractSize", "settlement", "deliveryDay", "tradingHours", "priceRange"];
|
|
6530
|
+
return {
|
|
6531
|
+
columns: keys2.map((key) => ({ key, title: t(`fees.table.${key}`) })),
|
|
6532
|
+
rows: legacyMarginRates.map((row) => ({ id: row.id, cells: Object.fromEntries(keys2.map((key) => [key, row[key]])), tags: [t(`fees.categories.${row.category}`)] }))
|
|
6533
|
+
};
|
|
6534
|
+
}
|
|
6535
|
+
|
|
6536
|
+
// src/wikex/fees-table.tsx
|
|
6537
|
+
var EditorActions = styled11.div.withConfig({
|
|
6538
|
+
componentId: "sc-a0fcfa89-0"
|
|
6539
|
+
})([
|
|
6540
|
+
`display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;`
|
|
6541
|
+
]);
|
|
6542
|
+
var EditGroup = styled11.div.withConfig({
|
|
6543
|
+
componentId: "sc-a0fcfa89-1"
|
|
6544
|
+
})([
|
|
6545
|
+
`display:flex;flex-direction:column;gap:6px;`
|
|
6546
|
+
]);
|
|
6547
|
+
var HeaderGroup = styled11(EditGroup).withConfig({
|
|
6548
|
+
componentId: "sc-a0fcfa89-2"
|
|
6549
|
+
})([
|
|
6550
|
+
`gap:8px;`
|
|
6551
|
+
]);
|
|
6552
|
+
var HeaderTitle = styled11.div.withConfig({
|
|
6553
|
+
componentId: "sc-a0fcfa89-3"
|
|
6554
|
+
})([
|
|
6555
|
+
`display:flex;align-items:flex-start;min-height:var(--fees-header-title-height,36px);`
|
|
6556
|
+
]);
|
|
6557
|
+
var HeaderActions = styled11.div.withConfig({
|
|
6558
|
+
componentId: "sc-a0fcfa89-4"
|
|
6559
|
+
})([
|
|
6560
|
+
`display:flex;align-items:center;min-height:24px;`
|
|
6561
|
+
]);
|
|
6562
|
+
var AlignedFeesTable = styled11(FeesAndMarginTable).withConfig({
|
|
6563
|
+
componentId: "sc-a0fcfa89-5"
|
|
6564
|
+
})([
|
|
6565
|
+
`&[data-editable] th{vertical-align:top;}`
|
|
6566
|
+
]);
|
|
6567
|
+
var EditorButton = styled11.button.withConfig({
|
|
6568
|
+
componentId: "sc-a0fcfa89-6"
|
|
6569
|
+
})([
|
|
6570
|
+
`padding:7px 12px;border:1px solid `,
|
|
6571
|
+
`;border-radius:6px;background:`,
|
|
6572
|
+
`;color:`,
|
|
6573
|
+
`;font:inherit;font-size:13px;cursor:pointer;&:hover,&:focus-visible{border-color:`,
|
|
6574
|
+
`;}`
|
|
6575
|
+
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
|
|
6576
|
+
var DeleteButton = styled11(EditorButton).withConfig({
|
|
6577
|
+
componentId: "sc-a0fcfa89-7"
|
|
6578
|
+
})([
|
|
6579
|
+
`align-self:flex-start;padding:4px 8px;border:0;border-radius:4px;background:#d32f2f;color:#fff;font-size:11px;font-weight:600;line-height:16px;white-space:nowrap;text-decoration:none;&:hover{background:#b71c1c;}&:focus-visible{outline:2px solid #d32f2f;outline-offset:2px;}`
|
|
6580
|
+
]);
|
|
6581
|
+
var CellEditorInput = styled11.textarea.withConfig({
|
|
6582
|
+
componentId: "sc-a0fcfa89-8"
|
|
6583
|
+
})([
|
|
6584
|
+
`display:block;box-sizing:border-box;width:100%;min-width:0;padding:3px;border:1px solid transparent;border-radius:3px;color:inherit;background:transparent;font:inherit;line-height:inherit;resize:none;overflow:hidden;&:hover{border-color:`,
|
|
6585
|
+
`;}&:focus{outline:1px solid `,
|
|
6586
|
+
`;}`
|
|
6587
|
+
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.accent.primary);
|
|
6588
|
+
function CellEditor({ onInput, ...props }) {
|
|
6589
|
+
const ref = useRef2(null);
|
|
6590
|
+
const fit = () => {
|
|
6591
|
+
const element = ref.current;
|
|
6592
|
+
if (!element) return;
|
|
6593
|
+
element.style.height = "0px";
|
|
6594
|
+
const style = element.ownerDocument.defaultView.getComputedStyle(element);
|
|
6595
|
+
const border = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
|
|
6596
|
+
element.style.height = `${element.scrollHeight + border}px`;
|
|
6597
|
+
};
|
|
6598
|
+
useLayoutEffect2(fit, [
|
|
6599
|
+
props.value,
|
|
6600
|
+
props.defaultValue
|
|
6601
|
+
]);
|
|
6602
|
+
useLayoutEffect2(() => {
|
|
6603
|
+
const element = ref.current;
|
|
6604
|
+
if (!element) return;
|
|
6605
|
+
let width = element.getBoundingClientRect().width;
|
|
6606
|
+
const observer = new ResizeObserver(() => {
|
|
6607
|
+
const nextWidth = element.getBoundingClientRect().width;
|
|
6608
|
+
if (nextWidth !== width) {
|
|
6609
|
+
width = nextWidth;
|
|
6610
|
+
fit();
|
|
6611
|
+
}
|
|
6612
|
+
});
|
|
6613
|
+
observer.observe(element);
|
|
6614
|
+
let active = true;
|
|
6615
|
+
void element.ownerDocument.fonts.ready.then(() => {
|
|
6616
|
+
if (active) fit();
|
|
6617
|
+
});
|
|
6618
|
+
return () => {
|
|
6619
|
+
active = false;
|
|
6620
|
+
observer.disconnect();
|
|
6621
|
+
};
|
|
6622
|
+
}, []);
|
|
6623
|
+
return /* @__PURE__ */ _jsx3(CellEditorInput, {
|
|
6624
|
+
...props,
|
|
6625
|
+
ref,
|
|
6626
|
+
rows: 1,
|
|
6627
|
+
onInput: (event) => {
|
|
6628
|
+
fit();
|
|
6629
|
+
onInput?.(event);
|
|
6630
|
+
}
|
|
6631
|
+
});
|
|
6632
|
+
}
|
|
6633
|
+
function RowTagSelect({ selected, options, onChange }) {
|
|
6634
|
+
const selectRoot = useRef2(null);
|
|
6635
|
+
return /* @__PURE__ */ _jsx3(EditGroup, {
|
|
6636
|
+
children: /* @__PURE__ */ _jsx3("div", {
|
|
6637
|
+
ref: selectRoot,
|
|
6638
|
+
children: /* @__PURE__ */ _jsxs3(Select2, {
|
|
6639
|
+
multiple: true,
|
|
6640
|
+
fullWidth: true,
|
|
6641
|
+
size: "small",
|
|
6642
|
+
displayEmpty: true,
|
|
6643
|
+
value: selected,
|
|
6644
|
+
inputProps: {
|
|
6645
|
+
"aria-label": "Ch\u1ECDn tag"
|
|
6646
|
+
},
|
|
6647
|
+
renderValue: (value4) => value4.length ? `\u0110\xE3 ch\u1ECDn ${value4.length} tag` : "Ch\u1ECDn tag\u2026",
|
|
6648
|
+
MenuProps: {
|
|
6649
|
+
container: () => selectRoot.current?.ownerDocument.body ?? document.body
|
|
6650
|
+
},
|
|
6651
|
+
onChange: (event) => {
|
|
6652
|
+
const value4 = event.target.value;
|
|
6653
|
+
onChange(typeof value4 === "string" ? value4.split(",") : value4);
|
|
6654
|
+
},
|
|
6655
|
+
sx: {
|
|
6656
|
+
fontSize: 13
|
|
6657
|
+
},
|
|
6658
|
+
children: [
|
|
6659
|
+
options.map((item) => /* @__PURE__ */ _jsxs3(MenuItem, {
|
|
6660
|
+
value: item,
|
|
6661
|
+
children: [
|
|
6662
|
+
/* @__PURE__ */ _jsx3(Checkbox, {
|
|
6663
|
+
size: "small",
|
|
6664
|
+
checked: selected.includes(item),
|
|
6665
|
+
tabIndex: -1,
|
|
6666
|
+
disableRipple: true
|
|
6667
|
+
}),
|
|
6668
|
+
item
|
|
6669
|
+
]
|
|
6670
|
+
}, item)),
|
|
6671
|
+
!options.length && /* @__PURE__ */ _jsx3(MenuItem, {
|
|
6672
|
+
disabled: true,
|
|
6673
|
+
children: "Ch\u01B0a c\xF3 tag \u2014 d\xF9ng n\xFAt Th\xEAm tag ph\xEDa tr\xEAn"
|
|
6674
|
+
})
|
|
6675
|
+
]
|
|
6676
|
+
})
|
|
6677
|
+
})
|
|
6678
|
+
});
|
|
6679
|
+
}
|
|
6680
|
+
var columnWidths = {
|
|
6681
|
+
name: 100,
|
|
6682
|
+
code: 96,
|
|
6683
|
+
exchange: 94,
|
|
6684
|
+
initialMargin: 126,
|
|
6685
|
+
tradingFee: 100,
|
|
6686
|
+
tickSize: 92,
|
|
6687
|
+
margin: 100,
|
|
6688
|
+
priceUnit: 112,
|
|
6689
|
+
contractSize: 150,
|
|
6690
|
+
settlement: 126,
|
|
6691
|
+
deliveryDay: 154,
|
|
6692
|
+
tradingHours: 160,
|
|
6693
|
+
priceRange: 112
|
|
6694
|
+
};
|
|
6695
|
+
function FeesTable({ value: value4, editable = false, onChange, labels, size = "md", tagOrder = [] }) {
|
|
6696
|
+
const [search, setSearch] = useState5("");
|
|
6697
|
+
const [tag, setTag] = useState5("");
|
|
6698
|
+
const [page, setPage] = useState5(1);
|
|
6699
|
+
const canEdit = editable && Boolean(onChange);
|
|
6700
|
+
const tableRoot = useRef2(null);
|
|
6701
|
+
useLayoutEffect2(() => {
|
|
6702
|
+
const root = tableRoot.current;
|
|
6703
|
+
if (!root || !canEdit) return;
|
|
6704
|
+
const editors = [
|
|
6705
|
+
...root.querySelectorAll("thead textarea")
|
|
6706
|
+
];
|
|
6707
|
+
const align = () => {
|
|
6708
|
+
const height = Math.max(36, ...editors.map((editor) => editor.getBoundingClientRect().height));
|
|
6709
|
+
root.style.setProperty("--fees-header-title-height", `${height}px`);
|
|
6710
|
+
};
|
|
6711
|
+
const observer = new ResizeObserver(align);
|
|
6712
|
+
editors.forEach((editor) => observer.observe(editor));
|
|
6713
|
+
align();
|
|
6714
|
+
return () => observer.disconnect();
|
|
6715
|
+
}, [
|
|
6716
|
+
canEdit,
|
|
6717
|
+
value4.columns
|
|
6718
|
+
]);
|
|
6719
|
+
const dialogId = useId2();
|
|
6720
|
+
const [createTagOpen, setCreateTagOpen] = useState5(false);
|
|
6721
|
+
const [tagDraft, setTagDraft] = useState5("");
|
|
6722
|
+
const [deleteTarget, setDeleteTarget] = useState5(null);
|
|
6723
|
+
const confirmDelete = () => {
|
|
6724
|
+
if (!deleteTarget || !canEdit) return;
|
|
6725
|
+
if (deleteTarget.kind === "row") {
|
|
6726
|
+
onChange?.({
|
|
6727
|
+
...value4,
|
|
6728
|
+
rows: value4.rows.filter((row) => row.id !== deleteTarget.id)
|
|
6729
|
+
});
|
|
6730
|
+
} else if (deleteTarget.id !== "name") {
|
|
6731
|
+
onChange?.({
|
|
6732
|
+
...value4,
|
|
6733
|
+
columns: value4.columns.filter((column) => column.key !== deleteTarget.id),
|
|
6734
|
+
rows: value4.rows.map((row) => ({
|
|
6735
|
+
...row,
|
|
6736
|
+
cells: Object.fromEntries(Object.entries(row.cells).filter(([key]) => key !== deleteTarget.id))
|
|
6737
|
+
}))
|
|
6738
|
+
});
|
|
6739
|
+
}
|
|
6740
|
+
setDeleteTarget(null);
|
|
6741
|
+
};
|
|
6742
|
+
const rowTags = [
|
|
6743
|
+
.../* @__PURE__ */ new Set([
|
|
6744
|
+
...value4.tags ?? [],
|
|
6745
|
+
...value4.rows.flatMap((row) => row.tags)
|
|
6746
|
+
])
|
|
6747
|
+
].filter(Boolean);
|
|
6748
|
+
const tags = [
|
|
6749
|
+
...tagOrder.filter((item) => rowTags.includes(item)),
|
|
6750
|
+
...rowTags.filter((item) => !tagOrder.includes(item))
|
|
6751
|
+
];
|
|
6752
|
+
const newTagName = tagDraft.trim().replace(/\s+/g, " ");
|
|
6753
|
+
const duplicateTag = tags.some((item) => item.toLocaleLowerCase("vi") === newTagName.toLocaleLowerCase("vi"));
|
|
6754
|
+
const createTag = () => {
|
|
6755
|
+
if (!canEdit || !newTagName || duplicateTag) return;
|
|
6756
|
+
onChange?.({
|
|
6757
|
+
...value4,
|
|
6758
|
+
tags: [
|
|
6759
|
+
...tags,
|
|
6760
|
+
newTagName
|
|
6761
|
+
]
|
|
6762
|
+
});
|
|
6763
|
+
setCreateTagOpen(false);
|
|
6764
|
+
setTagDraft("");
|
|
6765
|
+
};
|
|
6766
|
+
const activeTag = tags.includes(tag) ? tag : "";
|
|
6767
|
+
const pagination = paginateFeesRows(filterFeesRows(value4, search, activeTag), page);
|
|
6768
|
+
const changeRow = (id, patch) => onChange?.({
|
|
6769
|
+
...value4,
|
|
6770
|
+
rows: value4.rows.map((row) => row.id === id ? {
|
|
6771
|
+
...row,
|
|
6772
|
+
...patch
|
|
6773
|
+
} : row)
|
|
6774
|
+
});
|
|
6775
|
+
const columns = value4.columns.map((column, index) => ({
|
|
6776
|
+
key: column.key,
|
|
6777
|
+
width: columnWidths[column.key] ?? 140,
|
|
6778
|
+
fixed: index === 0 ? "left" : void 0,
|
|
6779
|
+
title: canEdit ? /* @__PURE__ */ _jsxs3(HeaderGroup, {
|
|
6780
|
+
children: [
|
|
6781
|
+
/* @__PURE__ */ _jsx3(HeaderTitle, {
|
|
6782
|
+
children: /* @__PURE__ */ _jsx3(CellEditor, {
|
|
6783
|
+
rows: 2,
|
|
6784
|
+
value: column.title,
|
|
6785
|
+
"aria-label": `Ti\xEAu \u0111\u1EC1 c\u1ED9t ${index + 1}`,
|
|
6786
|
+
onChange: (event) => onChange?.({
|
|
6787
|
+
...value4,
|
|
6788
|
+
columns: value4.columns.map((item) => item.key === column.key ? {
|
|
6789
|
+
...item,
|
|
6790
|
+
title: event.target.value
|
|
6791
|
+
} : item)
|
|
6792
|
+
})
|
|
6793
|
+
})
|
|
6794
|
+
}),
|
|
6795
|
+
/* @__PURE__ */ _jsx3(HeaderActions, {
|
|
6796
|
+
children: column.key !== "name" && /* @__PURE__ */ _jsx3(DeleteButton, {
|
|
6797
|
+
type: "button",
|
|
6798
|
+
onClick: () => {
|
|
6799
|
+
setDeleteTarget({
|
|
6800
|
+
kind: "column",
|
|
6801
|
+
id: column.key,
|
|
6802
|
+
label: column.title
|
|
6803
|
+
});
|
|
6804
|
+
},
|
|
6805
|
+
children: "X\xF3a c\u1ED9t"
|
|
6806
|
+
})
|
|
6807
|
+
})
|
|
6808
|
+
]
|
|
6809
|
+
}) : column.title,
|
|
6810
|
+
render: (_unused, row) => canEdit ? /* @__PURE__ */ _jsx3(CellEditor, {
|
|
6811
|
+
rows: Math.max(2, (row.cells[column.key] ?? "").split("\n").length),
|
|
6812
|
+
value: row.cells[column.key] ?? "",
|
|
6813
|
+
"aria-label": `${column.title} \u2014 ${row.cells.name || "H\xE0ng m\u1EDBi"}`,
|
|
6814
|
+
onChange: (event) => changeRow(row.id, {
|
|
6815
|
+
cells: {
|
|
6816
|
+
...row.cells,
|
|
6817
|
+
[column.key]: event.target.value
|
|
6818
|
+
}
|
|
6819
|
+
})
|
|
6820
|
+
}) : row.cells[column.key] ?? ""
|
|
6821
|
+
}));
|
|
6822
|
+
if (canEdit) columns.push({
|
|
6823
|
+
key: "__tags",
|
|
6824
|
+
title: /* @__PURE__ */ _jsxs3(HeaderGroup, {
|
|
6825
|
+
children: [
|
|
6826
|
+
/* @__PURE__ */ _jsx3(HeaderTitle, {
|
|
6827
|
+
children: "Tag"
|
|
6828
|
+
}),
|
|
6829
|
+
/* @__PURE__ */ _jsx3(HeaderActions, {})
|
|
6830
|
+
]
|
|
6831
|
+
}),
|
|
6832
|
+
width: 200,
|
|
6833
|
+
render: (_unused, row) => /* @__PURE__ */ _jsxs3(EditGroup, {
|
|
6834
|
+
children: [
|
|
6835
|
+
/* @__PURE__ */ _jsx3(RowTagSelect, {
|
|
6836
|
+
selected: row.tags,
|
|
6837
|
+
options: tags,
|
|
6838
|
+
onChange: (next) => changeRow(row.id, {
|
|
6839
|
+
tags: next
|
|
6840
|
+
})
|
|
6841
|
+
}),
|
|
6842
|
+
/* @__PURE__ */ _jsx3(DeleteButton, {
|
|
6843
|
+
type: "button",
|
|
6844
|
+
onClick: () => {
|
|
6845
|
+
setDeleteTarget({
|
|
6846
|
+
kind: "row",
|
|
6847
|
+
id: row.id,
|
|
6848
|
+
label: row.cells.name || "H\xE0ng m\u1EDBi"
|
|
6849
|
+
});
|
|
6850
|
+
},
|
|
6851
|
+
children: "X\xF3a h\xE0ng"
|
|
6852
|
+
})
|
|
6853
|
+
]
|
|
6854
|
+
})
|
|
6855
|
+
});
|
|
6856
|
+
return /* @__PURE__ */ _jsx3(ThemeProvider, {
|
|
6857
|
+
theme: appTheme,
|
|
6858
|
+
children: /* @__PURE__ */ _jsxs3("div", {
|
|
6859
|
+
ref: tableRoot,
|
|
6860
|
+
"data-cms-table-editor": true,
|
|
6861
|
+
onClick: (event) => {
|
|
6862
|
+
if (canEdit) event.stopPropagation();
|
|
6863
|
+
},
|
|
6864
|
+
children: [
|
|
6865
|
+
/* @__PURE__ */ _jsx3(FeesAndMarginToolbar, {
|
|
6866
|
+
"aria-label": "L\u1ECDc b\u1EA3ng ph\xED v\xE0 k\xFD qu\u1EF9",
|
|
6867
|
+
children: /* @__PURE__ */ _jsxs3(FeesAndMarginToolbarInner, {
|
|
6868
|
+
children: [
|
|
6869
|
+
/* @__PURE__ */ _jsx3("div", {
|
|
6870
|
+
style: {
|
|
6871
|
+
minWidth: 0
|
|
6872
|
+
},
|
|
6873
|
+
children: /* @__PURE__ */ _jsx3(TabCommon, {
|
|
6874
|
+
ariaLabel: "L\u1ECDc theo tag",
|
|
6875
|
+
size,
|
|
6876
|
+
items: [
|
|
6877
|
+
{
|
|
6878
|
+
id: "",
|
|
6879
|
+
label: labels?.all ?? "T\u1EA5t c\u1EA3"
|
|
6880
|
+
},
|
|
6881
|
+
...tags.map((item) => ({
|
|
6882
|
+
id: item,
|
|
6883
|
+
label: item
|
|
6884
|
+
}))
|
|
6885
|
+
],
|
|
6886
|
+
value: activeTag,
|
|
6887
|
+
onValueChange: (next) => {
|
|
6888
|
+
setTag(next);
|
|
6889
|
+
setPage(1);
|
|
6890
|
+
}
|
|
6891
|
+
})
|
|
6892
|
+
}),
|
|
6893
|
+
/* @__PURE__ */ _jsx3(FeesAndMarginSearch, {
|
|
6894
|
+
children: /* @__PURE__ */ _jsx3(InputCommon, {
|
|
6895
|
+
leftIcon: /* @__PURE__ */ _jsx3(FeesSearchIcon, {}),
|
|
6896
|
+
size: "sm",
|
|
6897
|
+
"aria-label": labels?.search ?? "T\xECm t\xEAn h\xE0ng h\xF3a ho\u1EB7c m\xE3",
|
|
6898
|
+
placeholder: labels?.search ?? "T\xECm t\xEAn h\xE0ng h\xF3a ho\u1EB7c m\xE3",
|
|
6899
|
+
value: search,
|
|
6900
|
+
onChange: (event) => {
|
|
6901
|
+
setSearch(event.target.value);
|
|
6902
|
+
setPage(1);
|
|
6903
|
+
}
|
|
6904
|
+
})
|
|
6905
|
+
})
|
|
6906
|
+
]
|
|
6907
|
+
})
|
|
6908
|
+
}),
|
|
6909
|
+
canEdit && /* @__PURE__ */ _jsxs3(EditorActions, {
|
|
6910
|
+
children: [
|
|
6911
|
+
/* @__PURE__ */ _jsx3(EditorButton, {
|
|
6912
|
+
type: "button",
|
|
6913
|
+
onClick: () => {
|
|
6914
|
+
const row = {
|
|
6915
|
+
id: crypto.randomUUID(),
|
|
6916
|
+
cells: Object.fromEntries(value4.columns.map((column) => [
|
|
6917
|
+
column.key,
|
|
6918
|
+
column.key === "name" ? "H\xE0ng h\xF3a m\u1EDBi" : ""
|
|
6919
|
+
])),
|
|
6920
|
+
tags: []
|
|
6921
|
+
};
|
|
6922
|
+
onChange?.({
|
|
6923
|
+
...value4,
|
|
6924
|
+
rows: [
|
|
6925
|
+
...value4.rows,
|
|
6926
|
+
row
|
|
6927
|
+
]
|
|
6928
|
+
});
|
|
6929
|
+
setSearch("");
|
|
6930
|
+
setTag("");
|
|
6931
|
+
setPage(Math.ceil((value4.rows.length + 1) / FEES_PAGE_SIZE));
|
|
6932
|
+
},
|
|
6933
|
+
children: "+ Th\xEAm h\xE0ng"
|
|
6934
|
+
}),
|
|
6935
|
+
/* @__PURE__ */ _jsx3(EditorButton, {
|
|
6936
|
+
type: "button",
|
|
6937
|
+
onClick: () => {
|
|
6938
|
+
const key = `column-${crypto.randomUUID()}`;
|
|
6939
|
+
onChange?.({
|
|
6940
|
+
...value4,
|
|
6941
|
+
columns: [
|
|
6942
|
+
...value4.columns,
|
|
6943
|
+
{
|
|
6944
|
+
key,
|
|
6945
|
+
title: "C\u1ED9t m\u1EDBi"
|
|
6946
|
+
}
|
|
6947
|
+
],
|
|
6948
|
+
rows: value4.rows.map((row) => ({
|
|
6949
|
+
...row,
|
|
6950
|
+
cells: {
|
|
6951
|
+
...row.cells,
|
|
6952
|
+
[key]: ""
|
|
6953
|
+
}
|
|
6954
|
+
}))
|
|
6955
|
+
});
|
|
6956
|
+
},
|
|
6957
|
+
children: "+ Th\xEAm c\u1ED9t"
|
|
6958
|
+
}),
|
|
6959
|
+
/* @__PURE__ */ _jsx3(EditorButton, {
|
|
6960
|
+
type: "button",
|
|
6961
|
+
onClick: () => {
|
|
6962
|
+
setTagDraft("");
|
|
6963
|
+
setCreateTagOpen(true);
|
|
6964
|
+
},
|
|
6965
|
+
children: "+ Th\xEAm tag"
|
|
6966
|
+
})
|
|
6967
|
+
]
|
|
6968
|
+
}),
|
|
6969
|
+
/* @__PURE__ */ _jsx3(AlignedFeesTable, {
|
|
6970
|
+
"data-editable": canEdit || void 0,
|
|
6971
|
+
children: /* @__PURE__ */ _jsx3(Table, {
|
|
6972
|
+
columns,
|
|
6973
|
+
dataSource: pagination.rows,
|
|
6974
|
+
rowKey: "id",
|
|
6975
|
+
size,
|
|
6976
|
+
empty: labels?.empty ?? "Kh\xF4ng t\xECm th\u1EA5y h\xE0ng h\xF3a",
|
|
6977
|
+
scroll: {
|
|
6978
|
+
x: Math.max(1440, value4.columns.reduce((sum, column) => sum + (columnWidths[column.key] ?? 140), 0) + (canEdit ? 200 : 0))
|
|
6979
|
+
}
|
|
6980
|
+
})
|
|
6981
|
+
}),
|
|
6982
|
+
/* @__PURE__ */ _jsx3(FeesAndMarginPagination, {
|
|
6983
|
+
children: /* @__PURE__ */ _jsx3(Pagination2, {
|
|
6984
|
+
page: pagination.page,
|
|
6985
|
+
pageCount: pagination.pageCount,
|
|
6986
|
+
onPageChange: setPage,
|
|
6987
|
+
ariaLabel: "Ph\xE2n trang b\u1EA3ng ph\xED"
|
|
6988
|
+
})
|
|
6989
|
+
}),
|
|
6990
|
+
/* @__PURE__ */ _jsxs3(Dialog2, {
|
|
6991
|
+
open: createTagOpen && canEdit,
|
|
6992
|
+
onClose: () => setCreateTagOpen(false),
|
|
6993
|
+
container: () => tableRoot.current?.ownerDocument.body ?? document.body,
|
|
6994
|
+
"aria-labelledby": `${dialogId}-create-tag-title`,
|
|
6995
|
+
fullWidth: true,
|
|
6996
|
+
maxWidth: "xs",
|
|
6997
|
+
children: [
|
|
6998
|
+
/* @__PURE__ */ _jsx3(DialogTitle, {
|
|
6999
|
+
id: `${dialogId}-create-tag-title`,
|
|
7000
|
+
children: "T\u1EA1o tag m\u1EDBi"
|
|
7001
|
+
}),
|
|
7002
|
+
/* @__PURE__ */ _jsx3(DialogContent, {
|
|
7003
|
+
children: /* @__PURE__ */ _jsx3(TextField2, {
|
|
7004
|
+
autoFocus: true,
|
|
7005
|
+
fullWidth: true,
|
|
7006
|
+
margin: "dense",
|
|
7007
|
+
label: "T\xEAn tag",
|
|
7008
|
+
value: tagDraft,
|
|
7009
|
+
onChange: (event) => setTagDraft(event.target.value),
|
|
7010
|
+
error: duplicateTag,
|
|
7011
|
+
helperText: duplicateTag ? "Tag n\xE0y \u0111\xE3 t\u1ED3n t\u1EA1i." : "Tag m\u1EDBi s\u1EBD c\xF3 trong danh s\xE1ch ch\u1ECDn c\u1EE7a t\u1EA5t c\u1EA3 h\xE0ng.",
|
|
7012
|
+
onKeyDown: (event) => {
|
|
7013
|
+
if (event.key === "Enter") {
|
|
7014
|
+
event.preventDefault();
|
|
7015
|
+
createTag();
|
|
7016
|
+
}
|
|
7017
|
+
}
|
|
7018
|
+
})
|
|
7019
|
+
}),
|
|
7020
|
+
/* @__PURE__ */ _jsxs3(DialogActions, {
|
|
7021
|
+
children: [
|
|
7022
|
+
/* @__PURE__ */ _jsx3(Button7, {
|
|
7023
|
+
onClick: () => setCreateTagOpen(false),
|
|
7024
|
+
children: "H\u1EE7y"
|
|
7025
|
+
}),
|
|
7026
|
+
/* @__PURE__ */ _jsx3(Button7, {
|
|
7027
|
+
variant: "contained",
|
|
7028
|
+
disabled: !newTagName || duplicateTag,
|
|
7029
|
+
onClick: createTag,
|
|
7030
|
+
children: "T\u1EA1o tag"
|
|
7031
|
+
})
|
|
7032
|
+
]
|
|
7033
|
+
})
|
|
7034
|
+
]
|
|
7035
|
+
}),
|
|
7036
|
+
/* @__PURE__ */ _jsxs3(Dialog2, {
|
|
7037
|
+
open: Boolean(deleteTarget) && canEdit,
|
|
7038
|
+
onClose: () => setDeleteTarget(null),
|
|
7039
|
+
container: () => tableRoot.current?.ownerDocument.body ?? document.body,
|
|
7040
|
+
"aria-labelledby": `${dialogId}-title`,
|
|
7041
|
+
"aria-describedby": `${dialogId}-description`,
|
|
7042
|
+
fullWidth: true,
|
|
7043
|
+
maxWidth: "xs",
|
|
7044
|
+
children: [
|
|
7045
|
+
/* @__PURE__ */ _jsxs3(DialogTitle, {
|
|
7046
|
+
id: `${dialogId}-title`,
|
|
7047
|
+
children: [
|
|
7048
|
+
"X\xF3a ",
|
|
7049
|
+
deleteTarget?.kind === "column" ? "c\u1ED9t" : "h\xE0ng",
|
|
7050
|
+
"?"
|
|
7051
|
+
]
|
|
7052
|
+
}),
|
|
7053
|
+
/* @__PURE__ */ _jsx3(DialogContent, {
|
|
7054
|
+
children: /* @__PURE__ */ _jsx3(DialogContentText, {
|
|
7055
|
+
id: `${dialogId}-description`,
|
|
7056
|
+
children: deleteTarget?.kind === "column" ? `B\u1EA1n c\xF3 mu\u1ED1n x\xF3a c\u1ED9t \u201C${deleteTarget.label}\u201D v\xE0 to\xE0n b\u1ED9 n\u1ED9i dung trong c\u1ED9t n\xE0y?` : `B\u1EA1n c\xF3 mu\u1ED1n x\xF3a h\xE0ng \u201C${deleteTarget?.label ?? ""}\u201D?`
|
|
7057
|
+
})
|
|
7058
|
+
}),
|
|
7059
|
+
/* @__PURE__ */ _jsxs3(DialogActions, {
|
|
7060
|
+
children: [
|
|
7061
|
+
/* @__PURE__ */ _jsx3(Button7, {
|
|
7062
|
+
autoFocus: true,
|
|
7063
|
+
onClick: () => setDeleteTarget(null),
|
|
7064
|
+
children: "H\u1EE7y"
|
|
7065
|
+
}),
|
|
7066
|
+
/* @__PURE__ */ _jsxs3(Button7, {
|
|
7067
|
+
color: "error",
|
|
7068
|
+
variant: "contained",
|
|
7069
|
+
onClick: confirmDelete,
|
|
7070
|
+
children: [
|
|
7071
|
+
"X\xF3a ",
|
|
7072
|
+
deleteTarget?.kind === "column" ? "c\u1ED9t" : "h\xE0ng"
|
|
7073
|
+
]
|
|
7074
|
+
})
|
|
7075
|
+
]
|
|
7076
|
+
})
|
|
7077
|
+
]
|
|
7078
|
+
})
|
|
7079
|
+
]
|
|
7080
|
+
})
|
|
7081
|
+
});
|
|
7082
|
+
}
|
|
7083
|
+
|
|
7084
|
+
// src/commodity-original/app/bang-phi-ky-quy/FeesAndMarginContent.tsx
|
|
7085
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
6338
7086
|
var monthCodes = [
|
|
6339
7087
|
"F",
|
|
6340
7088
|
"G",
|
|
@@ -6349,111 +7097,28 @@ var monthCodes = [
|
|
|
6349
7097
|
"X",
|
|
6350
7098
|
"Z"
|
|
6351
7099
|
];
|
|
6352
|
-
|
|
6353
|
-
function FeesAndMarginContent() {
|
|
7100
|
+
function FeesAndMarginContent({ content, editable, onChange }) {
|
|
6354
7101
|
const { t } = useTranslation4();
|
|
6355
|
-
const [activeCategory, setActiveCategory] = useState5("all");
|
|
6356
|
-
const [activeMonth] = useState5(0);
|
|
6357
|
-
const [page, setPage] = useState5(1);
|
|
6358
|
-
const [search, setSearch] = useState5("");
|
|
6359
7102
|
const { isMobile } = useResponsive();
|
|
6360
|
-
const
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
}));
|
|
6364
|
-
const columns = [
|
|
6365
|
-
{
|
|
6366
|
-
key: "name",
|
|
6367
|
-
title: t("fees.table.name"),
|
|
6368
|
-
dataIndex: "name",
|
|
6369
|
-
width: 100,
|
|
6370
|
-
fixed: "left"
|
|
6371
|
-
},
|
|
6372
|
-
{ key: "code", title: t("fees.table.code"), dataIndex: "code", width: 96 },
|
|
6373
|
-
{ key: "exchange", title: t("fees.table.exchange"), dataIndex: "exchange", width: 94 },
|
|
6374
|
-
{ key: "initialMargin", title: t("fees.table.initialMargin"), dataIndex: "initialMargin", width: 126 },
|
|
6375
|
-
{ key: "tradingFee", title: t("fees.table.tradingFee"), dataIndex: "tradingFee", width: 100 },
|
|
6376
|
-
{ key: "tickSize", title: t("fees.table.tickSize"), dataIndex: "tickSize", width: 92 },
|
|
6377
|
-
{ key: "margin", title: t("fees.table.margin"), dataIndex: "margin", width: 100 },
|
|
6378
|
-
{ key: "priceUnit", title: t("fees.table.priceUnit"), dataIndex: "priceUnit", width: 112 },
|
|
6379
|
-
{ key: "contractSize", title: t("fees.table.contractSize"), dataIndex: "contractSize", width: 150 },
|
|
6380
|
-
{ key: "settlement", title: t("fees.table.settlement"), dataIndex: "settlement", width: 126 },
|
|
6381
|
-
{ key: "deliveryDay", title: t("fees.table.deliveryDay"), dataIndex: "deliveryDay", width: 154 },
|
|
6382
|
-
{ key: "tradingHours", title: t("fees.table.tradingHours"), dataIndex: "tradingHours", width: 160 },
|
|
6383
|
-
{
|
|
6384
|
-
key: "priceRange",
|
|
6385
|
-
title: t("fees.table.priceRange"),
|
|
6386
|
-
dataIndex: "priceRange",
|
|
6387
|
-
width: 112
|
|
6388
|
-
}
|
|
6389
|
-
];
|
|
6390
|
-
const filteredRates = useMemo3(() => {
|
|
6391
|
-
const normalizedSearch = search.trim().toLocaleLowerCase();
|
|
6392
|
-
return marginRates.filter((rate) => {
|
|
6393
|
-
const matchesCategory = activeCategory === "all" || rate.category === activeCategory;
|
|
6394
|
-
const matchesSearch = !normalizedSearch || rate.name.toLocaleLowerCase().includes(normalizedSearch) || rate.code.toLocaleLowerCase().includes(normalizedSearch) || rate.exchange.toLocaleLowerCase().includes(normalizedSearch);
|
|
6395
|
-
return matchesCategory && matchesSearch;
|
|
6396
|
-
});
|
|
6397
|
-
}, [activeCategory, search]);
|
|
6398
|
-
const pageCount = Math.max(1, Math.ceil(filteredRates.length / ratesPerPage));
|
|
6399
|
-
const visibleRates = filteredRates.slice(
|
|
6400
|
-
(page - 1) * ratesPerPage,
|
|
6401
|
-
page * ratesPerPage
|
|
6402
|
-
);
|
|
6403
|
-
const handleCategoryChange = (category) => {
|
|
6404
|
-
setActiveCategory(category);
|
|
6405
|
-
setPage(1);
|
|
6406
|
-
};
|
|
7103
|
+
const [activeMonth] = useState6(0);
|
|
7104
|
+
const field = `${content.__cmsLanguage === "en" ? "en" : "vi"}.feesTable`;
|
|
7105
|
+
const data = parseFeesTable(content[field], defaultFeesTable((key) => String(t(key))));
|
|
6407
7106
|
return /* @__PURE__ */ jsx15(FeesAndMarginMain, { children: /* @__PURE__ */ jsxs11(FeesAndMarginPageContent, { children: [
|
|
6408
7107
|
/* @__PURE__ */ jsxs11(FeesAndMarginHeader, { children: [
|
|
6409
7108
|
/* @__PURE__ */ jsx15("h1", { children: t("fees.title") }),
|
|
6410
7109
|
/* @__PURE__ */ jsx15("p", { children: t("fees.effectiveDate") })
|
|
6411
7110
|
] }),
|
|
6412
|
-
/* @__PURE__ */ jsx15(
|
|
6413
|
-
|
|
6414
|
-
TabCommon,
|
|
6415
|
-
{
|
|
6416
|
-
ariaLabel: t("fees.categoriesLabel"),
|
|
6417
|
-
items: tabs,
|
|
6418
|
-
onValueChange: handleCategoryChange,
|
|
6419
|
-
size: isMobile ? "sm" : "md",
|
|
6420
|
-
value: activeCategory
|
|
6421
|
-
}
|
|
6422
|
-
),
|
|
6423
|
-
/* @__PURE__ */ jsx15(FeesAndMarginSearch, { children: /* @__PURE__ */ jsx15(
|
|
6424
|
-
InputCommon,
|
|
6425
|
-
{
|
|
6426
|
-
leftIcon: /* @__PURE__ */ jsx15(FeesSearchIcon, {}),
|
|
6427
|
-
onChange: (event) => {
|
|
6428
|
-
setPage(1);
|
|
6429
|
-
setSearch(event.target.value);
|
|
6430
|
-
},
|
|
6431
|
-
placeholder: t("fees.searchPlaceholder"),
|
|
6432
|
-
size: "sm",
|
|
6433
|
-
value: search
|
|
6434
|
-
}
|
|
6435
|
-
) })
|
|
6436
|
-
] }) }),
|
|
6437
|
-
/* @__PURE__ */ jsx15(FeesAndMarginTable, { children: /* @__PURE__ */ jsx15(
|
|
6438
|
-
Table,
|
|
6439
|
-
{
|
|
6440
|
-
columns,
|
|
6441
|
-
dataSource: visibleRates,
|
|
6442
|
-
empty: t("fees.empty"),
|
|
6443
|
-
rowKey: "id",
|
|
6444
|
-
scroll: { x: 1440 },
|
|
6445
|
-
size: isMobile ? "sm" : "md"
|
|
6446
|
-
}
|
|
6447
|
-
) }),
|
|
6448
|
-
/* @__PURE__ */ jsx15(FeesAndMarginPagination, { children: /* @__PURE__ */ jsx15(
|
|
6449
|
-
Pagination2,
|
|
7111
|
+
/* @__PURE__ */ jsx15(
|
|
7112
|
+
FeesTable,
|
|
6450
7113
|
{
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
7114
|
+
value: data,
|
|
7115
|
+
size: isMobile ? "sm" : "md",
|
|
7116
|
+
tagOrder: ["metal", "agriculture", "industrial"].map((category) => t(`fees.categories.${category}`)),
|
|
7117
|
+
editable,
|
|
7118
|
+
onChange: (next) => onChange?.(field, JSON.stringify(next)),
|
|
7119
|
+
labels: { search: t("fees.searchPlaceholder"), all: t("fees.categories.all"), empty: t("fees.empty") }
|
|
6455
7120
|
}
|
|
6456
|
-
)
|
|
7121
|
+
),
|
|
6457
7122
|
/* @__PURE__ */ jsxs11(FeesMonthNavigation, { "aria-label": t("fees.contractMonthsLabel"), children: [
|
|
6458
7123
|
/* @__PURE__ */ jsx15(FeesMonthTitle, { children: t("fees.contractMonths") }),
|
|
6459
7124
|
/* @__PURE__ */ jsx15(FeesMonthList, { children: monthCodes.map((code, index) => /* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs11(
|
|
@@ -6475,77 +7140,77 @@ function FeesAndMarginContent() {
|
|
|
6475
7140
|
import { useTranslation as useTranslation5 } from "react-i18next";
|
|
6476
7141
|
|
|
6477
7142
|
// src/commodity-original/app/chinh-sach/style.ts
|
|
6478
|
-
import
|
|
7143
|
+
import styled12 from "styled-components";
|
|
6479
7144
|
var policyAccent = "#f9bb3a";
|
|
6480
|
-
var PolicyMain =
|
|
7145
|
+
var PolicyMain = styled12.main.withConfig({
|
|
6481
7146
|
componentId: "sc-7b2122d1-0"
|
|
6482
7147
|
})([
|
|
6483
7148
|
`display:flex;width:100%;max-width:1240px;margin:0 auto;padding:40px 20px 80px;justify-content:center;background-color:`,
|
|
6484
7149
|
`;@media (max-width:768px){padding:32px 16px;}`
|
|
6485
7150
|
], ({ theme }) => theme.colors.background.canvas);
|
|
6486
|
-
var PolicyArticle =
|
|
7151
|
+
var PolicyArticle = styled12.article.withConfig({
|
|
6487
7152
|
componentId: "sc-7b2122d1-1"
|
|
6488
7153
|
})([
|
|
6489
7154
|
`display:flex;width:100%;flex-direction:column;`
|
|
6490
7155
|
]);
|
|
6491
|
-
var PolicyHeader =
|
|
7156
|
+
var PolicyHeader = styled12.header.withConfig({
|
|
6492
7157
|
componentId: "sc-7b2122d1-2"
|
|
6493
7158
|
})([
|
|
6494
7159
|
`display:flex;flex-direction:column;p{margin-bottom:16px;}@media (max-width:768px){p{margin-bottom:4px;}}`
|
|
6495
7160
|
]);
|
|
6496
|
-
var PageTitle =
|
|
7161
|
+
var PageTitle = styled12.h1.withConfig({
|
|
6497
7162
|
componentId: "sc-7b2122d1-3"
|
|
6498
7163
|
})([
|
|
6499
7164
|
`margin:0 0 40px;color:#333;font-size:48px;font-weight:700;line-height:57.836px;text-transform:capitalize;:root[data-theme="dark"] &{color:#fafafa;}@media (max-width:1024px){margin-bottom:8px;font-size:32px;line-height:40px;}`
|
|
6500
7165
|
]);
|
|
6501
|
-
var IntroTitle =
|
|
7166
|
+
var IntroTitle = styled12.h2.withConfig({
|
|
6502
7167
|
componentId: "sc-7b2122d1-4"
|
|
6503
7168
|
})([
|
|
6504
7169
|
`margin:0 0 24px;color:#666563;font-size:16px;font-weight:700;line-height:24px;:root[data-theme="dark"] &{color:#fafafa;}@media (max-width:768px){margin-bottom:24px;font-size:12px;}`
|
|
6505
7170
|
]);
|
|
6506
|
-
var Paragraph =
|
|
7171
|
+
var Paragraph = styled12.p.withConfig({
|
|
6507
7172
|
componentId: "sc-7b2122d1-5"
|
|
6508
7173
|
})([
|
|
6509
7174
|
`margin:0 0 12px;color:#666563;font-size:14px;font-weight:500;line-height:24px;:root[data-theme="dark"] &{color:#999b9c;}strong{color:#000;font-weight:700;}:root[data-theme="dark"] & strong{color:#fafafa;}@media (max-width:768px){font-size:12px;line-height:18px;}`
|
|
6510
7175
|
]);
|
|
6511
|
-
var Section =
|
|
7176
|
+
var Section = styled12.section.withConfig({
|
|
6512
7177
|
componentId: "sc-7b2122d1-6"
|
|
6513
7178
|
})([
|
|
6514
7179
|
`display:flex;flex-direction:column;`
|
|
6515
7180
|
]);
|
|
6516
|
-
var SectionTitle2 =
|
|
7181
|
+
var SectionTitle2 = styled12.h2.withConfig({
|
|
6517
7182
|
componentId: "sc-7b2122d1-7"
|
|
6518
7183
|
})([
|
|
6519
7184
|
`margin:32px 0;color:#333;font-size:32px;font-weight:700;line-height:40px;:root[data-theme="dark"] &{color:#fafafa;}@media (max-width:1024px){margin:24px 0;font-size:14px;line-height:20px;}`
|
|
6520
7185
|
]);
|
|
6521
|
-
var Subsection =
|
|
7186
|
+
var Subsection = styled12.div.withConfig({
|
|
6522
7187
|
componentId: "sc-7b2122d1-8"
|
|
6523
7188
|
})([
|
|
6524
7189
|
`display:flex;flex-direction:column;&:not(:last-child){margin-bottom:20px;}@media (max-width:768px){&:not(:last-child){margin-bottom:24px;}}`
|
|
6525
7190
|
]);
|
|
6526
|
-
var SubsectionTitle =
|
|
7191
|
+
var SubsectionTitle = styled12.h3.withConfig({
|
|
6527
7192
|
componentId: "sc-7b2122d1-9"
|
|
6528
7193
|
})([
|
|
6529
7194
|
`display:flex;margin:0 0 8px;align-items:center;gap:10px;color:#333;font-size:20px;font-weight:700;line-height:27px;&::before{width:9px;height:20px;flex-shrink:0;border-radius:1px;background-color:`,
|
|
6530
7195
|
`;content:"";}:root[data-theme="dark"] &{color:#fafafa;}@media (max-width:768px){margin-bottom:12px;gap:8px;font-size:14px;line-height:20px;&::before{width:6px;height:16px;}}`
|
|
6531
7196
|
], policyAccent);
|
|
6532
|
-
var BulletList =
|
|
7197
|
+
var BulletList = styled12.ul.withConfig({
|
|
6533
7198
|
componentId: "sc-7b2122d1-10"
|
|
6534
7199
|
})([
|
|
6535
7200
|
`margin:4px 0 8px;padding-left:24px;list-style:none;> li{position:relative;margin-bottom:12px;padding-left:20px;color:#666563;font-size:14px;font-weight:500;line-height:24px;}> li::before{position:absolute;top:8px;left:0;width:8px;height:9px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='9' viewBox='0 0 8 9' fill='none'%3E%3Cpath d='M1.84745 0.186474L6.93777 3.33107C7.46843 3.66519 7.62566 4.27445 7.42912 4.78545C7.3505 4.98199 7.23258 5.15887 7.0557 5.29645C7.01639 5.3161 6.97708 5.35541 6.93777 5.37507L1.84745 8.51967C1.45438 8.75551 1.022 8.75551 0.668228 8.57863C0.275153 8.38209 -3.12842e-08 7.98901 -5.27615e-08 7.49767L-3.27671e-07 1.20847C-3.35403e-07 1.03158 0.0393072 0.874354 0.0982684 0.717124C0.373421 0.0882044 1.17922 -0.226255 1.84745 0.186474Z' fill='%23F9BB3A'/%3E%3C/svg%3E");background-repeat:no-repeat;content:"";}> li strong{color:#000;font-weight:700;}:root[data-theme="dark"] & > li{color:#999b9c;}:root[data-theme="dark"] & > li strong{color:#fafafa;}@media (max-width:768px){margin:0;padding-left:16px;> li{padding-left:18px;}}`
|
|
6536
7201
|
]);
|
|
6537
|
-
var NumberedList =
|
|
7202
|
+
var NumberedList = styled12.ol.withConfig({
|
|
6538
7203
|
componentId: "sc-7b2122d1-11"
|
|
6539
7204
|
})([
|
|
6540
7205
|
`margin:4px 0 8px;padding-left:24px;counter-reset:policy-item;list-style:none;> li{position:relative;margin-bottom:12px;padding-left:20px;color:#666563;font-size:14px;font-weight:500;line-height:24px;counter-increment:policy-item;}> li::before{position:absolute;top:0;left:0;color:`,
|
|
6541
7206
|
`;content:counter(policy-item) ".";font-weight:700;}> li strong{color:#000;font-weight:700;}:root[data-theme="dark"] & > li{color:#999b9c;}:root[data-theme="dark"] & > li strong{color:#fafafa;}@media (max-width:768px){margin:0;padding-left:16px;> li{padding-left:18px;}}`
|
|
6542
7207
|
], policyAccent);
|
|
6543
|
-
var NestedBulletList =
|
|
7208
|
+
var NestedBulletList = styled12(BulletList).withConfig({
|
|
6544
7209
|
componentId: "sc-7b2122d1-12"
|
|
6545
7210
|
})([
|
|
6546
7211
|
`margin-top:4px;`
|
|
6547
7212
|
]);
|
|
6548
|
-
var InlineLink =
|
|
7213
|
+
var InlineLink = styled12.a.withConfig({
|
|
6549
7214
|
componentId: "sc-7b2122d1-13"
|
|
6550
7215
|
})([
|
|
6551
7216
|
`color:#000;font-weight:700;text-decoration:underline;text-decoration-color:`,
|
|
@@ -6692,30 +7357,30 @@ import { useRouter } from "next/navigation.js";
|
|
|
6692
7357
|
import { useTranslation as useTranslation6 } from "react-i18next";
|
|
6693
7358
|
|
|
6694
7359
|
// src/commodity-original/app/comming-soon/style.ts
|
|
6695
|
-
import
|
|
6696
|
-
var ComingSoonMain =
|
|
7360
|
+
import styled13 from "styled-components";
|
|
7361
|
+
var ComingSoonMain = styled13.main.withConfig({
|
|
6697
7362
|
componentId: "sc-c1b78d5e-0"
|
|
6698
7363
|
})([
|
|
6699
7364
|
`display:flex;min-height:635px;padding:60px 24px 120px;align-items:center;justify-content:center;background:`,
|
|
6700
7365
|
`;@media (max-width:767px){min-height:calc(100svh - var(--header-height));padding:40px 16px 64px;}`
|
|
6701
7366
|
], ({ theme }) => theme.colors.background.warm);
|
|
6702
|
-
var ComingSoonContainer =
|
|
7367
|
+
var ComingSoonContainer = styled13.section.withConfig({
|
|
6703
7368
|
componentId: "sc-c1b78d5e-1"
|
|
6704
7369
|
})([
|
|
6705
7370
|
`display:flex;width:min(1200px,100%);flex-direction:column;align-items:center;gap:32px;text-align:center;.coming-soon-cta{width:250px;height:44px;padding:11px 16px;flex:0 0 auto;box-shadow:0 1px 20px rgb(249 187 58 / 60%);font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:16px;font-weight:600;line-height:22px;}@media (max-width:767px){gap:28px;.coming-soon-cta{width:min(250px,100%);}}`
|
|
6706
7371
|
]);
|
|
6707
|
-
var ComingSoonArtwork =
|
|
7372
|
+
var ComingSoonArtwork = styled13.div.withConfig({
|
|
6708
7373
|
componentId: "sc-c1b78d5e-2"
|
|
6709
7374
|
})([
|
|
6710
7375
|
`display:flex;width:340px;height:295px;align-items:center;justify-content:center;img{display:block;width:340px;height:auto;object-fit:contain;filter:drop-shadow(0 18px 18px rgb(164 117 14 / 16%));}@media (max-width:767px){width:min(280px,100%);height:auto;min-height:224px;img{width:min(280px,100%);}}`
|
|
6711
7376
|
]);
|
|
6712
|
-
var ComingSoonTitle =
|
|
7377
|
+
var ComingSoonTitle = styled13.h1.withConfig({
|
|
6713
7378
|
componentId: "sc-c1b78d5e-3"
|
|
6714
7379
|
})([
|
|
6715
7380
|
`margin:0;color:`,
|
|
6716
7381
|
`;font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:32px;font-weight:700;line-height:40px;text-transform:uppercase;@media (max-width:767px){font-size:24px;line-height:32px;}`
|
|
6717
7382
|
], ({ theme }) => theme.colors.text.primary);
|
|
6718
|
-
var ComingSoonDescription =
|
|
7383
|
+
var ComingSoonDescription = styled13.p.withConfig({
|
|
6719
7384
|
componentId: "sc-c1b78d5e-4"
|
|
6720
7385
|
})([
|
|
6721
7386
|
`max-width:1200px;margin:10px 0 0;color:`,
|
|
@@ -6773,66 +7438,66 @@ function ComingSoonContent() {
|
|
|
6773
7438
|
}
|
|
6774
7439
|
|
|
6775
7440
|
// src/commodity-original/app/khieu-nai/style.ts
|
|
6776
|
-
import
|
|
7441
|
+
import styled14 from "styled-components";
|
|
6777
7442
|
var accent = "#f9bb3a";
|
|
6778
|
-
var PolicyMain2 =
|
|
7443
|
+
var PolicyMain2 = styled14.main.withConfig({
|
|
6779
7444
|
componentId: "sc-35e42561-0"
|
|
6780
7445
|
})([
|
|
6781
7446
|
`width:100%;max-width:1240px;margin:0 auto;padding:40px 20px 80px;@media (max-width:768px){padding:32px 16px;}`
|
|
6782
7447
|
]);
|
|
6783
|
-
var PolicyArticle2 =
|
|
7448
|
+
var PolicyArticle2 = styled14.article.withConfig({
|
|
6784
7449
|
componentId: "sc-35e42561-1"
|
|
6785
7450
|
})([
|
|
6786
7451
|
`width:100%;`
|
|
6787
7452
|
]);
|
|
6788
|
-
var PolicyHeader2 =
|
|
7453
|
+
var PolicyHeader2 = styled14.header.withConfig({
|
|
6789
7454
|
componentId: "sc-35e42561-2"
|
|
6790
7455
|
})([
|
|
6791
7456
|
`margin-bottom:32px;`
|
|
6792
7457
|
]);
|
|
6793
|
-
var PageTitle2 =
|
|
7458
|
+
var PageTitle2 = styled14.h1.withConfig({
|
|
6794
7459
|
componentId: "sc-35e42561-3"
|
|
6795
7460
|
})([
|
|
6796
7461
|
`margin:0 0 24px;color:#333;font-size:48px;font-weight:700;line-height:1.2;:root[data-theme="dark"] &{color:#fafafa;}@media (max-width:1024px){font-size:32px;line-height:40px;}`
|
|
6797
7462
|
]);
|
|
6798
|
-
var Intro =
|
|
7463
|
+
var Intro = styled14.p.withConfig({
|
|
6799
7464
|
componentId: "sc-35e42561-4"
|
|
6800
7465
|
})([
|
|
6801
7466
|
`margin:0;color:#666563;font-size:16px;font-weight:600;line-height:24px;:root[data-theme="dark"] &{color:#c8c9ca;}@media (max-width:768px){font-size:14px;}`
|
|
6802
7467
|
]);
|
|
6803
|
-
var Section2 =
|
|
7468
|
+
var Section2 = styled14.section.withConfig({
|
|
6804
7469
|
componentId: "sc-35e42561-5"
|
|
6805
7470
|
})([
|
|
6806
7471
|
`&:not(:first-of-type){margin-top:36px;}`
|
|
6807
7472
|
]);
|
|
6808
|
-
var SectionTitle3 =
|
|
7473
|
+
var SectionTitle3 = styled14.h2.withConfig({
|
|
6809
7474
|
componentId: "sc-35e42561-6"
|
|
6810
7475
|
})([
|
|
6811
7476
|
`margin:0 0 16px;color:#333;font-size:26px;font-weight:700;line-height:34px;:root[data-theme="dark"] &{color:#fafafa;}@media (max-width:768px){font-size:20px;line-height:28px;}`
|
|
6812
7477
|
]);
|
|
6813
|
-
var Paragraph2 =
|
|
7478
|
+
var Paragraph2 = styled14.p.withConfig({
|
|
6814
7479
|
componentId: "sc-35e42561-7"
|
|
6815
7480
|
})([
|
|
6816
7481
|
`margin:0 0 12px;color:#666563;font-size:14px;font-weight:500;line-height:24px;:root[data-theme="dark"] &{color:#999b9c;}`
|
|
6817
7482
|
]);
|
|
6818
|
-
var ContactList =
|
|
7483
|
+
var ContactList = styled14.ol.withConfig({
|
|
6819
7484
|
componentId: "sc-35e42561-8"
|
|
6820
7485
|
})([
|
|
6821
7486
|
`margin:4px 0 0;padding-left:24px;li{margin-bottom:12px;padding-left:4px;color:#666563;font-size:14px;font-weight:500;line-height:24px;}strong,a{color:#000;font-weight:700;}a{text-decoration:underline;text-decoration-color:`,
|
|
6822
7487
|
`;text-underline-offset:3px;}:root[data-theme="dark"] & li{color:#999b9c;}:root[data-theme="dark"] & strong,:root[data-theme="dark"] & a{color:#fafafa;}`
|
|
6823
7488
|
], accent);
|
|
6824
|
-
var Subsection2 =
|
|
7489
|
+
var Subsection2 = styled14.div.withConfig({
|
|
6825
7490
|
componentId: "sc-35e42561-9"
|
|
6826
7491
|
})([
|
|
6827
7492
|
`&:not(:last-child){margin-bottom:24px;}`
|
|
6828
7493
|
]);
|
|
6829
|
-
var StepTitle =
|
|
7494
|
+
var StepTitle = styled14.h3.withConfig({
|
|
6830
7495
|
componentId: "sc-35e42561-10"
|
|
6831
7496
|
})([
|
|
6832
7497
|
`display:flex;margin:0 0 8px;align-items:center;gap:10px;color:#333;font-size:20px;font-weight:700;line-height:28px;&::before{width:6px;height:20px;flex-shrink:0;border-radius:1px;background-color:`,
|
|
6833
7498
|
`;content:"";}:root[data-theme="dark"] &{color:#fafafa;}@media (max-width:768px){font-size:16px;line-height:24px;}`
|
|
6834
7499
|
], accent);
|
|
6835
|
-
var BulletList2 =
|
|
7500
|
+
var BulletList2 = styled14.ul.withConfig({
|
|
6836
7501
|
componentId: "sc-35e42561-11"
|
|
6837
7502
|
})([
|
|
6838
7503
|
`margin:4px 0 12px;padding-left:24px;li{margin-bottom:8px;color:#666563;font-size:14px;font-weight:500;line-height:24px;}li::marker{color:`,
|
|
@@ -6840,32 +7505,32 @@ var BulletList2 = styled13.ul.withConfig({
|
|
|
6840
7505
|
], accent);
|
|
6841
7506
|
|
|
6842
7507
|
// src/commodity-original/components/SupportRequestBlock/index.tsx
|
|
6843
|
-
import { jsx as
|
|
6844
|
-
import
|
|
7508
|
+
import { jsx as _jsx4, jsxs as _jsxs4 } from "react/jsx-runtime";
|
|
7509
|
+
import styled15 from "styled-components";
|
|
6845
7510
|
import { useTranslation as useTranslation7 } from "react-i18next";
|
|
6846
|
-
var SupportSection =
|
|
7511
|
+
var SupportSection = styled15.section.withConfig({
|
|
6847
7512
|
componentId: "sc-1a367884-0"
|
|
6848
7513
|
})([
|
|
6849
7514
|
`width:100%;padding:28px max(20px,calc((100vw - 1200px) / 2));background:#F9BB3A;@media (max-width:768px){padding:24px 20px;}`
|
|
6850
7515
|
]);
|
|
6851
|
-
var SupportTitle =
|
|
7516
|
+
var SupportTitle = styled15.h2.withConfig({
|
|
6852
7517
|
componentId: "sc-1a367884-1"
|
|
6853
7518
|
})([
|
|
6854
7519
|
`margin:0 0 16px;color:#000;font-size:24px;font-weight:700;line-height:32px;@media (max-width:768px){margin-bottom:20px;font-size:20px;line-height:28px;}`
|
|
6855
7520
|
]);
|
|
6856
|
-
var SupportForm =
|
|
7521
|
+
var SupportForm = styled15.form.withConfig({
|
|
6857
7522
|
componentId: "sc-1a367884-2"
|
|
6858
7523
|
})([
|
|
6859
7524
|
`display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto;gap:14px;align-items:end;label{display:flex;min-width:0;flex-direction:column;gap:8px;color:#000;font-size:14px;font-weight:500;line-height:20px;}input,.register-select-trigger{width:100%;height:44px;border:1px solid transparent;border-radius:6px;padding:0 14px;color:#05080f;background:#fff;outline:none;font:inherit;font-size:14px;line-height:20px;}input::placeholder,.register-select-trigger[data-placeholder]{color:#9ea3ad;opacity:1;}input:focus,.register-select-trigger:focus-visible{border-color:#f9bb3a;box-shadow:0 0 0 3px rgb(249 187 58 / 25%);}.register-select-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;text-align:left;}.register-select-icon{width:20px;height:20px;flex:0 0 20px;background:url("/landing-assets/register-dropdown.svg") center / 20px 20px no-repeat;transition:transform 160ms ease;}.register-select-trigger[data-state="open"] .register-select-icon{transform:rotate(180deg);}.support-submit{height:44px;min-height:44px;padding-block:0;}.register-select-trigger > span:first-child{min-width:0;flex:1 1 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}@media (max-width:1024px){grid-template-columns:repeat(2,minmax(0,1fr));.support-submit{width:100%;}}@media (max-width:560px){grid-template-columns:1fr;gap:16px;}`
|
|
6860
7525
|
]);
|
|
6861
|
-
var Required =
|
|
7526
|
+
var Required = styled15.span.withConfig({
|
|
6862
7527
|
componentId: "sc-1a367884-3"
|
|
6863
7528
|
})([
|
|
6864
7529
|
`color:#f25c66;`
|
|
6865
7530
|
]);
|
|
6866
7531
|
function SupportRequestBlock() {
|
|
6867
7532
|
const { t } = useTranslation7();
|
|
6868
|
-
const
|
|
7533
|
+
const categories = [
|
|
6869
7534
|
{
|
|
6870
7535
|
label: t("complaints.support.categories.account"),
|
|
6871
7536
|
value: "account-opening"
|
|
@@ -6883,28 +7548,28 @@ function SupportRequestBlock() {
|
|
|
6883
7548
|
value: "other"
|
|
6884
7549
|
}
|
|
6885
7550
|
];
|
|
6886
|
-
return /* @__PURE__ */
|
|
7551
|
+
return /* @__PURE__ */ _jsxs4(SupportSection, {
|
|
6887
7552
|
"aria-labelledby": "support-request-title",
|
|
6888
7553
|
children: [
|
|
6889
|
-
/* @__PURE__ */
|
|
7554
|
+
/* @__PURE__ */ _jsx4(SupportTitle, {
|
|
6890
7555
|
id: "support-request-title",
|
|
6891
7556
|
children: t("complaints.support.title")
|
|
6892
7557
|
}),
|
|
6893
|
-
/* @__PURE__ */
|
|
7558
|
+
/* @__PURE__ */ _jsxs4(SupportForm, {
|
|
6894
7559
|
onSubmit: (event) => event.preventDefault(),
|
|
6895
7560
|
children: [
|
|
6896
|
-
/* @__PURE__ */
|
|
7561
|
+
/* @__PURE__ */ _jsxs4("label", {
|
|
6897
7562
|
children: [
|
|
6898
|
-
/* @__PURE__ */
|
|
7563
|
+
/* @__PURE__ */ _jsxs4("span", {
|
|
6899
7564
|
children: [
|
|
6900
7565
|
t("landing.register.fields.name"),
|
|
6901
7566
|
" ",
|
|
6902
|
-
/* @__PURE__ */
|
|
7567
|
+
/* @__PURE__ */ _jsx4(Required, {
|
|
6903
7568
|
children: "*"
|
|
6904
7569
|
})
|
|
6905
7570
|
]
|
|
6906
7571
|
}),
|
|
6907
|
-
/* @__PURE__ */
|
|
7572
|
+
/* @__PURE__ */ _jsx4("input", {
|
|
6908
7573
|
autoComplete: "name",
|
|
6909
7574
|
name: "name",
|
|
6910
7575
|
placeholder: t("landing.register.namePlaceholder"),
|
|
@@ -6913,18 +7578,18 @@ function SupportRequestBlock() {
|
|
|
6913
7578
|
})
|
|
6914
7579
|
]
|
|
6915
7580
|
}),
|
|
6916
|
-
/* @__PURE__ */
|
|
7581
|
+
/* @__PURE__ */ _jsxs4("label", {
|
|
6917
7582
|
children: [
|
|
6918
|
-
/* @__PURE__ */
|
|
7583
|
+
/* @__PURE__ */ _jsxs4("span", {
|
|
6919
7584
|
children: [
|
|
6920
7585
|
t("landing.register.fields.phone"),
|
|
6921
7586
|
" ",
|
|
6922
|
-
/* @__PURE__ */
|
|
7587
|
+
/* @__PURE__ */ _jsx4(Required, {
|
|
6923
7588
|
children: "*"
|
|
6924
7589
|
})
|
|
6925
7590
|
]
|
|
6926
7591
|
}),
|
|
6927
|
-
/* @__PURE__ */
|
|
7592
|
+
/* @__PURE__ */ _jsx4("input", {
|
|
6928
7593
|
autoComplete: "tel",
|
|
6929
7594
|
name: "phone",
|
|
6930
7595
|
placeholder: t("landing.register.phonePlaceholder"),
|
|
@@ -6933,12 +7598,12 @@ function SupportRequestBlock() {
|
|
|
6933
7598
|
})
|
|
6934
7599
|
]
|
|
6935
7600
|
}),
|
|
6936
|
-
/* @__PURE__ */
|
|
7601
|
+
/* @__PURE__ */ _jsxs4("label", {
|
|
6937
7602
|
children: [
|
|
6938
|
-
/* @__PURE__ */
|
|
7603
|
+
/* @__PURE__ */ _jsx4("span", {
|
|
6939
7604
|
children: t("landing.register.fields.email")
|
|
6940
7605
|
}),
|
|
6941
|
-
/* @__PURE__ */
|
|
7606
|
+
/* @__PURE__ */ _jsx4("input", {
|
|
6942
7607
|
autoComplete: "email",
|
|
6943
7608
|
name: "email",
|
|
6944
7609
|
placeholder: t("landing.register.emailPlaceholder"),
|
|
@@ -6946,21 +7611,21 @@ function SupportRequestBlock() {
|
|
|
6946
7611
|
})
|
|
6947
7612
|
]
|
|
6948
7613
|
}),
|
|
6949
|
-
/* @__PURE__ */
|
|
7614
|
+
/* @__PURE__ */ _jsxs4("label", {
|
|
6950
7615
|
children: [
|
|
6951
|
-
/* @__PURE__ */
|
|
7616
|
+
/* @__PURE__ */ _jsx4("span", {
|
|
6952
7617
|
children: t("complaints.support.category")
|
|
6953
7618
|
}),
|
|
6954
|
-
/* @__PURE__ */
|
|
7619
|
+
/* @__PURE__ */ _jsx4(RegisterSelect, {
|
|
6955
7620
|
ariaLabel: t("complaints.support.category"),
|
|
6956
7621
|
defaultValue: "account-opening",
|
|
6957
7622
|
name: "support-category",
|
|
6958
|
-
options:
|
|
7623
|
+
options: categories,
|
|
6959
7624
|
placeholder: t("complaints.support.category")
|
|
6960
7625
|
})
|
|
6961
7626
|
]
|
|
6962
7627
|
}),
|
|
6963
|
-
/* @__PURE__ */
|
|
7628
|
+
/* @__PURE__ */ _jsx4(Button_default, {
|
|
6964
7629
|
className: "support-submit",
|
|
6965
7630
|
type: "submit",
|
|
6966
7631
|
size: "sm",
|
|
@@ -7051,73 +7716,73 @@ function ComplaintPolicyPage() {
|
|
|
7051
7716
|
}
|
|
7052
7717
|
|
|
7053
7718
|
// src/commodity-original/app/noti-mxv/NotiMxvContent.tsx
|
|
7054
|
-
import { useState as
|
|
7719
|
+
import { useState as useState8 } from "react";
|
|
7055
7720
|
import { useTranslation as useTranslation9 } from "react-i18next";
|
|
7056
7721
|
|
|
7057
7722
|
// src/commodity-original/components/BlogCard/style.ts
|
|
7058
7723
|
import Image5 from "next/image.js";
|
|
7059
7724
|
import Link4 from "next/link.js";
|
|
7060
|
-
import { css, styled as
|
|
7725
|
+
import { css, styled as styled16 } from "styled-components";
|
|
7061
7726
|
var blogCardSurface = css([
|
|
7062
|
-
`display:flex;position:relative;width:100%;overflow:
|
|
7063
|
-
`;box-shadow:4px 4px 10px rgb(0 0 0 / 4%);transition:transform 180ms ease,box-shadow 180ms ease;&:hover{transform:translateY(-2px);box-shadow:6px 8px 18px rgb(0 0 0 / 9%);img{transform:scale(1.035);}}&[data-orientation="vertical"]{
|
|
7727
|
+
`display:flex;position:relative;width:100%;overflow:visible;align-items:stretch;border-radius:8px;background:`,
|
|
7728
|
+
`;box-shadow:4px 4px 10px rgb(0 0 0 / 4%);transition:transform 180ms ease,box-shadow 180ms ease;&:hover{transform:translateY(-2px);box-shadow:6px 8px 18px rgb(0 0 0 / 9%);img{transform:scale(1.035);}}&[data-orientation="vertical"]{flex-direction:column;}&:focus-visible{outline:2px solid `,
|
|
7064
7729
|
`;outline-offset:3px;}@media (prefers-reduced-motion:reduce){transition:none;img{transition:none;}}`
|
|
7065
7730
|
], ({ theme }) => theme.colors.background.card, ({ theme }) => theme.colors.accent.primary);
|
|
7066
|
-
var BlogCardArticle =
|
|
7067
|
-
componentId: "sc-
|
|
7731
|
+
var BlogCardArticle = styled16.article.withConfig({
|
|
7732
|
+
componentId: "sc-afe5d65c-0"
|
|
7068
7733
|
})([
|
|
7069
7734
|
``,
|
|
7070
7735
|
``
|
|
7071
7736
|
], blogCardSurface);
|
|
7072
|
-
var BlogCardLink =
|
|
7073
|
-
componentId: "sc-
|
|
7737
|
+
var BlogCardLink = styled16(Link4).withConfig({
|
|
7738
|
+
componentId: "sc-afe5d65c-1"
|
|
7074
7739
|
})([
|
|
7075
7740
|
``,
|
|
7076
7741
|
` color:inherit;text-decoration:none;`
|
|
7077
7742
|
], blogCardSurface);
|
|
7078
|
-
var BlogCardImagePanel =
|
|
7079
|
-
componentId: "sc-
|
|
7743
|
+
var BlogCardImagePanel = styled16.div.withConfig({
|
|
7744
|
+
componentId: "sc-afe5d65c-2"
|
|
7080
7745
|
})([
|
|
7081
7746
|
`position:relative;width:288px;height:162px;flex:0 0 auto;overflow:hidden;border:1px solid `,
|
|
7082
7747
|
`;border-radius:8px 0 0 8px;&[data-size="md"]{width:224px;height:126px;}&[data-size="sm"]{width:160px;height:90px;}&[data-orientation="vertical"]{width:100%;height:auto;aspect-ratio:16 / 9;border-radius:8px 8px 0 0;}@media (max-width:767px){&:not([data-orientation="vertical"]){width:160px;height:90px;}}`
|
|
7083
7748
|
], ({ theme }) => theme.colors.border.line);
|
|
7084
|
-
var BlogCardImage =
|
|
7085
|
-
componentId: "sc-
|
|
7749
|
+
var BlogCardImage = styled16(Image5).withConfig({
|
|
7750
|
+
componentId: "sc-afe5d65c-3"
|
|
7086
7751
|
})([
|
|
7087
7752
|
`object-fit:cover;pointer-events:none;transition:transform 240ms ease;`
|
|
7088
7753
|
]);
|
|
7089
|
-
var BlogCardContent =
|
|
7090
|
-
componentId: "sc-
|
|
7754
|
+
var BlogCardContent = styled16.div.withConfig({
|
|
7755
|
+
componentId: "sc-afe5d65c-4"
|
|
7091
7756
|
})([
|
|
7092
7757
|
`display:flex;min-width:0;flex:1 1 0;flex-direction:column;gap:4px;justify-content:start;padding:16px 24px;border-radius:0 8px 8px 0;background:`,
|
|
7093
7758
|
`;&[data-size="md"]{padding:14px 20px !important;}&[data-size="sm"]{padding:12px 16px !important;}`,
|
|
7094
7759
|
`[data-orientation="vertical"] &,`,
|
|
7095
7760
|
`[data-orientation="vertical"] &{padding:16px 24px 24px;border-radius:0 0 8px 8px;}`
|
|
7096
7761
|
], ({ theme }) => theme.colors.background.card, BlogCardArticle, BlogCardLink);
|
|
7097
|
-
var BlogCardBadge =
|
|
7098
|
-
componentId: "sc-
|
|
7762
|
+
var BlogCardBadge = styled16.span.withConfig({
|
|
7763
|
+
componentId: "sc-afe5d65c-5"
|
|
7099
7764
|
})([
|
|
7100
7765
|
`position:absolute;z-index:1;top:-12px;left:0;display:inline-flex;isolation:isolate;padding:8px 24px;align-items:center;color:`,
|
|
7101
7766
|
`;font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:14px;font-weight:600;line-height:18px;white-space:nowrap;&[data-size="sm"]{padding:8px 24px;font-size:12px;line-height:16px;}&::before{position:absolute;z-index:-1;top:0;left:-16px;right:-7px;bottom:-8px;background:`,
|
|
7102
7767
|
`;content:"";filter:drop-shadow(4px 4px 2px rgb(0 0 0 / 20%));mask:url("/icons/blog-card-ribbon.svg") left top / 100% 100% no-repeat;-webkit-mask:url("/icons/blog-card-ribbon.svg") left top / 100% 100% no-repeat;}&::after{position:absolute;bottom:-16px;left:-16px;width:16px;height:16px;background:`,
|
|
7103
7768
|
`;content:"";mask:url("/icons/blog-card-ribbon-tail.svg") center / contain no-repeat;-webkit-mask:url("/icons/blog-card-ribbon-tail.svg") center / contain no-repeat;}&[data-size="sm"]::before{left:-8px;}&[data-size="sm"]::after{bottom:-8px;left:-8px;width:8px;height:8px;}`
|
|
7104
7769
|
], ({ theme }) => theme.colors.accent.foreground, ({ theme }) => theme.colors.accent.primary, ({ theme }) => theme.colors.accent.deep);
|
|
7105
|
-
var BlogCardDate =
|
|
7106
|
-
componentId: "sc-
|
|
7770
|
+
var BlogCardDate = styled16.p.withConfig({
|
|
7771
|
+
componentId: "sc-afe5d65c-6"
|
|
7107
7772
|
})([
|
|
7108
7773
|
`width:100%;margin:0;overflow:hidden;color:`,
|
|
7109
7774
|
`;font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:14px;font-weight:500;line-height:18px;text-overflow:ellipsis;white-space:nowrap;`
|
|
7110
7775
|
], ({ theme }) => theme.colors.text.secondary);
|
|
7111
|
-
var BlogCardTitle =
|
|
7112
|
-
componentId: "sc-
|
|
7776
|
+
var BlogCardTitle = styled16.h3.withConfig({
|
|
7777
|
+
componentId: "sc-afe5d65c-7"
|
|
7113
7778
|
})([
|
|
7114
7779
|
`display:-webkit-box;width:100%;margin:0;overflow:hidden;color:`,
|
|
7115
7780
|
`;font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:20px;font-weight:700;line-height:30px;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2;`,
|
|
7116
7781
|
`[data-size="md"] &{font-size:18px;line-height:26px;}`,
|
|
7117
7782
|
`[data-size="sm"] &{font-size:16px;line-height:22px;}@media (max-width:767px){font-size:16px;line-height:22px;}`
|
|
7118
7783
|
], ({ theme }) => theme.colors.text.primary, BlogCardContent, BlogCardContent);
|
|
7119
|
-
var BlogCardDescription =
|
|
7120
|
-
componentId: "sc-
|
|
7784
|
+
var BlogCardDescription = styled16.p.withConfig({
|
|
7785
|
+
componentId: "sc-afe5d65c-8"
|
|
7121
7786
|
})([
|
|
7122
7787
|
`display:-webkit-box;width:100%;margin:0;overflow:hidden;color:`,
|
|
7123
7788
|
`;font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:16px;font-weight:500;line-height:22px;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2;`,
|
|
@@ -7196,8 +7861,8 @@ function BlogCard({
|
|
|
7196
7861
|
}
|
|
7197
7862
|
|
|
7198
7863
|
// src/commodity-original/components/InformationHeroSection/style.ts
|
|
7199
|
-
import
|
|
7200
|
-
var InformationHeroRoot =
|
|
7864
|
+
import styled17 from "styled-components";
|
|
7865
|
+
var InformationHeroRoot = styled17.section.withConfig({
|
|
7201
7866
|
componentId: "sc-fa02d513-0"
|
|
7202
7867
|
})([
|
|
7203
7868
|
`position:relative;display:flex;min-height:232px;overflow:hidden;padding:80px 24px;align-items:center;justify-content:center;background:linear-gradient( 178.45deg,`,
|
|
@@ -7205,23 +7870,23 @@ var InformationHeroRoot = styled16.section.withConfig({
|
|
|
7205
7870
|
` 17.7%,`,
|
|
7206
7871
|
` 74.77% );@media (max-width:767px){min-height:120px;padding:40px 16px;}`
|
|
7207
7872
|
], ({ theme }) => theme.colors.informationHero.start, ({ theme }) => theme.colors.informationHero.middle, ({ theme }) => theme.colors.accent.primary);
|
|
7208
|
-
var InformationHeroBackdrop =
|
|
7873
|
+
var InformationHeroBackdrop = styled17.div.withConfig({
|
|
7209
7874
|
componentId: "sc-fa02d513-1"
|
|
7210
7875
|
})([
|
|
7211
7876
|
`position:absolute;inset:0;overflow:hidden;pointer-events:none;background:var( --wikex-information-hero-background,url("/sections/information-hero/back-desktop.png") ) center / cover no-repeat;@media (max-width:767px){background:var( --wikex-information-hero-mobile-background,url("/sections/information-hero/back-mobile.png") ) center / cover no-repeat;}`
|
|
7212
7877
|
]);
|
|
7213
|
-
var InformationHeroContent =
|
|
7878
|
+
var InformationHeroContent = styled17.div.withConfig({
|
|
7214
7879
|
componentId: "sc-fa02d513-2"
|
|
7215
7880
|
})([
|
|
7216
7881
|
`position:relative;display:flex;width:min(1200px,100%);gap:40px;align-items:center;@media (max-width:767px){flex-direction:column;gap:32px;}`
|
|
7217
7882
|
]);
|
|
7218
|
-
var InformationHeroTitle =
|
|
7883
|
+
var InformationHeroTitle = styled17.h1.withConfig({
|
|
7219
7884
|
componentId: "sc-fa02d513-3"
|
|
7220
7885
|
})([
|
|
7221
7886
|
`width:708px;max-width:100%;margin:0;color:`,
|
|
7222
7887
|
`;font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:54px;font-weight:700;line-height:72px;:root[data-theme="dark"] &{color:#1c1c1e;}@media (max-width:767px){font-size:32px;line-height:40px;}`
|
|
7223
7888
|
], ({ theme }) => theme.colors.text.primary);
|
|
7224
|
-
var InformationHeroIllustration =
|
|
7889
|
+
var InformationHeroIllustration = styled17.div.withConfig({
|
|
7225
7890
|
componentId: "sc-fa02d513-4"
|
|
7226
7891
|
})([
|
|
7227
7892
|
`display:flex;min-width:0;min-height:72px;flex:1 0 0;padding:10px;align-items:center;justify-content:center;color:`,
|
|
@@ -7266,16 +7931,16 @@ function InformationHeroSection({
|
|
|
7266
7931
|
}
|
|
7267
7932
|
|
|
7268
7933
|
// src/commodity-original/app/noti-mxv/style.ts
|
|
7269
|
-
import
|
|
7934
|
+
import styled19 from "styled-components";
|
|
7270
7935
|
|
|
7271
7936
|
// src/commodity-original/components/DateRangePicker/index.tsx
|
|
7272
|
-
import { useEffect as useEffect6, useMemo as
|
|
7937
|
+
import { useEffect as useEffect6, useMemo as useMemo3, useRef as useRef3, useState as useState7 } from "react";
|
|
7273
7938
|
import { useTranslation as useTranslation8 } from "react-i18next";
|
|
7274
|
-
import { Dialog as
|
|
7939
|
+
import { Dialog as Dialog4 } from "radix-ui";
|
|
7275
7940
|
|
|
7276
7941
|
// src/commodity-original/components/DateRangePicker/style.ts
|
|
7277
|
-
import
|
|
7278
|
-
import { Dialog as
|
|
7942
|
+
import styled18, { keyframes as keyframes4 } from "styled-components";
|
|
7943
|
+
import { Dialog as Dialog3 } from "radix-ui";
|
|
7279
7944
|
var drawerOverlayIn = keyframes4([
|
|
7280
7945
|
`from{opacity:0;}to{opacity:1;}`
|
|
7281
7946
|
]);
|
|
@@ -7288,23 +7953,23 @@ var drawerSlideIn = keyframes4([
|
|
|
7288
7953
|
var drawerSlideOut = keyframes4([
|
|
7289
7954
|
`from{transform:translateY(0);}to{transform:translateY(100%);}`
|
|
7290
7955
|
]);
|
|
7291
|
-
var DateRangeRoot =
|
|
7956
|
+
var DateRangeRoot = styled18.div.withConfig({
|
|
7292
7957
|
componentId: "sc-3ac622db-0"
|
|
7293
7958
|
})([
|
|
7294
7959
|
`position:relative;display:flex;width:100%;min-width:0;min-height:40px;gap:8px;padding:8px 8px 8px 12px;align-items:center;border-radius:6px;background:`,
|
|
7295
7960
|
`;&[data-size="sm"]{min-height:36px;}`
|
|
7296
7961
|
], ({ theme }) => theme.colors.background.input);
|
|
7297
|
-
var DateFieldGroup =
|
|
7962
|
+
var DateFieldGroup = styled18.span.withConfig({
|
|
7298
7963
|
componentId: "sc-3ac622db-1"
|
|
7299
7964
|
})([
|
|
7300
7965
|
`position:relative;display:block;min-width:0;flex:1 1 0;`
|
|
7301
7966
|
]);
|
|
7302
|
-
var DateField =
|
|
7967
|
+
var DateField = styled18.button.withConfig({
|
|
7303
7968
|
componentId: "sc-3ac622db-2"
|
|
7304
7969
|
})([
|
|
7305
7970
|
`display:block;width:100%;min-width:0;padding:0;border:0;background:transparent;cursor:pointer;text-align:left;&:disabled{cursor:not-allowed;}`
|
|
7306
7971
|
]);
|
|
7307
|
-
var DateFieldValue =
|
|
7972
|
+
var DateFieldValue = styled18.span.withConfig({
|
|
7308
7973
|
componentId: "sc-3ac622db-3"
|
|
7309
7974
|
})([
|
|
7310
7975
|
`display:block;overflow:hidden;color:`,
|
|
@@ -7313,48 +7978,48 @@ var DateFieldValue = styled17.span.withConfig({
|
|
|
7313
7978
|
`:disabled &{color:`,
|
|
7314
7979
|
`;}`
|
|
7315
7980
|
], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.text.placeholder, DateField, ({ theme }) => theme.colors.text.secondary);
|
|
7316
|
-
var DateFieldInput =
|
|
7981
|
+
var DateFieldInput = styled18.input.withConfig({
|
|
7317
7982
|
componentId: "sc-3ac622db-4"
|
|
7318
7983
|
})([
|
|
7319
7984
|
`position:absolute;inset:0;width:100%;height:1px;border:0;pointer-events:none;opacity:0;appearance:none;&:disabled{cursor:not-allowed;}`
|
|
7320
7985
|
]);
|
|
7321
|
-
var RangeArrow =
|
|
7986
|
+
var RangeArrow = styled18.span.withConfig({
|
|
7322
7987
|
componentId: "sc-3ac622db-5"
|
|
7323
7988
|
})([
|
|
7324
7989
|
`display:inline-flex;width:16px;height:16px;flex:0 0 16px;align-items:center;justify-content:center;color:`,
|
|
7325
7990
|
`;`
|
|
7326
7991
|
], ({ theme }) => theme.colors.text.secondary);
|
|
7327
|
-
var DatePickerIcon =
|
|
7992
|
+
var DatePickerIcon = styled18.span.withConfig({
|
|
7328
7993
|
componentId: "sc-3ac622db-6"
|
|
7329
7994
|
})([
|
|
7330
7995
|
`display:block;width:16px;height:16px;background:currentColor;mask-repeat:no-repeat;mask-position:center;mask-size:contain;`
|
|
7331
7996
|
]);
|
|
7332
|
-
var RangeArrowIcon =
|
|
7997
|
+
var RangeArrowIcon = styled18(DatePickerIcon).withConfig({
|
|
7333
7998
|
componentId: "sc-3ac622db-7"
|
|
7334
7999
|
})([
|
|
7335
8000
|
`mask-image:url("/icons/date-range-arrow.svg");`
|
|
7336
8001
|
]);
|
|
7337
|
-
var CalendarIcon =
|
|
8002
|
+
var CalendarIcon = styled18.button.withConfig({
|
|
7338
8003
|
componentId: "sc-3ac622db-8"
|
|
7339
8004
|
})([
|
|
7340
8005
|
`display:block;width:20px;height:20px;flex:0 0 20px;padding:0;border:0;color:`,
|
|
7341
8006
|
`;background:currentColor;cursor:pointer;mask:url("/icons/date-range-calendar.svg") center / contain no-repeat;-webkit-mask:url("/icons/date-range-calendar.svg") center / contain no-repeat;`
|
|
7342
8007
|
], ({ theme }) => theme.colors.text.secondary);
|
|
7343
|
-
var CalendarDialog =
|
|
8008
|
+
var CalendarDialog = styled18.div.withConfig({
|
|
7344
8009
|
componentId: "sc-3ac622db-9"
|
|
7345
8010
|
})([
|
|
7346
8011
|
`position:absolute;z-index:20;top:calc(100% + 8px);right:0;width:100%;box-sizing:border-box;overflow:hidden;border:1px solid `,
|
|
7347
8012
|
`;border-radius:12px;background:`,
|
|
7348
8013
|
`;box-shadow:0 10px 15px -3px rgb(0 0 0 / 10%),0 4px 6px -4px rgb(0 0 0 / 10%);`
|
|
7349
8014
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.canvas);
|
|
7350
|
-
var CalendarDrawerOverlay =
|
|
8015
|
+
var CalendarDrawerOverlay = styled18(Dialog3.Overlay).withConfig({
|
|
7351
8016
|
componentId: "sc-3ac622db-10"
|
|
7352
8017
|
})([
|
|
7353
8018
|
`position:fixed;z-index:200;inset:0;background:rgb(0 0 0 / 48%);&[data-state="open"]{animation:`,
|
|
7354
8019
|
` 180ms ease-out;}&[data-state="closed"]{animation:`,
|
|
7355
8020
|
` 140ms ease-in;}@media (prefers-reduced-motion:reduce){animation:none;}`
|
|
7356
8021
|
], drawerOverlayIn, drawerOverlayOut);
|
|
7357
|
-
var CalendarDrawerContent =
|
|
8022
|
+
var CalendarDrawerContent = styled18(Dialog3.Content).withConfig({
|
|
7358
8023
|
componentId: "sc-3ac622db-11"
|
|
7359
8024
|
})([
|
|
7360
8025
|
`position:fixed;z-index:201;right:0;bottom:0;left:0;max-height:calc(100dvh - 16px);overflow-y:auto;border-radius:16px 16px 0 0;background:`,
|
|
@@ -7362,41 +8027,41 @@ var CalendarDrawerContent = styled17(Dialog2.Content).withConfig({
|
|
|
7362
8027
|
` 240ms cubic-bezier(0.22,1,0.36,1);}&[data-state="closed"]{animation:`,
|
|
7363
8028
|
` 180ms ease-in;}@media (prefers-reduced-motion:reduce){animation:none;}`
|
|
7364
8029
|
], ({ theme }) => theme.colors.background.canvas, drawerSlideIn, drawerSlideOut);
|
|
7365
|
-
var CalendarDialogBody =
|
|
8030
|
+
var CalendarDialogBody = styled18.div.withConfig({
|
|
7366
8031
|
componentId: "sc-3ac622db-12"
|
|
7367
8032
|
})([
|
|
7368
8033
|
`padding:16px 16px 8px;`
|
|
7369
8034
|
]);
|
|
7370
|
-
var CalendarDialogHeader =
|
|
8035
|
+
var CalendarDialogHeader = styled18.div.withConfig({
|
|
7371
8036
|
componentId: "sc-3ac622db-13"
|
|
7372
8037
|
})([
|
|
7373
8038
|
`display:flex;align-items:center;justify-content:space-between;padding:0 4px;`
|
|
7374
8039
|
]);
|
|
7375
|
-
var CalendarDialogMonth =
|
|
8040
|
+
var CalendarDialogMonth = styled18.p.withConfig({
|
|
7376
8041
|
componentId: "sc-3ac622db-14"
|
|
7377
8042
|
})([
|
|
7378
8043
|
`margin:0;color:`,
|
|
7379
8044
|
`;font-family:var(--font-inter),Arial,sans-serif;font-size:14px;font-weight:600;line-height:20px;text-transform:capitalize;`
|
|
7380
8045
|
], ({ theme }) => theme.colors.text.primary);
|
|
7381
|
-
var CalendarNavigationButton =
|
|
8046
|
+
var CalendarNavigationButton = styled18.button.withConfig({
|
|
7382
8047
|
componentId: "sc-3ac622db-15"
|
|
7383
8048
|
})([
|
|
7384
8049
|
`width:32px;height:32px;border:0;border-radius:8px;background:transparent;cursor:pointer;&::before{display:block;width:16px;height:16px;margin:auto;background:`,
|
|
7385
8050
|
`;content:"";mask:url("/icons/chevron-right.svg") center / contain no-repeat;-webkit-mask:url("/icons/chevron-right.svg") center / contain no-repeat;}&[data-direction="previous"]::before{transform:rotate(180deg);}&:focus-visible{outline:2px solid `,
|
|
7386
8051
|
`;outline-offset:2px;}`
|
|
7387
8052
|
], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.datePicker.selected);
|
|
7388
|
-
var CalendarWeekdays =
|
|
8053
|
+
var CalendarWeekdays = styled18.div.withConfig({
|
|
7389
8054
|
componentId: "sc-3ac622db-16"
|
|
7390
8055
|
})([
|
|
7391
8056
|
`display:grid;grid-template-columns:repeat(7,1fr);padding-top:12px;span{display:grid;height:32px;place-items:center;color:`,
|
|
7392
8057
|
`;font-family:ui-monospace,monospace;font-size:12px;line-height:16px;}`
|
|
7393
8058
|
], ({ theme }) => theme.colors.text.placeholder);
|
|
7394
|
-
var DaysGrid =
|
|
8059
|
+
var DaysGrid = styled18.div.withConfig({
|
|
7395
8060
|
componentId: "sc-3ac622db-17"
|
|
7396
8061
|
})([
|
|
7397
8062
|
`display:grid;grid-template-columns:repeat(7,minmax(0,1fr));`
|
|
7398
8063
|
]);
|
|
7399
|
-
var DayCell =
|
|
8064
|
+
var DayCell = styled18.div.withConfig({
|
|
7400
8065
|
componentId: "sc-3ac622db-18"
|
|
7401
8066
|
})([
|
|
7402
8067
|
`display:grid;min-width:0;height:36px;place-items:center;&[data-in-range]{background:`,
|
|
@@ -7404,7 +8069,7 @@ var DayCell = styled17.div.withConfig({
|
|
|
7404
8069
|
` 50% );}&[data-range-end]{background:linear-gradient( to left,transparent 50%,`,
|
|
7405
8070
|
` 50% );}`
|
|
7406
8071
|
], ({ theme }) => theme.colors.datePicker.range, ({ theme }) => theme.colors.datePicker.range, ({ theme }) => theme.colors.datePicker.range);
|
|
7407
|
-
var DayButton =
|
|
8072
|
+
var DayButton = styled18.button.withConfig({
|
|
7408
8073
|
componentId: "sc-3ac622db-19"
|
|
7409
8074
|
})([
|
|
7410
8075
|
`width:min(35px,100%);height:36px;border:0;border-radius:999px;color:`,
|
|
@@ -7416,42 +8081,42 @@ var DayButton = styled17.button.withConfig({
|
|
|
7416
8081
|
`;}&:focus-visible{outline:2px solid `,
|
|
7417
8082
|
`;outline-offset:2px;}`
|
|
7418
8083
|
], ({ theme }) => theme.colors.text.placeholder, ({ theme }) => theme.colors.text.primary, DayCell, ({ theme }) => theme.colors.datePicker.rangeForeground, ({ theme }) => theme.colors.action.primaryForeground, ({ theme }) => theme.colors.datePicker.selected, ({ theme }) => theme.colors.datePicker.selected);
|
|
7419
|
-
var CalendarDialogSummary =
|
|
8084
|
+
var CalendarDialogSummary = styled18.div.withConfig({
|
|
7420
8085
|
componentId: "sc-3ac622db-20"
|
|
7421
8086
|
})([
|
|
7422
8087
|
`display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;padding:12px 16px;align-items:center;border-top:1px solid `,
|
|
7423
8088
|
`;`
|
|
7424
8089
|
], ({ theme }) => theme.colors.background.input);
|
|
7425
|
-
var RangeSummaryDate =
|
|
8090
|
+
var RangeSummaryDate = styled18.div.withConfig({
|
|
7426
8091
|
componentId: "sc-3ac622db-21"
|
|
7427
8092
|
})([
|
|
7428
8093
|
`display:grid;min-width:0;gap:2px;&[data-align="end"]{grid-column:2;grid-row:1;text-align:right;}`
|
|
7429
8094
|
]);
|
|
7430
|
-
var RangeSummaryLabel =
|
|
8095
|
+
var RangeSummaryLabel = styled18.span.withConfig({
|
|
7431
8096
|
componentId: "sc-3ac622db-22"
|
|
7432
8097
|
})([
|
|
7433
8098
|
`color:`,
|
|
7434
8099
|
`;font-family:var(--font-inter),Arial,sans-serif;font-size:10px;font-weight:500;letter-spacing:0.025em;line-height:15px;text-transform:uppercase;`
|
|
7435
8100
|
], ({ theme }) => theme.colors.text.placeholder);
|
|
7436
|
-
var RangeSummaryValue =
|
|
8101
|
+
var RangeSummaryValue = styled18.span.withConfig({
|
|
7437
8102
|
componentId: "sc-3ac622db-23"
|
|
7438
8103
|
})([
|
|
7439
8104
|
`overflow:hidden;color:`,
|
|
7440
8105
|
`;font-family:ui-monospace,monospace;font-size:12px;line-height:20px;text-overflow:ellipsis;white-space:nowrap;`
|
|
7441
8106
|
], ({ theme }) => theme.colors.text.primary);
|
|
7442
|
-
var RangeSummaryPeriod =
|
|
8107
|
+
var RangeSummaryPeriod = styled18.div.withConfig({
|
|
7443
8108
|
componentId: "sc-3ac622db-24"
|
|
7444
8109
|
})([
|
|
7445
8110
|
`display:flex;grid-column:1 / -1;grid-row:2;gap:6px;align-items:center;justify-content:center;color:`,
|
|
7446
8111
|
`;font-family:var(--font-inter),Arial,sans-serif;font-size:10px;line-height:15px;white-space:nowrap;`
|
|
7447
8112
|
], ({ theme }) => theme.colors.text.placeholder);
|
|
7448
|
-
var RangeSummarySeparator =
|
|
8113
|
+
var RangeSummarySeparator = styled18.span.withConfig({
|
|
7449
8114
|
componentId: "sc-3ac622db-25"
|
|
7450
8115
|
})([
|
|
7451
8116
|
`width:20px;height:1px;background:`,
|
|
7452
8117
|
`;`
|
|
7453
8118
|
], ({ theme }) => theme.colors.border.subtle);
|
|
7454
|
-
var CalendarDialogActions =
|
|
8119
|
+
var CalendarDialogActions = styled18.div.withConfig({
|
|
7455
8120
|
componentId: "sc-3ac622db-26"
|
|
7456
8121
|
})([
|
|
7457
8122
|
`display:flex;gap:8px;padding:12px 16px;justify-content:flex-end;border-top:1px solid `,
|
|
@@ -7508,11 +8173,11 @@ function DateRangePicker({
|
|
|
7508
8173
|
}) {
|
|
7509
8174
|
const { i18n, t } = useTranslation8();
|
|
7510
8175
|
const { isMobile } = useResponsive();
|
|
7511
|
-
const rootRef =
|
|
7512
|
-
const [open, setOpen] =
|
|
7513
|
-
const [activeField, setActiveField] =
|
|
7514
|
-
const [draft, setDraft] =
|
|
7515
|
-
const [month, setMonth] =
|
|
8176
|
+
const rootRef = useRef3(null);
|
|
8177
|
+
const [open, setOpen] = useState7(false);
|
|
8178
|
+
const [activeField, setActiveField] = useState7("from");
|
|
8179
|
+
const [draft, setDraft] = useState7(value4);
|
|
8180
|
+
const [month, setMonth] = useState7(() => getInitialMonth(value4));
|
|
7516
8181
|
const locale = i18n.resolvedLanguage?.startsWith("en") ? "en-US" : "vi-VN";
|
|
7517
8182
|
const format = (date) => date ? new Intl.DateTimeFormat(locale, {
|
|
7518
8183
|
day: "2-digit",
|
|
@@ -7521,7 +8186,7 @@ function DateRangePicker({
|
|
|
7521
8186
|
}).format(toDate(date)) : "";
|
|
7522
8187
|
const from = fromLabel ?? t("dateRangePicker.fromLabel");
|
|
7523
8188
|
const to = toLabel ?? t("dateRangePicker.toLabel");
|
|
7524
|
-
const calendarDays =
|
|
8189
|
+
const calendarDays = useMemo3(() => getMonthDays(month), [month]);
|
|
7525
8190
|
const duration = getDays(draft);
|
|
7526
8191
|
const weekdays = [
|
|
7527
8192
|
"monday",
|
|
@@ -7588,7 +8253,7 @@ function DateRangePicker({
|
|
|
7588
8253
|
type: "button"
|
|
7589
8254
|
}
|
|
7590
8255
|
),
|
|
7591
|
-
isMobile ? /* @__PURE__ */ jsx21(
|
|
8256
|
+
isMobile ? /* @__PURE__ */ jsx21(Dialog4.Title, { asChild: true, children: /* @__PURE__ */ jsx21(CalendarDialogMonth, { children: new Intl.DateTimeFormat(locale, {
|
|
7592
8257
|
month: "long",
|
|
7593
8258
|
year: "numeric"
|
|
7594
8259
|
}).format(month) }) }) : /* @__PURE__ */ jsx21(CalendarDialogMonth, { children: new Intl.DateTimeFormat(locale, {
|
|
@@ -7723,14 +8388,14 @@ function DateRangePicker({
|
|
|
7723
8388
|
}
|
|
7724
8389
|
),
|
|
7725
8390
|
open && isMobile ? /* @__PURE__ */ jsx21(
|
|
7726
|
-
|
|
8391
|
+
Dialog4.Root,
|
|
7727
8392
|
{
|
|
7728
8393
|
onOpenChange: (nextOpen) => {
|
|
7729
8394
|
if (!nextOpen) setDraft(value4);
|
|
7730
8395
|
setOpen(nextOpen);
|
|
7731
8396
|
},
|
|
7732
8397
|
open,
|
|
7733
|
-
children: /* @__PURE__ */ jsxs17(
|
|
8398
|
+
children: /* @__PURE__ */ jsxs17(Dialog4.Portal, { children: [
|
|
7734
8399
|
/* @__PURE__ */ jsx21(CalendarDrawerOverlay, {}),
|
|
7735
8400
|
/* @__PURE__ */ jsx21(CalendarDrawerContent, { "aria-describedby": void 0, children: calendar })
|
|
7736
8401
|
] })
|
|
@@ -7747,34 +8412,34 @@ function DateRangePicker({
|
|
|
7747
8412
|
}
|
|
7748
8413
|
|
|
7749
8414
|
// src/commodity-original/app/noti-mxv/style.ts
|
|
7750
|
-
var NotiMxvMain =
|
|
8415
|
+
var NotiMxvMain = styled19.main.withConfig({
|
|
7751
8416
|
componentId: "sc-d3ff19c5-0"
|
|
7752
8417
|
})([
|
|
7753
8418
|
`min-height:calc(100vh - var(--header-height));`
|
|
7754
8419
|
]);
|
|
7755
|
-
var FilterSection =
|
|
8420
|
+
var FilterSection = styled19.section.withConfig({
|
|
7756
8421
|
componentId: "sc-d3ff19c5-1"
|
|
7757
8422
|
})([
|
|
7758
8423
|
`padding:60px 24px 16px;background:`,
|
|
7759
8424
|
`;@media (max-width:767px){padding:30px 16px 16px;background:`,
|
|
7760
8425
|
`;}`
|
|
7761
8426
|
], ({ theme }) => theme.colors.background.canvas, ({ theme }) => theme.colors.background.warm);
|
|
7762
|
-
var FilterContent =
|
|
8427
|
+
var FilterContent = styled19.div.withConfig({
|
|
7763
8428
|
componentId: "sc-d3ff19c5-2"
|
|
7764
8429
|
})([
|
|
7765
8430
|
`display:flex;width:min(1200px,100%);gap:16px;margin:0 auto;align-items:center;@media (max-width:767px){flex-wrap:wrap;}`
|
|
7766
8431
|
]);
|
|
7767
|
-
var FilterSearch =
|
|
8432
|
+
var FilterSearch = styled19.div.withConfig({
|
|
7768
8433
|
componentId: "sc-d3ff19c5-3"
|
|
7769
8434
|
})([
|
|
7770
8435
|
`width:261px;flex:0 1 261px;@media (max-width:767px){width:100%;flex-basis:100%;}`
|
|
7771
8436
|
]);
|
|
7772
|
-
var FilterDateRangePicker =
|
|
8437
|
+
var FilterDateRangePicker = styled19(DateRangePicker).withConfig({
|
|
7773
8438
|
componentId: "sc-d3ff19c5-4"
|
|
7774
8439
|
})([
|
|
7775
8440
|
`width:262px;flex:0 1 262px;@media (max-width:767px){flex:1 1 220px;}`
|
|
7776
8441
|
]);
|
|
7777
|
-
var FilterResetButton =
|
|
8442
|
+
var FilterResetButton = styled19.button.withConfig({
|
|
7778
8443
|
componentId: "sc-d3ff19c5-5"
|
|
7779
8444
|
})([
|
|
7780
8445
|
`height:40px;padding:0 16px;border:1px solid `,
|
|
@@ -7785,49 +8450,49 @@ var FilterResetButton = styled18.button.withConfig({
|
|
|
7785
8450
|
`;}@media (max-width:767px){height:36px;font-size:12px;line-height:16px;background:`,
|
|
7786
8451
|
`;}`
|
|
7787
8452
|
], ({ theme }) => theme.colors.border.subtle, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.canvas, ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.background.warm);
|
|
7788
|
-
var SearchIcon =
|
|
8453
|
+
var SearchIcon = styled19.span.withConfig({
|
|
7789
8454
|
componentId: "sc-d3ff19c5-6"
|
|
7790
8455
|
})([
|
|
7791
8456
|
`display:block;width:16px;height:16px;background:currentColor;mask:url("/icons/search.svg") center / contain no-repeat;-webkit-mask:url("/icons/search.svg") center / contain no-repeat;`
|
|
7792
8457
|
]);
|
|
7793
|
-
var NotiContent =
|
|
8458
|
+
var NotiContent = styled19.div.withConfig({
|
|
7794
8459
|
componentId: "sc-d3ff19c5-7"
|
|
7795
8460
|
})([
|
|
7796
8461
|
`width:min(1248px,100%);margin:0 auto;padding:16px 16px 40px 16px;@media (max-width:767px){background:`,
|
|
7797
8462
|
`;}`
|
|
7798
8463
|
], ({ theme }) => theme.colors.background.warm);
|
|
7799
|
-
var NotiLayout =
|
|
8464
|
+
var NotiLayout = styled19.div.withConfig({
|
|
7800
8465
|
componentId: "sc-d3ff19c5-8"
|
|
7801
8466
|
})([
|
|
7802
8467
|
`display:grid;min-width:0;grid-template-columns:minmax(0,1fr) 373px;gap:40px;align-items:start;@media (max-width:1199px){grid-template-columns:minmax(0,1fr) 280px;gap:24px;}@media (max-width:768px){grid-template-columns:1fr;}`
|
|
7803
8468
|
]);
|
|
7804
|
-
var NotiMainColumn =
|
|
8469
|
+
var NotiMainColumn = styled19.section.withConfig({
|
|
7805
8470
|
componentId: "sc-d3ff19c5-9"
|
|
7806
8471
|
})([
|
|
7807
8472
|
`min-width:0;`
|
|
7808
8473
|
]);
|
|
7809
|
-
var NotiList =
|
|
8474
|
+
var NotiList = styled19.div.withConfig({
|
|
7810
8475
|
componentId: "sc-d3ff19c5-10"
|
|
7811
8476
|
})([
|
|
7812
8477
|
`display:flex;flex-direction:column;gap:24px;`
|
|
7813
8478
|
]);
|
|
7814
|
-
var NotiPagination =
|
|
8479
|
+
var NotiPagination = styled19.div.withConfig({
|
|
7815
8480
|
componentId: "sc-d3ff19c5-11"
|
|
7816
8481
|
})([
|
|
7817
8482
|
`margin-top:32px;`
|
|
7818
8483
|
]);
|
|
7819
|
-
var NotiSidebar =
|
|
8484
|
+
var NotiSidebar = styled19.aside.withConfig({
|
|
7820
8485
|
componentId: "sc-d3ff19c5-12"
|
|
7821
8486
|
})([
|
|
7822
8487
|
`display:flex;width:100%;min-width:0;flex-direction:column;gap:16px;position:sticky;top:calc(var(--header-height) + 24px);align-self:start;@media (max-width:768px){position:static;}`
|
|
7823
8488
|
]);
|
|
7824
|
-
var NotiSidebarHeading =
|
|
8489
|
+
var NotiSidebarHeading = styled19.h2.withConfig({
|
|
7825
8490
|
componentId: "sc-d3ff19c5-13"
|
|
7826
8491
|
})([
|
|
7827
8492
|
`margin:0;color:`,
|
|
7828
8493
|
`;font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:20px;font-weight:700;line-height:30px;@media (max-width:767px){font-size:18px;line-height:26px;}`
|
|
7829
8494
|
], ({ theme }) => theme.colors.text.primary);
|
|
7830
|
-
var NotiSidebarList =
|
|
8495
|
+
var NotiSidebarList = styled19.div.withConfig({
|
|
7831
8496
|
componentId: "sc-d3ff19c5-14"
|
|
7832
8497
|
})([
|
|
7833
8498
|
`display:flex;min-width:0;flex-direction:column;gap:16px;@media (max-width:768px){width:100%;box-sizing:border-box;padding:0 16px 4px 0;overflow-x:auto;flex-direction:row;overscroll-behavior-x:contain;scroll-padding-right:16px;scroll-snap-type:x mandatory;scrollbar-width:none;touch-action:pan-x;&::-webkit-scrollbar{display:none;}& > *{width:min(278px,calc(100% - 32px));max-width:278px;flex:0 0 min(278px,calc(100% - 32px));scroll-snap-align:start;}}`
|
|
@@ -7884,12 +8549,12 @@ function NotiMxvContent() {
|
|
|
7884
8549
|
const { isMobile } = useResponsive();
|
|
7885
8550
|
const { t } = useTranslation9();
|
|
7886
8551
|
const resolveImage = useCmsImageResolver();
|
|
7887
|
-
const [search, setSearch] =
|
|
7888
|
-
const [dateRange, setDateRange] =
|
|
8552
|
+
const [search, setSearch] = useState8("");
|
|
8553
|
+
const [dateRange, setDateRange] = useState8({
|
|
7889
8554
|
from: "",
|
|
7890
8555
|
to: ""
|
|
7891
8556
|
});
|
|
7892
|
-
const [page, setPage] =
|
|
8557
|
+
const [page, setPage] = useState8(1);
|
|
7893
8558
|
const pageCount = Math.ceil(notifications.length / notificationsPerPage);
|
|
7894
8559
|
const visibleNotifications = notifications.slice(
|
|
7895
8560
|
(page - 1) * notificationsPerPage,
|
|
@@ -7968,13 +8633,13 @@ function NotiMxvContent() {
|
|
|
7968
8633
|
}
|
|
7969
8634
|
|
|
7970
8635
|
// src/commodity-original/app/products/ProductsContent.tsx
|
|
7971
|
-
import { useState as
|
|
8636
|
+
import { useState as useState9 } from "react";
|
|
7972
8637
|
|
|
7973
8638
|
// src/commodity-original/components/Breadcrumb/index.tsx
|
|
7974
8639
|
import Link5 from "next/link.js";
|
|
7975
8640
|
|
|
7976
8641
|
// src/commodity-original/components/Breadcrumb/style.ts
|
|
7977
|
-
import
|
|
8642
|
+
import styled20 from "styled-components";
|
|
7978
8643
|
var breadcrumbText = `
|
|
7979
8644
|
font-family: var(--font-manrope), Arial, Helvetica, sans-serif;
|
|
7980
8645
|
font-size: 12px;
|
|
@@ -7986,22 +8651,22 @@ var breadcrumbText = `
|
|
|
7986
8651
|
line-height: 14px;
|
|
7987
8652
|
}
|
|
7988
8653
|
`;
|
|
7989
|
-
var BreadcrumbNav =
|
|
8654
|
+
var BreadcrumbNav = styled20.nav.withConfig({
|
|
7990
8655
|
componentId: "sc-b70a3795-0"
|
|
7991
8656
|
})([
|
|
7992
8657
|
`display:flex;max-width:100%;align-items:center;@media (max-width:767px){overflow-x:auto;scrollbar-width:none;&::-webkit-scrollbar{display:none;}}`
|
|
7993
8658
|
]);
|
|
7994
|
-
var BreadcrumbList =
|
|
8659
|
+
var BreadcrumbList = styled20.ol.withConfig({
|
|
7995
8660
|
componentId: "sc-b70a3795-1"
|
|
7996
8661
|
})([
|
|
7997
8662
|
`display:flex;margin:0;padding:0;align-items:center;gap:4px;list-style:none;`
|
|
7998
8663
|
]);
|
|
7999
|
-
var BreadcrumbItem =
|
|
8664
|
+
var BreadcrumbItem = styled20.li.withConfig({
|
|
8000
8665
|
componentId: "sc-b70a3795-2"
|
|
8001
8666
|
})([
|
|
8002
8667
|
`display:flex;align-items:center;gap:4px;`
|
|
8003
8668
|
]);
|
|
8004
|
-
var BreadcrumbLink =
|
|
8669
|
+
var BreadcrumbLink = styled20.a.withConfig({
|
|
8005
8670
|
componentId: "sc-b70a3795-3"
|
|
8006
8671
|
})([
|
|
8007
8672
|
``,
|
|
@@ -8009,14 +8674,14 @@ var BreadcrumbLink = styled19.a.withConfig({
|
|
|
8009
8674
|
`;&:hover,&:focus-visible{color:`,
|
|
8010
8675
|
`;}&:focus-visible{outline:2px solid #f9bb3a;outline-offset:2px;}`
|
|
8011
8676
|
], breadcrumbText, ({ theme }) => theme.colors.text.placeholder, ({ theme }) => theme.colors.text.primary);
|
|
8012
|
-
var BreadcrumbCurrent =
|
|
8677
|
+
var BreadcrumbCurrent = styled20.span.withConfig({
|
|
8013
8678
|
componentId: "sc-b70a3795-4"
|
|
8014
8679
|
})([
|
|
8015
8680
|
``,
|
|
8016
8681
|
` color:`,
|
|
8017
8682
|
`;`
|
|
8018
8683
|
], breadcrumbText, ({ theme }) => theme.colors.text.primary);
|
|
8019
|
-
var BreadcrumbSeparator =
|
|
8684
|
+
var BreadcrumbSeparator = styled20.span.withConfig({
|
|
8020
8685
|
componentId: "sc-b70a3795-5"
|
|
8021
8686
|
})([
|
|
8022
8687
|
`display:inline-flex;width:14px;height:14px;align-items:center;justify-content:center;color:`,
|
|
@@ -8149,58 +8814,58 @@ var faqCount = 8;
|
|
|
8149
8814
|
// src/commodity-original/components/ProductCard/style.ts
|
|
8150
8815
|
import Link6 from "next/link.js";
|
|
8151
8816
|
import Image6 from "next/image.js";
|
|
8152
|
-
import { css as css2, styled as
|
|
8817
|
+
import { css as css2, styled as styled21 } from "styled-components";
|
|
8153
8818
|
var cardSurface = css2([
|
|
8154
8819
|
`display:flex;width:100%;height:100%;max-width:329px;flex-direction:column;color:`,
|
|
8155
8820
|
`;transition:transform 160ms ease;&:hover{transform:translateY(-2px);}@media (max-width:599px){max-width:100%;}`
|
|
8156
8821
|
], ({ theme }) => theme.colors.text.primary);
|
|
8157
|
-
var ProductCardArticle =
|
|
8822
|
+
var ProductCardArticle = styled21.article.withConfig({
|
|
8158
8823
|
componentId: "sc-ec5663dd-0"
|
|
8159
8824
|
})([
|
|
8160
8825
|
``,
|
|
8161
8826
|
``
|
|
8162
8827
|
], cardSurface);
|
|
8163
|
-
var ProductCardLink =
|
|
8828
|
+
var ProductCardLink = styled21(Link6).withConfig({
|
|
8164
8829
|
componentId: "sc-ec5663dd-1"
|
|
8165
8830
|
})([
|
|
8166
8831
|
``,
|
|
8167
8832
|
` text-decoration:none;&:focus-visible{outline:2px solid `,
|
|
8168
8833
|
`;outline-offset:3px;}`
|
|
8169
8834
|
], cardSurface, ({ theme }) => theme.colors.accent.primary);
|
|
8170
|
-
var ProductCardImagePanel =
|
|
8835
|
+
var ProductCardImagePanel = styled21.div.withConfig({
|
|
8171
8836
|
componentId: "sc-ec5663dd-2"
|
|
8172
8837
|
})([
|
|
8173
8838
|
`position:relative;width:100%;aspect-ratio:1;border-radius:8px 8px 0 0;&::before{position:absolute;z-index:1;inset:41.2879% 0 0;border-radius:8px 8px 0 0;background:rgb(249 187 58 / 40%);box-shadow:-4px 4px 10px rgb(0 0 0 / 10%);content:"";}@media (max-width:599px){&::before{inset:43.2727% 0 -14.5833%;}}`
|
|
8174
8839
|
]);
|
|
8175
|
-
var ProductCardImage =
|
|
8840
|
+
var ProductCardImage = styled21(Image6).withConfig({
|
|
8176
8841
|
componentId: "sc-ec5663dd-3"
|
|
8177
8842
|
})([
|
|
8178
8843
|
`z-index:2;object-fit:cover;pointer-events:none;`
|
|
8179
8844
|
]);
|
|
8180
|
-
var ProductCardCopy =
|
|
8845
|
+
var ProductCardCopy = styled21.div.withConfig({
|
|
8181
8846
|
componentId: "sc-ec5663dd-4"
|
|
8182
8847
|
})([
|
|
8183
8848
|
`display:flex;width:100%;flex:1 0 auto;flex-direction:column;gap:4px;padding:12px 16px 24px;border-radius:0 0 8px 8px;background:`,
|
|
8184
8849
|
`;box-shadow:-4px 4px 10px rgb(0 0 0 / 10%);@media (max-width:599px){padding:12px 16px 24px;align-items:center;z-index:2;}`
|
|
8185
8850
|
], ({ theme }) => theme.colors.background.card);
|
|
8186
|
-
var ProductCardTitleRow =
|
|
8851
|
+
var ProductCardTitleRow = styled21.div.withConfig({
|
|
8187
8852
|
componentId: "sc-ec5663dd-5"
|
|
8188
8853
|
})([
|
|
8189
8854
|
`display:flex;width:100%;align-items:center;gap:8px;`
|
|
8190
8855
|
]);
|
|
8191
|
-
var ProductCardTitle =
|
|
8856
|
+
var ProductCardTitle = styled21.h3.withConfig({
|
|
8192
8857
|
componentId: "sc-ec5663dd-6"
|
|
8193
8858
|
})([
|
|
8194
8859
|
`flex:1 1 0;min-width:0;margin:0;overflow:hidden;color:`,
|
|
8195
8860
|
`;font-size:20px;font-weight:700;line-height:30px;text-overflow:ellipsis;white-space:nowrap;@media (max-width:599px){font-size:14px;line-height:18px;}`
|
|
8196
8861
|
], ({ theme }) => theme.colors.text.primary);
|
|
8197
|
-
var ProductCardArrow =
|
|
8862
|
+
var ProductCardArrow = styled21.span.withConfig({
|
|
8198
8863
|
componentId: "sc-ec5663dd-7"
|
|
8199
8864
|
})([
|
|
8200
8865
|
`width:24px;height:24px;flex:0 0 24px;color:`,
|
|
8201
8866
|
`;background:currentColor;mask:url("/icons/product-card-arrow.svg") center / 16px 16px no-repeat;-webkit-mask:url("/icons/product-card-arrow.svg") center / 16px 16px no-repeat;@media (max-width:599px){width:18px;height:18px;flex-basis:18px;mask-image:url("/icons/related-products-arrow.svg");mask-size:contain;-webkit-mask-image:url("/icons/related-products-arrow.svg");-webkit-mask-size:contain;}`
|
|
8202
8867
|
], ({ theme }) => theme.colors.accent.primary);
|
|
8203
|
-
var ProductCardDescription =
|
|
8868
|
+
var ProductCardDescription = styled21.p.withConfig({
|
|
8204
8869
|
componentId: "sc-ec5663dd-8"
|
|
8205
8870
|
})([
|
|
8206
8871
|
`display:-webkit-box;width:100%;overflow:hidden;margin:0;color:`,
|
|
@@ -8261,34 +8926,34 @@ function ProductCard({
|
|
|
8261
8926
|
import { useTranslation as useTranslation10 } from "react-i18next";
|
|
8262
8927
|
|
|
8263
8928
|
// src/commodity-original/app/products/style.ts
|
|
8264
|
-
import
|
|
8265
|
-
var ProductsMain =
|
|
8929
|
+
import styled22 from "styled-components";
|
|
8930
|
+
var ProductsMain = styled22.main.withConfig({
|
|
8266
8931
|
componentId: "sc-6416c39d-0"
|
|
8267
8932
|
})([
|
|
8268
8933
|
`display:flex;width:min(1440px,100%);min-height:calc(100vh - var(--header-height));margin:0 auto;padding:32px 24px;flex-direction:column;gap:16px;@media (max-width:767px){padding:32px 16px;}`
|
|
8269
8934
|
]);
|
|
8270
|
-
var BreadcrumbSlot =
|
|
8935
|
+
var BreadcrumbSlot = styled22.div.withConfig({
|
|
8271
8936
|
componentId: "sc-6416c39d-1"
|
|
8272
8937
|
})([
|
|
8273
8938
|
`display:flex;justify-content:center;`
|
|
8274
8939
|
]);
|
|
8275
|
-
var ProductsSection =
|
|
8940
|
+
var ProductsSection = styled22.section.withConfig({
|
|
8276
8941
|
componentId: "sc-6416c39d-2"
|
|
8277
8942
|
})([
|
|
8278
8943
|
`display:flex;flex-direction:column;gap:24px;`
|
|
8279
8944
|
]);
|
|
8280
|
-
var ProductsHeading =
|
|
8945
|
+
var ProductsHeading = styled22.h1.withConfig({
|
|
8281
8946
|
componentId: "sc-6416c39d-3"
|
|
8282
8947
|
})([
|
|
8283
8948
|
`margin:0;color:`,
|
|
8284
8949
|
`;text-align:center;font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:40px;font-style:normal;font-weight:700;line-height:50px;@media (max-width:767px){font-size:24px !important;line-height:36px;}`
|
|
8285
8950
|
], ({ theme }) => theme.colors.text.primary);
|
|
8286
|
-
var ProductGrid =
|
|
8951
|
+
var ProductGrid = styled22.section.withConfig({
|
|
8287
8952
|
componentId: "sc-6416c39d-4"
|
|
8288
8953
|
})([
|
|
8289
8954
|
`display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:1fr;gap:24px 32px;align-items:start;@media (max-width:1199px){grid-template-columns:repeat(3,minmax(0,1fr));}@media (max-width:899px){grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 24px;}`
|
|
8290
8955
|
]);
|
|
8291
|
-
var ProductsPagination =
|
|
8956
|
+
var ProductsPagination = styled22.div.withConfig({
|
|
8292
8957
|
componentId: "sc-6416c39d-5"
|
|
8293
8958
|
})([
|
|
8294
8959
|
`margin-top:16px;`
|
|
@@ -8383,7 +9048,7 @@ var productsPerPage = 8;
|
|
|
8383
9048
|
function ProductsContent() {
|
|
8384
9049
|
const { t } = useTranslation10();
|
|
8385
9050
|
const resolveImage = useCmsImageResolver();
|
|
8386
|
-
const [page, setPage] =
|
|
9051
|
+
const [page, setPage] = useState9(1);
|
|
8387
9052
|
const title = t("landing.commodities.groups.0.title");
|
|
8388
9053
|
const pageCount = Math.max(1, Math.ceil(products.length / productsPerPage));
|
|
8389
9054
|
const visibleProducts = products.slice(
|
|
@@ -8438,49 +9103,49 @@ import { useTranslation as useTranslation11 } from "react-i18next";
|
|
|
8438
9103
|
|
|
8439
9104
|
// src/commodity-original/app/products/[slug]/style.ts
|
|
8440
9105
|
import Image7 from "next/image.js";
|
|
8441
|
-
import
|
|
8442
|
-
var DetailMain =
|
|
9106
|
+
import styled23 from "styled-components";
|
|
9107
|
+
var DetailMain = styled23.main.withConfig({
|
|
8443
9108
|
componentId: "sc-f78fec74-0"
|
|
8444
9109
|
})([
|
|
8445
9110
|
`display:flex;width:min(1248px,100%);min-height:calc(100vh - var(--header-height));margin:0 auto;padding:32px 24px 96px;flex-direction:column;gap:16px;@media (max-width:767px){padding:32px 16px 40px;}`
|
|
8446
9111
|
]);
|
|
8447
|
-
var DetailHero =
|
|
9112
|
+
var DetailHero = styled23.section.withConfig({
|
|
8448
9113
|
componentId: "sc-f78fec74-1"
|
|
8449
9114
|
})([
|
|
8450
9115
|
`display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:hidden;border:1px solid `,
|
|
8451
9116
|
`;border-radius:16px;background:`,
|
|
8452
9117
|
`;box-shadow:0 12px 32px rgb(0 0 0 / 8%);@media (max-width:767px){grid-template-columns:1fr;}`
|
|
8453
9118
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.canvas);
|
|
8454
|
-
var DetailImage =
|
|
9119
|
+
var DetailImage = styled23.div.withConfig({
|
|
8455
9120
|
componentId: "sc-f78fec74-2"
|
|
8456
9121
|
})([
|
|
8457
9122
|
`position:relative;min-height:440px;overflow:hidden;background:`,
|
|
8458
9123
|
`;img{object-fit:cover;}@media (max-width:767px){min-height:auto;aspect-ratio:1;}`
|
|
8459
9124
|
], ({ theme }) => theme.colors.accent.primary);
|
|
8460
|
-
var DetailBody =
|
|
9125
|
+
var DetailBody = styled23.div.withConfig({
|
|
8461
9126
|
componentId: "sc-f78fec74-3"
|
|
8462
9127
|
})([
|
|
8463
9128
|
`display:flex;padding:48px;flex-direction:column;justify-content:center;> p{margin:16px 0 0;color:`,
|
|
8464
9129
|
`;font-size:16px;font-weight:500;line-height:1.6;}@media (max-width:767px){padding:32px 24px;}`
|
|
8465
9130
|
], ({ theme }) => theme.colors.text.secondary);
|
|
8466
|
-
var DetailEyebrow =
|
|
9131
|
+
var DetailEyebrow = styled23.p.withConfig({
|
|
8467
9132
|
componentId: "sc-f78fec74-4"
|
|
8468
9133
|
})([
|
|
8469
9134
|
`margin:0 0 8px;color:`,
|
|
8470
9135
|
`;font-size:14px;font-weight:700;letter-spacing:0.08em;text-transform:uppercase;`
|
|
8471
9136
|
], ({ theme }) => theme.colors.accent.primary);
|
|
8472
|
-
var DetailTitle =
|
|
9137
|
+
var DetailTitle = styled23.h1.withConfig({
|
|
8473
9138
|
componentId: "sc-f78fec74-5"
|
|
8474
9139
|
})([
|
|
8475
9140
|
`margin:0;color:`,
|
|
8476
9141
|
`;font-size:clamp(32px,4vw,48px);line-height:1.2;`
|
|
8477
9142
|
], ({ theme }) => theme.colors.text.primary);
|
|
8478
|
-
var DetailFacts =
|
|
9143
|
+
var DetailFacts = styled23.dl.withConfig({
|
|
8479
9144
|
componentId: "sc-f78fec74-6"
|
|
8480
9145
|
})([
|
|
8481
9146
|
`display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:32px 0 0;@media (max-width:480px){grid-template-columns:1fr;}`
|
|
8482
9147
|
]);
|
|
8483
|
-
var DetailFact =
|
|
9148
|
+
var DetailFact = styled23.div.withConfig({
|
|
8484
9149
|
componentId: "sc-f78fec74-7"
|
|
8485
9150
|
})([
|
|
8486
9151
|
`padding:12px;border-radius:8px;background:`,
|
|
@@ -8488,61 +9153,61 @@ var DetailFact = styled22.div.withConfig({
|
|
|
8488
9153
|
`;font-size:12px;line-height:1.4;}dd{margin:4px 0 0;color:`,
|
|
8489
9154
|
`;font-size:14px;font-weight:700;line-height:1.4;}`
|
|
8490
9155
|
], ({ theme }) => theme.colors.background.hover, ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.text.primary);
|
|
8491
|
-
var PageHeader =
|
|
9156
|
+
var PageHeader = styled23.header.withConfig({
|
|
8492
9157
|
componentId: "sc-f78fec74-8"
|
|
8493
9158
|
})([
|
|
8494
9159
|
`display:flex;flex-direction:column;`
|
|
8495
9160
|
]);
|
|
8496
|
-
var PageTitle3 =
|
|
9161
|
+
var PageTitle3 = styled23.h1.withConfig({
|
|
8497
9162
|
componentId: "sc-f78fec74-9"
|
|
8498
9163
|
})([
|
|
8499
9164
|
`margin:0;color:`,
|
|
8500
9165
|
`;font-family:var(--Font-Landingpage,Inter);font-size:var(--Size-H2,40px);font-style:normal;font-weight:700;line-height:var(--Line-height-H2,50px);@media (max-width:767px){font-size:var(--Size-H3,24px) !important;line-height:var(--Line-height-H3,36px);}`
|
|
8501
9166
|
], ({ theme }) => theme.colors.text.primary);
|
|
8502
|
-
var ContractLayout =
|
|
9167
|
+
var ContractLayout = styled23.div.withConfig({
|
|
8503
9168
|
componentId: "sc-f78fec74-10"
|
|
8504
9169
|
})([
|
|
8505
9170
|
`margin-top:16px;display:grid;grid-template-columns:minmax(0,1fr) 373px;gap:40px;align-items:start;@media (max-width:1199px){grid-template-columns:minmax(0,1fr) 280px;gap:24px;}@media (max-width:768px){grid-template-columns:minmax(0,1fr);margin-top:0px;}`
|
|
8506
9171
|
]);
|
|
8507
|
-
var ContractMain =
|
|
9172
|
+
var ContractMain = styled23.main.withConfig({
|
|
8508
9173
|
componentId: "sc-f78fec74-11"
|
|
8509
9174
|
})([
|
|
8510
9175
|
`display:flex;min-width:0;flex-direction:column;gap:24px;`
|
|
8511
9176
|
]);
|
|
8512
|
-
var ContractSidebar =
|
|
9177
|
+
var ContractSidebar = styled23.aside.withConfig({
|
|
8513
9178
|
componentId: "sc-f78fec74-12"
|
|
8514
9179
|
})([
|
|
8515
9180
|
`min-width:0;position:sticky;top:calc(var(--header-height) + 24px);align-self:start;@media (max-width:768px){position:static;width:100%;}`
|
|
8516
9181
|
]);
|
|
8517
|
-
var IntroductionSection =
|
|
9182
|
+
var IntroductionSection = styled23.section.withConfig({
|
|
8518
9183
|
componentId: "sc-f78fec74-13"
|
|
8519
9184
|
})([
|
|
8520
9185
|
`display:flex;flex-direction:column;gap:8px;@media (max-width:767px){gap:6px;}`
|
|
8521
9186
|
]);
|
|
8522
|
-
var ContractSectionTitle =
|
|
9187
|
+
var ContractSectionTitle = styled23.h2.withConfig({
|
|
8523
9188
|
componentId: "sc-f78fec74-14"
|
|
8524
9189
|
})([
|
|
8525
9190
|
`width:100%;margin:0;overflow:hidden;color:`,
|
|
8526
9191
|
`;font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:20px;font-weight:700;line-height:30px;text-overflow:ellipsis;@media (max-width:767px){font-size:16px;line-height:22px;}`
|
|
8527
9192
|
], ({ theme }) => theme.colors.text.primary);
|
|
8528
|
-
var IntroductionDescription =
|
|
9193
|
+
var IntroductionDescription = styled23.p.withConfig({
|
|
8529
9194
|
componentId: "sc-f78fec74-15"
|
|
8530
9195
|
})([
|
|
8531
9196
|
`width:100%;margin:0;color:`,
|
|
8532
9197
|
`;font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:16px;font-weight:500;line-height:22px;@media (max-width:767px){font-size:14px;line-height:18px;}`
|
|
8533
9198
|
], ({ theme }) => theme.colors.text.secondary);
|
|
8534
|
-
var ContractSpecificationSection =
|
|
9199
|
+
var ContractSpecificationSection = styled23.section.withConfig({
|
|
8535
9200
|
componentId: "sc-f78fec74-16"
|
|
8536
9201
|
})([
|
|
8537
9202
|
`display:flex;flex-direction:column;gap:12px;`
|
|
8538
9203
|
]);
|
|
8539
|
-
var ContractSpecificationList =
|
|
9204
|
+
var ContractSpecificationList = styled23.dl.withConfig({
|
|
8540
9205
|
componentId: "sc-f78fec74-17"
|
|
8541
9206
|
})([
|
|
8542
9207
|
`overflow:hidden;margin:0;border:1px solid `,
|
|
8543
9208
|
`;border-radius:8px;`
|
|
8544
9209
|
], ({ theme }) => theme.colors.border.line);
|
|
8545
|
-
var ContractSpecificationRow =
|
|
9210
|
+
var ContractSpecificationRow = styled23.div.withConfig({
|
|
8546
9211
|
componentId: "sc-f78fec74-18"
|
|
8547
9212
|
})([
|
|
8548
9213
|
`display:grid;grid-template-columns:240px minmax(0,1fr);gap:24px;padding:11.5px 24px;font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:16px;font-weight:500;line-height:22px;& + &{border-top:1px solid `,
|
|
@@ -8550,23 +9215,23 @@ var ContractSpecificationRow = styled22.div.withConfig({
|
|
|
8550
9215
|
`;text-overflow:ellipsis;}dd{min-width:0;margin:0;color:`,
|
|
8551
9216
|
`;}p{margin:0;}@media (max-width:1199px){grid-template-columns:minmax(160px,0.7fr) minmax(0,1fr);gap:16px;padding:12px 16px;}@media (max-width:767px){grid-template-columns:minmax(110px,0.7fr) minmax(0,1fr);gap:16px;padding:12px 16px;font-size:14px;line-height:18px;}`
|
|
8552
9217
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.text.primary);
|
|
8553
|
-
var QualityStandardSection =
|
|
9218
|
+
var QualityStandardSection = styled23.section.withConfig({
|
|
8554
9219
|
componentId: "sc-f78fec74-19"
|
|
8555
9220
|
})([
|
|
8556
9221
|
`display:flex;flex-direction:column;gap:12px;`
|
|
8557
9222
|
]);
|
|
8558
|
-
var QualityStandardIntro =
|
|
9223
|
+
var QualityStandardIntro = styled23.div.withConfig({
|
|
8559
9224
|
componentId: "sc-f78fec74-20"
|
|
8560
9225
|
})([
|
|
8561
9226
|
`display:flex;width:100%;flex-direction:column;gap:8px;`
|
|
8562
9227
|
]);
|
|
8563
|
-
var QualityStandardDescription =
|
|
9228
|
+
var QualityStandardDescription = styled23.div.withConfig({
|
|
8564
9229
|
componentId: "sc-f78fec74-21"
|
|
8565
9230
|
})([
|
|
8566
9231
|
`width:100%;color:`,
|
|
8567
9232
|
`;font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:16px;font-weight:500;line-height:22px;p{margin:0;}@media (max-width:767px){font-size:14px;line-height:18px;}`
|
|
8568
9233
|
], ({ theme }) => theme.colors.text.secondary);
|
|
8569
|
-
var QualityStandardList =
|
|
9234
|
+
var QualityStandardList = styled23.div.withConfig({
|
|
8570
9235
|
componentId: "sc-f78fec74-22"
|
|
8571
9236
|
})([
|
|
8572
9237
|
`overflow:hidden;border:1px solid `,
|
|
@@ -8596,14 +9261,14 @@ var qualityStandardGrid = `
|
|
|
8596
9261
|
line-height: 18px;
|
|
8597
9262
|
}
|
|
8598
9263
|
`;
|
|
8599
|
-
var QualityStandardHeader =
|
|
9264
|
+
var QualityStandardHeader = styled23.div.withConfig({
|
|
8600
9265
|
componentId: "sc-f78fec74-23"
|
|
8601
9266
|
})([
|
|
8602
9267
|
``,
|
|
8603
9268
|
` color:`,
|
|
8604
9269
|
`;span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}`
|
|
8605
9270
|
], qualityStandardGrid, ({ theme }) => theme.colors.text.secondary);
|
|
8606
|
-
var QualityStandardRow =
|
|
9271
|
+
var QualityStandardRow = styled23.div.withConfig({
|
|
8607
9272
|
componentId: "sc-f78fec74-24"
|
|
8608
9273
|
})([
|
|
8609
9274
|
``,
|
|
@@ -8612,33 +9277,33 @@ var QualityStandardRow = styled22.div.withConfig({
|
|
|
8612
9277
|
`;span{min-width:0;}span:first-child{color:`,
|
|
8613
9278
|
`;}`
|
|
8614
9279
|
], qualityStandardGrid, ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.text.secondary);
|
|
8615
|
-
var RelatedProductsSection =
|
|
9280
|
+
var RelatedProductsSection = styled23.section.withConfig({
|
|
8616
9281
|
componentId: "sc-f78fec74-25"
|
|
8617
9282
|
})([
|
|
8618
9283
|
`display:flex;width:100%;min-width:0;flex-direction:column;gap:16px;`
|
|
8619
9284
|
]);
|
|
8620
|
-
var RelatedProductsHeading =
|
|
9285
|
+
var RelatedProductsHeading = styled23.h2.withConfig({
|
|
8621
9286
|
componentId: "sc-f78fec74-26"
|
|
8622
9287
|
})([
|
|
8623
9288
|
`width:100%;margin:0;color:`,
|
|
8624
9289
|
`;font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:20px;font-weight:700;line-height:30px;`
|
|
8625
9290
|
], ({ theme }) => theme.colors.text.primary);
|
|
8626
|
-
var RelatedProductsList =
|
|
9291
|
+
var RelatedProductsList = styled23.div.withConfig({
|
|
8627
9292
|
componentId: "sc-f78fec74-27"
|
|
8628
9293
|
})([
|
|
8629
9294
|
`display:flex;width:100%;min-width:0;flex-direction:column;gap:16px;@media (max-width:768px){width:calc(100% + 16px);padding:0 16px 4px 0;overflow-x:auto;flex-direction:row;scroll-padding-right:16px;scroll-snap-type:x mandatory;scrollbar-width:none;touch-action:pan-x;&::-webkit-scrollbar{display:none;}}`
|
|
8630
9295
|
]);
|
|
8631
|
-
var RelatedProductCard =
|
|
9296
|
+
var RelatedProductCard = styled23.article.withConfig({
|
|
8632
9297
|
componentId: "sc-f78fec74-28"
|
|
8633
9298
|
})([
|
|
8634
9299
|
`display:flex;width:100%;align-items:center;gap:12px;@media (max-width:768px){width:min(278px,calc(100% - 32px));max-width:278px;flex:0 0 min(278px,calc(100% - 32px));scroll-snap-align:start;}`
|
|
8635
9300
|
]);
|
|
8636
|
-
var RelatedProductImageFrame =
|
|
9301
|
+
var RelatedProductImageFrame = styled23.div.withConfig({
|
|
8637
9302
|
componentId: "sc-f78fec74-29"
|
|
8638
9303
|
})([
|
|
8639
9304
|
`position:relative;width:136px;height:136px;flex:0 0 136px;`
|
|
8640
9305
|
]);
|
|
8641
|
-
var RelatedProductImage =
|
|
9306
|
+
var RelatedProductImage = styled23(Image7).withConfig({
|
|
8642
9307
|
componentId: "sc-f78fec74-30"
|
|
8643
9308
|
})([
|
|
8644
9309
|
`width:`,
|
|
@@ -8647,24 +9312,24 @@ var RelatedProductImage = styled22(Image7).withConfig({
|
|
|
8647
9312
|
` !important;right:auto !important;bottom:auto !important;left:`,
|
|
8648
9313
|
` !important;max-width:none;object-fit:contain;pointer-events:none;`
|
|
8649
9314
|
], ({ $size }) => $size, ({ $size }) => $size, ({ $top }) => $top, ({ $left }) => $left);
|
|
8650
|
-
var RelatedProductContent =
|
|
9315
|
+
var RelatedProductContent = styled23.div.withConfig({
|
|
8651
9316
|
componentId: "sc-f78fec74-31"
|
|
8652
9317
|
})([
|
|
8653
9318
|
`display:flex;min-width:0;flex:1 0 0;flex-direction:column;align-items:flex-start;gap:4px;@media (max-width:767px){gap:0px;}`
|
|
8654
9319
|
]);
|
|
8655
|
-
var RelatedProductTitle =
|
|
9320
|
+
var RelatedProductTitle = styled23.h3.withConfig({
|
|
8656
9321
|
componentId: "sc-f78fec74-32"
|
|
8657
9322
|
})([
|
|
8658
9323
|
`width:100%;margin:0;color:`,
|
|
8659
9324
|
`;font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:20px;font-weight:700;line-height:30px;@media (max-width:767px){font-size:16px;line-height:22px;}`
|
|
8660
9325
|
], ({ theme }) => theme.colors.text.primary);
|
|
8661
|
-
var RelatedProductDescription =
|
|
9326
|
+
var RelatedProductDescription = styled23.p.withConfig({
|
|
8662
9327
|
componentId: "sc-f78fec74-33"
|
|
8663
9328
|
})([
|
|
8664
9329
|
`display:-webkit-box;width:100%;overflow:hidden;margin:0;color:`,
|
|
8665
9330
|
`;font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:14px;font-weight:500;line-height:18px;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:3;@media (max-width:767px){font-size:12px;line-height:16px;}`
|
|
8666
9331
|
], ({ theme }) => theme.colors.text.secondary);
|
|
8667
|
-
var RelatedProductAction =
|
|
9332
|
+
var RelatedProductAction = styled23.a.withConfig({
|
|
8668
9333
|
componentId: "sc-f78fec74-34"
|
|
8669
9334
|
})([
|
|
8670
9335
|
`display:inline-flex;padding:4px 16px 4px 0;align-items:center;justify-content:center;gap:6px;border-radius:6px;color:`,
|
|
@@ -8672,7 +9337,7 @@ var RelatedProductAction = styled22.a.withConfig({
|
|
|
8672
9337
|
`;}&:focus-visible{outline:2px solid `,
|
|
8673
9338
|
`;outline-offset:2px;}@media (max-width:767px){font-size:12px;line-height:16px;}`
|
|
8674
9339
|
], ({ theme }) => theme.colors.accent.primary, ({ theme }) => theme.colors.action.primaryHover, ({ theme }) => theme.colors.accent.primary);
|
|
8675
|
-
var RelatedProductArrow =
|
|
9340
|
+
var RelatedProductArrow = styled23.span.withConfig({
|
|
8676
9341
|
componentId: "sc-f78fec74-35"
|
|
8677
9342
|
})([
|
|
8678
9343
|
`width:16px;height:16px;flex:0 0 16px;background:currentColor;mask:url("/icons/related-products-arrow.svg") center / contain no-repeat;-webkit-mask:url("/icons/related-products-arrow.svg") center / contain no-repeat;transition:transform 160ms ease;`,
|
|
@@ -8933,7 +9598,7 @@ function getProductBySlug(slug) {
|
|
|
8933
9598
|
}
|
|
8934
9599
|
|
|
8935
9600
|
// src/commodity-original/app/thong-tin-wikex/FeaturedArticles.tsx
|
|
8936
|
-
import { useState as
|
|
9601
|
+
import { useState as useState10 } from "react";
|
|
8937
9602
|
import { useTranslation as useTranslation12 } from "react-i18next";
|
|
8938
9603
|
|
|
8939
9604
|
// src/commodity-original/app/thong-tin-wikex/data.ts
|
|
@@ -9005,46 +9670,46 @@ var featuredArticles = articles.slice(0, 3).map((article) => ({
|
|
|
9005
9670
|
}));
|
|
9006
9671
|
|
|
9007
9672
|
// src/commodity-original/app/thong-tin-wikex/featured-style.ts
|
|
9008
|
-
import
|
|
9009
|
-
var FeaturedSection =
|
|
9673
|
+
import styled24 from "styled-components";
|
|
9674
|
+
var FeaturedSection = styled24.section.withConfig({
|
|
9010
9675
|
componentId: "sc-7f318e93-0"
|
|
9011
9676
|
})([
|
|
9012
9677
|
`overflow:hidden;padding:60px 24px 40px;background:`,
|
|
9013
9678
|
`;@media (max-width:767px){padding:30px 0 20px;}`
|
|
9014
9679
|
], ({ theme }) => theme.colors.background.warm);
|
|
9015
|
-
var FeaturedInner =
|
|
9680
|
+
var FeaturedInner = styled24.div.withConfig({
|
|
9016
9681
|
componentId: "sc-7f318e93-1"
|
|
9017
9682
|
})([
|
|
9018
9683
|
`display:flex;width:min(1200px,100%);margin:0 auto;flex-direction:column;gap:32px;@media (max-width:767px){gap:24px;}`
|
|
9019
9684
|
]);
|
|
9020
|
-
var FeaturedTitle =
|
|
9685
|
+
var FeaturedTitle = styled24.h2.withConfig({
|
|
9021
9686
|
componentId: "sc-7f318e93-2"
|
|
9022
9687
|
})([
|
|
9023
9688
|
`margin:0;color:`,
|
|
9024
9689
|
`;font-family:var(--font-inter),Arial,Helvetica,sans-serif;font-size:24px;font-weight:600;line-height:36px;@media (max-width:767px){padding:0 16px;font-size:16px;line-height:22px;}`
|
|
9025
9690
|
], ({ theme }) => theme.colors.text.primary);
|
|
9026
|
-
var FeaturedCarousel =
|
|
9691
|
+
var FeaturedCarousel = styled24.div.withConfig({
|
|
9027
9692
|
componentId: "sc-7f318e93-3"
|
|
9028
9693
|
})([
|
|
9029
9694
|
`min-width:0;@media (max-width:767px){padding:0 16px;}`
|
|
9030
9695
|
]);
|
|
9031
|
-
var FeaturedViewport =
|
|
9696
|
+
var FeaturedViewport = styled24.div.withConfig({
|
|
9032
9697
|
componentId: "sc-7f318e93-4"
|
|
9033
9698
|
})([
|
|
9034
9699
|
`min-width:0;margin:-12px -16px -20px;overflow:hidden;padding:12px 16px 20px;&:focus-visible{outline:2px solid `,
|
|
9035
9700
|
`;outline-offset:-2px;}`
|
|
9036
9701
|
], ({ theme }) => theme.colors.accent.primary);
|
|
9037
|
-
var FeaturedTrack =
|
|
9702
|
+
var FeaturedTrack = styled24.div.withConfig({
|
|
9038
9703
|
componentId: "sc-7f318e93-5"
|
|
9039
9704
|
})([
|
|
9040
9705
|
`display:flex;width:100%;align-items:stretch;gap:32px;transition:transform 400ms ease;will-change:transform;@media (prefers-reduced-motion:reduce){transition:none;}`
|
|
9041
9706
|
]);
|
|
9042
|
-
var FeaturedSlide =
|
|
9707
|
+
var FeaturedSlide = styled24.div.withConfig({
|
|
9043
9708
|
componentId: "sc-7f318e93-6"
|
|
9044
9709
|
})([
|
|
9045
9710
|
`width:100%;min-width:100%;flex:0 0 100%;`
|
|
9046
9711
|
]);
|
|
9047
|
-
var FeaturedCard =
|
|
9712
|
+
var FeaturedCard = styled24(BlogCard).withConfig({
|
|
9048
9713
|
componentId: "sc-7f318e93-7"
|
|
9049
9714
|
})([
|
|
9050
9715
|
`overflow:visible;height:100%;box-shadow:4px 4px 20px rgb(0 0 0 / 4%);&& `,
|
|
@@ -9060,17 +9725,17 @@ var FeaturedCard = styled23(BlogCard).withConfig({
|
|
|
9060
9725
|
`{font-size:16px;font-weight:700;line-height:22px;}&& `,
|
|
9061
9726
|
`{font-size:14px;line-height:18px;-webkit-line-clamp:2;}}`
|
|
9062
9727
|
], BlogCardImagePanel, BlogCardContent, BlogCardTitle, BlogCardDescription, BlogCardImagePanel, BlogCardContent, BlogCardImagePanel, BlogCardContent, BlogCardDate, BlogCardTitle, BlogCardDescription);
|
|
9063
|
-
var FeaturedControls =
|
|
9728
|
+
var FeaturedControls = styled24.nav.withConfig({
|
|
9064
9729
|
componentId: "sc-7f318e93-8"
|
|
9065
9730
|
})([
|
|
9066
9731
|
`display:flex;margin-top:24px;align-items:center;justify-content:center;gap:8px;`
|
|
9067
9732
|
]);
|
|
9068
|
-
var FeaturedDots =
|
|
9733
|
+
var FeaturedDots = styled24.div.withConfig({
|
|
9069
9734
|
componentId: "sc-7f318e93-9"
|
|
9070
9735
|
})([
|
|
9071
9736
|
`display:flex;height:4px;align-items:center;gap:6px;`
|
|
9072
9737
|
]);
|
|
9073
|
-
var FeaturedDot =
|
|
9738
|
+
var FeaturedDot = styled24.button.withConfig({
|
|
9074
9739
|
componentId: "sc-7f318e93-10"
|
|
9075
9740
|
})([
|
|
9076
9741
|
`position:relative;width:20px;height:24px;border:0;padding:0;background:transparent;cursor:pointer;&::before{position:absolute;height:4px;border-radius:2px;background:`,
|
|
@@ -9078,14 +9743,14 @@ var FeaturedDot = styled23.button.withConfig({
|
|
|
9078
9743
|
`;}&:focus-visible{outline:2px solid `,
|
|
9079
9744
|
`;outline-offset:2px;}`
|
|
9080
9745
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.accent.primary, ({ theme }) => theme.colors.accent.primary);
|
|
9081
|
-
var FeaturedArrowButton =
|
|
9746
|
+
var FeaturedArrowButton = styled24.button.withConfig({
|
|
9082
9747
|
componentId: "sc-7f318e93-11"
|
|
9083
9748
|
})([
|
|
9084
9749
|
`display:none;width:24px;height:24px;align-items:center;justify-content:center;border:0;padding:0;color:`,
|
|
9085
9750
|
`;background:transparent;cursor:pointer;&:focus-visible{outline:2px solid `,
|
|
9086
9751
|
`;outline-offset:2px;}@media (max-width:767px){display:inline-flex;}`
|
|
9087
9752
|
], ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.accent.primary);
|
|
9088
|
-
var FeaturedArrow =
|
|
9753
|
+
var FeaturedArrow = styled24.span.withConfig({
|
|
9089
9754
|
componentId: "sc-7f318e93-12"
|
|
9090
9755
|
})([
|
|
9091
9756
|
`width:24px;height:24px;background:currentColor;mask:url("/landing-assets/register-dropdown.svg") center / contain no-repeat;-webkit-mask:url("/landing-assets/register-dropdown.svg") center / contain no-repeat;transform:rotate(-90deg);&[data-direction="previous"]{transform:rotate(90deg);}`
|
|
@@ -9097,7 +9762,7 @@ function FeaturedArticles() {
|
|
|
9097
9762
|
const { t } = useTranslation12();
|
|
9098
9763
|
const { isMobile } = useResponsive();
|
|
9099
9764
|
const resolveImage = useCmsImageResolver();
|
|
9100
|
-
const [activeSlide, setActiveSlide] =
|
|
9765
|
+
const [activeSlide, setActiveSlide] = useState10(0);
|
|
9101
9766
|
const moveSlide = (step) => {
|
|
9102
9767
|
setActiveSlide(
|
|
9103
9768
|
(current) => (current + step + featuredArticles.length) % featuredArticles.length
|
|
@@ -9187,50 +9852,50 @@ function FeaturedArticles() {
|
|
|
9187
9852
|
}
|
|
9188
9853
|
|
|
9189
9854
|
// src/commodity-original/app/thong-tin-wikex/WikexInformationSections.tsx
|
|
9190
|
-
import { jsx as
|
|
9191
|
-
import { useMemo as
|
|
9855
|
+
import { jsx as _jsx5, jsxs as _jsxs5 } from "react/jsx-runtime";
|
|
9856
|
+
import { useMemo as useMemo4, useState as useState11 } from "react";
|
|
9192
9857
|
import { useTranslation as useTranslation13 } from "react-i18next";
|
|
9193
|
-
import
|
|
9858
|
+
import styled26 from "styled-components";
|
|
9194
9859
|
|
|
9195
9860
|
// src/commodity-original/app/thong-tin-wikex/style.ts
|
|
9196
|
-
import
|
|
9197
|
-
var WikexInformationMain =
|
|
9861
|
+
import styled25 from "styled-components";
|
|
9862
|
+
var WikexInformationMain = styled25.main.withConfig({
|
|
9198
9863
|
componentId: "sc-38414e6b-0"
|
|
9199
9864
|
})([
|
|
9200
9865
|
`min-height:calc(100vh - var(--header-height));background:`,
|
|
9201
9866
|
`;`
|
|
9202
9867
|
], ({ theme }) => theme.colors.background.warm);
|
|
9203
|
-
var WikexControls =
|
|
9868
|
+
var WikexControls = styled25.section.withConfig({
|
|
9204
9869
|
componentId: "sc-38414e6b-1"
|
|
9205
9870
|
})([
|
|
9206
9871
|
`padding:60px 24px 16px;@media (max-width:767px){padding:30px 16px 40px;}`
|
|
9207
9872
|
]);
|
|
9208
|
-
var WikexControlsInner =
|
|
9873
|
+
var WikexControlsInner = styled25.div.withConfig({
|
|
9209
9874
|
componentId: "sc-38414e6b-2"
|
|
9210
9875
|
})([
|
|
9211
9876
|
`display:flex;width:min(1200px,100%);gap:24px;margin:0 auto;align-items:center;justify-content:space-between;@media (max-width:1023px){flex-direction:column;align-items:stretch;}@media (max-width:767px){gap:16px;}`
|
|
9212
9877
|
]);
|
|
9213
|
-
var WikexTabs =
|
|
9878
|
+
var WikexTabs = styled25.div.withConfig({
|
|
9214
9879
|
componentId: "sc-38414e6b-3"
|
|
9215
9880
|
})([
|
|
9216
9881
|
`min-width:0;`
|
|
9217
9882
|
]);
|
|
9218
|
-
var WikexFilterControls =
|
|
9883
|
+
var WikexFilterControls = styled25.div.withConfig({
|
|
9219
9884
|
componentId: "sc-38414e6b-4"
|
|
9220
9885
|
})([
|
|
9221
9886
|
`display:flex;gap:8px;align-items:center;@media (max-width:767px){flex-wrap:wrap;}`
|
|
9222
9887
|
]);
|
|
9223
|
-
var WikexSearch =
|
|
9888
|
+
var WikexSearch = styled25.div.withConfig({
|
|
9224
9889
|
componentId: "sc-38414e6b-5"
|
|
9225
9890
|
})([
|
|
9226
9891
|
`width:261px;@media (max-width:767px){width:100%;flex-basis:100%;}`
|
|
9227
9892
|
]);
|
|
9228
|
-
var WikexDateRangePicker =
|
|
9893
|
+
var WikexDateRangePicker = styled25(DateRangePicker).withConfig({
|
|
9229
9894
|
componentId: "sc-38414e6b-6"
|
|
9230
9895
|
})([
|
|
9231
9896
|
`width:262px;@media (max-width:767px){flex:1 1 220px;}`
|
|
9232
9897
|
]);
|
|
9233
|
-
var WikexResetButton =
|
|
9898
|
+
var WikexResetButton = styled25.button.withConfig({
|
|
9234
9899
|
componentId: "sc-38414e6b-7"
|
|
9235
9900
|
})([
|
|
9236
9901
|
`height:40px;padding:0 16px;border:1px solid `,
|
|
@@ -9242,22 +9907,22 @@ var WikexResetButton = styled24.button.withConfig({
|
|
|
9242
9907
|
`;outline-offset:2px;}@media (max-width:767px){height:36px;font-size:12px;line-height:16px;background:`,
|
|
9243
9908
|
`;}`
|
|
9244
9909
|
], ({ theme }) => theme.colors.border.subtle, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.canvas, ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.accent.primary, ({ theme }) => theme.colors.background.warm);
|
|
9245
|
-
var WikexSearchIcon =
|
|
9910
|
+
var WikexSearchIcon = styled25.span.withConfig({
|
|
9246
9911
|
componentId: "sc-38414e6b-8"
|
|
9247
9912
|
})([
|
|
9248
9913
|
`display:block;width:16px;height:16px;background:currentColor;mask:url("/icons/search.svg") center / contain no-repeat;-webkit-mask:url("/icons/search.svg") center / contain no-repeat;`
|
|
9249
9914
|
]);
|
|
9250
|
-
var WikexContent =
|
|
9915
|
+
var WikexContent = styled25.div.withConfig({
|
|
9251
9916
|
componentId: "sc-38414e6b-9"
|
|
9252
9917
|
})([
|
|
9253
9918
|
`width:min(1232px,100%);margin:0 auto;padding:22px 16px 80px;@media (max-width:767px){padding:0 16px 40px;}`
|
|
9254
9919
|
]);
|
|
9255
|
-
var WikexArticleGrid =
|
|
9920
|
+
var WikexArticleGrid = styled25.div.withConfig({
|
|
9256
9921
|
componentId: "sc-38414e6b-10"
|
|
9257
9922
|
})([
|
|
9258
9923
|
`display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:40px;@media (max-width:1023px){grid-template-columns:repeat(2,minmax(0,1fr));}@media (max-width:767px){grid-template-columns:1fr;gap:40px;}`
|
|
9259
9924
|
]);
|
|
9260
|
-
var WikexPagination =
|
|
9925
|
+
var WikexPagination = styled25.div.withConfig({
|
|
9261
9926
|
componentId: "sc-38414e6b-11"
|
|
9262
9927
|
})([
|
|
9263
9928
|
`margin-top:32px;@media (max-width:767px){margin-top:24px;}`
|
|
@@ -9265,7 +9930,7 @@ var WikexPagination = styled24.div.withConfig({
|
|
|
9265
9930
|
|
|
9266
9931
|
// src/commodity-original/app/thong-tin-wikex/WikexInformationSections.tsx
|
|
9267
9932
|
var articlesPerPage = 6;
|
|
9268
|
-
var InformationArticlesRoot =
|
|
9933
|
+
var InformationArticlesRoot = styled26.div.withConfig({
|
|
9269
9934
|
componentId: "sc-4dd7b1d6-0"
|
|
9270
9935
|
})([
|
|
9271
9936
|
`background:`,
|
|
@@ -9273,7 +9938,7 @@ var InformationArticlesRoot = styled25.div.withConfig({
|
|
|
9273
9938
|
], ({ theme }) => theme.colors.background.warm);
|
|
9274
9939
|
function WikexInformationHeroSection() {
|
|
9275
9940
|
const { t } = useTranslation13();
|
|
9276
|
-
return /* @__PURE__ */
|
|
9941
|
+
return /* @__PURE__ */ _jsx5(InformationHeroSection, {
|
|
9277
9942
|
title: t("wikexInformation.title")
|
|
9278
9943
|
});
|
|
9279
9944
|
}
|
|
@@ -9281,18 +9946,18 @@ function WikexInformationArticlesSection() {
|
|
|
9281
9946
|
const { isMobile } = useResponsive();
|
|
9282
9947
|
const { t } = useTranslation13();
|
|
9283
9948
|
const resolveImage = useCmsImageResolver();
|
|
9284
|
-
const [activeCategory, setActiveCategory] =
|
|
9285
|
-
const [dateRange, setDateRange] =
|
|
9949
|
+
const [activeCategory, setActiveCategory] = useState11("latest");
|
|
9950
|
+
const [dateRange, setDateRange] = useState11({
|
|
9286
9951
|
from: "",
|
|
9287
9952
|
to: ""
|
|
9288
9953
|
});
|
|
9289
|
-
const [page, setPage] =
|
|
9290
|
-
const [search, setSearch] =
|
|
9954
|
+
const [page, setPage] = useState11(1);
|
|
9955
|
+
const [search, setSearch] = useState11("");
|
|
9291
9956
|
const tabs = articleCategories.map((category) => ({
|
|
9292
9957
|
id: category,
|
|
9293
9958
|
label: t(`wikexInformation.tabs.${category}`)
|
|
9294
9959
|
}));
|
|
9295
|
-
const filteredArticles =
|
|
9960
|
+
const filteredArticles = useMemo4(() => {
|
|
9296
9961
|
const normalizedSearch = search.trim().toLocaleLowerCase();
|
|
9297
9962
|
return articles.filter((article) => {
|
|
9298
9963
|
const matchesCategory = activeCategory === "latest" || article.category === activeCategory;
|
|
@@ -9319,14 +9984,14 @@ function WikexInformationArticlesSection() {
|
|
|
9319
9984
|
setPage(1);
|
|
9320
9985
|
setSearch("");
|
|
9321
9986
|
};
|
|
9322
|
-
return /* @__PURE__ */
|
|
9987
|
+
return /* @__PURE__ */ _jsxs5(InformationArticlesRoot, {
|
|
9323
9988
|
children: [
|
|
9324
|
-
/* @__PURE__ */
|
|
9989
|
+
/* @__PURE__ */ _jsx5(WikexControls, {
|
|
9325
9990
|
"aria-label": t("wikexInformation.filterLabel"),
|
|
9326
|
-
children: /* @__PURE__ */
|
|
9991
|
+
children: /* @__PURE__ */ _jsxs5(WikexControlsInner, {
|
|
9327
9992
|
children: [
|
|
9328
|
-
/* @__PURE__ */
|
|
9329
|
-
children: /* @__PURE__ */
|
|
9993
|
+
/* @__PURE__ */ _jsx5(WikexTabs, {
|
|
9994
|
+
children: /* @__PURE__ */ _jsx5(TabCommon, {
|
|
9330
9995
|
ariaLabel: t("wikexInformation.tabsLabel"),
|
|
9331
9996
|
items: tabs,
|
|
9332
9997
|
onValueChange: (category) => {
|
|
@@ -9337,11 +10002,11 @@ function WikexInformationArticlesSection() {
|
|
|
9337
10002
|
value: activeCategory
|
|
9338
10003
|
})
|
|
9339
10004
|
}),
|
|
9340
|
-
/* @__PURE__ */
|
|
10005
|
+
/* @__PURE__ */ _jsxs5(WikexFilterControls, {
|
|
9341
10006
|
children: [
|
|
9342
|
-
/* @__PURE__ */
|
|
9343
|
-
children: /* @__PURE__ */
|
|
9344
|
-
leftIcon: /* @__PURE__ */
|
|
10007
|
+
/* @__PURE__ */ _jsx5(WikexSearch, {
|
|
10008
|
+
children: /* @__PURE__ */ _jsx5(InputCommon, {
|
|
10009
|
+
leftIcon: /* @__PURE__ */ _jsx5(WikexSearchIcon, {}),
|
|
9345
10010
|
onChange: (event) => {
|
|
9346
10011
|
setPage(1);
|
|
9347
10012
|
setSearch(event.target.value);
|
|
@@ -9351,7 +10016,7 @@ function WikexInformationArticlesSection() {
|
|
|
9351
10016
|
value: search
|
|
9352
10017
|
})
|
|
9353
10018
|
}),
|
|
9354
|
-
/* @__PURE__ */
|
|
10019
|
+
/* @__PURE__ */ _jsx5(WikexDateRangePicker, {
|
|
9355
10020
|
fromLabel: t("wikexInformation.fromDate"),
|
|
9356
10021
|
onChange: (value4) => {
|
|
9357
10022
|
setDateRange(value4);
|
|
@@ -9361,7 +10026,7 @@ function WikexInformationArticlesSection() {
|
|
|
9361
10026
|
toLabel: t("wikexInformation.toDate"),
|
|
9362
10027
|
value: dateRange
|
|
9363
10028
|
}),
|
|
9364
|
-
/* @__PURE__ */
|
|
10029
|
+
/* @__PURE__ */ _jsx5(WikexResetButton, {
|
|
9365
10030
|
onClick: resetFilters,
|
|
9366
10031
|
type: "button",
|
|
9367
10032
|
children: t("wikexInformation.reset")
|
|
@@ -9371,11 +10036,11 @@ function WikexInformationArticlesSection() {
|
|
|
9371
10036
|
]
|
|
9372
10037
|
})
|
|
9373
10038
|
}),
|
|
9374
|
-
/* @__PURE__ */
|
|
10039
|
+
/* @__PURE__ */ _jsxs5(WikexContent, {
|
|
9375
10040
|
children: [
|
|
9376
|
-
/* @__PURE__ */
|
|
10041
|
+
/* @__PURE__ */ _jsx5(WikexArticleGrid, {
|
|
9377
10042
|
"aria-label": t("wikexInformation.listLabel"),
|
|
9378
|
-
children: visibleArticles.map((article) => /* @__PURE__ */
|
|
10043
|
+
children: visibleArticles.map((article) => /* @__PURE__ */ _jsx5(BlogCard, {
|
|
9379
10044
|
badgeLabel: t(`wikexInformation.categories.${article.category}`),
|
|
9380
10045
|
badgeSize: isMobile ? "sm" : "md",
|
|
9381
10046
|
date: article.date,
|
|
@@ -9388,8 +10053,8 @@ function WikexInformationArticlesSection() {
|
|
|
9388
10053
|
title: t(article.titleKey)
|
|
9389
10054
|
}, article.id))
|
|
9390
10055
|
}),
|
|
9391
|
-
/* @__PURE__ */
|
|
9392
|
-
children: /* @__PURE__ */
|
|
10056
|
+
/* @__PURE__ */ _jsx5(WikexPagination, {
|
|
10057
|
+
children: /* @__PURE__ */ _jsx5(Pagination2, {
|
|
9393
10058
|
onPageChange: setPage,
|
|
9394
10059
|
page,
|
|
9395
10060
|
pageCount
|
|
@@ -9407,151 +10072,12 @@ import Link8 from "next/link.js";
|
|
|
9407
10072
|
import { useTranslation as useTranslation14 } from "react-i18next";
|
|
9408
10073
|
|
|
9409
10074
|
// src/commodity-original/lib/app-theme-provider.tsx
|
|
9410
|
-
import { jsx as
|
|
9411
|
-
import { createContext as createContext5, useCallback, useContext as useContext5, useLayoutEffect as
|
|
9412
|
-
import { ThemeProvider } from "styled-components";
|
|
10075
|
+
import { jsx as _jsx6, jsxs as _jsxs6 } from "react/jsx-runtime";
|
|
10076
|
+
import { createContext as createContext5, useCallback, useContext as useContext5, useLayoutEffect as useLayoutEffect3, useMemo as useMemo5, useRef as useRef4, useSyncExternalStore as useSyncExternalStore2 } from "react";
|
|
10077
|
+
import { ThemeProvider as ThemeProvider2 } from "styled-components";
|
|
9413
10078
|
|
|
9414
10079
|
// src/commodity-original/app/global-styles.tsx
|
|
9415
10080
|
import { createGlobalStyle } from "styled-components";
|
|
9416
|
-
|
|
9417
|
-
// src/commodity-original/styles/colors.ts
|
|
9418
|
-
var lightColors = {
|
|
9419
|
-
background: {
|
|
9420
|
-
canvas: "#ffffff",
|
|
9421
|
-
card: "#ffffff",
|
|
9422
|
-
deep: "#ffffff",
|
|
9423
|
-
hover: "#f5f5f5",
|
|
9424
|
-
input: "#f3f4f6",
|
|
9425
|
-
warm: "#fffbf3",
|
|
9426
|
-
popup: "#f9fafb"
|
|
9427
|
-
},
|
|
9428
|
-
text: {
|
|
9429
|
-
primary: "#171717",
|
|
9430
|
-
secondary: "#707580",
|
|
9431
|
-
placeholder: "#9ea3ad",
|
|
9432
|
-
content: "#4E5560"
|
|
9433
|
-
},
|
|
9434
|
-
action: {
|
|
9435
|
-
primaryBackground: "#171717",
|
|
9436
|
-
primaryForeground: "#ffffff",
|
|
9437
|
-
primaryHover: "#383838"
|
|
9438
|
-
},
|
|
9439
|
-
accent: {
|
|
9440
|
-
primary: "#f9bb3a",
|
|
9441
|
-
foreground: "#05080f",
|
|
9442
|
-
deep: "#c78806"
|
|
9443
|
-
},
|
|
9444
|
-
border: {
|
|
9445
|
-
subtle: "#D2D5DA",
|
|
9446
|
-
line: "#E6E7EA"
|
|
9447
|
-
},
|
|
9448
|
-
informationHero: {
|
|
9449
|
-
start: "#e55f2a",
|
|
9450
|
-
middle: "#e87a2f",
|
|
9451
|
-
foreground: "#ffffff",
|
|
9452
|
-
placeholder: "rgb(116 116 116 / 50%)"
|
|
9453
|
-
},
|
|
9454
|
-
datePicker: {
|
|
9455
|
-
selected: "#4f39f6",
|
|
9456
|
-
range: "#eef2ff",
|
|
9457
|
-
rangeForeground: "#312c85"
|
|
9458
|
-
},
|
|
9459
|
-
effect: {
|
|
9460
|
-
popupShadow: "rgb(5 8 16 / 5%)"
|
|
9461
|
-
}
|
|
9462
|
-
};
|
|
9463
|
-
var darkColors = {
|
|
9464
|
-
background: {
|
|
9465
|
-
canvas: "#2c2c2f",
|
|
9466
|
-
card: "#48484a",
|
|
9467
|
-
deep: "#1c1c1e",
|
|
9468
|
-
hover: "#48484a",
|
|
9469
|
-
input: "#48484a",
|
|
9470
|
-
warm: "#2c2c2f",
|
|
9471
|
-
popup: "#2c2c2f"
|
|
9472
|
-
},
|
|
9473
|
-
text: {
|
|
9474
|
-
primary: "#f2f2f7",
|
|
9475
|
-
secondary: "#aeaeb2",
|
|
9476
|
-
placeholder: "#636366",
|
|
9477
|
-
content: "#c7c7cc"
|
|
9478
|
-
},
|
|
9479
|
-
action: {
|
|
9480
|
-
primaryBackground: "#f2f2f7",
|
|
9481
|
-
primaryForeground: "#1c1c1e",
|
|
9482
|
-
primaryHover: "#c7c7cc"
|
|
9483
|
-
},
|
|
9484
|
-
accent: {
|
|
9485
|
-
primary: "#f9bb3a",
|
|
9486
|
-
foreground: "#05080f",
|
|
9487
|
-
deep: "#c78806"
|
|
9488
|
-
},
|
|
9489
|
-
border: {
|
|
9490
|
-
subtle: "#494b4e",
|
|
9491
|
-
line: "#48484a"
|
|
9492
|
-
},
|
|
9493
|
-
informationHero: {
|
|
9494
|
-
start: "#e55f2a",
|
|
9495
|
-
middle: "#e87a2f",
|
|
9496
|
-
foreground: "#ffffff",
|
|
9497
|
-
placeholder: "rgb(116 116 116 / 50%)"
|
|
9498
|
-
},
|
|
9499
|
-
datePicker: {
|
|
9500
|
-
selected: "#8b7bff",
|
|
9501
|
-
range: "#2b2856",
|
|
9502
|
-
rangeForeground: "#d9d4ff"
|
|
9503
|
-
},
|
|
9504
|
-
effect: {
|
|
9505
|
-
popupShadow: "rgb(0 0 0 / 24%)"
|
|
9506
|
-
}
|
|
9507
|
-
};
|
|
9508
|
-
var cssVariableColors = {
|
|
9509
|
-
background: {
|
|
9510
|
-
canvas: "var(--color-background-canvas)",
|
|
9511
|
-
card: "var(--color-background-card)",
|
|
9512
|
-
deep: "var(--color-background-deep)",
|
|
9513
|
-
hover: "var(--color-background-hover)",
|
|
9514
|
-
input: "var(--color-background-input)",
|
|
9515
|
-
warm: "var(--color-background-warm)",
|
|
9516
|
-
popup: "var(--color-background-popup)"
|
|
9517
|
-
},
|
|
9518
|
-
text: {
|
|
9519
|
-
primary: "var(--color-text-primary)",
|
|
9520
|
-
secondary: "var(--color-text-secondary)",
|
|
9521
|
-
placeholder: "var(--color-text-placeholder)",
|
|
9522
|
-
content: "var(--color-text-content)"
|
|
9523
|
-
},
|
|
9524
|
-
action: {
|
|
9525
|
-
primaryBackground: "var(--color-action-primary-background)",
|
|
9526
|
-
primaryForeground: "var(--color-action-primary-foreground)",
|
|
9527
|
-
primaryHover: "var(--color-action-primary-hover)"
|
|
9528
|
-
},
|
|
9529
|
-
accent: {
|
|
9530
|
-
primary: "var(--color-accent-primary)",
|
|
9531
|
-
foreground: "var(--color-accent-foreground)",
|
|
9532
|
-
deep: "var(--color-accent-deep)"
|
|
9533
|
-
},
|
|
9534
|
-
border: {
|
|
9535
|
-
subtle: "var(--color-border-subtle)",
|
|
9536
|
-
line: "var(--color-border-line)"
|
|
9537
|
-
},
|
|
9538
|
-
informationHero: {
|
|
9539
|
-
start: "var(--color-information-hero-start)",
|
|
9540
|
-
middle: "var(--color-information-hero-middle)",
|
|
9541
|
-
foreground: "var(--color-information-hero-foreground)",
|
|
9542
|
-
placeholder: "var(--color-information-hero-placeholder)"
|
|
9543
|
-
},
|
|
9544
|
-
datePicker: {
|
|
9545
|
-
selected: "var(--color-date-picker-selected)",
|
|
9546
|
-
range: "var(--color-date-picker-range)",
|
|
9547
|
-
rangeForeground: "var(--color-date-picker-range-foreground)"
|
|
9548
|
-
},
|
|
9549
|
-
effect: {
|
|
9550
|
-
popupShadow: "var(--color-effect-popup-shadow)"
|
|
9551
|
-
}
|
|
9552
|
-
};
|
|
9553
|
-
|
|
9554
|
-
// src/commodity-original/app/global-styles.tsx
|
|
9555
10081
|
var GlobalStyles = createGlobalStyle([
|
|
9556
10082
|
`:root{color-scheme:light;--header-height:64px;--section-scroll-gap:12px;--color-background-canvas:`,
|
|
9557
10083
|
`;--color-background-card:`,
|
|
@@ -9633,11 +10159,6 @@ var themeInitializationScript = `
|
|
|
9633
10159
|
})();
|
|
9634
10160
|
`;
|
|
9635
10161
|
|
|
9636
|
-
// src/commodity-original/styles/theme.ts
|
|
9637
|
-
var appTheme = {
|
|
9638
|
-
colors: cssVariableColors
|
|
9639
|
-
};
|
|
9640
|
-
|
|
9641
10162
|
// src/commodity-original/lib/app-theme-provider.tsx
|
|
9642
10163
|
var THEME_CHANGE_EVENT = "wikex-theme-change";
|
|
9643
10164
|
var sessionTheme = null;
|
|
@@ -9691,7 +10212,7 @@ function subscribeToTheme(onStoreChange) {
|
|
|
9691
10212
|
};
|
|
9692
10213
|
}
|
|
9693
10214
|
function AppThemeProvider({ children }) {
|
|
9694
|
-
const rootRef =
|
|
10215
|
+
const rootRef = useRef4(null);
|
|
9695
10216
|
const getTargetDocument = useCallback(() => rootRef.current?.ownerDocument ?? document, []);
|
|
9696
10217
|
const getSnapshot = useCallback(() => {
|
|
9697
10218
|
const targetDocument = getTargetDocument();
|
|
@@ -9711,7 +10232,7 @@ function AppThemeProvider({ children }) {
|
|
|
9711
10232
|
getTargetDocument
|
|
9712
10233
|
]);
|
|
9713
10234
|
const themeName = useSyncExternalStore2(subscribe, getSnapshot, getServerThemeSnapshot);
|
|
9714
|
-
|
|
10235
|
+
useLayoutEffect3(() => {
|
|
9715
10236
|
applyTheme(getSnapshot(), getTargetDocument());
|
|
9716
10237
|
}, [
|
|
9717
10238
|
themeName,
|
|
@@ -9743,7 +10264,7 @@ function AppThemeProvider({ children }) {
|
|
|
9743
10264
|
setTheme,
|
|
9744
10265
|
themeName
|
|
9745
10266
|
]);
|
|
9746
|
-
const contextValue =
|
|
10267
|
+
const contextValue = useMemo5(() => ({
|
|
9747
10268
|
themeName,
|
|
9748
10269
|
setTheme,
|
|
9749
10270
|
toggleTheme
|
|
@@ -9752,17 +10273,17 @@ function AppThemeProvider({ children }) {
|
|
|
9752
10273
|
themeName,
|
|
9753
10274
|
toggleTheme
|
|
9754
10275
|
]);
|
|
9755
|
-
return /* @__PURE__ */
|
|
10276
|
+
return /* @__PURE__ */ _jsx6(AppThemeContext.Provider, {
|
|
9756
10277
|
value: contextValue,
|
|
9757
|
-
children: /* @__PURE__ */
|
|
10278
|
+
children: /* @__PURE__ */ _jsx6("div", {
|
|
9758
10279
|
ref: rootRef,
|
|
9759
10280
|
style: {
|
|
9760
10281
|
display: "contents"
|
|
9761
10282
|
},
|
|
9762
|
-
children: /* @__PURE__ */
|
|
10283
|
+
children: /* @__PURE__ */ _jsxs6(ThemeProvider2, {
|
|
9763
10284
|
theme: appTheme,
|
|
9764
10285
|
children: [
|
|
9765
|
-
/* @__PURE__ */
|
|
10286
|
+
/* @__PURE__ */ _jsx6(global_styles_default, {}),
|
|
9766
10287
|
children
|
|
9767
10288
|
]
|
|
9768
10289
|
})
|
|
@@ -10030,21 +10551,21 @@ function Footer() {
|
|
|
10030
10551
|
}
|
|
10031
10552
|
|
|
10032
10553
|
// src/commodity-original/components/Header/index.tsx
|
|
10033
|
-
import { useCallback as useCallback2, useEffect as useEffect7, useRef as
|
|
10554
|
+
import { useCallback as useCallback2, useEffect as useEffect7, useRef as useRef5, useState as useState12 } from "react";
|
|
10034
10555
|
import Image9 from "next/image.js";
|
|
10035
10556
|
import Link9 from "next/link.js";
|
|
10036
10557
|
import { usePathname } from "next/navigation.js";
|
|
10037
10558
|
import { ChevronDown, Menu as Menu2, X as X2 } from "lucide";
|
|
10038
10559
|
import { MorphIcon as MorphIcon3 } from "morphicons/react";
|
|
10039
|
-
import { Dialog as
|
|
10560
|
+
import { Dialog as Dialog5, DropdownMenu as DropdownMenu2 } from "radix-ui";
|
|
10040
10561
|
|
|
10041
10562
|
// src/commodity-original/components/theme-toggle.tsx
|
|
10042
|
-
import { jsx as
|
|
10563
|
+
import { jsx as _jsx7 } from "react/jsx-runtime";
|
|
10043
10564
|
import { Moon, Sun } from "lucide";
|
|
10044
10565
|
import { MorphIcon as MorphIcon2 } from "morphicons/react";
|
|
10045
|
-
import
|
|
10566
|
+
import styled27 from "styled-components";
|
|
10046
10567
|
import { useTranslation as useTranslation15 } from "react-i18next";
|
|
10047
|
-
var ToggleButton =
|
|
10568
|
+
var ToggleButton = styled27.button.withConfig({
|
|
10048
10569
|
componentId: "sc-5aced439-0"
|
|
10049
10570
|
})([
|
|
10050
10571
|
`position:absolute;top:20px;right:20px;display:inline-flex;width:44px;height:44px;align-items:center;justify-content:center;border:1px solid `,
|
|
@@ -10058,14 +10579,14 @@ function ThemeToggle({ variant = "floating" }) {
|
|
|
10058
10579
|
const { themeName, toggleTheme } = useAppTheme();
|
|
10059
10580
|
const isDarkTheme = themeName === "dark";
|
|
10060
10581
|
const label = isDarkTheme ? t("theme.toLight") : t("theme.toDark");
|
|
10061
|
-
return /* @__PURE__ */
|
|
10582
|
+
return /* @__PURE__ */ _jsx7(ToggleButton, {
|
|
10062
10583
|
type: "button",
|
|
10063
10584
|
className: variant === "header" ? "theme-toggle--header" : void 0,
|
|
10064
10585
|
onClick: toggleTheme,
|
|
10065
10586
|
"aria-label": label,
|
|
10066
10587
|
"aria-pressed": isDarkTheme,
|
|
10067
10588
|
title: label,
|
|
10068
|
-
children: /* @__PURE__ */
|
|
10589
|
+
children: /* @__PURE__ */ _jsx7(MorphIcon2, {
|
|
10069
10590
|
icon: isDarkTheme ? Sun : Moon,
|
|
10070
10591
|
size: 20,
|
|
10071
10592
|
strokeWidth: 2,
|
|
@@ -10131,7 +10652,7 @@ function LanguageSwitcher({
|
|
|
10131
10652
|
portalContainer
|
|
10132
10653
|
}) {
|
|
10133
10654
|
const { t } = useTranslation16();
|
|
10134
|
-
const triggerRef =
|
|
10655
|
+
const triggerRef = useRef5(null);
|
|
10135
10656
|
const currentLanguage = languages.find((item) => item.value === language);
|
|
10136
10657
|
return /* @__PURE__ */ jsxs25(DropdownMenu2.Root, { children: [
|
|
10137
10658
|
/* @__PURE__ */ jsx30(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ jsx30(
|
|
@@ -10198,17 +10719,17 @@ function Header() {
|
|
|
10198
10719
|
if (route === "/comming-soon") return false;
|
|
10199
10720
|
return pathname === route || pathname.startsWith(`${route}/`);
|
|
10200
10721
|
};
|
|
10201
|
-
const [portalContainer, setPortalContainer] =
|
|
10722
|
+
const [portalContainer, setPortalContainer] = useState12(null);
|
|
10202
10723
|
const setHeaderRef = useCallback2((element) => {
|
|
10203
10724
|
setPortalContainer(element?.ownerDocument.body ?? null);
|
|
10204
10725
|
}, []);
|
|
10205
|
-
const [isMenuOpen, setIsMenuOpen] =
|
|
10206
|
-
const [isProductsOpen, setIsProductsOpen] =
|
|
10207
|
-
const [isDesktopProductsOpen, setIsDesktopProductsOpen] =
|
|
10726
|
+
const [isMenuOpen, setIsMenuOpen] = useState12(false);
|
|
10727
|
+
const [isProductsOpen, setIsProductsOpen] = useState12(false);
|
|
10728
|
+
const [isDesktopProductsOpen, setIsDesktopProductsOpen] = useState12(false);
|
|
10208
10729
|
const { t, i18n } = useTranslation16();
|
|
10209
10730
|
const language = i18n.resolvedLanguage?.startsWith("en") ? "en" : "vi";
|
|
10210
|
-
const mobileMenuTriggerRef =
|
|
10211
|
-
const pendingMobileSectionRef =
|
|
10731
|
+
const mobileMenuTriggerRef = useRef5(null);
|
|
10732
|
+
const pendingMobileSectionRef = useRef5(null);
|
|
10212
10733
|
const { themeName } = useAppTheme();
|
|
10213
10734
|
const isDarkTheme = themeName === "dark";
|
|
10214
10735
|
const lightLogo = useCmsImage("headerLogoImage", "/Logo/logo.png");
|
|
@@ -10351,8 +10872,8 @@ function Header() {
|
|
|
10351
10872
|
}
|
|
10352
10873
|
) }),
|
|
10353
10874
|
/* @__PURE__ */ jsx30(MobileThemeToggle, { children: /* @__PURE__ */ jsx30(ThemeToggle, { variant: "header" }) }),
|
|
10354
|
-
/* @__PURE__ */ jsxs25(
|
|
10355
|
-
/* @__PURE__ */ jsx30(
|
|
10875
|
+
/* @__PURE__ */ jsxs25(Dialog5.Root, { open: isMenuOpen, onOpenChange: setIsMenuOpen, children: [
|
|
10876
|
+
/* @__PURE__ */ jsx30(Dialog5.Trigger, { asChild: true, children: /* @__PURE__ */ jsx30(
|
|
10356
10877
|
MobileMenuTrigger,
|
|
10357
10878
|
{
|
|
10358
10879
|
type: "button",
|
|
@@ -10370,7 +10891,7 @@ function Header() {
|
|
|
10370
10891
|
)
|
|
10371
10892
|
}
|
|
10372
10893
|
) }),
|
|
10373
|
-
/* @__PURE__ */ jsxs25(
|
|
10894
|
+
/* @__PURE__ */ jsxs25(Dialog5.Portal, { container: portalContainer, children: [
|
|
10374
10895
|
/* @__PURE__ */ jsx30(MobileDrawerOverlay, {}),
|
|
10375
10896
|
/* @__PURE__ */ jsxs25(
|
|
10376
10897
|
MobileDrawerContent,
|
|
@@ -10515,7 +11036,7 @@ function Header() {
|
|
|
10515
11036
|
item.labelKey
|
|
10516
11037
|
);
|
|
10517
11038
|
}),
|
|
10518
|
-
/* @__PURE__ */ jsx30(
|
|
11039
|
+
/* @__PURE__ */ jsx30(Dialog5.Close, { asChild: true, children: /* @__PURE__ */ jsx30(
|
|
10519
11040
|
"button",
|
|
10520
11041
|
{
|
|
10521
11042
|
className: "mobile-menu-login",
|
|
@@ -10585,8 +11106,8 @@ function Header() {
|
|
|
10585
11106
|
import Image10 from "next/image.js";
|
|
10586
11107
|
|
|
10587
11108
|
// src/commodity-original/components/Title/styled.ts
|
|
10588
|
-
import { styled as
|
|
10589
|
-
var TitleContainer =
|
|
11109
|
+
import { styled as styled28 } from "styled-components";
|
|
11110
|
+
var TitleContainer = styled28.div.withConfig({
|
|
10590
11111
|
componentId: "sc-7d5a6c96-0"
|
|
10591
11112
|
})([
|
|
10592
11113
|
`text-align:center;margin-bottom:35px;h2,p{white-space:pre-line;}h2{color:#05080f;font-size:40px;font-weight:700;line-height:50px;margin-bottom:5px;margin-top:0;}p{color:#707580;font-size:20px;font-weight:600;line-height:26px;margin:0;}:root[data-theme="dark"] & h2{color:#f2f2f7;}:root[data-theme="dark"] & p{color:#aeaeb2;}@media (max-width:620px){margin-bottom:32px;p,h2{white-space:normal;}h2{font-size:24px;line-height:36px;margin-bottom:8px;}p{font-size:16px;line-height:22px;}}`
|
|
@@ -10688,11 +11209,11 @@ function AudienceSection() {
|
|
|
10688
11209
|
}
|
|
10689
11210
|
|
|
10690
11211
|
// src/commodity-original/components/LandingPage/BenefitsSection.tsx
|
|
10691
|
-
import { useState as
|
|
11212
|
+
import { useState as useState13 } from "react";
|
|
10692
11213
|
import { useTranslation as useTranslation18 } from "react-i18next";
|
|
10693
11214
|
|
|
10694
11215
|
// src/commodity-original/components/LandingPage/BenefitIcon.tsx
|
|
10695
|
-
import { useId as
|
|
11216
|
+
import { useId as useId3 } from "react";
|
|
10696
11217
|
import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
10697
11218
|
var sharedProps = {
|
|
10698
11219
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10705,7 +11226,7 @@ var sharedProps = {
|
|
|
10705
11226
|
focusable: "false"
|
|
10706
11227
|
};
|
|
10707
11228
|
function BenefitIcon({ name }) {
|
|
10708
|
-
const economyRevealId =
|
|
11229
|
+
const economyRevealId = useId3();
|
|
10709
11230
|
const { themeName } = useAppTheme();
|
|
10710
11231
|
const isDarkTheme = themeName === "dark";
|
|
10711
11232
|
switch (name) {
|
|
@@ -11194,7 +11715,7 @@ function BenefitCopy({
|
|
|
11194
11715
|
}
|
|
11195
11716
|
function BenefitsSection() {
|
|
11196
11717
|
const { t, i18n } = useTranslation18();
|
|
11197
|
-
const [expandedCards, setExpandedCards] =
|
|
11718
|
+
const [expandedCards, setExpandedCards] = useState13([]);
|
|
11198
11719
|
const language = i18n.resolvedLanguage?.startsWith("en") ? "en" : "vi";
|
|
11199
11720
|
const benefitCount = useCmsListCount(
|
|
11200
11721
|
"landing.benefits.cards.__count",
|
|
@@ -11580,14 +12101,14 @@ function DownloadSection() {
|
|
|
11580
12101
|
}
|
|
11581
12102
|
|
|
11582
12103
|
// src/commodity-original/components/LandingPage/FaqSection.tsx
|
|
11583
|
-
import { useState as
|
|
12104
|
+
import { useState as useState14 } from "react";
|
|
11584
12105
|
import { Minus, Plus } from "lucide";
|
|
11585
12106
|
import { MorphIcon as MorphIcon4 } from "morphicons/react";
|
|
11586
12107
|
import { Collapsible } from "radix-ui";
|
|
11587
12108
|
import { useTranslation as useTranslation21 } from "react-i18next";
|
|
11588
12109
|
import { jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
11589
12110
|
function FaqItem({ question, answer, order }) {
|
|
11590
|
-
const [isOpen, setIsOpen] =
|
|
12111
|
+
const [isOpen, setIsOpen] = useState14(false);
|
|
11591
12112
|
return /* @__PURE__ */ jsxs32(
|
|
11592
12113
|
Collapsible.Root,
|
|
11593
12114
|
{
|
|
@@ -11643,37 +12164,37 @@ function FaqSection2() {
|
|
|
11643
12164
|
import { useTranslation as useTranslation23 } from "react-i18next";
|
|
11644
12165
|
|
|
11645
12166
|
// src/commodity-original/components/Background/index.tsx
|
|
11646
|
-
import { jsx as
|
|
11647
|
-
import { memo, useEffect as useEffect8, useId as
|
|
11648
|
-
import { styled as
|
|
12167
|
+
import { jsx as _jsx8, jsxs as _jsxs7 } from "react/jsx-runtime";
|
|
12168
|
+
import { memo, useEffect as useEffect8, useId as useId4, useRef as useRef6 } from "react";
|
|
12169
|
+
import { styled as styled29 } from "styled-components";
|
|
11649
12170
|
var TWO_PI = Math.PI * 2;
|
|
11650
|
-
var DotContainer =
|
|
12171
|
+
var DotContainer = styled29.div.withConfig({
|
|
11651
12172
|
componentId: "sc-8dc7adc4-0"
|
|
11652
12173
|
})([
|
|
11653
12174
|
`position:absolute;top:-130px;left:-200px;width:50%;height:100%;border-radius:20%;overflow:hidden;pointer-events:none;`
|
|
11654
12175
|
]);
|
|
11655
12176
|
var DotField = /* @__PURE__ */ memo(({ dotRadius = 1.5, dotSpacing = 14, cursorRadius = 500, cursorForce = 0.1, bulgeOnly = true, bulgeStrength = 67, glowRadius = 160, sparkle = false, waveAmplitude = 0, gradientFrom = "rgba(168, 85, 247, 0.35)", gradientTo = "rgba(180, 151, 207, 0.25)", glowColor = "#120F17", ...rest }) => {
|
|
11656
|
-
const canvasRef =
|
|
11657
|
-
const svgRef =
|
|
11658
|
-
const glowRef =
|
|
11659
|
-
const dotsRef =
|
|
11660
|
-
const mouseRef =
|
|
12177
|
+
const canvasRef = useRef6(null);
|
|
12178
|
+
const svgRef = useRef6(null);
|
|
12179
|
+
const glowRef = useRef6(null);
|
|
12180
|
+
const dotsRef = useRef6([]);
|
|
12181
|
+
const mouseRef = useRef6({
|
|
11661
12182
|
x: -9999,
|
|
11662
12183
|
y: -9999,
|
|
11663
12184
|
prevX: -9999,
|
|
11664
12185
|
prevY: -9999,
|
|
11665
12186
|
speed: 0
|
|
11666
12187
|
});
|
|
11667
|
-
const rafRef =
|
|
11668
|
-
const sizeRef =
|
|
12188
|
+
const rafRef = useRef6(null);
|
|
12189
|
+
const sizeRef = useRef6({
|
|
11669
12190
|
w: 0,
|
|
11670
12191
|
h: 0,
|
|
11671
12192
|
offsetX: 0,
|
|
11672
12193
|
offsetY: 0
|
|
11673
12194
|
});
|
|
11674
|
-
const glowOpacity =
|
|
11675
|
-
const engagement =
|
|
11676
|
-
const propsRef =
|
|
12195
|
+
const glowOpacity = useRef6(0);
|
|
12196
|
+
const engagement = useRef6(0);
|
|
12197
|
+
const propsRef = useRef6({});
|
|
11677
12198
|
propsRef.current = {
|
|
11678
12199
|
dotRadius,
|
|
11679
12200
|
dotSpacing,
|
|
@@ -11686,8 +12207,8 @@ var DotField = /* @__PURE__ */ memo(({ dotRadius = 1.5, dotSpacing = 14, cursorR
|
|
|
11686
12207
|
gradientFrom,
|
|
11687
12208
|
gradientTo
|
|
11688
12209
|
};
|
|
11689
|
-
const rebuildRef =
|
|
11690
|
-
const glowId = `dot-field-glow-${
|
|
12210
|
+
const rebuildRef = useRef6(null);
|
|
12211
|
+
const glowId = `dot-field-glow-${useId4().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
11691
12212
|
useEffect8(() => {
|
|
11692
12213
|
const canvas = canvasRef.current;
|
|
11693
12214
|
const glowEl = glowRef.current;
|
|
@@ -11917,10 +12438,10 @@ var DotField = /* @__PURE__ */ memo(({ dotRadius = 1.5, dotSpacing = 14, cursorR
|
|
|
11917
12438
|
dotRadius,
|
|
11918
12439
|
dotSpacing
|
|
11919
12440
|
]);
|
|
11920
|
-
return /* @__PURE__ */
|
|
12441
|
+
return /* @__PURE__ */ _jsxs7(DotContainer, {
|
|
11921
12442
|
...rest,
|
|
11922
12443
|
children: [
|
|
11923
|
-
/* @__PURE__ */
|
|
12444
|
+
/* @__PURE__ */ _jsx8("canvas", {
|
|
11924
12445
|
ref: canvasRef,
|
|
11925
12446
|
style: {
|
|
11926
12447
|
position: "absolute",
|
|
@@ -11929,7 +12450,7 @@ var DotField = /* @__PURE__ */ memo(({ dotRadius = 1.5, dotSpacing = 14, cursorR
|
|
|
11929
12450
|
height: "100%"
|
|
11930
12451
|
}
|
|
11931
12452
|
}),
|
|
11932
|
-
/* @__PURE__ */
|
|
12453
|
+
/* @__PURE__ */ _jsxs7("svg", {
|
|
11933
12454
|
ref: svgRef,
|
|
11934
12455
|
style: {
|
|
11935
12456
|
position: "absolute",
|
|
@@ -11939,22 +12460,22 @@ var DotField = /* @__PURE__ */ memo(({ dotRadius = 1.5, dotSpacing = 14, cursorR
|
|
|
11939
12460
|
pointerEvents: "none"
|
|
11940
12461
|
},
|
|
11941
12462
|
children: [
|
|
11942
|
-
/* @__PURE__ */
|
|
11943
|
-
children: /* @__PURE__ */
|
|
12463
|
+
/* @__PURE__ */ _jsx8("defs", {
|
|
12464
|
+
children: /* @__PURE__ */ _jsxs7("radialGradient", {
|
|
11944
12465
|
id: glowId,
|
|
11945
12466
|
children: [
|
|
11946
|
-
/* @__PURE__ */
|
|
12467
|
+
/* @__PURE__ */ _jsx8("stop", {
|
|
11947
12468
|
offset: "0%",
|
|
11948
12469
|
stopColor: glowColor
|
|
11949
12470
|
}),
|
|
11950
|
-
/* @__PURE__ */
|
|
12471
|
+
/* @__PURE__ */ _jsx8("stop", {
|
|
11951
12472
|
offset: "100%",
|
|
11952
12473
|
stopColor: "transparent"
|
|
11953
12474
|
})
|
|
11954
12475
|
]
|
|
11955
12476
|
})
|
|
11956
12477
|
}),
|
|
11957
|
-
/* @__PURE__ */
|
|
12478
|
+
/* @__PURE__ */ _jsx8("circle", {
|
|
11958
12479
|
ref: glowRef,
|
|
11959
12480
|
cx: "-9999",
|
|
11960
12481
|
cy: "-9999",
|
|
@@ -12259,14 +12780,14 @@ function HeroSection2() {
|
|
|
12259
12780
|
}
|
|
12260
12781
|
|
|
12261
12782
|
// src/commodity-original/components/LandingPage/FloatingActions.tsx
|
|
12262
|
-
import { jsx as
|
|
12783
|
+
import { jsx as _jsx9 } from "react/jsx-runtime";
|
|
12263
12784
|
import Image14 from "next/image.js";
|
|
12264
12785
|
import { useTranslation as useTranslation24 } from "react-i18next";
|
|
12265
|
-
import
|
|
12786
|
+
import styled30, { keyframes as keyframes5 } from "styled-components";
|
|
12266
12787
|
var floatingActionWave = keyframes5([
|
|
12267
12788
|
`0%{opacity:0;transform:scale(0);}50%{opacity:0.2;transform:scale(1);}70%{opacity:0.4;transform:scale(1.1);}100%{opacity:0;transform:scale(1.15);}`
|
|
12268
12789
|
]);
|
|
12269
|
-
var FloatingActionsRoot =
|
|
12790
|
+
var FloatingActionsRoot = styled30.aside.withConfig({
|
|
12270
12791
|
componentId: "sc-613f53f5-0"
|
|
12271
12792
|
})([
|
|
12272
12793
|
`position:fixed;z-index:90;right:0;bottom:0;display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:20px 15px;.floating-action{--floating-action-pulse:249 187 58;position:relative;display:flex;width:68px;height:68px;align-items:center;justify-content:center;border-radius:99px;padding:8px;transition:transform 160ms ease;}.floating-action::before,.floating-action-ring::before{--floating-action-halo-opacity:0.22;position:absolute;border-radius:inherit;background:rgb(var(--floating-action-pulse));content:"";inset:0;opacity:0;pointer-events:none;transform:scale(0);transform-origin:center;will-change:transform,opacity;animation:`,
|
|
@@ -12297,19 +12818,19 @@ var actions = [
|
|
|
12297
12818
|
];
|
|
12298
12819
|
function FloatingActions() {
|
|
12299
12820
|
const { t } = useTranslation24();
|
|
12300
|
-
return /* @__PURE__ */
|
|
12821
|
+
return /* @__PURE__ */ _jsx9(FloatingActionsRoot, {
|
|
12301
12822
|
"aria-label": t("landing.floating.label"),
|
|
12302
|
-
children: actions.map((action) => /* @__PURE__ */
|
|
12823
|
+
children: actions.map((action) => /* @__PURE__ */ _jsx9("a", {
|
|
12303
12824
|
className: `floating-action ${action.className}`,
|
|
12304
12825
|
href: action.href,
|
|
12305
12826
|
"aria-label": t(action.labelKey),
|
|
12306
12827
|
rel: action.href.startsWith("http") ? "noopener noreferrer" : void 0,
|
|
12307
12828
|
target: action.href.startsWith("http") ? "_blank" : void 0,
|
|
12308
|
-
children: /* @__PURE__ */
|
|
12829
|
+
children: /* @__PURE__ */ _jsx9("span", {
|
|
12309
12830
|
className: "floating-action-ring",
|
|
12310
|
-
children: /* @__PURE__ */
|
|
12831
|
+
children: /* @__PURE__ */ _jsx9("span", {
|
|
12311
12832
|
className: "floating-action-core",
|
|
12312
|
-
children: /* @__PURE__ */
|
|
12833
|
+
children: /* @__PURE__ */ _jsx9(Image14, {
|
|
12313
12834
|
src: action.icon,
|
|
12314
12835
|
alt: "",
|
|
12315
12836
|
width: action.iconSize,
|
|
@@ -12324,7 +12845,7 @@ function FloatingActions() {
|
|
|
12324
12845
|
|
|
12325
12846
|
// src/commodity-original/components/LandingPage/PositionSection.tsx
|
|
12326
12847
|
import Image15 from "next/image.js";
|
|
12327
|
-
import { useRef as
|
|
12848
|
+
import { useRef as useRef7, useState as useState15 } from "react";
|
|
12328
12849
|
import { useTranslation as useTranslation25 } from "react-i18next";
|
|
12329
12850
|
import { jsx as jsx40, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
12330
12851
|
function PositionMedia({
|
|
@@ -12402,11 +12923,11 @@ function PositionMedia({
|
|
|
12402
12923
|
}
|
|
12403
12924
|
function PositionSection() {
|
|
12404
12925
|
const { t } = useTranslation25();
|
|
12405
|
-
const [expandedMobileCards, setExpandedMobileCards] =
|
|
12406
|
-
const [desktopSlide, setDesktopSlide] =
|
|
12407
|
-
const [mobileSlide, setMobileSlide] =
|
|
12408
|
-
const mobileCarouselRef =
|
|
12409
|
-
const mobileDragRef =
|
|
12926
|
+
const [expandedMobileCards, setExpandedMobileCards] = useState15([]);
|
|
12927
|
+
const [desktopSlide, setDesktopSlide] = useState15(0);
|
|
12928
|
+
const [mobileSlide, setMobileSlide] = useState15(0);
|
|
12929
|
+
const mobileCarouselRef = useRef7(null);
|
|
12930
|
+
const mobileDragRef = useRef7(null);
|
|
12410
12931
|
const slideCount = useCmsListCount(
|
|
12411
12932
|
"landing.position.slides.__count",
|
|
12412
12933
|
positionSlides.length
|
|
@@ -14110,8 +14631,8 @@ function ExactEditableContent({
|
|
|
14110
14631
|
onSelectText,
|
|
14111
14632
|
selectedTextField
|
|
14112
14633
|
}) {
|
|
14113
|
-
const rootRef =
|
|
14114
|
-
|
|
14634
|
+
const rootRef = useRef8(null);
|
|
14635
|
+
useLayoutEffect4(() => {
|
|
14115
14636
|
const root = rootRef.current;
|
|
14116
14637
|
if (!root || !editable) return void 0;
|
|
14117
14638
|
const cleanupTasks = [];
|
|
@@ -14125,7 +14646,7 @@ function ExactEditableContent({
|
|
|
14125
14646
|
const value4 = normalizeExactText(content[field]);
|
|
14126
14647
|
if (!value4 || value4.startsWith("[") || value4.startsWith("{")) return;
|
|
14127
14648
|
const element = candidates.find(
|
|
14128
|
-
(candidate) => !usedElements.has(candidate) && normalizeExactText(candidate.textContent) === value4 && !Array.from(candidate.children).some(
|
|
14649
|
+
(candidate) => !candidate.closest("[data-cms-table-editor]") && !usedElements.has(candidate) && normalizeExactText(candidate.textContent) === value4 && !Array.from(candidate.children).some(
|
|
14129
14650
|
(child) => normalizeExactText(child.textContent) === value4
|
|
14130
14651
|
)
|
|
14131
14652
|
);
|
|
@@ -14212,14 +14733,14 @@ function ExactProviders({ content, children }) {
|
|
|
14212
14733
|
else if (field.startsWith("en.")) en[field.slice(3)] = value4;
|
|
14213
14734
|
else if (field in vi) vi[field] = value4;
|
|
14214
14735
|
}
|
|
14215
|
-
const instance =
|
|
14736
|
+
const instance = useMemo6(() => {
|
|
14216
14737
|
const created = createInstance();
|
|
14217
14738
|
void created.use(initReactI18next).init({
|
|
14218
14739
|
resources: {
|
|
14219
|
-
vi: { translation: translations.vi },
|
|
14220
|
-
en: { translation: translations.en }
|
|
14740
|
+
vi: { translation: { ...translations.vi } },
|
|
14741
|
+
en: { translation: { ...translations.en } }
|
|
14221
14742
|
},
|
|
14222
|
-
lng: "vi",
|
|
14743
|
+
lng: requestedLanguage ?? "vi",
|
|
14223
14744
|
fallbackLng: "vi",
|
|
14224
14745
|
supportedLngs: ["vi", "en"],
|
|
14225
14746
|
keySeparator: false,
|
|
@@ -14300,6 +14821,7 @@ function exactBlock(options, Component, wrapSection = false) {
|
|
|
14300
14821
|
}));
|
|
14301
14822
|
const defaults = {
|
|
14302
14823
|
...translationDefaults(options.prefixes),
|
|
14824
|
+
...options.defaults,
|
|
14303
14825
|
...Object.fromEntries(images.map((image2) => [image2.key, image2.defaultSrc])),
|
|
14304
14826
|
...Object.fromEntries(
|
|
14305
14827
|
lists.flatMap(
|
|
@@ -14401,7 +14923,7 @@ function exactBlock(options, Component, wrapSection = false) {
|
|
|
14401
14923
|
onChange: handleChange,
|
|
14402
14924
|
onSelectText: handleSelectText,
|
|
14403
14925
|
selectedTextField: props.selectedTextField,
|
|
14404
|
-
children: wrapSection ? /* @__PURE__ */ jsx42(ExactSection, { children: /* @__PURE__ */ jsx42(Component, {}) }) : /* @__PURE__ */ jsx42(Component, {})
|
|
14926
|
+
children: wrapSection ? /* @__PURE__ */ jsx42(ExactSection, { children: /* @__PURE__ */ jsx42(Component, { ...props }) }) : /* @__PURE__ */ jsx42(Component, { ...props })
|
|
14405
14927
|
}
|
|
14406
14928
|
),
|
|
14407
14929
|
props.editable && listStates.length > 0 && /* @__PURE__ */ jsx42(
|
|
@@ -14414,7 +14936,7 @@ function exactBlock(options, Component, wrapSection = false) {
|
|
|
14414
14936
|
bgcolor: "#FAF8F3"
|
|
14415
14937
|
},
|
|
14416
14938
|
children: /* @__PURE__ */ jsx42(Stack4, { direction: "row", spacing: 1, justifyContent: "flex-end", flexWrap: "wrap", useFlexGap: true, children: listStates.map(({ field, items, list, templates }) => /* @__PURE__ */ jsxs37(
|
|
14417
|
-
|
|
14939
|
+
Button8,
|
|
14418
14940
|
{
|
|
14419
14941
|
size: "small",
|
|
14420
14942
|
variant: "contained",
|
|
@@ -14455,7 +14977,7 @@ function exactBlock(options, Component, wrapSection = false) {
|
|
|
14455
14977
|
name: options.name,
|
|
14456
14978
|
description: options.description,
|
|
14457
14979
|
icon: options.icon ?? "solar:widget-5-bold-duotone",
|
|
14458
|
-
fields: [...translatedFields, ...imageFields, ...listFields],
|
|
14980
|
+
fields: [...translatedFields, ...imageFields, ...listFields, ...options.fields ?? []],
|
|
14459
14981
|
defaults
|
|
14460
14982
|
},
|
|
14461
14983
|
Renderer: Renderer2
|
|
@@ -14794,7 +15316,10 @@ var aboutRegistration = exactBlock(
|
|
|
14794
15316
|
AboutRegistrationSection
|
|
14795
15317
|
);
|
|
14796
15318
|
var fees = exactBlock(
|
|
14797
|
-
{ type: "commodity-fees", name: "B\u1EA3ng ph\xED & K\xFD qu\u1EF9 \u2014 trang g\u1ED1c", description: "Giao di\u1EC7n b\u1EA3ng ph\xED nguy\xEAn b\u1EA3n.", prefixes: ["
|
|
15319
|
+
{ type: "commodity-fees", name: "B\u1EA3ng ph\xED & K\xFD qu\u1EF9 \u2014 trang g\u1ED1c", description: "Giao di\u1EC7n b\u1EA3ng ph\xED nguy\xEAn b\u1EA3n.", prefixes: ["fees.", "pagination."], fields: [
|
|
15320
|
+
{ key: "vi.feesTable", label: "B\u1EA3ng ph\xED (Ti\u1EBFng Vi\u1EC7t)", type: "textarea", hidden: true },
|
|
15321
|
+
{ key: "en.feesTable", label: "Fees table (English)", type: "textarea", hidden: true }
|
|
15322
|
+
] },
|
|
14798
15323
|
FeesAndMarginContent
|
|
14799
15324
|
);
|
|
14800
15325
|
var policy = exactBlock(
|
|
@@ -14930,6 +15455,7 @@ var wikexCmsBlocks = sourceCmsBlocks.map((block) => {
|
|
|
14930
15455
|
};
|
|
14931
15456
|
});
|
|
14932
15457
|
export {
|
|
15458
|
+
FeesTable,
|
|
14933
15459
|
minimalMarketingBlocks,
|
|
14934
15460
|
minimalUiBlocks,
|
|
14935
15461
|
minimalUiComponents,
|