2022-03-02 20:32:25 +08:00
|
|
|
// import '../../style/index.less';
|
|
|
|
// import './index.less';
|
|
|
|
|
|
|
|
// deps-lint-skip-all
|
2022-06-27 14:25:59 +08:00
|
|
|
import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs';
|
2022-05-09 22:20:07 +08:00
|
|
|
import { Keyframes } from '@ant-design/cssinjs';
|
2022-03-02 20:32:25 +08:00
|
|
|
import { getStyle as getCheckboxStyle } from '../../checkbox/style';
|
2022-06-27 14:25:59 +08:00
|
|
|
import type { DerivativeToken } from '../../theme';
|
2022-07-11 15:35:58 +08:00
|
|
|
import { genComponentStyleHook, mergeToken } from '../../theme';
|
|
|
|
import { resetComponent } from '../../style';
|
2022-03-02 20:32:25 +08:00
|
|
|
|
|
|
|
// ============================ Keyframes =============================
|
|
|
|
const treeNodeFX = new Keyframes('ant-tree-node-fx-do-not-use', {
|
|
|
|
'0%': {
|
|
|
|
opacity: 0,
|
|
|
|
},
|
|
|
|
'100%': {
|
|
|
|
opacity: 1,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
// ============================== Switch ==============================
|
|
|
|
const getSwitchStyle = (prefixCls: string, token: DerivativeToken): CSSObject => ({
|
|
|
|
[`.${prefixCls}-switcher-icon`]: {
|
|
|
|
display: 'inline-block',
|
2022-03-25 17:54:57 +08:00
|
|
|
fontSize: 10,
|
2022-03-02 20:32:25 +08:00
|
|
|
verticalAlign: 'baseline',
|
|
|
|
|
|
|
|
svg: {
|
2022-03-22 20:02:04 +08:00
|
|
|
transition: `transform ${token.motionDurationSlow}`,
|
2022-03-02 20:32:25 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
// =============================== Drop ===============================
|
|
|
|
const getDropIndicatorStyle = (prefixCls: string, token: DerivativeToken) => ({
|
|
|
|
[`.${prefixCls}-drop-indicator`]: {
|
|
|
|
position: 'absolute',
|
|
|
|
// it should displayed over the following node
|
|
|
|
zIndex: 1,
|
|
|
|
height: 2,
|
2022-03-22 09:37:37 +08:00
|
|
|
backgroundColor: token.colorPrimary,
|
2022-03-02 20:32:25 +08:00
|
|
|
borderRadius: 1,
|
|
|
|
pointerEvents: 'none',
|
|
|
|
|
|
|
|
'&:after': {
|
|
|
|
position: 'absolute',
|
|
|
|
top: -3,
|
2022-03-11 17:07:16 +08:00
|
|
|
insetInlineStart: -6,
|
2022-03-02 20:32:25 +08:00
|
|
|
width: 8,
|
|
|
|
height: 8,
|
|
|
|
backgroundColor: 'transparent',
|
2022-05-17 18:04:24 +08:00
|
|
|
border: `${token.lineWidthBold}px solid ${token.colorPrimary}`,
|
2022-03-02 20:32:25 +08:00
|
|
|
borderRadius: '50%',
|
|
|
|
content: '""',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
// =============================== Base ===============================
|
|
|
|
type TreeToken = DerivativeToken & {
|
|
|
|
treeCls: string;
|
|
|
|
treeNodeCls: string;
|
|
|
|
treeNodePadding: number;
|
|
|
|
treeTitleHeight: number;
|
|
|
|
};
|
|
|
|
|
2022-04-21 02:06:22 +08:00
|
|
|
export const genBaseStyle = (prefixCls: string, token: TreeToken): CSSObject => {
|
2022-03-02 20:32:25 +08:00
|
|
|
const { treeCls, treeNodeCls, treeNodePadding, treeTitleHeight } = token;
|
|
|
|
|
|
|
|
const treeCheckBoxMarginVertical = (treeTitleHeight - token.fontSizeLG) / 2;
|
|
|
|
const treeCheckBoxMarginHorizontal = token.paddingXS;
|
|
|
|
|
|
|
|
return {
|
|
|
|
[treeCls]: {
|
|
|
|
...resetComponent(token),
|
2022-06-28 20:33:01 +08:00
|
|
|
background: token.colorBgContainer,
|
2022-03-22 13:26:29 +08:00
|
|
|
borderRadius: token.controlRadius,
|
2022-03-22 20:02:04 +08:00
|
|
|
transition: `background-color ${token.motionDurationSlow}`,
|
2022-03-02 20:32:25 +08:00
|
|
|
|
2022-03-11 17:07:16 +08:00
|
|
|
'&&-rtl': {
|
|
|
|
// >>> Switcher
|
|
|
|
[`${treeCls}-switcher`]: {
|
|
|
|
'&_close': {
|
|
|
|
[`${treeCls}-switcher-icon`]: {
|
|
|
|
svg: {
|
|
|
|
transform: 'rotate(90deg)',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2022-03-02 20:32:25 +08:00
|
|
|
'&-focused:not(:hover):not(&-active-focused)': {
|
2022-03-24 14:30:48 +08:00
|
|
|
background: token.colorPrimaryOutline,
|
2022-03-02 20:32:25 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
// =================== Virtual List ===================
|
2022-03-03 14:55:19 +08:00
|
|
|
[`${treeCls}-list-holder-inner`]: {
|
2022-03-02 20:32:25 +08:00
|
|
|
alignItems: 'flex-start',
|
|
|
|
},
|
|
|
|
|
|
|
|
[`&${treeCls}-block-node`]: {
|
|
|
|
[`${treeCls}-list-holder-inner`]: {
|
|
|
|
alignItems: 'stretch',
|
|
|
|
|
|
|
|
// >>> Title
|
|
|
|
[`${treeCls}-node-content-wrapper`]: {
|
|
|
|
flex: 'auto',
|
|
|
|
},
|
|
|
|
|
|
|
|
// >>> Drag
|
|
|
|
[`${treeNodeCls}.dragging`]: {
|
|
|
|
position: 'relative',
|
|
|
|
|
|
|
|
'&:after': {
|
|
|
|
position: 'absolute',
|
|
|
|
top: 0,
|
2022-03-11 17:07:16 +08:00
|
|
|
insetInlineEnd: 0,
|
2022-03-02 20:32:25 +08:00
|
|
|
bottom: treeNodePadding,
|
2022-03-11 17:07:16 +08:00
|
|
|
insetInlineStart: 0,
|
2022-03-22 09:37:37 +08:00
|
|
|
border: `1px solid ${token.colorPrimary}`,
|
2022-03-02 20:32:25 +08:00
|
|
|
opacity: 0,
|
2022-04-21 02:06:22 +08:00
|
|
|
animationName: treeNodeFX,
|
|
|
|
animationDuration: token.motionDurationSlow,
|
2022-03-02 20:32:25 +08:00
|
|
|
animationPlayState: 'running',
|
|
|
|
animationFillMode: 'forwards',
|
|
|
|
content: '""',
|
|
|
|
pointerEvents: 'none',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// ===================== TreeNode =====================
|
|
|
|
[`${treeNodeCls}`]: {
|
|
|
|
display: 'flex',
|
|
|
|
alignItems: 'flex-start',
|
|
|
|
padding: `0 0 ${treeNodePadding}px 0`,
|
|
|
|
outline: 'none',
|
|
|
|
|
2022-03-11 17:07:16 +08:00
|
|
|
'&-rtl': {
|
|
|
|
direction: 'rtl',
|
|
|
|
},
|
|
|
|
|
2022-03-02 20:32:25 +08:00
|
|
|
// Disabled
|
|
|
|
'&-disabled': {
|
|
|
|
// >>> Title
|
|
|
|
[`${treeCls}-node-content-wrapper`]: {
|
2022-03-22 13:26:29 +08:00
|
|
|
color: token.colorTextDisabled,
|
2022-03-02 20:32:25 +08:00
|
|
|
cursor: 'not-allowed',
|
|
|
|
'&:hover': {
|
|
|
|
background: 'transparent',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
[`&-active ${treeCls}-node-content-wrapper`]: {
|
2022-03-22 20:02:04 +08:00
|
|
|
background: token.controlItemBgHover,
|
2022-03-02 20:32:25 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
[`&:not(&-disabled).filter-node ${treeCls}-title`]: {
|
|
|
|
color: 'inherit',
|
|
|
|
fontWeight: 500,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// >>> Indent
|
2022-03-03 14:55:19 +08:00
|
|
|
[`${treeCls}-indent`]: {
|
2022-03-02 20:32:25 +08:00
|
|
|
alignSelf: 'stretch',
|
|
|
|
whiteSpace: 'nowrap',
|
|
|
|
userSelect: 'none',
|
|
|
|
'&-unit': {
|
|
|
|
display: 'inline-block',
|
|
|
|
width: treeTitleHeight,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// >>> Drag Handler
|
2022-03-03 14:55:19 +08:00
|
|
|
[`${treeCls}-draggable-icon`]: {
|
2022-03-02 20:32:25 +08:00
|
|
|
width: treeTitleHeight,
|
|
|
|
lineHeight: `${treeTitleHeight}px`,
|
|
|
|
textAlign: 'center',
|
|
|
|
opacity: 0.2,
|
2022-03-22 20:02:04 +08:00
|
|
|
transition: `opacity ${token.motionDurationSlow}`,
|
2022-03-02 20:32:25 +08:00
|
|
|
|
|
|
|
[`${treeNodeCls}:hover &`]: {
|
|
|
|
opacity: 0.45,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// >>> Switcher
|
2022-03-03 14:55:19 +08:00
|
|
|
[`${treeCls}-switcher`]: {
|
2022-03-02 20:32:25 +08:00
|
|
|
...getSwitchStyle(prefixCls, token),
|
|
|
|
position: 'relative',
|
|
|
|
flex: 'none',
|
|
|
|
alignSelf: 'stretch',
|
|
|
|
width: treeTitleHeight,
|
|
|
|
margin: 0,
|
|
|
|
lineHeight: `${treeTitleHeight}px`,
|
|
|
|
textAlign: 'center',
|
|
|
|
cursor: 'pointer',
|
|
|
|
userSelect: 'none',
|
|
|
|
|
|
|
|
'&-noop': {
|
|
|
|
cursor: 'default',
|
|
|
|
},
|
|
|
|
|
|
|
|
'&_close': {
|
|
|
|
[`${treeCls}-switcher-icon`]: {
|
|
|
|
svg: {
|
|
|
|
transform: 'rotate(-90deg)',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
'&-loading-icon': {
|
2022-03-22 09:37:37 +08:00
|
|
|
color: token.colorPrimary,
|
2022-03-02 20:32:25 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
'&-leaf-line': {
|
|
|
|
position: 'relative',
|
|
|
|
zIndex: 1,
|
|
|
|
display: 'inline-block',
|
|
|
|
width: '100%',
|
|
|
|
height: '100%',
|
|
|
|
|
|
|
|
// https://github.com/ant-design/ant-design/issues/31884
|
|
|
|
'&:before': {
|
|
|
|
position: 'absolute',
|
|
|
|
top: 0,
|
2022-03-11 17:07:16 +08:00
|
|
|
insetInlineEnd: treeTitleHeight / 2,
|
2022-03-02 20:32:25 +08:00
|
|
|
bottom: -treeNodePadding,
|
2022-03-11 17:07:16 +08:00
|
|
|
marginInlineStart: -1,
|
2022-03-22 13:26:29 +08:00
|
|
|
borderInlineEnd: `1px solid ${token.colorBorder}`,
|
2022-03-02 20:32:25 +08:00
|
|
|
content: '""',
|
|
|
|
},
|
|
|
|
|
|
|
|
'&:after': {
|
|
|
|
position: 'absolute',
|
|
|
|
width: (treeTitleHeight / 2) * 0.8,
|
|
|
|
height: treeTitleHeight / 2,
|
2022-03-22 13:26:29 +08:00
|
|
|
borderBottom: `1px solid ${token.colorBorder}`,
|
2022-03-02 20:32:25 +08:00
|
|
|
content: '""',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// >>> Checkbox
|
2022-03-03 14:55:19 +08:00
|
|
|
[`${treeCls}-checkbox`]: {
|
2022-03-02 20:32:25 +08:00
|
|
|
top: 'initial',
|
|
|
|
marginInlineEnd: treeCheckBoxMarginHorizontal,
|
|
|
|
marginBlockStart: treeCheckBoxMarginVertical,
|
|
|
|
},
|
|
|
|
|
|
|
|
// >>> Title
|
2022-05-06 15:58:32 +08:00
|
|
|
// add `${treeCls}-checkbox + span` to cover checkbox `${checkboxCls} + span`
|
|
|
|
[`
|
2022-06-28 20:33:01 +08:00
|
|
|
${treeCls}-node-content-wrapper,
|
2022-05-06 15:58:32 +08:00
|
|
|
${treeCls}-checkbox + span
|
|
|
|
`]: {
|
2022-03-03 14:55:19 +08:00
|
|
|
display: 'flex',
|
|
|
|
flexWrap: 'nowrap',
|
2022-03-02 20:32:25 +08:00
|
|
|
position: 'relative',
|
|
|
|
zIndex: 'auto',
|
|
|
|
minHeight: treeTitleHeight,
|
|
|
|
margin: 0,
|
|
|
|
padding: `0 ${token.paddingXS / 2}px`,
|
|
|
|
color: 'inherit',
|
|
|
|
lineHeight: `${treeTitleHeight}px`,
|
|
|
|
background: 'transparent',
|
2022-03-22 13:26:29 +08:00
|
|
|
borderRadius: token.controlRadius,
|
2022-03-02 20:32:25 +08:00
|
|
|
cursor: 'pointer',
|
2022-03-22 20:02:04 +08:00
|
|
|
transition: `all ${token.motionDurationSlow}, border 0s, line-height 0s, box-shadow 0s`,
|
2022-03-02 20:32:25 +08:00
|
|
|
|
|
|
|
'&:hover': {
|
2022-03-22 20:02:04 +08:00
|
|
|
backgroundColor: token.controlItemBgHover,
|
2022-03-02 20:32:25 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
[`&${treeCls}-node-selected`]: {
|
2022-03-24 14:30:48 +08:00
|
|
|
backgroundColor: token.colorPrimaryOutline,
|
2022-03-02 20:32:25 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
// Icon
|
|
|
|
[`${treeCls}-iconEle`]: {
|
|
|
|
display: 'inline-block',
|
|
|
|
width: treeTitleHeight,
|
|
|
|
height: treeTitleHeight,
|
|
|
|
lineHeight: `${treeTitleHeight}px`,
|
|
|
|
textAlign: 'center',
|
|
|
|
verticalAlign: 'top',
|
|
|
|
|
|
|
|
'&:empty': {
|
|
|
|
display: 'none',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// https://github.com/ant-design/ant-design/issues/28217
|
2022-03-03 14:55:19 +08:00
|
|
|
[`${treeCls}-unselectable ${treeCls}-node-content-wrapper:hover`]: {
|
2022-03-02 20:32:25 +08:00
|
|
|
backgroundColor: 'transparent',
|
|
|
|
},
|
|
|
|
|
|
|
|
// ==================== Draggable =====================
|
2022-03-03 14:55:19 +08:00
|
|
|
[`${treeCls}-node-content-wrapper`]: {
|
2022-03-02 20:32:25 +08:00
|
|
|
lineHeight: `${treeTitleHeight}px`,
|
|
|
|
userSelect: 'none',
|
|
|
|
|
|
|
|
...getDropIndicatorStyle(prefixCls, token),
|
|
|
|
},
|
|
|
|
|
|
|
|
[`${treeNodeCls}.drop-container`]: {
|
|
|
|
'> [draggable]': {
|
2022-03-22 09:37:37 +08:00
|
|
|
boxShadow: `0 0 0 2px ${token.colorPrimary}`,
|
2022-03-02 20:32:25 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// ==================== Show Line =====================
|
|
|
|
'&-show-line': {
|
|
|
|
// ================ Indent lines ================
|
|
|
|
[`${treeCls}-indent`]: {
|
|
|
|
'&-unit': {
|
|
|
|
position: 'relative',
|
|
|
|
height: '100%',
|
|
|
|
|
|
|
|
'&:before': {
|
|
|
|
position: 'absolute',
|
|
|
|
top: 0,
|
2022-03-11 17:07:16 +08:00
|
|
|
insetInlineEnd: treeTitleHeight / 2,
|
2022-03-02 20:32:25 +08:00
|
|
|
bottom: -treeNodePadding,
|
2022-03-22 13:26:29 +08:00
|
|
|
borderInlineEnd: `1px solid ${token.colorBorder}`,
|
2022-03-02 20:32:25 +08:00
|
|
|
content: '""',
|
|
|
|
},
|
|
|
|
|
|
|
|
'&-end': {
|
|
|
|
'&:before': {
|
|
|
|
display: 'none',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// ============== Cover Background ==============
|
|
|
|
[`${treeCls}-switcher`]: {
|
2022-06-28 20:33:01 +08:00
|
|
|
background: token.colorBgContainer,
|
2022-03-02 20:32:25 +08:00
|
|
|
|
|
|
|
'&-line-icon': {
|
|
|
|
// https://github.com/ant-design/ant-design/issues/32813
|
|
|
|
verticalAlign: '-0.15em',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
[`${treeNodeCls}-leaf-last`]: {
|
|
|
|
[`${treeCls}-switcher`]: {
|
|
|
|
'&-leaf-line': {
|
|
|
|
'&:before': {
|
|
|
|
top: 'auto !important',
|
|
|
|
bottom: 'auto !important',
|
|
|
|
height: `${treeTitleHeight / 2}px !important`,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-03-03 14:55:19 +08:00
|
|
|
// ============================ Directory =============================
|
|
|
|
export const genDirectoryStyle = (token: TreeToken): CSSObject => {
|
|
|
|
const { treeCls, treeNodeCls, treeNodePadding } = token;
|
|
|
|
|
|
|
|
return {
|
|
|
|
[`${treeCls}${treeCls}-directory`]: {
|
|
|
|
// ================== TreeNode ==================
|
|
|
|
[treeNodeCls]: {
|
|
|
|
position: 'relative',
|
|
|
|
|
|
|
|
// Hover color
|
|
|
|
'&:before': {
|
|
|
|
position: 'absolute',
|
|
|
|
top: 0,
|
2022-03-11 17:07:16 +08:00
|
|
|
insetInlineEnd: 0,
|
2022-03-03 14:55:19 +08:00
|
|
|
bottom: treeNodePadding,
|
2022-03-11 17:07:16 +08:00
|
|
|
insetInlineStart: 0,
|
2022-03-22 20:02:04 +08:00
|
|
|
transition: `background-color ${token.motionDurationSlow}`,
|
2022-03-03 14:55:19 +08:00
|
|
|
content: '""',
|
|
|
|
pointerEvents: 'none',
|
|
|
|
},
|
|
|
|
|
|
|
|
'&:hover': {
|
|
|
|
'&:before': {
|
2022-03-22 20:02:04 +08:00
|
|
|
background: token.controlItemBgHover,
|
2022-03-03 14:55:19 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// Elements
|
|
|
|
'> *': {
|
|
|
|
zIndex: 1,
|
|
|
|
},
|
|
|
|
|
|
|
|
// >>> Switcher
|
|
|
|
[`${treeCls}-switcher`]: {
|
2022-03-22 20:02:04 +08:00
|
|
|
transition: `color ${token.motionDurationSlow}`,
|
2022-03-03 14:55:19 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
// >>> Title
|
|
|
|
[`${treeCls}-node-content-wrapper`]: {
|
|
|
|
borderRadius: 0,
|
|
|
|
userSelect: 'none',
|
|
|
|
|
|
|
|
'&:hover': {
|
|
|
|
background: 'transparent',
|
|
|
|
},
|
|
|
|
|
|
|
|
[`&.${treeCls}-node-selected`]: {
|
2022-03-22 13:26:29 +08:00
|
|
|
color: token.colorTextLightSolid,
|
2022-03-03 14:55:19 +08:00
|
|
|
background: 'transparent',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// ============= Selected =============
|
|
|
|
'&-selected': {
|
|
|
|
[`
|
|
|
|
&:hover::before,
|
|
|
|
&::before
|
|
|
|
`]: {
|
2022-03-22 09:37:37 +08:00
|
|
|
background: token.colorPrimary,
|
2022-03-03 14:55:19 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
// >>> Switcher
|
|
|
|
[`${treeCls}-switcher`]: {
|
2022-03-22 13:26:29 +08:00
|
|
|
color: token.colorTextLightSolid,
|
2022-03-03 14:55:19 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
// >>> Title
|
|
|
|
[`${treeCls}-node-content-wrapper`]: {
|
2022-03-22 13:26:29 +08:00
|
|
|
color: token.colorTextLightSolid,
|
2022-03-03 14:55:19 +08:00
|
|
|
background: 'transparent',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-03-02 20:32:25 +08:00
|
|
|
// ============================== Merged ==============================
|
2022-04-21 02:06:22 +08:00
|
|
|
export const genTreeStyle = (prefixCls: string, token: DerivativeToken): CSSInterpolation => {
|
2022-03-02 20:32:25 +08:00
|
|
|
const treeCls = `.${prefixCls}`;
|
|
|
|
const treeNodeCls = `${treeCls}-treenode`;
|
|
|
|
|
|
|
|
const treeNodePadding = token.paddingXS / 2;
|
2022-03-08 10:29:00 +08:00
|
|
|
const treeTitleHeight = token.controlHeightSM;
|
2022-03-02 20:32:25 +08:00
|
|
|
|
2022-04-11 16:04:00 +08:00
|
|
|
const treeToken = mergeToken<TreeToken>(token, {
|
2022-03-02 20:32:25 +08:00
|
|
|
treeCls,
|
|
|
|
treeNodeCls,
|
|
|
|
treeNodePadding,
|
|
|
|
treeTitleHeight,
|
2022-04-11 16:04:00 +08:00
|
|
|
});
|
2022-03-02 20:32:25 +08:00
|
|
|
|
|
|
|
return [
|
|
|
|
// Basic
|
2022-04-21 02:06:22 +08:00
|
|
|
genBaseStyle(prefixCls, treeToken),
|
2022-03-03 14:55:19 +08:00
|
|
|
// Directory
|
|
|
|
genDirectoryStyle(treeToken),
|
2022-03-02 20:32:25 +08:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
// ============================== Export ==============================
|
2022-04-21 02:06:22 +08:00
|
|
|
export default genComponentStyleHook('Tree', (token, { prefixCls }) => [
|
2022-05-06 15:58:32 +08:00
|
|
|
{
|
|
|
|
[token.componentCls]: getCheckboxStyle(`${prefixCls}-checkbox`, token),
|
|
|
|
},
|
2022-04-21 02:06:22 +08:00
|
|
|
genTreeStyle(prefixCls, token),
|
2022-04-07 18:24:45 +08:00
|
|
|
]);
|