@xsolla/xui-core 0.162.0 → 0.163.0
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 +27 -5
- package/index.d.mts +29 -9
- package/index.d.ts +29 -9
- package/index.js +252 -416
- package/index.js.map +1 -1
- package/index.mjs +252 -416
- package/index.mjs.map +1 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1789,9 +1789,7 @@ var shadow = {
|
|
|
1789
1789
|
var FALLBACK = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif';
|
|
1790
1790
|
var displayFontByContext = {
|
|
1791
1791
|
b2b: `"Pilat", "Aktiv Grotesk", "Noto Sans", "Montserrat", ${FALLBACK}`,
|
|
1792
|
-
b2c: `"Pilat Wide", "Aktiv Grotesk", "Noto Sans", "Montserrat", ${FALLBACK}
|
|
1793
|
-
paystation: `"Pilat Wide", "Aktiv Grotesk", "Noto Sans", "Montserrat", ${FALLBACK}`,
|
|
1794
|
-
presentation: `"Pilat Wide", "Aktiv Grotesk", "Noto Sans", "Montserrat", ${FALLBACK}`
|
|
1792
|
+
b2c: `"Pilat Wide", "Aktiv Grotesk", "Noto Sans", "Montserrat", ${FALLBACK}`
|
|
1795
1793
|
};
|
|
1796
1794
|
var bodyFont = `"Aktiv Grotesk", "Noto Sans", "Montserrat", ${FALLBACK}`;
|
|
1797
1795
|
var fonts = {
|
|
@@ -1817,41 +1815,124 @@ var typography = {
|
|
|
1817
1815
|
}
|
|
1818
1816
|
};
|
|
1819
1817
|
|
|
1818
|
+
// src/tokens/responsive-typography.ts
|
|
1819
|
+
var SCALE_STEPS = [
|
|
1820
|
+
"75",
|
|
1821
|
+
"100",
|
|
1822
|
+
"125",
|
|
1823
|
+
"150",
|
|
1824
|
+
"175",
|
|
1825
|
+
"200",
|
|
1826
|
+
"250",
|
|
1827
|
+
"300",
|
|
1828
|
+
"350",
|
|
1829
|
+
"450",
|
|
1830
|
+
"550",
|
|
1831
|
+
"650",
|
|
1832
|
+
"750"
|
|
1833
|
+
];
|
|
1834
|
+
var fontSize = {
|
|
1835
|
+
"75": { common: 10, mobile: 10 },
|
|
1836
|
+
"100": { common: 12, mobile: 11 },
|
|
1837
|
+
"125": { common: 14, mobile: 12 },
|
|
1838
|
+
"150": { common: 16, mobile: 14 },
|
|
1839
|
+
"175": { common: 18, mobile: 16 },
|
|
1840
|
+
"200": { common: 20, mobile: 18 },
|
|
1841
|
+
"250": { common: 24, mobile: 20 },
|
|
1842
|
+
"300": { common: 28, mobile: 24 },
|
|
1843
|
+
"350": { common: 32, mobile: 28 },
|
|
1844
|
+
"450": { common: 40, mobile: 32 },
|
|
1845
|
+
"550": { common: 48, mobile: 40 },
|
|
1846
|
+
"650": { common: 56, mobile: 48 },
|
|
1847
|
+
"750": { common: 64, mobile: 56 }
|
|
1848
|
+
};
|
|
1849
|
+
var lineHeightDisplay = {
|
|
1850
|
+
"75": { common: 10, mobile: 10 },
|
|
1851
|
+
"100": { common: 12, mobile: 11 },
|
|
1852
|
+
"125": { common: 14, mobile: 12 },
|
|
1853
|
+
"150": { common: 16, mobile: 14 },
|
|
1854
|
+
"175": { common: 18, mobile: 16 },
|
|
1855
|
+
"200": { common: 20, mobile: 18 },
|
|
1856
|
+
"250": { common: 24, mobile: 20 },
|
|
1857
|
+
"300": { common: 28, mobile: 24 },
|
|
1858
|
+
"350": { common: 32, mobile: 28 },
|
|
1859
|
+
"450": { common: 40, mobile: 32 },
|
|
1860
|
+
"550": { common: 48, mobile: 40 },
|
|
1861
|
+
"650": { common: 56, mobile: 48 },
|
|
1862
|
+
"750": { common: 64, mobile: 56 }
|
|
1863
|
+
};
|
|
1864
|
+
var lineHeightCompact = {
|
|
1865
|
+
"75": { common: 14, mobile: 13 },
|
|
1866
|
+
"100": { common: 16, mobile: 14 },
|
|
1867
|
+
"125": { common: 18, mobile: 16 },
|
|
1868
|
+
"150": { common: 20, mobile: 18 },
|
|
1869
|
+
"175": { common: 24, mobile: 20 },
|
|
1870
|
+
"200": { common: 26, mobile: 24 },
|
|
1871
|
+
"250": { common: 30, mobile: 26 },
|
|
1872
|
+
"300": { common: 36, mobile: 30 },
|
|
1873
|
+
"350": { common: 42, mobile: 36 },
|
|
1874
|
+
"450": { common: 52, mobile: 42 },
|
|
1875
|
+
"550": { common: 62, mobile: 52 },
|
|
1876
|
+
"650": { common: 72, mobile: 62 },
|
|
1877
|
+
"750": { common: 82, mobile: 72 }
|
|
1878
|
+
};
|
|
1879
|
+
var lineHeightText = {
|
|
1880
|
+
"75": { common: 14, mobile: 13 },
|
|
1881
|
+
"100": { common: 18, mobile: 14 },
|
|
1882
|
+
"125": { common: 20, mobile: 16 },
|
|
1883
|
+
"150": { common: 22, mobile: 18 },
|
|
1884
|
+
"175": { common: 26, mobile: 20 },
|
|
1885
|
+
"200": { common: 28, mobile: 24 },
|
|
1886
|
+
"250": { common: 34, mobile: 26 },
|
|
1887
|
+
"300": { common: 40, mobile: 30 },
|
|
1888
|
+
"350": { common: 44, mobile: 36 },
|
|
1889
|
+
"450": { common: 56, mobile: 42 },
|
|
1890
|
+
"550": { common: 66, mobile: 52 },
|
|
1891
|
+
"650": { common: 78, mobile: 62 },
|
|
1892
|
+
"750": { common: 88, mobile: 72 }
|
|
1893
|
+
};
|
|
1894
|
+
var responsiveTypographyScale = {
|
|
1895
|
+
fontSize,
|
|
1896
|
+
lineHeightDisplay,
|
|
1897
|
+
lineHeightCompact,
|
|
1898
|
+
lineHeightText
|
|
1899
|
+
};
|
|
1900
|
+
|
|
1820
1901
|
// src/tokens/typography.ts
|
|
1821
1902
|
var typographyTokens = {
|
|
1822
1903
|
b2c: {
|
|
1823
1904
|
heading: {
|
|
1824
1905
|
h1: {
|
|
1825
|
-
fontSize:
|
|
1826
|
-
lineHeight: "
|
|
1906
|
+
fontSize: fontSize["450"].common,
|
|
1907
|
+
lineHeight: `${lineHeightDisplay["450"].common}px`,
|
|
1827
1908
|
fontWeight: 700,
|
|
1828
1909
|
scaleStep: "450",
|
|
1829
1910
|
lineHeightCategory: "display"
|
|
1830
1911
|
},
|
|
1831
1912
|
h2: {
|
|
1832
|
-
fontSize:
|
|
1833
|
-
lineHeight: "
|
|
1913
|
+
fontSize: fontSize["350"].common,
|
|
1914
|
+
lineHeight: `${lineHeightDisplay["350"].common}px`,
|
|
1834
1915
|
fontWeight: 700,
|
|
1835
1916
|
scaleStep: "350",
|
|
1836
1917
|
lineHeightCategory: "display"
|
|
1837
1918
|
},
|
|
1838
1919
|
h3: {
|
|
1839
|
-
fontSize:
|
|
1840
|
-
lineHeight: "
|
|
1920
|
+
fontSize: fontSize["300"].common,
|
|
1921
|
+
lineHeight: `${lineHeightDisplay["300"].common}px`,
|
|
1841
1922
|
fontWeight: 700,
|
|
1842
1923
|
scaleStep: "300",
|
|
1843
1924
|
lineHeightCategory: "display"
|
|
1844
1925
|
},
|
|
1845
1926
|
h4: {
|
|
1846
|
-
fontSize:
|
|
1847
|
-
lineHeight: "
|
|
1927
|
+
fontSize: fontSize["250"].common,
|
|
1928
|
+
lineHeight: `${lineHeightDisplay["250"].common}px`,
|
|
1848
1929
|
fontWeight: 700,
|
|
1849
1930
|
scaleStep: "250",
|
|
1850
1931
|
lineHeightCategory: "display"
|
|
1851
1932
|
},
|
|
1852
1933
|
h5: {
|
|
1853
|
-
fontSize:
|
|
1854
|
-
lineHeight: "
|
|
1934
|
+
fontSize: fontSize["200"].common,
|
|
1935
|
+
lineHeight: `${lineHeightDisplay["200"].common}px`,
|
|
1855
1936
|
fontWeight: 700,
|
|
1856
1937
|
scaleStep: "200",
|
|
1857
1938
|
lineHeightCategory: "display"
|
|
@@ -1859,73 +1940,73 @@ var typographyTokens = {
|
|
|
1859
1940
|
},
|
|
1860
1941
|
basic: {
|
|
1861
1942
|
display: {
|
|
1862
|
-
fontSize:
|
|
1863
|
-
lineHeight: "
|
|
1864
|
-
fontWeight:
|
|
1865
|
-
scaleStep: "
|
|
1866
|
-
lineHeightCategory: "
|
|
1943
|
+
fontSize: fontSize["550"].common,
|
|
1944
|
+
lineHeight: `${lineHeightDisplay["550"].common}px`,
|
|
1945
|
+
fontWeight: 800,
|
|
1946
|
+
scaleStep: "550",
|
|
1947
|
+
lineHeightCategory: "display"
|
|
1867
1948
|
},
|
|
1868
1949
|
"body-lg": {
|
|
1869
|
-
fontSize:
|
|
1870
|
-
lineHeight: "
|
|
1950
|
+
fontSize: fontSize["175"].common,
|
|
1951
|
+
lineHeight: `${lineHeightCompact["175"].common}px`,
|
|
1871
1952
|
fontWeight: 400,
|
|
1872
1953
|
scaleStep: "175",
|
|
1873
1954
|
lineHeightCategory: "compact",
|
|
1874
1955
|
accent: { fontWeight: 500 },
|
|
1875
1956
|
paragraph: {
|
|
1876
|
-
lineHeight: "
|
|
1957
|
+
lineHeight: `${lineHeightText["175"].common}px`,
|
|
1877
1958
|
spacing: 20,
|
|
1878
1959
|
lineHeightScaleStep: "175"
|
|
1879
1960
|
}
|
|
1880
1961
|
},
|
|
1881
1962
|
"body-md": {
|
|
1882
|
-
fontSize:
|
|
1883
|
-
lineHeight: "
|
|
1963
|
+
fontSize: fontSize["150"].common,
|
|
1964
|
+
lineHeight: `${lineHeightCompact["150"].common}px`,
|
|
1884
1965
|
fontWeight: 400,
|
|
1885
1966
|
scaleStep: "150",
|
|
1886
1967
|
lineHeightCategory: "compact",
|
|
1887
1968
|
accent: { fontWeight: 500 },
|
|
1888
1969
|
paragraph: {
|
|
1889
|
-
lineHeight: "
|
|
1970
|
+
lineHeight: `${lineHeightText["150"].common}px`,
|
|
1890
1971
|
spacing: 16,
|
|
1891
1972
|
lineHeightScaleStep: "150"
|
|
1892
1973
|
}
|
|
1893
1974
|
},
|
|
1894
1975
|
"body-sm": {
|
|
1895
|
-
fontSize:
|
|
1896
|
-
lineHeight: "
|
|
1976
|
+
fontSize: fontSize["125"].common,
|
|
1977
|
+
lineHeight: `${lineHeightCompact["125"].common}px`,
|
|
1897
1978
|
fontWeight: 400,
|
|
1898
1979
|
scaleStep: "125",
|
|
1899
1980
|
lineHeightCategory: "compact",
|
|
1900
1981
|
accent: { fontWeight: 500 },
|
|
1901
1982
|
paragraph: {
|
|
1902
|
-
lineHeight: "
|
|
1983
|
+
lineHeight: `${lineHeightText["125"].common}px`,
|
|
1903
1984
|
spacing: 12,
|
|
1904
1985
|
lineHeightScaleStep: "125"
|
|
1905
1986
|
}
|
|
1906
1987
|
},
|
|
1907
1988
|
"body-xs": {
|
|
1908
|
-
fontSize:
|
|
1909
|
-
lineHeight: "
|
|
1989
|
+
fontSize: fontSize["100"].common,
|
|
1990
|
+
lineHeight: `${lineHeightCompact["100"].common}px`,
|
|
1910
1991
|
fontWeight: 400,
|
|
1911
1992
|
scaleStep: "100",
|
|
1912
1993
|
lineHeightCategory: "compact",
|
|
1913
1994
|
accent: { fontWeight: 500 },
|
|
1914
1995
|
paragraph: {
|
|
1915
|
-
lineHeight: "
|
|
1996
|
+
lineHeight: `${lineHeightText["100"].common}px`,
|
|
1916
1997
|
spacing: 8,
|
|
1917
1998
|
lineHeightScaleStep: "100"
|
|
1918
1999
|
}
|
|
1919
2000
|
},
|
|
1920
2001
|
"body-xxs": {
|
|
1921
|
-
fontSize:
|
|
1922
|
-
lineHeight: "
|
|
2002
|
+
fontSize: fontSize["75"].common,
|
|
2003
|
+
lineHeight: `${lineHeightCompact["75"].common}px`,
|
|
1923
2004
|
fontWeight: 400,
|
|
1924
2005
|
scaleStep: "75",
|
|
1925
2006
|
lineHeightCategory: "compact",
|
|
1926
2007
|
accent: { fontWeight: 500 },
|
|
1927
2008
|
paragraph: {
|
|
1928
|
-
lineHeight: "
|
|
2009
|
+
lineHeight: `${lineHeightText["75"].common}px`,
|
|
1929
2010
|
spacing: 6,
|
|
1930
2011
|
lineHeightScaleStep: "75"
|
|
1931
2012
|
}
|
|
@@ -1935,36 +2016,36 @@ var typographyTokens = {
|
|
|
1935
2016
|
b2b: {
|
|
1936
2017
|
heading: {
|
|
1937
2018
|
h1: {
|
|
1938
|
-
fontSize:
|
|
1939
|
-
lineHeight: "
|
|
2019
|
+
fontSize: fontSize["650"].common,
|
|
2020
|
+
lineHeight: `${lineHeightDisplay["650"].common}px`,
|
|
1940
2021
|
fontWeight: 400,
|
|
1941
2022
|
scaleStep: "650",
|
|
1942
2023
|
lineHeightCategory: "display"
|
|
1943
2024
|
},
|
|
1944
2025
|
h2: {
|
|
1945
|
-
fontSize:
|
|
1946
|
-
lineHeight: "
|
|
2026
|
+
fontSize: fontSize["550"].common,
|
|
2027
|
+
lineHeight: `${lineHeightDisplay["550"].common}px`,
|
|
1947
2028
|
fontWeight: 400,
|
|
1948
2029
|
scaleStep: "550",
|
|
1949
2030
|
lineHeightCategory: "display"
|
|
1950
2031
|
},
|
|
1951
2032
|
h3: {
|
|
1952
|
-
fontSize:
|
|
1953
|
-
lineHeight: "
|
|
2033
|
+
fontSize: fontSize["350"].common,
|
|
2034
|
+
lineHeight: `${lineHeightDisplay["350"].common}px`,
|
|
1954
2035
|
fontWeight: 400,
|
|
1955
2036
|
scaleStep: "350",
|
|
1956
2037
|
lineHeightCategory: "display"
|
|
1957
2038
|
},
|
|
1958
2039
|
h4: {
|
|
1959
|
-
fontSize:
|
|
1960
|
-
lineHeight: "
|
|
2040
|
+
fontSize: fontSize["250"].common,
|
|
2041
|
+
lineHeight: `${lineHeightDisplay["250"].common}px`,
|
|
1961
2042
|
fontWeight: 400,
|
|
1962
2043
|
scaleStep: "250",
|
|
1963
2044
|
lineHeightCategory: "display"
|
|
1964
2045
|
},
|
|
1965
2046
|
h5: {
|
|
1966
|
-
fontSize:
|
|
1967
|
-
lineHeight: "
|
|
2047
|
+
fontSize: fontSize["200"].common,
|
|
2048
|
+
lineHeight: `${lineHeightDisplay["200"].common}px`,
|
|
1968
2049
|
fontWeight: 600,
|
|
1969
2050
|
scaleStep: "200",
|
|
1970
2051
|
lineHeightCategory: "display"
|
|
@@ -1972,304 +2053,78 @@ var typographyTokens = {
|
|
|
1972
2053
|
},
|
|
1973
2054
|
basic: {
|
|
1974
2055
|
display: {
|
|
1975
|
-
fontSize:
|
|
1976
|
-
lineHeight: "
|
|
2056
|
+
fontSize: fontSize["750"].common,
|
|
2057
|
+
lineHeight: `${lineHeightDisplay["750"].common}px`,
|
|
1977
2058
|
fontWeight: 400,
|
|
1978
2059
|
scaleStep: "750",
|
|
1979
2060
|
lineHeightCategory: "display"
|
|
1980
2061
|
},
|
|
1981
2062
|
"body-lg": {
|
|
1982
|
-
fontSize:
|
|
1983
|
-
lineHeight: "
|
|
2063
|
+
fontSize: fontSize["175"].common,
|
|
2064
|
+
lineHeight: `${lineHeightCompact["175"].common}px`,
|
|
1984
2065
|
fontWeight: 400,
|
|
1985
2066
|
scaleStep: "175",
|
|
1986
2067
|
lineHeightCategory: "compact",
|
|
1987
2068
|
accent: { fontWeight: 500 },
|
|
1988
2069
|
paragraph: {
|
|
1989
|
-
lineHeight: "
|
|
2070
|
+
lineHeight: `${lineHeightText["175"].common}px`,
|
|
1990
2071
|
spacing: 20,
|
|
1991
2072
|
lineHeightScaleStep: "175"
|
|
1992
2073
|
}
|
|
1993
2074
|
},
|
|
1994
2075
|
"body-md": {
|
|
1995
|
-
fontSize:
|
|
1996
|
-
lineHeight: "
|
|
2076
|
+
fontSize: fontSize["150"].common,
|
|
2077
|
+
lineHeight: `${lineHeightCompact["150"].common}px`,
|
|
1997
2078
|
fontWeight: 400,
|
|
1998
2079
|
scaleStep: "150",
|
|
1999
2080
|
lineHeightCategory: "compact",
|
|
2000
2081
|
accent: { fontWeight: 500 },
|
|
2001
2082
|
paragraph: {
|
|
2002
|
-
lineHeight: "
|
|
2083
|
+
lineHeight: `${lineHeightText["150"].common}px`,
|
|
2003
2084
|
spacing: 16,
|
|
2004
2085
|
lineHeightScaleStep: "150"
|
|
2005
2086
|
}
|
|
2006
2087
|
},
|
|
2007
2088
|
"body-sm": {
|
|
2008
|
-
fontSize:
|
|
2009
|
-
lineHeight: "
|
|
2089
|
+
fontSize: fontSize["125"].common,
|
|
2090
|
+
lineHeight: `${lineHeightCompact["125"].common}px`,
|
|
2010
2091
|
fontWeight: 400,
|
|
2011
2092
|
scaleStep: "125",
|
|
2012
2093
|
lineHeightCategory: "compact",
|
|
2013
2094
|
accent: { fontWeight: 500 },
|
|
2014
2095
|
paragraph: {
|
|
2015
|
-
lineHeight: "
|
|
2096
|
+
lineHeight: `${lineHeightText["125"].common}px`,
|
|
2016
2097
|
spacing: 12,
|
|
2017
2098
|
lineHeightScaleStep: "125"
|
|
2018
2099
|
}
|
|
2019
2100
|
},
|
|
2020
2101
|
"body-xs": {
|
|
2021
|
-
fontSize:
|
|
2022
|
-
lineHeight: "
|
|
2102
|
+
fontSize: fontSize["100"].common,
|
|
2103
|
+
lineHeight: `${lineHeightCompact["100"].common}px`,
|
|
2023
2104
|
fontWeight: 400,
|
|
2024
2105
|
scaleStep: "100",
|
|
2025
2106
|
lineHeightCategory: "compact",
|
|
2026
2107
|
accent: { fontWeight: 500 },
|
|
2027
2108
|
paragraph: {
|
|
2028
|
-
lineHeight: "
|
|
2109
|
+
lineHeight: `${lineHeightText["100"].common}px`,
|
|
2029
2110
|
spacing: 8,
|
|
2030
2111
|
lineHeightScaleStep: "100"
|
|
2031
2112
|
}
|
|
2032
2113
|
},
|
|
2033
2114
|
"body-xxs": {
|
|
2034
|
-
fontSize:
|
|
2035
|
-
lineHeight: "
|
|
2115
|
+
fontSize: fontSize["75"].common,
|
|
2116
|
+
lineHeight: `${lineHeightCompact["75"].common}px`,
|
|
2036
2117
|
fontWeight: 400,
|
|
2037
2118
|
scaleStep: "75",
|
|
2038
2119
|
lineHeightCategory: "compact",
|
|
2039
2120
|
accent: { fontWeight: 500 },
|
|
2040
2121
|
paragraph: {
|
|
2041
|
-
lineHeight: "
|
|
2122
|
+
lineHeight: `${lineHeightText["75"].common}px`,
|
|
2042
2123
|
spacing: 6,
|
|
2043
2124
|
lineHeightScaleStep: "75"
|
|
2044
2125
|
}
|
|
2045
2126
|
}
|
|
2046
2127
|
}
|
|
2047
|
-
},
|
|
2048
|
-
paystation: {
|
|
2049
|
-
heading: {
|
|
2050
|
-
h1: {
|
|
2051
|
-
fontSize: 28,
|
|
2052
|
-
lineHeight: "28px",
|
|
2053
|
-
fontWeight: 700,
|
|
2054
|
-
scaleStep: "300",
|
|
2055
|
-
lineHeightCategory: "display"
|
|
2056
|
-
},
|
|
2057
|
-
h2: {
|
|
2058
|
-
fontSize: 24,
|
|
2059
|
-
lineHeight: "24px",
|
|
2060
|
-
fontWeight: 700,
|
|
2061
|
-
scaleStep: "250",
|
|
2062
|
-
lineHeightCategory: "display"
|
|
2063
|
-
},
|
|
2064
|
-
h3: {
|
|
2065
|
-
fontSize: 20,
|
|
2066
|
-
lineHeight: "20px",
|
|
2067
|
-
fontWeight: 700,
|
|
2068
|
-
scaleStep: "200",
|
|
2069
|
-
lineHeightCategory: "display"
|
|
2070
|
-
},
|
|
2071
|
-
h4: {
|
|
2072
|
-
fontSize: 18,
|
|
2073
|
-
lineHeight: "18px",
|
|
2074
|
-
fontWeight: 700,
|
|
2075
|
-
scaleStep: "175",
|
|
2076
|
-
lineHeightCategory: "display"
|
|
2077
|
-
},
|
|
2078
|
-
h5: {
|
|
2079
|
-
fontSize: 16,
|
|
2080
|
-
lineHeight: "16px",
|
|
2081
|
-
fontWeight: 700,
|
|
2082
|
-
scaleStep: "150",
|
|
2083
|
-
lineHeightCategory: "display"
|
|
2084
|
-
}
|
|
2085
|
-
},
|
|
2086
|
-
basic: {
|
|
2087
|
-
display: {
|
|
2088
|
-
fontSize: 40,
|
|
2089
|
-
lineHeight: "40px",
|
|
2090
|
-
fontWeight: 800,
|
|
2091
|
-
scaleStep: "450",
|
|
2092
|
-
lineHeightCategory: "display"
|
|
2093
|
-
},
|
|
2094
|
-
"body-lg": {
|
|
2095
|
-
fontSize: 16,
|
|
2096
|
-
lineHeight: "20px",
|
|
2097
|
-
fontWeight: 400,
|
|
2098
|
-
scaleStep: "150",
|
|
2099
|
-
lineHeightCategory: "compact",
|
|
2100
|
-
accent: { fontWeight: 500 },
|
|
2101
|
-
paragraph: {
|
|
2102
|
-
lineHeight: "22px",
|
|
2103
|
-
spacing: 16,
|
|
2104
|
-
lineHeightScaleStep: "150"
|
|
2105
|
-
}
|
|
2106
|
-
},
|
|
2107
|
-
"body-md": {
|
|
2108
|
-
fontSize: 14,
|
|
2109
|
-
lineHeight: "18px",
|
|
2110
|
-
fontWeight: 400,
|
|
2111
|
-
scaleStep: "125",
|
|
2112
|
-
lineHeightCategory: "compact",
|
|
2113
|
-
accent: { fontWeight: 500 },
|
|
2114
|
-
paragraph: {
|
|
2115
|
-
lineHeight: "20px",
|
|
2116
|
-
spacing: 12,
|
|
2117
|
-
lineHeightScaleStep: "125"
|
|
2118
|
-
}
|
|
2119
|
-
},
|
|
2120
|
-
"body-sm": {
|
|
2121
|
-
fontSize: 12,
|
|
2122
|
-
lineHeight: "16px",
|
|
2123
|
-
fontWeight: 400,
|
|
2124
|
-
scaleStep: "100",
|
|
2125
|
-
lineHeightCategory: "compact",
|
|
2126
|
-
accent: { fontWeight: 500 },
|
|
2127
|
-
paragraph: {
|
|
2128
|
-
lineHeight: "18px",
|
|
2129
|
-
spacing: 8,
|
|
2130
|
-
lineHeightScaleStep: "100"
|
|
2131
|
-
}
|
|
2132
|
-
},
|
|
2133
|
-
"body-xs": {
|
|
2134
|
-
fontSize: 10,
|
|
2135
|
-
lineHeight: "14px",
|
|
2136
|
-
fontWeight: 400,
|
|
2137
|
-
scaleStep: "75",
|
|
2138
|
-
lineHeightCategory: "compact",
|
|
2139
|
-
accent: { fontWeight: 500 },
|
|
2140
|
-
paragraph: {
|
|
2141
|
-
lineHeight: "14px",
|
|
2142
|
-
spacing: 6,
|
|
2143
|
-
lineHeightScaleStep: "75"
|
|
2144
|
-
}
|
|
2145
|
-
},
|
|
2146
|
-
"body-xxs": {
|
|
2147
|
-
fontSize: 10,
|
|
2148
|
-
lineHeight: "14px",
|
|
2149
|
-
fontWeight: 400,
|
|
2150
|
-
scaleStep: "75",
|
|
2151
|
-
lineHeightCategory: "compact",
|
|
2152
|
-
accent: { fontWeight: 500 },
|
|
2153
|
-
paragraph: {
|
|
2154
|
-
lineHeight: "14px",
|
|
2155
|
-
spacing: 6,
|
|
2156
|
-
lineHeightScaleStep: "75"
|
|
2157
|
-
}
|
|
2158
|
-
}
|
|
2159
|
-
}
|
|
2160
|
-
},
|
|
2161
|
-
presentation: {
|
|
2162
|
-
heading: {
|
|
2163
|
-
h1: {
|
|
2164
|
-
fontSize: 56,
|
|
2165
|
-
lineHeight: "56px",
|
|
2166
|
-
fontWeight: 700,
|
|
2167
|
-
scaleStep: "650",
|
|
2168
|
-
lineHeightCategory: "display"
|
|
2169
|
-
},
|
|
2170
|
-
h2: {
|
|
2171
|
-
fontSize: 48,
|
|
2172
|
-
lineHeight: "48px",
|
|
2173
|
-
fontWeight: 700,
|
|
2174
|
-
scaleStep: "550",
|
|
2175
|
-
lineHeightCategory: "display"
|
|
2176
|
-
},
|
|
2177
|
-
h3: {
|
|
2178
|
-
fontSize: 40,
|
|
2179
|
-
lineHeight: "40px",
|
|
2180
|
-
fontWeight: 700,
|
|
2181
|
-
scaleStep: "450",
|
|
2182
|
-
lineHeightCategory: "display"
|
|
2183
|
-
},
|
|
2184
|
-
h4: {
|
|
2185
|
-
fontSize: 32,
|
|
2186
|
-
lineHeight: "32px",
|
|
2187
|
-
fontWeight: 700,
|
|
2188
|
-
scaleStep: "350",
|
|
2189
|
-
lineHeightCategory: "display"
|
|
2190
|
-
},
|
|
2191
|
-
h5: {
|
|
2192
|
-
fontSize: 28,
|
|
2193
|
-
lineHeight: "28px",
|
|
2194
|
-
fontWeight: 700,
|
|
2195
|
-
scaleStep: "300",
|
|
2196
|
-
lineHeightCategory: "display"
|
|
2197
|
-
}
|
|
2198
|
-
},
|
|
2199
|
-
basic: {
|
|
2200
|
-
display: {
|
|
2201
|
-
fontSize: 64,
|
|
2202
|
-
lineHeight: "64px",
|
|
2203
|
-
fontWeight: 800,
|
|
2204
|
-
scaleStep: "750",
|
|
2205
|
-
lineHeightCategory: "display"
|
|
2206
|
-
},
|
|
2207
|
-
"body-lg": {
|
|
2208
|
-
fontSize: 24,
|
|
2209
|
-
lineHeight: "30px",
|
|
2210
|
-
fontWeight: 400,
|
|
2211
|
-
scaleStep: "250",
|
|
2212
|
-
lineHeightCategory: "compact",
|
|
2213
|
-
accent: { fontWeight: 500 },
|
|
2214
|
-
paragraph: {
|
|
2215
|
-
lineHeight: "34px",
|
|
2216
|
-
spacing: 24,
|
|
2217
|
-
lineHeightScaleStep: "250"
|
|
2218
|
-
}
|
|
2219
|
-
},
|
|
2220
|
-
"body-md": {
|
|
2221
|
-
fontSize: 20,
|
|
2222
|
-
lineHeight: "26px",
|
|
2223
|
-
fontWeight: 400,
|
|
2224
|
-
scaleStep: "200",
|
|
2225
|
-
lineHeightCategory: "compact",
|
|
2226
|
-
accent: { fontWeight: 500 },
|
|
2227
|
-
paragraph: {
|
|
2228
|
-
lineHeight: "28px",
|
|
2229
|
-
spacing: 20,
|
|
2230
|
-
lineHeightScaleStep: "200"
|
|
2231
|
-
}
|
|
2232
|
-
},
|
|
2233
|
-
"body-sm": {
|
|
2234
|
-
fontSize: 18,
|
|
2235
|
-
lineHeight: "24px",
|
|
2236
|
-
fontWeight: 400,
|
|
2237
|
-
scaleStep: "175",
|
|
2238
|
-
lineHeightCategory: "compact",
|
|
2239
|
-
accent: { fontWeight: 500 },
|
|
2240
|
-
paragraph: {
|
|
2241
|
-
lineHeight: "26px",
|
|
2242
|
-
spacing: 16,
|
|
2243
|
-
lineHeightScaleStep: "175"
|
|
2244
|
-
}
|
|
2245
|
-
},
|
|
2246
|
-
"body-xs": {
|
|
2247
|
-
fontSize: 16,
|
|
2248
|
-
lineHeight: "20px",
|
|
2249
|
-
fontWeight: 400,
|
|
2250
|
-
scaleStep: "150",
|
|
2251
|
-
lineHeightCategory: "compact",
|
|
2252
|
-
accent: { fontWeight: 500 },
|
|
2253
|
-
paragraph: {
|
|
2254
|
-
lineHeight: "22px",
|
|
2255
|
-
spacing: 12,
|
|
2256
|
-
lineHeightScaleStep: "150"
|
|
2257
|
-
}
|
|
2258
|
-
},
|
|
2259
|
-
"body-xxs": {
|
|
2260
|
-
fontSize: 16,
|
|
2261
|
-
lineHeight: "20px",
|
|
2262
|
-
fontWeight: 400,
|
|
2263
|
-
scaleStep: "150",
|
|
2264
|
-
lineHeightCategory: "compact",
|
|
2265
|
-
accent: { fontWeight: 500 },
|
|
2266
|
-
paragraph: {
|
|
2267
|
-
lineHeight: "22px",
|
|
2268
|
-
spacing: 12,
|
|
2269
|
-
lineHeightScaleStep: "150"
|
|
2270
|
-
}
|
|
2271
|
-
}
|
|
2272
|
-
}
|
|
2273
2128
|
}
|
|
2274
2129
|
};
|
|
2275
2130
|
var defaultProductContext = "b2b";
|
|
@@ -2321,35 +2176,31 @@ var isIOS = isNative && typeof global !== "undefined" && global.Platform?.OS ===
|
|
|
2321
2176
|
var isAndroid = isNative && typeof global !== "undefined" && global.Platform?.OS === "android";
|
|
2322
2177
|
|
|
2323
2178
|
// src/fonts/fontFaces.ts
|
|
2324
|
-
var
|
|
2325
|
-
var
|
|
2179
|
+
var CDN = "https://cdn.xsolla.net/xsolla-ui-toolkit-prod/fonts/v1";
|
|
2180
|
+
var UNICODE_RANGE_LATIN = "U+0000-024F, U+0250-02AF, U+0300-036F, U+0370-03FF, U+0400-04FF, U+2000-206F, U+20A0-20CF, U+2100-214F";
|
|
2181
|
+
var UNICODE_RANGE_CN = "U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF";
|
|
2182
|
+
var UNICODE_RANGE_JP = "U+3000-303F, U+3040-309F, U+30A0-30FF, U+31F0-31FF, U+FF65-FF9F";
|
|
2183
|
+
var UNICODE_RANGE_KR = "U+1100-11FF, U+3130-318F, U+A960-A97F, U+AC00-D7A3, U+D7B0-D7FF, U+FFA0-FFDC";
|
|
2326
2184
|
var fontFacesCSS = `
|
|
2327
2185
|
/* \u2500\u2500 Pilat Wide (B2C headings) \u2500\u2500 */
|
|
2328
2186
|
|
|
2329
2187
|
@font-face {
|
|
2330
2188
|
font-family: 'Pilat Wide';
|
|
2331
|
-
src: url('${
|
|
2332
|
-
font-weight: 400;
|
|
2333
|
-
font-style: normal;
|
|
2334
|
-
font-display: swap;
|
|
2335
|
-
}
|
|
2336
|
-
@font-face {
|
|
2337
|
-
font-family: 'Pilat Wide';
|
|
2338
|
-
src: url('${CDN_STRAPI}/Pilat_Test_Demi_Bold_bee67c470a/Pilat_Test_Demi_Bold_bee67c470a.ttf') format('truetype');
|
|
2189
|
+
src: url('${CDN}/pilat-wide/pilat-wide-600.woff2') format('woff2');
|
|
2339
2190
|
font-weight: 600;
|
|
2340
2191
|
font-style: normal;
|
|
2341
2192
|
font-display: swap;
|
|
2342
2193
|
}
|
|
2343
2194
|
@font-face {
|
|
2344
2195
|
font-family: 'Pilat Wide';
|
|
2345
|
-
src: url('${
|
|
2196
|
+
src: url('${CDN}/pilat-wide/pilat-wide-700.woff2') format('woff2');
|
|
2346
2197
|
font-weight: 700;
|
|
2347
2198
|
font-style: normal;
|
|
2348
2199
|
font-display: swap;
|
|
2349
2200
|
}
|
|
2350
2201
|
@font-face {
|
|
2351
2202
|
font-family: 'Pilat Wide';
|
|
2352
|
-
src: url('${
|
|
2203
|
+
src: url('${CDN}/pilat-wide/pilat-wide-800.woff2') format('woff2');
|
|
2353
2204
|
font-weight: 800;
|
|
2354
2205
|
font-style: normal;
|
|
2355
2206
|
font-display: swap;
|
|
@@ -2359,76 +2210,153 @@ var fontFacesCSS = `
|
|
|
2359
2210
|
|
|
2360
2211
|
@font-face {
|
|
2361
2212
|
font-family: 'Pilat';
|
|
2362
|
-
src: url('${
|
|
2213
|
+
src: url('${CDN}/pilat/pilat-300.woff2') format('woff2');
|
|
2363
2214
|
font-weight: 300;
|
|
2364
2215
|
font-style: normal;
|
|
2365
2216
|
font-display: swap;
|
|
2366
2217
|
}
|
|
2367
2218
|
@font-face {
|
|
2368
2219
|
font-family: 'Pilat';
|
|
2369
|
-
src: url('${
|
|
2220
|
+
src: url('${CDN}/pilat/pilat-400.woff2') format('woff2');
|
|
2370
2221
|
font-weight: 400;
|
|
2371
2222
|
font-style: normal;
|
|
2372
2223
|
font-display: swap;
|
|
2373
2224
|
}
|
|
2374
2225
|
@font-face {
|
|
2375
2226
|
font-family: 'Pilat';
|
|
2376
|
-
src: url('${
|
|
2227
|
+
src: url('${CDN}/pilat/pilat-500.woff2') format('woff2');
|
|
2228
|
+
font-weight: 500;
|
|
2229
|
+
font-style: normal;
|
|
2230
|
+
font-display: swap;
|
|
2231
|
+
}
|
|
2232
|
+
@font-face {
|
|
2233
|
+
font-family: 'Pilat';
|
|
2234
|
+
src: url('${CDN}/pilat/pilat-600.woff2') format('woff2');
|
|
2377
2235
|
font-weight: 600;
|
|
2378
2236
|
font-style: normal;
|
|
2379
2237
|
font-display: swap;
|
|
2380
2238
|
}
|
|
2381
2239
|
@font-face {
|
|
2382
2240
|
font-family: 'Pilat';
|
|
2383
|
-
src: url('${
|
|
2241
|
+
src: url('${CDN}/pilat/pilat-700.woff2') format('woff2');
|
|
2384
2242
|
font-weight: 700;
|
|
2385
2243
|
font-style: normal;
|
|
2386
2244
|
font-display: swap;
|
|
2387
2245
|
}
|
|
2388
2246
|
@font-face {
|
|
2389
2247
|
font-family: 'Pilat';
|
|
2390
|
-
src: url('${
|
|
2248
|
+
src: url('${CDN}/pilat/pilat-800.woff2') format('woff2');
|
|
2391
2249
|
font-weight: 800;
|
|
2392
2250
|
font-style: normal;
|
|
2393
2251
|
font-display: swap;
|
|
2394
2252
|
}
|
|
2395
2253
|
|
|
2396
|
-
/* \u2500\u2500 Aktiv Grotesk (body) \u2014
|
|
2254
|
+
/* \u2500\u2500 Aktiv Grotesk (body) \u2014 Latin \u2500\u2500 */
|
|
2397
2255
|
|
|
2398
2256
|
@font-face {
|
|
2399
2257
|
font-family: 'Aktiv Grotesk';
|
|
2400
|
-
src: url('${
|
|
2401
|
-
font-weight:
|
|
2258
|
+
src: url('${CDN}/aktiv-grotesk/latin/aktiv-grotesk-latin-400.woff2') format('woff2');
|
|
2259
|
+
font-weight: 400;
|
|
2260
|
+
font-style: normal;
|
|
2261
|
+
font-display: swap;
|
|
2262
|
+
unicode-range: ${UNICODE_RANGE_LATIN};
|
|
2263
|
+
}
|
|
2264
|
+
@font-face {
|
|
2265
|
+
font-family: 'Aktiv Grotesk';
|
|
2266
|
+
src: url('${CDN}/aktiv-grotesk/latin/aktiv-grotesk-latin-500.woff2') format('woff2');
|
|
2267
|
+
font-weight: 500;
|
|
2268
|
+
font-style: normal;
|
|
2269
|
+
font-display: swap;
|
|
2270
|
+
unicode-range: ${UNICODE_RANGE_LATIN};
|
|
2271
|
+
}
|
|
2272
|
+
@font-face {
|
|
2273
|
+
font-family: 'Aktiv Grotesk';
|
|
2274
|
+
src: url('${CDN}/aktiv-grotesk/latin/aktiv-grotesk-latin-600.woff2') format('woff2');
|
|
2275
|
+
font-weight: 600;
|
|
2402
2276
|
font-style: normal;
|
|
2403
2277
|
font-display: swap;
|
|
2278
|
+
unicode-range: ${UNICODE_RANGE_LATIN};
|
|
2404
2279
|
}
|
|
2280
|
+
|
|
2281
|
+
/* \u2500\u2500 Aktiv Grotesk (body) \u2014 Chinese / SG \u2500\u2500 */
|
|
2282
|
+
|
|
2405
2283
|
@font-face {
|
|
2406
2284
|
font-family: 'Aktiv Grotesk';
|
|
2407
|
-
src: url('${
|
|
2285
|
+
src: url('${CDN}/aktiv-grotesk/cn-sg/aktiv-grotesk-cn-sg-400.woff2') format('woff2');
|
|
2408
2286
|
font-weight: 400;
|
|
2409
2287
|
font-style: normal;
|
|
2410
2288
|
font-display: swap;
|
|
2289
|
+
unicode-range: ${UNICODE_RANGE_CN};
|
|
2411
2290
|
}
|
|
2412
2291
|
@font-face {
|
|
2413
2292
|
font-family: 'Aktiv Grotesk';
|
|
2414
|
-
src: url('${
|
|
2293
|
+
src: url('${CDN}/aktiv-grotesk/cn-sg/aktiv-grotesk-cn-sg-500.woff2') format('woff2');
|
|
2415
2294
|
font-weight: 500;
|
|
2416
2295
|
font-style: normal;
|
|
2417
2296
|
font-display: swap;
|
|
2297
|
+
unicode-range: ${UNICODE_RANGE_CN};
|
|
2418
2298
|
}
|
|
2419
2299
|
@font-face {
|
|
2420
2300
|
font-family: 'Aktiv Grotesk';
|
|
2421
|
-
src: url('${
|
|
2301
|
+
src: url('${CDN}/aktiv-grotesk/cn-sg/aktiv-grotesk-cn-sg-600.woff2') format('woff2');
|
|
2422
2302
|
font-weight: 600;
|
|
2423
2303
|
font-style: normal;
|
|
2424
2304
|
font-display: swap;
|
|
2305
|
+
unicode-range: ${UNICODE_RANGE_CN};
|
|
2425
2306
|
}
|
|
2307
|
+
|
|
2308
|
+
/* \u2500\u2500 Aktiv Grotesk (body) \u2014 Japanese \u2500\u2500 */
|
|
2309
|
+
|
|
2426
2310
|
@font-face {
|
|
2427
2311
|
font-family: 'Aktiv Grotesk';
|
|
2428
|
-
src: url('${
|
|
2429
|
-
font-weight:
|
|
2312
|
+
src: url('${CDN}/aktiv-grotesk/jp/aktiv-grotesk-jp-400.woff2') format('woff2');
|
|
2313
|
+
font-weight: 400;
|
|
2314
|
+
font-style: normal;
|
|
2315
|
+
font-display: swap;
|
|
2316
|
+
unicode-range: ${UNICODE_RANGE_JP};
|
|
2317
|
+
}
|
|
2318
|
+
@font-face {
|
|
2319
|
+
font-family: 'Aktiv Grotesk';
|
|
2320
|
+
src: url('${CDN}/aktiv-grotesk/jp/aktiv-grotesk-jp-500.woff2') format('woff2');
|
|
2321
|
+
font-weight: 500;
|
|
2322
|
+
font-style: normal;
|
|
2323
|
+
font-display: swap;
|
|
2324
|
+
unicode-range: ${UNICODE_RANGE_JP};
|
|
2325
|
+
}
|
|
2326
|
+
@font-face {
|
|
2327
|
+
font-family: 'Aktiv Grotesk';
|
|
2328
|
+
src: url('${CDN}/aktiv-grotesk/jp/aktiv-grotesk-jp-600.woff2') format('woff2');
|
|
2329
|
+
font-weight: 600;
|
|
2330
|
+
font-style: normal;
|
|
2331
|
+
font-display: swap;
|
|
2332
|
+
unicode-range: ${UNICODE_RANGE_JP};
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
/* \u2500\u2500 Aktiv Grotesk (body) \u2014 Korean \u2500\u2500 */
|
|
2336
|
+
|
|
2337
|
+
@font-face {
|
|
2338
|
+
font-family: 'Aktiv Grotesk';
|
|
2339
|
+
src: url('${CDN}/aktiv-grotesk/kr/aktiv-grotesk-kr-400.woff2') format('woff2');
|
|
2340
|
+
font-weight: 400;
|
|
2430
2341
|
font-style: normal;
|
|
2431
2342
|
font-display: swap;
|
|
2343
|
+
unicode-range: ${UNICODE_RANGE_KR};
|
|
2344
|
+
}
|
|
2345
|
+
@font-face {
|
|
2346
|
+
font-family: 'Aktiv Grotesk';
|
|
2347
|
+
src: url('${CDN}/aktiv-grotesk/kr/aktiv-grotesk-kr-500.woff2') format('woff2');
|
|
2348
|
+
font-weight: 500;
|
|
2349
|
+
font-style: normal;
|
|
2350
|
+
font-display: swap;
|
|
2351
|
+
unicode-range: ${UNICODE_RANGE_KR};
|
|
2352
|
+
}
|
|
2353
|
+
@font-face {
|
|
2354
|
+
font-family: 'Aktiv Grotesk';
|
|
2355
|
+
src: url('${CDN}/aktiv-grotesk/kr/aktiv-grotesk-kr-600.woff2') format('woff2');
|
|
2356
|
+
font-weight: 600;
|
|
2357
|
+
font-style: normal;
|
|
2358
|
+
font-display: swap;
|
|
2359
|
+
unicode-range: ${UNICODE_RANGE_KR};
|
|
2432
2360
|
}
|
|
2433
2361
|
`;
|
|
2434
2362
|
|
|
@@ -2457,89 +2385,6 @@ FontLoader.displayName = "FontLoader";
|
|
|
2457
2385
|
// src/styles/TypographyStyleLoader.tsx
|
|
2458
2386
|
import { useEffect as useEffect2, useRef as useRef2 } from "react";
|
|
2459
2387
|
|
|
2460
|
-
// src/tokens/responsive-typography.ts
|
|
2461
|
-
var SCALE_STEPS = [
|
|
2462
|
-
"75",
|
|
2463
|
-
"100",
|
|
2464
|
-
"125",
|
|
2465
|
-
"150",
|
|
2466
|
-
"175",
|
|
2467
|
-
"200",
|
|
2468
|
-
"250",
|
|
2469
|
-
"300",
|
|
2470
|
-
"350",
|
|
2471
|
-
"450",
|
|
2472
|
-
"550",
|
|
2473
|
-
"650",
|
|
2474
|
-
"750"
|
|
2475
|
-
];
|
|
2476
|
-
var fontSize = {
|
|
2477
|
-
"75": { common: 10, mobile: 10, desktop: 10 },
|
|
2478
|
-
"100": { common: 12, mobile: 11, desktop: 12 },
|
|
2479
|
-
"125": { common: 14, mobile: 12, desktop: 14 },
|
|
2480
|
-
"150": { common: 16, mobile: 14, desktop: 16 },
|
|
2481
|
-
"175": { common: 18, mobile: 16, desktop: 18 },
|
|
2482
|
-
"200": { common: 20, mobile: 18, desktop: 20 },
|
|
2483
|
-
"250": { common: 24, mobile: 20, desktop: 24 },
|
|
2484
|
-
"300": { common: 28, mobile: 24, desktop: 28 },
|
|
2485
|
-
"350": { common: 32, mobile: 28, desktop: 32 },
|
|
2486
|
-
"450": { common: 40, mobile: 32, desktop: 40 },
|
|
2487
|
-
"550": { common: 48, mobile: 40, desktop: 48 },
|
|
2488
|
-
"650": { common: 56, mobile: 48, desktop: 56 },
|
|
2489
|
-
"750": { common: 64, mobile: 56, desktop: 64 }
|
|
2490
|
-
};
|
|
2491
|
-
var lineHeightDisplay = {
|
|
2492
|
-
"75": { common: 10, mobile: 10, desktop: 10 },
|
|
2493
|
-
"100": { common: 12, mobile: 11, desktop: 12 },
|
|
2494
|
-
"125": { common: 14, mobile: 12, desktop: 14 },
|
|
2495
|
-
"150": { common: 16, mobile: 14, desktop: 16 },
|
|
2496
|
-
"175": { common: 18, mobile: 16, desktop: 18 },
|
|
2497
|
-
"200": { common: 20, mobile: 18, desktop: 20 },
|
|
2498
|
-
"250": { common: 24, mobile: 20, desktop: 24 },
|
|
2499
|
-
"300": { common: 28, mobile: 24, desktop: 28 },
|
|
2500
|
-
"350": { common: 32, mobile: 28, desktop: 32 },
|
|
2501
|
-
"450": { common: 40, mobile: 32, desktop: 40 },
|
|
2502
|
-
"550": { common: 48, mobile: 40, desktop: 48 },
|
|
2503
|
-
"650": { common: 56, mobile: 48, desktop: 56 },
|
|
2504
|
-
"750": { common: 64, mobile: 56, desktop: 64 }
|
|
2505
|
-
};
|
|
2506
|
-
var lineHeightCompact = {
|
|
2507
|
-
"75": { common: 14, mobile: 13, desktop: 14 },
|
|
2508
|
-
"100": { common: 16, mobile: 14, desktop: 16 },
|
|
2509
|
-
"125": { common: 18, mobile: 16, desktop: 18 },
|
|
2510
|
-
"150": { common: 20, mobile: 18, desktop: 20 },
|
|
2511
|
-
"175": { common: 24, mobile: 20, desktop: 24 },
|
|
2512
|
-
"200": { common: 26, mobile: 24, desktop: 26 },
|
|
2513
|
-
"250": { common: 30, mobile: 26, desktop: 30 },
|
|
2514
|
-
"300": { common: 36, mobile: 30, desktop: 36 },
|
|
2515
|
-
"350": { common: 42, mobile: 36, desktop: 42 },
|
|
2516
|
-
"450": { common: 52, mobile: 42, desktop: 52 },
|
|
2517
|
-
"550": { common: 62, mobile: 52, desktop: 62 },
|
|
2518
|
-
"650": { common: 72, mobile: 62, desktop: 72 },
|
|
2519
|
-
"750": { common: 82, mobile: 72, desktop: 82 }
|
|
2520
|
-
};
|
|
2521
|
-
var lineHeightText = {
|
|
2522
|
-
"75": { common: 14, mobile: 13, desktop: 14 },
|
|
2523
|
-
"100": { common: 18, mobile: 14, desktop: 18 },
|
|
2524
|
-
"125": { common: 20, mobile: 16, desktop: 20 },
|
|
2525
|
-
"150": { common: 22, mobile: 18, desktop: 22 },
|
|
2526
|
-
"175": { common: 26, mobile: 20, desktop: 26 },
|
|
2527
|
-
"200": { common: 28, mobile: 24, desktop: 28 },
|
|
2528
|
-
"250": { common: 34, mobile: 26, desktop: 34 },
|
|
2529
|
-
"300": { common: 40, mobile: 30, desktop: 40 },
|
|
2530
|
-
"350": { common: 44, mobile: 36, desktop: 44 },
|
|
2531
|
-
"450": { common: 56, mobile: 42, desktop: 56 },
|
|
2532
|
-
"550": { common: 66, mobile: 52, desktop: 66 },
|
|
2533
|
-
"650": { common: 78, mobile: 62, desktop: 78 },
|
|
2534
|
-
"750": { common: 88, mobile: 72, desktop: 88 }
|
|
2535
|
-
};
|
|
2536
|
-
var responsiveTypographyScale = {
|
|
2537
|
-
fontSize,
|
|
2538
|
-
lineHeightDisplay,
|
|
2539
|
-
lineHeightCompact,
|
|
2540
|
-
lineHeightText
|
|
2541
|
-
};
|
|
2542
|
-
|
|
2543
2388
|
// src/tokens/breakpoints.ts
|
|
2544
2389
|
var breakpoints = {
|
|
2545
2390
|
/** Mobile: 0 – 767px */
|
|
@@ -2553,35 +2398,23 @@ var MOBILE_MAX_WIDTH = breakpoints.desktop - 1;
|
|
|
2553
2398
|
function buildDeclarations(mode) {
|
|
2554
2399
|
const lines = [];
|
|
2555
2400
|
for (const step of SCALE_STEPS) {
|
|
2556
|
-
|
|
2557
|
-
lines.push(
|
|
2558
|
-
`--xui-font-size-${step}:${fs[mode === "desktop" ? "common" : "mobile"]}px`
|
|
2559
|
-
);
|
|
2401
|
+
lines.push(`--xui-font-size-${step}:${fontSize[step][mode]}px`);
|
|
2560
2402
|
}
|
|
2561
2403
|
for (const step of SCALE_STEPS) {
|
|
2562
|
-
|
|
2563
|
-
lines.push(
|
|
2564
|
-
`--xui-lh-display-${step}:${lh[mode === "desktop" ? "common" : "mobile"]}px`
|
|
2565
|
-
);
|
|
2404
|
+
lines.push(`--xui-lh-display-${step}:${lineHeightDisplay[step][mode]}px`);
|
|
2566
2405
|
}
|
|
2567
2406
|
for (const step of SCALE_STEPS) {
|
|
2568
|
-
|
|
2569
|
-
lines.push(
|
|
2570
|
-
`--xui-lh-compact-${step}:${lh[mode === "desktop" ? "common" : "mobile"]}px`
|
|
2571
|
-
);
|
|
2407
|
+
lines.push(`--xui-lh-compact-${step}:${lineHeightCompact[step][mode]}px`);
|
|
2572
2408
|
}
|
|
2573
2409
|
for (const step of SCALE_STEPS) {
|
|
2574
|
-
|
|
2575
|
-
lines.push(
|
|
2576
|
-
`--xui-lh-text-${step}:${lh[mode === "desktop" ? "common" : "mobile"]}px`
|
|
2577
|
-
);
|
|
2410
|
+
lines.push(`--xui-lh-text-${step}:${lineHeightText[step][mode]}px`);
|
|
2578
2411
|
}
|
|
2579
2412
|
return lines.join(";");
|
|
2580
2413
|
}
|
|
2581
2414
|
var _cached = null;
|
|
2582
2415
|
function generateTypographyCSS() {
|
|
2583
2416
|
if (_cached) return _cached;
|
|
2584
|
-
const desktopVars = buildDeclarations("
|
|
2417
|
+
const desktopVars = buildDeclarations("common");
|
|
2585
2418
|
const mobileVars = buildDeclarations("mobile");
|
|
2586
2419
|
_cached = `:root{${desktopVars}}@media(max-width:${MOBILE_MAX_WIDTH}px){:root{${mobileVars}}}`;
|
|
2587
2420
|
return _cached;
|
|
@@ -3996,7 +3829,8 @@ var XUIProvider = ({
|
|
|
3996
3829
|
children,
|
|
3997
3830
|
initialMode = "dark",
|
|
3998
3831
|
initialProductContext = defaultProductContext,
|
|
3999
|
-
loadFonts = true
|
|
3832
|
+
loadFonts = true,
|
|
3833
|
+
responsive = true
|
|
4000
3834
|
}) => {
|
|
4001
3835
|
const [mode, setMode] = useState(initialMode);
|
|
4002
3836
|
const [productContext, setProductContext] = useState(
|
|
@@ -4008,13 +3842,14 @@ var XUIProvider = ({
|
|
|
4008
3842
|
setMode,
|
|
4009
3843
|
productContext,
|
|
4010
3844
|
setProductContext,
|
|
4011
|
-
theme: themeConfig(mode, productContext)
|
|
3845
|
+
theme: themeConfig(mode, productContext),
|
|
3846
|
+
responsive
|
|
4012
3847
|
}),
|
|
4013
|
-
[mode, productContext]
|
|
3848
|
+
[mode, productContext, responsive]
|
|
4014
3849
|
);
|
|
4015
3850
|
return /* @__PURE__ */ jsxs(DesignSystemContext.Provider, { value, children: [
|
|
4016
3851
|
loadFonts && /* @__PURE__ */ jsx(FontLoader, {}),
|
|
4017
|
-
/* @__PURE__ */ jsx(TypographyStyleLoader, {}),
|
|
3852
|
+
responsive && /* @__PURE__ */ jsx(TypographyStyleLoader, {}),
|
|
4018
3853
|
children
|
|
4019
3854
|
] });
|
|
4020
3855
|
};
|
|
@@ -4028,7 +3863,8 @@ var useDesignSystem = () => {
|
|
|
4028
3863
|
productContext: defaultProductContext,
|
|
4029
3864
|
setProductContext: () => {
|
|
4030
3865
|
},
|
|
4031
|
-
theme: themeConfig("dark", defaultProductContext)
|
|
3866
|
+
theme: themeConfig("dark", defaultProductContext),
|
|
3867
|
+
responsive: true
|
|
4032
3868
|
};
|
|
4033
3869
|
}
|
|
4034
3870
|
return context;
|