UNPKG

@aplus-frontend/ui

Version:

2 lines (1 loc) 1.87 kB
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../style/index.js"),i=require("../../utils/cssinjs/index.js"),c=require("./search-form.js"),t=r=>{const{componentCls:e}=r,a=r.calc("100%").div(r.searchFormSorterCountPerRow).equal();return{[e]:{[`${e}-content`]:{width:r.searchFormSorterWidth},[`${e}-header`]:{padding:`${r.spaceXL} ${r.spaceXL} 0px`,"&-title":{...o.resetComponent(r),color:r.textColor1,fontWeight:700,display:"inline-block",paddingBottom:r.spaceXS},"&-desc":{...o.resetComponent(r),color:r.textColor3},"&-action-wrapper":{padding:r.space,margin:r.calc(-1).mul(r.space).equal(),cursor:"pointer"},"&-reset-btn":{...o.resetComponent(r),color:r.colorLink}},[`${e}-sorter-wrapper`]:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginInlineStart:r.calc(r.searchFormSorterItemGap).div(-2).equal(),marginInlineEnd:r.calc(r.searchFormSorterItemGap).div(-2).equal(),rowGap:r.searchFormSorterItemGap},[`${e}-sorter-item`]:{flex:`0 0 ${a}`,maxWidth:a,paddingInline:r.calc(r.searchFormSorterItemGap).div(2).equal(),"> div":{border:`1px solid ${r.borderColorBase}`,borderRadius:r.borderRadius,padding:"8px",display:"flex",alignItems:"center",backgroundColor:"#fff","&:hover":{borderColor:r.colorPrimary,cursor:"pointer",[`${r.componentCls}-sorter-sorter-item-holder`]:{color:`${r.colorPrimary} !important`}}},"&--hidden":{display:"none"}},[`${e}-sorter-item-text`]:{...o.resetComponent(r),paddingInlineStart:r.spaceXS,color:r.textColor1,maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},...c.genPopoverStyle(r)}},l=i.genComponentStyleHook("ApForm.SearchFormSorter",r=>[t(r)],{searchFormSorterWidth:560,searchFormSorterItemGap:8,searchFormSorterCountPerRow:3},{skipUnit:["searchFormSorterCountPerRow"]});exports.default=l;exports.genSearchFormSorter=t;