2020-01-01 22:40:58 +08:00
|
|
|
@import "./mixins/mixins.scss";
|
2020-02-11 14:44:29 +08:00
|
|
|
|
2020-01-01 22:40:58 +08:00
|
|
|
@include themes-mixin {
|
|
|
|
@include b(data-table) {
|
2020-02-24 16:25:02 +08:00
|
|
|
@include once {
|
|
|
|
width: 100%;
|
|
|
|
font-size: 14px;
|
|
|
|
padding-bottom: 8px;
|
|
|
|
}
|
2020-01-01 22:40:58 +08:00
|
|
|
@include b(data-table-tables-wrapper) {
|
2020-02-24 16:25:02 +08:00
|
|
|
@include once {
|
|
|
|
position: relative;
|
2020-01-08 21:30:49 +08:00
|
|
|
transition: border-color .3s $--n-ease-in-out-cubic-bezier;
|
2020-02-28 22:57:10 +08:00
|
|
|
border-top-left-radius: $--n-data-table-border-radius;
|
|
|
|
border-top-right-radius: $--n-data-table-border-radius;
|
2020-02-28 22:29:49 +08:00
|
|
|
overflow: hidden;
|
2020-02-24 15:31:39 +08:00
|
|
|
line-height: 1.75;
|
2020-02-24 16:25:02 +08:00
|
|
|
}
|
|
|
|
@include b(data-table-table-wrapper) {
|
|
|
|
@include once {
|
|
|
|
transition: border-color .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
}
|
|
|
|
background-color: $--data-table-body-background-color;
|
2020-01-01 22:40:58 +08:00
|
|
|
}
|
|
|
|
}
|
2020-01-08 16:22:04 +08:00
|
|
|
@include b(data-table-table) {
|
2020-02-24 16:25:02 +08:00
|
|
|
@include once {
|
|
|
|
width: 100%;
|
|
|
|
word-wrap: break-word;
|
|
|
|
word-break: break-all;
|
|
|
|
table-layout: fixed;
|
2020-01-08 16:22:04 +08:00
|
|
|
transition: background-color .3s $--n-ease-in-out-cubic-bezier;
|
2020-02-24 16:25:02 +08:00
|
|
|
border-collapse: separate;
|
|
|
|
border-spacing: 0;
|
|
|
|
}
|
|
|
|
background-color: $--data-table-body-background-color;
|
|
|
|
@include b(data-table-thead) {
|
|
|
|
@include once {
|
|
|
|
transition: background-color .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
}
|
|
|
|
background-color: $--data-table-header-background-color;
|
2020-01-01 22:40:58 +08:00
|
|
|
}
|
2020-02-21 15:26:51 +08:00
|
|
|
@include b(data-table-tbody) {
|
|
|
|
@include b(data-table-tr) {
|
|
|
|
&:hover {
|
2020-02-24 16:25:02 +08:00
|
|
|
background-color: map-get($--data-table-row-background-color, 'hover');
|
2020-02-27 13:02:46 +08:00
|
|
|
@include b(data-table-td) {
|
|
|
|
background-color: map-get($--data-table-row-background-color, 'hover');
|
|
|
|
}
|
2020-02-21 15:26:51 +08:00
|
|
|
}
|
|
|
|
@include m(hover) {
|
2020-02-24 16:25:02 +08:00
|
|
|
background-color: map-get($--data-table-row-background-color, 'hover');
|
2020-02-21 15:26:51 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-01-08 16:22:04 +08:00
|
|
|
@include b(data-table-tr) {
|
2020-02-24 16:25:02 +08:00
|
|
|
@include once {
|
|
|
|
box-sizing: border-box;
|
|
|
|
transition: background-color 0.3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
background-clip: padding-box;
|
2020-01-01 22:40:58 +08:00
|
|
|
}
|
2020-01-08 16:22:04 +08:00
|
|
|
}
|
|
|
|
@include b(data-table-td) {
|
2020-02-24 16:25:02 +08:00
|
|
|
@include once {
|
|
|
|
padding: 10px 10px 10px 16px;
|
|
|
|
text-align: left;
|
|
|
|
box-sizing: border-box;
|
|
|
|
border: none;
|
|
|
|
transition:
|
2020-02-28 22:29:49 +08:00
|
|
|
box-shadow .3s $--n-ease-in-out-cubic-bezier,
|
2020-02-27 13:02:46 +08:00
|
|
|
background-color .3s $--n-ease-in-out-cubic-bezier,
|
2020-02-24 16:25:02 +08:00
|
|
|
color .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
@include m(ellipsis) {
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
2020-02-27 13:02:46 +08:00
|
|
|
@include m(fixed-left) {
|
|
|
|
left: 0;
|
|
|
|
position: sticky;
|
2020-02-28 22:29:49 +08:00
|
|
|
&::after {
|
|
|
|
content: "";
|
|
|
|
width: 16px;
|
|
|
|
display: inline-block;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
transition: box-shadow .2s $--n-ease-in-out-cubic-bezier;
|
|
|
|
right: -16px;
|
|
|
|
}
|
2020-02-27 13:02:46 +08:00
|
|
|
}
|
|
|
|
@include m(fixed-right) {
|
|
|
|
right: 0;
|
|
|
|
position: sticky;
|
2020-02-28 22:29:49 +08:00
|
|
|
&::before {
|
|
|
|
content: "";
|
|
|
|
width: 16px;
|
|
|
|
display: inline-block;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
transition: box-shadow .2s $--n-ease-in-out-cubic-bezier;
|
|
|
|
left: -16px;
|
|
|
|
}
|
2020-02-27 13:02:46 +08:00
|
|
|
}
|
2020-01-01 22:40:58 +08:00
|
|
|
}
|
2020-02-28 22:29:49 +08:00
|
|
|
background-color: $--data-table-body-background-color;
|
2020-02-27 13:02:46 +08:00
|
|
|
@include m(shadow-before) {
|
|
|
|
&::before {
|
|
|
|
box-shadow: inset -16px 0 12px -16px $--data-table-fixed-column-box-shadow-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include m(shadow-after) {
|
2020-02-28 22:29:49 +08:00
|
|
|
&::after {
|
2020-02-27 13:02:46 +08:00
|
|
|
box-shadow: inset 16px 0 12px -16px $--data-table-fixed-column-box-shadow-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
border-color: $--data-table-border-color;
|
2020-02-24 16:25:02 +08:00
|
|
|
color: $--data-table-body-text-color;
|
|
|
|
border-bottom: 1px solid $--data-table-border-color;
|
2020-01-08 16:22:04 +08:00
|
|
|
}
|
|
|
|
@include b(data-table-th) {
|
2020-02-24 16:25:02 +08:00
|
|
|
@include once {
|
|
|
|
position: relative;
|
|
|
|
padding: 10px 10px 10px 16px;
|
|
|
|
text-align: left;
|
2020-02-27 23:02:58 +08:00
|
|
|
font-weight: $--n-strong-weight;
|
2020-02-24 16:25:02 +08:00
|
|
|
box-sizing: border-box;
|
|
|
|
transition:
|
|
|
|
border-color .3s $--n-ease-in-out-cubic-bezier,
|
|
|
|
color .3s $--n-ease-in-out-cubic-bezier,
|
|
|
|
background-color .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
@include m(filterable) {
|
|
|
|
padding-right: 36px;
|
|
|
|
}
|
|
|
|
@include m(ellipsis) {
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
2020-02-27 13:02:46 +08:00
|
|
|
}
|
2020-01-01 22:40:58 +08:00
|
|
|
}
|
2020-02-27 13:02:46 +08:00
|
|
|
border-color: $--data-table-border-color;
|
2020-02-24 16:25:02 +08:00
|
|
|
color: $--data-table-header-text-color;
|
2020-01-08 16:22:04 +08:00
|
|
|
@include m(sortable) {
|
|
|
|
cursor: pointer;
|
|
|
|
&:hover {
|
2020-02-24 16:25:02 +08:00
|
|
|
background-color: map-get($--data-table-header-cell-background-color, 'hover');
|
2020-01-08 16:22:04 +08:00
|
|
|
}
|
2020-01-01 22:40:58 +08:00
|
|
|
}
|
2020-02-27 13:02:46 +08:00
|
|
|
@include m(fixed-left) {
|
|
|
|
left: 0;
|
|
|
|
position: sticky;
|
|
|
|
z-index: 1;
|
|
|
|
background-color: $--data-table-header-fixed-background-color;
|
2020-02-28 22:29:49 +08:00
|
|
|
&::after {
|
|
|
|
content: "";
|
|
|
|
width: 16px;
|
|
|
|
display: inline-block;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
transition: box-shadow .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
right: -16px;
|
|
|
|
}
|
2020-02-27 13:02:46 +08:00
|
|
|
}
|
|
|
|
@include m(fixed-right) {
|
|
|
|
right: 0;
|
|
|
|
position: sticky;
|
|
|
|
z-index: 1;
|
|
|
|
background-color: $--data-table-header-fixed-background-color;
|
|
|
|
&::before {
|
|
|
|
content: "";
|
|
|
|
width: 16px;
|
|
|
|
display: inline-block;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
2020-02-28 22:29:49 +08:00
|
|
|
transition: box-shadow .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
left: -16px;
|
2020-02-27 13:02:46 +08:00
|
|
|
}
|
|
|
|
}
|
2020-02-28 22:29:49 +08:00
|
|
|
@include m(shadow-before) {
|
2020-02-27 13:02:46 +08:00
|
|
|
&::before {
|
2020-02-28 22:29:49 +08:00
|
|
|
box-shadow: inset -16px 0 12px -16px $--data-table-fixed-column-box-shadow-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include m(shadow-after) {
|
|
|
|
&::after {
|
2020-02-27 13:02:46 +08:00
|
|
|
box-shadow: inset 16px 0 12px -16px $--data-table-fixed-column-box-shadow-color;
|
|
|
|
}
|
|
|
|
}
|
2020-01-01 22:40:58 +08:00
|
|
|
}
|
2020-01-08 16:22:04 +08:00
|
|
|
}
|
2020-02-24 16:25:02 +08:00
|
|
|
@include not-m(single-line) {
|
|
|
|
@include b(data-table-tables-wrapper) {
|
|
|
|
@include b(data-table-table){
|
|
|
|
@include b(data-table-th) {
|
|
|
|
border-right: 1px solid $--data-table-border-color;
|
|
|
|
&:last-child {
|
|
|
|
border-right: 0px solid $--data-table-border-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(data-table-td) {
|
|
|
|
border-right: 1px solid $--data-table-border-color;
|
|
|
|
&:last-child {
|
|
|
|
border-right: 0px solid $--data-table-border-color;
|
|
|
|
}
|
2020-01-08 16:22:04 +08:00
|
|
|
}
|
|
|
|
}
|
2020-02-24 16:25:02 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@include m(bordered) {
|
|
|
|
@include b(data-table-tables-wrapper) {
|
2020-02-28 22:29:49 +08:00
|
|
|
overflow: hidden;
|
2020-02-24 16:25:02 +08:00
|
|
|
border: 1px solid $--data-table-border-color;
|
2020-02-28 22:57:10 +08:00
|
|
|
border-bottom-left-radius: $--n-data-table-border-radius;
|
|
|
|
border-bottom-right-radius: $--n-data-table-border-radius;
|
2020-02-24 16:25:02 +08:00
|
|
|
@include b(data-table-table){
|
|
|
|
@include b(data-table-tr) {
|
|
|
|
&:last-child {
|
|
|
|
@include b(data-table-td) {
|
|
|
|
border-bottom: 0px solid $--data-table-border-color;
|
|
|
|
}
|
|
|
|
}
|
2020-01-08 16:22:04 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-02-27 13:02:46 +08:00
|
|
|
@include b(scrollbar-content) {
|
2020-02-28 22:29:49 +08:00
|
|
|
overflow: visible;
|
2020-02-27 13:02:46 +08:00
|
|
|
}
|
2020-01-08 16:22:04 +08:00
|
|
|
}
|
|
|
|
@include b(data-table) {
|
|
|
|
@include once {
|
|
|
|
@include e(empty) {
|
2020-02-03 02:42:37 +08:00
|
|
|
padding: 24px 0;
|
2020-01-01 22:40:58 +08:00
|
|
|
}
|
|
|
|
@include e(pagination) {
|
2020-01-08 16:22:04 +08:00
|
|
|
margin-top: 24px;
|
2020-01-01 22:40:58 +08:00
|
|
|
display: flex;
|
|
|
|
justify-content: flex-end;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(data-table-base-table-header) {
|
2020-02-24 16:25:02 +08:00
|
|
|
@include once {
|
|
|
|
transition: border-color .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
&::-webkit-scrollbar {
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
}
|
|
|
|
scrollbar-width: none;
|
2020-01-01 22:40:58 +08:00
|
|
|
}
|
2020-02-24 16:25:02 +08:00
|
|
|
border-bottom: 1px solid $--data-table-border-color;
|
2020-01-08 16:22:04 +08:00
|
|
|
@include b(data-table-th) {
|
2020-01-08 01:36:12 +08:00
|
|
|
@include b(data-table-sort-button) {
|
2020-02-24 16:25:02 +08:00
|
|
|
@include once {
|
|
|
|
height: 14px;
|
|
|
|
width: 14px;
|
|
|
|
margin-left: 4px;
|
|
|
|
position: relative;
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: middle;
|
|
|
|
@include e(asc-icon) {
|
|
|
|
bottom: calc(50% - 2px);
|
|
|
|
left: 0;
|
|
|
|
}
|
|
|
|
@include e(desc-icon) {
|
|
|
|
top: calc(50% - 2px);
|
|
|
|
left: 0;
|
|
|
|
}
|
|
|
|
}
|
2020-01-08 01:36:12 +08:00
|
|
|
@include m(asc) {
|
|
|
|
@include e(asc-icon) {
|
2020-02-24 16:25:02 +08:00
|
|
|
fill: map-get($--data-table-button-color, 'active');
|
2020-01-08 01:36:12 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@include m(desc) {
|
|
|
|
@include e(desc-icon) {
|
2020-02-24 16:25:02 +08:00
|
|
|
fill: map-get($--data-table-button-color, 'active');
|
2020-01-08 01:36:12 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@include e(asc-icon, desc-icon) {
|
2020-02-24 16:25:02 +08:00
|
|
|
@include once {
|
|
|
|
transition: fill .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
fill: map-get($--data-table-button-color, 'default');
|
2020-01-08 01:36:12 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(data-table-filter-button) {
|
2020-02-24 16:25:02 +08:00
|
|
|
@include once {
|
2020-01-08 16:22:04 +08:00
|
|
|
position: absolute;
|
|
|
|
right: 0;
|
2020-02-24 16:25:02 +08:00
|
|
|
width: 36px;
|
2020-01-08 16:22:04 +08:00
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
2020-02-24 16:25:02 +08:00
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
@include e(icon-wrapper) {
|
|
|
|
@include once {
|
|
|
|
position: absolute;
|
|
|
|
right: 0;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
transition: background-color .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
}
|
2020-01-08 16:22:04 +08:00
|
|
|
&:hover {
|
2020-02-24 16:25:02 +08:00
|
|
|
background-color: map-get($--data-table-header-cell-background-color, 'hover');
|
2020-01-08 16:22:04 +08:00
|
|
|
}
|
2020-01-08 01:36:12 +08:00
|
|
|
@include b(icon) {
|
2020-02-24 16:25:02 +08:00
|
|
|
@include once {
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
fill: map-get($--data-table-button-color, 'default');
|
|
|
|
stroke: map-get($--data-table-button-color, 'default');
|
2020-01-08 01:36:12 +08:00
|
|
|
}
|
|
|
|
}
|
2020-01-08 16:22:04 +08:00
|
|
|
@include m(popover-visible) {
|
|
|
|
@include e(icon-wrapper) {
|
2020-02-24 16:25:02 +08:00
|
|
|
background-color: map-get($--data-table-header-cell-background-color, 'hover');
|
2020-01-01 22:40:58 +08:00
|
|
|
}
|
|
|
|
}
|
2020-01-08 16:22:04 +08:00
|
|
|
@include m(active) {
|
|
|
|
@include e(icon-wrapper) {
|
2020-02-24 16:25:02 +08:00
|
|
|
background-color: map-get($--data-table-header-cell-background-color, 'hover');
|
2020-01-08 16:22:04 +08:00
|
|
|
@include b(icon) {
|
2020-02-24 16:25:02 +08:00
|
|
|
fill: map-get($--data-table-button-color, 'active');
|
|
|
|
stroke: map-get($--data-table-button-color, 'active');
|
2020-01-01 22:40:58 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-02-27 13:02:46 +08:00
|
|
|
}
|