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

1 line
4.5 KiB
JSON

{"ast":null,"code":"\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { getSize } from './utils';\nconst Steps = props => {\n const {\n size,\n steps,\n percent = 0,\n strokeWidth = 8,\n strokeColor,\n trailColor = null,\n prefixCls,\n children\n } = props;\n const current = Math.round(steps * (percent / 100));\n const stepWidth = size === 'small' ? 2 : 14;\n const mergedSize = size !== null && size !== void 0 ? size : [stepWidth, strokeWidth];\n const [width, height] = getSize(mergedSize, 'step', {\n steps,\n strokeWidth\n });\n const unitWidth = width / steps;\n const styledSteps = new Array(steps);\n for (let i = 0; i < steps; i++) {\n const color = Array.isArray(strokeColor) ? strokeColor[i] : strokeColor;\n styledSteps[i] = /*#__PURE__*/React.createElement(\"div\", {\n key: i,\n className: classNames(`${prefixCls}-steps-item`, {\n [`${prefixCls}-steps-item-active`]: i <= current - 1\n }),\n style: {\n backgroundColor: i <= current - 1 ? color : trailColor,\n width: unitWidth,\n height\n }\n });\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-steps-outer`\n }, styledSteps, children);\n};\nexport default Steps;","map":{"version":3,"names":["React","classNames","getSize","Steps","props","size","steps","percent","strokeWidth","strokeColor","trailColor","prefixCls","children","current","Math","round","stepWidth","mergedSize","width","height","unitWidth","styledSteps","Array","i","color","isArray","createElement","key","className","style","backgroundColor"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/progress/Steps.js"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { getSize } from './utils';\nconst Steps = props => {\n const {\n size,\n steps,\n percent = 0,\n strokeWidth = 8,\n strokeColor,\n trailColor = null,\n prefixCls,\n children\n } = props;\n const current = Math.round(steps * (percent / 100));\n const stepWidth = size === 'small' ? 2 : 14;\n const mergedSize = size !== null && size !== void 0 ? size : [stepWidth, strokeWidth];\n const [width, height] = getSize(mergedSize, 'step', {\n steps,\n strokeWidth\n });\n const unitWidth = width / steps;\n const styledSteps = new Array(steps);\n for (let i = 0; i < steps; i++) {\n const color = Array.isArray(strokeColor) ? strokeColor[i] : strokeColor;\n styledSteps[i] = /*#__PURE__*/React.createElement(\"div\", {\n key: i,\n className: classNames(`${prefixCls}-steps-item`, {\n [`${prefixCls}-steps-item-active`]: i <= current - 1\n }),\n style: {\n backgroundColor: i <= current - 1 ? color : trailColor,\n width: unitWidth,\n height\n }\n });\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-steps-outer`\n }, styledSteps, children);\n};\nexport default Steps;"],"mappings":"AAAA,YAAY;;AAEZ,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,OAAO,QAAQ,SAAS;AACjC,MAAMC,KAAK,GAAGC,KAAK,IAAI;EACrB,MAAM;IACJC,IAAI;IACJC,KAAK;IACLC,OAAO,GAAG,CAAC;IACXC,WAAW,GAAG,CAAC;IACfC,WAAW;IACXC,UAAU,GAAG,IAAI;IACjBC,SAAS;IACTC;EACF,CAAC,GAAGR,KAAK;EACT,MAAMS,OAAO,GAAGC,IAAI,CAACC,KAAK,CAACT,KAAK,IAAIC,OAAO,GAAG,GAAG,CAAC,CAAC;EACnD,MAAMS,SAAS,GAAGX,IAAI,KAAK,OAAO,GAAG,CAAC,GAAG,EAAE;EAC3C,MAAMY,UAAU,GAAGZ,IAAI,KAAK,IAAI,IAAIA,IAAI,KAAK,KAAK,CAAC,GAAGA,IAAI,GAAG,CAACW,SAAS,EAAER,WAAW,CAAC;EACrF,MAAM,CAACU,KAAK,EAAEC,MAAM,CAAC,GAAGjB,OAAO,CAACe,UAAU,EAAE,MAAM,EAAE;IAClDX,KAAK;IACLE;EACF,CAAC,CAAC;EACF,MAAMY,SAAS,GAAGF,KAAK,GAAGZ,KAAK;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