UNPKG

ant-design-x-vue

Version:

Craft AI-driven interfaces effortlessly

60 lines (59 loc) 1.56 kB
import "../../_util/cssinjs/StyleContext.mjs"; import "vue"; import { unit as i } from "../../_util/cssinjs/util.mjs"; import "../../_util/cssinjs/theme/ThemeCache.mjs"; import "../../_util/warning.mjs"; import "../../_util/cssinjs/transformers/legacyLogicalProperties.mjs"; const g = (r) => { const { componentCls: d, paddingSM: o, padding: n } = r; return { [d]: { [`${d}-content`]: { // Shared: filled, outlined, shadow "&-filled,&-outlined,&-shadow": { padding: `${i(o)} ${i(n)}`, borderRadius: r.borderRadiusLG }, // Filled: "&-filled": { backgroundColor: r.colorFillContent }, // Outlined: "&-outlined": { border: `1px solid ${r.colorBorderSecondary}` }, // Shadow: "&-shadow": { boxShadow: r.boxShadowTertiary } } } }; }, h = (r) => { const { componentCls: d, fontSize: o, lineHeight: n, paddingSM: a, padding: l, calc: e } = r, s = e(o).mul(n).div(2).add(a).equal(), t = `${d}-content`; return { [d]: { [t]: { // round: "&-round": { borderRadius: { _skip_check_: !0, value: s }, paddingInline: e(l).mul(1.25).equal() } }, // corner: [`&-start ${t}-corner`]: { borderStartStartRadius: r.borderRadiusXS }, [`&-end ${t}-corner`]: { borderStartEndRadius: r.borderRadiusXS } } }; }; export { h as genShapeStyle, g as genVariantStyle };