Remove usage of jQuery in pgAdmin.

Remove usage of Bootstrap in React components. #5701
This commit is contained in:
Aditya Toshniwal
2023-02-10 10:28:39 +05:30
committed by GitHub
parent 1806866bf5
commit 713ddb5f62
75 changed files with 1387 additions and 3477 deletions

View File

@@ -1,182 +0,0 @@
.alert-icon {
display: flex;
align-items: center;
color: $alert-icon-color;
padding: 15px 15px 15px 17px;
width: 50px;
min-height: 50px;
font-size: 14px;
text-align: center;
align-self: stretch;
flex-shrink: 0;
}
.alert-row {
display: block;
width: auto;
}
.alert-box {
padding: 0px;
display: inline-block;
}
.alert.alert-info,
.alert.alert-danger {
padding: 0.5rem;
}
.success-icon {
background: $color-success;
}
.error-icon {
background: $color-danger;
}
.info-icon {
background: $color-primary;
}
.alert-text {
display: inline-block;
padding: 0 12px 0 10px;
align-self: center;
// To make sure IE picks up the correct font
font-family: $font-family-primary;
color: $alert-color-fg;
}
.alert-info {
border-color: $color-primary;
background-color: $color-primary-light;
color : $color-fg;
background-image: none;
}
.alert-danger {
background-image: none;
}
.grid-error, .graph-error {
.alert-row {
align-items: center;
height: 100%;
display: flex;
justify-content: center;
}
}
.ajs-message {
.media {
display: block;
}
}
.alert, .ajs-message {
.media {
.media-body {
display: inline-block;
width: auto;
.alert-icon {
display: inline-block;
}
.alert-text {
display: inline-block;
}
}
}
}
.error-in-grid {
border-radius: $border-radius !important;
background: $alert-danger-bg !important;
color: $alert-danger-color !important;
}
.pg-prop-status-bar {
padding: 5px;
.media-body {
display: flex;
width: auto;
}
.alert-icon {
padding: 8px 8px 8px 10.5px;
width: 35px;
height: 35px;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
min-height: auto;
}
.alert-text {
-moz-user-select: text;
-khtml-user-select: text;
-webkit-user-select: text;
-ms-user-select: text;
user-select: text;
}
.error-in-footer {
border-radius: $border-radius;
background: $alert-danger-bg;
border: $border-width solid $alert-danger-color;
color: $alert-danger-color;
}
.success-in-footer {
border-radius: $border-radius;
background: $alert-success-bg;
border: $border-width solid $alert-success-color;
color: $alert-success-color;
}
.info-in-footer {
border-radius: $border-radius;
background: $alert-primary-bg;
border: $border-width solid $alert-primary-color;
color: $alert-primary-color;
.fa {
font-size: 1rem;
}
}
}
//Internet Explorer specific CSS
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
.styleguide {
.alert-danger {
width: auto;
}
.alert-info {
width: auto;
}
}
.alert-danger {
width: 90%;
}
.alert-info {
width: 90%;
}
}
/* To align 'X' in alert on login page */
.alert-dismissable, .alert-dismissible {
padding-right: 35px !important;
}
.alert-info-panel {
border: 2px solid $color-gray-light;
margin-top: 2em;
padding: 5px 5px;
background: $color-gray-lighter;
border-radius: 5px;
height: 8em;
overflow: scroll;
}

View File

@@ -1,29 +0,0 @@
.toggle.btn-xs {
min-width: 3rem; min-height: 1.5rem;
}
.toggle-on.btn-xs {
padding-right: .8rem;
}
.toggle-off.btn-xs {
padding-left: .8rem;
}
.btn-xs, .btn-group-xs > .btn, .btn-xs-sq {
padding: 0.05rem 0.4rem;
font-size: 0.76562rem;
line-height: 1.5;
border-radius: 0.2rem;
}
.toggle input[type="checkbox"] {
display: block;
opacity: 0;
margin-top: 0px !important;
}
.toggle:focus-within {
border-color: $input-focus-border-color !important;
outline: 0;
-webkit-box-shadow: $input-focus-box-shadow;
box-shadow: $input-focus-box-shadow;
}

View File

