PromoCursed/node_modules/.cache/babel-loader/fa84adc505770d8b8b7a996c47385c9e13663451130dce168a0a91507146c56f.json

1 line
6.6 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"// handle border collapse\nfunction compactItemBorder(token, parentCls, options) {\n const {\n focusElCls,\n focus,\n borderElCls\n } = options;\n const childCombinator = borderElCls ? '> *' : '';\n const hoverEffects = ['hover', focus ? 'focus' : null, 'active'].filter(Boolean).map(n => `&:${n} ${childCombinator}`).join(',');\n return {\n [`&-item:not(${parentCls}-last-item)`]: {\n marginInlineEnd: token.calc(token.lineWidth).mul(-1).equal()\n },\n '&-item': Object.assign(Object.assign({\n [hoverEffects]: {\n zIndex: 2\n }\n }, focusElCls ? {\n [`&${focusElCls}`]: {\n zIndex: 2\n }\n } : {}), {\n [`&[disabled] ${childCombinator}`]: {\n zIndex: 0\n }\n })\n };\n}\n// handle border-radius\nfunction compactItemBorderRadius(prefixCls, parentCls, options) {\n const {\n borderElCls\n } = options;\n const childCombinator = borderElCls ? `> ${borderElCls}` : '';\n return {\n [`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item) ${childCombinator}`]: {\n borderRadius: 0\n },\n [`&-item:not(${parentCls}-last-item)${parentCls}-first-item`]: {\n [`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: {\n borderStartEndRadius: 0,\n borderEndEndRadius: 0\n }\n },\n [`&-item:not(${parentCls}-first-item)${parentCls}-last-item`]: {\n [`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: {\n borderStartStartRadius: 0,\n borderEndStartRadius: 0\n }\n }\n };\n}\nexport function genCompactItemStyle(token) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n focus: true\n };\n const {\n componentCls\n } = token;\n const compactCls = `${componentCls}-compact`;\n return {\n [compactCls]: Object.assign(Object.assign({}, compactItemBorder(token, compactCls, options)), compactItemBorderRadius(componentCls, compactCls, options))\n };\n}","map":{"version":3,"names":["compactItemBorder","token","parentCls","options","focusElCls","focus","borderElCls","childCombinator","hoverEffects","filter","Boolean","map","n","join","marginInlineEnd","calc","lineWidth","mul","equal","Object","assign","zIndex","compactItemBorderRadius","prefixCls","borderRadius","borderStartEndRadius","borderEndEndRadius","borderStartStartRadius","borderEndStartRadius","genCompactItemStyle","arguments","length","undefined","componentCls","compactCls"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/style/compact-item.js"],"sourcesContent":["// handle border collapse\nfunction compactItemBorder(token, parentCls, options) {\n const {\n focusElCls,\n focus,\n borderElCls\n } = options;\n const childCombinator = borderElCls ? '> *' : '';\n const hoverEffects = ['hover', focus ? 'focus' : null, 'active'].filter(Boolean).map(n => `&:${n} ${childCombinator}`).join(',');\n return {\n [`&-item:not(${parentCls}-last-item)`]: {\n marginInlineEnd: token.calc(token.lineWidth).mul(-1).equal()\n },\n '&-item': Object.assign(Object.assign({\n [hoverEffects]: {\n zIndex: 2\n }\n }, focusElCls ? {\n [`&${focusElCls}`]: {\n zIndex: 2\n }\n } : {}), {\n [`&[disabled] ${childCombinator}`]: {\n zIndex: 0\n }\n })\n };\n}\n// handle border-radius\nfunction compactItemBorderRadius(prefixCls, parentCls, options) {\n const {\n borderElCls\n } = options;\n const childCombinator = borderElCls ? `> ${borderElCls}` : '';\n return {\n [`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item) ${childCombinator}`]: {\n borderRadius: 0\n },\n [`&-item:not(${parentCls}-last-item)${parentCls}-first-item`]: {\n [`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: {\n borderStartEndRadius: 0,\n borderEndEndRadius: 0\n }\n },\n [`&-item:not(${parentCls}-first-item)${p