@xsolla/xui-icons 0.141.0 → 0.141.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-icons",
3
- "version": "0.141.0",
3
+ "version": "0.141.1",
4
4
  "main": "./web/index.js",
5
5
  "types": "./web/index.d.ts",
6
6
  "scripts": {
@@ -9,7 +9,7 @@
9
9
  "build:native": "PLATFORM=native tsup"
10
10
  },
11
11
  "dependencies": {
12
- "@xsolla/xui-primitives-core": "0.141.0",
12
+ "@xsolla/xui-primitives-core": "0.141.1",
13
13
  "lucide-react": "^0.470.0"
14
14
  },
15
15
  "peerDependencies": {
package/web/index.js CHANGED
@@ -55,7 +55,7 @@ module.exports = __toCommonJS(index_exports);
55
55
  // ../primitives-web/src/filterDOMProps.ts
56
56
  var import_react = __toESM(require("react"));
57
57
 
58
- // ../../node_modules/@emotion/memoize/dist/memoize.esm.js
58
+ // ../../../node_modules/@emotion/memoize/dist/memoize.esm.js
59
59
  function memoize(fn) {
60
60
  var cache = {};
61
61
  return function(arg) {
@@ -65,7 +65,7 @@ function memoize(fn) {
65
65
  }
66
66
  var memoize_esm_default = memoize;
67
67
 
68
- // ../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js
68
+ // ../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js
69
69
  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)-.*))$/;
