1 line
10 KiB
JSON
1 line
10 KiB
JSON
|
{"ast":null,"code":"import { getLineHeight, mergeToken } from '../../theme/internal';\nexport const prepareToken = token => {\n const {\n paddingInline,\n onlyIconSize,\n paddingBlock\n } = token;\n const buttonToken = mergeToken(token, {\n buttonPaddingHorizontal: paddingInline,\n buttonPaddingVertical: paddingBlock,\n buttonIconOnlyFontSize: onlyIconSize\n });\n return buttonToken;\n};\nexport const prepareComponentToken = token => {\n var _a, _b, _c, _d, _e, _f;\n const contentFontSize = (_a = token.contentFontSize) !== null && _a !== void 0 ? _a : token.fontSize;\n const contentFontSizeSM = (_b = token.contentFontSizeSM) !== null && _b !== void 0 ? _b : token.fontSize;\n const contentFontSizeLG = (_c = token.contentFontSizeLG) !== null && _c !== void 0 ? _c : token.fontSizeLG;\n const contentLineHeight = (_d = token.contentLineHeight) !== null && _d !== void 0 ? _d : getLineHeight(contentFontSize);\n const contentLineHeightSM = (_e = token.contentLineHeightSM) !== null && _e !== void 0 ? _e : getLineHeight(contentFontSizeSM);\n const contentLineHeightLG = (_f = token.contentLineHeightLG) !== null && _f !== void 0 ? _f : getLineHeight(contentFontSizeLG);\n return {\n fontWeight: 400,\n defaultShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlTmpOutline}`,\n primaryShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlOutline}`,\n dangerShadow: `0 ${token.controlOutlineWidth}px 0 ${token.colorErrorOutline}`,\n primaryColor: token.colorTextLightSolid,\n dangerColor: token.colorTextLightSolid,\n borderColorDisabled: token.colorBorder,\n defaultGhostColor: token.colorBgContainer,\n ghostBg: 'transparent',\n defaultGhostBorderColor: token.colorBgContainer,\n paddingInline: token.paddingContentHorizontal - token.lineWidth,\n paddingInlineLG: token.paddingContentHorizontal - token.lineWidth,\n paddingInlineSM: 8 - token.lineWidth,\n onlyIconSize: token.fontSizeLG,\n onlyIconSizeSM: token.fontSizeLG - 2,\n onlyIconSizeLG: token.fontSizeLG + 2,\n groupBorderColor: token.colorPrimaryHover,\n linkHoverBg: 'transparent',\n textHoverBg: token.colorBgTextHover,\n defaultColor: token.colorText,\n defaultBg: token.colorBgContainer,\n defaultBorderColor: token.colorBorder,\n defaultBorderColorDisabled: token.colorBorder,\n defaultHoverBg: token.colorBgContainer,\n defaultHoverColor: token.colorPrimaryHover,\n defaultHoverBorderColor: token.colorPrimaryHover,\n defaultActiveBg: token.colorBgContainer,\n defaultActiveColor: token.colorPrimaryActive,\n defaultActiveBorderColor: token.colorPrimaryActive,\n contentFontSize,\n contentFontSizeSM,\n contentFontSizeLG,\n contentLineHeight,\n contentLineHeightSM,\n contentLineHeightLG,\n paddingBlock: Math.max((token.controlHeight - contentFontSize * contentLineHeight) / 2 - token.lineWidth, 0),\n paddingBlockSM: Math.max((token.controlHeightSM - contentFontSizeSM * contentLineHeightSM) / 2 - token.lineWidth, 0),\n paddingBlockLG: Math.max((token.controlHeightLG - contentFontSizeLG * contentLineHeightLG) / 2 - token.lineWidth, 0)\n };\n};","map":{"version":3,"names":["getLineHeight","mergeToken","prepareToken","token","paddingInline","onlyIconSize","paddingBlock","buttonToken","buttonPaddingHorizontal","buttonPaddingVertical","buttonIconOnlyFontSize","prepareComponentToken","_a","_b","_c","_d","_e","_f","contentFontSize","fontSize","contentFontSizeSM","contentFontSizeLG","fontSizeLG","contentLineHeight","contentLineHeightSM","contentLineHeightLG","fontWeight","defaultShadow","controlOutlineWidth","controlTmpOutline","primaryShadow","controlOutline","dangerShadow","colorErrorOutline","primaryColor","colorTextLightSolid","dangerColor","borderColorDisabled","colorBorder","defaultGhostColor","colorBgContainer","ghostBg","defaultGhostBorderColor","paddingContentHorizontal","lineWidth","paddingInlineLG","paddingInlineSM","onlyIconSizeSM","onlyIconSizeLG","groupBorderColor","colorPrimaryHover","linkHoverBg","textHoverBg","colorBgTextHover","de
|