Просмотр исходного кода

[web] Migrate TPR promotions and form to BS5 (#21810)

* Update TPR promotions to BS5

* Remove unused class names

* Add responsive visibility in BS5

* Fix `OLFormControl` as `OLFormSelect`

With this update, it fixes the Select when importing from Mendeley or Zotero, in BS3 and BS5

* Use spacing variables in SCSS

GitOrigin-RevId: 8dd0e52a1674114bb3dc38fc4e3958a9c17ad5ac
Antoine Clausse 1 год назад
Родитель
Сommit
c89002f1b8

+ 1 - 0
services/web/frontend/js/features/ui/components/ol/ol-form-control.tsx

@@ -65,6 +65,7 @@ const OLFormControl: BsPrefixRefForwardingComponent<
     prepend: rest.prepend,
     size: rest.htmlSize,
     'main-field': rest['main-field'],
+    children: rest.children,
     ...bs3Props,
   }
 

+ 1 - 0
services/web/frontend/stylesheets/bootstrap-5/modules/all.scss

@@ -1,2 +1,3 @@
+@import 'third-party-references';
 @import 'symbol-palette';
 @import 'writefull';

+ 29 - 0
services/web/frontend/stylesheets/bootstrap-5/modules/third-party-references.scss

@@ -0,0 +1,29 @@
+@keyframes slide-in {
+  0% {
+    transform: translateY(25%);
+    opacity: 0;
+    bottom: var(--spacing-05);
+  }
+
+  100% {
+    transform: translateY(0);
+    opacity: 1;
+    bottom: var(--spacing-06);
+  }
+}
+
+.fade-slide-in {
+  opacity: 0;
+  transition: opacity 0.3s ease; /* Smooth opacity transition */
+  animation: slide-in 0.3s ease-in-out forwards;
+  animation-delay: 300ms;
+}
+
+.tpr-editor-prompt-container {
+  position: absolute;
+  z-index: 1;
+  bottom: var(--spacing-06);
+  right: var(--spacing-06);
+  width: 90%;
+  max-width: 512px;
+}