@xsolla/xui-typography 0.136.0 → 0.138.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-typography",
3
- "version": "0.136.0",
3
+ "version": "0.138.0",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
@@ -13,8 +13,8 @@
13
13
  "test:coverage": "vitest run --coverage"
14
14
  },
15
15
  "dependencies": {
16
- "@xsolla/xui-core": "0.136.0",
17
- "@xsolla/xui-primitives-core": "0.136.0"
16
+ "@xsolla/xui-core": "0.138.0",
17
+ "@xsolla/xui-primitives-core": "0.138.0"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "react": ">=16.8.0",
package/web/index.js CHANGED
@@ -35,12 +35,82 @@ __export(index_exports, {
35
35
  module.exports = __toCommonJS(index_exports);
36
36
 
37
37
  // src/Typography.tsx
38
- var import_react = require("react");
38
+ var import_react2 = require("react");
39
+
40
+ // ../primitives-web/src/filterDOMProps.ts
41
+ var import_react = __toESM(require("react"));
42
+
43
+ // ../../node_modules/@emotion/memoize/dist/memoize.esm.js
44
+ function memoize(fn) {
45
+ var cache = {};
46
+ return function(arg) {
47
+ if (cache[arg] === void 0) cache[arg] = fn(arg);
48
+ return cache[arg];
49
+ };
50
+ }
51
+ var memoize_esm_default = memoize;
52
+
53
+ // ../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js
54
+ var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
55
+ var index = memoize_esm_default(
56
+ function(prop) {
57
+ return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
58
+ }
59
+ /* Z+1 */
60
+ );
61
+ var is_prop_valid_esm_default = index;
62
+
63
+ // ../primitives-web/src/filterDOMProps.ts
64
+ var ADDITIONAL_BLOCKED_PROPS = /* @__PURE__ */ new Set([
65
+ // RN-only event handlers (pass isPropValid's on* pattern)
66
+ "onPress",
67
+ "onChangeText",
68
+ "onLayout",
69
+ "onMoveShouldSetResponder",
70
+ "onResponderGrant",
71
+ "onResponderMove",
72
+ "onResponderRelease",
73
+ "onResponderTerminate",
74
+ // SVG attributes that pass isPropValid
75
+ "strokeWidth",
76
+ // CSS properties that pass isPropValid but are used as component props
77
+ "overflow",
78
+ "cursor",
79
+ "fontSize",
80
+ "fontWeight",
81
+ "fontFamily",
82
+ "textDecoration"
83
+ ]);
84
+ function shouldForwardProp(key) {
85
+ if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;
86
+ return is_prop_valid_esm_default(key);
87
+ }
88
+ function createFilteredElement(defaultTag) {
89
+ const Component = import_react.default.forwardRef(
90
+ ({ children, elementType, ...props }, ref) => {
91
+ const Tag = elementType || defaultTag;
92
+ const htmlProps = {};
93
+ for (const key of Object.keys(props)) {
94
+ if (shouldForwardProp(key)) {
95
+ htmlProps[key] = props[key];
96
+ }
97
+ }
98
+ return import_react.default.createElement(
99
+ Tag,
100
+ { ref, ...htmlProps },
101
+ children
102
+ );
103
+ }
104
+ );
105
+ Component.displayName = `Filtered(${defaultTag})`;
106
+ return Component;
107
+ }
39
108
 
40
109
  // ../primitives-web/src/Text.tsx
41
110
  var import_styled_components = __toESM(require("styled-components"));
42
111
  var import_jsx_runtime = require("react/jsx-runtime");
43
- var StyledText = import_styled_components.default.span`
112
+ var FilteredSpan = createFilteredElement("span");
113
+ var StyledText = (0, import_styled_components.default)(FilteredSpan)`
44
114
  color: ${(props) => props.color || "inherit"};
45
115
  font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
46
116
  font-weight: ${(props) => props.fontWeight || "normal"};
@@ -351,7 +421,7 @@ function getResponsiveLineHeight(styles) {
351
421
  if (cat === "text") return import_xui_core.cssVar.lhText(step);
352
422
  return import_xui_core.cssVar.lhCompact(step);
353
423
  }
354
- var Typography = (0, import_react.forwardRef)(
424
+ var Typography = (0, import_react2.forwardRef)(
355
425
  ({
356
426
  children,
357
427
  align = "inherit",
package/web/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.tsx","../../src/Typography.tsx","../../../primitives-web/src/Text.tsx"],"sourcesContent":["export * from \"./Typography\";\nexport * from \"./types\";\n","import { forwardRef } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Text } from \"@xsolla/xui-primitives\";\nimport {\n useResolvedTheme,\n getTypographyTokens,\n getFonts,\n isWeb,\n isNative,\n cssVar,\n} from \"@xsolla/xui-core\";\nimport type { ColorType, TypographyProps, VariantType } from \"./types\";\n\nconst getColor = (\n color: ColorType | string,\n theme: any\n): string | undefined => {\n if (color === \"inherit\") {\n return isNative ? theme?.colors?.content?.primary : undefined;\n }\n\n const colorMap: Record<string, string> = {\n primary: theme?.colors?.content?.primary,\n secondary: theme?.colors?.content?.secondary,\n tertiary: theme?.colors?.content?.tertiary,\n brand: theme?.colors?.content?.brand?.primary,\n brandSecondary: theme?.colors?.content?.brand?.secondary,\n success: theme?.colors?.content?.success?.primary,\n warning: theme?.colors?.content?.warning?.primary,\n alert: theme?.colors?.content?.alert?.primary,\n neutral: theme?.colors?.content?.neutral?.primary,\n };\n\n return colorMap[color] || color;\n};\n\nconst isHeadingVariant = (variant: VariantType): boolean =>\n variant === \"h1\" ||\n variant === \"h2\" ||\n variant === \"h3\" ||\n variant === \"h4\" ||\n variant === \"h5\" ||\n variant === \"display\";\n\nconst bodyMap: Record<string, string> = {\n bodyLg: \"body-lg\",\n bodyLgAccent: \"body-lg\",\n bodyLgParagraph: \"body-lg\",\n bodyMd: \"body-md\",\n bodyMdAccent: \"body-md\",\n bodyMdParagraph: \"body-md\",\n bodySm: \"body-sm\",\n bodySmAccent: \"body-sm\",\n bodySmParagraph: \"body-sm\",\n bodyXs: \"body-xs\",\n bodyXsAccent: \"body-xs\",\n bodyXsParagraph: \"body-xs\",\n bodyXxs: \"body-xxs\",\n bodyXxsAccent: \"body-xxs\",\n bodyXxsParagraph: \"body-xxs\",\n};\n\nconst headingMap: Record<string, string> = {\n h1: \"h1\",\n h2: \"h2\",\n h3: \"h3\",\n h4: \"h4\",\n h5: \"h5\",\n};\n\nconst getVariantStyles = (variant: VariantType, typographyTokens?: any) => {\n if (typographyTokens) {\n if (headingMap[variant]) {\n const token = typographyTokens.heading[headingMap[variant]];\n if (token) {\n return {\n fontSize: token.fontSize,\n fontWeight: String(token.fontWeight),\n lineHeight: token.lineHeight,\n scaleStep: token.scaleStep,\n lineHeightCategory: token.lineHeightCategory,\n };\n }\n }\n\n if (variant === \"display\" && typographyTokens.basic?.display) {\n const token = typographyTokens.basic.display;\n return {\n fontSize: token.fontSize,\n fontWeight: String(token.fontWeight),\n lineHeight: token.lineHeight,\n scaleStep: token.scaleStep,\n lineHeightCategory: token.lineHeightCategory,\n };\n }\n\n const bodyKey = bodyMap[variant];\n if (bodyKey && typographyTokens.basic?.[bodyKey]) {\n const token = typographyTokens.basic[bodyKey];\n let fontWeight = token.fontWeight;\n let lineHeight = token.lineHeight;\n let lineHeightCategory = token.lineHeightCategory;\n let lineHeightScaleStep: string | undefined;\n\n if (variant.includes(\"Accent\") && token.accent) {\n fontWeight = token.accent.fontWeight;\n }\n\n if (variant.includes(\"Paragraph\") && token.paragraph) {\n lineHeight = token.paragraph.lineHeight;\n lineHeightCategory = \"text\";\n lineHeightScaleStep = token.paragraph.lineHeightScaleStep;\n }\n\n return {\n fontSize: token.fontSize,\n fontWeight: String(fontWeight),\n lineHeight,\n scaleStep: token.scaleStep,\n lineHeightCategory,\n lineHeightScaleStep,\n };\n }\n }\n\n switch (variant) {\n case \"h1\":\n return {\n fontSize: 56,\n fontWeight: \"400\",\n lineHeight: \"56px\",\n scaleStep: \"650\",\n lineHeightCategory: \"display\" as const,\n };\n case \"h2\":\n return {\n fontSize: 48,\n fontWeight: \"400\",\n lineHeight: \"48px\",\n scaleStep: \"550\",\n lineHeightCategory: \"display\" as const,\n };\n case \"h3\":\n return {\n fontSize: 32,\n fontWeight: \"400\",\n lineHeight: \"32px\",\n scaleStep: \"350\",\n lineHeightCategory: \"display\" as const,\n };\n case \"h4\":\n return {\n fontSize: 24,\n fontWeight: \"400\",\n lineHeight: \"24px\",\n scaleStep: \"250\",\n lineHeightCategory: \"display\" as const,\n };\n case \"h5\":\n return {\n fontSize: 20,\n fontWeight: \"600\",\n lineHeight: \"20px\",\n scaleStep: \"200\",\n lineHeightCategory: \"display\" as const,\n };\n case \"display\":\n return {\n fontSize: 64,\n fontWeight: \"400\",\n lineHeight: \"64px\",\n scaleStep: \"750\",\n lineHeightCategory: \"display\" as const,\n };\n case \"bodyLg\":\n return {\n fontSize: 18,\n fontWeight: \"400\",\n lineHeight: \"24px\",\n scaleStep: \"175\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyLgAccent\":\n return {\n fontSize: 18,\n fontWeight: \"500\",\n lineHeight: \"24px\",\n scaleStep: \"175\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyLgParagraph\":\n return {\n fontSize: 18,\n fontWeight: \"400\",\n lineHeight: \"26px\",\n scaleStep: \"175\",\n lineHeightCategory: \"text\" as const,\n };\n case \"bodyMd\":\n return {\n fontSize: 16,\n fontWeight: \"400\",\n lineHeight: \"20px\",\n scaleStep: \"150\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyMdAccent\":\n return {\n fontSize: 16,\n fontWeight: \"500\",\n lineHeight: \"20px\",\n scaleStep: \"150\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyMdParagraph\":\n return {\n fontSize: 16,\n fontWeight: \"400\",\n lineHeight: \"22px\",\n scaleStep: \"150\",\n lineHeightCategory: \"text\" as const,\n };\n case \"bodySm\":\n return {\n fontSize: 14,\n fontWeight: \"400\",\n lineHeight: \"18px\",\n scaleStep: \"125\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodySmAccent\":\n return {\n fontSize: 14,\n fontWeight: \"500\",\n lineHeight: \"18px\",\n scaleStep: \"125\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodySmParagraph\":\n return {\n fontSize: 14,\n fontWeight: \"400\",\n lineHeight: \"20px\",\n scaleStep: \"125\",\n lineHeightCategory: \"text\" as const,\n };\n case \"bodyXs\":\n return {\n fontSize: 12,\n fontWeight: \"400\",\n lineHeight: \"16px\",\n scaleStep: \"100\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyXsAccent\":\n return {\n fontSize: 12,\n fontWeight: \"500\",\n lineHeight: \"16px\",\n scaleStep: \"100\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyXsParagraph\":\n return {\n fontSize: 12,\n fontWeight: \"400\",\n lineHeight: \"18px\",\n scaleStep: \"100\",\n lineHeightCategory: \"text\" as const,\n };\n case \"bodyXxs\":\n return {\n fontSize: 10,\n fontWeight: \"400\",\n lineHeight: \"14px\",\n scaleStep: \"75\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyXxsAccent\":\n return {\n fontSize: 10,\n fontWeight: \"500\",\n lineHeight: \"14px\",\n scaleStep: \"75\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyXxsParagraph\":\n return {\n fontSize: 10,\n fontWeight: \"400\",\n lineHeight: \"14px\",\n scaleStep: \"75\",\n lineHeightCategory: \"text\" as const,\n };\n default:\n return {\n fontSize: 16,\n fontWeight: \"400\",\n lineHeight: \"20px\",\n scaleStep: \"150\",\n lineHeightCategory: \"compact\" as const,\n };\n }\n};\n\nfunction getResponsiveLineHeight(\n styles: ReturnType<typeof getVariantStyles>\n): string | undefined {\n const step = styles.lineHeightScaleStep || styles.scaleStep;\n if (!step) return undefined;\n\n const cat = styles.lineHeightCategory;\n if (cat === \"display\") return cssVar.lhDisplay(step);\n if (cat === \"text\") return cssVar.lhText(step);\n return cssVar.lhCompact(step);\n}\n\nexport const Typography = forwardRef<any, TypographyProps>(\n (\n {\n children,\n align = \"inherit\",\n noWrap = false,\n variant = \"bodyMd\",\n color = \"inherit\",\n marginBottom = 0,\n marginTop = 0,\n as,\n productContext,\n themeMode,\n themeProductContext,\n ...rest\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const typographyTokens = productContext\n ? getTypographyTokens(productContext)\n : (theme as any).typographyTokens;\n const variantStyles = getVariantStyles(variant, typographyTokens);\n const colorValue = getColor(color, theme);\n const contextFonts = productContext\n ? getFonts(productContext)\n : (theme.fonts as Record<string, string>);\n const fontFamily = isHeadingVariant(variant)\n ? contextFonts?.heading\n : contextFonts?.body;\n\n const useResponsiveCSS = isWeb && variantStyles.scaleStep;\n\n const responsiveFontSize = useResponsiveCSS\n ? cssVar.fontSize(variantStyles.scaleStep!)\n : undefined;\n const responsiveLineHeight = useResponsiveCSS\n ? getResponsiveLineHeight(variantStyles)\n : undefined;\n\n return (\n <Text\n {...rest}\n ref={ref}\n as={as}\n color={colorValue}\n fontSize={useResponsiveCSS ? undefined : variantStyles.fontSize}\n fontWeight={variantStyles.fontWeight}\n fontFamily={fontFamily}\n numberOfLines={noWrap ? 1 : undefined}\n style={{\n marginTop,\n marginBottom,\n textAlign: align === \"inherit\" ? undefined : align,\n ...(useResponsiveCSS\n ? { fontSize: responsiveFontSize, lineHeight: responsiveLineHeight }\n : { lineHeight: variantStyles.lineHeight }),\n ...(noWrap && {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }),\n ...rest.style,\n }}\n >\n {children}\n </Text>\n );\n }\n);\n\nTypography.displayName = \"Typography\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledText = styled.span<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA2B;;;ACC3B,+BAAmB;AA+Bf;AA5BJ,IAAM,aAAa,yBAAAA,QAAO;AAAA,WACf,CAAC,UAAU,MAAM,SAAS,SAAS;AAAA,eAC/B,CAAC,UACZ,OAAO,MAAM,aAAa,WACtB,GAAG,MAAM,QAAQ,OACjB,MAAM,YAAY,SAAS;AAAA,iBAClB,CAAC,UAAU,MAAM,cAAc,QAAQ;AAAA,iBACvC,CAAC,UACd,MAAM,cACN,sGAAsG;AAAA,iBACzF,CAAC,UACd,OAAO,MAAM,eAAe,WACxB,GAAG,MAAM,UAAU,OACnB,MAAM,cAAc,SAAS;AAAA,iBACpB,CAAC,UAAU,MAAM,cAAc,QAAQ;AAAA,gBACxC,CAAC,UAAU,MAAM,aAAa,SAAS;AAAA,qBAClC,CAAC,UAAU,MAAM,kBAAkB,MAAM;AAAA;AAGvD,IAAM,OAA4B,CAAC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,GAAG;AACL,MAAM;AACJ,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;;;ADrCA,sBAOO;AA4VD,IAAAC,sBAAA;AAzVN,IAAM,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c;AAAA,QACvD,YAAY,cAAc;AAAA,QAC1B;AAAA,QACA,eAAe,SAAS,IAAI;AAAA,QAC5B,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA,WAAW,UAAU,YAAY,SAAY;AAAA,UAC7C,GAAI,mBACA,EAAE,UAAU,oBAAoB,YAAY,qBAAqB,IACjE,EAAE,YAAY,cAAc,WAAW;AAAA,UAC3C,GAAI,UAAU;AAAA,YACZ,UAAU;AAAA,YACV,cAAc;AAAA,YACd,YAAY;AAAA,UACd;AAAA,UACA,GAAG,KAAK;AAAA,QACV;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;","names":["styled","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../src/index.tsx","../../src/Typography.tsx","../../../primitives-web/src/filterDOMProps.ts","../../../../node_modules/@emotion/memoize/dist/memoize.esm.js","../../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js","../../../primitives-web/src/Text.tsx"],"sourcesContent":["export * from \"./Typography\";\nexport * from \"./types\";\n","import { forwardRef } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Text } from \"@xsolla/xui-primitives\";\nimport {\n useResolvedTheme,\n getTypographyTokens,\n getFonts,\n isWeb,\n isNative,\n cssVar,\n} from \"@xsolla/xui-core\";\nimport type { ColorType, TypographyProps, VariantType } from \"./types\";\n\nconst getColor = (\n color: ColorType | string,\n theme: any\n): string | undefined => {\n if (color === \"inherit\") {\n return isNative ? theme?.colors?.content?.primary : undefined;\n }\n\n const colorMap: Record<string, string> = {\n primary: theme?.colors?.content?.primary,\n secondary: theme?.colors?.content?.secondary,\n tertiary: theme?.colors?.content?.tertiary,\n brand: theme?.colors?.content?.brand?.primary,\n brandSecondary: theme?.colors?.content?.brand?.secondary,\n success: theme?.colors?.content?.success?.primary,\n warning: theme?.colors?.content?.warning?.primary,\n alert: theme?.colors?.content?.alert?.primary,\n neutral: theme?.colors?.content?.neutral?.primary,\n };\n\n return colorMap[color] || color;\n};\n\nconst isHeadingVariant = (variant: VariantType): boolean =>\n variant === \"h1\" ||\n variant === \"h2\" ||\n variant === \"h3\" ||\n variant === \"h4\" ||\n variant === \"h5\" ||\n variant === \"display\";\n\nconst bodyMap: Record<string, string> = {\n bodyLg: \"body-lg\",\n bodyLgAccent: \"body-lg\",\n bodyLgParagraph: \"body-lg\",\n bodyMd: \"body-md\",\n bodyMdAccent: \"body-md\",\n bodyMdParagraph: \"body-md\",\n bodySm: \"body-sm\",\n bodySmAccent: \"body-sm\",\n bodySmParagraph: \"body-sm\",\n bodyXs: \"body-xs\",\n bodyXsAccent: \"body-xs\",\n bodyXsParagraph: \"body-xs\",\n bodyXxs: \"body-xxs\",\n bodyXxsAccent: \"body-xxs\",\n bodyXxsParagraph: \"body-xxs\",\n};\n\nconst headingMap: Record<string, string> = {\n h1: \"h1\",\n h2: \"h2\",\n h3: \"h3\",\n h4: \"h4\",\n h5: \"h5\",\n};\n\nconst getVariantStyles = (variant: VariantType, typographyTokens?: any) => {\n if (typographyTokens) {\n if (headingMap[variant]) {\n const token = typographyTokens.heading[headingMap[variant]];\n if (token) {\n return {\n fontSize: token.fontSize,\n fontWeight: String(token.fontWeight),\n lineHeight: token.lineHeight,\n scaleStep: token.scaleStep,\n lineHeightCategory: token.lineHeightCategory,\n };\n }\n }\n\n if (variant === \"display\" && typographyTokens.basic?.display) {\n const token = typographyTokens.basic.display;\n return {\n fontSize: token.fontSize,\n fontWeight: String(token.fontWeight),\n lineHeight: token.lineHeight,\n scaleStep: token.scaleStep,\n lineHeightCategory: token.lineHeightCategory,\n };\n }\n\n const bodyKey = bodyMap[variant];\n if (bodyKey && typographyTokens.basic?.[bodyKey]) {\n const token = typographyTokens.basic[bodyKey];\n let fontWeight = token.fontWeight;\n let lineHeight = token.lineHeight;\n let lineHeightCategory = token.lineHeightCategory;\n let lineHeightScaleStep: string | undefined;\n\n if (variant.includes(\"Accent\") && token.accent) {\n fontWeight = token.accent.fontWeight;\n }\n\n if (variant.includes(\"Paragraph\") && token.paragraph) {\n lineHeight = token.paragraph.lineHeight;\n lineHeightCategory = \"text\";\n lineHeightScaleStep = token.paragraph.lineHeightScaleStep;\n }\n\n return {\n fontSize: token.fontSize,\n fontWeight: String(fontWeight),\n lineHeight,\n scaleStep: token.scaleStep,\n lineHeightCategory,\n lineHeightScaleStep,\n };\n }\n }\n\n switch (variant) {\n case \"h1\":\n return {\n fontSize: 56,\n fontWeight: \"400\",\n lineHeight: \"56px\",\n scaleStep: \"650\",\n lineHeightCategory: \"display\" as const,\n };\n case \"h2\":\n return {\n fontSize: 48,\n fontWeight: \"400\",\n lineHeight: \"48px\",\n scaleStep: \"550\",\n lineHeightCategory: \"display\" as const,\n };\n case \"h3\":\n return {\n fontSize: 32,\n fontWeight: \"400\",\n lineHeight: \"32px\",\n scaleStep: \"350\",\n lineHeightCategory: \"display\" as const,\n };\n case \"h4\":\n return {\n fontSize: 24,\n fontWeight: \"400\",\n lineHeight: \"24px\",\n scaleStep: \"250\",\n lineHeightCategory: \"display\" as const,\n };\n case \"h5\":\n return {\n fontSize: 20,\n fontWeight: \"600\",\n lineHeight: \"20px\",\n scaleStep: \"200\",\n lineHeightCategory: \"display\" as const,\n };\n case \"display\":\n return {\n fontSize: 64,\n fontWeight: \"400\",\n lineHeight: \"64px\",\n scaleStep: \"750\",\n lineHeightCategory: \"display\" as const,\n };\n case \"bodyLg\":\n return {\n fontSize: 18,\n fontWeight: \"400\",\n lineHeight: \"24px\",\n scaleStep: \"175\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyLgAccent\":\n return {\n fontSize: 18,\n fontWeight: \"500\",\n lineHeight: \"24px\",\n scaleStep: \"175\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyLgParagraph\":\n return {\n fontSize: 18,\n fontWeight: \"400\",\n lineHeight: \"26px\",\n scaleStep: \"175\",\n lineHeightCategory: \"text\" as const,\n };\n case \"bodyMd\":\n return {\n fontSize: 16,\n fontWeight: \"400\",\n lineHeight: \"20px\",\n scaleStep: \"150\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyMdAccent\":\n return {\n fontSize: 16,\n fontWeight: \"500\",\n lineHeight: \"20px\",\n scaleStep: \"150\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyMdParagraph\":\n return {\n fontSize: 16,\n fontWeight: \"400\",\n lineHeight: \"22px\",\n scaleStep: \"150\",\n lineHeightCategory: \"text\" as const,\n };\n case \"bodySm\":\n return {\n fontSize: 14,\n fontWeight: \"400\",\n lineHeight: \"18px\",\n scaleStep: \"125\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodySmAccent\":\n return {\n fontSize: 14,\n fontWeight: \"500\",\n lineHeight: \"18px\",\n scaleStep: \"125\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodySmParagraph\":\n return {\n fontSize: 14,\n fontWeight: \"400\",\n lineHeight: \"20px\",\n scaleStep: \"125\",\n lineHeightCategory: \"text\" as const,\n };\n case \"bodyXs\":\n return {\n fontSize: 12,\n fontWeight: \"400\",\n lineHeight: \"16px\",\n scaleStep: \"100\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyXsAccent\":\n return {\n fontSize: 12,\n fontWeight: \"500\",\n lineHeight: \"16px\",\n scaleStep: \"100\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyXsParagraph\":\n return {\n fontSize: 12,\n fontWeight: \"400\",\n lineHeight: \"18px\",\n scaleStep: \"100\",\n lineHeightCategory: \"text\" as const,\n };\n case \"bodyXxs\":\n return {\n fontSize: 10,\n fontWeight: \"400\",\n lineHeight: \"14px\",\n scaleStep: \"75\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyXxsAccent\":\n return {\n fontSize: 10,\n fontWeight: \"500\",\n lineHeight: \"14px\",\n scaleStep: \"75\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyXxsParagraph\":\n return {\n fontSize: 10,\n fontWeight: \"400\",\n lineHeight: \"14px\",\n scaleStep: \"75\",\n lineHeightCategory: \"text\" as const,\n };\n default:\n return {\n fontSize: 16,\n fontWeight: \"400\",\n lineHeight: \"20px\",\n scaleStep: \"150\",\n lineHeightCategory: \"compact\" as const,\n };\n }\n};\n\nfunction getResponsiveLineHeight(\n styles: ReturnType<typeof getVariantStyles>\n): string | undefined {\n const step = styles.lineHeightScaleStep || styles.scaleStep;\n if (!step) return undefined;\n\n const cat = styles.lineHeightCategory;\n if (cat === \"display\") return cssVar.lhDisplay(step);\n if (cat === \"text\") return cssVar.lhText(step);\n return cssVar.lhCompact(step);\n}\n\nexport const Typography = forwardRef<any, TypographyProps>(\n (\n {\n children,\n align = \"inherit\",\n noWrap = false,\n variant = \"bodyMd\",\n color = \"inherit\",\n marginBottom = 0,\n marginTop = 0,\n as,\n productContext,\n themeMode,\n themeProductContext,\n ...rest\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const typographyTokens = productContext\n ? getTypographyTokens(productContext)\n : (theme as any).typographyTokens;\n const variantStyles = getVariantStyles(variant, typographyTokens);\n const colorValue = getColor(color, theme);\n const contextFonts = productContext\n ? getFonts(productContext)\n : (theme.fonts as Record<string, string>);\n const fontFamily = isHeadingVariant(variant)\n ? contextFonts?.heading\n : contextFonts?.body;\n\n const useResponsiveCSS = isWeb && variantStyles.scaleStep;\n\n const responsiveFontSize = useResponsiveCSS\n ? cssVar.fontSize(variantStyles.scaleStep!)\n : undefined;\n const responsiveLineHeight = useResponsiveCSS\n ? getResponsiveLineHeight(variantStyles)\n : undefined;\n\n return (\n <Text\n {...rest}\n ref={ref}\n as={as}\n color={colorValue}\n fontSize={useResponsiveCSS ? undefined : variantStyles.fontSize}\n fontWeight={variantStyles.fontWeight}\n fontFamily={fontFamily}\n numberOfLines={noWrap ? 1 : undefined}\n style={{\n marginTop,\n marginBottom,\n textAlign: align === \"inherit\" ? undefined : align,\n ...(useResponsiveCSS\n ? { fontSize: responsiveFontSize, lineHeight: responsiveLineHeight }\n : { lineHeight: variantStyles.lineHeight }),\n ...(noWrap && {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }),\n ...rest.style,\n }}\n >\n {children}\n </Text>\n );\n }\n);\n\nTypography.displayName = \"Typography\";\n","import React from \"react\";\nimport isPropValid from \"@emotion/is-prop-valid\";\n\n// Props that @emotion/is-prop-valid incorrectly treats as valid HTML.\n// These are React Native or component-specific props that match\n// valid HTML patterns (on* event handlers, SVG attributes).\nexport const ADDITIONAL_BLOCKED_PROPS = new Set([\n // RN-only event handlers (pass isPropValid's on* pattern)\n \"onPress\",\n \"onChangeText\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n // SVG attributes that pass isPropValid\n \"strokeWidth\",\n // CSS properties that pass isPropValid but are used as component props\n \"overflow\",\n \"cursor\",\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"textDecoration\",\n]);\n\nfunction shouldForwardProp(key: string): boolean {\n if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;\n return isPropValid(key);\n}\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Uses @emotion/is-prop-valid (same library styled-components v4\n * uses internally) to automatically block invalid HTML attributes,\n * plus a small blocklist for false positives (RN on* handlers, SVG attrs).\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then: `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n const Component = React.forwardRef<HTMLElement, Record<string, unknown>>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = (elementType as string) || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (shouldForwardProp(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(\n Tag,\n { ref, ...htmlProps },\n children as React.ReactNode\n );\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredSpan = createFilteredElement(\"span\");\n\nconst StyledText = styled(FilteredSpan)<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA2B;;;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AA,QAEC;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;","names":["import_react","React","styled","import_jsx_runtime"]}
package/web/index.mjs CHANGED
@@ -1,10 +1,80 @@
1
1
  // src/Typography.tsx
2
2
  import { forwardRef } from "react";
3
3
 
4
+ // ../primitives-web/src/filterDOMProps.ts
5
+ import React from "react";
6
+
7
+ // ../../node_modules/@emotion/memoize/dist/memoize.esm.js
8
+ function memoize(fn) {
9
+ var cache = {};
10
+ return function(arg) {
11
+ if (cache[arg] === void 0) cache[arg] = fn(arg);
12
+ return cache[arg];
13
+ };
14
+ }
15
+ var memoize_esm_default = memoize;
16
+
17
+ // ../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js
18
+ var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
19
+ var index = memoize_esm_default(
20
+ function(prop) {
21
+ return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
22
+ }
23
+ /* Z+1 */
24
+ );
25
+ var is_prop_valid_esm_default = index;
26
+
27
+ // ../primitives-web/src/filterDOMProps.ts
28
+ var ADDITIONAL_BLOCKED_PROPS = /* @__PURE__ */ new Set([
29
+ // RN-only event handlers (pass isPropValid's on* pattern)
30
+ "onPress",
31
+ "onChangeText",
32
+ "onLayout",
33
+ "onMoveShouldSetResponder",
34
+ "onResponderGrant",
35
+ "onResponderMove",
36
+ "onResponderRelease",
37
+ "onResponderTerminate",
38
+ // SVG attributes that pass isPropValid
39
+ "strokeWidth",
40
+ // CSS properties that pass isPropValid but are used as component props
41
+ "overflow",
42
+ "cursor",
43
+ "fontSize",
44
+ "fontWeight",
45
+ "fontFamily",
46
+ "textDecoration"
47
+ ]);
48
+ function shouldForwardProp(key) {
49
+ if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;
50
+ return is_prop_valid_esm_default(key);
51
+ }
52
+ function createFilteredElement(defaultTag) {
53
+ const Component = React.forwardRef(
54
+ ({ children, elementType, ...props }, ref) => {
55
+ const Tag = elementType || defaultTag;
56
+ const htmlProps = {};
57
+ for (const key of Object.keys(props)) {
58
+ if (shouldForwardProp(key)) {
59
+ htmlProps[key] = props[key];
60
+ }
61
+ }
62
+ return React.createElement(
63
+ Tag,
64
+ { ref, ...htmlProps },
65
+ children
66
+ );
67
+ }
68
+ );
69
+ Component.displayName = `Filtered(${defaultTag})`;
70
+ return Component;
71
+ }
72
+
4
73
  // ../primitives-web/src/Text.tsx
5
74
  import styled from "styled-components";
6
75
  import { jsx } from "react/jsx-runtime";
7
- var StyledText = styled.span`
76
+ var FilteredSpan = createFilteredElement("span");
77
+ var StyledText = styled(FilteredSpan)`
8
78
  color: ${(props) => props.color || "inherit"};
9
79
  font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
10
80
  font-weight: ${(props) => props.fontWeight || "normal"};
package/web/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Typography.tsx","../../../primitives-web/src/Text.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Text } from \"@xsolla/xui-primitives\";\nimport {\n useResolvedTheme,\n getTypographyTokens,\n getFonts,\n isWeb,\n isNative,\n cssVar,\n} from \"@xsolla/xui-core\";\nimport type { ColorType, TypographyProps, VariantType } from \"./types\";\n\nconst getColor = (\n color: ColorType | string,\n theme: any\n): string | undefined => {\n if (color === \"inherit\") {\n return isNative ? theme?.colors?.content?.primary : undefined;\n }\n\n const colorMap: Record<string, string> = {\n primary: theme?.colors?.content?.primary,\n secondary: theme?.colors?.content?.secondary,\n tertiary: theme?.colors?.content?.tertiary,\n brand: theme?.colors?.content?.brand?.primary,\n brandSecondary: theme?.colors?.content?.brand?.secondary,\n success: theme?.colors?.content?.success?.primary,\n warning: theme?.colors?.content?.warning?.primary,\n alert: theme?.colors?.content?.alert?.primary,\n neutral: theme?.colors?.content?.neutral?.primary,\n };\n\n return colorMap[color] || color;\n};\n\nconst isHeadingVariant = (variant: VariantType): boolean =>\n variant === \"h1\" ||\n variant === \"h2\" ||\n variant === \"h3\" ||\n variant === \"h4\" ||\n variant === \"h5\" ||\n variant === \"display\";\n\nconst bodyMap: Record<string, string> = {\n bodyLg: \"body-lg\",\n bodyLgAccent: \"body-lg\",\n bodyLgParagraph: \"body-lg\",\n bodyMd: \"body-md\",\n bodyMdAccent: \"body-md\",\n bodyMdParagraph: \"body-md\",\n bodySm: \"body-sm\",\n bodySmAccent: \"body-sm\",\n bodySmParagraph: \"body-sm\",\n bodyXs: \"body-xs\",\n bodyXsAccent: \"body-xs\",\n bodyXsParagraph: \"body-xs\",\n bodyXxs: \"body-xxs\",\n bodyXxsAccent: \"body-xxs\",\n bodyXxsParagraph: \"body-xxs\",\n};\n\nconst headingMap: Record<string, string> = {\n h1: \"h1\",\n h2: \"h2\",\n h3: \"h3\",\n h4: \"h4\",\n h5: \"h5\",\n};\n\nconst getVariantStyles = (variant: VariantType, typographyTokens?: any) => {\n if (typographyTokens) {\n if (headingMap[variant]) {\n const token = typographyTokens.heading[headingMap[variant]];\n if (token) {\n return {\n fontSize: token.fontSize,\n fontWeight: String(token.fontWeight),\n lineHeight: token.lineHeight,\n scaleStep: token.scaleStep,\n lineHeightCategory: token.lineHeightCategory,\n };\n }\n }\n\n if (variant === \"display\" && typographyTokens.basic?.display) {\n const token = typographyTokens.basic.display;\n return {\n fontSize: token.fontSize,\n fontWeight: String(token.fontWeight),\n lineHeight: token.lineHeight,\n scaleStep: token.scaleStep,\n lineHeightCategory: token.lineHeightCategory,\n };\n }\n\n const bodyKey = bodyMap[variant];\n if (bodyKey && typographyTokens.basic?.[bodyKey]) {\n const token = typographyTokens.basic[bodyKey];\n let fontWeight = token.fontWeight;\n let lineHeight = token.lineHeight;\n let lineHeightCategory = token.lineHeightCategory;\n let lineHeightScaleStep: string | undefined;\n\n if (variant.includes(\"Accent\") && token.accent) {\n fontWeight = token.accent.fontWeight;\n }\n\n if (variant.includes(\"Paragraph\") && token.paragraph) {\n lineHeight = token.paragraph.lineHeight;\n lineHeightCategory = \"text\";\n lineHeightScaleStep = token.paragraph.lineHeightScaleStep;\n }\n\n return {\n fontSize: token.fontSize,\n fontWeight: String(fontWeight),\n lineHeight,\n scaleStep: token.scaleStep,\n lineHeightCategory,\n lineHeightScaleStep,\n };\n }\n }\n\n switch (variant) {\n case \"h1\":\n return {\n fontSize: 56,\n fontWeight: \"400\",\n lineHeight: \"56px\",\n scaleStep: \"650\",\n lineHeightCategory: \"display\" as const,\n };\n case \"h2\":\n return {\n fontSize: 48,\n fontWeight: \"400\",\n lineHeight: \"48px\",\n scaleStep: \"550\",\n lineHeightCategory: \"display\" as const,\n };\n case \"h3\":\n return {\n fontSize: 32,\n fontWeight: \"400\",\n lineHeight: \"32px\",\n scaleStep: \"350\",\n lineHeightCategory: \"display\" as const,\n };\n case \"h4\":\n return {\n fontSize: 24,\n fontWeight: \"400\",\n lineHeight: \"24px\",\n scaleStep: \"250\",\n lineHeightCategory: \"display\" as const,\n };\n case \"h5\":\n return {\n fontSize: 20,\n fontWeight: \"600\",\n lineHeight: \"20px\",\n scaleStep: \"200\",\n lineHeightCategory: \"display\" as const,\n };\n case \"display\":\n return {\n fontSize: 64,\n fontWeight: \"400\",\n lineHeight: \"64px\",\n scaleStep: \"750\",\n lineHeightCategory: \"display\" as const,\n };\n case \"bodyLg\":\n return {\n fontSize: 18,\n fontWeight: \"400\",\n lineHeight: \"24px\",\n scaleStep: \"175\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyLgAccent\":\n return {\n fontSize: 18,\n fontWeight: \"500\",\n lineHeight: \"24px\",\n scaleStep: \"175\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyLgParagraph\":\n return {\n fontSize: 18,\n fontWeight: \"400\",\n lineHeight: \"26px\",\n scaleStep: \"175\",\n lineHeightCategory: \"text\" as const,\n };\n case \"bodyMd\":\n return {\n fontSize: 16,\n fontWeight: \"400\",\n lineHeight: \"20px\",\n scaleStep: \"150\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyMdAccent\":\n return {\n fontSize: 16,\n fontWeight: \"500\",\n lineHeight: \"20px\",\n scaleStep: \"150\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyMdParagraph\":\n return {\n fontSize: 16,\n fontWeight: \"400\",\n lineHeight: \"22px\",\n scaleStep: \"150\",\n lineHeightCategory: \"text\" as const,\n };\n case \"bodySm\":\n return {\n fontSize: 14,\n fontWeight: \"400\",\n lineHeight: \"18px\",\n scaleStep: \"125\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodySmAccent\":\n return {\n fontSize: 14,\n fontWeight: \"500\",\n lineHeight: \"18px\",\n scaleStep: \"125\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodySmParagraph\":\n return {\n fontSize: 14,\n fontWeight: \"400\",\n lineHeight: \"20px\",\n scaleStep: \"125\",\n lineHeightCategory: \"text\" as const,\n };\n case \"bodyXs\":\n return {\n fontSize: 12,\n fontWeight: \"400\",\n lineHeight: \"16px\",\n scaleStep: \"100\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyXsAccent\":\n return {\n fontSize: 12,\n fontWeight: \"500\",\n lineHeight: \"16px\",\n scaleStep: \"100\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyXsParagraph\":\n return {\n fontSize: 12,\n fontWeight: \"400\",\n lineHeight: \"18px\",\n scaleStep: \"100\",\n lineHeightCategory: \"text\" as const,\n };\n case \"bodyXxs\":\n return {\n fontSize: 10,\n fontWeight: \"400\",\n lineHeight: \"14px\",\n scaleStep: \"75\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyXxsAccent\":\n return {\n fontSize: 10,\n fontWeight: \"500\",\n lineHeight: \"14px\",\n scaleStep: \"75\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyXxsParagraph\":\n return {\n fontSize: 10,\n fontWeight: \"400\",\n lineHeight: \"14px\",\n scaleStep: \"75\",\n lineHeightCategory: \"text\" as const,\n };\n default:\n return {\n fontSize: 16,\n fontWeight: \"400\",\n lineHeight: \"20px\",\n scaleStep: \"150\",\n lineHeightCategory: \"compact\" as const,\n };\n }\n};\n\nfunction getResponsiveLineHeight(\n styles: ReturnType<typeof getVariantStyles>\n): string | undefined {\n const step = styles.lineHeightScaleStep || styles.scaleStep;\n if (!step) return undefined;\n\n const cat = styles.lineHeightCategory;\n if (cat === \"display\") return cssVar.lhDisplay(step);\n if (cat === \"text\") return cssVar.lhText(step);\n return cssVar.lhCompact(step);\n}\n\nexport const Typography = forwardRef<any, TypographyProps>(\n (\n {\n children,\n align = \"inherit\",\n noWrap = false,\n variant = \"bodyMd\",\n color = \"inherit\",\n marginBottom = 0,\n marginTop = 0,\n as,\n productContext,\n themeMode,\n themeProductContext,\n ...rest\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const typographyTokens = productContext\n ? getTypographyTokens(productContext)\n : (theme as any).typographyTokens;\n const variantStyles = getVariantStyles(variant, typographyTokens);\n const colorValue = getColor(color, theme);\n const contextFonts = productContext\n ? getFonts(productContext)\n : (theme.fonts as Record<string, string>);\n const fontFamily = isHeadingVariant(variant)\n ? contextFonts?.heading\n : contextFonts?.body;\n\n const useResponsiveCSS = isWeb && variantStyles.scaleStep;\n\n const responsiveFontSize = useResponsiveCSS\n ? cssVar.fontSize(variantStyles.scaleStep!)\n : undefined;\n const responsiveLineHeight = useResponsiveCSS\n ? getResponsiveLineHeight(variantStyles)\n : undefined;\n\n return (\n <Text\n {...rest}\n ref={ref}\n as={as}\n color={colorValue}\n fontSize={useResponsiveCSS ? undefined : variantStyles.fontSize}\n fontWeight={variantStyles.fontWeight}\n fontFamily={fontFamily}\n numberOfLines={noWrap ? 1 : undefined}\n style={{\n marginTop,\n marginBottom,\n textAlign: align === \"inherit\" ? undefined : align,\n ...(useResponsiveCSS\n ? { fontSize: responsiveFontSize, lineHeight: responsiveLineHeight }\n : { lineHeight: variantStyles.lineHeight }),\n ...(noWrap && {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }),\n ...rest.style,\n }}\n >\n {children}\n </Text>\n );\n }\n);\n\nTypography.displayName = \"Typography\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledText = styled.span<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\n"],"mappings":";AAAA,SAAS,kBAAkB;;;ACC3B,OAAO,YAAY;AA+Bf;AA5BJ,IAAM,aAAa,OAAO;AAAA,WACf,CAAC,UAAU,MAAM,SAAS,SAAS;AAAA,eAC/B,CAAC,UACZ,OAAO,MAAM,aAAa,WACtB,GAAG,MAAM,QAAQ,OACjB,MAAM,YAAY,SAAS;AAAA,iBAClB,CAAC,UAAU,MAAM,cAAc,QAAQ;AAAA,iBACvC,CAAC,UACd,MAAM,cACN,sGAAsG;AAAA,iBACzF,CAAC,UACd,OAAO,MAAM,eAAe,WACxB,GAAG,MAAM,UAAU,OACnB,MAAM,cAAc,SAAS;AAAA,iBACpB,CAAC,UAAU,MAAM,cAAc,QAAQ;AAAA,gBACxC,CA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AiB,SAAS,gBAAgB;AAChE,UAAM,aAAa,SAAS,OAAO,KAAK;AACxC,UAAM,eAAe,iBACjB,SAAS,cAAc,IACtB,MAAM;AACX,UAAM,aAAa,iBAAiB,OAAO,IACvC,cAAc,UACd,cAAc;AAElB,UAAM,mBAAmB,SAAS,cAAc;AAEhD,UAAM,qBAAqB,mBACvB,OAAO,SAAS,cAAc,SAAU,IACxC;AACJ,UAAM,uBAAuB,mBACzB,wBAAwB,aAAa,IACrC;AAEJ,WACE,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA;AAAA,QACA,OAAO;AAAA,QACP,UAAU,mBAAmB,SAAY,cAAc;AAAA,QACvD,YAAY,cAAc;AAAA,QAC1B;AAAA,QACA,eAAe,SAAS,IAAI;AAAA,QAC5B,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA,WAAW,UAAU,YAAY,SAAY;AAAA,UAC7C,GAAI,mBACA,EAAE,UAAU,oBAAoB,YAAY,qBAAqB,IACjE,EAAE,YAAY,cAAc,WAAW;AAAA,UAC3C,GAAI,UAAU;AAAA,YACZ,UAAU;AAAA,YACV,cAAc;AAAA,YACd,YAAY;AAAA,UACd;AAAA,UACA,GAAG,KAAK;AAAA,QACV;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;","names":["jsx"]}
1
+ {"version":3,"sources":["../../src/Typography.tsx","../../../primitives-web/src/filterDOMProps.ts","../../../../node_modules/@emotion/memoize/dist/memoize.esm.js","../../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js","../../../primitives-web/src/Text.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Text } from \"@xsolla/xui-primitives\";\nimport {\n useResolvedTheme,\n getTypographyTokens,\n getFonts,\n isWeb,\n isNative,\n cssVar,\n} from \"@xsolla/xui-core\";\nimport type { ColorType, TypographyProps, VariantType } from \"./types\";\n\nconst getColor = (\n color: ColorType | string,\n theme: any\n): string | undefined => {\n if (color === \"inherit\") {\n return isNative ? theme?.colors?.content?.primary : undefined;\n }\n\n const colorMap: Record<string, string> = {\n primary: theme?.colors?.content?.primary,\n secondary: theme?.colors?.content?.secondary,\n tertiary: theme?.colors?.content?.tertiary,\n brand: theme?.colors?.content?.brand?.primary,\n brandSecondary: theme?.colors?.content?.brand?.secondary,\n success: theme?.colors?.content?.success?.primary,\n warning: theme?.colors?.content?.warning?.primary,\n alert: theme?.colors?.content?.alert?.primary,\n neutral: theme?.colors?.content?.neutral?.primary,\n };\n\n return colorMap[color] || color;\n};\n\nconst isHeadingVariant = (variant: VariantType): boolean =>\n variant === \"h1\" ||\n variant === \"h2\" ||\n variant === \"h3\" ||\n variant === \"h4\" ||\n variant === \"h5\" ||\n variant === \"display\";\n\nconst bodyMap: Record<string, string> = {\n bodyLg: \"body-lg\",\n bodyLgAccent: \"body-lg\",\n bodyLgParagraph: \"body-lg\",\n bodyMd: \"body-md\",\n bodyMdAccent: \"body-md\",\n bodyMdParagraph: \"body-md\",\n bodySm: \"body-sm\",\n bodySmAccent: \"body-sm\",\n bodySmParagraph: \"body-sm\",\n bodyXs: \"body-xs\",\n bodyXsAccent: \"body-xs\",\n bodyXsParagraph: \"body-xs\",\n bodyXxs: \"body-xxs\",\n bodyXxsAccent: \"body-xxs\",\n bodyXxsParagraph: \"body-xxs\",\n};\n\nconst headingMap: Record<string, string> = {\n h1: \"h1\",\n h2: \"h2\",\n h3: \"h3\",\n h4: \"h4\",\n h5: \"h5\",\n};\n\nconst getVariantStyles = (variant: VariantType, typographyTokens?: any) => {\n if (typographyTokens) {\n if (headingMap[variant]) {\n const token = typographyTokens.heading[headingMap[variant]];\n if (token) {\n return {\n fontSize: token.fontSize,\n fontWeight: String(token.fontWeight),\n lineHeight: token.lineHeight,\n scaleStep: token.scaleStep,\n lineHeightCategory: token.lineHeightCategory,\n };\n }\n }\n\n if (variant === \"display\" && typographyTokens.basic?.display) {\n const token = typographyTokens.basic.display;\n return {\n fontSize: token.fontSize,\n fontWeight: String(token.fontWeight),\n lineHeight: token.lineHeight,\n scaleStep: token.scaleStep,\n lineHeightCategory: token.lineHeightCategory,\n };\n }\n\n const bodyKey = bodyMap[variant];\n if (bodyKey && typographyTokens.basic?.[bodyKey]) {\n const token = typographyTokens.basic[bodyKey];\n let fontWeight = token.fontWeight;\n let lineHeight = token.lineHeight;\n let lineHeightCategory = token.lineHeightCategory;\n let lineHeightScaleStep: string | undefined;\n\n if (variant.includes(\"Accent\") && token.accent) {\n fontWeight = token.accent.fontWeight;\n }\n\n if (variant.includes(\"Paragraph\") && token.paragraph) {\n lineHeight = token.paragraph.lineHeight;\n lineHeightCategory = \"text\";\n lineHeightScaleStep = token.paragraph.lineHeightScaleStep;\n }\n\n return {\n fontSize: token.fontSize,\n fontWeight: String(fontWeight),\n lineHeight,\n scaleStep: token.scaleStep,\n lineHeightCategory,\n lineHeightScaleStep,\n };\n }\n }\n\n switch (variant) {\n case \"h1\":\n return {\n fontSize: 56,\n fontWeight: \"400\",\n lineHeight: \"56px\",\n scaleStep: \"650\",\n lineHeightCategory: \"display\" as const,\n };\n case \"h2\":\n return {\n fontSize: 48,\n fontWeight: \"400\",\n lineHeight: \"48px\",\n scaleStep: \"550\",\n lineHeightCategory: \"display\" as const,\n };\n case \"h3\":\n return {\n fontSize: 32,\n fontWeight: \"400\",\n lineHeight: \"32px\",\n scaleStep: \"350\",\n lineHeightCategory: \"display\" as const,\n };\n case \"h4\":\n return {\n fontSize: 24,\n fontWeight: \"400\",\n lineHeight: \"24px\",\n scaleStep: \"250\",\n lineHeightCategory: \"display\" as const,\n };\n case \"h5\":\n return {\n fontSize: 20,\n fontWeight: \"600\",\n lineHeight: \"20px\",\n scaleStep: \"200\",\n lineHeightCategory: \"display\" as const,\n };\n case \"display\":\n return {\n fontSize: 64,\n fontWeight: \"400\",\n lineHeight: \"64px\",\n scaleStep: \"750\",\n lineHeightCategory: \"display\" as const,\n };\n case \"bodyLg\":\n return {\n fontSize: 18,\n fontWeight: \"400\",\n lineHeight: \"24px\",\n scaleStep: \"175\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyLgAccent\":\n return {\n fontSize: 18,\n fontWeight: \"500\",\n lineHeight: \"24px\",\n scaleStep: \"175\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyLgParagraph\":\n return {\n fontSize: 18,\n fontWeight: \"400\",\n lineHeight: \"26px\",\n scaleStep: \"175\",\n lineHeightCategory: \"text\" as const,\n };\n case \"bodyMd\":\n return {\n fontSize: 16,\n fontWeight: \"400\",\n lineHeight: \"20px\",\n scaleStep: \"150\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyMdAccent\":\n return {\n fontSize: 16,\n fontWeight: \"500\",\n lineHeight: \"20px\",\n scaleStep: \"150\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyMdParagraph\":\n return {\n fontSize: 16,\n fontWeight: \"400\",\n lineHeight: \"22px\",\n scaleStep: \"150\",\n lineHeightCategory: \"text\" as const,\n };\n case \"bodySm\":\n return {\n fontSize: 14,\n fontWeight: \"400\",\n lineHeight: \"18px\",\n scaleStep: \"125\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodySmAccent\":\n return {\n fontSize: 14,\n fontWeight: \"500\",\n lineHeight: \"18px\",\n scaleStep: \"125\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodySmParagraph\":\n return {\n fontSize: 14,\n fontWeight: \"400\",\n lineHeight: \"20px\",\n scaleStep: \"125\",\n lineHeightCategory: \"text\" as const,\n };\n case \"bodyXs\":\n return {\n fontSize: 12,\n fontWeight: \"400\",\n lineHeight: \"16px\",\n scaleStep: \"100\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyXsAccent\":\n return {\n fontSize: 12,\n fontWeight: \"500\",\n lineHeight: \"16px\",\n scaleStep: \"100\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyXsParagraph\":\n return {\n fontSize: 12,\n fontWeight: \"400\",\n lineHeight: \"18px\",\n scaleStep: \"100\",\n lineHeightCategory: \"text\" as const,\n };\n case \"bodyXxs\":\n return {\n fontSize: 10,\n fontWeight: \"400\",\n lineHeight: \"14px\",\n scaleStep: \"75\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyXxsAccent\":\n return {\n fontSize: 10,\n fontWeight: \"500\",\n lineHeight: \"14px\",\n scaleStep: \"75\",\n lineHeightCategory: \"compact\" as const,\n };\n case \"bodyXxsParagraph\":\n return {\n fontSize: 10,\n fontWeight: \"400\",\n lineHeight: \"14px\",\n scaleStep: \"75\",\n lineHeightCategory: \"text\" as const,\n };\n default:\n return {\n fontSize: 16,\n fontWeight: \"400\",\n lineHeight: \"20px\",\n scaleStep: \"150\",\n lineHeightCategory: \"compact\" as const,\n };\n }\n};\n\nfunction getResponsiveLineHeight(\n styles: ReturnType<typeof getVariantStyles>\n): string | undefined {\n const step = styles.lineHeightScaleStep || styles.scaleStep;\n if (!step) return undefined;\n\n const cat = styles.lineHeightCategory;\n if (cat === \"display\") return cssVar.lhDisplay(step);\n if (cat === \"text\") return cssVar.lhText(step);\n return cssVar.lhCompact(step);\n}\n\nexport const Typography = forwardRef<any, TypographyProps>(\n (\n {\n children,\n align = \"inherit\",\n noWrap = false,\n variant = \"bodyMd\",\n color = \"inherit\",\n marginBottom = 0,\n marginTop = 0,\n as,\n productContext,\n themeMode,\n themeProductContext,\n ...rest\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const typographyTokens = productContext\n ? getTypographyTokens(productContext)\n : (theme as any).typographyTokens;\n const variantStyles = getVariantStyles(variant, typographyTokens);\n const colorValue = getColor(color, theme);\n const contextFonts = productContext\n ? getFonts(productContext)\n : (theme.fonts as Record<string, string>);\n const fontFamily = isHeadingVariant(variant)\n ? contextFonts?.heading\n : contextFonts?.body;\n\n const useResponsiveCSS = isWeb && variantStyles.scaleStep;\n\n const responsiveFontSize = useResponsiveCSS\n ? cssVar.fontSize(variantStyles.scaleStep!)\n : undefined;\n const responsiveLineHeight = useResponsiveCSS\n ? getResponsiveLineHeight(variantStyles)\n : undefined;\n\n return (\n <Text\n {...rest}\n ref={ref}\n as={as}\n color={colorValue}\n fontSize={useResponsiveCSS ? undefined : variantStyles.fontSize}\n fontWeight={variantStyles.fontWeight}\n fontFamily={fontFamily}\n numberOfLines={noWrap ? 1 : undefined}\n style={{\n marginTop,\n marginBottom,\n textAlign: align === \"inherit\" ? undefined : align,\n ...(useResponsiveCSS\n ? { fontSize: responsiveFontSize, lineHeight: responsiveLineHeight }\n : { lineHeight: variantStyles.lineHeight }),\n ...(noWrap && {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }),\n ...rest.style,\n }}\n >\n {children}\n </Text>\n );\n }\n);\n\nTypography.displayName = \"Typography\";\n","import React from \"react\";\nimport isPropValid from \"@emotion/is-prop-valid\";\n\n// Props that @emotion/is-prop-valid incorrectly treats as valid HTML.\n// These are React Native or component-specific props that match\n// valid HTML patterns (on* event handlers, SVG attributes).\nexport const ADDITIONAL_BLOCKED_PROPS = new Set([\n // RN-only event handlers (pass isPropValid's on* pattern)\n \"onPress\",\n \"onChangeText\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n // SVG attributes that pass isPropValid\n \"strokeWidth\",\n // CSS properties that pass isPropValid but are used as component props\n \"overflow\",\n \"cursor\",\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"textDecoration\",\n]);\n\nfunction shouldForwardProp(key: string): boolean {\n if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;\n return isPropValid(key);\n}\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Uses @emotion/is-prop-valid (same library styled-components v4\n * uses internally) to automatically block invalid HTML attributes,\n * plus a small blocklist for false positives (RN on* handlers, SVG attrs).\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then: `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n const Component = React.forwardRef<HTMLElement, Record<string, unknown>>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = (elementType as string) || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (shouldForwardProp(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(\n Tag,\n { ref, ...htmlProps },\n children as React.ReactNode\n );\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredSpan = createFilteredElement(\"span\");\n\nconst StyledText = styled(FilteredSpan)<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\n"],"mappings":";AAAA,SAAS,kBAAkB;;;ACA3B,OAAO,WAAW;;;ACAlB,SAAS,QAAQ,IAAI;AACnB,MAAI,QAAQ,CAAC;AACb,SAAO,SAAU,KAAK;AACpB,QAAI,MAAM,GAAG,MAAM,OAAW,OAAM,GAAG,IAAI,GAAG,GAAG;AACjD,WAAO,MAAM,GAAG;AAAA,EAClB;AACF;AAEA,IAAO,sBAAQ;;;ACNf,IAAI,kBAAkB;AAEtB,IAAI,QAAQ;AAAA,EAAQ,SAAU,MAAM;AAClC,WAAO,gBAAgB,KAAK,IAAI,KAAK,KAAK,WAAW,CAAC,MAAM,OAEzD,KAAK,WAAW,CAAC,MAAM,OAEvB,KAAK,WAAW,CAAC,IAAI;AAAA,EAC1B;AAAA;AAEA;AAEA,IAAO,4BAAQ;;;AFRR,IAAM,2BAA2B,oBAAI,IAAI;AAAA;AAAA,EAE9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,SAAS,kBAAkB,KAAsB;AAC/C,MAAI,yBAAyB,IAAI,GAAG,EAAG,QAAO;AAC9C,SAAO,0BAAY,GAAG;AACxB;AAgBO,SAAS,sBAAsB,YAAoB;AACxD,QAAM,YAAY,MAAM;AAAA,IACtB,CAAC,EAAE,UAAU,aAAa,GAAG,MAAM,GAAG,QAAQ;AAC5C,YAAM,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