70
70
  var index = memoize_esm_default(
71
71
  function(prop) {
package/web/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.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/Icon.tsx"],"sourcesContent":["// @ts-expect-error - this will be resolved at build time\nimport { Icon } from \"@xsolla/xui-primitives\";\nimport {\n Check as LucideCheck,\n X as LucideX,\n Copy as LucideCopy,\n Eye as LucideEye,\n EyeOff as LucideEyeOff,\n ArrowLeft as LucideArrowLeft,\n ArrowRight as LucideArrowRight,\n Settings as LucideSettings,\n Minus as LucideMinus,\n AlertCircle as LucideAlertCircle,\n CreditCard as LucideCreditCard,\n Menu as LucideMenu,\n Bell as LucideBell,\n User as LucideUser,\n Search as LucideSearch,\n Home as LucideHome,\n ShoppingCart as LucideShoppingCart,\n Upload as LucideUpload,\n File as LucideFile,\n} from \"lucide-icon-platform\";\n\n// Icons use \"100%\" size to scale with the Icon container wrapper\nexport const Check = (props: any) => (\n <Icon {...props}>\n <LucideCheck size=\"100%\" />\n </Icon>\n);\n\nexport const X = (props: any) => (\n <Icon {...props}>\n <LucideX size=\"100%\" />\n </Icon>\n);\n\nexport const Copy = (props: any) => (\n <Icon {...props}>\n <LucideCopy size=\"100%\" />\n </Icon>\n);\n\nexport const Eye = (props: any) => (\n <Icon {...props}>\n <LucideEye size=\"100%\" />\n </Icon>\n);\n\nexport const EyeOff = (props: any) => (\n <Icon {...props}>\n <LucideEyeOff size=\"100%\" />\n </Icon>\n);\n\nexport const ArrowLeft = (props: any) => (\n <Icon {...props}>\n <LucideArrowLeft size=\"100%\" />\n </Icon>\n);\n\nexport const ArrowRight = (props: any) => (\n <Icon {...props}>\n <LucideArrowRight size=\"100%\" />\n </Icon>\n);\n\nexport const Settings = (props: any) => (\n <Icon {...props}>\n <LucideSettings size=\"100%\" />\n </Icon>\n);\n\nexport const Minus = (props: any) => (\n <Icon {...props}>\n <LucideMinus size=\"100%\" />\n </Icon>\n);\n\nexport const AlertCircle = (props: any) => (\n <Icon {...props}>\n <LucideAlertCircle size=\"100%\" />\n </Icon>\n);\n\nexport const CreditCard = (props: any) => (\n <Icon {...props}>\n <LucideCreditCard size=\"100%\" />\n </Icon>\n);\n\nexport const Menu = (props: any) => (\n <Icon {...props}>\n <LucideMenu size=\"100%\" />\n </Icon>\n);\n\nexport const Bell = (props: any) => (\n <Icon {...props}>\n <LucideBell size=\"100%\" />\n </Icon>\n);\n\nexport const User = (props: any) => (\n <Icon {...props}>\n <LucideUser size=\"100%\" />\n </Icon>\n);\n\nexport const Search = (props: any) => (\n <Icon {...props}>\n <LucideSearch size=\"100%\" />\n </Icon>\n);\n\nexport const Home = (props: any) => (\n <Icon {...props}>\n <LucideHome size=\"100%\" />\n </Icon>\n);\n\nexport const ShoppingCart = (props: any) => (\n <Icon {...props}>\n <LucideShoppingCart size=\"100%\" />\n </Icon>\n);\n\nexport const Upload = (props: any) => (\n <Icon {...props}>\n <LucideUpload size=\"100%\" />\n </Icon>\n);\n\nexport const File = (props: any) => (\n <Icon {...props}>\n <LucideFile size=\"100%\" />\n </Icon>\n);\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 { IconProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledIcon = styled(FilteredDiv)<IconProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n height: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n color: ${(props) => props.color || \"currentColor\"};\n\n svg {\n width: 100%;\n height: 100%;\n fill: none;\n stroke: currentColor;\n }\n`;\n\nexport const Icon: React.FC<IconProps> = ({ children, ...props }) => {\n return <StyledIcon {...props}>{children}</StyledIcon>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AM,OAAO,CAAC,UACnB,6CAAC,QAAM,GAAG,OACR,uDAAC,4BAAAC,MAAA,EAAW,MAAK,QAAO,GAC1B;","names":["React","styled","import_jsx_runtime","LucideCheck","LucideX","LucideCopy","LucideEye","LucideEyeOff","LucideArrowLeft","LucideArrowRight","LucideSettings","LucideMinus","LucideAlertCircle","LucideCreditCard","LucideMenu","LucideBell","LucideUser","LucideSearch","LucideHome","LucideShoppingCart","LucideUpload","LucideFile"]}
1
+ {"version":3,"sources":["../../src/index.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/Icon.tsx"],"sourcesContent":["// @ts-expect-error - this will be resolved at build time\nimport { Icon } from \"@xsolla/xui-primitives\";\nimport {\n Check as LucideCheck,\n X as LucideX,\n Copy as LucideCopy,\n Eye as LucideEye,\n EyeOff as LucideEyeOff,\n ArrowLeft as LucideArrowLeft,\n ArrowRight as LucideArrowRight,\n Settings as LucideSettings,\n Minus as LucideMinus,\n AlertCircle as LucideAlertCircle,\n CreditCard as LucideCreditCard,\n Menu as LucideMenu,\n Bell as LucideBell,\n User as LucideUser,\n Search as LucideSearch,\n Home as LucideHome,\n ShoppingCart as LucideShoppingCart,\n Upload as LucideUpload,\n File as LucideFile,\n} from \"lucide-icon-platform\";\n\n// Icons use \"100%\" size to scale with the Icon container wrapper\nexport const Check = (props: any) => (\n <Icon {...props}>\n <LucideCheck size=\"100%\" />\n </Icon>\n);\n\nexport const X = (props: any) => (\n <Icon {...props}>\n <LucideX size=\"100%\" />\n </Icon>\n);\n\nexport const Copy = (props: any) => (\n <Icon {...props}>\n <LucideCopy size=\"100%\" />\n </Icon>\n);\n\nexport const Eye = (props: any) => (\n <Icon {...props}>\n <LucideEye size=\"100%\" />\n </Icon>\n);\n\nexport const EyeOff = (props: any) => (\n <Icon {...props}>\n <LucideEyeOff size=\"100%\" />\n </Icon>\n);\n\nexport const ArrowLeft = (props: any) => (\n <Icon {...props}>\n <LucideArrowLeft size=\"100%\" />\n </Icon>\n);\n\nexport const ArrowRight = (props: any) => (\n <Icon {...props}>\n <LucideArrowRight size=\"100%\" />\n </Icon>\n);\n\nexport const Settings = (props: any) => (\n <Icon {...props}>\n <LucideSettings size=\"100%\" />\n </Icon>\n);\n\nexport const Minus = (props: any) => (\n <Icon {...props}>\n <LucideMinus size=\"100%\" />\n </Icon>\n);\n\nexport const AlertCircle = (props: any) => (\n <Icon {...props}>\n <LucideAlertCircle size=\"100%\" />\n </Icon>\n);\n\nexport const CreditCard = (props: any) => (\n <Icon {...props}>\n <LucideCreditCard size=\"100%\" />\n </Icon>\n);\n\nexport const Menu = (props: any) => (\n <Icon {...props}>\n <LucideMenu size=\"100%\" />\n </Icon>\n);\n\nexport const Bell = (props: any) => (\n <Icon {...props}>\n <LucideBell size=\"100%\" />\n </Icon>\n);\n\nexport const User = (props: any) => (\n <Icon {...props}>\n <LucideUser size=\"100%\" />\n </Icon>\n);\n\nexport const Search = (props: any) => (\n <Icon {...props}>\n <LucideSearch size=\"100%\" />\n </Icon>\n);\n\nexport const Home = (props: any) => (\n <Icon {...props}>\n <LucideHome size=\"100%\" />\n </Icon>\n);\n\nexport const ShoppingCart = (props: any) => (\n <Icon {...props}>\n <LucideShoppingCart size=\"100%\" />\n </Icon>\n);\n\nexport const Upload = (props: any) => (\n <Icon {...props}>\n <LucideUpload size=\"100%\" />\n </Icon>\n);\n\nexport const File = (props: any) => (\n <Icon {...props}>\n <LucideFile size=\"100%\" />\n </Icon>\n);\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 { IconProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledIcon = styled(FilteredDiv)<IconProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n height: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n color: ${(props) => props.color || \"currentColor\"};\n\n svg {\n width: 100%;\n height: 100%;\n fill: none;\n stroke: currentColor;\n }\n`;\n\nexport const Icon: React.FC<IconProps> = ({ children, ...props }) => {\n return <StyledIcon {...props}>{children}</StyledIcon>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAkB;;;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;AA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C,QAAM,GAAG,OACR,uDAAC,4BAAAC,MAAA,EAAW,MAAK,QAAO,GAC1B;AAGK,IAAM,OAAO,CAAC,UACnB,6CAAC,QAAM,GAAG,OACR,uDAAC,4BAAAC,MAAA,EAAW,MAAK,QAAO,GAC1B;AAGK,IAAM,SAAS,CAAC,UACrB,6CAAC,QAAM,GAAG,OACR,uDAAC,4BAAAC,QAAA,EAAa,MAAK,QAAO,GAC5B;AAGK,IAAM,OAAO,CAAC,UACnB,6CAAC,QAAM,GAAG,OACR,uDAAC,4BAAAC,MAAA,EAAW,MAAK,QAAO,GAC1B;AAGK,IAAM,eAAe,CAAC,UAC3B,6CAAC,QAAM,GAAG,OACR,uDAAC,4BAAAC,cAAA,EAAmB,MAAK,QAAO,GAClC;AAGK,IAAM,SAAS,CAAC,UACrB,6CAAC,QAAM,GAAG,OACR,uDAAC,4BAAAC,QAAA,EAAa,MAAK,QAAO,GAC5B;AAGK,IAAM,OAAO,CAAC,UACnB,6CAAC,QAAM,GAAG,OACR,uDAAC,4BAAAC,MAAA,EAAW,MAAK,QAAO,GAC1B;","names":["React","styled","import_jsx_runtime","LucideCheck","LucideX","LucideCopy","LucideEye","LucideEyeOff","LucideArrowLeft","LucideArrowRight","LucideSettings","LucideMinus","LucideAlertCircle","LucideCreditCard","LucideMenu","LucideBell","LucideUser","LucideSearch","LucideHome","LucideShoppingCart","LucideUpload","LucideFile"]}
package/web/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  // ../primitives-web/src/filterDOMProps.ts
2
2
  import React from "react";
3
3
 
4
- // ../../node_modules/@emotion/memoize/dist/memoize.esm.js
4
+ // ../../../node_modules/@emotion/memoize/dist/memoize.esm.js
5
5
  function memoize(fn) {
6
6
  var cache = {};
7
7
  return function(arg) {
@@ -11,7 +11,7 @@ function memoize(fn) {
11
11
  }
12
12
  var memoize_esm_default = memoize;
13
13
 
14
- // ../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js
14
+ // ../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js
15
15
  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)-.*))$/;
16
16
  var index = memoize_esm_default(
17
17
  function(prop) {
package/web/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../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/Icon.tsx","../../src/index.tsx"],"sourcesContent":["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 { IconProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledIcon = styled(FilteredDiv)<IconProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n height: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n color: ${(props) => props.color || \"currentColor\"};\n\n svg {\n width: 100%;\n height: 100%;\n fill: none;\n stroke: currentColor;\n }\n`;\n\nexport const Icon: React.FC<IconProps> = ({ children, ...props }) => {\n return <StyledIcon {...props}>{children}</StyledIcon>;\n};\n","// @ts-expect-error - this will be resolved at build time\nimport { Icon } from \"@xsolla/xui-primitives\";\nimport {\n Check as LucideCheck,\n X as LucideX,\n Copy as LucideCopy,\n Eye as LucideEye,\n EyeOff as LucideEyeOff,\n ArrowLeft as LucideArrowLeft,\n ArrowRight as LucideArrowRight,\n Settings as LucideSettings,\n Minus as LucideMinus,\n AlertCircle as LucideAlertCircle,\n CreditCard as LucideCreditCard,\n Menu as LucideMenu,\n Bell as LucideBell,\n User as LucideUser,\n Search as LucideSearch,\n Home as LucideHome,\n ShoppingCart as LucideShoppingCart,\n Upload as LucideUpload,\n File as LucideFile,\n} from \"lucide-icon-platform\";\n\n// Icons use \"100%\" size to scale with the Icon container wrapper\nexport const Check = (props: any) => (\n <Icon {...props}>\n <LucideCheck size=\"100%\" />\n </Icon>\n);\n\nexport const X = (props: any) => (\n <Icon {...props}>\n <LucideX size=\"100%\" />\n </Icon>\n);\n\nexport const Copy = (props: any) => (\n <Icon {...props}>\n <LucideCopy size=\"100%\" />\n </Icon>\n);\n\nexport const Eye = (props: any) => (\n <Icon {...props}>\n <LucideEye size=\"100%\" />\n </Icon>\n);\n\nexport const EyeOff = (props: any) => (\n <Icon {...props}>\n <LucideEyeOff size=\"100%\" />\n </Icon>\n);\n\nexport const ArrowLeft = (props: any) => (\n <Icon {...props}>\n <LucideArrowLeft size=\"100%\" />\n </Icon>\n);\n\nexport const ArrowRight = (props: any) => (\n <Icon {...props}>\n <LucideArrowRight size=\"100%\" />\n </Icon>\n);\n\nexport const Settings = (props: any) => (\n <Icon {...props}>\n <LucideSettings size=\"100%\" />\n </Icon>\n);\n\nexport const Minus = (props: any) => (\n <Icon {...props}>\n <LucideMinus size=\"100%\" />\n </Icon>\n);\n\nexport const AlertCircle = (props: any) => (\n <Icon {...props}>\n <LucideAlertCircle size=\"100%\" />\n </Icon>\n);\n\nexport const CreditCard = (props: any) => (\n <Icon {...props}>\n <LucideCreditCard size=\"100%\" />\n </Icon>\n);\n\nexport const Menu = (props: any) => (\n <Icon {...props}>\n <LucideMenu size=\"100%\" />\n </Icon>\n);\n\nexport const Bell = (props: any) => (\n <Icon {...props}>\n <LucideBell size=\"100%\" />\n </Icon>\n);\n\nexport const User = (props: any) => (\n <Icon {...props}>\n <LucideUser size=\"100%\" />\n </Icon>\n);\n\nexport const Search = (props: any) => (\n <Icon {...props}>\n <LucideSearch size=\"100%\" />\n </Icon>\n);\n\nexport const Home = (props: any) => (\n <Icon {...props}>\n <LucideHome size=\"100%\" />\n </Icon>\n);\n\nexport const ShoppingCart = (props: any) => (\n <Icon {...props}>\n <LucideShoppingCart size=\"100%\" />\n </Icon>\n);\n\nexport const Upload = (props: any) => (\n <Icon {...props}>\n <LucideUpload size=\"100%\" />\n </Icon>\n);\n\nexport const File = (props: any) => (\n <Icon {...props}>\n <LucideFile size=\"100%\" />\n </Icon>\n);\n"],"mappings":";AAAA,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,MAAO,eAA0B;AACvC,YAAM,YAAqC,CAAC;AAC5C,i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O,GAC1B;AAGK,IAAM,OAAO,CAAC,UACnB,gBAAAA,KAAC,QAAM,GAAG,OACR,0BAAAA,KAAC,cAAW,MAAK,QAAO,GAC1B;AAGK,IAAM,SAAS,CAAC,UACrB,gBAAAA,KAAC,QAAM,GAAG,OACR,0BAAAA,KAAC,gBAAa,MAAK,QAAO,GAC5B;AAGK,IAAM,OAAO,CAAC,UACnB,gBAAAA,KAAC,QAAM,GAAG,OACR,0BAAAA,KAAC,cAAW,MAAK,QAAO,GAC1B;AAGK,IAAM,eAAe,CAAC,UAC3B,gBAAAA,KAAC,QAAM,GAAG,OACR,0BAAAA,KAAC,sBAAmB,MAAK,QAAO,GAClC;AAGK,IAAM,SAAS,CAAC,UACrB,gBAAAA,KAAC,QAAM,GAAG,OACR,0BAAAA,KAAC,gBAAa,MAAK,QAAO,GAC5B;AAGK,IAAM,OAAO,CAAC,UACnB,gBAAAA,KAAC,QAAM,GAAG,OACR,0BAAAA,KAAC,cAAW,MAAK,QAAO,GAC1B;","names":["jsx"]}
1
+ {"version":3,"sources":["../../../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/Icon.tsx","../../src/index.tsx"],"sourcesContent":["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 { IconProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledIcon = styled(FilteredDiv)<IconProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n height: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n color: ${(props) => props.color || \"currentColor\"};\n\n svg {\n width: 100%;\n height: 100%;\n fill: none;\n stroke: currentColor;\n }\n`;\n\nexport const Icon: React.FC<IconProps> = ({ children, ...props }) => {\n return <StyledIcon {...props}>{children}</StyledIcon>;\n};\n","// @ts-expect-error - this will be resolved at build time\nimport { Icon } from \"@xsolla/xui-primitives\";\nimport {\n Check as LucideCheck,\n X as LucideX,\n Copy as LucideCopy,\n Eye as LucideEye,\n EyeOff as LucideEyeOff,\n ArrowLeft as LucideArrowLeft,\n ArrowRight as LucideArrowRight,\n Settings as LucideSettings,\n Minus as LucideMinus,\n AlertCircle as LucideAlertCircle,\n CreditCard as LucideCreditCard,\n Menu as LucideMenu,\n Bell as LucideBell,\n User as LucideUser,\n Search as LucideSearch,\n Home as LucideHome,\n ShoppingCart as LucideShoppingCart,\n Upload as LucideUpload,\n File as LucideFile,\n} from \"lucide-icon-platform\";\n\n// Icons use \"100%\" size to scale with the Icon container wrapper\nexport const Check = (props: any) => (\n <Icon {...props}>\n <LucideCheck size=\"100%\" />\n </Icon>\n);\n\nexport const X = (props: any) => (\n <Icon {...props}>\n <LucideX size=\"100%\" />\n </Icon>\n);\n\nexport const Copy = (props: any) => (\n <Icon {...props}>\n <LucideCopy size=\"100%\" />\n </Icon>\n);\n\nexport const Eye = (props: any) => (\n <Icon {...props}>\n <LucideEye size=\"100%\" />\n </Icon>\n);\n\nexport const EyeOff = (props: any) => (\n <Icon {...props}>\n <LucideEyeOff size=\"100%\" />\n </Icon>\n);\n\nexport const ArrowLeft = (props: any) => (\n <Icon {...props}>\n <LucideArrowLeft size=\"100%\" />\n </Icon>\n);\n\nexport const ArrowRight = (props: any) => (\n <Icon {...props}>\n <LucideArrowRight size=\"100%\" />\n </Icon>\n);\n\nexport const Settings = (props: any) => (\n <Icon {...props}>\n <LucideSettings size=\"100%\" />\n </Icon>\n);\n\nexport const Minus = (props: any) => (\n <Icon {...props}>\n <LucideMinus size=\"100%\" />\n </Icon>\n);\n\nexport const AlertCircle = (props: any) => (\n <Icon {...props}>\n <LucideAlertCircle size=\"100%\" />\n </Icon>\n);\n\nexport const CreditCard = (props: any) => (\n <Icon {...props}>\n <LucideCreditCard size=\"100%\" />\n </Icon>\n);\n\nexport const Menu = (props: any) => (\n <Icon {...props}>\n <LucideMenu size=\"100%\" />\n </Icon>\n);\n\nexport const Bell = (props: any) => (\n <Icon {...props}>\n <LucideBell size=\"100%\" />\n </Icon>\n);\n\nexport const User = (props: any) => (\n <Icon {...props}>\n <LucideUser size=\"100%\" />\n </Icon>\n);\n\nexport const Search = (props: any) => (\n <Icon {...props}>\n <LucideSearch size=\"100%\" />\n </Icon>\n);\n\nexport const Home = (props: any) => (\n <Icon {...props}>\n <LucideHome size=\"100%\" />\n </Icon>\n);\n\nexport const ShoppingCart = (props: any) => (\n <Icon {...props}>\n <LucideShoppingCart size=\"100%\" />\n </Icon>\n);\n\nexport const Upload = (props: any) => (\n <Icon {...props}>\n <LucideUpload size=\"100%\" />\n </Icon>\n);\n\nexport const File = (props: any) => (\n <Icon {...props}>\n <LucideFile size=\"100%\" />\n </Icon>\n);\n"],"mappings":";AAAA,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,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
- A cross-platform React icon component library based on Lucide icons. Provides theme-aware icons that automatically adapt to the current theme colors.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install @xsolla/xui-icons
9
- # or
10
- yarn add @xsolla/xui-icons
11
- ```
12
-
13
- ## Demo
14
-
15
- ### Basic Usage
16
-
17
- Icons are exported as named components. Import and use them directly:
18
-
19
- ```tsx
20
- import * as React from 'react';
21
- import { Home, Settings, User, Search } from '@xsolla/xui-icons';
22
-
23
- export default function BasicIcons() {
24
- return (
25
- <div style={{ display: 'flex', gap: 16 }}>
26
- <Home />
27
- <Settings />
28
- <User />
29
- <Search />
30
- </div>
31
- );
32
- }
33
- ```
34
-
35
- ### Icon Sizes
36
-
37
- ```tsx
38
- import * as React from 'react';
39
- import { Bell } from '@xsolla/xui-icons';
40
-
41
- export default function IconSizes() {
42
- return (
43
- <div style={{ display: 'flex', gap: 16, alignItems: 'center' }}>
44
- <Bell size={12} />
45
- <Bell size={16} />
46
- <Bell size={20} />
47
- <Bell size={24} />
48
- <Bell size={32} />
49
- </div>
50
- );
51
- }
52
- ```
53
-
54
- ### Custom Colors
55
-
56
- ```tsx
57
- import * as React from 'react';
58
- import { Check, AlertCircle, X } from '@xsolla/xui-icons';
59
-
60
- export default function ColoredIcons() {
61
- return (
62
- <div style={{ display: 'flex', gap: 16 }}>
63
- <Check color="#2ecc71" />
64
- <AlertCircle color="#f39c12" />
65
- <X color="#e74c3c" />
66
- </div>
67
- );
68
- }
69
- ```
70
-
71
- ## Anatomy
72
-
73
- Import icons as named exports and use them as components:
74
-
75
- ```jsx
76
- import { Home, Settings, Check } from '@xsolla/xui-icons';
77
-
78
- <Home
79
- size={24} // Size in pixels (default: 24)
80
- color="#color" // Custom color (uses theme default if not specified)
81
- />
82
- ```
83
-
84
- ## Examples
85
-
86
- ### Navigation Icons
87
-
88
- ```tsx
89
- import * as React from 'react';
90
- import { ArrowLeft, ArrowRight, Menu, X } from '@xsolla/xui-icons';
91
-
92
- export default function NavigationIcons() {
93
- return (
94
- <div style={{ display: 'flex', gap: 16 }}>
95
- <ArrowLeft />
96
- <ArrowRight />
97
- <Menu />
98
- <X />
99
- </div>
100
- );
101
- }
102
- ```
103
-
104
- ### Action Icons
105
-
106
- ```tsx
107
- import * as React from 'react';
108
- import { Check, X, Minus, Copy } from '@xsolla/xui-icons';
109
-
110
- export default function ActionIcons() {
111
- return (
112
- <div style={{ display: 'flex', gap: 16 }}>
113
- <Check />
114
- <X />
115
- <Minus />
116
- <Copy />
117
- </div>
118
- );
119
- }
120
- ```
121
-
122
- ### Status Icons
123
-
124
- ```tsx
125
- import * as React from 'react';
126
- import { Check, AlertCircle } from '@xsolla/xui-icons';
127
-
128
- export default function StatusIcons() {
129
- return (
130
- <div style={{ display: 'flex', gap: 16 }}>
131
- <Check color="#2ecc71" />
132
- <AlertCircle color="#f39c12" />
133
- </div>
134
- );
135
- }
136
- ```
137
-
138
- ### With Button
139
-
140
- ```tsx
141
- import * as React from 'react';
142
- import { ArrowRight, ArrowLeft } from '@xsolla/xui-icons';
143
- import { Button } from '@xsolla/xui-button';
144
-
145
- export default function IconWithButton() {
146
- return (
147
- <div style={{ display: 'flex', gap: 16 }}>
148
- <Button iconLeft={<ArrowLeft />}>Back</Button>
149
- <Button iconRight={<ArrowRight />}>Continue</Button>
150
- </div>
151
- );
152
- }
153
- ```
154
-
155
- ## API Reference
156
-
157
- ### Icon Components
158
-
159
- Each icon is exported as a named component with the following props:
160
-
161
- **Icon Props:**
162
-
163
- | Prop | Type | Default | Description |
164
- | :--- | :--- | :------ | :---------- |
165
- | size | `number` | `24` | Icon size in pixels. |
166
- | color | `string` | Theme default | Icon color. |
167
-
168
- ## Available Icons
169
-
170
- The `@xsolla/xui-icons` package exports a curated set of commonly used icons:
171
-
172
- - `Check` - Checkmark icon
173
- - `X` - Close/remove icon
174
- - `Copy` - Copy to clipboard icon
175
- - `Eye` - Visibility on icon
176
- - `EyeOff` - Visibility off icon
177
- - `ArrowLeft` - Left arrow icon
178
- - `ArrowRight` - Right arrow icon
179
- - `Settings` - Settings/gear icon
180
- - `Minus` - Minus/subtract icon
181
- - `AlertCircle` - Alert/warning circle icon
182
- - `CreditCard` - Credit card icon
183
- - `Menu` - Hamburger menu icon
184
- - `Bell` - Notification bell icon
185
- - `User` - User profile icon
186
- - `Search` - Search/magnifying glass icon
187
- - `Home` - Home icon
188
- - `ShoppingCart` - Shopping cart icon
189
- - `Upload` - Upload icon
190
- - `File` - File icon
191
-
192
- ### Extended Icon Sets
193
-
194
- For additional icons, use the specialized icon packages:
195
-
196
- - **`@xsolla/xui-icons-base`** - Comprehensive icon library with 400+ icons organized by category (controls, communication, files, finance, etc.)
197
- - **`@xsolla/xui-icons-brand`** - Brand and company logos (160+ brands)
198
- - **`@xsolla/xui-icons-flag`** - Country flag icons
199
- - **`@xsolla/xui-icons-payment`** - Payment method icons
200
- - **`@xsolla/xui-icons-currency`** - Currency icons
201
- - **`@xsolla/xui-icons-product`** - Product-specific icons
202
-
203
- ### Using icons-base
204
-
205
- ```tsx
206
- import { ChevronDown, ChevronUp, Calendar, Clock } from '@xsolla/xui-icons-base';
207
-
208
- // Use like any other icon
209
- <ChevronDown size={16} />
210
- <Calendar color="#333" />
211
- ```
212
-
213
- ## Theming
214
-
215
- Icons use the design system theme for default color:
216
-
217
- ```typescript
218
- // Default color from theme
219
- theme.colors.content.primary // Default icon color
220
- ```
221
-
222
- ## Accessibility
223
-
224
- - Icons are decorative by default (`aria-hidden="true"`)
225
- - When using icons alone without text, provide an `aria-label` on the parent element
226
- - For icon buttons, use the `IconButton` component which requires `aria-label`