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

1 line
9.5 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { getTransBg } from './color-block';\nconst genSliderStyle = token => {\n const {\n componentCls,\n colorPickerInsetShadow,\n colorBgElevated,\n colorFillSecondary,\n lineWidthBold,\n colorPickerHandlerSizeSM,\n colorPickerSliderHeight,\n marginSM,\n marginXS\n } = token;\n const handleInnerSize = token.calc(colorPickerHandlerSizeSM).sub(token.calc(lineWidthBold).mul(2).equal()).equal();\n const handleHoverSize = token.calc(colorPickerHandlerSizeSM).add(token.calc(lineWidthBold).mul(2).equal()).equal();\n const activeHandleStyle = {\n '&:after': {\n transform: 'scale(1)',\n boxShadow: `${colorPickerInsetShadow}, 0 0 0 1px ${token.colorPrimaryActive}`\n }\n };\n return {\n // ======================== Slider ========================\n [`${componentCls}-slider`]: [getTransBg(unit(colorPickerSliderHeight), token.colorFillSecondary), {\n margin: 0,\n padding: 0,\n height: colorPickerSliderHeight,\n borderRadius: token.calc(colorPickerSliderHeight).div(2).equal(),\n '&-rail': {\n height: colorPickerSliderHeight,\n borderRadius: token.calc(colorPickerSliderHeight).div(2).equal(),\n boxShadow: colorPickerInsetShadow\n },\n [`& ${componentCls}-slider-handle`]: {\n width: handleInnerSize,\n height: handleInnerSize,\n top: 0,\n borderRadius: '100%',\n '&:before': {\n display: 'block',\n position: 'absolute',\n background: 'transparent',\n left: {\n _skip_check_: true,\n value: '50%'\n },\n top: '50%',\n transform: 'translate(-50%, -50%)',\n width: handleHoverSize,\n height: handleHoverSize,\n borderRadius: '100%'\n },\n '&:after': {\n width: colorPickerHandlerSizeSM,\n height: colorPickerHandlerSizeSM,\n border: `${unit(lineWidthBold)} solid ${colorBgElevated}`,\n boxShadow: `${colorPickerInsetShadow}, 0 0 0 1px ${colorFillSecondary}`,\n outline: 'none',\n insetInlineStart: token.calc(lineWidthBold).mul(-1).equal(),\n top: token.calc(lineWidthBold).mul(-1).equal(),\n background: 'transparent',\n transition: 'none'\n },\n '&:focus': activeHandleStyle\n }\n }],\n // ======================== Layout ========================\n [`${componentCls}-slider-container`]: {\n display: 'flex',\n gap: marginSM,\n marginBottom: marginSM,\n // Group\n [`${componentCls}-slider-group`]: {\n flex: 1,\n flexDirection: 'column',\n justifyContent: 'space-between',\n display: 'flex',\n '&-disabled-alpha': {\n justifyContent: 'center'\n }\n }\n },\n [`${componentCls}-gradient-slider`]: {\n marginBottom: marginXS,\n [`& ${componentCls}-slider-handle`]: {\n '&:after': {\n transform: 'scale(0.8)'\n },\n '&-active, &:focus': activeHandleStyle\n }\n }\n };\n};\nexport default genSliderStyle;","map":{"version":3,"names":["unit","getTransBg","genSliderStyle","token","componentCls","colorPickerInsetShadow","colorBgElevated","colorFillSecondary","lineWidthBold","colorPickerHandlerSizeSM","colorPickerSliderHeight","marginSM","marginXS","handleInnerSize","calc","sub","mul","equal","handleHoverSize","add","activeHandleStyle","transform","boxShadow","colorPrimaryActive","margin","padding","height","borderRadius","div","width","top","display","position","background","left","_skip_check_","value","border","outline","insetInlineStart","transition","gap","marginBottom","flex","flexDirection","justifyContent"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/color-picker/style/slider.js"],"sourcesContent":["import { unit } from '@ant-design/cssinjs';\nimport { getTransBg } from './color-block';\nconst genSliderStyle = token => {\n const {\n componentCls,\n