@@ -1,92 +0,0 @@
/* The Bootstrap default grid layout is based on @media - window size
* But in pgadmin4, we need to resize/make responsive elements based on panel size
* which can be changed by wcDocker. Below code will generate pg-el-* classes
* using the bootstrap grid classes generator. Based on el attribute of pg-el-container div,
* the classes will apply.el attribute is set in /pgadmin4/web/pgadmin/browser/static/js/panel.js
*
* Code reused and customized from : bootstrap/scss/mixins/_grid-framework.scss
*/
@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
// Common properties for all breakpoints
%grid-column {
position: relative;
width: 100%;
padding-right: math.div($gutter, 2);
padding-left: math.div($gutter, 2);
}
@each $breakpoint in map-keys($breakpoints) {
$infix: breakpoint-infix($breakpoint, $breakpoints);
// Allow columns to stretch full width below their breakpoints
@for $i from 1 through $columns {
.pg-el#{$infix}-#{$i} {
@extend %grid-column;
}
}
.pg-el-container[el=xs]
.pg-el#{$infix},
.pg-el-container[el=xs]
.pg-el#{$infix}-auto {
@extend %grid-column;
}
// Provide basic `.pg-el-{bp}` classes for equal-width flexbox columns
.pg-el-container[el=xs]
.pg-el#{$infix} {
flex-basis: 0;
flex-grow: 1;
max-width: 100%;
}
}
@for $i from 1 through $columns {
.pg-el-container[el=xl] {
.pg-el-sm-#{$i} {
@include make-col($i, $columns);
}
.pg-el-md-#{$i} {
@include make-col($i, $columns);
}
.pg-el-lg-#{$i} {
@include make-col($i, $columns);
}
.pg-el-xl-#{$i} {
@include make-col($i, $columns);
}
}
.pg-el-container[el=lg] {
.pg-el-sm-#{$i} {
@include make-col($i, $columns);
}
.pg-el-md-#{$i} {
@include make-col($i, $columns);
}
.pg-el-lg-#{$i} {
@include make-col($i, $columns);
}
}
.pg-el-container[el=md] {
.pg-el-md-#{$i} {
@include make-col($i, $columns);
}
.pg-el-sm-#{$i} {
@include make-col($i, $columns);
}
}
.pg-el-container[el=sm] {
.pg-el-sm-#{$i} {
@include make-col($i, $columns);
}
}
}
}
@include make-grid-columns();

View File

