| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275 |
- @import "../../scss/_bootstrap-extended/include";
- @import "datatables.net-bs5/css/dataTables.bootstrap5";
-
- /* FIX: broken ui in tablet devices */
- @media (hover: none) and (pointer: coarse) {
- table.dataTable {
- display: table;
- overflow-x: auto;
- }
- }
-
- /* Card header inside the datatable */
- div.dt-container {
- .card-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
-
- .dt-buttons .dt-button-down-arrow {
- display: none;
- }
-
- /* Remove left and right border from datatable with table-bordered class */
- .table.table-bordered.dataTable {
- &.dt-complex-header,
- &.dt-column-search {
- thead tr th {
- border-width: $border-width;
- &:first-child {
- border-inline-start-width: 0;
- }
- &:last-child {
- border-inline-end-width: 0;
- }
- }
- }
- th,
- td {
- &:last-child {
- border-width: 0;
- }
- }
- }
-
-
- /* Responsive datatable in desktop screen */
- @media screen and (width >= 1399.98px) {
- table.table-responsive {
- display: table;
- }
- }
- div.dt-search {
- input {
- margin-inline: .5rem 0;
- }
- }
-
- div.dt-layout-end > *:not(:first-child) {
- margin-inline: 0;
- }
-
- table.dataTable {
- border-collapse: collapse;
- inline-size: 100%;
- margin-block: 0 $spacer * 1;
-
- /* Checkbox height & width for datatables checkboxes */
- .form-check-input {
- block-size: $form-datatables-check-input-size;
- inline-size: $form-datatables-check-input-size;
- }
-
- thead {
- > tr {
- > th,
- > td {
- &.dt-orderable-asc,
- &.dt-orderable-desc {
- &:hover {
- outline: none !important;
- }
- }
- }
- }
- th {
- /* Used while complex headers */
- vertical-align: middle;
- }
- }
- .dt-control.dt-orderable-none .dt-column-order::before {
- opacity: 0;
- }
- td.dt-control::before {
- border: 2px solid;
- block-size: .55em;
- border-block-start: 0;
- border-inline-start: 0;
- inline-size: .55em;
- transform: rotate(-45deg);
- :dir(rtl) & {
- transform: rotate(-315deg);
- }
- }
- tr.dt-hasChild td.dt-control::before {
- border-block-start: 0;
- border-inline-start: 0;
- transform: rotate(45deg);
- :dir(rtl) & {
- transform: rotate(-45deg);
- }
- }
- &.table tbody > tr {
- &.selected,
- & > .selected {
- background-color: rgba(var(--#{$prefix}primary-rgb), .08);
- > * {
- box-shadow: none;
- color: var(--#{$prefix}body-color);
- }
- a {
- color: var(--#{$prefix}primary);
- }
- }
- }
- }
-
- div.dt-scroll-body {
- border-block-end-width: 0;
- }
-
- @media screen and (width <= 575.98px) {
- .card-header {
- .dt-action-buttons {
- padding-block-start: 1rem;
- }
- }
- .dtr-bs-modal.modal {
- .modal-body {
- padding: 0;
- .table {
- margin-block-end: 0;
- }
- }
- }
- }
-
- @media screen and (width <= 767.98px) {
- div.dt-info {
- padding-block: 0 $table-cell-padding-y;
- }
- }
-
- div.dt-length,
- div.dt-search {
- margin-block: $spacer * 1.5;
- }
-
- div.dt-length select {
- margin-inline: .5rem;
- }
-
- /* common style for light / dark */
- div.dt-paging ul.pagination .page-link {
- padding: $pagination-padding-y;
- font-size: $font-size-base;
- line-height: $pagination-line-height;
- @include border-radius($border-radius);
- }
-
- @media screen and (width <= 575.98px) {
- div.dt-paging ul.pagination .page-link {
- min-block-size:
- calc(
- #{"#{($font-size-sm * $pagination-line-height) + ($pagination-padding-y-sm * 2)} + calc(#{$pagination-border-width} * 2)"}
- );
- min-inline-size:
- calc(
- #{"#{($font-size-sm * $pagination-line-height) + ($pagination-padding-x-sm * 2.356)} + calc(#{$pagination-border-width} * 2)"}
- );
- padding-block: $pagination-padding-y-sm - .1055rem;
- padding-inline: $pagination-padding-y-sm - .1055rem;
- }
- div.dt-paging ul.pagination {
- .page-item {
- .next,
- .previous,
- .first,
- .last {
- &.page-link {
- padding-block: $pagination-padding-y-sm - .1055rem;
- padding-inline: $pagination-padding-y-sm - .1055rem;
- }
- }
- }
- }
- }
- div.dt-info {
- color: var(--#{$prefix}secondary-color);
- .select-info .select-item {
- margin-inline: .5rem;
- }
- }
- }
-
- /* DataTable within card */
- div.card-datatable {
- padding-block-end: $card-spacer-x-sm;
- }
-
- .table-bordered > :not(caption) > * > * {
- border-width: 0;
- }
-
- /* overrides styles of library for rtl */
- table.dataTable {
- &,
- thead,
- tfoot {
- th,
- td {
- &,
- &.dt-type-numeric,
- &.dt-type-date {
- text-align: start;
- }
- &:first-child{
- padding-inline: $card-spacer-x;
- }
- }
- th:last-child{
- padding-inline-end: $card-spacer-x-sm;
- }
- }
- thead {
- .dt-orderable-asc.dt-orderable-desc,
- .dt-ordering-desc,
- .dt-ordering-asc {
- .dt-column-order {
- inset-inline: auto 1em;
- &::before,
- &::after {
- background-color: var(--#{$prefix}heading-color);
- block-size: 1.125rem;
- content: "";
- inline-size: 1.125rem;
- mask-repeat: no-repeat;
- mask-size: 100% 100%;
- visibility: hidden;
- }
-
- &::before {
- mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='m6.293 13.293l1.414 1.414L12 10.414l4.293 4.293l1.414-1.414L12 7.586z'/%3E%3C/svg%3E");
- }
- &::after {
- mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M16.293 9.293L12 13.586L7.707 9.293l-1.414 1.414L12 16.414l5.707-5.707z'/%3E%3C/svg%3E");
- }
- }
- &:hover {
- .dt-column-order {
- &::before,
- &::after {
- visibility: visible;
- }
- }
- }
- }
- }
- }
-
-
- /* text align styles in modal */
- .modal.dtr-bs-modal .text-xxl-center {
- text-align: start !important;
- }
|