amis/scss/components/_table.scss

791 lines
17 KiB
SCSS
Raw Normal View History

2019-04-30 11:11:25 +08:00
.#{$ns}Table {
2019-12-06 09:58:08 +08:00
position: relative;
background: $Table-bg;
border: $Table-borderWidth solid $Table-borderColor;
border-radius: $Table-borderRadius;
margin-bottom: $gap-md;
2020-04-08 10:34:16 +08:00
.#{$ns}Form-control > & {
margin-bottom: $gap-sm;
}
2019-12-06 09:58:08 +08:00
&-fixedLeft,
&-fixedRight {
position: absolute;
2019-04-30 11:11:25 +08:00
background: $Table-bg;
z-index: 5;
2019-12-06 09:58:08 +08:00
top: -999999px;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&.in {
top: auto;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-fixedLeft {
box-shadow: $Table-fixedLeft-boxShadow;
left: 0;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-fixedRight {
box-shadow: $Table-fixedRight-boxShadow;
right: 0;
2019-12-06 21:20:23 +08:00
.#{$ns}Table-table > thead > tr > th:first-child,
.#{$ns}Table-table > tbody > tr > td:first-child {
padding-left: $TableCell-paddingX;
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-fixedTop {
position: absolute;
background: $Table-bg;
z-index: -1;
opacity: 0;
box-shadow: $Table-fixedTop-boxShadow;
&.in {
position: fixed;
opacity: 1;
z-index: $zindex-affix;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> .#{$ns}Table-fixedLeft,
> .#{$ns}Table-fixedRight {
z-index: $zindex-affix + 10;
// box-shadow: none;
background: transparent;
border-top: $Table-borderWidth solid $Table-borderColor;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> table {
margin-bottom: px2rem(5px);
}
2019-04-30 11:11:25 +08:00
}
2019-12-24 20:11:26 +08:00
> .#{$ns}Table-heading {
border-bottom: none;
}
2019-12-06 09:58:08 +08:00
> .#{$ns}Table-wrapper {
border-top: $Table-borderWidth solid $Table-borderColor;
2019-04-30 11:11:25 +08:00
}
&.is-fakeHide {
> .#{$ns}Table-fixedLeft,
> .#{$ns}Table-fixedRight,
> .#{$ns}Table-wrapper {
visibility: hidden;
position: absolute;
}
}
2019-12-06 09:58:08 +08:00
}
&-heading {
background: $Table-heading-bg;
border-bottom: $Table-borderWidth solid $Table-borderColor;
padding: ($Table-heading-height - $Table-fontSize * $lineHeightBase) / 2
$Table-toolbar-paddingX;
}
&--unsaved &-heading {
background: $Table--unsaved-heading-bg;
color: $Table--unsaved-heading-color;
}
&-wrapper {
overflow: hidden;
}
&-placeholder {
color: $text--muted-color;
text-align: center;
height: $Table-placeholder-height;
background-color: transparent !important;
&:hover {
color: $text--muted-color;
background-color: transparent !important;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
> td {
vertical-align: middle !important;
text-align: center;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-header {
padding: $Table-toolbar-paddingY $Table-toolbar-paddingX;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> * + .#{$ns}Button,
> * + .#{$ns}ButtonGroup,
> * + .#{$ns}ButtonToolbar {
margin-left: $Crud-toolbar-gap;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-toolbar {
@include clearfix();
display: flex;
padding: $Table-toolbar-paddingY $Table-toolbar-paddingX;
2020-06-08 10:17:28 +08:00
flex-wrap: wrap;
2019-12-19 15:21:23 +08:00
.#{$ns}DropDown {
&-menuItem {
height: auto;
.#{$ns}Checkbox {
display: flex;
align-items: center;
}
}
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-header + &-toolbar {
padding-top: 0;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-contentWrap {
position: relative;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-header + &-contentWrap,
&-toolbar + &-contentWrap {
border-top: $Table-borderWidth solid $Table-borderColor;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-footToolbar {
border-top: $Table-borderWidth solid $Table-borderColor;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-actions {
display: inline-block;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> * {
margin-right: $Crud-toolbar-gap;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-content {
min-height: 0.01%;
overflow-x: auto;
transform: translateZ(0);
}
2019-12-06 09:58:08 +08:00
&-table {
width: 100%;
max-width: 100%;
margin-bottom: 0;
font-size: $Table-fontSize;
color: $Table-color;
background-color: $Table-bg;
border-spacing: 0;
border-collapse: collapse;
2019-12-06 09:58:08 +08:00
&--withCombine {
> thead > tr > th,
> tbody > tr > td {
&:first-child {
padding-left: $TableCell-paddingX !important;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&:last-child {
padding-right: $TableCell-paddingX !important;
2019-08-13 20:06:41 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-08-13 20:06:41 +08:00
2019-12-06 09:58:08 +08:00
// reset
> tbody > tr {
@if $Table-strip-bg !=transparent {
&.#{$ns}Table-tr--odd {
background-color: transparent;
}
}
2019-12-06 09:58:08 +08:00
&:hover {
background-color: transparent;
}
2019-05-27 17:27:17 +08:00
2019-12-06 09:58:08 +08:00
> td {
vertical-align: middle;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> td:not(:last-child) {
border-right: $Table-borderWidth solid $Table-borderColor;
}
}
}
2019-04-30 11:11:25 +08:00
2020-06-23 13:32:21 +08:00
> thead > tr {
2019-12-06 09:58:08 +08:00
> th {
2020-06-23 13:32:21 +08:00
background-color: $Table-thead-bg;
2019-12-06 09:58:08 +08:00
&[colspan] {
text-align: center;
}
2019-12-06 09:58:08 +08:00
padding: $TableCell-paddingY $TableCell-paddingX;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&:first-child {
padding-left: $TableCell--edge-paddingX;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&:last-child {
padding-right: $TableCell--edge-paddingX;
2019-05-27 17:27:17 +08:00
}
2019-12-06 09:58:08 +08:00
&:not(:last-child) {
border-right: $Table-thead-borderWidth solid $Table-thead-borderColor;
2019-04-30 11:11:25 +08:00
}
2020-06-23 13:32:21 +08:00
border-bottom: $Table-thead-borderWidth solid $Table-thead-borderColor;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
font-size: $Table-thead-fontSize;
color: $Table-thead-color;
font-weight: $fontWeightNormal;
white-space: nowrap;
2019-11-11 19:31:22 +08:00
2019-12-19 15:21:23 +08:00
.#{$ns}TableCell--title {
display: flex;
align-items: center;
}
2019-12-06 09:58:08 +08:00
.#{$ns}Remark {
margin-left: $gap-xs;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> thead > tr + tr {
border-top: $Table-borderWidth solid $Table-borderColor;
}
2020-06-23 13:32:21 +08:00
> thead > tr {
border-bottom: $Table-borderWidth solid $Table-borderColor;
}
2019-12-06 09:58:08 +08:00
> tbody > tr {
2020-06-23 13:32:21 +08:00
& + tr {
border-top: $Table-borderWidth solid $Table-borderColor;
> th {
border-top: $Table-thead-borderWidth solid $Table-thead-borderColor;
}
}
2019-04-30 11:11:25 +08:00
> th {
background-color: $Table-thead-bg;
2020-06-23 13:32:21 +08:00
// font-size: $Table-thead-fontSize;
color: $Table-thead-color;
font-weight: $fontWeightNormal;
white-space: nowrap;
border-right: $Table-thead-borderWidth solid $Table-thead-borderColor;
}
2020-06-23 13:32:21 +08:00
> td,
> th {
2019-12-06 09:58:08 +08:00
padding: $TableCell-paddingY $TableCell-paddingX;
vertical-align: top;
2019-08-13 20:06:41 +08:00
2019-12-06 09:58:08 +08:00
&:first-child {
padding-left: $TableCell--edge-paddingX;
2019-08-14 16:55:12 +08:00
}
2019-12-06 09:58:08 +08:00
&:last-child {
padding-right: $TableCell--edge-paddingX;
2019-08-13 20:06:41 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-08-13 20:06:41 +08:00
2019-12-06 09:58:08 +08:00
@if $Table-strip-bg !=transparent {
background-color: transparent;
2019-08-13 20:06:41 +08:00
2019-12-06 09:58:08 +08:00
&.#{$ns}Table-tr--odd {
background-color: $Table-strip-bg;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&:hover,
&.is-hovered {
background-color: $Table-onHover-bg;
border-color: $Table-onHover-borderColor;
color: $Table-onHover-color;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
& + tr {
border-color: $Table-onHover-borderColor;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&.is-checked {
background-color: $Table-onChecked-bg;
border-color: $Table-onChecked-borderColor;
color: $Table-onChecked-color;
2019-11-11 19:31:22 +08:00
2019-12-06 09:58:08 +08:00
& + tr {
border-color: $Table-onChecked-borderColor;
}
}
&.is-moved,
&.is-modified {
background-color: $Table-onModified-bg;
border-color: $Table-onModified-borderColor;
color: $Table-onModified-color;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
& + tr {
border-color: $Table-onModified-borderColor;
2019-04-30 11:11:25 +08:00
}
2019-12-12 19:30:46 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-12 19:30:46 +08:00
&.bg-light {
@include color-variant($light, 2%, 3%, 3%, 5%);
color: $text-color;
}
2019-12-06 09:58:08 +08:00
2019-12-12 19:30:46 +08:00
&.bg-dark {
@include color-variant($dark, 5%, 10%, 5%, 10%);
@include font-variant($dark);
}
&.bg-black {
@include color-variant($black, 5%, 10%, 5%, 10%);
@include font-variant($black);
}
&.bg-primary {
@include color-variant($primary, 5%, 10%, 5%, 10%);
@include font-variant($primary);
}
&.bg-success {
@include color-variant($success, 5%, 10%, 5%, 10%);
@include font-variant($success);
}
&.bg-info {
@include color-variant($info, 5%, 10%, 5%, 10%);
@include font-variant($info);
}
&.bg-warning {
@include color-variant($warning, 5%, 10%, 5%, 10%);
@include font-variant($warning);
}
&.bg-danger {
@include color-variant($danger, 5%, 10%, 5%, 10%);
@include font-variant($danger);
2019-12-06 09:58:08 +08:00
}
2019-12-06 09:58:08 +08:00
&.is-dragging {
opacity: $Table-onDragging-opacity;
}
}
@for $i from 2 through 10 {
tr.#{$ns}Table-tr--#{$i}th.is-expanded {
.#{$ns}Table-expandCell:before {
2020-05-26 20:28:09 +08:00
right: px2rem(7px) + px2rem(-20px) * ($i - 1);
2019-12-06 09:58:08 +08:00
}
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
tr.#{$ns}Table-tr--#{$i}th {
.#{$ns}Table-expandBtn {
position: relative;
2019-12-06 10:09:12 +08:00
right: -(px2rem(20px)) * ($i - 1);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
.#{$ns}Table-expandCell + td {
position: relative;
&::before {
2020-04-08 10:34:16 +08:00
content: '';
2019-04-30 11:11:25 +08:00
position: absolute;
2019-12-06 09:58:08 +08:00
width: px2rem(1px);
2019-04-30 11:11:25 +08:00
top: 0;
2019-12-06 09:58:08 +08:00
bottom: 0;
2020-05-26 20:28:09 +08:00
left: px2rem(-8px) + px2rem(20px) * ($i - 2);
2019-12-06 09:58:08 +08:00
height: auto;
background-color: $Table-tree-borderColor;
}
&::after {
2020-04-08 10:34:16 +08:00
content: '';
2019-12-06 09:58:08 +08:00
position: absolute;
height: px2rem(1px);
2020-05-26 20:28:09 +08:00
top: px2rem(18px);
left: px2rem(-8px) + px2rem(20px) * ($i - 2);
2019-12-06 09:58:08 +08:00
width: px2rem(10px);
background-color: $Table-tree-borderColor;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
padding-left: px2rem(20px) * $i - px2rem(20px);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
tr.#{$ns}Table-tr--#{$i}th.is-expandable {
.#{$ns}Table-expandCell + td {
padding-left: px2rem(20px) * ($i - 1);
}
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
tr.#{$ns}Table-tr--#{$i}th.is-last:not(.is-expanded) {
.#{$ns}Table-expandCell + td {
&::before {
2020-05-26 20:28:09 +08:00
height: px2rem(18px);
2019-12-06 09:58:08 +08:00
bottom: auto;
}
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
> thead > tr > th.#{$ns}Table-checkCell,
> tbody > tr > td.#{$ns}Table-checkCell {
border-right: 0;
width: px2rem(1px);
.#{$ns}Checkbox {
margin: 0;
}
}
> thead > tr > th.#{$ns}Table-expandCell,
> tbody > tr > td.#{$ns}Table-expandCell {
border-right: 0;
width: px2rem(1px);
padding-right: 0;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> thead > tr > th.#{$ns}Table-dragCell,
> tbody > tr > td.#{$ns}Table-dragCell {
border-right: 0;
width: px2rem(1px);
padding-right: 0;
2020-06-08 10:17:28 +08:00
cursor: move;
2019-12-06 09:58:08 +08:00
}
> tbody > tr > td.#{$ns}Table-expandCell {
position: relative;
@for $i from 1 through 7 {
.#{$ns}Table-divider-#{$i} {
position: absolute;
width: px2rem(1px);
top: 0;
bottom: 0;
height: 100%;
background-color: $Table-tree-borderColor;
2020-05-26 20:28:09 +08:00
right: px2rem(7px) + px2rem(-20px) * ($i - 1);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
> tbody > tr.is-expanded > td.#{$ns}Table-expandCell {
// position: relative;
&::before {
2020-04-08 10:34:16 +08:00
content: '';
2019-04-30 11:11:25 +08:00
position: absolute;
2019-12-06 09:58:08 +08:00
width: px2rem(1px);
2020-05-26 20:28:09 +08:00
top: px2rem(28px);
2019-12-06 09:58:08 +08:00
bottom: 0;
2020-05-26 20:28:09 +08:00
right: px2rem(7px);
2019-12-06 09:58:08 +08:00
height: auto;
background-color: $Table-tree-borderColor;
}
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> thead > tr > th.#{$ns}TableCell--sortable {
padding-right: $TableCell-paddingX + $TableCell-sortBtn-width;
position: relative;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> thead > tr > th.#{$ns}TableCell--searchable {
padding-right: $TableCell-paddingX + $TableCell-searchBtn-width;
position: relative;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
> thead > tr > th.#{$ns}TableCell--filterable {
padding-right: $TableCell-paddingX + $TableCell-filterBtn-width;
position: relative;
}
}
&Cell-sortBtn {
cursor: pointer;
width: $TableCell-sortBtn-width;
2020-06-09 14:44:38 +08:00
height: px2rem(20px);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
2019-12-06 09:58:08 +08:00
position: absolute;
right: $TableCell-paddingX - $TableCell-sortBtn-width / 2;
2019-12-19 15:21:23 +08:00
top: 50%;
transform: translateY(-50%);
2020-06-09 14:44:38 +08:00
color: $icon-color;
2019-04-30 11:11:25 +08:00
2020-06-09 14:44:38 +08:00
&:hover {
color: $icon-onHover-color;
2019-04-30 11:11:25 +08:00
}
2020-06-09 14:44:38 +08:00
&--up > svg,
&--down > svg,
&--default > svg {
color: inherit;
width: 12x;
height: 12px;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&--up,
2020-06-09 14:44:38 +08:00
&--down,
&--default {
2019-12-06 09:58:08 +08:00
display: none;
2019-12-19 15:21:23 +08:00
position: absolute;
2019-12-06 09:58:08 +08:00
z-index: 2;
font-style: normal;
&.is-active {
display: inline-block;
}
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&--default {
&.is-active {
2020-06-09 14:44:38 +08:00
color: $text--muted-color;
2020-06-09 17:02:30 +08:00
&:hover {
color: $icon-onHover-color;
}
2019-12-06 09:58:08 +08:00
}
}
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&Cell-searchBtn {
cursor: pointer;
// width: $TableCell-searchBtn-width;
2019-12-06 09:58:08 +08:00
position: absolute;
2020-06-09 17:02:30 +08:00
right: px2rem(5px);
2019-12-19 15:21:23 +08:00
top: 50%;
transform: translateY(-50%);
2019-12-06 09:58:08 +08:00
color: $text--muted-color;
2019-04-30 11:11:25 +08:00
2020-06-09 17:02:30 +08:00
svg.icon {
width: 12px;
height: 12px;
}
2019-12-06 09:58:08 +08:00
&:hover {
color: $text-color;
}
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&Cell-searchPopOver {
border: none;
min-width: px2rem(320px);
max-width: px2rem(640px);
.#{$ns}Panel {
margin: 0;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
&Cell-filterBtn {
cursor: pointer;
width: $TableCell-filterBtn-width;
position: absolute;
right: $TableCell-paddingX - $TableCell-filterBtn-width / 2;
2019-12-19 15:21:23 +08:00
top: 50%;
transform: translateY(-50%);
2019-12-06 09:58:08 +08:00
color: $text--muted-color;
2019-11-11 19:31:22 +08:00
2020-06-09 17:02:30 +08:00
svg.icon {
width: 12px;
height: 12px;
}
2019-12-06 09:58:08 +08:00
&:hover {
color: $text-color;
}
2019-12-06 09:58:08 +08:00
.#{$ns}Remark {
display: inline;
}
}
2019-11-11 19:31:22 +08:00
2019-12-06 09:58:08 +08:00
&Cell-filterPopOver {
border: none;
width: px2rem(160px);
2019-12-06 09:58:08 +08:00
.#{$ns}DropDown-menu {
margin: 0;
padding: 0;
border-radius: 0;
.#{$ns}DropDown-divider {
height: $TableCell-filterPopOver-dropDownItem-height;
line-height: $TableCell-filterPopOver-dropDownItem-height;
padding: $TableCell-filterPopOver-dropDownItem-padding;
background-color: $white;
margin: 0;
&:hover {
background-color: $light;
color: $primary;
}
2019-12-06 09:58:08 +08:00
&.is-selected {
background-color: $light;
color: $primary;
}
2019-12-06 09:58:08 +08:00
.#{$ns}Checkbox {
width: 100%;
margin: 0;
}
}
}
}
&-itemActions-wrap {
position: absolute;
width: 100%;
left: 0;
top: 0;
min-height: 30px;
pointer-events: none;
box-shadow: $Table-onHover-boxShadow;
}
&-itemActions {
pointer-events: all;
position: absolute;
// background: $Table-onHover-bg;
background: linear-gradient(
90deg,
rgba($Table-onHover-bg, 0) 0%,
rgba($Table-onHover-bg, 1) 20%,
rgba($Table-onHover-bg, 1) 100%
);
top: $Table-borderWidth;
bottom: 0;
right: 0;
padding-left: px2rem(50px);
padding-right: $TableCell-paddingX;
display: flex;
align-items: center;
a {
cursor: pointer;
padding: $gap-xs $gap-sm;
color: $link-color;
text-decoration: $link-decoration;
&:hover {
color: $link-onHover-color;
text-decoration: $link-onHover-decoration;
}
&.is-disabled {
pointer-events: none;
opacity: $Button-onDisabled-opacity;
color: $text--muted-color;
}
}
}
&-dragTip {
color: $text--loud-color;
clear: both;
margin-top: $gap-xs;
2020-06-08 10:17:28 +08:00
width: 100%;
color: $info;
2019-12-06 09:58:08 +08:00
}
&-footTable {
position: relative;
width: 100%;
border-spacing: 0;
border-collapse: collapse;
margin-bottom: 0;
background: transparent;
> tbody > tr > th {
width: px2rem(120px);
text-align: right;
padding: $TableCell-paddingY $TableCell-paddingX;
}
> tbody > tr > td {
word-break: break-all;
padding: $TableCell-paddingY $TableCell-paddingX;
}
2019-08-14 14:21:21 +08:00
2019-12-06 09:58:08 +08:00
> tbody > tr:not(:first-child) {
border-top: $Table-borderWidth solid
lighten($Table-thead-borderColor, 2.5%);
}
}
&-expandBtn {
position: relative;
z-index: 1;
2020-05-13 11:00:01 +08:00
color: $Table-expandBtn-color;
2020-05-26 20:28:09 +08:00
display: inline-flex;
justify-content: center;
align-items: center;
width: px2rem(14px);
line-height: 1;
height: 16px;
2019-12-06 09:58:08 +08:00
2020-06-08 18:23:56 +08:00
> svg {
2019-12-06 09:58:08 +08:00
display: inline-block;
text-align: center;
cursor: pointer;
2020-05-26 20:28:09 +08:00
transition: transform ease-in-out 0.2s, top ease-in-out 0.2s;
position: relative;
transform-origin: 50% 50%;
2019-08-14 14:21:21 +08:00
}
2020-06-08 18:23:56 +08:00
&.is-active > svg {
2019-12-06 09:58:08 +08:00
transform: rotate(90deg);
2019-08-14 14:21:21 +08:00
}
2020-05-27 13:52:25 +08:00
&:hover {
text-decoration: none;
}
2019-12-06 09:58:08 +08:00
}
&-dragBtn {
margin-right: $gap-xs;
display: inline-block;
visibility: hidden;
cursor: move;
2020-06-08 18:23:56 +08:00
color: $icon-color;
&:hover {
text-decoration: none;
color: $icon-onHover-color;
}
2019-12-06 09:58:08 +08:00
}
&-table > tbody > tr:hover .#{$ns}Table-dragBtn,
&-table > tbody > tr.is-dragging .#{$ns}Table-dragBtn,
&-table > tbody > tr.is-drop-allowed .#{$ns}Table-dragBtn {
visibility: visible;
}
.fake-hide {
visibility: hidden;
position: absolute;
}
2019-04-30 11:11:25 +08:00
}
.#{$ns}OperationField {
2019-12-06 09:58:08 +08:00
margin: px2rem(-3px);
2019-04-30 11:11:25 +08:00
> .#{$ns}Button,
> .#{$ns}Button--disabled-wrap > .#{$ns}Button {
2019-12-06 09:58:08 +08:00
margin: px2rem(3px);
}
2020-06-08 16:53:52 +08:00
> .#{$ns}Button--link {
padding: 0;
margin-right: px2rem(10px);
}
2019-12-06 09:58:08 +08:00
}