mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 04:45:08 +03:00
710 lines
13 KiB
CSS
710 lines
13 KiB
CSS
.sb-grid {
|
|
@apply flex flex-col h-full;
|
|
}
|
|
|
|
.sb-grid-fill-container:after {
|
|
content: '';
|
|
display: inline-block;
|
|
width: 100%;
|
|
}
|
|
|
|
.rdg-cell {
|
|
@apply border-r border-b border-scale-400 dark:border-scale-500 text-sm;
|
|
@apply text-typography-body-light dark:text-typography-body-dark;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
line-height: inherit;
|
|
}
|
|
|
|
.rdg-cell > div[draggable="true"] {
|
|
@apply h-full;
|
|
}
|
|
|
|
.rdg-cell-frozen-last {
|
|
@apply border-r-4 border-scale-400 dark:border-scale-500 shadow-none;
|
|
}
|
|
|
|
.rdg-cell-selected {
|
|
box-shadow: inset 0 0 0 1px #24b47e;
|
|
}
|
|
|
|
.rdg {
|
|
@apply bg-transparent box-border overflow-x-auto overflow-y-scroll select-none;
|
|
@apply border-t border-b border-r-0 border-l-0 border-scale-400 dark:border-scale-500;
|
|
contain: strict;
|
|
-webkit-user-select: none;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.rdg *,
|
|
.rdg ::after,
|
|
.rdg ::before {
|
|
box-sizing: inherit;
|
|
}
|
|
|
|
@supports not (contain: strict) {
|
|
.rdg {
|
|
position: relative;
|
|
z-index: 0;
|
|
}
|
|
}
|
|
|
|
.rdg-focus-sink {
|
|
position: sticky;
|
|
top: 0;
|
|
left: 0;
|
|
height: 0;
|
|
width: 0;
|
|
outline: 0;
|
|
}
|
|
|
|
/*
|
|
Row header
|
|
*/
|
|
|
|
.rdg-header-row {
|
|
@apply bg-table-header-light dark:bg-table-header-dark border-none select-none;
|
|
}
|
|
|
|
.rdg-header-row {
|
|
height: var(--header-row-height);
|
|
line-height: var(--header-row-height);
|
|
top: 0;
|
|
}
|
|
|
|
.rdg-header-row .rdg-cell {
|
|
@apply bg-table-header-light dark:bg-table-header-dark border-b border-scale-400 dark:border-scale-500;
|
|
/* @apply text-typography-body-light dark:text-typography-body-dark; */
|
|
}
|
|
.rdg-header-row .rdg-cell p,
|
|
/* .rdg-cell svg */ {
|
|
@apply text-typography-body-light dark:text-typography-body-dark;
|
|
}
|
|
.rdg-header-row .rdg-cell .react-contextmenu-wrapper {
|
|
@apply h-full flex items-center px-2 transition ease-in-out duration-100;
|
|
}
|
|
.rdg-header-row .rdg-cell .react-contextmenu-wrapper:hover {
|
|
@apply bg-scale-400;
|
|
}
|
|
.rdg-header-row .rdg-checkbox {
|
|
@apply border bg-table-header-light dark:bg-table-header-dark rounded-sm border-scale-400 dark:border-scale-500;
|
|
}
|
|
.rdg-header-row .rdg-checkbox-input:checked + .rdg-checkbox {
|
|
@apply border-4 bg-green-900 border-scale-400 dark:border-scale-500;
|
|
}
|
|
.rdg-header-row .rdg-checkbox-input:focus + .rdg-checkbox {
|
|
box-shadow: none;
|
|
}
|
|
|
|
.rdg-cell .Select {
|
|
max-height: 30px;
|
|
font-size: 12px;
|
|
font-weight: 400;
|
|
}
|
|
|
|
/*
|
|
Row
|
|
*/
|
|
|
|
.rdg-row {
|
|
@apply bg-table-body-light dark:bg-table-body-dark transition-colors;
|
|
@apply hover:bg-table-header-light dark:hover:bg-table-header-dark;
|
|
}
|
|
|
|
/* edit button */
|
|
.rdg-row__select-column__edit-action {
|
|
@apply text-typography-body-light dark:text-typography-body-dark;
|
|
opacity: 0;
|
|
}
|
|
.rdg-row:hover .rdg-row__select-column__edit-action {
|
|
opacity: 0.5;
|
|
}
|
|
.rdg-row__select-column__edit-action:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* select row */
|
|
.rdg-row[aria-selected='true'] {
|
|
@apply bg-bg-secondary-light dark:bg-bg-secondary-dark;
|
|
@apply hover:bg-bg-secondary-light dark:hover:bg-bg-secondary-dark;
|
|
}
|
|
|
|
.rdg-row .rdg-cell span,
|
|
/* .rdg-row .rdg-cell svg, */
|
|
.rdg-row .rdg-cell div {
|
|
@apply text-typography-body-light dark:text-typography-body-dark;
|
|
}
|
|
|
|
.tab-cursor {
|
|
cursor: pointer !important;
|
|
}
|
|
|
|
/*
|
|
Checkbox
|
|
*/
|
|
|
|
/* reset styles */
|
|
[type='checkbox'] {
|
|
webkit-appearance: none;
|
|
-moz-appearance: none;
|
|
appearance: none;
|
|
padding: 0;
|
|
-webkit-print-color-adjust: exact;
|
|
color-adjust: exact;
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
background-origin: border-box;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
flex-shrink: 0;
|
|
height: 1rem;
|
|
width: 1rem;
|
|
color: #2563eb;
|
|
background-color: #fff;
|
|
border-color: #6b7280;
|
|
border-width: 1px;
|
|
}
|
|
|
|
[type='checkbox']:checked {
|
|
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
|
|
}
|
|
|
|
[type='checkbox']:checked {
|
|
@apply dark:bg-brand-900;
|
|
@apply bg-brand-900;
|
|
border-color: transparent;
|
|
background-size: 100% 100%;
|
|
background-position: center;
|
|
background-repeat: no-repeat;
|
|
}
|
|
|
|
[type='checkbox'] {
|
|
@apply border border-solid rounded cursor-pointer;
|
|
|
|
@apply text-brand-600 border-scale-400 transition-all;
|
|
@apply hover:border-brand-900 focus:ring-brand-500 focus:outline-none;
|
|
|
|
@apply dark:bg-transparent dark:border-scale-500 dark:text-white;
|
|
@apply dark:hover:border-green-900;
|
|
|
|
margin-top: 2px;
|
|
}
|
|
|
|
/*
|
|
React Contexify
|
|
*/
|
|
|
|
.react-contexify {
|
|
position: fixed;
|
|
opacity: 0;
|
|
user-select: none;
|
|
background-color: #fff;
|
|
box-sizing: border-box;
|
|
box-shadow: 0px 10px 30px -5px rgba(0, 0, 0, 0.3);
|
|
border-radius: 6px;
|
|
padding: 6px 0;
|
|
min-width: 200px;
|
|
z-index: 100;
|
|
}
|
|
.react-contexify__submenu--is-open,
|
|
.react-contexify__submenu--is-open > .react-contexify__item__content {
|
|
color: white;
|
|
background-color: #4393e6;
|
|
}
|
|
.react-contexify__submenu--is-open > .react-contexify__submenu {
|
|
pointer-events: initial;
|
|
opacity: 1;
|
|
}
|
|
.react-contexify .react-contexify__submenu {
|
|
position: absolute;
|
|
/* negate padding */
|
|
top: -6px;
|
|
pointer-events: none;
|
|
transition: opacity 0.275s;
|
|
}
|
|
.react-contexify__submenu-arrow {
|
|
margin-left: auto;
|
|
font-size: 12px;
|
|
}
|
|
.react-contexify__separator {
|
|
width: 100%;
|
|
height: 1px;
|
|
cursor: default;
|
|
margin: 4px 0;
|
|
background-color: rgba(0, 0, 0, 0.2);
|
|
}
|
|
.react-contexify__will-leave--disabled {
|
|
pointer-events: none;
|
|
}
|
|
.react-contexify__item {
|
|
cursor: pointer;
|
|
position: relative;
|
|
}
|
|
.react-contexify__item:focus {
|
|
outline: 0;
|
|
}
|
|
.react-contexify__item:not(.react-contexify__item--disabled):hover
|
|
> .react-contexify__item__content,
|
|
.react-contexify__item:not(.react-contexify__item--disabled):focus
|
|
> .react-contexify__item__content {
|
|
color: white;
|
|
background-color: #4393e6;
|
|
}
|
|
.react-contexify__item:not(.react-contexify__item--disabled):hover
|
|
> .react-contexify__submenu {
|
|
pointer-events: initial;
|
|
opacity: 1;
|
|
}
|
|
.react-contexify__item--disabled {
|
|
cursor: default;
|
|
opacity: 0.5;
|
|
}
|
|
.react-contexify__item__content {
|
|
font-size: 13px;
|
|
padding: 6px 12px;
|
|
display: flex;
|
|
align-items: center;
|
|
white-space: nowrap;
|
|
color: #333;
|
|
position: relative;
|
|
}
|
|
|
|
.rdg__segmented-control {
|
|
@apply relative mx-2 border rounded-md h-8 border-scale-400 dark:border-scale-500;
|
|
}
|
|
|
|
.rdg__segmented-control__button {
|
|
@apply absolute inline-flex h-full items-center justify-center top-0;
|
|
@apply text-xs font-medium;
|
|
@apply text-scale-400;
|
|
@apply hover:text-white focus:z-10 focus:outline-none active:bg-scale-100;
|
|
@apply transition ease-in-out duration-150;
|
|
@apply cursor-pointer;
|
|
z-index: 1;
|
|
}
|
|
|
|
.rdg__segmented-control__button--option {
|
|
@apply text-scale-200;
|
|
}
|
|
|
|
.rdg__segmented-control__button--right {
|
|
@apply right-0;
|
|
}
|
|
|
|
.rdg__segmented-control__button--left {
|
|
@apply left-0;
|
|
}
|
|
|
|
.rdg__segmented-control__label {
|
|
@apply z-0 inline-block rounded h-full bg-scale-600 shadow transform transition ease-in-out duration-200 border border-scale-600;
|
|
}
|
|
|
|
.rdg__segmented-control__label--left {
|
|
@apply translate-x-0;
|
|
}
|
|
|
|
.rdg__segmented-control__label--right {
|
|
@apply translate-x-12;
|
|
}
|
|
|
|
.rdg__segmented-control__options-label {
|
|
@apply uppercase;
|
|
color: inherit;
|
|
}
|
|
|
|
/*
|
|
DropdownControl
|
|
*/
|
|
|
|
.dropdown-control {
|
|
@apply overflow-auto;
|
|
}
|
|
|
|
.dropdown-control .sbui-typography {
|
|
@apply block px-2 py-4;
|
|
}
|
|
|
|
/*
|
|
ForeignTableModal
|
|
*/
|
|
|
|
.foreign-table-modal__content-container {
|
|
@apply w-full;
|
|
}
|
|
|
|
/* .foreign-table-modal__content-container__inner {
|
|
@apply px-6;
|
|
} */
|
|
|
|
.foreign-table-modal__content-container__inner__overflow {
|
|
@apply w-full overflow-scroll;
|
|
}
|
|
|
|
.foreign-table-modal__filter {
|
|
@apply flex items-center space-x-2 mt-2;
|
|
}
|
|
|
|
.foreign-table-modal__filter__trigger-content {
|
|
@apply space-x-2;
|
|
}
|
|
|
|
.foreign-table-modal__filter__trigger-content__label {
|
|
@apply text-typography-body-light dark:text-typography-body-dark;
|
|
}
|
|
|
|
.foreign-table-modal__filter__trigger-content__name {
|
|
@apply text-typography-body-strong-light dark:text-typography-body-strong-dark font-bold;
|
|
}
|
|
|
|
.foreign-table-modal__filter__search-input {
|
|
@apply flex-grow;
|
|
}
|
|
|
|
.foreign-table-modal__menu {
|
|
@apply flex flex-col space-y-2;
|
|
}
|
|
|
|
.foreign-table-modal__row-item {
|
|
@apply border border-solid border-scale-400 dark:border-scale-500 rounded shadow-sm first:mt-2 overflow-hidden;
|
|
}
|
|
|
|
.foreign-table-modal__row-item__inner {
|
|
@apply flex space-x-4;
|
|
}
|
|
|
|
.foreign-table-modal__row-item__inner__key-item {
|
|
@apply flex flex-col flex-initial;
|
|
}
|
|
|
|
.foreign-table-modal__row-item__inner__key-item__key {
|
|
@apply font-mono;
|
|
}
|
|
|
|
/*
|
|
NullValue
|
|
*/
|
|
|
|
.null-value {
|
|
@apply block;
|
|
}
|
|
|
|
/*
|
|
CheckboxEditor
|
|
*/
|
|
|
|
.sb-grid-checkbox-editor {
|
|
@apply flex w-full h-full;
|
|
}
|
|
|
|
.sb-grid-checkbox-editor__input {
|
|
@apply w-4 h-4;
|
|
}
|
|
|
|
/*
|
|
DateEditor
|
|
*/
|
|
|
|
.sb-grid-date-editor {
|
|
@apply w-full h-full px-2;
|
|
}
|
|
|
|
/*
|
|
DateTimeEditor
|
|
*/
|
|
|
|
.sb-grid-datetime-editor {
|
|
@apply w-full h-full px-2;
|
|
}
|
|
|
|
/*
|
|
JsonEditor
|
|
*/
|
|
|
|
.sb-grid-json-editor__trigger {
|
|
@apply px-2 text-sm overflow-hidden overflow-ellipsis;
|
|
}
|
|
|
|
/*
|
|
NumberEditor
|
|
*/
|
|
|
|
.sb-grid-number-editor {
|
|
@apply w-full h-full px-2;
|
|
}
|
|
|
|
/*
|
|
SelectEditor
|
|
*/
|
|
|
|
.sb-grid-select-editor {
|
|
@apply w-full h-full;
|
|
}
|
|
|
|
/*
|
|
TextEditor
|
|
*/
|
|
|
|
.sb-grid-text-editor__trigger {
|
|
@apply px-2 text-sm overflow-hidden overflow-ellipsis;
|
|
}
|
|
|
|
/*
|
|
TimeEditor
|
|
*/
|
|
|
|
.sb-grid-time-editor {
|
|
@apply w-full h-full px-2;
|
|
}
|
|
|
|
/*
|
|
Pagination
|
|
*/
|
|
|
|
.sb-grid-pagination {
|
|
@apply flex items-center space-x-2;
|
|
}
|
|
|
|
.sb-grid-pagination-input-container {
|
|
@apply w-12;
|
|
}
|
|
.sb-grid-pagination-input {
|
|
@apply w-12 block;
|
|
}
|
|
|
|
.sb-grid-pagination-input .sbui-inputnumber {
|
|
padding-top: 0.25rem;
|
|
padding-bottom: 0.25rem;
|
|
}
|
|
|
|
/*
|
|
Footer
|
|
*/
|
|
|
|
.sb-grid-footer {
|
|
@apply flex justify-between h-10 px-2 bg-scale-100 dark:bg-scale-300 items-center;
|
|
}
|
|
|
|
.sb-grid-footer__inner {
|
|
@apply flex items-center;
|
|
}
|
|
|
|
/*
|
|
ForeignKeyFormatter
|
|
*/
|
|
|
|
.sb-grid-foreign-key-formatter {
|
|
@apply flex items-center px-2;
|
|
}
|
|
|
|
.sb-grid-foreign-key-formatter__text {
|
|
@apply m-0 flex-grow text-sm overflow-hidden overflow-ellipsis;
|
|
}
|
|
|
|
/*
|
|
AddColumn
|
|
*/
|
|
|
|
.sb-grid-add-column {
|
|
@apply flex h-full;
|
|
}
|
|
|
|
/*
|
|
ColumnHeader
|
|
*/
|
|
|
|
.sb-grid-column-header {
|
|
@apply flex items-center justify-between h-full;
|
|
}
|
|
|
|
.sb-grid-column-header--cursor {
|
|
@apply cursor-default;
|
|
}
|
|
|
|
.sb-grid-column-header__inner {
|
|
@apply flex items-center space-x-2 overflow-hidden overflow-ellipsis;
|
|
}
|
|
|
|
.sb-grid-column-header__inner__name {
|
|
@apply overflow-hidden overflow-ellipsis text-sm;
|
|
@apply text-typography-body-light dark:text-typography-body-dark;
|
|
}
|
|
|
|
.sb-grid-column-header__inner__format {
|
|
@apply text-xs;
|
|
@apply font-normal overflow-hidden overflow-ellipsis;
|
|
@apply text-typography-body-secondary-light dark:text-typography-body-secondary-dark;
|
|
}
|
|
|
|
.sb-grid-column-header__inner__primary-key {
|
|
@apply transform rotate-45 flex items-center;
|
|
}
|
|
|
|
.sb-grid-column-header__inner svg {
|
|
@apply mr-1;
|
|
@apply text-green-900 border-green-900 dark:text-green-900 dark:border-green-900;
|
|
}
|
|
|
|
/*
|
|
Grid
|
|
*/
|
|
|
|
.sb-grid-grid--loading {
|
|
@apply flex justify-center bg-transparent;
|
|
}
|
|
|
|
.sb-grid-grid--loading__inner {
|
|
@apply flex items-center;
|
|
}
|
|
|
|
.sb-grid-grid--loading__inner__text {
|
|
@apply m-8;
|
|
}
|
|
|
|
/*
|
|
SelectColumn
|
|
*/
|
|
|
|
.sb-grid-select-cell__formatter {
|
|
@apply flex justify-between items-center h-full;
|
|
}
|
|
|
|
.sb-grid-select-cell__header {
|
|
@apply flex justify-between items-center h-full;
|
|
}
|
|
|
|
.sb-grid-select-cell__header__input {
|
|
/* @apply focus:ring-brand-500; */
|
|
@apply border-scale-300;
|
|
}
|
|
|
|
/*
|
|
header/filter/FilterDropdown
|
|
*/
|
|
|
|
.sb-grid-filter-popover {
|
|
@apply overflow-visible;
|
|
}
|
|
|
|
.sb-grid-filter-popover__misc {
|
|
@apply py-2;
|
|
}
|
|
|
|
.sb-grid-filter-popover__misc__text {
|
|
@apply block;
|
|
}
|
|
|
|
/*
|
|
header/filter/FilterRow
|
|
*/
|
|
|
|
.sb-grid-filter-row {
|
|
@apply flex items-center justify-between w-full space-x-1;
|
|
}
|
|
|
|
/* .sb-grid-filter-row__inner__close {
|
|
@apply p-0 bg-transparent hover:bg-transparent;
|
|
} */
|
|
|
|
/*
|
|
header/sort/SortDropdown
|
|
*/
|
|
|
|
.sb-grid-sort-popover {
|
|
@apply w-96;
|
|
}
|
|
|
|
.sb-grid-dropdown__empty {
|
|
@apply py-2;
|
|
}
|
|
|
|
.sb-grid-dropdown__empty__text {
|
|
@apply block;
|
|
}
|
|
|
|
.sb-grid-dropdown__item-trigger {
|
|
@apply my-1;
|
|
}
|
|
|
|
/*
|
|
header/sort/SortRow
|
|
*/
|
|
|
|
.sb-grid-sort-row {
|
|
@apply flex justify-between space-x-3;
|
|
}
|
|
|
|
.sb-grid-sort-row__item {
|
|
@apply flex items-center space-x-3;
|
|
}
|
|
|
|
.sb-grid-sort-row__item__remove {
|
|
@apply p-0 bg-transparent hover:bg-transparent;
|
|
}
|
|
|
|
.sb-grid-sort-row__item__label {
|
|
@apply flex items-center space-x-2;
|
|
}
|
|
|
|
.sb-grid-sort-row__item_toogle {
|
|
@apply flex items-center space-x-3 gap-0 w-28;
|
|
}
|
|
|
|
.sb-grid-sort-row__item__move {
|
|
@apply flex cursor-move;
|
|
}
|
|
|
|
/*
|
|
Header
|
|
*/
|
|
|
|
.sb-grid-header {
|
|
@apply flex justify-between h-10 px-2 bg-scale-100 dark:bg-scale-300;
|
|
}
|
|
|
|
.sb-grid-header__inner {
|
|
@apply flex items-center space-x-2;
|
|
}
|
|
|
|
.sb-grid-header__inner__divider {
|
|
@apply py-2;
|
|
}
|
|
|
|
.row_header__selected-rows {
|
|
@apply ml-2 mr-2;
|
|
}
|
|
|
|
/*
|
|
StatusLabel
|
|
*/
|
|
|
|
.sb-grid-status-label {
|
|
@apply text-white text-sm;
|
|
}
|
|
|
|
.sb-grid-status-label__no-msg {
|
|
@apply flex w-5 h-5;
|
|
}
|
|
|
|
.sb-grid-status-label__no-msg > div {
|
|
@apply m-auto w-2 h-2 rounded-full bg-green-900;
|
|
}
|
|
|
|
/*
|
|
Empty value
|
|
*/
|
|
|
|
.sb-grid-empty-value {
|
|
@apply block;
|
|
}
|
|
|
|
/*
|
|
RowContextMenu
|
|
*/
|
|
|
|
.sb-grid-context-menu__label {
|
|
@apply ml-2;
|
|
}
|