@@ -221,45 +221,18 @@
height: auto !important;
}
.obj_properties .backform-tab {
position: absolute;
margin: 0px 0px;
padding: 0px;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
}
.obj_properties .backform-tab > .tab-content {
padding: 0px;
overflow-y: auto;
background-color: $color-gray-light;
}
.obj_properties {
padding: 0px;
}
.obj_properties .pgadmin-control .uneditable-input {
border: 0px !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-transition: none !important;
-o-transition: none !important;
transition: none !important;
background-color: transparent !important;
height: 20px;
padding: 0px;
margin-top: 2px;
vertical-align: middle;
height: 100%;
width: 100%;
background-color: $color-gray-light;
}
/* Message panel shown on browser tabs */
.pg-panel-message {
width: 80%;
margin: 0 auto;
margin-top: 25px !important;
padding-top: 25px !important;
position: relative;
text-align: center;
font-size: $font-size-base;
@@ -330,78 +303,6 @@
width: 100%;
}
.obj_properties fieldset > div > .pgadmin-control-group > label {
min-height: 28px;
}
.obj_properties fieldset > .fieldset-content {
padding: 5px 10px;
}
.obj_properties .accordian-group > .accordian-content {
padding: 5px 10px;
}
.obj_properties .badge {
display: block;
text-align: left;
cursor: pointer;
background-color: $badge-header-bg;
padding: 7px;
font-size: inherit;
border-bottom: $panel-border;
border-radius: 0rem;
border-top-left-radius: $card-border-radius;
border-top-right-radius: $card-border-radius;
&.collapsed {
border-bottom: none !important;
border-radius: $card-border-radius;
}
}
.obj_properties .badge .caret {
display: inline-block;
margin-left: 2px;
margin-right: 4px;
width: 0.7rem;
}
.obj_properties .badge .caret::before {
font-family: $font-family-icon;
content: "\f078";
font-size: 0.7rem;
margin-left: 0rem;
font-weight: 900;
}
.obj_properties .collapsed .caret::before {
font-family: $font-family-icon;
content: "\f054";
font-size: 0.7rem;
border: none;
font-weight: 900;
}
.obj_properties table td {
vertical-align: top;
}
.obj_properties .set-group {
margin: 0.5rem 0rem;
padding: 0rem;
}
.obj_properties .accordian-group {
margin: 0.5rem 0rem;
padding: 0rem;
border: $panel-border;
border-radius: $card-border-radius;
background-color: $color-bg;
fieldset.inline-fieldset {
background: $color-bg;
}
}
fieldset.inline-fieldset {
padding: 10px;
border-radius: $card-border-radius;
@@ -797,6 +698,7 @@ body {
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
font-size: 0.875rem;
}
/* Security label's label column font size */
@@ -823,10 +725,6 @@ body {
font-weight: 900;
}
.pg-el-container {
background-color: $negative-bg;
}
.nav-tabs {
background-color: $header-bg;
}

View File

@@ -1,127 +0,0 @@
.select2-dropdown {
background-color: $input-bg;
color: $input-color;
}
.select2-container--default .select2-results__option[aria-selected=true] {
background-color: $select2-container-bg-selected;
color: $select2-container-fg-selected;
}
.select2-container--default .select2-results__option--highlighted {
background-color: $select2-container-hover-bg !important;
color: $select2-container-hover-fg !important;
}
.select2-container--default .select2-selection--multiple {
background-color: $input-bg;
color: $input-color;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
background-color: $tree-bg-selected;
color: $tree-fg-selected;
border: $input-border-width solid $dropdown-link-hover-bg;
line-height: 2;
& .select2-selection__choice__remove {
color: $dropdown-link-remove-color;
margin-right: 0.25rem;
}
}
.select2-container--default .select2-search--inline .select2-search__field {
background: transparent none repeat scroll 0% 0%;
border: medium none;
outline: 0px none;
box-shadow: none;
width: 100% !important;
}
.select2-container--default .select2-search__field {
background-color: $input-bg;
color: $input-color;
}
.renderable > .select2-container {
width: 100% !important;
}
.select2-container .select2-selection--single {
height: auto;
min-height: 28px;
background-color: $input-bg;
& .select2-selection__rendered{
line-height: inherit;
padding: $input-padding-y $input-padding-x;
padding-right: 1.5rem;
color: $input-color;
}
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
top: 0px;
height: 100%;
}
.select2-container--default.select2-container--focus {
& .select2-selection--single,
& .select2-selection--multiple {
border-color: $input-focus-border-color !important;
outline: 0;
-webkit-box-shadow: $input-focus-box-shadow;
box-shadow: $input-focus-box-shadow;
}
}
.select2-results span.wcTabIcon {
padding-left: 20px;
}
.select2-selection {
color: $input-color;
background-color: $input-bg;
background-clip: padding-box;
border: $input-border-width solid $input-border-color !important;
}
.select2-container--default.select2-container--disabled .select2-selection--multiple {
background-color: $input-disabled-bg !important;
opacity: 1;
color: $text-muted;
}
.select2-container--default.select2-container--disabled .select2-selection--single {
background-color: $input-disabled-bg !important;
opacity: 1;
color: $text-muted;
}
.select2-container--default.select2-container--disabled .select2-selection__rendered {
color: $text-muted;
}
.select2-select-all-adapter-container {
padding: 3px 0px;
background-color: $color-primary;
margin-bottom: 3px;
}
/* select2 readonly */
select[readonly].select2-hidden-accessible + .select2-container {
pointer-events: none;
touch-action: none;
}
select[readonly].select2-hidden-accessible + .select2-container .select2-selection {
background: $select2-readonly;
color: $text-muted;
box-shadow: none;
}
select[readonly].select2-hidden-accessible + .select2-container .select2-selection__arrow, select[readonly].select2-hidden-accessible + .select2-container .select2-selection__clear {
display: none;
}

View File

@@ -1,174 +0,0 @@
.tree-icon-right:before {
font-family: $font-family-icon;
content: "\f054" !important;
right: 15px;
top: 3px;
font-size: 0.6rem;
line-height: 2;
border-style: none;
font-weight: 900;
}
.aciTree, .aciTree.aciTreeFullRow {
& .aciTreeButton, & .aciTreePush, & .aciTreeItem, & .aciTreeIcon, & .aciTreeText, & .aciTreeColumn {
color: $tree-text-fg;
}
.aciTreeLi {
display: grid !important;
cursor: pointer;
}
.aciTreeText {
font-family: $font-family-primary !important;
font-size: $tree-font-size !important;
}
.aciTreeUl {
list-style: none;
margin: 0;
padding: 0;
}
.aciTreeLine {
margin: unset !important;
border: unset !important;
}
.aciTreeSelected > .aciTreeLine {
background: unset !important;
background-color: $tree-bg-selected !important;
border-color: $color-primary-light;
border-right: $active-border !important;
border-left: none !important;
border-top: none !important;
border-bottom: none !important;
-webkit-border-radius: none !important;
-moz-border-radius: none !important;
border-radius: none !important;
& .aciTreeItem {
background-color: $tree-bg-selected;
border: 1px solid transparent;
-webkit-border-radius: none !important;
-moz-border-radius: none !important;
border-radius: none !important;
color: $tree-fg-selected;
}
& .aciTreeText {
color: $tree-text-hover-fg;
}
& .aciTreePush {
color: $tree-text-hover-fg;
}
}
.aciTreeItem {
white-space: nowrap !important;
}
&.aciTreeLoad {
background: none;
}
.aciTreeLine.aciTreeHover {
background: unset !important;
background-color: $tree-bg-hover !important;
-webkit-border-radius: none !important;
-moz-border-radius: none !important;
border-radius: none !important;
& .aciTreeItem {
background-color: inherit;
border: 1px solid transparent;
-webkit-border-radius: none !important;
-moz-border-radius: none !important;
border-radius: none !important;
color: $tree-fg-hover;
}
& .aciTreeText {
color: $tree-text-hover-fg;
}
& .aciTreePush {
color: $tree-text-hover-fg;
}
}
&.aciTreeFocus {
& .aciTreeFocus > .aciTreeLine {
background-color: $tree-bg-selected !important;
border-right: $active-border !important;
}
& .aciTreeSelected >.aciTreeLine .aciTreeItem {
background-color: $tree-bg-selected;
}
& .aciTreeFocus >.aciTreeLine .aciTreeItem,
& .aciTreeSelected.aciTreeFocus >.aciTreeLine .aciTreeItem {
border: 1px solid transparent;
color: $tree-fg-selected;
}
}
.aciTreeButton {
background: none;
}
.aciTreePush {
background: none;
text-align: center;
vertical-align: middle;
font-size: 0.85em;
}
.aciTreeEntry, .aciTreeBranch, &[dir=rtl] .aciTreeBranch {
overflow:hidden;
background: none !important;
}
.aciTreeInode>.aciTreeLine .aciTreePush {
&:before,
&.aciTreeHover:before {
background-position: 6px center !important;
font-family: $font-family-icon;
content: "\f054" !important;
border-style: none;
margin-left: 5px;
font-weight: 900;
}
}
.aciTreeLoad>.aciTreeLine .aciTreePush {
&:before,
&.aciTreeHover:before {
content: " " !important;
font-weight: 900;
}
}
.aciTreeOpen >.aciTreeLine .aciTreePush {
&:before,
&.aciTreeHover:before {
background-position: -14px center !important;
font-family: $font-family-icon;
content: "\f078" !important;
border-style: none;
margin-left: 5px;
font-weight: 900;
}
}
.aciTreePush>span {
width: 15px;
height: 15px;
left: 2px;
background: $loader-icon-small 0 0 no-repeat;
background-color: inherit!important;
}
}

View File

@@ -40,7 +40,6 @@
}
}
/* darken % taken from bootstrap - button_variant */
.wcFrameButton:hover, .wcFrameButtonHover, .wcFrameButton:focus {
background-color: $btn-frame-close-bg;
}

