@aplus-frontend/ui
Version:
119 lines (118 loc) • 3.22 kB
JavaScript
import { genComponentStyleHook as i } from "../../../utils/cssinjs/index.mjs";
import { defaultToken as t } from "./token.mjs";
const r = (e) => {
const { componentCls: o } = e;
return {
[o]: {
[`${o}__suffix`]: {
width: "100%",
display: "flex",
alignItems: "center"
},
[`${o}__download-all`]: {
marginLeft: "auto",
padding: 0,
height: "min-content"
},
[`${o}__file-area`]: {
marginBlockStart: e.spaceLG,
"&--border": {
border: `${e.lineWidth} dashed ${e.borderColorBase}`,
padding: e.spaceLG,
borderRadius: e.borderRadius
},
"&-content": {
display: "grid",
rowGap: e.spaceLG,
columnGap: e.calc(e.spaceXL).mul(5).equal(),
gridTemplateColumns: e.apAppendixColumn,
"&-item": {
overflow: "hidden",
userSelect: "none",
"&:hover": {
[`${o}__file-area-content-item-icon-preview`]: {
display: "flex"
}
},
"&-content": {
display: "flex",
alignItems: "center",
width: "max-content",
cursor: "pointer",
maxWidth: "100%",
"&-text": {
display: "flex",
alignItems: "center",
width: "max-content",
cursor: "pointer",
maxWidth: "100%",
minWidth: 0,
overflow: "hidden",
"&:hover": {
".ant-typography": {
color: e.colorLink
}
}
}
},
"&-icon-preview": {
marginLeft: e.space,
fontSize: e.fontSizeXL,
color: e.colorLink,
display: "none",
alignItems: "center",
flexShrink: 0
},
"&-icon": {
marginRight: e.space,
fontSize: e.fontSizeXL,
color: e.textColor4
},
"&-file-name": {
minWidth: 0,
overflow: "hidden",
width: "max-content",
display: "flex",
alignItems: "center",
".ant-typography": {
fontSize: e.fontSize,
lineHeight: e.lineHeight,
color: e.textColor1,
transition: `color ${e.motionDurationMid}`
}
},
"&--loading": {
"&-content": {
cursor: "not-allowed"
},
".ant-typography": {
color: e.textColor4
},
"&-content:hover": {
".ant-typography": {
color: e.textColor4
}
}
}
}
}
},
[`${o}__empty`]: {
".ant-empty": {
margin: 0,
"&-description": {
marginBottom: 0
}
}
}
}
};
}, l = i(
"ApAppendix",
(e) => [r(e)],
t
);
export {
l as default,
r as genApAppendixStyle
};