PromoCursed/node_modules/.cache/babel-loader/cef7f2cd81d69ad2d1fb8b37f4e830425be5e24b4ba7e5698e55385828a9fdea.json

1 line
8.2 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"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