1 |
- {"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 colorPrimaryHover,\n colorPrimary,\n controlOutline\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 hoverBorderColor: colorPrimaryHover,\n activeBorderColor: colorPrimary,\n activeOutlineColor: controlOutline,\n selectAffixPadding: paddingXXS\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","colorPrimaryHover","colorPrimary","controlOutline","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","hoverBorderColor","activeBorderColor","activeOutlineColor","selectAffixPadding"],"sources":["/Users/max_liu/max_liu/company/tools_auto_pt/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 colorPrimaryHover,\n colorPrimary,\n controlOutline\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 hoverBorderColor: colorPrimaryHover,\n activeBorderColor: colorPrimary,\n activeOutlineColor: controlOutline,\n selectAffixPadding: paddingXXS\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,iBAAiB;IACjBC,iBAAiB;IACjBC,YAAY;IACZC;EACF,CAAC,GAAGpB,KAAK;EACT;EACA;EACA;EACA,MAAMqB,aAAa,GAAGd,UAAU,GAAG,CAA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