View File

@@ -20,13 +20,8 @@ $theme-colors: (
@import "bootstrap/scss/bootstrap";
@import 'webcabin.pgadmin';
@import 'bootstrap.overrides';
@import 'tree.overrides';
@import 'select2.overrides';
@import 'codemirror.overrides';
@import 'alert';
@import 'pgadmin.grid';
@import 'pgadmin.style';
@import 'bootstrap4-toggle.overrides';
@import 'jsoneditor.overrides';
@import 'rc-dock/dist/rc-dock.css';
@import '@szhsin/react-menu/dist/index.css';

View File

@@ -327,17 +327,6 @@ $schemadiff-source-row-color: #ffebee !default;
$schemadiff-target-row-color: #fbe3bf !default;
$schema-diff-color-fg: $input-color !default;
/* Custom controls bootstrap changes */
$custom-forms-transition: none, none, none;
$custom-control-indicator-focus-border-color: $input-focus-border-color !default;
$custom-control-indicator-border-color: $input-border-color !default;
$select2-container-hover-bg: $tree-bg-hover !default;
$select2-container-hover-fg: $tree-fg-hover !default;
$select2-container-bg-selected: $tree-bg-selected !default;
$select2-container-fg-selected: $tree-fg-selected !default;
$select2-placeholder: #575757 !default;
$btn-primary-icon-bg: $color-bg !default;
$btn-primary-icon-fg: $color-fg !default;
$btn-primary-icon-hover-fg: $color-fg !default;
@@ -372,11 +361,13 @@ $login-page-background: $color-primary !default;
}
$erd-bg-grid: url("data:image/svg+xml, %3Csvg width='100%25' viewBox='0 0 45 45' style='background-color:#{url-friendly-colour($erd-canvas-bg)}' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='smallGrid' width='15' height='15' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 15 0 L 0 0 0 15' fill='none' stroke='#{url-friendly-colour($erd-canvas-grid)}' stroke-width='0.5'/%3E%3C/pattern%3E%3Cpattern id='grid' width='45' height='45' patternUnits='userSpaceOnUse'%3E%3Crect width='100' height='100' fill='url(%23smallGrid)'/%3E%3Cpath d='M 100 0 L 0 0 0 100' fill='none' stroke='#{url-friendly-colour($erd-canvas-grid)}' stroke-width='1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23grid)' /%3E%3C/svg%3E%0A");
$select2-readonly: $color-gray-lighter !default;
// psql tool variables
$psql-background: $color-bg !default;
$psql-foreground: $color-fg !default;
$psql-cursor: $color-fg !default;
$psql-cursorAccent: $color-fg !default;
$psql-selection: #326690 !default;
/* After removing bootstrap */
$dropdown-border-radius: 4px;

