物管理前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
2.1 KiB

  1. import{u as f}from"./use-rtl-CRyak7TN.js";import{a as p}from"./Button-B7xQqa1N.js";import{c as s,e as d,b as o,d as e,a,u as m}from"./light-Cua7cqmF.js";import{u as b}from"./use-style-qLHIyj3D.js";import{d as g,P as h,G as $}from"./index-bVOhw2NF.js";const t="0!important",u="-1px!important";function i(r){return e(`${r}-type`,[o("& +",[s("button",{},[e(`${r}-type`,[a("border",{borderLeftWidth:t}),a("state-border",{left:u})])])])])}function n(r){return e(`${r}-type`,[o("& +",[s("button",[e(`${r}-type`,[a("border",{borderTopWidth:t}),a("state-border",{top:u})])])])])}const y=s("button-group",`
  2. flex-wrap: nowrap;
  3. display: inline-flex;
  4. position: relative;
  5. `,[d("vertical",{flexDirection:"row"},[d("rtl",[s("button",[o("&:first-child:not(:last-child)",`
  6. margin-right: ${t};
  7. border-top-right-radius: ${t};
  8. border-bottom-right-radius: ${t};
  9. `),o("&:last-child:not(:first-child)",`
  10. margin-left: ${t};
  11. border-top-left-radius: ${t};
  12. border-bottom-left-radius: ${t};
  13. `),o("&:not(:first-child):not(:last-child)",`
  14. margin-left: ${t};
  15. margin-right: ${t};
  16. border-radius: ${t};
  17. `),i("default"),e("ghost",[i("primary"),i("info"),i("success"),i("warning"),i("error")])])])]),e("vertical",{flexDirection:"column"},[s("button",[o("&:first-child:not(:last-child)",`
  18. margin-bottom: ${t};
  19. margin-left: ${t};
  20. margin-right: ${t};
  21. border-bottom-left-radius: ${t};
  22. border-bottom-right-radius: ${t};
  23. `),o("&:last-child:not(:first-child)",`
  24. margin-top: ${t};
  25. margin-left: ${t};
  26. margin-right: ${t};
  27. border-top-left-radius: ${t};
  28. border-top-right-radius: ${t};
  29. `),o("&:not(:first-child):not(:last-child)",`
  30. margin: ${t};
  31. border-radius: ${t};
  32. `),n("default"),e("ghost",[n("primary"),n("info"),n("success"),n("warning"),n("error")])])])]),x={size:{type:String,default:void 0},vertical:Boolean},G=g({name:"ButtonGroup",props:x,setup(r){const{mergedClsPrefixRef:l,mergedRtlRef:c}=m(r);return b("-button-group",y,l),h(p,r),{rtlEnabled:f("ButtonGroup",c,l),mergedClsPrefix:l}},render(){const{mergedClsPrefix:r}=this;return $("div",{class:[`${r}-button-group`,this.rtlEnabled&&`${r}-button-group--rtl`,this.vertical&&`${r}-button-group--vertical`],role:"group"},this.$slots)}});export{G as _};