1 line
11 KiB
JSON
1 line
11 KiB
JSON
|
{"ast":null,"code":"\"use client\";\n\n/* eslint-disable import/prefer-default-export */\nimport { unit } from '@ant-design/cssinjs';\nexport { operationUnit } from './operationUnit';\nexport const textEllipsis = {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis'\n};\nexport const resetComponent = function (token) {\n let needInheritFontFamily = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return {\n boxSizing: 'border-box',\n margin: 0,\n padding: 0,\n color: token.colorText,\n fontSize: token.fontSize,\n // font-variant: @font-variant-base;\n lineHeight: token.lineHeight,\n listStyle: 'none',\n // font-feature-settings: @font-feature-settings-base;\n fontFamily: needInheritFontFamily ? 'inherit' : token.fontFamily\n };\n};\nexport const resetIcon = () => ({\n display: 'inline-flex',\n alignItems: 'center',\n color: 'inherit',\n fontStyle: 'normal',\n lineHeight: 0,\n textAlign: 'center',\n textTransform: 'none',\n // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4\n verticalAlign: '-0.125em',\n textRendering: 'optimizeLegibility',\n '-webkit-font-smoothing': 'antialiased',\n '-moz-osx-font-smoothing': 'grayscale',\n '> *': {\n lineHeight: 1\n },\n svg: {\n display: 'inline-block'\n }\n});\nexport const clearFix = () => ({\n // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229\n '&::before': {\n display: 'table',\n content: '\"\"'\n },\n '&::after': {\n // https://github.com/ant-design/ant-design/issues/21864\n display: 'table',\n clear: 'both',\n content: '\"\"'\n }\n});\nexport const genLinkStyle = token => ({\n a: {\n color: token.colorLink,\n textDecoration: token.linkDecoration,\n backgroundColor: 'transparent',\n // remove the gray background on active links in IE 10.\n outline: 'none',\n cursor: 'pointer',\n transition: `color ${token.motionDurationSlow}`,\n '-webkit-text-decoration-skip': 'objects',\n // remove gaps in links underline in iOS 8+ and Safari 8+.\n '&:hover': {\n color: token.colorLinkHover\n },\n '&:active': {\n color: token.colorLinkActive\n },\n '&:active, &:hover': {\n textDecoration: token.linkHoverDecoration,\n outline: 0\n },\n // https://github.com/ant-design/ant-design/issues/22503\n '&:focus': {\n textDecoration: token.linkFocusDecoration,\n outline: 0\n },\n '&[disabled]': {\n color: token.colorTextDisabled,\n cursor: 'not-allowed'\n }\n }\n});\nexport const genCommonStyle = (token, componentPrefixCls, rootCls, resetFont) => {\n const prefixSelector = `[class^=\"${componentPrefixCls}\"], [class*=\" ${componentPrefixCls}\"]`;\n const rootPrefixSelector = rootCls ? `.${rootCls}` : prefixSelector;\n const resetStyle = {\n boxSizing: 'border-box',\n '&::before, &::after': {\n boxSizing: 'border-box'\n }\n };\n let resetFontStyle = {};\n if (resetFont !== false) {\n resetFontStyle = {\n fontFamily: token.fontFamily,\n fontSize: token.fontSize\n };\n }\n return {\n [rootPrefixSelector]: Object.assign(Object.assign(Object.assign({}, resetFontStyle), resetStyle), {\n [prefixSelector]: resetStyle\n })\n };\n};\nexport const genFocusOutline = token => ({\n outline: `${unit(token.lineWidthFocus)} solid ${token.colorPrimaryBorder}`,\n outlineOffset: 1,\n transition: 'outline-offset 0s, outline 0s'\n});\nexport const genFocusStyle = token => ({\n '&:focus-visible': Object.assign({}, genFocusOutline(token))\n});","map":{"version":3,"names":["unit","operationUnit","textEllipsis","overflow","whiteSpace","textOverflow","resetComponent","token","needInheritFontFamily","arguments","length","undefined","boxSizing","margin","padding","color","colorText","fontSize","lineHeight","listStyle","fontFamily","resetIcon","display","alignItems","fontStyle","textAlign","textTransform","verticalAlign","textRendering","svg","clearFix","content"
|