1 line
6.5 KiB
JSON
1 line
6.5 KiB
JSON
{"ast":null,"code":"export const prepareComponentToken = token => {\n const {\n fontSize,\n lineHeight,\n lineWidth,\n controlHeight,\n controlHeightSM,\n controlHeightLG,\n paddingXXS,\n controlPaddingHorizontal,\n zIndexPopupBase,\n colorText,\n fontWeightStrong,\n controlItemBgActive,\n controlItemBgHover,\n colorBgContainer,\n colorFillSecondary,\n colorBgContainerDisabled,\n colorTextDisabled\n } = token;\n // Item height default use `controlHeight - 2 * paddingXXS`,\n // but some case `paddingXXS=0`.\n // Let's fallback it.\n const dblPaddingXXS = paddingXXS * 2;\n const dblLineWidth = lineWidth * 2;\n const multipleItemHeight = Math.min(controlHeight - dblPaddingXXS, controlHeight - dblLineWidth);\n const multipleItemHeightSM = Math.min(controlHeightSM - dblPaddingXXS, controlHeightSM - dblLineWidth);\n const multipleItemHeightLG = Math.min(controlHeightLG - dblPaddingXXS, controlHeightLG - dblLineWidth);\n // FIXED_ITEM_MARGIN is a hardcode calculation since calc not support rounding\n const INTERNAL_FIXED_ITEM_MARGIN = Math.floor(paddingXXS / 2);\n return {\n INTERNAL_FIXED_ITEM_MARGIN,\n zIndexPopup: zIndexPopupBase + 50,\n optionSelectedColor: colorText,\n optionSelectedFontWeight: fontWeightStrong,\n optionSelectedBg: controlItemBgActive,\n optionActiveBg: controlItemBgHover,\n optionPadding: `${(controlHeight - fontSize * lineHeight) / 2}px ${controlPaddingHorizontal}px`,\n optionFontSize: fontSize,\n optionLineHeight: lineHeight,\n optionHeight: controlHeight,\n selectorBg: colorBgContainer,\n clearBg: colorBgContainer,\n singleItemHeightLG: controlHeightLG,\n multipleItemBg: colorFillSecondary,\n multipleItemBorderColor: 'transparent',\n multipleItemHeight,\n multipleItemHeightSM,\n multipleItemHeightLG,\n multipleSelectorBgDisabled: colorBgContainerDisabled,\n multipleItemColorDisabled: colorTextDisabled,\n multipleItemBorderColorDisabled: 'transparent',\n showArrowPaddingInlineEnd: Math.ceil(token.fontSize * 1.25)\n };\n};","map":{"version":3,"names":["prepareComponentToken","token","fontSize","lineHeight","lineWidth","controlHeight","controlHeightSM","controlHeightLG","paddingXXS","controlPaddingHorizontal","zIndexPopupBase","colorText","fontWeightStrong","controlItemBgActive","controlItemBgHover","colorBgContainer","colorFillSecondary","colorBgContainerDisabled","colorTextDisabled","dblPaddingXXS","dblLineWidth","multipleItemHeight","Math","min","multipleItemHeightSM","multipleItemHeightLG","INTERNAL_FIXED_ITEM_MARGIN","floor","zIndexPopup","optionSelectedColor","optionSelectedFontWeight","optionSelectedBg","optionActiveBg","optionPadding","optionFontSize","optionLineHeight","optionHeight","selectorBg","clearBg","singleItemHeightLG","multipleItemBg","multipleItemBorderColor","multipleSelectorBgDisabled","multipleItemColorDisabled","multipleItemBorderColorDisabled","showArrowPaddingInlineEnd","ceil"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/select/style/token.js"],"sourcesContent":["export const prepareComponentToken = token => {\n const {\n fontSize,\n lineHeight,\n lineWidth,\n controlHeight,\n controlHeightSM,\n controlHeightLG,\n paddingXXS,\n controlPaddingHorizontal,\n zIndexPopupBase,\n colorText,\n fontWeightStrong,\n controlItemBgActive,\n controlItemBgHover,\n colorBgContainer,\n colorFillSecondary,\n colorBgContainerDisabled,\n colorTextDisabled\n } = token;\n // Item height default use `controlHeight - 2 * paddingXXS`,\n // but some case `paddingXXS=0`.\n // Let's fallback it.\n const dblPaddingXXS = paddingXXS * 2;\n const dblLineWidth = lineWidth * 2;\n const multipleItemHeight = Math.min(controlHeight - dblPaddingXXS, controlHeight - dblLineWidth);\n const multipleItemHeightSM = Math.min(controlHeightSM - dblPaddingXXS, controlHeightSM - dblLineWidth);\n const multipleItemHeightLG = Math.min(controlHeightLG - dblPaddingXXS, controlHeightLG - dblLineWidth);\n // FIXED_ITEM_MARGIN is a hardcode calculation since calc not support rounding\n const INTERNAL_FIXED_ITEM_MARGIN = Math.floor(paddingXXS / 2);\n return {\n INTERNAL_FIXED_ITEM_MARGIN,\n zIndexPopup: zIndexPopupBase + 50,\n optionSelectedColor: colorText,\n optionSelectedFontWeight: fontWeightStrong,\n optionSelectedBg: controlItemBgActive,\n optionActiveBg: controlItemBgHover,\n optionPadding: `${(controlHeight - fontSize * lineHeight) / 2}px ${controlPaddingHorizontal}px`,\n optionFontSize: fontSize,\n optionLineHeight: lineHeight,\n optionHeight: controlHeight,\n selectorBg: colorBgContainer,\n clearBg: colorBgContainer,\n singleItemHeightLG: controlHeightLG,\n multipleItemBg: colorFillSecondary,\n multipleItemBorderColor: 'transparent',\n multipleItemHeight,\n multipleItemHeightSM,\n multipleItemHeightLG,\n multipleSelectorBgDisabled: colorBgContainerDisabled,\n multipleItemColorDisabled: colorTextDisabled,\n multipleItemBorderColorDisabled: 'transparent',\n showArrowPaddingInlineEnd: Math.ceil(token.fontSize * 1.25)\n };\n};"],"mappings":"AAAA,OAAO,MAAMA,qBAAqB,GAAGC,KAAK,IAAI;EAC5C,MAAM;IACJC,QAAQ;IACRC,UAAU;IACVC,SAAS;IACTC,aAAa;IACbC,eAAe;IACfC,eAAe;IACfC,UAAU;IACVC,wBAAwB;IACxBC,eAAe;IACfC,SAAS;IACTC,gBAAgB;IAChBC,mBAAmB;IACnBC,kBAAkB;IAClBC,gBAAgB;IAChBC,kBAAkB;IAClBC,wBAAwB;IACxBC;EACF,CAAC,GAAGjB,KAAK;EACT;EACA;EACA;EACA,MAAMkB,aAAa,GAAGX,UAAU,GAAG,CAAC;EACpC,MAAMY,YAAY,GAAGhB,SAAS,GAAG,CAAC;EAClC,MAAMiB,kBAAkB,GAAGC,IAAI,CAACC,GAAG,CAAClB,aAAa,GAAGc,aAAa,EAAEd,aAAa,GAAGe,YAAY,CAAC;EAChG,MAAMI,oBAAoB,GAAGF,IAAI,CAACC,GAAG,CAACjB,eAAe,GAAGa,aAAa,EAAEb,eAAe,GAAGc,YAAY,CAAC;EACtG,MAAMK,oBAAoB,GAAGH,IAAI,CAACC,GAAG,CAAChB,eAAe,GAA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