View File

@@ -126,8 +126,6 @@ $color-success-hover-fg: $color-fg;
$datagrid-selected-color: $color-primary-fg;
$select2-placeholder: #999;
$span-text-color: #9D9FA1 !default;
$span-text-color-hover: $white !default;
$quick-search-a-text-color: $white !default;
@@ -141,8 +139,6 @@ $erd-canvas-grid: #444952;
$erd-link-color: $color-fg;
$erd-link-selected-color: $color-fg;
$select2-readonly: $color-bg;
// psql tool variables
$psql-background: $color-bg;
$psql-foreground: $color-fg;

View File

@@ -137,12 +137,6 @@ $tree-bg-hover: $color-fg;
$tree-fg-selected: $color-fg;
$tree-bg-selected: $color-primary-light;
$select2-container-hover-bg: $color-primary;
$select2-container-hover-fg: $color-bg;
$select2-container-bg-selected: $color-fg;
$select2-container-fg-selected: $color-bg;
$select2-placeholder: #999;
$sql-hint-active-fg: $color-bg;
$btn-primary-hover-bg: $color-fg;
@@ -181,9 +175,6 @@ $card-header-border-color: $card-header-bg;
$card-border-color: transparent;
$card-bg: $color-gray;
$custom-control-indicator-focus-border-color: #FFFFFF !important;
$custom-control-indicator-border-color: $color-gray-lighter;
$panel-color-fg: $color-ternary;
$panel-border-color: $color-gray;