1 line
4.0 KiB
JSON
1 line
4.0 KiB
JSON
{"ast":null,"code":"import { useContext } from 'react';\nimport { genStyleUtils } from '@ant-design/cssinjs-utils';\nimport { ConfigContext } from '../../config-provider/context';\nimport { genCommonStyle, genLinkStyle } from '../../style';\nimport useLocalToken, { unitless } from '../useToken';\nimport useResetIconStyle from './useResetIconStyle';\nexport const {\n genStyleHooks,\n genComponentStyleHook,\n genSubStyleComponent\n} = genStyleUtils({\n usePrefix: () => {\n const {\n getPrefixCls,\n iconPrefixCls\n } = useContext(ConfigContext);\n const rootPrefixCls = getPrefixCls();\n return {\n rootPrefixCls,\n iconPrefixCls\n };\n },\n useToken: () => {\n const [theme, realToken, hashId, token, cssVar] = useLocalToken();\n return {\n theme,\n realToken,\n hashId,\n token,\n cssVar\n };\n },\n useCSP: () => {\n const {\n csp,\n iconPrefixCls\n } = useContext(ConfigContext);\n // Generate style for icons\n useResetIconStyle(iconPrefixCls, csp);\n return csp !== null && csp !== void 0 ? csp : {};\n },\n getResetStyles: token => [{\n '&': genLinkStyle(token)\n }],\n getCommonStyle: genCommonStyle,\n getCompUnitless: () => unitless\n});","map":{"version":3,"names":["useContext","genStyleUtils","ConfigContext","genCommonStyle","genLinkStyle","useLocalToken","unitless","useResetIconStyle","genStyleHooks","genComponentStyleHook","genSubStyleComponent","usePrefix","getPrefixCls","iconPrefixCls","rootPrefixCls","useToken","theme","realToken","hashId","token","cssVar","useCSP","csp","getResetStyles","getCommonStyle","getCompUnitless"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/theme/util/genStyleUtils.js"],"sourcesContent":["import { useContext } from 'react';\nimport { genStyleUtils } from '@ant-design/cssinjs-utils';\nimport { ConfigContext } from '../../config-provider/context';\nimport { genCommonStyle, genLinkStyle } from '../../style';\nimport useLocalToken, { unitless } from '../useToken';\nimport useResetIconStyle from './useResetIconStyle';\nexport const {\n genStyleHooks,\n genComponentStyleHook,\n genSubStyleComponent\n} = genStyleUtils({\n usePrefix: () => {\n const {\n getPrefixCls,\n iconPrefixCls\n } = useContext(ConfigContext);\n const rootPrefixCls = getPrefixCls();\n return {\n rootPrefixCls,\n iconPrefixCls\n };\n },\n useToken: () => {\n const [theme, realToken, hashId, token, cssVar] = useLocalToken();\n return {\n theme,\n realToken,\n hashId,\n token,\n cssVar\n };\n },\n useCSP: () => {\n const {\n csp,\n iconPrefixCls\n } = useContext(ConfigContext);\n // Generate style for icons\n useResetIconStyle(iconPrefixCls, csp);\n return csp !== null && csp !== void 0 ? csp : {};\n },\n getResetStyles: token => [{\n '&': genLinkStyle(token)\n }],\n getCommonStyle: genCommonStyle,\n getCompUnitless: () => unitless\n});"],"mappings":"AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,aAAa,QAAQ,2BAA2B;AACzD,SAASC,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,cAAc,EAAEC,YAAY,QAAQ,aAAa;AAC1D,OAAOC,aAAa,IAAIC,QAAQ,QAAQ,aAAa;AACrD,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,OAAO,MAAM;EACXC,aAAa;EACbC,qBAAqB;EACrBC;AACF,CAAC,GAAGT,aAAa,CAAC;EAChBU,SAAS,EAAEA,CAAA,KAAM;IACf,MAAM;MACJC,YAAY;MACZC;IACF,CAAC,GAAGb,UAAU,CAACE,aAAa,CAAC;IAC7B,MAAMY,aAAa,GAAGF,YAAY,CAAC,CAAC;IACpC,OAAO;MACLE,aAAa;MACbD;IACF,CAAC;EACH,CAAC;EACDE,QAAQ,EAAEA,CAAA,KAAM;IACd,MAAM,CAACC,KAAK,EAAEC,SAAS,EAAEC,MAAM,EAAEC,KAAK,EAAEC,MAAM,CAAC,GAAGf,aAAa,CAAC,CAAC;IACjE,OAAO;MACLW,KAAK;MACLC,SAAS;MACTC,MAAM;MACNC,KAAK;MACLC;IACF,CAAC;EACH,CAAC;EACDC,MAAM,EAAEA,CAAA,KAAM;IACZ,MAAM;MACJC,GAAG;MACHT;IACF,CAAC,GAAGb,U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