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