1 line
6.2 KiB
JSON
1 line
6.2 KiB
JSON
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { getStyle as getCheckboxStyle } from '../../checkbox/style';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nimport { genTreeStyle, initComponentToken } from '../../tree/style';\n// =============================== Base ===============================\nconst genBaseStyle = token => {\n const {\n componentCls,\n treePrefixCls,\n colorBgElevated\n } = token;\n const treeCls = `.${treePrefixCls}`;\n return [\n // ======================================================\n // == Dropdown ==\n // ======================================================\n {\n [`${componentCls}-dropdown`]: [{\n padding: `${unit(token.paddingXS)} ${unit(token.calc(token.paddingXS).div(2).equal())}`\n },\n // ====================== Tree ======================\n genTreeStyle(treePrefixCls, mergeToken(token, {\n colorBgContainer: colorBgElevated\n })), {\n [treeCls]: {\n borderRadius: 0,\n [`${treeCls}-list-holder-inner`]: {\n alignItems: 'stretch',\n [`${treeCls}-treenode`]: {\n [`${treeCls}-node-content-wrapper`]: {\n flex: 'auto'\n }\n }\n }\n }\n },\n // ==================== Checkbox ====================\n getCheckboxStyle(`${treePrefixCls}-checkbox`, token),\n // ====================== RTL =======================\n {\n '&-rtl': {\n direction: 'rtl',\n [`${treeCls}-switcher${treeCls}-switcher_close`]: {\n [`${treeCls}-switcher-icon svg`]: {\n transform: 'rotate(90deg)'\n }\n }\n }\n }]\n }];\n};\nexport const prepareComponentToken = initComponentToken;\n// ============================== Export ==============================\nexport default function useTreeSelectStyle(prefixCls, treePrefixCls, rootCls) {\n return genStyleHooks('TreeSelect', token => {\n const treeSelectToken = mergeToken(token, {\n treePrefixCls\n });\n return [genBaseStyle(treeSelectToken)];\n }, initComponentToken)(prefixCls, rootCls);\n}","map":{"version":3,"names":["unit","getStyle","getCheckboxStyle","genStyleHooks","mergeToken","genTreeStyle","initComponentToken","genBaseStyle","token","componentCls","treePrefixCls","colorBgElevated","treeCls","padding","paddingXS","calc","div","equal","colorBgContainer","borderRadius","alignItems","flex","direction","transform","prepareComponentToken","useTreeSelectStyle","prefixCls","rootCls","treeSelectToken"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/tree-select/style/index.js"],"sourcesContent":["import { unit } from '@ant-design/cssinjs';\nimport { getStyle as getCheckboxStyle } from '../../checkbox/style';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nimport { genTreeStyle, initComponentToken } from '../../tree/style';\n// =============================== Base ===============================\nconst genBaseStyle = token => {\n const {\n componentCls,\n treePrefixCls,\n colorBgElevated\n } = token;\n const treeCls = `.${treePrefixCls}`;\n return [\n // ======================================================\n // == Dropdown ==\n // ======================================================\n {\n [`${componentCls}-dropdown`]: [{\n padding: `${unit(token.paddingXS)} ${unit(token.calc(token.paddingXS).div(2).equal())}`\n },\n // ====================== Tree ======================\n genTreeStyle(treePrefixCls, mergeToken(token, {\n colorBgContainer: colorBgElevated\n })), {\n [treeCls]: {\n borderRadius: 0,\n [`${treeCls}-list-holder-inner`]: {\n alignItems: 'stretch',\n [`${treeCls}-treenode`]: {\n [`${treeCls}-node-content-wrapper`]: {\n flex: 'auto'\n }\n }\n }\n }\n },\n // ==================== Checkbox ====================\n getCheckboxStyle(`${treePrefixCls}-checkbox`, token),\n // ====================== RTL =======================\n {\n '&-rtl': {\n direction: 'rtl',\n [`${treeCls}-switcher${treeCls}-switcher_close`]: {\n [`${treeCls}-switcher-icon svg`]: {\n transform: 'rotate(90deg)'\n }\n }\n }\n }]\n }];\n};\nexport const prepareComponentToken = initComponentToken;\n// ============================== Export ==============================\nexport default function useTreeSelectStyle(prefixCls, treePrefixCls, rootCls) {\n return genStyleHooks('TreeSelect', token => {\n const treeSelectToken = mergeToken(token, {\n treePrefixCls\n });\n return [genBaseStyle(treeSelectToken)];\n }, initComponentToken)(prefixCls, rootCls);\n}"],"mappings":"AAAA,SAASA,IAAI,QAAQ,qBAAqB;AAC1C,SAASC,QAAQ,IAAIC,gBAAgB,QAAQ,sBAAsB;AACnE,SAASC,aAAa,EAAEC,UAAU,QAAQ,sBAAsB;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