1 line
6.7 KiB
JSON
1 line
6.7 KiB
JSON
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { TinyColor } from '@ctrl/tinycolor';\nimport { resetComponent } from '../../style';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nconst genQRCodeStyle = token => {\n const {\n componentCls,\n lineWidth,\n lineType,\n colorSplit\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, resetComponent(token)), {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n padding: token.paddingSM,\n backgroundColor: token.colorWhite,\n borderRadius: token.borderRadiusLG,\n border: `${unit(lineWidth)} ${lineType} ${colorSplit}`,\n position: 'relative',\n overflow: 'hidden',\n [`& > ${componentCls}-mask`]: {\n position: 'absolute',\n insetBlockStart: 0,\n insetInlineStart: 0,\n zIndex: 10,\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n width: '100%',\n height: '100%',\n color: token.colorText,\n lineHeight: token.lineHeight,\n background: token.QRCodeMaskBackgroundColor,\n textAlign: 'center',\n [`& > ${componentCls}-expired, & > ${componentCls}-scanned`]: {\n color: token.QRCodeTextColor\n }\n },\n '> canvas': {\n alignSelf: 'stretch',\n flex: 'auto',\n minWidth: 0\n },\n '&-icon': {\n marginBlockEnd: token.marginXS,\n fontSize: token.controlHeight\n }\n }),\n [`${componentCls}-borderless`]: {\n borderColor: 'transparent',\n padding: 0,\n borderRadius: 0\n }\n };\n};\nexport const prepareComponentToken = token => ({\n QRCodeMaskBackgroundColor: new TinyColor(token.colorBgContainer).setAlpha(0.96).toRgbString()\n});\nexport default genStyleHooks('QRCode', token => {\n const mergedToken = mergeToken(token, {\n QRCodeTextColor: token.colorText\n });\n return genQRCodeStyle(mergedToken);\n}, prepareComponentToken);","map":{"version":3,"names":["unit","TinyColor","resetComponent","genStyleHooks","mergeToken","genQRCodeStyle","token","componentCls","lineWidth","lineType","colorSplit","Object","assign","display","justifyContent","alignItems","padding","paddingSM","backgroundColor","colorWhite","borderRadius","borderRadiusLG","border","position","overflow","insetBlockStart","insetInlineStart","zIndex","flexDirection","width","height","color","colorText","lineHeight","background","QRCodeMaskBackgroundColor","textAlign","QRCodeTextColor","alignSelf","flex","minWidth","marginBlockEnd","marginXS","fontSize","controlHeight","borderColor","prepareComponentToken","colorBgContainer","setAlpha","toRgbString","mergedToken"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/qr-code/style/index.js"],"sourcesContent":["import { unit } from '@ant-design/cssinjs';\nimport { TinyColor } from '@ctrl/tinycolor';\nimport { resetComponent } from '../../style';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nconst genQRCodeStyle = token => {\n const {\n componentCls,\n lineWidth,\n lineType,\n colorSplit\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, resetComponent(token)), {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n padding: token.paddingSM,\n backgroundColor: token.colorWhite,\n borderRadius: token.borderRadiusLG,\n border: `${unit(lineWidth)} ${lineType} ${colorSplit}`,\n position: 'relative',\n overflow: 'hidden',\n [`& > ${componentCls}-mask`]: {\n position: 'absolute',\n insetBlockStart: 0,\n insetInlineStart: 0,\n zIndex: 10,\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n width: '100%',\n height: '100%',\n color: token.colorText,\n lineHeight: token.lineHeight,\n background: token.QRCodeMaskBackgroundColor,\n textAlign: 'center',\n [`& > ${componentCls}-expired, & > ${componentCls}-scanned`]: {\n color: token.QRCodeTextColor\n }\n },\n '> canvas': {\n alignSelf: 'stretch',\n flex: 'auto',\n minWidth: 0\n },\n '&-icon': {\n marginBlockEnd: token.marginXS,\n fontSize: token.controlHeight\n }\n }),\n [`${componentCls}-borderless`]: {\n borderColor: 'transparent',\n padding: 0,\n borderRadius: 0\n }\n };\n};\nexport const prepareComponentToken = token => ({\n QRCodeMaskBackgroundColor: new TinyColor(token.colorBgContainer).setAlpha(0.96).toRgbString()\n});\nexport default genStyleHooks('QRCode', token => {\n const mergedToken = mergeToken(token, {\n QRCodeTextColor: token.colorText\n });\n return genQRCodeStyle(mergedToken);\n}, prepareComponentToken);"],"mappings":"AAAA,SAASA,IAAI,QAAQ,qBAAqB;AAC1C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,cAAc,QAAQ,aAAa;AAC5C,SAASC,aAAa,EAAEC,UAAU,QAAQ,sBAAsB;AAChE,MAAMC,cAAc,GAAGC,KAAK,IAAI;EAC9B,MAAM;IACJC,YAAY;IACZC,SAAS;IACTC,QAAQ;IACRC;EACF,CAAC,GAAGJ,KAAK;EACT,OAAO;IACL,CAACC,YAAY,GAAGI,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEV,cAAc,CAACI,KAAK,CAAC,CAAC,EAAE;MACtEO,OAAO,EAAE,MAAM;MACfC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE,QAAQ;MACpBC,OAAO,EAAEV,KAAK,CAACW,SAAS;MACxBC,eAAe,EAAEZ,KAAK,CAACa,UAAU;MACjCC,YAAY,EAAEd,KAAK,CAACe,cAAc;MAClCC,MAAM,EAAE,GAAGtB,IAAI,CAACQ,SAAS,CAAC,IAAIC,QAAQ,IAAIC,UAAU,EAAE;MACtDa,QAAQ,EAAE,UAAU;MACpBC,QAAQ,EAAE,QAAQ;MAClB,CAAC,OAAOjB,YAAY,OAAO,GAAG;QAC5BgB,QAAQ,EAAE,UAAU;QACpBE,eAAe,EAAE,CAAC;QAClBC,gBAAgB,EAAE,CAAC;QACnBC,MAAM,EAAE,EAAE;QACVd,OAAO,EAAE,MAAM;QACfe,aAAa,EAAE,QAAQ;QACvBd,cAAc,EAAE,QAAQ;QACxBC,UAAU,EAAE,QAAQ;QACpBc,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,MAAM;QACdC,KAAK,EAAEzB,KAAK,CAAC0B,SAAS;QACtBC,UAAU,EAAE3B,KAAK,CAAC2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