-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
163 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,128 @@ | ||
/* .StandardTable [data-sticky-td] { | ||
position: sticky; | ||
} */ | ||
|
||
.StandardTable { | ||
max-height: calc(100vh - 280px); | ||
.Table__container { | ||
min-height: 300px; | ||
max-height: calc(100vh - 250px); | ||
overflow: auto; | ||
position: relative; | ||
width: 100%; | ||
background-color: inherit; | ||
} | ||
.Table { | ||
|
||
width: 100%; | ||
|
||
.StandardTable__row { | ||
@apply border-b border-solid border-gray-200; | ||
/* width: 100%; */ | ||
background: inherit; | ||
} | ||
|
||
.StandardTable__row:last-child { | ||
border-bottom: 0; | ||
.Table__table { | ||
min-width: 100%; | ||
background: inherit; | ||
/* text-indent: 0; */ | ||
/* border-color: inherit; */ | ||
border-collapse: collapse; | ||
} | ||
|
||
.StandardTable__row:last-child .StandardTable__cell { | ||
/* border-bottom: 0; */ | ||
.Table__table__header { | ||
top: 0; | ||
} | ||
|
||
.StandardTable__cell { | ||
@apply px-2 py-2 overflow-hidden flex items-center; | ||
/* border-bottom: 1px solid theme("colors.primary.main"); */ | ||
min-width: 0; | ||
.Table__pagination { | ||
justify-content: flex-end; | ||
bottom: 0; | ||
} | ||
|
||
.StandardTable__cell:first-child { | ||
@apply pl-4; | ||
.Table__table__header, | ||
.Table__table__footer { | ||
font-weight: bold; | ||
} | ||
|
||
.StandardTable__cell:last-child { | ||
@apply pr-4; | ||
.Table__table__header, | ||
/* .Table__table__footer, */ | ||
.Table__pagination { | ||
position: sticky; | ||
z-index: 10; | ||
} | ||
|
||
[data-sticky-td] { | ||
/* @apply bg-primary-shade4; */ | ||
.Table__table__header__row, | ||
.Table__table__body__row, | ||
.Table__table__footer__row { | ||
border-bottom: 1px solid lightgray; | ||
} | ||
|
||
.StandardTable__header { | ||
@apply rounded-xl font-bold; | ||
position: sticky; | ||
top: 0; | ||
z-index: 4; | ||
.Table__table__header__row--relative, | ||
.Table__table__body__row--relative, | ||
.Table__table__footer__row--relative { | ||
display: flex; | ||
min-width: 100%; | ||
} | ||
|
||
.StandardTable__header__row { | ||
@apply bg-secondary-light text-secondary-contrastText h-12; | ||
.Table__table__header__row--absolute, | ||
.Table__table__body__row--absolute, | ||
.Table__table__footer__row--absolute { | ||
display: flex; | ||
position: relative; | ||
height: 40px; | ||
} | ||
|
||
.StandardTable__header__row__cell { | ||
.Table__table__header__row__cell, | ||
.Table__table__body__row__cell, | ||
.Table__table__footer__row__cell { | ||
position: relative; | ||
background-color: white; | ||
padding: 8px; | ||
/* height: 48px; */ | ||
text-align: left; | ||
} | ||
|
||
.StandardTable__body { | ||
.Table__table__header__row__cell--relative, | ||
.Table__table__body__row__cell--relative, | ||
.Table__table__footer__row__cell--relative { | ||
flex: 1 0 auto; | ||
} | ||
|
||
.StandardTable__body__row { | ||
.Table__table__header__row__cell--absolute, | ||
.Table__table__body__row__cell--absolute, | ||
.Table__table__footer__row__cell--absolute { | ||
position: absolute; | ||
height: 40px; | ||
} | ||
|
||
.StandardTable__body__row__cell { | ||
.Table__loading, | ||
.Table__empty, | ||
.Table__error { | ||
display: flex; | ||
justify-content: center; | ||
padding: 16px; | ||
} | ||
|
||
.StandardTable__pagination { | ||
.Table__loading, | ||
.Table__empty, | ||
.Table__error, | ||
.Table__pagination { | ||
position: sticky; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
z-index: 4; | ||
display: flex; | ||
justify-content: flex-end; | ||
background-color: inherit; | ||
} | ||
|
||
.StandardTable__pagination__item { | ||
background-color: inherit; | ||
/* border-top: 1px solid theme("colors.secondary.main"); */ | ||
.Table__resizer { | ||
position: absolute; | ||
right: 0; | ||
top: 0; | ||
height: 100%; | ||
width: 5px; | ||
background: rgba(0, 0, 0, 0.5); | ||
cursor: col-resize; | ||
user-select: none; | ||
touch-action: none; | ||
} | ||
|
||
.Table__resizer.Table__resizing { | ||
background: blue; | ||
opacity: 1; | ||
} | ||
|
||
@media (hover: hover) { | ||
.Table__resizer { | ||
opacity: 0; | ||
} | ||
|
||
*:hover > .Table__resizer { | ||
opacity: 1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters