UNPKG

@aplus-frontend/ui

Version:

110 lines (109 loc) 2.67 kB
import { genComponentStyleHook as a } from "../../utils/cssinjs/index.mjs"; const i = (r) => { const { namespace: e } = r, o = `.${e}-ap-form-search-form__popover`; return { [o]: { ".ant-form-item": { marginBlockEnd: r.space }, ".ant-popover-arrow": { display: "none" }, ".ant-popover-inner": { padding: 0 }, [`${o}-content`]: { padding: `${r.spaceLG} ${r.spaceXL} ${r.spaceXL}`, textarea: { padding: 0 } }, [`${o}-footer`]: { padding: `${r.spaceLG} ${r.spaceXL}`, "& button.ant-btn": { paddingInline: r.spaceXL } } } }; }, t = (r) => { const { componentCls: e } = r; return { [e]: { ".ant-form-item": { marginBlockEnd: r.space }, ".ant-form-item-control": { ".ant-picker": { display: "flex" }, ".ant-input-number": { width: "100%" } }, // for more filter trigger button [`${e}-trigger-btn`]: { fontSize: 0, "&-active": { color: r.hoverColorBase, borderColor: r.hoverColorBase, zIndex: 1 }, "&-badge": { display: "inline-block", padding: r.spaceXXS, minWidth: r.searchFormPopoverFilterBadgeSize, height: r.searchFormPopoverFilterBadgeSize, backgroundColor: r.colorPrimary, fontSize: r.fontSizeSM, lineHeight: 1, borderRadius: r.calc(r.searchFormPopoverFilterBadgeSize).div(2).equal(), color: "#fff", position: "absolute", top: 0, left: 0, transform: "translate(-50%, -50%)", boxShadow: "0 0 0 1px #fff" } }, [`${e}-column-setting-trigger-wrapper`]: { flexShrink: 0, ".ant-btn:not(:only-child)": { "&:first-child": { borderTopRightRadius: 0, borderBottomRightRadius: 0, "&:hover": { zIndex: 1 } }, "&:last-child": { borderTopLeftRadius: 0, borderBottomLeftRadius: 0, marginLeft: "-1px", "&:hover": { zIndex: 1 } } } }, [`${e}-action-btn`]: { paddingInline: r.spaceLG }, [`${e}-action-btn-reset`]: { backgroundColor: r.colorBg1 } }, ...i(r) }; }, p = a( "ApForm.SearchForm", (r) => [t(r)], { searchFormPopoverFilterBadgeSize: 14 } ); export { p as default, i as genPopoverStyle, t as genSearchFormStyle };