1 line
12 KiB
JSON
1 line
12 KiB
JSON
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { resetComponent } from '../../style';\nimport { initZoomMotion } from '../../style/motion';\nimport getArrowStyle, { getArrowOffsetToken, MAX_VERTICAL_CONTENT_RADIUS } from '../../style/placementArrow';\nimport { getArrowToken } from '../../style/roundedArrow';\nimport { genPresetColor, genStyleHooks, mergeToken } from '../../theme/internal';\nconst genTooltipStyle = token => {\n const {\n componentCls,\n // ant-tooltip\n tooltipMaxWidth,\n tooltipColor,\n tooltipBg,\n tooltipBorderRadius,\n zIndexPopup,\n controlHeight,\n boxShadowSecondary,\n paddingSM,\n paddingXS\n } = token;\n return [{\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, resetComponent(token)), {\n position: 'absolute',\n zIndex: zIndexPopup,\n display: 'block',\n width: 'max-content',\n maxWidth: tooltipMaxWidth,\n visibility: 'visible',\n // When use `autoArrow`, origin will follow the arrow position\n '--valid-offset-x': 'var(--arrow-offset-horizontal, var(--arrow-x))',\n transformOrigin: [`var(--valid-offset-x, 50%)`, `var(--arrow-y, 50%)`].join(' '),\n '&-hidden': {\n display: 'none'\n },\n '--antd-arrow-background-color': tooltipBg,\n // Wrapper for the tooltip content\n [`${componentCls}-inner`]: {\n minWidth: '1em',\n minHeight: controlHeight,\n padding: `${unit(token.calc(paddingSM).div(2).equal())} ${unit(paddingXS)}`,\n color: tooltipColor,\n textAlign: 'start',\n textDecoration: 'none',\n wordWrap: 'break-word',\n backgroundColor: tooltipBg,\n borderRadius: tooltipBorderRadius,\n boxShadow: boxShadowSecondary,\n boxSizing: 'border-box'\n },\n // Limit left and right placement radius\n [[`&-placement-left`, `&-placement-leftTop`, `&-placement-leftBottom`, `&-placement-right`, `&-placement-rightTop`, `&-placement-rightBottom`].join(',')]: {\n [`${componentCls}-inner`]: {\n borderRadius: token.min(tooltipBorderRadius, MAX_VERTICAL_CONTENT_RADIUS)\n }\n },\n [`${componentCls}-content`]: {\n position: 'relative'\n }\n }), genPresetColor(token, (colorKey, _ref) => {\n let {\n darkColor\n } = _ref;\n return {\n [`&${componentCls}-${colorKey}`]: {\n [`${componentCls}-inner`]: {\n backgroundColor: darkColor\n },\n [`${componentCls}-arrow`]: {\n '--antd-arrow-background-color': darkColor\n }\n }\n };\n })), {\n // RTL\n '&-rtl': {\n direction: 'rtl'\n }\n })\n },\n // Arrow Style\n getArrowStyle(token, 'var(--antd-arrow-background-color)'),\n // Pure Render\n {\n [`${componentCls}-pure`]: {\n position: 'relative',\n maxWidth: 'none',\n margin: token.sizePopupArrow\n }\n }];\n};\n// ============================== Export ==============================\nexport const prepareComponentToken = token => Object.assign(Object.assign({\n zIndexPopup: token.zIndexPopupBase + 70\n}, getArrowOffsetToken({\n contentRadius: token.borderRadius,\n limitVerticalRadius: true\n})), getArrowToken(mergeToken(token, {\n borderRadiusOuter: Math.min(token.borderRadiusOuter, 4)\n})));\nexport default (function (prefixCls) {\n let injectStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n const useStyle = genStyleHooks('Tooltip', token => {\n const {\n borderRadius,\n colorTextLightSolid,\n colorBgSpotlight\n } = token;\n const TooltipToken = mergeToken(token, {\n // default variables\n tooltipMaxWidth: 250,\n tooltipColor: colorTextLightSolid,\n tooltipBorderRadius: borderRadius,\n tooltipBg: colorBgSpotlight\n });\n return [genTooltipStyle(TooltipToken), initZoomMotion(token, 'zoom-big-fast')];\n }, prepareComponentToken, {\n resetStyle: false,\n // Popover use Tooltip as internal component. We do not need to handle this.\n injectStyle\n });\n return useStyle(prefixCls);\n});","map":{"version":3,"names":["unit","resetComponent","initZoomMotion","getArrowStyle","getArrowOffsetToken","MAX_VERTICAL_CONTENT_RADIUS","getArrowToken","genPresetColor","genStyleHooks","mergeToken","genTooltipStyle","token","componentCls","tooltipMaxWidth","tooltipColor","tooltipBg","tooltipBorderRadius","zIndexPopup","controlHeight","boxShadowSecondary","paddingSM","paddingXS","Object","assign","position","zIndex","display","width","maxWidth","visibility","transformOrigin","join","minWidth","minHeight","padding","calc","div","equal","color","textAlign","textDecoration","wordWrap","backgroundColor","borderRadius","boxShadow","boxSizing","min","colorKey","_ref","darkColor","direction","margin","sizePopupArrow","prepareComponentToken","zIndexPopupBase","contentRadius","limitVerticalRadius","borderRadiusOuter","Math","prefixCls","injectStyle","arguments","length","undefined","useStyle","colorTextLightSolid","colorBgSpotlight","TooltipToken","resetStyle"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/tooltip/style/index.js"],"sourcesContent":["import { unit } from '@ant-design/cssinjs';\nimport { resetComponent } from '../../style';\nimport { initZoomMotion } from '../../style/motion';\nimport getArrowStyle, { getArrowOffsetToken, MAX_VERTICAL_CONTENT_RADIUS } from '../../style/placementArrow';\nimport { getArrowToken } from '../../style/roundedArrow';\nimport { genPresetColor, genStyleHooks, mergeToken } from '../../theme/internal';\nconst genTooltipStyle = token => {\n const {\n componentCls,\n // ant-tooltip\n tooltipMaxWidth,\n tooltipColor,\n tooltipBg,\n tooltipBorderRadius,\n zIndexPopup,\n controlHeight,\n boxShadowSecondary,\n paddingSM,\n paddingXS\n } = token;\n return [{\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, resetComponent(token)), {\n position: 'absolute',\n zIndex: zIndexPopup,\n display: 'block',\n width: 'max-content',\n maxWidth: tooltipMaxWidth,\n visibility: 'visible',\n // When use `autoArrow`, origin will follow the arrow position\n '--valid-offset-x': 'var(--arrow-offset-horizontal, var(--arrow-x))',\n transformOrigin: [`var(--valid-offset-x, 50%)`, `var(--arrow-y, 50%)`].join(' '),\n '&-hidden': {\n display: 'none'\n },\n '--antd-arrow-background-color': tooltipBg,\n // Wrapper for the tooltip content\n [`${componentCls}-inner`]: {\n minWidth: '1em',\n minHeight: controlHeight,\n padding: `${unit(token.calc(paddingSM).div(2).equal())} ${unit(paddingXS)}`,\n color: tooltipColor,\n textAlign: 'start',\n textDecoration: 'none',\n wordWrap: 'break-word',\n backgroundColor: tooltipBg,\n borderRadius: tooltipBorderRadius,\n boxShadow: boxShadowSecondary,\n boxSizing: 'border-box'\n },\n // Limit left and right placement radius\n [[`&-placement-left`, `&-placement-leftTop`, `&-placement-leftBottom`, `&-placement-right`, `&-placement-rightTop`, `&-placement-rightBottom`].join(',')]: {\n [`${componentCls}-inner`]: {\n borderRadius: token.min(tooltipBorderRadius, MAX_VERTICAL_CONTENT_RADIUS)\n }\n },\n [`${componentCls}-content`]: {\n position: 'relative'\n }\n }), genPresetColor(token, (colorKey, _ref) => {\n let {\n darkColor\n } = _ref;\n return {\n [`&${componentCls}-${colorKey}`]: {\n [`${componentCls}-inner`]: {\n backgroundColor: darkColor\n },\n [`${componentCls}-arrow`]: {\n '--antd-arrow-background-color': darkColor\n }\n }\n };\n })), {\n // RTL\n '&-rtl': {\n direction: 'rtl'\n }\n })\n },\n // Arrow Style\n getArrowStyle(token, 'var(--antd-arrow-background-color)'),\n // Pure Render\n {\n [`${componentCls}-pure`]: {\n position: 'relative',\n maxWidth: 'none',\n margin: token.sizePopupArrow\n }\n }];\n};\n// ============================== Export ==============================\nexport const prepareComponentToken = token => Object.assign(Object.assign({\n zIndexPopup: token.zIndexPopupBase + 70\n}, getArrowOffsetToken({\n contentRadius: token.borderRadius,\n limitVerticalRadius: true\n})), getArrowToken(mergeToken(token, {\n borderRadiusOuter: Math.min(token.borderRadiusOuter, 4)\n})));\nexport default (function (prefixCls) {\n let injectStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n const useStyle = genStyleHooks('Tooltip', token => {\n const {\n borderRadius,\n colorTextLightSolid,\n colorBgSpotlight\n } = token;\n const TooltipToken = mergeToken(token, {\n // default variables\n tooltipMaxWidth: 250,\n tooltipColor: colorTextLightSolid,\n tooltipBorderRadius: borderRadius,\n tooltipBg: colorBgSpotlight\n });\n return [genTooltipStyle(TooltipToken), initZoomMotion(token, 'zoom-big-fast')];\n }, prepareComponentToken, {\n resetStyle: false,\n // Popover use Tooltip as internal component. We do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