@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.js
CHANGED
|
@@ -1860,9 +1860,7 @@ var shadow = {
|
|
|
1860
1860
|
var FALLBACK = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif';
|
|
1861
1861
|
var displayFontByContext = {
|
|
1862
1862
|
b2b: `"Pilat", "Aktiv Grotesk", "Noto Sans", "Montserrat", ${FALLBACK}`,
|
|
1863
|
-
b2c: `"Pilat Wide", "Aktiv Grotesk", "Noto Sans", "Montserrat", ${FALLBACK}
|
|
1864
|
-
paystation: `"Pilat Wide", "Aktiv Grotesk", "Noto Sans", "Montserrat", ${FALLBACK}`,
|
|
1865
|
-
presentation: `"Pilat Wide", "Aktiv Grotesk", "Noto Sans", "Montserrat", ${FALLBACK}`
|
|
1863
|
+
b2c: `"Pilat Wide", "Aktiv Grotesk", "Noto Sans", "Montserrat", ${FALLBACK}`
|
|
1866
1864
|
};
|
|
1867
1865
|
var bodyFont = `"Aktiv Grotesk", "Noto Sans", "Montserrat", ${FALLBACK}`;
|
|
1868
1866
|
var fonts = {
|
|
@@ -1888,41 +1886,124 @@ var typography = {
|
|
|
1888
1886
|
}
|
|
1889
1887
|
};
|
|
1890
1888
|
|
|
1889
|
+
// src/tokens/responsive-typography.ts
|
|
1890
|
+
var SCALE_STEPS = [
|
|
1891
|
+
"75",
|
|
1892
|
+
"100",
|
|
1893
|
+
"125",
|
|
1894
|
+
"150",
|
|
1895
|
+
"175",
|
|
1896
|
+
"200",
|
|
1897
|
+
"250",
|
|
1898
|
+
"300",
|
|
1899
|
+
"350",
|
|
1900
|
+
"450",
|
|
1901
|
+
"550",
|
|
1902
|
+
"650",
|
|
1903
|
+
"750"
|
|
1904
|
+
];
|
|
1905
|
+
var fontSize = {
|
|
1906
|
+
"75": { common: 10, mobile: 10 },
|
|
1907
|
+
"100": { common: 12, mobile: 11 },
|
|
1908
|
+
"125": { common: 14, mobile: 12 },
|
|
1909
|
+
"150": { common: 16, mobile: 14 },
|
|
1910
|
+
"175": { common: 18, mobile: 16 },
|
|
1911
|
+
"200": { common: 20, mobile: 18 },
|
|
1912
|
+
"250": { common: 24, mobile: 20 },
|
|
1913
|
+
"300": { common: 28, mobile: 24 },
|
|
1914
|
+
"350": { common: 32, mobile: 28 },
|
|
1915
|
+
"450": { common: 40, mobile: 32 },
|
|
1916
|
+
"550": { common: 48, mobile: 40 },
|
|
1917
|
+
"650": { common: 56, mobile: 48 },
|
|
1918
|
+
"750": { common: 64, mobile: 56 }
|
|
1919
|
+
};
|
|
1920
|
+
var lineHeightDisplay = {
|
|
1921
|
+
"75": { common: 10, mobile: 10 },
|
|
1922
|
+
"100": { common: 12, mobile: 11 },
|
|
1923
|
+
"125": { common: 14, mobile: 12 },
|
|
1924
|
+
"150": { common: 16, mobile: 14 },
|
|
1925
|
+
"175": { common: 18, mobile: 16 },
|
|
1926
|
+
"200": { common: 20, mobile: 18 },
|
|
1927
|
+
"250": { common: 24, mobile: 20 },
|
|
1928
|
+
"300": { common: 28, mobile: 24 },
|
|
1929
|
+
"350": { common: 32, mobile: 28 },
|
|
1930
|
+
"450": { common: 40, mobile: 32 },
|
|
1931
|
+
"550": { common: 48, mobile: 40 },
|
|
1932
|
+
"650": { common: 56, mobile: 48 },
|
|
1933
|
+
"750": { common: 64, mobile: 56 }
|
|
1934
|
+
};
|
|
1935
|
+
var lineHeightCompact = {
|
|
1936
|
+
"75": { common: 14, mobile: 13 },
|
|
1937
|
+
"100": { common: 16, mobile: 14 },
|
|
1938
|
+
"125": { common: 18, mobile: 16 },
|
|
1939
|
+
"150": { common: 20, mobile: 18 },
|
|
1940
|
+
"175": { common: 24, mobile: 20 },
|
|
1941
|
+
"200": { common: 26, mobile: 24 },
|
|
1942
|
+
"250": { common: 30, mobile: 26 },
|
|
1943
|
+
"300": { common: 36, mobile: 30 },
|
|
1944
|
+
"350": { common: 42, mobile: 36 },
|
|
1945
|
+
"450": { common: 52, mobile: 42 },
|
|
1946
|
+
"550": { common: 62, mobile: 52 },
|
|
1947
|
+
"650": { common: 72, mobile: 62 },
|
|
1948
|
+
"750": { common: 82, mobile: 72 }
|
|
1949
|
+
};
|
|
1950
|
+
var lineHeightText = {
|
|
1951
|
+
"75": { common: 14, mobile: 13 },
|
|
1952
|
+
"100": { common: 18, mobile: 14 },
|
|
1953
|
+
"125": { common: 20, mobile: 16 },
|
|
1954
|
+
"150": { common: 22, mobile: 18 },
|
|
1955
|
+
"175": { common: 26, mobile: 20 },
|
|
1956
|
+
"200": { common: 28, mobile: 24 },
|
|
1957
|
+
"250": { common: 34, mobile: 26 },
|
|
1958
|
+
"300": { common: 40, mobile: 30 },
|
|
1959
|
+
"350": { common: 44, mobile: 36 },
|
|
1960
|
+
"450": { common: 56, mobile: 42 },
|
|
1961
|
+
"550": { common: 66, mobile: 52 },
|
|
1962
|
+
"650": { common: 78, mobile: 62 },
|
|
1963
|
+
"750": { common: 88, mobile: 72 }
|
|
1964
|
+
};
|
|
1965
|
+
var responsiveTypographyScale = {
|
|
1966
|
+
fontSize,
|
|
1967
|
+
lineHeightDisplay,
|
|
1968
|
+
lineHeightCompact,
|
|
1969
|
+
lineHeightText
|
|
1970
|
+
};
|
|
1971
|
+
|
|
1891
1972
|
// src/tokens/typography.ts
|
|
1892
1973
|
var typographyTokens = {
|
|
1893
1974
|
b2c: {
|
|
1894
1975
|
heading: {
|
|
1895
1976
|
h1: {
|
|
1896
|
-
fontSize:
|
|
1897
|
-
lineHeight: "
|
|
1977
|
+
fontSize: fontSize["450"].common,
|
|
1978
|
+
lineHeight: `${lineHeightDisplay["450"].common}px`,
|
|
1898
1979
|
fontWeight: 700,
|
|
1899
1980
|
scaleStep: "450",
|
|
1900
1981
|
lineHeightCategory: "display"
|
|
1901
1982
|
},
|
|
1902
1983
|
h2: {
|
|
1903
|
-
fontSize:
|
|
1904
|
-
lineHeight: "
|
|
1984
|
+
fontSize: fontSize["350"].common,
|
|
1985
|
+
lineHeight: `${lineHeightDisplay["350"].common}px`,
|
|
1905
1986
|
fontWeight: 700,
|
|
1906
1987
|
scaleStep: "350",
|
|
1907
1988
|
lineHeightCategory: "display"
|
|
1908
1989
|
},
|
|
1909
1990
|
h3: {
|
|
1910
|
-
fontSize:
|
|
1911
|
-
lineHeight: "
|
|
1991
|
+
fontSize: fontSize["300"].common,
|
|
1992
|
+
lineHeight: `${lineHeightDisplay["300"].common}px`,
|
|
1912
1993
|
fontWeight: 700,
|
|
1913
1994
|
scaleStep: "300",
|
|
1914
1995
|
lineHeightCategory: "display"
|
|
1915
1996
|
},
|
|
1916
1997
|
h4: {
|
|
1917
|
-
fontSize:
|
|
1918
|
-
lineHeight: "
|
|
1998
|
+
fontSize: fontSize["250"].common,
|
|
1999
|
+
lineHeight: `${lineHeightDisplay["250"].common}px`,
|
|
1919
2000
|
fontWeight: 700,
|
|
1920
2001
|
scaleStep: "250",
|
|
1921
2002
|
lineHeightCategory: "display"
|
|
1922
2003
|
},
|
|
1923
2004
|
h5: {
|
|
1924
|
-
fontSize:
|
|
1925
|
-
lineHeight: "
|
|
2005
|
+
fontSize: fontSize["200"].common,
|
|
2006
|
+
lineHeight: `${lineHeightDisplay["200"].common}px`,
|
|
1926
2007
|
fontWeight: 700,
|
|
1927
2008
|
scaleStep: "200",
|
|
1928
2009
|
lineHeightCategory: "display"
|
|
@@ -1930,73 +2011,73 @@ var typographyTokens = {
|
|
|
1930
2011
|
},
|
|
1931
2012
|
basic: {
|
|
1932
2013
|
display: {
|
|
1933
|
-
fontSize:
|
|
1934
|
-
lineHeight: "
|
|
1935
|
-
fontWeight:
|
|
1936
|
-
scaleStep: "
|
|
1937
|
-
lineHeightCategory: "
|
|
2014
|
+
fontSize: fontSize["550"].common,
|
|
2015
|
+
lineHeight: `${lineHeightDisplay["550"].common}px`,
|
|
2016
|
+
fontWeight: 800,
|
|
2017
|
+
scaleStep: "550",
|
|
2018
|
+
lineHeightCategory: "display"
|
|
1938
2019
|
},
|
|
1939
2020
|
"body-lg": {
|
|
1940
|
-
fontSize:
|
|
1941
|
-
lineHeight: "
|
|
2021
|
+
fontSize: fontSize["175"].common,
|
|
2022
|
+
lineHeight: `${lineHeightCompact["175"].common}px`,
|
|
1942
2023
|
fontWeight: 400,
|
|
1943
2024
|
scaleStep: "175",
|
|
1944
2025
|
lineHeightCategory: "compact",
|
|
1945
2026
|
accent: { fontWeight: 500 },
|
|
1946
2027
|
paragraph: {
|
|
1947
|
-
lineHeight: "
|
|
2028
|
+
lineHeight: `${lineHeightText["175"].common}px`,
|
|
1948
2029
|
spacing: 20,
|
|
1949
2030
|
lineHeightScaleStep: "175"
|
|
1950
2031
|
}
|
|
1951
2032
|
},
|
|
1952
2033
|
"body-md": {
|
|
1953
|
-
fontSize:
|
|
1954
|
-
lineHeight: "
|
|
2034
|
+
fontSize: fontSize["150"].common,
|
|
2035
|
+
lineHeight: `${lineHeightCompact["150"].common}px`,
|
|
1955
2036
|
fontWeight: 400,
|
|
1956
2037
|
scaleStep: "150",
|
|
1957
2038
|
lineHeightCategory: "compact",
|
|
1958
2039
|
accent: { fontWeight: 500 },
|
|
1959
2040
|
paragraph: {
|
|
1960
|
-
lineHeight: "
|
|
2041
|
+
lineHeight: `${lineHeightText["150"].common}px`,
|
|
1961
2042
|
spacing: 16,
|
|
1962
2043
|
lineHeightScaleStep: "150"
|
|
1963
2044
|
}
|
|
1964
2045
|
},
|
|
1965
2046
|
"body-sm": {
|
|
1966
|
-
fontSize:
|
|
1967
|
-
lineHeight: "
|
|
2047
|
+
fontSize: fontSize["125"].common,
|
|
2048
|
+
lineHeight: `${lineHeightCompact["125"].common}px`,
|
|
1968
2049
|
fontWeight: 400,
|
|
1969
2050
|
scaleStep: "125",
|
|
1970
2051
|
lineHeightCategory: "compact",
|
|
1971
2052
|
accent: { fontWeight: 500 },
|
|
1972
2053
|
paragraph: {
|
|
1973
|
-
lineHeight: "
|
|
2054
|
+
lineHeight: `${lineHeightText["125"].common}px`,
|
|
1974
2055
|
spacing: 12,
|
|
1975
2056
|
lineHeightScaleStep: "125"
|
|
1976
2057
|
}
|
|
1977
2058
|
},
|
|
1978
2059
|
"body-xs": {
|
|
1979
|
-
fontSize:
|
|
1980
|
-
lineHeight: "
|
|
2060
|
+
fontSize: fontSize["100"].common,
|
|
2061
|
+
lineHeight: `${lineHeightCompact["100"].common}px`,
|
|
1981
2062
|
fontWeight: 400,
|
|
1982
2063
|
scaleStep: "100",
|
|
1983
2064
|
lineHeightCategory: "compact",
|
|
1984
2065
|
accent: { fontWeight: 500 },
|
|
1985
2066
|
paragraph: {
|
|
1986
|
-
lineHeight: "
|
|
2067
|
+
lineHeight: `${lineHeightText["100"].common}px`,
|
|
1987
2068
|
spacing: 8,
|
|
1988
2069
|
lineHeightScaleStep: "100"
|
|
1989
2070
|
}
|
|
1990
2071
|
},
|
|
1991
2072
|
"body-xxs": {
|
|
1992
|
-
fontSize:
|
|
1993
|
-
lineHeight: "
|
|
2073
|
+
fontSize: fontSize["75"].common,
|
|
2074
|
+
lineHeight: `${lineHeightCompact["75"].common}px`,
|
|
1994
2075
|
fontWeight: 400,
|
|
1995
2076
|
scaleStep: "75",
|
|
1996
2077
|
lineHeightCategory: "compact",
|
|
1997
2078
|
accent: { fontWeight: 500 },
|
|
1998
2079
|
paragraph: {
|
|
1999
|
-
lineHeight: "
|
|
2080
|
+
lineHeight: `${lineHeightText["75"].common}px`,
|
|
2000
2081
|
spacing: 6,
|
|
2001
2082
|
lineHeightScaleStep: "75"
|
|
2002
2083
|
}
|
|
@@ -2006,36 +2087,36 @@ var typographyTokens = {
|
|
|
2006
2087
|
b2b: {
|
|
2007
2088
|
heading: {
|
|
2008
2089
|
h1: {
|
|
2009
|
-
fontSize:
|
|
2010
|
-
lineHeight: "
|
|
2090
|
+
fontSize: fontSize["650"].common,
|
|
2091
|
+
lineHeight: `${lineHeightDisplay["650"].common}px`,
|
|
2011
2092
|
fontWeight: 400,
|
|
2012
2093
|
scaleStep: "650",
|
|
2013
2094
|
lineHeightCategory: "display"
|
|
2014
2095
|
},
|
|
2015
2096
|
h2: {
|
|
2016
|
-
fontSize:
|
|
2017
|
-
lineHeight: "
|
|
2097
|
+
fontSize: fontSize["550"].common,
|
|
2098
|
+
lineHeight: `${lineHeightDisplay["550"].common}px`,
|
|
2018
2099
|
fontWeight: 400,
|
|
2019
2100
|
scaleStep: "550",
|
|
2020
2101
|
lineHeightCategory: "display"
|
|
2021
2102
|
},
|
|
2022
2103
|
h3: {
|
|
2023
|
-
fontSize:
|
|
2024
|
-
lineHeight: "
|
|
2104
|
+
fontSize: fontSize["350"].common,
|
|
2105
|
+
lineHeight: `${lineHeightDisplay["350"].common}px`,
|
|
2025
2106
|
fontWeight: 400,
|
|
2026
2107
|
scaleStep: "350",
|
|
2027
2108
|
lineHeightCategory: "display"
|
|
2028
2109
|
},
|
|
2029
2110
|
h4: {
|
|
2030
|
-
fontSize:
|
|
2031
|
-
lineHeight: "
|
|
2111
|
+
fontSize: fontSize["250"].common,
|
|
2112
|
+
lineHeight: `${lineHeightDisplay["250"].common}px`,
|
|
2032
2113
|
fontWeight: 400,
|
|
2033
2114
|
scaleStep: "250",
|
|
2034
2115
|
lineHeightCategory: "display"
|
|
2035
2116
|
},
|
|
2036
2117
|
h5: {
|
|
2037
|
-
fontSize:
|
|
2038
|
-
lineHeight: "
|
|
2118
|
+
fontSize: fontSize["200"].common,
|
|
2119
|
+
lineHeight: `${lineHeightDisplay["200"].common}px`,
|
|
2039
2120
|
fontWeight: 600,
|
|
2040
2121
|
scaleStep: "200",
|
|
2041
2122
|
lineHeightCategory: "display"
|
|
@@ -2043,304 +2124,78 @@ var typographyTokens = {
|
|
|
2043
2124
|
},
|
|
2044
2125
|
basic: {
|
|
2045
2126
|
display: {
|
|
2046
|
-
fontSize:
|
|
2047
|
-
lineHeight: "
|
|
2127
|
+
fontSize: fontSize["750"].common,
|
|
2128
|
+
lineHeight: `${lineHeightDisplay["750"].common}px`,
|
|
2048
2129
|
fontWeight: 400,
|
|
2049
2130
|
scaleStep: "750",
|
|
2050
2131
|
lineHeightCategory: "display"
|
|
2051
2132
|
},
|
|
2052
2133
|
"body-lg": {
|
|
2053
|
-
fontSize:
|
|
2054
|
-
lineHeight: "
|
|
2134
|
+
fontSize: fontSize["175"].common,
|
|
2135
|
+
lineHeight: `${lineHeightCompact["175"].common}px`,
|
|
2055
2136
|
fontWeight: 400,
|
|
2056
2137
|
scaleStep: "175",
|
|
2057
2138
|
lineHeightCategory: "compact",
|
|
2058
2139
|
accent: { fontWeight: 500 },
|
|
2059
2140
|
paragraph: {
|
|
2060
|
-
lineHeight: "
|
|
2141
|
+
lineHeight: `${lineHeightText["175"].common}px`,
|
|
2061
2142
|
spacing: 20,
|
|
2062
2143
|
lineHeightScaleStep: "175"
|
|
2063
2144
|
}
|
|
2064
2145
|
},
|
|
2065
2146
|
"body-md": {
|
|
2066
|
-
fontSize:
|
|
2067
|
-
lineHeight: "
|
|
2147
|
+
fontSize: fontSize["150"].common,
|
|
2148
|
+
lineHeight: `${lineHeightCompact["150"].common}px`,
|
|
2068
2149
|
fontWeight: 400,
|
|
2069
2150
|
scaleStep: "150",
|
|
2070
2151
|
lineHeightCategory: "compact",
|
|
2071
2152
|
accent: { fontWeight: 500 },
|
|
2072
2153
|
paragraph: {
|
|
2073
|
-
lineHeight: "
|
|
2154
|
+
lineHeight: `${lineHeightText["150"].common}px`,
|
|
2074
2155
|
spacing: 16,
|
|
2075
2156
|
lineHeightScaleStep: "150"
|
|
2076
2157
|
}
|
|
2077
2158
|
},
|
|
2078
2159
|
"body-sm": {
|
|
2079
|
-
fontSize:
|
|
2080
|
-
lineHeight: "
|
|
2160
|
+
fontSize: fontSize["125"].common,
|
|
2161
|
+
lineHeight: `${lineHeightCompact["125"].common}px`,
|
|
2081
2162
|
fontWeight: 400,
|
|
2082
2163
|
scaleStep: "125",
|
|
2083
2164
|
lineHeightCategory: "compact",
|
|
2084
2165
|
accent: { fontWeight: 500 },
|
|
2085
2166
|
paragraph: {
|
|
2086
|
-
lineHeight: "
|
|
2167
|
+
lineHeight: `${lineHeightText["125"].common}px`,
|
|
2087
2168
|
spacing: 12,
|
|
2088
2169
|
lineHeightScaleStep: "125"
|
|
2089
2170
|
}
|
|
2090
2171
|
},
|
|
2091
2172
|
"body-xs": {
|
|
2092
|
-
fontSize:
|
|
2093
|
-
lineHeight: "
|
|
2173
|
+
fontSize: fontSize["100"].common,
|
|
2174
|
+
lineHeight: `${lineHeightCompact["100"].common}px`,
|
|
2094
2175
|
fontWeight: 400,
|
|
2095
2176
|
scaleStep: "100",
|
|
2096
2177
|
lineHeightCategory: "compact",
|
|
2097
2178
|
accent: { fontWeight: 500 },
|
|
2098
2179
|
paragraph: {
|
|
2099
|
-
lineHeight: "
|
|
2180
|
+
lineHeight: `${lineHeightText["100"].common}px`,
|
|
2100
2181
|
spacing: 8,
|
|
2101
2182
|
lineHeightScaleStep: "100"
|
|
2102
2183
|
}
|
|
2103
2184
|
},
|
|
2104
2185
|
"body-xxs": {
|
|
2105
|
-
fontSize:
|
|
2106
|
-
lineHeight: "
|
|
2186
|
+
fontSize: fontSize["75"].common,
|
|
2187
|
+
lineHeight: `${lineHeightCompact["75"].common}px`,
|
|
2107
2188
|
fontWeight: 400,
|
|
2108
2189
|
scaleStep: "75",
|
|
2109
2190
|
lineHeightCategory: "compact",
|
|
2110
2191
|
accent: { fontWeight: 500 },
|
|
2111
2192
|
paragraph: {
|
|
2112
|
-
lineHeight: "
|
|
2193
|
+
lineHeight: `${lineHeightText["75"].common}px`,
|
|
2113
2194
|
spacing: 6,
|
|
2114
2195
|
lineHeightScaleStep: "75"
|
|
2115
2196
|
}
|
|
2116
2197
|
}
|
|
2117
2198
|
}
|
|
2118
|
-
},
|
|
2119
|
-
paystation: {
|
|
2120
|
-
heading: {
|
|
2121
|
-
h1: {
|
|
2122
|
-
fontSize: 28,
|
|
2123
|
-
lineHeight: "28px",
|
|
2124
|
-
fontWeight: 700,
|
|
2125
|
-
scaleStep: "300",
|
|
2126
|
-
lineHeightCategory: "display"
|
|
2127
|
-
},
|
|
2128
|
-
h2: {
|
|
2129
|
-
fontSize: 24,
|
|
2130
|
-
lineHeight: "24px",
|
|
2131
|
-
fontWeight: 700,
|
|
2132
|
-
scaleStep: "250",
|
|
2133
|
-
lineHeightCategory: "display"
|
|
2134
|
-
},
|
|
2135
|
-
h3: {
|
|
2136
|
-
fontSize: 20,
|
|
2137
|
-
lineHeight: "20px",
|
|
2138
|
-
fontWeight: 700,
|
|
2139
|
-
scaleStep: "200",
|
|
2140
|
-
lineHeightCategory: "display"
|
|
2141
|
-
},
|
|
2142
|
-
h4: {
|
|
2143
|
-
fontSize: 18,
|
|
2144
|
-
lineHeight: "18px",
|
|
2145
|
-
fontWeight: 700,
|
|
2146
|
-
scaleStep: "175",
|
|
2147
|
-
lineHeightCategory: "display"
|
|
2148
|
-
},
|
|
2149
|
-
h5: {
|
|
2150
|
-
fontSize: 16,
|
|
2151
|
-
lineHeight: "16px",
|
|
2152
|
-
fontWeight: 700,
|
|
2153
|
-
scaleStep: "150",
|
|
2154
|
-
lineHeightCategory: "display"
|
|
2155
|
-
}
|
|
2156
|
-
},
|
|
2157
|
-
basic: {
|
|
2158
|
-
display: {
|
|
2159
|
-
fontSize: 40,
|
|
2160
|
-
lineHeight: "40px",
|
|
2161
|
-
fontWeight: 800,
|
|
2162
|
-
scaleStep: "450",
|
|
2163
|
-
lineHeightCategory: "display"
|
|
2164
|
-
},
|
|
2165
|
-
"body-lg": {
|
|
2166
|
-
fontSize: 16,
|
|
2167
|
-
lineHeight: "20px",
|
|
2168
|
-
fontWeight: 400,
|
|
2169
|
-
scaleStep: "150",
|
|
2170
|
-
lineHeightCategory: "compact",
|
|
2171
|
-
accent: { fontWeight: 500 },
|
|
2172
|
-
paragraph: {
|
|
2173
|
-
lineHeight: "22px",
|
|
2174
|
-
spacing: 16,
|
|
2175
|
-
lineHeightScaleStep: "150"
|
|
2176
|
-
}
|
|
2177
|
-
},
|
|
2178
|
-
"body-md": {
|
|
2179
|
-
fontSize: 14,
|
|
2180
|
-
lineHeight: "18px",
|
|
2181
|
-
fontWeight: 400,
|
|
2182
|
-
scaleStep: "125",
|
|
2183
|
-
lineHeightCategory: "compact",
|
|
2184
|
-
accent: { fontWeight: 500 },
|
|
2185
|
-
paragraph: {
|
|
2186
|
-
lineHeight: "20px",
|
|
2187
|
-
spacing: 12,
|
|
2188
|
-
lineHeightScaleStep: "125"
|
|
2189
|
-
}
|
|
2190
|
-
},
|
|
2191
|
-
"body-sm": {
|
|
2192
|
-
fontSize: 12,
|
|
2193
|
-
lineHeight: "16px",
|
|
2194
|
-
fontWeight: 400,
|
|
2195
|
-
scaleStep: "100",
|
|
2196
|
-
lineHeightCategory: "compact",
|
|
2197
|
-
accent: { fontWeight: 500 },
|
|
2198
|
-
paragraph: {
|
|
2199
|
-
lineHeight: "18px",
|
|
2200
|
-
spacing: 8,
|
|
2201
|
-
lineHeightScaleStep: "100"
|
|
2202
|
-
}
|
|
2203
|
-
},
|
|
2204
|
-
"body-xs": {
|
|
2205
|
-
fontSize: 10,
|
|
2206
|
-
lineHeight: "14px",
|
|
2207
|
-
fontWeight: 400,
|
|
2208
|
-
scaleStep: "75",
|
|
2209
|
-
lineHeightCategory: "compact",
|
|
2210
|
-
accent: { fontWeight: 500 },
|
|
2211
|
-
paragraph: {
|
|
2212
|
-
lineHeight: "14px",
|
|
2213
|
-
spacing: 6,
|
|
2214
|
-
lineHeightScaleStep: "75"
|
|
2215
|
-
}
|
|
2216
|
-
},
|
|
2217
|
-
"body-xxs": {
|
|
2218
|
-
fontSize: 10,
|
|
2219
|
-
lineHeight: "14px",
|
|
2220
|
-
fontWeight: 400,
|
|
2221
|
-
scaleStep: "75",
|
|
2222
|
-
lineHeightCategory: "compact",
|
|
2223
|
-
accent: { fontWeight: 500 },
|
|
2224
|
-
paragraph: {
|
|
2225
|
-
lineHeight: "14px",
|
|
2226
|
-
spacing: 6,
|
|
2227
|
-
lineHeightScaleStep: "75"
|
|
2228
|
-
}
|
|
2229
|
-
}
|
|
2230
|
-
}
|
|
2231
|
-
},
|
|
2232
|
-
presentation: {
|
|
2233
|
-
heading: {
|
|
2234
|
-
h1: {
|
|
2235
|
-
fontSize: 56,
|
|
2236
|
-
lineHeight: "56px",
|
|
2237
|
-
fontWeight: 700,
|
|
2238
|
-
scaleStep: "650",
|
|
2239
|
-
lineHeightCategory: "display"
|
|
2240
|
-
},
|
|
2241
|
-
h2: {
|
|
2242
|
-
fontSize: 48,
|
|
2243
|
-
lineHeight: "48px",
|
|
2244
|
-
fontWeight: 700,
|
|
2245
|
-
scaleStep: "550",
|
|
2246
|
-
lineHeightCategory: "display"
|
|
2247
|
-
},
|
|
2248
|
-
h3: {
|
|
2249
|
-
fontSize: 40,
|
|
2250
|
-
lineHeight: "40px",
|
|
2251
|
-
fontWeight: 700,
|
|
2252
|
-
scaleStep: "450",
|
|
2253
|
-
lineHeightCategory: "display"
|
|
2254
|
-
},
|
|
2255
|
-
h4: {
|
|
2256
|
-
fontSize: 32,
|
|
2257
|
-
lineHeight: "32px",
|
|
2258
|
-
fontWeight: 700,
|
|
2259
|
-
scaleStep: "350",
|
|
2260
|
-
lineHeightCategory: "display"
|
|
2261
|
-
},
|
|
2262
|
-
h5: {
|
|
2263
|
-
fontSize: 28,
|
|
2264
|
-
lineHeight: "28px",
|
|
2265
|
-
fontWeight: 700,
|
|
2266
|
-
scaleStep: "300",
|
|
2267
|
-
lineHeightCategory: "display"
|
|
2268
|
-
}
|
|
2269
|
-
},
|
|
2270
|
-
basic: {
|
|
2271
|
-
display: {
|
|
2272
|
-
fontSize: 64,
|
|
2273
|
-
lineHeight: "64px",
|
|
2274
|
-
fontWeight: 800,
|
|
2275
|
-
scaleStep: "750",
|
|
2276
|
-
lineHeightCategory: "display"
|
|
2277
|
-
},
|
|
2278
|
-
"body-lg": {
|
|
2279
|
-
fontSize: 24,
|
|
2280
|
-
lineHeight: "30px",
|
|
2281
|
-
fontWeight: 400,
|
|
2282
|
-
scaleStep: "250",
|
|
2283
|
-
lineHeightCategory: "compact",
|
|
2284
|
-
accent: { fontWeight: 500 },
|
|
2285
|
-
paragraph: {
|
|
2286
|
-
lineHeight: "34px",
|
|
2287
|
-
spacing: 24,
|
|
2288
|
-
lineHeightScaleStep: "250"
|
|
2289
|
-
}
|
|
2290
|
-
},
|
|
2291
|
-
"body-md": {
|
|
2292
|
-
fontSize: 20,
|
|
2293
|
-
lineHeight: "26px",
|
|
2294
|
-
fontWeight: 400,
|
|
2295
|
-
scaleStep: "200",
|
|
2296
|
-
lineHeightCategory: "compact",
|
|
2297
|
-
accent: { fontWeight: 500 },
|
|
2298
|
-
paragraph: {
|
|
2299
|
-
lineHeight: "28px",
|
|
2300
|
-
spacing: 20,
|
|
2301
|
-
lineHeightScaleStep: "200"
|
|
2302
|
-
}
|
|
2303
|
-
},
|
|
2304
|
-
"body-sm": {
|
|
2305
|
-
fontSize: 18,
|
|
2306
|
-
lineHeight: "24px",
|
|
2307
|
-
fontWeight: 400,
|
|
2308
|
-
scaleStep: "175",
|
|
2309
|
-
lineHeightCategory: "compact",
|
|
2310
|
-
accent: { fontWeight: 500 },
|
|
2311
|
-
paragraph: {
|
|
2312
|
-
lineHeight: "26px",
|
|
2313
|
-
spacing: 16,
|
|
2314
|
-
lineHeightScaleStep: "175"
|
|
2315
|
-
}
|
|
2316
|
-
},
|
|
2317
|
-
"body-xs": {
|
|
2318
|
-
fontSize: 16,
|
|
2319
|
-
lineHeight: "20px",
|
|
2320
|
-
fontWeight: 400,
|
|
2321
|
-
scaleStep: "150",
|
|
2322
|
-
lineHeightCategory: "compact",
|
|
2323
|
-
accent: { fontWeight: 500 },
|
|
2324
|
-
paragraph: {
|
|
2325
|
-
lineHeight: "22px",
|
|
2326
|
-
spacing: 12,
|
|
2327
|
-
lineHeightScaleStep: "150"
|
|
2328
|
-
}
|
|
2329
|
-
},
|
|
2330
|
-
"body-xxs": {
|
|
2331
|
-
fontSize: 16,
|
|
2332
|
-
lineHeight: "20px",
|
|
2333
|
-
fontWeight: 400,
|
|
2334
|
-
scaleStep: "150",
|
|
2335
|
-
lineHeightCategory: "compact",
|
|
2336
|
-
accent: { fontWeight: 500 },
|
|
2337
|
-
paragraph: {
|
|
2338
|
-
lineHeight: "22px",
|
|
2339
|
-
spacing: 12,
|
|
2340
|
-
lineHeightScaleStep: "150"
|
|
2341
|
-
}
|
|
2342
|
-
}
|
|
2343
|
-
}
|
|
2344
2199
|
}
|
|
2345
2200
|
};
|
|
2346
2201
|
var defaultProductContext = "b2b";
|
|
@@ -2392,35 +2247,31 @@ var isIOS = isNative && typeof global !== "undefined" && global.Platform?.OS ===
|
|
|
2392
2247
|
var isAndroid = isNative && typeof global !== "undefined" && global.Platform?.OS === "android";
|
|
2393
2248
|
|
|
2394
2249
|
// src/fonts/fontFaces.ts
|
|
2395
|
-
var
|
|
2396
|
-
var
|
|
2250
|
+
var CDN = "https://cdn.xsolla.net/xsolla-ui-toolkit-prod/fonts/v1";
|
|
2251
|
+
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";
|
|
2252
|
+
var UNICODE_RANGE_CN = "U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF";
|
|
2253
|
+
var UNICODE_RANGE_JP = "U+3000-303F, U+3040-309F, U+30A0-30FF, U+31F0-31FF, U+FF65-FF9F";
|
|
2254
|
+
var UNICODE_RANGE_KR = "U+1100-11FF, U+3130-318F, U+A960-A97F, U+AC00-D7A3, U+D7B0-D7FF, U+FFA0-FFDC";
|
|
2397
2255
|
var fontFacesCSS = `
|
|
2398
2256
|
/* \u2500\u2500 Pilat Wide (B2C headings) \u2500\u2500 */
|
|
2399
2257
|
|
|
2400
2258
|
@font-face {
|
|
2401
2259
|
font-family: 'Pilat Wide';
|
|
2402
|
-
src: url('${
|
|
2403
|
-
font-weight: 400;
|
|
2404
|
-
font-style: normal;
|
|
2405
|
-
font-display: swap;
|
|
2406
|
-
}
|
|
2407
|
-
@font-face {
|
|
2408
|
-
font-family: 'Pilat Wide';
|
|
2409
|
-
src: url('${CDN_STRAPI}/Pilat_Test_Demi_Bold_bee67c470a/Pilat_Test_Demi_Bold_bee67c470a.ttf') format('truetype');
|
|
2260
|
+
src: url('${CDN}/pilat-wide/pilat-wide-600.woff2') format('woff2');
|
|
2410
2261
|
font-weight: 600;
|
|
2411
2262
|
font-style: normal;
|
|
2412
2263
|
font-display: swap;
|
|
2413
2264
|
}
|
|
2414
2265
|
@font-face {
|
|
2415
2266
|
font-family: 'Pilat Wide';
|
|
2416
|
-
src: url('${
|
|
2267
|
+
src: url('${CDN}/pilat-wide/pilat-wide-700.woff2') format('woff2');
|
|
2417
2268
|
font-weight: 700;
|
|
2418
2269
|
font-style: normal;
|
|
2419
2270
|
font-display: swap;
|
|
2420
2271
|
}
|
|
2421
2272
|
@font-face {
|
|
2422
2273
|
font-family: 'Pilat Wide';
|
|
2423
|
-
src: url('${
|
|
2274
|
+
src: url('${CDN}/pilat-wide/pilat-wide-800.woff2') format('woff2');
|
|
2424
2275
|
font-weight: 800;
|
|
2425
2276
|
font-style: normal;
|
|
2426
2277
|
font-display: swap;
|
|
@@ -2430,76 +2281,153 @@ var fontFacesCSS = `
|
|
|
2430
2281
|
|
|
2431
2282
|
@font-face {
|
|
2432
2283
|
font-family: 'Pilat';
|
|
2433
|
-
src: url('${
|
|
2284
|
+
src: url('${CDN}/pilat/pilat-300.woff2') format('woff2');
|
|
2434
2285
|
font-weight: 300;
|
|
2435
2286
|
font-style: normal;
|
|
2436
2287
|
font-display: swap;
|
|
2437
2288
|
}
|
|
2438
2289
|
@font-face {
|
|
2439
2290
|
font-family: 'Pilat';
|
|
2440
|
-
src: url('${
|
|
2291
|
+
src: url('${CDN}/pilat/pilat-400.woff2') format('woff2');
|
|
2441
2292
|
font-weight: 400;
|
|
2442
2293
|
font-style: normal;
|
|
2443
2294
|
font-display: swap;
|
|
2444
2295
|
}
|
|
2445
2296
|
@font-face {
|
|
2446
2297
|
font-family: 'Pilat';
|
|
2447
|
-
src: url('${
|
|
2298
|
+
src: url('${CDN}/pilat/pilat-500.woff2') format('woff2');
|
|
2299
|
+
font-weight: 500;
|
|
2300
|
+
font-style: normal;
|
|
2301
|
+
font-display: swap;
|
|
2302
|
+
}
|
|
2303
|
+
@font-face {
|
|
2304
|
+
font-family: 'Pilat';
|
|
2305
|
+
src: url('${CDN}/pilat/pilat-600.woff2') format('woff2');
|
|
2448
2306
|
font-weight: 600;
|
|
2449
2307
|
font-style: normal;
|
|
2450
2308
|
font-display: swap;
|
|
2451
2309
|
}
|
|
2452
2310
|
@font-face {
|
|
2453
2311
|
font-family: 'Pilat';
|
|
2454
|
-
src: url('${
|
|
2312
|
+
src: url('${CDN}/pilat/pilat-700.woff2') format('woff2');
|
|
2455
2313
|
font-weight: 700;
|
|
2456
2314
|
font-style: normal;
|
|
2457
2315
|
font-display: swap;
|
|
2458
2316
|
}
|
|
2459
2317
|
@font-face {
|
|
2460
2318
|
font-family: 'Pilat';
|
|
2461
|
-
src: url('${
|
|
2319
|
+
src: url('${CDN}/pilat/pilat-800.woff2') format('woff2');
|
|
2462
2320
|
font-weight: 800;
|
|
2463
2321
|
font-style: normal;
|
|
2464
2322
|
font-display: swap;
|
|
2465
2323
|
}
|
|
2466
2324
|
|
|
2467
|
-
/* \u2500\u2500 Aktiv Grotesk (body) \u2014
|
|
2325
|
+
/* \u2500\u2500 Aktiv Grotesk (body) \u2014 Latin \u2500\u2500 */
|
|
2468
2326
|
|
|
2469
2327
|
@font-face {
|
|
2470
2328
|
font-family: 'Aktiv Grotesk';
|
|
2471
|
-
src: url('${
|
|
2472
|
-
font-weight:
|
|
2329
|
+
src: url('${CDN}/aktiv-grotesk/latin/aktiv-grotesk-latin-400.woff2') format('woff2');
|
|
2330
|
+
font-weight: 400;
|
|
2331
|
+
font-style: normal;
|
|
2332
|
+
font-display: swap;
|
|
2333
|
+
unicode-range: ${UNICODE_RANGE_LATIN};
|
|
2334
|
+
}
|
|
2335
|
+
@font-face {
|
|
2336
|
+
font-family: 'Aktiv Grotesk';
|
|
2337
|
+
src: url('${CDN}/aktiv-grotesk/latin/aktiv-grotesk-latin-500.woff2') format('woff2');
|
|
2338
|
+
font-weight: 500;
|
|
2339
|
+
font-style: normal;
|
|
2340
|
+
font-display: swap;
|
|
2341
|
+
unicode-range: ${UNICODE_RANGE_LATIN};
|
|
2342
|
+
}
|
|
2343
|
+
@font-face {
|
|
2344
|
+
font-family: 'Aktiv Grotesk';
|
|
2345
|
+
src: url('${CDN}/aktiv-grotesk/latin/aktiv-grotesk-latin-600.woff2') format('woff2');
|
|
2346
|
+
font-weight: 600;
|
|
2473
2347
|
font-style: normal;
|
|
2474
2348
|
font-display: swap;
|
|
2349
|
+
unicode-range: ${UNICODE_RANGE_LATIN};
|
|
2475
2350
|
}
|
|
2351
|
+
|
|
2352
|
+
/* \u2500\u2500 Aktiv Grotesk (body) \u2014 Chinese / SG \u2500\u2500 */
|
|
2353
|
+
|
|
2476
2354
|
@font-face {
|
|
2477
2355
|
font-family: 'Aktiv Grotesk';
|
|
2478
|
-
src: url('${
|
|
2356
|
+
src: url('${CDN}/aktiv-grotesk/cn-sg/aktiv-grotesk-cn-sg-400.woff2') format('woff2');
|
|
2479
2357
|
font-weight: 400;
|
|
2480
2358
|
font-style: normal;
|
|
2481
2359
|
font-display: swap;
|
|
2360
|
+
unicode-range: ${UNICODE_RANGE_CN};
|
|
2482
2361
|
}
|
|
2483
2362
|
@font-face {
|
|
2484
2363
|
font-family: 'Aktiv Grotesk';
|
|
2485
|
-
src: url('${
|
|
2364
|
+
src: url('${CDN}/aktiv-grotesk/cn-sg/aktiv-grotesk-cn-sg-500.woff2') format('woff2');
|
|
2486
2365
|
font-weight: 500;
|
|
2487
2366
|
font-style: normal;
|
|
2488
2367
|
font-display: swap;
|
|
2368
|
+
unicode-range: ${UNICODE_RANGE_CN};
|
|
2489
2369
|
}
|
|
2490
2370
|
@font-face {
|
|
2491
2371
|
font-family: 'Aktiv Grotesk';
|
|
2492
|
-
src: url('${
|
|
2372
|
+
src: url('${CDN}/aktiv-grotesk/cn-sg/aktiv-grotesk-cn-sg-600.woff2') format('woff2');
|
|
2493
2373
|
font-weight: 600;
|
|
2494
2374
|
font-style: normal;
|
|
2495
2375
|
font-display: swap;
|
|
2376
|
+
unicode-range: ${UNICODE_RANGE_CN};
|
|
2496
2377
|
}
|
|
2378
|
+
|
|
2379
|
+
/* \u2500\u2500 Aktiv Grotesk (body) \u2014 Japanese \u2500\u2500 */
|
|
2380
|
+
|
|
2497
2381
|
@font-face {
|
|
2498
2382
|
font-family: 'Aktiv Grotesk';
|
|
2499
|
-
src: url('${
|
|
2500
|
-
font-weight:
|
|
2383
|
+
src: url('${CDN}/aktiv-grotesk/jp/aktiv-grotesk-jp-400.woff2') format('woff2');
|
|
2384
|
+
font-weight: 400;
|
|
2385
|
+
font-style: normal;
|
|
2386
|
+
font-display: swap;
|
|
2387
|
+
unicode-range: ${UNICODE_RANGE_JP};
|
|
2388
|
+
}
|
|
2389
|
+
@font-face {
|
|
2390
|
+
font-family: 'Aktiv Grotesk';
|
|
2391
|
+
src: url('${CDN}/aktiv-grotesk/jp/aktiv-grotesk-jp-500.woff2') format('woff2');
|
|
2392
|
+
font-weight: 500;
|
|
2393
|
+
font-style: normal;
|
|
2394
|
+
font-display: swap;
|
|
2395
|
+
unicode-range: ${UNICODE_RANGE_JP};
|
|
2396
|
+
}
|
|
2397
|
+
@font-face {
|
|
2398
|
+
font-family: 'Aktiv Grotesk';
|
|
2399
|
+
src: url('${CDN}/aktiv-grotesk/jp/aktiv-grotesk-jp-600.woff2') format('woff2');
|
|
2400
|
+
font-weight: 600;
|
|
2401
|
+
font-style: normal;
|
|
2402
|
+
font-display: swap;
|
|
2403
|
+
unicode-range: ${UNICODE_RANGE_JP};
|
|
2404
|
+
}
|
|
2405
|
+
|
|
2406
|
+
/* \u2500\u2500 Aktiv Grotesk (body) \u2014 Korean \u2500\u2500 */
|
|
2407
|
+
|
|
2408
|
+
@font-face {
|
|
2409
|
+
font-family: 'Aktiv Grotesk';
|
|
2410
|
+
src: url('${CDN}/aktiv-grotesk/kr/aktiv-grotesk-kr-400.woff2') format('woff2');
|
|
2411
|
+
font-weight: 400;
|
|
2501
2412
|
font-style: normal;
|
|
2502
2413
|
font-display: swap;
|
|
2414
|
+
unicode-range: ${UNICODE_RANGE_KR};
|
|
2415
|
+
}
|
|
2416
|
+
@font-face {
|
|
2417
|
+
font-family: 'Aktiv Grotesk';
|
|
2418
|
+
src: url('${CDN}/aktiv-grotesk/kr/aktiv-grotesk-kr-500.woff2') format('woff2');
|
|
2419
|
+
font-weight: 500;
|
|
2420
|
+
font-style: normal;
|
|
2421
|
+
font-display: swap;
|
|
2422
|
+
unicode-range: ${UNICODE_RANGE_KR};
|
|
2423
|
+
}
|
|
2424
|
+
@font-face {
|
|
2425
|
+
font-family: 'Aktiv Grotesk';
|
|
2426
|
+
src: url('${CDN}/aktiv-grotesk/kr/aktiv-grotesk-kr-600.woff2') format('woff2');
|
|
2427
|
+
font-weight: 600;
|
|
2428
|
+
font-style: normal;
|
|
2429
|
+
font-display: swap;
|
|
2430
|
+
unicode-range: ${UNICODE_RANGE_KR};
|
|
2503
2431
|
}
|
|
2504
2432
|
`;
|
|
2505
2433
|
|
|
@@ -2528,89 +2456,6 @@ FontLoader.displayName = "FontLoader";
|
|
|
2528
2456
|
// src/styles/TypographyStyleLoader.tsx
|
|
2529
2457
|
var import_react2 = require("react");
|
|
2530
2458
|
|
|
2531
|
-
// src/tokens/responsive-typography.ts
|
|
2532
|
-
var SCALE_STEPS = [
|
|
2533
|
-
"75",
|
|
2534
|
-
"100",
|
|
2535
|
-
"125",
|
|
2536
|
-
"150",
|
|
2537
|
-
"175",
|
|
2538
|
-
"200",
|
|
2539
|
-
"250",
|
|
2540
|
-
"300",
|
|
2541
|
-
"350",
|
|
2542
|
-
"450",
|
|
2543
|
-
"550",
|
|
2544
|
-
"650",
|
|
2545
|
-
"750"
|
|
2546
|
-
];
|
|
2547
|
-
var fontSize = {
|
|
2548
|
-
"75": { common: 10, mobile: 10, desktop: 10 },
|
|
2549
|
-
"100": { common: 12, mobile: 11, desktop: 12 },
|
|
2550
|
-
"125": { common: 14, mobile: 12, desktop: 14 },
|
|
2551
|
-
"150": { common: 16, mobile: 14, desktop: 16 },
|
|
2552
|
-
"175": { common: 18, mobile: 16, desktop: 18 },
|
|
2553
|
-
"200": { common: 20, mobile: 18, desktop: 20 },
|
|
2554
|
-
"250": { common: 24, mobile: 20, desktop: 24 },
|
|
2555
|
-
"300": { common: 28, mobile: 24, desktop: 28 },
|
|
2556
|
-
"350": { common: 32, mobile: 28, desktop: 32 },
|
|
2557
|
-
"450": { common: 40, mobile: 32, desktop: 40 },
|
|
2558
|
-
"550": { common: 48, mobile: 40, desktop: 48 },
|
|
2559
|
-
"650": { common: 56, mobile: 48, desktop: 56 },
|
|
2560
|
-
"750": { common: 64, mobile: 56, desktop: 64 }
|
|
2561
|
-
};
|
|
2562
|
-
var lineHeightDisplay = {
|
|
2563
|
-
"75": { common: 10, mobile: 10, desktop: 10 },
|
|
2564
|
-
"100": { common: 12, mobile: 11, desktop: 12 },
|
|
2565
|
-
"125": { common: 14, mobile: 12, desktop: 14 },
|
|
2566
|
-
"150": { common: 16, mobile: 14, desktop: 16 },
|
|
2567
|
-
"175": { common: 18, mobile: 16, desktop: 18 },
|
|
2568
|
-
"200": { common: 20, mobile: 18, desktop: 20 },
|
|
2569
|
-
"250": { common: 24, mobile: 20, desktop: 24 },
|
|
2570
|
-
"300": { common: 28, mobile: 24, desktop: 28 },
|
|
2571
|
-
"350": { common: 32, mobile: 28, desktop: 32 },
|
|
2572
|
-
"450": { common: 40, mobile: 32, desktop: 40 },
|
|
2573
|
-
"550": { common: 48, mobile: 40, desktop: 48 },
|
|
2574
|
-
"650": { common: 56, mobile: 48, desktop: 56 },
|
|
2575
|
-
"750": { common: 64, mobile: 56, desktop: 64 }
|
|
2576
|
-
};
|
|
2577
|
-
var lineHeightCompact = {
|
|
2578
|
-
"75": { common: 14, mobile: 13, desktop: 14 },
|
|
2579
|
-
"100": { common: 16, mobile: 14, desktop: 16 },
|
|
2580
|
-
"125": { common: 18, mobile: 16, desktop: 18 },
|
|
2581
|
-
"150": { common: 20, mobile: 18, desktop: 20 },
|
|
2582
|
-
"175": { common: 24, mobile: 20, desktop: 24 },
|
|
2583
|
-
"200": { common: 26, mobile: 24, desktop: 26 },
|
|
2584
|
-
"250": { common: 30, mobile: 26, desktop: 30 },
|
|
2585
|
-
"300": { common: 36, mobile: 30, desktop: 36 },
|
|
2586
|
-
"350": { common: 42, mobile: 36, desktop: 42 },
|
|
2587
|
-
"450": { common: 52, mobile: 42, desktop: 52 },
|
|
2588
|
-
"550": { common: 62, mobile: 52, desktop: 62 },
|
|
2589
|
-
"650": { common: 72, mobile: 62, desktop: 72 },
|
|
2590
|
-
"750": { common: 82, mobile: 72, desktop: 82 }
|
|
2591
|
-
};
|
|
2592
|
-
var lineHeightText = {
|
|
2593
|
-
"75": { common: 14, mobile: 13, desktop: 14 },
|
|
2594
|
-
"100": { common: 18, mobile: 14, desktop: 18 },
|
|
2595
|
-
"125": { common: 20, mobile: 16, desktop: 20 },
|
|
2596
|
-
"150": { common: 22, mobile: 18, desktop: 22 },
|
|
2597
|
-
"175": { common: 26, mobile: 20, desktop: 26 },
|
|
2598
|
-
"200": { common: 28, mobile: 24, desktop: 28 },
|
|
2599
|
-
"250": { common: 34, mobile: 26, desktop: 34 },
|
|
2600
|
-
"300": { common: 40, mobile: 30, desktop: 40 },
|
|
2601
|
-
"350": { common: 44, mobile: 36, desktop: 44 },
|
|
2602
|
-
"450": { common: 56, mobile: 42, desktop: 56 },
|
|
2603
|
-
"550": { common: 66, mobile: 52, desktop: 66 },
|
|
2604
|
-
"650": { common: 78, mobile: 62, desktop: 78 },
|
|
2605
|
-
"750": { common: 88, mobile: 72, desktop: 88 }
|
|
2606
|
-
};
|
|
2607
|
-
var responsiveTypographyScale = {
|
|
2608
|
-
fontSize,
|
|
2609
|
-
lineHeightDisplay,
|
|
2610
|
-
lineHeightCompact,
|
|
2611
|
-
lineHeightText
|
|
2612
|
-
};
|
|
2613
|
-
|
|
2614
2459
|
// src/tokens/breakpoints.ts
|
|
2615
2460
|
var breakpoints = {
|
|
2616
2461
|
/** Mobile: 0 – 767px */
|
|
@@ -2624,35 +2469,23 @@ var MOBILE_MAX_WIDTH = breakpoints.desktop - 1;
|
|
|
2624
2469
|
function buildDeclarations(mode) {
|
|
2625
2470
|
const lines = [];
|
|
2626
2471
|
for (const step of SCALE_STEPS) {
|
|
2627
|
-
|
|
2628
|
-
lines.push(
|
|
2629
|
-
`--xui-font-size-${step}:${fs[mode === "desktop" ? "common" : "mobile"]}px`
|
|
2630
|
-
);
|
|
2472
|
+
lines.push(`--xui-font-size-${step}:${fontSize[step][mode]}px`);
|
|
2631
2473
|
}
|
|
2632
2474
|
for (const step of SCALE_STEPS) {
|
|
2633
|
-
|
|
2634
|
-
lines.push(
|
|
2635
|
-
`--xui-lh-display-${step}:${lh[mode === "desktop" ? "common" : "mobile"]}px`
|
|
2636
|
-
);
|
|
2475
|
+
lines.push(`--xui-lh-display-${step}:${lineHeightDisplay[step][mode]}px`);
|
|
2637
2476
|
}
|
|
2638
2477
|
for (const step of SCALE_STEPS) {
|
|
2639
|
-
|
|
2640
|
-
lines.push(
|
|
2641
|
-
`--xui-lh-compact-${step}:${lh[mode === "desktop" ? "common" : "mobile"]}px`
|
|
2642
|
-
);
|
|
2478
|
+
lines.push(`--xui-lh-compact-${step}:${lineHeightCompact[step][mode]}px`);
|
|
2643
2479
|
}
|
|
2644
2480
|
for (const step of SCALE_STEPS) {
|
|
2645
|
-
|
|
2646
|
-
lines.push(
|
|
2647
|
-
`--xui-lh-text-${step}:${lh[mode === "desktop" ? "common" : "mobile"]}px`
|
|
2648
|
-
);
|
|
2481
|
+
lines.push(`--xui-lh-text-${step}:${lineHeightText[step][mode]}px`);
|
|
2649
2482
|
}
|
|
2650
2483
|
return lines.join(";");
|
|
2651
2484
|
}
|
|
2652
2485
|
var _cached = null;
|
|
2653
2486
|
function generateTypographyCSS() {
|
|
2654
2487
|
if (_cached) return _cached;
|
|
2655
|
-
const desktopVars = buildDeclarations("
|
|
2488
|
+
const desktopVars = buildDeclarations("common");
|
|
2656
2489
|
const mobileVars = buildDeclarations("mobile");
|
|
2657
2490
|
_cached = `:root{${desktopVars}}@media(max-width:${MOBILE_MAX_WIDTH}px){:root{${mobileVars}}}`;
|
|
2658
2491
|
return _cached;
|
|
@@ -4067,7 +3900,8 @@ var XUIProvider = ({
|
|
|
4067
3900
|
children,
|
|
4068
3901
|
initialMode = "dark",
|
|
4069
3902
|
initialProductContext = defaultProductContext,
|
|
4070
|
-
loadFonts = true
|
|
3903
|
+
loadFonts = true,
|
|
3904
|
+
responsive = true
|
|
4071
3905
|
}) => {
|
|
4072
3906
|
const [mode, setMode] = (0, import_react3.useState)(initialMode);
|
|
4073
3907
|
const [productContext, setProductContext] = (0, import_react3.useState)(
|
|
@@ -4079,13 +3913,14 @@ var XUIProvider = ({
|
|
|
4079
3913
|
setMode,
|
|
4080
3914
|
productContext,
|
|
4081
3915
|
setProductContext,
|
|
4082
|
-
theme: themeConfig(mode, productContext)
|
|
3916
|
+
theme: themeConfig(mode, productContext),
|
|
3917
|
+
responsive
|
|
4083
3918
|
}),
|
|
4084
|
-
[mode, productContext]
|
|
3919
|
+
[mode, productContext, responsive]
|
|
4085
3920
|
);
|
|
4086
3921
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DesignSystemContext.Provider, { value, children: [
|
|
4087
3922
|
loadFonts && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FontLoader, {}),
|
|
4088
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TypographyStyleLoader, {}),
|
|
3923
|
+
responsive && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TypographyStyleLoader, {}),
|
|
4089
3924
|
children
|
|
4090
3925
|
] });
|
|
4091
3926
|
};
|
|
@@ -4099,7 +3934,8 @@ var useDesignSystem = () => {
|
|
|
4099
3934
|
productContext: defaultProductContext,
|
|
4100
3935
|
setProductContext: () => {
|
|
4101
3936
|
},
|
|
4102
|
-
theme: themeConfig("dark", defaultProductContext)
|
|
3937
|
+
theme: themeConfig("dark", defaultProductContext),
|
|
3938
|
+
responsive: true
|
|
4103
3939
|
};
|
|
4104
3940
|
}
|
|
4105
3941
|
return context;
|