@seaverse/payment-sdk 0.9.7 → 0.9.9

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.
package/dist/index.cjs CHANGED
@@ -1887,6 +1887,9 @@ class PaymentModal {
1887
1887
  onClose: options.onClose ?? (() => { }),
1888
1888
  className: options.className ?? '',
1889
1889
  maxWidth: options.maxWidth ?? '480px',
1890
+ background: options.background ?? '#ffffff',
1891
+ border: options.border ?? '1px solid rgba(0, 0, 0, 0.1)',
1892
+ borderRadius: options.borderRadius ?? '16px',
1890
1893
  };
1891
1894
  }
1892
1895
  /**
@@ -2013,15 +2016,14 @@ class PaymentModal {
2013
2016
  width: 100%;
2014
2017
  max-width: ${this.options.maxWidth};
2015
2018
  overflow-y: auto;
2016
- border-radius: 16px;
2017
- border: 1px solid rgba(0, 0, 0, 0.1);
2018
- background: #ffffff;
2019
+ overflow-x: hidden;
2020
+ border-radius: ${this.options.borderRadius};
2021
+ border: ${this.options.border};
2022
+ background: ${this.options.background};
2019
2023
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
2020
2024
  transform: translateY(20px);
2021
2025
  opacity: 0;
2022
- `;
2023
- // 自定义滚动条样式
2024
- this.modal.style.cssText += `
2026
+ outline: none;
2025
2027
  scrollbar-width: thin;
2026
2028
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
2027
2029
  `;
@@ -8306,6 +8308,9 @@ class CreditPackageModal extends BasePackageModal {
8306
8308
  closeOnOverlayClick: false, // Disable click overlay to close
8307
8309
  closeOnEsc: false, // Disable ESC key to close
8308
8310
  maxWidth: '1200px',
8311
+ background: '#0a0a0f',
8312
+ border: '1px solid #0a0a0f',
8313
+ borderRadius: '24px',
8309
8314
  onClose: () => {
8310
8315
  this.cleanup();
8311
8316
  this.options.onClose?.();
@@ -8477,12 +8482,12 @@ class CreditPackageModal extends BasePackageModal {
8477
8482
  * Apply modal styling (hook method override)
8478
8483
  */
8479
8484
  applyModalStyling() {
8480
- // Modify modal background to dark
8481
- const modalElement = document.querySelector('.payment-modal');
8482
- if (modalElement) {
8483
- modalElement.style.background = '#0a0a0f';
8484
- modalElement.style.border = '1px solid rgba(255, 255, 255, 0.1)';
8485
- modalElement.style.borderRadius = '24px';
8485
+ // Modal background, border, and borderRadius are now configured
8486
+ // via PaymentModal constructor options in createModal()
8487
+ // Remove content container padding — renderContent manages its own padding
8488
+ const contentContainer = this.getContentContainer();
8489
+ if (contentContainer) {
8490
+ contentContainer.style.padding = '0';
8486
8491
  }
8487
8492
  // Modify title style
8488
8493
  const titleElement = document.querySelector('.payment-modal-title');
@@ -8559,6 +8564,7 @@ class CreditPackageModal extends BasePackageModal {
8559
8564
  <div style="
8560
8565
  padding: ${styles.containerPadding};
8561
8566
  background: #0a0a0f;
8567
+ border-radius: 24px;
8562
8568
  color: white;
8563
8569
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
8564
8570
  ">
@@ -8606,7 +8612,7 @@ class CreditPackageModal extends BasePackageModal {
8606
8612
  const isLaptop = window.matchMedia('(max-width: 1400px)').matches;
8607
8613
  let computeColumns = 5;
8608
8614
  let packColumns = 4;
8609
- let padding = '0 60px 60px';
8615
+ let padding = '40px 60px 60px';
8610
8616
  let titleSize = '32px';
8611
8617
  let subtitleSize = '16px';
8612
8618
  let headerMargin = this.SPACING.lg;
@@ -8614,7 +8620,7 @@ class CreditPackageModal extends BasePackageModal {
8614
8620
  if (isMobile) {
8615
8621
  computeColumns = 1;
8616
8622
  packColumns = 1;
8617
- padding = '0 16px 32px';
8623
+ padding = '24px 16px 32px';
8618
8624
  titleSize = '24px';
8619
8625
  subtitleSize = '14px';
8620
8626
  headerMargin = this.SPACING.md;
@@ -8623,7 +8629,7 @@ class CreditPackageModal extends BasePackageModal {
8623
8629
  else if (isTablet) {
8624
8630
  computeColumns = 2;
8625
8631
  packColumns = 2;
8626
- padding = '0 32px 48px';
8632
+ padding = '32px 32px 48px';
8627
8633
  titleSize = '28px';
8628
8634
  subtitleSize = '15px';
8629
8635
  headerMargin = this.SPACING.md;
@@ -8632,7 +8638,7 @@ class CreditPackageModal extends BasePackageModal {
8632
8638
  else if (isLaptop) {
8633
8639
  computeColumns = 3;
8634
8640
  packColumns = 3;
8635
- padding = '0 48px 60px';
8641
+ padding = '36px 48px 60px';
8636
8642
  titleSize = '32px';
8637
8643
  subtitleSize = '16px';
8638
8644
  headerMargin = this.SPACING.lg;