1 line
8.2 KiB
JSON
1 line
8.2 KiB
JSON
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { resetComponent } from '../../style';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nconst genRateStarStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-star`]: {\n position: 'relative',\n display: 'inline-block',\n color: 'inherit',\n cursor: 'pointer',\n '&:not(:last-child)': {\n marginInlineEnd: token.marginXS\n },\n '> div': {\n transition: `all ${token.motionDurationMid}, outline 0s`,\n '&:hover': {\n transform: token.starHoverScale\n },\n '&:focus': {\n outline: 0\n },\n '&:focus-visible': {\n outline: `${unit(token.lineWidth)} dashed ${token.starColor}`,\n transform: token.starHoverScale\n }\n },\n '&-first, &-second': {\n color: token.starBg,\n transition: `all ${token.motionDurationMid}`,\n userSelect: 'none'\n },\n '&-first': {\n position: 'absolute',\n top: 0,\n insetInlineStart: 0,\n width: '50%',\n height: '100%',\n overflow: 'hidden',\n opacity: 0\n },\n [`&-half ${componentCls}-star-first, &-half ${componentCls}-star-second`]: {\n opacity: 1\n },\n [`&-half ${componentCls}-star-first, &-full ${componentCls}-star-second`]: {\n color: 'inherit'\n }\n }\n };\n};\nconst genRateRtlStyle = token => ({\n [`&-rtl${token.componentCls}`]: {\n direction: 'rtl'\n }\n});\nconst genRateStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, resetComponent(token)), {\n display: 'inline-block',\n margin: 0,\n padding: 0,\n color: token.starColor,\n fontSize: token.starSize,\n lineHeight: 1,\n listStyle: 'none',\n outline: 'none',\n // disable styles\n [`&-disabled${componentCls} ${componentCls}-star`]: {\n cursor: 'default',\n '> div:hover': {\n transform: 'scale(1)'\n }\n }\n }), genRateStarStyle(token)), genRateRtlStyle(token))\n };\n};\n// ============================== Export ==============================\nexport const prepareComponentToken = token => ({\n starColor: token.yellow6,\n starSize: token.controlHeightLG * 0.5,\n starHoverScale: 'scale(1.1)',\n starBg: token.colorFillContent\n});\nexport default genStyleHooks('Rate', token => {\n const rateToken = mergeToken(token, {});\n return [genRateStyle(rateToken)];\n}, prepareComponentToken);","map":{"version":3,"names":["unit","resetComponent","genStyleHooks","mergeToken","genRateStarStyle","token","componentCls","position","display","color","cursor","marginInlineEnd","marginXS","transition","motionDurationMid","transform","starHoverScale","outline","lineWidth","starColor","starBg","userSelect","top","insetInlineStart","width","height","overflow","opacity","genRateRtlStyle","direction","genRateStyle","Object","assign","margin","padding","fontSize","starSize","lineHeight","listStyle","prepareComponentToken","yellow6","controlHeightLG","colorFillContent","rateToken"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/rate/style/index.js"],"sourcesContent":["import { unit } from '@ant-design/cssinjs';\nimport { resetComponent } from '../../style';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nconst genRateStarStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-star`]: {\n position: 'relative',\n display: 'inline-block',\n color: 'inherit',\n cursor: 'pointer',\n '&:not(:last-child)': {\n marginInlineEnd: token.marginXS\n },\n '> div': {\n transition: `all ${token.motionDurationMid}, outline 0s`,\n '&:hover': {\n transform: token.starHoverScale\n },\n '&:focus': {\n outline: 0\n },\n '&:focus-visible': {\n outline: `${unit(token.lineWidth)} dashed ${token.starColor}`,\n transform: token.starHoverScale\n }\n },\n '&-first, &-second': {\n color: token.starBg,\n transition: `all ${token.motionDurationMid}`,\n userSelect: 'none'\n },\n '&-first': {\n position: 'absolute',\n top: 0,\n insetInlineStart: 0,\n width: '50%',\n height: '100%',\n overflow: 'hidden',\n opacity: 0\n },\n [`&-half ${componentCls}-star-first, &-half ${componentCls}-star-second`]: {\n opacity: 1\n },\n [`&-half ${componentCls}-star-first, &-full ${componentCls}-star-second`]: {\n color: 'inherit'\n }\n }\n };\n};\nconst genRateRtlStyle = token => ({\n [`&-rtl${token.componentCls}`]: {\n direction: 'rtl'\n }\n});\nconst genRateStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, resetComponent(token)), {\n display: 'inline-block',\n margin: 0,\n padding: 0,\n color: token.starColor,\n fontSize: token.starSize,\n lineHeight: 1,\n listStyle: 'none',\n outline: 'none',\n // disable styles\n [`&-disabled${componentCls} ${componentCls}-star`]: {\n cursor: 'default',\n '> div:hover': {\n transform: 'scale(1)'\n }\n }\n }), genRateStarStyle(token)), genRateRtlStyle(token))\n };\n};\n// ============================== Export ==============================\nexport const prepareComponentToken = token => ({\n starColor: token.yellow6,\n starSize: token.controlHeightLG * 0.5,\n starHoverScale: 'scale(1.1)',\n starBg: token.colorFillContent\n});\nexport default genStyleHooks('Rate', token => {\n const rateToken = mergeToken(token, {});\n return [genRateStyle(rateToken)];\n}, prepareComponentToken);"],"mappings":"AAAA,SAASA,IAAI,QAAQ,qBAAqB;AAC1C,SAASC,cAAc,QAAQ,aAAa;AAC5C,SAASC,aAAa,EAAEC,UAAU,QAAQ,sBAAsB;AAChE,MAAMC,gBAAgB,GAAGC,KAAK,IAAI;EAChC,MAAM;IACJC;EACF,CAAC,GAAGD,KAAK;EACT,OAAO;IACL,CAAC,GAAGC,YAAY,OAAO,GAAG;MACxBC,QAAQ,EAAE,UAAU;MACpBC,OAAO,EAAE,cAAc;MACvBC,KAAK,EAAE,SAAS;MAChBC,MAAM,EAAE,SAAS;MACjB,oBAAoB,EAAE;QACpBC,eAAe,EAAEN,KAAK,CAACO;MACzB,CAAC;MACD,OAAO,EAAE;QACPC,UAAU,EAAE,OAAOR,KAAK,CAACS,iBAAiB,cAAc;QACxD,SAAS,EAAE;UACTC,SAAS,EAAEV,KAAK,CAACW;QACnB,CAAC;QACD,SAAS,EAAE;UACTC,OAAO,EAAE;QACX,CAAC;QACD,iBAAiB,EAAE;UACjBA,OAAO,EAAE,GAAGjB,IAAI,CAACK,KAAK,CAACa,SAAS,CAAC,WAAWb,KAAK,CAACc,SAAS,EAAE;UAC7DJ,SAAS,EAA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