releasebird-javascript-sdk 1.0.84 → 1.0.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,8 +56,9 @@ export class RbirdFormManager {
56
56
  if (this.displayedForms.has(formId)) {
57
57
  // Double-check if the form element actually exists in DOM
58
58
  const existingForm = document.getElementById(`rbird-form-${formId}`);
59
- if (!existingForm) {
60
- // Form element was removed (e.g., SPA navigation), allow re-rendering
59
+ const existingOverlay = document.getElementById(`rbird-form-overlay-${formId}`);
60
+ if (!existingForm && !existingOverlay) {
61
+ // Form element was removed (e.g., closed modal or SPA navigation), allow re-rendering
61
62
  this.displayedForms.delete(formId);
62
63
  } else {
63
64
  console.warn('[RbirdFormManager] Form is already displayed:', formId);
@@ -381,13 +382,14 @@ export class RbirdFormManager {
381
382
  // Styles
382
383
  getFormStyles(theme, isModal) {
383
384
  return `
384
- background-color: ${theme.backgroundColor || '#ffffff'};
385
- font-family: ${theme.fontFamily || "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif"};
386
- border-radius: ${theme.borderRadius || '12px'};
387
- padding: 24px;
388
- min-width: min(400px, calc(100vw - 40px));
389
- ${isModal ? 'max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto;' : 'width: 100%;'}
390
- box-sizing: border-box;
385
+ background-color: ${theme.backgroundColor || '#ffffff'} !important;
386
+ font-family: ${theme.fontFamily || "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif"} !important;
387
+ border-radius: ${theme.borderRadius || '12px'} !important;
388
+ padding: 24px !important;
389
+ min-width: min(400px, calc(100vw - 40px)) !important;
390
+ ${isModal ? 'max-width: 500px !important; width: 100% !important; max-height: 90vh !important; overflow-y: auto !important;' : 'width: 100% !important;'}
391
+ box-sizing: border-box !important;
392
+ margin: 0 !important;
391
393
  `;
392
394
  }
393
395
 
@@ -514,37 +516,46 @@ export class RbirdFormManager {
514
516
  style.id = 'rbird-form-styles';
515
517
  style.textContent = `
516
518
  .rbird-form-overlay {
517
- position: fixed;
518
- top: 0;
519
- left: 0;
520
- right: 0;
521
- bottom: 0;
522
- background-color: rgba(0, 0, 0, 0);
523
- display: flex;
524
- align-items: center;
525
- justify-content: center;
526
- z-index: 10001;
527
- padding: 20px;
519
+ position: fixed !important;
520
+ top: 0 !important;
521
+ left: 0 !important;
522
+ right: 0 !important;
523
+ bottom: 0 !important;
524
+ background-color: rgba(0, 0, 0, 0) !important;
525
+ display: flex !important;
526
+ align-items: center !important;
527
+ justify-content: center !important;
528
+ z-index: 10001 !important;
529
+ padding: 20px !important;
528
530
  opacity: 0;
529
531
  transition: background-color 0.3s, opacity 0.3s;
532
+ box-sizing: border-box !important;
530
533
  }
531
534
 
532
535
  .rbird-form-overlay-visible {
533
- background-color: rgba(0, 0, 0, 0.5);
534
- opacity: 1;
536
+ background-color: rgba(0, 0, 0, 0.5) !important;
537
+ opacity: 1 !important;
535
538
  }
536
539
 
537
540
  .rbird-form-modal {
538
- position: relative;
541
+ position: relative !important;
539
542
  animation: rbirdFormSlideIn 0.3s ease-out;
543
+ box-sizing: border-box !important;
540
544
  }
541
545
 
542
546
  .rbird-form-inline {
543
- width: 100%;
547
+ width: 100% !important;
548
+ box-sizing: border-box !important;
544
549
  }
545
550
 
546
551
  .rbird-form-content {
547
- position: relative;
552
+ position: relative !important;
553
+ box-sizing: border-box !important;
554
+ }
555
+
556
+ .rbird-form-body {
557
+ padding: 0 !important;
558
+ margin: 0 !important;
548
559
  }
549
560
 
550
561
  .rbird-form-close:hover {
@@ -552,20 +563,24 @@ export class RbirdFormManager {
552
563
  }
553
564
 
554
565
  .rbird-form-submit:hover {
555
- opacity: 0.9;
566
+ opacity: 0.9 !important;
556
567
  transform: translateY(-1px);
557
568
  }
558
569
 
559
570
  .rbird-form-submit:disabled {
560
- opacity: 0.6;
561
- cursor: not-allowed;
571
+ opacity: 0.6 !important;
572
+ cursor: not-allowed !important;
562
573
  }
563
574
 
564
575
  .rbird-form-fields input:focus,
565
576
  .rbird-form-fields textarea:focus,
566
577
  .rbird-form-fields select:focus {
567
- border-color: #667eea;
568
- box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
578
+ border-color: #667eea !important;
579
+ box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
580
+ }
581
+
582
+ .rbird-form-field {
583
+ margin-bottom: 16px !important;
569
584
  }
570
585
 
571
586
  @keyframes rbirdFormSlideIn {