1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.genCompactItemVerticalStyle = genCompactItemVerticalStyle;
- function compactItemVerticalBorder(token, parentCls, prefixCls) {
- return {
- // border collapse
- [`&-item:not(${parentCls}-last-item)`]: {
- marginBottom: token.calc(token.lineWidth).mul(-1).equal()
- },
- [`&-item:not(${prefixCls}-status-success)`]: {
- zIndex: 2
- },
- '&-item': {
- '&:hover,&:focus,&:active': {
- zIndex: 3
- },
- '&[disabled]': {
- zIndex: 0
- }
- }
- };
- }
- function compactItemBorderVerticalRadius(prefixCls, parentCls) {
- return {
- [`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item)`]: {
- borderRadius: 0
- },
- [`&-item${parentCls}-first-item:not(${parentCls}-last-item)`]: {
- [`&, &${prefixCls}-sm, &${prefixCls}-lg`]: {
- borderEndEndRadius: 0,
- borderEndStartRadius: 0
- }
- },
- [`&-item${parentCls}-last-item:not(${parentCls}-first-item)`]: {
- [`&, &${prefixCls}-sm, &${prefixCls}-lg`]: {
- borderStartStartRadius: 0,
- borderStartEndRadius: 0
- }
- }
- };
- }
- function genCompactItemVerticalStyle(token) {
- const compactCls = `${token.componentCls}-compact-vertical`;
- return {
- [compactCls]: Object.assign(Object.assign({}, compactItemVerticalBorder(token, compactCls, token.componentCls)), compactItemBorderVerticalRadius(token.componentCls, compactCls))
- };
- }
|