@oceanbase/design
Version:
The Design System of OceanBase
128 lines (126 loc) • 4.37 kB
JavaScript
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/empty/style/index.ts
var style_exports = {};
__export(style_exports, {
default: () => style_default,
genEmptyStyle: () => genEmptyStyle
});
module.exports = __toCommonJS(style_exports);
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
var import_genStyle = require("../../_util/genStyle");
var genEmptyStyle = (token) => {
const { antCls, componentCls, colorTextTertiary, colorText, colorTextSecondary } = token;
return {
[`${componentCls}`]: {
[`${componentCls}-image`]: {
height: 160,
marginBottom: 0
},
[`${componentCls}-description`]: {
// ensure description content color is correct always
color: colorTextTertiary,
[`${componentCls}-title`]: {
color: token.colorText,
fontWeight: token.fontWeightStrong,
fontSize: token.fontSizeHeading4,
lineHeight: token.lineHeightHeading4,
marginTop: token.marginLG
},
[`${componentCls}-description-content`]: {
color: colorTextTertiary,
maxWidth: 600,
margin: "0px auto",
marginTop: token.marginXS
},
[`${antCls}-steps`]: {
maxWidth: 1e3,
margin: "0px auto",
marginTop: token.marginLG,
padding: token.paddingLG,
backgroundColor: token.colorFillQuaternary,
borderRadius: token.borderRadiusLG,
[`${antCls}-steps-item-container`]: {
[`${antCls}-steps-item-icon`]: {
height: token.controlHeightSM,
width: token.controlHeightSM,
lineHeight: `${token.controlHeightSM}px`,
backgroundColor: token.colorFillSecondary,
// override default border color
borderColor: token.colorFillSecondary,
[`${antCls}-steps-icon`]: {
color: colorTextSecondary,
fontSize: token.fontSize
}
},
[`${antCls}-steps-item-content`]: {
[`${antCls}-steps-item-title`]: {
color: colorText,
fontSize: token.fontSize,
fontWeight: token.fontWeightStrong,
lineHeight: `${token.controlHeightSM}px`,
"&::after": {
top: token.controlHeightSM / 2
}
},
[`${antCls}-steps-item-description`]: {
color: colorTextTertiary,
fontSize: token.fontSizeSM,
marginTop: token.marginXS
}
}
}
}
},
[`${componentCls}-footer`]: {
marginTop: token.marginLG,
...(0, import_genStyle.genLargeStyle)(token)
}
},
[`${componentCls}-horizontal`]: {
display: "flex",
justifyContent: "center",
alignItems: "center",
[`${componentCls}-description`]: {
marginLeft: token.marginXXL,
textAlign: "left",
[`${componentCls}-title`]: {
marginTop: 0
},
[`${componentCls}-description-content`]: {
marginTop: token.margin
}
}
},
[`${componentCls}-small`]: {
[`${componentCls}-image`]: {
height: 54
}
}
};
};
var style_default = (prefixCls) => {
const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("Empty", (token) => {
return [genEmptyStyle(token)];
});
return useStyle(prefixCls);
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
genEmptyStyle
});