PromoCursed/node_modules/.cache/babel-loader/2b3536a35b7af0cf4ec9ab174bc7692eea0036879e54e64ae71d28f03630e63e.json
2024-08-20 23:25:37 +04:00

1 line
11 KiB
JSON

{"ast":null,"code":"/* eslint-disable import/prefer-default-export, prefer-destructuring */\nimport { generate } from '@ant-design/colors';\nimport { TinyColor } from '@ctrl/tinycolor';\nimport canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport { updateCSS } from \"rc-util/es/Dom/dynamicCSS\";\nimport warning from '../_util/warning';\nconst dynamicStyleMark = `-ant-${Date.now()}-${Math.random()}`;\nexport function getStyle(globalPrefixCls, theme) {\n const variables = {};\n const formatColor = (color, updater) => {\n let clone = color.clone();\n clone = (updater === null || updater === void 0 ? void 0 : updater(clone)) || clone;\n return clone.toRgbString();\n };\n const fillColor = (colorVal, type) => {\n const baseColor = new TinyColor(colorVal);\n const colorPalettes = generate(baseColor.toRgbString());\n variables[`${type}-color`] = formatColor(baseColor);\n variables[`${type}-color-disabled`] = colorPalettes[1];\n variables[`${type}-color-hover`] = colorPalettes[4];\n variables[`${type}-color-active`] = colorPalettes[6];\n variables[`${type}-color-outline`] = baseColor.clone().setAlpha(0.2).toRgbString();\n variables[`${type}-color-deprecated-bg`] = colorPalettes[0];\n variables[`${type}-color-deprecated-border`] = colorPalettes[2];\n };\n // ================ Primary Color ================\n if (theme.primaryColor) {\n fillColor(theme.primaryColor, 'primary');\n const primaryColor = new TinyColor(theme.primaryColor);\n const primaryColors = generate(primaryColor.toRgbString());\n // Legacy - We should use semantic naming standard\n primaryColors.forEach((color, index) => {\n variables[`primary-${index + 1}`] = color;\n });\n // Deprecated\n variables['primary-color-deprecated-l-35'] = formatColor(primaryColor, c => c.lighten(35));\n variables['primary-color-deprecated-l-20'] = formatColor(primaryColor, c => c.lighten(20));\n variables['primary-color-deprecated-t-20'] = formatColor(primaryColor, c => c.tint(20));\n variables['primary-color-deprecated-t-50'] = formatColor(primaryColor, c => c.tint(50));\n variables['primary-color-deprecated-f-12'] = formatColor(primaryColor, c => c.setAlpha(c.getAlpha() * 0.12));\n const primaryActiveColor = new TinyColor(primaryColors[0]);\n variables['primary-color-active-deprecated-f-30'] = formatColor(primaryActiveColor, c => c.setAlpha(c.getAlpha() * 0.3));\n variables['primary-color-active-deprecated-d-02'] = formatColor(primaryActiveColor, c => c.darken(2));\n }\n // ================ Success Color ================\n if (theme.successColor) {\n fillColor(theme.successColor, 'success');\n }\n // ================ Warning Color ================\n if (theme.warningColor) {\n fillColor(theme.warningColor, 'warning');\n }\n // ================= Error Color =================\n if (theme.errorColor) {\n fillColor(theme.errorColor, 'error');\n }\n // ================= Info Color ==================\n if (theme.infoColor) {\n fillColor(theme.infoColor, 'info');\n }\n // Convert to css variables\n const cssList = Object.keys(variables).map(key => `--${globalPrefixCls}-${key}: ${variables[key]};`);\n return `\n :root {\n ${cssList.join('\\n')}\n }\n `.trim();\n}\nexport function registerTheme(globalPrefixCls, theme) {\n const style = getStyle(globalPrefixCls, theme);\n if (canUseDom()) {\n updateCSS(style, `${dynamicStyleMark}-dynamic-theme`);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'ConfigProvider', 'SSR do not support dynamic theme with css variables.') : void 0;\n }\n}","map":{"version":3,"names":["generate","TinyColor","canUseDom","updateCSS","warning","dynamicStyleMark","Date","now","Math","random","getStyle","globalPrefixCls","theme","variables","formatColor","color","updater","clone","toRgbString","fillColor","colorVal","type","baseColor","colorPalettes","setAlpha","primaryColor","primaryColors","forEach","index","c","lighten","tint","getAlpha","primaryActiveColor","darken","successColor","warningColor","errorColor","infoColor","cssList","Object","keys","map","key","join","trim","registerTheme","style","process","env","NODE_ENV"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/config-provider/cssVariables.js"],"sourcesContent":["/* eslint-disable import/prefer-default-export, prefer-destructuring */\nimport { generate } from '@ant-design/colors';\nimport { TinyColor } from '@ctrl/tinycolor';\nimport canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport { updateCSS } from \"rc-util/es/Dom/dynamicCSS\";\nimport warning from '../_util/warning';\nconst dynamicStyleMark = `-ant-${Date.now()}-${Math.random()}`;\nexport function getStyle(globalPrefixCls, theme) {\n const variables = {};\n const formatColor = (color, updater) => {\n let clone = color.clone();\n clone = (updater === null || updater === void 0 ? void 0 : updater(clone)) || clone;\n return clone.toRgbString();\n };\n const fillColor = (colorVal, type) => {\n const baseColor = new TinyColor(colorVal);\n const colorPalettes = generate(baseColor.toRgbString());\n variables[`${type}-color`] = formatColor(baseColor);\n variables[`${type}-color-disabled`] = colorPalettes[1];\n variables[`${type}-color-hover`] = colorPalettes[4];\n variables[`${type}-color-active`] = colorPalettes[6];\n variables[`${type}-color-outline`] = baseColor.clone().setAlpha(0.2).toRgbString();\n variables[`${type}-color-deprecated-bg`] = colorPalettes[0];\n variables[`${type}-color-deprecated-border`] = colorPalettes[2];\n };\n // ================ Primary Color ================\n if (theme.primaryColor) {\n fillColor(theme.primaryColor, 'primary');\n const primaryColor = new TinyColor(theme.primaryColor);\n const primaryColors = generate(primaryColor.toRgbString());\n // Legacy - We should use semantic naming standard\n primaryColors.forEach((color, index) => {\n variables[`primary-${index + 1}`] = color;\n });\n // Deprecated\n variables['primary-color-deprecated-l-35'] = formatColor(primaryColor, c => c.lighten(35));\n variables['primary-color-deprecated-l-20'] = formatColor(primaryColor, c => c.lighten(20));\n variables['primary-color-deprecated-t-20'] = formatColor(primaryColor, c => c.tint(20));\n variables['primary-color-deprecated-t-50'] = formatColor(primaryColor, c => c.tint(50));\n variables['primary-color-deprecated-f-12'] = formatColor(primaryColor, c => c.setAlpha(c.getAlpha() * 0.12));\n const primaryActiveColor = new TinyColor(primaryColors[0]);\n variables['primary-color-active-deprecated-f-30'] = formatColor(primaryActiveColor, c => c.setAlpha(c.getAlpha() * 0.3));\n variables['primary-color-active-deprecated-d-02'] = formatColor(primaryActiveColor, c => c.darken(2));\n }\n // ================ Success Color ================\n if (theme.successColor) {\n fillColor(theme.successColor, 'success');\n }\n // ================ Warning Color ================\n if (theme.warningColor) {\n fillColor(theme.warningColor, 'warning');\n }\n // ================= Error Color =================\n if (theme.errorColor) {\n fillColor(theme.errorColor, 'error');\n }\n // ================= Info Color ==================\n if (theme.infoColor) {\n fillColor(theme.infoColor, 'info');\n }\n // Convert to css variables\n const cssList = Object.keys(variables).map(key => `--${globalPrefixCls}-${key}: ${variables[key]};`);\n return `\n :root {\n ${cssList.join('\\n')}\n }\n `.trim();\n}\nexport function registerTheme(globalPrefixCls, theme) {\n const style = getStyle(globalPrefixCls, theme);\n if (canUseDom()) {\n updateCSS(style, `${dynamicStyleMark}-dynamic-theme`);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'ConfigProvider', 'SSR do not support dynamic theme with css variables.') : void 0;\n }\n}"],"mappings":"AAAA;AACA,SAASA,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,OAAOC,SAAS,MAAM,0BAA0B;AAChD,SAASC,SAAS,QAAQ,2BAA2B;AACrD,OAAOC,OAAO,MAAM,kBAAkB;AACtC,MAAMC,gBAAgB,GAAG,QAAQC,IAAI,CAACC,GAAG,CAAC,CAAC,IAAIC,IAAI,CAACC,MAAM,CAAC,CAAC,EAAE;AAC9D,OAAO,SAASC,QAAQA,CAACC,eAAe,EAAEC,KAAK,EAAE;EAC/C,MAAMC,SAAS,GAAG,CAAC,CAAC;EACpB,MAAMC,WAAW,GAAGA,CAACC,KAAK,EAAEC,OAAO,KAAK;IACtC,IAAIC,KAAK,GAAGF,KAAK,CAACE,KAAK,CAAC,CAAC;IACzBA,KAAK,GAAG,CAACD,OAAO,KAAK,IAAI,IAAIA,OAAO,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,OAAO,CAACC,KAAK,CAAC,KAAKA,KAAK;IACnF,OAAOA,KAAK,CAACC,WAAW,CAAC,CAAC;EAC5B,CAAC;EACD,MAAMC,SAAS,GAAGA,CAACC,QAAQ,EAAEC,IAAI,KAAK;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