1 line
9.5 KiB
JSON
1 line
9.5 KiB
JSON
{"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 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;"],"mappings":"AAAA,SAASA,IAAI,QAAQ,qBAAqB;AAC1C,SAASC,UAAU,QAAQ,eAAe;AAC1C,MAAMC,cAAc,GAAGC,KAAK,IAAI;EAC9B,MAAM;IACJC,YAAY;IACZC,sBAAs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